-
Notifications
You must be signed in to change notification settings - Fork 508
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
Feature: add Scorecard to OSS-Fuzz and CIFuzz #1389
Comments
Which API do you want to fuzz within scorecard? If it is just to get the checkmark for fuzzing then it doesn't add value. Probably good for discussion. |
FWIW Looking at #1256 (comment), I think it would make sense to cover h2non/filetype at least (assuming scorecard will keep using it for parsing untrusted data). |
As far as I know scorecard also parses random bash scripts with https://github.com/mvdan/sh so ideally it should probably be covered as well (though I agree technically it doesn't improve the fuzzing score of scorecard itself) |
AFAIK the https://github.com/mvdan/sh is fuzzed probably randomly not using oss-fuzz. |
I agree,I think it would be better to include the fuzzing that repository instead of Scorecard. Thanks for bringing it up. It makes sense. |
scorecard has its own file parser located in https://github.com/ossf/scorecard/tree/main/checks/fileparser though (which I think is a good candidate for fuzzing).
Good to know. Thanks! But given that finding and fixing bugs found by fuzz targets is like playing whack-a-mole if it isn't fuzzed continuous it's probably safe to say it isn't fuzzed. |
I agree. It's a valid use case. |
I wrote an issue on that repo mvdan/sh#777 |
IMO, we should start with a basic framework which allows us to start fuzzing. Over time we can keep identifying and adding more APIs as we see fit. The recent nil-ptr crashes during file parsing are the reason I think this will be useful. Even though the parsing libraries we use might be fuzzed, the crashes were due to our logic. |
Looks like the oss-fuzz will support native fuzzing which is a lot easier with the 1.18 release. We should wait until then. google/oss-fuzz#7020 |
FWIW considering that scorecard isn't on OSS-Fuzz yet and its testing infrastructure doesn't rely on public OSS-Fuzz corpora I think it would be better to integrate it with https://github.com/google/clusterfuzzlite/ in the sense that as long as steps requiring external storage like corpus pruning are behind something like |
We could look at this when we migrate to go 1.18 especially because it is going to be builtin and is going to be supported by oss-fuzz google/oss-fuzz#7020 |
@justaugustus assigning this to you track progress. Part of #1618. |
This is creating crashes google/oss-fuzz#7269 |
FWIW since the fuzz target is public I don't think scorecard bug reports should be private because they can be easily reproduced. For example, I don't have access to bug reports but I can trigger all the crashes like:
@naveensrinivasan looking at https://github.com/google/oss-fuzz/pull/7269/files it seems a seed corpus wasn't added there. I think it would probably make sense to address that in #1631. Seed corpora are briefly mentioned at https://google.github.io/oss-fuzz/advanced-topics/ideal-integration/#seed-corpus |
There are multiple crashes, I have gotten a few emails about this from oss-fuzz. There need to be multiple things that have to be done before Scorecard is integrated into oss-fuzz
The reason behind the above steps was based on me integrating sigstore into oss-fuzz https://github.com/sigstore/sigstore/tree/main/test/fuzz I think this is the order of things that have been done to avoid getting multiple crashes. This is some amount of work. We have to decide to either fix this or another option is to remove google/oss-fuzz#7269 this till we get to do it from our end. The default disclosure policy is Unless we prioritize to work on this. @justaugustus @azeemshaikh38 @laurentsimon @inferno-chromium Thoughts? |
FWIW I don't think that's what really happens in practice. Once fuzz targets are public it's safe to assume that bugs they can discover are (kind of) publicly known (because they are actually run outside of OSS-Fuzz). I completely agree with @naveensrinivasan on how scorecard should be integrated. |
👍 |
This issue is stale because it has been open for 60 days with no activity. |
Improve Scorecard's Fuzzing score by adding it to OSS-Fuzz and enabling CIFuzz GH Action.
@jonathanmetzman fyi.
The text was updated successfully, but these errors were encountered: