diff --git a/docs/01-Using-Fleet/standard-query-library/standard-query-library.yml b/docs/01-Using-Fleet/standard-query-library/standard-query-library.yml index 1a04209f33..1b75ee63fc 100644 --- a/docs/01-Using-Fleet/standard-query-library/standard-query-library.yml +++ b/docs/01-Using-Fleet/standard-query-library/standard-query-library.yml @@ -597,3 +597,23 @@ spec: resolution: "Enroll device to MDM" platforms: macOS contributors: GuillaumeRoss +--- +apiVersion: v1 +kind: policy +spec: + name: Application is up to date or not present (macOS) + query: SELECT 1 WHERE EXISTS (SELECT 1 FROM apps a1 WHERE a1.bundle_identifier = 'com.electron.dockerdesktop' AND a1.bundle_short_version>='4.6.1') OR NOT EXISTS (SELECT 1 FROM apps a2 WHERE a2.bundle_identifier = 'com.electron.dockerdesktop'); + description: "Checks if the application (Docker Desktop example) is installed and up to date, or not installed. Fails if the application is installed and on a lower version. You can copy this query and replace the bundle_identifier and bundle_version values to apply the same type of policy to other applications." + resolution: "Update Docker or remove it if not used." + platforms: macOS + contributors: GuillaumeRoss +--- +apiVersion: v1 +kind: policy +spec: + name: SSH keys encrypted + query: SELECT 1 WHERE NOT EXISTS (SELECT 1 FROM users CROSS JOIN user_ssh_keys USING (uid) WHERE encrypted='0'); + description: "Required: osquery must have Full Disk Access. Policy passes if all keys are encrypted, including if no keys are present." + resolution: "Use this command to encrypt existing SSH keys by providing the path to the file: ssh-keygen -o -p -f /path/to/file" + platforms: macOS, Linux, Windows + contributors: GuillaumeRoss