Skip to content

Commit

Permalink
update export schema
Browse files Browse the repository at this point in the history
  • Loading branch information
misterpantz committed Aug 14, 2024
1 parent 0304542 commit e06bb30
Show file tree
Hide file tree
Showing 7 changed files with 433 additions and 77 deletions.
6 changes: 5 additions & 1 deletion docs/platform/maintain/export/overview.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Export Data - Overview
title: Export Data from Mondoo
sidebar_label: Overview
sidebar_position: 1
description: Export Mondoo data for analysis and reporting
Expand All @@ -26,4 +26,8 @@ Export data from Mondoo to:

- Other data platforms coming soon! Check back for updates.

See also:

- [Export JSONL Schema](/platform/maintain/export/schema/)

---
6 changes: 5 additions & 1 deletion docs/platform/maintain/export/schema/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@ description: Schema for exporting Mondoo data to JSONL

Mondoo uses these schemas when exporting data to JSONL:

- [**Risk factor**](./risk.md)

- [**Asset**](./asset.md)

- [**Result**](./result.md)
- [**Query result**](./result.md)

- [**Check result**](./check.md)

- [**Vulnerability**](./vulns.md)
128 changes: 99 additions & 29 deletions docs/platform/maintain/export/schema/asset.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,27 @@ This is the schema Mondoo uses when exporting asset data to JSONL.

| Property | Type | Required? | Nullable? |
| :--------------------------------------------- | :----- | :-------- | :-------- |
| [annotations](#annotations-property) | Object | Yes | No |
| [asset_mrn](#asset_mrn-property) | String | Yes | No |
| [error](#error-property) | String | Yes | Yes |
| [exported_at](#exported_at-property) | String | Yes | No |
| [labels](#labels-property) | Object | Yes | No |
| mrn (deprecated) | String | Yes | No |
| [asset_mrn](#asset_mrn-property) | String | Yes | No |
| [asset_id](#asset_id-property) | `string` | Yes | No |
| [space_mrn](#space_mrn-property) | `string` | Yes | No |
| [space_id](#space_id-property) | `string` | Yes | No |
| [space_name](#space_name-property) | `string` | Yes | No |
| [name](#name-property) | String | Yes | No |
| [platform_name](#platform_name-property) | String | Yes | No |
| [error](#error-property) | String | Yes | Yes |
| [score_updated_at](#score_updated_at-property) | String | Yes | No |
| [updated_at](#updated_at-property) | String | Yes | No |
| [labels](#labels-property) | Object | Yes | No |
| [annotations](#annotations-property) | Object | Yes | No |
| [exported_at](#exported_at-property) | String | Yes | No |
| [base_score](#base_score-property) | `integer` | ??? | ??? |
| [risk_score](#risk_score-property) | `integer` | ??? | ??? |

### annotations property

Metadata that Mondoo adds to assets

`annotations`
### mrn property

| Type | Required? | Nullable? |
| :----- | :-------- | :-------- |
| Object | Yes | No |
Deprecated: Use `asset_mrn` instead.

### asset_mrn property

Expand All @@ -45,60 +46,75 @@ Unique identifier for the asset
| :----- | :-------- | :-------- |
| String | Yes | No |

### error property
### asset_id property

The error if any (needs better description)
Unique identifier for the asset

`error`
`asset_mrn`

| Type | Required? | Nullable? |
| :----- | :-------- | :-------- |
| String | Yes | Yes |
| String | Yes | No |

### exported_at property
### space_mrn property

Timestamp when this data was exported. This is a date-time string matching [RFC 3339, section 5.6](https://tools.ietf.org/html/rfc3339 "check the specification").
Mondoo identifier for the space containing the asset

`exported_at`
`asset_mrn`

| Type | Required? | Nullable? |
| :----- | :-------- | :-------- |
| String | Yes | No |

### labels property
### space_id property

Metadata that Mondoo users add to assets
Unique identifier for the space containing the asset

`labels`
`asset_mrn`

| Type | Required? | Nullable? |
| :----- | :-------- | :-------- |
| Object | Yes | No |
| String | Yes | No |

### mrn
### space_name property

Deprecated. Use `asset_mrn` instead.
Name of the space containing the asset

`asset_mrn`

| Type | Required? | Nullable? |
| :----- | :-------- | :-------- |
| String | Yes | No |

### name property

The name of the asset
Name of the asset

`name`

| Type | Required? | Nullable? |
| :----- | :-------- | :-------- |
| String | Yes | No |
| String | ??? | ??? |

### platform_name property

The name of the platform
Name of the asset's platform

`platform_name`

| Type | Required? | Nullable? |
| :----- | :-------- | :-------- |
| String | Yes | No |

### error property

Error, if any

`error`

| Type | Required? | Nullable? |
| :----- | :-------- | :-------- |
| String | Yes | Yes |

### score_updated_at property

Timestamp when the score of this asset was last updated. This is a date-time string matching [RFC 3339, section 5.6](https://tools.ietf.org/html/rfc3339 "check the specification").
Expand All @@ -117,4 +133,58 @@ Timestamp when this asset was last updated. This is a date-time string matching
| :----- | :-------- | :-------- |
| String | Yes | No |

### labels property

Metadata that Mondoo users add to assets

`labels`

| Type | Required? | Nullable? |
| :----- | :-------- | :-------- |
| Object | Yes | No |

### annotations property

Metadata that Mondoo adds to assets

`annotations`

| Type | Required? | Nullable? |
| :----- | :-------- | :-------- |
| Object | Yes | No |

### exported_at property

Timestamp when this data was exported. This is a date-time string matching [RFC 3339, section 5.6](https://tools.ietf.org/html/rfc3339 "check the specification").

`exported_at`

| Type | Required? | Nullable? |
| :----- | :-------- | :-------- |
| String | Yes | No |

### risk_factors

Read [Risk Factors](/platform/maintain/export/schema/risk/).

### base_score property

Asset's score from most recent policy-based scan

`base_score`

| Type | Required? | Nullable? |
| :----- | :-------- | :-------- |
| Integer | ??? | ??? |

### risk_score property

Asset's risk score

`risk_score`

| Type | Required? | Nullable? |
| :----- | :-------- | :-------- |
| Integer | ??? | ??? |

---
123 changes: 123 additions & 0 deletions docs/platform/maintain/export/schema/check.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
---
title: Check Result Export Schema
sidebar_label: Check Results
description: Query result schema for the Mondoo JSONL export
---

This is the schema Mondoo uses when exporting check result data to JSONL.

## Result type

`object`

## Result properties

| Property | Type | Required? | Nullable? |
| :----------------------------------- | :------------ | :-------- | :-------- |
| [space_mrn](#space_mrn-property) | `string` | Yes | No |
| [space_id](#space_id-property) | `string` | Yes | No |
| [space_name](#space_name-property) | `string` | Yes | No |
| [asset_id](#asset_id-property) | `string` | Yes | No |
| [asset_mrn](#asset_mrn-property) | `string` | Yes | No |
| [score](#score-property) | Deprecated | | |
| [base_score](#base_score-property) | `integer` | ??? | ??? |
| [risk_score](#risk_score-property) | `integer` | ??? | ??? |
| [status](#status-property) | `string` | Yes | No |
| [modified_at](#modified_at-property) | `string` | Yes | No |
| [failed_at](#failed_at-property) | `string` | ??? | ??? |

### space_mrn property

Mondoo identifier for the space containing the asset

`asset_mrn`

| Type | Required? | Nullable? |
| :----- | :-------- | :-------- |
| String | Yes | No |

### space_id property

Unique identifier for the space containing the asset

`asset_mrn`

| Type | Required? | Nullable? |
| :----- | :-------- | :-------- |
| String | Yes | No |

### space_name property

Name of the space containing the asset

`asset_mrn`

| Type | Required? | Nullable? |
| :----- | :-------- | :-------- |
| String | Yes | No |

### asset_id property

Unique identifier for the asset

`asset_mrn`

| Type | Required? | Nullable? |
| :----- | :-------- | :-------- |
| String | Yes | No |

### asset_mrn property

Mondoo identifier for the asset

`asset_mrn`

| Type | Required? | Nullable? |
| :----- | :-------- | :-------- |
| String | Yes | No |

### score property

Deprecated: Use `base_score` instead.

### base_score property

Asset's score from most recent policy-based scan

`base_score`

| Type | Required? | Nullable? |
| :----- | :-------- | :-------- |
| Integer | ??? | ??? |

### risk_score property

Asset's risk score

`risk_score`

| Type | Required? | Nullable? |
| :----- | :-------- | :-------- |
| Integer | ??? | ??? |

### modified_at property

Timestamp from when this check result item was last modified. This is a date-time string matching [RFC 3339, section 5.6](https://tools.ietf.org/html/rfc3339 "check the specification").

`modified_at`

| Type | Required? | Nullable? |
| :----- | :-------- | :-------- |
| String | Yes | No |

### failed_at property

Optional timestamp from when this check result item failed This is a date-time string matching [RFC 3339, section 5.6](https://tools.ietf.org/html/rfc3339 "check the specification").

`failed_at`

| Type | Required? | Nullable? |
| :----- | :-------- | :-------- |
| String | ??? | ??? |

---
Loading

0 comments on commit e06bb30

Please sign in to comment.