Repository navigation
docs(security): add contract security best practices guide (#1036) - #1058
Closed
huangji6693-max wants to merge 1 commit into
Closed
huangji6693-max wants to merge 1 commit into
huangji6693-max wants to merge 1 commit into
Conversation
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
docs/SECURITY_BEST_PRACTICES.md, a comprehensive smart contract security best practices guide for the StellarSplit (contracts/splitandcontracts/invoice-escrow) protocol.Closes #1036
What's Included
require_auth()) and fine-grained RBAC (Role,Permission).ReentrancyGuard) and Checks-Effects-Interactions (CEI) ordering around SAC token transfers.checked_add,checked_mul,overflow-checks = true), rounding remainder conservation, and on-chain invariant verification.PaymentIntent,BridgeProof).ValidationRules), centralized XDR collision-free storage keys (storage_keys.rs), and proactive TTL management.V-01throughV-08) mapped to CWE identifiers, vulnerable vs. safe code patterns, and on-chainsecurity_audit.rsdetection categories.monitoring.rs,run_contract_audit), immediate containment (emergency_pause.rs, per-function pause, circuit breaker), forensics (audit_logging.rs,verify_audit_integrity), staged remediation (contract_upgrade.rs,rollback_upgrade), and recovery verification.