Skip to content

docs: add guide for consuming audit reports with agents#24454

Merged
pelikhan merged 6 commits intomainfrom
copilot/add-guide-for-consuming-audit-reports
Apr 4, 2026
Merged

docs: add guide for consuming audit reports with agents#24454
pelikhan merged 6 commits intomainfrom
copilot/add-guide-for-consuming-audit-reports

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 4, 2026

No documentation existed showing how to feed the structured JSON output of the audit commands into agentic workflows for automated triage, trend analysis, and remediation.

New guide: docs/src/content/docs/guides/audit-with-agents.md

  • Getting structured data — covers gh aw audit <run-id> --json, gh aw logs [workflow] --last 10 --json, and gh aw audit diff --json; tables the key agent-relevant fields (key_findings, recommendations, firewall_analysis, mcp_tool_usage, metrics); shows jq filters for extracting targeted slices before passing to a model
  • Three workflow examples — PR comment on findings post-run (workflow_run trigger), regression detection that opens an issue (workflow_dispatch with two run IDs), and auto-filing GitHub issues for critical-severity findings
  • Full monitoring agent — weekly cron workflow that analyzes the last 10 runs, compares against a cache-memory baseline, detects cost/token spikes and new blocked domains, and posts a GitHub discussion digest
  • Tips — JSON schema stability guarantees, using --parse to populate behavior_fingerprint/agentic_assessments, and filtering large cross-run reports for context-window-limited models

Sidebar

Added Audit Reports with Agents entry to the Guides section in docs/astro.config.mjs.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/graphql
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw 0002625/b047/vetrev-parse .cfg git rev-�� --show-toplevel ache/go/1.25.8/xv1.0.0 /usr/bin/git 0752-31445/test-git 0002625/b213/vetrev-parse ache/go/1.25.8/x--show-toplevel git (http block)
    • Triggering command: /usr/bin/gh gh repo view --json owner,name --jq .owner.login &#43; &#34;/&#34; &#43; .name /usr/bin/git -bool -buildtags /tmp/go-build407--show-toplevel git rev-�� --show-toplevel /tmp/go-build4070002625/b417/logger.test /usr/bin/git -test.paniconexigit -test.v=true 1/x64/bin/node git (http block)
    • Triggering command: /usr/bin/gh gh repo view owner/repo rev-�� --show-toplevel /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/vet /usr/bin/git -unreachable=falgit /tmp/go-build407rev-parse /usr/lib/git-cor--show-toplevel git rev-�� --show-toplevel git-upload-pack (http block)
  • https://api.github.com/orgs/test-owner/actions/secrets
    • Triggering command: /usr/bin/gh gh api /orgs/test-owner/actions/secrets --jq .secrets[].name -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (http block)
  • https://api.github.com/repos/actions/ai-inference/git/ref/tags/v1
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha GOMODCACHE x_amd64/vet /usr/bin/git g_.a 34i--fWCy 64/pkg/tool/linu--show-toplevel git rev-�� --show-toplevel 64/pkg/tool/linux_amd64/vet /usr/bin/git itmain_branch151git itmain_branch151rev-parse 64/pkg/tool/linu--show-toplevel git (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v3
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha sistency_WithImports2849776526/001/main.md x_amd64/asm /usr/bin/git -json GO111MODULE x_amd64/compile 0002625/b439/importcfg -C k/gh-aw/gh-aw/pkg/styles/huh_theme.go l /tmp/go-build4070002625/b437/stringutil.test -json GO111MODULE x_amd64/compile /tmp/go-build4070002625/b437/stringutil.test (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v5
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha se 0002625/b024/vet.cfg ck GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linuInitial commit sRem�� es.md 0002625/b164/vet.cfg .cfg -I /tmp/go-build359rev-parse -I ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha --get-regexp ^remote\..*\.gh-resolved$ /usr/bin/git 541934522/.githugit .cfg 64/pkg/tool/linu--show-toplevel git rev-�� --show-toplevel 64/pkg/tool/linux_amd64/vet /usr/bin/git 4955021/b220/_pkgit GO111MODULE 64/pkg/tool/linu--show-toplevel git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha --show-toplevel /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linuremote /usr/bin/git -unreachable=falgit /tmp/go-build407rev-parse 0002625/b362/vet--show-toplevel git rev-�� .*/\1/p /opt/hostedtoolcache/go/1.25.8/x1 /usr/bin/gh runs/20260404-07git /tmp/go-build407rev-parse /opt/hostedtoolc--show-toplevel gh (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha GOMODCACHE epo}/actions/runs/1/artifacts /usr/bin/git e GO111MODULE x_amd64/vet git conf�� user.email test@example.com /usr/bin/git g_.a DW6KATJ4J 64/pkg/tool/linu--show-toplevel git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha .github/workflows/test.md bvjB4TkNQWQQ /usr/bin/git -json GO111MODULE x_amd64/vet git conf�� user.name Test User /usr/bin/git g_.a GO111MODULE 64/pkg/tool/linu--show-toplevel git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha --show-toplevel ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet /usr/bin/git /tmp/go-build359git -trimpath e/git-upload-pac--show-toplevel git rev-�� --show-toplevel /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linu--jq /usr/bin/git -unreachable=falgit /tmp/go-build407rev-parse 0002625/b346/vet--show-toplevel git (http block)
  • https://api.github.com/repos/actions/github-script/git/ref/tags/v8
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha -json 1.4.1/internal/json/json.go x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq .object.sha user.email epo}/actions/runs/3/artifacts /usr/bin/git e GO111MODULE x_amd64/vet git rev-�� --show-toplevel x_amd64/vet /opt/hostedtoolcache/node/24.14.1/x64/bin/node g_.a Cy4PJHJpH 64/pkg/tool/linu--show-toplevel node (http block)
  • https://api.github.com/repos/actions/setup-node/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq .object.sha GOMODCACHE epo}/actions/runs/4/artifacts /usr/bin/git e GO111MODULE x_amd64/vet git rev-�� --show-toplevel x_amd64/vet /usr/bin/git g_.a UHEwN-QbQ x_amd64/compile git (http block)
  • https://api.github.com/repos/actions/upload-artifact/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v4 --jq .object.sha runs/20260404-070752-31445/test-1065709019/custom/workflows -buildtags /bin/sh l -ifaceassert -nilfunc /bin/sh -c git-receive-pack &#39;/tmp/TestParseDefaultBranchFromLsRemoteWithRealGitmain_branch1516608165/001&#39; git-receive-pack &#39;/tmp/TestParseDefaultBranchFromLsRemoteWithRealGitmain_branch1516608165/001&#39; 1/x64/bin/node -json GO111MODULE x_amd64/compile 1/x64/bin/node (http block)
  • https://api.github.com/repos/github/gh-aw-actions/git/ref/tags/v0.1.2
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v0.1.2 --jq .object.sha -b feature-branch /usr/bin/git 346 GO111MODULE x_amd64/vet git rev-�� --git-dir x_amd64/vet /usr/bin/git g_.a GO111MODULE x_amd64/compile git (http block)
  • https://api.github.com/repos/github/gh-aw-actions/git/ref/tags/v1.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.0.0 --jq .object.sha k/gh-aw/gh-aw/.github/workflows -buildtags /usr/lib/git-core/git -errorsas -ifaceassert -nilfunc /usr/lib/git-core/git main�� run l 1/x64/bin/node --detach GO111MODULE x_amd64/asm 1/x64/bin/node (http block)
  • https://api.github.com/repos/github/gh-aw-actions/git/ref/tags/v1.2.3
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.2.3 --jq .object.sha k/gh-aw/gh-aw/.github/workflows -buildtags ache/node/24.14.1/x64/bin/node -errorsas -ifaceassert -nilfunc git t-13�� bility_SameInputSameOutput21831686/001/stability-test.md -tests /usr/bin/git -json GO111MODULE x_amd64/asm git (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/1/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/1/artifacts --jq .artifacts[].name .cfg 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linutest@example.com env ithub/workflows TJ4J/EoB_P8I8HxwDW6KATJ4J util.test GOINSECURE fips140/tls12 GOMODCACHE util.test (http block)
    • Triggering command: /usr/bin/gh gh run download 1 --dir test-logs/run-1 om/segmentio/asm@v1.1.3/cpu/arm64/arm64.go 64/pkg/tool/linux_amd64/vet GOINSECURE fips140/sha256 GOMODCACHE 64/pkg/tool/linux_amd64/vet env 3496837997 t2Bi/LbyKJAzlPTfrrG8ct2Bi .cfg GOINSECURE ntio/asm/cpu/x86rev-parse GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/link (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/12345/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/12345/artifacts --jq .artifacts[].name GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE 4955021/b011/ GOMODCACHE 64/pkg/tool/linux_amd64/vet env 4955021/b170/_pkg_.a .cfg 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD 4955021/b011/sym--git-dir 64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh run download 12345 --dir test-logs/run-12345 .cfg 64/pkg/tool/linux_amd64/vet GOINSECURE 4955021/b006/ GOMODCACHE 64/pkg/tool/linux_amd64/vet env 4955021/b160/_pkg_.a GO111MODULE 64/pkg/tool/linux_amd64/link GOINSECURE fips140/ecdsa 4955021/b006/symabis 64/pkg/tool/linux_amd64/link (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/12346/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/12346/artifacts --jq .artifacts[].name LsRemoteWithRealGitbranch_with_hyphen3721156782/001&#39; 64/pkg/tool/linux_amd64/vet GOINSECURE ntio/asm/internarev-parse GOMODCACHE 64/pkg/tool/linux_amd64/vet env rity1927707233/001 .cfg 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linutest@example.com (http block)
    • Triggering command: /usr/bin/gh gh run download 12346 --dir test-logs/run-12346 .cfg 64/pkg/tool/linux_amd64/vet GOINSECURE 4955021/b011/ GOMODCACHE 64/pkg/tool/linux_amd64/vet env 4955021/b159/_pkg_.a GO111MODULE 64/pkg/tool/linux_amd64/compile GOINSECURE 4955021/b011/sysrev-parse ache/go/1.25.8/x--show-toplevel 64/pkg/tool/linux_amd64/compile (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/2/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/2/artifacts --jq .artifacts[].name .cfg 64/pkg/tool/linux_amd64/vet GOINSECURE 4955021/b006/ GOMODCACHE 64/pkg/tool/linux_amd64/vet env ithub/workflows GO111MODULE 64/pkg/tool/linux_amd64/compile GOINSECURE fips140/tls13 ache/go/1.25.8/x--git-dir 64/pkg/tool/linux_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh run download 2 --dir test-logs/run-2 om/modelcontextp-c=4 64/pkg/tool/linu-nolocalimports GOINSECURE fips140/sha512 GOMODCACHE 64/pkg/tool/linu/tmp/go-build4070002625/b454/_testmain.go env 3496837997 ZDcH/WlCyhVRj9mWQyquJZDcH .cfg GOINSECURE a95/uritemplate/init GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/3/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/3/artifacts --jq .artifacts[].name .cfg 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet env 4955021/b195/_pkg_.a HJpH/bR5uMPu5Fr3Cy4PJHJpH x_amd64/link GOINSECURE GOMOD GOMODCACHE x_amd64/link (http block)
    • Triggering command: /usr/bin/gh gh run download 3 --dir test-logs/run-3 om/segmentio/asm@v1.1.3/cpu/x86/x86.go 64/pkg/tool/linux_amd64/vet GOINSECURE fips140/sha3 GOMODCACHE 64/pkg/tool/linux_amd64/vet env 3496837997 Ldjv/q8rDzC5dO2KyVIFwLdjv .cfg GOINSECURE contextprotocol/rev-parse GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linu-trimpath (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/4/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/4/artifacts --jq .artifacts[].name .cfg 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet env ithub/workflows o 64/pkg/tool/linux_amd64/compile GOINSECURE g/x/crypto/chachrev-parse GOMODCACHE 64/pkg/tool/linux_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh run download 4 --dir test-logs/run-4 om/modelcontextprotocol/go-sdk@v1.4.1/internal/mcpgodebug/mcpgodebug.go 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linutest@example.com env 3496837997 go .cfg GOINSECURE ntio/asm/cpu/armrev-parse GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linu-trimpath (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/5/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/5/artifacts --jq .artifacts[].name .cfg 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet env l.go l_test.go x_amd64/compile GOINSECURE g/x/crypto/interrev-parse GOMODCACHE x_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh run download 5 --dir test-logs/run-5 om/yosida95/uritemplate/v3@v3.0.2/compile.go 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet env 4955021/b217/_pkg_.a GO111MODULE .cfg GOINSECURE ntio/asm/cpu GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linu-importcfg (http block)
  • https://api.github.com/repos/github/gh-aw/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --workflow nonexistent-workflow-12345 --limit 100 GOMOD reflectlite/asm.--bare x_amd64/vet env &#34; GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --workflow nonexistent-workflow-12345 --limit 6 fips140deps/byteremote GOMODCACHE 64/pkg/tool/linumyorg env 4955021/b128/_pkg_.a .cfg 64/pkg/tool/linux_amd64/vet GOINSECURE /go-yaml/lexer GOMODCACHE 64/pkg/tool/linux_amd64/vet (http block)
  • https://api.github.com/repos/github/gh-aw/contents/.github/workflows/shared/reporting.md
    • Triggering command: /tmp/go-build4070002625/b396/cli.test /tmp/go-build4070002625/b396/cli.test -test.testlogfile=/tmp/go-build4070002625/b396/testlog.txt -test.paniconexit0 -test.v=true -test.parallel=4 -test.timeout=10m0s -test.run=^Test -test.short=true GOINSECURE GOMOD GOMODCACHE x_amd64/asm env -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v0.47.4
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v0.47.4 --jq .object.sha --show-toplevel 64/pkg/tool/linux_amd64/vet /usr/bin/git rity1927707233/0git .cfg 64/pkg/tool/linu--show-toplevel git rev-�� --show-toplevel 64/pkg/tool/linutest@example.com /usr/bin/git se 0002625/b016/vet-c k git (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v1.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq .object.sha 4955021/b126/_pkg_.a .cfg x_amd64/compile GOINSECURE /go-yaml/internarev-parse GOMODCACHE x_amd64/compile env sm-opt &gt;/dev/null 2&gt;&amp;1; then \ echo &#34;Running wasm-opt -Oz (size optimization)...&#34;; \ BEFORE=$(git GO111MODULE ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v1.2.3
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.2.3 --jq .object.sha -json GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet env -json GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v2.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --jq .object.sha -json GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet env -json GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --jq .object.sha bytealg/indexbyt-p GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet env Gitmain_branch1516608165/001&#39; Gitmain_branch1516608165/001&#39; x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v3.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v3.0.0 --jq .object.sha go GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env g_.a GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet (http block)
  • https://api.github.com/repos/nonexistent/action/git/ref/tags/v999.999.999
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq .object.sha edOutput3392528577/001 .cfg x_amd64/link GOINSECURE 4955021/b132/ GOMODCACHE x_amd64/link env ntdrain.test GO111MODULE k GOINSECURE 4955021/b132/ari-1 ache/go/1.25.8/xxterm-color V8/Ag4_V11V0-BgOlpEMARC/SfH0ACA2xvT9vCZYQqef (http block)
  • https://api.github.com/repos/nonexistent/repo/actions/runs/12345
    • Triggering command: /usr/bin/gh gh run view 12345 --repo nonexistent/repo --json status,conclusion GOINSECURE GOMOD 4955021/b012/symuser.name 64/pkg/tool/linuTest User ache�� 4955021/b252/_pkg_.a zBGz/yhMlvprrXT_DfcRFzBGz ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet GOINSECURE b/gh-aw/pkg/semvinit GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet (http block)
  • https://api.github.com/repos/owner/repo/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json age.go x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh workflow list --repo owner/repo --json name,path,state /usr/bin/git UpdateDiscussiongit -buildtags /usr/lib/git-cor--show-toplevel git rev-�� --show-toplevel /usr/lib/git-core/git /usr/bin/git --objects 0002625/b424/_terev-parse /usr/bin/git git (http block)
  • https://api.github.com/repos/owner/repo/contents/file.md
    • Triggering command: /tmp/go-build4070002625/b396/cli.test /tmp/go-build4070002625/b396/cli.test -test.testlogfile=/tmp/go-build4070002625/b396/testlog.txt -test.paniconexit0 -test.v=true -test.parallel=4 -test.timeout=10m0s -test.run=^Test -test.short=true GOINSECURE GOMOD GOMODCACHE x_amd64/asm env -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (http block)
  • https://api.github.com/repos/test-owner/test-repo/actions/secrets
    • Triggering command: /usr/bin/gh gh api /repos/test-owner/test-repo/actions/secrets --jq .secrets[].name -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (http block)
  • https://api.github.com/repos/test/repo
    • Triggering command: /usr/bin/gh gh api /repos/test/repo --jq .default_branch --show-toplevel /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/compile /usr/bin/git /tmp/go-build407git -trimpath /usr/lib/git-cor--show-toplevel git rev-�� --show-toplevel /usr/lib/git-core/git /usr/bin/git ErrorFormatting1git --format=%(objecrev-parse /usr/bin/infocmp--show-toplevel git (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Add guide for consuming audit reports with an agent docs: add guide for consuming audit reports with agents Apr 4, 2026
Copilot AI requested a review from pelikhan April 4, 2026 07:14
Copy link
Copy Markdown
Collaborator

@pelikhan pelikhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot unbloat the new docs

Agent-Logs-Url: https://github.com/github/gh-aw/sessions/e488f891-67d4-4110-9131-7eace4ba470f

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 4, 2026

@copilot unbloat the new docs

Done in 6a99e4b. Reduced from 239 → 136 lines by: collapsing the field table + jq examples into a single block, replacing numbered step lists inside workflow prompts with concise prose, removing the redundant section headers (## Step 1 etc.) inside the monitoring workflow, removing the [!TIP] callout (content folded into the workflow prompt itself), and trimming the Tips section to three short paragraphs.

Copilot AI requested a review from pelikhan April 4, 2026 07:23
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions github-actions bot mentioned this pull request Apr 4, 2026
Copy link
Copy Markdown
Collaborator

@pelikhan pelikhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot merge main, unbloat

Copilot AI and others added 2 commits April 4, 2026 13:19
…-consuming-audit-reports

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/c40af69e-56b6-4b2b-9e3b-2085d6fbf650

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 4, 2026

@copilot merge main, unbloat

Done in a79c21e. Merged main and trimmed the guide from 136 → 124 lines: replaced the bash command block + separate jq examples with a compact three-row table, and collapsed the three Tips paragraphs into one sentence.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/graphql
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw (http block)
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw -pack /home/REDACTED/work/gh-aw/gh-aw/cmd/gh-aw/main.go (http block)
  • https://api.github.com/repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b
    • Triggering command: /usr/bin/gh gh api /repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --jq .object.sha (http block)
  • https://api.github.com/repos/github/gh-aw
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw --jq .visibility (http block)
  • https://api.github.com/repos/githubnext/agentics/git/ref/tags/
    • Triggering command: /usr/bin/gh gh api /repos/githubnext/agentics/git/ref/tags/# --jq .object.sha (http block)

If you need me to access, download, or install something from one of these locations, you can either:

@github-actions

This comment has been minimized.

1 similar comment
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 4, 2026

Hey @Copilot 👋 — great idea documenting how to pipe structured audit output into agentic workflows! The new guide covers a genuinely useful pattern and the aw wrap examples are practical and well-structured.

One thing to tighten up before this lands:

  • Split the unrelated JSON reformattingpkg/agentdrain/data/default_weights.json has a formatting-only change (multi-line arrays collapsed to single-line) that is completely unrelated to the docs guide. This makes the diff harder to review and obscures the intent of the PR. Move that change to its own commit/PR, or revert it here if it was incidental.

If you'd like a hand, you can assign this prompt to your coding agent:

In PR #24454 (docs: add guide for consuming audit reports with agents), the file `pkg/agentdrain/data/default_weights.json` has formatting-only changes (multi-line JSON arrays collapsed to single-line) that are unrelated to the documentation being added.

Please revert all changes to `pkg/agentdrain/data/default_weights.json` so that the PR stays focused on only the documentation changes:
1. `docs/astro.config.mjs` — new sidebar entry for the audit-with-agents guide
2. `docs/src/content/docs/guides/audit-with-agents.md` — the new guide itself

If the JSON reformatting is intentional and desired, open a separate PR for it with a clear title like "chore: compact array formatting in default_weights.json".

Generated by Contribution Check · ● 1.7M ·

Copilot AI requested a review from pelikhan April 4, 2026 13:21
@pelikhan
Copy link
Copy Markdown
Collaborator

pelikhan commented Apr 4, 2026

@copilot the agent accesses these tools through an MCP when running in action (agentic-workflows tool)

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 4, 2026

@copilot the agent accesses these tools through an MCP when running in action (agentic-workflows tool)

Fixed in 1ccc24f. All four workflow prompts now instruct the agent to use the agentic-workflows MCP tool (e.g. audit, audit diff, logs) instead of calling gh aw CLI commands directly. Added a note at the top of the guide explaining that the CLI flags shown in the table are for local use, while agents inside GitHub Actions go through the MCP tool.

@pelikhan pelikhan marked this pull request as ready for review April 4, 2026 13:32
Copilot AI review requested due to automatic review settings April 4, 2026 13:32
@pelikhan pelikhan merged commit 85e64d8 into main Apr 4, 2026
1 check passed
@pelikhan pelikhan deleted the copilot/add-guide-for-consuming-audit-reports branch April 4, 2026 13:32
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds new documentation describing how to consume structured JSON audit outputs in agent-driven workflows, including end-to-end examples for commenting, regression detection, issue filing, and weekly monitoring.

Changes:

  • Added a new guide explaining JSON output from gh aw audit, gh aw audit diff, and cross-run reporting for agentic workflows.
  • Included multiple aw wrap workflow examples demonstrating automation patterns (PR comments, regression issues, weekly digest).
  • Added the guide to the Docs sidebar navigation.
Show a summary per file
File Description
docs/src/content/docs/guides/audit-with-agents.md New guide describing audit JSON fields and example agent workflows for triage and monitoring.
docs/astro.config.mjs Adds the new guide link to the Guides sidebar.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comments suppressed due to low confidence (2)

docs/src/content/docs/guides/audit-with-agents.md:63

  • This example grants issues: write directly to the agent job to open an issue. For consistency with the project’s documented security model, consider switching to safe-outputs (e.g., create-issue) so the agent job can remain read-only and issue creation happens in the dedicated safe-outputs job.
engine: copilot
tools:
  github:
    toolsets: [issues]
  agentic-workflows:
permissions:
  contents: read
  actions: read
  issues: write

docs/src/content/docs/guides/audit-with-agents.md:113

  • Like the other examples, this grants discussions: write and appears to rely on the github tool to create discussions from the agent job. Consider using safe-outputs (e.g., create-discussion) and keeping the agent job read-only to match the repo’s documented privilege separation approach.
tools:
  github:
    toolsets: [discussions]
  agentic-workflows:
  cache-memory:
    key: audit-monitoring-trends
permissions:
  contents: read
  actions: read
  discussions: write
  • Files reviewed: 2/2 changed files
  • Comments generated: 4

| Command | Use case |
|---------|----------|
| `gh aw audit <run-id> --json` | Single run — `key_findings`, `recommendations`, `metrics` |
| `gh aw logs [workflow] --last 10 --json` | Trend analysis — `per_run_breakdown`, `domain_inventory` |
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The gh aw logs row suggests that --json alone returns cross-run report fields like per_run_breakdown/domain_inventory, but those fields are part of the cross-run report output which is generated when --format is set (and --json is used alongside it). Consider updating the example to include --format markdown (or pretty) when describing those fields, or adjust the listed fields to match the non---format JSON output.

Suggested change
| `gh aw logs [workflow] --last 10 --json` | Trend analysis — `per_run_breakdown`, `domain_inventory` |
| `gh aw logs [workflow] --last 10 --format markdown --json` | Trend analysis — `per_run_breakdown`, `domain_inventory` |

Copilot uses AI. Check for mistakes.
Comment on lines +27 to +38
github:
toolsets: [pull_requests]
agentic-workflows:
permissions:
contents: read
actions: read
pull-requests: write
---

# Summarize Audit Findings

Use the `agentic-workflows` MCP tool `audit` with run ID ${{ github.event.workflow_run.id }}, identify the pull request that triggered it, and post a comment summarizing key findings and blocked domains. Highlight issues with severity `high` or `critical`. If there are no findings, post a brief "no issues found" comment.
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This workflow example grants pull-requests: write and relies on the github tool to post a PR comment from the agent job. The docs elsewhere recommend keeping the agent job read-only and performing writes via safe-outputs (e.g., add-comment) to reduce prompt-injection risk and align with the project’s privilege separation model.

This issue also appears in the following locations of the same file:

  • line 55
  • line 104
Suggested change
github:
toolsets: [pull_requests]
agentic-workflows:
permissions:
contents: read
actions: read
pull-requests: write
---
# Summarize Audit Findings
Use the `agentic-workflows` MCP tool `audit` with run ID ${{ github.event.workflow_run.id }}, identify the pull request that triggered it, and post a comment summarizing key findings and blocked domains. Highlight issues with severity `high` or `critical`. If there are no findings, post a brief "no issues found" comment.
agentic-workflows:
safe-outputs:
permissions:
contents: read
actions: read
pull-requests: read
---
# Summarize Audit Findings
Use the `agentic-workflows` MCP tool `audit` with run ID ${{ github.event.workflow_run.id }}, identify the pull request that triggered it, and then use the `safe-outputs` tool `add-comment` to request a pull request comment summarizing key findings and blocked domains. Highlight issues with severity `high` or `critical`. If there are no findings, request a brief "no issues found" comment instead.

Copilot uses AI. Check for mistakes.
Comment on lines +81 to +94
tools:
github:
toolsets: [issues]
agentic-workflows:
permissions:
contents: read
actions: read
issues: write
---

# Auto-File Issues for Critical Findings

Use the `agentic-workflows` MCP tool `audit` with run ID ${{ github.event.workflow_run.id }}. Filter `key_findings` for severity `high` or `critical`. For each finding without a matching open issue, create one with the finding title, description, impact, and recommendations, labelled `audit-finding`. If no critical findings, call the `noop` safe output tool.
```
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section instructs calling the noop safe output tool, but the workflow frontmatter doesn’t define any safe-outputs:. If the intent is to use safe outputs (recommended for creating issues/labels), add the appropriate safe-outputs configuration (e.g., create-issue, optionally add-labels) and then reference noop as the fallback when no action is needed.

Copilot uses AI. Check for mistakes.

# Weekly Audit Monitoring Digest

1. Use the `agentic-workflows` MCP tool `logs` with parameters `workflow: my-workflow, last: 10` and read `/tmp/gh-aw/cache-memory/audit-trends.json` as the previous baseline.
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The agentic-workflows MCP logs tool parameters in the prompt don’t match the documented schema (workflow_name and count, not workflow and last). Updating the parameter names will help readers copy/paste this into a working workflow.

Suggested change
1. Use the `agentic-workflows` MCP tool `logs` with parameters `workflow: my-workflow, last: 10` and read `/tmp/gh-aw/cache-memory/audit-trends.json` as the previous baseline.
1. Use the `agentic-workflows` MCP tool `logs` with parameters `workflow_name: my-workflow, count: 10` and read `/tmp/gh-aw/cache-memory/audit-trends.json` as the previous baseline.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: add guide for consuming audit reports with an agent

3 participants