Auditing apache indexes
This commit is contained in:
parent
e56d161dc2
commit
876bb7e8e0
@ -132,7 +132,7 @@ class Apache:
|
|||||||
|
|
||||||
else:
|
else:
|
||||||
self._reports["signature"]["audit"] = False
|
self._reports["signature"]["audit"] = False
|
||||||
self._reports["signature"]["audit"] = \
|
self._reports["signature"]["msg"] = \
|
||||||
f"The file {path} do not exist"
|
f"The file {path} do not exist"
|
||||||
|
|
||||||
def _parsingApacheConfigForSignature(self, fdata) -> dict:
|
def _parsingApacheConfigForSignature(self, fdata) -> dict:
|
||||||
@ -184,7 +184,7 @@ class Apache:
|
|||||||
self._parsingApacheConfig(fdata)
|
self._parsingApacheConfig(fdata)
|
||||||
else:
|
else:
|
||||||
self._reports["indexes"]["audit"] = False
|
self._reports["indexes"]["audit"] = False
|
||||||
self._reports["indexes"]["audit"] = \
|
self._reports["indexes"]["msg"] = \
|
||||||
f"The file {path} do not exist"
|
f"The file {path} do not exist"
|
||||||
|
|
||||||
def _parsingApacheConfig(self, fdata) -> dict:
|
def _parsingApacheConfig(self, fdata) -> dict:
|
||||||
@ -240,7 +240,7 @@ class Apache:
|
|||||||
)
|
)
|
||||||
if grOption:
|
if grOption:
|
||||||
optsFound.append(opt)
|
optsFound.append(opt)
|
||||||
|
|
||||||
# We can check if you found the options
|
# We can check if you found the options
|
||||||
if len(optsFound) == len(self._indexes['options']):
|
if len(optsFound) == len(self._indexes['options']):
|
||||||
report["directories"][directory]["result"] = "success"
|
report["directories"][directory]["result"] = "success"
|
||||||
@ -251,6 +251,7 @@ class Apache:
|
|||||||
report["directories"][directory]["options"].append(
|
report["directories"][directory]["options"].append(
|
||||||
f"{opt} is not removed. You should disable it"
|
f"{opt} is not removed. You should disable it"
|
||||||
)
|
)
|
||||||
|
optsFound.clear()
|
||||||
|
|
||||||
report["audit"] = True
|
report["audit"] = True
|
||||||
report["description"] = self._indexes["description"]
|
report["description"] = self._indexes["description"]
|
||||||
|
@ -34,5 +34,5 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ data['apache']['msg'] }}
|
{{ data['apache']['signature']['msg'] }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
Loading…
Reference in New Issue
Block a user