-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (60 loc) · 1.77 KB
/
security.yml
File metadata and controls
69 lines (60 loc) · 1.77 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: security
on:
workflow_call:
permissions:
contents: read
jobs:
pinact:
name: pinact
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: suzuki-shunsuke/pinact-action@cf51507d80d4d6522a07348e3d58790290eaf0b6 # v2.0.0
with:
min_age: "3" # require pinned action versions to be at least 3 days old
skip_push: "true" # validate only; fail CI on unpinned actions
zizmor:
name: zizmor
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write # upload SARIF findings to Code Scanning
actions: read # required by zizmor-action for private/internal repos
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Write zizmor config
run: |
cat > ./zizmor.yml <<'EOF'
rules:
dependabot-cooldown:
config:
days: 3
EOF
- name: Run zizmor
uses: zizmorcore/zizmor-action@b1d7e1fb5de872772f31590499237e7cce841e8e # v0.5.3
with:
persona: pedantic
config: ./zizmor.yml
summary:
name: summary
permissions: {}
if: always()
needs:
- pinact
- zizmor
runs-on: ubuntu-latest
steps:
- name: Print job results
env:
NEEDS_JSON: ${{ toJson(needs) }}
run: |
echo "'needs': ${NEEDS_JSON}"
- name: Fail if any required job failed or was cancelled
if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}
run: exit 1