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.
- {deployproof-1.1.1 → deployproof-1.1.2}/LICENSE +1 -1
- {deployproof-1.1.1 → deployproof-1.1.2}/PKG-INFO +162 -59
- deployproof-1.1.1/src/deployproof.egg-info/PKG-INFO → deployproof-1.1.2/README.md +496 -426
- {deployproof-1.1.1 → deployproof-1.1.2}/pyproject.toml +22 -15
- {deployproof-1.1.1 → deployproof-1.1.2}/src/deployproof/__init__.py +2 -2
- deployproof-1.1.2/src/deployproof/ci.py +271 -0
- deployproof-1.1.2/src/deployproof/cli.py +322 -0
- {deployproof-1.1.1 → deployproof-1.1.2}/src/deployproof/coverage_plugin.py +6 -1
- deployproof-1.1.2/src/deployproof/cve.py +161 -0
- {deployproof-1.1.1 → deployproof-1.1.2}/src/deployproof/dependencies.py +243 -24
- {deployproof-1.1.1 → deployproof-1.1.2}/src/deployproof/diff.py +88 -36
- deployproof-1.1.2/src/deployproof/history_secrets.py +130 -0
- deployproof-1.1.2/src/deployproof/interactive.py +116 -0
- deployproof-1.1.2/src/deployproof/mutator.py +3231 -0
- deployproof-1.1.2/src/deployproof/reporter.py +734 -0
- deployproof-1.1.2/src/deployproof/sast.py +438 -0
- {deployproof-1.1.1 → deployproof-1.1.2}/src/deployproof/secrets.py +52 -48
- {deployproof-1.1.1 → deployproof-1.1.2}/src/deployproof/symlinks.py +9 -4
- deployproof-1.1.2/src/deployproof/synthesizer.py +408 -0
- deployproof-1.1.1/README.md → deployproof-1.1.2/src/deployproof.egg-info/PKG-INFO +529 -395
- {deployproof-1.1.1 → deployproof-1.1.2}/src/deployproof.egg-info/SOURCES.txt +25 -0
- {deployproof-1.1.1 → deployproof-1.1.2}/src/deployproof.egg-info/requires.txt +2 -1
- deployproof-1.1.2/tests/test_advanced_mutation_operators.py +326 -0
- deployproof-1.1.2/tests/test_ci_github.py +182 -0
- {deployproof-1.1.1 → deployproof-1.1.2}/tests/test_cli.py +1 -1
- {deployproof-1.1.1 → deployproof-1.1.2}/tests/test_cli_dependency_scan.py +8 -0
- deployproof-1.1.2/tests/test_cli_symlink_integration.py +31 -0
- deployproof-1.1.2/tests/test_comprehensive_feature_matrix.py +140 -0
- deployproof-1.1.2/tests/test_config_file.py +65 -0
- deployproof-1.1.2/tests/test_cve.py +57 -0
- deployproof-1.1.2/tests/test_dynamic_test_selection.py +106 -0
- {deployproof-1.1.1 → deployproof-1.1.2}/tests/test_edge_cases_validation.py +3 -2
- deployproof-1.1.2/tests/test_env_and_poetry_dependencies.py +140 -0
- deployproof-1.1.2/tests/test_equivalent_mutants.py +155 -0
- deployproof-1.1.2/tests/test_full_parity_matrix.py +184 -0
- deployproof-1.1.2/tests/test_history_secrets.py +62 -0
- deployproof-1.1.2/tests/test_interactive.py +131 -0
- deployproof-1.1.2/tests/test_mutation_schemata.py +138 -0
- {deployproof-1.1.1 → deployproof-1.1.2}/tests/test_mutator.py +5 -5
- deployproof-1.1.2/tests/test_pyproject_config.py +121 -0
- deployproof-1.1.2/tests/test_sast.py +209 -0
- deployproof-1.1.2/tests/test_symlink_escapes_edge_cases.py +52 -0
- deployproof-1.1.2/tests/test_symlink_security_suite.py +54 -0
- deployproof-1.1.2/tests/test_synthesizer.py +246 -0
- deployproof-1.1.2/tests/test_tier1_upgrade_integration.py +88 -0
- deployproof-1.1.1/src/deployproof/cli.py +0 -191
- deployproof-1.1.1/src/deployproof/mutator.py +0 -1854
- deployproof-1.1.1/src/deployproof/reporter.py +0 -339
- {deployproof-1.1.1 → deployproof-1.1.2}/setup.cfg +0 -0
- {deployproof-1.1.1 → deployproof-1.1.2}/src/deployproof/control_flow.py +0 -0
- {deployproof-1.1.1 → deployproof-1.1.2}/src/deployproof/mocks.py +0 -0
- {deployproof-1.1.1 → deployproof-1.1.2}/src/deployproof/wsl.py +0 -0
- {deployproof-1.1.1 → deployproof-1.1.2}/src/deployproof.egg-info/dependency_links.txt +0 -0
- {deployproof-1.1.1 → deployproof-1.1.2}/src/deployproof.egg-info/entry_points.txt +0 -0
- {deployproof-1.1.1 → deployproof-1.1.2}/src/deployproof.egg-info/top_level.txt +0 -0
- {deployproof-1.1.1 → deployproof-1.1.2}/tests/test_baseline_collection_error.py +0 -0
- {deployproof-1.1.1 → deployproof-1.1.2}/tests/test_control_flow.py +0 -0
- {deployproof-1.1.1 → deployproof-1.1.2}/tests/test_dependencies_extractor.py +0 -0
- {deployproof-1.1.1 → deployproof-1.1.2}/tests/test_dependencies_pypi.py +0 -0
- {deployproof-1.1.1 → deployproof-1.1.2}/tests/test_diff.py +0 -0
- {deployproof-1.1.1 → deployproof-1.1.2}/tests/test_import_graph_discovery.py +0 -0
- {deployproof-1.1.1 → deployproof-1.1.2}/tests/test_mocks.py +0 -0
- {deployproof-1.1.1 → deployproof-1.1.2}/tests/test_mutation_suites.py +0 -0
- {deployproof-1.1.1 → deployproof-1.1.2}/tests/test_secrets.py +0 -0
- {deployproof-1.1.1 → deployproof-1.1.2}/tests/test_stress_regressions.py +0 -0
- {deployproof-1.1.1 → deployproof-1.1.2}/tests/test_symlinks.py +0 -0
- {deployproof-1.1.1 → deployproof-1.1.2}/tests/test_wsl.py +0 -0
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: deployproof
|
|
3
|
-
Version: 1.1.
|
|
4
|
-
Summary: Deterministic pre-push quality & security
|
|
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/
|
|
8
|
-
Project-URL: Documentation, https://github.
|
|
9
|
-
Project-URL:
|
|
10
|
-
Project-URL:
|
|
11
|
-
|
|
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
|
-
|
|
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
|
-
|
|
39
|
-
|
|
40
|
-
[](https://pypi.org/project/deployproof/)
|
|
38
|
+
[](https://pypi.org/project/deployproof/)
|
|
41
39
|
[](https://pypi.org/project/deployproof/)
|
|
42
40
|
[](https://github.com/SVSPraveen/DeployProof/actions/workflows/ci.yml)
|
|
43
|
-
[](https://github.com/SVSPraveen/DeployProof)
|
|
42
|
+
[](stress_fixtures/)
|
|
45
43
|
[](LICENSE)
|
|
44
|
+
[](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
|
-
###
|
|
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` → `return None`<br>`raise Exc` → `pass`<br>`assert cond` → `pass`<br>`call()` → `pass` | Proves tests assert returned objects, enforce error branches, and verify side-effect calls. | **Yes** | **Yes** | **Yes** |
|
|
289
|
+
| **String Boundary** | `"admin"` → `"XXadminXX"`<br>`""` → `"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)` → `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()` → `coro()` | Exposes unawaited coroutine leaks in modern FastAPI, Starlette, and asyncio code. | **Yes** | No | No |
|
|
292
|
+
| **Context Manager Bypass** | `with lock:` → *bare body*<br>`async with txn:` → *bare body* | Proves test suite verifies locks, transaction boundaries, and resource cleanup. | **Yes** | No | No |
|
|
293
|
+
| **Dict Fallback Removal** | `d.get(k, default)` → `d.get(k, None)` | Catches implicit fallback assumptions where tests never verify default values. | **Yes** | No | No |
|
|
294
|
+
| **Decorator Removal** | `@auth_required` → *(stripped)*<br>`@lru_cache` → *(stripped)* | Proves tests verify authentication, caching, validation, and rate-limiting wrappers. | **Yes** | Partial | No |
|
|
295
|
+
| **Loop Control** | `break` ↔ `continue` | Exposes untested loop termination criteria and infinite iteration risks. | **Yes** | No | No |
|
|
296
|
+
| **Unary Inversion** | `not x` → `x`<br>`-x` → `+x`<br>`~x` → `x` | Catches inverted boolean flags, negative coordinate shifts, and bitwise flags. | **Yes** | **Yes** | **Yes** |
|
|
297
|
+
| **Comparison & Identity** | `>=` → `>`, `<` → `<=`, `==` → `!=`<br>`in` → `not in`, `is` → `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
|
-
|
|
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
|
-
|
|
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.
|
|
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
|
|
386
|
-
- **
|
|
387
|
-
- **
|
|
388
|
-
- **
|
|
389
|
-
- **
|
|
390
|
-
- **
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
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
|
-
|
|
405
|
-
|
|
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
|
-
|
|
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.
|
|
413
|
-
- **Next:** Reverse test-to-source dependency mapping (see `FUTURE_SCOPE.md`), SARIF 2.1.0
|
|
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
|
|