barrikade-lens 0.1.0

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 ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Barrikade
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,117 @@
1
+ # Barrikade Lens
2
+
3
+ > **Instant Shadow AI discovery & security audit for developer workstations.**
4
+ > Scans for AI agents, MCP servers, local LLMs, and plaintext secrets — in seconds.
5
+
6
+ ```bash
7
+ npx barrikade-lens
8
+ ```
9
+
10
+ No signup. No API keys. No configuration. Just run it.
11
+
12
+ ---
13
+
14
+ ## What It Does
15
+
16
+ Barrikade Lens gives you (and your security team) instant visibility into the **Shadow AI footprint** on any developer machine:
17
+
18
+ ### AI Agent Discovery
19
+ Discovers **23+ AI tools** across your system — config files, running processes, state directories, and workspace artifacts:
20
+
21
+ - **IDE Agents**: Cursor, GitHub Copilot, Windsurf, Cline, Roo Code, Kiro, Continue.dev, Augment Code, Qodo Gen
22
+ - **CLI Agents**: Claude Code, Antigravity CLI, OpenCode, Codex CLI, OpenClaw, Aider, Goose
23
+ - **Desktop AI**: Claude Desktop
24
+ - **IDE Plugins**: JetBrains Junie, Amazon Q, Zed AI, Warp Terminal
25
+
26
+ ### MCP Server Audit
27
+ Parses all discovered configuration files to identify configured **Model Context Protocol (MCP) servers**, including their transport types, command arguments, and environment variables.
28
+
29
+ ### Local LLM Port Sweep
30
+ Checks common ports for local inference servers:
31
+ - **Ollama** (11434), **LM Studio** (1234), **Jan.ai** (1337)
32
+ - **LocalAI / Llama.cpp** (8080 / 8000), **Text Gen WebUI** (7860 / 5000)
33
+ - **JetBrains MCP** (63334, 64342+), **Figma MCP** (3845)
34
+
35
+ Flags servers bound to `0.0.0.0` (network-exposed) as **CRITICAL** risks.
36
+
37
+ ### Plaintext Secrets Scanner
38
+ Detects hardcoded credentials across configs, `.env` files, and shell history:
39
+ - API Keys: OpenAI, Anthropic, HuggingFace, Google, Slack, Stripe
40
+ - AWS Access Keys & STS tokens
41
+ - GitHub PATs (classic & fine-grained)
42
+ - Database connection strings (PostgreSQL, MongoDB)
43
+ - Private key blocks
44
+
45
+ ### Risk Flags
46
+ - JetBrains **Brave Mode** (auto-execute without approval)
47
+ - Cline **Auto-Approve** settings
48
+ - Exposed inference server ports
49
+
50
+ ---
51
+
52
+ ## Usage
53
+
54
+ ```
55
+ Usage: barrikade-lens [options]
56
+
57
+ Instant Shadow AI agent discovery & security scanner
58
+
59
+ Options:
60
+ -V, --version output the version number
61
+ --json Output raw JSON instead of interactive dashboard
62
+ -r, --report <path> Write JSON scan report to specified file path
63
+ --html <path> Generate a self-contained HTML CISO audit report
64
+ --no-telemetry Disable anonymous high-level telemetry reporting
65
+ --verbose Show detailed execution logs
66
+ -h, --help display help for command
67
+ ```
68
+
69
+ ### Examples
70
+
71
+ **Run a quick scan:**
72
+ ```bash
73
+ npx barrikade-lens
74
+ ```
75
+
76
+ **Export an HTML report for your CISO:**
77
+ ```bash
78
+ npx barrikade-lens --html report.html
79
+ ```
80
+
81
+ **CI/CD pipeline (exits code 1 if critical issues found):**
82
+ ```bash
83
+ npx barrikade-lens --json --report audit.json
84
+ ```
85
+
86
+ **Install globally:**
87
+ ```bash
88
+ npm install -g barrikade-lens
89
+ barrikade-lens
90
+ ```
91
+
92
+ ---
93
+
94
+ ## Privacy & Telemetry
95
+
96
+ - **100% local scanning.** The scan engine runs entirely on your machine.
97
+ - **No code exposure.** Your source code, file paths, and raw credential values never leave your system.
98
+ - **Anonymous metrics only.** High-level counts (e.g., "3 agents found, 1 exposed port") are sent to `https://api.barrikade.ai/lens/telemetry`. You see and approve the exact record before it's sent.
99
+ - **Opt out anytime:**
100
+ ```bash
101
+ npx barrikade-lens --no-telemetry
102
+ # or
103
+ export BARRIKADE_NO_TELEMETRY=1
104
+ ```
105
+
106
+ ---
107
+
108
+ ## Fleet-Wide Governance
109
+
110
+ Individual scans protect one machine. To govern Shadow AI across your entire organisation:
111
+
112
+ - Fleet-wide developer AI agent discovery
113
+ - Secure credential proxying and RBAC policies for MCP servers
114
+ - Command execution guardrails and safety policy enforcement
115
+ - Compliance auditing for developer-installed AI extensions
116
+
117
+ šŸ‘‰ Learn more at [barrikade.ai](https://barrikade.ai)
package/bin/cli.js ADDED
@@ -0,0 +1,37 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { program } from 'commander';
4
+ import { runAudit } from '../src/runner.js';
5
+
6
+ // Global error handling for unhandled rejections
7
+ process.on('unhandledRejection', (reason) => {
8
+ console.error('\nāœ– Unhandled Promise Rejection:', reason);
9
+ process.exit(1);
10
+ });
11
+
12
+ process.on('uncaughtException', (error) => {
13
+ console.error('\nāœ– Uncaught Exception:', error);
14
+ process.exit(1);
15
+ });
16
+
17
+ program
18
+ .name('barrikade-lens')
19
+ .description('Instant Shadow AI agent discovery & security scanner')
20
+ .version('0.1.0')
21
+ .option('--json', 'Output raw JSON instead of interactive dashboard')
22
+ .option('-r, --report <path>', 'Write JSON scan report to specified file path')
23
+ .option('--html <path>', 'Generate a self-contained HTML CISO audit report')
24
+ .option('--no-telemetry', 'Disable anonymous high-level telemetry reporting')
25
+ .option('--verbose', 'Show detailed execution logs')
26
+ .action(async (options) => {
27
+ try {
28
+ const exitCode = await runAudit(options);
29
+ process.exit(exitCode);
30
+ } catch (err) {
31
+ console.error('Fatal CLI Error:', err);
32
+ process.exit(1);
33
+ }
34
+ });
35
+
36
+ program.parse(process.argv);
37
+ export {}; // Ensure file is parsed as ES Module
package/package.json ADDED
@@ -0,0 +1,51 @@
1
+ {
2
+ "name": "barrikade-lens",
3
+ "version": "0.1.0",
4
+ "description": "Instant Shadow AI security audit for developer workstations. Discovers AI agents, scans MCP servers, local LLMs, and plaintext secrets.",
5
+ "type": "module",
6
+ "bin": {
7
+ "barrikade-lens": "./bin/cli.js"
8
+ },
9
+ "files": [
10
+ "bin/",
11
+ "src/",
12
+ "LICENSE",
13
+ "README.md"
14
+ ],
15
+ "engines": {
16
+ "node": ">=18.0.0"
17
+ },
18
+ "keywords": [
19
+ "security",
20
+ "ai",
21
+ "mcp",
22
+ "audit",
23
+ "shadow-ai",
24
+ "llm",
25
+ "barrikade",
26
+ "ai-agent",
27
+ "mcp-server",
28
+ "devops",
29
+ "devsecops",
30
+ "cli"
31
+ ],
32
+ "license": "MIT",
33
+ "author": "Barrikade <hello@barrikade.ai>",
34
+ "homepage": "https://barrikade.ai",
35
+ "repository": {
36
+ "type": "git",
37
+ "url": "git+https://github.com/barrikadelabs/barrikade-lens.git"
38
+ },
39
+ "bugs": {
40
+ "url": "https://github.com/barrikadelabs/barrikade-lens/issues"
41
+ },
42
+ "dependencies": {
43
+ "boxen": "^8.0.1",
44
+ "chalk": "^5.3.0",
45
+ "cli-table3": "^0.6.5",
46
+ "commander": "^12.1.0",
47
+ "figlet": "^1.8.0",
48
+ "gradient-string": "^3.0.0",
49
+ "ora": "^8.0.1"
50
+ }
51
+ }