nsauditor-ai 0.1.72 โ†’ 0.1.74

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 (3) hide show
  1. package/README.md +6 -5
  2. package/cli.mjs +79 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -17,10 +17,11 @@ NSAuditor AI is the open-source core of a privacy-first security intelligence pl
17
17
 
18
18
  ## What's New
19
19
 
20
- **Latest: CE 0.1.72 + Enterprise 0.11.0** (May 2026)
20
+ **Latest: CE 0.1.74 + Enterprise 0.12.0** (May 2026)
21
21
 
22
- - ๐Ÿ†• **PCI DSS v4.0.1** (PCI SSC, June 2024 errata) is now the fourth supported compliance framework in Enterprise โ€” alongside SOC 2, HIPAA, and NIST CSF 2.0. Sub-requirement-level mapping (auditor-canonical for QSA Report on Compliance workflow): 20 covered + 8 partial + 39 OOS across 67 of ~250 sub-requirements (MVP-67). Generate evidence for any combination from a single scan: `--compliance soc2,hipaa,nist-csf,pci-dss` (Enterprise only).
23
- - ๐Ÿ’ณ **Defined-vs-Customized Approach discipline per PCI DSS v4.0.1 Appendix E** โ€” 15 Defined-only sub-requirements enforced at schema layer. **Cardholder Data Environment (CDE) scope operator-attested** via CDE Data Flow Diagram per Req 1.2.4 + Req 12.5.1. **Card-brand AOC enforcement priority view** (Visa CISP / Mastercard SDP / Amex DSOP / Discover DISC).
22
+ - ๐Ÿ†• **ISO/IEC 27001:2022** (ISO + IEC, October 2022 โ€” 2013 edition retired October 31, 2025) is now the fifth supported compliance framework in Enterprise โ€” alongside SOC 2, HIPAA, NIST CSF 2.0, and PCI DSS v4.0.1. Per-Annex-A-code mapping (auditor-canonical for ISO/IEC 17021-1 certification body assessors walking Stage 1 / Stage 2 / annual surveillance / 3-year recertification): 17 covered + 14 partial + 62 OOS across 93 Annex A controls โ€” the complete Annex A universe across 4 themes (A.5 Organizational 37 + A.6 People 8 + A.7 Physical 14 + A.8 Technological 34). 11 NEW 2022 controls explicitly enumerated (3 covered + 2 partial + 6 OOS). Statement of Applicability per Clause 6.1.3.d discipline + ISMS Clauses 4-10 OOS-by-design framing + 5-attribute taxonomy. Generate evidence for any combination from a single scan: `--compliance soc2,hipaa,nist-csf,pci-dss,iso-27001` (Enterprise only).
23
+ - ๐Ÿ’ณ **PCI DSS v4.0.1** (added in EE 0.11.0) โ€” Defined-vs-Customized Approach discipline per Appendix E. CDE scope operator-attested. Card-brand AOC enforcement priority view (Visa CISP / Mastercard SDP / Amex DSOP / Discover DISC).
24
+ - ๐Ÿ“‹ **Statement of Applicability per Clause 6.1.3.d discipline** for ISO 27001:2022 โ€” engine produces substrate for INCLUDED controls; SoA inclusion/exclusion is operator-side. **ISMS Clauses 4-10 OOS-by-design** with 7 Major Nonconformity classes (absence of internal audit per Clause 9.2 or management review per Clause 9.3 = auto-fail Stage 2). Skill #18 `audit-iso-27001-2022-statement-of-applicability` authored 2026-05-24 via /skill-creator (Per-Framework Adversarial-Audit Skill Pairing institutional pattern).
24
25
  - โšก **NIST Cybersecurity Framework 2.0** (added in EE 0.10.0) โ€” 13 covered + 10 partial + 83 OOS Subcategories across 106 of CSF 2.0's 107 Subcategories.
25
26
  - ๐Ÿฅ **HIPAA Security Rule ยง164.312** (added in EE 0.9.0) โ€” Zero BAA required; your ePHI never leaves your infrastructure.
26
27
  - โ˜๏ธ **24 cloud plugins** across AWS, Azure, GCP โ€” fully integrated SOC 2 / HIPAA / NIST CSF 2.0 / PCI DSS v4.0.1 evidence pipeline (Enterprise).
@@ -66,7 +67,7 @@ If you're heading into a **SOC 2, HIPAA, NIST CSF 2.0, or PCI DSS audit** โ€” or
66
67
  - ๐Ÿ”— **Native GRC platform integration** โ€” push evidence directly to **Vanta** (live; Drata + Secureframe planned). Idempotent retries, per-tenant token rotation, rate-limit handling, signed-envelope round-trip integrity.
67
68
  - ๐Ÿ—„๏ธ **WORM evidence storage** โ€” S3 Object Lock COMPLIANCE-mode for SEC Rule 17a-4(f) / FINRA 4511 retention compliance
68
69
  - ๐Ÿ“Š **SLA / MTTR tracking + recurring-scan attestation** โ€” the **Type II operating-effectiveness evidence** auditors actually demand (not just point-in-time snapshots)
69
- - ๐ŸŽฏ **8 adversarial-audit Claude Code skills** authored per the NEW Per-Framework Adversarial-Audit Skill Pairing institutional pattern โ€” Phase-4 Compliance/GRC chain 5-of-5 COMPLETE for shipped frameworks (SOC 2 + HIPAA + NIST CSF + PCI DSS + GRC connector)
70
+ - ๐ŸŽฏ **9 adversarial-audit Claude Code skills** authored per the Per-Framework Adversarial-Audit Skill Pairing institutional pattern โ€” Phase-4 Compliance/GRC chain 6-of-6 COMPLETE for shipped + in-flight frameworks (SOC 2 + HIPAA + NIST CSF + PCI DSS + ISO 27001 + GRC connector)
70
71
 
71
72
  โ†’ **[See sample EE scan output](https://www.nsauditor.com/ai/docs/sample-scan/)** โ€” full evidence pack against synthetic Acme Corp AWS account (no signup required)
72
73
  โ†’ **[Buy NSAuditor AI Enterprise Edition](https://www.nsauditor.com/ai/pricing/)** โ€” $2k / $5k / $10k+ per year for 5 / 25 / unlimited seats + custom SLA. Onboarding call included.
@@ -572,7 +573,7 @@ nsauditor-ai --version (or -v, or `version`)
572
573
  | `--interval <min>` | Rescan interval in minutes (requires `--watch`) | `60` |
573
574
  | `--webhook-url <url>` | Webhook URL for delta alerts | โ€” |
574
575
  | `--alert-severity <sev>` | Minimum severity for webhook alerts | `high` |
575
- | `--compliance <fw>` | Compliance framework to map findings into. Accepts CSV for multi-framework runs (e.g. `soc2`, `hipaa`, `nist-csf`, `pci-dss`, or any combination like `soc2,hipaa,nist-csf,pci-dss`). **Enterprise license required.** Supported frameworks as of EE 0.11.0: `soc2` (AICPA TSC 2017) + `hipaa` (HIPAA Security Rule ยง164.312 Technical Safeguards) + `nist-csf` (NIST Cybersecurity Framework 2.0 Core, CSWP 29 Feb 2024) + `pci-dss` (PCI DSS v4.0.1, PCI SSC June 2024 errata). See `@nsasoft/nsauditor-ai-ee` README for per-framework coverage details. | โ€” |
576
+ | `--compliance <fw>` | Compliance framework to map findings into. Accepts CSV for multi-framework runs (e.g. `soc2`, `hipaa`, `nist-csf`, `pci-dss`, `iso-27001`, or any combination like `soc2,hipaa,nist-csf,pci-dss,iso-27001`). **Enterprise license required.** Supported frameworks as of EE 0.12.0: `soc2` (AICPA TSC 2017) + `hipaa` (HIPAA Security Rule ยง164.312 Technical Safeguards) + `nist-csf` (NIST Cybersecurity Framework 2.0 Core, CSWP 29 Feb 2024) + `pci-dss` (PCI DSS v4.0.1, PCI SSC June 2024 errata) + `iso-27001` (ISO/IEC 27001:2022, ISO + IEC October 2022). See `@nsasoft/nsauditor-ai-ee` README for per-framework coverage details. | โ€” |
576
577
  | `--compliance-scope <path>` | Optional JSON file describing the assessment scope (passed to the compliance engine for cover-page attestation) | โ€” |
577
578
  | `--help`, `-h` | Print usage block (subcommands, flags, env vars, examples) and exit 0 | โ€” |
578
579
  | `--version`, `-v` | Print `nsauditor-ai <version>` and exit 0 | โ€” |
package/cli.mjs CHANGED
@@ -1038,6 +1038,84 @@ Docs: https://www.nsauditor.com/ai/ | Pricing: https://www.nsauditor.com/ai/
1038
1038
  console.log('โ”€โ”€ Installation provenance โ”€โ”€');
1039
1039
  console.log(` nsauditor-ai (CE): ${ceVersion}`);
1040
1040
  console.log(` @nsasoft/nsauditor-ai-ee (EE): ${eeVersion}`);
1041
+ } else if (rawArgs.includes('--reset')) {
1042
+ // CE-0.1.73 โ€” atomic dual-channel license-state reset for macOS
1043
+ // license-rotation flow. Discovered EE 0.11.0 first-install
1044
+ // rehearsal (2026-05-23): customer rotates EE license, gets
1045
+ // `license_id_mismatch` because the persisted licenseId binding
1046
+ // (from a prior install) doesn't match the new JWT's licenseId.
1047
+ //
1048
+ // Single-surface clearing ("rm ~/.nsauditor/license-state.json")
1049
+ // is a HALF-fix on macOS โ€” _readLicenseState (license.mjs:402-434)
1050
+ // ALSO reads from Keychain NSAUDITOR_LICENSE_ID, and Keychain wins
1051
+ // on read (license.mjs:429: `state.licenseId = kcId; // Keychain
1052
+ // wins`). Customer must additionally run
1053
+ // `security delete-generic-password -s nsauditor-ai -a
1054
+ // NSAUDITOR_LICENSE_ID` for the replay-defense check
1055
+ // (license.mjs:664-670) to pass. This subcommand does both
1056
+ // atomically so customers don't have to run cryptic `security`
1057
+ // commands blind from a support email.
1058
+ //
1059
+ // Default: preserves NSAUDITOR_LICENSE_KEY (the JWT itself) for
1060
+ // immediate re-activation on next license check. --purge also
1061
+ // removes the JWT (forces full re-install with `license install`).
1062
+ const purge = rawArgs.includes('--purge');
1063
+ const { _getLicenseStateFilePath } = await import('./utils/license.mjs');
1064
+ const { keychainDelete } = await import('./utils/keychain.mjs');
1065
+ const fsp = await import('fs/promises');
1066
+
1067
+ const cleared = { stateFile: false, keychainId: false, jwtPurged: false };
1068
+
1069
+ // 1. Delete license-state.json (cross-platform path resolver).
1070
+ const statePath = _getLicenseStateFilePath();
1071
+ try {
1072
+ await fsp.unlink(statePath);
1073
+ cleared.stateFile = true;
1074
+ } catch (e) {
1075
+ if (e && e.code !== 'ENOENT') {
1076
+ console.warn(`โš  Could not delete ${statePath}: ${e.message}`);
1077
+ }
1078
+ }
1079
+
1080
+ // 2. Delete macOS Keychain NSAUDITOR_LICENSE_ID entry. Linux /
1081
+ // Windows have no Keychain side-channel โ€” file delete is
1082
+ // sufficient there.
1083
+ if (process.platform === 'darwin') {
1084
+ try {
1085
+ cleared.keychainId = await keychainDelete('NSAUDITOR_LICENSE_ID');
1086
+ } catch { /* not fatal โ€” file delete is the primary surface */ }
1087
+ }
1088
+
1089
+ // 3. Optionally purge the JWT itself (forces full re-install).
1090
+ // Darwin-only for now; file-based JWT purge on Linux/Windows
1091
+ // requires editing ~/.nsauditor/.env which we leave to the
1092
+ // operator (deleting the file would also remove unrelated env
1093
+ // vars the operator may have placed there).
1094
+ if (purge && process.platform === 'darwin') {
1095
+ try {
1096
+ cleared.jwtPurged = await keychainDelete('NSAUDITOR_LICENSE_KEY');
1097
+ } catch { /* not fatal */ }
1098
+ }
1099
+
1100
+ console.log('โœ“ License state reset');
1101
+ console.log(` License state file: ${cleared.stateFile ? 'deleted (' + statePath + ')' : 'not found (already clean)'}`);
1102
+ if (process.platform === 'darwin') {
1103
+ console.log(` Keychain NSAUDITOR_LICENSE_ID: ${cleared.keychainId ? 'deleted' : 'not found (already clean)'}`);
1104
+ }
1105
+ if (purge) {
1106
+ if (process.platform === 'darwin') {
1107
+ console.log(` Keychain NSAUDITOR_LICENSE_KEY (JWT): ${cleared.jwtPurged ? 'purged' : 'not found (already clean)'}`);
1108
+ } else {
1109
+ console.log(' JWT (NSAUDITOR_LICENSE_KEY): file-based JWT not purged on this platform โ€” remove the NSAUDITOR_LICENSE_KEY line manually from ~/.nsauditor/.env if needed.');
1110
+ }
1111
+ console.log('');
1112
+ console.log(' Re-install with: nsauditor-ai license install <KEY>');
1113
+ } else {
1114
+ console.log(' JWT (NSAUDITOR_LICENSE_KEY): preserved (default) โ€” next license check will re-bind.');
1115
+ console.log('');
1116
+ console.log(' Verify with: nsauditor-ai license --status');
1117
+ console.log(' (Add --purge to additionally clear the JWT for full uninstall.)');
1118
+ }
1041
1119
  } else if (rawArgs.includes('install')) {
1042
1120
  // CE-0.1.30.4 โ€” install command. Verify the JWT FIRST, then persist
1043
1121
  // to a platform-appropriate location (macOS Keychain / file).
@@ -1099,7 +1177,7 @@ Docs: https://www.nsauditor.com/ai/ | Pricing: https://www.nsauditor.com/ai/
1099
1177
  console.log('');
1100
1178
  console.log(' Verify with: nsauditor-ai license --status');
1101
1179
  } else {
1102
- console.log('Usage: nsauditor-ai license --status | --capabilities | --plugins | install <KEY>');
1180
+ console.log('Usage: nsauditor-ai license --status | --capabilities | --plugins | install <KEY> | --reset [--purge]');
1103
1181
  }
1104
1182
  process.exit(0);
1105
1183
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nsauditor-ai",
3
- "version": "0.1.72",
3
+ "version": "0.1.74",
4
4
  "description": "Modular AI-assisted network security audit platform โ€” Community Edition",
5
5
  "type": "module",
6
6
  "private": false,