Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testing codeql #134

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 23 additions & 15 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ name: CodeQL
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

env:
CODEQL_EXTRACTOR_GO_BUILD_TRACING: true

jobs:
analyze:
Expand All @@ -38,27 +43,30 @@ jobs:
- name: Checkout repository
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 #v2.4.0

- name: Utilize Go Module Cache
uses: actions/cache@937d24475381cd9c75ae6db12cb4e79714b926ed #v2.1.7
with:
path: |
~/go/pkg/mod
~/.cache/go-build
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-

- name: Set correct version of Golang to use during CodeQL run
uses: actions/setup-go@bfdd3570ce990073878bf10f6b2d79082de49492 #v2.1.5
with:
go-version: '1.17.x'

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@75f07e7ab2ee63cba88752d8c696324e4df67466 #v1.1.2
with:
languages: ${{ matrix.language }}
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@75f07e7ab2ee63cba88752d8c696324e4df67466 #v1.1.2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
queries: +security-and-quality

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
#- run: |
# make bootstrap
# make release
- name: Build cosign for CodeQL
run: make cosign

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@75f07e7ab2ee63cba88752d8c696324e4df67466 #v1.1.2