opena2a-cli 0.5.12 → 0.6.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.
- package/README.md +21 -1
- package/dist/commands/detect.d.ts +41 -18
- package/dist/commands/detect.d.ts.map +1 -1
- package/dist/commands/detect.js +729 -120
- package/dist/commands/detect.js.map +1 -1
- package/dist/commands/identity.js +2 -2
- package/dist/commands/identity.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +4 -0
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/review.d.ts +40 -3
- package/dist/commands/review.d.ts.map +1 -1
- package/dist/commands/review.js +171 -31
- package/dist/commands/review.js.map +1 -1
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -1
- package/dist/report/detect-html.d.ts +7 -0
- package/dist/report/detect-html.d.ts.map +1 -0
- package/dist/report/detect-html.js +185 -0
- package/dist/report/detect-html.js.map +1 -0
- package/dist/report/review-html.d.ts +1 -1
- package/dist/report/review-html.d.ts.map +1 -1
- package/dist/report/review-html.js +8 -440
- package/dist/report/review-html.js.map +1 -1
- package/dist/util/report-submission.d.ts +1 -0
- package/dist/util/report-submission.d.ts.map +1 -1
- package/dist/util/report-submission.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -106,7 +106,7 @@ When drift is detected, `opena2a protect` migrates the key to environment variab
|
|
|
106
106
|
|
|
107
107
|
### `opena2a review`
|
|
108
108
|
|
|
109
|
-
Run all security checks and generate a unified HTML dashboard. This is the recommended starting point -- it combines credential scanning, config integrity, Shield posture, advisory checks, and optional HMA deep scan into a single interactive report.
|
|
109
|
+
Run all security checks and generate a unified HTML dashboard. This is the recommended starting point -- it combines credential scanning, config integrity, Shield posture, shadow AI detection, advisory checks, and optional HMA deep scan into a single interactive report with 6 tabs.
|
|
110
110
|
|
|
111
111
|
```bash
|
|
112
112
|
opena2a review # Scan + open HTML report in browser
|
|
@@ -115,6 +115,26 @@ opena2a review --report out.html # Save to custom path
|
|
|
115
115
|
opena2a review --format json # JSON output for CI
|
|
116
116
|
```
|
|
117
117
|
|
|
118
|
+
### `opena2a detect`
|
|
119
|
+
|
|
120
|
+
Discover AI agents, MCP servers, and AI configurations running on this machine. Reports a governance score (0-100, where 100 = fully governed) with actionable findings that explain why each issue matters and how to fix it.
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
opena2a detect # Scan current project
|
|
124
|
+
opena2a detect --report # Generate HTML executive report
|
|
125
|
+
opena2a detect --export-csv assets.csv # Export asset inventory for CMDB
|
|
126
|
+
opena2a detect --format json # Machine-readable output
|
|
127
|
+
opena2a detect --verbose # Show full MCP server list and PIDs
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
What detect finds:
|
|
131
|
+
- **Running AI agents**: Claude Code, Cursor, GitHub Copilot, Windsurf, Aider, Ollama, LM Studio, and more
|
|
132
|
+
- **MCP servers**: Project-local and machine-wide configurations across Claude, Cursor, Windsurf, Cline, and VS Code
|
|
133
|
+
- **AI config files**: `.cursorrules`, `CLAUDE.md`, `.copilot`, `.windsurfrules`, and framework configs
|
|
134
|
+
- **Governance posture**: AIM identity, SOUL.md behavioral rules, capability policies
|
|
135
|
+
|
|
136
|
+
The CSV export includes hostname, username, scan directory, and timestamp on every row for enterprise CMDB import.
|
|
137
|
+
|
|
118
138
|
### `opena2a init`
|
|
119
139
|
|
|
120
140
|
Read-only security assessment. Detects project type (Node.js, Python via `pyproject.toml`, Go via `go.mod`), scans for credentials, checks hygiene (`.gitignore`, `.env` protection, lock file, security config, `.mcp/config.json`), calculates a trust score (0-100), and provides prioritized next steps. Does not modify any files -- use `opena2a protect` or `opena2a shield init` to take action.
|
|
@@ -1,26 +1,40 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* opena2a detect -- Shadow AI Agent Audit
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* Discovers AI agents running on this machine, MCP servers configured
|
|
5
|
+
* across all platforms, local LLM processes, and AI config files in the
|
|
6
|
+
* project. Reports identity, governance posture, and risk classification.
|
|
6
7
|
*/
|
|
7
8
|
export interface DetectOptions {
|
|
8
9
|
targetDir: string;
|
|
9
10
|
ci?: boolean;
|
|
10
11
|
format?: string;
|
|
11
12
|
verbose?: boolean;
|
|
13
|
+
reportPath?: string;
|
|
14
|
+
exportCsv?: string;
|
|
12
15
|
}
|
|
16
|
+
export type RiskLevel = 'critical' | 'high' | 'medium' | 'low';
|
|
13
17
|
export interface DetectedAgent {
|
|
14
18
|
name: string;
|
|
15
19
|
pid: number;
|
|
20
|
+
category: 'ai-assistant' | 'local-llm' | 'ai-plugin';
|
|
16
21
|
identityStatus: 'identified' | 'no identity';
|
|
17
22
|
governanceStatus: 'governed' | 'no governance';
|
|
23
|
+
risk: RiskLevel;
|
|
18
24
|
}
|
|
19
25
|
export interface DetectedMcpServer {
|
|
20
26
|
name: string;
|
|
21
27
|
transport: 'stdio' | 'sse' | 'unknown';
|
|
22
28
|
source: string;
|
|
23
29
|
verified: boolean;
|
|
30
|
+
capabilities: string[];
|
|
31
|
+
risk: RiskLevel;
|
|
32
|
+
}
|
|
33
|
+
export interface AiConfigFile {
|
|
34
|
+
file: string;
|
|
35
|
+
tool: string;
|
|
36
|
+
risk: RiskLevel;
|
|
37
|
+
details: string;
|
|
24
38
|
}
|
|
25
39
|
export interface IdentitySummary {
|
|
26
40
|
aimIdentities: number;
|
|
@@ -30,29 +44,38 @@ export interface IdentitySummary {
|
|
|
30
44
|
capabilityPolicies: number;
|
|
31
45
|
}
|
|
32
46
|
export interface DetectResult {
|
|
47
|
+
scanTimestamp: string;
|
|
48
|
+
scanDirectory: string;
|
|
49
|
+
summary: {
|
|
50
|
+
totalAgents: number;
|
|
51
|
+
ungoverned: number;
|
|
52
|
+
mcpServers: number;
|
|
53
|
+
unverifiedServers: number;
|
|
54
|
+
localLlms: number;
|
|
55
|
+
aiConfigs: number;
|
|
56
|
+
/** Governance score: 100 = fully governed, 0 = nothing in place. */
|
|
57
|
+
governanceScore: number;
|
|
58
|
+
/** How many points can be recovered by addressing findings. */
|
|
59
|
+
recoverablePoints: number;
|
|
60
|
+
};
|
|
33
61
|
agents: DetectedAgent[];
|
|
34
62
|
mcpServers: DetectedMcpServer[];
|
|
63
|
+
aiConfigs: AiConfigFile[];
|
|
35
64
|
identity: IdentitySummary;
|
|
65
|
+
findings: Finding[];
|
|
66
|
+
}
|
|
67
|
+
export interface Finding {
|
|
68
|
+
severity: RiskLevel;
|
|
69
|
+
category: string;
|
|
70
|
+
title: string;
|
|
71
|
+
detail: string;
|
|
72
|
+
whyItMatters: string;
|
|
73
|
+
remediation: string;
|
|
36
74
|
}
|
|
37
|
-
/**
|
|
38
|
-
* Scan running processes for AI agents.
|
|
39
|
-
* Runs a single `ps aux` and parses once.
|
|
40
|
-
*/
|
|
41
75
|
export declare function scanProcesses(psOutput?: string): DetectedAgent[];
|
|
42
|
-
/**
|
|
43
|
-
* Parse an MCP config file and extract server entries.
|
|
44
|
-
*/
|
|
45
76
|
export declare function parseMcpConfig(filePath: string, label: string): DetectedMcpServer[];
|
|
46
|
-
/**
|
|
47
|
-
* Scan for MCP server config files.
|
|
48
|
-
*/
|
|
49
77
|
export declare function scanMcpServers(targetDir: string): DetectedMcpServer[];
|
|
50
|
-
|
|
51
|
-
* Check for AIM identity and governance files.
|
|
52
|
-
*/
|
|
78
|
+
export declare function scanAiConfigs(targetDir: string): AiConfigFile[];
|
|
53
79
|
export declare function scanIdentity(targetDir: string): IdentitySummary;
|
|
54
|
-
/**
|
|
55
|
-
* Main detect command entry point.
|
|
56
|
-
*/
|
|
57
80
|
export declare function detect(options: DetectOptions): Promise<number>;
|
|
58
81
|
//# sourceMappingURL=detect.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"detect.d.ts","sourceRoot":"","sources":["../../src/commands/detect.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"detect.d.ts","sourceRoot":"","sources":["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