deployproof 1.1.16__tar.gz → 1.1.18__tar.gz

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.
Files changed (68) hide show
  1. deployproof-1.1.18/PKG-INFO +337 -0
  2. deployproof-1.1.18/README.md +304 -0
  3. {deployproof-1.1.16 → deployproof-1.1.18}/pyproject.toml +4 -2
  4. {deployproof-1.1.16 → deployproof-1.1.18}/src/deployproof/__init__.py +2 -2
  5. {deployproof-1.1.16 → deployproof-1.1.18}/src/deployproof/cli.py +21 -4
  6. {deployproof-1.1.16 → deployproof-1.1.18}/src/deployproof/dependencies.py +1430 -1430
  7. {deployproof-1.1.16 → deployproof-1.1.18}/src/deployproof/diff.py +1 -1
  8. {deployproof-1.1.16 → deployproof-1.1.18}/src/deployproof/mutator.py +3332 -3284
  9. {deployproof-1.1.16 → deployproof-1.1.18}/src/deployproof/reporter.py +1 -1
  10. {deployproof-1.1.16 → deployproof-1.1.18}/src/deployproof/sast.py +14 -0
  11. {deployproof-1.1.16 → deployproof-1.1.18}/src/deployproof/secrets.py +1 -1
  12. {deployproof-1.1.16 → deployproof-1.1.18}/src/deployproof/synthesizer.py +3 -3
  13. {deployproof-1.1.16 → deployproof-1.1.18}/src/deployproof/wsl.py +14 -4
  14. deployproof-1.1.18/src/deployproof.egg-info/PKG-INFO +337 -0
  15. {deployproof-1.1.16 → deployproof-1.1.18}/tests/test_cli.py +33 -0
  16. deployproof-1.1.18/tests/test_wsl.py +329 -0
  17. deployproof-1.1.16/PKG-INFO +0 -532
  18. deployproof-1.1.16/README.md +0 -499
  19. deployproof-1.1.16/src/deployproof.egg-info/PKG-INFO +0 -532
  20. deployproof-1.1.16/tests/test_wsl.py +0 -86
  21. {deployproof-1.1.16 → deployproof-1.1.18}/LICENSE +0 -0
  22. {deployproof-1.1.16 → deployproof-1.1.18}/setup.cfg +0 -0
  23. {deployproof-1.1.16 → deployproof-1.1.18}/src/deployproof/ci.py +0 -0
  24. {deployproof-1.1.16 → deployproof-1.1.18}/src/deployproof/control_flow.py +0 -0
  25. {deployproof-1.1.16 → deployproof-1.1.18}/src/deployproof/coverage_plugin.py +0 -0
  26. {deployproof-1.1.16 → deployproof-1.1.18}/src/deployproof/cve.py +0 -0
  27. {deployproof-1.1.16 → deployproof-1.1.18}/src/deployproof/history_secrets.py +0 -0
  28. {deployproof-1.1.16 → deployproof-1.1.18}/src/deployproof/interactive.py +0 -0
  29. {deployproof-1.1.16 → deployproof-1.1.18}/src/deployproof/mocks.py +0 -0
  30. {deployproof-1.1.16 → deployproof-1.1.18}/src/deployproof/symlinks.py +0 -0
  31. {deployproof-1.1.16 → deployproof-1.1.18}/src/deployproof.egg-info/SOURCES.txt +0 -0
  32. {deployproof-1.1.16 → deployproof-1.1.18}/src/deployproof.egg-info/dependency_links.txt +0 -0
  33. {deployproof-1.1.16 → deployproof-1.1.18}/src/deployproof.egg-info/entry_points.txt +0 -0
  34. {deployproof-1.1.16 → deployproof-1.1.18}/src/deployproof.egg-info/requires.txt +0 -0
  35. {deployproof-1.1.16 → deployproof-1.1.18}/src/deployproof.egg-info/top_level.txt +0 -0
  36. {deployproof-1.1.16 → deployproof-1.1.18}/tests/test_advanced_mutation_operators.py +0 -0
  37. {deployproof-1.1.16 → deployproof-1.1.18}/tests/test_baseline_collection_error.py +0 -0
  38. {deployproof-1.1.16 → deployproof-1.1.18}/tests/test_ci_github.py +0 -0
  39. {deployproof-1.1.16 → deployproof-1.1.18}/tests/test_cli_dependency_scan.py +0 -0
  40. {deployproof-1.1.16 → deployproof-1.1.18}/tests/test_cli_symlink_integration.py +0 -0
  41. {deployproof-1.1.16 → deployproof-1.1.18}/tests/test_comprehensive_feature_matrix.py +0 -0
  42. {deployproof-1.1.16 → deployproof-1.1.18}/tests/test_config_file.py +0 -0
  43. {deployproof-1.1.16 → deployproof-1.1.18}/tests/test_control_flow.py +0 -0
  44. {deployproof-1.1.16 → deployproof-1.1.18}/tests/test_cve.py +0 -0
  45. {deployproof-1.1.16 → deployproof-1.1.18}/tests/test_dependencies_extractor.py +0 -0
  46. {deployproof-1.1.16 → deployproof-1.1.18}/tests/test_dependencies_pypi.py +0 -0
  47. {deployproof-1.1.16 → deployproof-1.1.18}/tests/test_diff.py +0 -0
  48. {deployproof-1.1.16 → deployproof-1.1.18}/tests/test_dynamic_test_selection.py +0 -0
  49. {deployproof-1.1.16 → deployproof-1.1.18}/tests/test_edge_cases_validation.py +0 -0
  50. {deployproof-1.1.16 → deployproof-1.1.18}/tests/test_env_and_poetry_dependencies.py +0 -0
  51. {deployproof-1.1.16 → deployproof-1.1.18}/tests/test_equivalent_mutants.py +0 -0
  52. {deployproof-1.1.16 → deployproof-1.1.18}/tests/test_full_parity_matrix.py +0 -0
  53. {deployproof-1.1.16 → deployproof-1.1.18}/tests/test_history_secrets.py +0 -0
  54. {deployproof-1.1.16 → deployproof-1.1.18}/tests/test_import_graph_discovery.py +0 -0
  55. {deployproof-1.1.16 → deployproof-1.1.18}/tests/test_interactive.py +0 -0
  56. {deployproof-1.1.16 → deployproof-1.1.18}/tests/test_mocks.py +0 -0
  57. {deployproof-1.1.16 → deployproof-1.1.18}/tests/test_mutation_schemata.py +0 -0
  58. {deployproof-1.1.16 → deployproof-1.1.18}/tests/test_mutation_suites.py +0 -0
  59. {deployproof-1.1.16 → deployproof-1.1.18}/tests/test_mutator.py +0 -0
  60. {deployproof-1.1.16 → deployproof-1.1.18}/tests/test_pyproject_config.py +0 -0
  61. {deployproof-1.1.16 → deployproof-1.1.18}/tests/test_sast.py +0 -0
  62. {deployproof-1.1.16 → deployproof-1.1.18}/tests/test_secrets.py +0 -0
  63. {deployproof-1.1.16 → deployproof-1.1.18}/tests/test_stress_regressions.py +0 -0
  64. {deployproof-1.1.16 → deployproof-1.1.18}/tests/test_symlink_escapes_edge_cases.py +0 -0
  65. {deployproof-1.1.16 → deployproof-1.1.18}/tests/test_symlink_security_suite.py +0 -0
  66. {deployproof-1.1.16 → deployproof-1.1.18}/tests/test_symlinks.py +0 -0
  67. {deployproof-1.1.16 → deployproof-1.1.18}/tests/test_synthesizer.py +0 -0
  68. {deployproof-1.1.16 → deployproof-1.1.18}/tests/test_tier1_upgrade_integration.py +0 -0
@@ -0,0 +1,337 @@
1
+ Metadata-Version: 2.4
2
+ Name: deployproof
3
+ Version: 1.1.18
4
+ Summary: DeployProof (Python CLI) — AI-code verification, in-memory AST mutation testing, secrets scanning & self-healing test synthesis for Python by SVS Praveen.
5
+ Author-email: SVS Praveen <svspraveens@gmail.com>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/SVSPraveen/deployproof
8
+ Project-URL: Documentation, https://svspraveen.github.io/deployproof/
9
+ Project-URL: Portfolio, https://svspraveen.vercel.app/
10
+ Project-URL: Repository, https://github.com/SVSPraveen/deployproof.git
11
+ Project-URL: Bug Tracker, https://github.com/SVSPraveen/deployproof/issues
12
+ Keywords: mutation-testing,pre-push-gate,self-healing-tests,ast-mutation-testing,ai-code-verification,python-cli,code-quality,developer-tools,pytest-plugin,sast-scanner,credential-scanner,supply-chain-security,slopsquatting,ai-code-defense,python-testing,devops-quality-gate
13
+ Classifier: Development Status :: 3 - Alpha
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Topic :: Security
21
+ Classifier: Topic :: Software Development :: Quality Assurance
22
+ Classifier: Topic :: Software Development :: Testing
23
+ Requires-Python: >=3.10
24
+ Description-Content-Type: text/markdown
25
+ License-File: LICENSE
26
+ Requires-Dist: pytest>=7.0.0
27
+ Provides-Extra: dev
28
+ Requires-Dist: build>=1.0.0; extra == "dev"
29
+ Requires-Dist: twine>=4.0.0; extra == "dev"
30
+ Requires-Dist: coverage>=7.0.0; extra == "dev"
31
+ Requires-Dist: pyyaml>=6.0; extra == "dev"
32
+ Dynamic: license-file
33
+
34
+ # DeployProof
35
+
36
+ **DeployProof** is a **Python CLI** tool for **AI-code verification** — it catches what 100% line coverage misses by running **in-memory AST mutation testing** on your git diff before any commit reaches CI. Created by [SVS Praveen](https://github.com/SVSPraveen).
37
+
38
+ ```bash
39
+ pip install deployproof
40
+ ```
41
+
42
+ [![PyPI version](https://img.shields.io/badge/pypi-v1.1.18-007ec6.svg)](https://pypi.org/project/deployproof/)
43
+ [![Python versions](https://img.shields.io/badge/python-3.10%20%7C%203.11%20%7C%203.12%20%7C%203.13-3776ab.svg)](https://pypi.org/project/deployproof/)
44
+ [![CI](https://github.com/SVSPraveen/deployproof/actions/workflows/ci.yml/badge.svg)](https://github.com/SVSPraveen/deployproof/actions/workflows/ci.yml)
45
+ [![Tests](https://img.shields.io/badge/tests-278%20passed-2ea44f.svg)](https://github.com/SVSPraveen/deployproof)
46
+ [![Stress Tests](https://img.shields.io/badge/stress%20tests-14%2F14%20passed-2ea44f.svg)](stress_fixtures/)
47
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
48
+ [![Docs](https://img.shields.io/badge/docs-DeployProof%20Portal-6366f1.svg)](https://svspraveen.github.io/deployproof/)
49
+
50
+ <p align="center">
51
+ <img src="https://raw.githubusercontent.com/SVSPraveen/deployproof/main/assets/deployproof-hero.png" alt="DeployProof: Pre-Push Quality & Security Gate" width="100%">
52
+ </p>
53
+
54
+ ---
55
+
56
+ > 📖 **[View the Complete Interactive Product Portal & Live Docs](https://svspraveen.github.io/deployproof/)**
57
+ > 💡 *Curious why we built it this way? Read our architectural rationale in **[DECISIONS.md](DECISIONS.md)**.*
58
+
59
+ ---
60
+
61
+ ## Contents
62
+ - [Why This Exists](#why-this-exists)
63
+ - [How It Compares: DeployProof vs. Mutmut vs. Cosmic Ray](#how-it-compares)
64
+ - [Installation](#installation)
65
+ - [Quickstart & Walkthrough](#quickstart--walkthrough)
66
+ - [How It Works](#how-it-works)
67
+ - [The Verification Gates](#the-verification-gates)
68
+ - [CI/CD & Pre-Commit Integration](#cicd--pre-commit-integration)
69
+ - [Configuration (`pyproject.toml`)](#configuration-pyprojecttoml)
70
+ - [Full Documentation & CLI Reference](#full-documentation--cli-reference)
71
+
72
+ ---
73
+
74
+ ## Why This Exists
75
+
76
+ The standard AI-code workflow produces tests that pass CI but don't actually verify anything. A test suite at 90% line coverage can have a mutation score near zero — meaning almost any change to the logic under test goes completely undetected.
77
+
78
+ DeployProof runs **in-memory AST mutation testing** scoped to your git diff. It mutates operators, constants, and control-flow in warm RAM (no disk writes), runs your tests against each mutant, and fails the push if surviving mutants exceed your threshold — in the time it takes to read a Slack message.
79
+
80
+ It also ships with a set of companion security gates for the failure modes that mutation testing doesn't catch on its own: hardcoded secrets, OWASP-class SAST patterns, hallucinated dependencies, and symlink escapes.
81
+
82
+ > **Privacy guarantee**: DeployProof runs 100% locally. The only outbound requests are read-only: PyPI JSON API (dependency hallucination check) and OSV (CVE lookup, opt-out with `--no-check-cve`). No source code, test results, or findings leave your machine.
83
+
84
+ ---
85
+
86
+ ## How It Compares
87
+
88
+ The core difference from mutmut and Cosmic Ray is *where* the mutation happens. Both of those tools rewrite source files on disk and spawn a fresh test process for every mutant — which is slow and doesn't scope to your diff. DeployProof compiles all mutants into a single conditional AST in warm RAM and only tests the files you actually changed:
89
+
90
+ | | DeployProof | mutmut | Cosmic Ray |
91
+ |---|:---:|:---:|:---:|
92
+ | **Mutation engine** | In-memory AST schemata | File rewrite to disk | AST disk rewriting |
93
+ | **Scoped to git diff** | **Yes** | No (full repo) | No (full repo) |
94
+ | **Self-healing test synthesis** | **Yes** | No | No |
95
+ | **Async/await, arg-swap, boundary mutations** | **Yes** | Partial | Partial |
96
+ | **Secrets & SAST scanning** | Also included | No | No |
97
+ | **Dependency hallucination & CVE checks** | Also included | No | No |
98
+ | **Multi-worker sandboxes** | **Yes (`--workers N`)** | No | Distributed (Celery) |
99
+ | **GitHub Actions summaries** | **Yes** | No | No |
100
+
101
+ ---
102
+
103
+ ## Installation
104
+
105
+ ```bash
106
+ pip install deployproof
107
+
108
+ # Recommended: isolated environment with global CLI access
109
+ pipx install deployproof
110
+ ```
111
+
112
+ *Requires Python 3.10+.*
113
+
114
+ ---
115
+
116
+ ## Quickstart & Walkthrough
117
+
118
+ <p align="center">
119
+ <img src="https://raw.githubusercontent.com/SVSPraveen/deployproof/main/assets/demo.gif" alt="DeployProof Terminal Verification Walkthrough" width="100%">
120
+ </p>
121
+
122
+ ### The Problem in Action
123
+
124
+ Given a newly written function `calculator.py`:
125
+
126
+ ```python
127
+ def calculate_discount(price: float, rate: float) -> float:
128
+ if rate > 0.5:
129
+ return price * 0.5
130
+ return price * (1.0 - rate)
131
+ ```
132
+
133
+ With an AI-generated test that achieves **100% line coverage** by only asserting a single happy path (`rate = 0.2`):
134
+
135
+ ```python
136
+ def test_calculate_discount_basic():
137
+ assert calculate_discount(100.0, 0.2) == 80.0
138
+ ```
139
+
140
+ Running `deployproof check` mutates AST operators in memory and immediately exposes that threshold caps and boundaries are unverified:
141
+
142
+ ```
143
+ $ deployproof check
144
+
145
+ Target Scope (1 file evaluated):
146
+ * calculator.py
147
+
148
+ Local Pre-Check Mutation Verification:
149
+ Score: 57.1% (4/7 mutants killed)
150
+ Status: FAILED (score 57.1% below 80.0%)
151
+ Time: 2.27s
152
+
153
+ Surviving Mutants (3 unverified changes):
154
+ [1] calculator.py:2 Mutation: Replace numeric constant '0.5' with '1.5'
155
+ [2] calculator.py:3 Mutation: Replace numeric constant '0.5' with '1.5'
156
+ [3] calculator.py:3 Mutation: Replace binary operator '*' with '/'
157
+
158
+ Pre-check FAILED: Score 57.1% is below threshold 80.0% (3 surviving mutants).
159
+ ```
160
+
161
+ ### Self-Healing the Test Suite
162
+
163
+ Run with `--heal-tests` (or interactively with `-i`) to automatically synthesize ready-to-run pytest unit tests that target the exact surviving mutants:
164
+
165
+ ```bash
166
+ deployproof check --heal-tests
167
+ ```
168
+
169
+ ```python
170
+ # Generated in tests/test_deployproof_healed.py
171
+ def test_calculate_discount_boundary_rate():
172
+ assert calculate_discount(100.0, 0.5) == 50.0
173
+
174
+ def test_calculate_discount_capped_rate():
175
+ assert calculate_discount(100.0, 0.8) == 50.0
176
+ ```
177
+
178
+ Re-running `deployproof check` immediately passes:
179
+
180
+ ```
181
+ Local Pre-Check Mutation Verification:
182
+ Score: 100.0% (7/7 mutants killed)
183
+ Status: PASSED (threshold: 80.0%)
184
+ Time: 2.31s
185
+
186
+ Surviving Mutants: None (All generated mutants caught by test suite)
187
+ Pre-check clean: 100% of tested basic mutations caught.
188
+ ```
189
+
190
+ ---
191
+
192
+ ## How It Works
193
+
194
+ DeployProof runs in two modes:
195
+
196
+ ### Default: Diff-Scoped Gate (`deployproof check`)
197
+ Evaluates **only the files modified in your git diff**. Because mutants are compiled into warm RAM — no disk writes, no file copies — this mode is significantly faster than traditional mutation tools and completes before your attention switches context.
198
+
199
+ ```bash
200
+ # Check modified files in your current git diff
201
+ deployproof check
202
+
203
+ # Output structured JSON for IDE tooling or custom pipelines
204
+ deployproof check --json
205
+
206
+ # Enforce strict gates on newly introduced mocks or swallowed errors
207
+ deployproof check --strict-mocks --strict-error-handling
208
+ ```
209
+
210
+ ### Full Repository Audit (`deployproof check --full-repo`)
211
+ Evaluates **every tracked Python file** across the entire repository, parallelizing across isolated worker sandboxes:
212
+
213
+ ```bash
214
+ deployproof check --full-repo --workers 8
215
+ ```
216
+
217
+ ### Windows WSL Delegation (`deployproof check --wsl`)
218
+ Translates Windows paths (safely quoting spaces), delegates mutation runs to `mutmut` inside a native Linux environment in WSL, and streams results back to your Windows console:
219
+
220
+ ```bash
221
+ deployproof check --wsl
222
+ ```
223
+
224
+ > ⚙️ **One-Time WSL Setup**: `wsl bash -c "python3 -m venv ~/.deployproof-wsl-venv && ~/.deployproof-wsl-venv/bin/pip install mutmut pytest"`
225
+ > *(If WSL is not configured, DeployProof falls back to the native in-memory engine with a notice.)*
226
+
227
+ ---
228
+
229
+ ## The Verification Gates
230
+
231
+ ### Core: Mutation Testing
232
+
233
+ **Gate 1 — In-Memory AST Mutation Engine**
234
+ Mutates operators (`>=`, `==`, `and`, `or`, `*`), numeric constants, string boundaries, async/await drops, and argument swaps. All mutants are compiled into a single conditional AST and toggled via environment variable — no disk I/O, no file copies.
235
+
236
+ **Gate 2 — Self-Healing Test Synthesizer**
237
+ Analyzes surviving mutants and synthesizes ready-to-run pytest unit tests with inferred parameter signatures, class method instantiation, and boundary value fixtures. Run with `--heal-tests` or `-i` for interactive mode.
238
+
239
+ ---
240
+
241
+ ### Also Included: Security Gates
242
+
243
+ These run alongside the mutation pass and catch categories of failure that mutation testing alone doesn't cover:
244
+
245
+ **Gate 3 — AST OWASP Top 10 SAST Scanner**
246
+ Zero-dependency static scanner: SQL injection, `shell=True`, `os.system`, insecure deserialization (`pickle`, `yaml.load`), path traversals, disabled SSL.
247
+
248
+ **Gate 4 — Secrets & Git History Scanner**
249
+ Shannon entropy scan of session files and the past 50 git commits: OpenAI, Anthropic, AWS, GitHub, and Stripe keys.
250
+
251
+ **Gate 5 — Dependency CVE & Slopsquatting Defense**
252
+ Cross-references requirements against OSV for known CVEs; queries PyPI JSON API in real time to catch hallucinated package names.
253
+
254
+ **Gate 6 — CWE-61 Symlink Sandbox Escape**
255
+ Resolves symlinks and blocks any whose target falls outside the repository root.
256
+
257
+ **Gate 7 — Control Flow & Error Handling**
258
+ Detects bare `except:`, swallowed exceptions, unreachable dead code, and mock leaks (`--strict-mocks`, `--strict-error-handling`).
259
+
260
+ ---
261
+
262
+ ## Architecture & Design Rationale
263
+
264
+ Curious why in-memory AST schemata instead of file rewrites, or how the dual-tier model works?
265
+
266
+ 👉 **Read [DECISIONS.md](DECISIONS.md)** for the complete technical design document, performance trade-off analyses, and threat models.
267
+
268
+ ---
269
+
270
+ ## CI/CD & Pre-Commit Integration
271
+
272
+ ### GitHub Actions
273
+ ```yaml
274
+ name: DeployProof Gate
275
+ on: [push, pull_request]
276
+
277
+ jobs:
278
+ verify:
279
+ runs-on: ubuntu-latest
280
+ steps:
281
+ - uses: actions/checkout@v4
282
+ with:
283
+ fetch-depth: 50
284
+ - uses: actions/setup-python@v5
285
+ with:
286
+ python-version: '3.12'
287
+ - run: pip install -e . && pip install deployproof pytest
288
+ - run: deployproof check --github-actions --workers 4
289
+ ```
290
+
291
+ ### Pre-Commit Framework (`.pre-commit-config.yaml`)
292
+ ```yaml
293
+ repos:
294
+ - repo: https://github.com/SVSPraveen/deployproof
295
+ rev: v1.1.18
296
+ hooks:
297
+ - id: deployproof-check
298
+ ```
299
+
300
+ ---
301
+
302
+ ## Configuration (`pyproject.toml`)
303
+
304
+ ```toml
305
+ [tool.deployproof]
306
+ threshold = 85.0
307
+ workers = 8
308
+ timeout = 15.0
309
+ strict_mocks = true
310
+ strict_error_handling = true
311
+ sast_scanning = true
312
+ history_secrets_scanning = true
313
+ cve_scanning = true
314
+ generate_tests = "tests/test_deployproof_healed.py"
315
+ ```
316
+
317
+ ---
318
+
319
+ ## Full Documentation & CLI Reference
320
+
321
+ For exhaustive CLI flag references, JSON output schemas, and advanced customization:
322
+
323
+ 👉 **[Explore the Interactive DeployProof Portal & Docs Site](https://svspraveen.github.io/deployproof/)**
324
+
325
+ ---
326
+
327
+ ## Contributing
328
+
329
+ Issues and pull requests are welcome. Open an issue first for significant changes so the approach can be discussed before implementation.
330
+
331
+ ## License
332
+
333
+ MIT. See [LICENSE](LICENSE).
334
+
335
+ ---
336
+
337
+ *DeployProof is created & architected by [SVS Praveen](https://github.com/SVSPraveen) — Python developer focused on AI-code verification tooling · [Portfolio](https://svspraveen.vercel.app/) · [LinkedIn](https://www.linkedin.com/in/svs-praveen-s/)*
@@ -0,0 +1,304 @@
1
+ # DeployProof
2
+
3
+ **DeployProof** is a **Python CLI** tool for **AI-code verification** — it catches what 100% line coverage misses by running **in-memory AST mutation testing** on your git diff before any commit reaches CI. Created by [SVS Praveen](https://github.com/SVSPraveen).
4
+
5
+ ```bash
6
+ pip install deployproof
7
+ ```
8
+
9
+ [![PyPI version](https://img.shields.io/badge/pypi-v1.1.18-007ec6.svg)](https://pypi.org/project/deployproof/)
10
+ [![Python versions](https://img.shields.io/badge/python-3.10%20%7C%203.11%20%7C%203.12%20%7C%203.13-3776ab.svg)](https://pypi.org/project/deployproof/)
11
+ [![CI](https://github.com/SVSPraveen/deployproof/actions/workflows/ci.yml/badge.svg)](https://github.com/SVSPraveen/deployproof/actions/workflows/ci.yml)
12
+ [![Tests](https://img.shields.io/badge/tests-278%20passed-2ea44f.svg)](https://github.com/SVSPraveen/deployproof)
13
+ [![Stress Tests](https://img.shields.io/badge/stress%20tests-14%2F14%20passed-2ea44f.svg)](stress_fixtures/)
14
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
15
+ [![Docs](https://img.shields.io/badge/docs-DeployProof%20Portal-6366f1.svg)](https://svspraveen.github.io/deployproof/)
16
+
17
+ <p align="center">
18
+ <img src="https://raw.githubusercontent.com/SVSPraveen/deployproof/main/assets/deployproof-hero.png" alt="DeployProof: Pre-Push Quality & Security Gate" width="100%">
19
+ </p>
20
+
21
+ ---
22
+
23
+ > 📖 **[View the Complete Interactive Product Portal & Live Docs](https://svspraveen.github.io/deployproof/)**
24
+ > 💡 *Curious why we built it this way? Read our architectural rationale in **[DECISIONS.md](DECISIONS.md)**.*
25
+
26
+ ---
27
+
28
+ ## Contents
29
+ - [Why This Exists](#why-this-exists)
30
+ - [How It Compares: DeployProof vs. Mutmut vs. Cosmic Ray](#how-it-compares)
31
+ - [Installation](#installation)
32
+ - [Quickstart & Walkthrough](#quickstart--walkthrough)
33
+ - [How It Works](#how-it-works)
34
+ - [The Verification Gates](#the-verification-gates)
35
+ - [CI/CD & Pre-Commit Integration](#cicd--pre-commit-integration)
36
+ - [Configuration (`pyproject.toml`)](#configuration-pyprojecttoml)
37
+ - [Full Documentation & CLI Reference](#full-documentation--cli-reference)
38
+
39
+ ---
40
+
41
+ ## Why This Exists
42
+
43
+ The standard AI-code workflow produces tests that pass CI but don't actually verify anything. A test suite at 90% line coverage can have a mutation score near zero — meaning almost any change to the logic under test goes completely undetected.
44
+
45
+ DeployProof runs **in-memory AST mutation testing** scoped to your git diff. It mutates operators, constants, and control-flow in warm RAM (no disk writes), runs your tests against each mutant, and fails the push if surviving mutants exceed your threshold — in the time it takes to read a Slack message.
46
+
47
+ It also ships with a set of companion security gates for the failure modes that mutation testing doesn't catch on its own: hardcoded secrets, OWASP-class SAST patterns, hallucinated dependencies, and symlink escapes.
48
+
49
+ > **Privacy guarantee**: DeployProof runs 100% locally. The only outbound requests are read-only: PyPI JSON API (dependency hallucination check) and OSV (CVE lookup, opt-out with `--no-check-cve`). No source code, test results, or findings leave your machine.
50
+
51
+ ---
52
+
53
+ ## How It Compares
54
+
55
+ The core difference from mutmut and Cosmic Ray is *where* the mutation happens. Both of those tools rewrite source files on disk and spawn a fresh test process for every mutant — which is slow and doesn't scope to your diff. DeployProof compiles all mutants into a single conditional AST in warm RAM and only tests the files you actually changed:
56
+
57
+ | | DeployProof | mutmut | Cosmic Ray |
58
+ |---|:---:|:---:|:---:|
59
+ | **Mutation engine** | In-memory AST schemata | File rewrite to disk | AST disk rewriting |
60
+ | **Scoped to git diff** | **Yes** | No (full repo) | No (full repo) |
61
+ | **Self-healing test synthesis** | **Yes** | No | No |
62
+ | **Async/await, arg-swap, boundary mutations** | **Yes** | Partial | Partial |
63
+ | **Secrets & SAST scanning** | Also included | No | No |
64
+ | **Dependency hallucination & CVE checks** | Also included | No | No |
65
+ | **Multi-worker sandboxes** | **Yes (`--workers N`)** | No | Distributed (Celery) |
66
+ | **GitHub Actions summaries** | **Yes** | No | No |
67
+
68
+ ---
69
+
70
+ ## Installation
71
+
72
+ ```bash
73
+ pip install deployproof
74
+
75
+ # Recommended: isolated environment with global CLI access
76
+ pipx install deployproof
77
+ ```
78
+
79
+ *Requires Python 3.10+.*
80
+
81
+ ---
82
+
83
+ ## Quickstart & Walkthrough
84
+
85
+ <p align="center">
86
+ <img src="https://raw.githubusercontent.com/SVSPraveen/deployproof/main/assets/demo.gif" alt="DeployProof Terminal Verification Walkthrough" width="100%">
87
+ </p>
88
+
89
+ ### The Problem in Action
90
+
91
+ Given a newly written function `calculator.py`:
92
+
93
+ ```python
94
+ def calculate_discount(price: float, rate: float) -> float:
95
+ if rate > 0.5:
96
+ return price * 0.5
97
+ return price * (1.0 - rate)
98
+ ```
99
+
100
+ With an AI-generated test that achieves **100% line coverage** by only asserting a single happy path (`rate = 0.2`):
101
+
102
+ ```python
103
+ def test_calculate_discount_basic():
104
+ assert calculate_discount(100.0, 0.2) == 80.0
105
+ ```
106
+
107
+ Running `deployproof check` mutates AST operators in memory and immediately exposes that threshold caps and boundaries are unverified:
108
+
109
+ ```
110
+ $ deployproof check
111
+
112
+ Target Scope (1 file evaluated):
113
+ * calculator.py
114
+
115
+ Local Pre-Check Mutation Verification:
116
+ Score: 57.1% (4/7 mutants killed)
117
+ Status: FAILED (score 57.1% below 80.0%)
118
+ Time: 2.27s
119
+
120
+ Surviving Mutants (3 unverified changes):
121
+ [1] calculator.py:2 Mutation: Replace numeric constant '0.5' with '1.5'
122
+ [2] calculator.py:3 Mutation: Replace numeric constant '0.5' with '1.5'
123
+ [3] calculator.py:3 Mutation: Replace binary operator '*' with '/'
124
+
125
+ Pre-check FAILED: Score 57.1% is below threshold 80.0% (3 surviving mutants).
126
+ ```
127
+
128
+ ### Self-Healing the Test Suite
129
+
130
+ Run with `--heal-tests` (or interactively with `-i`) to automatically synthesize ready-to-run pytest unit tests that target the exact surviving mutants:
131
+
132
+ ```bash
133
+ deployproof check --heal-tests
134
+ ```
135
+
136
+ ```python
137
+ # Generated in tests/test_deployproof_healed.py
138
+ def test_calculate_discount_boundary_rate():
139
+ assert calculate_discount(100.0, 0.5) == 50.0
140
+
141
+ def test_calculate_discount_capped_rate():
142
+ assert calculate_discount(100.0, 0.8) == 50.0
143
+ ```
144
+
145
+ Re-running `deployproof check` immediately passes:
146
+
147
+ ```
148
+ Local Pre-Check Mutation Verification:
149
+ Score: 100.0% (7/7 mutants killed)
150
+ Status: PASSED (threshold: 80.0%)
151
+ Time: 2.31s
152
+
153
+ Surviving Mutants: None (All generated mutants caught by test suite)
154
+ Pre-check clean: 100% of tested basic mutations caught.
155
+ ```
156
+
157
+ ---
158
+
159
+ ## How It Works
160
+
161
+ DeployProof runs in two modes:
162
+
163
+ ### Default: Diff-Scoped Gate (`deployproof check`)
164
+ Evaluates **only the files modified in your git diff**. Because mutants are compiled into warm RAM — no disk writes, no file copies — this mode is significantly faster than traditional mutation tools and completes before your attention switches context.
165
+
166
+ ```bash
167
+ # Check modified files in your current git diff
168
+ deployproof check
169
+
170
+ # Output structured JSON for IDE tooling or custom pipelines
171
+ deployproof check --json
172
+
173
+ # Enforce strict gates on newly introduced mocks or swallowed errors
174
+ deployproof check --strict-mocks --strict-error-handling
175
+ ```
176
+
177
+ ### Full Repository Audit (`deployproof check --full-repo`)
178
+ Evaluates **every tracked Python file** across the entire repository, parallelizing across isolated worker sandboxes:
179
+
180
+ ```bash
181
+ deployproof check --full-repo --workers 8
182
+ ```
183
+
184
+ ### Windows WSL Delegation (`deployproof check --wsl`)
185
+ Translates Windows paths (safely quoting spaces), delegates mutation runs to `mutmut` inside a native Linux environment in WSL, and streams results back to your Windows console:
186
+
187
+ ```bash
188
+ deployproof check --wsl
189
+ ```
190
+
191
+ > ⚙️ **One-Time WSL Setup**: `wsl bash -c "python3 -m venv ~/.deployproof-wsl-venv && ~/.deployproof-wsl-venv/bin/pip install mutmut pytest"`
192
+ > *(If WSL is not configured, DeployProof falls back to the native in-memory engine with a notice.)*
193
+
194
+ ---
195
+
196
+ ## The Verification Gates
197
+
198
+ ### Core: Mutation Testing
199
+
200
+ **Gate 1 — In-Memory AST Mutation Engine**
201
+ Mutates operators (`>=`, `==`, `and`, `or`, `*`), numeric constants, string boundaries, async/await drops, and argument swaps. All mutants are compiled into a single conditional AST and toggled via environment variable — no disk I/O, no file copies.
202
+
203
+ **Gate 2 — Self-Healing Test Synthesizer**
204
+ Analyzes surviving mutants and synthesizes ready-to-run pytest unit tests with inferred parameter signatures, class method instantiation, and boundary value fixtures. Run with `--heal-tests` or `-i` for interactive mode.
205
+
206
+ ---
207
+
208
+ ### Also Included: Security Gates
209
+
210
+ These run alongside the mutation pass and catch categories of failure that mutation testing alone doesn't cover:
211
+
212
+ **Gate 3 — AST OWASP Top 10 SAST Scanner**
213
+ Zero-dependency static scanner: SQL injection, `shell=True`, `os.system`, insecure deserialization (`pickle`, `yaml.load`), path traversals, disabled SSL.
214
+
215
+ **Gate 4 — Secrets & Git History Scanner**
216
+ Shannon entropy scan of session files and the past 50 git commits: OpenAI, Anthropic, AWS, GitHub, and Stripe keys.
217
+
218
+ **Gate 5 — Dependency CVE & Slopsquatting Defense**
219
+ Cross-references requirements against OSV for known CVEs; queries PyPI JSON API in real time to catch hallucinated package names.
220
+
221
+ **Gate 6 — CWE-61 Symlink Sandbox Escape**
222
+ Resolves symlinks and blocks any whose target falls outside the repository root.
223
+
224
+ **Gate 7 — Control Flow & Error Handling**
225
+ Detects bare `except:`, swallowed exceptions, unreachable dead code, and mock leaks (`--strict-mocks`, `--strict-error-handling`).
226
+
227
+ ---
228
+
229
+ ## Architecture & Design Rationale
230
+
231
+ Curious why in-memory AST schemata instead of file rewrites, or how the dual-tier model works?
232
+
233
+ 👉 **Read [DECISIONS.md](DECISIONS.md)** for the complete technical design document, performance trade-off analyses, and threat models.
234
+
235
+ ---
236
+
237
+ ## CI/CD & Pre-Commit Integration
238
+
239
+ ### GitHub Actions
240
+ ```yaml
241
+ name: DeployProof Gate
242
+ on: [push, pull_request]
243
+
244
+ jobs:
245
+ verify:
246
+ runs-on: ubuntu-latest
247
+ steps:
248
+ - uses: actions/checkout@v4
249
+ with:
250
+ fetch-depth: 50
251
+ - uses: actions/setup-python@v5
252
+ with:
253
+ python-version: '3.12'
254
+ - run: pip install -e . && pip install deployproof pytest
255
+ - run: deployproof check --github-actions --workers 4
256
+ ```
257
+
258
+ ### Pre-Commit Framework (`.pre-commit-config.yaml`)
259
+ ```yaml
260
+ repos:
261
+ - repo: https://github.com/SVSPraveen/deployproof
262
+ rev: v1.1.18
263
+ hooks:
264
+ - id: deployproof-check
265
+ ```
266
+
267
+ ---
268
+
269
+ ## Configuration (`pyproject.toml`)
270
+
271
+ ```toml
272
+ [tool.deployproof]
273
+ threshold = 85.0
274
+ workers = 8
275
+ timeout = 15.0
276
+ strict_mocks = true
277
+ strict_error_handling = true
278
+ sast_scanning = true
279
+ history_secrets_scanning = true
280
+ cve_scanning = true
281
+ generate_tests = "tests/test_deployproof_healed.py"
282
+ ```
283
+
284
+ ---
285
+
286
+ ## Full Documentation & CLI Reference
287
+
288
+ For exhaustive CLI flag references, JSON output schemas, and advanced customization:
289
+
290
+ 👉 **[Explore the Interactive DeployProof Portal & Docs Site](https://svspraveen.github.io/deployproof/)**
291
+
292
+ ---
293
+
294
+ ## Contributing
295
+
296
+ Issues and pull requests are welcome. Open an issue first for significant changes so the approach can be discussed before implementation.
297
+
298
+ ## License
299
+
300
+ MIT. See [LICENSE](LICENSE).
301
+
302
+ ---
303
+
304
+ *DeployProof is created & architected by [SVS Praveen](https://github.com/SVSPraveen) — Python developer focused on AI-code verification tooling · [Portfolio](https://svspraveen.vercel.app/) · [LinkedIn](https://www.linkedin.com/in/svs-praveen-s/)*
@@ -4,8 +4,8 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "deployproof"
7
- version = "1.1.16"
8
- description = "Deterministic pre-push quality & security gate for modern Python codebases: In-memory AST mutation testing, credential scanning, and self-healing test synthesis."
7
+ version = "1.1.18"
8
+ description = "DeployProof (Python CLI) — AI-code verification, in-memory AST mutation testing, secrets scanning & self-healing test synthesis for Python by SVS Praveen."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
11
11
  license = "MIT"
@@ -17,6 +17,8 @@ keywords = [
17
17
  "pre-push-gate",
18
18
  "self-healing-tests",
19
19
  "ast-mutation-testing",
20
+ "ai-code-verification",
21
+ "python-cli",
20
22
  "code-quality",
21
23
  "developer-tools",
22
24
  "pytest-plugin",
@@ -1,2 +1,2 @@
1
- """DeployProof: Deterministic quality & security gate for modern Python codebases."""
2
- __version__ = "1.1.16"
1
+ """DeployProof: Deterministic quality & security gate for modern Python codebases."""
2
+ __version__ = "1.1.18"