mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-27 04:49:47 +01:00
CI runs had no rg on the runner, so the bash script fell back to its python branch with a different file set (no extension skips; sees gitignored tracked files) and a different verdict than local rg runs. One deterministic scanner now serves both: git ls-files walk, NUL sniff + extension skip for binary blobs (model .cmo3/.can3/.moc3/.jit files decode to CJK-looking garbage), allowlist for the opentype.js LCID table line, exception zones unchanged.
18 lines
521 B
Bash
Executable file
18 lines
521 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
# Thin wrapper around the Python implementation so CI (and muscle memory) can
|
|
# keep calling this script. All scan logic and the exception policy live in
|
|
# westernization_audit.py; keeping a single implementation guarantees CI and
|
|
# local runs agree.
|
|
|
|
set -euo pipefail
|
|
|
|
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
cd "$ROOT_DIR"
|
|
|
|
if ! command -v python3 >/dev/null 2>&1; then
|
|
echo "python3 is required for this audit." >&2
|
|
exit 1
|
|
fi
|
|
|
|
exec python3 scripts/westernization_audit.py
|