agentsclimarketplace

Rust security

Skill nyquistwilder/personal-pi/skills/rust-security

Secure Rust development and review workflow for secrets, unsafe code, FFI, path handling, command execution, deserialization, auth boundaries, TLS, dependency advisories, and supply-chain risk.From its SKILL.md

Install
npx -y skills add nyquistwilder/personal-pi --skill rust-security

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

2.5 KB, 487 tokens by cl100k_base, as published. Nobody here has run it

Rust Security

Rule

Use safe Rust by default and treat external input, secrets, unsafe code, FFI, filesystem paths, subprocesses, network calls, auth, and dependencies as explicit security boundaries.

Hard Stops

Stop before:

  • Introducing or modifying unsafe, FFI, custom allocators, or raw pointer code.
  • Touching real secrets, production systems, customer data, incident evidence, or destructive operations.
  • Weakening TLS, authentication, authorization, tenant isolation, audit logging, or data retention.
  • Executing user-controlled commands, accepting unbounded deserialization, or writing outside intended directories.
  • Suppressing cargo deny, cargo audit, scanner, or review findings without risk approval.

Defaults

  • Validate inputs at boundaries with explicit parsing or approved validation crates.
  • Use secrecy/zeroize for long-lived secrets that may otherwise be logged or retained.
  • Avoid logging secrets and sensitive fields; redact at the type or formatter boundary.
  • Enforce path containment after canonicalization where paths touch untrusted input.
  • Use fixed executables and explicit args for subprocesses; avoid shell invocation.
  • Prefer Rustls TLS stacks unless platform policy requires native TLS.
  • Run cargo deny check and/or cargo audit when configured.
  • For unsafe code, require local safety comments, narrow unsafe blocks, tests, and Miri or sanitizer evidence when practical.

Workflow

  1. Identify assets, actors, trust boundaries, and threat model.
  2. Inspect unsafe/FFI, parsing, auth, paths, subprocesses, logs, network, database, and dependencies.
  3. Reproduce risk with safe local tests where practical.
  4. Implement minimal hardening and malicious-input regression tests.
  5. Run tests, deny/audit/scanners when configured, Clippy, and just check.
  6. Separate code fixes from operational actions such as secret rotation.

Antipatterns

  • unwrap on untrusted input or protocol parsing.
  • Raw string SQL/commands built from user input.
  • Debug output for config structs containing secrets.
  • Unsafe blocks without documented invariants.
  • Dependency feature defaults that pull in unwanted TLS/crypto/native code.

Completion

Report risks, mitigations, tests/scans, unsafe status, secrets avoided, and residual risk.

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 326,835. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.