Skip to content

Commit

Permalink
Add workflow to allow dismissing specific alerts
Browse files Browse the repository at this point in the history
  • Loading branch information
cblecker committed Sep 4, 2023
1 parent 0134e40 commit 0a98714
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@ name: "CodeQL"

on:
push:
tags:
- v*
branches:
- master
branches: [master]
pull_request:
branches: [master]
schedule:
- cron: '20 0 * * 6'

Expand Down Expand Up @@ -51,11 +49,23 @@ jobs:
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
packs: "codeql/${{ matrix.language }}-queries:AlertSuppression.ql"

- name: Autobuild
uses: github/codeql-action/autobuild@v2

- name: Perform CodeQL Analysis
id: analyze
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"
output: sarif-results

- name: Dismiss alerts
if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
uses: advanced-security/dismiss-alerts@v1
with:
sarif-id: ${{ steps.analyze.outputs.sarif-id }}
sarif-file: sarif-results/${{ matrix.language }}.sarif
env:
GITHUB_TOKEN: ${{ github.token }}

0 comments on commit 0a98714

Please sign in to comment.