|
| 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