pinata-security-cli 0.2.3 → 0.4.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/README.md +38 -5
- package/dist/cli/index.js +1176 -14
- package/dist/cli/index.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/categories/definitions/security/dependency-risks.yml +70 -0
- package/src/categories/definitions/security/hardcoded-secrets.yml +43 -0
- package/src/categories/definitions/security/prompt-injection.yml +384 -0
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.
|
|
3
|
+
AI-powered security scanner that finds vulnerabilities hiding in your codebase. 47 detection categories across security, data integrity, concurrency, and performance domains.
|
|
4
4
|
|
|
5
5
|
## Quick Start
|
|
6
6
|
|
|
@@ -42,20 +42,21 @@ pinata analyze .
|
|
|
42
42
|
```bash
|
|
43
43
|
pinata analyze . # Fast scan
|
|
44
44
|
pinata analyze . --verify # AI-verified scan
|
|
45
|
+
pinata analyze . --execute # Dynamic execution (requires Docker)
|
|
46
|
+
pinata analyze . --execute --dry-run # Preview tests without running
|
|
45
47
|
pinata analyze . --confidence low # Include all matches
|
|
46
48
|
pinata analyze . --output json # JSON output
|
|
47
49
|
pinata analyze . --output sarif # SARIF for GitHub
|
|
48
50
|
pinata generate --gaps # Generate tests for gaps
|
|
49
|
-
pinata
|
|
50
|
-
pinata dashboard # Interactive TUI
|
|
51
|
+
pinata audit-deps # Check npm dependencies
|
|
51
52
|
pinata config set anthropic-api-key sk-ant-xxx
|
|
52
53
|
```
|
|
53
54
|
|
|
54
55
|
## Detection Categories
|
|
55
56
|
|
|
56
|
-
|
|
57
|
+
47 categories across 7 risk domains:
|
|
57
58
|
|
|
58
|
-
**Security (
|
|
59
|
+
**Security (17)** - SQL injection, XSS, command injection, path traversal, SSRF, XXE, CSRF, deserialization, hardcoded secrets, LDAP injection, timing attacks, auth failures, file upload, data exposure, rate limiting, dependency risks, prompt injection
|
|
59
60
|
|
|
60
61
|
**Data (8)** - Data race, truncation, precision loss, validation, null handling, encoding, schema migration, bulk operations
|
|
61
62
|
|
|
@@ -85,6 +86,8 @@ dist/
|
|
|
85
86
|
|
|
86
87
|
```bash
|
|
87
88
|
--verify # AI verification (requires API key)
|
|
89
|
+
--execute # Dynamic test execution (requires Docker)
|
|
90
|
+
--dry-run # Preview generated tests without running
|
|
88
91
|
--confidence <level> # high (default), medium, low
|
|
89
92
|
--output <format> # terminal, json, sarif, junit, markdown
|
|
90
93
|
--domain <domain> # security, data, concurrency, etc.
|
|
@@ -114,6 +117,36 @@ pinata analyze . --verify
|
|
|
114
117
|
|
|
115
118
|
**Performance:** ~2.5 minutes for 350 matches (batched 10/request, 3 concurrent)
|
|
116
119
|
|
|
120
|
+
## Dynamic Execution (Layer 5)
|
|
121
|
+
|
|
122
|
+
The `--execute` flag runs generated exploit tests in a Docker sandbox to **prove** vulnerabilities exist:
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
# Requires Docker
|
|
126
|
+
pinata analyze . --execute
|
|
127
|
+
|
|
128
|
+
# Preview tests without running
|
|
129
|
+
pinata analyze . --execute --dry-run
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
**How it works:**
|
|
133
|
+
- Generates exploit tests for each vulnerability
|
|
134
|
+
- Runs tests in isolated Docker container (no network, limited resources)
|
|
135
|
+
- Reports **CONFIRMED** vs **POTENTIAL** vulnerabilities
|
|
136
|
+
- Evidence includes payload and actual exploit result
|
|
137
|
+
|
|
138
|
+
**Testable vulnerability types:**
|
|
139
|
+
- SQL injection (boolean blind, UNION attacks)
|
|
140
|
+
- XSS (script injection, innerHTML)
|
|
141
|
+
- Command injection (shell metacharacters)
|
|
142
|
+
- Path traversal (../ attacks)
|
|
143
|
+
|
|
144
|
+
**Security constraints:**
|
|
145
|
+
- Network disabled (no exfiltration)
|
|
146
|
+
- 1 CPU, 512MB RAM, 30s timeout
|
|
147
|
+
- Read-only filesystem, unprivileged user
|
|
148
|
+
- No capabilities
|
|
149
|
+
|
|
117
150
|
## CI/CD Integration
|
|
118
151
|
|
|
119
152
|
**GitHub Actions**
|