The package automatically writes its own hooks into supported agent configuration during global installation, including when hook state was off and no opt-out was recorded. Because this setup is limited to Onadit’s own integration, it is warning-level rather than a malicious hijack.
Static reason
High-risk behavior combination matched malicious policy.; source matched previously finalized malicious package; routed for review
Trigger
npm postinstall during a global install, unless skipped by environment settings.
Impact
Agent configuration outside the package is changed without a separate hook-setup command; Onadit hooks may then run in Claude Code or Codex sessions.
Mechanism
The postinstall refreshes existing Onadit connections and writes Onadit session and policy hooks when their state is off and no opt-out is recorded.
Evidence
package.jsondist/src/cli/postinstall-menubar.jsdist/src/cli/commands/mcp-install.jsdist/src/cli/hooks-writers/claude-code.js~/.claude/settings.json (or $CLAUDE_CONFIG_DIR/settings.json)~/.claude/hooks/~/.codex/hooks.json (or $CODEX_HOME/hooks.json)existing supported MCP client configuration files