Weak jwt encryption deceted
- Rule ID: javascript_lang_jwt_weak_encryption
- Languages: javascript
- Source: jwt_weak_encryption.yml
Description
Use any default encryption algorithm jwt library provides
Remediations
Use the HS256 algorithm for JWT encryption
jwt.sign({ "foo": "bar"}, process.env.JWT_SECRET, {
algorithm: "HS256"
})
Resources
Associated CWE
OWASP Top 10
Ready to take the next step? Join the Bearer Cloud waitlist.