aboutsummaryrefslogtreecommitdiff
path: root/applications/gitlab/gitlab_admins.py
diff options
context:
space:
mode:
authorChristian Cleberg <hello@cleberg.net>2025-04-07 22:52:59 -0500
committerGitHub <noreply@github.com>2025-04-07 22:52:59 -0500
commit8b78620c2c39c996007212616a586a8644ae7e33 (patch)
tree309e2dd196f9ce99893bf5f945dfcd8a8c0c3615 /applications/gitlab/gitlab_admins.py
parentbee22b97b652cd04fa470d7f31c3b917e44f3ab9 (diff)
downloadaudit-tools-8b78620c2c39c996007212616a586a8644ae7e33.tar.gz
audit-tools-8b78620c2c39c996007212616a586a8644ae7e33.tar.bz2
audit-tools-8b78620c2c39c996007212616a586a8644ae7e33.zip
Gitlab enhancements (#2)
* add various in-progress scripts for gitlab * Commit from GitHub Actions (Ruff) * add gitlab results for free-tier tools * Commit from GitHub Actions (Ruff) * add gitlab results for ultimate-tier tools * Commit from GitHub Actions (Ruff) --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'applications/gitlab/gitlab_admins.py')
-rw-r--r--applications/gitlab/gitlab_admins.py25
1 files changed, 0 insertions, 25 deletions
diff --git a/applications/gitlab/gitlab_admins.py b/applications/gitlab/gitlab_admins.py
deleted file mode 100644
index 091032c..0000000
--- a/applications/gitlab/gitlab_admins.py
+++ /dev/null
@@ -1,25 +0,0 @@
-"""
-Gather all members of a GitLab group and their access levels.
-"""
-
-import requests
-
-BASE_URL = "https://gitlab.com/api/v4"
-PRIVATE_TOKEN = "your_access_token"
-GROUP_ID = "your_group_id"
-TIMEOUT = 30
-
-URL = f"{BASE_URL}/groups/{GROUP_ID}/members"
-HEADERS = {"PRIVATE-TOKEN": PRIVATE_TOKEN}
-
-if __name__ == "__main__":
- # Get group members
- response = requests.get(URL, headers=HEADERS, timeout=TIMEOUT)
- if response.status_code == 200:
- members = response.json()
- for member in members:
- print(
- f"Username: {member['username']}, Access Level: {member['access_level']}"
- )
- else:
- print(f"Failed to fetch group members: {response.status_code}, {response.text}")