Skip to content

Commit 1f43ff7

Browse files
spboyerCopilot
andcommitted
fix: add top-level permissions to workflows for CKV2_GHA_1
Checkov CKV2_GHA_1 requires top-level permissions to be explicitly restricted, not just at the job level. Added permissions: {} to security-scan.yml and permissions: { contents: read } to azure-bicep-validate.yaml. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 9617cd0 commit 1f43ff7

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

.github/workflows/azure-bicep-validate.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,14 @@ on:
88
branches:
99
- main
1010

11+
permissions:
12+
contents: read
13+
1114
jobs:
1215
build:
1316
runs-on: ubuntu-latest
17+
permissions:
18+
contents: read
1419
steps:
1520
- name: Checkout
1621
uses: actions/checkout@v2

.github/workflows/security-scan.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ on:
88
schedule:
99
- cron: '0 0 * * 0' # Run weekly
1010

11+
permissions: {}
12+
1113
jobs:
1214
security:
1315
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)