Urgent.News

What's breaking now, across thousands of outlets.

Tech

# ๐Ÿ” Gitleaks: Detect Secrets Before They Reach Git

Have you ever accidentally committed an API key, database password, or access token to Git? ๐Ÿ˜ฌ A single mistake can expose sensitive credentials in a repository. Even if you remove the secret in the next commit, it may remain in Git history, forks, clones, or CI/CD logs. Gitleaks is an open-source secret-scanning tool that helps developers detect potentially exposed credentials in Gitโ€ฆ

Gitleaks is an open-source tool designed to scan source code and Git history for potentially exposed sensitive information such as API keys, database passwords, and access tokens. By detecting secrets early in the development process, Gitleaks helps teams prevent security incidents before they occur. Gitleaks focuses on exposing secrets rather than identifying vulnerabilities like SQL injection or outdated dependencies.

The tool works by scanning repositories and files, reporting potential findings, and enabling developers to investigate and remediate genuine exposure. In CI/CD pipelines, Gitleaks can fail the pipeline if a secret is detected, ensuring that sensitive information is not accidentally committed or deployed.

To install Gitleaks on Ubuntu, download the appropriate Linux archive from the official releases page, extract it, and install the binary. Verify the installation with the `gitleaks version` command. After installation, developers can scan their Git repositories or individual files to identify potential secrets. The tool can also be integrated into a GitLab CI/CD pipeline, running during the security stage and failing the pipeline if a secret is detected.

While Gitleaks offers several advantages such as being open-source, easy CI/CD integration, and Git history scanning, it also has some limitations including potential false positives, false negatives, and the fact that it is not a secrets manager but rather a tool for detecting potential secret exposures.

Written by urgent.news from Dev.to's reporting โ€” not their text. Machine-written โ€” may contain errors; check the original before relying on it.

Read the original at dev.to โ†’

More in Tech

ScopeNote: Turning Client Conversations into a Clear Freelance Scope

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle What I Built A client says, โ€œWe need a small website.

  • ScopeNote tool clarifies client conversations for freelancers
  • Converts briefs or recordings into structured project scopes
  • Offers free and premium plans with private workspace option

A bug in my own branch-guard hook, caught by typing one extra space

A bug in my own branch-guard hook, caught by typing one extra space Context: Last week I shipped a set of 4 Claude Code hooks that catch common agent mistakes โ€” no-op edits, pushes to the wrongโ€ฆ

  • Engineer found bug by typing extra space in test case
  • Block-wrong-branch.sh hook incorrectly reported branch name
  • Fix added whitespace normalization and regression test

More from Friday 16 October โ†’