Skip to content

pre-commit hook script with automatic installation of gitleaks and checks for sensitive information πŸ”’

License

Notifications You must be signed in to change notification settings

ruslanlap/pre-commit-auto-script

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

pre-commit hook script with automatic installation of gitleaks and checks for sensitive information πŸ”’

✨ Security Pre-commit Auto Script ✨

License: MIT GitHub last commit GitHub issues

This repository contains the pre-commit-auto-script, a script that helps automate the installation and configuration of pre-commit hooks in your Git repository. It utilizes gitleaks to enhance the security of your codebase. 😊

Alt

Typing SVG

Table of Contents πŸ“‹πŸ½οΈ πŸ“„

Overview

This repository contains the pre-commit-auto-script, a script that helps automate the installation and configuration of pre-commit hooks in your Git repository. It utilizes gitleaks to enhance the security of your codebase.

Requirements πŸ’Ύ

Before using this script, make sure you have the following dependencies installed:

  • Git βœ”οΈ
  • Curl βœ”οΈ

Installation

To install the script, simply run the following command in your terminal:

curl -sSfL https://raw.githubusercontent.com/ruslanlap/pre-commit-auto-script/main/install.sh | bash

EnableπŸ”” or Disable plugin πŸ”•

βœ… Enable:

source on-off-gitleaks.sh; enable

❌ Disable:

source on-off-gitleaks.sh; disable

Usage πŸš€

After running the installation command, it will automatically install and configure pre-commit hooks for your Git repository. It also integrates gitleaks to scan for sensitive information in your codebase and prevent leaks. πŸ›‘οΈ

You can review and customize the list of available hooks in the .pre-commit-config.yaml file, which will be created in the root directory of your project. For example, you can add more arguments to the .gitleaks.toml file.

DEMO πŸŽ₯

Wondering how the script works? Take a look at this demo:

Alt

Alt

Alt

Check on clone

GitLeaks Scanner πŸ•΅οΈβ€β™‚οΈπŸ”

This Bash script automates the process of scanning a Git repository for sensitive information using Gitleaks.

How it works

Usage

  1. Ensure Git and Gitleaks are installed and accessible in your environment.
  2. Run the script and enter the Git repository URL when prompted.
  3. Monitor the script's output for scan results and follow any actionable items indicated.

Features

  • Clones a repository from a specified URL into a local directory for scanning.
  • Runs Gitleaks to detect potential leaks (such as passwords, API keys, etc.) within the cloned repository.
  • Provides color-coded feedback throughout the process using ASCII art, emojis, and formatted messages.
  • Optionally cleans up temporary files after scanning.

Installation

To quickly install and use this script, run the following command:

curl -sSfL https://raw.githubusercontent.com/ruslanlap/pre-commit-auto-script/main/gitleaks_on_clone && chmod +x gitleaks_on_clone && ./gitleaks_on_clone

πŸ”’ Stay secure with pre-commit-auto-script and gitleaks! Happy coding! πŸš€

License

MIT

About

pre-commit hook script with automatic installation of gitleaks and checks for sensitive information πŸ”’

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages