Repository navigation
test(security): add regression test for migrate auth check - #639
Merged
Austinaminu2 merged 2 commits intoAug 27, 2026
Merged
Austinaminu2 merged 2 commits into
Austinaminu2 merged 2 commits into
Conversation
…ey::Migrated(u64) variant was declared in the DataKey enum but never read or written anywhere in the codebase. A repo-wide grep confirmed zero references outside the declaration itself. The variant has been removed to keep the enum clean and avoid confusing future contributors about a key that serves no purpose. Closes FlowwStar#463
…auth_non_admin_cannot_migrate to test_security.rs to guard against regression of the bug fixed in commit 7fe0b2e, where migrate() did not enforce authorization at all. The test follows the same pattern as test_auth_non_admin_cannot_upgrade: mock the attacker auth for the migrate invocation and assert the call panics because require_auth() rejects a non-admin caller. Closes FlowwStar#464
|
@joshfatoye0011-bit 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! 🚀 |
joshfatoye0011-bit
had a problem deploying
to
staging
August 26, 2026 23:52 — with
GitHub Actions
Failure
This branch had an error being 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.
Summary Adds est_auth_non_admin_cannot_migrate to est_security.rs to guard against regression of the bug fixed in commit 7fe0b2e, where migrate() did not enforce authorization at all. ## What changed - Added est_auth_non_admin_cannot_migrate in contracts/streaming/src/test_security.rs - Follows the same pattern as est_auth_non_admin_cannot_upgrade: mocks the attacker's auth for the migrate invocation and asserts the call panics, because
equire_auth() inside migrate rejects a non-admin caller ## Why est_migrate() in est.rs only verifies the happy path (admin can call migrate without panicking). It does not verify that a non-admin is rejected. Without this test, the
equire_auth() line could be accidentally removed and CI would not catch it. ## Testing Existing: est_migrate — happy path, admin succeeds New: est_auth_non_admin_cannot_migrate — sad path, non-admin panics Closes #464