nsauditor-ai-agent-skill 0.1.10
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/LICENSE +21 -0
- package/README.md +123 -0
- package/SKILL.md +401 -0
- package/examples/agent-interactions.md +248 -0
- package/package.json +57 -0
- package/references/plugins.md +205 -0
- package/references/schemas.md +366 -0
- package/references/workflows.md +301 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024-present Nsasoft US LLC
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
# NSAuditor AI Agent Skill
|
|
2
|
+
|
|
3
|
+
**Give any AI coding agent instant fluency with NSAuditor AI.**
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/nsauditor-ai-agent-skill)
|
|
6
|
+
[](LICENSE)
|
|
7
|
+
|
|
8
|
+
An installable knowledge package that teaches AI coding agents how to use NSAuditor AI's MCP tools, understand its data schemas, and orchestrate multi-step security audit workflows — without requiring manual context every conversation.
|
|
9
|
+
|
|
10
|
+
Works with **Claude Code**, **Claude Desktop**, **Cursor**, **Windsurf**, **VS Code Copilot**, and any MCP-aware agent.
|
|
11
|
+
|
|
12
|
+
## What's Inside
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
nsauditor-ai-agent-skill/
|
|
16
|
+
├── SKILL.md # Main entrypoint — triggers, tools, schemas, constraints
|
|
17
|
+
├── references/
|
|
18
|
+
│ ├── workflows.md # Multi-step workflow recipes (full audit, CI/CD, CTEM)
|
|
19
|
+
│ ├── schemas.md # Complete data structures (scan results, CVEs, findings)
|
|
20
|
+
│ └── plugins.md # Full plugin catalog (30+ scanners with ports & protocols)
|
|
21
|
+
├── examples/
|
|
22
|
+
│ └── agent-interactions.md # Example agent reasoning chains (9 scenarios)
|
|
23
|
+
├── package.json
|
|
24
|
+
├── README.md
|
|
25
|
+
└── LICENSE
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Quick Start
|
|
29
|
+
|
|
30
|
+
### Claude Code
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
# Option 1: Install globally and copy
|
|
34
|
+
npm install -g nsauditor-ai-agent-skill
|
|
35
|
+
cp -r $(npm root -g)/nsauditor-ai-agent-skill ~/.claude/skills/nsauditor-ai
|
|
36
|
+
|
|
37
|
+
# Option 2: Copy into your project
|
|
38
|
+
cp -r nsauditor-ai-agent-skill .claude/skills/nsauditor-ai
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Claude Code auto-discovers skills in `.claude/skills/`.
|
|
42
|
+
|
|
43
|
+
### Claude Desktop
|
|
44
|
+
|
|
45
|
+
Upload `SKILL.md` as project knowledge in your Claude Desktop project settings.
|
|
46
|
+
|
|
47
|
+
### Cursor
|
|
48
|
+
|
|
49
|
+
Copy the skill directory into `.cursor/skills/` or add `SKILL.md` content to your project rules.
|
|
50
|
+
|
|
51
|
+
### Windsurf
|
|
52
|
+
|
|
53
|
+
Copy to your project's context directory, or paste `SKILL.md` into project rules.
|
|
54
|
+
|
|
55
|
+
### VS Code Copilot
|
|
56
|
+
|
|
57
|
+
Add `SKILL.md` to `.github/copilot-instructions.md` or your workspace's Copilot context.
|
|
58
|
+
|
|
59
|
+
### Generic / Custom Agents
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
npm install nsauditor-ai-agent-skill
|
|
63
|
+
# Copy into wherever your agent loads skills/context from
|
|
64
|
+
cp -r node_modules/nsauditor-ai-agent-skill /path/to/agent/skills/nsauditor-ai
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## What the Agent Learns
|
|
68
|
+
|
|
69
|
+
When an AI agent loads this skill, it gains:
|
|
70
|
+
|
|
71
|
+
| Capability | Description |
|
|
72
|
+
|------------|-------------|
|
|
73
|
+
| **Tool signatures** | Exact MCP tool names, parameters, return types, and usage guidance |
|
|
74
|
+
| **Workflow patterns** | Multi-step chains: scan → CVE lookup → remediation report |
|
|
75
|
+
| **Schema knowledge** | Complete data structures for parsing and presenting results |
|
|
76
|
+
| **CPE construction** | How to map detected services to NVD vulnerability lookups |
|
|
77
|
+
| **Plugin awareness** | 30+ scanner plugins with protocols, ports, and capabilities |
|
|
78
|
+
| **Security rules** | ZDE, SSRF protection, redaction, scan authorization requirements |
|
|
79
|
+
| **Error handling** | License gates, SSRF blocks, timeout resolution, CPE format errors |
|
|
80
|
+
| **Decision routing** | When to use scan_host vs probe_service vs CLI vs get_vulnerabilities |
|
|
81
|
+
|
|
82
|
+
## Prerequisites
|
|
83
|
+
|
|
84
|
+
This package provides **knowledge about** NSAuditor AI. To actually **run** scans:
|
|
85
|
+
|
|
86
|
+
1. **Install NSAuditor AI:** `npm install -g nsauditor-ai`
|
|
87
|
+
2. **Start MCP server:** `nsauditor-ai-mcp` (or configure in your agent's MCP settings)
|
|
88
|
+
3. **Add MCP to your agent:**
|
|
89
|
+
```bash
|
|
90
|
+
# Claude Code
|
|
91
|
+
claude mcp add nsauditor-ai -- npx nsauditor-ai-mcp
|
|
92
|
+
|
|
93
|
+
# Claude Desktop (claude_desktop_config.json)
|
|
94
|
+
{
|
|
95
|
+
"mcpServers": {
|
|
96
|
+
"nsauditor-ai": {
|
|
97
|
+
"command": "npx",
|
|
98
|
+
"args": ["-y", "nsauditor-ai-mcp"],
|
|
99
|
+
"env": { "NSA_ALLOW_ALL_HOSTS": "1" }
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Editions
|
|
106
|
+
|
|
107
|
+
| Edition | Price | Highlights |
|
|
108
|
+
|---------|-------|-----------|
|
|
109
|
+
| **Community** | Free / MIT | 27 plugins, basic AI, SARIF, CTEM, scan history |
|
|
110
|
+
| **Pro** | $49/mo | + CVE matching, verification probes, risk scoring, Pro plugins |
|
|
111
|
+
| **Enterprise** | $2k+/yr | + Cloud scanners, Zero Trust, compliance, air-gapped |
|
|
112
|
+
|
|
113
|
+
→ [Pricing](https://www.nsauditor.com/ai/pricing) · [Free trial](https://www.nsauditor.com/ai/trial)
|
|
114
|
+
|
|
115
|
+
## Related
|
|
116
|
+
|
|
117
|
+
- **[nsauditor-ai](https://github.com/nsasoft/nsauditor-ai)** — The scanner (Community Edition, MIT)
|
|
118
|
+
- **[@nsasoft/nsauditor-ai-ee](https://www.nsauditor.com/ai/pricing)** — Pro/Enterprise features
|
|
119
|
+
- **[NSAuditor AI Docs](https://www.nsauditor.com/ai/)** — Full documentation
|
|
120
|
+
|
|
121
|
+
## License
|
|
122
|
+
|
|
123
|
+
MIT — © 2024-present Nsasoft US LLC
|
package/SKILL.md
ADDED
|
@@ -0,0 +1,401 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: nsauditor-ai
|
|
3
|
+
description: >
|
|
4
|
+
Use this skill whenever the user wants to perform network security scanning, auditing,
|
|
5
|
+
vulnerability assessment, or host reconnaissance using NSAuditor AI. Triggers include:
|
|
6
|
+
any mention of 'scan', 'audit', 'vulnerability', 'CVE', 'network security', 'port scan',
|
|
7
|
+
'service detection', 'OS fingerprinting', 'security assessment', 'penetration test',
|
|
8
|
+
'probe', 'MITRE ATT&CK', 'CPE', 'NVD', 'TLS audit', 'cipher check', 'banner grab',
|
|
9
|
+
'SNMP', 'NetBIOS', 'SMB', 'DNS security', 'DKIM', 'SPF', 'DMARC', 'DNSSEC',
|
|
10
|
+
'certificate audit', 'SARIF', 'CTEM', 'continuous monitoring', 'host discovery',
|
|
11
|
+
'mDNS', 'UPnP', 'SSDP', 'ARP scan', 'subnet scan', or references to NSAuditor,
|
|
12
|
+
nsauditor-ai, or the nsauditor MCP server. Also triggers when the user asks to check
|
|
13
|
+
if a host is up, enumerate services, detect TLS versions, find open ports, look up
|
|
14
|
+
CVEs for a software version, audit DNS records, check certificate expiry, or perform
|
|
15
|
+
continuous security monitoring. Use this skill even if the user doesn't explicitly say
|
|
16
|
+
"NSAuditor" — if they want network security scanning and the nsauditor-ai MCP tools
|
|
17
|
+
are available, this is the skill to use. Do NOT use for general coding tasks, web
|
|
18
|
+
development, or non-security topics.
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
# NSAuditor AI — Agent Skill
|
|
22
|
+
|
|
23
|
+
> **Version:** 0.1.10 · **Source:** [github.com/nsasoft/nsauditor-ai](https://github.com/nsasoft/nsauditor-ai) · **npm:** `nsauditor-ai` · **License:** MIT (CE)
|
|
24
|
+
|
|
25
|
+
NSAuditor AI is a modular, AI-assisted network security audit platform with 27+ scanner
|
|
26
|
+
plugins, CVE matching, MITRE ATT&CK mapping, and Zero Data Exfiltration by design. This
|
|
27
|
+
skill teaches you how to operate it via MCP tools and CLI.
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## MCP Tools Reference
|
|
32
|
+
|
|
33
|
+
NSAuditor AI exposes tools via Model Context Protocol (stdio transport). Available tools
|
|
34
|
+
depend on the license tier (Community / Pro / Enterprise).
|
|
35
|
+
|
|
36
|
+
### Community Edition Tools (always available)
|
|
37
|
+
|
|
38
|
+
#### `scan_host`
|
|
39
|
+
Run a full plugin scan against a target host. Executes ALL enabled plugins in priority
|
|
40
|
+
order (discovery → service probes → OS detection → result fusion).
|
|
41
|
+
|
|
42
|
+
| Parameter | Type | Required | Default | Description |
|
|
43
|
+
|-----------|------|----------|---------|-------------|
|
|
44
|
+
| `host` | string | ✅ | — | Target hostname or IP address |
|
|
45
|
+
| `timeout` | number | ❌ | 30000 | Per-plugin timeout in ms |
|
|
46
|
+
|
|
47
|
+
**Returns:** `{ summary, host, services[], findings[] }` — see `references/schemas.md`
|
|
48
|
+
|
|
49
|
+
**Example:**
|
|
50
|
+
```json
|
|
51
|
+
{ "host": "192.168.1.1", "timeout": 10000 }
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
**Important:**
|
|
55
|
+
- For RFC 1918 / private IPs, the MCP server must have `NSA_ALLOW_ALL_HOSTS=1` set.
|
|
56
|
+
- The server blocks loopback (127.x, ::1), link-local (169.254.x, fe80:), and cloud
|
|
57
|
+
metadata endpoints (169.254.169.254) — this is SSRF protection, not a bug.
|
|
58
|
+
- Plugins with unmet requirements auto-skip (e.g., SSH scanner skips if port 22 is closed).
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
#### `list_plugins`
|
|
63
|
+
List all available scanner plugins with metadata.
|
|
64
|
+
|
|
65
|
+
| Parameter | Type | Required | Description |
|
|
66
|
+
|-----------|------|----------|-------------|
|
|
67
|
+
| *(none)* | — | — | — |
|
|
68
|
+
|
|
69
|
+
**Returns:** Array of `{ id, name, description, priority, protocols[], ports[], requirements }`
|
|
70
|
+
|
|
71
|
+
**When to use:** Before a scan to understand available plugins, or to help the user select
|
|
72
|
+
specific plugins for a targeted probe.
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
#### `probe_service` *(Pro license required)*
|
|
77
|
+
Run a single plugin against a specific host:port for deep-dive investigation.
|
|
78
|
+
|
|
79
|
+
| Parameter | Type | Required | Description |
|
|
80
|
+
|-----------|------|----------|-------------|
|
|
81
|
+
| `host` | string | ✅ | Target hostname or IP |
|
|
82
|
+
| `pluginName` | string | ✅ | Plugin name or numeric ID (e.g. `"ssh_scanner"` or `"002"`) |
|
|
83
|
+
| `port` | number | ✅ | Target port number |
|
|
84
|
+
|
|
85
|
+
**Returns:** Raw plugin output with full evidence for that specific service.
|
|
86
|
+
|
|
87
|
+
**Common plugin IDs:**
|
|
88
|
+
| ID | Name | Best For |
|
|
89
|
+
|----|------|----------|
|
|
90
|
+
| 002 | SSH Scanner | Banner, version, weak algorithms/ciphers |
|
|
91
|
+
| 004 | FTP Banner | FTP daemon identification, anonymous login |
|
|
92
|
+
| 006 | HTTP Probe | Server headers, tokens, vendor hints |
|
|
93
|
+
| 007 | SNMP Scanner | Device info via sysDescr, hardware/firmware |
|
|
94
|
+
| 009 | DNS Scanner | DNS server version (CHAOS query) |
|
|
95
|
+
| 010 | Webapp Detector | Technology stack fingerprinting (Wappalyzer) |
|
|
96
|
+
| 011 | TLS Scanner | TLS versions, cipher suites, deprecation |
|
|
97
|
+
| 014 | NetBIOS Scanner | SMB/NetBIOS enumeration, null sessions |
|
|
98
|
+
| 040 | TLS Cert & Cipher Auditor | Certificate chain, expiry, weak ciphers *(Pro)* |
|
|
99
|
+
| 050 | TRIBE v2 Probe | Debug leaks, stack traces, CORS misconfig *(Pro)* |
|
|
100
|
+
| 060 | DNS Security Auditor | SPF/DKIM/DMARC, DNSSEC, zone transfer *(Pro)* |
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
#### `get_vulnerabilities` *(Pro license required)*
|
|
105
|
+
Look up known CVEs for a CPE string via the NVD 2.0 API.
|
|
106
|
+
|
|
107
|
+
| Parameter | Type | Required | Description |
|
|
108
|
+
|-----------|------|----------|-------------|
|
|
109
|
+
| `cpe` | string | ✅ | CPE 2.3 format (see CPE guide below) |
|
|
110
|
+
| `maxResults` | number | ❌ | Max CVE results to return |
|
|
111
|
+
|
|
112
|
+
**Returns:** `{ cpe, totalResults, vulnerabilities[] }` — each CVE includes ID, description,
|
|
113
|
+
CVSS v3.1 score, severity, vector string, publication date.
|
|
114
|
+
|
|
115
|
+
**CPE Construction Guide:**
|
|
116
|
+
|
|
117
|
+
Format: `cpe:2.3:a:<vendor>:<product>:<version>:*:*:*:*:*:*:*`
|
|
118
|
+
|
|
119
|
+
| Detected Program | Detected Version | CPE String |
|
|
120
|
+
|------------------|------------------|------------|
|
|
121
|
+
| OpenSSH | 8.9p1 | `cpe:2.3:a:openbsd:openssh:8.9p1:*:*:*:*:*:*:*` |
|
|
122
|
+
| Apache httpd | 2.4.54 | `cpe:2.3:a:apache:http_server:2.4.54:*:*:*:*:*:*:*` |
|
|
123
|
+
| nginx | 1.24.0 | `cpe:2.3:a:f5:nginx:1.24.0:*:*:*:*:*:*:*` |
|
|
124
|
+
| OpenSSL | 3.0.8 | `cpe:2.3:a:openssl:openssl:3.0.8:*:*:*:*:*:*:*` |
|
|
125
|
+
| ISC BIND | 9.18.12 | `cpe:2.3:a:isc:bind:9.18.12:*:*:*:*:*:*:*` |
|
|
126
|
+
| vsftpd | 3.0.5 | `cpe:2.3:a:beasts:vsftpd:3.0.5:*:*:*:*:*:*:*` |
|
|
127
|
+
| Samba | 4.17.5 | `cpe:2.3:a:samba:samba:4.17.5:*:*:*:*:*:*:*` |
|
|
128
|
+
| Log4j | 2.14.1 | `cpe:2.3:a:apache:log4j:2.14.1:*:*:*:*:*:*:*` |
|
|
129
|
+
| MySQL | 8.0.32 | `cpe:2.3:a:oracle:mysql:8.0.32:*:*:*:*:*:*:*` |
|
|
130
|
+
| PostgreSQL | 15.2 | `cpe:2.3:a:postgresql:postgresql:15.2:*:*:*:*:*:*:*` |
|
|
131
|
+
|
|
132
|
+
**Tip:** If vendor is ambiguous, search NVD with just the product name first.
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
### Pro/Enterprise Tools (license gated)
|
|
137
|
+
|
|
138
|
+
These tools return a license upgrade prompt on CE installations:
|
|
139
|
+
|
|
140
|
+
| Tool | Tier | Purpose |
|
|
141
|
+
|------|------|---------|
|
|
142
|
+
| `risk_summary` | Pro | Prioritized risk overview with severity breakdown |
|
|
143
|
+
| `scan_compare` | Pro | Diff two scan results with risk-weighted delta analysis |
|
|
144
|
+
| `save_finding` | Pro | Persist a validated finding to the finding queue |
|
|
145
|
+
| `start_assessment` | Enterprise | Multi-host orchestrated security assessment |
|
|
146
|
+
| `prioritize_risks` | Enterprise | Cross-host risk prioritization and ranking |
|
|
147
|
+
| `compliance_check` | Enterprise | NIST/HIPAA/GDPR/PCI-DSS gap analysis |
|
|
148
|
+
| `export_report` | Enterprise | Formatted compliance/risk report (PDF, HTML) |
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
## Five-Phase Pipeline Architecture
|
|
153
|
+
|
|
154
|
+
NSAuditor AI follows an institutional five-phase pipeline:
|
|
155
|
+
|
|
156
|
+
```
|
|
157
|
+
Phase 1: DISCOVERY (CE) License → Plugin loading → PluginManager.run() → Concluder
|
|
158
|
+
Output: Fused scan with summary, OS, services[], evidence[]
|
|
159
|
+
↓
|
|
160
|
+
Phase 2: BASIC ANALYSIS (CE) Redaction → MITRE mapping → AI analysis (any provider)
|
|
161
|
+
Output: Admin raw JSON/HTML + AI reports + scan history
|
|
162
|
+
↓
|
|
163
|
+
[ License Gate: Pro required ]
|
|
164
|
+
↓
|
|
165
|
+
Phase 3: INTELLIGENCE (Pro) CPE generation → NVD CVE lookup → Parallel verification agents:
|
|
166
|
+
• Auth Agent (weak auth, default credentials)
|
|
167
|
+
• Crypto Agent (TLS, ciphers, certificates)
|
|
168
|
+
• Config Agent (misconfigs, debug exposure, CORS)
|
|
169
|
+
• Service Agent (CVE-specific targeted probes)
|
|
170
|
+
Output: Structured finding queue
|
|
171
|
+
↓
|
|
172
|
+
Phase 4: VERIFICATION (Pro) For each finding: run SAFE non-destructive verification probe
|
|
173
|
+
Classify: VERIFIED | POTENTIAL | FALSE_POSITIVE
|
|
174
|
+
Output: Verified finding queue with evidence
|
|
175
|
+
↓
|
|
176
|
+
Phase 5: SCORING (Pro/Ent) Risk scoring → Pro AI prompts → Compliance mapping
|
|
177
|
+
Output: Risk report + compliance report + PDF
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
## Plugin Reference (27+ Scanners)
|
|
183
|
+
|
|
184
|
+
See `references/plugins.md` for the complete catalog. Summary:
|
|
185
|
+
|
|
186
|
+
**Core (17):** Ping, SSH, Port Scanner, FTP, Host Up, HTTP Probe, SNMP, Result Concluder,
|
|
187
|
+
DNS, Webapp Detector, TLS, OpenSearch, OS Detector, NetBIOS/SMB, SUN RPC, WS-Discovery,
|
|
188
|
+
TCP SYN (Nmap wrapper)
|
|
189
|
+
|
|
190
|
+
**Discovery (6):** ARP, mDNS/Bonjour, UPnP/SSDP, DNS-SD, LLMNR, DB Scanner
|
|
191
|
+
|
|
192
|
+
**Pro (3):** TLS Certificate & Cipher Auditor, TRIBE v2 Probe, DNS Security Auditor
|
|
193
|
+
|
|
194
|
+
**Enterprise (4):** AWS Cloud, GCP Cloud, Azure Cloud, Zero Trust Checker
|
|
195
|
+
|
|
196
|
+
Execution order: Discovery (100–150) → Service probes (200–400) → OS Detector (99000) →
|
|
197
|
+
Result Concluder (100000). Plugins with unmet requirements auto-skip.
|
|
198
|
+
|
|
199
|
+
---
|
|
200
|
+
|
|
201
|
+
## Workflow Recipes
|
|
202
|
+
|
|
203
|
+
See `references/workflows.md` for detailed multi-step patterns:
|
|
204
|
+
|
|
205
|
+
1. **Full Security Audit** — list_plugins → scan_host → get_vulnerabilities per service
|
|
206
|
+
2. **Targeted Service Investigation** — probe_service(pluginId) → get_vulnerabilities
|
|
207
|
+
3. **Subnet Discovery** — CLI: `nsauditor-ai scan --host <CIDR> --parallel 10`
|
|
208
|
+
4. **CI/CD Pipeline** — SARIF output with `--fail-on` severity gating
|
|
209
|
+
5. **Continuous Monitoring (CTEM)** — `--watch --interval <min> --webhook-url <url>`
|
|
210
|
+
6. **AI-Powered Report** — Scan with AI provider (OpenAI/Claude/Ollama) + redaction
|
|
211
|
+
|
|
212
|
+
### Decision Tree: Which Tool to Use
|
|
213
|
+
|
|
214
|
+
```
|
|
215
|
+
User wants to...
|
|
216
|
+
├── Scan a host comprehensively → scan_host
|
|
217
|
+
├── Check a specific service/port → probe_service (Pro)
|
|
218
|
+
├── Look up CVEs for software version → get_vulnerabilities (Pro)
|
|
219
|
+
├── See available plugins → list_plugins
|
|
220
|
+
├── Audit TLS certificates → probe_service with plugin 040 (Pro)
|
|
221
|
+
├── Check DNS security (SPF/DKIM/DMARC) → probe_service with plugin 060 (Pro)
|
|
222
|
+
├── Detect debug leaks / CORS issues → probe_service with plugin 050 (Pro)
|
|
223
|
+
├── Scan a subnet → CLI with --parallel (not MCP)
|
|
224
|
+
├── Set up continuous monitoring → CLI with --watch (not MCP)
|
|
225
|
+
├── Compare two scans → scan_compare (Pro)
|
|
226
|
+
└── Generate compliance report → compliance_check + export_report (Enterprise)
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
---
|
|
230
|
+
|
|
231
|
+
## Data Schemas
|
|
232
|
+
|
|
233
|
+
See `references/schemas.md` for complete structures:
|
|
234
|
+
|
|
235
|
+
- **Scan Result** — `{ summary, host{os,mac,vendor,names}, services[], findings[] }`
|
|
236
|
+
- **ServiceRecord** — `{ port, protocol, service, program, version, status, banner, evidence[] }`
|
|
237
|
+
- **Finding** — `{ id, category, severity, title, evidence, remediation, cwe, mitre_attack[] }`
|
|
238
|
+
- **CVE Response** — `{ cpe, totalResults, vulnerabilities[]{cve_id, cvss, severity} }`
|
|
239
|
+
- **Plugin Interface** — `{ id, name, priority, run(), conclude(), requirements }`
|
|
240
|
+
- **SARIF Output** — 2.1.0 format for CI/CD consumers
|
|
241
|
+
|
|
242
|
+
---
|
|
243
|
+
|
|
244
|
+
## Security Constraints
|
|
245
|
+
|
|
246
|
+
**CRITICAL — Always observe these constraints:**
|
|
247
|
+
|
|
248
|
+
1. **Zero Data Exfiltration (ZDE):** NSAuditor AI NEVER sends scan data externally unless
|
|
249
|
+
the user explicitly opts in to AI analysis with their own API keys. Nsasoft infrastructure
|
|
250
|
+
never sees scan data. Never suggest workflows that violate this boundary.
|
|
251
|
+
|
|
252
|
+
2. **SSRF Protection:** The MCP server blocks loopback (127.x, ::1), link-local (169.254.x,
|
|
253
|
+
fe80:), and cloud metadata endpoints. Set `NSA_ALLOW_ALL_HOSTS=1` **only** for legitimate
|
|
254
|
+
local network auditing. DNS rebinding is also blocked via pre-resolution.
|
|
255
|
+
|
|
256
|
+
3. **AI Redaction:** When AI analysis is enabled, the redaction pipeline scrubs:
|
|
257
|
+
- Private IPv4 addresses → `[REDACTED]`
|
|
258
|
+
- MAC addresses → `[MAC]`
|
|
259
|
+
- Serial numbers → `[REDACTED_HIDDEN]`
|
|
260
|
+
- Email addresses → `[REDACTED_EMAIL]`
|
|
261
|
+
- Bearer tokens → `[REDACTED_BEARER]`
|
|
262
|
+
- AWS keys → `[REDACTED_AWS_KEY]`
|
|
263
|
+
- Configurable via `CONFIDENTIAL_KEYWORDS` env var
|
|
264
|
+
|
|
265
|
+
4. **Scan Authorization:** ALWAYS confirm the user has authorization to scan the target.
|
|
266
|
+
Never scan hosts without explicit user instruction. Unauthorized scanning is illegal.
|
|
267
|
+
|
|
268
|
+
5. **Non-Destructive:** All verification probes are safe read-only queries. NSAuditor AI
|
|
269
|
+
never exploits vulnerabilities or modifies target systems.
|
|
270
|
+
|
|
271
|
+
---
|
|
272
|
+
|
|
273
|
+
## Configuration
|
|
274
|
+
|
|
275
|
+
### Environment Variables
|
|
276
|
+
|
|
277
|
+
| Variable | Default | Purpose |
|
|
278
|
+
|----------|---------|---------|
|
|
279
|
+
| `NSA_ALLOW_ALL_HOSTS` | unset | Set to `1` to scan RFC 1918 private ranges |
|
|
280
|
+
| `PLUGIN_TIMEOUT_MS` | 30000 | Global per-plugin timeout |
|
|
281
|
+
| `AI_ENABLED` | false | Enable AI analysis |
|
|
282
|
+
| `AI_PROVIDER` | openai | `openai` · `claude` · `ollama` |
|
|
283
|
+
| `OPENAI_API_KEY` | — | OpenAI API key (or `keychain:OPENAI_API_KEY`) |
|
|
284
|
+
| `ANTHROPIC_API_KEY` | — | Claude/Anthropic API key |
|
|
285
|
+
| `OPENAI_MODEL` | gpt-4o-mini | OpenAI model name |
|
|
286
|
+
| `ANTHROPIC_MODEL` | claude-sonnet-4-20250514 | Anthropic model name |
|
|
287
|
+
| `OPENAI_REDACT` | true | Redact PII before AI submission |
|
|
288
|
+
| `CONFIDENTIAL_KEYWORDS` | serial,password,token,secret | Comma-separated keys to scrub |
|
|
289
|
+
| `NSAUDITOR_LICENSE_KEY` | — | Pro/Enterprise JWT license key |
|
|
290
|
+
| `SCAN_OUT_PATH` | out/ | Output directory for scan results |
|
|
291
|
+
| `SMB_NULL_SESSION` | false | Allow SMB null session probe |
|
|
292
|
+
| `ENABLE_SYN_SCAN` | false | Enable Nmap TCP SYN scanning (requires root) |
|
|
293
|
+
|
|
294
|
+
### Plugin-Specific Timeouts
|
|
295
|
+
|
|
296
|
+
| Variable | Default | Plugin |
|
|
297
|
+
|----------|---------|--------|
|
|
298
|
+
| `TLS_SCANNER_TIMEOUT_MS` | 8000 | TLS Scanner |
|
|
299
|
+
| `HTTP_PROBE_TIMEOUT_MS` | 6000 | HTTP Probe |
|
|
300
|
+
| `WEBAPP_DETECTOR_TIMEOUT_MS` | 6000 | Webapp Detector |
|
|
301
|
+
| `DNS_TIMEOUT_MS` | 800 | DNS Scanner |
|
|
302
|
+
| `OPENSEARCH_SCANNER_TIMEOUT_MS` | 6000 | OpenSearch Scanner |
|
|
303
|
+
|
|
304
|
+
---
|
|
305
|
+
|
|
306
|
+
## Installation & Setup
|
|
307
|
+
|
|
308
|
+
```bash
|
|
309
|
+
# Install globally
|
|
310
|
+
npm install -g nsauditor-ai
|
|
311
|
+
|
|
312
|
+
# Start MCP server (stdio transport)
|
|
313
|
+
nsauditor-ai-mcp
|
|
314
|
+
|
|
315
|
+
# Or via npx (no global install)
|
|
316
|
+
npx nsauditor-ai-mcp
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
### Agent Integration
|
|
320
|
+
|
|
321
|
+
**Claude Code:**
|
|
322
|
+
```bash
|
|
323
|
+
claude mcp add nsauditor-ai -- npx nsauditor-ai-mcp
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
**Claude Desktop** (`claude_desktop_config.json`):
|
|
327
|
+
```json
|
|
328
|
+
{
|
|
329
|
+
"mcpServers": {
|
|
330
|
+
"nsauditor-ai": {
|
|
331
|
+
"command": "npx",
|
|
332
|
+
"args": ["-y", "nsauditor-ai-mcp"],
|
|
333
|
+
"env": {
|
|
334
|
+
"NSA_ALLOW_ALL_HOSTS": "1",
|
|
335
|
+
"PLUGIN_TIMEOUT_MS": "5000"
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
**Cursor / Windsurf / VS Code:**
|
|
343
|
+
Add to your MCP configuration with the same command/args pattern.
|
|
344
|
+
|
|
345
|
+
---
|
|
346
|
+
|
|
347
|
+
## Editions & Licensing
|
|
348
|
+
|
|
349
|
+
| Edition | Price | Key Features |
|
|
350
|
+
|---------|-------|-------------|
|
|
351
|
+
| **Community** | Free / MIT | 27 plugins, basic AI, CTEM, SARIF, scan history |
|
|
352
|
+
| **Pro** | $49/mo | + CVE matching, verification probes, risk scoring, Pro plugins (040/050/060) |
|
|
353
|
+
| **Enterprise** | $2k+/yr | + Cloud scanners, Zero Trust, compliance, air-gapped deployment |
|
|
354
|
+
|
|
355
|
+
→ [Pricing](https://www.nsauditor.com/ai/pricing) · [Free trial](https://www.nsauditor.com/ai/trial)
|
|
356
|
+
|
|
357
|
+
---
|
|
358
|
+
|
|
359
|
+
## Error Handling
|
|
360
|
+
|
|
361
|
+
| Error | Cause | Resolution |
|
|
362
|
+
|-------|-------|-----------|
|
|
363
|
+
| SSRF block | Target is loopback/metadata/private | Set `NSA_ALLOW_ALL_HOSTS=1` for local scanning |
|
|
364
|
+
| License gate (`🔒`) | Pro/Enterprise tool on CE | Upgrade license or use CE alternative |
|
|
365
|
+
| Plugin timeout | Network unreachable / slow target | Increase `timeout` param or `PLUGIN_TIMEOUT_MS` |
|
|
366
|
+
| No DNS banner | Provider blocks CHAOS/TXT queries | Expected; not all DNS servers expose version |
|
|
367
|
+
| CPE format error | Malformed CPE string | Use `cpe:2.3:a:vendor:product:version:*:*:*:*:*:*:*` |
|
|
368
|
+
| No services found | Host down or heavily firewalled | Try `NSA_VERBOSE=true` to debug; check connectivity |
|
|
369
|
+
| AI analysis failed | Bad API key or provider down | Check `AI_PROVIDER` and API key env vars |
|
|
370
|
+
|
|
371
|
+
---
|
|
372
|
+
|
|
373
|
+
## MITRE ATT&CK Mapping
|
|
374
|
+
|
|
375
|
+
Findings are auto-tagged with MITRE techniques:
|
|
376
|
+
|
|
377
|
+
| Finding Type | Technique | ID |
|
|
378
|
+
|-------------|-----------|-----|
|
|
379
|
+
| SSH vulnerability | Remote Services: SSH | T1021.004 |
|
|
380
|
+
| SMB vulnerability | Remote Services: SMB | T1021.002 |
|
|
381
|
+
| FTP anonymous login | Valid Accounts | T1078 |
|
|
382
|
+
| DNS zone transfer | Gather Victim Network Info | T1590.002 |
|
|
383
|
+
| SNMP default community | Network Sniffing | T1040 |
|
|
384
|
+
| TLS weakness | Adversary-in-the-Middle | T1557 |
|
|
385
|
+
| Debug/stack trace exposure | Gather Victim Host Info | T1592 |
|
|
386
|
+
| Weak authentication | Brute Force | T1110 |
|
|
387
|
+
|
|
388
|
+
---
|
|
389
|
+
|
|
390
|
+
## Output Formats
|
|
391
|
+
|
|
392
|
+
| File | Format | Purpose |
|
|
393
|
+
|------|--------|---------|
|
|
394
|
+
| `scan_conclusion_raw.json` | JSON | Full unredacted scan data (admin) |
|
|
395
|
+
| `scan_conclusion_raw.html` | HTML | Admin dashboard with filters |
|
|
396
|
+
| `scan_response_ai_payload.json` | JSON | Redacted payload sent to AI |
|
|
397
|
+
| `scan_response_ai.html` | HTML | Styled report with CVE links, severity badges |
|
|
398
|
+
| `scan_response_ai.txt` | Markdown | AI vulnerability assessment (text) |
|
|
399
|
+
| SARIF | JSON | CI/CD integration (GitHub Advanced Security, Azure DevOps) |
|
|
400
|
+
| CSV | CSV | Tabular export of findings |
|
|
401
|
+
| JSONL | JSONL | Scan history for CTEM delta analysis |
|