Repository navigation
fix: address #266, #267, #268, #269 - #380
Merged
veracindarella merged 4 commits intoOct 23, 2026
Merged
Conversation
…proposal and time Closes veracindarella#266
…CVE detection Closes veracindarella#267
… for mainnet Closes veracindarella#268
…ent WASM downgrad Closes veracindarella#269
|
@manaifae 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.
Summary
fix: address #266, #267, #268, #269
What was solved
#266 — SEC-28: Harden emergency drain with two-step proposal and time-lock
Add a 24-hour time-lock between
propose_emergency_drainandemergency_drainin the stream contract: record the proposal timestamp, reject execution before 86_400 seconds elapse with a newERR_DRAIN_TIMELOCK_ACTIVEerror, add unit tests for both the too-early panic and the post-delay success, and update the emergency-drain security doc.Addressed:
propose_emergency_drainmust record the proposal timestamp in contract storageemergency_drainmust reject execution if fewer than 86_400 seconds have elapsed since the proposalERR_DRAIN_TIMELOCK_ACTIVE#267 — SEC-29: Add cargo-audit step to CI for known CVE detection
Add a cargo-audit CI step to the existing audit.yml workflow so RustSec advisories are checked on every push, failing on high/critical CVEs, with the advisory DB refreshed each run. Also update comments in deny.toml and audit.yml to clarify the division of responsibility between cargo-deny (licenses/bans) and cargo-audit (CVEs).
Addressed:
cargo auditinvocation to .github/workflows/audit.yml#268 — SEC-30: Implement admin multi-sig requirement for mainnet
Document the mainnet admin multi-sig requirement (2-of-3 signers) in docs/security/admin-multisig.md, including setup steps, an onboarding checklist (create multisig, transfer admin, verify on-chain), an operations runbook with multisig signing steps for all admin calls, and testnet verification before mainnet. This is a documentation-focused security task; the referenced file docs/security/admin-multisig.md is not present in the provided file tree, so it must be created/updated as the primary deliverable.
Addressed:
#269 — SEC-31: Add semantic versioning check to prevent WASM downgrade
Add a version-downgrade guard to the stream contract's
migrateentrypoint: read the storedDataKey::Version, panic with a newERR_VERSION_DOWNGRADEerror when the incoming CONTRACT_VERSION is less than or equal to the stored version, add unit tests for downgrade and same-version attempts, and document the version-increment requirement in the upgrade guide.Addressed:
migratemust read storedDataKey::Versionand panic if the new CONTRACT_VERSION <= stored versionERR_VERSION_DOWNGRADEChanges
docs/security/emergency-drain.md(modify).github/workflows/audit.yml(modify)docs/security/admin-multisig.md(modify)contracts/stream/src/storage.rs(modify).github/workflows/deny.yml(modify)SECURITY.md(modify)deny.toml(modify)docs/security/operations-runbook.md(create)Approach
Issues
Closes #266
Closes #267
Closes #268
Closes #269