detecting-security-vulnerabilities — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited detecting-security-vulnerabilities (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.
For changed files:
git diff --cached --name-only --diff-filter=ACMR | grep -E '\.(js|jsx|ts|tsx|py|rb|php|java|go)$'For full codebase:
find src -type f \( -name "*.ts" -o -name "*.tsx" -o -name "*.js" -o -name "*.jsx" \)JavaScript/TypeScript — npm audit:
npm audit --jsonJavaScript/TypeScript — Snyk (if available):
npx snyk test --jsonESLint security plugin:
npx eslint --plugin security --rule 'security/*: error' <files>Semgrep (multi-language):
npx @semgrep/semgrep --config=auto --json .Gitleaks (secrets detection):
gitleaks detect --source . --report-format jsonScan for these high-risk patterns:
#### Credential Leakage
| Pattern | Risk | Regex | |||
|---|---|---|---|---|---|
| API keys | Critical | `['"]?(api[_-]?key\ | apikey)['"]?\s[:=]\s['"][a-zA-Z0-9]{16,}['"]` | ||
| AWS keys | Critical | AKIA[0-9A-Z]{16} | |||
| Private keys | Critical | `-----BEGIN (RSA\ | DSA\ | EC\ | OPENSSH) PRIVATE KEY-----` |
| Passwords | High | `['"]?(password\ | passwd\ | pwd)['"]?\s[:=]\s['"][^'"]{4,}['"]` | |
| Tokens | High | `['"]?(token\ | secret\ | auth)['"]?\s[:=]\s['"][a-zA-Z0-9_-]{20,}['"]` | |
| Connection strings | High | `(mongodb\ | postgres\ | mysql):\/\/[^:]+:[^@]+@` |
grep -rn --include="*.{ts,js,tsx,jsx,json,env}" -E "AKIA[0-9A-Z]{16}" .
grep -rn --include="*.{ts,js,tsx,jsx}" -E "(api[_-]?key|apikey)\s*[:=]\s*['\"][^'\"]{16,}['\"]" .#### Unsafe Code Patterns
| Pattern | Risk | Detection |
|---|---|---|
eval() | Critical | Direct code execution |
dangerouslySetInnerHTML | High | XSS vulnerability in React |
v-html | High | XSS vulnerability in Vue |
innerHTML assignment | High | DOM-based XSS |
document.write | High | DOM manipulation risk |
new Function() | High | Dynamic code execution |
child_process.exec | High | Command injection risk |
sql + string concat | Critical | SQL injection |
http:// URLs | Medium | Insecure transport |
grep -rn --include="*.{ts,js,tsx,jsx}" -E "\beval\s*\(" .
grep -rn --include="*.tsx" "dangerouslySetInnerHTML" .
grep -rn --include="*.vue" "v-html" .
grep -rn --include="*.{ts,js}" -E "\.exec\s*\(.*\$\{" .#### OWASP Top 10 Checks
| OWASP | Vulnerability | What to look for |
|---|---|---|
| A01 | Broken Access Control | Missing auth checks, direct object refs |
| A02 | Cryptographic Failures | Weak algorithms (MD5, SHA1), hardcoded keys |
| A03 | Injection | SQL/NoSQL/Command injection patterns |
| A04 | Insecure Design | Missing rate limiting, no input validation |
| A05 | Security Misconfiguration | CORS \*, debug modes, default creds |
| A06 | Vulnerable Components | Outdated dependencies |
| A07 | Auth Failures | Weak password rules, session issues |
| A08 | Data Integrity | Unsafe deserialization, unverified updates |
| A09 | Logging Failures | Sensitive data in logs, missing audit |
| A10 | SSRF | Unvalidated URL fetches |
Severity levels:
| Level | Examples | Action |
|---|---|---|
| Critical | Exposed secrets, RCE, SQL injection | Block deployment |
| High | XSS, CSRF, auth bypass | Fix before merge |
| Medium | Insecure cookies, weak crypto | Fix in sprint |
| Low | Info disclosure, best practices | Track for later |
Format findings clearly:
## Security Scan Report
### Critical (2)
#### 1. Hardcoded API Key
- **File**: src/api/client.ts:42
- **Pattern**: `apiKey = "sk_live_..."`
- **Risk**: Credential exposure in source control
- **Fix**: Move to environment variable
// Before const apiKey = "sk_live_abc123...";
// After const apiKey = process.env.API_KEY;
#### 2. SQL Injection Risk
// Before
db.query(`SELECT * FROM users WHERE id = ${userId}`);
// After
db.query("SELECT * FROM users WHERE id = $1", [userId]);#### 1. XSS via dangerouslySetInnerHTML
import DOMPurify from "dompurify";
<div dangerouslySetInnerHTML={{ __html: DOMPurify.sanitize(content) }} />;| Severity | Count |
|---|---|
| Critical | 2 |
| High | 1 |
| Medium | 3 |
| Low | 5 |
## Common Remediation Patterns
**Environment variables for secrets:**// Use dotenv or platform env const secret = process.env.SECRET_KEY; if (!secret) throw new Error('SECRET_KEY required');
**Parameterized queries:**
// Prisma (safe by default) await prisma.user.findUnique({ where: { id: userId } });
// Raw SQL with parameters await db.query("SELECT * FROM users WHERE id = $1", [userId]);
**XSS prevention:**
// React - avoid dangerouslySetInnerHTML // If needed, sanitize first import DOMPurify from "dompurify"; const clean = DOMPurify.sanitize(userContent);
**CSRF protection:**
// Use CSRF tokens in forms <input type="hidden" name="_csrf" value={csrfToken} />
// Validate on server if (req.body._csrf !== req.session.csrfToken) { throw new Error('CSRF validation failed'); }
**Secure headers:**
// Next.js next.config.js const securityHeaders = [ { key: "X-Content-Type-Options", value: "nosniff" }, { key: "X-Frame-Options", value: "DENY" }, { key: "X-XSS-Protection", value: "1; mode=block" }, { key: "Strict-Transport-Security", value: "max-age=31536000; includeSubDomains", }, ];
## Validation
Before completing:
- [ ] All critical issues addressed
- [ ] High severity issues have remediation plan
- [ ] No secrets in committed code
- [ ] Dependencies updated for known CVEs
- [ ] Security headers configured
## Error Handling
- **Scanner not installed**: Run `npm install -g <tool>` or use npx.
- **Too many results**: Filter by severity or scope to changed files.
- **False positives**: Review context before reporting; exclude test fixtures.
- **Unsure about severity**: Default to higher severity; security errs on caution.
## Resources
- [OWASP Top 10](https://owasp.org/Top10/)
- [OWASP Cheat Sheet Series](https://cheatsheetseries.owasp.org/)
- [Semgrep Rules](https://semgrep.dev/explore)
- [Snyk Vulnerability DB](https://snyk.io/vuln/)~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.