spring-security-jwt
Pass
Audited by Gen Agent Trust Hub on Nov 2, 2026
Risk Level: SAFEINDIRECT_PROMPT_INJECTIONCREDENTIALS_UNSAFE
Full Analysis
- [INDIRECT_PROMPT_INJECTION]: The skill processes JSON Web Tokens (JWT) provided in the
Authorizationheader, which is an untrusted external data source. - Ingestion points: The
JwtAuthenticationFilter.javatemplate extracts tokens from theAuthorizationrequest header in thedoFilterInternalmethod. - Boundary markers: The
JwtService.javatemplate validates the token signature using thejjwtlibrary and performs manual checks on thetypeclaim (expecting 'access') and expiration. - Capability inventory: The skill's primary function is to authenticate users, grant authorities, and establish the security context for the request lifecycle.
- Sanitization: The code leverages the
jjwtlibrary to ensure token integrity, signature validity, and expiration before extracting user identities. - [CREDENTIALS_UNSAFE]: A hardcoded secret string is present in a file intended to demonstrate poor security practices.
- Evidence: The file
examples/bad-security-config.javacontainsprivate static final String SECRET = "mySecretKey12345678901234567890123456";. - Context: This finding is part of a negative example meant to teach developers which practices to avoid. The recommended templates correctly utilize environment variable placeholders (
${JWT_SECRET}) for secret management.
Audit Metadata