nsauditor-ai 0.1.40 → 0.1.41

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nsauditor-ai",
3
- "version": "0.1.40",
3
+ "version": "0.1.41",
4
4
  "description": "Modular AI-assisted network security audit platform — Community Edition",
5
5
  "type": "module",
6
6
  "private": false,
@@ -548,11 +548,12 @@ export default {
548
548
  tier: "community",
549
549
  protocols: ["tcp"],
550
550
  ports: [443, 465, 587, 636, 853, 993, 995, 8443, 8883, 9443],
551
+ // single invocation: run() iterates this.ports internally so failed ports
552
+ // can be rolled up into one INFO instead of N per-port empty placeholders.
553
+ runStrategy: "single",
551
554
 
552
555
  requirements: {
553
556
  host: "up",
554
- // Note: requirements are OR-logic for ports — any open TLS port triggers the plugin.
555
- // The plugin itself will skip ports that don't respond to TLS handshake.
556
557
  },
557
558
 
558
559
  // ── Pre-flight ──────────────────────────────────────────────────────────
@@ -620,7 +621,10 @@ export default {
620
621
 
621
622
  // ── Conclude ────────────────────────────────────────────────────────────
622
623
  conclude({ result, host }) {
623
- if (!result.portResults || result.portResults.length === 0) {
624
+ const portResults = Array.isArray(result?.portResults) ? result.portResults : [];
625
+ const failedPorts = Array.isArray(result?.failedPorts) ? result.failedPorts : [];
626
+
627
+ if (portResults.length === 0 && failedPorts.length === 0) {
624
628
  return [{
625
629
  protocol: "tcp",
626
630
  service: "tls",
@@ -633,7 +637,7 @@ export default {
633
637
 
634
638
  const items = [];
635
639
 
636
- for (const pr of result.portResults) {
640
+ for (const pr of portResults) {
637
641
  // Compute status label
638
642
  let status;
639
643
  if (pr.certificate.expired) {
@@ -687,6 +691,25 @@ export default {
687
691
  });
688
692
  }
689
693
 
694
+ if (failedPorts.length > 0) {
695
+ const probedTotal = portResults.length + failedPorts.length;
696
+ items.push({
697
+ port: 0,
698
+ protocol: "tcp",
699
+ service: "tls",
700
+ status: "tls-not-responding",
701
+ severity: SEVERITY.INFO,
702
+ info: `${failedPorts.length}/${probedTotal} TLS ports did not respond (${failedPorts.map((f) => `${f.port}: ${f.error}`).join(", ")})`,
703
+ issues: [],
704
+ details: {
705
+ failedPorts,
706
+ activePorts: portResults.map((pr) => pr.port),
707
+ },
708
+ source: "tls-cert-auditor",
709
+ authoritative: false,
710
+ });
711
+ }
712
+
690
713
  return items;
691
714
  },
692
715