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

Scout Substrate Dataset - Add patch or diff field #25

Open
3 tasks
arturoBeccar opened this issue Jan 10, 2025 · 0 comments
Open
3 tasks

Scout Substrate Dataset - Add patch or diff field #25

arturoBeccar opened this issue Jan 10, 2025 · 0 comments
Assignees

Comments

@arturoBeccar
Copy link
Member

arturoBeccar commented Jan 10, 2025

Issue

The reviewer requested us to include a field called "patch" or "diff" in the Hugging Face Dataset, including a diff between audited and remediated commits, when available.

Steps

  • Create a script in scripts (can be called add_diff_to_linearized_findings.py) that generates a json findings-linearized-with-diff.json in the dataset folder that contains the patch or diff field requested by PAL reviewers.
    • It can have as input the findings-linear.json generated with the make dataset command through the script linearize_findings.
    • The patch or diff field should be included for each finding. It should be a string with the git diff between the audited_commit and the remediated_commit for the specified repository for the finding. If audited_commit or remediated_commit is not available, then complete the patch/diff field with null.
  • Add the add_diff_to_linearized_findings.py execution to the Makefile when calling make dataset.
  • The generated json should be linearized and uploaded to a Dataset in Hugging Face.

Caveats

Identifying the fix for each issue without simply putting the whole diff of the repository is a complicated task that requires a manual review.

@arturoBeccar arturoBeccar changed the title Scout Substrte Dataset - Add patch field Scout Substrate Dataset - Add patch or diff field Jan 10, 2025
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

No branches or pull requests

3 participants