Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test spanRowFormatter, and mark the gosec issue as a false-positive #5327

Merged
merged 3 commits into from
Mar 29, 2024

Conversation

dmathieu
Copy link
Member

Closes #4451

As mentioned in the other issue, I am not doing any escaping here.

  • The HTML tags we already have there need not to be escaped, so they will be properly rendered in zpages.
  • The Trace ID and Span ID are hexadecimal byte arrays. We decode them using encoding/hex, which can only output [0-9a-f], not any character that HTML should encode.

@dmathieu dmathieu added the Skip Changelog Allow PR to succeed without requiring an addition to the CHANGELOG label Mar 27, 2024
Copy link

codecov bot commented Mar 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 61.7%. Comparing base (3ca855b) to head (13b81ae).

Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff          @@
##            main   #5327   +/-   ##
=====================================
  Coverage   61.6%   61.7%           
=====================================
  Files        186     186           
  Lines      11382   11388    +6     
=====================================
+ Hits        7021    7032   +11     
+ Misses      4160    4153    -7     
- Partials     201     203    +2     
Files Coverage Δ
zpages/templates.go 64.2% <100.0%> (+41.5%) ⬆️

... and 1 file with indirect coverage changes

@dmathieu dmathieu marked this pull request as ready for review March 27, 2024 10:12
@dmathieu dmathieu requested review from dashpole and a team as code owners March 27, 2024 10:12
@dmathieu dmathieu requested a review from pellared March 27, 2024 10:12
@pellared pellared merged commit 336d5b6 into open-telemetry:main Mar 29, 2024
23 checks passed
@dmathieu dmathieu deleted the zpages-template-escape branch March 29, 2024 08:55
@MrAlias MrAlias added this to the v1.25.0 milestone Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Skip Changelog Allow PR to succeed without requiring an addition to the CHANGELOG
Projects
None yet
Development

Successfully merging this pull request may close these issues.

zpages: G203: The used method does not auto-escape HTML
4 participants