Closed streichsbaer closed 5 years ago
Hey @streichsbaer!
Thanks for opening this issue. I agree that the reporting could use consistency improvements. I also agree that the line details aren't ideal for the JSON output, where you don't get highlighted code to pinpoint the vulnerability. This may take a little bit of time as I consider exactly how I'd like to approach these updates, but this is definitely something I'd like to address. That said, I don't expect that this will take too long to resolve.
Thanks again for opening the issue!
Thanks @GriffinMB, great to hear it!
As mentioned, I'm very happy to support it via gitcoin or other means. WDTY?
No financial support needed, but I appreciate the offer :)
Alright, thanks a lot! Do ping me if you think there is anything I can do to support/help.
Hey @streichsbaer! I've pushed some updates to master that improve output consistency. All JSON output now contains the keys, "type", "line" and "file". The line number points directly to the offending issue, and defaults to 0 in instances where a line number may not make sense. Instances like "Missing CSRF Protections" behave a little differently, and "line" will point to the pipeline where the configuration is missing.
You can install the master version with mix archive.install github nccgroup/sobelow
to test it out. It's a fairly large change, so please let me know if you run into any issues!
I will leave this open for now, and will aim to release a new version early next week if there are no reported problems.
Thanks again!
Awesome, thanks @GriffinMB, I'll start testing this week and will let you know if I run into any issues.
Hey @streichsbaer! I intend on pushing the update as early as tomorrow if you don't have any feedback or issues.
This has been pushed to hex.pm! Thanks for opening the issue :)
Hello @GriffinMB, I've tested it against 5 projects with 14 total issues and it all looked fine! Will advise if anything else comes up.
Thanks again for the excellent work and fast turnaround time!
First of all, I'd like to say thank you for the hard work that went into
sobelow
.I've looked into making
sobelow
accessible through Guardrails.However, there are some challenges with processing the JSON output format as described below. I would love to fund work on this issue using gitcoin.
1. The findings are not consistently reporting file names.
Only some of the modules report the offending file.
For example:
vs
vs
2. Some filenames contain the line number, some don't.
There are inconsistencies in how the filenames are reported.
vs
3. The line numbers are not pointing to the offending line.
This has been reported previously (#37), but the decision to point to the function signature makes it difficult to point developers to the right line.
For example:
points to:
instead of:
Conclusion
To conclude, I would suggest that all findings:
Note that the function field can remain as is.
@GriffinMB and team I would appreciate your thoughts on that.
Thanks!