name: CI on: push: pull_request: workflow_dispatch: permissions: contents: read concurrency: group: ci-${{ github.ref }} # Preserve costly artifact-audit results when a follow-up fix is pushed. cancel-in-progress: false jobs: test: strategy: fail-fast: false matrix: os: [ubuntu-24.04, ubuntu-24.04-arm, macos-latest, windows-latest] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5 - uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6 with: go-version: '1.26.10' cache: true - run: go test -race ./... - run: go vet ./... - run: go build ./cmd/cybot - run: go run golang.org/x/vuln/cmd/govulncheck@v1.9.0 ./... contracts: runs-on: ubuntu-24.04 steps: - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5 with: fetch-depth: 0 - uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6 with: go-version: '1.26.10' - run: python3 -m unittest discover -s scripts -p 'test_*.py' - run: for script in scripts/*.sh; do bash -n "$script"; done - name: Scan public source and history for secrets run: python3 scripts/secret_scan.py . --history - name: Build coverage from the actual command surface run: | go build -o /tmp/cybot ./cmd/cybot /tmp/cybot capability coverage > /tmp/coverage.json python3 scripts/check_inventory.py /tmp/coverage.json - name: Record full-product release status run: | set +e python3 scripts/release_gate.py --coverage /tmp/coverage.json --output /tmp/release-readiness.json status=$? set -e if [ "$status" -gt 1 ]; then exit "$status"; fi - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 with: name: full-catalog-readiness path: /tmp/release-readiness.json compact-runtime: name: Compact real-tool fixtures (${{ matrix.runner }}) strategy: fail-fast: false matrix: runner: [ubuntu-24.04, ubuntu-24.04-arm] runs-on: ${{ matrix.runner }} timeout-minutes: 90 env: CYBOT_VERSION: 0.1.0-dev steps: - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5 - uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6 with: go-version: '1.26.10' - name: Prepare disposable hosted runner capacity run: python3 scripts/prepare_hosted_runner.py - name: Build and validate before promoting a runtime pin run: python3 scripts/toolbox.py build - name: Audit measured Go and installed image packages continue-on-error: true run: python3 scripts/toolbox.py audit - name: Round-trip a checksummed immutable image backup run: | python3 scripts/toolbox.py backup backups/ci-core python3 scripts/toolbox.py restore backups/ci-core python3 scripts/toolbox.py verify - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 if: always() with: name: compact-validation-${{ matrix.runner }} path: | .cybot/toolbox/core-tests.json .cybot/toolbox/core-tests.txt .cybot/toolbox/runtime.lock.json .cybot/toolbox/probe-error.txt .cybot/toolbox/validation/ .cybot/toolbox/security/ analysis-runtime: name: Code analysis fixtures (${{ matrix.runner }}) strategy: fail-fast: false matrix: runner: [ubuntu-24.04, ubuntu-24.04-arm] runs-on: ${{ matrix.runner }} timeout-minutes: 90 env: CYBOT_VERSION: 0.1.0-dev steps: - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5 - uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6 with: go-version: '1.26.10' - name: Prepare disposable hosted runner capacity run: python3 scripts/prepare_hosted_runner.py - run: python3 scripts/toolbox.py --profile analysis build - name: Audit measured Go and installed image packages continue-on-error: true run: python3 scripts/toolbox.py --profile analysis audit - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 if: always() with: name: analysis-validation-${{ matrix.runner }} path: | .cybot/toolbox/analysis/analysis-tests.json .cybot/toolbox/analysis/analysis-tests.txt .cybot/toolbox/analysis/runtime.lock.json .cybot/toolbox/analysis/probe-error.txt .cybot/toolbox/analysis/validation/ .cybot/toolbox/analysis/security/ web-runtime: name: Web engine fixtures (${{ matrix.runner }}) strategy: fail-fast: false matrix: runner: [ubuntu-24.04, ubuntu-24.04-arm] runs-on: ${{ matrix.runner }} timeout-minutes: 90 env: CYBOT_VERSION: 0.1.0-dev steps: - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5 - uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6 with: go-version: '1.26.10' - name: Prepare disposable hosted runner capacity run: python3 scripts/prepare_hosted_runner.py - run: python3 scripts/toolbox.py --profile web build - name: Audit measured Go and installed image packages continue-on-error: true run: python3 scripts/toolbox.py --profile web audit - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 if: always() with: name: web-validation-${{ matrix.runner }} path: | .cybot/toolbox/web/web-tests.json .cybot/toolbox/web/web-tests.txt .cybot/toolbox/web/runtime.lock.json .cybot/toolbox/web/probe-error.txt .cybot/toolbox/web/validation/ .cybot/toolbox/web/security/ browser-runtime: name: Chromium operation fixtures (${{ matrix.runner }}) strategy: fail-fast: false matrix: runner: [ubuntu-24.04, ubuntu-24.04-arm] runs-on: ${{ matrix.runner }} timeout-minutes: 90 env: CYBOT_VERSION: 0.1.0-dev steps: - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5 - uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6 with: go-version: '1.26.10' - name: Prepare disposable hosted runner capacity run: python3 scripts/prepare_hosted_runner.py - run: python3 scripts/toolbox.py --profile browser build - name: Audit measured Go and installed image packages continue-on-error: true run: python3 scripts/toolbox.py --profile browser audit - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 if: always() with: name: browser-validation-${{ matrix.runner }} path: | .cybot/toolbox/browser/browser-tests.json .cybot/toolbox/browser/browser-tests.txt .cybot/toolbox/browser/runtime.lock.json .cybot/toolbox/browser/probe-error.txt .cybot/toolbox/browser/validation/ .cybot/toolbox/browser/security/ operation-readiness: needs: [compact-runtime, analysis-runtime, supplychain-runtime, web-runtime, browser-runtime] if: always() runs-on: ubuntu-24.04 steps: - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5 - uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5 with: pattern: '*-validation-*' path: /tmp/cybot-validation - name: Bind operation evidence to this source revision run: python3 scripts/operation_evidence.py /tmp/cybot-validation --output /tmp/operation-evidence - name: Evaluate the entire catalog run: | set +e python3 scripts/release_gate.py --evidence /tmp/operation-evidence/evidence.json --output /tmp/operation-readiness.json status=$? set -e if [ "$status" -gt 1 ]; then exit "$status"; fi - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 with: name: operation-readiness path: | /tmp/operation-readiness.json /tmp/operation-evidence/ supplychain-runtime: name: Supply chain fixtures (${{ matrix.runner }}) strategy: fail-fast: false matrix: runner: [ubuntu-24.04, ubuntu-24.04-arm] runs-on: ${{ matrix.runner }} timeout-minutes: 90 env: CYBOT_VERSION: 0.1.0-dev steps: - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5 - uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6 with: go-version: '1.26.10' - name: Prepare disposable hosted runner capacity run: python3 scripts/prepare_hosted_runner.py - run: python3 scripts/toolbox.py --profile supplychain build - name: Audit measured Go and installed image packages continue-on-error: true run: python3 scripts/toolbox.py --profile supplychain audit - name: Resolve official Grype database metadata for the next runtime if: always() continue-on-error: true run: | python3 - <<'PY' import json, urllib.request from pathlib import Path url = 'https://grype.anchore.io/databases/v6/latest.json' request = urllib.request.Request(url, headers={'User-Agent': 'grype/0.116.1', 'Accept': 'application/json'}) with urllib.request.urlopen(request, timeout=30) as response: metadata = json.load(response) Path('.cybot/toolbox/supplychain/grype-db-metadata.json').write_text(json.dumps(metadata, indent=2)+'\n') PY - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 if: always() with: name: supplychain-validation-${{ matrix.runner }} path: | .cybot/toolbox/supplychain/supplychain-tests.json .cybot/toolbox/supplychain/supplychain-tests.txt .cybot/toolbox/supplychain/runtime.lock.json .cybot/toolbox/supplychain/probe-error.txt .cybot/toolbox/supplychain/grype-db-metadata.json .cybot/toolbox/supplychain/validation/ .cybot/toolbox/supplychain/security/