Skip to content

Commit 48f66b1

Browse files
authored
Merge pull request #14743 from marcusburghardt/remove-compliance-trestle
Remove compliance-trestle dependency (CVE-2026-45725)
2 parents 3f9444b + 8ef3d52 commit 48f66b1

35 files changed

Lines changed: 3 additions & 439769 deletions

.github/workflows/automatus-debian12.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- name: Install Deps
1616
run: sudo apt-get update && sudo apt-get install -y cmake ninja-build python3-yaml python3-jinja2 git python3-deepdiff python3-requests jq python3-pip libxml2-utils xsltproc ansible-lint wget libdbus-1-dev libdbus-glib-1-dev libcurl4-openssl-dev libgcrypt20-dev libselinux1-dev libxslt1-dev libgconf2-dev libacl1-dev libblkid-dev libcap-dev libxml2-dev libldap2-dev libpcre3-dev python3 swig libxml-parser-perl libxml-xpath-perl libperl-dev libbz2-dev librpm-dev g++ libyaml-dev libxmlsec1-dev libxmlsec1-openssl
1717
- name: Install deps python
18-
run: pip3 install gitpython xmldiff compliance-trestle==2.4.0 lxml lxml-stubs requests
18+
run: pip3 install gitpython xmldiff lxml lxml-stubs requests
1919
- name: Checkout
2020
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4
2121
with:

.github/workflows/automatus-ubuntu2204.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- name: Install Deps
1616
run: sudo apt-get update && sudo apt-get install -y cmake ninja-build python3-yaml python3-jinja2 git python3-deepdiff python3-requests jq python3-pip libxml2-utils xsltproc ansible-lint wget libdbus-1-dev libdbus-glib-1-dev libcurl4-openssl-dev libgcrypt20-dev libselinux1-dev libxslt1-dev libgconf2-dev libacl1-dev libblkid-dev libcap-dev libxml2-dev libldap2-dev libpcre3-dev python3 swig libxml-parser-perl libxml-xpath-perl libperl-dev libbz2-dev librpm-dev g++ libyaml-dev libxmlsec1-dev libxmlsec1-openssl
1717
- name: Install deps python
18-
run: pip3 install gitpython xmldiff compliance-trestle==2.4.0 lxml lxml-stubs requests
18+
run: pip3 install gitpython xmldiff lxml lxml-stubs requests
1919
- name: Checkout
2020
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4
2121
with:

.github/workflows/update-oscal.yml

Lines changed: 0 additions & 59 deletions
This file was deleted.

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,6 @@ ocp4/profiles/test.profile
8080
.coverage
8181
coverage.xml
8282

83-
# Trestle specfic
84-
shared/references/oscal/.trestle/cache
8583

8684
# Ignore user-specific CLAUDE preferences
8785
CLAUDE.local.md

CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -184,10 +184,7 @@ endif()
184184
# prometheus_metrics requirements
185185
find_python_module(prometheus_client)
186186

187-
# compliance-trestle requirements
188187
find_python_module(requests)
189-
find_python_module(trestle)
190-
191188

192189
# OCP4 requires non-standard extensions. Vanilla OpenSCAP 1.2 doesn't support it.
193190
# See also: https://github.com/ComplianceAsCode/content/issues/6798
@@ -231,7 +228,6 @@ message(STATUS "python: ${Python_EXECUTABLE} (version: ${Python_VERSION})")
231228
message(STATUS "python yaml module: ${PY_YAML}")
232229
message(STATUS "python jinja2 module: ${PY_JINJA2}")
233230
# Optional Python Tools
234-
message(STATUS "python compliance-trestle module (optional): ${PY_TRESTLE}")
235231
message(STATUS "python cmakelint module (optional): ${PY_CMAKELINT}")
236232
message(STATUS "python github (PyGitHub) module (optional): ${PY_GITHUB}")
237233
message(STATUS "python json2html module (optional): ${PY_JSON2HTML}")

docs/manual/developer/05_tools_and_utilities.md

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -704,58 +704,6 @@ $ python3 utils/compare_versions.py compare_tags v0.1.67 v0.1.68 rhel9
704704
It will internally clone the upstream project, checkout these tags, generate ComplianceAsCode JSON manifests, compare them and print the output.
705705
706706
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` &mdash; Control to use as the source for control responses. To optionally filter by level, use the format <control_id>:<level>.
747-
- `-j`, `--json` &mdash; Path to the rules_dir.json. Defaults to /content/build/rule_dirs.json.
748-
- `-b`, `--build-config-yaml` &mdash; YAML file with information about the build configuration
749-
- `-t`, `--component-definition-type` &mdash; Type of component definition to create. Defaults to service. Options are service or validation.
750-
751-
An example of how to execute the script:
752-
753-
```bash
754-
$ ./build_product ocp4
755-
$ ./utils/rule_dir_json.py
756-
$ ./utils/oscal/build_cd_from_policy.py -o build/ocp4.json -p fedramp_rev4_high -pr ocp4 -c nist_ocp4:high
757-
```
758-
759707
### `utils/ansible_playbook_to_role.py` &ndash; Generates Ansible Roles and pushes them to Github
760708
761709
This script converts the Ansible playbooks created by the build system and converts them to Ansible roles and can upload them to GitHub.

requirements.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ lxml-stubs
1313
pycompliance
1414
# used in utils/controleval_metrics.py
1515
prometheus_client
16-
# used in utils/oscal
1716
requests
18-
compliance-trestle==4.0.1
1917
pyopenssl>=23.2.0
2018
pcre2

shared/references/oscal/.trestle/.keep

Whitespace-only changes.

shared/references/oscal/.trestle/config.ini

Lines changed: 0 additions & 1 deletion
This file was deleted.

shared/references/oscal/REAMDE.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)