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

🐛 Fix parsing OSSFuzz project repos with subfolders and capitalization. #3364

Merged
merged 3 commits into from
Aug 9, 2023

Conversation

spencerschrock
Copy link
Contributor

What kind of change does this PR introduce?

bug fix

What is the current behavior?

  • parsing ossfuzz projects whose main_repo field points to a subfolders (eg. github.com/google/go-cmp/cmp), doesn't register when asked about github.com/google/go-cmp)
  • parsing ossfuzz projects that have different capitalization from GitHub's view causes ossfuzz detection to fail

What is the new behavior (if this is a feature change)?**

  • main_repo fields to subfolders are parsed correctly

  • the internals of the oss-fuzz client use lowercase strings to standardize capitalization.

  • Tests for the changes have been added (for bug fixes/features)

Which issue(s) this PR fixes

Fixes #3256
Fixes #3257

Special notes for your reviewer

Does this PR introduce a user-facing change?

For user-facing changes, please add a concise, human-readable release note to
the release-note

(In particular, describe what changes users might need to make in their
application as a result of this pull request.)

NONE

@spencerschrock spencerschrock temporarily deployed to gitlab August 9, 2023 00:39 — with GitHub Actions Inactive
@spencerschrock spencerschrock temporarily deployed to integration-test August 9, 2023 00:40 — with GitHub Actions Inactive
@codecov
Copy link

codecov bot commented Aug 9, 2023

Codecov Report

Merging #3364 (bd26734) into main (22fb10c) will increase coverage by 5.52%.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3364      +/-   ##
==========================================
+ Coverage   61.98%   67.51%   +5.52%     
==========================================
  Files         178      178              
  Lines       12874    12876       +2     
==========================================
+ Hits         7980     8693     +713     
+ Misses       4455     3675     -780     
- Partials      439      508      +69     

@spencerschrock spencerschrock temporarily deployed to gitlab August 9, 2023 20:06 — with GitHub Actions Inactive
@spencerschrock spencerschrock temporarily deployed to integration-test August 9, 2023 20:06 — with GitHub Actions Inactive
@spencerschrock spencerschrock merged commit 9033d51 into ossf:main Aug 9, 2023
38 checks passed
@spencerschrock spencerschrock deleted the fix/fuzzing-project-path branch August 9, 2023 20:18
ashearin pushed a commit to kgangerlm/scorecard-gitlab that referenced this pull request Nov 13, 2023
…n. (ossf#3364)

* Split main_repo with correct number of parts. Add go-cmp test.

Signed-off-by: Spencer Schrock <[email protected]>

* force repo to lowercase when comparing names.

Signed-off-by: Spencer Schrock <[email protected]>

---------

Signed-off-by: Spencer Schrock <[email protected]>
Signed-off-by: Allen Shearin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants