ystey0808/Intent Gate
LLM-based malicious-intent gate for PR diffs, self-hosted via local Ollama.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| model | Ollama model tag | no | qwen2.5-coder:3b |
| block-threshold | Risk score (0-100) at/above which the verdict is block (fails the check) | no | 70 |
| review-threshold | Risk score (0-100) at/above which the verdict is review | no | 40 |
| comment | Post/update a sticky PR comment with the review | no | true |
| fail-closed | On a scan error, block instead of failing open to review. Set true for protected/release branches; leave false on feature branches for dev experience. | no | false |
| request-timeout | Per-request read timeout in seconds for each Ollama call. Raise on slow/CPU-only runners. | no | 600 |
| num-ctx | Ollama 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. | no | 8192 |
| max-chars | Per-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). | no | 16000 |
| max-chunks | Hard 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. | no | 8 |
Outputs
no outputs