ios-security-patterns-v1Certifiedv1.0.0

iOS / Swift security patterns

Always-on secure coding patterns for iOS / Swift (safe; no dependency edits).

Protects against

Rule body

# iOS / Swift security patterns

Safe, always-on code patterns that reduce security risk without changing your dependency graph.

These rules use ONLY pattern-level verbs (ALWAYS/NEVER). They MUST NOT prescribe dependency upgrades.

### CVE-2024-23296 — safe patterns

- NEVER construct RTKit messages from untrusted or user-controlled input without strict validation.
- ALWAYS use type-safe serialization when building messages for RTKit communication.
- ALWAYS validate message boundaries and structure before passing to RTKit interfaces.
- NEVER assume RTKit will reject malformed message formats—validate before sending.