-
Notifications
You must be signed in to change notification settings - Fork 6
35 lines (29 loc) · 1.03 KB
/
Copy pathsecrets-inherit.yml
File metadata and controls
35 lines (29 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# secrets-inherit.yml
#
# what:
# calls reusable workflows with `secrets: inherit`. this shares all secrets
# with the reusable workflow instead of limiting its access to just the secrets
# it needs, violating POLA.
#
#
# how:
# user error.
on: push
permissions: {}
jobs:
call-workflow-vulnerable-1:
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@main
# NOT OK: unconditionally inherits
secrets: inherit
call-workflow-not-vulnerable-2:
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@main
# OK: explicitly forwards intended secrets
secrets:
special-secret: ${{ secrets.special-secret }}
call-workflow-not-vulnerable-3:
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@main
# OK: no secrets forwarded
call-workflow-not-vulnerable-4:
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@main
# OK: no secrets forwarded
secrets: {}