rust-supply-chain
БесплатноБез исполняемых скриптовНе проверенRust supply-chain & quality toolchain — cargo-deny (license + advisory + bans), cargo-audit (RustSec advisory DB), cargo-nextest (faster test runner with…
от claude-dev-suite★ 51 звезда на GitHubОб этом скилле
Rust Supply Chain & Quality Toolchain
Deep Knowledge: Use
mcp__documentation__fetch_docswith technology:cargo-denyorrustsec.
Overview
Production Rust app needs:
| Tool | Concern |
|---|---|
| cargo-deny | License compliance, banned crates, advisory enforcement |
| cargo-audit | RustSec advisory DB lookup |
| cargo-nextest | Faster, more reliable test runner (parallel, retries) |
cargo-tarpaulin / llvm-cov |
Code coverage |
| cargo-machete | Detect unused dependencies |
| cargo-outdated | Find stale dependencies |
| cargo-vet | Mozilla-style audit attestations for transitive deps |
| cargo-msrv | Minimum supported Rust version detection |
| cargo-binstall | Install tools as binaries (faster than cargo install) |
For BHODL-style wallet apps: all of these in CI. No exceptions.
Install
# Fast install via binstall (downloads pre-built binaries)
cargo install cargo-binstall
cargo binstall cargo-deny cargo-audit cargo-nextest cargo-tarpaulin \
cargo-machete cargo-outdated cargo-vet cargo-msrv
# Or build from source (slower)
cargo install cargo-deny cargo-audit cargo-nextest cargo-tarpaulin \
cargo-machete cargo-outdated cargo-vet
cargo-deny — License + Bans + Advisories
deny.toml (project root):
[graph]
all-features = true
no-default-features = false
[advisories]
db-path = "~/.cargo/advisory-db"
db-urls = ["https://github.com/rustsec/advisory-db"]
yanked = "deny" # fail on yanked crates
ignore = [
# Allowed exceptions with rationale
# "RUSTSEC-2024-XXXX", # reason: not exploitable in our use
]
[licenses]
allow = [
"MIT",
"Apache-2.0",
"Apache-2.0 WITH LLVM-exception",
"BSD-2-Clause",
"BSD-3-Clause",
"ISC",
"Unicode-DFS-2016", # for unicode-* crates
"Zlib",
"MPL-2.0", # be careful, file-level copyleft
"CC0-1.0", # Bitcoin libs use this
"Unlicense", # public domain
"0BSD",
]
confidence-threshold = 0.8
# Block GPL, AGPL — they'd virally infect a wallet codebase
# Reject by NOT listing them in `allow` (default deny)
licenses.exceptions
name = "ring"
allow = ["LicenseRef-ring"] # has its own license file
[bans]
multiple-versions = "warn"
deny = [
{ name = "openssl-sys", reason = "Use rustls instead" },
{ name = "native-tls", reason = "Use rustls instead" },
]
skip = [
# Tolerate duplicates from common transitive deps
{ name = "syn", version = "1" },
{ name = "syn", version = "2" },
]
skip-tree = [
# Don't trace into these for ban check
]
[sources]
unknown-registry = "deny"
unknown-git = "deny"
allow-registry = ["https://github.com/rust-lang/crates.io-index"]
allow-git = [] # no random git deps
# Run all checks
cargo deny check
# Specific category
cargo deny check licenses
cargo deny check advisories
cargo deny check bans
cargo deny check sources
# In CI (exit non-zero on issues)
cargo deny --log-level error check
For BHODL-type wallet: deny GPL/AGPL hard — they'd require open-sourcing the whole app under matching license.
cargo-audit — Advisory DB Lookup
# Update advisory DB
cargo audit fetch
# Run audit
cargo audit
# JSON output
cargo audit --json | jq '.vulnerabilities'
# Allow some advisories with rationale
cargo audit --ignore RUSTSEC-2024-0001
cargo-audit is lighter-weight than cargo deny check advisories — use both: cargo-deny for policy enforcement, cargo-audit for quick scans.
cargo-nextest — Faster Test Runner
# Drop-in replacement for `cargo test`
cargo nextest run
# Run specific tests
cargo nextest run wallet::tests::insert
cargo nextest run --package bdk-ffi
# With retry on flake
cargo nextest run --retries 2
# JUnit output for CI
cargo nextest run --profile ci
# List all tests without running
cargo nextest list
Configuration .config/nextest.toml:
[profile.default]
retries = 0
fail-fast = true
test-threads = "num-cpus"
slow-timeout = { period = "60s", terminate-after = 2 }
[profile.ci]
retries = 2
fail-fast = false
test-threads = 4
junit = { path = "target/nextest/junit.xml" }
status-level = "all"
final-status-level = "slow"
Why nextest:
- 2-3x faster than cargo test (better parallelism)
- Per-test process isolation (uncovers test pollution bugs)
- Retry support for flaky tests
- JUnit XML output for CI dashboards
- Better failure summaries
cargo-tarpaulin (Linux) — Code Coverage
cargo install cargo-tarpaulin
# Run with coverage
cargo tarpaulin --workspace --out Xml --output-dir coverage
# HTML report
cargo tarpaulin --workspace --out Html --output-dir coverage
open coverage/tarpaulin-report.html
# Exclude generated code
cargo ta
Установить rust-supply-chain в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadGrepGlobWriteEditFAQ
Что делает скилл rust-supply-chain?
Rust supply-chain & quality toolchain — cargo-deny (license + advisory + bans), cargo-audit (RustSec advisory DB), cargo-nextest (faster test runner with retry/parallel), cargo-tarpaulin / llvm-cov (code coverage), cargo-machete (unused deps), cargo-outdated (version gap detection), cargo-vet (third-party audit attestations). CI integration patterns and policies for production Rust apps. USE WHEN: user mentions "cargo-deny", "cargo-audit", "RustSec", "cargo-nextest", "cargo-tarpaulin", "llvm-cov rust", "cargo-machete", "cargo-outdated", "cargo-vet", "deny.toml", "rust supply chain" DO NOT USE FOR: Cross-compile mechanics - use `build-tools/rust-cross-compile` DO NOT USE FOR: Pure Rust language - use `languages/rust` DO NOT USE FOR: Kotlin/JS supply chain - use `quality/osv-scanner` (covers all)
Как установить скилл rust-supply-chain?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл rust-supply-chain запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic