GHSA-named regression tests for 3p3x and r5qv (backlog#1151 sec-6)

test(security): GHSA-named regression tests for 3p3x and r5qv (backlog#1151 sec-6) (#4707)
GHSA-named regression tests for 3p3x and r5qv (backlog#1151 sec-6)846aa9-test-ghsa-named-regression-tests-for-3p3x-and-cve-2026-45039testghsa named regression tests 3p3x r5qv

Committed by overtrue

commit message
test(security): GHSA-named regression tests for 3p3x and r5qv (backlog#1151 sec-6) (#4707)

test(security): add GHSA-named regression tests for 3p3x and r5qv (backlog#1151 sec-6)
 
Anchor the two fixed advisories to discoverable, named regression tests so
`rg -i "ghsa|3p3x|r5qv"` finds a guard for each, and future fixes are forced
to update pinned behavior (red -> green).
 
GHSA-3p3x-734c-h5vx (constant-time WebDAV/FTPS secret comparison, rustfs#4403):
- ftps_core.rs: new `assert_ftps_ghsa_3p3x_wrong_credentials_rejected` drives
  the `ct_eq` reject branch in FtpsAuthenticator::authenticate; asserts wrong
  password and unknown user are both rejected (530) and indistinguishable.
- webdav_core.rs: the auth-failure block now sends a valid access key with a
  wrong secret (exercising the `ct_eq` branch, not just the unknown-access-key
  path) plus an unknown user, asserting both 401 and indistinguishable.
- Module doc comments map advisory -> tests -> fix PR on both files.
 
GHSA-r5qv-rc46-hv8q (internode RPC fail-closed, rustfs#4402):
- http_auth.rs: renamed the default-fallback rejection test to
  `ghsa_r5qv_resolve_shared_secret_rejects_default_fallback` (and broadened it
  to cover default env secret + blank secrets), and added
  `ghsa_r5qv_verify_rpc_signature_fails_closed_on_missing_or_invalid_auth`
  pinning the exact advisory scenario (missing/forged/cross-URL signature is
  rejected; a correctly signed request still passes). File-level doc maps the
  advisory.
 
Docs: new docs/testing/security-regressions.md with the advisory -> test
mapping table and where each layer runs; linked from docs/testing/README.md.
sec-14 will formalize the written policy in AGENTS.md.
 
The unit-level ghsa_r5qv_* tests run in the default CI pass. The WebDAV/FTPS
e2e live in the protocols suite (fixed ports, --test-threads=1); they cannot
join the e2e-smoke profile and are wired into CI by sec-5.
 
Refs: rustfs/backlog#1151 (sec-6), rustfs/backlog#1155

Editor assessment

This commit patches CVE-2026-45039. The body is unusually strong: it explains that naming regression tests after advisories makes them discoverable by search, forces future fixes to update pinned behavior, and maps each test function to its advisory and fix PR. That teaching value is exactly what an exemplar body should do. The header, however, is cluttered with the shorthand `3p3x` and `r5qv`, a `backlog#1151 sec-6` tag, and a PR number, so the subject reads like a ticket dump and the referenced advisories are not identifiable from it. The `test(security)` type and scope are accurate for regression coverage. Excellent content under a noisy header holds it back from the top tier.

Browse categories

More test examples · Back to search