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

added: fuzz_crawl.py and cifuzz #6072

Closed
wants to merge 6 commits into from
Closed

added: fuzz_crawl.py and cifuzz #6072

wants to merge 6 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Sep 27, 2023

This PR is adding fuzz target from already merged PR in OSS-fuzz (google/oss-fuzz#10991) and CIfuzz for fuzzing targets against every PR.

@codecov
Copy link

codecov bot commented Sep 27, 2023

Codecov Report

Merging #6072 (8a52abf) into master (4abc54f) will increase coverage by 0.06%.
The diff coverage is n/a.

❗ Current head 8a52abf differs from pull request most recent head 5837c4d. Consider uploading reports for the commit 5837c4d to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6072      +/-   ##
==========================================
+ Coverage   88.88%   88.95%   +0.06%     
==========================================
  Files         163      163              
  Lines       11571    11571              
  Branches     1876     1876              
==========================================
+ Hits        10285    10293       +8     
+ Misses        975      969       -6     
+ Partials      311      309       -2     

see 1 file with indirect coverage changes

@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

Comment on lines +24 to +40
class test_spider(scrapy.Spider):
start_urls = ["http://google.com", "http://youtube.com/"]

def parse(self, response):
pass


def TestOneInput(data):
fdp = atheris.FuzzedDataProvider(data)
test = fdp.ConsumeUnicodeNoSurrogates(fdp.ConsumeIntInRange(0, 4096))

try:
process = CrawlerProcess(settings={test})
process.crawl(test_spider)
process.start()
except CloseSpider:
pass
Copy link
Member

@Gallaecio Gallaecio Sep 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel a bit out of my depth here. Not only I am not entirely sure how fuzzing works here, but I also don’t know what will prevent those start_urls from actually being called, which is probably undesirable, or how passing the set {test} as the value of a parameter that expects a dict can work.

cc @wRAR

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I guess it should be a dict. Sorry about that.
I will close this PR and add better fuzz targets soon.

@ghost ghost closed this Sep 28, 2023
@ghost ghost deleted the fuzz branch September 28, 2023 09:16
This pull request was closed.
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

1 participant