Skip to content

Commit

Permalink
RHINENG-12955: add image builder fields to schema (#140)
Browse files Browse the repository at this point in the history
  • Loading branch information
croissanne authored Oct 9, 2024
1 parent 7fbd570 commit 7f5aff3
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 1 deletion.
18 changes: 17 additions & 1 deletion schemas/system_profile/v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -816,4 +816,20 @@ $defs:
description: CrowdStrike running Falcon Sensor version
type: string
example: "7.14.16703.0, 6.33.13003.0"
maxLength: 32
maxLength: 32
image_builder:
description: Object containing image builder facts
type: object
properties:
compliance_policy_id:
description: The compliance policy that was used and applied during the image build
type: string
example: 89b52baa-9912-4edc-9ed5-be15c06eaaa9
pattern: '[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}'
maxLength: 36
compliance_profile_id:
description: |
The profile that was applied during the image build on which the compliance policy was based
type: string
example: xccdf_org.ssgproject.content_profile_cis
maxLength: 255
12 changes: 12 additions & 0 deletions tests/utils/invalids.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,5 +396,17 @@
"crowdstrike": { # Must be a string, not a boolean
"falcon_version": True,
}
}},
{"image_builder": { # Must be a string
"compliance_policy_id": 10,
"compliance_profile_id": "some_profile_id"
}},
{"image_builder": { # Must be a uuid
"compliance_policy_id": "definitely not a uuid",
"compliance_profile_id": "some_profile_id"
}},
{"image_builder": { # Must be a string
"compliance_policy_id": "b27443a3-078d-4ac2-bb46-ba7a8c31d21b",
"compliance_profile_id": 10
}}
)
4 changes: 4 additions & 0 deletions tests/utils/valids.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,5 +199,9 @@
"falcon_backend": "kernel",
"falcon_version": "7.14.16703.0"
}
}},
{"image_builder": {
"compliance_policy_id": "b27443a3-078d-4ac2-bb46-ba7a8c31d21b",
"compliance_profile_id": "some_profile_id"
}}
)

0 comments on commit 7f5aff3

Please sign in to comment.