rust-audit 0.2.4__tar.gz → 0.2.5__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 (21) hide show
  1. {rust_audit-0.2.4/scripts/rust_audit.egg-info → rust_audit-0.2.5}/PKG-INFO +9 -2
  2. {rust_audit-0.2.4 → rust_audit-0.2.5}/README.md +8 -1
  3. {rust_audit-0.2.4 → rust_audit-0.2.5/scripts/rust_audit.egg-info}/PKG-INFO +9 -2
  4. {rust_audit-0.2.4 → rust_audit-0.2.5}/scripts/rust_audit.py +1 -1
  5. {rust_audit-0.2.4 → rust_audit-0.2.5}/tests/test_packaging.py +44 -0
  6. {rust_audit-0.2.4 → rust_audit-0.2.5}/LICENSE +0 -0
  7. {rust_audit-0.2.4 → rust_audit-0.2.5}/pyproject.toml +0 -0
  8. {rust_audit-0.2.4 → rust_audit-0.2.5}/resources/popular_crates.txt +0 -0
  9. {rust_audit-0.2.4 → rust_audit-0.2.5}/resources/suspicious_names.txt +0 -0
  10. {rust_audit-0.2.4 → rust_audit-0.2.5}/scripts/rust_audit.egg-info/SOURCES.txt +0 -0
  11. {rust_audit-0.2.4 → rust_audit-0.2.5}/scripts/rust_audit.egg-info/dependency_links.txt +0 -0
  12. {rust_audit-0.2.4 → rust_audit-0.2.5}/scripts/rust_audit.egg-info/entry_points.txt +0 -0
  13. {rust_audit-0.2.4 → rust_audit-0.2.5}/scripts/rust_audit.egg-info/requires.txt +0 -0
  14. {rust_audit-0.2.4 → rust_audit-0.2.5}/scripts/rust_audit.egg-info/top_level.txt +0 -0
  15. {rust_audit-0.2.4 → rust_audit-0.2.5}/setup.cfg +0 -0
  16. {rust_audit-0.2.4 → rust_audit-0.2.5}/templates/deny.toml +0 -0
  17. {rust_audit-0.2.4 → rust_audit-0.2.5}/tests/test_check_skill_sync.py +0 -0
  18. {rust_audit-0.2.4 → rust_audit-0.2.5}/tests/test_interpreter_guard.py +0 -0
  19. {rust_audit-0.2.4 → rust_audit-0.2.5}/tests/test_production_e2e.py +0 -0
  20. {rust_audit-0.2.4 → rust_audit-0.2.5}/tests/test_skill_wrapper_cli.py +0 -0
  21. {rust_audit-0.2.4 → rust_audit-0.2.5}/tests/test_verify_release.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rust-audit
3
- Version: 0.2.4
3
+ Version: 0.2.5
4
4
  Summary: Static auditor and auto-fixer for AI-generated Rust traps — stubs, fake tests, swallowed errors, panic/unsafe misuse, hallucinated or typosquatted crates
5
5
  Author-email: Antonio Cantallops Alba <contact@exyonq.org>
6
6
  License-Expression: Apache-2.0
@@ -52,13 +52,20 @@ Nothing is fetched or executed at install time, and
52
52
  the wheel carries the same `rust_audit.py` as the signed release asset — so the
53
53
  verify-before-use chain below still applies to the script you download.
54
54
 
55
+ The wheel's digest is attested by the workflow that built it, so you can check
56
+ where it came from before running it:
57
+
58
+ ```bash
59
+ gh attestation verify rust_audit-*-py3-none-any.whl -R Doken-Tokuyama/Rust-Audit
60
+ ```
61
+
55
62
  ## Quick start
56
63
 
57
64
  ```bash
58
65
  # 0) verify before use — check the exact audited bytes before executing them
59
66
  # (key pin -> SSH signature -> checksum -> tag identity) and proceed only
60
67
  # on VERIFIED (exit 0); see SECURITY.md for the pinned key and the chain
61
- scripts/verify_release.sh v0.2.4 ./rust_audit.py
68
+ scripts/verify_release.sh v0.2.5 ./rust_audit.py
62
69
 
63
70
  python3 scripts/rust_audit.py selftest
64
71
  python3 scripts/rust_audit.py scan <rust-project> --format terminal,md,json,sarif --fail-on high
@@ -22,13 +22,20 @@ Nothing is fetched or executed at install time, and
22
22
  the wheel carries the same `rust_audit.py` as the signed release asset — so the
23
23
  verify-before-use chain below still applies to the script you download.
24
24
 
25
+ The wheel's digest is attested by the workflow that built it, so you can check
26
+ where it came from before running it:
27
+
28
+ ```bash
29
+ gh attestation verify rust_audit-*-py3-none-any.whl -R Doken-Tokuyama/Rust-Audit
30
+ ```
31
+
25
32
  ## Quick start
26
33
 
27
34
  ```bash
28
35
  # 0) verify before use — check the exact audited bytes before executing them
29
36
  # (key pin -> SSH signature -> checksum -> tag identity) and proceed only
30
37
  # on VERIFIED (exit 0); see SECURITY.md for the pinned key and the chain
31
- scripts/verify_release.sh v0.2.4 ./rust_audit.py
38
+ scripts/verify_release.sh v0.2.5 ./rust_audit.py
32
39
 
33
40
  python3 scripts/rust_audit.py selftest
34
41
  python3 scripts/rust_audit.py scan <rust-project> --format terminal,md,json,sarif --fail-on high
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rust-audit
3
- Version: 0.2.4
3
+ Version: 0.2.5
4
4
  Summary: Static auditor and auto-fixer for AI-generated Rust traps — stubs, fake tests, swallowed errors, panic/unsafe misuse, hallucinated or typosquatted crates
5
5
  Author-email: Antonio Cantallops Alba <contact@exyonq.org>
6
6
  License-Expression: Apache-2.0
@@ -52,13 +52,20 @@ Nothing is fetched or executed at install time, and
52
52
  the wheel carries the same `rust_audit.py` as the signed release asset — so the
53
53
  verify-before-use chain below still applies to the script you download.
54
54
 
55
+ The wheel's digest is attested by the workflow that built it, so you can check
56
+ where it came from before running it:
57
+
58
+ ```bash
59
+ gh attestation verify rust_audit-*-py3-none-any.whl -R Doken-Tokuyama/Rust-Audit
60
+ ```
61
+
55
62
  ## Quick start
56
63
 
57
64
  ```bash
58
65
  # 0) verify before use — check the exact audited bytes before executing them
59
66
  # (key pin -> SSH signature -> checksum -> tag identity) and proceed only
60
67
  # on VERIFIED (exit 0); see SECURITY.md for the pinned key and the chain
61
- scripts/verify_release.sh v0.2.4 ./rust_audit.py
68
+ scripts/verify_release.sh v0.2.5 ./rust_audit.py
62
69
 
63
70
  python3 scripts/rust_audit.py selftest
64
71
  python3 scripts/rust_audit.py scan <rust-project> --format terminal,md,json,sarif --fail-on high
@@ -48,7 +48,7 @@ import urllib.request
48
48
  from dataclasses import dataclass, field
49
49
  from pathlib import Path
50
50
 
51
- VERSION = "0.2.4"
51
+ VERSION = "0.2.5"
52
52
  TOOL_NAME = "Rust Audit"
53
53
 
54
54
  SEVERITY_RANK = {"critical": 4, "high": 3, "medium": 2, "low": 1, "info": 0}
@@ -17,6 +17,9 @@ REPO = Path(__file__).resolve().parent.parent
17
17
  TOOL = REPO / "scripts" / "rust_audit.py"
18
18
  PYPROJECT = REPO / "pyproject.toml"
19
19
  PUBLISH_WORKFLOW = REPO / ".github" / "workflows" / "publish.yml"
20
+ ATTEST_WORKFLOW = REPO / ".github" / "workflows" / "attest-release.yml"
21
+ # actions/attest-build-provenance v4.2.2, pinned by commit: a tag can move.
22
+ ATTEST_SHA = "4d101475d8b20a2381f78447822ac1eab6504dd8"
20
23
 
21
24
 
22
25
  def load_module(path=TOOL, name="rust_audit_probe"):
@@ -72,6 +75,47 @@ def test_only_one_distribution_is_published():
72
75
  "an alias distribution reappeared under packaging/")
73
76
 
74
77
 
78
+ def test_provenance_attestations_are_wired_in():
79
+ """Both channels attest a digest, from the workflow that can sign it.
80
+
81
+ `gh attestation verify` only answers for a digest some workflow run
82
+ signed with the repository's OIDC identity, so deleting either step
83
+ would silently downgrade the channel to "trust the uploader".
84
+ """
85
+ publish = PUBLISH_WORKFLOW.read_text()
86
+ attest = ATTEST_WORKFLOW.read_text()
87
+ for name, workflow in (("publish.yml", publish),
88
+ ("attest-release.yml", attest)):
89
+ assert "id-token: write" in workflow, f"{name}: nothing to sign with"
90
+ assert "attestations: write" in workflow, (
91
+ f"{name}: the attestation would have nowhere to go")
92
+ assert ATTEST_SHA in workflow, (
93
+ f"{name}: actions/attest-build-provenance is not pinned to "
94
+ f"{ATTEST_SHA} — a moving tag can be retargeted")
95
+ assert "subject-path: dist/main/*" in publish, (
96
+ "the wheel and sdist are not attested where they are built")
97
+ assert "subject-path: assets/*" in attest, (
98
+ "the uploaded release assets are not attested")
99
+ assert "release:" in attest and "published" in attest, (
100
+ "release assets only exist after `release: published`")
101
+ assert "gh release download" in attest, (
102
+ "the job must attest the bytes that were actually uploaded")
103
+
104
+
105
+ def test_security_says_what_each_channel_proves():
106
+ security = (REPO / "SECURITY.md").read_text()
107
+ assert "gh attestation verify" in security, (
108
+ "the attestations exist but SECURITY.md never tells anyone how to "
109
+ "check them")
110
+ assert "not wired in yet" not in security, (
111
+ "SECURITY.md still says attestations are missing")
112
+ rows = [line for line in security.splitlines()
113
+ if line.startswith("| GitHub release asset |")
114
+ or line.startswith("| PyPI wheel")]
115
+ assert len(rows) == 2, (
116
+ "the channel table must cover the release asset and the wheel")
117
+
118
+
75
119
  def test_declared_data_files_exist():
76
120
  project = tomllib.loads(PYPROJECT.read_text())
77
121
  declared = project["tool"]["setuptools"]["data-files"]
File without changes
File without changes
File without changes