2026-04-02 13:05:56 +02:00
2026-04-02 13:05:56 +02:00
2026-04-02 13:05:56 +02:00
2026-04-02 13:05:56 +02:00
2026-04-02 13:05:56 +02:00
2026-04-02 13:05:56 +02:00
2026-04-02 13:05:56 +02:00
2026-04-02 13:05:56 +02:00

Gitlab Repository Checker

This tool acts as a small helper to find specific strings in files (e.g. axios 1.4.1 in package.json). It will query the Gitlab API for groups and projects and pull repos locally via HTTPS and search them via ripgrep.

In the end a CSV report will be generated with the findings.

It can also be used for all kinds of purposes for automated repository searches.

Configuration

You can configure the tool via environment variables:


GITLAB_URL          # Required - Defines the Gitlab URL (for Self Hosted instances or Managed)
GITLAB_PAT          # Required - A Gitlab personal access tokens with permissions to read groups and projects
GITLAB_GROUP_ID     # Optional - An ID of a specific group, default is all groups will be checked for repositories
GLOB_FILE           # Optional - A file containing glob patterns or filenames to search patterns for (Its recursive in all subdirs)
GIT_TMP_ROOT        # Optional - The path where repositories are cloned to for scanning - Default - /tmp/repo_check
REPORT_PATH         # Optional - The path where reports are stored - Default - /tmp/check_reports
REPORT_FILE         # Optional - The Filename for the report - Default - report.csv
PATTERN_FILE        # Optional - The file containing the regex patterns which ripgrep will use to match strings - Default - patternfile 

Execution

python -m venv .venv
source .venv/bin/activate
pip install .
python -u check_gitlab.py

You can also try to use the Dockerfile

Important

*This product is 100% AI Free. **It is not nice code. Made in a hurry and and with low attention span.
***Product is not vegan. Might contain bugs and nuts.

Description
Small script to check repositories on self hosted or managed gitlab for strings in files
Readme 40 KiB
Languages
Python 97.1%
Dockerfile 2.9%