Skip to content

Commit 6aefe74

Browse files
AdnaneKhanlrstewartdougchmaddeleine
authored
ci: scope down GitHub Token permissions (#5570)
Co-authored-by: Lindsay Stewart <slindsay@amazon.com> Co-authored-by: Doug Chapman <54039637+dougch@users.noreply.github.com> Co-authored-by: maddeleine <59030281+maddeleine@users.noreply.github.com>
1 parent b3b69af commit 6aefe74

File tree

12 files changed

+37
-0
lines changed

12 files changed

+37
-0
lines changed

.github/workflows/ci_aws_kms_tls_auth.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ on:
99
types: [checks_requested]
1010
branches: [main]
1111

12+
permissions:
13+
contents: read
14+
1215
jobs:
1316
lint:
1417
name: rustfmt and clippy

.github/workflows/ci_freebsd.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ on:
99
types: [checks_requested]
1010
branches: [main]
1111

12+
permissions:
13+
contents: read
14+
1215
jobs:
1316
testfreebsd:
1417
runs-on: ubuntu-latest

.github/workflows/ci_linting.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
merge_group:
99
types: [checks_requested]
1010
branches: [main]
11+
permissions:
12+
contents: read
13+
1114
jobs:
1215
cppcheck:
1316
runs-on: ubuntu-latest

.github/workflows/ci_openbsd.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ on:
99
types: [checks_requested]
1010
branches: [main]
1111

12+
permissions:
13+
contents: read
14+
1215
jobs:
1316
testopenbsd:
1417
runs-on: ubuntu-latest

.github/workflows/ci_rust.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ env:
2323
# The name of a s2n-tls test gated behind the external build cfg flag.
2424
EXTERNAL_BUILD_TEST_NAME: test_unstable_as_ptr
2525

26+
permissions:
27+
contents: read
28+
2629
jobs:
2730
generate:
2831
runs-on: ${{ matrix.os }}

.github/workflows/docs.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ on:
99
types: [checks_requested]
1010
branches: [main]
1111

12+
permissions:
13+
contents: write
14+
pages: write
15+
1216
jobs:
1317
generate-doxygen:
1418
runs-on: ubuntu-latest

.github/workflows/gha_osx_tests.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ on:
1010
types: [checks_requested]
1111
branches: [main]
1212

13+
permissions:
14+
contents: read
15+
1316
jobs:
1417
OSX:
1518
runs-on: macos-latest

.github/workflows/policy_snapshot.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ env:
1414
COMMITTED_SNAPSHOTS: ./tests/policy_snapshot/snapshots
1515
GENERATED_SNAPSHOTS: ./tests/policy_snapshot/generated
1616

17+
permissions:
18+
contents: read
19+
1720
jobs:
1821
snapshot:
1922
runs-on: ubuntu-latest

.github/workflows/private_sync.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ on:
33
push:
44
branches:
55
- main
6+
permissions:
7+
contents: write
8+
69
jobs:
710
build:
811
# This should only run in one place.

.github/workflows/regression_ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ on:
1515
env:
1616
ROOT_PATH: bindings/rust/extended
1717

18+
permissions:
19+
contents: read
20+
1821
jobs:
1922
regression-test:
2023
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)