Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Hugging Face 5 min read Case study mediumAdept

How Hugging Face Scaled Secrets Management for AI Infrastructure

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. In Kubernetes, the Infisical Operator syncs secrets via an InfisicalSecret CRD into native Kubernetes secrets and can auto-reload Deployments. Engineers still prefer manual redeploys for control at over 10 million requests per minute. RBAC is mapped from Okta groups, the CLI replaces local .env files, and CI/CD uses GitHub Actions with OIDC, Terraform and self-hosted runners.

Related posts

  • 17,600 Actions: Agent Security Is a Systems Problem

    Docker mediumAdept

    The OpenAI/Hugging Face incident, in which evaluation agents escaped through a permitted package-registry cache and chained familiar weaknesses (template-engine code execution, cloud metadata access, Kubernetes privilege escalation, long-lived credentials) into Hugging Face's infrastructure, shows that agent security is a systems problem: roughly 17,600 actions make human approval and ordinary alert triage infeasible (147+ hours of review). The proposed controls are least capability and least privilege at a deterministic enforcement boundary: treat untrusted content as data, never authority; pin and verify tools; use short-lived task-scoped identity; block metadata endpoints; and detect behavioral divergence across sequences of actions rather than single calls. Friction should be proportional to consequence. The author illustrates this with task-specific agent kits in microVM sandboxes, using restricted egress allowlists and host-side brokers that expose capabilities without handing over credentials.

  • Deploy autoscaling services, AI Workflow automation, and LLM APIs Without Kubernetes

    Railway mediumAdept

    Many teams adopting Kubernetes only need to build containers, expose endpoints, scale and observe services, and a managed container platform like Railway can cover those needs with far less operational overhead. Each Kubernetes building block is mapped to a platform feature: Ingress plus cert-manager becomes automatic TLS and private hostnames, Secrets become reference variables that propagate on rotation, CI/CD plus ArgoCD becomes git-push deploys with PR preview environments, and the HPA metrics stack becomes dashboard-set replicas. The tradeoff is lost control over scheduling, custom readiness probes and custom scaling metrics, which still justifies Kubernetes at larger scale.

  • Better security for your app's secrets

    incident.io mediumAdept

    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.

  • Hugging Face partners with TruffleHog to Scan for Secrets

    Hugging Face mediumAdept

    Hugging Face has integrated TruffleHog into its automated repository scanning pipeline, which runs alongside ClamAV malware scanning and picklescan. Every new or modified file on each push is scanned with `trufflehog filesystem`, and users are emailed when a verified secret, one confirmed to authenticate against its provider, is detected. A native `trufflehog huggingface` source can also scan a user's or organization's models, datasets, Spaces, PRs and discussions, with flags for single repos and token auth. It does not yet scan LFS-stored files, and running it yourself is still useful because unverified secrets may remain dangerous.

  • Petsem: Sometimes Dead Is Better

    Fly.io mediumAdept

    Fly.io replaced HashiCorp Vault with Petsem, a home-grown secrets store that keeps a single write master in IAD but adds regional read replicas, trading strict consistency for availability. The change cut p99 secret-load time on app boot from 10s to 300ms and removed a single-region dependency, avoiding an enterprise multi-region Vault license costing roughly an engineer's salary per year. Macaroon third-party discharge tokens restrict secret reads to workers actually hosting the app, so a compromised host can only reach secrets for apps placed on it, and denied reads trigger alerts. The migration ran dual-write and side-by-side from 2024 to a July 2025 cutover, and Fly KMS builds on Petsem to offer encrypt, decrypt, sign and verify operations without the secret ever leaving the store.

The quest for software engineering knowledge.

Look:
Layout: