Auditing apache indexes

This commit is contained in:
gbucchino 2023-09-20 10:49:31 +02:00
parent e56d161dc2
commit 876bb7e8e0
2 changed files with 5 additions and 4 deletions
core/plugins
reports/templates

@ -132,7 +132,7 @@ class Apache:
else:
self._reports["signature"]["audit"] = False
self._reports["signature"]["audit"] = \
self._reports["signature"]["msg"] = \
f"The file {path} do not exist"
def _parsingApacheConfigForSignature(self, fdata) -> dict:
@ -184,7 +184,7 @@ class Apache:
self._parsingApacheConfig(fdata)
else:
self._reports["indexes"]["audit"] = False
self._reports["indexes"]["audit"] = \
self._reports["indexes"]["msg"] = \
f"The file {path} do not exist"
def _parsingApacheConfig(self, fdata) -> dict:
@ -240,7 +240,7 @@ class Apache:
)
if grOption:
optsFound.append(opt)
# We can check if you found the options
if len(optsFound) == len(self._indexes['options']):
report["directories"][directory]["result"] = "success"
@ -251,6 +251,7 @@ class Apache:
report["directories"][directory]["options"].append(
f"{opt} is not removed. You should disable it"
)
optsFound.clear()
report["audit"] = True
report["description"] = self._indexes["description"]

@ -34,5 +34,5 @@
{% endfor %}
{% else %}
{{ data['apache']['msg'] }}
{{ data['apache']['signature']['msg'] }}
{% endif %}