Do you want to work on this issue?
You can request for a bounty in order to promote it!
"Operation not permitted" error while scanning installed packages in MacOS #1804
satyam235 posted onGitHub
What did you do? (required. The issue will be closed when not provided.)
I tried running a local MacOS Scan, which resulted in an "Operation not permitted" error while scanning for scanned packages
What did you expect to happen?
Vuls should scan for installed packages and complete the scan on mac.
What happened instead?
It resulted into an exception being raised.
- Current Output
time="Dec 6 16:35:10" level=error msg="Error on localhost, err: [Failed to scan installed packages. err: github.com/future-architect/vuls/scanner.(*macos).scanPackages /home/runner/work/vuls/vuls/scanner/macos.go:139
- Failed to exec: execResult: servername:
cmd: find -L /Applications /System/Applications -type f -path ".app/Contents/Info.plist" -not -path ".app/*/.app/"
exitstatus: 1
stdout: /Applications/SSH Client.app/Contents/Info.plist
/Applications/Adobe Acrobat Reader.app/Contents/Info.plist
/Applications/Microsoft Teams classic.app/Contents/Info.plist
/Applications/Visual Studio Code.app/Contents/Info.plist
/Applications/OWASP ZAP.app/Contents/Info.plist
/Applications/VLC.app/Contents/Info.plist
/Applications/Sourcetree.app/Contents/Info.plist
/Applications/TeamViewer.app/Contents/Info.plist
/Applications/Termius.app/Contents/Info.plist
/Applications/Zscaler/UninstallApplication.app/Contents/Info.plist
/Applications/Zscaler/Zscaler.app/Contents/Info.plist
/Applications/Zscaler/RevertZcc/Zscaler-osx-4.1.0.152-installer.app/Contents/Info.plist
/Applications/Remove Netskope Client.app/Contents/Info.plist
/Applications/Google Chrome.app/Contents/Info.plist
/Applications/Zenmap.app/Contents/Info.plist
/Applications/Cortex XDR.app/Contents/Info.plist
/Applications/Numbers.app/Contents/Info.plist
/Applications/VMware Fusion.app/Contents/Info.plist
/Applications/CocoaPods.app/Contents/Info.plist
/Applications/Xcode.app/Contents/Info.plist
/Applications/Microsoft Remote Desktop.app/Contents/Info.plist
/Applications/OneDrive.app/Contents/Info.plist
/Applications/SolsticeClientMac_V2A0ABB0B25PCF6CI6B0F9BC9.app/Contents/Info.plist
/Applications/iMovie.app/Contents/Info.plist
/Applications/MirrorOp.app/Contents/Info.plist
/Applications/Microsoft Word.app/Contents/Info.plist
/Applications/Zscaler.app/Contents/Info.plist
/Applications/Docker.app/Contents/Info.plist
/Applications/Charles.app/Contents/Info.plist
/Applications/Safari.app/Contents/Info.plist
/Applications/Microsoft Excel.app/Contents/Info.plist
/Applications/Unzip - RAR ZIP 7Z Unarchiver.app/Contents/Info.plist
/Applications/Utilities/Nudge.app/Contents/Info.plist
/Applications/UTM.app/Contents/Info.plist
/Applications/zoom.us.app/Contents/Info.plist
/Applications/BlueJeans.app/Contents/Info.plist
/Applications/Microsoft Outlook.app/Contents/Info.plist
/Applications/Keynote.app/Contents/Info.plist
/Applications/Burp Suite Professional.app/Contents/Info.plist
/Applications/Pages.app/Contents/Info.plist
/Applications/GarageBand.app/Contents/Info.plist
/Applications/.Microsoft Excel.app.installBackup/Contents/SharedSupport/Microsoft.Mashup.Container.app/Contents/Info.plist
/Applications/.Microsoft Excel.app.installBackup/Contents/SharedSupport/Microsoft Error Reporting.app/Contents/Info.plist
/Applications/Microsoft OneNote.app/Contents/Info.plist
/Applications/Chromium.app/Contents/Info.plist
/Applications/Skype.app/Contents/Info.plist
/Applications/Android Studio.app/Contents/Info.plist
/Applications/Firefox.app/Contents/Info.plist
/Applications/WinZip.app/Contents/Info.plist
/Applications/Postman.app/Contents/Info.plist
/Applications/Microsoft PowerPoint.app/Contents/Info.plist
/Applications/TriggerClientUI.app/Contents/Info.plist
/Applications/Netskope Client.app/Contents/Info.plist
/Applications/Turbo VPN.app/Contents/Info.plist
/Applications/Lightshot Screenshot.app/Contents/Info.plist
/Applications/Sublime Text.app/Contents/Info.plist
/System/Applications/Siri.app/Contents/Info.plist
/System/Applications/Music.app/Contents/Info.plist
/System/Applications/FindMy.app/Contents/Info.plist
/System/Applications/QuickTime Player.app/Contents/Info.plist
/System/Applications/Chess.app/Contents/Info.plist
/System/Applications/Photo Booth.app/Contents/Info.plist
/System/Applications/Books.app/Contents/Info.plist
/System/Applications/Weather.app/Contents/Info.plist
/System/Applications/Notes.app/Contents/Info.plist
/System/Applications/Image Capture.app/Contents/Info.plist
/System/Applications/Home.app/Contents/Info.plist
/System/Applications/Freeform.app/Contents/Info.plist
/System/Applications/Preview.app/Contents/Info.plist
/System/Applications/News.app/Contents/Info.plist
/System/Applications/TextEdit.app/Contents/Info.plist
/System/Applications/Podcasts.app/Contents/Info.plist
/System/Applications/System Settings.app/Contents/Info.plist
/System/Applications/TV.app/Contents/Info.plist
/System/Applications/Stocks.app/Contents/Info.plist
/System/Applications/Mail.app/Contents/Info.plist
/System/Applications/Dictionary.app/Contents/Info.plist
/System/Applications/Contacts.app/Contents/Info.plist
/System/Applications/Time Machine.app/Contents/Info.plist
/System/Applications/Utilities/AirPort Utility.app/Contents/Info.plist
/System/Applications/Utilities/VoiceOver Utility.app/Contents/Info.plist
/System/Applications/Utilities/Terminal.app/Contents/Info.plist
/System/Applications/Utilities/Activity Monitor.app/Contents/Info.plist
/System/Applications/Utilities/Screenshot.app/Contents/Info.plist
/System/Applications/Utilities/Grapher.app/Contents/Info.plist
/System/Applications/Utilities/Audio MIDI Setup.app/Contents/Info.plist
/System/Applications/Utilities/Screen Sharing.app/Contents/Info.plist
/System/Applications/Utilities/System Information.app/Contents/Info.plist
/System/Applications/Utilities/Print Center.app/Contents/Info.plist
/System/Applications/Utilities/Keychain Access.app/Contents/Info.plist
/System/Applications/Utilities/Migration Assistant.app/Contents/Info.plist
/System/Applications/Utilities/Script Editor.app/Contents/Info.plist
/System/Applications/Utilities/ColorSync Utility.app/Contents/Info.plist
/System/Applications/Utilities/Console.app/Contents/Info.plist
/System/Applications/Utilities/Disk Utility.app/Contents/Info.plist
/System/Applications/Utilities/Bluetooth File Exchange.app/Contents/Info.plist
/System/Applications/Utilities/Boot Camp Assistant.app/Contents/Info.plist
/System/Applications/Utilities/Digital Color Meter.app/Contents/Info.plist
/System/Applications/Font Book.app/Contents/Info.plist
/System/Applications/FaceTime.app/Contents/Info.plist
/System/Applications/Shortcuts.app/Contents/Info.plist
/System/Applications/Maps.app/Contents/Info.plist
/System/Applications/Mission Control.app/Contents/Info.plist
/System/Applications/Stickies.app/Contents/Info.plist
/System/Applications/Photos.app/Contents/Info.plist
/System/Applications/Messages.app/Contents/Info.plist
/System/Applications/Calculator.app/Contents/Info.plist
/System/Applications/VoiceMemos.app/Contents/Info.plist
/System/Applications/Launchpad.app/Contents/Info.plist
/System/Applications/Reminders.app/Contents/Info.plist
/System/Applications/App Store.app/Contents/Info.plist
/System/Applications/Clock.app/Contents/Info.plist
/System/Applications/Automator.app/Contents/Info.plist
/System/Applications/Calendar.app/Contents/Info.plist
stderr: find: /Applications/Cortex XDR.app/Contents/_CodeSignature: Operation not permitted
find: /Applications/Cortex XDR.app/Contents/MacOS: Operation not permitted
find: /Applications/Cortex XDR.app/Contents/Library: Operation not permitted
err: exit status 1:
[github.com/future-architect/vuls/scanner.(macos).scanInstalledPackages](http://github.com/future-architect/vuls/scanner.(*macos).scanInstalledPackages)
/home/runner/work/vuls/vuls/scanner/macos.go:149]"
Please re-run the command using -debug
and provide the output below.
Steps to reproduce the behaviour
Run a local mac scan with few applications that only admin can access.
Configuration (MUST fill this out):
Mac Ventura OS
Go version (
go version
):Go environment (
go env
):Vuls environment: Vuls : V0.24.6
Hash : ____
To check the commit hash of HEAD $ vuls -v
or
$ cd $GOPATH/src/github.com/future-architect/vuls $ git rev-parse --short HEAD
- config.toml: [servers]
[servers.localhost] host = "localhost" port = "local" scanMode = [ "fast",]
- command: vuls scan