IF Commons GitHub

governance/osquery

Written to: 1 requirement: 1 proved, 0 partly, 0 failing, 0 with no test recorded. 0005-estate-query-live FR-001

The tables of osquery that a question over the live fleet may name, as data: each is an allow-list of the columns that may be read, so that the text sent to a machine is made here from these names and never from what a person wrote. A table is added by a change to this list and a review. What can hold a secret (a command line, an environment) is not here; what makes a request or writes a file is not here either.

import { OSQUERY_TABLES, osqueryRelation } from "./osquery.ts";
osqueryRelation("processes")?.name; // "osquery_processes"

Source: commons/estate-query/src/governance/osquery.ts

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

governance.LIVE_STATUSconstno test imports it
const LIVE_STATUS: Relation

The relation that says, for each machine and table asked, whether it answered.

governance.OSQUERY_PREFIXconstno test imports it
const OSQUERY_PREFIX: "osquery_"

The prefix of the relation of an osquery table.

governance.OSQUERY_TABLESconstno test imports it
const OSQUERY_TABLES: readonly OsqueryTable[]

Every table that may be read, in the order query tables lists them.

governance.osqueryRelationfunctionno test imports it
function osqueryRelation(table: string): Relation | undefined

The relation of a table, with the columns that say which machine and when added in front, as a question sees it.

governance.osquerySelectfunctionno test imports it
function osquerySelect(table: string, limit: number): string | undefined

The SELECT sent to a machine for a table: the columns of the list and a limit, made from the list alone.

governance.osqueryTablesNamedfunctionno test imports it
function osqueryTablesNamed(sql: string): readonly string[]

The tables of osquery the question names (a table named osquery_<name> that may be read), in order and once each; a name with the prefix that is not on the list is not one.

governance.OsqueryTabletypeno test imports it
type OsqueryTable = { readonly table: string; readonly summary: string; readonly columns: readonly (readonly [string, ColumnType])[] };

A table of osquery that may be read.

LIVE_STATUSconst
const LIVE_STATUS: Relation

The relation that says, for each machine and table asked, whether it answered.

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

OSQUERY_PREFIXconstno test imports it
const OSQUERY_PREFIX: "osquery_"

The prefix of the relation of an osquery table.

OSQUERY_TABLESconst
const OSQUERY_TABLES: readonly OsqueryTable[]

Every table that may be read, in the order query tables lists them.

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

osqueryRelationfunction
function osqueryRelation(table: string): Relation | undefined

The relation of a table, with the columns that say which machine and when added in front, as a question sees it.

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

osquerySelectfunction
function osquerySelect(table: string, limit: number): string | undefined

The SELECT sent to a machine for a table: the columns of the list and a limit, made from the list alone.

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

osqueryTablesNamedfunction
function osqueryTablesNamed(sql: string): readonly string[]

The tables of osquery the question names (a table named osquery_<name> that may be read), in order and once each; a name with the prefix that is not on the list is not one.

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

OsqueryTabletypeno test imports it
type OsqueryTable = { readonly table: string; readonly summary: string; readonly columns: readonly (readonly [string, ColumnType])[] };

A table of osquery that may be read.

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