aboutsummaryrefslogtreecommitdiffstats
path: root/security/onap_security
diff options
context:
space:
mode:
authorPawel Wieczorek <p.wieczorek2@samsung.com>2020-08-07 11:53:39 +0200
committerPawel Wieczorek <p.wieczorek2@samsung.com>2020-08-28 15:51:33 +0200
commit66eefb845990d01c0296074eabdad3a5ad86281a (patch)
tree545106229cb08e857ef3e6b302c63c07b7d18a73 /security/onap_security
parent6cfab47316074ff18faf94d25432ea320b280e04 (diff)
Add SECCOM-recommended version check in security tests
Issue-ID: INT-1571 Change-Id: Icd215ad5b49dcbf34eb46b973676f5141b589f83 Signed-off-by: Pawel Wieczorek <p.wieczorek2@samsung.com>
Diffstat (limited to 'security/onap_security')
-rw-r--r--security/onap_security/security_tests.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/security/onap_security/security_tests.py b/security/onap_security/security_tests.py
index 4136f66..cd26d7d 100644
--- a/security/onap_security/security_tests.py
+++ b/security/onap_security/security_tests.py
@@ -171,3 +171,13 @@ 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):
+ if "case_name" not in kwargs:
+ kwargs.get("case_name", 'versions')
+ super(OnapSecurityVersions, self).__init__(**kwargs)
+ self.cmd = ['/check_versions.sh', 'onap', '-r', '/check_versions/recommended_versions.yaml']
+ self.error_string = "Not recommended versions found"