Skip to content

Commit e7561c0

Browse files
authored
Added default WF permission to read-only (#236)
* Added default WF permission to read-only * set least privilege
1 parent 2a1882b commit e7561c0

File tree

4 files changed

+11
-7
lines changed

4 files changed

+11
-7
lines changed

.github/workflows/codeql.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,7 @@ on:
99
- main
1010

1111
permissions:
12-
actions: read
13-
checks: write
1412
contents: read
15-
security-events: write
1613

1714
concurrency:
1815
group: ${{ github.workflow }}-${{ github.ref }}
@@ -22,6 +19,11 @@ jobs:
2219
analyze:
2320
name: Analyze
2421
runs-on: ubuntu-latest
22+
permissions:
23+
actions: read
24+
checks: write
25+
contents: read
26+
security-events: write
2527

2628
steps:
2729
- name: Harden the runner (Audit all outbound calls)

.github/workflows/markdown.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ concurrency:
1313
group: ${{ github.workflow }}-${{ github.ref }}
1414
cancel-in-progress: true
1515

16+
permissions:
17+
contents: read
18+
1619
jobs:
1720
linter:
1821
name: Lint Markdown Files

.github/workflows/mkdocs.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ on:
55
- '.github/workflows/mkdocs.yml'
66
- 'docs/**/*'
77
push:
8-
branches:
9-
main
8+
branches: [ main ]
109
paths:
1110
- '.github/workflows/mkdocs.yml'
1211
- 'docs/**/*'

.github/workflows/scorecard.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ on:
1111
push:
1212
branches: [ "main" ]
1313

14-
# Declare default permissions as read-only.
15-
permissions: read-all
14+
permissions:
15+
contents: read
1616

1717
jobs:
1818
analysis:

0 commit comments

Comments
 (0)