aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormorganrol <morgan.richomme@orange.com>2021-05-27 09:46:24 +0200
committerMorgan Richomme <morgan.richomme@orange.com>2021-05-27 13:46:21 +0000
commit245a51bbe01a2c0f2bdf5a51088c4ff106966838 (patch)
tree01f4823b70dbda53d37d386b089725213b2c4884
parentfcaf69716e79737f4fc26824a56b838713fc3f18 (diff)
[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 <morgan.richomme@orange.com> Change-Id: I6d892e8c5e6c1729a1073e9d6f538b636390515f
-rw-r--r--security/docker/Dockerfile3
-rw-r--r--security/onap_security/security_tests.py8
-rw-r--r--security/setup.cfg1
3 files changed, 2 insertions, 10 deletions
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