Skip to main content

A CLI tool to scan repositories for secrets

Project description

Githush

Githush is a CLI tool that scans repositories for exposed secrets and prevents unsafe commits using Git hooks and CI/CD pipelines.

Features

  • Secret scanning for exposed credentials in repositories
  • Pre-commit hook integration to block unsafe commits
  • CI/CD compatibility to enforce security in pipelines

Installation

Note: this package is not published on PyPI, in order to install Githush you need to clone the repository and install it into a virtual environment.

Clone the repository

git clone https://github.com/nyradhr/githush.git
cd githush

Virtual environment setup

Create the virtual environment

Install uv

pipx install uv

Create the venv

uv venv

Activate the virtual environment

On Unix/Linux:

source .venv/bin/activate 

On Windows:

.venv\Scripts\activate

Usage

Scan a repository

Usage: githush scan [OPTIONS] PATH

  Scan a repository or directory for exposed secrets.

Options:
  --staged-only       Scan only staged files.
  --config-path PATH  Path to the githush configuration file.
  --help              Show this message and exit.

Install the pre-commit git hook

Usage: githush install-hook [OPTIONS] PATH

  Install pre commit hook to block commits containing secrets.

Options:
  --help  Show this message and exit.

For contributing developers

The following command installs the dependencies from the optional groups in pyproject.toml

uv pip install .[dev, lint] 

Run tests

uv run pytest

Run linters

uv run ruff check .

Run type checking

mypy githush

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

githush-0.1.1.tar.gz (19.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

githush-0.1.1-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file githush-0.1.1.tar.gz.

File metadata

  • Download URL: githush-0.1.1.tar.gz
  • Upload date:
  • Size: 19.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.8

File hashes

Hashes for githush-0.1.1.tar.gz
Algorithm Hash digest
SHA256 5dc191dbf0c6e443f1b14b3311fe51fefbb5c129bb750b0b7240afa29a8de611
MD5 d5c3d385ebd29fa1bedb99b0f29f5ec9
BLAKE2b-256 b111156df6f74fae1538f8687528323b95c33053f103093c9a5a76d72ae47887

See more details on using hashes here.

File details

Details for the file githush-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: githush-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 6.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.8

File hashes

Hashes for githush-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0aab7dd6aee3b682e8671bb1b65094b991c424d944183098a7029b5a9bbbcf0c
MD5 b51459c2c1b4208959b0a78a43491523
BLAKE2b-256 411f242436a7a99d582fb7fbb27bb535eb9bf9c5834543a338a4c1688688e6de

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page