Gate every pull request with an independent AI audit. The action fetches your PR diff, scores it against your quality rubric, and fails the pipeline automatically if the score falls below your threshold.
A developer opens a pull request into your main branch.
The action automatically retrieves the changed lines.
0.1 XRP or $0.10 USDC sent from your dedicated wallet.
The Referee scores the diff against your rubric (0–100).
Pipeline passes or fails. Summary posted to the PR.
| Secret name | Value | When |
|---|---|---|
| AGENTTRUST_XRP_SECRET | Your XRPL wallet secret (sXXX…) | Using XRP |
| AGENTTRUST_USDC_KEY | Your EVM private key (0x…) | Using USDC |
.github/workflows/audit.yml in your repo.name: AI Code Audit
on:
pull_request:
branches: [main]
jobs:
audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: eamwhite1/agenttrust-audit-action@v1
with:
job_spec: |
Review this pull request for correctness, security, and code quality.
Pass if: no obvious bugs, no hardcoded secrets, no SQL injection risk,
functions are well-named, logic is clear.
threshold: 70
payment_method: xrp
xrp_secret: ${{ secrets.AGENTTRUST_XRP_SECRET }}
main will now be audited automatically. Change payment_method: usdc and usdc_private_key to pay with USDC instead.
The spec is your rubric. Be specific — vague specs produce vague verdicts. The AI only sees the changed lines, so write criteria that are checkable from a diff alone.
Good:
Review this pull request for: - Correctness: does the logic match the stated intent? - Security: no hardcoded secrets, no SQL injection, no XSS vectors - Tests: new functions should have corresponding tests - Naming: variables and functions should be clearly named Pass if all four criteria are met with no critical issues.
Too vague:
Is this good code?
- uses: eamwhite1/agenttrust-audit-action@v1
id: audit
with:
job_spec: 'Review for correctness and security.'
xrp_secret: ${{ secrets.AGENTTRUST_XRP_SECRET }}
- name: Post audit result as PR comment
if: always()
uses: actions/github-script@v7
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `**AgentTrust Audit** — ${{ steps.audit.outputs.verdict }} (${{ steps.audit.outputs.score }}/100)\n\n${{ steps.audit.outputs.summary }}`
})