Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Privacy Report #457

Merged
merged 8 commits into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions KSCrash.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ Pod::Spec.new do |s|
s.xcconfig = { 'GCC_ENABLE_CPP_EXCEPTIONS' => 'YES' }
s.default_subspecs = 'Installations'

s.resource_bundles = { 'KSCrashPrivacy' => 'Source/KSCrash/Recording/PrivacyInfo.xcprivacy' }

s.subspec 'Recording' do |recording|
recording.compiler_flags = '-fno-optimize-sibling-calls'
recording.source_files = 'Source/KSCrash/Recording/**/*.{h,m,mm,c,cpp}',
Expand Down
5 changes: 4 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.1
// swift-tools-version:5.3

import PackageDescription

Expand Down Expand Up @@ -43,6 +43,9 @@ let package = Package(
"Monitors",
"Tools"
],
resources: [
.copy("PrivacyInfo.xcprivacy")
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For now, I added a kind of "monilit" privacy report in this module, since SPM modules need work. It shows the data collected in all KSCrash submodules.

],
publicHeadersPath: ".",
cxxSettings: [
.headerSearchPath("Tools"),
Expand Down
134 changes: 134 additions & 0 deletions [email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
// swift-tools-version:5.1

import PackageDescription

let package = Package(
name: "KSCrash",
products: [
.library(
name: "KSCrash",
targets: [
"KSCrash/Installations",
"KSCrash/Recording",
"KSCrash/Recording/Monitors",
"KSCrash/Recording/Tools",
"KSCrash/Reporting/Filters",
"KSCrash/Reporting/Filters/Tools",
"KSCrash/Reporting/Tools",
"KSCrash/Reporting/Sinks",
"KSCrash/swift/Basic"
]
)
],
dependencies: [
],
targets: [
.target(
name: "KSCrash/Installations",
path: "Source/KSCrash/Installations",
publicHeadersPath: ".",
cxxSettings: [
.headerSearchPath("../Recording"),
.headerSearchPath("../Recording/Monitors"),
.headerSearchPath("../Recording/Tools"),
.headerSearchPath("../Reporting/Filters"),
.headerSearchPath("../Reporting/Sinks"),
.headerSearchPath("../Reporting/Tools"),
]
),
.target(
name: "KSCrash/Recording",
path: "Source/KSCrash/Recording",
exclude: [
"Monitors",
"Tools"
],
publicHeadersPath: ".",
cxxSettings: [
.headerSearchPath("Tools"),
.headerSearchPath("Monitors"),
.headerSearchPath("../Reporting/Filters")
]
),
.target(
name: "KSCrash/Recording/Monitors",
path: "Source/KSCrash/Recording/Monitors",
publicHeadersPath: ".",
cxxSettings: [
.define("GCC_ENABLE_CPP_EXCEPTIONS", to: "YES"),
.headerSearchPath(".."),
.headerSearchPath("../Tools"),
.headerSearchPath("../../Reporting/Filters")
]
),
.target(
name: "KSCrash/Recording/Tools",
path: "Source/KSCrash/Recording/Tools",
publicHeadersPath: ".",
cxxSettings: [
.headerSearchPath(".."),
.headerSearchPath("../../swift"),
.headerSearchPath("../../swift/Basic"),
.headerSearchPath("../../llvm/ADT"),
.headerSearchPath("../../llvm/Support"),
.headerSearchPath("../../llvm/Config")
]
),
.target(
name: "KSCrash/Reporting/Filters",
path: "Source/KSCrash/Reporting/Filters",
exclude: [
"Tools"
],
publicHeadersPath: ".",
cxxSettings: [
.headerSearchPath("Tools"),
.headerSearchPath("../../Recording"),
.headerSearchPath("../../Recording/Monitors"),
.headerSearchPath("../../Recording/Tools")
]
),
.target(
name: "KSCrash/Reporting/Filters/Tools",
path: "Source/KSCrash/Reporting/Filters/Tools",
publicHeadersPath: ".",
cxxSettings: [
.headerSearchPath("../../../Recording/Tools")
]
),
.target(
name: "KSCrash/Reporting/Tools",
path: "Source/KSCrash/Reporting/Tools",
publicHeadersPath: ".",
cxxSettings: [
.headerSearchPath("../../Recording"),
.headerSearchPath("../../Recording/Tools")
]
),
.target(
name: "KSCrash/Reporting/Sinks",
path: "Source/KSCrash/Reporting/Sinks",
publicHeadersPath: ".",
cxxSettings: [
.headerSearchPath("../Filters"),
.headerSearchPath("../Filters/Tools"),
.headerSearchPath("../Tools"),
.headerSearchPath("../../Recording"),
.headerSearchPath("../../Recording/Tools"),
.headerSearchPath("../../Recording/Monitors")
]
),
.target(
name: "KSCrash/swift/Basic",
path: "Source/KSCrash/swift/Basic",
publicHeadersPath: ".",
cxxSettings: [
.headerSearchPath(".."),
.headerSearchPath("../../llvm/ADT"),
.headerSearchPath("../../llvm/Config"),
.headerSearchPath("../../llvm/Support")
]
)
],
cxxLanguageStandard: .gnucxx11
)
88 changes: 88 additions & 0 deletions Source/KSCrash/Recording/PrivacyInfo.xcprivacy
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSPrivacyTracking</key>
<false/>
<key>NSPrivacyTrackingDomains</key>
<array/>
<key>NSPrivacyCollectedDataTypes</key>
<array>
<dict>
<key>NSPrivacyCollectedDataType</key>
<string>NSPrivacyCollectedDataTypeDeviceID</string>
<key>NSPrivacyCollectedDataTypeLinked</key>
<false/>
<key>NSPrivacyCollectedDataTypeTracking</key>
<false/>
<key>NSPrivacyCollectedDataTypePurposes</key>
<array>
<string>NSPrivacyCollectedDataTypePurposeAppFunctionality</string>
</array>
</dict>
<dict>
<key>NSPrivacyCollectedDataType</key>
<string>NSPrivacyCollectedDataTypePerformanceData</string>
<key>NSPrivacyCollectedDataTypeLinked</key>
<false/>
<key>NSPrivacyCollectedDataTypeTracking</key>
<false/>
<key>NSPrivacyCollectedDataTypePurposes</key>
<array>
<string>NSPrivacyCollectedDataTypePurposeAppFunctionality</string>
</array>
</dict>
<dict>
<key>NSPrivacyCollectedDataType</key>
<string>NSPrivacyCollectedDataTypeCrashData</string>
<key>NSPrivacyCollectedDataTypeLinked</key>
<false/>
<key>NSPrivacyCollectedDataTypeTracking</key>
<false/>
<key>NSPrivacyCollectedDataTypePurposes</key>
<array>
<string>NSPrivacyCollectedDataTypePurposeAppFunctionality</string>
</array>
</dict>
<dict>
<key>NSPrivacyCollectedDataType</key>
<string>NSPrivacyCollectedDataTypeOtherDiagnosticData</string>
<key>NSPrivacyCollectedDataTypeLinked</key>
<false/>
<key>NSPrivacyCollectedDataTypeTracking</key>
<false/>
<key>NSPrivacyCollectedDataTypePurposes</key>
<array>
<string>NSPrivacyCollectedDataTypePurposeAppFunctionality</string>
</array>
</dict>
</array>
<key>NSPrivacyAccessedAPITypes</key>
<array>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryUserDefaults</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>CA92.1</string>
</array>
</dict>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryDiskSpace</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>7D9E.1</string>
</array>
</dict>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>C617.1</string>
</array>
</dict>
</array>
</dict>
</plist>