ShipGuard
README.md
<div align="center">
# ShipGuard
**Stop pushing leaked keys, AI-generated bugs, and unfinished slop to GitHub.**
Zero-dependency **Pre-Launch, Secret-Leak & Anti-Slop Auditor** for developers and AI coding agents β with a CLI, a Drag & Drop local Web UI, an MCP server, and an Agent Skill.
[](#quickstart)
[](#why-shipguard)
[](#use-with-ai-agents-mcp--skill)
[](LICENSE)
[](https://t.me/bizqx)
π **Languages:** English | [Π ΡΡΡΠΊΠΈΠΉ](README.ru.md) | π£ **Telegram:** [@bizqx](https://t.me/bizqx)
<br/>

</div>
---
## Why ShipGuard?
Whether you write code by hand or build fast with Gemini, Antigravity, Cursor, Codex, or Claude Code, three things quietly ruin launches:
1. **Silent leaks & security holes** β `.env` missing from `.gitignore`, hardcoded API tokens, `shell=True`, SQL string interpolation, `innerHTML` XSS, `verify=False`.
2. **AI slop & unfinished artifacts** β leftover dummy API placeholders, `TODO` clutter, hardcoded `localhost:8000` URLs, missing `alt` attributes, generic filler copy.
3. **Missing GitHub launch essentials** β weak or empty `README.md`, missing `LICENSE`, missing `.env.example`, missing OpenGraph meta tags for X/HN/Reddit previews.
**ShipGuard checks all of them in under 100ms β 100% locally, with zero external dependencies.**
```text
ShipGuard v0.1.0 β /workspace/my-app
Launch Readiness: 35/100 (Grade F) | 12 files, 840 lines in 18 ms
------------------------------------------------------------------------
PASS .gitignore Present
FAIL README.md Missing README.md
FAIL LICENSE Missing LICENSE file
FAIL Web SEO / Social Meta Missing: <title>, meta description, OpenGraph
------------------------------------------------------------------------
[HIGH ] SEC-003 Hardcoded Credential Assignment (app.py:8)
[HIGH ] VULN-002 Shell Injection Risk (shell=True) (app.py:19)
[HIGH ] VULN-003 Potential SQL String Interpolation (app.py:14)
[HIGH ] VULN-004 Unsafe HTML Injection (XSS Vector) (index.html:9)
```
---
## Quickstart (Zero Dependencies)
No `pip install` required β just Python 3.9+:
```bash
git clone https://github.com/timonfei64-ux/shipguard.git
cd shipguard
# 1. Launch the clean Web Dashboard (drag & drop any project folder, or paste a path)
python -m shipguard ui
# 2. Or audit a folder directly from the terminal
python -m shipguard scan /path/to/your-project
```
Or install it as a global CLI command:
```bash
pip install -e .
shipguard ui
```
---
## Features
| Capability | What it does |
| --- | --- |
| **Drag & Drop Web UI** | Opens cleanly at `http://127.0.0.1:4310` β drag any project folder straight from Explorer/Finder into the browser (or paste a path) with zero setup. |
| **Secret & Leak Guard** | Detects API/cloud keys (OpenAI, Anthropic, Google, AWS, GitHub, Stripe, Slack), private key blocks, DB DSNs with passwords, and un-ignored `.env` files (always masked in output). |
| **Security & AI-Bug Audit** | Flags `eval`/`exec`, `shell=True` / `child_process.exec`, SQL string interpolation, `dangerouslySetInnerHTML`/`innerHTML`, disabled TLS (`verify=False`), unsafe `pickle`/`yaml.load`, wildcard CORS, and `DEBUG=True`. |
| **Anti-Slop & Hygiene** | Catches placeholder secrets, `TODO`/`FIXME` debt, hardcoded `localhost` URLs, missing `<img>` `alt` tags, oversized binary files, and respects `.gitignore` + `.shipguardignore`. |
| **GitHub Launch Readiness** | Scores 0β100 (Grade `A+` to `F`) across `README.md` quality, `LICENSE`, `.gitignore`, `.env.example`, and HTML SEO/OpenGraph tags. |
| **Safe Auto-Fix (`fix`)** | Generates `.gitignore`, `.env.example` (keys only β never copies secret values), and MIT `LICENSE` in one command. |
| **MCP Server + Agent Skill** | Built-in `shipguard mcp` stdio server + `skills/shipguard/SKILL.md` for Claude Code, Cursor, Codex, and Antigravity. |
---
## Commands
```bash
# Start the clean local Web UI on http://127.0.0.1:4310 (drop a folder or enter a path)
python -m shipguard ui
# Or open the Web UI pre-loaded with a specific directory
python -m shipguard ui /path/to/your-project
# Audit a directory in the terminal
python -m shipguard scan .
# Fail CI / pre-push if any high or critical issue exists
python -m shipguard scan . --fail-on high
# Output JSON or Markdown for reports & PR comments
python -m shipguard scan . --json
python -m shipguard scan . --markdown
# Safely generate missing .gitignore, .env.example, and MIT LICENSE
python -m shipguard fix . --owner "Your Name"
```
---
## Use with AI Agents (MCP + Skill)
### 1. MCP Server (Claude Code, Cursor, Codex, Antigravity)
Add ShipGuard to your MCP config (`mcpServers`):
```json
{
"mcpServers": {
"shipguard": {
"command": "python",
"args": ["-m", "shipguard", "mcp"]
}
}
}
```
Exposed MCP tools:
- `scan_repository` β full Markdown or JSON audit
- `apply_safe_fixes` β creates `.gitignore`, `.env.example`, and `LICENSE` safely
- `get_launch_checklist` β returns score, grade, and readiness checks
### 2. Agent Skill
Copy [`skills/shipguard/SKILL.md`](skills/shipguard/SKILL.md) into your agent's skills directory so your coding agent automatically audits its own code before finishing a task.
---
## GitHub Actions CI
Drop [`.github/workflows/shipguard.yml`](.github/workflows/shipguard.yml) into any repository to block PRs with high/critical leaks or security bugs:
```yaml
- name: Run ShipGuard audit
run: python -m shipguard scan . --fail-on high
```
---
## Running Tests
```bash
python -m unittest discover -s tests -v
```
---
## Contributing
Issues and pull requests for new language rules, framework readiness checks, and IDE integrations are welcome!
If ShipGuard saved you from pushing a secret or helped your launch, consider giving it a β on GitHub.
This server cannot be deployed
Maintenance
ActivityNo data
ResponsivenessOutdated data