lab7: тесты безопасности и перевод своих тестов на HTTPS, документы (trust-matrix, THREAT_MODEL, OPERATOR, DEFENSE, WINDOWS, PR), сборщик доказательств, чистка legacy bench
This commit is contained in:
+22
-23
@@ -1,42 +1,41 @@
|
||||
name: Application (lab6)
|
||||
name: Application (lab7)
|
||||
on: [push, pull_request]
|
||||
permissions:
|
||||
contents: read
|
||||
jobs:
|
||||
app:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 60
|
||||
timeout-minutes: 75
|
||||
env:
|
||||
PYTHONUTF8: "1"
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.13'
|
||||
- name: Synthetic secrets and env (CI only, never committed)
|
||||
run: python scripts/init_secrets.py && cp .env.example .env
|
||||
- name: Build, migrate once, bootstrap S3, start broker, 2 API replicas, LB, relay, worker, Collector, Prometheus, Loki, Tempo, Grafana
|
||||
run: docker compose --env-file .env up -d --build --wait
|
||||
- name: Contract and public smoke
|
||||
run: make check test PYTHON=python
|
||||
- name: Persistence across restart of LB, API replicas, relay, worker, PostgreSQL, Valkey, S3, RabbitMQ
|
||||
run: make test-persistence ACTION_SCRIPT=scripts/restart.sh PYTHON=python
|
||||
- name: Failover of the replica that served the test, then restore it
|
||||
run: |
|
||||
make test-failover ACTION_SCRIPT=scripts/stop-one.sh PYTHON=python
|
||||
sh scripts/restore-api.sh && python scripts/lbctl.py wait-up 2
|
||||
- name: Defense scenario - worker stopped, 202, 409, restart API and broker, ready
|
||||
run: python -m pip install -q pillow==12.3.0 && python scripts/demo_pipeline.py
|
||||
- name: Own tests (unit + stand; every failure is restored in finally)
|
||||
- name: Test/tooling dependencies (cryptography for the local PKI)
|
||||
run: |
|
||||
python -m pip install --require-hashes --no-deps -r requirements.txt
|
||||
python -m pip install -r requirements-test.txt
|
||||
make student-test PYTHON=python
|
||||
- name: Lab 6 - controlled trace in Tempo + logs in Loki, every dashboard query through Grafana
|
||||
run: python scripts/trace_demo.py && python scripts/check_dashboard.py
|
||||
- name: Lab 5 invariants (read-only audit of PostgreSQL and both buckets)
|
||||
run: docker compose run --rm --no-deps auditor --verify-checksums
|
||||
- name: Synthetic secrets + PKI (CI only, never committed; operator dir outside the checkout)
|
||||
run: python scripts/init_secrets.py
|
||||
- name: OpenBao (sealed) -> operator init/unseal/configure -> whole stand over TLS/mTLS
|
||||
run: make up PYTHON=python
|
||||
- name: Contract and public smoke over HTTPS (public CA)
|
||||
run: make check test test-security PYTHON=python CA_FILE="$PWD/secrets/pki/public-ca.crt"
|
||||
- name: Persistence across restart of every process incl. OpenBao (unsealed by the hook)
|
||||
run: make test-persistence ACTION_SCRIPT=scripts/restart.sh PYTHON=python CA_FILE="$PWD/secrets/pki/public-ca.crt"
|
||||
- name: Failover of the replica that served the test, then restore it
|
||||
run: |
|
||||
make test-failover ACTION_SCRIPT=scripts/stop-one.sh PYTHON=python CA_FILE="$PWD/secrets/pki/public-ca.crt"
|
||||
sh scripts/restore-api.sh && python scripts/lbctl.py wait-up 2
|
||||
- name: Lab 7 defense steps 3-4 - mTLS LB->API and OpenBao allow/deny
|
||||
run: make mtls-check bao-check PYTHON=python
|
||||
- name: Own tests (unit + stand; every failure is restored in finally)
|
||||
run: make student-test PYTHON=python
|
||||
- name: Logs
|
||||
if: always()
|
||||
run: docker compose logs --tail 100 api lb s3 s3-init broker relay worker otel-collector prometheus loki tempo grafana
|
||||
run: docker compose logs --tail 100 api lb s3 s3-init broker relay worker openbao otel-collector prometheus loki tempo grafana
|
||||
- name: Remove CI stand and its synthetic data
|
||||
if: always()
|
||||
run: docker compose down -v
|
||||
|
||||
Reference in New Issue
Block a user