Refactored it a bit
This commit is contained in:
42
README.md
Normal file
42
README.md
Normal file
@@ -0,0 +1,42 @@
|
||||
# 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:
|
||||
|
||||
```shell
|
||||
|
||||
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
|
||||
|
||||
```shell
|
||||
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.
|
||||
Reference in New Issue
Block a user