cli/.github/workflows/codeql.yml
dependabot[bot] fe8884f351
chore(deps): bump advanced-security/filter-sarif from 1.0.0 to 1.0.1
Bumps [advanced-security/filter-sarif](https://github.com/advanced-security/filter-sarif) from 1.0.0 to 1.0.1.
- [Release notes](https://github.com/advanced-security/filter-sarif/releases)
- [Commits](bc96d9fb93...f3b8118a93)

---
updated-dependencies:
- dependency-name: advanced-security/filter-sarif
  dependency-version: 1.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-14 17:30:21 +00:00

62 lines
1.7 KiB
YAML

name: Code Scanning
on:
push:
branches: [trunk]
pull_request:
branches: [trunk]
paths-ignore:
- '**/*.md'
schedule:
- cron: "0 0 * * 0"
permissions:
actions: read # for github/codeql-action/init to get workflow details
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/analyze to upload SARIF results
jobs:
CodeQL-Build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
language: ['go', 'actions']
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Setup Go
if: matrix.language == 'go'
uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
queries: security-and-quality
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{ matrix.language }}"
upload: false
output: sarif-results
- name: Filter SARIF for third-party code
if: matrix.language == 'go'
uses: advanced-security/filter-sarif@f3b8118a9349d88f7b1c0c488476411145b6270d # v1.0.1
with:
patterns: |
-third-party/**
input: sarif-results/${{ matrix.language }}.sarif
output: sarif-results/${{ matrix.language }}.sarif
- name: Upload filtered SARIF
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: sarif-results/${{ matrix.language }}.sarif
category: "/language:${{ matrix.language }}"