omen-sec-cli 1.0.14 → 1.0.15

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/bin/index.js CHANGED
@@ -15,7 +15,7 @@ async function main() {
15
15
  }
16
16
 
17
17
  if (args.flags.version) {
18
- console.log('1.0.6');
18
+ console.log('1.0.14');
19
19
  return;
20
20
  }
21
21
 
@@ -1,5 +1,26 @@
1
1
  export function getMassiveAIProtocol(scanData) {
2
- return `
2
+ const summary = `
3
+ ================================================================================
4
+ OMEN SEC-CLI: TARGET INTELLIGENCE SUMMARY
5
+ ================================================================================
6
+ Target: ${scanData.target}
7
+ Scan Date: ${new Date().toISOString()}
8
+ Risk Level: ${scanData.riskLevel} (${scanData.score}/100)
9
+
10
+ --- DETECTED SURFACE ---
11
+ Endpoints Discovered: ${scanData.attack_surface.endpoints.length}
12
+ Forms Found: ${scanData.attack_surface.forms.length}
13
+ Tech Stack: ${(scanData.attack_surface.tech_stack || []).join(', ')}
14
+
15
+ --- TOP VULNERABILITIES ---
16
+ ${scanData.vulnerabilities.slice(0, 5).map(v => `[${v.severity}] ${v.description} (Category: ${v.category})`).join('\n')}
17
+
18
+ ================================================================================
19
+ FULL SCAN DATA ATTACHED BELOW
20
+ ================================================================================
21
+ `;
22
+
23
+ return summary + `
3
24
  ================================================================================
4
25
  [OMEN_AI_PROTOCOL_V2_MAXIMUM_OVERRIDE]
5
26
  ================================================================================
@@ -188,6 +188,7 @@ export async function scanLocalProject() {
188
188
 
189
189
  return {
190
190
  localFilesScanned: filesScanned.length,
191
+ filesScanned,
191
192
  vulnerabilities
192
193
  };
193
194
  }
@@ -41,7 +41,11 @@ export async function scanRemoteTarget(targetUrl) {
41
41
  severity: 'Medium',
42
42
  description: `HSTS Header is missing. This lacks forced HTTPS enforcement for browsers that have already visited the site.`,
43
43
  cwe: 'CWE-319',
44
- evidence: { request: { headers: { ...response.request.headers } }, response: { headers: response.headers } }
44
+ evidence: {
45
+ request: { headers: { ...response.request.headers } },
46
+ response: { status: response.status, headers: response.headers },
47
+ reason: 'Security header "Strict-Transport-Security" not found in server response.'
48
+ }
45
49
  });
46
50
  } else {
47
51
  headers_analysis["Strict-Transport-Security"] = headers['strict-transport-security'];
@@ -56,7 +60,11 @@ export async function scanRemoteTarget(targetUrl) {
56
60
  severity: 'High',
57
61
  description: `CSP header is missing. Without a strict Content-Security-Policy, the application is highly vulnerable to Cross-Site Scripting (XSS) and data injection attacks.`,
58
62
  cwe: 'CWE-1022',
59
- evidence: { request: { headers: { ...response.request.headers } }, response: { headers: response.headers } }
63
+ evidence: {
64
+ request: { headers: { ...response.request.headers } },
65
+ response: { status: response.status, headers: response.headers },
66
+ reason: 'Security header "Content-Security-Policy" not found in server response.'
67
+ }
60
68
  });
61
69
  } else {
62
70
  headers_analysis["Content-Security-Policy"] = headers['content-security-policy'];
@@ -83,7 +91,11 @@ export async function scanRemoteTarget(targetUrl) {
83
91
  severity: 'Low',
84
92
  description: `Missing X-Frame-Options. Increases risk of Clickjacking.`,
85
93
  cwe: 'CWE-1021',
86
- evidence: { request: { headers: { ...response.request.headers } }, response: { headers: response.headers } }
94
+ evidence: {
95
+ request: { headers: { ...response.request.headers } },
96
+ response: { status: response.status, headers: response.headers },
97
+ reason: 'Security header "X-Frame-Options" not found. This allows the site to be embedded in iframes on third-party domains.'
98
+ }
87
99
  });
88
100
  } else {
89
101
  headers_analysis["X-Frame-Options"] = headers['x-frame-options'];
@@ -326,9 +338,19 @@ async function validateFuzzerFinding(path, response, url) {
326
338
  category: 'Confirmed',
327
339
  confidence: 'High',
328
340
  severity: 'Critical',
329
- description: `CRITICAL: Sensitive file exposed at ${url}. Contents may contain credentials, private keys, or configuration secrets.`,
330
- cwe: 'CWE-538', // File and Directory Information Exposure
331
- evidence
341
+ description: `CRITICAL: Sensitive file exposed at ${url}. Contents contain raw configuration data.`,
342
+ cwe: 'CWE-538',
343
+ evidence: { ...evidence, reason: 'Raw sensitive file content detected (Non-HTML response on sensitive path)' }
344
+ };
345
+ } else {
346
+ return {
347
+ id: `REM-POTENTIAL-FILE-${Date.now()}`,
348
+ category: 'Informational',
349
+ confidence: 'Low',
350
+ severity: 'Info',
351
+ description: `Potential sensitive path found at ${url}, but returned HTML content. Likely a redirect or custom error page.`,
352
+ cwe: 'CWE-200',
353
+ evidence: { ...evidence, reason: 'HTML response on sensitive file path' }
332
354
  };
333
355
  }
334
356
  }
@@ -366,8 +388,8 @@ async function validateFuzzerFinding(path, response, url) {
366
388
  category: 'Informational',
367
389
  confidence: 'Low',
368
390
  severity: 'Info',
369
- description: `Path exists but is protected (403 Forbidden): ${url}. This confirms the path's existence.`,
370
- cwe: 'CWE-406', // Insufficient Guarantees of Data Integrity
391
+ description: `Path exists but access is restricted (403 Forbidden): ${url}. This confirms the path's existence but does not prove exposure.`,
392
+ cwe: 'CWE-204', // Response Discrepancy (Path Enumeration)
371
393
  evidence
372
394
  };
373
395
  }
package/core/scanner.js CHANGED
@@ -17,10 +17,10 @@ export async function runScannerSteps(target, flags) {
17
17
  let allVulnerabilities = [];
18
18
  let headers_analysis = {};
19
19
  let attack_surface = {
20
- endpoints_discovered: 0,
21
- parameters_extracted: 0,
22
- forms_detected: 0,
23
- api_routes: 0
20
+ endpoints: [],
21
+ parameters: [],
22
+ forms: [],
23
+ tech_stack: []
24
24
  };
25
25
 
26
26
  for (let i = 0; i < steps.length; i++) {
@@ -32,16 +32,16 @@ export async function runScannerSteps(target, flags) {
32
32
  const remoteData = await scanRemoteTarget(target);
33
33
  headers_analysis = remoteData.headers_analysis;
34
34
  allVulnerabilities.push(...remoteData.vulnerabilities);
35
- attack_surface.endpoints_discovered = remoteData.discoveredLinks.length;
36
- attack_surface.parameters_extracted = remoteData.discoveredParams.length;
37
- attack_surface.forms_detected = remoteData.discoveredForms.length;
35
+ attack_surface.endpoints = remoteData.discoveredLinks;
36
+ attack_surface.parameters = remoteData.discoveredParams;
37
+ attack_surface.forms = remoteData.discoveredForms;
38
38
  attack_surface.tech_stack = remoteData.techStack;
39
39
  }
40
40
 
41
41
  if (step.text === 'Scanning endpoints...' && flags.local) {
42
42
  const localData = await scanLocalProject();
43
43
  allVulnerabilities.push(...localData.vulnerabilities);
44
- attack_surface.endpoints_discovered += localData.localFilesScanned;
44
+ attack_surface.endpoints.push(...(localData.filesScanned || []));
45
45
  }
46
46
 
47
47
  await sleep(step.delay);
package/core/ui-server.js CHANGED
@@ -97,9 +97,9 @@ export async function startUIServer() {
97
97
  <!-- Attack Surface Tab -->
98
98
  <div id="surface" class="tab-content hidden">
99
99
  <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
100
- <div class="card p-4 rounded-lg"> <h3 class="font-bold mb-2">Tech Stack</h3> <pre>${(report.attack_surface.tech_stack || []).join('\n')}</pre> </div>
101
- <div class="card p-4 rounded-lg"> <h3 class="font-bold mb-2">Forms</h3> <pre>${JSON.stringify(report.attack_surface.forms_detected, null, 2)}</pre> </div>
102
- <div class="card p-4 rounded-lg col-span-1 md:col-span-2"> <h3 class="font-bold mb-2">Discovered Links</h3> <pre class="max-h-96">${(report.attack_surface.endpoints_discovered || []).join('\n')}</pre> </div>
100
+ <div class="card p-4 rounded-lg"> <h3 class="font-bold mb-2">Tech Stack</h3> <pre>${Array.isArray(report.attack_surface.tech_stack) ? report.attack_surface.tech_stack.join('\n') : (report.attack_surface.tech_stack || '')}</pre> </div>
101
+ <div class="card p-4 rounded-lg"> <h3 class="font-bold mb-2">Forms</h3> <pre>${JSON.stringify(report.attack_surface.forms || report.attack_surface.forms_detected || [], null, 2)}</pre> </div>
102
+ <div class="card p-4 rounded-lg col-span-1 md:col-span-2"> <h3 class="font-bold mb-2">Discovered Links</h3> <pre class="max-h-96">${Array.isArray(report.attack_surface.endpoints) ? report.attack_surface.endpoints.join('\n') : (report.attack_surface.endpoints || report.attack_surface.endpoints_discovered || '')}</pre> </div>
103
103
  </div>
104
104
  </div>
105
105
 
@@ -111,6 +111,9 @@ export async function startUIServer() {
111
111
  </div>
112
112
  </div>
113
113
 
114
+ <footer class="text-center text-gray-600 mt-12 border-t border-gray-800 pt-4">
115
+ <p>OMEN Security Framework - v1.0.14</p>
116
+ </footer>
114
117
  </div>
115
118
  <script>
116
119
  function showTab(tabName) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omen-sec-cli",
3
- "version": "1.0.14",
3
+ "version": "1.0.15",
4
4
  "description": "OMEN — AI Security Engine",
5
5
  "main": "bin/index.js",
6
6
  "type": "module",
package/ui/banner.js CHANGED
@@ -9,7 +9,7 @@ export function showBanner() {
9
9
  ╚██████╔╝██║ ╚═╝ ██║███████╗██║ ╚████║
10
10
  `));
11
11
  console.log(chalk.cyan.bold(' OMEN — AI Security Engine '));
12
- console.log(chalk.gray(' Version: 1.0.6 \n'));
12
+ console.log(chalk.gray(' Version: 1.0.14 \n'));
13
13
  }
14
14
 
15
15
  export function showHelp() {