-
Notifications
You must be signed in to change notification settings - Fork 384
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
FEAT: Add Insecure Code Scorer #523
FEAT: Add Insecure Code Scorer #523
Conversation
Co-authored-by: Raja Sekhar Rao Dheekonda <[email protected]>
Co-authored-by: Raja Sekhar Rao Dheekonda <[email protected]>
Hello @rdheekonda , Thank you so much for the feedback! I believe I’ve resolved all the issues and cleaned up the code. Could you please verify? Of course, feel free to add any further feedback, and I’ll address it. I have one question, though—I think you may address this anyway: I'm not sure where exactly I should place the Thank you! |
Thank you for your contribution. We're organizing all scoring system prompts in this path |
1 similar comment
Thank you for your contribution. We're organizing all scoring system prompts in this path |
Hello @rdheekonda. Thank you! I made the changes. Feel free to review and let me know if any further adjustments are needed! 😃 |
Hi Raja, I encountered an issue when running Error Output:
Fix Applied: I replaced |
Sounds good. Thanks. |
Overview
This PR introduces a basic implementation of an LLM-based scorer,
InsecureCodeScorer
, which uses afloat_scale
scoring system to evaluate potential security vulnerabilities in code snippets. The scorer leverages an LLM to analyze code for security issues and returns a normalized float score based on the severity of detected vulnerabilities.Work Completed
pyrit/score/__init__.py
:InsecureCodeScorer
to the module’s imports, enabling it to be used throughout the package.assets/demo_scorer_definitions/insecure_code_scorer.yaml
:InsecureCodeScorer
. This enables easy adjustments to LLM prompts and scoring instructions.pyrit/score/insecure_code_scorer.py
:InsecureCodeScorer
, leveraging_score_value_with_llm
to retrieve scores from the LLM and normalize them on afloat_scale
.doc/code/scoring/insecure_code_scorer.ipynb
:InsecureCodeScorer
, showcasing example usage, scoring results, and explanations of the scoring process.Next Steps
KeyError
in the Jupyter Notebook and optimize theinsecure_code_scorer.yaml
configuration file.Related Issue
Issue #513