feat: core func lab7

This commit is contained in:
Enterxx2
2026-11-24 14:04:04 +03:00
parent 4829fc7b4e
commit 411ca73aa0
83 changed files with 2883 additions and 523 deletions
+21
View File
@@ -0,0 +1,21 @@
#!/bin/sh
set -eu
cd "$(dirname "$0")/.."
audit=$(mktemp -d "${TMPDIR:-/tmp}/lab7-audit.XXXXXX")
trap 'rm -rf "$audit"' EXIT
mkdir "$audit/identities"
mount="$audit/identities"
for identity in lb messenger_api messenger_worker messenger_dispatcher grafana prometheus collector unauthorized; do
mkdir "$mount/$identity"
cp "secrets/tls/$identity/tls.crt" "secrets/tls/$identity/tls.key" "$mount/$identity/"
done
mkdir "$mount/foreign-lb"
cp secrets/operator/foreign-lb/tls.crt secrets/operator/foreign-lb/tls.key "$mount/foreign-lb/"
for name in old-lb old-valkey; do
if [ -d "secrets/operator/$name" ]; then
mkdir "$mount/$name"
cp "secrets/operator/$name/"* "$mount/$name/"
fi
done
chmod -R a+rX "$mount"
docker compose run --rm --no-deps -T -v "$mount:/run/audit:ro" security-audit python -u - < security/checks/transport.py