Ship Safe CLI

A security scanner for AI-written code: secrets, dependencies, MCP and CI, findings investigated with evidence, and fixes you approve

  • 861 ★ on the repository
  • Last commit
  • MIT
CLI

Broad access

Why this level

  • Hooks are written to ~/.claude/settings.json and see every file write and Bash command in Claude Code
  • The fix agent changes project files, and with `--branch --pr` it creates a branch and opens a pull request
  • The AI modes pass code to a provider, and `--verify` sends found keys to their providers
All reasons and checks

asamassekou10/ship-safe

Install

In your terminal, with SkillFoxx CLI

npx skillfoxx add cli/ship-safe

Detects the agents on your machine, shows the access level and pins the version.

Other ways to install

Access and checks

How we review

Broad accessThe tool can change data, run commands or handle secrets.

  • Hooks are written to ~/.claude/settings.json and see every file write and Bash command in Claude Code
  • The fix agent changes project files, and with `--branch --pr` it creates a branch and opens a pull request
  • The AI modes pass code to a provider, and `--verify` sends found keys to their providers

This is third-party code. Review the repository files before installing.

What it does

Ship Safe is a command-line security scanner for projects where AI writes the code. It runs through npx with no signup or API key and checks secrets, dependencies, CI settings, prompts, MCP configs and application code. `npx ship-safe audit .` runs secret detection, 31 checking agents and dependencies and returns a remediation plan. The checks include SQL and NoSQL injection, XSS, SSRF, auth bypass, package spoofing, risky install scripts and poisoning of agent memory or MCP tools. The investigation layer `npx ship-safe investigate .` traces a value from the request entry to the dangerous spot in the code and sorts findings into confirmed, likely, unresolved and refuted, each with a chain of evidence lines. The `--verify` flag additionally tests found keys against their providers. The `trust` command shows what would run when an agent opens an unfamiliar folder, and `capabilities` reads MCP settings and permissions and names dangerous combinations, such as pre-granted write access and `git push`. Fixes come from the interactive agent `npx ship-safe agent .`: a plan, a diff, your approval and a rescan, and `undo` reverts the last change. In CI the `ci` command writes a SARIF report and fails on a severity threshold or a verdict. For Claude Code, Ship Safe installs as a plugin with nine skills or as hooks that block secret writes and dangerous Bash commands, and the MCP server `npx ship-safe mcp` gives Codex, Claude Desktop, Cursor and Windsurf six tools.

Who it is for. For developers and small teams that accept code from AI agents and want to check it locally and in CI, and for anyone who opens other people's repositories with an agent.

Good fit when

  • An agent wrote a lot of code and you must find secrets, vulnerabilities and risky dependencies before the pull request
  • CI needs a gate with a SARIF report and a threshold on severity or only on confirmed findings
  • You are about to open someone else's or a downloaded repository with an agent, and `trust` should show what runs on open
  • You need to know what an agent can reach in a project: `capabilities` reads permissions and MCP settings
  • Agent rule files (`.cursorrules`, `CLAUDE.md`) and MCP configs must be checked for prompt injection

Not a fit when

  • The machine runs Node.js 18 or 20: the 22 line from 22.13 and Node.js 24 or newer are supported
  • You need CodeQL-style deep data-flow analysis, Gitleaks-style specialist secret detection or a Trivy-style CVE database: the author advises running Ship Safe alongside them, not instead
  • Code must not be sent to an external provider: the AI modes pass it context, so run with `--no-ai`
  • You need scan history, a dashboard and PDF reports: those are paid Ship Safe Cloud plans and the repository has no code for them

Example request

Check the project before the pull request for secrets, vulnerabilities and risky MCP configs and show only confirmed findings with evidence

Limitations

  • The number of findings is not the number of defects. On mature projects (express, flask, requests, chalk) the tool returns 4 to 17 raw findings, and the author notes this is not a false-positive rate.
  • The AI modes (classification, deep analysis, red-team GPT-Red) send a bounded context to your chosen provider after best-effort key masking. The `--no-ai` flag guarantees a fully local run, and the core checks work without a network.
  • A `ship-safe-ignore` comment does not hide critical findings, and an attempt to hide them is recorded in the report.
  • The ordinary rules do not grade prose and code examples in Markdown, while secrets are searched everywhere. The `--include-doc-examples` flag includes examples.
  • The open repository is the CLI under the MIT license. Scan history, PR Guardian and team features belong to the paid Pro and Team plans in a private repository.

How to disable. The `npx ship-safe@latest hooks remove` command removes the hooks, and `hooks status` shows the state. Remove the plugin from Claude Code, delete the ship-safe entry from your client's mcpServers and drop the Ship Safe step from your CI workflow. Delete report and baseline files you created by hand.

FAQ

How do I check AI-written code for vulnerabilities before a pull request?

Run `npx ship-safe audit .` in the project root: it detects secrets, runs 31 checking agents and dependencies and builds a remediation plan. Then `npx ship-safe investigate .` separates confirmed findings from refuted ones and shows the evidence lines. The `--all` flag details unresolved and refuted ones.

Do I need an API key or an account for Ship Safe?

Not for scanning, and the core checks work without a network. The AI modes use a provider that Ship Safe detects from environment variables; the list includes Anthropic, OpenAI, Google, DeepSeek, Moonshot, Groq, Mistral, xAI, Ollama and LM Studio. Set one with the `--provider` flag.

How do I connect Ship Safe to Claude Code?

The plugin installs with `claude plugin add github:asamassekou10/ship-safe`, which adds skills like `/ship-safe`, `/ship-safe-scan` and `/ship-safe-fix`. The `/ship-safe-hooks` skill runs `npx ship-safe@latest hooks install` and writes PreToolUse and PostToolUse hooks into ~/.claude/settings.json: secret writes and dangerous Bash commands are blocked before they run.

How do I run Ship Safe in CI without old problems blocking work?

`npx ship-safe ci . --sarif results.sarif` writes a SARIF report, `--fail-on high` sets the threshold, and `--fail-on-verdict confirmed` fails the build only on confirmed findings. For old problems, take a baseline report on the trusted branch with `--write-baseline-report` and pass it to the pull request through `--base-report`: introduced, resolved and unchanged findings are then separated.

What does the --verify flag do?

In `investigate` mode the flag tests found keys against their providers, meaning it sends them requests with those keys. Without the flag keys are only found and investigated in code. Use it on projects and keys you are entitled to test.

Discussion

No questions or reviews yet.

CLI tools

AgentShield audits the .claude folder for plaintext keys, broad permissions, dangerous hooks and risky MCP servers and grades the setup from A to F

CLIExtended access1.3KRepository stars

A security scanner CLI for code and AI agents: vets .claude, hooks, MCP configs and SKILL.md before cloning and finds leaked keys

CLIExtended access1KRepository stars
Editors’ pick

A Snyk CLI that discovers installed MCP servers, skills and agents on your machine and checks them for prompt injections and malicious payloads

CLIExtended access3.2KRepository stars
Editors’ pick

Security scanner for agent skills and MCP servers: finds prompt injection, data exfiltration and supply chain risks before install

CLIExtended access21KRepository stars

A security scanner for agent skills: finds prompt injection, data exfiltration and malicious code before you install

CLIExtended access2.6KRepository stars

The safehouse command runs Claude Code, Codex and other agents in a macOS sandbox: files are closed by default and you open folders with flags

CLIExtended access2.1KRepository stars

Comparison with similar tools

Entries that share the main search query, and how they differ.

EntryOfficialRepository starsMain difference
Ship Safe (this entry)no861
MEDUSAno1,006a CLI scanner for code and AI agents that checks .claude, hooks, MCP configs and SKILL.md before cloning and finds leaked keys
Vibe Securityno1,142a skill for auditing vibe-coded apps: secrets, Supabase RLS, authorization, payments, rate limits
HOL Guardyes971checks an agent's commands, secret reads, MCP calls and package installs while it works and waits for your decision

README in short

The repository's front page opens with sample `investigate` output on the OWASP NodeGoat training app and the `npx ship-safe` command. Next come a quick start with audit, investigation, `trust`, `capabilities`, red-team, fix agent and CI commands, the JSON and SARIF report format, a table of check areas and a table of agents by category. It has GitHub Actions and GitLab workflow examples, a list of supported AI providers, false-positive suppression rules, noise measurements on four mature projects and a comparison with Semgrep, Gitleaks, Trivy and CodeQL. The end holds a roadmap and contribution rules.

README badge

Report a problem

Foxx AIShip Safe
Foxx AI

I am Foxx AI and I have already vetted this tool. Ask about install, setup or anything else, and I will keep it simple.