@voidagency/web-scanner 0.0.1

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.
Files changed (59) hide show
  1. package/README.md +198 -0
  2. package/dist/aggregator.d.ts +65 -0
  3. package/dist/aggregator.d.ts.map +1 -0
  4. package/dist/aggregator.js +546 -0
  5. package/dist/aggregator.js.map +1 -0
  6. package/dist/categories.d.ts +59 -0
  7. package/dist/categories.d.ts.map +1 -0
  8. package/dist/categories.js +278 -0
  9. package/dist/categories.js.map +1 -0
  10. package/dist/cli.d.ts +12 -0
  11. package/dist/cli.d.ts.map +1 -0
  12. package/dist/cli.js +457 -0
  13. package/dist/cli.js.map +1 -0
  14. package/dist/config.d.ts +19 -0
  15. package/dist/config.d.ts.map +1 -0
  16. package/dist/config.js +121 -0
  17. package/dist/config.js.map +1 -0
  18. package/dist/coverage.d.ts +49 -0
  19. package/dist/coverage.d.ts.map +1 -0
  20. package/dist/coverage.js +165 -0
  21. package/dist/coverage.js.map +1 -0
  22. package/dist/enrichers/nvd.d.ts +55 -0
  23. package/dist/enrichers/nvd.d.ts.map +1 -0
  24. package/dist/enrichers/nvd.js +326 -0
  25. package/dist/enrichers/nvd.js.map +1 -0
  26. package/dist/report.d.ts +12 -0
  27. package/dist/report.d.ts.map +1 -0
  28. package/dist/report.js +460 -0
  29. package/dist/report.js.map +1 -0
  30. package/dist/runners/nuclei.d.ts +59 -0
  31. package/dist/runners/nuclei.d.ts.map +1 -0
  32. package/dist/runners/nuclei.js +531 -0
  33. package/dist/runners/nuclei.js.map +1 -0
  34. package/dist/runners/testssl.d.ts +16 -0
  35. package/dist/runners/testssl.d.ts.map +1 -0
  36. package/dist/runners/testssl.js +179 -0
  37. package/dist/runners/testssl.js.map +1 -0
  38. package/dist/runners/zap.d.ts +30 -0
  39. package/dist/runners/zap.d.ts.map +1 -0
  40. package/dist/runners/zap.js +389 -0
  41. package/dist/runners/zap.js.map +1 -0
  42. package/dist/types.d.ts +172 -0
  43. package/dist/types.d.ts.map +1 -0
  44. package/dist/types.js +6 -0
  45. package/dist/types.js.map +1 -0
  46. package/package.json +54 -0
  47. package/templates/drupal-api-index-exposed.yaml +81 -0
  48. package/templates/drupal-api-user-detail.yaml +76 -0
  49. package/templates/drupal-api-user-listing.yaml +59 -0
  50. package/templates/drupal-dev-files-exposed.yaml +73 -0
  51. package/templates/drupal-file-path-disclosure.yaml +59 -0
  52. package/templates/drupal-files-listing.yaml +63 -0
  53. package/templates/drupal-install-error-disclosure.yaml +62 -0
  54. package/templates/drupal-theme-lockfiles.yaml +79 -0
  55. package/templates/drupal-version-detect.yaml +89 -0
  56. package/templates/http-options-enabled.yaml +56 -0
  57. package/templates/nextjs-version-detect.yaml +35 -0
  58. package/templates/php-version-detect.yaml +37 -0
  59. package/zap.yaml +33 -0
package/README.md ADDED
@@ -0,0 +1,198 @@
1
+ # VoidSec Scanner
2
+
3
+ CLI orchestrator that runs 3 mature security tools and generates unified reports.
4
+
5
+ ```
6
+ voidsec scan https://target.com --profile quick
7
+ ```
8
+
9
+ ## Architecture
10
+
11
+ ```
12
+ voidsec scan https://target.com
13
+
14
+ ┌─────────┬─────────┬───────────┐
15
+ │ ZAP │ Nuclei │ testssl │
16
+ └────┬────┴────┬────┴─────┬─────┘
17
+ └─────────┼──────────┘
18
+
19
+ Aggregator (dedupe, consolidate)
20
+
21
+ HTML Report
22
+ ```
23
+
24
+ ## What It Does
25
+
26
+ - Single command runs 3 tools
27
+ - Unified HTML report
28
+ - Noise reduction (filters informational clutter)
29
+ - Consolidates same vuln across multiple URLs
30
+ - Tech detection (Drupal, PHP, nginx versions)
31
+ - Zero CVE maintenance (Nuclei community handles it)
32
+
33
+ ## What It Doesn't Do
34
+
35
+ - Authenticated scanning
36
+ - Business logic flaw detection
37
+ - Zero-day detection
38
+ - API fuzzing
39
+ - Replace manual pentesting
40
+
41
+ ## Scanners
42
+
43
+ ### ZAP (Primary)
44
+
45
+ Docker-based OWASP ZAP baseline scan.
46
+
47
+ ```bash
48
+ docker run zaproxy/zap-stable zap-baseline.py
49
+ ```
50
+
51
+ **Skipped plugins (noise):**
52
+
53
+ | ID | Name | Why Skip |
54
+ |----|------|----------|
55
+ | 10109 | Modern Web Application | Just says "this is SPA" |
56
+ | 10015 | Re-examine Cache-control | Informational |
57
+ | 10049 | Non-Storable Content | Informational |
58
+ | 10050 | Retrieved from Cache | Informational |
59
+ | 10044 | Big Redirect Detected | 99% false positives |
60
+ | 10027 | Suspicious Comments | Triggers on TODO/FIXME |
61
+ | 10112 | Session Management Response | Just says "session exists" |
62
+ | 10017 | Cross-Domain JS | Merged into SRI finding |
63
+
64
+ ### Nuclei (Supplementary)
65
+
66
+ Template-based scanner with 5000+ community templates.
67
+
68
+ ```bash
69
+ nuclei -u https://target.com -t templates/
70
+ ```
71
+
72
+ **Updates:**
73
+ ```bash
74
+ nuclei -update-templates # auto-updates community templates
75
+ ```
76
+
77
+ **Custom templates** (`/templates/`):
78
+
79
+ | Template | What It Does |
80
+ |----------|--------------|
81
+ | drupal-theme-lockfiles.yaml | Exposed package.json/yarn.lock in themes |
82
+ | drupal-api-user-detail.yaml | JSON:API user detail exposure |
83
+ | drupal-file-path-disclosure.yaml | Filename leak in 403 errors |
84
+ | drupal-dev-files-exposed.yaml | Composer.json/lock exposed |
85
+ | http-options-enabled.yaml | HTTP OPTIONS method enabled |
86
+ | nextjs-version-detect.yaml | Next.js version via headless browser |
87
+
88
+ ### testssl.sh
89
+
90
+ SSL/TLS vulnerability scanner.
91
+
92
+ ```bash
93
+ testssl.sh --jsonfile output.json https://target.com
94
+ ```
95
+
96
+ **Skipped:** Scanner errors (engine_problem, scanProblem) - our machine issues, not target.
97
+
98
+ ## Profiles
99
+
100
+ | Profile | What It Runs |
101
+ |---------|--------------|
102
+ | quick | ZAP baseline + Nuclei (misconfig, exposure) |
103
+ | standard | + more Nuclei templates |
104
+ | deep | + fuzzing templates |
105
+
106
+ **Note:** SSL/TLS analysis (testssl.sh) is opt-in with `--ssl` flag.
107
+
108
+ ## Output
109
+
110
+ ```bash
111
+ voidsec scan https://target.com --output report.html
112
+ ```
113
+
114
+ Report includes:
115
+ - Severity summary (Critical/High/Medium/Low/Info)
116
+ - Technology detection
117
+ - Test coverage
118
+ - Findings with reproduce commands
119
+ - Passed security checks
120
+
121
+ ## Maintenance
122
+
123
+ | Component | Maintenance | How |
124
+ |-----------|-------------|-----|
125
+ | Nuclei templates | Zero | `nuclei -update-templates` |
126
+ | ZAP | Zero | Docker pulls latest |
127
+ | testssl | Zero | System updates |
128
+ | Custom templates | Low | Update when Drupal changes |
129
+ | Filters | Minimal | Quarterly review |
130
+
131
+ ## Install
132
+
133
+ ### Via npm (recommended)
134
+
135
+ ```bash
136
+ # Install globally
137
+ npm install -g @voidagency/web-scanner
138
+
139
+ # Or use with npx (no installation)
140
+ npx @voidagency/web-scanner scan https://target.com --profile quick
141
+
142
+ # Setup dependencies (checks brew, installs nuclei, pulls ZAP image)
143
+ voidsec setup
144
+ ```
145
+
146
+ ### From source
147
+
148
+ ```bash
149
+ # Clone and install
150
+ git clone <repo-url>
151
+ cd voidsec
152
+ npm install
153
+ npm run build
154
+
155
+ # Setup dependencies (checks brew, installs nuclei, pulls ZAP image)
156
+ npm run dev -- setup
157
+ ```
158
+
159
+ **Requirements:**
160
+ - Node.js 18+
161
+ - OrbStack or Docker (for ZAP) - [Get OrbStack](https://orbstack.dev/) (recommended, faster & lighter)
162
+ - Homebrew (for installing nuclei)
163
+ - nuclei (auto-installed via `setup` command)
164
+ - testssl.sh (optional, for SSL/TLS analysis)
165
+
166
+ **Setup Command:**
167
+ The `setup` command automatically:
168
+ - Checks if Homebrew is installed
169
+ - Checks if Docker/OrbStack is running
170
+ - Installs Nuclei via Homebrew if missing
171
+ - Pulls ZAP Docker image if Docker is available
172
+
173
+ **macOS Note:**
174
+ First run will prompt "Chromium wants to use your keychain" - click **Always Allow**. This is for Nuclei headless templates (Next.js detection). Only asked once.
175
+
176
+ ## Usage
177
+
178
+ ```bash
179
+ # Quick scan
180
+ voidsec scan https://target.com --profile quick
181
+
182
+ # Nuclei only (fast, no Docker)
183
+ voidsec scan https://target.com --profile quick --no-zap
184
+
185
+ # With SSL/TLS analysis
186
+ voidsec scan https://target.com --ssl
187
+
188
+ # With output
189
+ voidsec scan https://target.com --output report.html
190
+
191
+ # Disable CVE lookup
192
+ voidsec scan https://target.com --no-cve
193
+
194
+ # Test Drupal checks only
195
+ voidsec test-drupal https://target.com
196
+ ```
197
+
198
+ **Note:** If installed from source, use `npm run dev --` prefix (e.g., `npm run dev -- scan ...`)
@@ -0,0 +1,65 @@
1
+ /**
2
+ * Finding Aggregator
3
+ * Combine and normalize findings from all scanning tools
4
+ */
5
+ import { Finding, Report, ScanProfile, SeverityCounts, TechDetection } from './types.js';
6
+ /**
7
+ * Count findings by severity
8
+ */
9
+ export declare function countSeverities(findings: Finding[]): SeverityCounts;
10
+ /**
11
+ * Sort findings by severity (critical first)
12
+ */
13
+ export declare function sortBySeverity(findings: Finding[]): Finding[];
14
+ /**
15
+ * Re-number findings sequentially
16
+ */
17
+ export declare function renumberFindings(findings: Finding[]): Finding[];
18
+ /**
19
+ * Deduplicate findings by title and target
20
+ */
21
+ export declare function deduplicateFindings(findings: Finding[]): Finding[];
22
+ /**
23
+ * Consolidate findings - group same vulnerability type across multiple URLs
24
+ * Results in one finding with list of affected URLs
25
+ */
26
+ export declare function consolidateFindings(findings: Finding[]): Finding[];
27
+ /**
28
+ * Merge technology detections from multiple sources
29
+ */
30
+ export declare function mergeTechnologies(techLists: TechDetection[][]): TechDetection[];
31
+ /**
32
+ * Format duration in human-readable format
33
+ */
34
+ export declare function formatDuration(ms: number): string;
35
+ /**
36
+ * Lookup CVEs for detected technologies (default behavior)
37
+ * Only checks nginx, drupal, php, nextjs etc.
38
+ */
39
+ export declare function lookupDefaultCves(findings: Finding[], target: string, onProgress?: (msg: string) => void): Promise<Finding[]>;
40
+ /**
41
+ * Full NVD enrichment (--enrich flag)
42
+ * - Enriches existing CVE findings with full descriptions
43
+ * - Looks up CVEs for ALL detected technology versions
44
+ */
45
+ export declare function enrichFindings(findings: Finding[], target: string, options?: {
46
+ enableNvd?: boolean;
47
+ manualTech?: Array<{
48
+ tech: string;
49
+ version: string;
50
+ }>;
51
+ onProgress?: (msg: string) => void;
52
+ }): Promise<Finding[]>;
53
+ /**
54
+ * Aggregate all findings into a report
55
+ */
56
+ export declare function aggregateFindings(target: string, profile: ScanProfile, startTime: Date, endTime: Date, allFindings: Finding[], technologies: TechDetection[], options?: {
57
+ enableNvd?: boolean;
58
+ disableCve?: boolean;
59
+ manualTech?: Array<{
60
+ tech: string;
61
+ version: string;
62
+ }>;
63
+ onProgress?: (msg: string) => void;
64
+ }): Promise<Report>;
65
+ //# sourceMappingURL=aggregator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aggregator.d.ts","sourceRoot":"","sources":["../src/aggregator.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,aAAa,EAA2B,MAAM,YAAY,CAAC;AAIlH;;GAEG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,cAAc,CAcnE;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,OAAO,EAAE,CAG7D;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,OAAO,EAAE,CAK/D;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,OAAO,EAAE,CAalE;AA0GD;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,OAAO,EAAE,CAmDlE;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,aAAa,EAAE,EAAE,GAAG,aAAa,EAAE,CAkB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