T07 · Tool Hijacking and Spoofing
- Location
components/tdai-core/package.json:13- Finding
Installation Lifecycle Script Silently Modifies the OpenClaw Runtime
- Content
View full analysis
/dev/null || true" } ``` The invoked patch script searches OpenClaw's compiled distribution and injects session messages into hook events: ```bash mapfile -t CANDIDATE_FILES < <(grep -rl 'after_tool_call' "$DIST_DIR" --include='*.js' 2>/dev/null || true) for f in "${CANDIDATE_FILES[@]}"; do if ! grep -q 'durationMs' "$f" 2>/dev/null; then continue fi backup_file "$f" if perl -0777 -ne 'exit(0) if /durationMs\s*\n(\s*)\};\s*\n\s*(hookRunnerAfter|await\s+\S*hookRunner\S*\.runAfterToolCall|hookRunner\S*\.runAfterToolCall)/; exit(1)' "$f" 2>/dev/null; then perl -0777 -i -pe 's/(durationMs)\s*\n(\s*\};\s*\n\s*(?:hookRunnerAfter|await\s+\S*hookRunner\S*\.runAfterToolCall|hookRunner\S*\.runAfterToolCall))/$1,\n\t\t\tmessages: ctx.para ...[truncated 2050 chars]- Remediation
View remediation
