xploitscan 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +79 -79
- package/dist/index.js +18 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
#
|
|
1
|
+
# XploitScan
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/xploitscan)
|
|
4
|
+
[](https://opensource.org/licenses/MIT)
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
**Security scanner for AI-generated code.** Find vulnerabilities before attackers do.
|
|
7
|
+
|
|
8
|
+
Built for developers shipping code via Cursor, Lovable, Bolt, Replit, and Claude Code. 131 security rules. Plain-English results. Copy-paste fixes.
|
|
6
9
|
|
|
7
10
|
## Quick Start
|
|
8
11
|
|
|
@@ -10,29 +13,29 @@ Built for solo devs and non-technical founders shipping AI-generated code via Cu
|
|
|
10
13
|
npx xploitscan scan .
|
|
11
14
|
```
|
|
12
15
|
|
|
13
|
-
|
|
16
|
+
No install, no config, no account required. Your code stays 100% local.
|
|
14
17
|
|
|
15
18
|
## What It Catches
|
|
16
19
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
|
20
|
-
|
|
21
|
-
|
|
|
22
|
-
|
|
|
23
|
-
|
|
|
24
|
-
|
|
|
25
|
-
|
|
|
26
|
-
|
|
|
27
|
-
|
|
|
28
|
-
|
|
|
29
|
-
|
|
30
|
-
|
|
20
|
+
131 rules across 15+ categories:
|
|
21
|
+
|
|
22
|
+
| Category | Examples | Rules |
|
|
23
|
+
|----------|---------|-------|
|
|
24
|
+
| **Secrets** | Hardcoded API keys, .env files, OAuth secrets, Terraform state | 15+ |
|
|
25
|
+
| **Injection** | SQL, XSS, SSRF, command injection, path traversal, XXE, SSTI | 20+ |
|
|
26
|
+
| **Authentication** | Missing auth, weak JWT, insecure password reset, OAuth flaws | 15+ |
|
|
27
|
+
| **Cryptography** | Weak RSA, deprecated TLS, ECB mode, hardcoded IVs | 10+ |
|
|
28
|
+
| **Infrastructure** | Dockerfile, Kubernetes, Terraform, AWS IAM misconfigs | 10+ |
|
|
29
|
+
| **Supply Chain** | Unpinned GitHub Actions, vulnerable dependencies | 5+ |
|
|
30
|
+
| **Information Leakage** | PII in logs, unencrypted DB fields, exposed admin routes | 10+ |
|
|
31
|
+
| **Code Quality** | Console.log in production, empty catch blocks, TODO/FIXME | 10+ |
|
|
32
|
+
|
|
33
|
+
Every finding includes OWASP Top 10 and CWE compliance mappings.
|
|
31
34
|
|
|
32
35
|
## Installation
|
|
33
36
|
|
|
34
37
|
```bash
|
|
35
|
-
# Run directly (
|
|
38
|
+
# Run directly (recommended — always latest version)
|
|
36
39
|
npx xploitscan scan .
|
|
37
40
|
|
|
38
41
|
# Or install globally
|
|
@@ -44,105 +47,102 @@ xploitscan scan .
|
|
|
44
47
|
|
|
45
48
|
```bash
|
|
46
49
|
# Scan current directory
|
|
47
|
-
xploitscan scan .
|
|
50
|
+
npx xploitscan scan .
|
|
48
51
|
|
|
49
|
-
# Scan a specific
|
|
50
|
-
xploitscan scan ./
|
|
52
|
+
# Scan a specific folder
|
|
53
|
+
npx xploitscan scan ./src
|
|
51
54
|
|
|
52
|
-
#
|
|
53
|
-
xploitscan scan . --
|
|
55
|
+
# JSON output (for scripting/CI)
|
|
56
|
+
npx xploitscan scan . --format json
|
|
54
57
|
|
|
55
|
-
#
|
|
56
|
-
xploitscan scan . --format
|
|
58
|
+
# SARIF output (for GitHub Security tab)
|
|
59
|
+
npx xploitscan scan . --format sarif
|
|
57
60
|
|
|
58
|
-
#
|
|
59
|
-
xploitscan scan . --
|
|
61
|
+
# Scan only changed files vs main branch
|
|
62
|
+
npx xploitscan scan . --diff
|
|
60
63
|
|
|
61
|
-
#
|
|
62
|
-
xploitscan scan .
|
|
64
|
+
# Watch mode — re-scan on file changes
|
|
65
|
+
npx xploitscan scan . --watch
|
|
63
66
|
```
|
|
64
67
|
|
|
65
|
-
##
|
|
68
|
+
## Output Formats
|
|
66
69
|
|
|
67
|
-
|
|
70
|
+
| Format | Use Case |
|
|
71
|
+
|--------|----------|
|
|
72
|
+
| `text` | Human-readable terminal output (default) |
|
|
73
|
+
| `json` | Machine-readable JSON with all findings |
|
|
74
|
+
| `sarif` | GitHub Security tab integration |
|
|
68
75
|
|
|
69
|
-
|
|
70
|
-
export ANTHROPIC_API_KEY=sk-ant-...
|
|
71
|
-
xploitscan scan .
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
The AI analyzer understands your code in context and explains vulnerabilities in plain English with specific fix instructions.
|
|
76
|
+
## GitHub Action
|
|
75
77
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
### GitHub Actions
|
|
78
|
+
Add automated scanning to every PR:
|
|
79
79
|
|
|
80
80
|
```yaml
|
|
81
81
|
name: Security Scan
|
|
82
82
|
on: [push, pull_request]
|
|
83
83
|
|
|
84
84
|
jobs:
|
|
85
|
-
|
|
85
|
+
security:
|
|
86
86
|
runs-on: ubuntu-latest
|
|
87
87
|
steps:
|
|
88
88
|
- uses: actions/checkout@v4
|
|
89
|
-
- uses: xploitscan/action@v1
|
|
90
|
-
with:
|
|
91
|
-
anthropic-api-key: ${{ secrets.ANTHROPIC_API_KEY }}
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
Results appear in the GitHub Security tab.
|
|
95
89
|
|
|
96
|
-
|
|
90
|
+
- name: Run XploitScan
|
|
91
|
+
uses: bgage72590/xploitscan@main
|
|
92
|
+
with:
|
|
93
|
+
path: '.'
|
|
94
|
+
format: 'sarif'
|
|
95
|
+
fail-on: 'critical'
|
|
97
96
|
|
|
98
|
-
|
|
99
|
-
|
|
97
|
+
- name: Upload SARIF
|
|
98
|
+
if: always()
|
|
99
|
+
uses: github/codeql-action/upload-sarif@v3
|
|
100
|
+
with:
|
|
101
|
+
sarif_file: xploitscan-results.sarif
|
|
100
102
|
```
|
|
101
103
|
|
|
102
|
-
|
|
104
|
+
Findings appear in the GitHub Security tab as code scanning alerts.
|
|
103
105
|
|
|
104
106
|
## Configuration
|
|
105
107
|
|
|
106
|
-
Create a `.xploitscanrc
|
|
108
|
+
Create a `.xploitscanrc` file in your project root:
|
|
107
109
|
|
|
108
110
|
```json
|
|
109
111
|
{
|
|
110
|
-
"
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
112
|
+
"rules": {
|
|
113
|
+
"include": ["VC001-VC131"],
|
|
114
|
+
"exclude": ["VC042"]
|
|
115
|
+
},
|
|
116
|
+
"format": "json",
|
|
117
|
+
"fail-on": "high",
|
|
118
|
+
"ignore": ["node_modules", "dist", ".git"]
|
|
114
119
|
}
|
|
115
120
|
```
|
|
116
121
|
|
|
117
|
-
##
|
|
122
|
+
## Web Dashboard
|
|
118
123
|
|
|
119
|
-
|
|
124
|
+
Scan via the web at [xploitscan.com](https://xploitscan.com):
|
|
120
125
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
126
|
+
- Drag-and-drop file/ZIP upload
|
|
127
|
+
- GitHub URL scanning
|
|
128
|
+
- Scan history and score trends
|
|
129
|
+
- PDF security reports
|
|
130
|
+
- SOC2/ISO27001 compliance mapping
|
|
131
|
+
- Slack and Discord webhook notifications
|
|
124
132
|
|
|
125
|
-
|
|
126
|
-
brew install gitleaks
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
XploitScan automatically uses them if available.
|
|
133
|
+
**Free**: 5 scans/day, 30 core rules. **Pro** ($29/mo): unlimited scans, all 131 rules, and all dashboard features.
|
|
130
134
|
|
|
131
|
-
##
|
|
135
|
+
## Supported Languages
|
|
132
136
|
|
|
133
|
-
|
|
134
|
-
# Log in to sync scan history
|
|
135
|
-
xploitscan auth login
|
|
137
|
+
JavaScript, TypeScript, Python, Ruby, Go, Rust, Java, PHP, Swift, Kotlin, C#, Dart, C/C++, and configuration files (Dockerfile, Terraform, Kubernetes, GitHub Actions, .env).
|
|
136
138
|
|
|
137
|
-
|
|
138
|
-
xploitscan auth whoami
|
|
139
|
-
|
|
140
|
-
# Upgrade to Pro ($29/mo) for unlimited scans
|
|
141
|
-
xploitscan upgrade
|
|
142
|
-
```
|
|
139
|
+
## Links
|
|
143
140
|
|
|
144
|
-
|
|
141
|
+
- **Website**: [xploitscan.com](https://xploitscan.com)
|
|
142
|
+
- **Documentation**: [xploitscan.com/docs](https://xploitscan.com/docs)
|
|
143
|
+
- **Changelog**: [xploitscan.com/changelog](https://xploitscan.com/changelog)
|
|
144
|
+
- **Email**: admin@xploitscan.com
|
|
145
145
|
|
|
146
146
|
## License
|
|
147
147
|
|
|
148
|
-
MIT
|
|
148
|
+
MIT -- [Cipherline LLC](https://xploitscan.com)
|
package/dist/index.js
CHANGED
|
@@ -6011,10 +6011,16 @@ async function scanCommand(directory, options) {
|
|
|
6011
6011
|
const config = await loadConfig(dir);
|
|
6012
6012
|
const useAI = (options.aiAnalysis ?? config.ai ?? true) && !!process.env.ANTHROPIC_API_KEY;
|
|
6013
6013
|
const isSilent = format !== "terminal";
|
|
6014
|
+
let tier = "free";
|
|
6015
|
+
let userPlan = "anonymous";
|
|
6014
6016
|
if (isAuthenticated()) {
|
|
6015
6017
|
const usage = await checkUsage();
|
|
6018
|
+
userPlan = usage.plan;
|
|
6019
|
+
if (usage.plan === "pro") {
|
|
6020
|
+
tier = "pro";
|
|
6021
|
+
}
|
|
6016
6022
|
if (!usage.allowed) {
|
|
6017
|
-
console.log(chalk2.red("\nDaily scan limit reached
|
|
6023
|
+
console.log(chalk2.red("\nDaily scan limit reached."));
|
|
6018
6024
|
console.log(chalk2.yellow("Upgrade to Pro for unlimited scans: ") + chalk2.bold("xploitscan upgrade"));
|
|
6019
6025
|
console.log(chalk2.gray(`Resets tomorrow. Plan: ${usage.plan}
|
|
6020
6026
|
`));
|
|
@@ -6065,7 +6071,7 @@ async function scanCommand(directory, options) {
|
|
|
6065
6071
|
fileContentsForAnalysis.push({ path: filePath, content });
|
|
6066
6072
|
const astCtx = buildASTContext(content, filePath);
|
|
6067
6073
|
if (astCtx.isScannerFile) continue;
|
|
6068
|
-
const findings = runCustomRules(content, filePath, config.disableRules);
|
|
6074
|
+
const findings = runCustomRules(content, filePath, config.disableRules, tier);
|
|
6069
6075
|
for (const f of findings) {
|
|
6070
6076
|
if (astCtx.isTestFile) {
|
|
6071
6077
|
f.confidence = "low";
|
|
@@ -6205,6 +6211,15 @@ async function scanCommand(directory, options) {
|
|
|
6205
6211
|
renderTerminalReport(result, fileContentsForAnalysis);
|
|
6206
6212
|
break;
|
|
6207
6213
|
}
|
|
6214
|
+
if (tier === "free" && !isSilent) {
|
|
6215
|
+
console.log("");
|
|
6216
|
+
if (userPlan === "anonymous") {
|
|
6217
|
+
console.log(chalk2.gray(" Scanned with 30 free rules.") + chalk2.cyan(" Log in to unlock all 131 rules \u2192") + chalk2.bold(" xploitscan auth login"));
|
|
6218
|
+
} else {
|
|
6219
|
+
console.log(chalk2.gray(" Scanned with 30 rules.") + chalk2.cyan(" Upgrade to Pro for all 131 rules \u2192") + chalk2.bold(" xploitscan upgrade"));
|
|
6220
|
+
}
|
|
6221
|
+
console.log("");
|
|
6222
|
+
}
|
|
6208
6223
|
if (isAuthenticated()) {
|
|
6209
6224
|
await Promise.allSettled([
|
|
6210
6225
|
incrementUsage(),
|
|
@@ -6417,7 +6432,7 @@ Open this URL in your browser to log in:`));
|
|
|
6417
6432
|
var program = new Command();
|
|
6418
6433
|
program.name("xploitscan").description(
|
|
6419
6434
|
"AI security scanner for vibe-coded apps. Find vulnerabilities before attackers do."
|
|
6420
|
-
).version("0.
|
|
6435
|
+
).version("0.8.0");
|
|
6421
6436
|
program.command("scan").description("Scan a directory for security vulnerabilities").argument("[directory]", "Directory to scan", ".").option("--no-ai", "Skip AI-powered analysis").option("-f, --format <format>", "Output format: terminal, json, sarif", "terminal").option("-v, --verbose", "Show detailed output", false).option("--diff [base]", "Scan only files changed vs base branch (default: main)").option("-w, --watch", "Watch for file changes and re-scan automatically", false).action(async (directory, opts) => {
|
|
6422
6437
|
await scanCommand(directory, {
|
|
6423
6438
|
directory,
|