Skip to main content

DeployProof

A pre-push verification tool for AI-assisted codebases: mutation testing, credential scanning, sandbox-escape detection, and dependency hallucination checks.

PyPI version Python versions Tests License: MIT


Why This Exists

AI-assisted development introduces failure modes that standard tools miss: test suites with high line coverage but near-zero mutation scores, hardcoded credentials generated in passing, symlinks that deceive approval prompts into escaping the repository sandbox, and package names hallucinated by LLMs that don't exist on PyPI. DeployProof catches these at the pre-push stage, before they reach CI or production.

Install

pip install deployproof

Requires Python 3.10+.

Quickstart

Initialize in your repository:

deployproof init

Run all verification checks against changes in the current session:

deployproof check

Output includes a section for each check — symlink scan, secrets scan, dependency scan, mock detection, control flow analysis, and mutation score — with a pass/fail line at the bottom. Exit code is non-zero on any finding that should block a push. Supports --json for machine-readable output and --strict-mocks / --strict-error-handling to turn informational checks into hard verification gates.

Machine-Readable Output (--json)

DeployProof provides a stable structured JSON schema for CI/CD pipelines, IDEs, and automation:

deployproof check --json

JSON Output Schema

{
  "version": "0.1.5",
  "status": "passed",
  "summary": {
    "target_files_count": 1,
    "mutation_score": 100.0,
    "threshold": 80.0,
    "secrets_found": 0,
    "symlink_escapes_found": 0,
    "dependency_findings": {
      "high_risk": 0,
      "medium_risk": 0,
      "ok": 1,
      "unknown": 0,
      "unscanned": 0
    },
    "mock_usages_found": 0,
    "control_flow_findings": 0,
    "strict_mocks_active": false,
    "strict_mocks_triggered": false,
    "strict_error_handling_active": false,
    "strict_error_handling_triggered": false
  },
  "scope": {
    "target_files": [
      {
        "file": "app.py",
        "loc": 45,
        "is_large": false
      }
    ]
  },
  "mutation_testing": {
    "score": 100.0,
    "threshold": 80.0,
    "total_mutants": 6,
    "killed_mutants": 6,
    "survived_mutants_count": 0,
    "duration_seconds": 1.2,
    "surviving_mutants": [],
    "skipped_constructs": [],
    "untested_files": []
  },
  "secrets": {
    "clean": true,
    "files_scanned": 1,
    "findings": []
  },
  "symlinks": {
    "clean": true,
    "files_scanned": 1,
    "findings": []
  },
  "dependencies": {
    "clean": true,
    "total_scanned": 1,
    "findings": [],
    "unscanned_sources": []
  },
  "mocks": {
    "clean": true,
    "strict_gate_triggered": false,
    "findings": []
  },
  "control_flow": {
    "clean": true,
    "strict_gate_triggered": false,
    "findings": []
  }
}

What It Checks

  • Mutation Score — Mutates AST operators (>=, ==, and, or, *, numeric constants, comparisons) in modified files and runs your test suite against each mutant. Reports surviving mutants and a percentage score. Does not use line coverage.
  • Secrets and Credentials — Scans modified files for hardcoded API keys (OpenAI, Anthropic, AWS, GitHub, Stripe, private keys) and tracked .env files using pattern matching and entropy analysis.
  • Symlink and Sandbox Escape — Resolves symbolic links and flags any whose target escapes the repository root (CWE-61 / CWE-451). Catches the class of path-traversal trick used in the GhostApproval disclosure (Wiz Research, July 2026).
  • Dependency and Slopsquatting — For each new import, dynamic import (importlib.import_module, __import__), or manifest entry (including recursive -r includes) introduced in the diff, queries the PyPI JSON API and checks registration age. Packages that don't exist (HTTP 404) are flagged HIGH RISK; packages registered within the last 30 days are flagged MEDIUM RISK.
  • Mock Usage Detection — Scans test diffs for newly introduced imports or fixture uses of unittest.mock, mocker, and monkeypatch, flagging them for human review with an optional --strict-mocks hard gate.
  • Control Flow and Error Handling — AST-based detector for bare except: without re-raise, silently swallowed broad exceptions (except Exception: that only pass or log/print without re-raising or returning error indicators), and dead/unreachable code following unconditional return, raise, break, or continue, with an optional --strict-error-handling hard gate.

What This Doesn't Do

  • Not a full-repo audit. Checks are scoped to files changed in the current session (git diff). Files you haven't touched are not re-evaluated.
  • Python only. Mutation testing and import extraction currently support Python files only. Other languages are not scanned.
  • No auto-fix. DeployProof reports findings; it does not modify your code, rewrite imports, or suggest patches.
  • No IDE plugin yet. There is no VS Code extension or JetBrains plugin. The CLI is the interface. IDE integration is on the roadmap.

See It Catch Real Bugs

Clone this repository and run the standalone stress-test suite to see DeployProof evaluate 7 planted edge cases:

python stress_fixtures/run_stress_tests.py

Fixtures cover weak test suites, zero-test orphan modules, planted OpenAI/AWS credentials, and GhostApproval sandbox-escape traps.

Status & Roadmap

  • Current (v0.1.5): Diff-scoped AST mutation testing, secrets scanner (including unquoted .env values), GhostApproval symlink sandbox-escape detector, PyPI dependency hallucination / slopsquatting scanner (with recursive -r requirements scanning and dynamic import detection via importlib / __import__), mock-introduction detector (--strict-mocks), control-flow / swallowed-exception scanner (--strict-error-handling), machine-readable --json output, and Tier 2 CI verification via GitHub Actions (mutmut).
  • Next: Multi-language mutation support and expanded ecosystem rule packs.

Contributing

Issues and pull requests are welcome. Open an issue first for significant changes so the approach can be discussed before implementation.

License

MIT. See LICENSE.


Created by SVS Praveen · Portfolio · LinkedIn

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

deployproof-0.1.5.tar.gz (61.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

deployproof-0.1.5-py3-none-any.whl (43.0 kB view details)

Uploaded Python 3

File details

Details for the file deployproof-0.1.5.tar.gz.

File metadata

  • Download URL: deployproof-0.1.5.tar.gz
  • Upload date:
  • Size: 61.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for deployproof-0.1.5.tar.gz
Algorithm Hash digest
SHA256 30790f97dfcfef36c32106b5cb666897d1082cc17230877b81a935ddedb3d350
MD5 3b3e8ee4067b3740887577144f3d21d2
BLAKE2b-256 48f6a40135b436f33b4cc579e0887e61c890cadaf32bd22291a0bb0ae2e2291d

See more details on using hashes here.

File details

Details for the file deployproof-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: deployproof-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 43.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for deployproof-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 1446a903e04df075b739f58d0ec42c7f07b178f20d2072d9df29c51c050a041b
MD5 81388b95693e9583110597edd5b07dbd
BLAKE2b-256 7ab3f3e77f18d19906e72389018d0f63a74e8dc0682401f6c50a42a68c62316b

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.7

2 files

0.1.6

2 files

This release

0.1.5 This release

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page