Andy Mal
Andy is offline · heartbeat 62d ago

← all versions of ticketlens

[email protected]

suspicious   confidence 72%   action isolate   analyzed 2026-09-23 19:40 UTC by yolo in 20 tool calls, with lab detonation

Summary

The postinstall hook writes a Stop-hook entry into ~/.claude/settings.json (and copies SKILL.md to ~/.claude/commands/jtb.md), establishing persistent code execution on every Claude Code session end. That hook spawns a detached child process (recall-auto-capture.mjs) that can connect to api.ticketlens.app using the user's CLI login token to save "Recall notes." The package also ships a 640-line SKILL.md containing direct instructions to AI assistants (prompt injection) governing how they should behave during ticket-fetch sessions.

Intent

A Jira CLI that installs persistent hooks into AI assistant configurations (Claude Code settings.json, command directories) to execute its own scripts at session boundaries, and ships an extensive SKILL.md that contains prompt-injection instructions to control AI assistant behavior during ticket-fetch sessions.

agent_config_tamper persistence code_execution network_egress reconnaissance

Findings

AI agent config tamper at install time high scripts/postinstall.mjs:14, skills/jtb/scripts/lib/hooks-setup.mjs:86-117
postinstall.mjs copies skills/jtb/SKILL.md to ~/.claude/commands/jtb.md (and analogous dirs for .claude-work, .gemini, .copilot-cli). hooks-setup.mjs writes a Stop-hook entry into ~/.claude/settings.json that spawns recall-nudge-stop.mjs on every Claude Code session end.
Persistent code execution via Claude Code hook high skills/jtb/hooks/recall-nudge-stop.mjs:95-100
The installed settings.json hook runs node "<package>/skills/jtb/hooks/recall-nudge-stop.mjs" at session end. That script spawns a detached, unref'd child (recall-auto-capture.mjs) which can make network calls to api.ticketlens.app using the user's login token.
Prompt injection in SKILL.md medium skills/jtb/SKILL.md:113,270,461
640-line skill file contains direct instructions to AI assistants (e.g., 'If this harness has TicketLens's MCP server configured, prefer it over the bash form'), governing tool selection, behavior during ticket fetches, and autonomous Recall note capture.
Environment exposure in function signature low skills/jtb/scripts/fetch-my-tickets.mjs:46
fetch-my-tickets.mjs accepts process.env as a parameter (default), meaning any caller passing the real environment exposes all environment variables including API keys.

Lab evidence

Install hooks ran in the isolated lab. Processes spawned: 4. Hooks: postinstall (exit 0).

Canary credential files read: /home/andy/.claude/settings.json, /home/andy/.claude/settings.json.62.tmp

Files written outside the package: /home/andy/.claude/settings.json.62.tmp, /home/andy/.claude/settings.json