axum-impl-auth-jwt

Pass

Audited by Gen Agent Trust Hub on Aug 13, 2026

Risk Level: SAFE
Full Analysis
  • [SAFE]: The skill documents industry-standard security practices for JWT authentication. It explicitly identifies hardcoding secrets as a 'security hole' and mandates the use of environment variables (JWT_SECRET) for cryptographic keys.
  • [SAFE]: The provided code examples utilize Validation::default() from the jsonwebtoken crate, which correctly enforces expiration checks (exp claim) by default, preventing indefinite token validity.
  • [SAFE]: The skill follows the principle of least privilege by recommending FromRequestParts over FromRequest, ensuring that authentication logic only accesses request headers and does not unnecessarily consume the request body.
  • [SAFE]: Error handling patterns demonstrate secure practices by mapping internal cryptographic errors to generic custom error types (AuthError), preventing the leakage of sensitive implementation details to end-users.
Audit Metadata
Risk Level
SAFE
Analyzed
Aug 13, 2026, 03:34 AM
Security Audit — agent-trust-hub — axum-impl-auth-jwt