Skip to content

Conversation

@jm2
Copy link
Contributor

@jm2 jm2 commented Oct 10, 2024

This change imports the remaining useful fields presented by the Win32_DeviceGuard WMI table.

@jm2 jm2 requested review from a team as code owners October 10, 2024 15:16
@jm2
Copy link
Contributor Author

jm2 commented Oct 16, 2024

Friendly ping for a reviewer :)

@directionless directionless changed the title Import remaining deviceguard WMI data. Add additional WMI data to deviceguard_status table Oct 17, 2024

std::vector<long> running_security_services;
data.GetVectorOfLongs("SecurityServicesRunning", running_security_services);
for (int i = 0; i < running_security_services.size(); i++) {
Copy link
Member

Choose a reason for hiding this comment

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

Why not boost::algorithm::join?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Would it actually be better in this case? We still have to iterate over the list and do a comparison to convert the integers to string values before adding them to the list, and this roughly matches the style done here previously. Granted I'm not a c++ expert and have little familiarity with boost, so if there's a fancy way to combine the conversion and concatenation I'm open to the idea.

Copy link
Member

Choose a reason for hiding this comment

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

I don't know. I guess if we have to the comparison anyhow, there's no win using a join :|

@directionless directionless merged commit 0f52cb5 into osquery:master Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants