Scan your MCP server or agent-tool repository for security and trust posture on every pull request and push — for free, with no secret to configure.
This composite action calls AgentGraph's public scan API, derives a letter grade (A+→F) from the trust score, posts a single sticky comment on the PR with the grade and findings, sets step outputs you can branch on, and can optionally fail the build when the score drops below a threshold you choose.
Scanning uses the unauthenticated public API — you never need an AgentGraph API key or any repository secret. The only token used is the automatically provided
${{ github.token }}, and only to post the PR comment.
GET https://agentgraph.co/api/v1/public/scan/{owner}/{repo}(cached/fast).- Parses
trust_score,scan_result, andfindings(critical / high / medium / total). - Derives a letter grade: A+ ≥96, A ≥81, B ≥61, C ≥41, D ≥21, else F.
- Sets outputs (
trust-score,grade,scan-result,badge-url,report-url). - On pull requests, posts/updates one sticky comment with the grade, findings, a link to the full report, and the README badge snippet.
- If
fail-below> 0 and the score is below it, fails the build.
name: AgentGraph Trust Scan
on:
pull_request:
push:
branches: [main]
permissions:
contents: read
pull-requests: write # required to post the PR comment
jobs:
trust-scan:
runs-on: ubuntu-latest
steps:
- uses: agentgraph-co/agentgraph/sdk/trust-scan-action@main
with:
fail-below: 41 # optional: fail if below a C gradeCopy examples/trust-scan.yml into .github/workflows/ for a ready-to-run file.
| Input | Required | Default | Description |
|---|---|---|---|
repo |
no | ${{ github.repository }} |
owner/repo to scan. |
api-url |
no | https://agentgraph.co/api/v1 |
AgentGraph API base URL. |
fail-below |
no | 0 |
Fail the build if the score is below this (0-100). 0 = never fail. |
comment-on-pr |
no | true |
Post/update a sticky trust-grade comment on pull requests. |
github-token |
no | ${{ github.token }} |
Token used only to post the PR comment (auto-provided; no AgentGraph key). |
| Output | Description |
|---|---|
trust-score |
Trust score 0-100 (security scan score). |
grade |
Letter grade derived from the score (A+, A, B, C, D, F). |
scan-result |
Scan result string (e.g. clean, warnings, flagged). |
badge-url |
URL of the embeddable SVG trust badge. |
report-url |
URL of the human-readable trust report (/check page). |
- id: scan
uses: agentgraph-co/agentgraph/sdk/trust-scan-action@main
- run: echo "Graded ${{ steps.scan.outputs.grade }} (${{ steps.scan.outputs.trust-score }}/100)"Add the live trust badge to your README (it links to the full report):
[](https://agentgraph.co/check/OWNER/REPO)Replace OWNER/REPO with your repository. The action also prints this exact
snippet (pre-filled) in its PR comment and job summary.
The action needs pull-requests: write to post the sticky comment. If you set
comment-on-pr: false, only contents: read is required. No AgentGraph secret
is ever needed — scanning is free and uses the public API.
- Full report for any repo:
https://agentgraph.co/check/{owner}/{repo} - AgentGraph: trust infrastructure for AI agents — https://agentgraph.co