Skip to content

Devoclan/proof and c2c deny - #350

Merged
miss-yusrah merged 2 commits into
Stellar-TrustBridge:mainfrom
devoclan:devoclan/proof-and-c2c-deny
Aug 31, 2026
Merged

Devoclan/proof and c2c deny#350
miss-yusrah merged 2 commits into
Stellar-TrustBridge:mainfrom
devoclan:devoclan/proof-and-c2c-deny

Conversation

@devoclan

Copy link
Copy Markdown
Contributor

closes #312
closes #313
closes #314
closes #315

verify() is currently "admin said so" with no proof bytes. Adds
OracleProof + set_oracle_allowlist/get_oracle_allowlist/verify_with_proof
in src/oracle_proof.rs: an allowlisted Ed25519 oracle key signs a message
off-chain, and the contract checks allowlist membership, expiry, and the
signature. Invalid proofs fail (NotAuthorized for unallowlisted/expired
keys, a host trap for a bad signature, mirroring existing require_auth()
behavior). Covered by tests using a fixed test keypair.

Out of scope (documented in docs/SECURITY.md): wiring this into
verify()/batch_verify(), and running a production GitHub oracle. Still
not a GitHub API integration.
register() has no replay nonce, and C2C write access was unspecified.
Rather than half-opening C2C register, adds
tests/cross_contract_register_deny.rs proving a sibling contract cannot
relay a register() call on another address's behalf: the relaying
contract runs in its own auth context and cannot satisfy
stellar_address.require_auth(), so the call fails closed. A positive
control confirms direct, self-signed register still works.

docs/SECURITY.md documents the ABI statement: register is not part of
the cross-contract read surface and must not be added to it without a
replay nonce shipped in the same change.
@drips-wave

drips-wave Bot commented Aug 29, 2026

Copy link
Copy Markdown

@devoclan 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! 🚀

Learn more about application limits

@miss-yusrah
miss-yusrah merged commit a9e5d2d into Stellar-TrustBridge:main Aug 31, 2026
0 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants