forked from kedacore/keda
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Review CodeQL config (kedacore#4133)
Fixes kedacore#4032 Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es>
- Loading branch information
Showing
3 changed files
with
71 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: "CodeQL" | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: {} | ||
|
||
jobs: | ||
codeQl: | ||
name: Analyze CodeQL Go | ||
runs-on: ubuntu-latest | ||
container: ghcr.io/kedacore/build-tools:1.19.5 | ||
if: (github.actor != 'dependabot[bot]') | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: Register workspace path | ||
run: git config --global --add safe.directory "$GITHUB_WORKSPACE" | ||
|
||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v2 | ||
with: | ||
languages: go | ||
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs | ||
queries: +security-and-quality | ||
|
||
- name: Autobuild | ||
uses: github/codeql-action/autobuild@v2 | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v2 | ||
with: | ||
category: "/language:go" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: "Semgrep" | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request_target: {} | ||
|
||
jobs: | ||
semgrep: | ||
name: Analyze Semgrep | ||
runs-on: ubuntu-latest | ||
container: returntocorp/semgrep | ||
if: (github.actor != 'dependabot[bot]') | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Register workspace path | ||
if: ${{ github.event.number > 0 }} | ||
run: git config --global --add safe.directory "$GITHUB_WORKSPACE" | ||
|
||
- name: Checkout Pull Request | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
id: checkout | ||
if: ${{ github.event.number > 0 }} | ||
run: | | ||
apk add github-cli | ||
gh pr checkout ${{ github.event.number }} | ||
- run: semgrep ci --sarif --output=semgrep.sarif | ||
env: | ||
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }} | ||
|
||
- name: Upload SARIF file for GitHub Advanced Security Dashboard | ||
uses: github/codeql-action/upload-sarif@v2 | ||
with: | ||
sarif_file: semgrep.sarif | ||
if: ${{ github.event.number == '' && !cancelled() }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters