Repository navigation
v0.2.0a17
Pre-release
Pre-release
A security release. It closes an external report (thanks to kta1kri) and the follow-ups that finishing it turned up. If you enforce contracts in production, upgrade. TypeScript @sponsio/sdk@0.2.0-alpha.7 carries the same fixes.
pip install --pre -U sponsioA rule that cannot be evaluated no longer counts as satisfied
The common root of the report: missing input read as "not violated".
- Tool names meet on one spelling. A rule on
issue_refundused to missIssue_Refund,issue_refundandmcp__finance__issue_refund, which is our own MCP wire format.must_precedethen reported the rule as satisfied. - Amounts are read the way a model writes them. A cap that stopped
5000let'$5,000','5,000'and'5000 USD'through. This affected the library cap (arg_value_range, which YAML and the pattern factory produce) on both runtimes. A value that is present but is not a number is now refused instead of being compared as 0. - Missing arguments are refused when a rule reads them, including under MCP spellings.
SPONSIO_ALLOW_MISSING_ARGS=1restores the old behaviour. - Overflow (
'1e400') blocks on both runtimes.
Behaviour changes
EscalateToHumanrefuses the call. The docs said it refuses and notifies, but the call ran while the agent was told it was paused. It now returns a block withescalation=True. UseEscalateToHuman(hold=False)for notify-only.- A guard whose state was changed behind its API refuses (
guard:tampered). This covers flipping the monitor to observe, emptying the contract list, and swapping a strategy. Code in the same process can still defeat the check itself, so it makes tampering visible but does not prevent it.
Host hooks (Claude Code, Cursor, OpenClaw)
sponsio host install <host> --strictrefuses tools that have no contract library. Without it they still run, with a one-timerunning UNCHECKEDwarning.- The hook wiring is protected.
.claude/settings.jsonand.cursor/hooks.jsonare covered now; previously the rules guarded only the rule files. - Deleting the rules directory is blocked.
rm -rf ~/.sponsioused to remove every library. - The secret-exfiltration rule catches more forms. It no longer depends on the order of steps (
SECRETS=$(env); curl -d "$SECRETS"), and it covers-F,--post-dataand uploads. - Concurrent tool calls are counted correctly.
rate_limit(Bash, 1)used to admit several parallel calls. - A reinstall keeps your
defaults:, including mode and--strict.
Other
- OpenAI
with_raw_response/with_streaming_responseare checked. If a tool call must be stopped, the guard raisesToolCallBlocked. - The cached cloud rulebook is verified with an HMAC before offline use. If you go offline right after upgrading, before a successful pull, the copy cached by an older version will be refused, because it has no HMAC.
- The LangGraph whole-graph wrappers gate nodes before they run, and every other adapter gates the call its framework actually makes (independent verification by Trenyx).
sponsio --versionis correct again. It had reported0.2.0a11since a12.
Full list in CHANGELOG.md.