Gitleaks

AWS Security

Gitleaks, the open source secret scanner that finds hardcoded API keys, tokens and private keys across git history and your project files.

Base
Hardened build
minimal ports, security patches applied at build time
Access
Unique credentials
generated on first boot, readable only by root
Verified
Boots working
services pass a health gate before release
Support
24/7, 365 days
by email and live chat, 24 hour response SLA

Overview

Gitleaks is the widely used open source secret scanner. It reads your source code, configuration and git commit history and flags hardcoded secrets, API keys, cloud access keys, database passwords, private keys and tokens, using an embedded ruleset of more than one hundred and sixty detection patterns that recognise the credential formats of the major cloud and SaaS providers. It works in two complementary modes: a git mode that walks the entire commit history of a repository so a secret that was committed once and later deleted is still caught, and a directory mode that scans plain files and working trees. Every finding names the rule, the file, the line and the offending value, and results can be written as JSON or SARIF so they drop straight into a code review, a dashboard or a pipeline gate. The scanner is a single self contained binary with no database to maintain and no network access required, so it runs the same in a build runner or on a locked down host with no outbound internet.

It suits any team that wants to keep secrets out of source control: scanning repositories before they are shared, gating merges in continuous integration, or auditing an existing codebase for credentials that were committed by mistake.

Why the cloudimg image

Gitleaks has no login and no listening service, so what matters is that it is ready to scan the moment the instance boots, and cloudimg ships it exactly that way. The pinned scanner is installed from the official release and verified against its published checksum, git is preinstalled so commit history scanning works out of the box, and a scheduled scan of a directory you choose runs daily and writes machine readable JSON and SARIF reports for a pipeline to collect. Because the detection rules are built into the binary, scanning needs no outbound internet at all, so the instance runs happily in an isolated subnet. Read only self test fixtures are included so you can prove detection works on your own instance, a first boot service records a baseline scan, and every deployment comes with a paired deploy guide and 24/7 cloudimg support.

Common uses

  • Scanning a repository's full git history for secrets that were committed and later deleted
  • Adding a secret detection gate to a continuous integration pipeline using the documented exit code contract
  • Auditing a codebase for hardcoded credentials in an air gapped or regulated environment with no outbound internet

Key features

  • Gitleaks, the MIT-licensed open source secret scanner, preinstalled with git and a daily scheduled scan writing JSON and SARIF reports. Scan a directory or a full git commit history within seconds of launch - no install, no configuration and no network egress, saving hours of DevSecOps setup compared to a hand-rolled deployment.
  • Finds hardcoded API keys, cloud access keys, tokens, passwords and private keys using an embedded ruleset of 160+ detection rules, and follows a documented exit-code contract (0 clean, 1 leaks found) so it drops straight into any CI pipeline or pre-commit hook as a merge gate.
  • Runs completely offline - the detection rules are compiled into the binary - so the instance scans in a locked-down subnet with no outbound internet, and read-only self-test fixtures let you prove detection works on your own instance.

Description

This is a repackaged open source software product wherein additional charges apply for cloudimg support services.

## Overview

Gitleaks is the widely used open source scanner for hardcoded secrets. It reads source code, configuration files and git commit history and reports every hardcoded API key, cloud access key, token, password and private key it finds, using an embedded ruleset of more than 160 detection rules that recognise the credential formats of the major cloud and SaaS providers. This AMI delivers Gitleaks as a ready-to-run secret-scanning host: connect over SSH and the scanner, git and a scheduled scan are already in place, so you can scan a directory or a full repository history within seconds of launch.

## Two Complementary Scan Modes

Gitleaks scans in two modes that together catch far more than a working-tree grep. The git-history mode walks the entire commit history of a repository, so a secret that was committed once and later deleted is still caught - the exact case a working-tree scan misses. The directory mode scans plain files and working trees. Every finding names the rule, the file, the line, the commit and the offending value, and results can be written as JSON or SARIF for a code review, a dashboard or a pipeline gate.

## Runs Fully Offline

The detection rules are compiled into the scanner binary, so Gitleaks needs no network egress at all. This instance can sit in a locked-down subnet with no outbound internet and still scan every repository you give it - ideal for air-gapped and regulated environments where source code must never leave the network.

## Scheduled Scans And Machine-Readable Reports

A daily systemd timer scans a directory you choose and writes both JSON and SARIF reports, with latest.json and latest.sarif symlinks for CI pickup. SARIF is the format GitHub code scanning, AWS CodeCatalyst, Azure DevOps and most IDEs consume directly, so the reports drop straight into your existing tooling. The scan target, report directory, retention and an optional custom ruleset are all set in a single appliance configuration file.

## Prove It Yourself

Read-only self-test fixtures ship on the image: a leaky directory, a leaky git repository with a secret committed to history, and a clean directory. Running the scanner against them proves detection works on your own instance and demonstrates the documented exit-code contract that makes Gitleaks a reliable CI gate - exit 1 when a secret is found, exit 0 when the scan is clean.

## Ready To Use

Connect over SSH and everything is already installed. There is no web interface, no listening service, no admin account and no password - the SSH key you choose at launch is the only way in, and the shipped security group opens port 22 only. Compared to installing Gitleaks by hand, pinning a verified release, wiring up git-history scanning and building a scheduled scan with report rotation, this AMI eliminates the setup effort entirely.

## cloudimg Support

24/7 technical support by email and live chat. Our engineers help with directory and git-history scanning, the JSON and SARIF reports, the scheduled scan timer, custom rulesets and allowlists, the exit-code contract, and wiring Gitleaks into CI/CD pipelines and pre-commit hooks.

## Use Cases

  • Scanning a repository's full git history for secrets that were committed and later deleted
  • Adding a secret-detection gate to a CI/CD pipeline using the documented exit-code contract
  • Auditing source code for hardcoded credentials in an air-gapped or regulated environment with no outbound internet

## Getting Started

1. Launch the AMI in your preferred AWS region

2. SSH into the instance as the default login user for your operating system

3. Scan the shipped self-test fixtures to confirm detection, then scan your own repositories

4. Point the scheduled scan at your project checkouts and collect the JSON and SARIF reports

Related technologies

gitleakssecret scanningsecret detectiondevsecopssastcredential scanninggit securitysarifci securityopen source