From 41543684240c22a6a31011b9039a7eee947f9297 Mon Sep 17 00:00:00 2001 From: Christian Rocha Date: Tue, 29 Jul 2025 10:10:07 -0400 Subject: [PATCH] chore: remove old scripts --- scripts/check_hidden_chars.sh | 41 ----------------------------------- scripts/snapshot | 3 --- 2 files changed, 44 deletions(-) delete mode 100755 scripts/check_hidden_chars.sh delete mode 100755 scripts/snapshot diff --git a/scripts/check_hidden_chars.sh b/scripts/check_hidden_chars.sh deleted file mode 100755 index 42f23e52867a5a20fc0be813bf9455cb3c368bd1..0000000000000000000000000000000000000000 --- a/scripts/check_hidden_chars.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash - -# Script to check for hidden/invisible characters in Go files -# This helps detect potential prompt injection attempts - -echo "Checking Go files for hidden characters..." - -# Find all Go files in the repository -go_files=$(find . -name "*.go" -type f) - -# Counter for files with hidden characters -files_with_hidden=0 - -for file in $go_files; do - # Check for specific Unicode hidden characters that could be used for prompt injection - # This excludes normal whitespace like tabs and newlines - # Looking for: - # - Zero-width spaces (U+200B) - # - Zero-width non-joiners (U+200C) - # - Zero-width joiners (U+200D) - # - Left-to-right/right-to-left marks (U+200E, U+200F) - # - Bidirectional overrides (U+202A-U+202E) - # - Byte order mark (U+FEFF) - if hexdump -C "$file" | grep -E 'e2 80 8b|e2 80 8c|e2 80 8d|e2 80 8e|e2 80 8f|e2 80 aa|e2 80 ab|e2 80 ac|e2 80 ad|e2 80 ae|ef bb bf' > /dev/null 2>&1; then - echo "Hidden characters found in: $file" - - # Show the file with potential issues - echo " Hexdump showing suspicious characters:" - hexdump -C "$file" | grep -E 'e2 80 8b|e2 80 8c|e2 80 8d|e2 80 8e|e2 80 8f|e2 80 aa|e2 80 ab|e2 80 ac|e2 80 ad|e2 80 ae|ef bb bf' | head -10 - - files_with_hidden=$((files_with_hidden + 1)) - fi -done - -if [ $files_with_hidden -eq 0 ]; then - echo "No hidden characters found in any Go files." -else - echo "Found hidden characters in $files_with_hidden Go file(s)." -fi - -exit $files_with_hidden # Exit with number of affected files as status code \ No newline at end of file diff --git a/scripts/snapshot b/scripts/snapshot deleted file mode 100755 index 0f36e225fb32c1946c3851acb80739c0e4a6fb3f..0000000000000000000000000000000000000000 --- a/scripts/snapshot +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash -set -e -goreleaser build --clean --snapshot --skip validate