Description of the issue
When using the SARIF output type with the SARIF SAST Scans Tab extension in Azure DevOps, the failing rules that are shown under the scans tab have a broken url (Leads to a completely blank page). This seems to be caused by a missing / from the artifactLocation.uri in the generated SARIF output.
For example:
Current URL: https://dev.azure.com/sampleOrg/projectName/_git/repoName?path=path/to/file/with/issue.bicepparam&version={sha}&line=1&lineEnd=2&lineStartColumn=1
Correct URL: https://dev.azure.com/sampleOrg/projectName/_git/repoName?path=/path/to/file/with/issue.bicepparam&version={sha}&line=1&lineEnd=2&lineStartColumn=1
Not sure if there's something I should have set in the options via the ps-rule.yaml file or if this is a relatively simple bug in the sarif generator.
Thanks
Error messages
No response
Reproduction
- Install the SARIF SAST Scans Tab extension in Azure DevOps if not already present.
- Trigger an Azure Pipeline that runs a scan of any .bicepparam file which will output the result as a SARIF file
- Ensure that the pipeline uploads the SARIF file as an artifact.
- Go to the Scans tab and click on a link for a failing rule.
- Append a
/ at the start of the path in the URL.
Version of PSRule
2.9.0
How are you running PSRule
Azure Pipelines
Additional context
No response
Description of the issue
When using the SARIF output type with the SARIF SAST Scans Tab extension in Azure DevOps, the failing rules that are shown under the scans tab have a broken url (Leads to a completely blank page). This seems to be caused by a missing
/from the artifactLocation.uri in the generated SARIF output.For example:
Current URL:
https://dev.azure.com/sampleOrg/projectName/_git/repoName?path=path/to/file/with/issue.bicepparam&version={sha}&line=1&lineEnd=2&lineStartColumn=1Correct URL:
https://dev.azure.com/sampleOrg/projectName/_git/repoName?path=/path/to/file/with/issue.bicepparam&version={sha}&line=1&lineEnd=2&lineStartColumn=1Not sure if there's something I should have set in the options via the ps-rule.yaml file or if this is a relatively simple bug in the sarif generator.
Thanks
Error messages
No response
Reproduction
/at the start of the path in the URL.Version of PSRule
2.9.0
How are you running PSRule
Azure Pipelines
Additional context
No response