\paragraph{Problem} Picture this: it is midnight before a demo. You push to GitHub and, all of a sudden, your API key is now public for everyone on the internet to see. Or you are showing your app live, and all that is on the screen is \text{console.log("TEST CASE 1")}. We have all had a similar, if not exact, situation happen to us before.

\paragraph{Project Overview} Commit Cop is a pre-commit safety checker that automatically scans your staged files before every commit, blocking the bad ones before they ever reach GitHub for JavaScript and TypeScript projects.

\paragraph{Technology Used} It is an npm package built in TypeScript, using Commander to help us create the command-line package.

\paragraph{Challenges} While developing the package, I ran into some issues, such as needing a hook so that the program runs automatically when users commit, as well as finding sufficient checks and fixes for potential errors.

\paragraph{What We Are Proud Of} From this project, we are most proud of the fact that we were able to create a viable working product that we and other programmers could use during development.

\paragraph{What We Learned} We also learned the process and packages needed to create an npm package, which none of us had ever done before.

\paragraph{Scalability} For scalability, we can add more checks and fixes that Commit Cop is able to notice, such as detecting secret values that should be in the \texttt{.env} file, introducing checks for more languages, and compacting the report for better readability.

Built With

Share this project:

Updates