deployproof 1.1.1__tar.gz → 1.1.2__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 (67) hide show
  1. {deployproof-1.1.1 → deployproof-1.1.2}/LICENSE +1 -1
  2. {deployproof-1.1.1 → deployproof-1.1.2}/PKG-INFO +162 -59
  3. deployproof-1.1.1/src/deployproof.egg-info/PKG-INFO → deployproof-1.1.2/README.md +496 -426
  4. {deployproof-1.1.1 → deployproof-1.1.2}/pyproject.toml +22 -15
  5. {deployproof-1.1.1 → deployproof-1.1.2}/src/deployproof/__init__.py +2 -2
  6. deployproof-1.1.2/src/deployproof/ci.py +271 -0
  7. deployproof-1.1.2/src/deployproof/cli.py +322 -0
  8. {deployproof-1.1.1 → deployproof-1.1.2}/src/deployproof/coverage_plugin.py +6 -1
  9. deployproof-1.1.2/src/deployproof/cve.py +161 -0
  10. {deployproof-1.1.1 → deployproof-1.1.2}/src/deployproof/dependencies.py +243 -24
  11. {deployproof-1.1.1 → deployproof-1.1.2}/src/deployproof/diff.py +88 -36
  12. deployproof-1.1.2/src/deployproof/history_secrets.py +130 -0
  13. deployproof-1.1.2/src/deployproof/interactive.py +116 -0
  14. deployproof-1.1.2/src/deployproof/mutator.py +3231 -0
  15. deployproof-1.1.2/src/deployproof/reporter.py +734 -0
  16. deployproof-1.1.2/src/deployproof/sast.py +438 -0
  17. {deployproof-1.1.1 → deployproof-1.1.2}/src/deployproof/secrets.py +52 -48
  18. {deployproof-1.1.1 → deployproof-1.1.2}/src/deployproof/symlinks.py +9 -4
  19. deployproof-1.1.2/src/deployproof/synthesizer.py +408 -0
  20. deployproof-1.1.1/README.md → deployproof-1.1.2/src/deployproof.egg-info/PKG-INFO +529 -395
  21. {deployproof-1.1.1 → deployproof-1.1.2}/src/deployproof.egg-info/SOURCES.txt +25 -0
  22. {deployproof-1.1.1 → deployproof-1.1.2}/src/deployproof.egg-info/requires.txt +2 -1
  23. deployproof-1.1.2/tests/test_advanced_mutation_operators.py +326 -0
  24. deployproof-1.1.2/tests/test_ci_github.py +182 -0
  25. {deployproof-1.1.1 → deployproof-1.1.2}/tests/test_cli.py +1 -1
  26. {deployproof-1.1.1 → deployproof-1.1.2}/tests/test_cli_dependency_scan.py +8 -0
  27. deployproof-1.1.2/tests/test_cli_symlink_integration.py +31 -0
  28. deployproof-1.1.2/tests/test_comprehensive_feature_matrix.py +140 -0
  29. deployproof-1.1.2/tests/test_config_file.py +65 -0
  30. deployproof-1.1.2/tests/test_cve.py +57 -0
  31. deployproof-1.1.2/tests/test_dynamic_test_selection.py +106 -0
  32. {deployproof-1.1.1 → deployproof-1.1.2}/tests/test_edge_cases_validation.py +3 -2
  33. deployproof-1.1.2/tests/test_env_and_poetry_dependencies.py +140 -0
  34. deployproof-1.1.2/tests/test_equivalent_mutants.py +155 -0
  35. deployproof-1.1.2/tests/test_full_parity_matrix.py +184 -0
  36. deployproof-1.1.2/tests/test_history_secrets.py +62 -0
  37. deployproof-1.1.2/tests/test_interactive.py +131 -0
  38. deployproof-1.1.2/tests/test_mutation_schemata.py +138 -0
  39. {deployproof-1.1.1 → deployproof-1.1.2}/tests/test_mutator.py +5 -5
  40. deployproof-1.1.2/tests/test_pyproject_config.py +121 -0
  41. deployproof-1.1.2/tests/test_sast.py +209 -0
  42. deployproof-1.1.2/tests/test_symlink_escapes_edge_cases.py +52 -0
  43. deployproof-1.1.2/tests/test_symlink_security_suite.py +54 -0
  44. deployproof-1.1.2/tests/test_synthesizer.py +246 -0
  45. deployproof-1.1.2/tests/test_tier1_upgrade_integration.py +88 -0
  46. deployproof-1.1.1/src/deployproof/cli.py +0 -191
  47. deployproof-1.1.1/src/deployproof/mutator.py +0 -1854
  48. deployproof-1.1.1/src/deployproof/reporter.py +0 -339
  49. {deployproof-1.1.1 → deployproof-1.1.2}/setup.cfg +0 -0
  50. {deployproof-1.1.1 → deployproof-1.1.2}/src/deployproof/control_flow.py +0 -0
  51. {deployproof-1.1.1 → deployproof-1.1.2}/src/deployproof/mocks.py +0 -0
  52. {deployproof-1.1.1 → deployproof-1.1.2}/src/deployproof/wsl.py +0 -0
  53. {deployproof-1.1.1 → deployproof-1.1.2}/src/deployproof.egg-info/dependency_links.txt +0 -0
  54. {deployproof-1.1.1 → deployproof-1.1.2}/src/deployproof.egg-info/entry_points.txt +0 -0
  55. {deployproof-1.1.1 → deployproof-1.1.2}/src/deployproof.egg-info/top_level.txt +0 -0
  56. {deployproof-1.1.1 → deployproof-1.1.2}/tests/test_baseline_collection_error.py +0 -0
  57. {deployproof-1.1.1 → deployproof-1.1.2}/tests/test_control_flow.py +0 -0
  58. {deployproof-1.1.1 → deployproof-1.1.2}/tests/test_dependencies_extractor.py +0 -0
  59. {deployproof-1.1.1 → deployproof-1.1.2}/tests/test_dependencies_pypi.py +0 -0
  60. {deployproof-1.1.1 → deployproof-1.1.2}/tests/test_diff.py +0 -0
  61. {deployproof-1.1.1 → deployproof-1.1.2}/tests/test_import_graph_discovery.py +0 -0
  62. {deployproof-1.1.1 → deployproof-1.1.2}/tests/test_mocks.py +0 -0
  63. {deployproof-1.1.1 → deployproof-1.1.2}/tests/test_mutation_suites.py +0 -0
  64. {deployproof-1.1.1 → deployproof-1.1.2}/tests/test_secrets.py +0 -0
  65. {deployproof-1.1.1 → deployproof-1.1.2}/tests/test_stress_regressions.py +0 -0
  66. {deployproof-1.1.1 → deployproof-1.1.2}/tests/test_symlinks.py +0 -0
  67. {deployproof-1.1.1 → deployproof-1.1.2}/tests/test_wsl.py +0 -0
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2026 SVSPraveen
3
+ Copyright (c) 2026 SVS Praveen
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -1,14 +1,15 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: deployproof
3
- Version: 1.1.1
4
- Summary: Deterministic pre-push quality & security verification gate for Python codebases that catches what coverage misses.
3
+ Version: 1.1.2
4
+ Summary: Deterministic pre-push quality & security gate for modern Python codebases: In-memory AST mutation testing, credential scanning, and self-healing test synthesis.
5
5
  Author-email: SVS Praveen <svspraveens@gmail.com>
6
6
  License-Expression: MIT
7
- Project-URL: Homepage, https://github.com/SVSPraveen/DeployProof
8
- Project-URL: Documentation, https://github.com/SVSPraveen/DeployProof#readme
9
- Project-URL: Repository, https://github.com/SVSPraveen/DeployProof.git
10
- Project-URL: Bug Tracker, https://github.com/SVSPraveen/DeployProof/issues
11
- Keywords: code-quality,mutation-testing,security-scanner,developer-tools,pre-push-verification,python-testing,ast-analysis,dependency-security,ai-code,slopsquatting
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,code-quality,developer-tools,pytest-plugin,sast-scanner,credential-scanner,supply-chain-security,slopsquatting,ai-code-defense,python-testing,devops-quality-gate
12
13
  Classifier: Development Status :: 3 - Alpha
13
14
  Classifier: Intended Audience :: Developers
14
15
  Classifier: Programming Language :: Python :: 3
@@ -22,30 +23,30 @@ Classifier: Topic :: Software Development :: Testing
22
23
  Requires-Python: >=3.10
23
24
  Description-Content-Type: text/markdown
24
25
  License-File: LICENSE
26
+ Requires-Dist: pytest>=7.0.0
25
27
  Provides-Extra: dev
26
- Requires-Dist: pytest>=7.0.0; extra == "dev"
27
28
  Requires-Dist: build>=1.0.0; extra == "dev"
28
29
  Requires-Dist: twine>=4.0.0; extra == "dev"
29
30
  Requires-Dist: coverage>=7.0.0; extra == "dev"
31
+ Requires-Dist: pyyaml>=6.0; extra == "dev"
30
32
  Dynamic: license-file
31
33
 
32
34
  # DeployProof
33
35
 
34
- <p align="center">
35
- <img src="assets/deployproof-hero.png" alt="DeployProof Hero Banner" width="100%" />
36
- </p>
36
+ > Deterministic pre-push quality & security gate for modern Python codebases: In-memory AST mutation testing, credential scanning, and self-healing test synthesis. Built for human engineering teams and AI-assisted workflows alike.
37
37
 
38
- > Deterministic pre-push quality & security gate for modern Python codebases: AST mutation testing, credential scanning, sandbox-escape detection, mock-usage alerts, swallowed-exception checks, and dependency hallucination defense. Built for human engineering teams and AI-assisted workflows alike.
39
-
40
- [![PyPI version](https://img.shields.io/badge/pypi-v1.1.1-007ec6.svg)](https://pypi.org/project/deployproof/)
38
+ [![PyPI version](https://img.shields.io/badge/pypi-v1.1.2-007ec6.svg)](https://pypi.org/project/deployproof/)
41
39
  [![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/)
42
40
  [![CI](https://github.com/SVSPraveen/DeployProof/actions/workflows/ci.yml/badge.svg)](https://github.com/SVSPraveen/DeployProof/actions/workflows/ci.yml)
43
- [![Tests](https://img.shields.io/badge/tests-111%20passed-2ea44f.svg)](https://github.com/SVSPraveen/DeployProof)
44
- [![Stress Tests](https://img.shields.io/badge/stress%20tests-11%2F11%20passed-2ea44f.svg)](stress_fixtures/)
41
+ [![Tests](https://img.shields.io/badge/tests-261%20passed-2ea44f.svg)](https://github.com/SVSPraveen/DeployProof)
42
+ [![Stress Tests](https://img.shields.io/badge/stress%20tests-14%2F14%20passed-2ea44f.svg)](stress_fixtures/)
45
43
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
44
+ [![Docs](https://img.shields.io/badge/docs-DeployProof%20Portal-6366f1.svg)](https://svspraveen.github.io/DeployProof/)
46
45
 
47
46
  ---
48
47
 
48
+ > 📖 **[View the Complete Documentation & Interactive Product Portal](https://svspraveen.github.io/DeployProof/)**
49
+
49
50
  ## Why This Exists
50
51
 
51
52
  Modern software development — whether crafted by human engineering teams or generated through AI coding assistants — introduces subtle failure modes that standard linters and line-coverage metrics completely miss:
@@ -275,27 +276,97 @@ Local Pre-Check Mutation Verification:
275
276
 
276
277
  Surviving Mutants: None (All generated mutants caught by test suite)
277
278
 
278
- ====================================================================
279
- Notice: Local pre-check only. Full verified score runs in CI on push (via mutmut).
280
279
  Pre-check clean: 100% of tested basic mutations caught.
281
280
  ```
282
281
 
283
- ### CLI Options & Flags
282
+ ### Advanced Mutation Operators: DeployProof vs Mutmut vs Cosmic Ray
283
+
284
+ DeployProof features an enterprise-grade AST mutation engine specifically engineered for modern Python applications, AI-assisted development, and instantaneous pre-commit gates:
285
+
286
+ | Mutation Category | Operator Transformation | Why It Catches Hard Bugs | DeployProof | mutmut | Cosmic Ray |
287
+ |---|---|---|:---:|:---:|:---:|
288
+ | **Statement Deletion** | `return val` &rarr; `return None`<br>`raise Exc` &rarr; `pass`<br>`assert cond` &rarr; `pass`<br>`call()` &rarr; `pass` | Proves tests assert returned objects, enforce error branches, and verify side-effect calls. | **Yes** | **Yes** | **Yes** |
289
+ | **String Boundary** | `"admin"` &rarr; `"XXadminXX"`<br>`""` &rarr; `"XX"` | Exposes tests that pass only because strings are truthy or never strictly asserted. Docstrings preserved. | **Yes** | **Yes** | Partial |
290
+ | **Argument Swapping** | `func(a, b)` &rarr; `func(b, a)` | Catches signature confusion bugs when parameters share types (e.g. `(user_id, account_id)`). | **Yes** | No | No |
291
+ | **Async / Await Dropping** | `await coro()` &rarr; `coro()` | Exposes unawaited coroutine leaks in modern FastAPI, Starlette, and asyncio code. | **Yes** | No | No |
292
+ | **Context Manager Bypass** | `with lock:` &rarr; *bare body*<br>`async with txn:` &rarr; *bare body* | Proves test suite verifies locks, transaction boundaries, and resource cleanup. | **Yes** | No | No |
293
+ | **Dict Fallback Removal** | `d.get(k, default)` &rarr; `d.get(k, None)` | Catches implicit fallback assumptions where tests never verify default values. | **Yes** | No | No |
294
+ | **Decorator Removal** | `@auth_required` &rarr; *(stripped)*<br>`@lru_cache` &rarr; *(stripped)* | Proves tests verify authentication, caching, validation, and rate-limiting wrappers. | **Yes** | Partial | No |
295
+ | **Loop Control** | `break` &harr; `continue` | Exposes untested loop termination criteria and infinite iteration risks. | **Yes** | No | No |
296
+ | **Unary Inversion** | `not x` &rarr; `x`<br>`-x` &rarr; `+x`<br>`~x` &rarr; `x` | Catches inverted boolean flags, negative coordinate shifts, and bitwise flags. | **Yes** | **Yes** | **Yes** |
297
+ | **Comparison & Identity** | `>=` &rarr; `>`, `<` &rarr; `<=`, `==` &rarr; `!=`<br>`in` &rarr; `not in`, `is` &rarr; `is not` | Detects off-by-one boundary regressions and inverted collection filters. | **Yes** | **Yes** | **Yes** |
298
+ | **Git Diff Speed** | **2 – 5 Seconds** *(Diff-Scoped + Fail-Fast)* | Instant feedback in pre-commit hooks and local developer workflows. | **Yes** | Hours | Hours |
299
+ | **All-in-One Security** | **AST SAST + Leaked Secrets + CVEs + Slopsquatting** | Complete security & test integrity gate in a single tool and report. | **Yes** | No | No |
300
+
301
+ ### Enterprise AST SAST Scanner (OWASP Top 10 Coverage)
302
+
303
+ DeployProof includes a zero-dependency, high-precision AST SAST engine built natively into the pre-push gate, covering the most critical Python security risks:
304
+
305
+ | Rule ID | Vulnerability Class | OWASP Category | CWE | Severity | Example Pattern Detected |
306
+ |---|---|---|---|:---:|---|
307
+ | **`DP-SAST-001`** | **Arbitrary Code Execution** | A03:2021-Injection | CWE-95 | `CRITICAL` | `eval(expr)`, `exec(user_code)`, `__import__(name)` |
308
+ | **`DP-SAST-002`** | **Command Injection** | A03:2021-Injection | CWE-78 | `CRITICAL` | `os.system(cmd)`, `os.popen(cmd)`, `pty.spawn(cmd)` |
309
+ | **`DP-SAST-003`** | **Subprocess Command Injection** | A03:2021-Injection | CWE-78 | `HIGH` | `subprocess.run(cmd, shell=True)` |
310
+ | **`DP-SAST-004`** | **Insecure Deserialization** | A08:2021-Integrity | CWE-502 | `CRITICAL` | `pickle.loads(b)`, `marshal.loads(b)`, `shelve.open(p)` |
311
+ | **`DP-SAST-005`** | **Unsafe YAML Deserialization** | A08:2021-Integrity | CWE-502 | `HIGH` | `yaml.load(text)` without `SafeLoader`, `yaml.unsafe_load()` |
312
+ | **`DP-SAST-006`** | **SQL Injection (SQLi)** | A03:2021-Injection | CWE-89 | `HIGH` | `cursor.execute(f"SELECT * WHERE id={id}")` |
313
+ | **`DP-SAST-007`** | **Cross-Site Scripting (XSS) / SSTI** | A03:2021-Injection | CWE-79 | `HIGH` | `Markup(user_input)`, `render_template_string(f"...")` |
314
+ | **`DP-SAST-008`** | **Path Traversal / Arbitrary File Read** | A01:2021-Access Control | CWE-22 | `HIGH` | `open(f"/data/{filename}")`, `shutil.rmtree("/tmp/" + id)` |
315
+ | **`DP-SAST-009`** | **Insecure Cryptographic Algorithms** | A02:2021-Crypto | CWE-327 | `MEDIUM` | `hashlib.md5()`, `hashlib.sha1()`, `Crypto.Cipher.DES` |
316
+ | **`DP-SAST-010`** | **Disabled TLS/SSL Verification** | A05:2021-Misconfiguration | CWE-295 | `HIGH` | `requests.get(url, verify=False)`, `ssl._create_unverified_context()` |
317
+ | **`DP-SAST-011`** | **Production Debug / Global Bindings** | A05:2021-Misconfiguration | CWE-489 | `HIGH` | `app.run(host="0.0.0.0", debug=True)` |
318
+ | **`DP-SAST-012`** | **Insecure Randomness for Secrets** | A07:2021-Auth | CWE-338 | `MEDIUM` | `token = random.randint(...)` (instead of `secrets.token_hex`) |
319
+ | **`DP-SAST-013`** | **XML External Entity (XXE)** | A08:2021-Integrity | CWE-611 | `MEDIUM` | `ElementTree.parse(user_xml)` without `defusedxml` |
284
320
 
285
- | Flag | Description |
286
- |---|---|
287
- | `deployproof check` | Run all 6 pre-push verification checks (informational warnings for mocks and error handling). |
288
- | `deployproof check --json` | Output structured, machine-readable JSON for CI/CD pipelines, IDEs, and automation. |
289
- | `deployproof check --strict-mocks` | Fail the gate (exit code 1) if new `unittest.mock`, `mocker`, or `monkeypatch` usage is introduced. |
290
- | `deployproof check --strict-error-handling` | Fail the gate (exit code 1) if bare excepts, swallowed exceptions, or dead code are detected. |
291
- | `deployproof check --files <paths...>` | Explicitly evaluate specific files (bypasses git diff). |
292
- | `deployproof check --threshold <float>` | Minimum mutation score percentage required to pass (default: `80.0`). |
293
- | `deployproof check --base <ref>` | Base git ref (branch/commit/tag) to diff against. |
294
- | `deployproof check --full-repo` | Audit all tracked files across the entire repository root (respecting `.gitignore`), using isolated parallel workers. |
295
- | `deployproof check --workers <int>` | Set the number of isolated parallel worker processes for `--full-repo` scans (default: auto-detected CPU count capped at 8). |
296
- | `deployproof check --wsl` | Delegate mutation testing to `mutmut` inside WSL (Windows only). |
321
+ ---
297
322
 
298
- > **Note:** `deployproof check --wsl` (Windows only) is newer and less battle-tested than the core checks — [file an issue](https://github.com/SVSPraveen/DeployProof/issues) if you hit something.
323
+ ### Complete CLI Commands & Flags Reference
324
+
325
+ DeployProof provides a rich command-line interface with fine-grained control over every gate:
326
+
327
+ #### Core Commands
328
+
329
+ | Command | Syntax | Description | Default |
330
+ |---|---|---|---|
331
+ | **Check (Default Gate)** | `deployproof check [options]` | Runs all 7 deterministic pre-push verification gates on the modified files in the current git working tree session. | Evaluates git working tree diff against `HEAD` |
332
+ | **Initialize Pre-Push Hook** | `deployproof init` | Automatically installs the DeployProof pre-push hook into `.git/hooks/pre-push` and generates an initial `pyproject.toml` `[tool.deployproof]` configuration block. | Installs executable shell/powershell hook |
333
+ | **Inspect Diff Scope** | `deployproof diff` | Prints the detected git diff status, modified source files, and test files currently in scope without running tests. | Shows current diff session files |
334
+ | **Version** | `deployproof --version` | Displays the current installed version of DeployProof. | Displays `deployproof 1.1.2` |
335
+ | **Help** | `deployproof --help` | Displays full interactive command usage and flag descriptions. | Prints CLI help manual |
336
+
337
+ #### Mutation Testing & Self-Healing Options
338
+
339
+ | Flag | Short | Type | Description | Default |
340
+ |---|---|---|---|---|
341
+ | `--threshold <float>` | `-t` | `float` | Minimum mutation score percentage required to pass the verification gate (e.g. `--threshold 85.0`). | `80.0` |
342
+ | `--workers <int>` | `-w` | `int` | Number of isolated parallel worker processes for mutation test sandboxes (e.g. `--workers 12`). | Auto-detected CPU count |
343
+ | `--heal-tests [path]` | | `path` | Synthesizes verified, ready-to-run pytest test cases with boundary inversion heuristics to kill surviving mutants. Output path defaults to `tests/test_deployproof_healed.py`. | Disabled unless specified |
344
+ | `--generate-tests [path]` | | `path` | Alias for `--heal-tests`. | Disabled |
345
+ | `--interactive` | `-i` | `flag` | Interactive quick-fix mode. Prompts in the terminal with single-keystroke `[y/N]` confirmation to automatically inspect and append synthesized tests. | Disabled (auto-detects non-TTY for CI safety) |
346
+ | `--timeout <float>` | | `float` | Maximum timeout in seconds allowed for a single mutant test execution before killing the process. | `10.0`s |
347
+ | `--full-repo` | | `flag` | Audits all tracked Python files across the entire repository root (respecting `.gitignore`), using isolated multi-worker sandboxes. | Diff-scoped to current session |
348
+ | `--files <paths...>` | | `paths` | Explicitly evaluate specific files or directories, completely bypassing git diff resolution. | Git working tree diff |
349
+ | `--base <ref>` | | `string` | Base git reference (branch, commit hash, or tag) to calculate diff against (e.g. `--base origin/main`). | Auto-detected upstream ref |
350
+ | `--wsl` | | `flag` | Delegates mutation testing to native Linux environment inside Windows Subsystem for Linux (WSL). | Native OS execution |
351
+
352
+ #### Security & Quality Gates
353
+
354
+ | Flag | Description | Default |
355
+ |---|---|---|
356
+ | `--sast` / `--no-sast` | Enable or disable the AST-based OWASP Top 10 static security analysis scanner. Detects SQLi, command injection, insecure deserialization, path traversals, etc. | Enabled (`true`) |
357
+ | `--scan-git-history` / `--no-scan-git-history` | Scan past git commits using Shannon entropy analysis to catch committed API keys, tokens, and private credentials. | Enabled (`true`) |
358
+ | `--history-depth <int>` | Number of past git commits to analyze when `--scan-git-history` is active. | `50` commits |
359
+ | `--check-cve` / `--no-check-cve` | Query the open OSV (Open Source Vulnerabilities) database in real time for known CVE advisories affecting dependencies. | Enabled (`true`) |
360
+ | `--strict-mocks` / `--no-strict-mocks` | Fail the gate (exit code 1) if modified tests introduce mock imports (`unittest.mock`, `mocker`, `monkeypatch`), proving real behavior instead of mocked stubs. | Disabled (`false`) |
361
+ | `--strict-error-handling` / `--no-strict-error-handling` | Fail the gate (exit code 1) if bare `except:`, swallowed exceptions (`except Exception: pass`), or unreachable dead code are detected. | Disabled (`false`) |
362
+
363
+ #### Reporting, CI/CD & Configuration
364
+
365
+ | Flag | Short | Description | Default |
366
+ |---|---|---|---|
367
+ | `--json` | | Output structured machine-readable JSON containing all findings across all 7 verification gates. Ideal for custom CI pipelines, IDE extensions, and dashboards. | Human-readable terminal output |
368
+ | `--github-actions` | `--ci` | Emit inline GitHub Actions annotations (`::error file=...,line=...::`, `::warning::`) on PR diff lines and write a complete Markdown dashboard to `$GITHUB_STEP_SUMMARY`. | Auto-detected when `GITHUB_ACTIONS=true` |
369
+ | `--config <path>` | | Explicit path to a `pyproject.toml` or custom configuration file. | Auto-discovers `pyproject.toml` in repo root |
299
370
 
300
371
  ### Machine-Readable Output (`--json`)
301
372
 
@@ -309,7 +380,7 @@ deployproof check --json
309
380
 
310
381
  ```json
311
382
  {
312
- "version": "1.1.1",
383
+ "version": "1.1.11",
313
384
  "status": "passed",
314
385
  "summary": {
315
386
  "target_files_count": 1,
@@ -380,37 +451,69 @@ deployproof check --json
380
451
  }
381
452
  ```
382
453
 
383
- ## What It Checks
384
-
385
- - **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. Features atomic file restoration protected by `SIGINT`/`SIGTERM`/`SIGBREAK` signal handlers to ensure interrupted runs never leave mutated code on disk.
386
- - **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.
387
- - **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).
388
- - **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.
389
- - **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.
390
- - **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.
391
-
392
- ## What This Doesn't Do
393
-
394
- - **Test-only diffs are not yet caught.** If a diff modifies or weakens assertions in a test file without changing the corresponding source file, DeployProof currently sees zero modified source lines and passes with 0 mutants evaluated. This is a known gap — see [INVESTIGATION_blastradius.md](INVESTIGATION_blastradius.md) for the reverse-mapping approach being evaluated to close it. Until this lands, DeployProof does not protect against test suites being weakened directly.
395
- - **Diff-scoping vs Full Audits:** Standard `deployproof check` is intentionally scoped strictly to files modified in the active git diff (for 2–5s speed). To audit every file in the entire repository, explicitly pass the `--full-repo` flag.
396
- - **Python only.** Mutation testing and import extraction currently support Python files only. Other languages are not scanned.
397
- - **No auto-fix.** DeployProof reports findings; it does not modify your code, rewrite imports, or suggest patches.
398
- - **No IDE plugin yet.** There is no VS Code extension or JetBrains plugin. The CLI is the interface. IDE integration is on the roadmap.
399
-
400
- ## See It Catch Real Bugs
401
-
402
- Clone this repository and run the standalone stress-test suite to see DeployProof evaluate 11 planted edge cases:
454
+ ## What It Checks (The 7 Verification Gates)
455
+
456
+ - **Gate 1: In-Memory Schemata Mutation Testing** — Mutates AST operators (`>=`, `==`, `and`, `or`, `*`, numeric constants, string boundaries) and switches mutants in warm RAM (`__DEPLOYPROOF_MUTANT__`), completely bypassing disk I/O.
457
+ - **Gate 2: Actionable Self-Healing Test Synthesis** — When mutants survive, `--heal-tests` and `-i` synthesize ready-to-run `pytest` unit tests with argument inference, class method instantiation, and boundary value checks to eliminate gaps.
458
+ - **Gate 3: AST OWASP Top 10 SAST Scanner** — Scans AST syntax trees for critical security flaws (SQL injection, command execution with `shell=True`, insecure deserialization, SSRF, hardcoded JWT keys).
459
+ - **Gate 4: Secrets & 50-Commit Git History Scanner** — Scans modified files and past 50 git commits for hardcoded API keys (OpenAI, Anthropic, AWS, GitHub, Stripe, private keys) and high-entropy secrets using Shannon entropy analysis.
460
+ - **Gate 5: Dependency CVE & Slopsquatting Defense** — Cross-references dependencies against the OSV vulnerability database and queries PyPI JSON API to detect hallucinated LLM packages.
461
+ - **Gate 6: CWE-61 Symlink Sandbox Escape Gate** — Resolves symbolic links and flags any whose target escapes the repository root (GhostApproval sandbox traversal defense).
462
+ - **Gate 7: Control Flow & Swallowed Exceptions Gate** — AST detector for bare `except:` without re-raise, silently swallowed exceptions (`except Exception: pass`), dead code, and mock leaks (`--strict-mocks`, `--strict-error-handling`).
463
+
464
+ ## Configuration (`pyproject.toml`)
465
+
466
+ DeployProof natively supports standard PEP 518 `pyproject.toml` configuration under `[tool.deployproof]`:
467
+
468
+ ```toml
469
+ [tool.deployproof]
470
+ threshold = 85.0
471
+ workers = 8
472
+ timeout = 15.0
473
+ strict_mocks = true
474
+ strict_error_handling = true
475
+ sast_scanning = true
476
+ history_secrets_scanning = true
477
+ cve_scanning = true
478
+ generate_tests = "tests/test_deployproof_healed.py"
479
+ ```
403
480
 
404
- ```bash
405
- python stress_fixtures/run_stress_tests.py
481
+ ## CI/CD & Pre-Commit Integration
482
+
483
+ ### GitHub Actions
484
+ Add `.github/workflows/deployproof.yml` to automatically emit PR inline annotations and visual Markdown step summaries:
485
+
486
+ ```yaml
487
+ name: DeployProof Gate
488
+ on: [push, pull_request]
489
+
490
+ jobs:
491
+ verify:
492
+ runs-on: ubuntu-latest
493
+ steps:
494
+ - uses: actions/checkout@v4
495
+ with:
496
+ fetch-depth: 50
497
+ - uses: actions/setup-python@v5
498
+ with:
499
+ python-version: '3.12'
500
+ - run: pip install -e . && pip install deployproof pytest
501
+ - run: deployproof check --github-actions --workers 4
406
502
  ```
407
503
 
408
- Fixtures cover weak test suites, zero-test orphan modules, planted OpenAI/AWS credentials, GhostApproval sandbox-escape traps, swallowed exceptions/dead code, and mock-masked broken implementations.
504
+ ### Pre-Commit Framework (.pre-commit-config.yaml)
505
+ ```yaml
506
+ repos:
507
+ - repo: https://github.com/SVSPraveen/DeployProof
508
+ rev: v1.1.2
509
+ hooks:
510
+ - id: deployproof-check
511
+ ```
409
512
 
410
513
  ## Status & Roadmap
411
514
 
412
- - **Current (v1.1.1):** Diff-scoped AST mutation testing (with recursive discovery and `SIGINT`/`SIGTERM`/`SIGBREAK` signal-safe disk restoration), **Full Repository Audit Mode (`--full-repo`)** with isolated parallel multi-worker sandboxes and AST import-graph test discovery, baseline test-collection failure isolation with distinct exit code `2`, entropy-driven value-based secrets scanner, GhostApproval symlink sandbox-escape detector, PyPI dependency hallucination / slopsquatting scanner (with import-to-distribution translation, recursive `-r` requirements scanning, and dynamic import detection via `importlib` / `__import__`), mock-introduction detector (`--strict-mocks`), control-flow / swallowed-exception scanner (`--strict-error-handling`), 11/11 launch-day stress test suite, **111 unit tests**, live unbuffered progress streaming, and machine-readable `--json` output.
413
- - **Next:** Reverse test-to-source dependency mapping (see `FUTURE_SCOPE.md`), SARIF 2.1.0 PR annotations, and multi-language mutation rule packs.
515
+ - **Current (v1.1.2):** In-Memory AST Schemata Mutation Testing, Actionable Self-Healing Test Synthesizer (`--heal-tests`), Interactive Quick-Fix Mode (`-i`), `pyproject.toml` `[tool.deployproof]` configuration engine, GitHub Actions native inline annotations and `$GITHUB_STEP_SUMMARY` dashboard, `.pre-commit-hooks.yaml` support, Full Repository Audit Mode (`--full-repo`) with isolated multi-worker sandboxes, AST OWASP Top 10 SAST scanner, 50-commit git history secrets scanner, OSV CVE database verification, GhostApproval symlink sandbox escape detector, **261 unit tests**, and complete `/docs` product portal.
516
+ - **Next:** Reverse test-to-source dependency mapping (see `FUTURE_SCOPE.md`), SARIF 2.1.0 report exporter, and multi-language mutation rule packs.
414
517
 
415
518
  ## Contributing
416
519
 
@@ -422,5 +525,5 @@ MIT. See [LICENSE](LICENSE).
422
525
 
423
526
  ---
424
527
 
425
- *Created by [SVS Praveen](https://github.com/SVSPraveen) · [Portfolio](https://svspraveen.vercel.app/) · [LinkedIn](https://www.linkedin.com/in/svs-praveen-s/)*
528
+ *Created & Architected by [SVS Praveen](https://github.com/SVSPraveen) · [Portfolio](https://svspraveen.vercel.app/) · [LinkedIn](https://www.linkedin.com/in/svs-praveen-s/)*
426
529