Skip to content

Commit d2d4780

Browse files
authored
ci: add explicit permissions to semgrep workflow (#3992)
This PR fixes security alert #153 by adding explicit permissions to the semgrep workflow. The fix adds \permissions: contents: read\ to scope the GITHUB_TOKEN following the principle of least privilege. Signed-off-by: Jiyong Huang <huangjy@emqx.io>
1 parent f611688 commit d2d4780

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

.github/workflows/semgrep.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
pull_request:
77
branches: [ "master", "main" ]
88

9+
# Explicitly scope GITHUB_TOKEN permissions (principle of least privilege).
10+
permissions:
11+
contents: read
12+
913
jobs:
1014
semgrep:
1115
name: Scan

0 commit comments

Comments
 (0)