Files
nginx-analize/results/scripts/run-audit-code-control.sh
Redsandyg fcc9139361 init
2026-06-15 06:31:35 +03:00

16 lines
513 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/sh
# Audit: code execution control (docs/Контроль_выполнения_кода)
set -eu
REPORT="${REPORT:-/reports/audit.log}"
{
echo ""
echo "=== Code execution control audit $(date -Iseconds) ==="
nginx -T 2>/dev/null | grep -E 'fastcgi_pass|uwsgi_pass|scgi_pass|grpc_pass|perl|js_import|internal|^\s*root\s|alias' || true
echo "--- SCRIPT_FILENAME ---"
nginx -T 2>/dev/null | grep SCRIPT_FILENAME || echo "(no fastcgi)"
} >> "$REPORT"
echo "Code control audit appended -> $REPORT"