Open NiccoloFei opened 8 months ago
Hi @NiccoloFei 👋
I'll check with the team to see if we have made any changes to the SARIF upload recently that could be responsible for this, but have you verified that the file generated by Snyk is actually a valid SARIF file? If so, could you make the SARIF file available?
Attaching the SARIF content below:
I'm pretty sure it's because your sarif has "security-severity": "undefined"
. I don't know what this value is supposed to be, but you should probably check with snyk to see if there is a known workaround. Otherwise, you can try post-processing the sarif before uploading.
@aeisenberg your assessment seems accurate to me. I tried to downgrade upload-sarif to v2 and the issue persists.
I'd recommend post-processing the SARIF that snyk produces to remove the undefined
. I am not sure what value should replace it, but it should be numeric.
Is there any issue opened within the Snyk? I'm getting the same exact error, except of undefined
replaced with null
: https://github.com/warriors-life/yokohama-proxy/actions/runs/8211361886/job/22460200402.
There are no issues that I am aware of. I'd recommend that you raise one. This appears to be a recent change seeing as how there are multiple reports in this issue.
Where can I create an issue? It seems like issues are disabled in the https://github.com/snyk/actions repository.
See here https://github.com/snyk/actions/blob/master/CONTRIBUTING.md#reporting-issues.
Thank you, submitted a ticket there!
See here https://github.com/snyk/actions/blob/master/CONTRIBUTING.md#reporting-issues.
Thank you, submitted a ticket there!
Are there any updates regarding the submitted ticket?
They've replied only today with a request to provide the full SARIF file (well, they could've downloaded it from just any run).
This behavior is expected - licenses and vulnerabilities were originally designed with a common structure but license-related findings are now managed differently. That is, license-related findings do not indicate a security vulnerability and are labeled as 'undefined'. You can use use the --sarif-file-output=snyk.sarif arg and add the following lines to fix it:
- name: Replace security-severity undefined for license-related findings
run: sed -i 's/"security-severity": "undefined"/"security-severity": "0"/g' snyk.sarif
This behavior is expected - licenses and vulnerabilities were originally designed with a common structure but license-related findings are now managed differently. That is, license-related findings do not indicate a security vulnerability and are labeled as 'undefined'. You can use use the --sarif-file-output=snyk.sarif arg and add the following lines to fix it:
- name: Replace security-severity undefined for license-related findings run: sed -i 's/"security-severity": "undefined"/"security-severity": "0"/g' snyk.sarif
I had to add the following line to fix the issue:
sed -i 's/"security-severity": "null"/"security-severity": "0"/g' snyk.sarif
Hi, recently I'm seeing the following error when running the
upload-sarif@v3
GH action. Example failure: https://github.com/cloudnative-pg/postgres-containers/actions/runs/8196632252/job/22417260216I'm not sure what could cause that. The upload was working just fine and started failing the last few days. Any help is appreciated, thanks in advance!