Skip to content

Commit e20e8b6

Browse files
DimaBirDima Birenbaum
andauthored
fix(ci): push versions to bot/toolchain-versions branch, bypass main branch protection (#228)
Co-authored-by: Dima Birenbaum <dbirenbaum@microsoft.com>
1 parent 30ead4e commit e20e8b6

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

.github/workflows/msdo-breach-monitor.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@ Monitor for supply chain security incidents affecting any tool in the MSDO toolc
7575

7676
The `toolchain-version-probe` workflow runs weekly, installs every tool through the real MSDO CLI, and records exactly which package version was resolved into `.github/toolchain-versions.json`. These are the versions MSDO users actually download — not registry "latest", but the version pinned in MSDO's `.gdntool` configs.
7777

78-
**Read the file from this repository:**
78+
**Read the file from this repository (the probe pushes to a dedicated branch to avoid branch protection on main):**
7979
```
80-
GET https://api.github.com/repos/microsoft/security-devops-action/contents/.github/toolchain-versions.json
80+
GET https://api.github.com/repos/microsoft/security-devops-action/contents/.github/toolchain-versions.json?ref=bot/toolchain-versions
8181
```
8282
Decode the base64 `content` field. The `tools` object maps each tool name to its resolved version. The `generated_at` field tells you when the probe last ran.
8383

.github/workflows/toolchain-version-probe.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,5 +120,7 @@ jobs:
120120
echo "toolchain-versions.json unchanged — nothing to commit"
121121
else
122122
git commit -m "chore(ci): update toolchain-versions.json [skip ci]"
123-
git push
123+
# Push to dedicated unprotected branch — main has branch protection
124+
# requiring PRs. The breach monitor reads from this branch via API.
125+
git push origin HEAD:bot/toolchain-versions --force
124126
fi

0 commit comments

Comments
 (0)