SecureLint
Real-time security vulnerability detection for VS Code and Cursor. Catch hardcoded secrets, injection risks, insecure crypto, and unsafe patterns as you code.
Features
- Real-time scanning — Automatically analyzes files on save and open
- 10 built-in rules — Covers OWASP Top 10 and common vulnerability patterns
- CWE references — Each finding links to its CWE entry for full context
- Workspace scan — Scan your entire project in one command
- Configurable — Enable/disable individual rules, set severity, exclude paths
- Offline by design: Runs in VS Code without sending your code to external services
Scope and limitations
SecureLint is a lightweight, regex-based warning tool, not a complete security audit or proof that code is safe. Findings require review and may include false positives or miss vulnerabilities. Workspace scans use VS Code file exclusions plus your SecureLint globs, and can be cancelled. securelint.maxFileSize is measured in UTF-8 bytes. Exclusion entries are glob patterns, not ordered negation rules.
Getting Started
- Install the extension
- Open any code file — SecureLint scans automatically
- Press
⌘⇧L (Mac) or Ctrl+Shift+L (Windows/Linux) to manually scan
Security Rules
| Rule |
Detects |
Severity |
CWE |
hardcoded-secret |
API keys, passwords, tokens in source code |
Error |
CWE-798 |
sql-injection |
String concatenation in SQL queries |
Error |
CWE-89 |
xss-risk |
innerHTML, eval(), document.write() |
Error |
CWE-79 |
insecure-http |
Non-HTTPS URLs (excluding localhost) |
Warning |
CWE-319 |
weak-crypto |
MD5, SHA1, DES, RC4 usage |
Warning |
CWE-327 |
path-traversal |
File ops with unsanitized user input |
Warning |
CWE-22 |
command-injection |
Shell commands with user input |
Error |
CWE-78 |
insecure-random |
Math.random() for security purposes |
Warning |
CWE-338 |
debug-leak |
Logging sensitive variables |
Info |
CWE-532 |
cors-wildcard |
Permissive CORS (origin: *) |
Warning |
CWE-942 |
Commands
| Command |
Shortcut |
Description |
SecureLint: Scan Current File |
⌘⇧L / Ctrl+Shift+L |
Scan the active file |
SecureLint: Scan Workspace |
— |
Scan all workspace files |
SecureLint: Toggle Auto-Scan |
— |
Enable/disable automatic scanning (saved in workspace settings) |
SecureLint: Show Security Rules |
— |
Browse all security rules |
Configuration
| Setting |
Default |
Description |
securelint.autoScan |
true |
Auto-scan on save/open |
securelint.severity |
"warning" |
Default severity level |
securelint.enabledRules |
All rules |
Which rules to apply |
securelint.excludePatterns |
node_modules, .git, dist, build |
Glob patterns to skip |
securelint.maxFileSize |
500000 |
Max file size to scan (bytes) |
Status Bar
The SecureLint ✓ / SecureLint ⚠ N status bar item shows the current file's security status. Click it to toggle auto-scan.
Release 0.1.3
This patch fixes CORS false positives, checks parsed HTTP hosts instead of hostname prefixes, supports IPv6 loopback exceptions, and detects Python random.randint calls with arguments. It remains a regex-based review aid, not a full security audit.
Release 0.1.2
This patch honors auto-scan settings, applies exclusions to individual scans, clears stale diagnostics for skipped files, removes the old 500-file workspace limit, and packages only release files.
Supported Languages
Works with all text files. Language-specific rules (SQL injection, XSS, command injection) target:
JavaScript, TypeScript, Python, Java, PHP, Ruby, React (JSX/TSX)
Contributing
Issues and PRs welcome at github.com/abhaysudhir/securelint.
License
MIT