feat: Detect macOS applications in ~/Library/Application Support - #54939
feat: Detect macOS applications in ~/Library/Application Support#54939pascalrobert wants to merge 1 commit into
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
|
recheck |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7e486c647d
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
|
||
| // Check if the user's Library/Application Support directory exists and is accessible | ||
| if info, err := os.Stat(userLibAppSupportPath); err == nil && info.IsDir() { | ||
| appDirs = append(appDirs, userAppDir{path: userLibAppSupportPath, username: username}) |
There was a problem hiding this comment.
Bound the recursive Application Support scan
When a user’s Application Support contains a large tree such as a Steam library or browser cache, adding its root here makes the existing WalkDir enumerate every entry on each collection, without pruning irrelevant directories or honoring request cancellation. Since check_system_probe_timeout defaults to one minute, sufficiently large profiles can time out the request and discard the entire software inventory while the system-probe continues scanning; restrict the search to bounded candidate subtrees or use indexed discovery.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
I understand this, but it would be really hard to target specific directories, or remove specific directories. I will let the Datadog team decide.
Some applications are stored in sub-directories of ~/Library/Application Support, for example: /Users/myuser/Library/Application Support/JetBrains/Daemon/bundles/current/jetbrainsd.app/Contents/Helpers/JetBrains.app /Users/myuser/Library/Application Support/Steam/steamapps/common/AoE2DE/Age Of Empires II.app Those applications are detected by osquery, and the Software Inventory in the DD agent should also detect them.
7e486c6 to
c99e4b8
Compare
Some applications are stored in sub-directories of ~/Library/Application Support, for example:
Those applications are detected by osquery, and the Software Inventory in the DD agent should also detect them.
What does this PR do?
It detects macOS applications in subdirectories of ~/Library/Application Support.
Some examples:
Motivation
To get a better inventory (and who wants Steam games on work computers, right?). osquery also detects those applications.
Describe how you validated your changes
Sadly, a build with Omnibus didn't work, I get an unrelated issue: