-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (51 loc) · 1.91 KB
/
Copy pathsecurity.yml
File metadata and controls
55 lines (51 loc) · 1.91 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
name: Security
on:
push:
branches: [master]
pull_request:
schedule:
# Re-run weekly so newly disclosed advisories surface even without a push.
- cron: "20 7 * * 1"
workflow_dispatch:
permissions: {}
jobs:
# Dependency supply-chain checks: advisories, banned crates, license policy,
# and allowed sources (typosquat / dependency-confusion defense).
cargo-deny:
name: cargo-deny
if: github.event_name != 'pull_request' || !endsWith(github.actor, '[bot]')
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: step-security/harden-runner@e14015d583714f6e62063499dc959a02595150a1 # v2.21.1
with:
egress-policy: audit
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- uses: EmbarkStudios/cargo-deny-action@3c6349835b2b7b196a839186cb8b78e02f7b5f25 # v2.1.1
with:
command: check advisories bans licenses sources
# Static analysis of the GitHub Actions workflows themselves.
zizmor:
name: zizmor
if: github.event_name != 'pull_request' || !endsWith(github.actor, '[bot]')
runs-on: ubuntu-latest
permissions:
security-events: write # upload SARIF to code scanning
contents: read
actions: read
steps:
- uses: step-security/harden-runner@e14015d583714f6e62063499dc959a02595150a1 # v2.21.1
with:
egress-policy: audit
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
# The action defaults to the latest zizmor, so a release that adds an
# audit turns this job red on a day nothing here changed. Pin the tool
# and bump it deliberately, the way the rustdoc nightly is pinned.
- uses: zizmorcore/zizmor-action@70fb788f84895a7701f5643d103d587e460b5c99 # v0.6.3
with:
version: 1.29.0