Merge pull request #33 from aquasecurity/false-pos

401 status says pod was protected
This commit is contained in:
Liz Rice
2018-08-23 09:51:59 +01:00
committed by GitHub

View File

@@ -199,7 +199,8 @@ class SecureKubeletPortHunter(Hunter):
containerName=self.pod["container"],
cmd = ""
)
return requests.post(run_url, allow_redirects=False ,verify=False).status_code != 404
status_code = requests.post(run_url, allow_redirects=False, verify=False).status_code
return (status_code != 404 and status_code != 401)
# returns list of currently running pods
def test_running_pods(self):