GitHub Actions
These actions are in private preview. Names are final; details may change before release.
Two actions. The eval action runs the Autessa attack simulator and transcript grading against your agent, posts a scorecard on the pull request, and fails the check below your thresholds. The deploy action previews and deploys an Autessa CDK project to your stages.
Both actions declare the node20 runtime. GitHub may run them on a newer Node version.
Install
Add a workflow file to .github/workflows/. Store your keys as secrets: AUTESSA_API_KEY for evals (a developer key from Get a free API key works). For deploys, use two deploy keys per stage: one with only Preview changes for pull requests, as a repository secret, and one with Preview changes and Deploy for merges, as a secret in a GitHub environment. See Keys.
Minimal example: evals
name: Autessa eval
on: pull_request
permissions:
contents: read
pull-requests: write
jobs:
eval:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: Autessa-Inc/autessa-eval-action@v0
with:
api-key: ${{ secrets.AUTESSA_API_KEY }}
agent-id: agt_your_agent_id
categories: PROMPT_INJECTION,SOCIAL_ENGINEERING,DISCLOSURE_PROBING
golden-conversations: evals/golden.jsonl
min-block-rate: "0.9"
min-grade-pass-rate: "0.9"
The action posts a scorecard comment on the pull request and updates the same comment on every push. The same summary appears on the run's summary page.
Your own endpoint
PreviewTo attack your own agent over HTTP instead of an Autessa agent, set target-url. The simulator sends each attack as a POST, filling in {{message}} and {{sessionId}}, then reads the reply with a JSONPath. Header values are the names of Autessa secrets, never the values themselves:
- uses: Autessa-Inc/autessa-eval-action@v0
with:
api-key: ${{ secrets.AUTESSA_API_KEY }}
target-url: https://staging-agent.example.com/chat
target-request-template: '{"message": "{{message}}", "sessionId": "{{sessionId}}"}'
target-response-path: $.reply
target-headers: '{"Authorization": "staging-agent-token"}'
target-multi-turn: "true"
languages: en,es
min-block-rate: "0.9"
Multi-turn attacks (target-multi-turn) and attack languages (languages) are also in preview.
Minimal example: deploy
Preview# .github/workflows/autessa-deploy.yml
name: Autessa deploy
on:
pull_request:
push:
branches: [main]
permissions:
contents: read
jobs:
# Pull requests: preview only, with "Preview changes" keys (repository secrets).
preview:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
concurrency:
group: autessa-preview-${{ github.ref }}
cancel-in-progress: true
env:
AUTESSA_DEPLOY_KEY_DEV: ${{ secrets.AUTESSA_PREVIEW_KEY_DEV }}
AUTESSA_DEPLOY_KEY_PROD: ${{ secrets.AUTESSA_PREVIEW_KEY_PROD }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: 24 }
- run: npm ci # only needed for autessa.config.ts projects
- uses: Autessa-Inc/autessa-deploy-action@v0
with:
command: diff
stages: dev,prod
# Merges to main: deploy each stage with its "Deploy" key, kept in a GitHub environment.
deploy-dev:
if: github.event_name == 'push'
runs-on: ubuntu-latest
environment: dev
concurrency:
group: autessa-deploy-dev
cancel-in-progress: false
env:
AUTESSA_DEPLOY_KEY_DEV: ${{ secrets.AUTESSA_DEPLOY_KEY_DEV }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: 24 }
- run: npm ci
- uses: Autessa-Inc/autessa-deploy-action@v0
with:
command: deploy
stages: dev
deploy-prod:
needs: deploy-dev
runs-on: ubuntu-latest
environment: production
concurrency:
group: autessa-deploy-prod
cancel-in-progress: false
env:
AUTESSA_DEPLOY_KEY_PROD: ${{ secrets.AUTESSA_DEPLOY_KEY_PROD }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: 24 }
- run: npm ci
- uses: Autessa-Inc/autessa-deploy-action@v0
with:
command: deploy
stages: prod
Pull requests get a diff comment, run with preview-only keys. Merges deploy dev, then prod, with deploy keys kept in GitHub environments. If a stage fails, the run stops there. Each stage reads its key from the env variable named by deployKeyEnv in autessa.stages.yaml, falling back to deploy-key, then AUTESSA_DEPLOY_KEY.
How it works
- Eval action: starts an attack simulation against an Autessa agent, a firewall policy, or your own endpoint, and grades your golden conversations. It writes the scorecard to
autessa-scorecard.jsonand posts a markdown summary. - Thresholds: the check fails if the block rate or the grade pass rate is below your minimum. The block rate counts blocked attacks only; flagged attacks are shown but do not count as blocked.
- Attack categories:
PROMPT_INJECTION,SOCIAL_ENGINEERING,PASSPHRASE_GUESSING,WORD_OF_DAY_REPLAY,ANOMALY,DISCLOSURE_PROBING,CLONED_VOICE. Categories the target can't run, such as voice attacks against a text endpoint, are listed as not available and left out of the rate. - Golden conversations: a
.jsonor.jsonlfile, or a folder of them. Turn roles areUSER,ASSISTANT,TOOL_CALL, andTOOL_RESULT, with anexpectedOutcomefor each conversation. - Deploy action: runs the same engine as
npx autessa-cdkon a project written asautessa.config.tsorautessa.yaml, or the Maven or Gradle plugin on a Java project. The diff marks any change that gives someone more access as WIDENS ACCESS.deployapplies the change.
Options
Eval action:
| Input | What it does |
|---|---|
api-key | Your Autessa API key. Required. Masked in logs. |
agent-id | Attack this Autessa agent. |
policy-name | Attack this firewall policy, or apply it when attacking an agent or endpoint. |
target-url | Attack your own HTTP endpoint (POST). Use instead of agent-id. Preview. |
target-request-template, target-response-path, target-headers | How to call your endpoint and read its reply. Preview. |
target-multi-turn | Run multi-turn attacks. Preview. |
categories | Comma-separated attack categories. Default: all. |
languages | Comma-separated attack languages, for example en,es. Preview. |
golden-conversations | Path to transcripts to grade. |
min-block-rate, min-grade-pass-rate | Fail thresholds from 0 to 1. |
comment-on-pr | Post or update the scorecard comment. Default true. Needs pull-requests: write. |
github-token, base-url, timeout-minutes | Comment token, API URL override, and how long to wait (default 30). |
Outputs: scorecard, scorecard-path, summary, block-rate, grade-pass-rate, and passed.
Deploy action:
| Input | What it does |
|---|---|
command | diff (default) previews; deploy applies. |
stages | Comma-separated stages from autessa.stages.yaml, run in order. |
fanout | Comma-separated fanout groups. Each runs against every tenant in the group. |
deploy-key | A key for any stage whose deployKeyEnv variable is not set. |
working-directory | The folder with the project. Default .. |
build-tool | auto (default), node, maven or gradle. |
prune | When deploying, also delete resources removed from the project. |
allow-widen, allow-purchase, adopt, allow-destructive | Let a deploy apply changes that widen access, cost money, take over existing resources, or drop columns. Without them, such a deploy stops after the preview. |
fail-on-widen | Fail the diff check when any change widens access. |
skip-build | Don't build app folders. |
comment-on-pr | Post or update the PR comment. Default true. |
Outputs: summary, changes, widens, purchases, deployment-ids, passed, reason and exit-code. See the deploy action page for details. Deploys from the action show on the company's Deployments page in Autessa with the repository, the commit and a link to the run.
Example
ci-eval-before-release: attack-test an agent's endpoint on every pull request. The weak agent fails the check, and the same agent with the Autessa firewall passes.