---
title: "Better security for your app's secrets"
description: "incident.io's Go app loads config from per-environment YAML files, overrides values with environment variables, then resolves `secret-manager:` references from Google Secret Manager at boot."
url: "https://swe.quest/articles/better-security-for-your-app-s-secrets-1add70314c176532"
canonical: "https://incident.io/blog/application-secrets"
source: "incident.io"
published: "2023-07-10"
difficulty: "medium"
kind: "Case study"
reading_minutes: 9
tags: ["security","cloud","configuration","identity-auth","go"]
---

# Better security for your app's secrets

A post on [incident.io](https://swe.quest/sources/incident-io.md), published 2023-07-10, 9 min read, Case study. Original: [https://incident.io/blog/application-secrets](https://incident.io/blog/application-secrets)

## Summary

incident.io's Go app loads config from per-environment YAML files, overrides values with environment variables, then resolves \`secret-manager:\` references from Google Secret Manager at boot. Moving secrets out of Heroku environment variables means only a Google Service Account credential is exposed, so it can be revoked and access audited. A VPC Service Controls security perimeter with Access Levels restricts Secret Manager access to known source IPs: offices, CircleCI egress, UK/US staff locations and Heroku's AWS eu-west-1 range. The tradeoff is new availability risk, since external changes such as Heroku IP range shifts can cause outages.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Security](https://swe.quest/tags/security.md) (Security)
- [Cloud platforms](https://swe.quest/tags/cloud.md) (Infrastructure)
- [Configuration management](https://swe.quest/tags/configuration.md) (Reliability & operations)
- [Identity & auth](https://swe.quest/tags/identity-auth.md) (Security)
- [Go](https://swe.quest/tags/go.md) (Languages)

## Prerequisites

- Google Cloud IAM ([easy posts on Cloud platforms](https://swe.quest/tags/cloud.md?difficulty=easy))
- environment variable configuration ([easy posts on Configuration management](https://swe.quest/tags/configuration.md?difficulty=easy))
- Heroku deployment ([easy posts on Deployment](https://swe.quest/tags/deployment.md?difficulty=easy))

## Keywords

Google Secret Manager, Google Access Context Manager, VPC Service Controls, Heroku, CircleCI, incident.io

## Related posts

- [Staying Evergreen: How we automated secure access and repo hygiene in a shared org](https://swe.quest/articles/staying-evergreen-how-we-automated-secure-access-and-repo-hygiene-in-a-shared-b76aa86640c047a2.md): GitHub Engineering · 2026-10-15 · Medium · 8 min read · Identity & auth, Developer tools, Security, System design
  Evergreen is a Go-based GitHub App that automates quarterly outside-collaborator access reviews and stale-repo archival in a shared org of 1,400+ GitHub employees, customers and partners, built entirely from native primitives: scheduled Actions firing repository\_dispatch, webhooks, issue checklists, custom properties, and per-repo JSON state files in git that double as the audit trail.
- [Using GitHub Actions with Heroku Flow for additional Security Control](https://swe.quest/articles/using-github-actions-with-heroku-flow-for-additional-security-control-fea72ed977a6f5e4.md): Heroku Engineering · 2025-03-27 · Medium · 7 min read · CI/CD, Deployment, Security, Cloud platforms
  Because GitHub Orgs can't allowlist Heroku IP ranges, Heroku offers a sample pattern: a self-hosted GitHub Actions runner deployed as a Docker app in a Heroku Private Space with static outbound IPs, plus a Heroku Flow Action.
- [How Hugging Face Scaled Secrets Management for AI Infrastructure](https://swe.quest/articles/how-hugging-face-scaled-secrets-management-for-ai-infrastructure-9737f7d559f7a125.md): Hugging Face · 2025-03-31 · Medium · 5 min read · Security, Kubernetes, Identity & auth, Infrastructure as code, CI/CD
  Hugging Face moved secrets management to Infisical as its infrastructure grew from AWS-only to multi-cloud (Azure, GCP), choosing it over HashiCorp Vault for developer workflows and multi-cloud abstraction.
- [Securing Heroku CLI Credentials with System Keychain Storage](https://swe.quest/articles/securing-heroku-cli-credentials-with-system-keychain-storage-55fa15429954cfb7.md): Heroku Engineering · 2026-07-01 · Medium · 5 min read · Identity & auth, Developer tools, Security
  Starting with version 11.8.0, the Heroku CLI stores auth tokens in the OS keychain by default instead of plaintext \`.netrc\` files.
- [Mastering API Gateway Integration: Salesforce, Heroku, and MuleSoft Anypoint Flex Gateway](https://swe.quest/articles/mastering-api-gateway-integration-salesforce-heroku-and-mulesoft-anypoint-flex-61e38a9ef91192f3.md): Heroku Engineering · 2024-07-29 · Medium · 10 min read · API design, Cloud platforms, Identity & auth, Deployment
  MuleSoft Anypoint Flex Gateway can run as a container app inside a Heroku Private Space and act as the single public ingress for internally routed Heroku APIs.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
