summaryrefslogtreecommitdiff
path: root/.github/workflows/json4cpp-semgrep.yml
blob: 0e728b38306564cadc291cd8e785436d9848888f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: "json4cpp: Semgrep"

on:
  workflow_dispatch:
  workflow_call:

permissions:
  contents: read

jobs:
  semgrep:
    permissions:
      contents: read
      security-events: write
      actions: read
    name: Scan
    runs-on: ubuntu-latest
    steps:
      - name: Harden Runner
        uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
        with:
          egress-policy: audit

      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

      - uses: semgrep/semgrep@caad1d53f48a40fa55cec9e41bf4820f115889b3
        with:
          publishToken: ${{ secrets.SEMGREP_APP_TOKEN }}
          generateSarif: "1"

      - name: Upload SARIF file
        uses: github/codeql-action/upload-sarif@0d579ffd059c29b07949a3cce3983f0780820c98 # v4
        with:
          sarif_file: semgrep.sarif
        if: always()