storebound scan: offline rejection-risk scan of the project itself
Detects the stack (native iOS / Android, React Native, Expo, Capacitor, Cordova, Flutter, Unity, Godot) and the SDKs from a maintained table with versions, file:line and each vendor's disclosure page, then reports App Store and Google Play rejection risks with guideline, evidence, fix, severity and skill: 2.1(a) demo account and placeholder text, 5.1.1(v) account deletion, 4.8 login services, 3.1.1 restore and outside payments, 3.1.2 subscription info, 5.1.2(i) ATT, purpose strings, privacy link, privacy manifest, 2.3.10, 2.3.7, 2.3.8, 4.2 web wrappers, 2.5.1, 2.5.5, ATS, export compliance, 1.3 kids ads, review prompts, privacy labels vs SDKs; Play target SDK 36, delete-account URL, App access, foreground services, exact alarms, QUERY_ALL_PACKAGES, SMS / call log, com.example package name. Proposes Data safety / App Privacy / ATT / privacy manifest answers (detected file:line or ask owner) as a diff against the config; --write adds only the detected ones. scan.ignore records owner-accepted findings. MCP tool scan (read-only), validate includes open findings, desktop Checks tab shows them. Fixtures for iOS, Android, Capacitor, Unity, Flutter, clean and teaser.
This commit is contained in:
parent
02d90de77a
commit
00a38cd305
109 changed files with 3103 additions and 31 deletions
|
|
@ -6,7 +6,7 @@
|
|||
import { type Account, type AccountCheck, type AppsListResult, type AppStatus, type CacheEntry, DEFAULT_SETTINGS, type DownloadEvent, type DraftsResult, type ListingField, type ListingsResult,
|
||||
type PortfolioResult, type Project, type ProjectSummary, type Settings, type StoreApp, type StoreRelease, type Studio, type ToolResult } from '../api';
|
||||
import { buildApps, type Overrides } from '../lib/identity';
|
||||
import type { CatalogDiff, HealthSnapshot, MetricRow, Review, TestFlightStatus, ValidateResult } from '../lib/model';
|
||||
import type { CatalogDiff, HealthSnapshot, MetricRow, Review, TestFlightStatus, ValidateResult, ScanResult } from '../lib/model';
|
||||
import { ANALYTICS, DECLARATIONS, LISTING_TEXT, PPO, PPO_STORE, PRICE_DIFF, PRICES, renderArt, RENDERS } from './fixtures-more';
|
||||
|
||||
export const FIXTURE_MARKER = 'storebound-dev-fixtures';
|
||||
|
|
@ -342,6 +342,30 @@ const VALIDATE: Record<string, ValidateResult> = {
|
|||
'p-tidy': { blockers: 0, findings: [] },
|
||||
};
|
||||
|
||||
const scanCounts = (f: ScanResult['findings']): ScanResult['counts'] => {
|
||||
const c = { blocker: 0, high: 0, medium: 0, low: 0, accepted: 0 };
|
||||
for (const x of f) { if (x.accepted) c.accepted++; else c[x.severity]++; }
|
||||
return c;
|
||||
};
|
||||
const SCAN_PRISM: ScanResult['findings'] = [
|
||||
{ rule: 'att', guideline: '5.1.2(i)', store: 'apple', severity: 'high', title: 'Tracking-capable code without App Tracking Transparency (AppLovin MAX, Unity Ads)',
|
||||
evidence: [{ file: 'Packages/manifest.json', line: 4, text: 'com.applovin.mediation.ads 8.1.0' }], fix: 'Add NSUserTrackingUsageDescription and request ATT before the SDKs start, or configure non-personalized ads and answer "no tracking".', skill: 'ads-mediation-checks', ref: 'https://developer.apple.com/app-store/review/guidelines/' },
|
||||
{ rule: 'play-target-sdk', guideline: 'Play: Target API level', store: 'play', severity: 'blocker', title: 'targetSdk 35 is below 36, which new apps and updates need since 2026-08-31',
|
||||
evidence: [{ file: 'ProjectSettings/ProjectSettings.asset', line: 212, text: 'targetSdk 35' }], fix: 'Raise targetSdk to 36, test, upload a new AAB.', skill: 'play-first-release', ref: 'https://developer.android.com/google/play/requirements/target-sdk' },
|
||||
{ rule: 'restore-purchases', guideline: '3.1.1', store: 'apple', severity: 'high', title: 'Restorable purchases (non-consumables or subscriptions) but no Restore Purchases path was found',
|
||||
evidence: [{ file: 'storebound.config.ts', line: 41, text: 'no_ads (non_consumable)' }], fix: 'Add a visible "Restore Purchases" button on the store screen or in Settings.', skill: 'store-iap-setup', ref: 'https://developer.apple.com/app-store/review/guidelines/' },
|
||||
{ rule: 'demo-account', guideline: '2.1(a)', store: 'apple', severity: 'blocker', title: 'Sign-in is required but there is no demo account for App Review',
|
||||
evidence: [{ file: 'storebound.config.ts', line: 17, text: 'reviewAccess: { signInRequired: true }' }], fix: 'Add the App Review demo account in .storebound/ (review-access skill).', skill: 'review-access', ref: 'https://developer.apple.com/app-store/review/guidelines/', accepted: 'leaderboards only; the game plays without signing in' },
|
||||
];
|
||||
const SCAN: Record<string, ScanResult> = {
|
||||
'p-prism': { stacks: ['unity'], sdks: [{ id: 'applovin', name: 'AppLovin MAX', category: 'ads', tracking: true }, { id: 'unity-ads', name: 'Unity Ads', category: 'ads', tracking: true }, { id: 'gameanalytics', name: 'GameAnalytics', category: 'analytics', tracking: false }],
|
||||
findings: SCAN_PRISM, counts: scanCounts(SCAN_PRISM),
|
||||
declarations: { changed: true, items: [{ area: 'appPrivacy', what: 'tracking', value: 'AppLovin MAX, Unity Ads can track', status: 'ask', evidence: [] }, { area: 'dataSafety', what: 'PSL_DEVICE_ID', value: 'collect: advertising, analytics, fraud', status: 'detected', evidence: [{ file: 'Packages/manifest.json', line: 4 }] }] } },
|
||||
'p-tidy': { stacks: ['ios-native', 'android-native'], sdks: [{ id: 'sentry', name: 'Sentry', category: 'crash', tracking: false }], findings: [], counts: scanCounts([]),
|
||||
declarations: { changed: false, items: [] } },
|
||||
};
|
||||
const SCAN_EMPTY: ScanResult = { stacks: [], sdks: [], findings: [], counts: scanCounts([]), declarations: { changed: false, items: [] } };
|
||||
|
||||
function field(f: string, length: number, limit: number, required = true): ListingField {
|
||||
return { field: f, length, limit, required, state: !length ? (required ? 'missing' : 'empty-optional') : length > limit ? 'over' : 'ok' };
|
||||
}
|
||||
|
|
@ -404,6 +428,7 @@ function read(method: string, id: string, args: Record<string, unknown> = {}): T
|
|||
case 'apple.testflight_status': return ok(method, TF[id]);
|
||||
case 'catalog.diff': return ok(method, CATALOG[id]);
|
||||
case 'validate': return ok(method, VALIDATE[id]);
|
||||
case 'scan': return ok(method, SCAN[id] ?? SCAN_EMPTY);
|
||||
case 'project.declarations': return ok(method, DECLARATIONS[id]);
|
||||
case 'project.listing_text': return ok(method, LISTING_TEXT[id]);
|
||||
case 'project.renders': return ok(method, RENDERS[id]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue