WeAreDevelopers LIVE Apr 27, 2023

Stop Committing Your Secrets - GIt Hooks To The Rescue!

Dwayne Mcdaniel

Once an API key enters your Git history, it stays there forever. Discover how pre-commit hooks can automatically block hard-coded secrets before they ever leave your local terminal.

Pause
Mute Enter Fullscreen
#1 about 6 min

Real world incidents of hardcoded credential software leaks

High-profile data breaches showcase how exposed credentials compromise otherwise secure networks.

#2 about 5 min

The mechanics of accidental credential exposure in commits

Fast-paced debugging and temporary test variables inadvertently cause millions of public credential leaks.

#3 about 3 min

Shifting security responsibility into modern developer workflows

Integrating native security checks directly into code repositories addresses the ratio imbalance between engineering and security teams.

#4 about 8 min

How Git architecture fundamentally exposes historical code secrets

Understanding Git's snapshot architecture reveals why reverted secrets remain vulnerable inside the hidden commit tree.

#5 about 4 min

Best practices for ignoring and securely vaulting secrets

Employing environment files and encrypted key stores properly keeps sensitive credentials out of version control.

#6 about 2 min

The pipeline cost of removing leaked git commits

Surgically removing exposed credentials from a shared repository creates complex pipeline and team coordination issues.

#7 about 6 min

Automating local security checks using native Git hooks

Implementing automated pre-commit checks leverages local Git functionality to immediately block insecure commits.

#8 about 4 min

Building a custom bash script to detect secrets

Custom shell scripts utilize regular expressions to efficiently prevent specific credential patterns from entering repositories.

#9 about 6 min

Evaluating open source secret detection tools for developers

Community resources like git-secrets and TruffleHog provide robust automated pre-commit scanning capabilities without heavy deployment overhead.

#10 about 4 min

Preventing credential leaks seamlessly at commit time

Identifying sensitive data locally halts security incidents before they disrupt broader continuous integration environments.

#11 about 7 min

Engaging with open source tech communities through documentation

Contributing documentation and providing non-code support offer valuable entryways for engaging with open source software organizations.

#12 about 8 min

Measuring hook effectiveness and alternative secret management tools

Tracking stopped commits demonstrates enforcement success while universal vault managers streamline broader secret oversight processes.

Matching moments

6:14 min

Introduction to securing secrets in GitOps deployments

Alex Soto Alex Soto · LIVE

1:36 min

Protecting source code repositories and developer credentials

Niels Tanis Niels Tanis · WWC 2022

1:53 min

Transitioning toward DevSecOps with dynamic scanning and secrets management

Christoph Ruggenthaler · LIVE

2:58 min

Auditing existing codebases with secret scanning risk assessments

Kevin Lewis Kevin Lewis · WWC 2025

1:58 min

Embedding continuous security practices into standard developer workflows

Kevin Lewis Kevin Lewis · WWC 2025

1:21 min

Maintaining anonymity and operational security in open source

Johan Hutting Johan Hutting · WWC 2024

Upcoming sessions on this topic

Open session

World Congress 2026 North America

Don’t kill my Vibes - Simple Steps to Stay Secure when Vibe Coding

Isaac Evans

Co-founder & CEO of Semgrep

Isaac Evans
Open session

World Congress 2026 North America

On the Public Clock: Open-Source Defense When You're Not in the Club

Nicholas Muy

VP Engineering Platform and Security at Scrut.io

Nicholas Muy
Open session

World Congress 2026 North America

Stop Running Mystery Meat in Production

Jeroen van Erp

Technical Advocate @ SUSE

Jeroen van Erp
Open session

World Congress 2026 North America

SecurePrompt: Building a Pre-Flight Security Layer for Agentic AI

Ravi Sastry Kadali

AI/ML Engineer at General Motors

Ravi Sastry Kadali
Open session

World Congress 2026 North America

rm -rf: Horror Stories From Unsandboxed AI Agents (and How Docker Fixes This)

Rishab Kumar

Staff Developer Evangelist @ Twilio

Rishab Kumar
Open session

World Congress 2026 North America

GitHub’s Team X-Ray: Your Repository Knows More About Your Team Than Your Team Does

Andrea Griffiths

Senior Developer Advocate

Andrea Griffiths