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

[OCU-138] Add fileURI support to additional SAST producers #283

Conversation

flowirtz
Copy link
Contributor

@flowirtz flowirtz commented Aug 1, 2024

This PR switches over two more SAST producers to record their targets as fileURIs.

@flowirtz flowirtz self-assigned this Aug 1, 2024
@flowirtz flowirtz force-pushed the feature/ocu-138-switch-over-remaining-sast-producers-to-produce-file-uri branch from 010d4ba to f3488bc Compare August 5, 2024 08:10
@flowirtz flowirtz marked this pull request as ready for review August 5, 2024 08:16

// Handle varying prefixes
filePath = strings.TrimPrefix(filePath, ".") // Remove leading dot
Copy link
Contributor

Choose a reason for hiding this comment

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

this doesn't look correct to me. the tests for this expect this path: file:///path/to/file.txt:1-2. if the code's current working directory is /home/app than I would expect the resulting path to be file:///home/app/path/to/file.txt:1-2. Also, there is a function in the standard library that performs this: https://pkg.go.dev/path/filepath#Clean

@flowirtz flowirtz force-pushed the feature/ocu-138-switch-over-remaining-sast-producers-to-produce-file-uri branch from f3488bc to f54d449 Compare August 13, 2024 14:44
@ptzianos ptzianos marked this pull request as draft September 12, 2024 17:08
@andream16
Copy link
Contributor

I don't think this is relevant right now - will close.

@andream16 andream16 closed this Nov 4, 2024
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.

3 participants