Skip to content

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

Merged
spencerschrock merged 3 commits intoossf:mainfrom
spencerschrock:fix/fuzzing-project-path
Aug 9, 2023
Merged

🐛 Fix parsing OSSFuzz project repos with subfolders and capitalization.#3364
spencerschrock merged 3 commits intoossf:mainfrom
spencerschrock:fix/fuzzing-project-path

Conversation

@spencerschrock
Copy link
Member

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
@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

Development

Successfully merging this pull request may close these issues.

BUG: OSS-Fuzz detection fails if project.yaml URL points to subfolder BUG: OSS-Fuzz detection is case-sensitive

2 participants