Skip to content
Back to skills

Rust Security

ASecurity

Attacker paths. Use when untrusted workspace input, file writes, subprocess invocation, path handling, or resource amplification affect security.

  • 14 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 2, 2026
ai-agentsrustgoshellgitsecurity

Works with

  • cli

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned December 2, 2026

npx -y skills add Dankosik/cargo-modernize --skill rust-security --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Rust Security?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Rust Security
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/dankosik-rust-security-cargo-modernize/badge)](https://www.skillsdirectory.com/skills/dankosik-rust-security-cargo-modernize)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: rust-security
description: "Attacker paths. Use when untrusted workspace input, file writes, subprocess invocation, path handling, or resource amplification affect security."
---

# Rust Security

**Attacker paths.** Trace caller-controlled input across every trust boundary to its enforcement point and observable effect, naming the protected invariant, the capability an attacker gains on bypass, and the negative test that proves enforcement.

**Untrusted inputs.** Treat every scanned workspace as untrusted: Rust sources, `Cargo.toml`, `build.rs`, `clippy.toml`, `rust-toolchain.toml`, `cargo metadata` output, and VCS state may be malformed, adversarial, or enormous.

**Filesystem and process boundaries.** Default to read-only; write only under `--fix`, only to files inside the resolved workspace root, after resolving symlinks and rejecting paths that escape it. Invoke `cargo` and `git` with argument vectors (never shell strings), keep user-controlled values out of option positions, and do not execute build scripts or proc-macros except through the explicit `--verify`/`--fix` `cargo check` path.

**Control semantics.** Verify the exact guarantee each mechanism provides: `catch_unwind` isolates panics but not stack overflow, aborts, or infinite loops; `.gitignore` filtering is not a security boundary; and path containment, rejection, and size bounds each require their own negative assertion beyond happy-path tests.

**Network and secrets.** The CLI performs no network access; any upstream fetching belongs to `xtask` against pinned `rust-lang/rust` sources. Never echo environment values or file contents beyond the reported span into reports or errors.

**Amplification and proof.** Bound file size, syntax-tree depth, pattern-matching backtracking, regex cost, worker count, and child-process output before spending resources, preserving admission and redaction across refactors and reporting any unexercised security proof explicitly.

Files in this skill

  • LICENSE1 KB
  • SKILL.md1.9 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.