From 096a5cb4dfe28e0207276c0ffb0d8b6749be8058 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 1 Dec 2025 15:19:29 +0000 Subject: [PATCH] Address code review feedback and fix security issues Co-authored-by: kuhyx <147418882+kuhyx@users.noreply.github.com> --- .github/workflows/go.yml | 3 +++ main.go | 2 ++ run_go.sh | 5 ++++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index cbb2dc9..9acf096 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -6,6 +6,9 @@ on: pull_request: branches: [ "main" ] +permissions: + contents: read + jobs: build: runs-on: ubuntu-latest diff --git a/main.go b/main.go index 230ce7e..481b2f3 100644 --- a/main.go +++ b/main.go @@ -162,6 +162,8 @@ type SendMessageRequest struct { } // Command triggers +// These include various Unicode variants for compatibility with different input methods +// and to match the original Python implementation's command variations var catCommands = []string{"!kot", "!koty", "!kots", "!cat", "!cats", "!meow", "!miau", "!ᴋᴏᴛ", "!𝓴𝓸𝓽", "!𝗸𝗼𝘁"} var dogCommands = []string{"!pies", "!psy", "!dog", "!dogs", "!woof", "!szczek", "!𝗽𝗶𝗲𝘀", "!͓̽p͓̽i͓̽e͓̽s͓̽"} diff --git a/run_go.sh b/run_go.sh index 0a52b6a..e693b01 100755 --- a/run_go.sh +++ b/run_go.sh @@ -2,7 +2,10 @@ # Build and run the Go version of Signal Bot # First, build the application -go build -o signal-bot main.go +if ! go build -o signal-bot main.go; then + echo "Build failed" + exit 1 +fi # Run the application ./signal-bot