test: verify security boundaries and recovery

This commit is contained in:
2026-11-06 21:17:03 +03:00
parent ee547e5523
commit 5ac64f51fa
26 changed files with 1752 additions and 68 deletions
+14 -6
View File
@@ -1,10 +1,10 @@
name: Lab 6 incidents
name: Lab 7 inherited incidents
on:
workflow_dispatch:
concurrency:
group: lab6-incidents-${{ github.repository }}-${{ github.ref }}
group: lab7-incidents-${{ github.repository }}-${{ github.ref }}
cancel-in-progress: false
jobs:
@@ -12,13 +12,14 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 35
env:
COMPOSE_PROJECT_NAME: mtusi2026lab6-incidents-${{ github.run_id }}
COMPOSE_PROJECT_NAME: mtusi2026lab7-incidents-${{ github.run_id }}
API_BIND_ADDRESS: 127.0.0.1:0
SWAGGER_BIND_ADDRESS: 127.0.0.1:0
PROMETHEUS_BIND_ADDRESS: 127.0.0.1:0
GRAFANA_BIND_ADDRESS: 127.0.0.1:0
LOKI_BIND_ADDRESS: 127.0.0.1:0
TEMPO_BIND_ADDRESS: 127.0.0.1:0
OPENBAO_BIND_ADDRESS: 127.0.0.1:0
steps:
- name: Checkout exact commit
run: |
@@ -34,17 +35,21 @@ jobs:
- name: Prepare stack
run: |
cp lab6.env.example .env
cp lab7.env.example .env
docker compose config --quiet
docker compose up -d --build --scale api=2 --wait --wait-timeout 180
./scripts/bootstrap-local.sh .env
docker network connect "${COMPOSE_PROJECT_NAME}_application" "$HOSTNAME"
docker network connect "${COMPOSE_PROJECT_NAME}_data" "$HOSTNAME"
docker network connect "${COMPOSE_PROJECT_NAME}_data_backend" "$HOSTNAME"
docker network connect "${COMPOSE_PROJECT_NAME}_monitoring" "$HOSTNAME"
docker network connect "${COMPOSE_PROJECT_NAME}_secure_clients" "$HOSTNAME"
docker network connect "${COMPOSE_PROJECT_NAME}_telemetry_storage" "$HOSTNAME"
- name: Reproduce SLO incidents
run: |
ENV_FILE=.env \
BASE_URL=http://nginx:8080 \
BASE_URL=https://nginx:8443 \
CA_FILE=.runtime/security/public-ca/ca.crt \
PROMETHEUS_URL=http://prometheus:9090 \
TEMPO_URL=http://tempo:3200 \
LOKI_URL=http://loki:3100 \
@@ -69,5 +74,8 @@ jobs:
run: |
docker network disconnect "${COMPOSE_PROJECT_NAME}_application" "$HOSTNAME" 2>/dev/null || true
docker network disconnect "${COMPOSE_PROJECT_NAME}_data" "$HOSTNAME" 2>/dev/null || true
docker network disconnect "${COMPOSE_PROJECT_NAME}_data_backend" "$HOSTNAME" 2>/dev/null || true
docker network disconnect "${COMPOSE_PROJECT_NAME}_monitoring" "$HOSTNAME" 2>/dev/null || true
docker network disconnect "${COMPOSE_PROJECT_NAME}_secure_clients" "$HOSTNAME" 2>/dev/null || true
docker network disconnect "${COMPOSE_PROJECT_NAME}_telemetry_storage" "$HOSTNAME" 2>/dev/null || true
docker compose down -v --remove-orphans