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

chore: Trestle release #1399

Merged
merged 11 commits into from
Jun 26, 2023
20 changes: 6 additions & 14 deletions MAINTAINERS.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,15 @@
Trestle was designed and open sourced by a team based at [IBM Research](https://www.research.ibm.com/) and others around the world. The list includes:

Christopher Butler - [butler54](https://github.com/butler54)

Bruno Marques - [brunomarq](https://github.com/brunomarq)
Alejandro Jose Leiva Palomo [AleJo2995](https://github.com/AleJo2995)

Lenin Mehedy - [leninmehedy](https://github.com/leninmehedy)
Christopher Butler [butler54](https://github.com/butler54)

Simon Metson - [drsm79](https://github.com/drsm79)
Lou Degenaro [degenaro](https://github.com/degenaro)

Frank Suits - [fsuits](https://github.com/fsuits)
Frank Suits [fsuits](https://github.com/fsuits)

Jeff Tan - [jeffdmgit](https://github.com/jeffdmgit)
Jennifer Power [jpower432](https://github.com/jpower432)

Nebula Alam - [aNebula](https://github.com/aNebula)
Manjiree Gadgil [mrgadgil](https://github.com/mrgadgil)

Vikas Agarwal [vikas-agarwal76](https://github.com/vikas-agarwal76)

Lou Degenaro [degenaro](https://github.com/degenaro)

Ekaterina Nikonova [enikonovad](https://github.com/enikonovad)

Alejandro Jose Leiva Palomo [AleJo2995](https://github.com/AleJo2995)
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,16 +88,16 @@ Compliance trestle is currently stable and is based on NIST OSCAL version 1.0.4,
## Community call

We would like to share development in progress for compliance trestle, coming soon and get feedback from community on what features would they like to see in compliance trestle.\
The community call will happen every 2 week(s) on Tuesday at 10am EST.\
The community call will happen every 2 week(s) on Tuesday at 10.00am EST.\
Meeting information:

```
Compliance Trestle Community Call
Hosted by MANJIREE GADGIL

https://ibm.webex.com/ibm/j.php?MTID=m46740e85f87f290d0848c6941c489b0a
Tuesday, May 16, 2023 10:30 AM | 30 minutes | (UTC-04:00) Eastern Time (US & Canada)
Occurs every 2 week(s) on Tuesday effective 5/16/2023 from 10:30 AM to 11:00 AM, (UTC-04:00) Eastern Time (US & Canada)
https://ibm.webex.com/ibm/j.php?MTID=mcf86d5904761ea884ec248c006fc3b81
Tuesday, May 16, 2023 10:00 AM | 30 minutes | (UTC-04:00) Eastern Time (US & Canada)
Occurs every 2 week(s) on Tuesday effective 5/16/2023 from 10:00 AM to 10:30 AM, (UTC-04:00) Eastern Time (US & Canada)

Join by phone
1-844-531-0958 United States Toll Free
Expand Down
2 changes: 2 additions & 0 deletions docs/api_reference/trestle.tasks.oscal_catalog_to_csv.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
::: trestle.tasks.oscal_catalog_to_csv
handler: python
25 changes: 21 additions & 4 deletions docs/trestle_author.md
Original file line number Diff line number Diff line change
Expand Up @@ -591,6 +591,21 @@ CLI evocation:

The `profile` author commands allow you to edit additions made by a profile to its imported controls that end up in the final resolved profile catalog. Only the additions may be edited or added to the generated markdown control files - and those additions can then be assembled into a new version of the original profile, with those additions. For more details on its usage please see [the profile authoring tutorial](https://ibm.github.io/compliance-trestle/tutorials/ssp_profile_catalog_authoring/ssp_profile_catalog_authoring).

### Profile generation with inheritance

CLI evocation:

> trestle author profile-inherit

The `profile-inherit` sub-command takes a given parent profile and filters its imported controls based inherited controls from a given SSP.

The leveraged SSP is evaluated based on whether provided and responsibility statements for all `by-component` fields are set for each applicable control, as well as the implementation status.
All components must have exported provided statements, no exported responsibility statements, and an implementation status of `implemented` in order for a control to be filtered from the output profile (i.e. controls delta profile).

As with the other related author commands, if an existing destination file already exists, it is not updated if no changes would be made.

For more details on its usage please see [the ssp-filter tutorial](https://ibm.github.io/compliance-trestle/tutorials/ssp_profile_catalog_authoring/ssp_profile_catalog_authoring).

### SSP authoring

CLI evocation:
Expand All @@ -613,15 +628,17 @@ CLI evocation:

> trestle author ssp-filter

The `ssp-filter` sub-command takes a given SSP and filters its contents based on a given profile, list of components, and/or control implementation status.
The `ssp-filter` sub-command takes a given SSP and filters its contents based on a given profile, list of components, control implementation status and/or control origination.

If filtering by profile, the SSP is assumed to contain a superset of controls needed by the profile, and the filter operation generates a new SSP with just the controls needed by that profile. If the profile references a control not in the SSP, the routine fails with an error.

If filtering by components, a colon-delimited list of components should be provided, with `This system` as the default name for the overall required component for the entire system. Case and spaces are ignored in the component names, so the names could be specified as `--components "this system: my component"`. The resulting, filtered ssp will have updated implementated requirements with filtered by_components on each requirement, and filtered by_components on each statement.
If filtering by components, a colon-delimited list of components should be provided, with `This system` as the default name for the overall required component for the entire system. Case and spaces are ignored in the component names, so the names could be specified as `--components "this system: my component"`. The resulting, filtered ssp will have updated implemented requirements with filtered by_components on each requirement, and filtered by_components on each statement.

If filtering by control implementation status, a comma-delimited list of implementation status values should be provided. These values must comply with the OSCAL SSP format references's allowed values, which are as follows: implemented, partial, planned, alternative, and not-applicable.

If filtering by control implementation status, a comma-demilited list of implementation status values should be provided. These values must comply with the OSCAL SSP format references's allowed values, which are as follows: implemented, partial, planned, alternative, and not-applicable.
If filtering by control origination, a comma-delimited list of control origination values should be provided. These values must comply with the OSCAL SSP format references's allowed values for the control origination property, which are as follows: system-specific, inherited, organization, customer-configured, and customer-provided.

You may filter by a combination of a profile, list of component names, and implementation statuses.
You may filter by a combination of a profile, list of component names, implementation statuses, and control origination values.

As with the other related author commands, if an existing destination file already exists, it is not updated if no changes would be made.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ The author commands are:
1. `catalog-generate` converts a control Catalog to individual controls in markdown format for addition or editing of guidance prose and parameters, with parameters stored in a yaml header at the top of the markdown file. `catalog-assemble` then gathers the prose and parameters and updates the controls in the Catalog to make a new OSCAL Catalog.
1. `profile-generate` takes a given Profile and converts the controls represented by its resolved profile catalog to individual controls in markdown format, with sections corresponding to the content that the Profile adds to the Catalog, along with both the current values of parameters in the resolved profile catalog - and the values that are being modified by the given profile's SetParameters. The user may edit the content or add more, and `profile-assemble` then gathers the updated content and creates a new OSCAL Profile that includes those changes.
1. `profile-resolve` is special as an authoring tool because it does not involve markdown and instead it simply creates a JSON resolved profile catalog from a specified JSON profile in the trestle directory. There are options to specify whether or not parameters get replace in the control prose or not, along with any special brackets that might be desired to indicate the parameters embedded in the prose.
1. `profile-inherit` takes a given parent profile and filters its contents based on the inherited controls included in a given ssp to be include in the final profile.
1. `component-generate` takes a given ComponentDefinition file and represents all the controls in markdown in separate directories for each Component in the file. This allows editing of the prose on a per-component basis. `component-assemble` then assembles the markdown for all controls in all component directories into a new, or the same, ComponentDefinition file.
1. `ssp-generate` takes a given Profile and an optional list of component-definitions, and represents the individual controls as markdown files with sections that prompt for prose regarding the implementation response for items in the statement of the control, with separate response sections for each component. `ssp-assemble` then gathers the response sections and creates an OSCAL System Security Plan comprising the resolved profile catalog and the implementation responses for each component. The list of component-definitions is optional, but without them the SSP will only have one component: `This System`. Rules, parameters and status associated with the implemented requirements are stored in the SetParameters and Properties of the components in the component definitions and represented in the markdown, allowing changes to be made to the parameter values and status. These edits are then included in the assembled SSP. Note that the rules themselves may not be edited and strictly correspond to what is in the component definitions.
1. `ssp-filter` takes a given ssp and filters its contents based on the controls included in a provided profile, or in a list of components to be included in the final ssp.
Expand Down Expand Up @@ -524,6 +525,51 @@ Similar options apply to the `jinja` authoring commands.

<details markdown>

<summary>trestle author profile-inherit</summary>

The `trestle author profile-inherit` command is different from the `generate/assemble` commands because it doesn't involve markdown and instead
it takes an parent profile and ssp and creates child profile in `JSON` format.

When utilizing a process with leveraged authorizations, use the command `trestle author profile-inherit` to create a profile with initial content using a parent profile and SSP with inheritable controls. The provided and responsibility statements for all `by-component` fields, as well as the implementation status, will be used to evaluate the leveraged SSP.
To be filtered from the output profile (i.e. controls delta profile), all components must have exported provided statements, no exported responsibility statements, and an implementation status of `implemented`.

The filter command is invoked as:

`trestle author profile-inherit --profile my_parent --ssp my_leveraged_ssp --output controls_delta_profile`

Both the parent profile and the SSP must be present in the trestle workspace. This command produces a new workspace profile that imports the parent profile and filters the inherited controls from the SSP using the `exclude-controls` and `include-controls` fields in the profile import.

<details markdown>

<summary>Example imports generated from profile-inherit</summary>

```json
"imports": [
{
"href": "trestle://profiles/controls_delta/profile.json",
"include-controls": [
{
"with-ids": [
"ac-2"
]
}
],
"exclude-controls": [
{
"with-ids": [
"ac-1"
]
}
]
}
]
```

</details>
</details>

<details markdown>

<summary>trestle author component-generate and component-assemble</summary>

The `trestle author component-generate` command takes a JSON ComponentDefinition file and creates markdown for its controls in separate directories for each of the DefinedComponents in the file. This allows specifying the implementation response and status for each component separately in separate markdown files for a control. In addition, the markdown captures Rules in the control that specify descriptions and parameter values that apply to the expected responses.
Expand Down Expand Up @@ -1010,13 +1056,13 @@ If you do not specify component-defintions during assembly, the markdown should

<summary>trestle author ssp-filter</summary>

Once you have an SSP in the trestle directory you can filter its contents with a profile, list of components, or list of implementation status values by using the command `trestle author ssp-filter`. The SSP is assumed to contain a superset of the controls needed by the profile if a profile is specified, and the filter operation will generate a new SSP with only those controls needed by the profile. If a list of component names is provided, only the specified components will appear in the system implementation of the ssp. If a list of implementation statuses is provided, controls with implementations including those statuses will appear in the control implementation of the ssp.
Once you have an SSP in the trestle directory you can filter its contents with a profile, list of components, list of implementation statuses, or list control origination values by using the command `trestle author ssp-filter`. The SSP is assumed to contain a superset of the controls needed by the profile if a profile is specified, and the filter operation will generate a new SSP with only those controls needed by the profile. If a list of component names is provided, only the specified components will appear in the system implementation of the ssp. If a list of implementation statuses is provided, controls with implementations including those statuses will appear in the control implementation of the ssp. Similarly, if a list of control origination values is provided, implemented requirements with a control origination property value included in the provided values will appear in the control implementation of the ssp.

The filter command is invoked as:

`trestle author ssp-filter --name my_ssp --profile my_profile --components comp_a:comp_b --implementation-status "planned,partial" --output my_culled_ssp`
`trestle author ssp-filter --name my_ssp --profile my_profile --components comp_a:comp_b --implementation-status "planned,partial" --control-origination "customer-configured" --output my_culled_ssp`

The SSP must be present in the trestle workspace and, if filtering by profile, that profile must also be in the trestle workspace. This command will generate a new SSP in the workspace. If the profile makes reference to a control not in the SSP then the routine will fail with an error message. Similarly, if one of the components is not present in the ssp the routine will also fail. The implementation statuses must be one of the allowed values as defined in the OSCAL SSP JSON format reference. Those include the following: implemented, partial, planned, alternative, and not-applicable. If an invalid value is provided, an error is returned.
The SSP must be present in the trestle workspace and, if filtering by profile, that profile must also be in the trestle workspace. This command will generate a new SSP in the workspace. If the profile makes reference to a control not in the SSP then the routine will fail with an error message. Similarly, if one of the components is not present in the ssp the routine will also fail. The implementation statuses must be one of the allowed values as defined in the OSCAL SSP JSON format reference. Those include the following: implemented, partial, planned, alternative, and not-applicable. If an invalid value is provided, an error is returned. The control origination values also must be one of the allowed values as defined in the OSCAL SSP JSON format reference. Those include the following: system-specific, inherited, customer-configured, customer-provided, and organization. If an invalid value is provided, an error is returned.

</details>

Expand Down
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ nav:
- csv_to_oscal_cd: api_reference/trestle.tasks.csv_to_oscal_cd.md
- ocp4_cis_profile_to_oscal_catalog: api_reference/trestle.tasks.ocp4_cis_profile_to_oscal_catalog.md
- ocp4_cis_profile_to_oscal_cd: api_reference/trestle.tasks.ocp4_cis_profile_to_oscal_cd.md
- oscal_catalog_to_csv: api_reference/trestle.tasks.oscal_catalog_to_csv.md
- oscal_profile_to_osco_profile: api_reference/trestle.tasks.oscal_profile_to_osco_profile.md
- osco_result_to_oscal_ar: api_reference/trestle.tasks.osco_result_to_oscal_ar.md
- tanium_result_to_oscal_ar: api_reference/trestle.tasks.tanium_result_to_oscal_ar.md
Expand Down
17 changes: 17 additions & 0 deletions tests/data/jinja/profile_to_docs_no_part_prose.md.jinja
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Control Page

{{
control_writer.write_control_with_sections(control, profile, group_title,
['statement', 'objective', 'ExpectedEvidence', 'guidance', 'table_of_parameters', 'instructions', 'additional_instructions'],
{'statement':'Statement Header',
'objective':'Control Objective Header',
'guidance':'Implementation Guidance',
'instructions': 'Instructions With Prose',
'additional_instructions': 'Additional Instructions (No Prose)',
'table_of_parameters':'Table of Control Parameters'
},
label_column=True,
add_group_to_title=False
)
| safe
}}
12 changes: 12 additions & 0 deletions tests/data/json/comp_def_b.json
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,14 @@
{
"name": "implementation-status",
"value": "implemented"
},
{
"name": "control-origination",
"value": "system-specific"
},
{
"name": "control-origination",
"value": "customer-configured"
}
],
"responsible-roles": [
Expand Down Expand Up @@ -300,6 +308,10 @@
{
"name": "implementation-status",
"value": "implemented"
},
{
"name": "control-origination",
"value": "system-specific"
}
],
"responsible-roles": [
Expand Down
Loading