Repository navigation
Add osquery results parser (JSON) - #38
Conversation
New OsqueryParser in ax-normalize. osquery's results log is NDJSON; each line carries query metadata (name, hostIdentifier, unixTime, action) plus result data in either a differential columns object (one result row) or a snapshot array (many result rows). We emit one row per result: metadata columns plus the result fields under a columns.<key> prefix (so a query column named name does not collide with the query name). osquery stringifies every column value, so those are type-coerced (pid "123" -> Int), which lets structural/dist read fleet-posture drift against a baseline snapshot. Detected by the hostIdentifier + (columns object | snapshot array) signature, registered before NDJSON so an osquery stream claims itself first. Claims no extension (the results log is generically *.log). Non-object / non-JSON lines are a clean Parse error. Mutation gate: 0 surviving mutants on the new file. The extensions() -> empty-slice mutant is a documented equivalent (same as the other signature-only parsers). Closes #14 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Warning Review limit reached
More reviews will be available in 34 minutes and 19 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Implements the osquery results plugin — issue #14.
What
osquery's results log is NDJSON. Each line carries query metadata (
name,hostIdentifier,unixTime,action) plus result data in either adifferential
columnsobject (one result row) or a snapshot array (manyresult rows).
OsqueryParseremits one row per result:columns.<key>prefix — so a query column namednamedoesn't collide with the queryname.osquery stringifies every column value, so those are type-coerced (
pid"123"→Int), which letsstructural/distread fleet-posture driftagainst a baseline snapshot (a new column value / field surfaces automatically).
Routing
hostIdentifier+ (columnsobject |snapshotarray)signature, registered before NDJSON so an osquery stream claims itself first.
*.log).Errors
Non-object / non-JSON lines are clean
AxError::Parse.Gates
fmt/clippy -D warnings/ full workspace tests green (both feature sets).osquery.rs. Theextensions()→empty-slice mutant is a documented equivalent (same as the other
signature-only parsers).
new column field surfaces as
structuraldrift vs a baseline (exit 1).Closes #14
🤖 Generated with Claude Code