Unrevoked JWT detected.
- Rule ID: javascript_express_jwt_not_revoked
- Languages: javascript
- Source: jwt_not_revoked.yml
Description
The best practice caching policy is to revoke JWTs especially when these contain senstitive information.
Remediations
✅ Ensure JWTs are short-lived by revoking them
expressjwt({
...
isRevoked: this.customRevokeCall(),
...
})
Resources
Associated CWE
OWASP Top 10
Configuration
To skip this rule during a scan, use the following flag
bearer scan /path/to/your-project/ --skip-rule=javascript_express_jwt_not_revoked
To run only this rule during a scan, use the following flag
bearer scan /path/to/your-project/ --only-rule=javascript_express_jwt_not_revoked
Ready to take the next step? Learn more about Bearer Cloud.