From 245a51bbe01a2c0f2bdf5a51088c4ff106966838 Mon Sep 17 00:00:00 2001 From: morganrol Date: Thu, 27 May 2021 09:46:24 +0200 Subject: [VERSIONS] Use external python package to manage versions test the check_versons code has been repackaged in an external gitlab.com repo [1] It provides - better error management - reporting [1]: https://gitlab.com/Orange-OpenSource/lfn/onap/ integration/onap-version-status Issue-ID: TEST-340 Signed-off-by: mrichomme Change-Id: I6d892e8c5e6c1729a1073e9d6f538b636390515f --- security/docker/Dockerfile | 3 ++- security/onap_security/security_tests.py | 8 -------- security/setup.cfg | 1 - 3 files changed, 2 insertions(+), 10 deletions(-) (limited to 'security') diff --git a/security/docker/Dockerfile b/security/docker/Dockerfile index 40b5e60..b6b35d2 100644 --- a/security/docker/Dockerfile +++ b/security/docker/Dockerfile @@ -62,7 +62,8 @@ RUN set -x && \ pip3 install --no-cache-dir \ git+https://git.onap.org/integration/xtesting.git@$ONAP_TESTS_TAG#subdirectory=security && \ cd /kube-hunter && pip3 install -r /kube-hunter/requirements.txt && \ - pip3 install -r /check_versions/requirements.txt && \ + pip3 install --no-cache-dir \ + git+https://gitlab.com/Orange-OpenSource/lfn/onap/integration/onap-version-status.git && \ apk del .build-deps COPY docker/testcases.yaml /usr/lib/python3.8/site-packages/xtesting/ci/testcases.yaml diff --git a/security/onap_security/security_tests.py b/security/onap_security/security_tests.py index cdfafcd..cb4b2fd 100644 --- a/security/onap_security/security_tests.py +++ b/security/onap_security/security_tests.py @@ -154,11 +154,3 @@ class OnapSecurityKubeHunter(SecurityTesting): kube_hunter_cmd.append(j.address) self.cmd = kube_hunter_cmd self.error_string = "Vulnerabilties detected." - - -class OnapSecurityVersions(SecurityTesting): - """Check that Java and Python are available only in versions recommended by SECCOM.""" - def __init__(self, **kwargs): - super(OnapSecurityVersions, self).__init__(**kwargs) - self.cmd = ['/check_versions.sh', 'onap', '-r', '/check_versions/recommended_versions.yaml'] - self.error_string = "Not recommended versions found" diff --git a/security/setup.cfg b/security/setup.cfg index 6e07ada..61fe7fa 100644 --- a/security/setup.cfg +++ b/security/setup.cfg @@ -14,4 +14,3 @@ xtesting.testcase = nonssl_endpoints = onap_security.security_tests:OnapSecurityNonSSLPorts jdpw_ports = onap_security.security_tests:OnapSecurityJdwpPorts kube_hunter = onap_security.security_tests:OnapSecurityKubeHunter - versions = onap_security.security_tests:OnapSecurityVersions -- cgit 1.2.3-korg