-
Notifications
You must be signed in to change notification settings - Fork 241
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
jfrog-cli 2.50.2 - SARIF file Missing physicalLocation.artifactLocation.uri #2270
jfrog-cli 2.50.2 - SARIF file Missing physicalLocation.artifactLocation.uri #2270
Comments
Hi @rseeton, thank you for reporting this issue. We would greatly appreciate a more detailed understanding of the underlying causes of these issues. Could you please explain how you are using our SARIF output in GitHub? What is the primary use case? Which technology are you scanning? Thank you very much for your cooperation. We will address this matter as soon as possible and keep you updated. |
Hello @omerzi , Our organization uses a self-hosted GitHub Enterprise service for source control/CI/CD processing and a self-hosted JFrog Enterprise solution for Security (XRay) & Binary package management. GitHub's Advanced Security solution (GHAS) provides SAST analysis (CodeQL) and allows users to upload third-party Static Code Analysis results using SARIF files (https://docs.github.com/en/code-security/code-scanning/integrating-with-code-scanning/sarif-support-for-code-scanning). We are looking to load XRay SCA results into the GHAS solution using the SARIF output to provide a centralized reporting/review interface. Our products uses a variety of languages including Java, C++ & Rust. I will review the SARIF file and will attach a sanitized version later today. Let me know if more details are required. Thanks for your attention. |
@omerzi - SARIF file as requested |
I am also having the issue with missing location, i reverted to version 2.48.0 , seems that in 2.49.0 location info was removed, causing a regression, possibly caused by this change:
|
Unfortunately, attempts to run the older jfrog cli 2.48.0 are failing: jf version 2.48.0 |
After follow-up with GitHub, their requirements are laid out here:
(Which makes sense as we will need to know where the offending artifact is to determine how to resolve the problem). |
Hi @rseeton , Thank you for bringing this issue to our attention. You can track the progress of the fix by following this link: jfrog/jfrog-cli-core#1021. We appreciate your cooperation. |
Hello @attiasas, I see that the artifactLocation has been added to the 2.51.1 package, producing the following in each results element:
The file does pass the SARIF Validation, including the GitHub Ingestion rules, which is good.
(It looks like the 'space' character in Package Descriptor is the issue - replacing this with Package_Descriptor resolves the URI validation issue) |
Hi @rseeton, Thank you for your feedback! Regarding the issue you raised: For some technologies, this feature (connecting a file to the issue) is not yet supported. In such cases, the default value is shown ( I will modify the default value to replace the space character as suggested. |
@attiasas - Thanks for looking into the URI formatting issue. For the general "Missing path information" problem, these scans are being run against the tar file that we ship for on-premise installations. (As opposed to a tarball of a docker image as discussed here: https://jfrog.com/help/r/jfrog-cli/scanning-image-tarballs-on-the-local-file-system - these also don't provide path details). I've attached a test tar file with known issue (CVE-2023-43642) testing. Using jf 2.51.1, we get the following 'results' section in the SARIF file:
For comparison, using an open-source solution against the same file, we get a populated location URI:
|
Describe the bug
GitHub Advanced Security requires a 'physicalLocation.artifactLocation.uri' value. GHAS will fail to load the SARIF results if this data is not provided.
The SARIF file from jfrog-cli 2.50.2 scans is missing this value (previous releases have loaded, but I don't have any of them available to confirm).
Each result location must provide the property 'physicalLocation.artifactLocation.uri'. GitHub Advanced Security code scanning will not display a result whose location does not provide the URI of the artifact that contains the result.
Current behavior
SARIF file generated by jfrog-cli 2.50.2 fails the validation using the GHAS ingestion rules ( https://sarifweb.azurewebsites.net/Validation )
Reproduction steps
Generate SARIF file from 2.50.2
Run through the https://sarifweb.azurewebsites.net/Validation page with the GitHub ingestion rules enabled
Expected behavior
Clean results from SARIF Web validation
JFrog CLI version
jf version 2.50.2
Operating system type and version
Centos 8
JFrog Artifactory version
Enterprise Plus 7.55.10 rev 75510900
JFrog Xray version
{"xray_version":"3.65.2","xray_revision":"bca527a"}
The text was updated successfully, but these errors were encountered: