Add standalone script LlmAlertExplainer.js - #520
Conversation
Sends ZAP alerts to an OpenAI-compatible chat completions endpoint and prints an explanation plus remediation guidance for each alert, to help triage scan results or draft report text. Endpoint, API key env var, and model are configurable at the top of the script. Signed-off-by: Abliteration.ai <help@abliteration.ai>
|
New Issues (10)Checkmarx found the following issues in this Pull Request
Communicate with Checkmarx by submitting a PR comment with @Checkmarx followed by one of the supported commands. Learn about the supported commands here. |
What was the issue? |
|
No error — I just didn't have a ZAP instance handy in my environment, so I validated against the patterns in existing merged scripts plus a syntax check instead of a live console run. Happy to test it properly if there's an easy headless way, or adjust anything you'd like. (The Checkmarx findings are all in files this PR doesn't touch.) |
|
Ya you can ignore those, that's okay. |
|
We're about to release an LLM add-on. |




Adds a standalone script that sends ZAP alerts to an OpenAI-compatible chat completions endpoint and prints an explanation plus remediation guidance for each alert. It's handy for triaging scan results or drafting report text straight from the Script Console.
Details:
ExtensionAlert.getAllAlerts(), following the pattern of the existingstandalone/Loop through alerts.js.HttpSender/HttpMessageclasses, the same mechanism asencode-decode/CyberChefExample.jsandextender/arpSyndicateSubdomainDiscovery.js, so it respects ZAP's network/proxy settings.https://api.abliteration.ai/v1, key inABLIT_KEY, modelabliterated-model), with comments showing how to point it at OpenAI, Ollama, LM Studio, or any other OpenAI-compatible server.SITE_FILTERsetting limits explanations to alerts of a single site andMAX_ALERTScaps the number of API calls per run.Syntax checked with
node --checkand formatted with prettier per the repo's spotless config. I couldn't run it inside ZAP itself, so it sticks to patterns already proven in other scripts in this repo.