pinata-security-cli 0.5.1 → 0.5.3
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 +39 -11
- package/dist/cli/index.js +1730 -1527
- package/dist/cli/index.js.map +1 -1
- package/package.json +8 -6
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Pinata
|
|
2
2
|
|
|
3
|
-
AI-powered security scanner that finds vulnerabilities hiding in your codebase. 47 detection categories across security, data integrity, concurrency, and performance domains.
|
|
3
|
+
AI-powered security scanner that finds vulnerabilities hiding in your codebase. 47 detection categories across security, data integrity, concurrency, and performance domains. Context-aware scanning adjusts rules based on your project type.
|
|
4
4
|
|
|
5
5
|
## Quick Start
|
|
6
6
|
|
|
@@ -8,8 +8,9 @@ AI-powered security scanner that finds vulnerabilities hiding in your codebase.
|
|
|
8
8
|
# Fast scan (pattern matching only, ~2s)
|
|
9
9
|
npx --yes pinata-security-cli@latest analyze .
|
|
10
10
|
|
|
11
|
-
# AI-verified scan (eliminates false positives
|
|
12
|
-
|
|
11
|
+
# AI-verified scan (eliminates false positives)
|
|
12
|
+
npx --yes pinata-security-cli@latest analyze . --verify
|
|
13
|
+
# Prompts for API key if not configured - saved for future runs
|
|
13
14
|
```
|
|
14
15
|
|
|
15
16
|
## What It Does
|
|
@@ -17,14 +18,21 @@ ANTHROPIC_API_KEY=sk-ant-xxx npx --yes pinata-security-cli@latest analyze . --ve
|
|
|
17
18
|
```
|
|
18
19
|
$ pinata analyze . --verify
|
|
19
20
|
|
|
21
|
+
Analyzing: /path/to/project
|
|
22
|
+
Project: Web server (high confidence) # Auto-detected
|
|
23
|
+
Files: 136 | Languages: Typescript
|
|
24
|
+
|
|
20
25
|
Pinata Score: 100/100 (A)
|
|
21
26
|
|
|
22
|
-
AI Verification: 351 total →
|
|
27
|
+
AI Verification: 351 total → 0 verified, 351 AI-dismissed
|
|
23
28
|
|
|
24
29
|
No gaps detected! Your codebase has good test coverage.
|
|
25
30
|
```
|
|
26
31
|
|
|
27
|
-
|
|
32
|
+
**Key features:**
|
|
33
|
+
- **Project type detection** - Adjusts rules for CLI, web server, library, serverless, etc.
|
|
34
|
+
- **AI verification** - Eliminates false positives with Claude/GPT analysis
|
|
35
|
+
- **Interactive setup** - Prompts for API key on first `--verify` run
|
|
28
36
|
|
|
29
37
|
## Installation
|
|
30
38
|
|
|
@@ -101,13 +109,17 @@ dist/
|
|
|
101
109
|
The `--verify` flag uses AI to analyze each pattern match and filter false positives:
|
|
102
110
|
|
|
103
111
|
```bash
|
|
104
|
-
#
|
|
105
|
-
pinata config set anthropic-api-key sk-ant-xxx
|
|
106
|
-
# Or use environment variable
|
|
107
|
-
export ANTHROPIC_API_KEY=sk-ant-xxx
|
|
108
|
-
|
|
109
|
-
# Run AI-verified scan
|
|
112
|
+
# Just run it - prompts for API key if needed
|
|
110
113
|
pinata analyze . --verify
|
|
114
|
+
|
|
115
|
+
# Enter your Anthropic or OpenAI API key: sk-ant-xxx
|
|
116
|
+
# API key saved to ~/.pinata/config.json
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
**Alternative setup methods:**
|
|
120
|
+
```bash
|
|
121
|
+
pinata config set anthropic-api-key sk-ant-xxx # Save to config
|
|
122
|
+
export ANTHROPIC_API_KEY=sk-ant-xxx # Environment variable
|
|
111
123
|
```
|
|
112
124
|
|
|
113
125
|
**How it works:**
|
|
@@ -118,6 +130,22 @@ pinata analyze . --verify
|
|
|
118
130
|
|
|
119
131
|
**Performance:** ~2.5 minutes for 350 matches (batched 10/request, 3 concurrent)
|
|
120
132
|
|
|
133
|
+
## Project Type Detection
|
|
134
|
+
|
|
135
|
+
Pinata auto-detects your project type and adjusts scanning rules accordingly:
|
|
136
|
+
|
|
137
|
+
| Type | Detection | Adjustments |
|
|
138
|
+
|------|-----------|-------------|
|
|
139
|
+
| CLI | `bin` field, commander/yargs | Blocking I/O allowed, SSRF skipped |
|
|
140
|
+
| Web Server | express/fastify deps | SQL injection weighted higher |
|
|
141
|
+
| API | routes/, NestJS/tRPC | CSRF skipped, auth weighted higher |
|
|
142
|
+
| Frontend SPA | react/vue deps | SQL injection skipped |
|
|
143
|
+
| SSR Framework | next.config.js | XSS weighted higher |
|
|
144
|
+
| Serverless | serverless.yml | Memory leaks skipped |
|
|
145
|
+
| Library | exports field | Rate limiting skipped |
|
|
146
|
+
|
|
147
|
+
This reduces false positives by ~60% for specialized project types.
|
|
148
|
+
|
|
121
149
|
## Dynamic Execution (Layer 5)
|
|
122
150
|
|
|
123
151
|
The `--execute` flag runs generated exploit tests in a Docker sandbox to **prove** vulnerabilities exist:
|