AEGISdocs
API Reference

GitHub Action Reference

aegis-governance/.github/actions/aegis-gate -- Reusable composite action

aegis-governance/.github/actions/aegis-gate -- Reusable composite action for enforcing AEGIS governance gates in GitHub Actions workflows.

Overview

The AEGIS Governance Gate action evaluates a proposal against AEGIS governance gates by calling the Cloud Run API with a Bearer token. Use it in any repository to enforce governance checks before deployment, merging, or other critical operations.

The action:

  1. Builds a proposal payload from inputs
  2. Calls the AEGIS Cloud Run API (POST /evaluate) with Bearer token auth
  3. Parses the decision response
  4. Writes a summary table to the GitHub Actions step summary
  5. Optionally fails the workflow if the decision is halt

Usage

- uses: undercurrentai/aegis-governance/.github/actions/aegis-gate@main
  with:
    api_key: ${{ secrets.AEGIS_API_KEY }}
    proposal_summary: "Deploy new authentication service"
    estimated_impact: "high"
    risk_score: "0.4"
    complexity_score: "0.7"

Setup

  1. Get an API key from portal.undercurrentholdings.com
  2. Add AEGIS_API_KEY as a GitHub Actions secret in your repository
  3. Reference the action in your workflow (see examples below)

No cloud provider credentials needed — the action uses a simple HTTPS call.


Inputs

InputRequiredDefaultDescription
api_keyYesAEGIS API key (from portal). Store as a GitHub secret.
api_urlNoCloud Run prod URLAEGIS API base URL (override for staging/self-hosted)
proposal_summaryYesBrief description of the proposed change
estimated_impactYesmediumImpact level: low, medium, high, critical
change_typeNofeatureChange type: feature, refactor, bugfix, config
risk_scoreNo0.0Risk score (0.0-1.0)
risk_baselineNo0.0Risk baseline (0.0-1.0)
profit_proposedNo0.0Proposed profit value
profit_baselineNo0.0Profit baseline value
novelty_scoreNo0.5Novelty score (0.0-1.0)
complexity_scoreNo0.5Complexity score (0.0-1.0, higher = simpler)
quality_scoreNo0.7Quality score (0.0-1.0)
agent_idNogithub-actionsAgent/caller identifier
fail_on_haltNotrueFail the workflow if AEGIS returns HALT

Outputs

OutputDescription
statusAEGIS decision status: proceed, pause, halt, escalate
confidenceDecision confidence score (0.0-1.0)
rationaleHuman-readable decision rationale
decision_jsonFull decision response as a JSON string

Example: Pre-Deployment Gate

name: Deploy with Governance Gate

on:
  push:
    branches: [main]

jobs:
  governance-gate:
    runs-on: ubuntu-latest
    outputs:
      status: ${{ steps.aegis.outputs.status }}
    steps:
      - name: AEGIS Governance Gate
        id: aegis
        uses: undercurrentai/aegis-governance/.github/actions/aegis-gate@main
        with:
          api_key: ${{ secrets.AEGIS_API_KEY }}
          proposal_summary: "Deploy ${{ github.repository }} to production"
          estimated_impact: "high"
          risk_score: "0.3"
          complexity_score: "0.7"

  deploy:
    needs: governance-gate
    if: needs.governance-gate.outputs.status == 'proceed'
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: ./scripts/deploy.sh

Troubleshooting

ErrorCauseFix
HTTP 401Invalid or expired API keyCheck AEGIS_API_KEY secret
HTTP 403Cloud Run IAM rejectionShould not occur with Bearer auth
HTTP 503Unkey service not configuredContact AEGIS support
TimeoutCloud Run cold startRetry or increase timeout

Security

  • No cloud provider credentials needed: Simple HTTPS POST with Bearer token
  • No script injection: Inputs passed via environment variables
  • Heredoc delimiters: Multi-line outputs use heredoc to prevent GITHUB_OUTPUT injection

On this page