Skip to content

Commit 316299e

Browse files
Adjust GitHub Action permissions (#75)
1 parent 69f1179 commit 316299e

File tree

7 files changed

+18
-18
lines changed

7 files changed

+18
-18
lines changed

.github/workflows/_build.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88

99
name: Build
1010

11-
permissions:
12-
contents: read
13-
1411
on:
1512
workflow_call:
1613
inputs:
@@ -21,6 +18,8 @@ on:
2118
type: string
2219
required: true
2320

21+
permissions: read-all
22+
2423
jobs:
2524
Build:
2625
runs-on: ${{ inputs.os }}

.github/workflows/_build_doc.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77

88
name: Build Doc
99

10-
permissions:
11-
contents: read
12-
1310
on:
1411
workflow_call:
1512
inputs:
@@ -20,6 +17,8 @@ on:
2017
type: string
2118
required: true
2219

20+
permissions: read-all
21+
2322
jobs:
2423
Build:
2524
runs-on: ${{ inputs.os }}

.github/workflows/_codecov.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88

99
name: CodeCov
1010

11-
permissions:
12-
contents: read
13-
1411
on:
1512
workflow_call:
1613
inputs:
@@ -21,6 +18,8 @@ on:
2118
type: string
2219
required: true
2320

21+
permissions: read-all
22+
2423
concurrency:
2524
group: codecov-${{ github.ref }}
2625
cancel-in-progress: true

.github/workflows/_codeql.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ name: CodeQL
1515
on:
1616
workflow_call:
1717

18+
# Don't change this permissions. These must match those of the analyze job.
19+
permissions:
20+
actions: read
21+
contents: read
22+
security-events: write
23+
1824
jobs:
1925
analyze:
2026
name: Analyze

.github/workflows/_pre_commit.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,11 @@
77

88
name: Pre-Commit
99

10-
permissions:
11-
contents: read
12-
1310
on:
1411
workflow_call:
1512

13+
permissions: read-all
14+
1615
jobs:
1716
Pre-Commit:
1817
runs-on: ubuntu-latest

.github/workflows/_pypi_publish.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@
99

1010
name: PyPI Publish
1111

12-
permissions:
13-
contents: read
14-
1512
on:
1613
workflow_call:
1714
inputs:
@@ -22,6 +19,8 @@ on:
2219
API_TOKEN:
2320
required: true
2421

22+
permissions: read-all
23+
2524
jobs:
2625
PyPI-Publish:
2726
name: Upload to ${{ inputs.REPOSITORY_URL }}

.github/workflows/_test.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77

88
name: Test Spot
99

10-
permissions:
11-
contents: read
12-
1310
on:
1411
workflow_call:
1512
inputs:
@@ -20,6 +17,8 @@ on:
2017
type: string
2118
required: true
2219

20+
permissions: read-all
21+
2322
jobs:
2423
Test:
2524
name: Test ${{ inputs.os }} ${{ inputs.python-version }}

0 commit comments

Comments
 (0)