-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
Generated SARIF file is not valid SARIF #38
Comments
Thank you for the report @v-homsi! Kindly tagging my colleague @kirbyquerby to take a look. |
This change is based on securego/gosec#565 . Fixes include: * add a version field to the driver * report start and end line of issues * report correct sarif level based on the issue's reported severity rather than always warning * avoid duplicate entries in rules Updates cosmos#38
It looks like this was previously fixed in the upstream securego/gosec in securego/gosec#565 I've made #39 to pull in those changes, which should hopefully solve the issue. This repo is based on a pretty old version of gosec (almost 2 years old, I believe). Since this repository is primarily just additional rules on top of what securego/gosec provides, we would probably benefit a lot from figuring out a way to just add our rules to the latest version of gosec, rather than maintaining an entire fork. This will let us benefit from bug fixes, features, etc from upstream instead of having to discover and fix them separately ourselves. |
Roger that @kirbyquerby and thank you for investigating! |
This change is based on securego/gosec#565 . Fixes include: * add a version field to the driver * report start and end line of issues * report correct sarif level based on the issue's reported severity rather than always warning * avoid duplicate entries in rules Updates #38
@v-homsi this has hopefully been fixed by #39. I've released v0.0.4. I'm closing this as the action now succeeds in my fork: https://github.com/kirbyquerby/evmos/actions/runs/3063781539/jobs/4946236000 Feel free to reopen if something's still not working. |
@kirbyquerby @odeke-em Works perfectly! Thanks for the help on this! Much appreciated :) |
- Uncomment upload sarif as cosmos/gosec#38 is fixed
Uncomment upload sarif step in security workflow - Uncomment upload sarif as cosmos/gosec#38 is fixed Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
Uncomment upload sarif step in security workflow - Uncomment upload sarif as cosmos/gosec#38 is fixed Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
Uncomment upload sarif step in security workflow - Uncomment upload sarif as cosmos/gosec#38 is fixed Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
Uncomment upload sarif step in security workflow - Uncomment upload sarif as cosmos/gosec#38 is fixed Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
Uncomment upload sarif step in security workflow - Uncomment upload sarif as cosmos/gosec#38 is fixed Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
Uncomment upload sarif step in security workflow - Uncomment upload sarif as cosmos/gosec#38 is fixed Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
Uncomment upload sarif step in security workflow - Uncomment upload sarif as cosmos/gosec#38 is fixed Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
Uncomment upload sarif step in security workflow - Uncomment upload sarif as cosmos/gosec#38 is fixed Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
Uncomment upload sarif step in security workflow - Uncomment upload sarif as cosmos/gosec#38 is fixed Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
Uncomment upload sarif step in security workflow - Uncomment upload sarif as cosmos/gosec#38 is fixed Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
Uncomment upload sarif step in security workflow - Uncomment upload sarif as cosmos/gosec#38 is fixed Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
Uncomment upload sarif step in security workflow - Uncomment upload sarif as cosmos/gosec#38 is fixed Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
Uncomment upload sarif step in security workflow - Uncomment upload sarif as cosmos/gosec#38 is fixed Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
Summary
Generated SARIF file is not considered valid as per upload-sarif github action.
This is due to the duplicate ids of some of the rules generated in the SARIF file.
Steps to reproduce the behavior
To reproduce the error, you will need to run a github action similar to this. You can also check out the error in this run.
To reproduce the SARIF file, you can run:
gosec version
Master branch
Go version (output of 'go version')
go1.18.4
Operating system / Environment
Ubuntu
Expected behavior
Generated SARIF is valid and can be uploaded
Actual behavior
Generated SARIF is not valid and cannot be uploaded
I cannot upload the sample file as the format is not supported by github. But here's a snippet of the SARIF file generated:
The text was updated successfully, but these errors were encountered: