One test app, one release tag, the whole database: lessons from Defang

A GitHub App meant for local development had more permissions than it needed. An attacker used it to push a release tag, production trusted the tag, and the user database was copied within two hours. It was found 11 days later. Four checks for Australian businesses that build software.

SS

Sam Sultan

Enact Cyber

26 November 2026

5 min read

On 24 November, Defang, a company whose platform deploys applications to the cloud, published a frank account of a breach. It is worth reading in full, because nothing in it needed a clever exploit. Every step used something Defang had set up and trusted.

Facts below are from Defang's own post. Times are UTC.

What happened

Defang had a separate GitHub App for local development and testing. It was installed on two of Defang's repositories and, in Defang's words, had more permissions than it needed, including permission to change deployment environments.

Acting as that app, the attacker pushed a commit to one repository and tagged it as a release. Defang's post explains why that mattered: "Our production environment trusted release tags." The attacker's code ran in Defang's build pipeline with access to production credentials.

On 12 November:

  • 06:05: the first workflow that copied build credentials ran, against development and staging.
  • 06:26: production credentials were copied.
  • 07:57 to 08:10: the main database was copied.

That is about two hours from the first workflow to a copy of the database.

What was taken

Everyone with a Defang Portal account is in the copied database: names, email addresses, GitHub or GitLab usernames, organisation names, cloud account IDs and Compose files. For users of Defang's GitHub App, the names of repositories it could see, private ones included. Deployment records kept from 12 October to 19 November may include database passwords and environment variables.

The attacker also took the key for Defang's GitHub App, a Stripe key that could read billing records, and the GitHub sign-in tokens Defang holds for its users. Those tokens were encrypted, but the encryption key was taken too.

Defang says full card numbers and security codes were not exposed, and it holds no user passwords.

How it was found

A routine security scan on 23 November found suspicious activity in Defang's repositories. Defang then confirmed the database copy from its access logs, replaced production credentials and emailed users. From the dates in the post, the stolen credentials stayed valid for about 11 days. Defang says it is still checking whether they were used after 12 November, and that some logs "are not detailed enough to rule that out."

Three things trusted that should not have been

  • A test tool had production reach. An app meant for development was installed on real repositories, with permission to change deployments.
  • A tag was treated as approval. Anyone, or anything, that could push a release tag could run code with production credentials. No second person had to agree.
  • A key was stored with what it protected. Encrypted tokens are only as safe as the key, and the key was in the same place.

Most Australian businesses that build software have all three: integrations nobody has reviewed since they were installed, a pipeline that deploys on a tag or a merge, and secrets kept wherever the pipeline can reach them.

Four checks for this week

Each has a test and a record to keep.

1. List every app and integration on your code repositories. Test: in GitHub (or GitLab, or Bitbucket), list every installed app, which repositories it can reach and what it can change. For each, name its owner and why it needs that access. Anything meant for testing should not be able to reach production repositories at all. Keep: the list, dated, and what you removed or narrowed.

2. Make sure one push cannot reach production. Test: check who and what can push to your main branch and create release tags, and whether a release needs approval from a second person first. On GitHub, protected branches, tag rules and environments with required reviewers do this. For private repositories they need a paid plan. Keep: the rule, and one recent release that went through it.

3. Narrow what your pipeline can reach. Test: list the production secrets your build pipeline can read, and check that only the deploy job, from the deploy branch, can use them. Where your cloud provider supports it, replace long-lived keys with short-lived access tied to that branch or environment. Keep: the list of secrets, where each is stored, and when each was last replaced.

4. Know how fast you would notice. Test: ask how you would find out if a new tag, workflow change or deploy key appeared in your repositories tonight. If the answer is "the next routine scan", time how long that is. Keep: the alert you set up, or the gap you found, dated.

If it happens to you

If personal information is involved, the Privacy Act's Notifiable Data Breaches scheme applies to most businesses with annual turnover over $3 million, and to some smaller ones. If you suspect an eligible data breach, you have 30 days to assess it, and breaches likely to cause serious harm must be reported to the OAIC and the people affected. Defang's post is a good model of what that notice should say: what happened, when, what was taken and what to do next.

Where this fits

Our AI-attacker readiness check looks at what your organisation exposes and how fast you can respond, including your code repositories and build pipeline. For other attacks that came through something trusted, see 29 October: three attacks that came through something trusted.

Facts and quotes from Defang's security incident post of 24 November 2026, linked above. The 11-day figure is worked out from the dates in that post. Notifiable Data Breaches details from the OAIC.

supply chainGitHubCI/CDsecretsincident responsesoftware development
SS

Sam Sultan

Founder, Enact Cyber

Building evidence-first compliance methodology at Enact Cyber. Every report grounded in real findings, never pre-written, never fabricated.

Ready to work differently?

Compliance that closes the gap, not just reports it.