Skip to content

Commit

Permalink
Enforce yamllint in CI
Browse files Browse the repository at this point in the history
Start running and enforcing yamllint checks in CI.
  • Loading branch information
mjwolf committed Sep 11, 2024
1 parent a967d85 commit 3f2a71c
Show file tree
Hide file tree
Showing 10 changed files with 48 additions and 43 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ jobs:
with:
python-version: '3.x'
- run: git fetch --prune --unshallow --tags
- run: make check
- run: make check checklint yamllint
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ misspell:
fi
./build/misspell/bin/misspell -error README.md CONTRIBUTING.md schemas/* docs/* experimental/schemas/*

# Warn re misspell removal
# Warn re misspell removal
.PHONY: misspell_warn
misspell_warn:
@echo "Warning: due to lack of cross-platform support, misspell is no longer included in this task and may be deprecated in future\n"
Expand All @@ -110,4 +110,4 @@ build/ve/bin/activate: scripts/requirements.txt scripts/requirements-dev.txt
# Check YAML syntax (currently not enforced).
.PHONY: yamllint
yamllint: ve
build/ve/bin/yamllint schemas/*.yml
build/ve/bin/yamllint -d '{extends: default, rules: {line-length: disable}}' schemas/*.yml
6 changes: 3 additions & 3 deletions docs/fields/field-details.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -1628,7 +1628,7 @@ example: `co.uk`
[[ecs-device]]
=== Device Fields

Fields that describe a device instance and its characteristics. Data collected for applications and processes running on a (mobile) device can be enriched with these fields to describe the identity, type and other characteristics of the device.
Fields that describe a device instance and its characteristics. Data collected for applications and processes running on a (mobile) device can be enriched with these fields to describe the identity, type and other characteristics of the device.

This field group definition is based on the Device namespace of the OpenTelemetry Semantic Conventions (https://opentelemetry.io/docs/reference/specification/resource/semantic_conventions/device/).

Expand All @@ -1647,7 +1647,7 @@ beta::[ These fields are in beta and are subject to change.]
[[field-device-id]]
<<field-device-id, device.id>>

a| The unique identifier of a device. The identifier must not change across application sessions but stay fixed for an instance of a (mobile) device.
a| The unique identifier of a device. The identifier must not change across application sessions but stay fixed for an instance of a (mobile) device.

On iOS, this value must be equal to the vendor identifier (https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor). On Android, this value must be equal to the Firebase Installation ID or a globally unique UUID which is persisted across sessions in your application.

Expand Down Expand Up @@ -9206,7 +9206,7 @@ Note: this field should contain an array of values.
[[ecs-risk]]
=== Risk information Fields

Fields for describing risk score and risk level of entities such as hosts and users. These fields are not allowed to be nested under `event.*`. Please continue to use `event.risk_score` and `event.risk_score_norm` for event risk.
Fields for describing risk score and risk level of entities such as hosts and users. These fields are not allowed to be nested under `event.*`. Please continue to use `event.risk_score` and `event.risk_score_norm` for event risk.

beta::[ These fields are in beta and are subject to change.]

Expand Down
22 changes: 12 additions & 10 deletions generated/beats/fields.ecs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1133,9 +1133,9 @@
- name: device
title: Device
group: 2
description: 'Fields that describe a device instance and its characteristics. Data
collected for applications and processes running on a (mobile) device can be
enriched with these fields to describe the identity, type and other characteristics
description: 'Fields that describe a device instance and its characteristics.
Data collected for applications and processes running on a (mobile) device can
be enriched with these fields to describe the identity, type and other characteristics
of the device.
This field group definition is based on the Device namespace of the OpenTelemetry
Expand All @@ -1147,13 +1147,15 @@
level: extended
type: keyword
ignore_above: 1024
description: "The unique identifier of a device. The identifier must not change\
\ across application sessions but stay fixed for an instance of a (mobile)\
\ device. \nOn iOS, this value must be equal to the vendor identifier (https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor).\
\ On Android, this value must be equal to the Firebase Installation ID or\
\ a globally unique UUID which is persisted across sessions in your application.\n\
For GDPR and data protection law reasons this identifier should not carry\
\ information that would allow to identify a user."
description: 'The unique identifier of a device. The identifier must not change
across application sessions but stay fixed for an instance of a (mobile) device.
On iOS, this value must be equal to the vendor identifier (https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor).
On Android, this value must be equal to the Firebase Installation ID or a
globally unique UUID which is persisted across sessions in your application.
For GDPR and data protection law reasons this identifier should not carry
information that would allow to identify a user.'
example: 00000000-54b3-e7c7-0000-000046bffd97
default_field: false
- name: manufacturer
Expand Down
16 changes: 9 additions & 7 deletions generated/ecs/ecs_flat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1642,13 +1642,15 @@ destination.user.roles:
type: keyword
device.id:
dashed_name: device-id
description: "The unique identifier of a device. The identifier must not change\
\ across application sessions but stay fixed for an instance of a (mobile) device.\
\ \nOn iOS, this value must be equal to the vendor identifier (https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor).\
\ On Android, this value must be equal to the Firebase Installation ID or a globally\
\ unique UUID which is persisted across sessions in your application.\nFor GDPR\
\ and data protection law reasons this identifier should not carry information\
\ that would allow to identify a user."
description: 'The unique identifier of a device. The identifier must not change
across application sessions but stay fixed for an instance of a (mobile) device.

On iOS, this value must be equal to the vendor identifier (https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor).
On Android, this value must be equal to the Firebase Installation ID or a globally
unique UUID which is persisted across sessions in your application.

For GDPR and data protection law reasons this identifier should not carry information
that would allow to identify a user.'
example: 00000000-54b3-e7c7-0000-000046bffd97
flat_name: device.id
ignore_above: 1024
Expand Down
22 changes: 12 additions & 10 deletions generated/ecs/ecs_nested.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2084,7 +2084,7 @@ destination:
type: group
device:
beta: These fields are in beta and are subject to change.
description: 'Fields that describe a device instance and its characteristics. Data
description: 'Fields that describe a device instance and its characteristics. Data
collected for applications and processes running on a (mobile) device can be enriched
with these fields to describe the identity, type and other characteristics of
the device.
Expand All @@ -2094,13 +2094,15 @@ device:
fields:
device.id:
dashed_name: device-id
description: "The unique identifier of a device. The identifier must not change\
\ across application sessions but stay fixed for an instance of a (mobile)\
\ device. \nOn iOS, this value must be equal to the vendor identifier (https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor).\
\ On Android, this value must be equal to the Firebase Installation ID or\
\ a globally unique UUID which is persisted across sessions in your application.\n\
For GDPR and data protection law reasons this identifier should not carry\
\ information that would allow to identify a user."
description: 'The unique identifier of a device. The identifier must not change
across application sessions but stay fixed for an instance of a (mobile) device.

On iOS, this value must be equal to the vendor identifier (https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor).
On Android, this value must be equal to the Firebase Installation ID or a
globally unique UUID which is persisted across sessions in your application.

For GDPR and data protection law reasons this identifier should not carry
information that would allow to identify a user.'
example: 00000000-54b3-e7c7-0000-000046bffd97
flat_name: device.id
ignore_above: 1024
Expand Down Expand Up @@ -15368,8 +15370,8 @@ related:
risk:
beta: These fields are in beta and are subject to change.
description: Fields for describing risk score and risk level of entities such as
hosts and users. These fields are not allowed to be nested under `event.*`. Please
continue to use `event.risk_score` and `event.risk_score_norm` for event risk.
hosts and users. These fields are not allowed to be nested under `event.*`. Please
continue to use `event.risk_score` and `event.risk_score_norm` for event risk.
fields:
risk.calculated_level:
dashed_name: risk-calculated-level
Expand Down
10 changes: 5 additions & 5 deletions schemas/device.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
group: 2
short: Fields characterizing a (mobile) device a process or application is running on.
description: >
Fields that describe a device instance and its characteristics.
Fields that describe a device instance and its characteristics.
Data collected for applications and processes running on a (mobile) device can be enriched with these fields
to describe the identity, type and other characteristics of the device.
Expand All @@ -33,14 +33,14 @@
level: extended
example: 00000000-54b3-e7c7-0000-000046bffd97
type: keyword
short: The unique identifier of a device.
short: The unique identifier of a device.
description: >
The unique identifier of a device. The identifier must not change across application sessions but stay fixed for an instance of a (mobile) device.
The unique identifier of a device. The identifier must not change across application sessions but stay fixed for an instance of a (mobile) device.
On iOS, this value must be equal to the vendor identifier (https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor).
On Android, this value must be equal to the Firebase Installation ID or a globally unique UUID which is persisted across sessions in your application.
For GDPR and data protection law reasons this identifier should not carry information that would allow to identify a user.
For GDPR and data protection law reasons this identifier should not carry information that would allow to identify a user.
- name: model.name
level: extended
example: Samsung Galaxy S6
Expand All @@ -66,4 +66,4 @@
description: >
The unique serial number serves as a distinct identifier for each device, aiding in inventory management and device authentication.
example: DJGAQS4CW5
beta: This field is beta and subject to change.
beta: This field is beta and subject to change.
4 changes: 2 additions & 2 deletions schemas/email.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,8 @@
A brief summary of the topic of the message.
example: "Please see this important message."
multi_fields:
- type: match_only_text
name: text
- type: match_only_text
name: text

- name: to.address
level: extended
Expand Down
1 change: 0 additions & 1 deletion schemas/pe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -208,4 +208,3 @@
format: string
type: long
level: extended

4 changes: 2 additions & 2 deletions schemas/risk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
beta: >
These fields are in beta and are subject to change.
description: >
Fields for describing risk score and risk level of entities such as hosts and users.
These fields are not allowed to be nested under `event.*`. Please continue to use
Fields for describing risk score and risk level of entities such as hosts and users.
These fields are not allowed to be nested under `event.*`. Please continue to use
`event.risk_score` and `event.risk_score_norm` for event risk.
reusable:
top_level: false
Expand Down

0 comments on commit 3f2a71c

Please sign in to comment.