ios-permission-key-security-matrix
Skill0 starsChanged 5 months agoMITView on GitHub
iOSアプリのproject.yml / Info.plistの差分をセキュリティレビューするとき、各 NSXxx キーが「追加専用」か「フル読み書き」かを判定する。XcodeGen project.yml の変更レビュー時に発火する。
In this repository99 other files it gives its agents.
- agents-tools-quoted-jsonSkill
- asc-api-app-store-submitSkill
- asd-ste100Skill
- automation-bool-selector-pitfallsSkill
- automation-stale-cooldown-flagSkill
- autonomous-build-verifySkill
- book-to-skillSkill
- ccusage-cli-cost-trackingSkill
- chrome-ext-mv3-programmatic-injectSkill
- chrome-ext-store-assetsSkill
- claude-headless-p-invocationSkill
- claude-plugin-context-auditSkill
- claude-session-log-to-kbSkill
- cloudflare-workers-do-deploySkill
- codebase-to-courseSkill
- codesign-keychain-prompt-fixSkill
- codex-cli-setupSkill
- codex-delegation-handoffSkill
- content-factory-grounding-dedupSkill
- conversation-log-append-patternSkill
- cron-to-launchd-macosSkill
- cross-automation-shared-resource-killSkill
- design-token-migration-rnSkill
- discord-bot-image-to-claudeSkill
- discord-gateway-resume-dedupSkill
- excel-filtered-url-http-auditSkill
- execution-budget-vs-capsSkill
- expo-free-local-ios-testflightSkill
- ga4-connect-projectsSkill
- gcal-oauth-desktop-setupSkill
- git-commit-helperSkill
- git-prepush-secret-remote-checkSkill
- gsc-cli-automationSkill
- hatena-blogsync-autopostSkill
- hook-latency-wrapSkill
- hook-log-append-patternSkill
- html-to-pdf-slide-deckSkill
- humanizerSkill
- human-review-gate-shellSkill
- implementation-model-routingSkill
- insights-to-claude-mdSkill
- ios-sim-store-screenshotsSkill
- launchd-exit78-exconfig-debugSkill
- llm-content-pipeline-quality-gateSkill
- local-ai-video-pipelineSkill
- local-flux-mflux-image-genSkill
- local-llm-slow-diagnosisSkill
- local-music-generationSkill
- lottie-skottie-authoring-pitfallsSkill
- machine-wide-api-ratelimit-latchSkill
- macos-hook-path-timeoutSkill
- md-to-docx-reportSkill
- memory-md-inject-bloat-auditSkill
- message-display-secrets-maskSkill
- metric-source-attributionSkill
- migrate-icloud-desktop-assetsSkill
- nextauth-local-e2e-sessionSkill
- nextjs-rsc-payload-slimSkill
- nothing-designSkill
- openclaw-ollama-setupSkill
- The first 60 shown.
The file
Files
Procedure
1. 差分の分類
project.yml / Info.plist の変更を以下の4カテゴリに分類する。
| カテゴリ | 内容 | セキュリティ影響 |
| ビルド番号 | CURRENT_PROJECT_VERSION, MARKETING_VERSION | なし |
| 使用説明文字列 | NSXxxUsageDescription 系 | 権限の種類に依存(下表参照) |
| CI/IaC変更 | scripts, preBuildScripts, postBuildScripts | 要チェック |
| コード変更 | .swift, .m ファイル参照 | 別途コードレビュー |
2. Photosライブラリ権限の区別(非自明)
NSPhotoLibraryAddUsageDescription → 追加専用(write-only)
NSPhotoLibraryUsageDescription → フル読み書き(read+write)- Add専用は写真を保存するだけ(シェアカード保存など)で、ユーザーのアルバムを読み取れない
- フル読み書きはユーザーの全写真にアクセスできるため影響が大きい
- セキュリティ観点では Add専用のほうが常に狭い権限 → 必要最小権限の原則に沿っている
3. よく使う権限キー一覧
| 権限キー | アクセス範囲 | リスク |
NSPhotoLibraryAddUsageDescription | 追加専用 | 低 |
NSPhotoLibraryUsageDescription | 全読み書き | 中〜高 |
NSCameraUsageDescription | カメラ撮影のみ | 低〜中 |
NSMicrophoneUsageDescription | マイク録音 | 中 |
NSLocationWhenInUseUsageDescription | 使用中のみ位置情報 | 低〜中 |
NSLocationAlwaysUsageDescription | 常時位置情報 | 高 |
NSContactsUsageDescription | 連絡先読み取り | 高 |
NSFaceIDUsageDescription | Face ID | 中 |
4. レビュー手順
1. diff を読み、「何が増えたか」を4カテゴリに分類
2. 権限キーが追加された場合:
a. 上表でアクセス範囲を確認
b. 使用説明文字列が静的か動的(文字列補間あり)か確認
c. 実際に使う用途と権限の範囲が一致するか確認
3. scripts / build phases の変更があれば別途コマンド注入を確認
4. コード変更がなく権限のみなら "code paths not affected" と明示して報告Pitfalls
NSPhotoLibraryAddUsageDescriptionとNSPhotoLibraryUsageDescriptionを混同しやすい。前者はApple必須(なければクラッシュ)で追加専用、後者がフルアクセス。- 使用説明文字列に
\(variable)などの文字列補間が入っていると XSS 的ではないが内容注入リスクがある(稀)。 - ビルド番号バンプだけの差分は "no findings" で即結論出してよい。調査深堀り不要。
- Info.plistの
ITSAppUsesNonExemptEncryption: falseはApp Store向けの輸出コンプライアンス申告。セキュリティ上は問題ない(暗号化を使わないという申告)。
Verification
NSPhotoLibraryAddUsageDescriptionのみ追加 → findings なし(追加専用・狭い権限)NSPhotoLibraryUsageDescription追加 → findings あり(フルアクセス・用途の妥当性確認が必要)- ビルド番号のみ変更 → findings なし(即回答可能)
- build scripts 追加 → コマンド内容を必ず確認してから判定
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

