Skip to main content

GitlabHarvester

Tests PyPI Python License Downloads Last commit

GitlabHarvester is a lightweight tool built to install in a minute and show impact fast. It searches every repository of a GitLab instance for keywords and secrets through the API, without cloning, including GitLab CE, which has no instance-wide code search.

  • Red team engagements. One token, the whole instance: credentials, internal hosts and pivots hiding in the code. Loud and fast or low and slow, your call: rate limits, jitter and User-Agent rotation keep the noise and the signature under control.
  • Penetration tests. Instance-wide discovery of credentials, tokens and keys as part of the assessment.
  • Blue teams and security research. Secret hunting and hygiene audits: a quick first look, full baselines, regular re-scans of recent activity, deduplicated reports, and a history of runs in the log file.
  • Developers, analysts and architects. Not for secrets, but for code: fast search across a large codebase, even on GitLab CE.

GitlabHarvester run: project index, search plan, per-term progress and results

Install

pipx install gitlab-harvester    # or: pip install gitlab-harvester

Requires Python 3.10+ and a GitLab token with the read_api scope.

Quick start

Search one term in the default branch of every project:

export GITLAB_TOKEN='your-token-here'
gitlab-harvester -u https://gitlab.example.com -t "$GITLAB_TOKEN" -s password

The first run builds a project index (<host>_project_index.jsonl), and later runs reuse it. Hits are written to a JSONL session file as they are found.

Lists of terms, all branches and forks, fresh findings only, resuming, parallel requests and rate limits, deduplicated reports, config files: docs/USE_CASES.md.

Common options

Option Purpose
-b, --branches default|all|N branches to index and search
--forks include|skip|branch-diff|all-branches how forks are handled
--time-after DATE, --time-before DATE limit the index, its projects and the files with hits to a time window
--started-from 2024-06-01 search only indexed projects with activity since the date
-w, --workers N parallel API requests, for instances without rate limits
--rpm N, --index-rpm N, --search-rpm N requests per minute per worker: all, non-search, search
--jitter 0.01-0.05 random delay before every request (seconds, or 10ms-50ms)
-A STRING, --user-agent-file FILE fixed User-Agent, or a random one from the file for every request
-m dump-index, --dump-projects build or rebuild the project index
--session NAME, --resume name a session and continue it later
--post-process dedup,convert, --final-only deduplicate and convert the session right after the search
-c, --config FILE read options from an INI file (config.example.ini)

See docs/usage.md for every option, branch and fork strategies, and the output formats, and docs/USE_CASES.md for typical scenarios.

Development

git clone https://github.com/Cur1iosity/GitlabHarvester.git && cd GitlabHarvester
pip install -r requirements-dev.txt -e .
pytest

The tests and local runs use a bundled Fake GitLab API, so they need no real instance:

python -m fakegitlab
gitlab-harvester -u http://127.0.0.1:8080 -t dev-token -s password -b all

Details: docs/testing.md, docs/architecture.md. Debian/Kali packaging readiness: docs/packaging.md.

License

MIT. Use it only on GitLab instances you are authorized to work with: your own, your organization's, or those within the scope of an agreed engagement.

Metadata

Release files for gitlab-harvester 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gitlab-harvester 1.1.0
File Size Uploaded Provenance Actions
gitlab_harvester-1.1.0.tar.gz 59.2 kB With provenance Details for gitlab_harvester-1.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for gitlab-harvester 1.1.0
File Interpreter ABI Platform Actions
gitlab_harvester-1.1.0-py3-none-any.whl Python 3 none any Details for gitlab_harvester-1.1.0-py3-none-any.whl

Total release size: 125.1 kB

Release files / gitlab_harvester-1.1.0.tar.gz

Download URL gitlab_harvester-1.1.0.tar.gz
Size 59.2 kB
Tags Source
SHA-256 checksum
How to use checksums
3b38531b0e4c86f97f05f91f04a7a4d6d4469ac711f0f4d9a43e44446dedd37d
BLAKE2b-256 checksum
How to use checksums
60479d66cb7f1f2eea49a33cb528ee1bb8889caa38472d7dff633fb2a3dc9b19
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

Release files / gitlab_harvester-1.1.0-py3-none-any.whl

Download URL gitlab_harvester-1.1.0-py3-none-any.whl
Size 65.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a9eccc1aa9a8f068ebcd645c61f9143bc95a810f104fbd49eb440575992ea87d
BLAKE2b-256 checksum
How to use checksums
d82703d1cdb5fcfa4a852c3e2e6eb1395f8ab1c3f5970fd754abbb9896918d34
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

Security for gitlab-harvester 1.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for gitlab_harvester-1.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page