|
31 | 31 | - "Cargo.toml" |
32 | 32 | - "Cargo.lock" |
33 | 33 | - "deny.toml" |
| 34 | + # napi/ is a standalone workspace with its own lockfile; its |
| 35 | + # dependency graph is invisible to a root `cargo deny` run, so |
| 36 | + # changes there must re-trigger this workflow to scan it. |
| 37 | + - "napi/Cargo.toml" |
| 38 | + - "napi/Cargo.lock" |
34 | 39 | - ".github/workflows/license-check.yml" |
35 | 40 | pull_request: |
36 | 41 | branches: [main] |
37 | 42 | paths: |
38 | 43 | - "Cargo.toml" |
39 | 44 | - "Cargo.lock" |
40 | 45 | - "deny.toml" |
| 46 | + - "napi/Cargo.toml" |
| 47 | + - "napi/Cargo.lock" |
41 | 48 | - ".github/workflows/license-check.yml" |
42 | 49 |
|
43 | 50 | permissions: |
|
70 | 77 | with: |
71 | 78 | tool: cargo-deny |
72 | 79 |
|
73 | | - - name: Check licenses, advisories, bans, sources |
| 80 | + - name: Check licenses, advisories, bans, sources (root workspace) |
74 | 81 | # `licenses` is the load-bearing check; `advisories` flags |
75 | 82 | # RustSec security advisories; `bans` and `sources` are |
76 | 83 | # empty-permissive in our deny.toml today but the slots are |
77 | | - # there for future hardening. |
| 84 | + # there for future hardening. The root workspace covers the |
| 85 | + # kernel + pyo3 (pyo3 is a root workspace member). |
78 | 86 | run: cargo deny check |
| 87 | + |
| 88 | + - name: Check licenses, advisories, bans, sources (napi workspace) |
| 89 | + # napi/ is a separate Cargo workspace (its own Cargo.lock) so |
| 90 | + # its transitive graph is NOT seen by the root run above. Scan |
| 91 | + # it explicitly against the same deny.toml policy. `--config` |
| 92 | + # points back at the root deny.toml so both workspaces share |
| 93 | + # one allowlist rather than drifting. `--manifest-path` is a |
| 94 | + # global cargo-deny flag (before the subcommand); `--config` |
| 95 | + # is a `check` flag (after it). A relative `--config` resolves |
| 96 | + # against the manifest's directory (it would look for |
| 97 | + # napi/deny.toml), so point at the root copy by absolute path. |
| 98 | + run: cargo deny --manifest-path napi/Cargo.toml check --config "$GITHUB_WORKSPACE/deny.toml" |
0 commit comments