osquery With Every Scheduled Query Checked First

osquery from its own repository, the signing key pinned by fingerprint. Its config check reads JSON only, so each scheduled query is prepared by osqueryi first, and the check runs off the daemon's database, whose lock would otherwise refuse every later change. The live test creates an account and sees the schedule log it as added. Original role, live-tested on Rocky Linux 10.

ansibleSecurity & Secrets

Verification

Live-tested

Really deployed to a container sandbox, proven idempotent (a second run changes nothing), verified against the role’s assertions, then torn down.

Conformance

  • Static validation (yamllint · ansible-lint)

Provenance

  • SHA-256 checksum
  • Signature (pending)

Functional

  • Live-tested - applied, verified, destroyed

Last verified 2026-10-02 · podman 4.9.3 · ansible 2.21.4 · how we verify

Cite it in your README

badge · attribution

Paste this beside the module in the repository that uses it. The badge is rendered from this artifact's verification record, so it reads live-tested because the record says so, and the link lands on this page.

README.md, GitLab, Gitea
[![IaC Bazaar: live-tested](https://www.iac-bazaar.com/api/artifacts/ansible-osquery/badge)](https://www.iac-bazaar.com/catalog/ansible-osquery?utm_source=syndication&utm_medium=readme&utm_campaign=artifact)

Ansible role 1.0.0, live-tested on IaC Bazaar: [osquery With Every Scheduled Query Checked First](https://www.iac-bazaar.com/catalog/ansible-osquery?utm_source=syndication&utm_medium=readme&utm_campaign=artifact)

```yaml
# osquery With Every Scheduled Query Checked First: https://www.iac-bazaar.com/catalog/ansible-osquery (download from your IaC Bazaar account)
```

Preview:IaC Bazaar: live-tested

Documentation

osquery

osquery from its own repository with the signing key pinned by fingerprint: osqueryd on a schedule that sees new local accounts within a minute and keeps an inventory of listening ports, sudoers, crontabs, packages and SUID binaries, logging to rotated files only root can read. Original role for EL 10, live-tested with podman on Rocky Linux 10.

A pinned version from a pinned key. The role imports osquery's signing key only if its fingerprint is 1484120AC4E9F8A1A577AEEE97A80C63C9D8B80B (RSA 4096), adds the vendor's repository with gpgcheck on, and installs the version in osquery_version; the live test reads the installed package's signature. The key imports cleanly under EL 10's crypto policy (measured).

osqueryd has no port. It answers nothing over the network, so instead of a health check the role watches the unit for about twelve seconds after start and requires ONE process throughout - a crash and a restart change the PID.

osqueryd checks JSON, not SQL. osqueryd --config_check passed a schedule containing SELEC 1 (measured). The role prepares every scheduled query with osqueryi before the configuration lands - it refuses a syntax error, an unknown column and an unknown table (measured) - and then checks the JSON as well. That check runs with --disable_database: without it, --config_check opens the daemon's RocksDB store, and while osqueryd runs it fails on the store's lock (measured) - every later change would be refused.

A misspelt flag is refused, not ignored. osqueryd ignores a flag it does not know in its flags file - measured, it ran with --no_such_flag=1 there - but refuses the same flag on its command line ("unknown command line flag", measured). The role therefore checks the flags file by handing its lines to osqueryd as command-line flags before the file lands.

Proven by a detection. The default schedule reads local accounts every 60 seconds; the live test creates an account and waits for osqueryd to log it as added, runs osqueryi, re-runs the configuration check while the daemon is running (what the role's validate does on a change), and reads the package signature and the results log's mode.

License

Commercial - IaC Bazaar EULA. (c) IaC Bazaar.

Usage code & full reference need an account

The complete copy-paste usage, the full input/output reference, and operational notes are free with an account - shown here and bundled in the download. Sign in and this section fills in.

  • Variables
  • Test

Related modules

Live-tested

ansible-suricata

Suricata from EPEL watching the default-route interface as the suricata user, ET Open fetched at install and refreshed daily, plus a canary rule that proves the sensor is alive. A root-run check left root-owned logs and a daemon recording nothing; the role prevents it. The live test raises the canary alert while a second lookup is logged, not alerted. Original role, live-tested on Rocky Linux 10.

View module
Live-tested

ansible-aide

AIDE from AppStream on EL 10: a watched tree, a baseline database built once, and the oneshot unit and timer the package does not ship. The live test passes on an unchanged host, FAILS when a file appears inside a watched path and names it, ignores one inside an excluded path, and passes again once the change is gone. Original role, live-tested on Rocky Linux 10.

View module
Live-tested

ansible-389-ds

389 Directory Server from AppStream. A fresh instance listens on every interface and lets anonymous clients read the tree; this role binds both listeners to loopback and limits anonymous clients to the rootDSE. The live test adds a user who binds, sees a wrong password and an anonymous search refused, and reads the LDAPS certificate. Original role, live-tested on Rocky Linux 10.

View module
Live-tested

ansible-authelia

Authelia from the upstream release (sha256-verified) as a hardened system service on loopback with file users and sqlite; its secrets are generated once on the host and reach the service as AUTHELIA_*_FILE variables. The live test hashes a password with Authelia's hasher, logs in, sees a wrong password refused and an anonymous visitor sent to the portal. Original role, live-tested on Rocky 10.

View module
Live-tested

ansible-bandit

bandit on EL 10 from PyPI into a venv of its own with a link in the PATH; the live test runs pip check, then scans a module that passes a string to subprocess.call with shell=True (B602, High, exit 1) and a clean module (exit 0). Pinned. Original role, live-tested on Rocky Linux 10.

View module
Live-tested

ansible-boundary

boundary on EL 10 from releases.hashicorp.com; SHA256SUMS is signature-checked against HashiCorp's key before get_url trusts it, the live test re-checks both, then runs authenticate against a dead address ('connection refused') and database init with a throwaway config (parsed, root key loaded, then the database refused). Pinned. Original role, live-tested on Rocky Linux 10.

View module