Skip to content

Fix AuditGuardContract security-theater vulnerability - #219

Merged
N-thnI merged 1 commit into
Vero-protocol:mainfrom
kosisochukwu1234:fix-audit-guard
Aug 21, 2026
Merged

Fix AuditGuardContract security-theater vulnerability#219
N-thnI merged 1 commit into
Vero-protocol:mainfrom
kosisochukwu1234:fix-audit-guard

Conversation

@kosisochukwu1234

Copy link
Copy Markdown
Contributor

Closes #188

Fixes the security-theater vulnerability in AuditGuardContract by implementing genuine verification logic.

Changes made:

  • AC-1: verify_context now reads the author's verification status from actual contract state (env.storage().instance().get(&author)) rather than trusting a caller-supplied boolean. A set_verified function was added to mutate this state.
  • AC-2: validate_and_audit now uses env.crypto().ed25519_verify() to actually verify the provided signature against the payload. The function signature was updated to accept a public_key: BytesN<32> to enable proper cryptographic validation.
  • AC-3: Added comprehensive unit tests in src/audit-guard/src/lib.rs proving that:
    • An invalid/forged signature is rejected (correctly triggers a panic, which is the expected rejection behavior in Soroban).
    • Empty payloads correctly return AuditGuardError::InvalidPayload.
    • Context verification correctly enforces state constraints instead of caller flags.

@N-thnI
N-thnI merged commit 4837fbf into Vero-protocol:main Aug 21, 2026
4 checks passed
@N-thnI

N-thnI commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Merged — thanks for the contribution!

@N-thnI

N-thnI commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Also — if you've got a moment, a rating on GrantFox helps the project. Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] AuditGuardContract::verify_context performs no real verification - trusts a caller-supplied boolean

2 participants