rust-dependency-audit
Audit Rust dependencies for vulnerabilities, license compliance, supply chain integrity, and freshness using cargo-audit, cargo-deny, cargo-vet,
What this skill does
# Rust Dependency Audit
Comprehensive dependency audit workflow using four complementary tools: freshness checking, vulnerability scanning, license/advisory compliance, and supply chain verification.
> **Self-Evolving Skill**: This skill improves through use. If instructions are wrong, parameters drifted, or a workaround was needed — fix this file immediately, don't defer. Only update for real, reproducible issues.
## CRITICAL: Web-Verify Before Upgrade Decisions
**Always check crates.io for latest versions before recommending upgrades.** Static docs go stale; the crates.io API is ground truth.
1. **Before upgrading a crate**: Check what version is current and what it depends on
```
WebFetch: https://crates.io/api/v1/crates/{crate_name}
Prompt: "What is the latest version? List recent versions and their dependencies."
```
2. **Before ignoring a vulnerability**: Verify whether a patched version exists
```
WebSearch: "{advisory_id} {crate_name} fix patch"
```
3. **Check compatibility chains**: When crate A depends on crate B, verify both latest versions are compatible
```
WebFetch: https://crates.io/api/v1/crates/{crate_name}/{version}/dependencies
Prompt: "What version of {dependency} does this require?"
```
4. **Fallback: Firecrawl scrape** (if WebFetch fails — JS-heavy pages, rate limits, incomplete data):
```bash
curl -s -X POST http://littleblack:3002/v1/scrape \
-H "Content-Type: application/json" \
-d '{"url": "https://crates.io/crates/{crate_name}", "formats": ["markdown"], "waitFor": 0}' \
| jq -r '.data.markdown'
```
Requires Tailscale connectivity. See `/devops-tools:firecrawl-research-patterns` for full API reference.
## When to Use
- Before a release (full audit pipeline)
- After `cargo update` (verify no new vulnerabilities)
- CI pipeline setup (automated dependency checks)
- License compliance review (open source projects)
- Supply chain security assessment
## Four-Tool Audit Workflow
Run in this order — each tool catches different issues:
```bash
# 1. Freshness — what's outdated?
cargo outdated
# 2. Vulnerabilities — any known CVEs?
cargo audit
# 3. Licenses + Advisories — compliance check
cargo deny check
# 4. Supply Chain — who audited these crates?
cargo vet
```
### Quick Assessment
```bash
# One-liner: run all four (stop on first failure)
cargo outdated && cargo audit && cargo deny check && cargo vet
```
## Freshness: Finding Outdated Dependencies
Three tools for different needs:
| Tool | Install | Purpose | Best For |
| ---------------------------- | ------------------------------ | -------------------------------------------------------- | ------------------- |
| `cargo-outdated` | `cargo install cargo-outdated` | Full outdated report with compatible/latest versions | Comprehensive audit |
| `cargo-upgrades` | `cargo install cargo-upgrades` | Lightweight — only shows incompatible (breaking) updates | Quick check |
| `cargo upgrade` (cargo-edit) | `cargo install cargo-edit` | Actually updates `Cargo.toml` versions | Performing updates |
```bash
# Show all outdated deps (compatible + incompatible)
cargo outdated --root-deps-only
# Show only breaking updates needed
cargo upgrades
# Actually update Cargo.toml (dry run first)
cargo upgrade --dry-run
cargo upgrade --incompatible
# Nightly: native cargo support (experimental)
cargo +nightly update --breaking
```
**Recommendation**: Use `cargo-upgrades` for quick checks, `cargo-outdated` for full audits, `cargo upgrade` (cargo-edit) when ready to actually update.
See [cargo-outdated reference](./references/cargo-outdated-guide.md).
## Security: Vulnerability Scanning
### cargo-audit (RUSTSEC Database)
```bash
# Scan for known vulnerabilities
cargo audit
# Auto-fix where possible (updates Cargo.lock)
cargo audit fix
# Binary scanning (audit compiled binaries)
cargo audit bin ./target/release/my-binary
# Custom config (ignore specific advisories)
# Create audit.toml:
```
```toml
# audit.toml
[advisories]
ignore = [
"RUSTSEC-YYYY-NNNN", # Reason for ignoring
]
```
See [cargo-audit reference](./references/cargo-audit-guide.md).
### cargo-deny (Advisories + More)
cargo-deny's advisory check complements cargo-audit with additional sources:
```bash
# Check advisories only
cargo deny check advisories
# All checks (advisories + licenses + bans + sources)
cargo deny check
```
See the License section below for full cargo-deny configuration.
## License: Compliance Checking
### cargo-deny License Check
```toml
# deny.toml
[licenses]
allow = [
"MIT",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause",
"ISC",
"Unicode-3.0",
]
confidence-threshold = 0.8
[[licenses.clarify]]
name = "ring"
expression = "MIT AND ISC AND OpenSSL"
license-files = [{ path = "LICENSE", hash = 0xbd0eed23 }]
```
```bash
# Check licenses
cargo deny check licenses
# Generate deny.toml template
cargo deny init
```
See [cargo-deny reference](./references/cargo-deny-guide.md).
## Supply Chain: Audit Verification
### cargo-vet (Mozilla)
cargo-vet tracks which crates have been audited and by whom:
```bash
# Check supply chain status
cargo vet
# Audit a specific crate (certify you've reviewed it)
cargo vet certify <crate> <version>
# Import audits from trusted organizations
cargo vet trust --all mozilla
cargo vet trust --all google
# See what needs auditing
cargo vet suggest
```
Key files:
- `supply-chain/audits.toml` — Your audits
- `supply-chain/imports.lock` — Imported audits
- `supply-chain/config.toml` — Trusted sources
See [cargo-vet reference](./references/cargo-vet-guide.md).
## Unsafe Code: Dependency Safety Audit
### cargo-geiger
cargo-geiger quantifies unsafe code usage across your entire dependency tree:
```bash
# Quick check: which deps forbid unsafe? (fast, no compilation)
cargo geiger --forbid-only
# Full audit: count unsafe blocks per crate
cargo geiger
# Output as ratio (for CI/scripting)
cargo geiger --forbid-only --output-format ratio
# Markdown report
cargo geiger --output-format markdown > unsafe-report.md
```
Key flags:
- `--forbid-only`: Fast mode — only checks `#![forbid(unsafe_code)]` (no compilation)
- `--output-format`: `ratio`, `markdown`, `ascii`, `json`
- `--all-features`: Check with all features enabled
See [cargo-geiger reference](./references/cargo-geiger-guide.md).
## Combined CI Workflow (GitHub Actions)
```yaml
name: Dependency Audit
on:
pull_request:
schedule:
- cron: "0 6 * * 1" # Weekly Monday 6am
jobs:
audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: cargo-audit
run: |
cargo install cargo-audit
cargo audit
- name: cargo-deny
uses: EmbarkStudios/cargo-deny-action@v2
- name: cargo-vet
run: |
cargo install cargo-vet
cargo vet
- name: cargo-geiger
run: |
cargo install cargo-geiger
cargo geiger --forbid-only
- name: cargo-outdated
run: |
cargo install cargo-outdated
cargo outdated --root-deps-only --exit-code 1
```
## Reference Documents
- [cargo-audit-guide.md](./references/cargo-audit-guide.md) — Vulnerability scanning
- [cargo-deny-guide.md](./references/cargo-deny-guide.md) — License + advisory compliance
- [cargo-outdated-guide.md](./references/cargo-outdated-guide.md) — Freshness + alternatives
- [cargo-vet-guide.md](./references/cargo-vet-guide.md) — Supply chain audit
- [cargo-geiger-guide.md](./references/cargo-geiger-guide.md) — Unsafe code quantification
## Troubleshooting
| Problem | Solution |
| -----------------------Related in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.