@@ -21,37 +21,27 @@ jobs:
2121 semgrep :
2222 runs-on : ubuntu-latest
2323
24+ container :
25+ # A Docker image with Semgrep installed. Do not change this.
26+ image : semgrep/semgrep
27+
2428 steps :
2529 - name : Checkout
2630 uses : actions/checkout@v4
2731
28- # Run Semgrep via the official action
29- # DOCS: semgrep/semgrep-action
30- - name : Run Semgrep and export SARIF
31- id : semgrep
32- uses : returntocorp/semgrep-action@v1
33- with :
34- # Choose your rules:
35- # - p/ci (recommended default for CI)
36- # - p/security-audit (broader, more findings)
37- # - path/to/.semgrep (repo config)
38- config : p/security-audit
39-
40- # Emit SARIF file(s) to a folder
41- sarif : " sarif-out/semgrep.sarif"
42-
43- # Optional: fail CI on findings
44- # audit_on: push
45- # generate Sarif only; code scanning upload will be handled below (or set upload: "true" if you want action to upload)
46- env :
47- # Optional Semgrep App token if you use Semgrep Cloud Platform features
48- # SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }}
32+ # Run the "semgrep ci" command on the command line of the docker image.
33+ - run : semgrep ci --sarif > semgrep.sarif
34+ # env:
35+ # Connect to Semgrep AppSec Platform through your SEMGREP_APP_TOKEN.
36+ # Generate a token from Semgrep AppSec Platform > Settings
37+ # and add it to your GitHub secrets.
38+ # SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }}
4939
5040 - name : Import SARIF results to GitHub Code Scanning
5141 if : ${{ github.event.inputs.import_sarif == 'true' }}
5242 uses : github/codeql-action/upload-sarif@v4
5343 with :
54- sarif_file : sarif-out/ semgrep.sarif
44+ sarif_file : semgrep.sarif
5545 category : " semgrep"
5646
5747 - name : Prepare SARIF export bundle
0 commit comments