Skip to content

Commit

Permalink
Version 0.0.11
Browse files Browse the repository at this point in the history
* Ability to parse Xcode workspaces.
* Improved detection of third party SDKs.
* Improved behavior on spinner logic.
* Interactive prompts to generate the `PrivacyInfo.xcprivacy` file based
on the detected required reason APIs and user responses.
  • Loading branch information
stelabouras committed Apr 16, 2024
1 parent 5dde7d9 commit 941a06f
Show file tree
Hide file tree
Showing 6 changed files with 550 additions and 104 deletions.
25 changes: 15 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@
<img src="https://img.shields.io/badge/macOS_v13%2B-_?style=flat&logo=apple&label=platform">
</p>

Privacy Manifest CLI tool parses an Xcode project or a Swift Package and
attempts to locate calls to Apple's required reason APIs [^1] and detect
Privacy Manifest CLI tool parses an Xcode project/workspace or a Swift Package
and attempts to locate calls to Apple's required reason APIs [^1] and detect
privacy collected data frameworks [^2].

The tool detects and parses the source files of the project as well as the
frameworks added in the Xcode project's Build Phase or in the Swift Package
dependencies. It does not perform any sort of analysis beyond the simple
dependencies. It also detects any frameworks / static libraries and checks if
they are included in the third-party SDK list that Apple has provided [^3].

The tool does not perform any sort of analysis beyond the simple
line-by-line check for the existence of the method calls or symbols that
Apple has already published.

Expand All @@ -32,7 +35,7 @@ After installing the tool to the `/usr/local/bin` directory, you can invoke it
from any directory using the following command:

```
privacy-manifest analyze --project path/to/project --reveal-occurrences
privacy-manifest analyze --project path/to/project --reveal-occurrences --output path
```

The `path/to/project` can be a relative or an absolute path to the `.xcodeproj`
Expand All @@ -43,6 +46,10 @@ regarding the occurrences of the required reason APIs / privacy collected data
frameworks in your codebase, highlighting the file and the line where a call has
been detected.

The `--output` flag is optional and if specified, a `PrivacyInfo.xcprivacy`
property list file will be generated to that directory based on the detected
required reason APIs and from the responses of the user.

## Example

Below is the console output from the [VLC iOS OSS](https://github.com/videolan/vlc-ios).
Expand All @@ -51,10 +58,7 @@ Below is the console output from the [VLC iOS OSS](https://github.com/videolan/v

## Future implementations

There are several ideas that can be explored here, beyond the typical performance
optimizations: The tool can output the report to HTML, or attempt to generate
an initial privacy manifest based on the user's input (maybe it can be more
interactive).
The tool can output the occurrences report to HTML for better readability.

On top of that, the list of third-party crash frameworks can be updated so that
it can inform the user when such framework is detected (there is a related TODO
Expand All @@ -69,12 +73,13 @@ an unused piece of code. Furthermore, there might also be cases where something
has not been included in the parsing process.

This tool gives you a high-level overview of the different required reason APIs
and privacy collected data frameworks your project / package uses, so always do
your own research after using this tool, to confirm the findings.
and privacy collected data frameworks your project, workspace or package uses,
so always do your own research after using this tool, to confirm the findings.

## License

Licensed under Apache License 2.0, see [LICENSE](LICENSE) file.

[^1]: https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api
[^2]: https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_data_use_in_privacy_manifests).
[^3]: https://developer.apple.com/support/third-party-SDK-requirements/
Loading

0 comments on commit 941a06f

Please sign in to comment.