CamilleScholtz/swmpc / .agents/skills/audit-xcode-security-settings
audit-xcode-security-settings
VerifiedAudit and enable security-oriented Xcode build settings, compiler warnings, static analysis, and Enhanced Security features.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 57.4 KB |
| references/additional-settings.md | markdown | 1016 B |
| references/adoption-strategy.md | markdown | 5.6 KB |
| references/checked-pointer-arithmetic.md | markdown | 13.7 KB |
| references/cpp-hardening.md | markdown | 3.5 KB |
| references/decision-document.md | markdown | 3.3 KB |
| references/enhanced-security.md | markdown | 9.2 KB |
| references/hardware-memory-tagging.md | markdown | 4.1 KB |
| references/pointer-authentication.md | markdown | 6.8 KB |
| references/reading-build-settings.md | markdown | 5.7 KB |
| references/readonly-platform-memory.md | markdown | 2.5 KB |
| references/runtime-restrictions.md | markdown | 2.8 KB |
| references/security-compiler-warnings.md | markdown | 3.2 KB |
| references/security-settings-reference.md | markdown | 10.5 KB |
| references/stack-zero-init.md | markdown | 1.9 KB |
| references/typed-allocators.md | markdown | 3.2 KB |
| references/universal-binaries-for-libraries.md | markdown | 6.1 KB |
| scripts/filter_build_settings.pyexecutable | script | 3.9 KB |
references/stack-zero-init.md
View on GitHub# Stack Zero Initialization
Stack zero initialization automatically zeroes out stack variables when they are created, preventing information leaks from uninitialized memory.
## What It Does
The compiler initializes all automatic (stack) variables in your code with zeroes. Without this, stack memory retains whatever values were left by previous function calls, which can leak sensitive data if a variable is used before explicit initialization.
## What Vulnerabilities It Mitigates
- **Information disclosure via uninitialized stack variables** — reading sensitive data left on the stack from a previous function call
- **Use-of-uninitialized-value bugs** — using a variable before assigning it a value, leading to undefined behavior
- **Stack-based exploitation** — leveraging predictable uninitialized values to influence control flow
## How to Enable
**Build setting:** `CLANG_ENABLE_STACK_ZERO_INIT = Yes`
This is enabled by default when you add the Enhanced Security capability.
## Code Changes Required
None. This is a transparent compiler behavior change.
## How to Disable
**Build setting:** `CLANG_ENABLE_STACK_ZERO_INIT = No`
## Platform Availability
- iOS, iPadOS, macOS, visionOS
- Available on all supported hardware
## Performance and Stability Impact
- **Performance:** Minimal. The compiler inserts zero-initialization instructions for stack variables. In most code paths this is negligible.
- **Stability:** This change can only improve stability. If your code relied on reading uninitialized stack values (a bug), the behavior changes — variables will now consistently be zero instead of containing garbage.
## Why This Feature Is Low-Risk
Stack zero initialization is one of the safest Enhanced Security features to adopt:
- No source code changes required
- No new crash scenarios (zeroing memory cannot cause crashes)
- Minimal performance impact
- Catches a real class of security bugs
This should be one of the first features you enable.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 470k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 470k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 470k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |