audit-labs/audit-tools

A collection of scripts, queries, and other goodies you can use in an audit.

clone: git clone https://gitbay.org/audit-labs/audit-tools.git

1dd04ac70eac5371957530bf8aea1fa158b0f542

signed_unknown_key

author: Christian Cleberg <hello@cleberg.net> · 2025-12-02T21:31:17Z
committer: <noreply@github.com>

Enhance password policy verification in GitLab

Updated the password policy verification to include minimum password length and requirements for numbers, symbols, uppercase, and lowercase letters.
 applications/gitlab/passwords.py | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/applications/gitlab/passwords.py b/applications/gitlab/passwords.py
index 84ab107..ee21ef2 100644
--- a/applications/gitlab/passwords.py
+++ b/applications/gitlab/passwords.py
@@ -18,12 +18,19 @@ if __name__ == "__main__":
     response = requests.get(URL, headers=HEADERS, timeout=TIMEOUT)

     if response.status_code == 200:

         settings = response.json()

-        password_length = settings.get("password_length", "Not set")

-        password_complexity = settings.get("password_complexity", "Not set")

+        minimum_password_length = settings.get("minimum_password_length", "Not set")

+        password_number_required = settings.get("password_number_required", "Not set")

+        password_symbol_required = settings.get("password_symbol_required", "Not set")

+        password_uppercase_required = settings.get("password_uppercase_required", "Not set")

+        password_lowercase_required = settings.get("password_lowercase_required", "Not set")

 

-        print(f"Password Length: {password_length}")

-        print(f"Password Complexity: {password_complexity}")

+        print(f"Password Length: {minimum_password_length}")

+        print(f"Password Number Required: {password_number_required}")

+        print(f"Password Symbol Required: {password_symbol_required}")

+        print(f"Password Uppercase Required: {password_uppercase_required}")

+        print(f"Password Lowercase Required: {password_lowercase_required}")

     else:

         print(

             f"Failed to fetch application settings: {response.status_code}, {response.text}"

         )

+