Skip to content

✨ feat: name the sentinel's flagged paths and rules in the decision dialog and hive comment - #16240

Merged
clubanderson merged 1 commit into
v5from
fix/sentinel-paths-in-decision
Nov 2, 2026
Merged

clubanderson merged 1 commit into
v5from
fix/sentinel-paths-in-decision

Conversation

@clubanderson

Copy link
Copy Markdown
Member

Closes #16237

What

The Let hive decide dialog's sentinel line stopped at "changes 1 sensitive path(s)". Operator feedback: "knowing what the sensitive path(s) (and files) are in this alert dialog would really help me make a decision". This PR names the files and the rule that fired, everywhere the finding is summarised.

Changes

API payload

  • Tracker rows (/api/tracker, and the mirrored nested-PR sub-rows) gain sentinel_details: [{ rule, summary, paths[], more_paths }], one entry per finding for the PR's current head. Paths are sorted and bounded to 10 per finding; more_paths counts the rest. Source: the head's verified review evidence bundle, falling back to the sweep's own recorded findings (RecordSentinelFinding). Nothing is re-fetched from GitHub.
  • /api/sentinel rows gain findings with the same shape (the ring now stores paths, not only rule names).

Dialog

  • The ⚠ sentinel line in ▼ Details (and the ⚠ Sentinel chip tooltip, confirm dialogs and result toasts that reuse the preface) now reads, e.g.:
    ⚠ hivecommons/hive#16230 — Sentinel flagged security-relevant changes at 4396f46: changes 1 sensitive path(s)
       · sensitive_path: .github/workflows/release.yml
       · permission_escalation (widens workflow permissions)
    
    with (+N more) after the tenth path. The paths stay behind Details; the visible dialog budget is unchanged.

Hive comment

  • The delegated decision's "reviewed, intended: …" rationale on a trusted author's flagged PR appends the same bounded path list after the row's reason, so the comment on GitHub names the files too.

Docs / changelog

  • src/docs/dashboard-sections/activity-monitor.md (Sentinel alert section) and changelog.d/added-16237-sentinel-paths-in-decision.md.

Tests

  • sentinel_details_test.go: bound + sort + text rendering; ring → /api/sentinel → delegatedSentinelReason; bundle-first/ring-fallback for stageTrackerSentinel and the JSON shape.
  • Node dialog test extended: path lines, +N more, Details paragraph and chip title carry the lines, paths not in the visible text.
  • go test ./pkg/dashboard/ ./pkg/github/ (full dashboard package incl. ratchets), node --test pkg/dashboard/*.test.js, go vet, make dashboard-gen-check, check-api-reference-citations.sh all pass.

…ialog, tracker payload and hive comment

The Let hive decide dialog's sentinel line read only "changes 1 sensitive
path(s)", which left the operator unable to decide. Tracker rows now carry
sentinel_details (rule, summary, bounded paths, more_paths) from the head's
evidence bundle or the sweep's recorded findings; /api/sentinel serves the
same per-finding paths; the dialog's Details and chip tooltip list them; the
delegated "reviewed, intended" comment names the files after the reason.

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Nov 2, 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 kellyaa 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/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 2, 2026
@github-actions

github-actions Bot commented Nov 2, 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.

PR Title Relation Files
#16228 🐛 dashboard: align contributor presence counts and person IDs same files src/pkg/dashboard/static/index.html
#15890 🐛 dashboard: point operator-reference help marks at the section sub-pages same files src/pkg/dashboard/static/index.html
#16247 ✨ Show the Activity Monitor item count and delta cue in the monitor header same files src/pkg/dashboard/static/index.html
#16241 ✨ Kiosk 'Request a Hive' CTA badge for Twitch streams + channel metadata script same files src/pkg/dashboard/static/index.html

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Thank you for your contribution! Your PR has been merged.

We'd love to hear how your experience was: share feedback

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/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Decision dialog's sentinel line should name the flagged paths and rules, not just count them

1 participant