Skip to content

Fix the security gate's base-image PR step - #76

Merged
OpenSource-For-Freedom merged 1 commit into
mainfrom
fix-security-gate-pr
Nov 3, 2026
Merged

OpenSource-For-Freedom merged 1 commit into
mainfrom
fix-security-gate-pr

Conversation

@OpenSource-For-Freedom

@OpenSource-For-Freedom OpenSource-For-Freedom commented Oct 12, 2026 •

Copy link
Copy Markdown
Owner

The Security gate has failed both of its scheduled runs. In each case every scan job passed, and the "Open a PR when the bump is earned" job failed at its last step.

Oct 12 run: fatal: could not read Username for 'https://github.com' at git push -u origin. Every checkout sets persist-credentials: false (zizmor requires it), so there's no stored token to push with. The earlier fix that passed the token to the push was lost in #64.

Oct 5 run: the branch pushed, then could not add label: 'dependencies' not found. The repo has no dependencies or docker labels, and gh pr create refuses the whole PR when a label is missing.

Changes to security-gate.yml, "Branch, bump, PR" step:

  • Push with the token passed explicitly (https://x-access-token:${GH_TOKEN}@github.com/...).
  • Drop the two labels.
  • gh pr create --head "$BRANCH" --base main, since the branch has no upstream set.
  • If the branch already exists, check for an open PR instead of exiting. Before, a push that succeeded followed by a PR that failed (as on Oct 5) meant that digest was skipped forever.
  • The PR body notes that PRs opened with GITHUB_TOKEN don't trigger CI.

New CI step in ci.yml: "Workflow pushes carry their own token" fails if any workflow has a git push line without an explicit token. Checked against both versions: it passes on this branch and catches line 249 on current main.

Checked locally: YAML parses, zizmor reports no findings, bash -n passes on the step script.

After merging: run the Security gate by hand (Actions, then Security gate, then Run workflow). The Oct 12 run found a newer base digest (6711f431...) worth bumping, so a manual run should open that PR now. If GitHub answers that Actions may not create pull requests, turn on Settings > Actions > General > "Allow GitHub Actions to create and approve pull requests".

@OpenSource-For-Freedom
OpenSource-For-Freedom marked this pull request as ready for review October 25, 2026 13:01
@OpenSource-For-Freedom
OpenSource-For-Freedom merged commit a05ead0 into main Nov 3, 2026
9 checks passed
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.

1 participant