privacy manifest discovery skips build-output and copy folders (hidden dirs like .native-build, build, DerivedData, node_modules, dist, Products, built .app / .xcarchive) in scan, check and privacy-manifest: a stale .native-build copy was checked instead of the real ios/ manifest; test
This commit is contained in:
parent
7219ded3e8
commit
73db689386
4 changed files with 49 additions and 4 deletions
|
|
@ -230,3 +230,14 @@ export function evaluatePrivacyManifest(i: PmInput): PmFinding[] {
|
|||
const order: Record<PmLevel, number> = { blocker: 0, warn: 1, info: 2, ok: 3 };
|
||||
return out.sort((a, b) => order[a.level] - order[b.level]);
|
||||
}
|
||||
|
||||
const COPY_DIRS = new Set(['build', 'Build', 'DerivedData', 'node_modules', 'dist', 'Products', 'Intermediates.noindex', 'ArchiveIntermediates']);
|
||||
|
||||
/** A PrivacyInfo.xcprivacy path (relative to the project) that is build output or a copy, not the app's own manifest:
|
||||
* under a hidden folder (.native-build, .output, .build), build/, DerivedData, node_modules, dist, Xcode Products,
|
||||
* or inside a built .app / .xcarchive. Seen live: a stale .native-build/apps/native/ios copy was checked instead of
|
||||
* the real apps/native/ios manifest. */
|
||||
export function isBuildCopyPath(rel: string): boolean {
|
||||
const dirs = rel.split(/[\\/]/).slice(0, -1);
|
||||
return dirs.some(d => (d.startsWith('.') && d !== '.' && d !== '..') || COPY_DIRS.has(d) || /\.(app|xcarchive)$/.test(d));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue