IF Commons GitHub

sql/extensions/osquery/mod

Written to: 2 requirements: 2 proved, 0 partly, 0 failing, 0 with no test recorded. 0058-sql-osquery FR-004, 0058-sql-osquery FR-001

Osquery's machine facts (commons data 0058-sql-osquery): the published schema of a version of osquery imported through 0055 into a logical schema (never written by hand) with platform availability on its tables, classification on its columns and the version stamped, and a read-only driver that runs osqueryi --json on demand for a SELECT. The osquery-atc extension (0027) goes the other way and is not changed; osqueryd and fleet TLS are out of scope.

const schema = must(readSchema(JSON.parse(readFileSync("osquery-5.24.1.auto.json", "utf8"))));
const logical = must(importSchema(schema, "linux"));
const driver = osqueryDriver({ run: (argv) => proc.run(argv), schema, platform: "linux" });
const users = await driver.query("SELECT uid, username FROM users");

Source: commons/data/sql/extensions/osquery/mod.ts

1 of 1 exports are imported by a test of the run. A test that imports an export may not call it or check what it returns.

redactPersonalconst
const redactPersonal: (mask?: string) => (column: string, value: unknown) => unknown

A redaction for a fan-out (0059): the personal columns of the schema (0058 FR-003) are hidden, so that a merged result of machines does not carry what identifies a person.

ParameterWhat it is
maskwhat a hidden value becomes

Imported by 7 tests of the run (7 passed, 0 failed): the library's results

Titles, headings, exports, tables, columns and requirements. Esc closes.