# Defang: an over-privileged dev GitHub App tagged a release and copied production

- **Canonical URL:** https://breachidents.com/incidents/defang-nov-2026-github-app-release-tag
- **Organization:** Defang
- **Incident date:** Nov 12–23, 2026
- **Disclosed / updated:** Nov 24, 2026
- **Category:** CI supply chain
- **Primary source:** Defang Security Incident Report (https://defang.io/blog/post/security-incident-november-2026/)

## In 30 seconds

- **How they got in:** An internal dev/test GitHub App on two repos held excess deployment permissions; how its key was obtained is unknown _[Confirmed]_
- **What leaked / reached:** Portal user emails/usernames, repo names, cloud account IDs, Compose files, DB passwords in deployment state, Stripe key, and Defang GitHub App key
- **What stayed safe:** Passwords (Defang holds none), direct customer cloud credentials, repo contents, and full payment card numbers/CVCs

## Summary

On Nov 12, 2026, an attacker acted as an internal Defang development GitHub App that held excess deployment-environment permissions and pushed a malicious commit and release tag. Because Defang’s production CI trusted release tags automatically, the attacker’s code ran with production credentials, copied the main database, and held live Stripe, encryption, and GitHub App keys for 11 days until a routine scan caught it on Nov 23.

## Attack sequence

1. **Nov 12, 06:05 UTC — Over-privileged dev GitHub App pushes commit and tag:** Acting as an internal dev/test GitHub App installed on two repositories with excess permissions, the attacker pushes a malicious commit and tags it as a release.
2. **Nov 12, 06:05–06:26 UTC — Production CI runs the tagged commit with prod secrets:** Because Defang’s production environment trusted release tags automatically, attacker code copies dev/staging secrets at 06:05 UTC and production secrets at 06:26 UTC.
3. **Nov 12, 07:57–08:10 UTC — Main database copied and service keys stay live 11 days:** The attacker copies the main database (all Portal users, Compose files, and Oct 12–Nov 19 deployment state with DB passwords) and holds live Stripe, GitHub App, and token encryption keys until Nov 23.
4. **Nov 12–23, 2026 — Potential downstream reach into customer OIDC deploy roles:** Holding the Defang GitHub App key creates an indirect path into connected customer repos and workflows assuming admin cloud deploy roles like defang-cd-CIRole. A routine scan catches the compromise on Nov 23.

## How they got in

On Nov 12, 2026, an attacker acted as a separate GitHub App that Defang maintained for local development and testing. That dev App was installed on two internal Defang repositories and held far more permissions than it needed, including permission to change deployment environments. Defang has not determined how the attacker obtained the dev App’s credentials, so the initial key theft stays marked withheld. (Defang also noted applying a dependency security update on Nov 15, without confirming a link.)

Acting as that dev App, the attacker pushed a commit to one of the repositories and tagged it as a release. Defang’s production deployment environment automatically trusted release tags, so the attacker’s code ran inside CI with live build credentials: first against dev and staging at 06:05 UTC, and then with production credentials at 06:26 UTC.

## What it reached

Armed with production credentials, the attacker copied Defang’s main database between 07:57 and 08:10 UTC on Nov 12. That dump exposed every Defang Portal user’s name, email address, GitHub or GitLab username and organization names, signup answers, connected cloud account IDs, Compose files, and (for users who deployed between Oct 12 and Nov 19) copies of deployment state that can contain database passwords or environment variables built from defang config values.

The stolen production credentials also included Defang’s Stripe API key (exposing billing contact details, card brand, last four digits, expiry, and invoices), the production Defang GitHub App key, and the encryption key protecting stored customer GitHub sign-in tokens. All of those keys stayed valid for 11 days until a routine security scan spotted suspicious repository activity on Nov 23. Because the production GitHub App key allowed pushing commits, editing workflows, and changing environment rules in connected customer repositories, anyone holding it could indirectly trigger a customer’s GitHub Actions workflow to assume the customer’s cloud deploy role (such as AWS defang-cd-CIRole, which often holds administrator access). Defang rotated all keys, suspended the dev App, invalidated sessions, and brought in GitHub to audit for token misuse.

## What stayed safe

Defang does not store user passwords (users sign in with GitHub, GitLab, or emailed codes), does not hold direct customer cloud credentials for BYOC deployments, does not store repository source code in its database, and does not have access to full payment card numbers or security codes (which remain strictly inside Stripe). Defang had already stopped saving deployment-state copies on Nov 19 and deleted the stored copies.

## How to defend against this

- **Lock tags with tag rulesets** (Stops step 1): Protect release tags with GitHub tag rulesets so dev Apps and bots cannot push tags, and isolate dev/test GitHub Apps strictly to sandbox repos with zero environment write scopes.
- **Bind prod secrets to branches** (Stops step 2): Restrict production GitHub Environments to protected branches with mandatory human reviewers instead of releasing production secrets on arbitrary tag pushes.
- **Pin OIDC role to deploy branch** (Stops step 4): Pin AWS AssumeRoleWithWebIdentity trust policies on defang-cd-CIRole to your exact deploy branch or protected environment sub claim, and alert on defang-app[bot] workflow edits.

## Evidence log

| Section | Claim | Evidence state | Source |
| --- | --- | --- | --- |
| How they got in | An internal dev/test GitHub App installed on two repos with excess permissions pushed a commit and release tag on Nov 12, triggering dev/staging (06:05 UTC) and production (06:26 UTC) CI with live credentials | Confirmed | Defang security incident report, Nov 24, 2026 |
| How they got in | How the attacker originally obtained the dev/test GitHub App key | Withheld by vendor | Defang security incident report (not established) |
| What it reached | Main database copied 07:57–08:10 UTC (Portal users, repo names, cloud IDs, Compose files, and Oct 12–Nov 19 deployment state with DB passwords), plus live Stripe key, Defang GitHub App key, and token encryption key valid until Nov 23 | Confirmed | Defang security incident report, Nov 24, 2026 |
| What it reached | Indirect downstream risk that the stolen Defang GitHub App key could trigger customer workflows assuming admin OIDC deploy roles such as AWS defang-cd-CIRole (post-Nov 12 misuse audit ongoing with GitHub) | Inferred | Defang security incident report, Nov 24, 2026 |
| What held | User passwords (none stored), direct customer BYOC cloud credentials, repository contents, and full card numbers and security codes (held by Stripe) were not exposed | Confirmed | Defang security incident report, Nov 24, 2026 |

## Indicators of compromise

- **log:** `defang-app[bot] commits, workflow edits, or tag pushes (Nov 11–23, 2026)` (GitHub security and org audit log identity customers should audit per Defang’s Nov 24 notice.)
- **log:** `AssumeRoleWithWebIdentity on defang-cd-CIRole (Nov 11–23, 2026)` (AWS CloudTrail event (plus GCP workload identity / Azure managed identity logs) to audit for unauthorized downstream deploys.)

---
Published by [breachidents](https://breachidents.com). Preserve evidence labels (Confirmed / Inferred / Withheld by vendor / Observed) when citing.
