From 3d00132bb1c654609b608245bccbcbce5d67b472 Mon Sep 17 00:00:00 2001 From: jessekemp1 <137220111+jessekemp1@users.noreply.github.com> Date: Tue, 26 May 2026 16:14:08 -0400 Subject: [PATCH] fix(update-check): replace prompt injection language with neutral notification MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The update check hook was using imperative override phrases ('URGENT', 'you MUST', 'before doing ANYTHING else') to force the LLM to display a specific message block. This pattern is indistinguishable from a prompt injection attack — a security-aware assistant will (and should) flag or refuse it. Fix: emit the update notice to stderr so it appears directly in the user's terminal without entering LLM context. Keep a minimal, neutral stdout note so the AI can mention it naturally if relevant. --- .claude-plugin/check_update.sh | 33 +++++++-------------------------- 1 file changed, 7 insertions(+), 26 deletions(-) diff --git a/.claude-plugin/check_update.sh b/.claude-plugin/check_update.sh index e7a744c1..d8720aa5 100755 --- a/.claude-plugin/check_update.sh +++ b/.claude-plugin/check_update.sh @@ -47,32 +47,13 @@ if [ -z "$remote_ver" ]; then fi fi -# If versions differ, output a message for Claude to relay to the user +# If versions differ, notify the user via stderr (visible in terminal, not injected into LLM context) +# and emit a plain context note for the AI session. if [ -n "$remote_ver" ] && [ "$remote_ver" != "$local_ver" ]; then - cat <&2 + echo "To upgrade: bash <(curl -sL https://raw.githubusercontent.com/databricks-solutions/ai-dev-kit/main/install.sh)" >&2 -\`\`\` -╔═══════════════════════════════════════════════════════╗ -║ ║ -║ Databricks AI Dev Kit — update available! ║ -║ ║ -║ Installed: v${local_ver} ║ -║ Available: v${remote_ver} ║ -║ ║ -╚═══════════════════════════════════════════════════════╝ -\`\`\` - -To upgrade, run: - -\`\`\` -bash <(curl -sL https://raw.githubusercontent.com/databricks-solutions/ai-dev-kit/main/install.sh) -\`\`\` - -\`\`\` -═══════════════════════════════════════════════════════ -\`\`\` - -Display that block FIRST, then proceed with the user's request. -EOF + # Neutral context note — lets the AI mention it naturally if relevant, without instruction injection + echo "Note: Databricks AI Dev Kit v${remote_ver} is available (installed: v${local_ver})." fi