xss-csrf — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited xss-csrf (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Never render unsanitized user content. Always include anti-forgery tokens on state-changing requests.
Related: input-validation, security-headers, security-context
Use your framework's auto-escaping. If you bypass it, sanitize first.
// WRONG — innerHTML with user content
element.innerHTML = userComment;
// RIGHT — use textContent (auto-escapes)
element.textContent = userComment;
// If you MUST render HTML, sanitize first
import DOMPurify from 'dompurify';
element.innerHTML = DOMPurify.sanitize(userComment);# WRONG — marking user input as safe in Jinja2
{{ user_comment | safe }}
# RIGHT — auto-escaped by default
{{ user_comment }}HTML context, attribute context, JavaScript context, and URL context all need different escaping.
// WRONG — user input in an attribute without escaping
`<img src="${userUrl}" alt="${userName}">`
// RIGHT — encode for HTML attributes
`<img src="${encodeURI(userUrl)}" alt="${escapeHtml(userName)}">`Every POST, PUT, DELETE request must include a CSRF token.
<!-- WRONG — form without CSRF token -->
<form method="POST" action="/delete">
<button type="submit">Delete</button>
</form>
<!-- RIGHT — CSRF token included -->
<form method="POST" action="/delete">
<input type="hidden" name="_csrf" value="{{csrfToken}}">
<button type="submit">Delete</button>
</form>Prevent CSRF by restricting cookie behavior.
// WRONG — no SameSite attribute
res.cookie('session', token);
// RIGHT — SameSite restricts cross-origin requests
res.cookie('session', token, {
sameSite: 'strict',
httpOnly: true,
secure: true
});CSP is your last line of defense against XSS. It blocks inline scripts and unauthorized sources.
// WRONG — no CSP header (any script can run)
// RIGHT — restrictive CSP
Content-Security-Policy: default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:;| Do | Don't |
|---|---|
| Use framework auto-escaping | Insert raw user content with innerHTML |
| Sanitize with DOMPurify if rendering HTML | Mark user input as "safe" in templates |
| Include CSRF tokens on all forms | Submit state-changing requests without tokens |
Set SameSite: strict on cookies | Leave cookies without SameSite attribute |
| Set Content Security Policy header | Allow inline scripts from any source |
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.