Repository navigation
48 lines (43 loc) · 1.7 KB
/
Copy pathsecurity-cargo.yml
File metadata and controls
48 lines (43 loc) · 1.7 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
name: Security (Cargo)
# Two triggers, because they catch different things. On a pull request: a dependency
# arriving with a known advisory, while there is still a review to act on. On a
# schedule: an advisory published *after* a dependency was merged, which no push would
# ever surface. Cargo and npm have a workflow each, so a pull request that touches only
# one of them is never judged on the other's tree.
on:
pull_request:
branches: [main, 'dev/**']
paths:
- 'Cargo.toml'
- 'crates/*/Cargo.toml'
- 'e2e/Cargo.toml'
- 'Cargo.lock'
- 'deny.toml'
- '.github/workflows/security-cargo.yml'
schedule:
# Monday morning, so the week starts with the answer rather than ends with it.
- cron: '0 6 * * 1'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
cargo-deny:
name: Cargo deny
runs-on: ubuntu-22.04
timeout-minutes: 10
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
# Reads `Cargo.lock` and the advisory database; it compiles nothing, which is
# why this job needs no Rust toolchain and no cargo cache.
#
# ⚠️ The repository's only advisory net — Dependabot alerts are off. `licenses` came
# back with the egui tree, whose dozens of new crates arrive by pull request: one under a
# licence GPL-3.0 cannot ship is refused while it can still be replaced, and `sources`
# refuses one from anywhere but crates.io.
- uses: EmbarkStudios/cargo-deny-action@3c6349835b2b7b196a839186cb8b78e02f7b5f25 # v2
with:
manifest-path: Cargo.toml
command: check