feat: session key ACL, cargo-fuzz targets, Kani proofs, dApp connector#247
Open
Jaydbrown wants to merge 13 commits into
Open
feat: session key ACL, cargo-fuzz targets, Kani proofs, dApp connector#247Jaydbrown wants to merge 13 commits into
Jaydbrown wants to merge 13 commits into
Conversation
|
@Jaydbrown is attempting to deploy a commit to the miracle656's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@Jaydbrown Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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.
Closes #237
Closes #238
Closes #239
Closes #240
Summary
Implements four advanced features from the Drips Wave bounty criteria:
1 — Session Key ACL (
contracts/invisible_wallet/src/session_key.rs)A scoped session key system that lets agents and bots authorise a single
transfer(asset=USDC)call without holding a full passkey.SessionKeyAclstruct:target_contract,selector,amount_cap,expiryregister/revoke/enforcehelpers backed by Soroban temporary storage__check_authupdated with a third dispatch path:BytesN<32>→ session keyregister_session_key,revoke_session_keySessionKeyExpired = 19,SessionKeyAclViolation = 202 — Cargo-fuzz targets (
contracts/fuzz/)fuzz_check_auth— drives the parsing layer of__check_authwith arbitraryblobs; catches off-by-one, unwrap-on-None, and integer overflow panics
fuzz_webauthn— drives challenge-binding, origin-extraction, rpIdHash-length,and signature-format checks with arbitrary byte inputs
.github/workflows/fuzz.yml) with 60 s runs; panicsautomatically open a GitHub issue with crash artifacts
3 — Kani proof harnesses (
contracts/invisible_wallet/src/proofs.rs)Three
#[cfg(kani)] #[kani::proof]harnesses guarding security-critical invariants:proof_low_s_invariantproof_nonce_monotonicityproof_session_key_expirynow > expiry; valid atnow == expiryDocumented in
contracts/invisible_wallet/PROOFS.md.4 — dApp connector (
examples/dapp-connector/)Chrome MV3 extension + reference dApp implementing a
window.veil.request()APImodelled on EIP-1193. The dApp sends XDR payloads; the extension signs them in
the background service worker — private material never reaches the page.
Test plan
cd contracts && cargo test— all existing tests pass; new session key tests passcd contracts/fuzz && cargo fuzz run fuzz_check_auth -- -max_total_time=30— no panicscd contracts/fuzz && cargo fuzz run fuzz_webauthn -- -max_total_time=30— no panicscargo kani --harness proof_low_s_invariant(needs nightly + kani-verifier)examples/dapp-connector/as an unpacked Chrome extension, opendapp/index.html, click Connect and Sign