ship-safe 9.2.1 → 9.2.2
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 +85 -713
- package/cli/.ship-safe/context.json +8157 -0
- package/cli/.ship-safe/history.json +190 -0
- package/cli/commands/audit.js +1 -1
- package/cli/commands/shell.js +5 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
<p align="center">
|
|
2
2
|
<img src=".github/assets/logo%20ship%20safe.png" alt="Ship Safe Logo" width="180" />
|
|
3
3
|
</p>
|
|
4
|
-
<p align="center"><strong>AI
|
|
5
|
-
<p align="center"><a href="https://shipsafecli.com">shipsafecli.com</a></p>
|
|
4
|
+
<p align="center"><strong>AI security agent for developers. Scan, fix, and ship safely.</strong></p>
|
|
5
|
+
<p align="center"><a href="https://shipsafecli.com">shipsafecli.com</a> · <a href="https://shipsafecli.com/docs">Docs</a> · <a href="https://shipsafecli.com/blog">Blog</a></p>
|
|
6
6
|
|
|
7
7
|
<p align="center">
|
|
8
8
|
<a href="https://www.npmjs.com/package/ship-safe"><img src="https://badge.fury.io/js/ship-safe.svg" alt="npm version" /></a>
|
|
9
9
|
<a href="https://www.npmjs.com/package/ship-safe"><img src="https://img.shields.io/npm/dm/ship-safe.svg" alt="npm downloads" /></a>
|
|
10
10
|
<a href="https://github.com/asamassekou10/ship-safe/actions/workflows/ci.yml"><img src="https://github.com/asamassekou10/ship-safe/actions/workflows/ci.yml/badge.svg" alt="CI" /></a>
|
|
11
|
-
<a href="https://nodejs.org"><img src="https://img.shields.io/node/v/ship-safe" alt="Node.js version" /></a>
|
|
12
11
|
<a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT" /></a>
|
|
13
12
|
<a href="https://github.com/asamassekou10/ship-safe/stargazers"><img src="https://img.shields.io/github/stars/asamassekou10/ship-safe?style=social" alt="GitHub stars" /></a>
|
|
14
13
|
<a href="https://github.com/sponsors/asamassekou10"><img src="https://img.shields.io/badge/Sponsor-%E2%9D%A4-ea4aaa?logo=github" alt="Sponsor" /></a>
|
|
@@ -16,796 +15,175 @@
|
|
|
16
15
|
|
|
17
16
|
---
|
|
18
17
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
**v9.1.0 highlights:** **AgenticSupplyChainAgent & Vercel Breach Checker** — new 23rd agent detects AI integration supply chain attacks (Vercel-class): unpinned AI CI actions, OAuth scope abuse in platform integrations, unsigned webhook handlers, and MCP/Hermes cross-boundary token forwarding. New public breach impact checker at /breach/vercel-april-2026 lets any Vercel user self-serve all four checks without the CLI. Full incident analysis published.
|
|
24
|
-
|
|
25
|
-
**v9.0.0:** **Agent Studio, Teams & Findings** — the web dashboard is now a full AI security operations platform. **Agent Studio** lets you build, configure, and deploy custom Hermes security agents from the UI — give each agent a role, tools, and memory, then deploy to a live container in one click. **Agent Console** provides a live SSE chat interface with ANSI color rendering and per-session run history. **Agent Teams** orchestrate multiple specialist agents (pen tester, secrets scanner, CVE analyst) under a lead agent that plans, delegates tasks in parallel, and synthesises an executive security report. **Agent Triggers** add webhook and cron-based automation per agent. The new **Findings Dashboard** aggregates all security findings across every agent run with severity charts, trend data, and one-click GitHub issue creation. Billing has moved to monthly subscriptions (Pro at $9/month, Team at $19/seat/month) with automatic plan downgrade on cancellation.
|
|
26
|
-
|
|
27
|
-
[Documentation](https://shipsafecli.com/docs) | [Blog](https://shipsafecli.com/blog) | [Pricing](https://shipsafecli.com/pricing)
|
|
28
|
-
|
|
29
|
-
---
|
|
18
|
+
<p align="center">
|
|
19
|
+
<img src=".github/assets/demo-repl.gif" alt="Ship Safe REPL demo" width="800" />
|
|
20
|
+
</p>
|
|
30
21
|
|
|
31
|
-
|
|
22
|
+
Type `ship-safe` and you're in. 23 agents scan your codebase for secrets, injections, AI/LLM vulnerabilities, supply chain attacks, and 80+ other classes. The agent shows a diff for every proposed fix, asks before writing, and verifies the fix worked. Every change is logged and reversible.
|
|
32
23
|
|
|
33
24
|
```bash
|
|
34
|
-
|
|
35
|
-
npx ship-safe audit .
|
|
36
|
-
|
|
37
|
-
# LLM-powered deep analysis (Anthropic, OpenAI, Google, Ollama, Gemma 4)
|
|
38
|
-
npx ship-safe audit . --deep
|
|
39
|
-
|
|
40
|
-
# Agentic loop — scan → auto-annotate fixes → re-scan until score ≥ 75
|
|
41
|
-
npx ship-safe audit . --agentic
|
|
42
|
-
npx ship-safe audit . --agentic 5 --agentic-target 85
|
|
43
|
-
|
|
44
|
-
# Red team scan (23 agents, 80+ attack classes)
|
|
45
|
-
npx ship-safe red-team .
|
|
46
|
-
|
|
47
|
-
# Scan only changed files (fast pre-commit & PR scanning)
|
|
48
|
-
npx ship-safe diff
|
|
49
|
-
npx ship-safe diff --staged
|
|
50
|
-
|
|
51
|
-
# Live OSV.dev advisory feed — no API key, no stale data
|
|
52
|
-
npx ship-safe advisories .
|
|
53
|
-
|
|
54
|
-
# Continuous monitoring
|
|
55
|
-
npx ship-safe watch . # Lightweight file watcher
|
|
56
|
-
npx ship-safe watch . --deep # Full 23-agent scan on every change
|
|
57
|
-
npx ship-safe watch . --deep --threshold 80 # Fail if score drops below threshold
|
|
58
|
-
npx ship-safe watch . --status # Show last deep-watch results
|
|
59
|
-
|
|
60
|
-
# Fun emoji security grade with shareable badge
|
|
61
|
-
npx ship-safe vibe-check .
|
|
62
|
-
|
|
63
|
-
# Compare your score against industry averages
|
|
64
|
-
npx ship-safe benchmark .
|
|
65
|
-
|
|
66
|
-
# Quick secret scan
|
|
67
|
-
npx ship-safe scan .
|
|
68
|
-
|
|
69
|
-
# Security health score (0-100)
|
|
70
|
-
npx ship-safe score .
|
|
71
|
-
|
|
72
|
-
# CI/CD pipeline mode — compact output, exit codes, PR comments
|
|
73
|
-
npx ship-safe ci .
|
|
74
|
-
npx ship-safe ci . --github-pr
|
|
75
|
-
|
|
76
|
-
# Accept current findings, only report regressions
|
|
77
|
-
npx ship-safe baseline .
|
|
78
|
-
npx ship-safe audit . --baseline
|
|
79
|
-
|
|
80
|
-
# Check if leaked secrets are still active
|
|
81
|
-
npx ship-safe audit . --verify
|
|
82
|
-
|
|
83
|
-
# Environment diagnostics
|
|
84
|
-
npx ship-safe doctor
|
|
85
|
-
|
|
86
|
-
# Install Claude Code hooks — real-time secret blocking + advisory scan
|
|
87
|
-
npx ship-safe hooks install
|
|
88
|
-
npx ship-safe hooks status
|
|
89
|
-
npx ship-safe hooks remove
|
|
25
|
+
npx ship-safe
|
|
90
26
|
```
|
|
91
27
|
|
|
92
28
|
---
|
|
93
29
|
|
|
94
|
-
##
|
|
95
|
-
|
|
96
|
-
One command that runs everything and generates a full report:
|
|
30
|
+
## Quick Start
|
|
97
31
|
|
|
98
32
|
```bash
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
```
|
|
103
|
-
════════════════════════════════════════════════════════════
|
|
104
|
-
Ship Safe v9.0 — Full Security Audit
|
|
105
|
-
════════════════════════════════════════════════════════════
|
|
106
|
-
|
|
107
|
-
[Phase 1/4] Scanning for secrets... ✔ 49 found
|
|
108
|
-
[Phase 2/4] Running 23 security agents... ✔ 103 findings
|
|
109
|
-
[Phase 3/4] Auditing dependencies... ✔ 44 CVEs
|
|
110
|
-
[Phase 4/4] Computing security score... ✔ 25/100 F
|
|
111
|
-
|
|
112
|
-
Remediation Plan
|
|
113
|
-
════════════════════════════════════════════════════════
|
|
33
|
+
# Interactive REPL — scan, fix, ask questions in one session
|
|
34
|
+
npx ship-safe
|
|
114
35
|
|
|
115
|
-
|
|
116
|
-
────────────────────────────────────────────────────────
|
|
117
|
-
1. [SECRETS] Rotate Stripe Live Secret Key
|
|
118
|
-
.env:67 → Move to environment variable or secrets manager
|
|
119
|
-
|
|
120
|
-
2. [INJECTION] Unsafe pickle.loads()
|
|
121
|
-
backend/ai_processor.py:64 → Use JSON for untrusted data
|
|
122
|
-
|
|
123
|
-
🟠 HIGH — fix before deploy
|
|
124
|
-
────────────────────────────────────────────────────────
|
|
125
|
-
3. [XSS] dangerouslySetInnerHTML without sanitization
|
|
126
|
-
frontend/src/utils/blogContentRenderer.jsx:50 → Add DOMPurify
|
|
127
|
-
|
|
128
|
-
... 149 more items in the full report
|
|
129
|
-
|
|
130
|
-
📊 Full report: ship-safe-report.html
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
**What it runs:**
|
|
134
|
-
1. **Secret scan** — 50+ patterns with entropy scoring (API keys, passwords, tokens)
|
|
135
|
-
2. **23 security agents** — run in parallel with per-agent timeouts and framework-aware filtering
|
|
136
|
-
3. **Dependency audit** — npm/pip/bundler CVE scanning with EPSS exploit probability scores
|
|
137
|
-
4. **Secrets verification** — probes provider APIs (GitHub, Stripe, OpenAI, etc.) to check if leaked keys are still active
|
|
138
|
-
5. **Deep analysis** — LLM-powered taint analysis verifies exploitability of critical/high findings (optional)
|
|
139
|
-
6. **Score computation** — OWASP 2025 weighted scoring across 8 categories (0-100, A-F)
|
|
140
|
-
7. **Context-aware confidence tuning** — downgrades findings in test files, docs, and comments
|
|
141
|
-
8. **Compliance mapping** — maps findings to SOC 2 Type II, ISO 27001:2022, and NIST AI Risk Management Framework controls
|
|
142
|
-
9. **Remediation plan** — prioritized fix list grouped by severity
|
|
143
|
-
10. **Interactive HTML report** — standalone dark-themed report with severity filtering, search, collapsible findings, compliance summary, and click-to-copy ignore annotations
|
|
144
|
-
|
|
145
|
-
**Flags:**
|
|
146
|
-
- `--json` — structured JSON output (clean for piping)
|
|
147
|
-
- `--sarif` — SARIF format for GitHub Code Scanning
|
|
148
|
-
- `--csv` — CSV export for spreadsheets
|
|
149
|
-
- `--md` — Markdown report
|
|
150
|
-
- `--html [file]` — custom HTML report path (default: `ship-safe-report.html`)
|
|
151
|
-
- `--compare` — show per-category score delta vs. last scan
|
|
152
|
-
- `--timeout <ms>` — per-agent timeout (default: 30s)
|
|
153
|
-
- `--no-deps` — skip dependency audit
|
|
154
|
-
- `--no-ai` — skip AI classification
|
|
155
|
-
- `--no-cache` — force full rescan (ignore cached results)
|
|
156
|
-
- `--baseline` — only show findings not in the baseline
|
|
157
|
-
- `--pdf [file]` — generate PDF report (requires Chrome/Chromium)
|
|
158
|
-
- `--deep` — LLM-powered taint analysis for critical/high findings
|
|
159
|
-
- `--local` — use local Ollama model for deep analysis
|
|
160
|
-
- `--model <model>` — LLM model to use for deep/AI analysis
|
|
161
|
-
- `--provider <name>` — LLM provider: groq, together, mistral, deepseek, xai, perplexity, lmstudio, gemma4
|
|
162
|
-
- `--base-url <url>` — custom OpenAI-compatible base URL (e.g. LM Studio, vLLM)
|
|
163
|
-
- `--budget <cents>` — max spend in cents for deep analysis (default: 50)
|
|
164
|
-
- `--verify` — check if leaked secrets are still active (probes provider APIs)
|
|
165
|
-
- `--agentic [n]` — scan → annotate fixes → re-scan loop, up to n iterations (default: 3)
|
|
166
|
-
- `--agentic-target <score>` — stop agentic loop when score reaches this threshold (default: 75)
|
|
167
|
-
|
|
168
|
-
---
|
|
169
|
-
|
|
170
|
-
## 23 Security Agents
|
|
171
|
-
|
|
172
|
-
| Agent | Category | What It Detects |
|
|
173
|
-
|-------|----------|-----------------|
|
|
174
|
-
| **InjectionTester** | Code Vulns | SQL/NoSQL injection, command injection, code injection (eval), XSS, path traversal, XXE, ReDoS, prototype pollution, Python f-string SQL injection, Python subprocess shell injection |
|
|
175
|
-
| **AuthBypassAgent** | Auth | JWT vulnerabilities (alg:none, weak secrets), cookie security, CSRF, OAuth misconfig, BOLA/IDOR, weak crypto, timing attacks, TLS bypass, Django `DEBUG = True`, Flask hardcoded secret keys |
|
|
176
|
-
| **SSRFProber** | SSRF | User input in fetch/axios, cloud metadata endpoints, internal IPs, redirect following |
|
|
177
|
-
| **SupplyChainAudit** | Supply Chain | Typosquatting (Levenshtein distance), git/URL dependencies, wildcard versions, suspicious install scripts, dependency confusion, lockfile integrity, trojanized package behavioral signatures (env-var harvesting, DNS exfiltration, WebSocket C2) |
|
|
178
|
-
| **ConfigAuditor** | Config | Dockerfile (running as root, :latest tags), Terraform (public S3/RDS, open SG, CloudFront HTTP, Lambda admin, S3 no versioning), Kubernetes (privileged containers, `:latest` tags, missing NetworkPolicy), CORS, CSP, Firebase, Nginx |
|
|
179
|
-
| **SupabaseRLSAgent** | Auth | Supabase Row Level Security — `service_role` key in client code, `CREATE TABLE` without RLS, anon key inserts, unprotected storage operations |
|
|
180
|
-
| **LLMRedTeam** | AI/LLM | OWASP LLM Top 10 — prompt injection, excessive agency, system prompt leakage, unbounded consumption, RAG poisoning |
|
|
181
|
-
| **MCPSecurityAgent** | AI/LLM | MCP server security — unvalidated tool inputs, missing auth, excessive permissions, tool poisoning, typosquatting detection, over-permissioned tools, shadow config discovery |
|
|
182
|
-
| **AgenticSecurityAgent** | AI/LLM | OWASP Agentic AI Top 10 — agent hijacking, privilege escalation, unsafe code execution, memory poisoning |
|
|
183
|
-
| **RAGSecurityAgent** | AI/LLM | RAG pipeline security — unvalidated embeddings, context injection, document poisoning, vector DB access control |
|
|
184
|
-
| **MemoryPoisoningAgent** | AI/LLM | ASI-01/ASI-05 — instruction injection in `.claude/memory/`, `.cursorrules`, `.cursor/rules/`, `.windsurfrules`, `.continue/config.json`, `.gemini/`, `.cody/`, `.augment/` and docs; hidden Unicode payloads; persona hijacking; persistent trigger detection |
|
|
185
|
-
| **PIIComplianceAgent** | Compliance | PII detection — SSNs, credit cards, emails, phone numbers in source code, logs, and configs |
|
|
186
|
-
| **VibeCodingAgent** | Code Vulns | AI-generated code patterns — no input validation, empty catch blocks, hardcoded secrets, disabled security features, TODO-auth patterns |
|
|
187
|
-
| **ExceptionHandlerAgent** | Code Vulns | OWASP A10:2025 — empty catch blocks, unhandled promise rejections, missing React error boundaries, leaked stack traces, generic catch-all without rethrow |
|
|
188
|
-
| **AgentConfigScanner** | AI/LLM | AI agent config security — prompt injection in .cursorrules/CLAUDE.md/AGENTS.md/.windsurfrules, malicious Claude Code hooks (CVE-2026), OpenClaw public binding & malicious skills, claw-code config risks, Gemini CLI / Cody / Augment Code config risks, encoded/obfuscated payloads |
|
|
189
|
-
| **MobileScanner** | Mobile | OWASP Mobile Top 10 2024 — insecure storage, WebView JS injection, HTTP endpoints, excessive permissions, debug mode |
|
|
190
|
-
| **GitHistoryScanner** | Secrets | Leaked secrets in git commit history (checks if still active in working tree) |
|
|
191
|
-
| **CICDScanner** | CI/CD | OWASP CI/CD Top 10 — pipeline poisoning, unpinned actions, secret logging, self-hosted runners, script injection, AI agent danger flags |
|
|
192
|
-
| **APIFuzzer** | API | Routes without auth, missing input validation, mass assignment, unrestricted file upload, GraphQL introspection, debug endpoints, missing rate limiting, OpenAPI spec security issues |
|
|
193
|
-
| **ManagedAgentScanner** | AI/LLM | Claude Managed Agents misconfigurations — `always_allow` permission policies, unrestricted networking, bash without human confirmation, MCP servers over HTTP, hardcoded vault tokens, unpinned environment packages (ASI-03, ASI-04, ASI-05, ASI-07) |
|
|
194
|
-
| **HermesSecurityAgent** | AI/LLM | Hermes Agent deployments — tool registry poisoning, function-call injection (`<tool_call>` / `<function_calls>`), goal/plan hijacking, memory layer attacks, skill permission drift, sub-agent trust boundary violations, manifest attestation (ASI-01–ASI-10) |
|
|
195
|
-
| **AgentAttestationAgent** | Supply Chain | Agent manifest supply chain — unpinned versions (`latest`, `^`, `~`), missing integrity hashes on remote tool sources, unsigned manifests, `skipIntegrityCheck` bypass, dynamic `require()` of manifests from env vars, missing provenance fields (ASI-10, SLSA Level 0) |
|
|
196
|
-
| **AgenticSupplyChainAgent** *(new)* | Supply Chain | AI integration supply chain — over-privileged AI CI actions (Vercel/GitHub/Netlify), OAuth scope creep in AI platform integrations, unsigned AI webhook receivers (missing HMAC), MCP/Hermes cross-boundary token forwarding to third-party servers (ASI-02, ASI-06, ASI-09, CICD-SEC-8) |
|
|
197
|
-
|
|
198
|
-
**Post-processors:** ScoringEngine (8-category weighted scoring with OWASP Agentic AI Top 10 enrichment), VerifierAgent (secrets liveness verification), DeepAnalyzer (LLM-powered taint analysis)
|
|
199
|
-
|
|
200
|
-
---
|
|
201
|
-
|
|
202
|
-
## All Commands
|
|
203
|
-
|
|
204
|
-
### Core Audit Commands
|
|
205
|
-
|
|
206
|
-
```bash
|
|
207
|
-
# Full audit with remediation plan + HTML report
|
|
36
|
+
# Full audit: secrets + 23 agents + deps + remediation plan
|
|
208
37
|
npx ship-safe audit .
|
|
209
38
|
|
|
210
|
-
#
|
|
211
|
-
npx ship-safe red-team .
|
|
212
|
-
npx ship-safe red-team . --agents injection,auth # Run specific agents
|
|
213
|
-
npx ship-safe red-team . --html report.html # HTML report
|
|
214
|
-
npx ship-safe red-team . --json # JSON output
|
|
215
|
-
|
|
216
|
-
# Secret scanner (pattern matching + entropy)
|
|
217
|
-
npx ship-safe scan .
|
|
218
|
-
npx ship-safe scan . --json # JSON for CI
|
|
219
|
-
npx ship-safe scan . --sarif # SARIF for GitHub
|
|
220
|
-
|
|
221
|
-
# Security health score (0-100, A-F)
|
|
222
|
-
npx ship-safe score .
|
|
223
|
-
|
|
224
|
-
# Dependency CVE audit
|
|
225
|
-
npx ship-safe deps .
|
|
226
|
-
npx ship-safe deps . --fix # Auto-fix vulnerabilities
|
|
227
|
-
```
|
|
228
|
-
|
|
229
|
-
### AI-Powered Commands
|
|
230
|
-
|
|
231
|
-
```bash
|
|
232
|
-
# AI audit: scan + classify with Claude + auto-fix secrets
|
|
39
|
+
# Interactive fix agent: plan → diff → accept → verify
|
|
233
40
|
npx ship-safe agent .
|
|
41
|
+
npx ship-safe agent . --severity critical # critical findings only
|
|
42
|
+
npx ship-safe agent . --branch --pr # fix on a branch + open a PR
|
|
234
43
|
|
|
235
|
-
#
|
|
236
|
-
npx ship-safe
|
|
237
|
-
npx ship-safe remediate . --all # Also fix agent findings (TLS, debug, XSS, etc.)
|
|
238
|
-
|
|
239
|
-
# Revoke exposed keys — opens provider dashboards
|
|
240
|
-
npx ship-safe rotate .
|
|
241
|
-
```
|
|
242
|
-
|
|
243
|
-
### Baseline Management
|
|
244
|
-
|
|
245
|
-
```bash
|
|
246
|
-
# Accept current findings as baseline
|
|
247
|
-
npx ship-safe baseline .
|
|
248
|
-
|
|
249
|
-
# Audit showing only new findings since baseline
|
|
250
|
-
npx ship-safe audit . --baseline
|
|
44
|
+
# Undo the last fix
|
|
45
|
+
npx ship-safe undo
|
|
251
46
|
|
|
252
|
-
#
|
|
253
|
-
npx ship-safe
|
|
254
|
-
|
|
255
|
-
# Remove baseline
|
|
256
|
-
npx ship-safe baseline --clear
|
|
257
|
-
```
|
|
258
|
-
|
|
259
|
-
### Diff Scanning
|
|
260
|
-
|
|
261
|
-
```bash
|
|
262
|
-
# Scan only changed files (fast pre-commit & PR scanning)
|
|
263
|
-
npx ship-safe diff # All uncommitted changes
|
|
264
|
-
npx ship-safe diff --staged # Only staged changes
|
|
265
|
-
npx ship-safe diff HEAD~3 # Changes in last 3 commits
|
|
266
|
-
npx ship-safe diff --json # JSON output
|
|
267
|
-
```
|
|
268
|
-
|
|
269
|
-
### Vibe Check & Benchmark
|
|
270
|
-
|
|
271
|
-
```bash
|
|
272
|
-
# Fun emoji security grade
|
|
273
|
-
npx ship-safe vibe-check .
|
|
274
|
-
npx ship-safe vibe-check . --badge # Generate shields.io README badge
|
|
275
|
-
|
|
276
|
-
# Compare your score against industry averages (OWASP, Synopsys, Snyk)
|
|
277
|
-
npx ship-safe benchmark .
|
|
278
|
-
npx ship-safe benchmark . --json # JSON output
|
|
279
|
-
```
|
|
280
|
-
|
|
281
|
-
### CI/CD Pipeline
|
|
282
|
-
|
|
283
|
-
```bash
|
|
284
|
-
# CI mode — compact output, exit codes, threshold gating
|
|
285
|
-
npx ship-safe ci .
|
|
286
|
-
npx ship-safe ci . --threshold 80 # Custom passing score
|
|
287
|
-
npx ship-safe ci . --fail-on critical # Fail on severity
|
|
288
|
-
npx ship-safe ci . --sarif out.sarif # SARIF for GitHub
|
|
289
|
-
npx ship-safe ci . --github-pr # Post results as PR comment
|
|
290
|
-
```
|
|
291
|
-
|
|
292
|
-
### Deep Analysis & Verification
|
|
293
|
-
|
|
294
|
-
```bash
|
|
295
|
-
# LLM-powered deep analysis (Anthropic/OpenAI/Google/Ollama)
|
|
296
|
-
npx ship-safe audit . --deep
|
|
297
|
-
npx ship-safe audit . --deep --local # Use local Ollama
|
|
298
|
-
npx ship-safe audit . --deep --budget 50 # Cap spend at 50 cents
|
|
299
|
-
|
|
300
|
-
# Use any OpenAI-compatible provider for deep analysis
|
|
301
|
-
npx ship-safe audit . --deep --provider groq
|
|
302
|
-
npx ship-safe audit . --deep --provider together
|
|
303
|
-
npx ship-safe audit . --deep --provider mistral
|
|
304
|
-
npx ship-safe audit . --deep --provider deepseek
|
|
305
|
-
npx ship-safe audit . --deep --provider lmstudio # Local LM Studio
|
|
306
|
-
npx ship-safe audit . --deep --provider xai
|
|
307
|
-
npx ship-safe audit . --deep --provider perplexity
|
|
308
|
-
npx ship-safe audit . --deep --base-url http://localhost:1234/v1 --model my-model # Custom
|
|
309
|
-
|
|
310
|
-
# Check if leaked secrets are still active
|
|
311
|
-
npx ship-safe audit . --verify
|
|
312
|
-
```
|
|
313
|
-
|
|
314
|
-
### Diagnostics
|
|
315
|
-
|
|
316
|
-
```bash
|
|
317
|
-
# Environment check — Node.js, git, npm, API keys, cache, version
|
|
318
|
-
npx ship-safe doctor
|
|
319
|
-
```
|
|
320
|
-
|
|
321
|
-
### Agent Security
|
|
322
|
-
|
|
323
|
-
```bash
|
|
324
|
-
# Focused OpenClaw security scan
|
|
325
|
-
npx ship-safe openclaw .
|
|
326
|
-
|
|
327
|
-
# Auto-harden OpenClaw configs (0.0.0.0->127.0.0.1, add auth, ws->wss)
|
|
328
|
-
npx ship-safe openclaw . --fix
|
|
329
|
-
|
|
330
|
-
# Red team: simulate ClawJacked, prompt injection, data exfil attacks
|
|
331
|
-
npx ship-safe openclaw . --red-team
|
|
332
|
-
|
|
333
|
-
# CI preflight — exit non-zero on critical findings
|
|
334
|
-
npx ship-safe openclaw . --preflight
|
|
335
|
-
|
|
336
|
-
# Scan a skill before installing it
|
|
337
|
-
npx ship-safe scan-skill https://clawhub.io/skills/some-skill
|
|
338
|
-
npx ship-safe scan-skill ./local-skill.json
|
|
339
|
-
npx ship-safe scan-skill --all # Scan all skills from openclaw.json
|
|
340
|
-
|
|
341
|
-
# Scan an MCP server's tool manifest before connecting
|
|
342
|
-
npx ship-safe scan-mcp https://your-mcp-server/
|
|
343
|
-
npx ship-safe scan-mcp ./local-manifest.json
|
|
344
|
-
npx ship-safe scan-mcp https://your-mcp-server/ --json
|
|
345
|
-
|
|
346
|
-
# Legal risk audit — DMCA, leaked-source derivatives (openclaude, claw-code-js), IP disputes
|
|
347
|
-
npx ship-safe legal .
|
|
348
|
-
|
|
349
|
-
# Generate hardened OpenClaw config
|
|
350
|
-
npx ship-safe init --openclaw
|
|
351
|
-
|
|
352
|
-
# Generate Agent Bill of Materials (CycloneDX 1.5)
|
|
353
|
-
npx ship-safe abom .
|
|
354
|
-
```
|
|
355
|
-
|
|
356
|
-
#### openclaude and claw-code
|
|
357
|
-
|
|
358
|
-
Ship Safe detects security issues in both major Claude Code forks from the March 2026 source leak.
|
|
359
|
-
|
|
360
|
-
**openclaude** (`@gitlawb/openclaude`) is a CLI tool that routes Claude Code's toolset through any OpenAI-compatible provider. Its only persistent file artifact is `.openclaude-profile.json`. Ship Safe flags:
|
|
361
|
-
- `OPENAI_BASE_URL` using `http://` for non-localhost endpoints (unencrypted LLM traffic)
|
|
362
|
-
- The profile file present in a project not covered by `.gitignore` (API key exposure risk)
|
|
363
|
-
|
|
364
|
-
**claw-code** (`ultraworkers/claw-code`) is a clean-room Rust + Python rewrite of Claude Code's agent harness. Its config lives in `.claw.json`, `.claw/settings.json`, and `.claw/settings.local.json`. Ship Safe flags:
|
|
365
|
-
- `permissionMode: danger-full-access` or `dangerouslySkipPermissions: true` (no confirmation on any tool call)
|
|
366
|
-
- `sandbox.enabled: false` (filesystem isolation removed)
|
|
367
|
-
- Hook commands containing shell execution or remote download patterns
|
|
368
|
-
- MCP server connections over `ws://` or `http://` to non-localhost hosts
|
|
369
|
-
|
|
370
|
-
### Hermes Agent Integration
|
|
371
|
-
|
|
372
|
-
Ship Safe is a first-class Hermes Agent citizen. Register Ship Safe tools directly in your Hermes tool registry:
|
|
373
|
-
|
|
374
|
-
```js
|
|
375
|
-
import { registerWithHermes, verifyIntegrity } from 'ship-safe';
|
|
376
|
-
|
|
377
|
-
// Register all 5 Ship Safe tools with integrity verification
|
|
378
|
-
await registerWithHermes(toolRegistry);
|
|
379
|
-
```
|
|
380
|
-
|
|
381
|
-
Or use the bundled skill in your Hermes agent:
|
|
382
|
-
|
|
383
|
-
```yaml
|
|
384
|
-
# In your Hermes agent manifest
|
|
385
|
-
skills:
|
|
386
|
-
- ./node_modules/ship-safe/skills/ship-safe-security.md
|
|
387
|
-
```
|
|
388
|
-
|
|
389
|
-
Available tools: `ship_safe_audit`, `ship_safe_scan_mcp`, `ship_safe_get_findings`, `ship_safe_suppress_finding`, `ship_safe_memory_list`.
|
|
390
|
-
|
|
391
|
-
### Threat Intelligence
|
|
392
|
-
|
|
393
|
-
```bash
|
|
394
|
-
# Update threat intel feed (ClawHavoc IOCs, malicious skills, config signatures)
|
|
395
|
-
npx ship-safe update-intel
|
|
396
|
-
|
|
397
|
-
# Ships with offline-first seed data — no internet required for scanning
|
|
398
|
-
```
|
|
399
|
-
|
|
400
|
-
### OpenClaw GitHub Action
|
|
401
|
-
|
|
402
|
-
Drop-in CI action that blocks PRs introducing agent config vulnerabilities:
|
|
403
|
-
|
|
404
|
-
```yaml
|
|
405
|
-
# .github/workflows/openclaw-security.yml
|
|
406
|
-
name: OpenClaw Security Check
|
|
407
|
-
|
|
408
|
-
on: [pull_request]
|
|
409
|
-
|
|
410
|
-
permissions:
|
|
411
|
-
contents: read
|
|
412
|
-
|
|
413
|
-
jobs:
|
|
414
|
-
openclaw:
|
|
415
|
-
runs-on: ubuntu-latest
|
|
416
|
-
steps:
|
|
417
|
-
- uses: actions/checkout@v4
|
|
418
|
-
|
|
419
|
-
- uses: asamassekou10/ship-safe/.github/actions/openclaw-check@main
|
|
420
|
-
with:
|
|
421
|
-
fail-on-critical: 'true'
|
|
422
|
-
```
|
|
423
|
-
|
|
424
|
-
**Inputs:**
|
|
425
|
-
|
|
426
|
-
| Input | Default | Description |
|
|
427
|
-
|-------|---------|-------------|
|
|
428
|
-
| `path` | `.` | Path to scan |
|
|
429
|
-
| `fail-on-critical` | `true` | Fail the check if critical findings are found |
|
|
430
|
-
| `node-version` | `20` | Node.js version to use |
|
|
431
|
-
|
|
432
|
-
**Outputs:**
|
|
433
|
-
|
|
434
|
-
| Output | Description |
|
|
435
|
-
|--------|-------------|
|
|
436
|
-
| `findings` | Total number of findings detected |
|
|
437
|
-
| `critical` | Number of critical findings |
|
|
438
|
-
|
|
439
|
-
Scans `openclaw.json`, `.cursorrules`, `CLAUDE.md`, Claude Code hooks, and MCP configs. Checks against the bundled threat intelligence database for known ClawHavoc IOCs.
|
|
440
|
-
|
|
441
|
-
### Live Advisory Feed
|
|
442
|
-
|
|
443
|
-
```bash
|
|
444
|
-
# Query OSV.dev for actively exploited CVEs across all package ecosystems
|
|
445
|
-
npx ship-safe advisories .
|
|
446
|
-
npx ship-safe advisories . --json # JSON output for CI
|
|
447
|
-
```
|
|
448
|
-
|
|
449
|
-
No API key required. Malware advisories (MAL-*) are sorted to the top. Results include EPSS exploit probability and remediation guidance.
|
|
450
|
-
|
|
451
|
-
### Defensive Hooks
|
|
452
|
-
|
|
453
|
-
```bash
|
|
454
|
-
# Install Claude Code defensive hooks (blocks curl|bash, exfil domains, rm -rf /)
|
|
455
|
-
npx ship-safe guard --generate-hooks
|
|
456
|
-
|
|
457
|
-
# Watch agent config files for drift (.cursorrules, CLAUDE.md, openclaw.json)
|
|
458
|
-
npx ship-safe watch . --configs
|
|
47
|
+
# CI/CD mode
|
|
48
|
+
npx ship-safe ci . --threshold 80 --sarif results.sarif
|
|
459
49
|
```
|
|
460
50
|
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
```bash
|
|
464
|
-
# Lightweight file watcher — re-scans changed files on save
|
|
465
|
-
npx ship-safe watch .
|
|
466
|
-
|
|
467
|
-
# Deep watch — full 23-agent orchestrator on every change
|
|
468
|
-
npx ship-safe watch . --deep
|
|
469
|
-
npx ship-safe watch . --deep --threshold 80 # Fail if score drops below threshold
|
|
470
|
-
npx ship-safe watch . --deep --debounce 2000 # Custom debounce in ms (default: 1000)
|
|
471
|
-
npx ship-safe watch . --status # Show last deep-watch results from .ship-safe/watch.json
|
|
472
|
-
|
|
473
|
-
# Generate CycloneDX SBOM
|
|
474
|
-
npx ship-safe sbom .
|
|
475
|
-
|
|
476
|
-
# Policy-as-code (enforce minimum score, fail on severity)
|
|
477
|
-
npx ship-safe policy init
|
|
478
|
-
|
|
479
|
-
# Block git push if secrets found
|
|
480
|
-
npx ship-safe guard
|
|
481
|
-
|
|
482
|
-
# Initialize security configs (.gitignore, headers)
|
|
483
|
-
npx ship-safe init
|
|
51
|
+
No signup. No API key required for scanning. Works offline.
|
|
484
52
|
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
# MCP server for AI editors (Claude Desktop, Cursor, etc.)
|
|
489
|
-
npx ship-safe mcp
|
|
490
|
-
```
|
|
53
|
+
<p align="center">
|
|
54
|
+
<img src=".github/assets/demo-agent.gif" alt="Ship Safe agent demo" width="800" />
|
|
55
|
+
</p>
|
|
491
56
|
|
|
492
57
|
---
|
|
493
58
|
|
|
494
|
-
##
|
|
495
|
-
|
|
496
|
-
Install ship-safe as real-time Claude Code hooks — secrets are blocked **before** they ever touch disk:
|
|
497
|
-
|
|
498
|
-
```bash
|
|
499
|
-
npx ship-safe hooks install
|
|
500
|
-
```
|
|
501
|
-
|
|
502
|
-
Once installed, two hooks activate automatically on every Claude Code session:
|
|
59
|
+
## 23 Security Agents
|
|
503
60
|
|
|
504
|
-
|
|
505
|
-
|------|---------|-----------|
|
|
506
|
-
| **PreToolUse** | Write / Edit / MultiEdit / Bash | Blocks the write if critical secrets are detected; blocks dangerous Bash patterns (curl\|bash, credential exfiltration, `rm -rf /`) |
|
|
507
|
-
| **PostToolUse** | Write / Edit / MultiEdit | Scans the saved file and injects advisory findings (high-severity patterns, DB URLs with credentials) directly into Claude's context — never blocks |
|
|
61
|
+
All agents run in parallel. Each skips irrelevant projects automatically.
|
|
508
62
|
|
|
509
|
-
|
|
63
|
+
| Agent | Category | What It Detects |
|
|
64
|
+
|-------|----------|-----------------|
|
|
65
|
+
| **InjectionTester** | Code Vulns | SQL/NoSQL injection, command injection, XSS, path traversal, XXE, ReDoS, prototype pollution |
|
|
66
|
+
| **AuthBypassAgent** | Auth | JWT flaws (alg:none, weak secrets), CSRF, OAuth misconfig, BOLA/IDOR, TLS bypass |
|
|
67
|
+
| **SSRFProber** | SSRF | User input in fetch/axios, cloud metadata endpoints, internal IPs |
|
|
68
|
+
| **SupplyChainAudit** | Supply Chain | Typosquatting, wildcard versions, suspicious install scripts, dependency confusion |
|
|
69
|
+
| **ConfigAuditor** | Config | Docker (root user, :latest), Terraform, Kubernetes, CORS, CSP, Firebase, Nginx |
|
|
70
|
+
| **SupabaseRLSAgent** | Auth | service_role key in client code, tables without RLS, anon key inserts |
|
|
71
|
+
| **LLMRedTeam** | AI/LLM | OWASP LLM Top 10: prompt injection, excessive agency, system prompt leakage |
|
|
72
|
+
| **MCPSecurityAgent** | AI/LLM | MCP server misuse, tool poisoning, typosquatting, unvalidated inputs |
|
|
73
|
+
| **AgenticSecurityAgent** | AI/LLM | OWASP Agentic AI Top 10: agent hijacking, privilege escalation |
|
|
74
|
+
| **RAGSecurityAgent** | AI/LLM | Context injection, document poisoning, vector DB access control |
|
|
75
|
+
| **MemoryPoisoningAgent** | AI/LLM | Instruction injection in agent memory files, hidden Unicode payloads (ASI-01, ASI-05) |
|
|
76
|
+
| **PIIComplianceAgent** | Compliance | SSNs, credit cards, emails, phone numbers in source code |
|
|
77
|
+
| **VibeCodingAgent** | Code Vulns | AI-generated code anti-patterns: no validation, empty catches, TODO-auth |
|
|
78
|
+
| **ExceptionHandlerAgent** | Code Vulns | Empty catches, unhandled rejections, leaked stack traces (OWASP A10:2025) |
|
|
79
|
+
| **AgentConfigScanner** | AI/LLM | Prompt injection in .cursorrules, CLAUDE.md, malicious Claude Code hooks |
|
|
80
|
+
| **MobileScanner** | Mobile | OWASP Mobile Top 10 2024: insecure storage, WebView injection, debug mode |
|
|
81
|
+
| **GitHistoryScanner** | Secrets | Leaked secrets in git commit history |
|
|
82
|
+
| **CICDScanner** | CI/CD | Pipeline poisoning, unpinned actions, secret logging (OWASP CI/CD Top 10) |
|
|
83
|
+
| **APIFuzzer** | API | Routes without auth, mass assignment, GraphQL introspection, debug endpoints |
|
|
84
|
+
| **ManagedAgentScanner** | AI/LLM | Claude Managed Agent misconfigs: always_allow policies, unrestricted networking (ASI-03–ASI-07) |
|
|
85
|
+
| **HermesSecurityAgent** | AI/LLM | Tool registry poisoning, function-call injection, skill permission drift (ASI-01–ASI-10) |
|
|
86
|
+
| **AgentAttestationAgent** | Supply Chain | Unpinned agent versions, missing integrity hashes, unsigned manifests (ASI-10, SLSA L0) |
|
|
87
|
+
| **AgenticSupplyChainAgent** | Supply Chain | Over-privileged AI CI actions, OAuth scope creep, unsigned AI webhook receivers (ASI-02, ASI-06) |
|
|
510
88
|
|
|
511
|
-
|
|
512
|
-
npx ship-safe hooks status # Check installation
|
|
513
|
-
npx ship-safe hooks remove # Uninstall
|
|
514
|
-
```
|
|
89
|
+
**Post-processors:** ScoringEngine · VerifierAgent (secrets liveness) · DeepAnalyzer (LLM taint analysis)
|
|
515
90
|
|
|
516
91
|
---
|
|
517
92
|
|
|
518
|
-
##
|
|
93
|
+
## The REPL
|
|
519
94
|
|
|
520
|
-
Use Ship Safe directly inside Claude Code — no CLI needed:
|
|
521
|
-
|
|
522
|
-
```bash
|
|
523
|
-
claude plugin add github:asamassekou10/ship-safe
|
|
524
95
|
```
|
|
96
|
+
$ ship-safe
|
|
525
97
|
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
| `/ship-safe` | Full security audit — 23 agents, remediation plan, auto-fix |
|
|
529
|
-
| `/ship-safe-scan` | Quick scan for leaked secrets |
|
|
530
|
-
| `/ship-safe-score` | Security health score (0-100) |
|
|
531
|
-
| `/ship-safe-deep` | LLM-powered deep taint analysis |
|
|
532
|
-
| `/ship-safe-ci` | CI/CD pipeline setup guide |
|
|
533
|
-
| `/ship-safe-hooks` | Install real-time Claude Code hooks (blocks secrets on write) |
|
|
534
|
-
| `/ship-safe-baseline` | Accept current findings as baseline; report only regressions |
|
|
535
|
-
| `/ship-safe-fix` | Auto-fix secrets and common vulnerabilities |
|
|
536
|
-
| `/ship-safe-red-team` | Run full red-team audit and open HTML report |
|
|
537
|
-
|
|
538
|
-
Claude interprets the results, explains findings in plain language, and can fix issues directly in your codebase.
|
|
539
|
-
|
|
540
|
-
---
|
|
98
|
+
███████╗██╗ ██╗██╗██████╗ ███████╗ █████╗ ███████╗███████╗
|
|
99
|
+
...
|
|
541
100
|
|
|
542
|
-
|
|
101
|
+
v9.2.1 · DeepSeek · ~/my-project
|
|
543
102
|
|
|
544
|
-
|
|
103
|
+
/scan to find issues · /agent to fix them · /help for more
|
|
545
104
|
|
|
105
|
+
shipsafe ›
|
|
546
106
|
```
|
|
547
|
-
✔ [Phase 1/4] Secrets: 41 found (0 changed, 313 cached)
|
|
548
|
-
```
|
|
549
|
-
|
|
550
|
-
- **~40% faster** on repeated scans
|
|
551
|
-
- **Auto-invalidation** — cache expires after 24 hours or when ship-safe updates
|
|
552
|
-
- **`--no-cache`** — force a full rescan anytime
|
|
553
|
-
|
|
554
|
-
The cache is stored in `.ship-safe/` which is automatically excluded from scans.
|
|
555
|
-
|
|
556
|
-
### LLM Response Caching
|
|
557
|
-
|
|
558
|
-
When using AI classification (`--no-ai` to disable), results are cached in `.ship-safe/llm-cache.json` with a 7-day TTL. Repeated scans reuse cached classifications — reducing API costs significantly.
|
|
559
|
-
|
|
560
|
-
---
|
|
561
|
-
|
|
562
|
-
## Smart `.gitignore` Handling
|
|
563
|
-
|
|
564
|
-
Ship Safe respects your `.gitignore` for build output, caches, and vendor directories — but **always scans security-sensitive files** even if gitignored:
|
|
565
|
-
|
|
566
|
-
| Skipped (gitignore respected) | Always scanned (gitignore overridden) |
|
|
567
|
-
|-------------------------------|---------------------------------------|
|
|
568
|
-
| `node_modules/`, `dist/`, `build/` | `.env`, `.env.local`, `.env.production` |
|
|
569
|
-
| `*.log`, `*.pkl`, vendor dirs | `*.pem`, `*.key`, `*.p12` |
|
|
570
|
-
| Cache directories, IDE files | `credentials.json`, `*.secret` |
|
|
571
|
-
|
|
572
|
-
Why? Files like `.env` are gitignored *because* they contain secrets — which is exactly what a security scanner should catch.
|
|
573
|
-
|
|
574
|
-
---
|
|
575
|
-
|
|
576
|
-
## Multi-LLM Support
|
|
577
|
-
|
|
578
|
-
Ship Safe supports any AI provider for deep analysis and classification:
|
|
579
|
-
|
|
580
|
-
| Provider | Env Variable | Flag | Default Model |
|
|
581
|
-
|----------|-------------|------|---------------|
|
|
582
|
-
| **Anthropic** | `ANTHROPIC_API_KEY` | *(auto-detected)* | claude-haiku-4-5 |
|
|
583
|
-
| **OpenAI** | `OPENAI_API_KEY` | *(auto-detected)* | gpt-4o-mini |
|
|
584
|
-
| **Google** | `GOOGLE_AI_API_KEY` | *(auto-detected)* | gemini-2.0-flash |
|
|
585
|
-
| **Gemma 4 (Ollama)** | *(none)* | `--provider gemma4` | gemma4:e4b (256K ctx) |
|
|
586
|
-
| **Ollama** | `OLLAMA_HOST` | `--local` | gemma4:e4b |
|
|
587
|
-
| **Groq** | `GROQ_API_KEY` | `--provider groq` | llama-3.3-70b-versatile |
|
|
588
|
-
| **Together AI** | `TOGETHER_API_KEY` | `--provider together` | meta-llama/Llama-3-70b-chat-hf |
|
|
589
|
-
| **Mistral** | `MISTRAL_API_KEY` | `--provider mistral` | mistral-small-latest |
|
|
590
|
-
| **DeepSeek** | `DEEPSEEK_API_KEY` | `--provider deepseek` | deepseek-chat |
|
|
591
|
-
| **xAI (Grok)** | `XAI_API_KEY` | `--provider xai` | grok-beta |
|
|
592
|
-
| **Perplexity** | `PERPLEXITY_API_KEY` | `--provider perplexity` | llama-3.1-sonar-small-128k-online |
|
|
593
|
-
| **LM Studio** | *(none)* | `--provider lmstudio` | Local server |
|
|
594
|
-
| **Custom** | *(any)* | `--base-url <url> --model <model>` | Any OpenAI-compatible |
|
|
595
|
-
|
|
596
|
-
Auto-detected from environment variables. Use `--provider <name>` to override. No API key required for scanning — AI is optional.
|
|
597
|
-
|
|
598
|
-
---
|
|
599
|
-
|
|
600
|
-
## Scoring System
|
|
601
|
-
|
|
602
|
-
Starts at 100. Each finding deducts points by severity and category, weighted by confidence level (high: 100%, medium: 60%, low: 30%) to reduce noise from heuristic patterns.
|
|
603
107
|
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
|
607
|
-
|
|
608
|
-
|
|
|
609
|
-
|
|
|
610
|
-
|
|
|
611
|
-
|
|
|
612
|
-
|
|
|
613
|
-
|
|
|
614
|
-
|
|
|
615
|
-
| AI/LLM Security | 12% | -15 | -8 | -3 | -12 |
|
|
616
|
-
|
|
617
|
-
*Weights aligned with OWASP Top 10 2025 risk rankings.*
|
|
618
|
-
|
|
619
|
-
**Grades:** A (90-100), B (75-89), C (60-74), D (40-59), F (0-39)
|
|
620
|
-
|
|
621
|
-
**Exit codes:** `0` for A/B (>= 75), `1` for C/D/F — use in CI to fail builds.
|
|
622
|
-
|
|
623
|
-
---
|
|
624
|
-
|
|
625
|
-
## Policy-as-Code
|
|
626
|
-
|
|
627
|
-
Create `.ship-safe.policy.json` to enforce team-wide security standards:
|
|
628
|
-
|
|
629
|
-
```bash
|
|
630
|
-
npx ship-safe policy init
|
|
631
|
-
```
|
|
108
|
+
| Command | What it does |
|
|
109
|
+
|---------|-------------|
|
|
110
|
+
| `/scan` | Re-scan the project |
|
|
111
|
+
| `/agent` | Run the interactive fix loop |
|
|
112
|
+
| `/findings` | List findings from the last scan |
|
|
113
|
+
| `/show <n>` | Full detail on finding n |
|
|
114
|
+
| `/plan <n>` | Preview fix plan for finding n (no writes) |
|
|
115
|
+
| `/undo [--all]` | Revert the last fix (or all fixes) |
|
|
116
|
+
| `/diff` | Show git working-tree diff |
|
|
117
|
+
| `/provider <name>` | Switch LLM provider mid-session |
|
|
118
|
+
| `/quit` | Exit (also `Ctrl-D` or `Ctrl-C`) |
|
|
632
119
|
|
|
633
|
-
|
|
634
|
-
{
|
|
635
|
-
"minimumScore": 70,
|
|
636
|
-
"failOn": "critical",
|
|
637
|
-
"requiredScans": ["secrets", "injection", "deps", "auth"],
|
|
638
|
-
"ignoreRules": [],
|
|
639
|
-
"customSeverityOverrides": {},
|
|
640
|
-
"maxAge": { "criticalCVE": "7d", "highCVE": "30d", "mediumCVE": "90d" }
|
|
641
|
-
}
|
|
642
|
-
```
|
|
120
|
+
Anything not starting with `/` is sent to the LLM as a free-form question, with your latest scan results as context.
|
|
643
121
|
|
|
644
122
|
---
|
|
645
123
|
|
|
646
|
-
## CI/CD
|
|
647
|
-
|
|
648
|
-
The dedicated `ci` command is optimized for pipelines — compact output, exit codes, threshold-based gating:
|
|
649
|
-
|
|
650
|
-
```bash
|
|
651
|
-
# Basic CI — fail if score < 75
|
|
652
|
-
npx ship-safe ci .
|
|
653
|
-
|
|
654
|
-
# Strict — fail on any critical finding
|
|
655
|
-
npx ship-safe ci . --fail-on critical
|
|
656
|
-
|
|
657
|
-
# Custom threshold + SARIF for GitHub Security tab
|
|
658
|
-
npx ship-safe ci . --threshold 80 --sarif results.sarif
|
|
659
|
-
|
|
660
|
-
# Only check new findings (not in baseline)
|
|
661
|
-
npx ship-safe ci . --baseline
|
|
662
|
-
```
|
|
663
|
-
|
|
664
|
-
**GitHub Actions example:**
|
|
124
|
+
## CI/CD
|
|
665
125
|
|
|
666
126
|
```yaml
|
|
667
127
|
# .github/workflows/security.yml
|
|
668
128
|
name: Security Audit
|
|
669
|
-
|
|
670
129
|
on: [push, pull_request]
|
|
671
|
-
|
|
672
130
|
jobs:
|
|
673
131
|
security:
|
|
674
132
|
runs-on: ubuntu-latest
|
|
675
133
|
steps:
|
|
676
134
|
- uses: actions/checkout@v4
|
|
677
|
-
|
|
678
135
|
- name: Security gate
|
|
679
|
-
run: npx ship-safe ci . --threshold 75 --sarif results.sarif
|
|
680
|
-
|
|
136
|
+
run: npx ship-safe ci . --threshold 75 --sarif results.sarif
|
|
681
137
|
- uses: github/codeql-action/upload-sarif@v3
|
|
682
138
|
if: always()
|
|
683
139
|
with:
|
|
684
140
|
sarif_file: results.sarif
|
|
685
141
|
```
|
|
686
142
|
|
|
687
|
-
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
## LLM Support
|
|
146
|
+
|
|
147
|
+
Works with any provider — auto-detected from environment variables. Use `--provider <name>` to override.
|
|
148
|
+
|
|
149
|
+
Anthropic · OpenAI · Google · DeepSeek · Groq · Together · Mistral · xAI · Perplexity · Ollama · LM Studio · any OpenAI-compatible endpoint
|
|
150
|
+
|
|
151
|
+
No API key required for scanning. AI is optional.
|
|
688
152
|
|
|
689
153
|
---
|
|
690
154
|
|
|
691
155
|
## Suppress False Positives
|
|
692
156
|
|
|
693
|
-
**Inline:** Add `# ship-safe-ignore` comment on a line:
|
|
694
157
|
```python
|
|
695
158
|
password = get_password() # ship-safe-ignore
|
|
696
159
|
```
|
|
697
160
|
|
|
698
|
-
**File-level:** Create `.ship-safeignore` (gitignore syntax):
|
|
699
161
|
```gitignore
|
|
700
|
-
#
|
|
162
|
+
# .ship-safeignore
|
|
701
163
|
tests/fixtures/
|
|
702
|
-
*.test.js
|
|
703
|
-
|
|
704
|
-
# Exclude documentation with code examples
|
|
705
164
|
docs/
|
|
706
165
|
```
|
|
707
166
|
|
|
708
167
|
---
|
|
709
168
|
|
|
710
|
-
##
|
|
711
|
-
|
|
712
|
-
| Standard | Coverage |
|
|
713
|
-
|----------|----------|
|
|
714
|
-
| **OWASP Top 10 Web 2025** | A01-A10: Broken Access Control, Cryptographic Failures, Injection, Insecure Design, Security Misconfiguration, Vulnerable Components, Auth Failures, Data Integrity, Logging Failures, SSRF |
|
|
715
|
-
| **OWASP Top 10 Mobile 2024** | M1-M10: Improper Credential Usage, Inadequate Supply Chain, Insecure Auth, Insufficient Validation, Insecure Communication, Inadequate Privacy, Binary Protections, Security Misconfiguration, Insecure Data Storage, Insufficient Cryptography |
|
|
716
|
-
| **OWASP LLM Top 10 2025** | LLM01-LLM10: Prompt Injection, Sensitive Info Disclosure, Supply Chain, Data Poisoning, Improper Output Handling, Excessive Agency, System Prompt Leakage, Vector/Embedding Weaknesses, Misinformation, Unbounded Consumption |
|
|
717
|
-
| **OWASP CI/CD Top 10** | CICD-SEC-1 to 10: Insufficient Flow Control, Identity Management, Dependency Chain Abuse, Poisoned Pipeline Execution, Insufficient PBAC, Credential Hygiene, Insecure System Config, Ungoverned Usage, Improper Artifact Integrity, Insufficient Logging |
|
|
718
|
-
| **OWASP Agentic AI Top 10** | ASI-01–ASI-10: Goal Hijacking, Excessive Agency, Unsafe Tool Use, Unvalidated Actions, Untrusted Tools, Memory Poisoning, Lack of Oversight, Logging Gaps, Supply Chain Attacks, Cascading Failures |
|
|
719
|
-
|
|
720
|
-
---
|
|
721
|
-
|
|
722
|
-
## What's Inside
|
|
723
|
-
|
|
724
|
-
### [`/configs`](./configs)
|
|
725
|
-
Drop-in security configs for Next.js, Supabase, and Firebase.
|
|
726
|
-
|
|
727
|
-
### [`/snippets`](./snippets)
|
|
728
|
-
Copy-paste security patterns: rate limiting, JWT, CORS, input validation.
|
|
729
|
-
|
|
730
|
-
### [`/ai-defense`](./ai-defense)
|
|
731
|
-
LLM security: prompt injection detection, cost protection, system prompt hardening.
|
|
732
|
-
|
|
733
|
-
### [`/checklists`](./checklists)
|
|
734
|
-
Manual security audits: launch-day checklist, framework-specific guides.
|
|
735
|
-
|
|
736
|
-
### [`/skills`](./skills)
|
|
737
|
-
Hermes Agent skill definitions. Install `skills/ship-safe-security.md` to give any Hermes agent native security scanning capabilities.
|
|
738
|
-
|
|
739
|
-
---
|
|
740
|
-
|
|
741
|
-
## Add a Security Badge to Your README
|
|
742
|
-
|
|
743
|
-
Show the world your project is secure. After running `npx ship-safe audit .` or `npx ship-safe vibe-check . --badge`, add one of these to your README:
|
|
169
|
+
## Add a Badge
|
|
744
170
|
|
|
745
171
|
```markdown
|
|
746
|
-
<!-- Replace GRADE and COLOR with your results -->
|
|
747
172
|
[](https://shipsafecli.com)
|
|
748
173
|
```
|
|
749
174
|
|
|
750
|
-
| Grade | Badge |
|
|
751
|
-
|-------|-------|
|
|
752
|
-
| A+ | `[](https://shipsafecli.com)` |
|
|
753
|
-
| A | `[](https://shipsafecli.com)` |
|
|
754
|
-
| B | `[](https://shipsafecli.com)` |
|
|
755
|
-
| C | `[](https://shipsafecli.com)` |
|
|
756
|
-
| D | `[](https://shipsafecli.com)` |
|
|
757
|
-
| F | `[](https://shipsafecli.com)` |
|
|
758
|
-
|
|
759
|
-
---
|
|
760
|
-
|
|
761
|
-
## Supply Chain Hardening
|
|
762
|
-
|
|
763
|
-
Ship Safe practices what it preaches. Our own supply chain is hardened against the [2026 Trivy/CanisterWorm attack chain](https://shipsafecli.com/blog/supply-chain-attacks-2026-how-we-hardened-ship-safe):
|
|
764
|
-
|
|
765
|
-
| Defense | What It Blocks |
|
|
766
|
-
|---------|---------------|
|
|
767
|
-
| All GitHub Actions pinned to full commit SHAs | Tag repointing (Trivy-style) |
|
|
768
|
-
| `permissions: contents: read` in CI | Excessive token scope |
|
|
769
|
-
| `npm ci --ignore-scripts` in all pipelines | CanisterWorm postinstall propagation |
|
|
770
|
-
| OIDC trusted publishing with provenance | Stolen npm token publishing |
|
|
771
|
-
| CODEOWNERS on `action.yml`, `.github/`, `package.json` | Unauthorized changes to critical paths |
|
|
772
|
-
| Strict `files` allowlist in package.json | Accidental inclusion of secrets/configs |
|
|
773
|
-
| Self-scanning with ship-safe in CI | Malicious code injection |
|
|
774
|
-
| 5 direct dependencies | Minimal transitive attack surface |
|
|
775
|
-
|
|
776
|
-
Verify provenance on any Ship Safe release:
|
|
777
|
-
|
|
778
|
-
```bash
|
|
779
|
-
npm audit signatures
|
|
780
|
-
```
|
|
781
|
-
|
|
782
175
|
---
|
|
783
176
|
|
|
784
177
|
## Contributing
|
|
785
178
|
|
|
786
|
-
1. Fork
|
|
787
|
-
2.
|
|
788
|
-
3. Include comments explaining *why* it matters
|
|
789
|
-
4. Open a PR
|
|
790
|
-
|
|
791
|
-
See [CONTRIBUTING.md](./CONTRIBUTING.md) for guidelines.
|
|
792
|
-
|
|
793
|
-
---
|
|
794
|
-
|
|
795
|
-
## Security Standards Reference
|
|
796
|
-
|
|
797
|
-
- [OWASP Top 10 Web 2025](https://owasp.org/Top10/)
|
|
798
|
-
- [OWASP Top 10 Mobile 2024](https://owasp.org/www-project-mobile-top-10/)
|
|
799
|
-
- [OWASP LLM Top 10 2025](https://genai.owasp.org/llm-top-10/)
|
|
800
|
-
- [OWASP API Security Top 10 2023](https://owasp.org/API-Security/)
|
|
801
|
-
- [OWASP CI/CD Top 10](https://owasp.org/www-project-top-10-ci-cd-security-risks/)
|
|
802
|
-
- [OWASP Agentic AI Top 10](https://owasp.org/www-project-agentic-ai-top-10/)
|
|
179
|
+
1. Fork · add your pattern, agent, or config · open a PR
|
|
180
|
+
2. See [CONTRIBUTING.md](./CONTRIBUTING.md)
|
|
803
181
|
|
|
804
182
|
---
|
|
805
183
|
|
|
806
184
|
## Sponsors
|
|
807
185
|
|
|
808
|
-
Ship Safe is MIT-licensed and free forever.
|
|
186
|
+
Ship Safe is MIT-licensed and free forever.
|
|
809
187
|
|
|
810
188
|
<p align="center">
|
|
811
189
|
<a href="https://github.com/sponsors/asamassekou10">
|
|
@@ -815,12 +193,6 @@ Ship Safe is MIT-licensed and free forever. If it saves you time or helps you sh
|
|
|
815
193
|
|
|
816
194
|
---
|
|
817
195
|
|
|
818
|
-
## License
|
|
819
|
-
|
|
820
|
-
MIT - Use it, share it, secure your stuff.
|
|
821
|
-
|
|
822
|
-
---
|
|
823
|
-
|
|
824
196
|
## Star History
|
|
825
197
|
|
|
826
198
|
[](https://star-history.com/#asamassekou10/ship-safe&Date)
|