Skip to content

automation: migrate to hardened dependency governance - #11

Merged
portyu9 merged 1 commit into
mainfrom
automation/dependency-governance-v2
Sep 2, 2026
Merged

automation: migrate to hardened dependency governance#11
portyu9 merged 1 commit into
mainfrom
automation/dependency-governance-v2

Conversation

@portyu9

@portyu9 portyu9 commented Sep 2, 2026

Copy link
Copy Markdown
Owner

Replaces the first-generation Python Dependabot governor with the hardened Node dependency-governance control plane used by the mature QA repositories.

Key changes:

  • canonical Dependabot login/numeric identity, Git author identity, GitHub web-flow materialization, valid GitHub commit signature, canonical sign-off, exactly one untouched commit, and current-main parent are all required;
  • npm and immutable GitHub Actions changes are semantically verified and restricted to eligible minor/patch classes;
  • major, downgrade, prerelease/unknown, stale-base, aged-out, mixed-scope, lifecycle-script, and control-plane changes remain manual;
  • autonomous merge requires exact-head ci/ci-gate, security/security-gate, and docs/docs-contract qualification;
  • privileged reconciliation executes trusted default-branch governance code only, never the PR head, with bounded pagination, scheduled reconciliation, idempotent status comments, and exact-SHA pre-merge refresh;
  • removes the superseded Python governor workflow/script.

No Appium capability policy, session lifecycle, device-smoke boundary, test behavior, or security threshold is weakened.


class GitHubApi {
constructor({ token, repository, maxPaginationPages }) { if (!token) throw new Error('GITHUB_TOKEN is required'); if (!repository?.includes('/')) throw new Error('GITHUB_REPOSITORY must be owner/repo'); this.token = token; this.repository = repository; this.maxPaginationPages = maxPaginationPages; [this.owner, this.repo] = repository.split('/'); this.root = `https://api.github.com/repos/${this.owner}/${this.repo}`; }
async request(method, url, body) { const response = await fetch(url, { method, headers: { Accept: 'application/vnd.github+json', Authorization: `Bearer ${this.token}`, 'X-GitHub-Api-Version': '2022-11-28', 'User-Agent': 'dependency-governance-bot', ...(body ? { 'Content-Type': 'application/json' } : {}) }, body: body ? JSON.stringify(body) : undefined }); const text = await response.text(); let payload = null; if (text) { try { payload = JSON.parse(text); } catch { payload = text; } } if (!response.ok) { const message = typeof payload === 'object' ? payload?.message : payload; throw new Error(`GitHub API ${method} ${url} failed (${response.status}): ${message || 'unknown error'}`); } return payload; }

class GitHubApi {
constructor({ token, repository, maxPaginationPages }) { if (!token) throw new Error('GITHUB_TOKEN is required'); if (!repository?.includes('/')) throw new Error('GITHUB_REPOSITORY must be owner/repo'); this.token = token; this.repository = repository; this.maxPaginationPages = maxPaginationPages; [this.owner, this.repo] = repository.split('/'); this.root = `https://api.github.com/repos/${this.owner}/${this.repo}`; }
async request(method, url, body) { const response = await fetch(url, { method, headers: { Accept: 'application/vnd.github+json', Authorization: `Bearer ${this.token}`, 'X-GitHub-Api-Version': '2022-11-28', 'User-Agent': 'dependency-governance-bot', ...(body ? { 'Content-Type': 'application/json' } : {}) }, body: body ? JSON.stringify(body) : undefined }); const text = await response.text(); let payload = null; if (text) { try { payload = JSON.parse(text); } catch { payload = text; } } if (!response.ok) { const message = typeof payload === 'object' ? payload?.message : payload; throw new Error(`GitHub API ${method} ${url} failed (${response.status}): ${message || 'unknown error'}`); } return payload; }
@portyu9
portyu9 merged commit b3389fa into main Sep 2, 2026
13 checks passed
@portyu9
portyu9 deleted the automation/dependency-governance-v2 branch September 2, 2026 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants