Skip to content

Commit cdd28fe

Browse files
chore(ci): enforce top-level permission to minimum fail-safe permission as per openssf (#2638)
1 parent b2e43b3 commit cdd28fe

20 files changed

+79
-0
lines changed

.github/workflows/build_changelog.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ on:
1717
branches:
1818
- develop
1919

20+
permissions:
21+
contents: read
22+
2023
jobs:
2124
changelog:
2225
permissions:

.github/workflows/codeql-analysis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ on:
1717
branches:
1818
- develop
1919

20+
permissions:
21+
contents: read
22+
2023
jobs:
2124
analyze:
2225
name: Analyze
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Dependency Review Action
2+
#
3+
# This Action will scan dependency manifest files that change as part of a Pull Request,
4+
# surfacing known-vulnerable versions of the packages declared or updated in the PR.
5+
# Once installed, if the workflow run is marked as required,
6+
# PRs introducing known-vulnerable packages will be blocked from merging.
7+
#
8+
# Source repository: https://github.com/actions/dependency-review-action
9+
name: 'Dependency Review'
10+
on: [pull_request]
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
dependency-review:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: 'Checkout Repository'
20+
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
21+
- name: 'Dependency Review'
22+
uses: actions/dependency-review-action@0efb1d1d84fc9633afcdaad14c485cbbc90ef46c # v2.5.1

.github/workflows/label_pr_on_title.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ on:
2626
types:
2727
- completed
2828

29+
permissions:
30+
contents: read
31+
2932
jobs:
3033
get_pr_details:
3134
permissions:

.github/workflows/on_closed_issues.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ name: Closed Issue Message
1212
on:
1313
issues:
1414
types: [closed]
15+
permissions:
16+
contents: read
17+
1518
jobs:
1619
auto_comment:
1720
runs-on: ubuntu-latest

.github/workflows/on_label_added.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ on:
2525
types:
2626
- completed
2727

28+
permissions:
29+
contents: read
30+
2831
jobs:
2932
get_pr_details:
3033
permissions:

.github/workflows/on_merged_pr.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ on:
2626
types:
2727
- completed
2828

29+
permissions:
30+
contents: read
31+
2932
jobs:
3033
get_pr_details:
3134
permissions:

.github/workflows/on_opened_pr.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ on:
2626
types:
2727
- completed
2828

29+
permissions:
30+
contents: read
31+
2932
jobs:
3033
get_pr_details:
3134
permissions:

.github/workflows/on_push_docs.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ on:
2020
- "examples/**"
2121
- "CHANGELOG.md"
2222

23+
permissions:
24+
contents: read
25+
2326
jobs:
2427
release-docs:
2528
permissions:

.github/workflows/publish_v2_layer.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ on:
4949
type: boolean
5050
required: false
5151

52+
permissions:
53+
contents: read
54+
5255
jobs:
5356
build-layer:
5457
permissions:

0 commit comments

Comments
 (0)