deployproof 0.1.6__tar.gz → 0.1.7__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 (36) hide show
  1. {deployproof-0.1.6/src/deployproof.egg-info → deployproof-0.1.7}/PKG-INFO +3 -3
  2. {deployproof-0.1.6 → deployproof-0.1.7}/README.md +2 -2
  3. {deployproof-0.1.6 → deployproof-0.1.7}/pyproject.toml +1 -1
  4. {deployproof-0.1.6 → deployproof-0.1.7}/src/deployproof/__init__.py +1 -1
  5. {deployproof-0.1.6 → deployproof-0.1.7}/src/deployproof/dependencies.py +1 -1
  6. {deployproof-0.1.6 → deployproof-0.1.7}/src/deployproof/mocks.py +20 -5
  7. {deployproof-0.1.6 → deployproof-0.1.7}/src/deployproof/reporter.py +1 -1
  8. {deployproof-0.1.6 → deployproof-0.1.7/src/deployproof.egg-info}/PKG-INFO +3 -3
  9. {deployproof-0.1.6 → deployproof-0.1.7}/tests/test_cli.py +3 -3
  10. {deployproof-0.1.6 → deployproof-0.1.7}/LICENSE +0 -0
  11. {deployproof-0.1.6 → deployproof-0.1.7}/setup.cfg +0 -0
  12. {deployproof-0.1.6 → deployproof-0.1.7}/src/deployproof/cli.py +0 -0
  13. {deployproof-0.1.6 → deployproof-0.1.7}/src/deployproof/control_flow.py +0 -0
  14. {deployproof-0.1.6 → deployproof-0.1.7}/src/deployproof/diff.py +0 -0
  15. {deployproof-0.1.6 → deployproof-0.1.7}/src/deployproof/mutator.py +0 -0
  16. {deployproof-0.1.6 → deployproof-0.1.7}/src/deployproof/secrets.py +0 -0
  17. {deployproof-0.1.6 → deployproof-0.1.7}/src/deployproof/symlinks.py +0 -0
  18. {deployproof-0.1.6 → deployproof-0.1.7}/src/deployproof/wsl.py +0 -0
  19. {deployproof-0.1.6 → deployproof-0.1.7}/src/deployproof.egg-info/SOURCES.txt +0 -0
  20. {deployproof-0.1.6 → deployproof-0.1.7}/src/deployproof.egg-info/dependency_links.txt +0 -0
  21. {deployproof-0.1.6 → deployproof-0.1.7}/src/deployproof.egg-info/entry_points.txt +0 -0
  22. {deployproof-0.1.6 → deployproof-0.1.7}/src/deployproof.egg-info/requires.txt +0 -0
  23. {deployproof-0.1.6 → deployproof-0.1.7}/src/deployproof.egg-info/top_level.txt +0 -0
  24. {deployproof-0.1.6 → deployproof-0.1.7}/tests/test_cli_dependency_scan.py +0 -0
  25. {deployproof-0.1.6 → deployproof-0.1.7}/tests/test_control_flow.py +0 -0
  26. {deployproof-0.1.6 → deployproof-0.1.7}/tests/test_dependencies_extractor.py +0 -0
  27. {deployproof-0.1.6 → deployproof-0.1.7}/tests/test_dependencies_pypi.py +0 -0
  28. {deployproof-0.1.6 → deployproof-0.1.7}/tests/test_diff.py +0 -0
  29. {deployproof-0.1.6 → deployproof-0.1.7}/tests/test_edge_cases_validation.py +0 -0
  30. {deployproof-0.1.6 → deployproof-0.1.7}/tests/test_mocks.py +0 -0
  31. {deployproof-0.1.6 → deployproof-0.1.7}/tests/test_mutation_suites.py +0 -0
  32. {deployproof-0.1.6 → deployproof-0.1.7}/tests/test_mutator.py +0 -0
  33. {deployproof-0.1.6 → deployproof-0.1.7}/tests/test_secrets.py +0 -0
  34. {deployproof-0.1.6 → deployproof-0.1.7}/tests/test_stress_regressions.py +0 -0
  35. {deployproof-0.1.6 → deployproof-0.1.7}/tests/test_symlinks.py +0 -0
  36. {deployproof-0.1.6 → deployproof-0.1.7}/tests/test_wsl.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: deployproof
3
- Version: 0.1.6
3
+ Version: 0.1.7
4
4
  Summary: A deterministic AI-code deployability checker that catches what coverage misses.
5
5
  Author-email: SVS Praveen <svspraveens@gmail.com>
6
6
  License-Expression: MIT
@@ -92,7 +92,7 @@ deployproof check --json
92
92
 
93
93
  ```json
94
94
  {
95
- "version": "0.1.6",
95
+ "version": "0.1.7",
96
96
  "status": "passed",
97
97
  "summary": {
98
98
  "target_files_count": 1,
@@ -191,7 +191,7 @@ Fixtures cover weak test suites, zero-test orphan modules, planted OpenAI/AWS cr
191
191
 
192
192
  ## Status & Roadmap
193
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).
194
+ - **Current (v0.1.7):** 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` and deduplicated decorator detection), control-flow / swallowed-exception scanner (`--strict-error-handling`), 11/11 launch-day stress test suite, machine-readable `--json` output, and Tier 2 CI verification via GitHub Actions (mutmut).
195
195
  - **Next:** Multi-language mutation support and expanded ecosystem rule packs.
196
196
 
197
197
  ## Contributing
@@ -62,7 +62,7 @@ deployproof check --json
62
62
 
63
63
  ```json
64
64
  {
65
- "version": "0.1.6",
65
+ "version": "0.1.7",
66
66
  "status": "passed",
67
67
  "summary": {
68
68
  "target_files_count": 1,
@@ -161,7 +161,7 @@ Fixtures cover weak test suites, zero-test orphan modules, planted OpenAI/AWS cr
161
161
 
162
162
  ## Status & Roadmap
163
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).
164
+ - **Current (v0.1.7):** 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` and deduplicated decorator detection), control-flow / swallowed-exception scanner (`--strict-error-handling`), 11/11 launch-day stress test suite, machine-readable `--json` output, and Tier 2 CI verification via GitHub Actions (mutmut).
165
165
  - **Next:** Multi-language mutation support and expanded ecosystem rule packs.
166
166
 
167
167
  ## Contributing
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "deployproof"
7
- version = "0.1.6"
7
+ version = "0.1.7"
8
8
  description = "A deterministic AI-code deployability checker that catches what coverage misses."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -1,2 +1,2 @@
1
1
  """DeployProof: Deterministic deployability verification for AI-assisted code."""
2
- __version__ = "0.1.6"
2
+ __version__ = "0.1.7"
@@ -891,7 +891,7 @@ def query_pypi_registry(
891
891
  url = f"https://pypi.org/pypi/{norm_name}/json"
892
892
  req = urllib.request.Request(
893
893
  url,
894
- headers={"User-Agent": "DeployProof/0.1.6 (https://github.com/SVSPraveen/DeployProof)"},
894
+ headers={"User-Agent": "DeployProof/0.1.7 (https://github.com/SVSPraveen/DeployProof)"},
895
895
  )
896
896
 
897
897
  try:
@@ -43,6 +43,7 @@ class MockDetector(ast.NodeVisitor):
43
43
  self.modified_lines = modified_lines
44
44
  self.findings: List[MockFinding] = []
45
45
  self._seen_lines_and_types: Set[Tuple[int, str]] = set()
46
+ self._decorator_call_nodes: Set[int] = set()
46
47
 
47
48
  def _add_finding(self, lineno: int, mock_type: str, description: str) -> None:
48
49
  if self.modified_lines is not None and lineno not in self.modified_lines:
@@ -105,6 +106,19 @@ class MockDetector(ast.NodeVisitor):
105
106
  )
106
107
  self.generic_visit(node)
107
108
 
109
+ def _check_decorators(self, node: ast.AST) -> None:
110
+ decorators = getattr(node, "decorator_list", [])
111
+ for dec in decorators:
112
+ if isinstance(dec, ast.Call):
113
+ self._decorator_call_nodes.add(id(dec))
114
+ if self._is_patch_target_node(dec):
115
+ lineno = getattr(dec, "lineno", getattr(node, "lineno", 1))
116
+ self._add_finding(lineno, "patch_decorator", "@patch decorator")
117
+
118
+ def visit_ClassDef(self, node: ast.ClassDef) -> None:
119
+ self._check_decorators(node)
120
+ self.generic_visit(node)
121
+
108
122
  def visit_FunctionDef(self, node: ast.FunctionDef) -> None:
109
123
  self._check_func(node)
110
124
  self.generic_visit(node)
@@ -126,11 +140,7 @@ class MockDetector(ast.NodeVisitor):
126
140
  f"{arg.arg} fixture parameter in {getattr(node, 'name', 'function')}()",
127
141
  )
128
142
 
129
- decorators = getattr(node, "decorator_list", [])
130
- for dec in decorators:
131
- if self._is_patch_target_node(dec):
132
- lineno = getattr(dec, "lineno", getattr(node, "lineno", 1))
133
- self._add_finding(lineno, "patch_decorator", "@patch decorator")
143
+ self._check_decorators(node)
134
144
 
135
145
  def _is_patch_target_node(self, node: ast.AST) -> bool:
136
146
  if isinstance(node, ast.Call):
@@ -152,6 +162,11 @@ class MockDetector(ast.NodeVisitor):
152
162
  return False
153
163
 
154
164
  def visit_Call(self, node: ast.Call) -> None:
165
+ # If this call is an @patch decorator call, it is already recorded as patch_decorator
166
+ if id(node) in self._decorator_call_nodes:
167
+ self.generic_visit(node)
168
+ return
169
+
155
170
  if isinstance(node.func, ast.Attribute):
156
171
  if isinstance(node.func.value, ast.Name) and node.func.value.id == "monkeypatch":
157
172
  self._add_finding(
@@ -26,7 +26,7 @@ def format_json_report(
26
26
  strict_error_handling: bool = False,
27
27
  repo_root: Optional[Path] = None,
28
28
  threshold: float = 80.0,
29
- version: str = "0.1.6",
29
+ version: str = "0.1.7",
30
30
  ) -> str:
31
31
  """Format all scan findings and mutation results as a structured JSON string."""
32
32
  root = (repo_root or Path.cwd()).resolve()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: deployproof
3
- Version: 0.1.6
3
+ Version: 0.1.7
4
4
  Summary: A deterministic AI-code deployability checker that catches what coverage misses.
5
5
  Author-email: SVS Praveen <svspraveens@gmail.com>
6
6
  License-Expression: MIT
@@ -92,7 +92,7 @@ deployproof check --json
92
92
 
93
93
  ```json
94
94
  {
95
- "version": "0.1.6",
95
+ "version": "0.1.7",
96
96
  "status": "passed",
97
97
  "summary": {
98
98
  "target_files_count": 1,
@@ -191,7 +191,7 @@ Fixtures cover weak test suites, zero-test orphan modules, planted OpenAI/AWS cr
191
191
 
192
192
  ## Status & Roadmap
193
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).
194
+ - **Current (v0.1.7):** 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` and deduplicated decorator detection), control-flow / swallowed-exception scanner (`--strict-error-handling`), 11/11 launch-day stress test suite, machine-readable `--json` output, and Tier 2 CI verification via GitHub Actions (mutmut).
195
195
  - **Next:** Multi-language mutation support and expanded ecosystem rule packs.
196
196
 
197
197
  ## Contributing
@@ -9,7 +9,7 @@ from deployproof.cli import create_parser, main
9
9
 
10
10
  def test_version():
11
11
  """Verify version string is accessible."""
12
- assert __version__ == "0.1.6"
12
+ assert __version__ == "0.1.7"
13
13
 
14
14
 
15
15
  def test_parser_version(capsys):
@@ -19,7 +19,7 @@ def test_parser_version(capsys):
19
19
  parser.parse_args(["--version"])
20
20
  assert exc_info.value.code == 0
21
21
  captured = capsys.readouterr()
22
- assert "deployproof 0.1.6" in captured.out or "deployproof 0.1.6" in captured.err
22
+ assert "deployproof 0.1.7" in captured.out or "deployproof 0.1.7" in captured.err
23
23
 
24
24
 
25
25
  def test_parser_help(capsys):
@@ -105,7 +105,7 @@ def test_main_check_json_output_passing(capsys):
105
105
 
106
106
  data = json.loads(captured.out)
107
107
  assert data["status"] == "passed"
108
- assert data["version"] == "0.1.6"
108
+ assert data["version"] == "0.1.7"
109
109
  assert data["summary"]["mutation_score"] == 100.0
110
110
  assert data["summary"]["secrets_found"] == 0
111
111
  assert data["summary"]["symlink_escapes_found"] == 0
File without changes
File without changes