aboutsummaryrefslogtreecommitdiffstats
path: root/security/onap_security/security_tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'security/onap_security/security_tests.py')
-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"