Open-source AI Security Operations Center: alert fusion, LLM-agent triage, MITRE ATT&CK investigation, and a replayable decision ledger for every agent step. Self-hostable, runs with no API keys, MIT licensed. Ships an MCP server for Claude, Cursor and Continue.
Python agentic-aiai-securityalert-triageblue-teamcybersecuritydetection-engineeringincident-responselanggraphllm-agentsmcpmitre-attackmodel-context-protocolpurple-teamsecurity-operationsself-hostedsiemsoarsocthreat-detectionthreat-intelligence
fix(ci): fall back between PostgreSQL registries (#1434)
Shreya Jhaa07a7814b368
diff --git a/.github/actions/start-postgres/action.yml b/.github/actions/start-postgres/action.ymlnew file mode 100644index 000000000..536fc251c--- /dev/null+++ b/.github/actions/start-postgres/action.yml@@ -0,0 +1,113 @@+name: Start PostgreSQL with registry fallback+description: Pull and start the official PostgreSQL image without making one registry a CI single point of failure.++inputs:+ tag:+ description: Official PostgreSQL image tag.+ required: false+ default: 16-alpine+ postgres_user:+ description: Initial PostgreSQL superuser. The name is also read by the runtime-role CI gate.+ required: false+ default: aisoc+ password:+ description: Initial PostgreSQL password.+ required: true+ database:+ description: Initial PostgreSQL database.+ required: false+ default: aisoc+ port:+ description: Host port published as PostgreSQL port 5432.+ required: false+ default: "5432"++outputs:+ image:+ description: Registry-qualified image that was successfully pulled.+ value: ${{ steps.start.outputs.image }}++runs:+ using: composite+ steps:+ - id: start+ shell: bash+ env:+ POSTGRES_TAG: ${{ inputs.tag }}+ POSTGRES_USER: ${{ inputs.postgres_user }}+ POSTGRES_PASSWORD: ${{ inputs.password }}+ POSTGRES_DB: ${{ inputs.database }}+ POSTGRES_PORT: ${{ inputs.port }}+ run: |+ set -euo pipefail++ if [[ ! "$POSTGRES_TAG" =~ ^[A-Za-z0-9._-]+$ ]] \+ || [[ ! "$POSTGRES_USER" =~ ^[A-Za-z0-9_]+$ ]] \+ || [[ ! "$POSTGRES_DB" =~ ^[A-Za-z0-9_]+$ ]] \+ || [[ ! "$POSTGRES_PORT" =~ ^[0-9]+$ ]]; then+ echo "::error::Invalid PostgreSQL action input"+ exit 1+ fi++ ecr="public.ecr.aws/docker/library/postgres:${POSTGRES_TAG}"+ hub="docker.io/library/postgres:${POSTGRES_TAG}"++ # Spread first attempts across both mirrors instead of sending every+ # concurrent job to the same anonymous quota. Each round still tries+ # both, so either registry may be unavailable without taking out CI.+ if (( ${GITHUB_RUN_ID:-0} % 2 )); then+ candidates=("$ecr" "$hub")+ else+ candidates=("$hub" "$ecr")+ fi++ image=""+ for round in 1 2 3; do+ for candidate in "${candidates[@]}"; do+ echo "Pulling $candidate (round $round/3; 60-second limit)"+ # A registry that accepts the connection but stops responding must+ # not prevent the alternate registry from being attempted.+ if timeout --kill-after=10s 60s docker pull "$candidate"; then+ image="$candidate"+ break 2+ fi+ echo "::warning::Could not pull $candidate; trying the other official mirror"+ done+ sleep $((round * 5))+ done++ if [[ -z "$image" ]]; then+ echo "::error::PostgreSQL could not be pulled from ECR Public or Docker Hub"+ exit 1+ fi++ docker rm -f aisoc-ci-postgres >/dev/null 2>&1 || true+ docker run --detach --name aisoc-ci-postgres \+ --env POSTGRES_USER \+ --env POSTGRES_PASSWORD \+ --env POSTGRES_DB \+ --publish "${POSTGRES_PORT}:5432" \+ --health-cmd "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}" \+ --health-interval 5s \+ --health-timeout 5s \+ --health-retries 20 \+ "$image"++ for _ in $(seq 1 40); do+ health="$(docker inspect --format '{{.State.Health.Status}}' aisoc-ci-postgres)"+ if [[ "$health" == healthy ]]; then+ echo "PostgreSQL is ready from $image"+ echo "image=$image" >> "$GITHUB_OUTPUT"+ exit 0+ fi+ if [[ "$health" == unhealthy ]]; then+ docker logs aisoc-ci-postgres+ echo "::error::PostgreSQL became unhealthy"+ exit 1+ fi+ sleep 3+ done++ docker logs aisoc-ci-postgres+ echo "::error::PostgreSQL did not become healthy within 120 seconds"+ exit 1diff --git a/.github/workflows/access-governance-live.yml b/.github/workflows/access-governance-live.ymlindex 2fc861139..cab528026 100644--- a/.github/workflows/access-governance-live.yml+++ b/.github/workflows/access-governance-live.yml@@ -40,20 +40,6 @@ jobs:runs-on: ubuntu-latesttimeout-minutes: 20- services:- postgres:- image: public.ecr.aws/docker/library/postgres:16-alpine- env:- POSTGRES_USER: aisoc- POSTGRES_PASSWORD: aisoc_ci_only- POSTGRES_DB: aisoc- ports: ["5432:5432"]- options: >-- --health-cmd "pg_isready -U aisoc"- --health-interval 5s- --health-timeout 5s- --health-retries 20-env:# Two roles, and the split is the point. `POSTGRES_USER` (aisoc) owns# the schema and is a superuser, and a superuser ignores every RLS@@ -83,6 +69,10 @@ jobs:steps:- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7+ - name: Start PostgreSQL with registry fallback+ uses: ./.github/actions/start-postgres+ with:+ password: aisoc_ci_only- uses: actions/setup-python@e9d6f990972a57673cdb72ec29e19d42ba28880f # v6with:diff --git a/.github/workflows/agent-auth-live.yml b/.github/workflows/agent-auth-live.ymlindex d93341e61..6274e94c8 100644--- a/.github/workflows/agent-auth-live.yml+++ b/.github/workflows/agent-auth-live.yml@@ -34,20 +34,6 @@ jobs:runs-on: ubuntu-latesttimeout-minutes: 20- services:- postgres:- image: public.ecr.aws/docker/library/postgres:16-alpine- env:- POSTGRES_USER: aisoc- POSTGRES_PASSWORD: aisoc_ci_only- POSTGRES_DB: aisoc- ports: ["5432:5432"]- options: >-- --health-cmd "pg_isready -U aisoc"- --health-interval 5s- --health-timeout 5s- --health-retries 20-env:# The runtime role, not the owner. A superuser ignores every RLS policy# even under FORCE ROW LEVEL SECURITY, which would let the tenant@@ -58,6 +44,10 @@ jobs:steps:- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7+ - name: Start PostgreSQL with registry fallback+ uses: ./.github/actions/start-postgres+ with:+ password: aisoc_ci_only- uses: actions/setup-python@e9d6f990972a57673cdb72ec29e19d42ba28880f # v6with:diff --git a/.github/workflows/ai-estate-live.yml b/.github/workflows/ai-estate-live.ymlindex 46a2ae26d..f123fd7ef 100644--- a/.github/workflows/ai-estate-live.yml+++ b/.github/workflows/ai-estate-live.yml@@ -42,26 +42,16 @@ jobs:runs-on: ubuntu-latesttimeout-minutes: 20- services:- postgres:- image: public.ecr.aws/docker/library/postgres:16-alpine- env:- POSTGRES_USER: aisoc- POSTGRES_PASSWORD: aisoc_ci_only- POSTGRES_DB: aisoc- ports: ["5432:5432"]- options: >-- --health-cmd "pg_isready -U aisoc"- --health-interval 5s- --health-timeout 5s- --health-retries 20-env:AI_ESTATE_DSN: postgresql://aisoc_app:aisoc_app_ci_only@localhost:5432/aisocPGPASSWORD: aisoc_ci_onlysteps:- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7+ - name: Start PostgreSQL with registry fallback+ uses: ./.github/actions/start-postgres+ with:+ password: aisoc_ci_only- uses: actions/setup-python@e9d6f990972a57673cdb72ec29e19d42ba28880f # v6with:diff --git a/.github/workflows/alert-audit-live.yml b/.github/workflows/alert-audit-live.ymlindex 6420bf486..8cca8ae0b 100644--- a/.github/workflows/alert-audit-live.yml+++ b/.github/workflows/alert-audit-live.yml@@ -44,20 +44,6 @@ jobs:runs-on: ubuntu-latesttimeout-minutes: 20- services:- postgres:- image: public.ecr.aws/docker/library/postgres:16-alpine- env:- POSTGRES_USER: aisoc- POSTGRES_PASSWORD: aisoc_ci_only- POSTGRES_DB: aisoc- ports: ["5432:5432"]- options: >-- --health-cmd "pg_isready -U aisoc"- --health-interval 5s- --health-timeout 5s- --health-retries 20-env:# The owner, not the DML-only runtime role. These suites create tenants,# users and — for the bootstrap proof — a database of their own, none of@@ -83,6 +69,10 @@ jobs:steps:- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7+ - name: Start PostgreSQL with registry fallback+ uses: ./.github/actions/start-postgres+ with:+ password: aisoc_ci_only- uses: actions/setup-python@e9d6f990972a57673cdb72ec29e19d42ba28880f # v6with:diff --git a/.github/workflows/audit-forgery-live.yml b/.github/workflows/audit-forgery-live.ymlindex 0bef0bfb3..82eda7dbc 100644--- a/.github/workflows/audit-forgery-live.yml+++ b/.github/workflows/audit-forgery-live.yml@@ -36,20 +36,6 @@ jobs:runs-on: ubuntu-latesttimeout-minutes: 20- services:- postgres:- image: public.ecr.aws/docker/library/postgres:16-alpine- env:- POSTGRES_USER: aisoc- POSTGRES_PASSWORD: aisoc_ci_only- POSTGRES_DB: aisoc- ports: ["5432:5432"]- options: >-- --health-cmd "pg_isready -U aisoc"- --health-interval 5s- --health-timeout 5s- --health-retries 20-env:# The runtime role, not the owner. POSTGRES_USER (aisoc) is a superuser# and ignores every RLS policy even under FORCE ROW LEVEL SECURITY, so@@ -67,6 +53,10 @@ jobs:steps:- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7+ - name: Start PostgreSQL with registry fallback+ uses: ./.github/actions/start-postgres+ with:+ password: aisoc_ci_only- uses: actions/setup-python@e9d6f990972a57673cdb72ec29e19d42ba28880f # v6with:diff --git a/.github/workflows/audit-retention-live.yml b/.github/workflows/audit-retention-live.ymlindex aa33d93f4..550efed06 100644--- a/.github/workflows/audit-retention-live.yml+++ b/.github/workflows/audit-retention-live.yml@@ -48,20 +48,6 @@ jobs:runs-on: ubuntu-latesttimeout-minutes: 20- services:- postgres:- image: public.ecr.aws/docker/library/postgres:16-alpine- env:- POSTGRES_USER: aisoc- POSTGRES_PASSWORD: aisoc_ci_only- POSTGRES_DB: aisoc- ports: ["5432:5432"]- options: >-- --health-cmd "pg_isready -U aisoc"- --health-interval 5s- --health-timeout 5s- --health-retries 20-env:AUDIT_DSN: postgresql+asyncpg://aisoc_app:aisoc_app_ci_only@localhost:5432/aisocPGPASSWORD: aisoc_ci_only@@ -70,6 +56,10 @@ jobs:steps:- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7+ - name: Start PostgreSQL with registry fallback+ uses: ./.github/actions/start-postgres+ with:+ password: aisoc_ci_only- uses: actions/setup-python@e9d6f990972a57673cdb72ec29e19d42ba28880f # v6with:diff --git a/.github/workflows/case-depth-live.yml b/.github/workflows/case-depth-live.ymlindex 182e251cc..c4e827e03 100644--- a/.github/workflows/case-depth-live.yml+++ b/.github/workflows/case-depth-live.yml@@ -39,20 +39,6 @@ jobs:runs-on: ubuntu-latesttimeout-minutes: 20- services:- postgres:- image: public.ecr.aws/docker/library/postgres:16-alpine- env:- POSTGRES_USER: aisoc- POSTGRES_PASSWORD: aisoc_ci_only- POSTGRES_DB: aisoc- ports: ["5432:5432"]- options: >-- --health-cmd "pg_isready -U aisoc"- --health-interval 5s- --health-timeout 5s- --health-retries 20-env:# aisoc-db-role: owner — the suite creates scratch tenants and users, which the DML-only runtime role cannotDATABASE_URL: postgresql+asyncpg://aisoc:aisoc_ci_only@localhost:5432/aisoc@@ -68,6 +54,10 @@ jobs:steps:- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7+ - name: Start PostgreSQL with registry fallback+ uses: ./.github/actions/start-postgres+ with:+ password: aisoc_ci_only- uses: actions/setup-python@e9d6f990972a57673cdb72ec29e19d42ba28880f # v6with:diff --git a/.github/workflows/connector-scheduler-live.yml b/.github/workflows/connector-scheduler-live.ymlindex 03ec220b7..fa9b33f28 100644--- a/.github/workflows/connector-scheduler-live.yml+++ b/.github/workflows/connector-scheduler-live.yml@@ -40,20 +40,6 @@ jobs:runs-on: ubuntu-latesttimeout-minutes: 25- services:- postgres:- image: public.ecr.aws/docker/library/postgres:16-alpine- env:- POSTGRES_USER: aisoc- POSTGRES_PASSWORD: aisoc_ci_only- POSTGRES_DB: aisoc- ports: ["5432:5432"]- options: >-- --health-cmd "pg_isready -U aisoc"- --health-interval 5s- --health-timeout 5s- --health-retries 20-env:# The runtime role, not the owner: a superuser ignores every RLS# policy even under FORCE ROW LEVEL SECURITY.@@ -61,9 +47,16 @@ jobs:DATABASE_MIGRATION_URL: postgresql+asyncpg://aisoc:aisoc_ci_only@localhost:5432/aisocPGPASSWORD: aisoc_ci_onlyAISOC_CONNECTORS_DISABLE_SCHEDULER: "0"+ # This live proof owns its loopback vendor fixture. Keep the exception+ # exact; AISOC_SSRF_ALLOW_PRIVATE intentionally cannot admit loopback.+ AISOC_SSRF_ALLOW_HOSTS: 127.0.0.1steps:- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7+ - name: Start PostgreSQL with registry fallback+ uses: ./.github/actions/start-postgres+ with:+ password: aisoc_ci_only- uses: actions/setup-python@e9d6f990972a57673cdb72ec29e19d42ba28880f # v6with:diff --git a/.github/workflows/entitlements-live.yml b/.github/workflows/entitlements-live.ymlindex 036fdcfb6..afa60a8b9 100644--- a/.github/workflows/entitlements-live.yml+++ b/.github/workflows/entitlements-live.yml@@ -46,20 +46,6 @@ jobs:runs-on: ubuntu-latesttimeout-minutes: 20- services:- postgres:- image: public.ecr.aws/docker/library/postgres:16-alpine- env:- POSTGRES_USER: aisoc- POSTGRES_PASSWORD: aisoc_ci_only- POSTGRES_DB: aisoc- ports: ["5432:5432"]- options: >-- --health-cmd "pg_isready -U aisoc"- --health-interval 5s- --health-timeout 5s- --health-retries 20-env:ENT_DSN: postgresql+asyncpg://aisoc_app:aisoc_app_ci_only@localhost:5432/aisocPGPASSWORD: aisoc_ci_only@@ -68,6 +54,10 @@ jobs:steps:- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7+ - name: Start PostgreSQL with registry fallback+ uses: ./.github/actions/start-postgres+ with:+ password: aisoc_ci_only- uses: actions/setup-python@e9d6f990972a57673cdb72ec29e19d42ba28880f # v6with:diff --git a/.github/workflows/hunt-report-live.yml b/.github/workflows/hunt-report-live.ymlindex 1d289f5f2..de7648a45 100644--- a/.github/workflows/hunt-report-live.yml+++ b/.github/workflows/hunt-report-live.yml@@ -39,20 +39,6 @@ jobs:runs-on: ubuntu-latesttimeout-minutes: 20- services:- postgres:- image: public.ecr.aws/docker/library/postgres:16-alpine- env:- POSTGRES_USER: aisoc- POSTGRES_PASSWORD: aisoc_ci_only- POSTGRES_DB: aisoc- ports: ["5432:5432"]- options: >-- --health-cmd "pg_isready -U aisoc"- --health-interval 5s- --health-timeout 5s- --health-retries 20-env:# aisoc-db-role: owner — the suite creates scratch tenants and users, which the DML-only runtime role cannotDATABASE_URL: postgresql+asyncpg://aisoc:aisoc_ci_only@localhost:5432/aisoc@@ -67,6 +53,10 @@ jobs:steps:- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7+ - name: Start PostgreSQL with registry fallback+ uses: ./.github/actions/start-postgres+ with:+ password: aisoc_ci_only- uses: actions/setup-python@e9d6f990972a57673cdb72ec29e19d42ba28880f # v6with:diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.ymlindex a1760feba..c3738bdab 100644--- a/.github/workflows/integration.yml+++ b/.github/workflows/integration.yml@@ -624,20 +624,6 @@ jobs:if: needs.changes.outputs.replay == 'true'runs-on: ubuntu-latesttimeout-minutes: 25- services:- postgres:- image: public.ecr.aws/docker/library/postgres:16- env:- POSTGRES_USER: aisoc- POSTGRES_PASSWORD: aisoc_ci_secret- POSTGRES_DB: aisoc- ports:- - 5432:5432- options: >-- --health-cmd "pg_isready -U aisoc"- --health-interval 5s- --health-timeout 5s- --health-retries 10env:# The two roles the default deployment ships. The services connect as# aisoc_app, which is DML-only and which the RLS policies apply to;@@ -651,6 +637,11 @@ jobs:ENVIRONMENT: developmentsteps:- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7+ - name: Start PostgreSQL with registry fallback+ uses: ./.github/actions/start-postgres+ with:+ password: aisoc_ci_secret+ tag: "16"- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0with:@@ -703,20 +694,6 @@ jobs:if: needs.changes.outputs.migrations == 'true'runs-on: ubuntu-latesttimeout-minutes: 15- services:- postgres:- image: public.ecr.aws/docker/library/postgres:16- env:- POSTGRES_USER: aisoc- POSTGRES_PASSWORD: aisoc_ci_secret- POSTGRES_DB: aisoc- ports:- - 5432:5432- options: >-- --health-cmd "pg_isready -U aisoc"- --health-interval 5s- --health-timeout 5s- --health-retries 10env:# The two roles the default deployment ships, wired the same way here.# DATABASE_URL is what every service connects as: DML only, and the RLS@@ -732,6 +709,11 @@ jobs:AISOC_MIGRATIONS_STRICT: '1'steps:- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7+ - name: Start PostgreSQL with registry fallback+ uses: ./.github/actions/start-postgres+ with:+ password: aisoc_ci_secret+ tag: "16"- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0with:@@ -1001,20 +983,6 @@ jobs:runs-on: ubuntu-latestneeds: changestimeout-minutes: 15- services:- postgres:- image: public.ecr.aws/docker/library/postgres:16- env:- POSTGRES_USER: aisoc- POSTGRES_PASSWORD: aisoc_ci_secret- POSTGRES_DB: aisoc- ports:- - 5432:5432- options: >-- --health-cmd "pg_isready -U aisoc"- --health-interval 5s- --health-timeout 5s- --health-retries 10env:# aisoc-db-role: owner — pg_dump/pg_restore read and rewrite every table, including ones the runtime role cannotPOSTGRES_URL: postgresql://aisoc:aisoc_ci_secret@localhost:5432/aisoc@@ -1036,6 +1004,12 @@ jobs:BACKUP_ENCRYPTION_KEY: ""steps:- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7+ - name: Start PostgreSQL with registry fallback+ uses: ./.github/actions/start-postgres+ with:+ password: aisoc_ci_secret+ tag: "16"+- name: Generate this run's backup encryption keyrun: |set -euo pipefail@@ -1276,20 +1250,6 @@ jobs:fail-fast: falsematrix:from_ref: ['v7.3.1', 'v7.5.0']- services:- postgres:- image: public.ecr.aws/docker/library/postgres:16- env:- POSTGRES_USER: aisoc- POSTGRES_PASSWORD: aisoc_ci_secret- POSTGRES_DB: aisoc- ports:- - 5432:5432- options: >-- --health-cmd "pg_isready -U aisoc"- --health-interval 5s- --health-timeout 5s- --health-retries 10env:# aisoc-db-role: owner — this job replays released migration chains, which is DDL from end to endDATABASE_URL: postgresql+asyncpg://aisoc:aisoc_ci_secret@localhost:5432/aisoc@@ -1304,6 +1264,12 @@ jobs:fetch-depth: 0fetch-tags: true+ - name: Start PostgreSQL with registry fallback+ uses: ./.github/actions/start-postgres+ with:+ password: aisoc_ci_secret+ tag: "16"+- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0with:python-version: '3.11'diff --git a/.github/workflows/lake-live.yml b/.github/workflows/lake-live.ymlindex f4f565ca3..0d059c117 100644--- a/.github/workflows/lake-live.yml+++ b/.github/workflows/lake-live.yml@@ -40,19 +40,6 @@ jobs:# 401s on "User not found". A synthetic subject would be refused —# which is the behaviour worth keeping, since it is what makes the# tenant come from the credential rather than from an argument.- services:- postgres:- image: public.ecr.aws/docker/library/postgres:16-alpine- env:- POSTGRES_USER: aisoc- POSTGRES_PASSWORD: aisoc_ci_only- POSTGRES_DB: aisoc- ports: ["5432:5432"]- options: >-- --health-cmd "pg_isready -U aisoc"- --health-interval 5s- --health-timeout 5s- --health-retries 20env:LAKE_ROUTE_DSN: postgresql+asyncpg://aisoc_app:aisoc_app_ci_only@localhost:5432/aisoc@@ -62,6 +49,10 @@ jobs:steps:- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7+ - name: Start PostgreSQL with registry fallback+ uses: ./.github/actions/start-postgres+ with:+ password: aisoc_ci_only- uses: actions/setup-python@e9d6f990972a57673cdb72ec29e19d42ba28880f # v6with:diff --git a/.github/workflows/lake-query-jobs-live.yml b/.github/workflows/lake-query-jobs-live.ymlindex 1bd012ba8..bd97693f8 100644--- a/.github/workflows/lake-query-jobs-live.yml+++ b/.github/workflows/lake-query-jobs-live.yml@@ -35,20 +35,6 @@ jobs:runs-on: ubuntu-latesttimeout-minutes: 20- services:- postgres:- image: public.ecr.aws/docker/library/postgres:16-alpine- env:- POSTGRES_USER: aisoc- POSTGRES_PASSWORD: aisoc_ci_only- POSTGRES_DB: aisoc- ports: ["5432:5432"]- options: >-- --health-cmd "pg_isready -U aisoc"- --health-interval 5s- --health-timeout 5s- --health-retries 20-env:# The runtime role, not the owner. POSTGRES_USER (aisoc) is a# superuser and ignores every RLS policy even under FORCE ROW LEVEL@@ -65,6 +51,10 @@ jobs:steps:- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7+ - name: Start PostgreSQL with registry fallback+ uses: ./.github/actions/start-postgres+ with:+ password: aisoc_ci_only- uses: actions/setup-python@e9d6f990972a57673cdb72ec29e19d42ba28880f # v6with:diff --git a/.github/workflows/mfa-live.yml b/.github/workflows/mfa-live.ymlindex 8adaf973f..81c08ccc9 100644--- a/.github/workflows/mfa-live.yml+++ b/.github/workflows/mfa-live.yml@@ -37,20 +37,6 @@ jobs:runs-on: ubuntu-latesttimeout-minutes: 20- services:- postgres:- image: public.ecr.aws/docker/library/postgres:16-alpine- env:- POSTGRES_USER: aisoc- POSTGRES_PASSWORD: aisoc_ci_only- POSTGRES_DB: aisoc- ports: ["5432:5432"]- options: >-- --health-cmd "pg_isready -U aisoc"- --health-interval 5s- --health-timeout 5s- --health-retries 20-env:# The runtime role, not the owner. A superuser ignores every RLS# policy even under FORCE ROW LEVEL SECURITY, and the challenge path@@ -64,6 +50,10 @@ jobs:steps:- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7+ - name: Start PostgreSQL with registry fallback+ uses: ./.github/actions/start-postgres+ with:+ password: aisoc_ci_only- uses: actions/setup-python@e9d6f990972a57673cdb72ec29e19d42ba28880f # v6with:diff --git a/.github/workflows/playbook-pause-live.yml b/.github/workflows/playbook-pause-live.ymlindex 28b2992cf..b0b0dbdf5 100644--- a/.github/workflows/playbook-pause-live.yml+++ b/.github/workflows/playbook-pause-live.yml@@ -37,20 +37,6 @@ jobs:runs-on: ubuntu-latesttimeout-minutes: 15- services:- postgres:- image: public.ecr.aws/docker/library/postgres:16-alpine- env:- POSTGRES_USER: aisoc- POSTGRES_PASSWORD: aisoc_ci_only- POSTGRES_DB: aisoc- ports: ["5432:5432"]- options: >-- --health-cmd "pg_isready -U aisoc"- --health-interval 5s- --health-timeout 5s- --health-retries 20-env:# Two roles, as the default deployment ships them. `aisoc` owns the# schema and runs the migrations; `aisoc_app` is DML-only and is the@@ -64,6 +50,10 @@ jobs:steps:- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7+ - name: Start PostgreSQL with registry fallback+ uses: ./.github/actions/start-postgres+ with:+ password: aisoc_ci_only- uses: actions/setup-python@e9d6f990972a57673cdb72ec29e19d42ba28880f # v6with:diff --git a/.github/workflows/retro-hunt-live.yml b/.github/workflows/retro-hunt-live.ymlindex 96c376fd2..d5b9f46dd 100644--- a/.github/workflows/retro-hunt-live.yml+++ b/.github/workflows/retro-hunt-live.yml@@ -53,19 +53,6 @@ jobs:# sightings back under RLS. As the schema owner neither of the two# defects this E2E found would appear, so the suite runs as the# `aisoc_app` runtime role — the one a deployment uses.- services:- postgres:- image: public.ecr.aws/docker/library/postgres:16-alpine- env:- POSTGRES_USER: aisoc- POSTGRES_PASSWORD: aisoc_ci_only- POSTGRES_DB: aisoc- ports: ["5432:5432"]- options: >-- --health-cmd "pg_isready -U aisoc"- --health-interval 5s- --health-timeout 5s- --health-retries 20env:# The suite connects as the runtime role. The owner URL is only@@ -82,6 +69,10 @@ jobs:ISOLATION_KAFKA_BROKERS: 127.0.0.1:9092steps:- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7+ - name: Start PostgreSQL with registry fallback+ uses: ./.github/actions/start-postgres+ with:+ password: aisoc_ci_only- uses: actions/setup-python@e9d6f990972a57673cdb72ec29e19d42ba28880f # v6with:diff --git a/.github/workflows/scheduler-lease-live.yml b/.github/workflows/scheduler-lease-live.ymlindex 72bd7e96d..af0df771a 100644--- a/.github/workflows/scheduler-lease-live.yml+++ b/.github/workflows/scheduler-lease-live.yml@@ -32,20 +32,6 @@ jobs:runs-on: ubuntu-latesttimeout-minutes: 20- services:- postgres:- image: public.ecr.aws/docker/library/postgres:16-alpine- env:- POSTGRES_USER: aisoc- POSTGRES_PASSWORD: aisoc_ci_only- POSTGRES_DB: aisoc- ports: ["5432:5432"]- options: >-- --health-cmd "pg_isready -U aisoc"- --health-interval 5s- --health-timeout 5s- --health-retries 20-env:# The runtime role, not the owner. A superuser ignores every RLS# policy in the schema, and although scheduler_leases carries none@@ -59,6 +45,10 @@ jobs:steps:- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7+ - name: Start PostgreSQL with registry fallback+ uses: ./.github/actions/start-postgres+ with:+ password: aisoc_ci_only- uses: actions/setup-python@e9d6f990972a57673cdb72ec29e19d42ba28880f # v6with:diff --git a/.github/workflows/scim-live.yml b/.github/workflows/scim-live.ymlindex 9d936e566..1252343ed 100644--- a/.github/workflows/scim-live.yml+++ b/.github/workflows/scim-live.yml@@ -43,20 +43,6 @@ jobs:runs-on: ubuntu-latesttimeout-minutes: 20- services:- postgres:- image: public.ecr.aws/docker/library/postgres:16-alpine- env:- POSTGRES_USER: aisoc- POSTGRES_PASSWORD: aisoc_ci_only- POSTGRES_DB: aisoc- ports: ["5432:5432"]- options: >-- --health-cmd "pg_isready -U aisoc"- --health-interval 5s- --health-timeout 5s- --health-retries 20-env:# The runtime role, not the owner. A superuser ignores every RLS# policy even under FORCE ROW LEVEL SECURITY, which would let the@@ -80,6 +66,10 @@ jobs:steps:- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7+ - name: Start PostgreSQL with registry fallback+ uses: ./.github/actions/start-postgres+ with:+ password: aisoc_ci_only- uses: actions/setup-python@e9d6f990972a57673cdb72ec29e19d42ba28880f # v6with:diff --git a/.github/workflows/sso-live.yml b/.github/workflows/sso-live.ymlindex a1d15ba77..881775b0f 100644--- a/.github/workflows/sso-live.yml+++ b/.github/workflows/sso-live.yml@@ -41,20 +41,6 @@ jobs:runs-on: ubuntu-latesttimeout-minutes: 20- services:- postgres:- image: public.ecr.aws/docker/library/postgres:16-alpine- env:- POSTGRES_USER: aisoc- POSTGRES_PASSWORD: aisoc_ci_only- POSTGRES_DB: aisoc- ports: ["5432:5432"]- options: >-- --health-cmd "pg_isready -U aisoc"- --health-interval 5s- --health-timeout 5s- --health-retries 20-env:# The runtime role, not the owner. A superuser ignores every RLS# policy even under FORCE ROW LEVEL SECURITY, and the SSO callback@@ -72,6 +58,10 @@ jobs:steps:- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7+ - name: Start PostgreSQL with registry fallback+ uses: ./.github/actions/start-postgres+ with:+ password: aisoc_ci_only- uses: actions/setup-python@e9d6f990972a57673cdb72ec29e19d42ba28880f # v6with:@@ -264,20 +254,6 @@ jobs:runs-on: ubuntu-latesttimeout-minutes: 25- services:- postgres:- image: public.ecr.aws/docker/library/postgres:16-alpine- env:- POSTGRES_USER: aisoc- POSTGRES_PASSWORD: aisoc_ci_only- POSTGRES_DB: aisoc- ports: ["5432:5432"]- options: >-- --health-cmd "pg_isready -U aisoc"- --health-interval 5s- --health-timeout 5s- --health-retries 20-env:# The runtime role, not the owner. A superuser ignores every RLS# policy even under FORCE ROW LEVEL SECURITY, and the SSO callback@@ -302,6 +278,10 @@ jobs:steps:- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7+ - name: Start PostgreSQL with registry fallback+ uses: ./.github/actions/start-postgres+ with:+ password: aisoc_ci_only- uses: actions/setup-python@e9d6f990972a57673cdb72ec29e19d42ba28880f # v6with:diff --git a/.github/workflows/taxii-live.yml b/.github/workflows/taxii-live.ymlindex 5a58eca53..d5f623b02 100644--- a/.github/workflows/taxii-live.yml+++ b/.github/workflows/taxii-live.yml@@ -31,20 +31,6 @@ jobs:runs-on: ubuntu-latesttimeout-minutes: 20- services:- postgres:- image: public.ecr.aws/docker/library/postgres:16-alpine- env:- POSTGRES_USER: aisoc- POSTGRES_PASSWORD: aisoc_ci_only- POSTGRES_DB: aisoc- ports: ["5432:5432"]- options: >-- --health-cmd "pg_isready -U aisoc"- --health-interval 5s- --health-timeout 5s- --health-retries 20-env:# The runtime role, not the owner. POSTGRES_USER (aisoc) is a# superuser and ignores every RLS policy even under FORCE ROW LEVEL@@ -67,6 +53,10 @@ jobs:steps:- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7+ - name: Start PostgreSQL with registry fallback+ uses: ./.github/actions/start-postgres+ with:+ password: aisoc_ci_only- uses: actions/setup-python@e9d6f990972a57673cdb72ec29e19d42ba28880f # v6with:diff --git a/.github/workflows/tenant-tuning-live.yml b/.github/workflows/tenant-tuning-live.ymlindex b150b9977..b3c438221 100644--- a/.github/workflows/tenant-tuning-live.yml+++ b/.github/workflows/tenant-tuning-live.yml@@ -38,20 +38,6 @@ jobs:runs-on: ubuntu-latesttimeout-minutes: 20- services:- postgres:- image: public.ecr.aws/docker/library/postgres:16-alpine- env:- POSTGRES_USER: aisoc- POSTGRES_PASSWORD: aisoc_ci_only- POSTGRES_DB: aisoc- ports: ["5432:5432"]- options: >-- --health-cmd "pg_isready -U aisoc"- --health-interval 5s- --health-timeout 5s- --health-retries 20-env:# Two roles, as the default deployment ships them. `aisoc` owns the# schema and runs the migrations; `aisoc_app` is DML-only and is the@@ -65,6 +51,10 @@ jobs:steps:- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7+ - name: Start PostgreSQL with registry fallback+ uses: ./.github/actions/start-postgres+ with:+ password: aisoc_ci_only- uses: actions/setup-python@e9d6f990972a57673cdb72ec29e19d42ba28880f # v6with:diff --git a/.github/workflows/ueba-live.yml b/.github/workflows/ueba-live.ymlindex 80184d38f..e8b316c05 100644--- a/.github/workflows/ueba-live.yml+++ b/.github/workflows/ueba-live.yml@@ -39,20 +39,6 @@ jobs:runs-on: ubuntu-latesttimeout-minutes: 15- services:- postgres:- image: public.ecr.aws/docker/library/postgres:16-alpine- env:- POSTGRES_USER: ueba- POSTGRES_PASSWORD: ueba_ci_only- POSTGRES_DB: ueba- ports: ["5432:5432"]- options: >-- --health-cmd "pg_isready -U ueba"- --health-interval 5s- --health-timeout 5s- --health-retries 20-env:# Two roles, as the deployment ships them. `ueba` owns the schema and# runs the migrations; `aisoc_app` is the DML-only runtime role that@@ -66,6 +52,12 @@ jobs:steps:- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7+ - name: Start PostgreSQL with registry fallback+ uses: ./.github/actions/start-postgres+ with:+ password: ueba_ci_only+ postgres_user: ueba+ database: ueba- uses: actions/setup-python@e9d6f990972a57673cdb72ec29e19d42ba28880f # v6with:diff --git a/.github/workflows/upgrade-test.yml b/.github/workflows/upgrade-test.ymlindex c66d41522..421d371ce 100644--- a/.github/workflows/upgrade-test.yml+++ b/.github/workflows/upgrade-test.yml@@ -64,23 +64,13 @@ jobs:runs-on: ubuntu-latesttimeout-minutes: 25- services:- postgres:- image: public.ecr.aws/docker/library/postgres:16-alpine- env:- POSTGRES_USER: aisoc- POSTGRES_PASSWORD: aisoc_dev_secret- POSTGRES_DB: aisoc- ports:- - 5432:5432- options: >-- --health-cmd "pg_isready -U aisoc -d aisoc"- --health-interval 5s- --health-timeout 5s- --health-retries 20-steps:- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7+ - name: Start PostgreSQL with registry fallback+ uses: ./.github/actions/start-postgres+ with:+ password: aisoc_dev_secret+- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0with:python-version: '3.11'diff --git a/.github/workflows/verification-live.yml b/.github/workflows/verification-live.ymlindex ea198a0a8..cb0abec46 100644--- a/.github/workflows/verification-live.yml+++ b/.github/workflows/verification-live.yml@@ -35,20 +35,6 @@ jobs:runs-on: ubuntu-latesttimeout-minutes: 15- services:- postgres:- image: public.ecr.aws/docker/library/postgres:16-alpine- env:- POSTGRES_USER: aisoc- POSTGRES_PASSWORD: aisoc_ci_only- POSTGRES_DB: aisoc- ports: ["5432:5432"]- options: >-- --health-cmd "pg_isready -U aisoc"- --health-interval 5s- --health-timeout 5s- --health-retries 20-env:# The suite connects as the DML-only runtime role, never the owner: a# superuser ignores every RLS policy even under FORCE ROW LEVEL@@ -61,6 +47,10 @@ jobs:steps:- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7+ - name: Start PostgreSQL with registry fallback+ uses: ./.github/actions/start-postgres+ with:+ password: aisoc_ci_only- uses: actions/setup-python@e9d6f990972a57673cdb72ec29e19d42ba28880f # v6with:diff --git a/.github/workflows/white-label-live.yml b/.github/workflows/white-label-live.ymlindex d66c18499..9518041a1 100644--- a/.github/workflows/white-label-live.yml+++ b/.github/workflows/white-label-live.yml@@ -47,20 +47,6 @@ jobs:runs-on: ubuntu-latesttimeout-minutes: 20- services:- postgres:- image: public.ecr.aws/docker/library/postgres:16-alpine- env:- POSTGRES_USER: aisoc- POSTGRES_PASSWORD: aisoc_ci_only- POSTGRES_DB: aisoc- ports: ["5432:5432"]- options: >-- --health-cmd "pg_isready -U aisoc"- --health-interval 5s- --health-timeout 5s- --health-retries 20-env:# The runtime role, not the owner. A superuser ignores every RLS policy# even under FORCE ROW LEVEL SECURITY, so running as the owner would@@ -72,6 +58,10 @@ jobs:steps:- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7+ - name: Start PostgreSQL with registry fallback+ uses: ./.github/actions/start-postgres+ with:+ password: aisoc_ci_only- uses: actions/setup-python@e9d6f990972a57673cdb72ec29e19d42ba28880f # v6with:diff --git a/.gitleaksignore b/.gitleaksignoreindex 397dbe39f..ca2fd72ee 100644--- a/.gitleaksignore+++ b/.gitleaksignore@@ -148,7 +148,7 @@ services/api/tests/test_evidence_bundle.py:generic-api-key:26# Depth 4.2 (#1322): the TAXII live job's signing secret is a CI-only literal# that names itself as one; the workflow's Postgres and app both live and die# inside the job. Not a credential for anything reachable.-.github/workflows/taxii-live.yml:generic-api-key:65+.github/workflows/taxii-live.yml:generic-api-key:51# Rule-id lock entries: `"<slug>": "det-threat-anomaly-NNN"` pins a detection# rule's id so regeneration cannot renumber it. The scanner's key/valuediff --git a/scripts/check_maturity_table.py b/scripts/check_maturity_table.pyindex 7a45344d3..0e9cff5cc 100755--- a/scripts/check_maturity_table.py+++ b/scripts/check_maturity_table.py@@ -505,10 +505,16 @@ def _job_block(text: str, job: str) -> str | None:#: Ways a job can stand up real infrastructure. `docker run` is here#: because `isolation-live.yml` says in its own comment that it starts#: single-container stores that way deliberately — and leaving it out made-#: this gate reject a job that starts a real Neo4j, which is the false-#: negative that teaches people to work around a gate instead of trusting-#: it.-_CONTAINER_MARKERS = ("make up", "docker compose", "docker run")+#: this gate reject a job that starts a real Neo4j. The local PostgreSQL+#: action itself runs Docker after trying both official registries; following+#: that reference keeps the gate from mistaking the shared startup path for+#: an in-memory stand-in.+_CONTAINER_MARKERS = (+ "make up",+ "docker compose",+ "docker run",+ "uses: ./.github/actions/start-postgres",+)def declares_containers(workflow: str, job: str) -> bool: