Skip to main content
ClaudeWave
Skill829 repo starsupdated 4d ago

ship-safe-ci

Run Ship Safe in CI mode — compact output, exit codes, SARIF generation. Use when the user wants to set up CI/CD security gates or test their pipeline configuration.

Install in Claude Code
Copy
git clone --depth 1 https://github.com/asamassekou10/ship-safe /tmp/ship-safe-ci && cp -r /tmp/ship-safe-ci/claude-code-plugin/skills/ship-safe-ci ~/.claude/skills/ship-safe-ci
Then start a new Claude Code session; the skill loads automatically.

SKILL.md

# Ship Safe — CI Pipeline Mode

You are helping the user set up Ship Safe as a security gate in their CI/CD pipeline.

## Step 1: Run CI scan

```bash
npx ship-safe@latest ci $ARGUMENTS 2>/dev/null
```

Default: pass/fail based on score >= 75.

### Options:
- `--threshold 60` — custom passing score
- `--fail-on critical` — only fail on critical findings
- `--fail-on high` — fail on critical or high
- `--sarif results.sarif` — SARIF output for GitHub Code Scanning
- `--baseline` — only check new findings
- `--json` — JSON output for custom integrations
- `--no-deps` — skip dependency audit

## Step 2: Interpret results

The command outputs a compact one-line summary:
```
[ship-safe] Score: 82/100 (B) | Findings: 12 (0C 3H 9M) | CVEs: 2 | 4.2s
[ship-safe] PASS
```

Or on failure:
```
[ship-safe] Score: 58/100 (C) | Findings: 25 (3C 8H 14M) | CVEs: 5 | 6.1s
[ship-safe] FAIL: Score 58 < threshold 75
```

Exit code 0 = pass, exit code 1 = fail.

## Step 3: Help set up CI integration

Based on the user's CI platform, offer to create or update their workflow file:

### GitHub Actions
```yaml
- name: Security Scan
  run: npx ship-safe@latest ci . --threshold 75 --sarif results.sarif

- name: Upload SARIF
  if: always()
  uses: github/codeql-action/upload-sarif@v3
  with:
    sarif_file: results.sarif
```

### GitLab CI
```yaml
security-scan:
  script:
    - npx ship-safe@latest ci . --threshold 75 --json > security-report.json
  artifacts:
    reports:
      sast: security-report.json
```

### Generic CI
```bash
npx ship-safe@latest ci . --threshold 75 || exit 1
```

## Step 4: Suggest baseline workflow

If there are many findings:
1. Create a baseline: `npx ship-safe baseline .`
2. Use `--baseline` in CI to only catch new vulnerabilities
3. Gradually fix baselined issues over time

## Important Notes

- CI mode suppresses all spinners and color for clean log output
- The SARIF file can be uploaded to GitHub Code Scanning for inline PR annotations
- Use `--fail-on critical` for a gradual rollout — start strict only for critical issues
ship-safe-baselineSkill

Manage your security baseline — accept current findings as known debt, then only report new regressions on future scans. Use when the user wants to adopt security scanning incrementally or suppress existing findings.

ship-safe-deepSkill

Run a deep security audit with LLM-powered taint analysis — regex scan nominates findings, then an LLM verifies taint reachability and exploitability. Use when the user wants thorough, high-confidence results with fewer false positives.

ship-safe-fixSkill

Auto-fix security issues — remediate hardcoded secrets and common vulnerabilities (TLS bypass, debug mode, XSS, shell injection, Docker :latest). Use when the user wants to automatically fix security findings.

ship-safe-hooksSkill

Install ship-safe as real-time Claude Code hooks — blocks secrets and dangerous commands before they land on disk. Use when the user wants automatic security scanning on every file write or bash command.

ship-safe-red-teamSkill

Run a multi-agent red team scan — 29 specialized security agents scan for 80+ attack classes including injection, auth bypass, SSRF, supply chain, Supabase RLS, MCP security, agentic AI, RAG poisoning, PII compliance, and more. Use when the user wants a deep security analysis beyond just secrets.

ship-safe-scanSkill

Quick scan for leaked secrets — API keys, passwords, tokens, database URLs. Use when the user wants to check for hardcoded secrets or exposed credentials.

ship-safe-scoreSkill

Get your project's security health score (0-100, A-F grade). Use when the user wants a quick security check or asks "is my code safe to ship?

ship-safeSkill

Run a full security audit on this project — 16 agents scan for secrets, injections, auth bypass, SSRF, supply chain, Supabase RLS, MCP security, agentic AI, RAG poisoning, PII compliance, and more. Use when the user wants a security audit, vulnerability scan, or asks if their code is safe to ship.