Skip to content

Template / SQL injection probes#1138

Merged
leondz merged 21 commits intoNVIDIA:mainfrom
erickgalinkin:injection
Apr 15, 2025
Merged

Template / SQL injection probes#1138
leondz merged 21 commits intoNVIDIA:mainfrom
erickgalinkin:injection

Conversation

@erickgalinkin
Copy link
Copy Markdown
Collaborator

Add template/code injection probes and SQL injection probes.

Increases view into systemic impacts against LLM agents/systems.

@erickgalinkin erickgalinkin added probes Content & activity of LLM probes detectors work on code that inherits from or manages Detector new plugin Describes an entirely new probe, detector, generator or harness labels Mar 24, 2025
Copy link
Copy Markdown
Collaborator

@jmartin-tech jmartin-tech left a comment

Choose a reason for hiding this comment

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

General documentation comments, would be good to have some tests in place for the new plugins.

Comment thread garak/detectors/injection.py
Comment thread garak/detectors/injection.py
Comment thread garak/detectors/injection.py
Comment thread garak/probes/injection.py
Comment thread garak/probes/injection.py
Comment thread garak/probes/injection.py
Comment thread garak/detectors/injection.py Outdated
Copy link
Copy Markdown
Collaborator

@leondz leondz left a comment

Choose a reason for hiding this comment

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

Love this overall. Few broader questions & minor edits.

Comment thread docs/source/detectors.rst Outdated
Comment thread garak/detectors/injection.py
Comment thread garak/data/payloads/python_code_execution.json
Comment thread garak/data/payloads/python_code_execution.json
def detect(self, attempt: garak.attempt.Attempt) -> List[float]:
results = []
for output in attempt.all_outputs:
if output is None:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This implies that the responsibility for both doing the exploitation and also getting the observation that tells us whether or not it's worked, both lie within the probe. Is that the pattern we want to settle on? It might be easier from an orchestration point of view, I just want to check.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I'm agnostic here -- This is intended to reflect existing patterns, but we're also going to want on system detectors/checkers for these things too, which I think might require a second pass.

Comment thread tests/detectors/test_detectors_injection.py Outdated
Comment thread tests/detectors/test_detectors_injection.py Outdated
Comment thread tests/detectors/test_detectors_injection.py Outdated
Comment thread tests/detectors/test_detectors_injection.py
Comment thread tests/detectors/test_detectors_injection.py Outdated
erickgalinkin and others added 13 commits April 10, 2025 10:48
Co-authored-by: Leon Derczynski <leonderczynski@gmail.com>
Signed-off-by: Erick Galinkin <erick.galinkin@gmail.com>
Co-authored-by: Leon Derczynski <leonderczynski@gmail.com>
Signed-off-by: Erick Galinkin <erick.galinkin@gmail.com>
Co-authored-by: Leon Derczynski <leonderczynski@gmail.com>
Signed-off-by: Erick Galinkin <erick.galinkin@gmail.com>
Co-authored-by: Leon Derczynski <leonderczynski@gmail.com>
Signed-off-by: Erick Galinkin <erick.galinkin@gmail.com>
Co-authored-by: Leon Derczynski <leonderczynski@gmail.com>
Signed-off-by: Erick Galinkin <erick.galinkin@gmail.com>
Signed-off-by: Jeffrey Martin <jemartin@nvidia.com>
@leondz leondz merged commit ef84138 into NVIDIA:main Apr 15, 2025
9 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

detectors work on code that inherits from or manages Detector new plugin Describes an entirely new probe, detector, generator or harness probes Content & activity of LLM probes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants