You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It will internally clone the upstream project, checkout these tags, generate ComplianceAsCode JSON manifests, compare them and print the output.
705
705
706
706
707
-
### `utils/oscal/build_cd_from_policy.py` – Build a Component Definition from a Policy
708
-
709
-
This script builds an OSCAL Component Definition (cd) (version `1.0.4`) for an existing OSCAL profile from a policy. The script uses the
710
-
[compliance-trestle](https://github.com/oscal-compass/compliance-trestle) library to build the component definition. The component definition can be used with the `compliance-trestle` CLI after generation.
711
-
712
-
Some assumption made by this script:
713
-
714
-
- The script maps control file statuses to valid OSCAL [statuses](https://pages.nist.gov/OSCAL-Reference/models/v1.1.1/system-security-plan/json-reference/#/system-security-plan/control-implementation/implemented-requirements/by-components/implementation-status) as follows:
715
-
716
-
* `pending` - `alternative`
717
-
718
-
* `not applicable`: `not-applicable`
719
-
720
-
* `inherently met`: `implemented`
721
-
722
-
* `documentation`: `implemented`
723
-
724
-
* `planned`: `planned`
725
-
726
-
* `partial`: `partial`
727
-
728
-
* `supported`: `implemented`
729
-
730
-
* `automated`: `implemented`
731
-
732
-
* `manual`: `alternative`
733
-
734
-
* `does not meet`: `alternative`
735
-
736
-
- The script uses the "Section *letter*:" convention in the control notes to create statements under the implemented requirements.
737
-
- The script maps parameter to rules uses the `xccdf_variable` field under `template.vars`
738
-
- To determine what responses will mapped to the controls in the OSCAL profile the control id and label property from the resolved catalog is searched.
739
-
740
-
It supports the following arguments:
741
-
- `-o`, `--output` — Path to write the cd to
742
-
- `-r`, `--root` — Root of the SSG project. Defaults to /content.
743
-
- `-v`, `--vendor-dir` — Path to the vendor directory with third party OSCAL artifacts
744
-
- `-p`, `--profile` — Main profile href, or name of the profile model in the trestle workspace
745
-
- `-pr`, `--product` — Product to build cd with
746
-
- `-c`, `--control` — Control to use as the source for control responses. To optionally filter by level, use the format <control_id>:<level>.
747
-
- `-j`, `--json` — Path to the rules_dir.json. Defaults to /content/build/rule_dirs.json.
748
-
- `-b`, `--build-config-yaml` — YAML file with information about the build configuration
749
-
- `-t`, `--component-definition-type` — Type of component definition to create. Defaults to service. Options are service or validation.
0 commit comments