Skip to content

Commit 87af318

Browse files
authored
Remediate Scorecard Token-Permissions findings
This attempts to remediate the problems reported by Scorecard about Token-Permissions
1 parent 8e0b576 commit 87af318

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/osv-scanner-unified.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,14 @@ on:
2626
permissions:
2727
# Required to upload SARIF file to CodeQL. See: https://github.com/github/codeql-action/issues/2117
2828
actions: read
29-
# Require writing security events to upload SARIF file to security tab
30-
security-events: write
3129
# Read commit contents
3230
contents: read
3331

3432
jobs:
3533
scan-scheduled:
34+
permissions:
35+
# Required for writing security events to upload SARIF file to security tab
36+
security-events: write
3637
if: ${{ github.event_name == 'push' || github.event_name == 'schedule' }}
3738
# If you want to copy this config, highly suggest pinning this version to a release rather than tracking the main branch
3839
uses: "google/osv-scanner-action/.github/workflows/osv-scanner-reusable.yml@8bd1ce1c4be9d98053ffd9e6e14585276a36762c" # v1.9.1
@@ -43,6 +44,9 @@ jobs:
4344
--skip-git
4445
./
4546
scan-pr:
47+
permissions:
48+
# Required for writing security events to upload SARIF file to security tab
49+
security-events: write
4650
if: ${{ github.event_name == 'pull_request' || github.event_name == 'merge_group' }}
4751
# If you want to copy this config, highly suggest pinning this version to a release rather than tracking the main branch
4852
uses: "google/osv-scanner-action/.github/workflows/osv-scanner-reusable-pr.yml@8bd1ce1c4be9d98053ffd9e6e14585276a36762c" # v1.9.1

0 commit comments

Comments
 (0)