mirror of
https://gitlab.com/pezkuwichain/pezkuwi-sdk.git
synced 2026-10-20 18:56:23 +00:00
fix(ci): fix all cargo-deny and cargo-audit failures
- deny.toml: add all-features=true to [graph] — prevents krates 0.20+ panic on workspace crates that have std feature but don't enable it by default - deny.toml: allow pezkuwichain/serde.git in [sources] (our wasm32v1-none fork) - deny.toml: remove stale RUSTSEC ignores (2023-0071, 2024-0428, 2025-0055) - deny.toml: add new wasmtime/rand/webpki advisories to ignore list - ci: remove --exclude flag from cargo-deny jobs (flag removed in new versions) - ci: rewrite cargo-audit to use JSON + python summary (prevents 4MB log overflow) and add all current advisories to ignore set with documented rationale - ci: fix check-zepter to use --force (not --locked) so 1.82.1 actually installs - Cargo.toml: add default=[std] to bizinikiwi-test-runtime-transaction-pool (std crate that was missing default feature, confusing krates graph builder)
This commit is contained in:
1 parent
cfbde6de5a
commit
a2a37dca32
3 files changed
+76
-35
No files matched your search
+40
-13
@@ -102,7 +102,7 @@ check-zepter:
|
||||
stage: quick-checks
|
||||
script:
|
||||
- cargo metadata --format-version=1 --locked > /dev/null
|
||||
- cargo install zepter@1.82.1 --locked -q
|
||||
- cargo install zepter@1.82.1 --force
|
||||
- zepter --version
|
||||
- zepter run check
|
||||
|
||||
@@ -204,7 +204,7 @@ cargo-deny-advisories:
|
||||
before_script: []
|
||||
script:
|
||||
- cargo install cargo-deny --locked -q
|
||||
- cargo deny check advisories --config deny.toml --exclude bizinikiwi-test-runtime-transaction-pool
|
||||
- cargo deny check advisories --config deny.toml
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||
- if: $CI_MERGE_REQUEST_IID
|
||||
@@ -216,7 +216,7 @@ cargo-deny-licenses:
|
||||
before_script: []
|
||||
script:
|
||||
- cargo install cargo-deny --locked -q
|
||||
- cargo deny check licenses --config deny.toml --exclude bizinikiwi-test-runtime-transaction-pool
|
||||
- cargo deny check licenses --config deny.toml
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||
- if: $CI_MERGE_REQUEST_IID
|
||||
@@ -241,16 +241,43 @@ cargo-audit:
|
||||
script:
|
||||
- cargo install cargo-audit --locked -q
|
||||
- |
|
||||
cargo audit \
|
||||
--ignore RUSTSEC-2026-0006 \
|
||||
--ignore RUSTSEC-2026-0020 \
|
||||
--ignore RUSTSEC-2026-0021 \
|
||||
--ignore RUSTSEC-2026-0049 \
|
||||
--ignore RUSTSEC-2023-0071 \
|
||||
--ignore RUSTSEC-2025-0055 \
|
||||
--ignore RUSTSEC-2026-0067 \
|
||||
--ignore RUSTSEC-2026-0068 \
|
||||
2>&1 | tee audit-output.txt || (cat audit-output.txt && exit 1)
|
||||
# --json + python summary: avoids 4MB log overflow from full dependency trees
|
||||
cargo audit --json 2>/dev/null | python3 -c "
|
||||
import sys, json
|
||||
data = json.load(sys.stdin)
|
||||
ignore = {
|
||||
# wasmtime: fix requires rustc 1.91.0+, toolchain pinned to 1.88.0
|
||||
'RUSTSEC-2026-0006','RUSTSEC-2026-0020','RUSTSEC-2026-0021',
|
||||
'RUSTSEC-2026-0085','RUSTSEC-2026-0086','RUSTSEC-2026-0087',
|
||||
'RUSTSEC-2026-0088','RUSTSEC-2026-0089','RUSTSEC-2026-0091',
|
||||
'RUSTSEC-2026-0092','RUSTSEC-2026-0093','RUSTSEC-2026-0094',
|
||||
'RUSTSEC-2026-0095','RUSTSEC-2026-0096',
|
||||
# rsa: no fixed version available
|
||||
'RUSTSEC-2023-0071',
|
||||
# tracing-subscriber 0.2.x: pulled by arkworks internals, not our direct dep
|
||||
'RUSTSEC-2025-0055',
|
||||
# rustls-webpki: transitive via kube-client, upgrade requires kube ecosystem bump
|
||||
'RUSTSEC-2026-0098','RUSTSEC-2026-0099',
|
||||
# rand: unsound only with custom logger calling rand::rng() during init
|
||||
'RUSTSEC-2026-0097',
|
||||
# lru: Stacked Borrows issue in IterMut, no user-facing exploit path
|
||||
'RUSTSEC-2026-0002',
|
||||
}
|
||||
vulns = data.get('vulnerabilities', {}).get('list', [])
|
||||
fail = False
|
||||
for v in vulns:
|
||||
adv = v.get('advisory', {})
|
||||
pkg = v.get('package', {})
|
||||
aid = adv.get('id', '')
|
||||
if aid in ignore:
|
||||
print(f' [ignored] {aid} in {pkg.get(\"name\",\"?\")} {pkg.get(\"version\",\"?\")}')
|
||||
else:
|
||||
print(f' [FAIL] {aid} in {pkg.get(\"name\",\"?\")} {pkg.get(\"version\",\"?\")} — {adv.get(\"title\",\"?\")}')
|
||||
fail = True
|
||||
if fail:
|
||||
sys.exit(1)
|
||||
print(f'audit ok — {len(vulns)} advisories checked, all ignored or none found')
|
||||
"
|
||||
allow_failure: false
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||
|
||||
Reference in new issue
Block a user