In the age of AI-assisted programming, building applications has become faster than ever. However, faster development does not necessarily mean safer releases.
During an internal review conducted by our team to assess the risks of publishing software projects, we identified a concerning finding: approximately one in every three projects in our reviewed sample contained exposed sensitive information.
What makes this even more concerning is that data leaks are not limited to API keys hidden in source code. They can also appear in files that developers might not expect to be included in a public release.
What Did Our Team's Review Reveal?
According to our preliminary classification of the cases identified, the exposure types were distributed as follows:
API Keys and Credentials
These secrets can provide unauthorized access to external services or cloud resources, potentially leading to account abuse, compromised infrastructure, or unexpected financial costs.
Images and Screenshots Containing Sensitive Information
Screenshots may expose access tokens, user data, internal information, or details from dashboards that should never be made public.
Internal Code, Permissions, and Components
Published releases may reveal internal functionality, code that should not be accessible to ordinary users, or implementation details related to permissions and access control.
These percentages reflect our team's preliminary classification of the observed cases. They are not general statistics representing all GitHub projects.
Where Does AI Fit Into This Problem?
When we ask an AI tool to build an application or prepare a project for release, it may generate files containing information from the development environment or leave unnecessary files in the project package.
The problem is not AI itself. The real issue is assuming that the files it generates or selects are ready for publication without a proper review.
How Can We Reduce the Risk of Data Leaks?
1. Create a dedicated release build.
Ask your AI tool to prepare a clean, production-ready version in a separate directory from your main development workspace.
2. Review files manually.
Inspect source code, configuration files, images, screenshots, and hidden files before publishing anything.
3. Never hardcode secrets.
Use environment variables or dedicated secrets-management systems. Add files such as .env to .gitignore where appropriate.
4. Scan your repository before pushing.
Use Secret Scanning and Push Protection tools, but do not rely on them exclusively. They may not detect every type of sensitive information.
5. Check your Git history, too.
Removing a sensitive file from the latest version does not necessarily remove it from the repository's history.
6. If a real secret is exposed, revoke and rotate it immediately.
Do not simply delete the file containing it.
The Key Takeaway
Do not let the convenience of AI-powered development come at the expense of security.
Before every release, ask yourself: Does this version contain only what is supposed to be public?
Sometimes, one final review before running git push can make the difference between a successful release and a costly security incident.
What do you think? Should reviewing sensitive files become a mandatory step in every AI-assisted development workflow?