AttributeError bug on 1.1.14 branch_protections_for_admins
Description
Control: 1.1.14 - branch_protections_for_admins is throwing an AttributeError on a default gitlab-ee install.
We should add AttributeError to the exceptions that are currently handled in this control, to then return SKIP (None).
Command
gitlabcis https://host --token
gitlabcis Version
gitlabcis version: 1.10.0
GitLab Server Version
v17.9.1-ee
Logs / Screenshots
screenshot
Traceback:
Scanning: 76%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████ | 93/122 completed [elapsed: 00:29 remaining: 00:09]
Traceback (most recent call last):
File "/Users/xakep/.pyenv/versions/3.9.18/bin/gitlabcis", line 8, in <module>
sys.exit(main())
File "/Users/xakep/.pyenv/versions/3.9.18/lib/python3.9/site-packages/gitlabcis/cli/main.py", line 239, in main
_res = future.result()
File "/Users/xakep/.pyenv/versions/3.9.18/lib/python3.9/concurrent/futures/_base.py", line 439, in result
return self.__get_result()
File "/Users/xakep/.pyenv/versions/3.9.18/lib/python3.9/concurrent/futures/_base.py", line 391, in __get_result
raise self._exception
File "/Users/xakep/.pyenv/versions/3.9.18/lib/python3.9/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/Users/xakep/.pyenv/versions/3.9.18/lib/python3.9/site-packages/gitlabcis/cli/main.py", line 216, in executeBenchmark
result=_projectFunction(glEntity, glObject, **kwargs),
File "/Users/xakep/.pyenv/versions/3.9.18/lib/python3.9/site-packages/gitlabcis/benchmarks/source_code_1/code_changes_1_1.py", line 519, in branch_protections_for_admins
if settings.group_owners_can_manage_default_branch_protection \
File "/Users/xakep/.pyenv/versions/3.9.18/lib/python3.9/site-packages/gitlab/base.py", line 134, in __getattr__
raise AttributeError(message)
AttributeError: 'ApplicationSettings' object has no attribute 'group_owners_can_manage_default_branch_protection'
cc: @nmcd
