Skip to content

RTDEV-102807 - Escape evidence values in the GitHub job summary - #1624

Closed
alenon wants to merge 1 commit into
jfrog:masterfrom
alenon:bugfix/RTDEV-102807-escape-evidence-summary
Closed

alenon wants to merge 1 commit into
jfrog:masterfrom
alenon:bugfix/RTDEV-102807-escape-evidence-summary

Conversation

@alenon

@alenon alenon commented Oct 19, 2026 •

Copy link
Copy Markdown
  • All tests passed. If this feature is not already covered by the tests, I added new tests.
  • All static analysis checks passed.
  • This pull request is on the master branch.
  • I used gofmt for formatting the code before submitting the pull request.

Description

The evidence job summary (artifactory/utils/commandsummary/evidencesummary.go) built its HTML table with fmt interpolation and no escaping. The subject display name, predicate slug, predicate type and evidence URL went into <td> cells and an <a href>. The predicate slug and type come from the Evidence service create response, which jfrog-cli-evidence records and jf summary renders into the GitHub job summary.

All interpolated values now go through one helper, which HTML-escapes them and replaces \r/\n with spaces. A blank line would end the GFM HTML block, and the rest would then be parsed as Markdown. The subject is linked only when the evidence URL has an http or https scheme; otherwise it is shown as plain text.

The evidence golden files change only in the href query string, where & is now written as &amp;. The rendered link is the same.

jfrog-cli-evidence also validates these fields before recording them: jfrog/jfrog-cli-evidence#97. jf summary runs in jfrog-cli, so it picks up this change with the next jfrog-cli-core dependency bump there.

The evidence summary table interpolated the subject display name, predicate
slug/type and evidence URL into HTML without escaping. These values come from
the Evidence service create response, so they could add rows, links or images
to the GitHub job summary.

Values are now HTML-escaped and line breaks are replaced with spaces, so a
value cannot end the HTML block. The subject is linked only when the evidence
URL has an http or https scheme.
@alenon
alenon force-pushed the bugfix/RTDEV-102807-escape-evidence-summary branch from 7ff4b13 to 983a40a Compare October 19, 2026 13:18
@alenon alenon closed this Oct 22, 2026
@alenon
alenon deleted the bugfix/RTDEV-102807-escape-evidence-summary branch October 22, 2026 08:41

This branch is waiting to be deployed

1 waiting deployment
build-gate — 983a40a3 Waiting Oct 19, 2026 by alenon via gate #162
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