T09 · Insecure Skill Coding Practices
- Location
SKILL.md:107- Finding
Refresh Tokens Stored in Plaintext
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This is a documentation-only API security skill, but its JWT example includes unsafe refresh-token storage guidance that could weaken an application if copied as written.
Review and correct the JWT refresh-token section before relying on this skill. It appears safe to install from an agent-behavior perspective, but developers should not copy the refresh-token storage pattern as written; store only token hashes, rotate refresh tokens, support revocation, and handle browser tokens with secure cookies where appropriate.
SKILL.md:107Refresh Tokens Stored in Plaintext
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
const token = authHeader && authHeader.split(' ')[1]; // Bearer TOKEN
if (!token) {
return res.status(401).json({ error: 'Access token required' });
}
jwt.verify(
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
- **Use Parameterized Queries** - Prevent SQL injection
- **Implement Rate Limiting** - Protect against brute force and DDoS
- **Hash Passwords** - Use bcrypt with salt rounds >= 10
- **Use Short-Lived Tokens** - JWT access tokens should expire quickly
- **Implement CORS Properly** - Only allow trusted origins
- **Log Security Events** - Monitor for suspicious activity
- **Use Security Headers** - Implement Helmet.js
No suspicious patterns detected.