From 30d90acead685df624e6471fb2aa9e721c7b4933 Mon Sep 17 00:00:00 2001 From: Jennifer Power Date: Tue, 22 Aug 2023 12:56:56 -0400 Subject: [PATCH] build(deps): updates compliance-trestle to point to fork for feature testing Signed-off-by: Jennifer Power --- poetry.lock | 16 ++++++++++------ pyproject.toml | 2 +- tests/testutils.py | 1 + trestlebot/tasks/authored/ssp.py | 6 ++++-- 4 files changed, 16 insertions(+), 9 deletions(-) diff --git a/poetry.lock b/poetry.lock index 85dd0878..39648882 100644 --- a/poetry.lock +++ b/poetry.lock @@ -427,14 +427,12 @@ files = [ [[package]] name = "compliance-trestle" -version = "2.2.1" +version = "0.1.dev1090+gf8ae19d" description = "Tools to manage & autogenerate python objects representing the OSCAL layers/models" optional = false python-versions = "*" -files = [ - {file = "compliance-trestle-2.2.1.tar.gz", hash = "sha256:d9da50ea5da3f2df60ddaa83af52c73c37b8b48cf91e28eaac6df0af6dbad73b"}, - {file = "compliance_trestle-2.2.1-py2.py3-none-any.whl", hash = "sha256:ef964173a9f0841565e705334386717d6869c38747f9af2bcfc4956a684285df"}, -] +files = [] +develop = false [package.dependencies] attrs = "*" @@ -457,6 +455,12 @@ pywin32 = {version = ">=1.0", markers = "platform_system == \"Windows\""} [package.extras] dev = ["gitpython", "livereload", "markdown-include", "mkdocs", "mkdocs-material", "mkdocstrings[python-legacy] (>=0.19.0)", "mypy", "pep8-naming", "pre-commit (>=2.4.0)", "pylint", "pymdown-extensions", "pytest (>=5.4.3)", "pytest-cov (>=2.10.0)", "pytest-random-order", "pytest-xdist", "python-dateutil", "python-semantic-release", "setuptools", "types-PyYAML", "types-paramiko", "types-requests", "types-setuptools", "wheel", "yapf"] +[package.source] +type = "git" +url = "https://github.com/RedHatProductSecurity/compliance-trestle.git" +reference = "PSCE-143" +resolved_reference = "f8ae19d83f8b8c57c7550eded0d56db651f75f4c" + [[package]] name = "coverage" version = "7.2.7" @@ -2158,4 +2162,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p [metadata] lock-version = "2.0" python-versions = "^3.8.1" -content-hash = "e4421783726e2c16fa65098b19709d0ae51e3887b99304be381c9fb15f446593" +content-hash = "2487409638eb23594286b25575801a6d6f10e583995bfb84b6eee08a1cf476ce" diff --git a/pyproject.toml b/pyproject.toml index 8073ba18..29741fda 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,7 +21,7 @@ trestle-bot = "trestlebot.cli:run" [tool.poetry.dependencies] python = '^3.8.1' gitpython = "^3.1.31" -compliance-trestle = "^2.2.1" +compliance-trestle = {git = "https://github.com/RedHatProductSecurity/compliance-trestle.git", rev = "PSCE-143"} github3-py = "^4.0.1" python-gitlab = "^3.15.0" diff --git a/tests/testutils.py b/tests/testutils.py index 9788ca5c..f5de1966 100644 --- a/tests/testutils.py +++ b/tests/testutils.py @@ -80,6 +80,7 @@ def setup_for_ssp( yaml_header=None, allowed_sections=None, force_overwrite=None, + leveraged_ssp="" ) return args diff --git a/trestlebot/tasks/authored/ssp.py b/trestlebot/tasks/authored/ssp.py index fec1a6cc..0ed00fcd 100644 --- a/trestlebot/tasks/authored/ssp.py +++ b/trestlebot/tasks/authored/ssp.py @@ -192,8 +192,9 @@ def regenerate(self, model_path: str, markdown_path: str) -> None: comps = self.ssp_index.get_comps_by_ssp(ssp) profile = self.ssp_index.get_profile_by_ssp(ssp) - # TODO: Add this to the trestle command once available - _ = self.ssp_index.get_leveraged_by_ssp(ssp) + leveraged_ssp = self.ssp_index.get_leveraged_by_ssp(ssp) + if leveraged_ssp is None: + leveraged_ssp = "" try: exit_code = ssp_generate._generate_ssp_markdown( @@ -204,6 +205,7 @@ def regenerate(self, model_path: str, markdown_path: str) -> None: yaml_header={}, overwrite_header_values=False, force_overwrite=False, + leveraged_ssp_name_or_href=leveraged_ssp, ) if exit_code != CmdReturnCodes.SUCCESS.value: raise AuthoredObjectException(