Skip to content

llmAntidote v3.2.4

Latest

Choose a tag to compare

@GroveMinting GroveMinting released this 12 Oct 14:55
· 1 commit to main since this release
c7f6a54

Addresses the Hermes plugin-catalog review blocker at 2070999.

  • Fix a denial-of-service in the environment_secret detection regex
    (llm_antidote/policy.py): the unbounded (?:\S*/)?env\b alternative
    backtracked quadratically on long single-line tool arguments (a ~100 KB run of
    ; took seconds per assess() while holding the GIL, stalling the whole
    agent). Replaced with a bounded path form,
    (?:^|[\s;&|])(?:[^\s;&|/]{0,256}/){0,16}env\b, which still detects env,
    /usr/bin/env, and friends but in linear time.
  • Add tests/test_policy_performance.py, timing the full sensitive-pattern set
    plus _UPLOAD_SINK/_DOWNLOAD_EXECUTE (and _NETWORK_SINK/_REVERSE_SHELL)
    on ";"*150_000 and "x=1;"*40_000, plus an end-to-end double assess(),
    asserting a sub-second budget.

Before: ~4.4 s at 50 KB for the env pattern alone. After: ~34 ms at 150 KB.