Production hardening: host-aware install, ownership contracts, firewall safety
This commit is contained in:
@@ -40,4 +40,12 @@ verify_archive() {
|
||||
env_content="$(tar -xOzf "$archive" hy2xs-install/config/hy2xs.env)"
|
||||
printf '%s\n' "$env_content" | grep -q 'replace-with-your-domain.example' && fail "packaged hy2xs.env contains placeholder domain"
|
||||
printf '%s\n' "$env_content" | grep -q 'replace-with-your-email@example.com' && fail "packaged hy2xs.env contains placeholder email"
|
||||
|
||||
local tmp
|
||||
tmp="$(mktemp -d)"
|
||||
tar -xzf "$archive" -C "$tmp"
|
||||
[ -x "$tmp/hy2xs-install/install.sh" ] || fail "install.sh is not executable"
|
||||
[ -x "$tmp/hy2xs-install/orchestrator/hy2xs-orchestrator" ] || fail "orchestrator is not executable"
|
||||
[ -x "$tmp/hy2xs-install/ui/hy2xs-admin/hy2xs-admin" ] || fail "hy2xs-admin is not executable"
|
||||
rm -rf "$tmp"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user