Repository navigation
loop/foundation 2026 06 22 141238 - #342
Merged
Merged
Conversation
bordumb
commented
Jun 22, 2026
Contributor
- fix(auths-keri): reject multibyte version headers instead of panicking
- fix(auths-keri): fail closed on malformed CESR verkeys instead of panicking
- test(auths-keri): repair the fuzz targets against the current API
- ci: build and smoke-run the auths-keri fuzz targets
- style: apply rustfmt across the workspace
The CESR import parser sliced the six-byte size field out of the KERI10JSON version string with a direct &str range after only a byte-length check. A multi-byte UTF-8 char straddling that range split the char and panicked. Use a char-boundary-safe accessor that fails closed on a truncated or misaligned header, matching the version-string deserializer. Adds a regression test driving the wired import path with a hostile header. Auths-Id: did:keri:EB5cPHY0t-ejNC_rUzPS1dclTvd6kG-R9mQzjozCuGgd Auths-Device: did:keri:EB5cPHY0t-ejNC_rUzPS1dclTvd6kG-R9mQzjozCuGgd Auths-Anchor-Seq: 1
…icking KeriPublicKey::parse handed untrusted strings straight to cesride, whose qb64 decoder slices the input by a length derived from the derivation code and panics (out-of-bounds / non-char-boundary slice) on a truncated, non-ASCII, or unknown code. Validate the code prefix, ASCII, and exact primitive length before decoding so a hostile verkey returns a typed DecodeError, and contain any residual decoder panic at the decode_verkey boundary so the receipt path fails closed too. Adds a regression test over a battery of malformed inputs. Auths-Id: did:keri:EB5cPHY0t-ejNC_rUzPS1dclTvd6kG-R9mQzjozCuGgd Auths-Device: did:keri:EB5cPHY0t-ejNC_rUzPS1dclTvd6kG-R9mQzjozCuGgd Auths-Anchor-Seq: 1
fuzz_validate_kel called a removed validate_kel and treated decoded JSON values as typed events, so the whole fuzz crate failed to build and none of the targets could run. Retarget it at validate_signed_kel over a JSON array of signed events, asserting the verdict never panics and an accepted KEL keeps one controller across the chain. fuzz_parse_cesr re-encoded through the obsolete naive base64 form rather than the canonical to_qb64, so its round-trip oracle was wrong; switch it to to_qb64. Drop the now-unused deps and add serde_json. Auths-Id: did:keri:EB5cPHY0t-ejNC_rUzPS1dclTvd6kG-R9mQzjozCuGgd Auths-Device: did:keri:EB5cPHY0t-ejNC_rUzPS1dclTvd6kG-R9mQzjozCuGgd Auths-Anchor-Seq: 1
The fuzz-smoke job only covered auths-verifier, so the auths-keri fuzz targets built and ran in no CI job and silently bit-rotted. Turn the job into a matrix over both fuzz workspaces so all three keri targets (cesr_import, parse_cesr, validate_kel) build and smoke-run on every CI. Auths-Id: did:keri:EB5cPHY0t-ejNC_rUzPS1dclTvd6kG-R9mQzjozCuGgd Auths-Device: did:keri:EB5cPHY0t-ejNC_rUzPS1dclTvd6kG-R9mQzjozCuGgd Auths-Anchor-Seq: 1
Formats the new version-header guard plus several test files that were committed unformatted, so cargo fmt --all --check is clean. Auths-Id: did:keri:EB5cPHY0t-ejNC_rUzPS1dclTvd6kG-R9mQzjozCuGgd Auths-Device: did:keri:EB5cPHY0t-ejNC_rUzPS1dclTvd6kG-R9mQzjozCuGgd Auths-Anchor-Seq: 1
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Auths Commit Verification
Result: ❌ 0/5 commits verified How to fixCommit 1. Install auths macOS: 2. One-time setup (creates your identity and configures Git) auths init3. Sign this branch and push auths sign origin/main..HEAD
git push --force-with-leaseFor CI to verify the signer, commit an identity bundle: auths id export-bundle --alias main --output .auths/ci-bundle.json --max-age-secs 31536000 |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.