Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.x] [EDR Workflows] Update Osquery and ECS fields schemas (#193399) #193576

Merged
merged 1 commit into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

Large diffs are not rendered by default.

This file was deleted.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion x-pack/plugins/osquery/public/editor/osquery_tables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ let osqueryTables: TablesJSON | null = null;
export const getOsqueryTables = () => {
if (!osqueryTables) {
// eslint-disable-next-line @typescript-eslint/no-var-requires
osqueryTables = normalizeTables(require('../common/schemas/osquery/v5.10.2.json'));
osqueryTables = normalizeTables(require('../common/schemas/osquery/v5.13.1.json'));
}

return osqueryTables;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ import {
convertECSMappingToArray,
convertECSMappingToObject,
} from '../../../common/utils/converters';
import ECSSchema from '../../common/schemas/ecs/v8.11.0.json';
import osquerySchema from '../../common/schemas/osquery/v5.10.2.json';
import ECSSchema from '../../common/schemas/ecs/v8.12.0.json';
import osquerySchema from '../../common/schemas/osquery/v5.13.1.json';

import { FieldIcon } from '../../common/lib/kibana';
import { OsqueryIcon } from '../../components/osquery_icon';
Expand Down
6 changes: 4 additions & 2 deletions x-pack/plugins/osquery/scripts/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ currently manually curated). This assumes the targeted schema files will be in
`public/editor/osquery_schema`.

```
node ecs.js --schema_version=4.6.0 // (filename without .json extension)
node ecs.js --schema_version=4.6.0 // filename should be called 4.6.0.json > which will generate v4.6.0-formatted.json
```
Possibly it's going to be necessary to transform fields' names into lower case, because CSV exports Fields with Capital Letters.

node osquery.js --schema_version=4.6.0 // (filename without .json extension)
node osquery.js --schema_version=4.6.0 // filename should be called 4.6.0.json > which will generate v4.6.0-formatted.json

```
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ run(
formattedSchema.push(...elasticTables);

await fs.writeFile(
path.join(schemaPath, `v${flags.schema_version}-formatted`),
path.join(schemaPath, `v${flags.schema_version}-formatted.json`),
JSON.stringify(formattedSchema)
);
},
Expand Down