Verify JWT signatures before trusting claims
Decoding a JWT without verifying its signature allows attackers to forge tokens and impersonate users.
#Metadata
#Why it matters
Methods like `JWT.decode` and `Jwts.parser().parseClaimsJwt` do not check the cryptographic signature; downstream claims cannot be trusted.
#Remediation
Use `JWT.require(algorithm).build().verify(token)` or `Jwts.parser().setSigningKey(key).parseClaimsJws(token)` to authenticate the token before trusting claims.
#Repository path
The generated metadata points to critiq-rules/libs/rules/catalog/rules/java/java.security.jwt-without-verification.rule.yaml.