Bound installer network requests

This commit is contained in:
ushan0v
2026-07-12 15:01:11 +03:00
parent 2cdcbb4c0f
commit 00b7a400ec
2 changed files with 16 additions and 4 deletions
+9
View File
@@ -20,6 +20,15 @@ fail() {
[ -r "$INSTALLER" ] || fail "install.sh is missing"
grep -Fq 'wget -T "$METADATA_TIMEOUT_SECONDS" -t 1 -qO-' "$INSTALLER" ||
fail "installer wget metadata requests must have a timeout and no hidden retries"
grep -Fq 'wget -T "$DOWNLOAD_TIMEOUT_SECONDS" -t 1 -q -O' "$INSTALLER" ||
fail "installer wget downloads must have a timeout and no hidden retries"
grep -Fq 'curl --connect-timeout "$CONNECT_TIMEOUT_SECONDS" --max-time "$METADATA_TIMEOUT_SECONDS"' "$INSTALLER" ||
fail "installer curl metadata requests must have connect and total timeouts"
grep -Fq 'curl --connect-timeout "$CONNECT_TIMEOUT_SECONDS" --max-time "$DOWNLOAD_TIMEOUT_SECONDS"' "$INSTALLER" ||
fail "installer curl downloads must have connect and total timeouts"
if grep -n -E '(^|[;&|[:space:]])uci[[:space:]]+-q|command_exists[[:space:]]+uci|/usr/bin/uci' "$INSTALLER" >/dev/null; then
fail "install.sh must not own UCI reads/writes through shell"
fi