deployproof 0.1.2__tar.gz → 0.1.6__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-0.1.6/PKG-INFO +207 -0
- deployproof-0.1.6/README.md +177 -0
- {deployproof-0.1.2 → deployproof-0.1.6}/pyproject.toml +17 -7
- {deployproof-0.1.2 → deployproof-0.1.6}/src/deployproof/__init__.py +1 -1
- {deployproof-0.1.2 → deployproof-0.1.6}/src/deployproof/cli.py +145 -36
- deployproof-0.1.6/src/deployproof/control_flow.py +261 -0
- {deployproof-0.1.2 → deployproof-0.1.6}/src/deployproof/dependencies.py +218 -55
- {deployproof-0.1.2 → deployproof-0.1.6}/src/deployproof/diff.py +53 -0
- deployproof-0.1.6/src/deployproof/mocks.py +244 -0
- {deployproof-0.1.2 → deployproof-0.1.6}/src/deployproof/mutator.py +80 -0
- deployproof-0.1.6/src/deployproof/reporter.py +623 -0
- deployproof-0.1.6/src/deployproof.egg-info/PKG-INFO +207 -0
- {deployproof-0.1.2 → deployproof-0.1.6}/src/deployproof.egg-info/SOURCES.txt +4 -0
- deployproof-0.1.6/tests/test_cli.py +197 -0
- {deployproof-0.1.2 → deployproof-0.1.6}/tests/test_cli_dependency_scan.py +104 -0
- deployproof-0.1.6/tests/test_control_flow.py +205 -0
- {deployproof-0.1.2 → deployproof-0.1.6}/tests/test_dependencies_extractor.py +119 -22
- deployproof-0.1.6/tests/test_mocks.py +184 -0
- deployproof-0.1.6/tests/test_mutator.py +137 -0
- deployproof-0.1.2/PKG-INFO +0 -108
- deployproof-0.1.2/README.md +0 -79
- deployproof-0.1.2/src/deployproof/reporter.py +0 -281
- deployproof-0.1.2/src/deployproof.egg-info/PKG-INFO +0 -108
- deployproof-0.1.2/tests/test_cli.py +0 -88
- deployproof-0.1.2/tests/test_mutator.py +0 -53
- {deployproof-0.1.2 → deployproof-0.1.6}/LICENSE +0 -0
- {deployproof-0.1.2 → deployproof-0.1.6}/setup.cfg +0 -0
- {deployproof-0.1.2 → deployproof-0.1.6}/src/deployproof/secrets.py +0 -0
- {deployproof-0.1.2 → deployproof-0.1.6}/src/deployproof/symlinks.py +0 -0
- {deployproof-0.1.2 → deployproof-0.1.6}/src/deployproof/wsl.py +0 -0
- {deployproof-0.1.2 → deployproof-0.1.6}/src/deployproof.egg-info/dependency_links.txt +0 -0
- {deployproof-0.1.2 → deployproof-0.1.6}/src/deployproof.egg-info/entry_points.txt +0 -0
- {deployproof-0.1.2 → deployproof-0.1.6}/src/deployproof.egg-info/requires.txt +0 -0
- {deployproof-0.1.2 → deployproof-0.1.6}/src/deployproof.egg-info/top_level.txt +0 -0
- {deployproof-0.1.2 → deployproof-0.1.6}/tests/test_dependencies_pypi.py +0 -0
- {deployproof-0.1.2 → deployproof-0.1.6}/tests/test_diff.py +0 -0
- {deployproof-0.1.2 → deployproof-0.1.6}/tests/test_edge_cases_validation.py +0 -0
- {deployproof-0.1.2 → deployproof-0.1.6}/tests/test_mutation_suites.py +0 -0
- {deployproof-0.1.2 → deployproof-0.1.6}/tests/test_secrets.py +0 -0
- {deployproof-0.1.2 → deployproof-0.1.6}/tests/test_stress_regressions.py +0 -0
- {deployproof-0.1.2 → deployproof-0.1.6}/tests/test_symlinks.py +0 -0
- {deployproof-0.1.2 → deployproof-0.1.6}/tests/test_wsl.py +0 -0
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: deployproof
|
|
3
|
+
Version: 0.1.6
|
|
4
|
+
Summary: A deterministic AI-code deployability checker that catches what coverage misses.
|
|
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://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: ai-code,mutation-testing,security-scanner,slopsquatting,ghostapproval,pre-push-verification,ast-analysis,dependency-security
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Classifier: Topic :: Security
|
|
20
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
21
|
+
Classifier: Topic :: Software Development :: Testing
|
|
22
|
+
Requires-Python: >=3.10
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
License-File: LICENSE
|
|
25
|
+
Provides-Extra: dev
|
|
26
|
+
Requires-Dist: pytest>=7.0.0; extra == "dev"
|
|
27
|
+
Requires-Dist: build>=1.0.0; extra == "dev"
|
|
28
|
+
Requires-Dist: twine>=4.0.0; extra == "dev"
|
|
29
|
+
Dynamic: license-file
|
|
30
|
+
|
|
31
|
+
# DeployProof
|
|
32
|
+
|
|
33
|
+
> Deterministic pre-push verification for AI-assisted codebases: AST mutation testing, credential scanning, sandbox-escape detection, mock-usage alerts, swallowed-exception checks, and dependency hallucination defense.
|
|
34
|
+
|
|
35
|
+
[](https://pypi.org/project/deployproof/)
|
|
36
|
+
[](https://pypi.org/project/deployproof/)
|
|
37
|
+
[](https://github.com/SVSPraveen/DeployProof)
|
|
38
|
+
[](LICENSE)
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Why This Exists
|
|
43
|
+
|
|
44
|
+
AI-assisted development introduces subtle failure modes that standard linters and coverage tools miss: test suites with high line coverage but near-zero mutation scores, hardcoded credentials generated in passing, symlinks that deceive approval prompts into escaping the repository sandbox, silently swallowed exceptions, and package names hallucinated by LLMs that don't exist on PyPI. DeployProof catches these at the pre-push stage, before they reach CI or production.
|
|
45
|
+
|
|
46
|
+
## Install
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
pip install deployproof
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Requires Python 3.10+.
|
|
53
|
+
|
|
54
|
+
## Quickstart
|
|
55
|
+
|
|
56
|
+
Initialize in your repository:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
deployproof init
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Run all verification checks against changes in the current session (git diff):
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
deployproof check
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Output includes a section for each check — symlink scan, secrets scan, dependency scan, mock detection, control flow analysis, and mutation score — with a pass/fail line at the bottom. Exit code is non-zero on any finding that should block a push.
|
|
69
|
+
|
|
70
|
+
### CLI Options & Flags
|
|
71
|
+
|
|
72
|
+
| Flag | Description |
|
|
73
|
+
|---|---|
|
|
74
|
+
| `deployproof check` | Run all 6 pre-push verification checks (informational warnings for mocks and error handling). |
|
|
75
|
+
| `deployproof check --json` | Output structured, machine-readable JSON for CI/CD pipelines, IDEs, and automation. |
|
|
76
|
+
| `deployproof check --strict-mocks` | Fail the gate (exit code 1) if new `unittest.mock`, `mocker`, or `monkeypatch` usage is introduced. |
|
|
77
|
+
| `deployproof check --strict-error-handling` | Fail the gate (exit code 1) if bare excepts, swallowed exceptions, or dead code are detected. |
|
|
78
|
+
| `deployproof check --files <paths...>` | Explicitly evaluate specific files (bypasses git diff). |
|
|
79
|
+
| `deployproof check --threshold <float>` | Minimum mutation score percentage required to pass (default: `80.0`). |
|
|
80
|
+
| `deployproof check --base <ref>` | Base git ref (branch/commit/tag) to diff against. |
|
|
81
|
+
| `deployproof check --wsl` | Delegate mutation testing to `mutmut` inside WSL (Windows only). |
|
|
82
|
+
|
|
83
|
+
### Machine-Readable Output (`--json`)
|
|
84
|
+
|
|
85
|
+
DeployProof provides a stable structured JSON schema for CI/CD pipelines, IDEs, and automation:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
deployproof check --json
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
#### JSON Output Schema
|
|
92
|
+
|
|
93
|
+
```json
|
|
94
|
+
{
|
|
95
|
+
"version": "0.1.6",
|
|
96
|
+
"status": "passed",
|
|
97
|
+
"summary": {
|
|
98
|
+
"target_files_count": 1,
|
|
99
|
+
"mutation_score": 100.0,
|
|
100
|
+
"threshold": 80.0,
|
|
101
|
+
"secrets_found": 0,
|
|
102
|
+
"symlink_escapes_found": 0,
|
|
103
|
+
"dependency_findings": {
|
|
104
|
+
"high_risk": 0,
|
|
105
|
+
"medium_risk": 0,
|
|
106
|
+
"ok": 1,
|
|
107
|
+
"unknown": 0,
|
|
108
|
+
"unscanned": 0
|
|
109
|
+
},
|
|
110
|
+
"mock_usages_found": 0,
|
|
111
|
+
"control_flow_findings": 0,
|
|
112
|
+
"strict_mocks_active": false,
|
|
113
|
+
"strict_mocks_triggered": false,
|
|
114
|
+
"strict_error_handling_active": false,
|
|
115
|
+
"strict_error_handling_triggered": false
|
|
116
|
+
},
|
|
117
|
+
"scope": {
|
|
118
|
+
"target_files": [
|
|
119
|
+
{
|
|
120
|
+
"file": "app.py",
|
|
121
|
+
"loc": 45,
|
|
122
|
+
"is_large": false
|
|
123
|
+
}
|
|
124
|
+
]
|
|
125
|
+
},
|
|
126
|
+
"mutation_testing": {
|
|
127
|
+
"score": 100.0,
|
|
128
|
+
"threshold": 80.0,
|
|
129
|
+
"total_mutants": 6,
|
|
130
|
+
"killed_mutants": 6,
|
|
131
|
+
"survived_mutants_count": 0,
|
|
132
|
+
"duration_seconds": 1.2,
|
|
133
|
+
"surviving_mutants": [],
|
|
134
|
+
"skipped_constructs": [],
|
|
135
|
+
"untested_files": []
|
|
136
|
+
},
|
|
137
|
+
"secrets": {
|
|
138
|
+
"clean": true,
|
|
139
|
+
"files_scanned": 1,
|
|
140
|
+
"findings": []
|
|
141
|
+
},
|
|
142
|
+
"symlinks": {
|
|
143
|
+
"clean": true,
|
|
144
|
+
"files_scanned": 1,
|
|
145
|
+
"findings": []
|
|
146
|
+
},
|
|
147
|
+
"dependencies": {
|
|
148
|
+
"clean": true,
|
|
149
|
+
"total_scanned": 1,
|
|
150
|
+
"findings": [],
|
|
151
|
+
"unscanned_sources": []
|
|
152
|
+
},
|
|
153
|
+
"mocks": {
|
|
154
|
+
"clean": true,
|
|
155
|
+
"strict_gate_triggered": false,
|
|
156
|
+
"findings": []
|
|
157
|
+
},
|
|
158
|
+
"control_flow": {
|
|
159
|
+
"clean": true,
|
|
160
|
+
"strict_gate_triggered": false,
|
|
161
|
+
"findings": []
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
## What It Checks
|
|
167
|
+
|
|
168
|
+
- **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.
|
|
169
|
+
- **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.
|
|
170
|
+
- **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).
|
|
171
|
+
- **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.
|
|
172
|
+
- **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.
|
|
173
|
+
- **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.
|
|
174
|
+
|
|
175
|
+
## What This Doesn't Do
|
|
176
|
+
|
|
177
|
+
- **Not a full-repo audit.** Checks are scoped to files changed in the current session (git diff). Files you haven't touched are not re-evaluated.
|
|
178
|
+
- **Python only.** Mutation testing and import extraction currently support Python files only. Other languages are not scanned.
|
|
179
|
+
- **No auto-fix.** DeployProof reports findings; it does not modify your code, rewrite imports, or suggest patches.
|
|
180
|
+
- **No IDE plugin yet.** There is no VS Code extension or JetBrains plugin. The CLI is the interface. IDE integration is on the roadmap.
|
|
181
|
+
|
|
182
|
+
## See It Catch Real Bugs
|
|
183
|
+
|
|
184
|
+
Clone this repository and run the standalone stress-test suite to see DeployProof evaluate 7 planted edge cases:
|
|
185
|
+
|
|
186
|
+
```bash
|
|
187
|
+
python stress_fixtures/run_stress_tests.py
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
Fixtures cover weak test suites, zero-test orphan modules, planted OpenAI/AWS credentials, and GhostApproval sandbox-escape traps.
|
|
191
|
+
|
|
192
|
+
## Status & Roadmap
|
|
193
|
+
|
|
194
|
+
- **Current (v0.1.6):** Diff-scoped AST mutation testing, secrets scanner (including unquoted .env values), GhostApproval symlink sandbox-escape detector, PyPI dependency hallucination / slopsquatting scanner (with recursive `-r` requirements scanning and dynamic import detection via `importlib` / `__import__`), mock-introduction detector (`--strict-mocks`), control-flow / swallowed-exception scanner (`--strict-error-handling`), machine-readable `--json` output, and Tier 2 CI verification via GitHub Actions (mutmut).
|
|
195
|
+
- **Next:** Multi-language mutation support and expanded ecosystem rule packs.
|
|
196
|
+
|
|
197
|
+
## Contributing
|
|
198
|
+
|
|
199
|
+
Issues and pull requests are welcome. Open an issue first for significant changes so the approach can be discussed before implementation.
|
|
200
|
+
|
|
201
|
+
## License
|
|
202
|
+
|
|
203
|
+
MIT. See [LICENSE](LICENSE).
|
|
204
|
+
|
|
205
|
+
---
|
|
206
|
+
|
|
207
|
+
*Created by [SVS Praveen](https://github.com/SVSPraveen) · [Portfolio](https://svspraveen.vercel.app/) · [LinkedIn](https://www.linkedin.com/in/svs-praveen-s/)*
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
# DeployProof
|
|
2
|
+
|
|
3
|
+
> Deterministic pre-push verification for AI-assisted codebases: AST mutation testing, credential scanning, sandbox-escape detection, mock-usage alerts, swallowed-exception checks, and dependency hallucination defense.
|
|
4
|
+
|
|
5
|
+
[](https://pypi.org/project/deployproof/)
|
|
6
|
+
[](https://pypi.org/project/deployproof/)
|
|
7
|
+
[](https://github.com/SVSPraveen/DeployProof)
|
|
8
|
+
[](LICENSE)
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Why This Exists
|
|
13
|
+
|
|
14
|
+
AI-assisted development introduces subtle failure modes that standard linters and coverage tools miss: test suites with high line coverage but near-zero mutation scores, hardcoded credentials generated in passing, symlinks that deceive approval prompts into escaping the repository sandbox, silently swallowed exceptions, and package names hallucinated by LLMs that don't exist on PyPI. DeployProof catches these at the pre-push stage, before they reach CI or production.
|
|
15
|
+
|
|
16
|
+
## Install
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
pip install deployproof
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Requires Python 3.10+.
|
|
23
|
+
|
|
24
|
+
## Quickstart
|
|
25
|
+
|
|
26
|
+
Initialize in your repository:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
deployproof init
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Run all verification checks against changes in the current session (git diff):
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
deployproof check
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Output includes a section for each check — symlink scan, secrets scan, dependency scan, mock detection, control flow analysis, and mutation score — with a pass/fail line at the bottom. Exit code is non-zero on any finding that should block a push.
|
|
39
|
+
|
|
40
|
+
### CLI Options & Flags
|
|
41
|
+
|
|
42
|
+
| Flag | Description |
|
|
43
|
+
|---|---|
|
|
44
|
+
| `deployproof check` | Run all 6 pre-push verification checks (informational warnings for mocks and error handling). |
|
|
45
|
+
| `deployproof check --json` | Output structured, machine-readable JSON for CI/CD pipelines, IDEs, and automation. |
|
|
46
|
+
| `deployproof check --strict-mocks` | Fail the gate (exit code 1) if new `unittest.mock`, `mocker`, or `monkeypatch` usage is introduced. |
|
|
47
|
+
| `deployproof check --strict-error-handling` | Fail the gate (exit code 1) if bare excepts, swallowed exceptions, or dead code are detected. |
|
|
48
|
+
| `deployproof check --files <paths...>` | Explicitly evaluate specific files (bypasses git diff). |
|
|
49
|
+
| `deployproof check --threshold <float>` | Minimum mutation score percentage required to pass (default: `80.0`). |
|
|
50
|
+
| `deployproof check --base <ref>` | Base git ref (branch/commit/tag) to diff against. |
|
|
51
|
+
| `deployproof check --wsl` | Delegate mutation testing to `mutmut` inside WSL (Windows only). |
|
|
52
|
+
|
|
53
|
+
### Machine-Readable Output (`--json`)
|
|
54
|
+
|
|
55
|
+
DeployProof provides a stable structured JSON schema for CI/CD pipelines, IDEs, and automation:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
deployproof check --json
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
#### JSON Output Schema
|
|
62
|
+
|
|
63
|
+
```json
|
|
64
|
+
{
|
|
65
|
+
"version": "0.1.6",
|
|
66
|
+
"status": "passed",
|
|
67
|
+
"summary": {
|
|
68
|
+
"target_files_count": 1,
|
|
69
|
+
"mutation_score": 100.0,
|
|
70
|
+
"threshold": 80.0,
|
|
71
|
+
"secrets_found": 0,
|
|
72
|
+
"symlink_escapes_found": 0,
|
|
73
|
+
"dependency_findings": {
|
|
74
|
+
"high_risk": 0,
|
|
75
|
+
"medium_risk": 0,
|
|
76
|
+
"ok": 1,
|
|
77
|
+
"unknown": 0,
|
|
78
|
+
"unscanned": 0
|
|
79
|
+
},
|
|
80
|
+
"mock_usages_found": 0,
|
|
81
|
+
"control_flow_findings": 0,
|
|
82
|
+
"strict_mocks_active": false,
|
|
83
|
+
"strict_mocks_triggered": false,
|
|
84
|
+
"strict_error_handling_active": false,
|
|
85
|
+
"strict_error_handling_triggered": false
|
|
86
|
+
},
|
|
87
|
+
"scope": {
|
|
88
|
+
"target_files": [
|
|
89
|
+
{
|
|
90
|
+
"file": "app.py",
|
|
91
|
+
"loc": 45,
|
|
92
|
+
"is_large": false
|
|
93
|
+
}
|
|
94
|
+
]
|
|
95
|
+
},
|
|
96
|
+
"mutation_testing": {
|
|
97
|
+
"score": 100.0,
|
|
98
|
+
"threshold": 80.0,
|
|
99
|
+
"total_mutants": 6,
|
|
100
|
+
"killed_mutants": 6,
|
|
101
|
+
"survived_mutants_count": 0,
|
|
102
|
+
"duration_seconds": 1.2,
|
|
103
|
+
"surviving_mutants": [],
|
|
104
|
+
"skipped_constructs": [],
|
|
105
|
+
"untested_files": []
|
|
106
|
+
},
|
|
107
|
+
"secrets": {
|
|
108
|
+
"clean": true,
|
|
109
|
+
"files_scanned": 1,
|
|
110
|
+
"findings": []
|
|
111
|
+
},
|
|
112
|
+
"symlinks": {
|
|
113
|
+
"clean": true,
|
|
114
|
+
"files_scanned": 1,
|
|
115
|
+
"findings": []
|
|
116
|
+
},
|
|
117
|
+
"dependencies": {
|
|
118
|
+
"clean": true,
|
|
119
|
+
"total_scanned": 1,
|
|
120
|
+
"findings": [],
|
|
121
|
+
"unscanned_sources": []
|
|
122
|
+
},
|
|
123
|
+
"mocks": {
|
|
124
|
+
"clean": true,
|
|
125
|
+
"strict_gate_triggered": false,
|
|
126
|
+
"findings": []
|
|
127
|
+
},
|
|
128
|
+
"control_flow": {
|
|
129
|
+
"clean": true,
|
|
130
|
+
"strict_gate_triggered": false,
|
|
131
|
+
"findings": []
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
## What It Checks
|
|
137
|
+
|
|
138
|
+
- **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.
|
|
139
|
+
- **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.
|
|
140
|
+
- **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).
|
|
141
|
+
- **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.
|
|
142
|
+
- **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.
|
|
143
|
+
- **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.
|
|
144
|
+
|
|
145
|
+
## What This Doesn't Do
|
|
146
|
+
|
|
147
|
+
- **Not a full-repo audit.** Checks are scoped to files changed in the current session (git diff). Files you haven't touched are not re-evaluated.
|
|
148
|
+
- **Python only.** Mutation testing and import extraction currently support Python files only. Other languages are not scanned.
|
|
149
|
+
- **No auto-fix.** DeployProof reports findings; it does not modify your code, rewrite imports, or suggest patches.
|
|
150
|
+
- **No IDE plugin yet.** There is no VS Code extension or JetBrains plugin. The CLI is the interface. IDE integration is on the roadmap.
|
|
151
|
+
|
|
152
|
+
## See It Catch Real Bugs
|
|
153
|
+
|
|
154
|
+
Clone this repository and run the standalone stress-test suite to see DeployProof evaluate 7 planted edge cases:
|
|
155
|
+
|
|
156
|
+
```bash
|
|
157
|
+
python stress_fixtures/run_stress_tests.py
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
Fixtures cover weak test suites, zero-test orphan modules, planted OpenAI/AWS credentials, and GhostApproval sandbox-escape traps.
|
|
161
|
+
|
|
162
|
+
## Status & Roadmap
|
|
163
|
+
|
|
164
|
+
- **Current (v0.1.6):** Diff-scoped AST mutation testing, secrets scanner (including unquoted .env values), GhostApproval symlink sandbox-escape detector, PyPI dependency hallucination / slopsquatting scanner (with recursive `-r` requirements scanning and dynamic import detection via `importlib` / `__import__`), mock-introduction detector (`--strict-mocks`), control-flow / swallowed-exception scanner (`--strict-error-handling`), machine-readable `--json` output, and Tier 2 CI verification via GitHub Actions (mutmut).
|
|
165
|
+
- **Next:** Multi-language mutation support and expanded ecosystem rule packs.
|
|
166
|
+
|
|
167
|
+
## Contributing
|
|
168
|
+
|
|
169
|
+
Issues and pull requests are welcome. Open an issue first for significant changes so the approach can be discussed before implementation.
|
|
170
|
+
|
|
171
|
+
## License
|
|
172
|
+
|
|
173
|
+
MIT. See [LICENSE](LICENSE).
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
*Created by [SVS Praveen](https://github.com/SVSPraveen) · [Portfolio](https://svspraveen.vercel.app/) · [LinkedIn](https://www.linkedin.com/in/svs-praveen-s/)*
|
|
@@ -4,13 +4,23 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "deployproof"
|
|
7
|
-
version = "0.1.
|
|
8
|
-
description = "A deterministic
|
|
7
|
+
version = "0.1.6"
|
|
8
|
+
description = "A deterministic AI-code deployability checker that catches what coverage misses."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10"
|
|
11
11
|
license = "MIT"
|
|
12
12
|
authors = [
|
|
13
|
-
{ name = "SVS Praveen" }
|
|
13
|
+
{ name = "SVS Praveen", email = "svspraveens@gmail.com" }
|
|
14
|
+
]
|
|
15
|
+
keywords = [
|
|
16
|
+
"ai-code",
|
|
17
|
+
"mutation-testing",
|
|
18
|
+
"security-scanner",
|
|
19
|
+
"slopsquatting",
|
|
20
|
+
"ghostapproval",
|
|
21
|
+
"pre-push-verification",
|
|
22
|
+
"ast-analysis",
|
|
23
|
+
"dependency-security",
|
|
14
24
|
]
|
|
15
25
|
classifiers = [
|
|
16
26
|
"Development Status :: 3 - Alpha",
|
|
@@ -34,10 +44,10 @@ dev = [
|
|
|
34
44
|
]
|
|
35
45
|
|
|
36
46
|
[project.urls]
|
|
37
|
-
Homepage = "https://github.com/SVSPraveen/
|
|
38
|
-
Documentation = "https://github.com/SVSPraveen/
|
|
39
|
-
Repository = "https://github.com/SVSPraveen/
|
|
40
|
-
"Bug Tracker" = "https://github.com/SVSPraveen/
|
|
47
|
+
Homepage = "https://github.com/SVSPraveen/DeployProof"
|
|
48
|
+
Documentation = "https://github.com/SVSPraveen/DeployProof#readme"
|
|
49
|
+
Repository = "https://github.com/SVSPraveen/DeployProof.git"
|
|
50
|
+
"Bug Tracker" = "https://github.com/SVSPraveen/DeployProof/issues"
|
|
41
51
|
|
|
42
52
|
[project.scripts]
|
|
43
53
|
deployproof = "deployproof.cli:main"
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"""DeployProof: Deterministic deployability verification for AI-assisted code."""
|
|
2
|
-
__version__ = "0.1.
|
|
2
|
+
__version__ = "0.1.6"
|