@pofky/asc-mcp 1.9.14 → 1.10.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/README.md +28 -19
- package/USER_GUIDE.md +5 -5
- package/dist/doctor.js +2 -2
- package/dist/doctor.js.map +1 -1
- package/dist/gate.d.ts +7 -0
- package/dist/gate.d.ts.map +1 -1
- package/dist/gate.js +21 -5
- package/dist/gate.js.map +1 -1
- package/dist/index.js +8 -4
- package/dist/index.js.map +1 -1
- package/dist/instructions.d.ts.map +1 -1
- package/dist/instructions.js +2 -1
- package/dist/instructions.js.map +1 -1
- package/dist/license.d.ts.map +1 -1
- package/dist/license.js +3 -1
- package/dist/license.js.map +1 -1
- package/dist/preflight/apple-lists.d.ts +73 -0
- package/dist/preflight/apple-lists.d.ts.map +1 -0
- package/dist/preflight/apple-lists.js +141 -0
- package/dist/preflight/apple-lists.js.map +1 -0
- package/dist/preflight/binary-scan.d.ts +14 -0
- package/dist/preflight/binary-scan.d.ts.map +1 -0
- package/dist/preflight/binary-scan.js +114 -0
- package/dist/preflight/binary-scan.js.map +1 -0
- package/dist/preflight/checks/project.d.ts +6 -0
- package/dist/preflight/checks/project.d.ts.map +1 -0
- package/dist/preflight/checks/project.js +147 -0
- package/dist/preflight/checks/project.js.map +1 -0
- package/dist/preflight/checks/record.d.ts +18 -0
- package/dist/preflight/checks/record.d.ts.map +1 -0
- package/dist/preflight/checks/record.js +326 -0
- package/dist/preflight/checks/record.js.map +1 -0
- package/dist/preflight/checks/urls.d.ts +8 -0
- package/dist/preflight/checks/urls.d.ts.map +1 -0
- package/dist/preflight/checks/urls.js +109 -0
- package/dist/preflight/checks/urls.js.map +1 -0
- package/dist/preflight/gather.d.ts +47 -0
- package/dist/preflight/gather.d.ts.map +1 -0
- package/dist/preflight/gather.js +295 -0
- package/dist/preflight/gather.js.map +1 -0
- package/dist/preflight/plist.d.ts +16 -0
- package/dist/preflight/plist.d.ts.map +1 -0
- package/dist/preflight/plist.js +104 -0
- package/dist/preflight/plist.js.map +1 -0
- package/dist/preflight/project-files.d.ts +34 -0
- package/dist/preflight/project-files.d.ts.map +1 -0
- package/dist/preflight/project-files.js +124 -0
- package/dist/preflight/project-files.js.map +1 -0
- package/dist/preflight/project-scan.d.ts +4 -0
- package/dist/preflight/project-scan.d.ts.map +1 -0
- package/dist/preflight/project-scan.js +316 -0
- package/dist/preflight/project-scan.js.map +1 -0
- package/dist/preflight/report.d.ts +19 -0
- package/dist/preflight/report.d.ts.map +1 -0
- package/dist/preflight/report.js +111 -0
- package/dist/preflight/report.js.map +1 -0
- package/dist/preflight/rules.d.ts +333 -0
- package/dist/preflight/rules.d.ts.map +1 -0
- package/dist/preflight/rules.js +155 -0
- package/dist/preflight/rules.js.map +1 -0
- package/dist/preflight/run.d.ts +15 -0
- package/dist/preflight/run.d.ts.map +1 -0
- package/dist/preflight/run.js +84 -0
- package/dist/preflight/run.js.map +1 -0
- package/dist/preflight/types.d.ts +178 -0
- package/dist/preflight/types.d.ts.map +1 -0
- package/dist/preflight/types.js +8 -0
- package/dist/preflight/types.js.map +1 -0
- package/dist/preflight/url-probe.d.ts +16 -0
- package/dist/preflight/url-probe.d.ts.map +1 -0
- package/dist/preflight/url-probe.js +217 -0
- package/dist/preflight/url-probe.js.map +1 -0
- package/dist/prompts.js +7 -7
- package/dist/prompts.js.map +1 -1
- package/dist/tools/guide.js +5 -5
- package/dist/tools/guide.js.map +1 -1
- package/dist/tools/privacy.d.ts +3 -1
- package/dist/tools/privacy.d.ts.map +1 -1
- package/dist/tools/privacy.js +3 -1
- package/dist/tools/privacy.js.map +1 -1
- package/dist/tools/release-notes.d.ts.map +1 -1
- package/dist/tools/release-notes.js +5 -2
- package/dist/tools/release-notes.js.map +1 -1
- package/dist/tools/release-preflight.d.ts +2 -17
- package/dist/tools/release-preflight.d.ts.map +1 -1
- package/dist/tools/release-preflight.js +3 -444
- package/dist/tools/release-preflight.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Apple's lists, copied from Apple's pages on the date in rules.ts. Tests build
|
|
3
|
+
* their fixtures from these, so a change here moves both sides together.
|
|
4
|
+
*/
|
|
5
|
+
/** Required reason API: https://developer.apple.com/documentation/bundleresources/describing-use-of-required-reason-api */
|
|
6
|
+
export declare const REQUIRED_REASON_CATEGORIES: {
|
|
7
|
+
readonly NSPrivacyAccessedAPICategoryFileTimestamp: {
|
|
8
|
+
readonly label: "file timestamps";
|
|
9
|
+
readonly reasons: readonly ["DDA9.1", "C617.1", "3B52.1", "0A2A.1"];
|
|
10
|
+
readonly source: readonly [RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp];
|
|
11
|
+
readonly weakSource: readonly [RegExp];
|
|
12
|
+
readonly symbols: readonly ["_stat", "_fstat", "_fstatat", "_lstat", "_getattrlist", "_getattrlistbulk", "_fgetattrlist", "_getattrlistat", "_NSFileCreationDate", "_NSFileModificationDate", "_NSURLCreationDateKey", "_NSURLContentModificationDateKey"];
|
|
13
|
+
};
|
|
14
|
+
readonly NSPrivacyAccessedAPICategorySystemBootTime: {
|
|
15
|
+
readonly label: "system boot time";
|
|
16
|
+
readonly reasons: readonly ["35F9.1", "8FFB.1", "3D61.1"];
|
|
17
|
+
readonly source: readonly [RegExp, RegExp];
|
|
18
|
+
readonly weakSource: readonly [];
|
|
19
|
+
readonly symbols: readonly ["_mach_absolute_time"];
|
|
20
|
+
};
|
|
21
|
+
readonly NSPrivacyAccessedAPICategoryDiskSpace: {
|
|
22
|
+
readonly label: "disk space";
|
|
23
|
+
readonly reasons: readonly ["85F4.1", "E174.1", "7D9E.1", "B728.1"];
|
|
24
|
+
readonly source: readonly [RegExp, RegExp, RegExp, RegExp, RegExp];
|
|
25
|
+
readonly weakSource: readonly [RegExp];
|
|
26
|
+
readonly symbols: readonly ["_statfs", "_statvfs", "_fstatfs", "_fstatvfs", "_NSFileSystemSize", "_NSFileSystemFreeSize", "_NSURLVolumeAvailableCapacityKey", "_NSURLVolumeAvailableCapacityForImportantUsageKey", "_NSURLVolumeAvailableCapacityForOpportunisticUsageKey", "_NSURLVolumeTotalCapacityKey"];
|
|
27
|
+
};
|
|
28
|
+
readonly NSPrivacyAccessedAPICategoryActiveKeyboards: {
|
|
29
|
+
readonly label: "active keyboards";
|
|
30
|
+
readonly reasons: readonly ["3EC4.1", "54BD.1"];
|
|
31
|
+
readonly source: readonly [RegExp];
|
|
32
|
+
readonly weakSource: readonly [];
|
|
33
|
+
readonly symbols: readonly [];
|
|
34
|
+
};
|
|
35
|
+
readonly NSPrivacyAccessedAPICategoryUserDefaults: {
|
|
36
|
+
readonly label: "user defaults";
|
|
37
|
+
readonly reasons: readonly ["CA92.1", "1C8F.1", "C56D.1", "AC6B.1"];
|
|
38
|
+
readonly source: readonly [RegExp, RegExp, RegExp];
|
|
39
|
+
readonly weakSource: readonly [];
|
|
40
|
+
readonly symbols: readonly ["_OBJC_CLASS_$_NSUserDefaults"];
|
|
41
|
+
readonly symbolFragments: readonly ["10Foundation12UserDefaultsC", "14NSUserDefaultsC"];
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
export type RequiredReasonCategory = keyof typeof REQUIRED_REASON_CATEGORIES;
|
|
45
|
+
/**
|
|
46
|
+
* APIs that need a purpose string. `keys` lists every Info.plist key that
|
|
47
|
+
* satisfies the API, because some APIs have more than one valid key.
|
|
48
|
+
* Source: https://developer.apple.com/documentation/bundleresources/protected-resources
|
|
49
|
+
* PHPickerViewController is left out on purpose: it needs no permission.
|
|
50
|
+
*/
|
|
51
|
+
export declare const PURPOSE_STRINGS: ReadonlyArray<{
|
|
52
|
+
api: string;
|
|
53
|
+
pattern: RegExp;
|
|
54
|
+
keys: readonly string[];
|
|
55
|
+
}>;
|
|
56
|
+
/** Every key above, as a pattern over Info.plist-like files. */
|
|
57
|
+
export declare const PURPOSE_KEY_PATTERN: RegExp;
|
|
58
|
+
/** https://developer.apple.com/support/third-party-SDK-requirements/ */
|
|
59
|
+
export declare const LISTED_SDKS: readonly string[];
|
|
60
|
+
/**
|
|
61
|
+
* Swift packages are named after their repository, not the module on Apple's
|
|
62
|
+
* list. Only packages whose repository name differs need a row.
|
|
63
|
+
*/
|
|
64
|
+
export declare const SDK_PACKAGE_ALIASES: Readonly<Record<string, string>>;
|
|
65
|
+
/**
|
|
66
|
+
* Code that suggests a password or email login, for the demo account reminder.
|
|
67
|
+
* Sign in with Apple and Google are left out: a reviewer uses their own account,
|
|
68
|
+
* and on a real app with optional Apple sign-in this warned for nothing.
|
|
69
|
+
*/
|
|
70
|
+
export declare const SIGN_IN_PATTERNS: readonly RegExp[];
|
|
71
|
+
/** Sample values left behind in Info.plist. Google's published test AdMob app id leads. */
|
|
72
|
+
export declare const PLACEHOLDER_PLIST_VALUES: readonly RegExp[];
|
|
73
|
+
//# sourceMappingURL=apple-lists.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apple-lists.d.ts","sourceRoot":"","sources":["../../src/preflight/apple-lists.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,2HAA2H;AAC3H,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4DrC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,MAAM,OAAO,0BAA0B,CAAC;AAE7E;;;;;GAKG;AACH,eAAO,MAAM,eAAe,EAAE,aAAa,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,CAiBpG,CAAC;AAEF,gEAAgE;AAChE,eAAO,MAAM,mBAAmB,QAA8D,CAAC;AAE/F,wEAAwE;AACxE,eAAO,MAAM,WAAW,EAAE,SAAS,MAAM,EAexC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAchE,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,EAAE,SAAS,MAAM,EAI7C,CAAC;AAEF,2FAA2F;AAC3F,eAAO,MAAM,wBAAwB,EAAE,SAAS,MAAM,EAIrD,CAAC"}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Apple's lists, copied from Apple's pages on the date in rules.ts. Tests build
|
|
4
|
+
* their fixtures from these, so a change here moves both sides together.
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.PLACEHOLDER_PLIST_VALUES = exports.SIGN_IN_PATTERNS = exports.SDK_PACKAGE_ALIASES = exports.LISTED_SDKS = exports.PURPOSE_KEY_PATTERN = exports.PURPOSE_STRINGS = exports.REQUIRED_REASON_CATEGORIES = void 0;
|
|
8
|
+
/** Required reason API: https://developer.apple.com/documentation/bundleresources/describing-use-of-required-reason-api */
|
|
9
|
+
exports.REQUIRED_REASON_CATEGORIES = {
|
|
10
|
+
NSPrivacyAccessedAPICategoryFileTimestamp: {
|
|
11
|
+
label: "file timestamps",
|
|
12
|
+
reasons: ["DDA9.1", "C617.1", "3B52.1", "0A2A.1"],
|
|
13
|
+
source: [
|
|
14
|
+
/\bfileModificationDate\b/,
|
|
15
|
+
/\bcontentModificationDateKey\b/,
|
|
16
|
+
/\bcreationDateKey\b/,
|
|
17
|
+
/\bNSFile(Creation|Modification)Date\b/,
|
|
18
|
+
/\bFileAttributeKey\.(creationDate|modificationDate)\b/,
|
|
19
|
+
/\b(getattrlist|getattrlistbulk|fgetattrlist|getattrlistat|fstat|fstatat|lstat)\s*\(/,
|
|
20
|
+
/\bstat\s*\([^)]*&/,
|
|
21
|
+
],
|
|
22
|
+
// Plain property names that apps also use for their own models.
|
|
23
|
+
weakSource: [/\[\s*\.(creationDate|modificationDate)\s*\]/],
|
|
24
|
+
symbols: ["_stat", "_fstat", "_fstatat", "_lstat", "_getattrlist", "_getattrlistbulk", "_fgetattrlist", "_getattrlistat", "_NSFileCreationDate", "_NSFileModificationDate", "_NSURLCreationDateKey", "_NSURLContentModificationDateKey"],
|
|
25
|
+
},
|
|
26
|
+
NSPrivacyAccessedAPICategorySystemBootTime: {
|
|
27
|
+
label: "system boot time",
|
|
28
|
+
reasons: ["35F9.1", "8FFB.1", "3D61.1"],
|
|
29
|
+
source: [/\bsystemUptime\b/, /\bmach_absolute_time\b/],
|
|
30
|
+
weakSource: [],
|
|
31
|
+
symbols: ["_mach_absolute_time"],
|
|
32
|
+
},
|
|
33
|
+
NSPrivacyAccessedAPICategoryDiskSpace: {
|
|
34
|
+
label: "disk space",
|
|
35
|
+
reasons: ["85F4.1", "E174.1", "7D9E.1", "B728.1"],
|
|
36
|
+
source: [
|
|
37
|
+
/\bvolumeAvailableCapacity(ForImportantUsage|ForOpportunisticUsage)?Key\b/,
|
|
38
|
+
/\bvolumeTotalCapacityKey\b/,
|
|
39
|
+
/\bsystemFreeSize\b/,
|
|
40
|
+
/\bNSFileSystem(Free)?Size\b/,
|
|
41
|
+
/\b(statfs|statvfs|fstatfs|fstatvfs)\s*\(/,
|
|
42
|
+
],
|
|
43
|
+
weakSource: [/\bsystemSize\b/],
|
|
44
|
+
symbols: ["_statfs", "_statvfs", "_fstatfs", "_fstatvfs", "_NSFileSystemSize", "_NSFileSystemFreeSize", "_NSURLVolumeAvailableCapacityKey", "_NSURLVolumeAvailableCapacityForImportantUsageKey", "_NSURLVolumeAvailableCapacityForOpportunisticUsageKey", "_NSURLVolumeTotalCapacityKey"],
|
|
45
|
+
},
|
|
46
|
+
NSPrivacyAccessedAPICategoryActiveKeyboards: {
|
|
47
|
+
label: "active keyboards",
|
|
48
|
+
reasons: ["3EC4.1", "54BD.1"],
|
|
49
|
+
source: [/\bactiveInputModes\b/],
|
|
50
|
+
weakSource: [],
|
|
51
|
+
symbols: [],
|
|
52
|
+
},
|
|
53
|
+
NSPrivacyAccessedAPICategoryUserDefaults: {
|
|
54
|
+
label: "user defaults",
|
|
55
|
+
reasons: ["CA92.1", "1C8F.1", "C56D.1", "AC6B.1"],
|
|
56
|
+
source: [/\bUserDefaults\b/, /\bNSUserDefaults\b/, /@AppStorage\b/],
|
|
57
|
+
weakSource: [],
|
|
58
|
+
symbols: ["_OBJC_CLASS_$_NSUserDefaults"],
|
|
59
|
+
// Swift's mangled names, for Foundation.UserDefaults and SwiftUI's @AppStorage.
|
|
60
|
+
symbolFragments: ["10Foundation12UserDefaultsC", "14NSUserDefaultsC"],
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* APIs that need a purpose string. `keys` lists every Info.plist key that
|
|
65
|
+
* satisfies the API, because some APIs have more than one valid key.
|
|
66
|
+
* Source: https://developer.apple.com/documentation/bundleresources/protected-resources
|
|
67
|
+
* PHPickerViewController is left out on purpose: it needs no permission.
|
|
68
|
+
*/
|
|
69
|
+
exports.PURPOSE_STRINGS = [
|
|
70
|
+
{ api: "the camera", pattern: /\b(AVCaptureDevice|AVCaptureSession|DataScannerViewController)\b/, keys: ["NSCameraUsageDescription"] },
|
|
71
|
+
{ api: "the microphone", pattern: /\b(AVAudioRecorder|recordPermission|requestRecordPermission)\b/, keys: ["NSMicrophoneUsageDescription"] },
|
|
72
|
+
{ api: "the photo library", pattern: /\b(PHPhotoLibrary|PHAsset)\b/, keys: ["NSPhotoLibraryUsageDescription", "NSPhotoLibraryAddUsageDescription"] },
|
|
73
|
+
{ api: "location", pattern: /\brequestWhenInUseAuthorization\b/, keys: ["NSLocationWhenInUseUsageDescription"] },
|
|
74
|
+
{ api: "location always", pattern: /\brequestAlwaysAuthorization\b/, keys: ["NSLocationAlwaysAndWhenInUseUsageDescription"] },
|
|
75
|
+
{ api: "contacts", pattern: /\bCNContactStore\b/, keys: ["NSContactsUsageDescription"] },
|
|
76
|
+
{ api: "calendars or reminders", pattern: /\bEKEventStore\b/, keys: ["NSCalendarsFullAccessUsageDescription", "NSCalendarsWriteOnlyAccessUsageDescription", "NSCalendarsUsageDescription", "NSRemindersFullAccessUsageDescription", "NSRemindersUsageDescription"] },
|
|
77
|
+
{ api: "Health data", pattern: /\bHKHealthStore\b/, keys: ["NSHealthShareUsageDescription", "NSHealthUpdateUsageDescription"] },
|
|
78
|
+
{ api: "Bluetooth", pattern: /\b(CBCentralManager|CBPeripheralManager)\b/, keys: ["NSBluetoothAlwaysUsageDescription"] },
|
|
79
|
+
{ api: "tracking", pattern: /\bATTrackingManager\b/, keys: ["NSUserTrackingUsageDescription"] },
|
|
80
|
+
{ api: "Face ID", pattern: /\bdeviceOwnerAuthentication(WithBiometrics)?\b/, keys: ["NSFaceIDUsageDescription"] },
|
|
81
|
+
{ api: "speech recognition", pattern: /\bSFSpeechRecognizer\b/, keys: ["NSSpeechRecognitionUsageDescription"] },
|
|
82
|
+
{ api: "the music library", pattern: /\bMPMediaLibrary\b/, keys: ["NSAppleMusicUsageDescription"] },
|
|
83
|
+
{ api: "motion", pattern: /\b(CMMotionActivityManager|CMPedometer)\b/, keys: ["NSMotionUsageDescription"] },
|
|
84
|
+
{ api: "NFC", pattern: /\b(NFCNDEFReaderSession|NFCTagReaderSession)\b/, keys: ["NFCReaderUsageDescription"] },
|
|
85
|
+
{ api: "HomeKit", pattern: /\bHMHomeManager\b/, keys: ["NSHomeKitUsageDescription"] },
|
|
86
|
+
];
|
|
87
|
+
/** Every key above, as a pattern over Info.plist-like files. */
|
|
88
|
+
exports.PURPOSE_KEY_PATTERN = /^(NS[A-Za-z]+UsageDescription|NFCReaderUsageDescription)$/;
|
|
89
|
+
/** https://developer.apple.com/support/third-party-SDK-requirements/ */
|
|
90
|
+
exports.LISTED_SDKS = [
|
|
91
|
+
"Abseil", "AFNetworking", "Alamofire", "AppAuth", "BoringSSL", "openssl_grpc", "Capacitor", "Charts",
|
|
92
|
+
"connectivity_plus", "Cordova", "device_info_plus", "DKImagePickerController", "DKPhotoGallery", "FBAEMKit",
|
|
93
|
+
"FBLPromises", "FBSDKCoreKit", "FBSDKCoreKit_Basics", "FBSDKLoginKit", "FBSDKShareKit", "file_picker",
|
|
94
|
+
"FirebaseABTesting", "FirebaseAuth", "FirebaseCore", "FirebaseCoreDiagnostics", "FirebaseCoreExtension",
|
|
95
|
+
"FirebaseCoreInternal", "FirebaseCrashlytics", "FirebaseDynamicLinks", "FirebaseFirestore",
|
|
96
|
+
"FirebaseInstallations", "FirebaseMessaging", "FirebaseRemoteConfig", "Flutter", "flutter_inappwebview",
|
|
97
|
+
"flutter_local_notifications", "fluttertoast", "FMDB", "geolocator_apple", "GoogleDataTransport", "GoogleSignIn",
|
|
98
|
+
"GoogleToolboxForMac", "GoogleUtilities", "grpcpp", "GTMAppAuth", "GTMSessionFetcher", "hermes",
|
|
99
|
+
"image_picker_ios", "IQKeyboardManager", "IQKeyboardManagerSwift", "Kingfisher", "leveldb", "Lottie",
|
|
100
|
+
"MBProgressHUD", "nanopb", "OneSignal", "OneSignalCore", "OneSignalExtension", "OneSignalOutcomes", "OpenSSL",
|
|
101
|
+
"OrderedSet", "package_info", "package_info_plus", "path_provider", "path_provider_ios", "Promises", "Protobuf",
|
|
102
|
+
"Reachability", "RealmSwift", "RxCocoa", "RxRelay", "RxSwift", "SDWebImage", "share_plus", "shared_preferences_ios",
|
|
103
|
+
"SnapKit", "sqflite", "Starscream", "SVProgressHUD", "SwiftyGif", "SwiftyJSON", "Toast", "UnityFramework",
|
|
104
|
+
"url_launcher", "url_launcher_ios", "video_player_avfoundation", "wakelock", "webview_flutter_wkwebview",
|
|
105
|
+
];
|
|
106
|
+
/**
|
|
107
|
+
* Swift packages are named after their repository, not the module on Apple's
|
|
108
|
+
* list. Only packages whose repository name differs need a row.
|
|
109
|
+
*/
|
|
110
|
+
exports.SDK_PACKAGE_ALIASES = {
|
|
111
|
+
"firebase-ios-sdk": "FirebaseCore",
|
|
112
|
+
"lottie-ios": "Lottie",
|
|
113
|
+
"lottie-spm": "Lottie",
|
|
114
|
+
"realm-swift": "RealmSwift",
|
|
115
|
+
"googlesignin-ios": "GoogleSignIn",
|
|
116
|
+
"gtm-session-fetcher": "GTMSessionFetcher",
|
|
117
|
+
"appauth-ios": "AppAuth",
|
|
118
|
+
"abseil-cpp-binary": "Abseil",
|
|
119
|
+
"abseil-cpp": "Abseil",
|
|
120
|
+
"grpc-binary": "grpcpp",
|
|
121
|
+
"facebook-ios-sdk": "FBSDKCoreKit",
|
|
122
|
+
"onesignal-ios-sdk": "OneSignal",
|
|
123
|
+
"onesignal-xcframework": "OneSignal",
|
|
124
|
+
};
|
|
125
|
+
/**
|
|
126
|
+
* Code that suggests a password or email login, for the demo account reminder.
|
|
127
|
+
* Sign in with Apple and Google are left out: a reviewer uses their own account,
|
|
128
|
+
* and on a real app with optional Apple sign-in this warned for nothing.
|
|
129
|
+
*/
|
|
130
|
+
exports.SIGN_IN_PATTERNS = [
|
|
131
|
+
/\bAuth\.auth\(\)\.signIn\b/,
|
|
132
|
+
/\bsignInWith(Password|Email|OTP)\b/,
|
|
133
|
+
/\bsignIn\(\s*email\s*:/,
|
|
134
|
+
];
|
|
135
|
+
/** Sample values left behind in Info.plist. Google's published test AdMob app id leads. */
|
|
136
|
+
exports.PLACEHOLDER_PLIST_VALUES = [
|
|
137
|
+
/^ca-app-pub-3940256099942544/,
|
|
138
|
+
/^(YOUR_|REPLACE_|CHANGE_?ME|<YOUR)/i,
|
|
139
|
+
/^FB_APP_ID$/,
|
|
140
|
+
];
|
|
141
|
+
//# sourceMappingURL=apple-lists.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apple-lists.js","sourceRoot":"","sources":["../../src/preflight/apple-lists.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,2HAA2H;AAC9G,QAAA,0BAA0B,GAAG;IACxC,yCAAyC,EAAE;QACzC,KAAK,EAAE,iBAAiB;QACxB,OAAO,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC;QACjD,MA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W;IAChC,uBAAuB,EAAE,WAAW;CACrC,CAAC;AAEF;;;;GAIG;AACU,QAAA,gBAAgB,GAAsB;IACjD,4BAA4B;IAC5B,oCAAoC;IACpC,wBAAwB;CACzB,CAAC;AAEF,2FAA2F;AAC9E,QAAA,wBAAwB,GAAsB;IACzD,8BAA8B;IAC9B,qCAAqC;IACrC,aAAa;CACd,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type RequiredReasonCategory } from "./apple-lists.js";
|
|
2
|
+
/** Finds the build closest to what gets submitted, newest first within a kind. */
|
|
3
|
+
export declare function findBuiltApp(root: string): Promise<string | null>;
|
|
4
|
+
/** A property list as XML whichever format it is on disk. macOS only. */
|
|
5
|
+
export declare function plistAsXml(path: string): Promise<string>;
|
|
6
|
+
/** Categories whose APIs the app's own executable imports. Reads symbols; runs nothing. */
|
|
7
|
+
export declare function scanExecutable(appPath: string): Promise<RequiredReasonCategory[]>;
|
|
8
|
+
/** Frameworks inside the app, each with whether it carries a privacy manifest. */
|
|
9
|
+
export declare function listEmbeddedFrameworks(appPath: string, root: string): Promise<Array<{
|
|
10
|
+
name: string;
|
|
11
|
+
hasManifest: boolean;
|
|
12
|
+
rel: string;
|
|
13
|
+
}>>;
|
|
14
|
+
//# sourceMappingURL=binary-scan.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"binary-scan.d.ts","sourceRoot":"","sources":["../../src/preflight/binary-scan.ts"],"names":[],"mappings":"AAKA,OAAO,EAA8B,KAAK,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AA+B3F,kFAAkF;AAClF,wBAAsB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CA2BvE;AAED,yEAAyE;AACzE,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAG9D;AAED,2FAA2F;AAC3F,wBAAsB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,sBAAsB,EAAE,CAAC,CAavF;AACD,kFAAkF;AAClF,wBAAsB,sBAAsB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,OAAO,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC,CAW/I"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.findBuiltApp = findBuiltApp;
|
|
4
|
+
exports.plistAsXml = plistAsXml;
|
|
5
|
+
exports.scanExecutable = scanExecutable;
|
|
6
|
+
exports.listEmbeddedFrameworks = listEmbeddedFrameworks;
|
|
7
|
+
const node_child_process_1 = require("node:child_process");
|
|
8
|
+
const node_fs_1 = require("node:fs");
|
|
9
|
+
const promises_1 = require("node:fs/promises");
|
|
10
|
+
const node_path_1 = require("node:path");
|
|
11
|
+
const node_util_1 = require("node:util");
|
|
12
|
+
const apple_lists_js_1 = require("./apple-lists.js");
|
|
13
|
+
const plist_js_1 = require("./plist.js");
|
|
14
|
+
const run = (0, node_util_1.promisify)(node_child_process_1.execFile);
|
|
15
|
+
/** Bounds on tools reading a built app. `nm` on a large binary takes seconds, not minutes. */
|
|
16
|
+
const TOOL_TIMEOUT_MS = 20_000;
|
|
17
|
+
const TOOL_MAX_OUTPUT = 64 * 1024 * 1024;
|
|
18
|
+
/** Where Xcode-driven builds land inside a project, and how far down to look. */
|
|
19
|
+
const BUILD_OUTPUT_DIR = /^(build|derived_?data|archives?)([-_.].*)?$/i;
|
|
20
|
+
const BUILD_SEARCH_DEPTH = 6;
|
|
21
|
+
/**
|
|
22
|
+
* The executable inside an app, named by its own Info.plist. An app folder with
|
|
23
|
+
* no executable is what a failed or cleaned build leaves behind.
|
|
24
|
+
*/
|
|
25
|
+
async function executableOf(appPath) {
|
|
26
|
+
const infoPath = [(0, node_path_1.join)(appPath, "Info.plist"), (0, node_path_1.join)(appPath, "Contents", "Info.plist")].find((p) => (0, node_fs_1.existsSync)(p));
|
|
27
|
+
if (!infoPath)
|
|
28
|
+
return null;
|
|
29
|
+
const info = (0, plist_js_1.parsePlist)(await plistAsXml(infoPath));
|
|
30
|
+
const name = typeof info === "object" && !Array.isArray(info) ? info.CFBundleExecutable : undefined;
|
|
31
|
+
if (typeof name !== "string")
|
|
32
|
+
return null;
|
|
33
|
+
return [(0, node_path_1.join)(appPath, name), (0, node_path_1.join)(appPath, "Contents", "MacOS", name)].find((p) => (0, node_fs_1.existsSync)(p)) ?? null;
|
|
34
|
+
}
|
|
35
|
+
/** How close a build is to what gets submitted. An archive is what gets uploaded. */
|
|
36
|
+
function buildRank(path) {
|
|
37
|
+
if (path.includes(".xcarchive"))
|
|
38
|
+
return 2;
|
|
39
|
+
return /Release-/.test(path) ? 1 : 0;
|
|
40
|
+
}
|
|
41
|
+
/** Finds the build closest to what gets submitted, newest first within a kind. */
|
|
42
|
+
async function findBuiltApp(root) {
|
|
43
|
+
if (root.endsWith(".app"))
|
|
44
|
+
return root;
|
|
45
|
+
const found = [];
|
|
46
|
+
const visit = async (dir, depth) => {
|
|
47
|
+
if (depth > BUILD_SEARCH_DEPTH)
|
|
48
|
+
return;
|
|
49
|
+
const entries = await (0, promises_1.readdir)(dir, { withFileTypes: true });
|
|
50
|
+
for (const entry of entries) {
|
|
51
|
+
if (!entry.isDirectory() || entry.isSymbolicLink())
|
|
52
|
+
continue;
|
|
53
|
+
const full = (0, node_path_1.join)(dir, entry.name);
|
|
54
|
+
if (entry.name.endsWith(".app")) {
|
|
55
|
+
// Simulator builds carry different symbols, and test runners are not the app.
|
|
56
|
+
if (/iphonesimulator|-Runner\.app$/i.test(full))
|
|
57
|
+
continue;
|
|
58
|
+
if (await executableOf(full))
|
|
59
|
+
found.push({ path: full, mtime: (await (0, promises_1.stat)(full)).mtimeMs });
|
|
60
|
+
continue;
|
|
61
|
+
}
|
|
62
|
+
if (!/^(SourcePackages|Index\.noindex|Intermediates\.noindex|\.git|node_modules)$/.test(entry.name))
|
|
63
|
+
await visit(full, depth + 1);
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
if (root.endsWith(".xcarchive"))
|
|
67
|
+
await visit(root, 0);
|
|
68
|
+
else {
|
|
69
|
+
const top = await (0, promises_1.readdir)(root, { withFileTypes: true });
|
|
70
|
+
for (const entry of top) {
|
|
71
|
+
if (entry.isDirectory() && !entry.isSymbolicLink() && BUILD_OUTPUT_DIR.test(entry.name))
|
|
72
|
+
await visit((0, node_path_1.join)(root, entry.name), 0);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
found.sort((a, b) => buildRank(b.path) - buildRank(a.path) || b.mtime - a.mtime);
|
|
76
|
+
return found[0]?.path ?? null;
|
|
77
|
+
}
|
|
78
|
+
/** A property list as XML whichever format it is on disk. macOS only. */
|
|
79
|
+
async function plistAsXml(path) {
|
|
80
|
+
const { stdout } = await run("plutil", ["-convert", "xml1", "-o", "-", "--", path], { timeout: TOOL_TIMEOUT_MS, maxBuffer: TOOL_MAX_OUTPUT });
|
|
81
|
+
return stdout;
|
|
82
|
+
}
|
|
83
|
+
/** Categories whose APIs the app's own executable imports. Reads symbols; runs nothing. */
|
|
84
|
+
async function scanExecutable(appPath) {
|
|
85
|
+
const executable = await executableOf(appPath);
|
|
86
|
+
if (!executable)
|
|
87
|
+
throw new Error("its Info.plist names no executable that exists");
|
|
88
|
+
const { stdout } = await run("nm", ["-u", "--", executable], { timeout: TOOL_TIMEOUT_MS, maxBuffer: TOOL_MAX_OUTPUT });
|
|
89
|
+
const symbols = stdout.split("\n").map((l) => l.trim());
|
|
90
|
+
const exact = new Set(symbols);
|
|
91
|
+
const hits = [];
|
|
92
|
+
for (const [category, data] of Object.entries(apple_lists_js_1.REQUIRED_REASON_CATEGORIES)) {
|
|
93
|
+
const fragments = ("symbolFragments" in data ? data.symbolFragments : []);
|
|
94
|
+
const used = data.symbols.some((s) => exact.has(s)) || symbols.some((sym) => fragments.some((f) => sym.includes(f)));
|
|
95
|
+
if (used)
|
|
96
|
+
hits.push(category);
|
|
97
|
+
}
|
|
98
|
+
return hits;
|
|
99
|
+
}
|
|
100
|
+
/** Frameworks inside the app, each with whether it carries a privacy manifest. */
|
|
101
|
+
async function listEmbeddedFrameworks(appPath, root) {
|
|
102
|
+
const dir = (0, node_path_1.join)(appPath, "Frameworks");
|
|
103
|
+
if (!(0, node_fs_1.existsSync)(dir))
|
|
104
|
+
return [];
|
|
105
|
+
const entries = await (0, promises_1.readdir)(dir, { withFileTypes: true });
|
|
106
|
+
return entries
|
|
107
|
+
.filter((e) => e.name.endsWith(".framework"))
|
|
108
|
+
.map((e) => {
|
|
109
|
+
const full = (0, node_path_1.join)(dir, e.name);
|
|
110
|
+
const hasManifest = (0, node_fs_1.existsSync)((0, node_path_1.join)(full, "PrivacyInfo.xcprivacy")) || (0, node_fs_1.existsSync)((0, node_path_1.join)(full, "Resources", "PrivacyInfo.xcprivacy"));
|
|
111
|
+
return { name: e.name.replace(/\.framework$/, ""), hasManifest, rel: (0, node_path_1.relative)(root, full).split(node_path_1.sep).join("/") };
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
//# sourceMappingURL=binary-scan.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"binary-scan.js","sourceRoot":"","sources":["../../src/preflight/binary-scan.ts"],"names":[],"mappings":";;AAqCA,oCA2BC;AAGD,gCAGC;AAGD,wCAaC;AAED,wDAWC;AAnGD,2DAA8C;AAC9C,qCAAqC;AACrC,+CAAiD;AACjD,yCAAgD;AAChD,yCAAsC;AACtC,qDAA2F;AAC3F,yCAAwC;AAExC,MAAM,GAAG,GAAG,IAAA,qBAAS,EAAC,6BAAQ,CAAC,CAAC;AAEhC,8FAA8F;AAC9F,MAAM,eAAe,GAAG,MAAM,CAAC;AAC/B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AAY,CAAC,CAAC;IACxC,IAAI,CAAC,IAAA,oBAAU,EAAC,GAAG,CAAC;QAAE,OAAO,EAAE,CAAC;IAChC,MAAM,OAAO,GAAG,MAAM,IAAA,kBAAO,EAAC,GAAG,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;IAC5D,OAAO,OAAO;SACX,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;SAC5C,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;QACT,MAAM,IAAI,GAAG,IAAA,gBAAI,EAAC,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;QAC/B,MAAM,WAAW,GAAG,IAAA,oBAAU,EAAC,IAAA,gBAAI,EAAC,IAAI,EAAE,uBAAuB,CAAC,CAAC,IAAI,IAAA,oBAAU,EAAC,IAAA,gBAAI,EAAC,IAAI,EAAE,WAAW,EAAE,uBAAuB,CAAC,CAAC,CAAC;QACpI,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,EAAE,CAAC,EAAE,WAAW,EAAE,GAAG,EAAE,IAAA,oBAAQ,EAAC,IAAI,EAAE,IAAI,CAAC,CAAC,KAAK,CAAC,eAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;IACnH,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Finding, ProjectInput } from "../types.js";
|
|
2
|
+
/** The project rules, or one line each saying why they did not run. */
|
|
3
|
+
export declare function checkProject(project: ProjectInput): Finding[];
|
|
4
|
+
/** Data types declared in the manifests, for the App Privacy page Apple's API cannot reach. */
|
|
5
|
+
export declare function declaredDataTypes(project: ProjectInput): string[];
|
|
6
|
+
//# sourceMappingURL=project.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../../src/preflight/checks/project.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAuB,MAAM,aAAa,CAAC;AA+F9E,uEAAuE;AACvE,wBAAgB,YAAY,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,EAAE,CAe7D;AAED,+FAA+F;AAC/F,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,YAAY,GAAG,MAAM,EAAE,CAQjE"}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.checkProject = checkProject;
|
|
4
|
+
exports.declaredDataTypes = declaredDataTypes;
|
|
5
|
+
const apple_lists_js_1 = require("../apple-lists.js");
|
|
6
|
+
const finding = (rule, status, saw, scope) => ({ rule, status, saw, scope });
|
|
7
|
+
const PROJECT_RULES = ["manifest.present", "manifest.reasons", "sdk.manifest", "plist.purpose", "plist.placeholder"];
|
|
8
|
+
const categoryLabel = (c) => apple_lists_js_1.REQUIRED_REASON_CATEGORIES[c]?.label ?? c;
|
|
9
|
+
const shortCategory = (c) => c.replace("NSPrivacyAccessedAPICategory", "");
|
|
10
|
+
function checkManifests(scan) {
|
|
11
|
+
const out = [];
|
|
12
|
+
const usable = scan.manifests.filter((m) => m.parsed.ok);
|
|
13
|
+
for (const m of scan.manifests) {
|
|
14
|
+
if (!m.parsed.ok)
|
|
15
|
+
out.push(finding("manifest.present", "fail", `It does not parse: ${m.parsed.reason}`, m.path));
|
|
16
|
+
else if (m.inProject === false)
|
|
17
|
+
out.push(finding("manifest.present", "warn", "It exists, and the Xcode project does not mention it, so it may not reach the app.", m.path));
|
|
18
|
+
}
|
|
19
|
+
if (!usable.length && !scan.manifests.length) {
|
|
20
|
+
const strong = scan.apis.filter((a) => a.strength === "strong");
|
|
21
|
+
if (strong.length)
|
|
22
|
+
out.push(finding("manifest.present", "fail", `No PrivacyInfo.xcprivacy, and this code uses ${strong.map((a) => categoryLabel(a.category)).join(", ")}.`));
|
|
23
|
+
else
|
|
24
|
+
out.push(finding("manifest.present", "pass", "No manifest, and no use of a listed API was found."));
|
|
25
|
+
}
|
|
26
|
+
else if (usable.length && !out.some((f) => f.rule === "manifest.present")) {
|
|
27
|
+
out.push(finding("manifest.present", "pass", `${usable.length} manifest(s) parsed.`));
|
|
28
|
+
}
|
|
29
|
+
const declared = new Map();
|
|
30
|
+
for (const m of usable) {
|
|
31
|
+
if (!m.parsed.ok)
|
|
32
|
+
continue;
|
|
33
|
+
for (const [category, reasons] of Object.entries(m.parsed.value.accessed))
|
|
34
|
+
declared.set(category, [...(declared.get(category) ?? []), ...reasons]);
|
|
35
|
+
}
|
|
36
|
+
let reasonFindings = 0;
|
|
37
|
+
for (const api of scan.apis) {
|
|
38
|
+
if (declared.has(api.category))
|
|
39
|
+
continue;
|
|
40
|
+
reasonFindings++;
|
|
41
|
+
if (api.strength === "strong")
|
|
42
|
+
out.push(finding("manifest.reasons", "fail", `${categoryLabel(api.category)} is used at ${api.where}, and ${shortCategory(api.category)} is not declared in a manifest. Add it with a reason code.`));
|
|
43
|
+
else
|
|
44
|
+
out.push(finding("manifest.reasons", "warn", `${api.where} looks like ${categoryLabel(api.category)} use, which would need declaring. If it is your own property, ignore this.`));
|
|
45
|
+
}
|
|
46
|
+
for (const [category, reasons] of declared) {
|
|
47
|
+
const entry = apple_lists_js_1.REQUIRED_REASON_CATEGORIES[category];
|
|
48
|
+
if (!entry) {
|
|
49
|
+
reasonFindings++;
|
|
50
|
+
out.push(finding("manifest.reasons", "fail", `${category.slice(0, 80)} is not a category Apple lists.`));
|
|
51
|
+
continue;
|
|
52
|
+
}
|
|
53
|
+
const allowed = entry.reasons;
|
|
54
|
+
const invalid = reasons.filter((r) => !allowed.includes(r));
|
|
55
|
+
if (!reasons.length) {
|
|
56
|
+
reasonFindings++;
|
|
57
|
+
out.push(finding("manifest.reasons", "fail", `${shortCategory(category)} is declared with no reason code. Apple's codes for it: ${allowed.join(", ")}.`));
|
|
58
|
+
}
|
|
59
|
+
else if (invalid.length) {
|
|
60
|
+
reasonFindings++;
|
|
61
|
+
out.push(finding("manifest.reasons", "fail", `${shortCategory(category)} declares ${invalid.map((r) => r.slice(0, 12)).join(", ")}, not one of Apple's codes for it: ${allowed.join(", ")}.`));
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
if (!reasonFindings)
|
|
65
|
+
out.push(finding("manifest.reasons", "pass", `${scan.apis.length} API categor${scan.apis.length === 1 ? "y" : "ies"} in use, all declared with valid codes.`));
|
|
66
|
+
return out;
|
|
67
|
+
}
|
|
68
|
+
function checkSdks(scan) {
|
|
69
|
+
if (!scan.sdks.length)
|
|
70
|
+
return [finding("sdk.manifest", "pass", "No SDK on Apple's list was found.")];
|
|
71
|
+
const out = [];
|
|
72
|
+
for (const sdk of scan.sdks) {
|
|
73
|
+
if (sdk.manifest === "absent")
|
|
74
|
+
out.push(finding("sdk.manifest", "fail", `Found through ${sdk.via} with no PrivacyInfo.xcprivacy in it.`, sdk.name));
|
|
75
|
+
else if (sdk.manifest === "not_on_disk")
|
|
76
|
+
out.push(finding("sdk.manifest", "warn", `Found through ${sdk.via}. Its source is not in this folder, so its manifest could not be seen. Check the version you use includes one, or archive and re-run.`, sdk.name));
|
|
77
|
+
else
|
|
78
|
+
out.push(finding("sdk.manifest", "pass", "Carries a manifest.", sdk.name));
|
|
79
|
+
}
|
|
80
|
+
return out;
|
|
81
|
+
}
|
|
82
|
+
function checkPlist(scan) {
|
|
83
|
+
const out = [];
|
|
84
|
+
let bad = 0;
|
|
85
|
+
for (const use of scan.purposes) {
|
|
86
|
+
const present = use.keys.filter((k) => k in scan.purposeKeys);
|
|
87
|
+
if (present.some((k) => scan.purposeKeys[k]))
|
|
88
|
+
continue;
|
|
89
|
+
bad++;
|
|
90
|
+
out.push(present.length
|
|
91
|
+
? finding("plist.purpose", "fail", `${present[0]} is empty, and this code uses ${use.api} at ${use.where}.`)
|
|
92
|
+
: finding("plist.purpose", "fail", `This code uses ${use.api} at ${use.where}, and no ${use.keys[0]} was found.`));
|
|
93
|
+
}
|
|
94
|
+
if (!bad)
|
|
95
|
+
out.push(finding("plist.purpose", "pass", scan.purposes.length ? "Each permission in use has its purpose string." : "No API that needs a purpose string was found."));
|
|
96
|
+
for (const p of scan.placeholderKeys)
|
|
97
|
+
out.push(finding("plist.placeholder", "fail", `${p.key.replace(/[^\w.-]/g, "").slice(0, 60)} holds a sample value.`, p.where));
|
|
98
|
+
if (!scan.placeholderKeys.length)
|
|
99
|
+
out.push(finding("plist.placeholder", "pass", "No sample values found."));
|
|
100
|
+
return out;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* File and key names come from a folder that may have been cloned from anyone,
|
|
104
|
+
* and an agent reads this report. One line each, printable, and short.
|
|
105
|
+
*/
|
|
106
|
+
const printable = (f) => ({
|
|
107
|
+
...f,
|
|
108
|
+
saw: f.saw.replace(/[^\x20-\x7e]/g, "").slice(0, 400),
|
|
109
|
+
scope: f.scope?.replace(/[^\x20-\x7e]/g, "").slice(0, 120),
|
|
110
|
+
});
|
|
111
|
+
/** The project rules, or one line each saying why they did not run. */
|
|
112
|
+
function checkProject(project) {
|
|
113
|
+
if (!project.provided)
|
|
114
|
+
return [finding("manifest.present", "skipped", "Pass project_path to check privacy manifests and purpose strings.", "project.*")];
|
|
115
|
+
// The caller asked for these rules and they did not run, so it is not clean.
|
|
116
|
+
if ("error" in project)
|
|
117
|
+
return [finding("manifest.present", "unknown", `Project rules did not run. ${project.error}`, "project.*")];
|
|
118
|
+
const scan = project.scan;
|
|
119
|
+
const out = [...checkManifests(scan), ...checkSdks(scan), ...checkPlist(scan)];
|
|
120
|
+
if (scan.truncated) {
|
|
121
|
+
// A partial scan cannot vouch for what it did not read.
|
|
122
|
+
for (const rule of PROJECT_RULES)
|
|
123
|
+
out.push(finding(rule, "unknown", `The scan was partial: ${scan.truncated}.`));
|
|
124
|
+
}
|
|
125
|
+
if (scan.otherApp)
|
|
126
|
+
out.push(finding("manifest.present", "unknown", scan.otherApp, "project.*"));
|
|
127
|
+
if (scan.plistIssue)
|
|
128
|
+
out.push(finding("plist.purpose", "unknown", scan.plistIssue));
|
|
129
|
+
if (scan.binaryUnreadable)
|
|
130
|
+
out.push(finding("manifest.reasons", "unknown", scan.binaryUnreadable, "built app"));
|
|
131
|
+
if (scan.binarySkipped)
|
|
132
|
+
out.push(finding("manifest.reasons", "skipped", scan.binarySkipped, "built app"));
|
|
133
|
+
return out.map(printable);
|
|
134
|
+
}
|
|
135
|
+
/** Data types declared in the manifests, for the App Privacy page Apple's API cannot reach. */
|
|
136
|
+
function declaredDataTypes(project) {
|
|
137
|
+
// Another app's data types would make a wrong checklist for this one.
|
|
138
|
+
if (!project.provided || !("scan" in project) || project.scan.otherApp)
|
|
139
|
+
return [];
|
|
140
|
+
const types = new Set();
|
|
141
|
+
for (const m of project.scan.manifests) {
|
|
142
|
+
if (m.parsed.ok)
|
|
143
|
+
m.parsed.value.collectedDataTypes.forEach((t) => types.add(t.replace("NSPrivacyCollectedDataType", "")));
|
|
144
|
+
}
|
|
145
|
+
return [...types].sort();
|
|
146
|
+
}
|
|
147
|
+
//# sourceMappingURL=project.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project.js","sourceRoot":"","sources":["../../../src/preflight/checks/project.ts"],"names":[],"mappings":";;AAkGA,oCAeC;AAGD,8CAQC;AA5HD,sDAA4F;AAI5F,MAAM,OAAO,GAAG,CAAC,IAAY,EAAE,MAAc,EAAE,GAAW,EAAE,KAAc,EAAW,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,CAAC;AAEvH,MAAM,aAAa,GAAa,CAAC,kBAAkB,EAAE,kBAAkB,EAAE,cAAc,EAAE,eAAe,EAAE,mBAAmB,CAAC,CAAC;AAE/H,MAAM,aAAa,GAAG,CAAC,CAAS,EAAE,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CAAC,CAAC,MAAM,CAAC,EAAE;YAAE,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,4BAA4B,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;IAC5H,CAAC;IACD,OAAO,CAAC,GAAG,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC;AAC3B,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { BuildInfo, Finding, Part, ProjectInput, RecordSnapshot, ScreenshotSet, VersionSnapshot } from "../types.js";
|
|
2
|
+
/** Apple's own rejections. DEVELOPER_REJECTED is the developer withdrawing it, which has no reasons to read. */
|
|
3
|
+
export declare const REJECTED_STATES: ReadonlySet<string>;
|
|
4
|
+
/** True or false when something says so, and null when nothing does. */
|
|
5
|
+
export declare function iPadEvidence(build: Part<BuildInfo | null>, project: ProjectInput, sets: ScreenshotSet[]): {
|
|
6
|
+
runsOnIpad: boolean | null;
|
|
7
|
+
how: string;
|
|
8
|
+
};
|
|
9
|
+
/** True at or above the SDK that brings the Duo rule; null when the number will not parse. */
|
|
10
|
+
export declare function isDuoSdk(sdkBuild: string | null): boolean | null;
|
|
11
|
+
/** Rules for one version of the app. */
|
|
12
|
+
export declare function checkVersion(v: VersionSnapshot, primaryLocale: string | null, project: ProjectInput, today: string, appId: string): Finding[];
|
|
13
|
+
/** Rules that belong to the app, whichever version is being looked at. */
|
|
14
|
+
export declare function checkApp(record: RecordSnapshot): Finding[];
|
|
15
|
+
/** The Terms of Use links a description holds. */
|
|
16
|
+
export declare function termsLinksIn(description: string | null): string[];
|
|
17
|
+
export declare function checkSubscriptionTerms(record: RecordSnapshot, v: VersionSnapshot): Finding[];
|
|
18
|
+
//# sourceMappingURL=record.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"record.d.ts","sourceRoot":"","sources":["../../../src/preflight/checks/record.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,cAAc,EAAE,aAAa,EAA+B,eAAe,EAAE,MAAM,aAAa,CAAC;AAEvJ,gHAAgH;AAChH,eAAO,MAAM,eAAe,EAAE,WAAW,CAAC,MAAM,CAAgE,CAAC;AA4CjH,wEAAwE;AACxE,wBAAgB,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,aAAa,EAAE,GAAG;IAAE,UAAU,EAAE,OAAO,GAAG,IAAI,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAerJ;AAED,8FAA8F;AAC9F,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,GAAG,IAAI,CAKhE;AAmHD,wCAAwC;AACxC,wBAAgB,YAAY,CAAC,CAAC,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,GAAG,IAAI,EAAE,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,EAAE,CAqB7I;AAOD,0EAA0E;AAC1E,wBAAgB,QAAQ,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,EAAE,CAqC1D;AAED,kDAAkD;AAClD,wBAAgB,YAAY,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,EAAE,CAUjE;AAED,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,cAAc,EAAE,CAAC,EAAE,eAAe,GAAG,OAAO,EAAE,CAc5F"}
|