Rust Service Security
SkillCommunicationUse when adding, changing, testing, or reviewing security-sensitive Rust web service behavior, especially login flows, password hashing, credential checks, session cookies, flash messages, admin route protection, auth middleware, user enumeration defenses, or moving CPU-heavy password work off async executors.
Use Rust Service Security in Claude, ChatGPT or Ahel Desktop
Free. Sign in, add Rust Service Security and connect your AI. About a minute.
Also: Claude Code · Cursor · Codex
Then ask your AI: use the Rust Service Security skill
Details
Instructions available. Your AI can read the instructions. Execution depends on the setup they require.
Account requirements not reviewed. Check the skill instructions before use; Ahel provides instructions and does not run this skill.
No other account needed.
Add Ahel to your AI once: Claude, ChatGPT, Cursor, Claude Code or Codex. Then ask it to use this.
What this skill tells your AI
The instructions your AI receives, as published by hashgraph-online/awesome-codex-plugins in plugins/LVTD-LLC/skills/skills/rust-service-security/SKILL.md and read by Ahel’s review.
Use this skill when a Rust service handles identity, credentials, sessions, cookies, privileged routes, or sensitive user data. Prefer explicit threat checks and tests over optimistic handler code.
Core Workflow
- Identify the protected asset: account access, admin area, session state, password change, reset token, private data, or privileged operation.
- Trace the whole flow: request parsing, credential lookup, verification, session mutation, redirects/responses, logs, and tests.
- Keep secrets out of logs and debug output. Use secret wrappers for passwords, tokens, signing keys, and session secrets.
- Run password hashing and verification with memory-hard algorithms and move CPU-heavy work off async reactor threads.
- Prevent user enumeration. Failed login and password reset flows should not reveal whether the account exists.
- Set cookie and session attributes deliberately:
HttpOnly,Secure,SameSite, path, lifetime, signing/encryption, and store backend. - Protect routes at middleware or extractor boundaries, not by repeating ad-hoc checks in every handler.
- Add tests for happy path, failed auth, missing session, forged cookie or token, and logout/session rotation behavior.
Password Rules
Read references/password-auth.md before implementing or changing password
storage or verification.
- Store PHC strings produced by Argon2id or the project's chosen password hasher; never store plaintext or reversible encrypted passwords.
- Generate salts with a secure RNG.
- Use constant, generic responses for invalid credentials.
- Use
tokio::task::spawn_blockingor a dedicated blocking abstraction for expensive password operations. - Keep password hash parameters configurable enough to upgrade over time.
Cookie And Session Rules
Read references/cookies-sessions.md when setting, reading, deleting, signing,
or persisting cookies and sessions.
- Never store raw credentials in cookies.
- Prefer opaque session IDs backed by a server-side store for privileged apps.
- Rotate or renew session state after login and privilege changes.
- Delete sessions server-side on logout when using a server-side store.
- Test security attributes on
Set-Cookieheaders.
Route Protection
Read references/auth-middleware.md when adding admin routes, extractors,
guards, or framework middleware.
Keep handlers typed:
pub async fn admin_dashboard(user: AuthenticatedUser) -> Result<HttpResponse, AppError> {
// Handler can assume authentication succeeded.
Ok(HttpResponse::Ok().finish())
}
Avoid optional user lookups in handlers that require authentication; make the missing-user case impossible at the handler signature when the framework allows it.
Reference Files
references/password-auth.md: Argon2, PHC strings, user enumeration, and blocking password work.references/cookies-sessions.md: cookie flags, signed messages, server-side sessions, and logout.references/auth-middleware.md: route guards, extractors, and typed session access.
Signals
- GitHub stars
- 1k
- Forks
- 316
- Last commit
- Oct 2026
Advanced
- Item type
- skill
- Key
rust-service-security- Source
- github.com/hashgraph-online/awesome-codex-plugins
github.com/hashgraph-online/awesome-codex-plugins
Related picks
Skill · rlaope
The pick for Rustrust-async-task-design
Skill · hashgraph-online
The pick for Rustsecrets-exposure-review
Skill · naodeng
The pick for Secretssecrets-with-git-crypt
Skill · derailed-dash
The pick for Secretschecking-owasp-compliance
Skill · jeremylongshore
The pick for Web (OWASP)owasp-security
Skill · davila7
The pick for Web (OWASP)