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

> **Safety notice:** Read-only repository and CloudTrail inspection only.

- **Incident date:** Nov 12–23, 2026
- **Disclosed:** Nov 24, 2026
- **Source disclosure:** https://defang.io/blog/post/security-incident-november-2026/

## Reproduction lab
Checks GitHub workflow files for tag triggers wired to production environments and checks customer repositories for unexpected defang-app[bot] activity since Nov 11.

```bash
# check if any workflow triggers on tag pushes alongside a production environment
grep -rnE "tags:|environment:\s*production" .github/workflows/ || true
```

## Policies and detection rules

### `protect-release-tags.json`
GitHub tag ruleset blocking dev bots and Apps from pushing or altering release tags. Stops step 1.

```json
{
  "name": "lock-release-tags",
  "target": "tag",
  "enforcement": "active",
  "conditions": {
    "ref_name": { "include": ["refs/tags/v*"] }
  },
  "rules": [
    { "type": "creation" },
    { "type": "update" },
    { "type": "deletion" }
  ]
}
```

### `audit-defang-oidc-role.sh`
AWS CloudTrail query checking for unexpected AssumeRoleWithWebIdentity calls on defang-cd-CIRole from Nov 11 onward.

```sh
aws cloudtrail lookup-events \
  --start-time "2026-11-11T00:00:00Z" \
  --end-time "2026-11-25T00:00:00Z" \
  --lookup-attributes AttributeKey=EventName,AttributeValue=AssumeRoleWithWebIdentity \
  --query 'Events[?contains(CloudTrailEvent, `defang-cd-CIRole`)].{Time:EventTime,User:Username}' \
  --output table
```

## 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.)
