NHI Forum
Read full article here: https://www.akeyless.io/blog/best-practices-on-github/?utm_source=nhimg
GitHub is a cornerstone of modern development, but it’s also a common source of secret leaks. According to GitGuardian, developers expose over 5,000 API keys and credentials daily across public and private repositories—ranging from database connection strings and private keys to certificates and passwords. These leaks have contributed to breaches at major companies such as Uber, Equifax, and Starbucks.
Why secrets are leaked on GitHub:
-
Public vs. private repos: While public repositories are more obvious targets, private repositories aren’t immune. Developers’ personal accounts, which are often public by default, are a frequent source of leaks. In fact, 85% of leaks occur on personal repos.
-
Developer shortcuts: To speed up workflows, developers may hard-code secrets, use them in scripts, or fail to securely wrap/unwarp values. Mistakes in remediation can prolong exposure, increasing the risk of lateral attacks.
Best practices to prevent GitHub secret leaks:
-
Implement a secrets management vault: Centralized storage of passwords, tokens, and encryption keys ensures secrets are secure and auditable.
-
Automated injection into workflows: The vault should seamlessly integrate with CI/CD pipelines, automatically injecting secrets where needed to reduce developer friction.
-
Secrets-as-code: Tools like Terraform allow developers to manage secrets as code, enabling scalable and repeatable infrastructure management.
-
Out-of-the-box integrations: Choose a vault that integrates with multiple development tools to minimize disruption while maximizing security.
Bottom line: The best secrets management system balances robust security with developer efficiency, preventing GitHub leaks without slowing down modern software development workflows.