Remove compliance-trestle dependency (CVE-2026-45725)#14743
Conversation
Remove the OSCAL component definition generation package that depends on compliance-trestle. This package is no longer used in ComplyTime projects. Removed files: - utils/oscal/__init__.py - utils/oscal/build_cd_from_policy.py - utils/oscal/cd_generator.py - utils/oscal/control_selector.py - utils/oscal/params_extractor.py - utils/oscal/rules_transformer.py Assisted-by: OpenCode (claude-opus-4-6) Signed-off-by: Marcus Burghardt <maburgha@redhat.com>
Remove all unit tests and test fixtures for the deleted OSCAL component definition generation package. Removed files: - tests/unit/utils/oscal/test_cd_generator.py - tests/unit/utils/oscal/test_control_selector.py - tests/unit/utils/oscal/test_rules_transformer.py - tests/unit/utils/oscal/data/ (test fixtures) Assisted-by: OpenCode (claude-opus-4-6) Signed-off-by: Marcus Burghardt <maburgha@redhat.com>
Remove the compliance-trestle managed workspace containing vendored NIST 800-53 catalogs and FedRAMP HIGH baseline profiles. This data was exclusively used by the removed utils/oscal/ OSCAL CD generation tooling. Removed content: - .trestle/ workspace configuration - NIST SP 800-53 Rev4 and Rev5 catalogs (JSON) - FedRAMP Rev4 and Rev5 HIGH baseline profiles (JSON) The upstream OSCAL data remains freely available from: - https://github.com/usnistgov/oscal-content - https://github.com/GSA/fedramp-automation Assisted-by: OpenCode (claude-opus-4-6) Signed-off-by: Marcus Burghardt <maburgha@redhat.com>
Remove the update-oscal.yml GitHub Actions workflow that used the compliance-trestle CLI to import and update vendored NIST/FedRAMP OSCAL content. Remove the complyscribe-cli-compd.sh helper script that was part of the OSCAL component definition workflow. The complyscribe project has been archived. Assisted-by: OpenCode (claude-opus-4-6) Signed-off-by: Marcus Burghardt <maburgha@redhat.com>
Remove trestle module detection from CMakeLists.txt and remove trestle-gated test blocks from tests/CMakeLists.txt. Changes: - Remove find_python_module(trestle) and find_python_module(requests) detection (requests was only detected for trestle's sake) - Remove PY_TRESTLE status message from build summary - Remove conditional utils/oscal unit test and mypy test blocks - Clean up oscal/ exclusion regex from utils test registration since the directory no longer exists Assisted-by: OpenCode (claude-opus-4-6) Signed-off-by: Marcus Burghardt <maburgha@redhat.com>
Remove compliance-trestle from requirements.txt and CI workflows. This resolves CVE-2026-45725 (GHSA-g3vg-vx23-3858), a high severity arbitrary file write via cache path traversal in compliance-trestle's remote fetching mechanism. Changes: - Remove compliance-trestle==4.0.1 from requirements.txt - Remove compliance-trestle==2.4.0 from automatus-debian12.yaml - Remove compliance-trestle==2.4.0 from automatus-ubuntu2204.yaml Assisted-by: OpenCode (claude-opus-4-6) Signed-off-by: Marcus Burghardt <maburgha@redhat.com>
Remove the documentation section for utils/oscal/build_cd_from_policy.py from the developer tools and utilities guide, as the script has been removed along with the compliance-trestle dependency. Assisted-by: OpenCode (claude-opus-4-6) Signed-off-by: Marcus Burghardt <maburgha@redhat.com>
|
The failing CI Lint issues were already there but were flagged since a line was changed in these files. In any case, here is a separate PR fixing them so we don't mix these aesthetic changes in the same PR: |
Mab879
left a comment
There was a problem hiding this comment.
Thanks for the PR. I have a few comments.
- Orphaned .gitignore entry (Cleanup)
.gitignore:83-84
Trestle specfic
shared/references/oscal/.trestle/cache
Points to a directory tree that no longer exists. Two dead lines that should
be removed.
- Review test-requirements.txt, remove outdated comment. PyGitHub used by other scripts as well.
Claude Code was used in this review.
| find_python_module(prometheus_client) | ||
|
|
||
| # compliance-trestle requirements | ||
| find_python_module(requests) |
There was a problem hiding this comment.
requests is still in this project, it was not removed in the requirements.txt, so this should stay
There was a problem hiding this comment.
Addressed in 8ef3d52031: restored find_python_module(requests) in CMakeLists.txt since the module is still a project dependency.
- Remove orphaned .gitignore entries for the deleted shared/references/oscal/.trestle/cache directory - Remove stale comment in test-requirements.txt referencing deleted tests/units/utils/oscal (PyGitHub kept as it is used by other scripts) - Restore find_python_module(requests) in CMakeLists.txt since requests is still a project dependency Addresses PR ComplianceAsCode#14743 review feedback from @Mab879. Assisted-by: OpenCode (claude-opus-4-6) Signed-off-by: Marcus Burghardt <maburgha@redhat.com>
|
All items addressed in
Thanks for the review! |
- Remove orphaned .gitignore entries for the deleted shared/references/oscal/.trestle/cache directory - Remove stale comment in test-requirements.txt referencing deleted tests/units/utils/oscal (PyGitHub kept as it is used by other scripts) - Restore find_python_module(requests) in CMakeLists.txt since requests is still a project dependency Addresses PR ComplianceAsCode#14743 review feedback from @Mab879. Assisted-by: OpenCode (claude-opus-4-6) Signed-off-by: Marcus Burghardt <maburgha@redhat.com>
Remove compliance-trestle dependency (CVE-2026-45725)
Description:
compliance-trestlePython dependency to resolve CVE-2026-45725 (GHSA-g3vg-vx23-3858), a high severity arbitrary file write via cache path traversal vulnerability (CVSS 4.0: 7.1).utils/oscal/OSCAL component definition generation package that depended on compliance-trestle. This tooling is no longer used in ComplyTime projects.tests/unit/utils/oscal/test suite and all associated test fixtures.shared/references/oscal/trestle-managed workspace containing vendored NIST SP 800-53 catalogs and FedRAMP HIGH baseline profiles (~18MB). The upstream data remains freely available from usnistgov/oscal-content and GSA/fedramp-automation.update-oscal.ymlGitHub Actions workflow that used thetrestleCLI to import upstream OSCAL content.utils/complyscribe-cli-compd.shhelper script. The complyscribe project has been archived.compliance-trestle==2.4.0(also vulnerable) from the automatus CI workflows for Debian 12 and Ubuntu 22.04.build_cd_from_policy.pysection from the developer documentation.Rationale:
compliance-trestledependency has CVE-2026-45725, a high severity vulnerability in its remote fetching cache mechanism that enables arbitrary file write with attacker-controlled content via path traversal, potentially leading to remote code execution.utils/oscal/) that depended on compliance-trestle is no longer used in ComplyTime projects, making complete removal the cleanest remediation approach.4.0.1in requirements.txt and2.4.0in CI workflows) are within the affected version ranges.Review Hints:
refactor: remove utils/oscal/- the Python package (source code)test: remove tests/- associated test suite and fixturesrefactor: remove shared/references/oscal/- vendored OSCAL data (large JSON files, bulk of the diff)ci: remove update-oscal workflow and script- CI workflow and helper scriptbuild: clean up CMake- build system referencesfix: remove dependency- requirements.txt and CI pip installsdocs: update documentation- developer guide cleanupcompliance-trestlemodule was always optional (PY_TRESTLEgated) and no build target depended on it.grep -r "compliance.trestle\|from trestle\|import trestle\|PY_TRESTLE" .should return no results.