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

BUG: OSS-Fuzz detection fails if project.yaml URL points to subfolder #3257

Closed
pnacht opened this issue Jul 10, 2023 · 0 comments · Fixed by #3364
Closed

BUG: OSS-Fuzz detection fails if project.yaml URL points to subfolder #3257

pnacht opened this issue Jul 10, 2023 · 0 comments · Fixed by #3364
Labels
check/Fuzzing kind/bug Something isn't working

Comments

@pnacht
Copy link
Contributor

pnacht commented Jul 10, 2023

Describe the bug
If a repo's project.yaml file on the OSS-Fuzz repo points to a sub-folder, Scorecard's Fuzzing detection fails.

Reproduction steps
Steps to reproduce the behavior:

  1. Note that google/go-cmp gets a 0/10 for Fuzzing: https://securityscorecards.dev/viewer/?uri=github.com/google%2Fgo-cmp
  2. However, the project is fuzzed: https://github.com/google/oss-fuzz/tree/master/projects/go-cmp
  3. However, the project.yaml points to the repo's cmp folder: main_repo: "https://github.com/google/go-cmp/cmp".

Expected behavior
Scorecard should parse the project.yaml's URL more cautiously, to ensure it always gets the correct username and repo.

Additional context
After a brief conversation with @spencerschrock, the issue seems to be here:

const splitLen = 2
split := strings.SplitN(strings.Trim(u.Path, "/"), "/", splitLen)
if len(split) != splitLen {
return "", fmt.Errorf("%s: %w", rawURL, errMalformedURL)
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
check/Fuzzing kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants