Skip to content

ModelSieve v0.3.0: hidden-tool detection

Latest

Choose a tag to compare

@redveil-industry redveil-industry released this 01 Dec 01:00

New check: template.injected_tool. It was suggested in the r/LocalLLM discussion of the top-400 study.

A chat template can't make network calls itself; rendering only produces a string. It can quietly add a tool to the system prompt, or tell the model to call one, and an agentic client that executes tool calls then does the exfiltration for it. ModelSieve now flags:

  • tool definitions hard-coded in the template's own text: JSON function schemas, and type fn = (…) => … signatures, including definitions split across many small string constants (vendor style, or an evader's);
  • instructions to call a specific named tool ("always call send_report(…");
  • HIGH when the hard-coded tool text carries a fixed URL, the exfiltration shape. MEDIUM otherwise, because vendor built-ins match too.

Tools rendered from the caller's own tools list are not flagged.

Measured on the 396 cached repos from the study: 5 findings in 3 unique templates, all MEDIUM, all a documented vendor built-in browser tool (search/open/find). No HIGH in real models.

87 tests; CI and action self-test green.