feat(a2a): add secure interaction test kit #79
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: 1.26.x | |
| - name: Verify module downloads | |
| run: go mod verify | |
| - name: golangci-lint | |
| uses: golangci/golangci-lint-action@v8 | |
| with: | |
| version: v2.11.1 | |
| - name: Build | |
| run: make | |
| test: | |
| runs-on: ubuntu-latest | |
| needs: lint | |
| strategy: | |
| matrix: | |
| module: [agent, cli, cmd, internal, pkg, schemas, manager] | |
| include: | |
| - module: manager | |
| sudo: true | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: 1.26.x | |
| - name: Create coverage directory | |
| run: mkdir -p coverage | |
| - name: Run tests for ${{ matrix.module }} | |
| run: | | |
| if [[ "${{ matrix.module }}" == "manager" ]]; then | |
| sudo GOTOOLCHAIN=go1.26.0+auto go test -v --race -covermode=atomic -coverprofile coverage/${{ matrix.module }}.out ./${{ matrix.module }}/... | |
| else | |
| GOTOOLCHAIN=go1.26.0+auto go test -v --race -covermode=atomic -coverprofile coverage/${{ matrix.module }}.out ./${{ matrix.module }}/... | |
| fi | |
| - name: Upload coverage artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-${{ matrix.module }} | |
| path: coverage/${{ matrix.module }}.out | |
| retention-days: 1 | |
| upload-coverage: | |
| runs-on: ubuntu-latest | |
| needs: test | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Download all coverage artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| pattern: coverage-* | |
| path: coverage/ | |
| merge-multiple: true | |
| - name: Upload results to Codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: ./coverage/*.out | |
| codecov_yml_path: codecov.yml | |
| verbose: true | |
| product-security: | |
| runs-on: ubuntu-latest | |
| needs: test | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: 1.26.x | |
| cache-dependency-path: go.sum | |
| - name: Verify modules | |
| run: go mod verify | |
| - name: Run Direct-Agent core tests | |
| run: | | |
| GOTOOLCHAIN=go1.26.0+auto go test \ | |
| ./pkg/atls/... \ | |
| ./pkg/clients/... \ | |
| ./pkg/agtp/... \ | |
| ./pkg/production \ | |
| ./cmd/redis-failover-redteam | |
| - name: Run Direct-Agent security red-team tests | |
| run: | | |
| GOTOOLCHAIN=go1.26.0+auto go test -v -race -count=1 \ | |
| ./pkg/atls/identitypolicy \ | |
| ./pkg/clients \ | |
| ./pkg/production \ | |
| ./cmd/redis-failover-redteam | |
| - name: Run three-node discovery soak gate | |
| env: | |
| ASB_DISCOVERY_SOAK: "1" | |
| ASB_DISCOVERY_SOAK_DURATION: "30s" | |
| run: | | |
| GOTOOLCHAIN=go1.26.0+auto go test -v -race -count=1 \ | |
| ./pkg/agtp/discovery/peer -run '^TestPeerServiceSoak$' | |
| - name: Run protected-change consumer integration | |
| run: | | |
| GOTOOLCHAIN=go1.26.0+auto go test -v -race -count=1 \ | |
| ./examples/protected-change-consumer | |
| - name: Run v1 and draft-06 v2 A2A negative integration | |
| run: | | |
| GOTOOLCHAIN=go1.26.0+auto go test -v -race -count=1 \ | |
| ./examples/a2a-multiprocess | |
| - name: Run bounded fuzz smoke | |
| run: | | |
| GOTOOLCHAIN=go1.26.0+auto go test -run '^$' \ | |
| -fuzz=FuzzVerifySessionIdentityJWTRejectsMalformedCompactTokens \ | |
| -fuzztime=10s ./pkg/agtp | |
| - name: Run govulncheck | |
| run: go run golang.org/x/vuln/cmd/govulncheck@latest ./... |