{
  "schema_version": 1,
  "channel": "homelab-runtime",
  "command_id": "READER-NGINX-HELPER-INTERFACE-AUDIT-327",
  "status": "OK",
  "rc": 0,
  "host": "pve01",
  "mode": "read-only",
  "component": "cluster-audit",
  "started_at_utc": "2026-07-23T04:47:11Z",
  "finished_at_utc": "2026-07-23T04:47:11Z",
  "reference_register_checked": true,
  "reference_sha256": "5763f2f8edc75fcf6f3951f8c95896d1cc112ceccb6cf5b64a383f540a4deb8e",
  "error_register_checked": true,
  "error_register_sha256": "08b3a769b8e38eaa1acec915352fb328180d70caa7ff6cd9d1ec0da426262752",
  "command_sha256": "1ecb4d4b55f034d8f3108c3ed697227ad08cdeb41f63c571cd76f146fa87ceb6",
  "duplicate_failed_command_blocked": false,
  "block_reason": null,
  "execution_started": true,
  "changes_made": false,
  "sanitized": true,
  "secrets_included": false,
  "private_addresses_included": false,
  "raw_evidence_retained_locally": true,
  "raw_evidence_sha256": "fe37d1fe51b073ce5c3e29eba30db46bb555a6d5f5b7c56be036d164d6745ba0",
  "sanitized_output_sha256": "fe37d1fe51b073ce5c3e29eba30db46bb555a6d5f5b7c56be036d164d6745ba0",
  "output_truncated_in_json": false,
  "full_sanitized_output_url": "https://git.gram1.ru/.well-known/homelab-runtime/latest.txt",
  "output": "DETAIL=LOCAL_DEPENDENCY=PASS:/usr/bin/test\nDETAIL=LOCAL_DEPENDENCY=PASS:/usr/bin/sha256sum\nDETAIL=LOCAL_DEPENDENCY=PASS:/usr/bin/awk\nDETAIL=LOCAL_DEPENDENCY=PASS:/usr/bin/sed\nDETAIL=LOCAL_DEPENDENCY=PASS:/usr/bin/bash\nDETAIL=NGINX_HELPER_SHA256=f900b15bfdd19a1b543037cf8b9c1583e71dc8115bbb5812cf74d474e3e7859b\nDETAIL=NGINX_HELPER_INTEGRITY=PASS\nDETAIL=NGINX_HELPER_SYNTAX=PASS\nDETAIL=NGINX_HELPER_LINE_COUNT=70\nDETAIL=NGINX_HELPER_SOURCE_BEGIN\n#!/usr/bin/bash\nset -Eeuo pipefail\n\nreadonly VM_HELPER=/usr/local/sbin/homelab-vm130-exec\nreadonly VM_HELPER_SHA256=1959773393723b013af7c93cd29a7b833fd607c903d044e2fcef6accaa29c275\nreadonly SHA256SUM=/usr/bin/sha256sum\nreadonly AWK=/usr/bin/awk\nreadonly GREP=/usr/bin/grep\nreadonly MKTEMP=/usr/bin/mktemp\nreadonly RM=/usr/bin/rm\nreadonly CAT=/usr/bin/cat\n\nif (($# == 0)); then\n    echo \"EDGE_NGINX_EXEC_ERROR=NO_COMMAND\" >&2\n    exit 64\nfi\n\nif [[ ! -x \"$VM_HELPER\" ]]; then\n    echo \"EDGE_NGINX_EXEC_ERROR=VM_HELPER_MISSING\" >&2\n    exit 69\nfi\n\nactual_vm_sha=\"$(\"$SHA256SUM\" \"$VM_HELPER\" | \"$AWK\" '{print $1}')\"\nif [[ \"$actual_vm_sha\" != \"$VM_HELPER_SHA256\" ]]; then\n    echo \"EDGE_NGINX_EXEC_ERROR=VM_HELPER_INTEGRITY\" >&2\n    exit 70\nfi\n\ntmpdir=\"$(\"$MKTEMP\" -d /tmp/homelab-edge-nginx-exec.XXXXXX)\"\ncleanup() {\n    \"$RM\" -rf -- \"$tmpdir\"\n}\ntrap cleanup EXIT\n\nif ! \"$VM_HELPER\" /usr/bin/ps -eo pid=,comm=,args= >\"$tmpdir/ps.out\" 2>\"$tmpdir/ps.err\"; then\n    echo \"EDGE_NGINX_EXEC_ERROR=PROCESS_QUERY\" >&2\n    \"$CAT\" \"$tmpdir/ps.err\" >&2\n    exit 71\nfi\n\n\"$AWK\" '$2==\"nginx\" && /nginx: master process/ {print $1}' \"$tmpdir/ps.out\" >\"$tmpdir/masters\"\nmaster_count=\"$(\"$AWK\" 'END{print NR+0}' \"$tmpdir/masters\")\"\nif [[ \"$master_count\" != 1 ]]; then\n    echo \"EDGE_NGINX_EXEC_ERROR=MASTER_COUNT:$master_count\" >&2\n    exit 72\nfi\n\nmaster_pid=\"$(\"$AWK\" 'NR==1{print $1}' \"$tmpdir/masters\")\"\nif [[ ! \"$master_pid\" =~ ^[0-9]+$ ]]; then\n    echo \"EDGE_NGINX_EXEC_ERROR=INVALID_MASTER_PID\" >&2\n    exit 73\nfi\n\nif ! \"$VM_HELPER\" /usr/bin/cat \"/proc/$master_pid/cgroup\" >\"$tmpdir/cgroup.out\" 2>\"$tmpdir/cgroup.err\"; then\n    echo \"EDGE_NGINX_EXEC_ERROR=CGROUP_QUERY\" >&2\n    \"$CAT\" \"$tmpdir/cgroup.err\" >&2\n    exit 74\nfi\n\nif ! \"$GREP\" -Eq 'docker-[0-9a-f]+[.]scope|/docker/' \"$tmpdir/cgroup.out\"; then\n    echo \"EDGE_NGINX_EXEC_ERROR=NOT_DOCKER_NGINX\" >&2\n    exit 75\nfi\n\nif ! \"$VM_HELPER\" /usr/bin/test -f \"/proc/$master_pid/root/data/custom_nginx/server_proxy.conf\"; then\n    echo \"EDGE_NGINX_EXEC_ERROR=PERSISTENT_PATH_MISSING\" >&2\n    exit 76\nfi\n\nexec \"$VM_HELPER\" /usr/bin/nsenter -t \"$master_pid\" -m -p -n -u -i --root --wd -- \"$@\"\nDETAIL=NGINX_HELPER_SOURCE_END\nDETAIL=NGINX_HELPER_SOURCE_TRUNCATED=NO\nCHANGES_MADE=NO\n"
}
