mirror of
https://github.com/empayre/fleet.git
synced 2024-11-06 08:55:24 +00:00
a950e9d095
* create new components for query side panel * add reusable icon component that uses svg for icons * integrate with new osquery_fleet_schema.json data * update UI to work with osquery_fleet_schema.json * add remark-gfm to safely support direct urls in markdown * move fleet ace into markdown component so we can render code with ace editor * add testing for new query sidebar * remove incomplete tests for query sidepanel
155 lines
3.3 KiB
TypeScript
155 lines
3.3 KiB
TypeScript
import PropTypes from "prop-types";
|
|
import { IOsqueryPlatform } from "./platform";
|
|
|
|
export default PropTypes.shape({
|
|
columns: PropTypes.arrayOf(
|
|
PropTypes.shape({
|
|
description: PropTypes.string,
|
|
name: PropTypes.string,
|
|
type: PropTypes.string,
|
|
})
|
|
),
|
|
description: PropTypes.string,
|
|
name: PropTypes.string,
|
|
platform: PropTypes.string,
|
|
});
|
|
|
|
export type ColumnType =
|
|
| "integer"
|
|
| "bigint"
|
|
| "double"
|
|
| "text"
|
|
| "unsigned_bigint";
|
|
|
|
export interface IQueryTableColumn {
|
|
name: string;
|
|
description: string;
|
|
type: ColumnType;
|
|
hidden: boolean;
|
|
required: boolean;
|
|
index: boolean;
|
|
platforms?: IOsqueryPlatform[];
|
|
requires_user_context?: boolean;
|
|
}
|
|
|
|
export interface IOsQueryTable {
|
|
name: string;
|
|
description: string;
|
|
url: string;
|
|
platforms: IOsqueryPlatform[];
|
|
evented: boolean;
|
|
cacheable: boolean;
|
|
columns: IQueryTableColumn[];
|
|
examples?: string;
|
|
notes?: string;
|
|
}
|
|
|
|
export const DEFAULT_OSQUERY_TABLE: IOsQueryTable = {
|
|
name: "users",
|
|
description:
|
|
"Local user accounts (including domain accounts that have logged on locally (Windows)).",
|
|
url: "https://github.com/osquery/osquery/blob/master/specs/users.table",
|
|
platforms: ["darwin", "linux", "windows"],
|
|
evented: false,
|
|
cacheable: false,
|
|
columns: [
|
|
{
|
|
name: "uid",
|
|
description: "User ID",
|
|
type: "bigint",
|
|
hidden: false,
|
|
required: false,
|
|
index: false,
|
|
},
|
|
{
|
|
name: "gid",
|
|
description: "Group ID (unsigned)",
|
|
type: "bigint",
|
|
hidden: false,
|
|
required: false,
|
|
index: false,
|
|
},
|
|
{
|
|
name: "uid_signed",
|
|
description: "User ID as int64 signed (Apple)",
|
|
type: "bigint",
|
|
hidden: false,
|
|
required: false,
|
|
index: false,
|
|
},
|
|
{
|
|
name: "gid_signed",
|
|
description: "Default group ID as int64 signed (Apple)",
|
|
type: "bigint",
|
|
hidden: false,
|
|
required: false,
|
|
index: false,
|
|
},
|
|
{
|
|
name: "username",
|
|
description: "Username",
|
|
type: "text",
|
|
hidden: false,
|
|
required: false,
|
|
index: false,
|
|
},
|
|
{
|
|
name: "description",
|
|
description: "Optional user description",
|
|
type: "text",
|
|
hidden: false,
|
|
required: false,
|
|
index: false,
|
|
},
|
|
{
|
|
name: "directory",
|
|
description: "User's home directory",
|
|
type: "text",
|
|
hidden: false,
|
|
required: false,
|
|
index: false,
|
|
},
|
|
{
|
|
name: "shell",
|
|
description: "User's configured default shell",
|
|
type: "text",
|
|
hidden: false,
|
|
required: false,
|
|
index: false,
|
|
},
|
|
{
|
|
name: "uuid",
|
|
description: "User's UUID (Apple) or SID (Windows)",
|
|
type: "text",
|
|
hidden: false,
|
|
required: false,
|
|
index: false,
|
|
},
|
|
{
|
|
name: "type",
|
|
description:
|
|
"Whether the account is roaming (domain), local, or a system profile",
|
|
type: "text",
|
|
hidden: true,
|
|
required: false,
|
|
index: false,
|
|
},
|
|
{
|
|
name: "is_hidden",
|
|
description: "IsHidden attribute set in OpenDirectory",
|
|
type: "integer",
|
|
hidden: false,
|
|
required: false,
|
|
index: false,
|
|
},
|
|
{
|
|
name: "pid_with_namespace",
|
|
description: "Pids that contain a namespace",
|
|
type: "integer",
|
|
hidden: true,
|
|
required: false,
|
|
index: false,
|
|
},
|
|
],
|
|
};
|