Skip to content

Commit 395c60b

Browse files
committed
Try another permission setup.
security events has to be write to allow codeql to work. OSSF-security scan complains with the write at the top level. So leave top level read only and add write at job level. See if codeql will not fail (missing write perms caused failure in codeql init). Note that ossf recommended remediation step using: https://app.stepsecurity.io/secureworkflow/roundup-tracker/roundup/codeql-analysis.yml/master?enable=permissions had no issue with the permissions defined in the workflow. I had a green checkmark.
1 parent 3265c1b commit 395c60b

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,22 @@ on:
2121
schedule:
2222
- cron: '28 17 * * 1'
2323

24+
permissions:
25+
contents: read
26+
2427
concurrency:
2528
group: ${{ github.workflow }}-${{ github.ref }}
2629
cancel-in-progress: true
2730

28-
permissions:
29-
contents: read
30-
security-events: write
31-
3231
jobs:
3332
analyze:
3433
name: Analyze
3534
runs-on: ubuntu-latest
3635

36+
permissions:
37+
contents: read
38+
security-events: write
39+
3740
strategy:
3841
fail-fast: false
3942
matrix:

0 commit comments

Comments
 (0)