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

feat: fuzzing json inputs for report merging #1888

Merged
merged 1 commit into from Aug 17, 2022

Conversation

yashugarg
Copy link
Contributor

I learned about importing .proto files and found exciting JSON functions so I tried them out in fuzzing MergeReports.

@yashugarg
Copy link
Contributor Author

@terriko, these new tests don't yield any interesting results at the moment (It's mostly just MissingFieldError). I am trying to figure out how to force protobuf to provide non-empty strings in message fields.
Could you keep it running on the cloud VM, if possible, to see what we get after getting past the MissingFieldError?

@codecov-commenter
Copy link

Codecov Report

Merging #1888 (03f13e0) into main (661c796) will increase coverage by 9.54%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #1888      +/-   ##
==========================================
+ Coverage   78.93%   88.48%   +9.54%     
==========================================
  Files         316      316              
  Lines        7269     7269              
  Branches     1184     1184              
==========================================
+ Hits         5738     6432     +694     
+ Misses       1281      581     -700     
- Partials      250      256       +6     
Flag Coverage Δ
longtests 78.95% <ø> (+0.01%) ⬆️
win-longtests 87.46% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
cve_bin_tool/version_scanner.py 86.71% <0.00%> (+0.69%) ⬆️
cve_bin_tool/merge.py 80.32% <0.00%> (+0.81%) ⬆️
cve_bin_tool/helper_script.py 86.23% <0.00%> (+0.91%) ⬆️
cve_bin_tool/parsers/java.py 75.00% <0.00%> (+1.47%) ⬆️
test/test_checkers.py 95.16% <0.00%> (+1.61%) ⬆️
test/test_extractor.py 95.67% <0.00%> (+2.16%) ⬆️
cve_bin_tool/output_engine/util.py 88.15% <0.00%> (+2.63%) ⬆️
cve_bin_tool/output_engine/__init__.py 72.61% <0.00%> (+2.77%) ⬆️
cve_bin_tool/checkers/glibc.py 100.00% <0.00%> (+4.16%) ⬆️
cve_bin_tool/version.py 100.00% <0.00%> (+5.88%) ⬆️
... and 18 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@terriko
Copy link
Contributor

terriko commented Aug 17, 2022

I don't know offhand how to make protobuf not do empty strings (though there's probably a way) but you can do the check in the python code on data or just ignore MissingFieldError the way we ignore SystemExit.

Anyhow, I'll merge this so you can iterate. I'm not going to have time to get a cloud instance up and rolling before we meet tomorrow, but hopefully after!

@terriko terriko merged commit 41e01d0 into intel:main Aug 17, 2022
@yashugarg yashugarg deleted the fuzz-json-ireport branch August 19, 2022 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants