Security context

What an agent needs to avoid regressing past fixes and find the next vuln in this repo.

onflow/cadence
master @ 3fa2a11
86
Fixes
0
CVEs
HIGH
Peak severity
Highlights
Auth Bypass: 64 prior fixes. Scrutinize any change in this area.
runtime/sema: most-fixed (28 issues). Treat as high-risk during review.
67 high-severity fixes in this history; regressions here are high-impact.
Recurring patterns

The bug types that recur here, drawn from past fixes, not open vulnerabilities.

Auth Bypass: Gaps in resource tracking logic allowed early returns or loop-control statements (break/continue) to skip invalidation analysis, leading to use-after-free and resource-duplication exploits. The checker prematurely exits when encountering a non-resource field, bypassing remaining fields.
Auth Bypass: Contract upgrade validation has repeatedly suffered from bypasses where developers can deploy incompatible type updates, remove essential constraints (such as nested declarations, enum cases, or interface conformances), or modify base type constraints of attachments to escalate privileges.
Auth Bypass: Entitlement escalation and access control bypasses occurred when unauthorized references (such as storage or ephemeral references) were cast to a type containing an authorized reference, or when bound host function results were incorrectly cached.