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

Sarif report: allow file paths in file URI scheme #1102

Merged
merged 7 commits into from
Nov 8, 2024

Conversation

theKBro
Copy link
Contributor

@theKBro theKBro commented Nov 4, 2024

see https://issues.jenkins.io/browse/JENKINS-73933

file paths in file uri scheme are converter to normal paths

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

@KalleOlaviNiemitalo
Copy link

Does this work with % encoding in file: URLs?

@theKBro
Copy link
Contributor Author

theKBro commented Nov 4, 2024

If an exception occurs it falls back to the old value

@KalleOlaviNiemitalo
Copy link

I meant, if the SARIF file has "file:///dir/%E2%82%AC", then does this translate it to "/dir/%E2%82%AC" or to "/dir/€"?

@theKBro
Copy link
Contributor Author

theKBro commented Nov 4, 2024

I added test data to the testcase to clarify this -> its getting translated

@theKBro
Copy link
Contributor Author

theKBro commented Nov 4, 2024

current solution seems to work under windows only...
any proposal how to improve the code?

@uhafner uhafner added the bug Bugs or performance problems label Nov 7, 2024
@uhafner uhafner changed the title sarif report: allow file paths in file URI scheme Sarif report: allow file paths in file URI scheme Nov 7, 2024
Copy link

codecov bot commented Nov 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.59%. Comparing base (387d3db) to head (7df6f4d).
Report is 20 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1102      +/-   ##
============================================
+ Coverage     90.58%   90.59%   +0.01%     
- Complexity     2323     2328       +5     
============================================
  Files           357      357              
  Lines          6583     6594      +11     
  Branches        676      677       +1     
============================================
+ Hits           5963     5974      +11     
  Misses          417      417              
  Partials        203      203              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@uhafner uhafner left a comment

Choose a reason for hiding this comment

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

Thanks for starting this PR! I directly committed some changes, since I didn't find a solution without coding it directly...

@uhafner uhafner merged commit 0f7aa6d into jenkinsci:main Nov 8, 2024
33 checks passed
@theKBro theKBro deleted the JENKINS-73933 branch November 8, 2024 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bugs or performance problems
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants