ystey0808/Intent Gate

LLM-based malicious-intent gate for PR diffs, self-hosted via local Ollama.

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Stale
License
None
namedescriptionrequireddefault
modelOllama model tagnoqwen2.5-coder:3b
block-thresholdRisk score (0-100) at/above which the verdict is block (fails the check)no70
review-thresholdRisk score (0-100) at/above which the verdict is reviewno40
commentPost/update a sticky PR comment with the reviewnotrue
fail-closedOn a scan error, block instead of failing open to review. Set true for protected/release branches; leave false on feature branches for dev experience.nofalse
request-timeoutPer-request read timeout in seconds for each Ollama call. Raise on slow/CPU-only runners.no600
num-ctxOllama context window (tokens). Must be large enough to hold the system prompt (~1.5k tok) + one max-chars chunk (~max-chars/4 tok) + 512 output tokens, or Ollama silently clips the prompt and the reply fails to parse. The 8192 default fits the 16000 max-chars budget; raise both together for bigger chunks, lower on CPU-only runners. Must match between warm-up and scan.no8192
max-charsPer-chunk character budget: the most diff sent to the model in ONE call. A large diff is split on file boundaries and packed into chunks under this. Keep it consistent with num-ctx (roughly num-ctx*4 minus prompt/output headroom).no16000
max-chunksHard cap on model calls per scan. Files that don't fit within this many chunks are left unscanned and floor the verdict to review. Bounds total wall-clock.no8

no outputs