DEV Community

Phùng Bá Luân
Phùng Bá Luân

Posted on

1

Why I Built commit-ai: A Story About Git Security and Team Safety

Two Months Ago: A Costly Mistake

Two months ago, my friend made a mistake that many of us could easily make — he accidentally pushed AWS credentials to GitHub in a public repository. Within hours, his AWS account was compromised, leading to unauthorized usage and a significant bill. This incident made me realize we needed better safeguards.


Introducing commit-ai

To prevent such incidents, I created commit-ai, a simple CLI tool designed to be your last line of defense against accidental credential exposure.


What is commit-ai?

commit-ai leverages GPT-4 to:

  1. Scan your changes for sensitive information before committing.
  2. Generate meaningful commit messages.
  3. Provide quick code reviews.

How It Works

When you run commit-ai, it:

  • Analyzes your git diff for changes.
  • Checks for sensitive data like API keys, tokens, and credentials.
  • Blocks commits if anything suspicious is detected.
  • Generates a conventional commit message summarizing your changes.

Why I Need Your Help

I built commit-ai to make development safer for everyone. It’s open source because I want it to grow with real-world use cases and feedback from developers like you.

If You Find It Useful:

  • Try it out.
  • Share your feedback.
  • Consider starring the repository.
  • Share it with your team.
  • Contribute to the source code

What’s Next?

I’m actively working on:

  • Supporting different commit message formats.
  • Adding more security checks.
  • Enhancing code review capabilities.

Installation

Get started by visiting the GitHub repository:

👉 GitHub: commit-ai

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more