Skip to content

Conversation

@AmPaschal
Copy link
Collaborator

This PR fixes an error in the oss-fuzz-gen's experiment result page where true positive crashes are classified as false positives, and vice versa.

In report/templates/benchmark.html, crashes are designated as True vulnerabilities if sample.result.crashes and **not** sample.result.is_semantic_error.

However, in report/templates/index.html, the reverse occurs. Crashes were previously designated as True positives if bug_sample.sample.result.is_semantic_error. This PR fixes this discrepancy.

…true vulnerabilities are reported as true positives.
@google-cla
Copy link

google-cla bot commented May 13, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Copy link
Collaborator

@DonggeLiu DonggeLiu left a comment

Choose a reason for hiding this comment

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

Thanks @AmPaschal for noticing and fixing this.
Some nits before merging.

<td data-sort-value="{{bug_sample.benchmark.project}}">{{bug_sample.benchmark.project}}</td>
<td data-sort-value="{{bug_sample.benchmark.id}}"><a href="sample/{{ bug_sample.benchmark.id|urlencode }}/{{ bug_sample.sample.id }}.html">{{bug_sample.benchmark.id}}-{{ bug_sample.sample.id }} </a> </td>
<td style="color: {{ 'red' if bug_sample.sample.result.crashes and not bug_sample.sample.result.is_semantic_error else 'green' }}" data-sort-value="{{'True positive' if bug_sample.sample.result.is_semantic_error else 'False positive'}}">{{'True positive' if bug_sample.sample.result.is_semantic_error else 'False positive'}}</td>
<td style="color: {{ 'red' if bug_sample.sample.result.crashes and bug_sample.sample.result.is_semantic_error else 'green' }}" data-sort-value="{{'True positive' if not bug_sample.sample.result.is_semantic_error else 'False positive'}}">{{'True positive' if not bug_sample.sample.result.is_semantic_error else 'False positive'}}</td>
Copy link
Collaborator

@DonggeLiu DonggeLiu May 13, 2025

Choose a reason for hiding this comment

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

  1. Shall we keep the color consistent with the existing design? I.e., red for true positive and green for false positive.
    Essentially, true positive is more alarming because it indicates a potential vul should be reported to the project maintainers.

  2. Would it be clearer if we do:

'False positive' if bug_sample.sample.result.is_semantic_error else 'True positive'

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, these suggestions look good. I have changed the color and text accordingly.

Copy link
Collaborator

@DonggeLiu DonggeLiu left a comment

Choose a reason for hiding this comment

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

Thanks!

@DonggeLiu
Copy link
Collaborator

/gcbrun skip

@oliverchang
Copy link
Collaborator

Thanks @AmPaschal for noticing and fixing this. Some nits before merging.

+1 Thanks for noticing this @AmPaschal ! Great work catching this.

@DavidKorczynski DavidKorczynski merged commit 8bf5073 into google:main May 13, 2025
6 checks passed
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.

4 participants