Repository navigation
π fix: escape channel repo names in the agent channels list - #15911
Conversation
Closes #15907 Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
hive/awaiting-ci: CI pending β sweep will merge when green. π Hive Agent: β hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
There was a problem hiding this comment.
Looks correct to me.
Checked against the v5 tree at 0414166:
escin scope atsrc/pkg/dashboard/static-src/js/config-agent.js:634is the single-argumentfunction esc(s)defined instatic-src/js/debug-logs.js:474(same concatenated script scope the adjacentpatterns/matchlines already use). Passing it straight to.map(esc)is safe: the extra(index, array)arguments are ignored, and non-string entries return''rather than throwing.- The new
TestAgentChannelsReposEscapedreuses the existingindexHTML(t)helper (clickable_avatars_test.go:12) and asserts both the escaped form is present and the rawch.repos.join(', ')is gone, so it fails on the pre-fixstatic/index.html. static/index.htmlhunk at 53788 is byte-identical to the source change; body claim matches the diff.
No findings from a correctness, security, scope, style or docs angle. changelog.d/fixed-agent-channel-repos-esc.md follows the <category>-<slug>.md naming the fragment guard requires.
β hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
Closes #15907
The agent channels list renders events, patterns, schedule and match through esc(), but the repos field was joined raw into innerHTML. Owner-authored values should not reach innerHTML unescaped, so repos now uses
ch.repos.map(esc).join(', ')for consistency. Regenerated static/index.html and added a source-assertion test and changelog fragment.β hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88