Claude Skill

rust-security

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

LLM Mart · 0 points · 0 views 0 listing impressions 0 install-command copies
Download dankosik-cargo-modernize-.agents_skills_rust-security-6f540c3.zip · 1 KB

Install

skills CLI npx skills add https://github.com/Dankosik/cargo-modernize/tree/main/.agents/skills/rust-security
Claude Code claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install dankosik-cargo-modernize@llmmart
Git git clone https://github.com/Dankosik/cargo-modernize.git

The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole dankosik/cargo-modernize collection as a plugin from our marketplace. Git is the plain clone.

Skill manifest

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 (cargo-modernize)
  • LICENSE 1 KB · in bundle
  • SKILL.md 1.9 KB
    ---
    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.
    

Comments

Sign in to join the conversation.

No comments yet. Start the conversation.

Reviews (0)

No reviews yet.