Skip to content

Conversation

@zwass
Copy link
Member

@zwass zwass commented Nov 27, 2025

Fixes #8718

Remove support for parsing Login Items from com.apple.loginitems.plist, keeping only traditional StartupItems from /System/Library/StartupItems/ and /Library/StartupItems/ directories.

This was causing CI failures after recent macOS updates (15.7.2), seemingly due to changes in plist parsing APIs. The functionality seems to be no longer supported, see
https://forums.macrumors.com/threads/lost-login-items.2073306/?post=25193038#post-25193038 https://eclecticlight.co/2022/06/21/how-helpers-are-changing-in-ventura/

Fixes osquery#8718

Remove support for parsing Login Items from com.apple.loginitems.plist,
keeping only traditional StartupItems from /System/Library/StartupItems/
and /Library/StartupItems/ directories.

This was causing CI failures after recent macOS updates (15.7.2),
seemingly due to changes in plist parsing APIs. The functionality
seems to be no longer supported, see
https://forums.macrumors.com/threads/lost-login-items.2073306/?post=25193038#post-25193038
https://eclecticlight.co/2022/06/21/how-helpers-are-changing-in-ventura/
@zwass zwass requested review from a team as code owners November 27, 2025 19:50
@zwass zwass added bug macOS CI/CD Anything about the Continuous Integration or Continuous Deployment tool used by the repository deprecation Relating to function deprecation labels Nov 27, 2025
@zwass zwass changed the title Remove Login Items plist support from startup_items table Fix CI: Remove Login Items plist support from startup_items table Dec 2, 2025
};

// Path (after /Users/foo) where the login items plist will be found
const std::string kLoginItemsPlistPath =
Copy link
Member

Choose a reason for hiding this comment

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

Hrm....

Reading the ElecticLight post, it talks about ~/Library/Application Support/com.apple.backgroundtaskmanagementagent/backgrounditems.btm which still exists on my machine, but the internet says maybe old.

Internet also says things are moving to /private/var/db/com.apple.backgroundtaskmanagement/BackgroundItems-v*.btm I have 3 versions, and it's not clear to me which is used.

Given our general target of older OSes, I wonder if it makes sense to leave this in, and make it parse whatever file paths we fine?

Copy link
Member

Choose a reason for hiding this comment

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

Oh, I see #8726 now. Let me review that

Copy link
Member

@directionless directionless left a comment

Choose a reason for hiding this comment

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

I'm not sure why we need this and 8726 -- this seems to be editing files 8726 simply removes. But I'm willing to approve it

@zwass zwass merged commit 3c97fb5 into osquery:master Dec 3, 2025
22 checks passed
@zwass
Copy link
Member Author

zwass commented Dec 3, 2025

In #8726 the startup_items.cpp file is renamed to startup_files.mm (and edited).

@zwass zwass deleted the remove-login-items branch December 3, 2025 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug CI/CD Anything about the Continuous Integration or Continuous Deployment tool used by the repository deprecation Relating to function deprecation macOS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

StartupItemsTests fails after macOS update

2 participants