chezmoi-source (чистая пересборка, не дамп 1.2 ГБ): - dot_claude: CLAUDE.md лин-роутер, AGENTS.md.tmpl (VPS вычищен), settings.json.tmpl (deny-щит 20 + security-guard hook), rules (structure + ECC 21 язык), 30 generic ECC-агентов, health-check - dot_codex: symlink-паритет; dot_agents: registry 13 скриптов HOME-генерик + методология docs - плагины: plugins.manifest + bootstrap Слой 1b (marketplace+install) - launchd: health.plist (PATH-фикс 127) + session-reaper.example - smoke++: secret-токен guard + канон-проверки (зелёный) - 0 hard личных данных; cut личного (kb/references/gsd/owner) → Ф4
1020 B
1020 B
paths
| paths | ||
|---|---|---|
|
Swift Security
This file extends common/security.md with Swift specific content.
Secret Management
- Use Keychain Services for sensitive data (tokens, passwords, keys) — never
UserDefaults - Use environment variables or
.xcconfigfiles for build-time secrets - Never hardcode secrets in source — decompilation tools extract them trivially
let apiKey = ProcessInfo.processInfo.environment["API_KEY"]
guard let apiKey, !apiKey.isEmpty else {
fatalError("API_KEY not configured")
}
Transport Security
- App Transport Security (ATS) is enforced by default — do not disable it
- Use certificate pinning for critical endpoints
- Validate all server certificates
Input Validation
- Sanitize all user input before display to prevent injection
- Use
URL(string:)with validation rather than force-unwrapping - Validate data from external sources (APIs, deep links, pasteboard) before processing