Skip to content

Remove compliance-trestle dependency (CVE-2026-45725)#14743

Merged
Mab879 merged 8 commits into
ComplianceAsCode:masterfrom
marcusburghardt:remove-compliance-trestle
May 29, 2026
Merged

Remove compliance-trestle dependency (CVE-2026-45725)#14743
Mab879 merged 8 commits into
ComplianceAsCode:masterfrom
marcusburghardt:remove-compliance-trestle

Conversation

@marcusburghardt

Copy link
Copy Markdown
Member

Remove compliance-trestle dependency (CVE-2026-45725)

Description:

  • Remove the compliance-trestle Python 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).
  • Remove the utils/oscal/ OSCAL component definition generation package that depended on compliance-trestle. This tooling is no longer used in ComplyTime projects.
  • Remove the tests/unit/utils/oscal/ test suite and all associated test fixtures.
  • Remove the 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.
  • Remove the update-oscal.yml GitHub Actions workflow that used the trestle CLI to import upstream OSCAL content.
  • Remove the utils/complyscribe-cli-compd.sh helper script. The complyscribe project has been archived.
  • Clean up CMake build system to remove trestle module detection and trestle-gated test blocks.
  • Remove compliance-trestle==2.4.0 (also vulnerable) from the automatus CI workflows for Debian 12 and Ubuntu 22.04.
  • Remove the build_cd_from_policy.py section from the developer documentation.

Rationale:

  • The compliance-trestle dependency 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.
  • The OSCAL component definition generation tooling (utils/oscal/) that depended on compliance-trestle is no longer used in ComplyTime projects, making complete removal the cleanest remediation approach.
  • The complyscribe project that consumed the helper script has been archived.
  • Both pinned versions in the repository (4.0.1 in requirements.txt and 2.4.0 in CI workflows) are within the affected version ranges.

Review Hints:

  • The branch contains 7 commits organized chronologically for easier review. It is recommended to review them in sequence as each commit is self-contained and addresses a specific area:
    1. refactor: remove utils/oscal/ - the Python package (source code)
    2. test: remove tests/ - associated test suite and fixtures
    3. refactor: remove shared/references/oscal/ - vendored OSCAL data (large JSON files, bulk of the diff)
    4. ci: remove update-oscal workflow and script - CI workflow and helper script
    5. build: clean up CMake - build system references
    6. fix: remove dependency - requirements.txt and CI pip installs
    7. docs: update documentation - developer guide cleanup
  • Commit 3 accounts for the vast majority of the diff (~432k lines) since it removes the large vendored NIST/FedRAMP JSON catalogs. The actual code changes are in the other commits.
  • No product builds are affected by this change. The compliance-trestle module was always optional (PY_TRESTLE gated) and no build target depended on it.
  • To verify the removal is complete: grep -r "compliance.trestle\|from trestle\|import trestle\|PY_TRESTLE" . should return no results.

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>
@Mab879 Mab879 self-assigned this May 28, 2026
@Mab879 Mab879 added this to the 0.1.82 milestone May 28, 2026
@Mab879 Mab879 added the Infrastructure Our content build system label May 28, 2026
@marcusburghardt

Copy link
Copy Markdown
Member Author

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 Mab879 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR. I have a few comments.

  1. 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.

  1. Review test-requirements.txt, remove outdated comment. PyGitHub used by other scripts as well.

Claude Code was used in this review.

Comment thread CMakeLists.txt
find_python_module(prometheus_client)

# compliance-trestle requirements
find_python_module(requests)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

requests is still in this project, it was not removed in the requirements.txt, so this should stay

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
@marcusburghardt

Copy link
Copy Markdown
Member Author

All items addressed in 8ef3d52031:

  1. Removed orphaned .gitignore entries (lines 83-84) for the deleted trestle cache directory.
  2. Removed stale # used in tests/units/utils/oscal comment from test-requirements.txt. PyGitHub kept since it's used by ansible_playbook_to_role.py, release_helper.py, and update_ansible_galaxy_roles.py.
  3. Restored find_python_module(requests) in CMakeLists.txt.

Thanks for the review!

@marcusburghardt marcusburghardt requested a review from Mab879 May 29, 2026 06:00
@Mab879 Mab879 merged commit 48f66b1 into ComplianceAsCode:master May 29, 2026
65 of 68 checks passed
@marcusburghardt marcusburghardt deleted the remove-compliance-trestle branch May 29, 2026 14:52
Arden97 pushed a commit to Arden97/content that referenced this pull request Jun 1, 2026
- 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Infrastructure Our content build system

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants