TL;DR
Heroku is a mature platform with solid security basics. The 2022 OAuth token breach dented trust, and Heroku has tightened things since. You get decent isolation, encrypted config vars and the usual compliance certifications. It's still a reasonable choice for an app that already runs there; for a new project, look at the newer alternatives first.
What is Heroku?
Heroku is one of the original Platform-as-a-Service (PaaS) providers, now owned by Salesforce. It made git push deploys normal. People still pick it because it's simple: buildpacks cover most languages, and there's an add-on for nearly everything.
2022 Security Incident: In April 2022, attackers stole Heroku's OAuth tokens for its GitHub integration and used them to get into private GitHub repos. Trust took a real hit. Heroku has improved its practices since.
Our Verdict
What's Good
- Mature, battle-tested platform
- SOC 2, ISO certified
- Dyno isolation
- Encrypted config vars
- Private spaces (Enterprise)
What to Watch
- 2022 breach history
- Aging platform (less innovation)
- Shared infrastructure on basic tiers
- Higher pricing vs alternatives
Security Features
| Feature | Common Runtime | Private Spaces |
|---|---|---|
| Dyno isolation | Container-based | Dedicated VPC |
| Network | Shared | Private network |
| Compliance | SOC 2 | SOC 2, HIPAA eligible |
| Cost | $ | $$$$ |
Config Vars (Secrets)
Config vars are how you give a Heroku app its secrets:
- Encrypted at rest: Config vars are encrypted
- Injected at runtime: Available as environment variables
- Not in build logs: Hidden from output by default
- Audit logging: Available on higher tiers
Rotate After 2022: Used Heroku before April 2022 with GitHub connected? Make sure you've rotated every secret and reviewed what GitHub access you've granted.
Post-Incident Improvements
Since the 2022 incident, Heroku has:
- Required MFA for all accounts
- Rebuilt GitHub integration from scratch
- Enhanced token storage security
- Improved monitoring and detection
Should You Use Heroku?
| Use Case | Recommendation |
|---|---|
| Existing Heroku apps | Fine to continue, stay updated |
| Enterprise (Private Spaces) | Reasonable choice |
| New projects | Consider Railway, Render, Fly.io |
| Tight budget | Better alternatives exist |
Is Heroku safe after the 2022 breach?
Heroku has tightened things since the breach, including mandatory MFA and rebuilt integrations. The platform is reasonably safe. But the incident exposed gaps in its practices that competitors didn't have.
Should I migrate away from Heroku?
Not necessarily. If your app runs well on Heroku, stay. For a new project, though, Railway, Render and Fly.io are about as easy to use, usually cheaper, and moving faster.
Are my secrets safe on Heroku?
App config vars are encrypted and reasonably secure. The 2022 breach wasn't only about OAuth tokens, though: Heroku's own incident review says the attacker also downloaded the database holding pipeline-level config vars for Review Apps and Heroku CI. If you used either before April 2022, treat those secrets as exposed. Either way, rotate secrets on a schedule and watch for unusual use.
Further Reading
Ready to secure your setup? Check out our hands-on guides.
Using Heroku?
Scan your project for exposed secrets and security issues.