Skip to content

feat(eval): cyberseceval#8

Merged
ganler merged 7 commits intomainfrom
eval/cyberseceval
Aug 7, 2025
Merged

feat(eval): cyberseceval#8
ganler merged 7 commits intomainfrom
eval/cyberseceval

Conversation

@zhewang2001
Copy link
Contributor

No description provided.

Copilot AI review requested due to automatic review settings August 7, 2025 20:13
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Summary of Changes

Hello @zhewang2001, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a new evaluation capability for cybersecurity benchmarks, specifically integrating with Meta's CyberSecEval SCG (Secure Code Generation) framework. It adds a dedicated module to process evaluation results and interface with the external PurpleLlama CybersecurityBenchmarks tool, along with updating the main evaluation scripts and documentation to support this new evaluation type.

Highlights

  • New Evaluation Module: Implemented eval/cyberseceval.py to handle CyberSecEval SCG evaluations.
  • Evaluation Framework Integration: Integrated the new cyberseceval oracle into the existing evaluation framework, allowing it to be triggered via the --oracle flag.
  • New Parameter for PurpleLlama Path: Added a purplellama_path parameter across relevant evaluation scripts (eval_only.py, evaluate.py, main.py) to provide flexibility in specifying the PurpleLlama repository location.
  • Documentation Update: Updated README.md with comprehensive instructions for setting up and running CyberSecEval SCG evaluations, including necessary repository cloning and dependency installation.
  • Data Reformatting and External Tooling: The evaluate_cyberseceval function now reformats generated .jsonl data into a .reformat.json file, which is then used by the external CybersecurityBenchmarks tool for statistical analysis.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments or fill out our survey to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds CyberSecEval evaluation support to the evaluation framework by implementing the cyberseceval oracle and adding necessary configuration parameters.

  • Implements the evaluate_cyberseceval function to handle CyberSecEval SCG evaluation
  • Adds purplellama_path parameter throughout the evaluation pipeline to support custom PurpleLlama installation paths
  • Updates documentation with setup instructions for CyberSecEval evaluation

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
eval/main.py Adds purplellama_path parameter to main function signature and passes it to evaluate_main
eval/evaluate.py Adds purplellama_path parameter and passes it to evaluate_cyberseceval function
eval/eval_only.py Adds purplellama_path parameter to eval-only workflow
eval/cyberseceval.py Implements complete cyberseceval evaluation logic with data reformatting and subprocess execution
README.md Adds documentation for CyberSecEval SCG evaluation setup and usage

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces support for CyberSecEval evaluation. The changes include the evaluation script itself, plumbing for the new purplellama_path parameter, and documentation updates. My review focuses on improving the robustness, portability, and correctness of the new evaluation script, as well as clarifying the setup instructions in the README. I've suggested using try...finally for resource management, fixing a potential bug in model name parsing, removing redundant code, and making shell commands in the documentation easier to follow.

@zhewang2001 zhewang2001 requested a review from ganler August 7, 2025 20:29
@ganler ganler merged commit 380b359 into main Aug 7, 2025
2 checks passed
@ganler ganler deleted the eval/cyberseceval branch August 7, 2025 20:59
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.

3 participants