Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
You run one by typing its /name in Claude Code.
No risk signals detected
Nothing flagged in this plugin's hooks, MCP servers or commands. Other components are not analyzed.
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Validate Cross-Site Request Forgery (CSRF) protection mechanisms in web applications.
/plugin install csrf-protection-validator@claude-code-plugins-plus
/validate-csrf
# Or shortcut
/csrf
// Generate CSRF token
app.use((req, res, next) => {
req.csrfToken = () => generateToken();
res.locals.csrfToken = req.csrfToken();
next();
});
// Validate on state-changing requests
app.post('/transfer', (req, res) => {
if (req.body.csrf !== req.session.csrf) {
return res.status(403).json({error: 'Invalid CSRF token'});
}
// Process request
});
app.post('/api/action', (req, res) => {
const cookieToken = req.cookies.csrfToken;
const headerToken = req.headers['x-csrf-token'];
if (!cookieToken || cookieToken !== headerToken) {
return res.status(403).json({error: 'CSRF validation failed'});
}
// Process request
});
res.cookie('session', token, {
httpOnly: true,
secure: true,
sameSite: 'strict' // or 'lax'
});
app.use((req, res, next) => {
const origin = req.headers.origin || req.headers.referer;
const allowedOrigins = ['https://example.com'];
if (!origin || !allowedOrigins.some(allowed => origin.startsWith(allowed))) {
return res.status(403).json({error: 'Invalid origin'});
}
next();
});
CSRF PROTECTION ANALYSIS
========================
Endpoints Analyzed: 45
Vulnerable: 8
Protected: 37
VULNERABLE ENDPOINTS
--------------------
1. POST /api/transfer
Protection: NONE
Risk: CRITICAL
Impact: Unauthorized fund transfers
Attack Scenario:
<form action="https://example.com/api/transfer" method="POST">
<input name="to" value="attacker">
<input name="amount" value="10000">
</form>
<script>document.forms[0].submit();</script>
Fix:
- Add CSRF token validation
- Use SameSite=strict cookies
- Validate Origin header
2. POST /api/profile/update
Protection: NONE
Risk: HIGH
Impact: Account takeover
Recommended Fix:
const csrf = require('csurf');
app.use(csrf({ cookie: true }));
3. DELETE /api/account
Protection: NONE
Risk: CRITICAL
Impact: Account deletion
RECOMMENDATIONS
---------------
1. Implement CSRF protection library (csurf)
2. Set SameSite=strict on all cookies
3. Validate Origin/Referer headers
4. Use double-submit cookie pattern for APIs
Protect All State-Changing Operations
Use Multiple Layers
Token Requirements
Safe Methods Don't Need Protection
MIT License - See LICENSE file for details
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
Plugins from other owners that cover similar ground
npx claudepluginhub flight505/skill-forge --plugin csrf-protection-validator