Add a command blacklist to queue-processor.js to prevent Claude from executing dangerous commands#5
Open
ubuntupunk wants to merge 4 commits intoTinyAGI:mainfrom
Open
Add a command blacklist to queue-processor.js to prevent Claude from executing dangerous commands#5ubuntupunk wants to merge 4 commits intoTinyAGI:mainfrom
queue-processor.js to prevent Claude from executing dangerous commands#5ubuntupunk wants to merge 4 commits intoTinyAGI:mainfrom
Conversation
…mux capture parameters
malloryatefa
added a commit
to malloryatefa/tinyclaw
that referenced
this pull request
Feb 16, 2026
Fix TinyAGI#1 (High): Port config now respects settings.json. Only MSTEAMS_PORT env var overrides config; the generic PORT env var and default 3978 no longer shadow channels.teams.port from settings. Fix TinyAGI#2 (High): Proactive messaging works via senderId fallback. Stores conversation references by senderId on every incoming message. Outgoing queue falls back to senderReferences when pendingMessages has no match, matching the pattern used by Telegram/Discord/WhatsApp clients. Fix TinyAGI#3 (High): Real file download/upload support. Incoming attachments are downloaded to ~/.tinyclaw/files/ with [file: /path] references in queue messages. Outgoing files are sent as base64-encoded attachments via the Bot Framework activity API. Fix TinyAGI#4 (Medium): /reset command implemented. Handles both bare /reset (shows usage) and /reset @agent_id (writes reset_flag), matching the exact pattern from telegram-client.ts. Fix TinyAGI#5 (Medium): Empty message guard added. responseText.trim() is checked before calling splitMessage/sendActivity in the outgoing queue, preventing empty activity sends for file-only responses. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a command blacklist to
queue-processor.jsto prevent Claude from executing dangerous commands likerm -rf,sudo,mkfs, etc.Changes
BLACKLISTarray with 17 dangerous command patterns andisBlacklisted()function to filter themBlocked Commands
rm -rf,rm -r,rm /sudodd if=,mkfs>:,> /chmod -R 000,chown -Rkill -9,pkill,killalliptables,ufw disablesystemctl stopreboot,shutdownMotivation
Since
queue-processor.jsruns with--dangerously-skip-permissions, Claude can execute any command the user account can. The blacklist provides an additional layer of protection against accidental or malicious destructive commands.Testing
.tinyclaw/logs/queue.log