appstore-precheck 1.14.1 → 1.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,68 @@
3
3
  All notable changes to this project are documented here. Versioning follows
4
4
  [SemVer](https://semver.org/). Released as git tags.
5
5
 
6
+ ## [1.16.0] - 2026-08-07
7
+
8
+ ### Added
9
+ - **Grok Build support**: native [`.grok-plugin/`](.grok-plugin/) marketplace + plugin manifests so
10
+ users can install with `grok plugin marketplace add berkayturk/appstore-precheck` and
11
+ `grok plugin install appstore-precheck --trust` (or a direct path/GitHub install). The same
12
+ `SKILL.md` and upload-guard hook work; Grok sets `GROK_PLUGIN_ROOT` and the `CLAUDE_PLUGIN_ROOT`
13
+ alias used by `hooks/hooks.json`. The marketplace entry uses a URL source (Grok rejects a
14
+ self-referential local source), so that flow installs GitHub `main`; install a path directly to
15
+ test a local clone.
16
+ - **`install.sh grok`**: vendors the skill into `.grok/skills/` (project or user scope). The
17
+ default `all` target now also populates `.grok/skills/` alongside `.claude/skills/` and
18
+ `.agents/skills/`.
19
+ - Docs, badge, AGENTS.md, version lockstep (`check-versions`), and install tests updated for the
20
+ fifth host.
21
+
22
+ ### Fixed
23
+ - **Upload guard no longer fails open on Grok Build (or Cursor)**: `hooks/fastlane-guard.sh` read
24
+ only Claude Code's snake_case `.tool_input.command`, while Grok sends the same event camelCased
25
+ as `.toolInput.command` and Cursor's shell event carries `.command` at the top level. The command
26
+ came back empty and every `fastlane deliver/pilot/release` was allowed. Every plugin manifest
27
+ wires this hook, so the guard now reads all three envelopes, and `tests/test-guard.sh` covers
28
+ each.
29
+ - **Block reason reaches the model on every host**: the guard now also writes the deny as stdout
30
+ JSON (`decision: "deny"` plus Claude Code's `hookSpecificOutput.permissionDecision`) alongside
31
+ the stderr message. Grok honours a stdout deny for `PreToolUse` and documents stderr feedback
32
+ only for `Stop`/`SubagentStop`, so Pierre's reason could previously be dropped there. Exit 2 is
33
+ still the authority.
34
+
35
+ ## [1.15.0] - 2026-08-04
36
+
37
+ ### Added
38
+ - **§3/§16 tracking SDK list — 10 new signals**: Unity Ads, Vungle / Liftoff, Chartboost,
39
+ InMobi, Mintegral, Pangle (`PAGAdSDK` and the legacy `BUAdSDK`), Singular, Kochava, Tenjin,
40
+ and a bare `import AdSupport`. A missing SDK here is a silent false negative: the 5.1.2 ATT
41
+ check stays quiet on an app that tracks without an ATT prompt.
42
+ - **§19 analytics SDK list — 8 new signals**: PostHog, Heap, Countly, Matomo, Smartlook,
43
+ Instabug, New Relic, Embrace. Same failure mode on the 5.1.1 privacy-manifest check.
44
+ - **`tests/test-sdk-signals.sh`**: one minimal app per signal, covering *every* entry in both
45
+ lists including the pre-existing ones, plus five negative cases for the FP-prone words (a
46
+ hand-rolled `MinHeap`, `"Singularity"`, `// Adjust the inset`, `// Embrace the whitespace`,
47
+ a plain SwiftUI screen). Suite is now 27 files.
48
+ - **`corpus/real/rationales.json`**: a one-line reason per `<app>|<rule_id>` behind every
49
+ real-panel TP/FP verdict, so a label can be audited without re-deriving the evidence.
50
+
51
+ ### Fixed
52
+ - **§2 photo-library read — `fetchAssets` false positive**: the read signal matched a bare
53
+ `fetchAssets`, so any method with that name raised a 5.1.1 `NSPhotoLibraryUsageDescription`
54
+ FAIL — a remote-config loader in duckduckgo-ios, a wallpaper manager in firefox-ios. The
55
+ signal is now PhotoKit-qualified (`PHAsset` already covers the real
56
+ `PHAsset.fetchAssets(...)` call). Regression guard: `tests/fixtures/fetch-assets-app`.
57
+
58
+ ### Changed
59
+ - **Real-app validation panel is fully labelled**: the last 127 UNLABELED findings across all
60
+ 18 pinned apps now carry a human TP/FP verdict, so the panel reports `tp=184 fp=122
61
+ unlabeled=0` and a real-code precision of **0.60**. The earlier 0.85 was computed over the
62
+ labelled third only. `corpus/real/README.md` documents the two rules that produce half the
63
+ false positives (`screenshot-dimensions`, `xcode-sdk-requirement`) and the label-key
64
+ collision rule (a key counts as TP only when every finding under it is a true positive).
65
+ - **README**: a RED-to-GREEN fix-loop demo above the fold, rendered from the new
66
+ `assets/demo-fix-loop.tape` and `assets/demo-fix-loop.patch` so it is reproducible.
67
+
6
68
  ## [1.14.1] - 2026-08-02
7
69
 
8
70
  ### Fixed
package/README.md CHANGED
@@ -7,11 +7,17 @@
7
7
  <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-green.svg" alt="License: MIT"></a>
8
8
  <img src="https://img.shields.io/badge/platform-iOS-lightgrey.svg" alt="Platform: iOS">
9
9
  <img src="https://img.shields.io/badge/Agent%20Skill-open%20standard-1F6FEB.svg" alt="Agent Skill">
10
- <img src="https://img.shields.io/badge/works%20with-Claude%20Code%20·%20Codex%20·%20Cursor%20·%20Gemini-2563EB.svg" alt="Works with Claude Code, Codex, Cursor, Gemini">
10
+ <img src="https://img.shields.io/badge/works%20with-Claude%20Code%20·%20Codex%20·%20Cursor%20·%20Gemini%20·%20Grok%20Build-2563EB.svg" alt="Works with Claude Code, Codex, Cursor, Gemini, Grok Build">
11
11
  </p>
12
12
 
13
13
  <p align="center"><strong>Catch App Store rejections before a reviewer does.</strong></p>
14
14
 
15
+ <p align="center">
16
+ <img src="assets/demo-fix-loop.gif" width="900" alt="appstore-precheck scanning an app: RED with four FAILs, then GREEN after the paywall is fixed">
17
+ </p>
18
+
19
+ <p align="center"><em>Four blockers found before Apple saw them, then a clean GREEN after the fix.</em></p>
20
+
15
21
  ---
16
22
 
17
23
  `appstore-precheck` is a read-only, pre-submission gate for iOS apps. It statically scans the most
@@ -22,8 +28,8 @@ incentivized review, push/HomeKit abuse, rating manipulation).
22
28
  It hands you a single **GREEN / YELLOW / RED** verdict. It never edits your code.
23
29
 
24
30
  It ships as a portable [Agent Skill](https://agentskills.io): the same `SKILL.md` runs natively in
25
- Claude Code, OpenAI Codex, Cursor, and Gemini CLI. The scanner is plain Bash, so you can also run it
26
- by hand or wire it into CI.
31
+ Claude Code, OpenAI Codex, Cursor, Gemini CLI, and Grok Build. The scanner is plain Bash, so you can
32
+ also run it by hand or wire it into CI.
27
33
 
28
34
  ## Meet Pierre
29
35
 
@@ -164,9 +170,10 @@ how the app is built:
164
170
 
165
171
  ## Quick start
166
172
 
167
- One `SKILL.md`, every host. **Claude Code, Cursor, and Codex** install as native **plugins** from
168
- this GitHub repo. **Gemini CLI** installs the same skill with `gemini skills install` (no plugin
169
- marketplace yet). [`install.sh`](install.sh) remains the fallback for vendoring into a project.
173
+ One `SKILL.md`, every host. **Claude Code, Cursor, Codex, and Grok Build** install as native
174
+ **plugins** from this GitHub repo. **Gemini CLI** installs the same skill with
175
+ `gemini skills install` (no plugin marketplace yet). [`install.sh`](install.sh) remains the fallback
176
+ for vendoring into a project.
170
177
 
171
178
  ### Install the full skill (Pierre + all phases)
172
179
 
@@ -175,6 +182,7 @@ marketplace yet). [`install.sh`](install.sh) remains the fallback for vendoring
175
182
  | **Claude Code** | Plugin (recommended) |
176
183
  | **Cursor** | Plugin (recommended) |
177
184
  | **OpenAI Codex** | Plugin (recommended) |
185
+ | **Grok Build** | Plugin (recommended) |
178
186
  | **Gemini CLI** | `gemini skills install` one-liner |
179
187
 
180
188
  **Claude Code:**
@@ -214,6 +222,25 @@ Refresh after repo updates:
214
222
  codex plugin marketplace upgrade appstore-precheck
215
223
  ```
216
224
 
225
+ **Grok Build:**
226
+
227
+ ```bash
228
+ grok plugin marketplace add berkayturk/appstore-precheck
229
+ grok plugin install appstore-precheck --trust
230
+ ```
231
+
232
+ The marketplace entry points at this repo by URL, so that flow always installs GitHub `main`. To
233
+ install a local clone or an unmerged branch, install the path directly:
234
+
235
+ ```bash
236
+ grok plugin install /path/to/appstore-precheck --trust
237
+ # or: grok plugin install berkayturk/appstore-precheck --trust
238
+ ```
239
+
240
+ After install, enable the plugin if needed (`grok plugin enable appstore-precheck` or press `Space`
241
+ in the Plugins tab). Skills appear as `/appstore-precheck`. Verify with `grok inspect` or
242
+ `grok plugin details appstore-precheck`.
243
+
217
244
  **Gemini CLI** (native skill install — no plugin marketplace):
218
245
 
219
246
  ```bash
@@ -223,15 +250,17 @@ gemini skills install https://github.com/berkayturk/appstore-precheck.git \
223
250
 
224
251
  Use `--scope user` for a global install. Verify with `gemini skills list`.
225
252
 
226
- **Fallback — `install.sh`** (vendors the skill into `.claude/skills/` and/or `.agents/skills/`):
253
+ **Fallback — `install.sh`** (vendors the skill into `.claude/skills/`, `.agents/skills/`, and/or
254
+ `.grok/skills/`):
227
255
 
228
256
  ```bash
229
257
  git clone https://github.com/berkayturk/appstore-precheck.git
230
258
  cd your-ios-app
231
- /path/to/appstore-precheck/install.sh # all hosts → .claude/skills + .agents/skills
259
+ /path/to/appstore-precheck/install.sh # all hosts → .claude + .agents + .grok skills
232
260
  /path/to/appstore-precheck/install.sh cursor # Cursor only
233
261
  /path/to/appstore-precheck/install.sh codex # Codex only
234
262
  /path/to/appstore-precheck/install.sh gemini # Gemini only
263
+ /path/to/appstore-precheck/install.sh grok # Grok Build only → ./.grok/skills
235
264
  /path/to/appstore-precheck/install.sh claude user # Claude Code user-wide → ~/.claude/skills
236
265
  ```
237
266
 
@@ -498,12 +527,13 @@ Hosts differ only in the directory they scan:
498
527
  | OpenAI Codex | `.agents/skills/` · `~/.agents/skills/` |
499
528
  | Cursor | `.agents/skills/`, `.cursor/skills/`, also `.claude/skills/` |
500
529
  | Gemini CLI | `.agents/skills/`, `.gemini/skills/` |
530
+ | Grok Build | `.grok/skills/` · `~/.grok/skills/`, also `.agents/skills/` and `.claude/skills/` |
501
531
 
502
532
  A root [`AGENTS.md`](AGENTS.md) covers hosts that read always-on context instead of on-demand skills.
503
533
  [`docs/cross-tool-verification.md`](docs/cross-tool-verification.md) records real per-host runs
504
- (all four hosts verified end-to-end: Claude Code, Codex, Gemini, and Cursor), and
505
- [`docs/field-tests.md`](docs/field-tests.md) records dogfooding the scanner against real
506
- App Store apps (DuckDuckGo, Pocket Casts, Wikipedia).
534
+ (Claude Code, Codex, Gemini, and Cursor verified end-to-end; Grok Build plugin install + validate
535
+ verified), and [`docs/field-tests.md`](docs/field-tests.md) records dogfooding the scanner against
536
+ real App Store apps (DuckDuckGo, Pocket Casts, Wikipedia).
507
537
 
508
538
  ## Requirements
509
539
 
@@ -546,9 +576,11 @@ Everything else works without one.
546
576
  /plugin uninstall appstore-precheck@appstore-precheck # Claude Code plugin
547
577
  # Codex: run `codex`, open `/plugins`, uninstall appstore-precheck (CLI 0.125.x has no `plugin remove`)
548
578
  # Cursor: Customize → Plugins → appstore-precheck → Uninstall
579
+ grok plugin uninstall appstore-precheck --confirm # Grok Build plugin
549
580
  gemini skills uninstall appstore-precheck # Gemini (if installed via gemini skills)
550
581
  rm -rf .claude/skills/appstore-precheck # install.sh (Claude Code / Cursor)
551
582
  rm -rf .agents/skills/appstore-precheck # install.sh (Codex / Cursor / Gemini)
583
+ rm -rf .grok/skills/appstore-precheck # install.sh (Grok Build)
552
584
  rm -rf .cursor/skills/appstore-precheck # if you mirrored there manually
553
585
  rm -rf .gemini/skills/appstore-precheck # if installed to workspace scope manually
554
586
  rm -f .precheck-pass # runtime token
@@ -561,6 +593,7 @@ npm run lint # bash -n on every script
561
593
  npm run check-versions # plugin manifests / package.json / SKILL.md in lockstep
562
594
  npm test # run scan.sh against fixture projects and assert
563
595
  claude plugin validate .
596
+ grok plugin validate .
564
597
  ```
565
598
 
566
599
  CI runs ShellCheck, JSON validation, the version-consistency guard, and the fixture tests on every push.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "appstore-precheck",
3
- "version": "1.14.1",
4
- "description": "Read-only iOS App Store pre-submission check, packaged as a portable Agent Skill with native Claude Code, Cursor, and Codex plugins, plus an npx CLI.",
3
+ "version": "1.16.0",
4
+ "description": "Read-only iOS App Store pre-submission check, packaged as a portable Agent Skill with native Claude Code, Cursor, Codex, and Grok Build plugins, plus an npx CLI.",
5
5
  "license": "MIT",
6
6
  "author": "Berkay Turk (https://github.com/berkayturk)",
7
7
  "homepage": "https://github.com/berkayturk/appstore-precheck",
@@ -25,7 +25,7 @@
25
25
  "scripts": {
26
26
  "test": "bash tests/all.sh",
27
27
  "check-versions": "bash scripts/check-versions.sh",
28
- "lint": "node --check bin/cli.js && bash -n skills/appstore-precheck/scripts/scan.sh && bash -n skills/appstore-precheck/scripts/verdict.sh && bash -n skills/appstore-precheck/scripts/phase2-precheck.sh && bash -n skills/appstore-precheck/scripts/findings.sh && bash -n skills/appstore-precheck/scripts/suppress.sh && bash -n hooks/fastlane-guard.sh && bash -n install.sh && bash -n tests/run.sh && bash -n tests/all.sh && bash -n tests/test-verdict.sh && bash -n tests/test-guard.sh && bash -n tests/test-config.sh && bash -n tests/test-install.sh && bash -n tests/test-phase2.sh && bash -n tests/test-cli.sh && bash -n tests/test-findings.sh && bash -n tests/test-format-json.sh && bash -n tests/test-suppress.sh && bash -n tests/test-scorecard.sh && bash -n scripts/scorecard.sh && bash -n scripts/scorecard-real.sh && bash -n scripts/update-brew-formula.sh && bash -n tests/test-pack.sh && bash -n eval/run.sh && bash -n eval/validate.sh && bash -n eval/rag/ingest.sh && bash -n tests/test-rag-ingest.sh && bash -n tests/test-rag-embed.sh && bash -n tests/test-rag-gemini-client.sh && bash -n tests/test-rag-retrieve.sh && bash -n tests/test-eval-parse.sh && bash -n tests/test-rag-build-request.sh && bash -n tests/test-rag-run-guard.sh && bash -n tests/test-eval-score.sh"
28
+ "lint": "node --check bin/cli.js && bash -n skills/appstore-precheck/scripts/scan.sh && bash -n skills/appstore-precheck/scripts/verdict.sh && bash -n skills/appstore-precheck/scripts/phase2-precheck.sh && bash -n skills/appstore-precheck/scripts/findings.sh && bash -n skills/appstore-precheck/scripts/suppress.sh && bash -n hooks/fastlane-guard.sh && bash -n install.sh && bash -n tests/run.sh && bash -n tests/all.sh && bash -n tests/test-verdict.sh && bash -n tests/test-guard.sh && bash -n tests/test-config.sh && bash -n tests/test-install.sh && bash -n tests/test-phase2.sh && bash -n tests/test-cli.sh && bash -n tests/test-findings.sh && bash -n tests/test-format-json.sh && bash -n tests/test-suppress.sh && bash -n tests/test-scorecard.sh && bash -n tests/test-sdk-signals.sh && bash -n scripts/scorecard.sh && bash -n scripts/scorecard-real.sh && bash -n scripts/update-brew-formula.sh && bash -n tests/test-pack.sh && bash -n eval/run.sh && bash -n eval/validate.sh && bash -n eval/rag/ingest.sh && bash -n tests/test-rag-ingest.sh && bash -n tests/test-rag-embed.sh && bash -n tests/test-rag-gemini-client.sh && bash -n tests/test-rag-retrieve.sh && bash -n tests/test-eval-parse.sh && bash -n tests/test-rag-build-request.sh && bash -n tests/test-rag-run-guard.sh && bash -n tests/test-eval-score.sh"
29
29
  },
30
30
  "keywords": [
31
31
  "ios",
@@ -33,6 +33,7 @@
33
33
  "fastlane",
34
34
  "agent-skill",
35
35
  "claude-code",
36
+ "grok-build",
36
37
  "precheck"
37
38
  ]
38
39
  }
@@ -4,7 +4,7 @@ description: Read-only pre-submission check for an iOS app before App Store revi
4
4
  license: MIT
5
5
  metadata:
6
6
  author: Berkay Turk
7
- version: 1.14.1
7
+ version: 1.16.0
8
8
  allowed-tools: Bash Read Grep Glob WebFetch mcp__maestro__list_devices mcp__maestro__run mcp__maestro__inspect_screen mcp__maestro__take_screenshot mcp__maestro__cheat_sheet
9
9
  ---
10
10
 
@@ -114,7 +114,7 @@ check(s). It is non-blocking and never runs in the offline user scan; the finger
114
114
 
115
115
  Run the bundled scanner from the app repo root. `scripts/` here is relative to THIS skill's own
116
116
  directory (wherever the skill is installed — a plugin dir, `.claude/skills/`, `.agents/skills/`,
117
- or a clone of the source repo):
117
+ `.grok/skills/`, or a clone of the source repo):
118
118
 
119
119
  ```bash
120
120
  bash <skill-dir>/scripts/scan.sh
@@ -378,7 +378,11 @@ Follow [`references/simulator-dynamic-review.md`](references/simulator-dynamic-r
378
378
  ## Optional: upload guard hook
379
379
 
380
380
  `hooks/fastlane-guard.sh` blocks `fastlane deliver/pilot/release` unless a fresh `.precheck-pass`
381
- token exists. In Claude Code it auto-wires via `hooks/hooks.json` **when installed as a plugin**
382
- (the hook path uses `${CLAUDE_PLUGIN_ROOT}`; an `install.sh`-vendored copy gets no automatic
383
- hook). In other environments, wire it
384
- as a pre-command check yourself, or treat the token as a manual go/no-go signal.
381
+ token exists. In Claude Code and Grok Build it auto-wires via `hooks/hooks.json` **when installed
382
+ as a plugin** (the hook path uses `${CLAUDE_PLUGIN_ROOT}`; Grok also sets that alias alongside
383
+ `${GROK_PLUGIN_ROOT}`, and maps a `Bash` matcher onto `run_terminal_command`). The guard reads
384
+ the snake_case (`.tool_input`), camelCase (`.toolInput`), and top-level (`.command`, Cursor)
385
+ tool-use envelopes, and reports a block on both stderr and stdout, so it blocks on every host that
386
+ wires it. An `install.sh`-vendored copy gets no automatic hook. In other
387
+ environments, wire it as a pre-command check yourself, or treat the token as a manual go/no-go
388
+ signal.
@@ -85,10 +85,10 @@ baseline the same deliberate way, with `guideline-drift.sh --reconcile`.
85
85
  | 13 | **5.1.5 Sensitive APIs** *(opt-in)* | If FamilyControls is used and `optionalChecks.familyControls` is on, a reviewer-notes justification exists |
86
86
  | 14 | **4.8 Sign in with Apple** *(advisory)* | If a third-party social login SDK (Google, Facebook, Auth0, …) is used, Sign in with Apple is offered too |
87
87
  | 15 | **3.1.1(a) External purchase link** *(advisory)* | If StoreKit External Purchase APIs or the entitlement are present, the 3.1.1(a) disclosure/reporting requirements are flagged |
88
- | 16 | **5.1.2 Tracking SDK / IDFA** *(advisory)* | If an ad / attribution SDK (AdMob, AppLovin, AppsFlyer, Adjust, Branch, IronSource) or raw IDFA access is present but no ATT prompt is, it is flagged (the reverse of vector 3) |
88
+ | 16 | **5.1.2 Tracking SDK / IDFA** *(advisory)* | If an ad / attribution SDK (AdMob, AppLovin, AppsFlyer, Adjust, Branch, ironSource, Unity Ads, Vungle, Chartboost, InMobi, Mintegral, Pangle, Singular, Kochava, Tenjin) or raw IDFA access is present but no ATT prompt is, it is flagged (the reverse of vector 3). Per-SDK coverage: [`tests/test-sdk-signals.sh`](../../../tests/test-sdk-signals.sh) |
89
89
  | 17 | **Export compliance** *(advisory)* | If a checked-in Info.plist lacks `ITSAppUsesNonExemptEncryption`, set it (true/false) to skip the App Store Connect encryption-export question |
90
90
  | 18 | **2.3 Support / Privacy URL** *(advisory)* | fastlane metadata has a non-empty `support_url.txt` and `privacy_url.txt` across locales, with no placeholder URLs |
91
- | 19 | **5.1.1 Privacy manifest** *(advisory)* | If an analytics SDK (Firebase, Amplitude, Mixpanel, Sentry, Segment, Bugsnag, App Center, Datadog) is linked but `PrivacyInfo.xcprivacy` declares no collected data types or tracking domains, it is flagged |
91
+ | 19 | **5.1.1 Privacy manifest** *(advisory)* | If an analytics SDK (Firebase, Amplitude, Mixpanel, Sentry, Segment, Bugsnag, App Center, Datadog, PostHog, Heap, Countly, Matomo, Smartlook, Instabug, New Relic, Embrace) is linked but `PrivacyInfo.xcprivacy` declares no collected data types or tracking domains, it is flagged. Per-SDK coverage: [`tests/test-sdk-signals.sh`](../../../tests/test-sdk-signals.sh) |
92
92
  | 20 | **2.1 Placeholder content** *(advisory)* | No lorem ipsum / TODO / FIXME / `example.com` / "insert X here" / changeme in store metadata |
93
93
  | 21 | **3.1.1 Third-party payment SDK** *(advisory)* | If a third-party payment SDK (Stripe, Braintree, PayPal, Square, Adyen, …) is linked, flag it: digital goods/services must use in-app purchase (allowed only for physical goods/services) |
94
94
  | 22 | **1.2 UGC moderation** *(advisory)* | If user-generated-content signals (post/comment/upload, chat SDKs) are present but no report/block/moderation affordance is found, flag the missing 1.2 safety controls |
@@ -302,7 +302,11 @@ else
302
302
  fail "5.1.1 microphone/recording API used but Info.plist is missing 'NSMicrophoneUsageDescription'" "$INFO_PLIST"
303
303
  fi
304
304
  # Photo library READ: PhotosPicker/PHPicker need no key; only true read/fetch APIs do.
305
- if grep -rqE 'PHAsset\b|PHFetchResult|PHImageManager|fetchAssets|PHAssetCollection' "$IOS_DIR" "${GREP_PRUNE[@]}" "${SRC_INC[@]}" 2>/dev/null; then
305
+ # The signal must stay PhotoKit-qualified. A bare `fetchAssets` alternative used to
306
+ # match any method with that name (a remote-config loader, a wallpaper manager) and
307
+ # was the single biggest false-positive source in the real-app panel; PHAsset\b
308
+ # already covers the real `PHAsset.fetchAssets(...)` call.
309
+ if grep -rqE 'PHAsset\b|PHFetchResult|PHImageManager|PHAssetCollection' "$IOS_DIR" "${GREP_PRUNE[@]}" "${SRC_INC[@]}" 2>/dev/null; then
306
310
  grep -qE 'NSPhotoLibraryUsageDescription' "$INFO_PLIST" 2>/dev/null || \
307
311
  fail "5.1.1 Photos read API used but Info.plist is missing 'NSPhotoLibraryUsageDescription'" "$INFO_PLIST"
308
312
  elif grep -rqE 'PHAssetCreationRequest|UIImageWriteToSavedPhotosAlbum|performChanges' "$IOS_DIR" "${GREP_PRUNE[@]}" "${SRC_INC[@]}" 2>/dev/null; then
@@ -319,7 +323,7 @@ fi
319
323
  # when the ATT framework IS imported; §16 fires when a tracking SDK is present but
320
324
  # the ATT prompt is NOT. Computed once here so the two checks never contradict.
321
325
  set_rule "att-usage"
322
- tracking_sdk=$(grep -rlE 'advertisingIdentifier|ASIdentifierManager|GADMobileAds|GoogleMobileAds|AppLovinSDK|ALSdk|AppsFlyerLib|import Adjust|Adjust\.|FBAudienceNetwork|BranchSDK|IronSource' "$IOS_DIR" "${GREP_PRUNE[@]}" "${SRC_INC[@]}" 2>/dev/null | head -1)
326
+ tracking_sdk=$(grep -rlE 'advertisingIdentifier|ASIdentifierManager|import AdSupport|GADMobileAds|GoogleMobileAds|AppLovinSDK|ALSdk|AppsFlyerLib|import Adjust|Adjust\.|FBAudienceNetwork|BranchSDK|IronSource|UnityAds|VungleAds|Chartboost|InMobi|IMSdk|MTGSDK|PAGAdSDK|BUAdSDK|import Singular|SingularConfig|KochavaTracker|KVATracker|TenjinSDK' "$IOS_DIR" "${GREP_PRUNE[@]}" "${SRC_INC[@]}" 2>/dev/null | head -1)
323
327
  att_used=$(grep -rlE 'AppTrackingTransparency|ATTrackingManager' "$IOS_DIR" "${GREP_PRUNE[@]}" "${SRC_INC[@]}" 2>/dev/null | head -1)
324
328
  if [[ -n "$att_used" ]]; then
325
329
  if grep -q "NSUserTrackingUsageDescription" "$INFO_PLIST" 2>/dev/null; then
@@ -669,7 +673,7 @@ fi
669
673
  # incomplete. Soft "verify" wording (a crash-only Sentry may genuinely collect
670
674
  # nothing), so WARN, never FAIL.
671
675
  set_rule "analytics-privacyinfo-mismatch"
672
- analytics_sdk=$(grep -rlE 'FirebaseAnalytics|import Firebase|import Amplitude|Amplitude\(|import Mixpanel|Mixpanel\.|import Sentry|SentrySDK|import Segment|SEGAnalytics|Analytics\.shared\(|import Bugsnag|Bugsnag\.|AppCenterAnalytics|import Datadog|DatadogCore' "$IOS_DIR" "${GREP_PRUNE[@]}" "${SRC_INC[@]}" 2>/dev/null | head -1)
676
+ analytics_sdk=$(grep -rlE 'FirebaseAnalytics|import Firebase|import Amplitude|Amplitude\(|import Mixpanel|Mixpanel\.|import Sentry|SentrySDK|import Segment|SEGAnalytics|Analytics\.shared\(|import Bugsnag|Bugsnag\.|AppCenterAnalytics|import Datadog|DatadogCore|import PostHog|PostHogSDK|import Heap|HeapSwiftCore|Heap\.track|import Countly|Countly\.sharedInstance|MatomoTracker|import Smartlook|SmartlookAnalytics|import Instabug|Instabug\.start|import NewRelic|NewRelic\.start|import EmbraceIO|Embrace\.client|Embrace\.setup' "$IOS_DIR" "${GREP_PRUNE[@]}" "${SRC_INC[@]}" 2>/dev/null | head -1)
673
677
  if [[ -n "$analytics_sdk" ]]; then
674
678
  declared_data=""
675
679
  if [[ -n "$PRIVACY_FILE" && -f "$PRIVACY_FILE" ]]; then