Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Apple 2024 will review the App's privacy manifests in the spring, and any apps that don't submit a privacy list may be called back. For now, the privacy list is broken down by component, to facilitate the maintenance of component privacy, cocoapods-privacy is developed for management. Click to view details on Apple
As name as,cocoapods-privacy is a plugin for privacy manifests, and focus on cocoapods!
$ gem install cocoapods-privacy
First of all, you must set a json config to cocoapods-privacy, this is a defalut config.json
$ pod privacy config https://raw.githubusercontent.com/ymoyao/cocoapods-privacy/main/resources/config.json
There has 3 keys in defalut config, defalut rule is :To exclude retrieval a component that git source contains certain ‘github.com’ keywords
"source.white.list": [],
"source.black.list": ["github.com"],
"api.template.url": "https://raw.githubusercontent.com/ymoyao/cocoapods-privacy/main/resources/NSPrivacyAccessedAPITypes.plist"
If your needs are not met, you can custom! For example, there has some components,and it‘s your local config
"source.white.list": ["https://github.com/ReactiveCocoa/ReactiveObjC.git","git.yourserver.com","git.otherserver.com"],
"source.black.list": ["github.com","https://github.com/AFNetworking/AFNetworking.git"],
"api.template.url": "https://raw.githubusercontent.com/ymoyao/cocoapods-privacy/main/resources/NSPrivacyAccessedAPITypes.plist"
https://github.com/AFNetworking/AFNetworking.git ❌ (it's in 'github.com' black list)
https://github.com/ReactiveCocoa/ReactiveObjC.git ❌ (it's in 'github.com' black list, although also on the white list,but the blacklist priority is high when conflict)
https://git.yourserver.com/xxx/xxxx.git ✅
https://git.yourserver.com/mmm/mmm.git ✅
https://git.otherserver.com/ssss/ssss.git ✅
https://git.yourserver.com/AFNetworking/AFNetworking.git ✅
After custom,you just update config by local like this
$ pod privacy config /yourfilepath/config.json
In a word, if you define both white and black lists ,final search range: white list minus black list, and empty white list means all!
$ pod privacy spec [podspec_file_path]
This command will auto create privacy file, and search the path of podspec' source_files' define relate to NSPrivacyAccessedAPITypes, finaly, write to PrivacyInfo.xcprivacy file. if your component has much subspec, all subspec that define ‘source_files’ will create PrivacyInfo.xcprivacy, and auto modify .podspec link .xcprivacy to 'resource_bundle' key. For example
Pod::Spec.new do |s|
s.name = 'Demo'
...
s.source_files = 'xxxx'
s.subspec 'idfa' do |sp|
sp.source_files = 'xxxxx'
end
s.subspec 'noidfa' do |sp|
end
end
Pod::Spec.new do |s|
s.name = 'Demo'
...
s.source_files = 'xxxx'
s.resource_bundle = {"Demo.privacy"=>"Pod/Privacy/Demo/PrivacyInfo.xcprivacy"}
s.subspec 'idfa' do |sp|
sp.source_files = 'xxxxx'
sp.resource_bundle = {"Demo.idfa.privacy"=>"Pod/Privacy/Demo.idfa/PrivacyInfo.xcprivacy"}
end
s.subspec 'noidfa' do |sp|
end
end
$ pod install --privacy
or
$ pod privacy install
After command, a PrivacyInfo.xcprivacy will create to you project Resources if empty. and it will search component that configuration files allow and do not have their own privacy manifest file.
The plugin is focus on NSPrivacyAccessedAPITypes and automatically search and create workflow. you should manager NSPrivacyCollectedDataTypes by yourself!
Could you please consider giving our repository a star🌟🌟🌟? It would mean a lot to us and help our project gain more visibility. Thank you!
FAQs
Unknown package
We found that cocoapods-privacy demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.