Skip to content

Commit 0c0dfd4

Browse files
semgrep workflow: pin Docker image and actions to version tags
Pin returntocorp/semgrep container image to a specific version and GitHub Actions to major version tags to prevent :latest tag resolution and reduce supply-chain attack surface. Fixes: LCNC-15821 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 86585c9 commit 0c0dfd4

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

.github/workflows/semgrep.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
name: Semgrep
2+
3+
permissions:
4+
contents: read
5+
security-events: write
26
on:
37
pull_request: {}
48
push:
@@ -14,8 +18,8 @@ jobs:
1418
name: Scan
1519
runs-on: ubuntu-20.04
1620
container:
17-
image: returntocorp/semgrep
21+
image: returntocorp/semgrep:1.166.0
1822
if: (github.actor != 'dependabot[bot]')
1923
steps:
20-
- uses: actions/checkout@v3
24+
- uses: actions/checkout@v4
2125
- run: semgrep --error --config "p/cwe-top-25" --config "p/owasp-top-ten" --config "p/r2c-security-audit"

0 commit comments

Comments
 (0)