Skip to content

🐛 fix: require sign-off for workflow review questions - #16646

Merged
hivecommons-hive[bot] merged 2 commits into
hivecommons:v5from
Karibhou:fix/16638-workflow-policy
Nov 4, 2026
Merged

hivecommons-hive[bot] merged 2 commits into
hivecommons:v5from
Karibhou:fix/16638-workflow-policy

Conversation

@Karibhou

@Karibhou Karibhou commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Fixes #16638

Reviewer questions on workflow and action edits now require human policy sign-off for same-repository PRs as well as forks. This prevents bare permission-scope questions from being automatically delegated.

  • Add regression coverage for same-repository workflow permissions and action edits.
  • Update the operator reference and security changelog.

Verification: ran a Go smoke program against the classifier for same-repository and fork workflows, same-repository actions, and an ordinary scope question; gofmt -l reported no files. Repository policy reserves tests for CI.

— hive: backend=omp model=openai-codex/gpt-6.1-terra


🐝 Hive Agent: contributor | SHA: 4a9958511

Hive-Run: hivecommons#16638
Hive-Plan: workflow review policy sign-off
Hive-Spec: reviewer-question-auto-decide#policy-sign-off
Signed-off-by: Karibhou <Karibhou@users.noreply.github.com>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Nov 4, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign hanthor for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow kubestellar-prow Bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Nov 4, 2026

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Read the classifier and its caller; this looks correct to me, and it is a strict tightening.

  • ClassifyDecisionQuestion (src/pkg/review/decision_question_class.go:118) now returns PolicySignOff for .github/workflows/** / .github/actions/** on any PR, not only forks. The check sits before the policy-path and scope branches, so nothing earlier can route a workflow edit to auto-decide. Nothing is widened; per #16638 (the hive's own security finding) this is the requested behaviour, so no maintainer decision is needed.
  • Tests updated for fork, same-repo workflow (with a permissions: contents: write patch) and same-repo action cases.
  • Operator reference and the security- changelog fragment say "regardless of PR origin".
  • Builds at 4a99585; go test is CI-only here.

Two notes, neither blocking:

  • DecisionQuestionInput.FromFork (decision_question_class.go:46) is still set at src/pkg/dashboard/review_question_autodecide.go:348 but no longer read. Keeping the field is fine for compatibility; a follow-up could drop or document it.
  • #16638 is marked blocked on #16524 for v6; this targets v5, where the file already exists, so it will carry forward with the v5→v6 merge.

— hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive

hivecommons-hive Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor.

Reviewed by reviewer — no findings.

Reviewer notes

Read decision_question_class.go at the base and the callers of FromFork; this does what #16638 asks and looks correct to me.

  • Base ClassifyDecisionQuestion (decision_question_class.go:118-119) only returned PolicySignOff for .github/workflows/** / .github/actions/** when in.FromFork was true, and decisionPolicyPaths (lines 68-76) do not include workflow paths, so a same-repo hive PR widening a workflow permissions: scope with a bare reviewer question fell through to DecisionQuestionScope → delegated approve. Dropping the fork gate closes exactly that hole; the policy-path rule and owner-only guards are untouched, and sign-off still wins before the hive-authored/CI-green checks.
  • DecisionQuestionInput.FromFork stays on the struct and is still populated by review_question_autodecide.go:348, so no caller breaks; it is just no longer consulted here. Fine to leave for now.
  • Test table: the old "same-repo hive PR editing a workflow is still the hive's" case is correctly inverted, and the new .github/actions/build/action.yml case covers the second glob.
  • Docs: sweeps-and-operations.md:395 now says "regardless of PR origin"; the DecisionQuestionPolicySignOff doc comment is updated to match.

No findings. One note for the maintainer: the issue is blocked on #16524 for v6; this PR is against v5 where the file already exists, so it is not blocked here.

— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88

stage 095-pre-merge-soak → 060-reviewed: untrusted-author-role

Evidence bundle `#166464fb80e0` sha256:abdb4ce43726e6676175fc3094fb29d9c9a1477f789a7bdced098e3c6951fec9 — download from the dashboard or `hivectl review evidence #16646`.

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v5

Conflicts are checked with every PR merged onto the current tip of v5, so a PR that only needs a rebase is not reported as conflicting with its siblings.

No conflicting open PRs or same-file overlaps were found.

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Ready for a human merge: verdict approved @4a99585, 64/64 checks green, DCO yes, soak 10m0s elapsed. Blocked only by role/untrusted (no trusted-author role).

The hive never approves on your behalf: /lgtm /approve (or merge) if you accept it.

@hivecommons-hive

Copy link
Copy Markdown
Contributor

/lgtm

Posted by @clubanderson from the Hive dashboard; the merge gate decides from here.

@kubestellar-prow

Copy link
Copy Markdown
Contributor

@hivecommons-hive[bot]: changing LGTM is restricted to collaborators

Details

In response to this:

/lgtm

Posted by @clubanderson from the Hive dashboard; the merge gate decides from here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved by @clubanderson for Hive auto-merge on green CI.

Approved from the Hive dashboard by @clubanderson as the owner decision on a Ready-for-human-merge pull request; the hive's merge sweep merges it on green CI.

@kubestellar-prow

Copy link
Copy Markdown
Contributor

@hivecommons-hive[bot]: changing LGTM is restricted to collaborators

Details

In response to this:

Approved by @clubanderson for Hive auto-merge on green CI.

Approved from the Hive dashboard by @clubanderson as the owner decision on a Ready-for-human-merge pull request; the hive's merge sweep merges it on green CI.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@hivecommons-hive
hivecommons-hive Bot merged commit 01c5727 into hivecommons:v5 Nov 4, 2026
68 of 69 checks passed
@hivecommons-hive

Copy link
Copy Markdown
Contributor

merged by Hive on behalf of @clubanderson, who approved this head (operator-approval:clubanderson) with "Approve and let hive merge": author @Karibhou holds no trusted-author role; CI green at 4fb80e0.

@Karibhou
Karibhou deleted the fix/16638-workflow-policy branch November 15, 2026 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dco-signoff: yes Indicates the PR's author has signed the DCO. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[reviewer] Review backlog (security): Auto-decide only treats workflow-path edits as policy sign-off when the PR is from a fork

1 participant