app privacy: one Apple purpose per Play purpose (advertising is Third-Party Advertising only; Developer's Advertising only from the owner), appPrivacy.types (owner answers per Apple type id: certain in console fill, proposed by scan without linked / tracking, compared by check with Info.plist and PrivacyInfo.xcprivacy)
This commit is contained in:
parent
962cd3cb9d
commit
08e75dc673
17 changed files with 509 additions and 52 deletions
|
|
@ -55,14 +55,15 @@ export async function run(args: Args): Promise<void> {
|
|||
const d = report.declarations;
|
||||
if (!configPath) warn('scan', '--write: no storebound.config.ts in this project (storebound init creates one)');
|
||||
else if (!d.changed) log('scan', `--write: nothing to change in ${report.config}`);
|
||||
else if (args.has('dry')) log('scan', `--dry: would write ${[(d.diff.some(x => x.change !== 'kept' && x.change !== 'same') || d.accountCreationChange) && 'dataSafety', d.appPrivacyChange && 'appPrivacy'].filter(Boolean).join(' + ')} into ${report.config}`);
|
||||
else if (args.has('dry')) log('scan', `--dry: would write ${[(d.diff.some(x => x.change !== 'kept' && x.change !== 'same') || d.accountCreationChange) && 'dataSafety', (d.appPrivacyChange || d.appPrivacyTypes) && 'appPrivacy'].filter(Boolean).join(' + ')} into ${report.config}`);
|
||||
else {
|
||||
let text = readFileSync(configPath, 'utf8');
|
||||
const ds = d.dataSafety!;
|
||||
const missing = (['encryptedInTransit', 'deletionRequest'] as const).filter(k => typeof ds[k] !== 'boolean');
|
||||
if (d.diff.some(x => x.change === 'add' || x.change === 'merge') || d.accountCreationChange)
|
||||
text = upsertBlock(text, configPath, 'dataSafety', ds, missing.length ? `storebound scan: answer ${missing.join(' and ')} (ask the owner; store-declarations skill)` : undefined);
|
||||
if (d.appPrivacyChange) text = upsertBlock(text, configPath, 'appPrivacy', d.appPrivacy);
|
||||
if (d.appPrivacyChange || d.appPrivacyTypes) text = upsertBlock(text, configPath, 'appPrivacy', d.appPrivacy,
|
||||
d.appPrivacyTypes ? 'storebound scan: types proposed from the detected SDKs; answer linked / tracking per type (ask the owner; store-declarations skill)' : undefined);
|
||||
writeFileSync(configPath, text);
|
||||
log('scan', `wrote the detected answers into ${report.config}${missing.length ? `; still to answer: dataSafety.${missing.join(', dataSafety.')}` : ''}. Review the diff (git diff) before pushing it to a store.`);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue