Skip to content

Commit ffeaf20

Browse files
committed
Specify permissions on all workflows
1 parent d080f61 commit ffeaf20

File tree

7 files changed

+27
-2
lines changed

7 files changed

+27
-2
lines changed

.github/workflows/build.yml

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

10+
permissions:
11+
contents: read
12+
1013
concurrency:
1114
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
1215
cancel-in-progress: true

.github/workflows/codeql-daily.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
- cron: '30 1 * * *'
77
workflow_dispatch:
88

9+
permissions:
10+
contents: read
11+
912
jobs:
1013
analyze:
1114
runs-on: ubuntu-latest

.github/workflows/issue-management-feedback-label.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,15 @@ on:
44
issue_comment:
55
types: [created]
66

7+
permissions:
8+
contents: read
9+
710
jobs:
811
issue_comment:
12+
permissions:
13+
contents: read
14+
issues: write
15+
pull-requests: write
916
if: >
1017
contains(github.event.issue.labels.*.name, 'needs author feedback') &&
1118
github.event.comment.user.login == github.event.issue.user.login

.github/workflows/issue-management-stale-action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ permissions:
1111
jobs:
1212
stale:
1313
permissions:
14+
contents: read
1415
issues: write # for actions/stale to close stale issues
1516
pull-requests: write # for actions/stale to close stale PRs
1617
runs-on: ubuntu-latest

.github/workflows/oats-tests.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ on:
99
- 'logging-k8s-stdout-otlp-json/**'
1010
workflow_dispatch:
1111

12+
permissions:
13+
contents: read
14+
1215
jobs:
1316
acceptance-tests:
1417
runs-on: ubuntu-24.04

.github/workflows/ossf-scorecard.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,18 @@ on:
88
- cron: "2 15 * * 1" # once a week
99
workflow_dispatch:
1010

11-
permissions: read-all
11+
permissions:
12+
contents: read
1213

1314
jobs:
1415
analysis:
15-
runs-on: ubuntu-latest
1616
permissions:
17+
contents: read
1718
# Needed for Code scanning upload
1819
security-events: write
1920
# Needed for GitHub OIDC token if publish_results is true
2021
id-token: write
22+
runs-on: ubuntu-latest
2123
steps:
2224
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2325
with:

.github/workflows/reusable-workflow-notification.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,14 @@ on:
99
type: boolean
1010
required: true
1111

12+
permissions:
13+
contents: read
14+
1215
jobs:
1316
workflow-notification:
17+
permissions:
18+
contents: read
19+
issues: write
1420
runs-on: ubuntu-latest
1521
steps:
1622
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

0 commit comments

Comments
 (0)