macadmins / osquery-extension

An osquery extension for endpoint engineers
Apache License 2.0
97 stars 32 forks source link

ensure cached DEP status is read if a check was made in the last 24 hours #37

Closed roperzh closed 1 year ago

roperzh commented 1 year ago

the condition to evaluate if the cached value should be read was wrong, causing the mdm table to invoke profiles show --type enrollment almost every time it was called.

this changeset fixes the condition and adds tests for this specific scenario.