Skip to content

Commit f6507ce

Browse files
committed
security: add permissions to GitHub Actions workflows
Add explicit `permissions: contents: read` to all workflow files that were missing a permissions block. This follows the principle of least privilege and resolves CodeQL alert actions/missing-workflow-permissions. Resolves: NR-560131
1 parent 1593538 commit f6507ce

6 files changed

Lines changed: 24 additions & 0 deletions

File tree

.github/workflows/automated_release.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ on:
55
schedule:
66
- cron: "30 7 * * 1"
77

8+
9+
permissions:
10+
contents: read
11+
812
jobs:
913
release_management:
1014
uses: newrelic/coreint-automation/.github/workflows/reusable_release_automation.yaml@v3

.github/workflows/on_prerelease.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
tags:
77
- 'v*'
88

9+
10+
permissions:
11+
contents: read
12+
913
jobs:
1014
pre-release:
1115
uses: newrelic/coreint-automation/.github/workflows/reusable_pre_release.yaml@v3

.github/workflows/on_push_pr.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ on:
77
pull_request:
88
workflow_dispatch:
99

10+
11+
permissions:
12+
contents: read
13+
1014
jobs:
1115
push-pr:
1216
uses: newrelic/coreint-automation/.github/workflows/reusable_push_pr.yaml@v3

.github/workflows/on_release.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ on:
77
tags:
88
- 'v*'
99

10+
11+
permissions:
12+
contents: read
13+
1014
jobs:
1115
release:
1216
uses: newrelic/coreint-automation/.github/workflows/reusable_on_release.yaml@v3

.github/workflows/repolinter.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
push:
77
workflow_dispatch:
88

9+
10+
permissions:
11+
contents: read
12+
913
jobs:
1014
repolinter:
1115
uses: newrelic/coreint-automation/.github/workflows/reusable_repolinter.yaml@v3

.github/workflows/security.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ on:
1010
schedule:
1111
- cron: "0 3 * * *"
1212

13+
14+
permissions:
15+
contents: read
16+
1317
jobs:
1418
security:
1519
uses: newrelic/coreint-automation/.github/workflows/reusable_security.yaml@v3

0 commit comments

Comments
 (0)