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

jfrog 2.50.1 - Invalid SARIF file for GHAS upload #2268

Closed
rseeton opened this issue Oct 17, 2023 · 3 comments
Closed

jfrog 2.50.1 - Invalid SARIF file for GHAS upload #2268

rseeton opened this issue Oct 17, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@rseeton
Copy link

rseeton commented Oct 17, 2023

Describe the bug

Hello all,

The current jfrog release (2.50.1) produces an invalid SARIF 2.1.0 file when running a scan:

jf scan --format sarif

The resulting SARIF file is invalid per to the validator SARIF 2.1.0 validation ( https://www.jsonschemavalidator.net/ )

"shortDescription": null,

Invalid type. Expected Object but got Null.
Schema path:
https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json#/definitions/multiformatMessageString/type

The generated file cannot be loaded to GHAS. This was working with the 2.48 CLI.

Current behavior

Generated SARIF file fails validation:

"shortDescription": null,

Invalid type. Expected Object but got Null.
Schema path:
https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json#/definitions/multiformatMessageString/type

Reproduction steps

Generate SARIF file using jfrog cli:

jf scan --format sarif > TEST.sarif

Paste TEST.sarif file to the https://www.jsonschemavalidator.net/

Expected behavior

Validation should be error free.

JFrog CLI version

jf version 2.50.1

Operating system type and version

Centos 8

JFrog Artifactory version

"version" : "7.55.10"

JFrog Xray version

{"xray_version":"3.65.2","xray_revision":"bca527a"}

@rseeton rseeton added the bug Something isn't working label Oct 17, 2023
@rseeton
Copy link
Author

rseeton commented Oct 17, 2023

This is a continuation of our testing of the issues raised in #2135

@attiasas
Copy link
Contributor

Hi @rseeton,

Thank you for bringing this issue to our attention. This bug is already a known issue, and we have addressed and fixed it in this pull request: jfrog/jfrog-cli-core#996

The fix will be included in the next release of the CLI. Your feedback is much appreciated.

@rseeton
Copy link
Author

rseeton commented Oct 18, 2023

jfrog-cli 2.50.2 produces a clean SARIF file, thanks!

@rseeton rseeton closed this as completed Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants