Jev can't hallucinate a field and can't throw a type error. Neither means the answer is right. A guardrail that returns a confident noul: 0.02 for rm -rf / still lets the call through. jev-guard scans your code for the ways a Jev-based guardrail fails open.
LangChain's AutoModeMiddleware uses Jev to block dangerous tool calls. The documented example gates a shell on the model's default decision, with no threshold. That is the exact shape jev-guard was built to catch.
# straight from the AutoModeMiddleware blog guardrail = AutoModeMiddleware(tools=["bash"]) # no threshold. no escalation. no abstain. agent = create_agent("openai:gpt-5.6-luna", middleware=[guardrail])
A 31-line code-review agent that gates bash with Jev, feeds an untrusted PR diff into state, and acts on the decision. Same file, three tools. bandit and ruff are not wrong — there's no eval, no SQL string, no subprocess. The danger is trusting an un-abstaining classifier on a control path, which pattern-based SAST can't see.
$ jev-guard scan review_agent.py L8 HIGH JG001 guardrail gates bash with no confidence threshold L8 HIGH JG009 Jev is the terminal judge of a dangerous action, no escalation L18 HIGH JG008 forced-choice question has no abstain option L15 MED JG004 untrusted PR diff flows into guardrail state L26 MED JG003 decision consumed without checking confidence INFO JG005 Jev used as a security control
Nine rules, each with a fix. Static AST analysis that follows variable assignments, so indirection is caught too.
Guardrail gates actions with no configured confidence threshold.
Dangerous tool wired to an agent with no guardrail present.
Decision consumed without ever checking calibrated confidence.
Untrusted content flows into the guardrail's state.
Jev on a security path — validate thresholds on your own data.
Threshold set in an unsafe band — blocks only near-certain danger.
Untrusted text interpolated into a question's instructions.
Forced-choice question with no abstain option — the model guesses.
Jev as terminal judge of a dangerous action, no escalation path.
Jev is a forced-choice model. Give it three wrong options and it picks one, sometimes at high confidence. It doesn't abstain.
Command line and CI gate:
pip install jevg jev-guard scan src/ # scan a tree jev-guard scan src/ --format sarif # GitHub code scanning jev-guard scan src/ --fail-on HIGH # exit 1 on HIGH+
GitHub Action and pre-commit:
# .github/workflows/ci.yml
- uses: ppradyoth/jev-guard@v0.4.1
with:
path: src/
fail-on: HIGH