Skip to content

Commit

Permalink
Update codeql.yml
Browse files Browse the repository at this point in the history
Signed-off-by: Brian <[email protected]>
  • Loading branch information
b4yuan authored Feb 6, 2024
1 parent a1ca612 commit 30863c0
Showing 1 changed file with 28 additions and 5 deletions.
33 changes: 28 additions & 5 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@ name: "CodeQL"

on:
push:
branches: [ "master", "codeql" ]
pull_request:
branches: [ "master", "codeql" ]
schedule:
- cron: "23 8 * * 5"
branches: [ "testing" ]

jobs:
analyze:
Expand Down Expand Up @@ -41,3 +37,30 @@ jobs:
uses: github/codeql-action/analyze@v2
with:
category: "/language:cpp"
id: step1

- name: Filter out unwanted errors and warnings
uses: advanced-security/filter-sarif@v1
with:
patterns: |
-**:cpp/path-injection
-**:cpp/world-writable-file-creation
-**:cpp/poorly-documented-function
-**:cpp/potentially-dangerous-function
-**:cpp/use-of-goto
-**:cpp/integer-multiplication-cast-to-long
-**:cpp/comparison-with-wider-type
-**:cpp/leap-year/*
-**:cpp/ambiguously-signed-bit-field
-**:cpp/suspicious-pointer-scaling
-**:cpp/suspicious-pointer-scaling-void
-**:cpp/unsigned-comparison-zero
-**/cmake*/Modules/**
input: ${{ steps.step1.outputs.sarif-output }}/cpp.sarif
output: ${{ steps.step1.outputs.sarif-output }}/cpp.sarif

- name: Upload CodeQL results to code scanning
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: ${{ steps.step1.outputs.sarif-output }}
category: "/language:${{matrix.language}}"

0 comments on commit 30863c0

Please sign in to comment.