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

Add My Comp component to test_comp component definition #81

Closed
wants to merge 5 commits into from
Closed
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
40 changes: 0 additions & 40 deletions .github/workflows/regenerate-cd.yml

This file was deleted.

10 changes: 10 additions & 0 deletions .github/workflows/transform-rules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,14 @@ jobs:
file_pattern: "*.json,rules/*"
branch: ${{ inputs.branch }}
commit_user_name: "trestle-bot[bot]"
commit_user_email: "136850459+trestle-bot[bot]@users.noreply.github.com"
- name: Regenerate component definitions
uses: RedHatProductSecurity/trestle-bot/actions/[email protected]
with:
markdown_path: "markdown/components"
oscal_model: "compdef"
file_pattern: "markdown/*"
branch: ${{ inputs.branch }}
skip_assemble: true
commit_user_name: "trestle-bot[bot]"
commit_user_email: "136850459+trestle-bot[bot]@users.noreply.github.com"
11 changes: 11 additions & 0 deletions .github/workflows/update-profiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,14 @@ jobs:
github_token: ${{ steps.get_installation_token.outputs.token }}
sources: |
https://github.com/RedHatProductSecurity/oscal-profiles@main
- name: Regenerate component definitions
id: regenerate
uses: RedHatProductSecurity/trestle-bot/actions/[email protected]
with:
markdown_path: "markdown/components"
oscal_model: "compdef"
file_pattern: "markdown/*"
branch: "sync-upstream-${{ github.run_id }}"
skip_assemble: true
commit_user_name: "trestle-bot[bot]"
commit_user_email: "136850459+trestle-bot[bot]@users.noreply.github.com"
26 changes: 15 additions & 11 deletions component-definitions/example/component-definition.json
Original file line number Diff line number Diff line change
@@ -1,53 +1,53 @@
{
"component-definition": {
"uuid": "231abb61-81ad-4c0e-b2a9-09128de8e67a",
"uuid": "2c886a12-6ffa-41f9-a304-fec473e6a7ec",
"metadata": {
"title": "Component definition for example",
"last-modified": "2023-10-25T21:25:22+00:00",
"last-modified": "2024-03-12T20:07:14.430687+00:00",
"version": "1.0",
"oscal-version": "1.0.4"
},
"components": [
{
"uuid": "5c3e6d1f-8a90-42d4-97c4-9af36d916ae6",
"uuid": "a8556264-7348-43a6-91be-8b9126dcd51f",
"type": "service",
"title": "Example",
"description": "Example Application",
"props": [
{
"name": "Rule_Id",
"ns": "https://ibm.github.io/compliance-trestle/schemas/oscal",
"ns": "https://oscal-compass.github.io/compliance-trestle/schemas/oscal",
"value": "Test-rule_001",
"remarks": "rule_set_0"
},
{
"name": "Rule_Description",
"ns": "https://ibm.github.io/compliance-trestle/schemas/oscal",
"ns": "https://oscal-compass.github.io/compliance-trestle/schemas/oscal",
"value": "Ensure all of the services are running these tests",
"remarks": "rule_set_0"
},
{
"name": "Parameter_Id",
"ns": "https://ibm.github.io/compliance-trestle/schemas/oscal",
"ns": "https://oscal-compass.github.io/compliance-trestle/schemas/oscal",
"value": "prm_1",
"remarks": "rule_set_0"
},
{
"name": "Parameter_Description",
"ns": "https://ibm.github.io/compliance-trestle/schemas/oscal",
"ns": "https://oscal-compass.github.io/compliance-trestle/schemas/oscal",
"value": "prm_1 description",
"remarks": "rule_set_0"
},
{
"name": "Parameter_Value_Alternatives",
"ns": "https://ibm.github.io/compliance-trestle/schemas/oscal",
"ns": "https://oscal-compass.github.io/compliance-trestle/schemas/oscal",
"value": "{'default': '5%', '5pc': '5%', '10pc': '10%', '15pc': '15%', '20pc': '20%'}",
"remarks": "rule_set_0"
}
],
"control-implementations": [
{
"uuid": "8f45e213-a818-4d61-80df-2b8563e3641d",
"uuid": "0e040159-9453-455a-8ec4-a88ca0a1f073",
"source": "profiles/fedramp_rev5_high/profile.json",
"description": "FedRAMP REV5 High Baseline",
"set-parameters": [
Expand All @@ -60,14 +60,18 @@
],
"implemented-requirements": [
{
"uuid": "b34fa867-a4a9-44b1-86c5-d3517e8d8d81",
"uuid": "a0d16eea-7a18-49a3-a7ac-ba5e8375a3f1",
"control-id": "ac-1",
"description": "",
"props": [
{
"name": "Rule_Id",
"ns": "https://ibm.github.io/compliance-trestle/schemas/oscal",
"ns": "https://oscal-compass.github.io/compliance-trestle/schemas/oscal",
"value": "Test-rule_001"
},
{
"name": "implementation-status",
"value": "planned"
}
]
}
Expand Down
168 changes: 168 additions & 0 deletions component-definitions/test_comp/component-definition.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
{
"component-definition": {
"uuid": "1ab73aee-4eef-4f7a-aec9-50a4554dc7be",
"metadata": {
"title": "Component definition for test_comp",
"last-modified": "2024-03-12T20:07:14.322243+00:00",
"version": "1.0",
"oscal-version": "1.0.4"
},
"components": [
{
"uuid": "6532d319-9669-4708-805c-a38c59c9afc6",
"type": "service",
"title": "My Comp",
"description": "My testing comp",
"props": [
{
"name": "Rule_Id",
"ns": "https://oscal-compass.github.io/compliance-trestle/schemas/oscal",
"value": "rule-sc-1",
"remarks": "rule_set_0"
},
{
"name": "Rule_Description",
"ns": "https://oscal-compass.github.io/compliance-trestle/schemas/oscal",
"value": "Rule for sc-1",
"remarks": "rule_set_0"
},
{
"name": "Rule_Id",
"ns": "https://oscal-compass.github.io/compliance-trestle/schemas/oscal",
"value": "rule-ac-2",
"remarks": "rule_set_1"
},
{
"name": "Rule_Description",
"ns": "https://oscal-compass.github.io/compliance-trestle/schemas/oscal",
"value": "Rule for ac-2",
"remarks": "rule_set_1"
},
{
"name": "Rule_Id",
"ns": "https://oscal-compass.github.io/compliance-trestle/schemas/oscal",
"value": "rule-ac-1",
"remarks": "rule_set_2"
},
{
"name": "Rule_Description",
"ns": "https://oscal-compass.github.io/compliance-trestle/schemas/oscal",
"value": "Rule for ac-1",
"remarks": "rule_set_2"
},
{
"name": "Parameter_Id",
"ns": "https://oscal-compass.github.io/compliance-trestle/schemas/oscal",
"value": "prm_1",
"remarks": "rule_set_2"
},
{
"name": "Parameter_Description",
"ns": "https://oscal-compass.github.io/compliance-trestle/schemas/oscal",
"value": "prm_1 description",
"remarks": "rule_set_2"
},
{
"name": "Parameter_Value_Alternatives",
"ns": "https://oscal-compass.github.io/compliance-trestle/schemas/oscal",
"value": "{'default': '5%', '5pc': '5%', '10pc': '10%', '15pc': '15%', '20pc': '20%'}",
"remarks": "rule_set_2"
},
{
"name": "Rule_Id",
"ns": "https://oscal-compass.github.io/compliance-trestle/schemas/oscal",
"value": "rule-ac-4.4",
"remarks": "rule_set_3"
},
{
"name": "Rule_Description",
"ns": "https://oscal-compass.github.io/compliance-trestle/schemas/oscal",
"value": "Rule for ac-4.4",
"remarks": "rule_set_3"
}
],
"control-implementations": [
{
"uuid": "5352fbc3-4539-47d2-ab3c-04839019f997",
"source": "trestle://profiles/example/profile.json",
"description": "Example",
"set-parameters": [
{
"param-id": "prm_1",
"values": [
"5%"
]
}
],
"implemented-requirements": [
{
"uuid": "e70fe341-dc48-4762-87ef-0e794a10b68c",
"control-id": "sc-1",
"description": "",
"props": [
{
"name": "Rule_Id",
"ns": "https://oscal-compass.github.io/compliance-trestle/schemas/oscal",
"value": "rule-sc-1"
},
{
"name": "implementation-status",
"value": "planned"
}
]
},
{
"uuid": "1f4814b7-a983-4e10-b5e9-f3944088e36a",
"control-id": "ac-2",
"description": "",
"props": [
{
"name": "Rule_Id",
"ns": "https://oscal-compass.github.io/compliance-trestle/schemas/oscal",
"value": "rule-ac-2"
},
{
"name": "implementation-status",
"value": "planned"
}
]
},
{
"uuid": "5de15c47-59d0-4fc1-99e7-ea5fbeb13b82",
"control-id": "ac-1",
"description": "",
"props": [
{
"name": "Rule_Id",
"ns": "https://oscal-compass.github.io/compliance-trestle/schemas/oscal",
"value": "rule-ac-1"
},
{
"name": "implementation-status",
"value": "planned"
}
]
},
{
"uuid": "c18dcaae-3353-4c33-9049-fda41e1076da",
"control-id": "ac-4.4",
"description": "",
"props": [
{
"name": "Rule_Id",
"ns": "https://oscal-compass.github.io/compliance-trestle/schemas/oscal",
"value": "rule-ac-4.4"
},
{
"name": "implementation-status",
"value": "planned"
}
]
}
]
}
]
}
]
}
}
22 changes: 22 additions & 0 deletions markdown/components/example/Example/source_001/ac/ac-1.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,28 @@ x-trestle-global:
title: FedRAMP Rev 5 High Baseline
href: profiles/fedramp_rev5_high/profile.json
sort-id: ac-01
x-trestle-rules-params:
Example:
- name: prm_1
description: prm_1 description
options: "{'default': '5%', '5pc': '5%', '10pc': '10%', '15pc': '15%', '20pc':
'20%'}"
rule-id: Test-rule_001
x-trestle-comp-def-rules-param-vals:
# You may set new values for rule parameters by adding
#
# component-values:
# - value 1
# - value 2
#
# below a section of values:
# The values list refers to the values as set by the components, and the component-values are the new values
# to be placed in SetParameters of the component definition.
#
Example:
- name: prm_1
values:
- 5%
---

# ac-1 - \[Access Control\] Policy and Procedures
Expand Down
Loading