Skip to content

Commit 43b76fd

Browse files
committed
Accept crates.io implementation checkpoint 5
1 parent e79273b commit 43b76fd

8 files changed

Lines changed: 164 additions & 18 deletions

File tree

‎crates/cloud-sdk-cratesio/README.md‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@ provider-neutral execution contracts from `cloud-sdk`.
2626
The crate is currently an unreleased `1.1.0` candidate. Provider identity and
2727
the endpoint, request-target, and static-download redirect boundaries are now
2828
implemented. Protected credential preparation is implemented behind `alloc`
29-
and awaiting its checkpoint pentest. API workflows and authenticated network
30-
execution remain unavailable until their reviewed checkpoints are complete.
29+
and has passed its checkpoint pentest and remediation retest. API workflows
30+
and authenticated network execution remain unavailable until their reviewed
31+
checkpoints are complete.
3132

3233
## Current Boundary
3334

‎docs/CRATESIO_CREDENTIAL_POLICY.md‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# crates.io Credential Contract
22

3-
Status: Commit 5 implemented; incremental pentest pending. Candidate `1.1.0`
4-
is not publishable. No authenticated API workflow is claimed complete.
3+
Status: Commit 5 incremental pentest and remediation retest passed; GitHub
4+
approval is pending. Candidate `1.1.0` is not publishable. No authenticated API
5+
workflow is claimed complete.
56

67
## Source And Context
78

@@ -94,4 +95,6 @@ expiry, rotation schedules and remote invalidation. No hidden retries occur.
9495
- Source-inventory checker regression tests, default/alloc/all-feature builds,
9596
MSRV, Clippy, doctests, package verification, SBOM and repository gates.
9697

97-
User pentest approval is still required for this checkpoint.
98+
The user confirmed a green remediation retest. The
99+
[permanent report](../security/pentest/cratesio-commit-5.md) records the exact
100+
reviewed range. GitHub CI and CodeQL must pass before Commit 6 begins.

‎docs/CRATESIO_SOURCE_LOCK.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# crates.io Source Lock
22

3-
Status: Commits 1 through 4 accepted; Commit 5 credential preparation is
4-
implemented and awaiting pentest in the unreleased `1.1.0` train. See the
3+
Status: Commits 1 through 5 have passed pentest; Commit 5 credential preparation
4+
awaits GitHub approval in the unreleased `1.1.0` train. See the
55
[credential contract](CRATESIO_CREDENTIAL_POLICY.md).
66

77
This lock establishes the finite reviewed scope for provider implementation. The

‎docs/cratesio-commit-plan.md‎

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# crates.io Commit Plan
22

3-
Status: selected unreleased `1.1.0` implementation train. Commits 1 through 4
4-
are accepted; Commit 5 is implemented and awaiting its incremental pentest.
5-
Stop here before starting Commit 6.
3+
Status: selected unreleased `1.1.0` implementation train. Commits 1 through 5
4+
have passed their pentests. Commit 5 is awaiting GitHub CI and CodeQL approval;
5+
stop here before starting Commit 6.
66

77
## Decision Summary
88

@@ -241,9 +241,14 @@ redirect boundary.
241241

242242
## Commit 5 - Credentials And Authentication Contexts
243243

244-
Implementation status: implemented; pentest pending. Compare against accepted
245-
Commit 4 evidence commit `3c9b2ad6c230f069b75b1138cbbebecbe350aba7` through the
246-
Commit 5 implementation HEAD. Do not tag or publish this candidate checkpoint.
244+
Implementation status: incremental pentest and remediation retest passed.
245+
Reviewed range: accepted Commit 4 evidence commit
246+
`3c9b2ad6c230f069b75b1138cbbebecbe350aba7` through
247+
`e79273b7f4d4bafa0520e0b7105dd11012b782af`. The permanent
248+
[pentest report](../security/pentest/cratesio-commit-5.md) records the resolved
249+
test-coverage finding. The evidence commit containing that report becomes
250+
Commit 6's comparison baseline after GitHub CI and CodeQL pass. Do not tag or
251+
publish this candidate checkpoint.
247252

248253
Implemented contract: [credential policy](CRATESIO_CREDENTIAL_POLICY.md).
249254
Protected storage and adapter preparation are available under `alloc`, without

‎release-notes/RELEASE_NOTES_1.1.0.md‎

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -200,14 +200,22 @@ full-service assessment are complete.
200200
API-token route comparison with the source inventory. Default features stay
201201
empty and no new third-party package is admitted.
202202

203-
Commit 5 is implemented and awaiting incremental pentest against accepted
204-
checkpoint `3c9b2ad6c230f069b75b1138cbbebecbe350aba7`. The train remains blocked
205-
from publication until all numbered checkpoints are accepted.
203+
Commit 5 passed its incremental pentest and remediation retest from accepted
204+
checkpoint `3c9b2ad6c230f069b75b1138cbbebecbe350aba7` through reviewed commit
205+
`e79273b7f4d4bafa0520e0b7105dd11012b782af`. GitHub approval is pending. The train
206+
remains blocked from publication until all numbered checkpoints are accepted.
206207

207208
Commit 5 pentest remediation adds independent fixed-operation method/path
208209
assertions at both constructor and emitted-material boundaries, including
209210
temporary-token revocation. This closes a regression-test gap without changing
210-
the currently correct runtime constructors. Remediation retest is pending.
211+
the currently correct runtime constructors. Both regression tests reject each
212+
of ten isolated method/path mutations; the restored snapshot passes. The final
213+
user-confirmed retest found no remaining issue.
214+
215+
Checkpoint qualification also corrected the isolated package-feature gate to
216+
patch both unpublished local dependencies of `cloud-sdk-cratesio`, matching the
217+
main check gate. A mock-Cargo regression test asserts the actual complete
218+
package command. This changes only build verification, not SDK behavior.
211219

212220
### Maintenance Evidence
213221

‎scripts/check_packaged_feature_graphs.sh‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ cargo package --locked -p cloud-sdk-hetzner --allow-dirty --all-features \
1818
--config 'patch.crates-io.cloud-sdk-sanitization.path="crates/cloud-sdk-sanitization"' \
1919
--config 'patch.crates-io.cloud-sdk-testkit.path="crates/cloud-sdk-testkit"'
2020
cargo package --locked -p cloud-sdk-cratesio --allow-dirty --all-features \
21-
--config 'patch.crates-io.cloud-sdk.path="crates/cloud-sdk"'
21+
--config 'patch.crates-io.cloud-sdk.path="crates/cloud-sdk"' \
22+
--config 'patch.crates-io.cloud-sdk-sanitization.path="crates/cloud-sdk-sanitization"'
2223
scripts/check_packaged_reqwest_tests.sh
2324

2425
printf '%s\n' "All six publishable package graphs passed Cargo verification."

‎scripts/test-cratesio-crate-boundary.py‎

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@
44
from __future__ import annotations
55

66
import importlib.util
7+
import json
8+
import os
79
import shutil
10+
import subprocess
11+
import sys
812
import tempfile
913
from pathlib import Path
1014

@@ -264,6 +268,42 @@ def test_credential_inventory_and_feature_regressions_are_rejected() -> None:
264268
shutil.rmtree(root)
265269

266270

271+
def test_packaged_candidate_uses_both_local_dependency_patches() -> None:
272+
with tempfile.TemporaryDirectory() as directory:
273+
root = Path(directory)
274+
scripts = root / "scripts"
275+
scripts.mkdir()
276+
shutil.copyfile(ROOT / "scripts/enforce_bundled_aws_lc.sh", scripts / "enforce_bundled_aws_lc.sh")
277+
reqwest = scripts / "check_packaged_reqwest_tests.sh"
278+
reqwest.write_text("#!/bin/sh\nexit 0\n", encoding="ascii")
279+
reqwest.chmod(0o700)
280+
binary = root / "bin"
281+
binary.mkdir()
282+
log = root / "cargo.jsonl"
283+
cargo = binary / "cargo"
284+
cargo.write_text(
285+
f"#!{sys.executable}\n"
286+
"import json, sys\n"
287+
f"with open({str(log)!r}, 'a', encoding='ascii') as output:\n"
288+
" output.write(json.dumps(sys.argv[1:]) + '\\n')\n",
289+
encoding="ascii",
290+
)
291+
cargo.chmod(0o700)
292+
environment = dict(os.environ, PATH=str(binary) + os.pathsep + os.environ["PATH"])
293+
result = subprocess.run(
294+
["sh", str(ROOT / "scripts/check_packaged_feature_graphs.sh")],
295+
cwd=root, env=environment, text=True, capture_output=True, check=False,
296+
)
297+
assert result.returncode == 0, result
298+
calls = [json.loads(line) for line in log.read_text(encoding="ascii").splitlines()]
299+
provider_calls = [call for call in calls if "cloud-sdk-cratesio" in call]
300+
assert provider_calls == [[
301+
"package", "--locked", "-p", "cloud-sdk-cratesio", "--allow-dirty", "--all-features",
302+
"--config", 'patch.crates-io.cloud-sdk.path="crates/cloud-sdk"',
303+
"--config", 'patch.crates-io.cloud-sdk-sanitization.path="crates/cloud-sdk-sanitization"',
304+
]], provider_calls
305+
306+
267307
def main() -> None:
268308
tests = (
269309
test_repository_boundary,
@@ -275,6 +315,7 @@ def main() -> None:
275315
test_endpoint_code_and_extra_modules_are_rejected,
276316
test_unrelated_crate_dependency_is_rejected,
277317
test_credential_inventory_and_feature_regressions_are_rejected,
318+
test_packaged_candidate_uses_both_local_dependency_patches,
278319
)
279320
for test in tests:
280321
test()
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# crates.io Commit 5 Pentest Report
2+
3+
Status: PASS
4+
Assessment: INCREMENTAL
5+
Baseline: 3c9b2ad6c230f069b75b1138cbbebecbe350aba7
6+
Range-End: e79273b7f4d4bafa0520e0b7105dd11012b782af
7+
Reviewed-Commit: e79273b7f4d4bafa0520e0b7105dd11012b782af
8+
Tester: eldryoth
9+
Scope: crates.io protected credentials, authentication contexts, scoped adapter
10+
material, caller-buffer cleanup, rotation, and source-inventory regression
11+
coverage introduced after the accepted Commit 4 checkpoint.
12+
Date: 2026-09-05
13+
14+
## Summary
15+
16+
The independent incremental assessment identified one low-severity regression
17+
test gap, without a demonstrated runtime exploit. The current constructors
18+
were correct. The test gap was remediated in `e79273b7` without changing SDK
19+
runtime behavior. The user confirmed the final retest is green with no
20+
remaining finding.
21+
22+
## Finding Count
23+
24+
| Severity | Open findings |
25+
| --- | ---: |
26+
| Critical | 0 |
27+
| High | 0 |
28+
| Medium | 0 |
29+
| Low | 0 |
30+
31+
## Findings And Remediation
32+
33+
### Fixed credential operations lacked independent regression assertions
34+
35+
The original material test compared its method with the same context it was
36+
testing, and header/JSON cases lacked independent target assertions. An
37+
incorrect temporary-token publish constructor could therefore pass both the
38+
credential unit tests and the separate source-inventory checker.
39+
40+
Independent literal method and target assertions now cover publish, temporary
41+
token revocation, OIDC exchange, email confirmation and invitation acceptance.
42+
Constructor tests cover production and staging. Material callbacks separately
43+
assert the emitted method and complete target, including secret path suffixes;
44+
API-token material is also checked. Expected values are not derived from the
45+
context under test.
46+
47+
In an isolated tracked snapshot, each fixed constructor's method and target
48+
was mutated separately. Both regression tests rejected all ten mutations;
49+
restoring the source made the snapshot tests pass. These probes never changed
50+
the working repository's runtime constructors.
51+
52+
## Verification
53+
54+
- Credential all-feature tests, doctests and alloc-only tests pass, including
55+
cleanup, origin rejection, formatting, redaction and compile-fail boundaries.
56+
- The fail-closed Rust test checker passes for the provider source tree.
57+
- Full repository checks and SBOM freshness checks pass after remediation.
58+
- All twelve supported compiler checks from Rust `1.92.0` through `1.98.1`
59+
pass for the complete workspace, all targets and all features.
60+
- All six packaged crate graphs verify; workspace documentation builds with
61+
warnings denied, and documentation links pass validation.
62+
- Dependency policy and fresh RustSec scans pass for all four lockfiles. Live
63+
crates.io source, endpoint and drift checks report no change; exact library
64+
pins and pinned Cargo security/fuzz tools are current.
65+
- Release-plan validation passes, and a publication dry run correctly refuses
66+
the non-public candidate milestone. No crate is selected for publication.
67+
- The root `PENTEST.md` scratch report is absent.
68+
69+
## Boundaries
70+
71+
The review does not turn the trusted adapter callback into an authenticated
72+
client. Callback obligations, remote JWT authentication, deferred execution
73+
and mutation controls, and cleanup exclusions for aborts and external copies
74+
remain documented in the [credential contract](../../docs/CRATESIO_CREDENTIAL_POLICY.md).
75+
Syntax validation is variable-time; this checkpoint does not claim hardware
76+
constant-time behavior or regulated-environment accreditation.
77+
78+
## Result
79+
80+
Commit 5 passed its final independent retest at the reviewed commit above.
81+
The evidence checkpoint also fixes a package-verification recipe discovered
82+
during final qualification: both unpublished local provider dependencies must
83+
be patched when checking the packaged crate. An argument-level mock-Cargo test
84+
covers that recipe, and actual package verification passed. This build-check
85+
correction and the documentation do not change the assessed runtime boundary.
86+
GitHub CI and CodeQL must pass before Commit 6 begins. Candidate
87+
`1.1.0` remains blocked from tagging and crate publication.

0 commit comments

Comments
 (0)