Loading...
Loading...
Run ESLint with security plugins on JavaScript/TypeScript code. Detects eval usage, non-literal RegExp, prototype pollution, and other JS/TS security anti-patterns.
npx skill4agent add vchirrav/owasp-secure-coding-md sast-eslint-securitynpm install --save-dev eslint eslint-plugin-security
# For TypeScript: also install @typescript-eslint/parsernpx eslint --versionnpx eslint --plugin security --rule 'security/detect-unsafe-regex: error' \
--rule 'security/detect-non-literal-regexp: warn' \
--rule 'security/detect-eval-with-expression: error' \
--rule 'security/detect-no-csrf-before-method-override: error' \
--rule 'security/detect-possible-timing-attacks: warn' \
--rule 'security/detect-object-injection: warn' \
--format json --output-file eslint-security-results.json \
<target-path>.eslintrcnpx eslint --format json --output-file eslint-security-results.json <target-path>| # | Severity | Rule | File:Line | Finding | Remediation |
|---|----------|------|-----------|---------|-------------|| Rule | Risk |
|---|---|
| Remote code execution via eval() |
| ReDoS (Regular Expression DoS) |
| ReDoS via exponential backtracking |
| CSRF bypass |
| Timing side-channel leaks |
| Prototype pollution / injection |
| Command injection via child_process |
| Path traversal |