Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

osquery

$ osqueryi Foundation Low Risk
osquery · Security & Secrets · Apache-2.0 OR GPL-2.0 · macos / linux / windows

osquery (osqueryi) exposes operating system state—processes, open sockets, kernel extensions, users, installed packages, and certificates—as SQLite virtual tables. Passing --json with a SQL SELECT query gives agents strictly read-only, field-filtered endpoint telemetry with zero mutation risk.

FCRS-1.0 Score
94 /100
Excellent
Medium Confidence
Zero-Friction Install
brew install osquery
CLI vs MCP Decision CLI Only

osqueryi --json queries local OS tables in milliseconds via SQL with built-in column selection, needing no MCP intermediary.

Agent-Readiness Checklist

✓ JSON Output
✓ Field Filtering
✓ Non-Interactive
— Dry-Run
✓ Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 24 / 25

Single-argument SQL execution with --json / --csv, SQL SELECT field filtering, and self-describing osquery_registry / .schema tables.

  • Native --json and SQL column projection
  • Self-describing osquery_registry and PRAGMA table_info()
Trust & Safety 24 / 25

Strictly read-only virtual SQL tables with zero OS mutation capabilities; note unbounded file table queries can consume CPU/IO.

  • Read-only virtual table engine
Setup & Portability 14 / 15

Official packages via brew install osquery and osquery.io installers across macOS, Linux, and Windows.

  • Multi-OS native builds at osquery.io/downloads
Utility & Efficiency 14 / 15

Replaces dozens of ad-hoc ps, lsof, netstat, and package-manager parsers with one typed SQL JSON interface.

  • Unified SQL over 250+ OS telemetry tables
Maintenance & Lineage 9 / 10

Linux Foundation project originally created by Facebook with strong enterprise adoption.

  • Linux Foundation / osquery repository
Docs & Verifiability 9 / 10

Searchable schema docs per OS and version on osquery.io and ReadTheDocs.

  • Schema reference at osquery.io/schema

Security, Auth & Guardrails

Auth Modes
No Auth
Credential Storage

None required; reads local OS APIs and procfs/sysfs tables.

Side Effects
Read-Only
Cost & Quotas

100% free, offline, and open-source (Apache-2.0 OR GPL-2.0).

Copyable Guardrail for CLAUDE.md / AGENTS.md
# osquery Agent Rules
- Always pass `--json` and a SQL query argument so `osqueryi` exits immediately instead of opening an interactive REPL.
- Use explicit `SELECT` columns and `LIMIT` clauses to avoid scanning huge `file` or `hash` tables unboundedly.

Agent-Ready Command Recipes

Safe Read-Only Queries

Query listening network ports as JSON
osqueryi --json "SELECT lp.pid, p.name, lp.port, lp.address FROM listening_ports lp JOIN processes p USING (pid) WHERE lp.port > 0 LIMIT 25;"

Joins listening_ports and processes in a single read-only SQL query and emits JSON rows.

Introspect available osquery tables
osqueryi --json "SELECT name FROM osquery_registry WHERE registry = 'table' AND active = 1 ORDER BY name;"

Discovers active virtual tables on the current OS for self-describing agent queries.

Strengths for Agents

  • + Unified read-only SQL interface with --json across processes, sockets, users, packages, and certs.
  • + Self-describing schema (PRAGMA table_info, osquery_registry) lets agents discover fields dynamically.

Caveats & Pitfalls

  • ! Invoking osqueryi with no query argument enters an interactive REPL.
  • ! Certain tables require root/sudo for full visibility (e.g., other users' sockets) and unbounded file queries can be slow.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI