proofctl 0.6.1__tar.gz → 0.6.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 (42) hide show
  1. {proofctl-0.6.1/proofctl.egg-info → proofctl-0.6.2}/PKG-INFO +3 -3
  2. {proofctl-0.6.1 → proofctl-0.6.2}/README.md +2 -2
  3. proofctl-0.6.2/proofctl/__main__.py +4 -0
  4. {proofctl-0.6.1 → proofctl-0.6.2}/proofctl/checkers/hcl_utils.py +8 -7
  5. {proofctl-0.6.1 → proofctl-0.6.2}/proofctl/checkers/quality.py +2 -2
  6. {proofctl-0.6.1 → proofctl-0.6.2}/proofctl/checkers/security.py +28 -28
  7. {proofctl-0.6.1 → proofctl-0.6.2}/proofctl/checkers/terraform.py +5 -5
  8. {proofctl-0.6.1 → proofctl-0.6.2}/proofctl/checkers/yaml_checker.py +6 -6
  9. {proofctl-0.6.1 → proofctl-0.6.2}/proofctl/cli.py +4 -0
  10. {proofctl-0.6.1 → proofctl-0.6.2}/proofctl/registry.py +13 -3
  11. {proofctl-0.6.1 → proofctl-0.6.2/proofctl.egg-info}/PKG-INFO +3 -3
  12. {proofctl-0.6.1 → proofctl-0.6.2}/proofctl.egg-info/SOURCES.txt +1 -0
  13. {proofctl-0.6.1 → proofctl-0.6.2}/pyproject.toml +1 -1
  14. {proofctl-0.6.1 → proofctl-0.6.2}/LICENSE +0 -0
  15. {proofctl-0.6.1 → proofctl-0.6.2}/MANIFEST.in +0 -0
  16. {proofctl-0.6.1 → proofctl-0.6.2}/proofctl/__init__.py +0 -0
  17. {proofctl-0.6.1 → proofctl-0.6.2}/proofctl/_globmatch.py +0 -0
  18. {proofctl-0.6.1 → proofctl-0.6.2}/proofctl/baseline.py +0 -0
  19. {proofctl-0.6.1 → proofctl-0.6.2}/proofctl/checkers/__init__.py +0 -0
  20. {proofctl-0.6.1 → proofctl-0.6.2}/proofctl/checkers/base.py +0 -0
  21. {proofctl-0.6.1 → proofctl-0.6.2}/proofctl/checkers/dockerfile.py +0 -0
  22. {proofctl-0.6.1 → proofctl-0.6.2}/proofctl/checkers/imports.py +0 -0
  23. {proofctl-0.6.1 → proofctl-0.6.2}/proofctl/checkers/leakage.py +0 -0
  24. {proofctl-0.6.1 → proofctl-0.6.2}/proofctl/checkers/llm_integration.py +0 -0
  25. {proofctl-0.6.1 → proofctl-0.6.2}/proofctl/checkers/placeholders.py +0 -0
  26. {proofctl-0.6.1 → proofctl-0.6.2}/proofctl/checkers/secrets.py +0 -0
  27. {proofctl-0.6.1 → proofctl-0.6.2}/proofctl/checkers/shell_checker.py +0 -0
  28. {proofctl-0.6.1 → proofctl-0.6.2}/proofctl/checkers/terragrunt.py +0 -0
  29. {proofctl-0.6.1 → proofctl-0.6.2}/proofctl/checkers/variants.py +0 -0
  30. {proofctl-0.6.1 → proofctl-0.6.2}/proofctl/config.py +0 -0
  31. {proofctl-0.6.1 → proofctl-0.6.2}/proofctl/engine.py +0 -0
  32. {proofctl-0.6.1 → proofctl-0.6.2}/proofctl/fixer.py +0 -0
  33. {proofctl-0.6.1 → proofctl-0.6.2}/proofctl/models.py +0 -0
  34. {proofctl-0.6.1 → proofctl-0.6.2}/proofctl/reporters/__init__.py +0 -0
  35. {proofctl-0.6.1 → proofctl-0.6.2}/proofctl/reporters/html_reporter.py +0 -0
  36. {proofctl-0.6.1 → proofctl-0.6.2}/proofctl/reporters/json_reporter.py +0 -0
  37. {proofctl-0.6.1 → proofctl-0.6.2}/proofctl/reporters/terminal.py +0 -0
  38. {proofctl-0.6.1 → proofctl-0.6.2}/proofctl.egg-info/dependency_links.txt +0 -0
  39. {proofctl-0.6.1 → proofctl-0.6.2}/proofctl.egg-info/entry_points.txt +0 -0
  40. {proofctl-0.6.1 → proofctl-0.6.2}/proofctl.egg-info/requires.txt +0 -0
  41. {proofctl-0.6.1 → proofctl-0.6.2}/proofctl.egg-info/top_level.txt +0 -0
  42. {proofctl-0.6.1 → proofctl-0.6.2}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: proofctl
3
- Version: 0.6.1
3
+ Version: 0.6.2
4
4
  Summary: DevOps linter and security scanner for AI slop and misconfigurations — runs in pre-commit, CI, or post-commit; no external tools required
5
5
  Author: Kolawolu Odunola
6
6
  License: MIT
@@ -35,7 +35,7 @@ Dynamic: license-file
35
35
 
36
36
  # proofctl
37
37
 
38
- A static-analysis linter and security scanner for the DevOps stack — Python, Terraform, Kubernetes, Helm, Dockerfiles, GitHub Actions, Shell — that catches the specific kinds of mistakes AI coding tools introduce. **271 rules**, no external tools, runs in under a second.
38
+ A static-analysis linter and security scanner for the DevOps stack — Python, Terraform, Kubernetes, Helm, Dockerfiles, GitHub Actions, Shell — that catches the specific kinds of mistakes AI coding tools introduce. **271 rules**, no external tools — about a second on a typical Terraform repo.
39
39
 
40
40
  ```
41
41
  proofctl check .
@@ -344,7 +344,7 @@ proofctl rules --severity ERROR
344
344
  "severity": "ERROR",
345
345
  "message": "SQL injection via string format in .execute()",
346
346
  "hint": "Use parameterised queries: cursor.execute(sql, params)",
347
- "authority": "OWASP A03:2021, CWE-89"
347
+ "authority": "OWASP A05:2025 – Injection / CWE-89"
348
348
  }
349
349
  ]
350
350
  }
@@ -1,6 +1,6 @@
1
1
  # proofctl
2
2
 
3
- A static-analysis linter and security scanner for the DevOps stack — Python, Terraform, Kubernetes, Helm, Dockerfiles, GitHub Actions, Shell — that catches the specific kinds of mistakes AI coding tools introduce. **271 rules**, no external tools, runs in under a second.
3
+ A static-analysis linter and security scanner for the DevOps stack — Python, Terraform, Kubernetes, Helm, Dockerfiles, GitHub Actions, Shell — that catches the specific kinds of mistakes AI coding tools introduce. **271 rules**, no external tools — about a second on a typical Terraform repo.
4
4
 
5
5
  ```
6
6
  proofctl check .
@@ -309,7 +309,7 @@ proofctl rules --severity ERROR
309
309
  "severity": "ERROR",
310
310
  "message": "SQL injection via string format in .execute()",
311
311
  "hint": "Use parameterised queries: cursor.execute(sql, params)",
312
- "authority": "OWASP A03:2021, CWE-89"
312
+ "authority": "OWASP A05:2025 – Injection / CWE-89"
313
313
  }
314
314
  ]
315
315
  }
@@ -0,0 +1,4 @@
1
+ """Entry point for `python -m proofctl`."""
2
+ from proofctl.cli import app
3
+
4
+ app(prog_name="proofctl")
@@ -170,7 +170,9 @@ def _parse(lines: list[str], base: int, skip_outer: bool) -> list[HclBlock]:
170
170
 
171
171
  delta = _brace_delta(line)
172
172
 
173
- if depth == 0 and delta > 0:
173
+ # A one-line block (`allow { protocol = "tcp" }`, `variable "x" {}`) nets
174
+ # to delta == 0, so it must be recognised here too, not only delta > 0.
175
+ if depth == 0 and delta >= 0 and "{" in _strip_comment(line):
174
176
  m = _BLOCK_HEADER_RE.match(line)
175
177
  if m:
176
178
  block_kind = m.group(1)
@@ -178,17 +180,16 @@ def _parse(lines: list[str], base: int, skip_outer: bool) -> list[HclBlock]:
178
180
  block_label1 = m.group(2) or m.group(3) or ""
179
181
  # group 4 = quoted label2, group 5 = bare label2
180
182
  block_label2 = m.group(4) or m.group(5) or ""
181
- block_start_idx = i
182
- depth += delta
183
- if depth == 0:
184
- # Single-line block (opened and closed on same line)
183
+ if delta == 0:
185
184
  blocks.append(HclBlock(
186
185
  kind=block_kind, label1=block_label1, label2=block_label2,
187
186
  start_line=lineno, end_line=lineno,
188
187
  raw_lines=lines[i:i + 1],
189
188
  ))
190
- block_start_idx = None
191
- continue # pragma: no cover
189
+ else:
190
+ block_start_idx = i
191
+ depth += delta
192
+ continue
192
193
 
193
194
  if depth > 0:
194
195
  depth += delta
@@ -157,8 +157,8 @@ class _Q002Visitor(ast.NodeVisitor):
157
157
  severity=sev,
158
158
  message=msg,
159
159
  hint=hint,
160
- authority="CWE-703 – Improper Check or Handling of Exceptional Conditions",
161
- docs_url="https://owasp.org/www-community/vulnerabilities/Improper_Error_Handling",
160
+ authority="OWASP A10:2025 – Mishandling of Exceptional Conditions",
161
+ docs_url="https://top10.owasp.org/2025/A10_2025-Mishandling_of_Exceptional_Conditions/",
162
162
  ))
163
163
  self.generic_visit(node)
164
164
 
@@ -165,8 +165,8 @@ class _S001Visitor(ast.NodeVisitor):
165
165
  "call — SQL injection risk"
166
166
  ),
167
167
  hint="Use parameterised queries: cursor.execute(sql, (value,))",
168
- authority="OWASP A03:2021 – Injection / CWE-89",
169
- docs_url="https://owasp.org/Top10/A03_2021-Injection/",
168
+ authority="OWASP A05:2025 – Injection / CWE-89",
169
+ docs_url="https://top10.owasp.org/2025/A05_2025-Injection/",
170
170
  ))
171
171
  self.generic_visit(node)
172
172
 
@@ -290,8 +290,8 @@ class _S003Visitor(ast.NodeVisitor):
290
290
  "— remote code execution if input is untrusted"
291
291
  ),
292
292
  hint="Use json.loads() or msgpack. Never deserialise untrusted pickle data.",
293
- authority="OWASP A08:2021 – Software and Data Integrity / CWE-502",
294
- docs_url="https://owasp.org/Top10/A08_2021-Software_and_Data_Integrity_Failures/",
293
+ authority="OWASP A08:2025 – Software or Data Integrity Failures / CWE-502",
294
+ docs_url="https://top10.owasp.org/2025/A08_2025-Software_or_Data_Integrity_Failures/",
295
295
  ))
296
296
 
297
297
  def visit_Call(self, node: ast.Call) -> None:
@@ -567,7 +567,7 @@ class _S005Visitor(ast.NodeVisitor):
567
567
  severity=Severity.ERROR,
568
568
  message=f"{name}() with non-literal input executes arbitrary code",
569
569
  hint="Avoid eval/exec on dynamic input. Use ast.literal_eval() for safe data parsing.",
570
- authority="CWE-94 – Code Injection / OWASP A03:2021",
570
+ authority="CWE-94 – Code Injection / OWASP A05:2025",
571
571
  docs_url="https://cwe.mitre.org/data/definitions/94.html",
572
572
  ))
573
573
  self.generic_visit(node)
@@ -741,8 +741,8 @@ class _S007Visitor(ast.NodeVisitor):
741
741
  severity=Severity.ERROR,
742
742
  message=f"jwt.decode() with {detail} — signature verification bypassed",
743
743
  hint="Never disable JWT signature verification. Use algorithms=['HS256'] with a verified secret.",
744
- authority="OWASP A02:2021 – Cryptographic Failures / CWE-347",
745
- docs_url="https://owasp.org/Top10/A02_2021-Cryptographic_Failures/",
744
+ authority="OWASP A04:2025 – Cryptographic Failures / CWE-347",
745
+ docs_url="https://top10.owasp.org/2025/A04_2025-Cryptographic_Failures/",
746
746
  ))
747
747
 
748
748
  def visit_Call(self, node: ast.Call) -> None:
@@ -1011,8 +1011,8 @@ class _S008Visitor(ast.NodeVisitor):
1011
1011
  "Validate and sanitise file paths: use os.path.basename(), "
1012
1012
  "pathlib.Path(...).resolve(), or restrict to an allowed directory."
1013
1013
  ),
1014
- authority="OWASP A01:2021 – Broken Access Control / CWE-22",
1015
- docs_url="https://owasp.org/Top10/A01_2021-Broken_Access_Control/",
1014
+ authority="OWASP A01:2025 – Broken Access Control / CWE-22",
1015
+ docs_url="https://top10.owasp.org/2025/A01_2025-Broken_Access_Control/",
1016
1016
  ))
1017
1017
 
1018
1018
 
@@ -1091,8 +1091,8 @@ class _S010Visitor(ast.NodeVisitor):
1091
1091
  severity=Severity.WARNING,
1092
1092
  message=f"Logging call may expose secret '{name}' — visible in log aggregators and monitoring",
1093
1093
  hint="Never log credential values. Log only non-sensitive metadata.",
1094
- authority="OWASP A09:2021 – Security Logging and Monitoring Failures / CWE-532",
1095
- docs_url="https://owasp.org/Top10/A09_2021-Security_Logging_and_Monitoring_Failures/",
1094
+ authority="OWASP A09:2025 – Security Logging and Alerting Failures / CWE-532",
1095
+ docs_url="https://top10.owasp.org/2025/A09_2025-Security_Logging_and_Alerting_Failures/",
1096
1096
  ))
1097
1097
 
1098
1098
  def _is_logging_call(self, node: ast.Call) -> bool:
@@ -1242,7 +1242,7 @@ class _S010Visitor(ast.NodeVisitor):
1242
1242
  "Log the exception server-side; return a generic error message to the client "
1243
1243
  "(e.g. 'Internal error' with a 500 status)."
1244
1244
  ),
1245
- authority="OWASP A09:2021 – Security Logging / CWE-209 / CWE-200",
1245
+ authority="OWASP A10:2025 – Mishandling of Exceptional Conditions / CWE-209 / CWE-200",
1246
1246
  docs_url="https://cwe.mitre.org/data/definitions/209.html",
1247
1247
  ))
1248
1248
 
@@ -1735,8 +1735,8 @@ class _S013Visitor(ast.NodeVisitor):
1735
1735
  severity=Severity.WARNING,
1736
1736
  message="Setting Location header from user-supplied URL — open redirect risk",
1737
1737
  hint="Validate redirect URLs against an allowlist of trusted domains.",
1738
- authority="OWASP A01:2021 – Broken Access Control / CWE-601",
1739
- docs_url="https://owasp.org/Top10/A01_2021-Broken_Access_Control/",
1738
+ authority="OWASP A01:2025 – Broken Access Control / CWE-601",
1739
+ docs_url="https://top10.owasp.org/2025/A01_2025-Broken_Access_Control/",
1740
1740
  ))
1741
1741
  self.generic_visit(node)
1742
1742
 
@@ -1762,8 +1762,8 @@ class _S013Visitor(ast.NodeVisitor):
1762
1762
  severity=Severity.WARNING,
1763
1763
  message="redirect() called with an unvalidated URL from user input — open redirect risk",
1764
1764
  hint="Validate redirect URLs against an allowlist of trusted domains before redirecting.",
1765
- authority="OWASP A01:2021 – Broken Access Control / CWE-601",
1766
- docs_url="https://owasp.org/Top10/A01_2021-Broken_Access_Control/",
1765
+ authority="OWASP A01:2025 – Broken Access Control / CWE-601",
1766
+ docs_url="https://top10.owasp.org/2025/A01_2025-Broken_Access_Control/",
1767
1767
  ))
1768
1768
  self.generic_visit(node)
1769
1769
 
@@ -1796,7 +1796,7 @@ class _S014Visitor(ast.NodeVisitor):
1796
1796
  "disabled, allows MITM attacks"
1797
1797
  ),
1798
1798
  hint="Remove verify=False. Use a trusted CA bundle or pin certificates.",
1799
- authority="OWASP A02:2021 – Cryptographic Failures / CWE-295",
1799
+ authority="OWASP A07:2025 – Authentication Failures / CWE-295",
1800
1800
  docs_url="https://cwe.mitre.org/data/definitions/295.html",
1801
1801
  ))
1802
1802
  break
@@ -2161,8 +2161,8 @@ class _S017Visitor(_BaseTaintVisitor):
2161
2161
  "Escape HTML output with html.escape() / markupsafe.escape() / Jinja2 autoescape, "
2162
2162
  "or use a templating engine with autoescape on by default."
2163
2163
  ),
2164
- authority="OWASP A03:2021 – Injection / CWE-79",
2165
- docs_url="https://owasp.org/Top10/A03_2021-Injection/",
2164
+ authority="OWASP A05:2025 – Injection / CWE-79",
2165
+ docs_url="https://top10.owasp.org/2025/A05_2025-Injection/",
2166
2166
  ))
2167
2167
 
2168
2168
  def visit_Module(self, node: ast.Module) -> None:
@@ -2255,8 +2255,8 @@ class _S018Visitor(_BaseTaintVisitor):
2255
2255
  "Validate URLs against an allowlist of trusted hosts. Reject internal IPs "
2256
2256
  "(127.0.0.0/8, 169.254.0.0/16, 10.0.0.0/8, etc.) and resolve DNS before connecting."
2257
2257
  ),
2258
- authority="OWASP A10:2021 – SSRF / CWE-918",
2259
- docs_url="https://owasp.org/Top10/A10_2021-Server-Side_Request_Forgery_%28SSRF%29/",
2258
+ authority="OWASP A01:2025 – Broken Access Control / CWE-918",
2259
+ docs_url="https://cwe.mitre.org/data/definitions/918.html",
2260
2260
  ))
2261
2261
 
2262
2262
  self._tainted = outer
@@ -2413,7 +2413,7 @@ class _S019Visitor(ast.NodeVisitor):
2413
2413
  "Wrap with werkzeug.utils.secure_filename() and check the extension "
2414
2414
  "against an allowlist (e.g. {'.png', '.jpg'})."
2415
2415
  ),
2416
- authority="OWASP A04:2021 / CWE-434",
2416
+ authority="OWASP A06:2025 / CWE-434",
2417
2417
  docs_url="https://cwe.mitre.org/data/definitions/434.html",
2418
2418
  ))
2419
2419
 
@@ -2533,7 +2533,7 @@ class _S020Visitor(_BaseTaintVisitor):
2533
2533
  severity=Severity.ERROR,
2534
2534
  message=message,
2535
2535
  hint=hint,
2536
- authority="OWASP A07:2021 / CWE-522",
2536
+ authority="OWASP A06:2025 / CWE-522",
2537
2537
  docs_url="https://cwe.mitre.org/data/definitions/522.html",
2538
2538
  ))
2539
2539
 
@@ -2574,7 +2574,7 @@ class _S021Visitor(ast.NodeVisitor):
2574
2574
  "Use the principle of least privilege: 0o600 for secrets, 0o644 for "
2575
2575
  "shared read, 0o700 for directories owned by the user."
2576
2576
  ),
2577
- authority="OWASP A05:2021 / CWE-732",
2577
+ authority="OWASP A01:2025 / CWE-732",
2578
2578
  docs_url="https://cwe.mitre.org/data/definitions/732.html",
2579
2579
  ))
2580
2580
 
@@ -2666,7 +2666,7 @@ class _S022Visitor(_BaseTaintVisitor):
2666
2666
  "Use parameterised XPath: tree.xpath('//user[@name=$n]', n=user_input). "
2667
2667
  "Never concatenate user input into the query string."
2668
2668
  ),
2669
- authority="OWASP A03:2021 / CWE-643",
2669
+ authority="OWASP A05:2025 / CWE-643",
2670
2670
  docs_url="https://cwe.mitre.org/data/definitions/643.html",
2671
2671
  ))
2672
2672
 
@@ -2721,7 +2721,7 @@ class _S022Visitor(_BaseTaintVisitor):
2721
2721
  severity=Severity.ERROR,
2722
2722
  message="xpath() built via string formatting/concat — XPath injection risk",
2723
2723
  hint="Use parameterised XPath (variables, e.g. xpath('//u[@n=$n]', n=value)).",
2724
- authority="OWASP A03:2021 / CWE-643",
2724
+ authority="OWASP A05:2025 / CWE-643",
2725
2725
  docs_url="https://cwe.mitre.org/data/definitions/643.html",
2726
2726
  ))
2727
2727
 
@@ -2789,7 +2789,7 @@ class _S023Visitor(ast.NodeVisitor):
2789
2789
  "Remove @csrf_exempt and ensure the form/template includes {% csrf_token %}; "
2790
2790
  "or use a custom token-based authentication that is not cookie-bound."
2791
2791
  ),
2792
- authority="OWASP A01:2021 / CWE-352",
2792
+ authority="OWASP A01:2025 / CWE-352",
2793
2793
  docs_url="https://cwe.mitre.org/data/definitions/352.html",
2794
2794
  ))
2795
2795
 
@@ -2913,7 +2913,7 @@ class _S024Visitor(ast.NodeVisitor):
2913
2913
  "Add an auth decorator (@login_required, @permission_required('app.delete_x'), "
2914
2914
  "FastAPI Depends(get_current_user), etc.) or check current_user inside the handler."
2915
2915
  ),
2916
- authority="OWASP A01:2021 – Broken Access Control / CWE-862",
2916
+ authority="OWASP A01:2025 – Broken Access Control / CWE-862",
2917
2917
  docs_url="https://cwe.mitre.org/data/definitions/862.html",
2918
2918
  ))
2919
2919
 
@@ -615,8 +615,8 @@ class TerraformChecker(HclFileChecker):
615
615
  Severity.ERROR,
616
616
  f'"{attr}" appears to contain a literal secret value',
617
617
  hint="Use var.* references or a secrets manager. Never commit credentials.",
618
- authority="OWASP A02:2021 Cryptographic Failures",
619
- docs_url="https://owasp.org/Top10/A02_2021-Cryptographic_Failures/",
618
+ authority="OWASP A07:2025 – Authentication Failures / CWE-798",
619
+ docs_url="https://top10.owasp.org/2025/A07_2025-Authentication_Failures/",
620
620
  ))
621
621
  return out
622
622
 
@@ -2090,7 +2090,7 @@ class TerraformChecker(HclFileChecker):
2090
2090
  Severity.ERROR,
2091
2091
  f'Lambda "{b.label2}" environment variable appears to contain a literal secret',
2092
2092
  hint="Use AWS Secrets Manager or SSM Parameter Store and retrieve at runtime.",
2093
- authority="OWASP A02:2021 Cryptographic Failures",
2093
+ authority="OWASP A07:2025 – Authentication Failures / CWE-798",
2094
2094
  ))
2095
2095
  break
2096
2096
  return out
@@ -2238,8 +2238,8 @@ class TerraformChecker(HclFileChecker):
2238
2238
  Severity.ERROR,
2239
2239
  f"Lambda function '{b.label2}' has a hardcoded secret in environment variables",
2240
2240
  hint="Store secrets in AWS Secrets Manager or SSM Parameter Store and retrieve at runtime.",
2241
- authority="OWASP A02:2021 – Cryptographic Failures / CWE-312",
2242
- docs_url="https://owasp.org/Top10/A02_2021-Cryptographic_Failures/",
2241
+ authority="OWASP A06:2025 – Insecure Design / CWE-312",
2242
+ docs_url="https://top10.owasp.org/2025/A06_2025-Insecure_Design/",
2243
2243
  ))
2244
2244
  break
2245
2245
  if env_depth <= 0:
@@ -178,8 +178,8 @@ def _yaml001(root: yaml.Node, path: Path) -> list[Finding]:
178
178
  severity=Severity.ERROR,
179
179
  message=f"Key '{key}' contains a hardcoded secret value",
180
180
  hint="Reference via environment variable: password: ${DB_PASSWORD}",
181
- authority="OWASP A02:2021 – Cryptographic Failures / 12-Factor III",
182
- docs_url="https://owasp.org/Top10/A02_2021-Cryptographic_Failures/",
181
+ authority="OWASP A07:2025 – Authentication Failures / CWE-798 / 12-Factor III",
182
+ docs_url="https://top10.owasp.org/2025/A07_2025-Authentication_Failures/",
183
183
  ))
184
184
  elif val is not None and _SECRET_VALUE_RE.search(val):
185
185
  findings.append(Finding(
@@ -191,8 +191,8 @@ def _yaml001(root: yaml.Node, path: Path) -> list[Finding]:
191
191
  severity=Severity.ERROR,
192
192
  message=f"Value under '{key}' matches a known secret format",
193
193
  hint="Remove the secret and reference it via a secret manager or env var.",
194
- authority="OWASP A02:2021 – Cryptographic Failures",
195
- docs_url="https://owasp.org/Top10/A02_2021-Cryptographic_Failures/",
194
+ authority="OWASP A07:2025 – Authentication Failures / CWE-798",
195
+ docs_url="https://top10.owasp.org/2025/A07_2025-Authentication_Failures/",
196
196
  ))
197
197
  _walk_mapping(v)
198
198
  elif isinstance(node, yaml.SequenceNode):
@@ -1126,8 +1126,8 @@ def _yaml021_k8s(root: yaml.MappingNode, path: Path) -> list[Finding]:
1126
1126
  " — use secretKeyRef"
1127
1127
  ),
1128
1128
  hint="Use env: - name: FOO valueFrom: secretKeyRef: name: my-secret key: foo",
1129
- authority="OWASP A02:2021 – Cryptographic Failures",
1130
- docs_url="https://owasp.org/Top10/A02_2021-Cryptographic_Failures/",
1129
+ authority="OWASP A07:2025 – Authentication Failures / CWE-798",
1130
+ docs_url="https://top10.owasp.org/2025/A07_2025-Authentication_Failures/",
1131
1131
  ))
1132
1132
  return findings
1133
1133
 
@@ -318,3 +318,7 @@ def version() -> None:
318
318
  """Print version."""
319
319
  from . import __version__
320
320
  typer.echo(f"proofctl {__version__}")
321
+
322
+
323
+ if __name__ == "__main__": # `python -m proofctl.cli` must run, not exit 0 silently
324
+ app(prog_name="proofctl")
@@ -51,6 +51,11 @@ _HIDDEN_FAMILIES: frozenset[str] = frozenset({"INTERNAL"})
51
51
  # expression rather than a literal Severity.X. Listed as the worst case the rule
52
52
  # can fire at, since that is what `proofctl rules` should communicate.
53
53
  _DYNAMIC_SEVERITY_OVERRIDES: dict[str, Severity] = {
54
+ "PROOFCTL-INTERNAL-001": Severity.ERROR, # INFO by default, ERROR under --strict
55
+ "PROOFCTL-Q-AI-006": Severity.ERROR, # ERROR for bare except, else WARNING/INFO
56
+ "PROOFCTL-S-016": Severity.WARNING, # INFO for common tools, else WARNING
57
+ "PROOFCTL-TF-G040": Severity.WARNING, # INFO on GKE Autopilot, else WARNING
58
+ "PROOFCTL-YAML-019": Severity.ERROR, # ERROR for sensitive host paths, else WARNING
54
59
  "PROOFCTL-DF-001": Severity.ERROR, # ERROR for :latest, WARNING for tag-without-digest
55
60
  "PROOFCTL-DF-005": Severity.ERROR, # ERROR for ENV, WARNING for ARG
56
61
  "PROOFCTL-I-002": Severity.ERROR, # ERROR/WARNING by category
@@ -96,15 +101,20 @@ def _severity_label(node: ast.AST | None) -> str | None:
96
101
  return None
97
102
 
98
103
 
104
+ # Positional finding-builder helpers: (…, "PROOFCTL-…", "Rule name", …, Severity.X, …).
105
+ # A helper missing from this set silently loses its rules' names and severities.
106
+ _HELPER_NAMES = frozenset({"_f", "_mk"})
107
+
108
+
99
109
  def _is_finding_call(call: ast.Call) -> str | None:
100
- """'finding' for Finding(...), 'helper' for _f(...) or self._f(...), else None."""
110
+ """'finding' for Finding(...), 'helper' for a known builder helper, else None."""
101
111
  fn = call.func
102
112
  if isinstance(fn, ast.Name):
103
113
  if fn.id == "Finding":
104
114
  return "finding"
105
- if fn.id == "_f":
115
+ if fn.id in _HELPER_NAMES:
106
116
  return "helper"
107
- if isinstance(fn, ast.Attribute) and fn.attr == "_f":
117
+ if isinstance(fn, ast.Attribute) and fn.attr in _HELPER_NAMES:
108
118
  return "helper"
109
119
  return None
110
120
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: proofctl
3
- Version: 0.6.1
3
+ Version: 0.6.2
4
4
  Summary: DevOps linter and security scanner for AI slop and misconfigurations — runs in pre-commit, CI, or post-commit; no external tools required
5
5
  Author: Kolawolu Odunola
6
6
  License: MIT
@@ -35,7 +35,7 @@ Dynamic: license-file
35
35
 
36
36
  # proofctl
37
37
 
38
- A static-analysis linter and security scanner for the DevOps stack — Python, Terraform, Kubernetes, Helm, Dockerfiles, GitHub Actions, Shell — that catches the specific kinds of mistakes AI coding tools introduce. **271 rules**, no external tools, runs in under a second.
38
+ A static-analysis linter and security scanner for the DevOps stack — Python, Terraform, Kubernetes, Helm, Dockerfiles, GitHub Actions, Shell — that catches the specific kinds of mistakes AI coding tools introduce. **271 rules**, no external tools — about a second on a typical Terraform repo.
39
39
 
40
40
  ```
41
41
  proofctl check .
@@ -344,7 +344,7 @@ proofctl rules --severity ERROR
344
344
  "severity": "ERROR",
345
345
  "message": "SQL injection via string format in .execute()",
346
346
  "hint": "Use parameterised queries: cursor.execute(sql, params)",
347
- "authority": "OWASP A03:2021, CWE-89"
347
+ "authority": "OWASP A05:2025 – Injection / CWE-89"
348
348
  }
349
349
  ]
350
350
  }
@@ -3,6 +3,7 @@ MANIFEST.in
3
3
  README.md
4
4
  pyproject.toml
5
5
  proofctl/__init__.py
6
+ proofctl/__main__.py
6
7
  proofctl/_globmatch.py
7
8
  proofctl/baseline.py
8
9
  proofctl/cli.py
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "proofctl"
7
- version = "0.6.1"
7
+ version = "0.6.2"
8
8
  description = "DevOps linter and security scanner for AI slop and misconfigurations — runs in pre-commit, CI, or post-commit; no external tools required"
9
9
  readme = "README.md"
10
10
  license = { text = "MIT" }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes