Skip to content

Add TruffleHog shared agentic workflow for secret detection in smoke-codex#29512

Merged
pelikhan merged 7 commits intomainfrom
copilot/add-trufflehog-secret-detection
May 1, 2026
Merged

Add TruffleHog shared agentic workflow for secret detection in smoke-codex#29512
pelikhan merged 7 commits intomainfrom
copilot/add-trufflehog-secret-detection

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 1, 2026

Summary

Adds a new shared agentic workflow shared/trufflehog.md that integrates TruffleHog secret scanning as a dedicated separate job that runs after the detection job. The workflow is imported into smoke-codex.

Changes

New: .github/workflows/shared/trufflehog.md

A reusable shared workflow that adds a trufflehog_scan job to any workflow that imports it:

  • Job: trufflehog_scan — runs after agent and detection complete (needs: [agent, detection])
  • Download artifacts — downloads agent, cache-memory, and repo-memory artifacts (continue-on-error: true)
  • Install TruffleHog — installs TruffleHog v3.88.27 (pinned version)
  • Scan agent output — scans /tmp/gh-aw/ (agent output and code patches)
  • Scan cache-memory — scans /tmp/gh-aw/cache-memory/
  • Scan repo-memory — scans /tmp/gh-aw/repo-memory/
  • Evaluate results — aggregates scan results; sets secrets_found=true output and fails the job (exit 1) if secrets are detected
  • Upload scan results — saves JSONL results as trufflehog-scan-results artifact

Markdown documentation is wrapped in <!-- ... --> XML comments.

Modified: .github/workflows/smoke-codex.md

Added - shared/trufflehog.md to the imports list.

Recompiled: .github/workflows/smoke-codex.lock.yml

Lock file recompiled to include the new trufflehog_scan job and conclusion pre-step.

How secrets notify the conclusion job

When TruffleHog detects secrets, the trufflehog_scan job fails. The conclusion job automatically depends on all jobs (via ensureConclusionIsLastJob) and runs a dedicated pre-step "Report TruffleHog secret scan failure" that:

  1. Checks needs.trufflehog_scan.result == 'failure' && needs.trufflehog_scan.outputs.secrets_found == 'true'
  2. Creates a GitHub issue titled 🔐 Secrets detected in workflow run: <name> #<run> with the affected locations, run URL, and instructions to rotate credentials
  3. Logs the created issue URL

This is an extensible pattern: other security tools can follow the same approach (separate job + jobs.conclusion.pre-steps entry) without any compiler changes.

Usage in other workflows

---
imports:
  - shared/trufflehog.md
---

Changeset

  • Type: patch
  • Description: Added a shared TruffleHog agentic workflow for scanning agent output and memory artifacts for secrets.

Warning

Firewall blocked 2 domains

The following domains were blocked by the firewall during workflow execution:

  • ab.chatgpt.com
  • chatgpt.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "ab.chatgpt.com"
    - "chatgpt.com"

See Network Configuration for more information.

Generated by Changeset Generator for issue #29512 ·



✨ PR Review Safe Output Test - Run 25212030870

💥 [THE END] — Illustrated by Smoke Claude · ● 283.7K ·

Copilot AI and others added 2 commits May 1, 2026 09:52
if-no-files-found: ignore
---

# TruffleHog Secret Detection
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@copilot Wrap in xml comments

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done in 97bd71b — the markdown documentation section is now wrapped in <!-- ... --> XML comments.

Comment thread .github/workflows/shared/trufflehog.md Outdated
@@ -0,0 +1,173 @@
---
safe-outputs:
threat-detection:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@copilot run in separate job, needs detection and report failure to conclusion using some kind of extensible way to generate an agenti failure issue/comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Restructured in 97bd71b. TruffleHog now runs as a dedicated trufflehog_scan job with needs: [agent, detection] (agent is required explicitly to prevent the compiler from auto-adding the job as an agent pre-dependency, which would create a cycle). The extensible failure reporting is via jobs.conclusion.pre-steps: when secrets are found, a GitHub issue titled 🔐 Secrets detected in workflow run: … is created with the affected locations and a link to the trufflehog-scan-results artifact. Other security tools can follow the same pattern (separate job + conclusion pre-step) without any compiler changes.

Copilot AI and others added 2 commits May 1, 2026 10:34
…ocs, conclusion pre-steps

Agent-Logs-Url: https://github.com/github/gh-aw/sessions/43f96f09-1577-4259-a542-a2ee8452ef7c

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

Copilot AI commented May 1, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

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 gh repo view --json owner,name --jq .owner.login &#43; &#34;/&#34; &#43; .name /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/vet tection^{commit}git (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 --ignore-path ../../../.pretti--show-toplevel git rev-�� runs/20260501-103319-7731/test-1101177594 (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 h ../../../.prettierignore --local /usr/local/.ghcup/bin/git credential.helpenode (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, .object.type] | @tsv (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, .object.type] | @tsv s/test.md git /usr/bin/git --local credential.helperev-parse k/_temp/uv-pytho--show-toplevel git conf�� user.name Test User /usr/bin/git json&#39; --ignore-pgit core.hooksPath /home/REDACTED/.ca--show-toplevel git (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, .object.type] | @tsv 053060769/.github/workflows security (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq [.object.sha, .object.type] | @tsv --show-toplevel bash /usr/bin/gh sRemoteWithRealGgit sRemoteWithRealGrev-parse .cfg gh run list --json /usr/bin/git --workflow nonexistent-workrev-parse --limit /usr/bin/git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq [.object.sha, .object.type] | @tsv --show-toplevel git-receive-pack /usr/bin/git image:v1.0.0 git /opt/hostedtoolc--show-toplevel git rev-�� --show-toplevel node /usr/bin/git /home/REDACTED/worgit git /usr/bin/git git (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, .object.type] | @tsv --noprofile (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv mplied --write /home/REDACTED/.dotnet/tools/sh --ignore-path set --log-level=erro--show-toplevel sh -c &#34;prettier&#34; --write &#39;../../../**/*.json&#39; &#39;!../../../pkg/workflow/js/**/*.json&#39; --ignore-path ../.git pkg/workflow/templatables.go /usr/bin/git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv --show-toplevel resolved$ /usr/lib/git-core/git-upload-pack (http block)
  • https://api.github.com/repos/actions/download-artifact/git/ref/tags/v8
    • Triggering command: /usr/bin/gh gh api /repos/actions/download-artifact/git/ref/tags/v8 --jq [.object.sha, .object.type] | @tsv (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/download-artifact/git/ref/tags/v8 --jq [.object.sha, .object.type] | @tsv --show-toplevel git /usr/bin/git --show-toplevel 9-1577-4259-a542-a2ee8452ef7c /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git .github/workflowgit bash /usr/bin/git 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, .object.type] | @tsv --show-toplevel ache/go/1.25.8/x64/pkg/tool/linumyorg /usr/bin/git ithub/workflows/git (http block)
  • https://api.github.com/repos/actions/github-script/git/ref/tags/v9
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v9 --jq [.object.sha, .object.type] | @tsv (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v9 --jq [.object.sha, .object.type] | @tsv -p -c git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v9 --jq [.object.sha, .object.type] | @tsv w/js/**/*.json&#39; --ignore-path g/workflow/activ../../../.prettierignore k/_temp/uv-python-dir/bash pull.rebase (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, .object.type] | @tsv --show-toplevel bash /usr/bin/git &#39;**/*.ts&#39; &#39;**/*.git (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, .object.type] | @tsv /tmp/gh-aw-test-runs/20260501-103319-7731/test-4053060769/.github/workflows rev-parse /usr/bin/git 2403340133/001&#39; 2403340133/001&#39; de git rev-�� --show-toplevel git /usr/bin/infocmp steps\|pre-stepsgit k/gh-aw/gh-aw/pkrev-parse bash infocmp (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv --show-toplevel bash /usr/bin/git dd-source-path-2git /home/REDACTED/worrev-parse de_modules/.bin/--show-toplevel git rev-�� --show-toplevel bash /usr/bin/git --noprofile /home/REDACTED/worrev-parse 86_64/node git (http block)
  • https://api.github.com/repos/actions/setup-node/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv ithub/workflows/agent-performance-analyzer.md (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv &#34;prettier&#34; --write &#39;scripts/**/*.js&#39; --ignore-path .prettierignoremote.origin.url ies:&#39;) for k in schema.get(&#39;properties&#39;, {}).ke /usr/local/bin/sh =receive (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv /tmp/gh-aw-test-runs/20260501-103319-7731/test-source-field-variant-46484928/.github/workflows remote /opt/hostedtoolcache/node/24.14.1/x64/bin/node (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, .object.type] | @tsv git-upload-pack &#39;/tmp/TestParseDefaultBranchFromLsRemoteWithRealGitmaster_branch2403340133/001&#39; l /usr/bin/git thub/workflows --local ache/go/1.25.8/x--show-toplevel git rev-�� --show-toplevel git /usr/bin/gh re --log-level=egit --local cal/bin/bash gh (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, .object.type] | @tsv --show-toplevel bash /usr/bin/git 70/001/test-inligit (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, .object.type] | @tsv --bare --initial-branch=my-default om/testorg/testrepo.git ath ../../../.prgit --local sh git -C /tmp/TestGuardPolicyBlockedUsersApprovalLabelsCompiledOutput1699.github/workflows/test.md remote /usr/bin/git get --local bin/bash git (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, .object.type] | @tsv git-upload-pack &#39;/tmp/TestParseDefaultBranchFromLsRemoteWithRealGitcustom_branch1287886569/001&#39; git-upload-pack &#39;/tmp/TestParseDefaultBranchFromLsRemoteWithRealGitcustom_branch1287886569/001&#39; /usr/bin/git ath ../../../.prgit --local om/github/gh-aw git -C /tmp/TestGuardPolicyBlockedUsersApprovalLabelsCompiledOutput1699956646/001 rev-parse /usr/bin/git get --local ache/uv/0.11.8/x--show-toplevel git (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --limit 100 --created &gt;=2026-04-24 (http block)
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --limit 100 --created &gt;=2026-04-01 (http block)
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --limit 100 --created &gt;=2026-01-31 (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 (http block)
    • Triggering command: /usr/bin/gh gh run download 1 --dir test-logs/run-1 (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 on_test.go /usr/local/sbin/bash (http block)
    • Triggering command: /usr/bin/gh gh run download 12345 --dir test-logs/run-12345 on ache/node/24.14.1/x64/bin/node /../../.prettiergit erignore (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 (http block)
    • Triggering command: /usr/bin/gh gh run download 12346 --dir test-logs/run-12346 on 1/x64/bin/node /../../.prettiergit erignore 64/bin/git 1/x64/bin/node -c npx prettier --write &#39;**/*.cjs&#39; &#39;**/*.ts&#39; &#39;**/*.json&#39; --ignore-path ../../../.pr**/*.json (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 (http block)
    • Triggering command: /usr/bin/gh gh run download 2 --dir test-logs/run-2 conntrack sv m0s -j (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 (http block)
    • Triggering command: /usr/bin/gh gh run download 3 --dir test-logs/run-3 conntrack ache/node/24.14.1/x64/bin/node ./../.prettieriggit -j DROP sh t-12�� bility_SameInputSameOutput3765533370/001/stability-test.md (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 (http block)
    • Triggering command: /usr/bin/gh gh run download 4 --dir test-logs/run-4 owner res.lock.yml m0s -j (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 (http block)
    • Triggering command: /usr/bin/gh gh run download 5 --dir test-logs/run-5 conntrack /snap/bin/sh ./../.prettieriggit -j DROP sh -c &#34;prettier&#34; --write &#39;**/*.cjs&#39; &#39;**/*.ts&#39; &#39;**/*.js-test.timeout=10m0s (http block)
  • https://api.github.com/repos/github/gh-aw/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path h ../../../.prettierignore (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 (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 (http block)
  • https://api.github.com/repos/github/gh-aw/contents/.github/workflows/shared/reporting.md
    • Triggering command: /tmp/go-build2754671691/b404/cli.test /tmp/go-build2754671691/b404/cli.test -test.testlogfile=/tmp/go-build2754671691/b404/testlog.txt -test.paniconexit0 -test.v=true -test.parallel=4 -test.timeout=10m0s -test.run=^Test -test.short=true (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, .object.type] | @tsv --show-toplevel bash /usr/bin/git 3319-7731/test-5git (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, .object.type] | @tsv ty-test.md (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, .object.type] | @tsv --local committer.name rgo/bin/bash (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, .object.type] | @tsv --local committer.name odules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin/sh (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --jq [.object.sha, .object.type] | @tsv y-frontmatter.md committer.name n-dir/bash (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --jq [.object.sha, .object.type] | @tsv --local committer.name 64/bin/bash (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, .object.type] | @tsv --local committer.name /home/REDACTED/work/_temp/uv-python-dir/git (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, .object.type] | @tsv HEAD (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 (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 ache/go/1.25.8/x64/bin/bash credential.helpenode (http block)
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo cal/bin/bash credential.helpenode (http block)
    • Triggering command: /usr/bin/gh gh workflow list --repo owner/repo --json name,path,state /usr/bin/git -template-expresgit --global p/bin/bash git -C /tmp/gh-aw-test-runs/20260501-103319-7731/test-2929274825/.github/workflows rev-parse /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/vet l &amp;&amp; debian-sa1 git --local ache/node/24.14.--show-toplevel /opt/hostedtoolcache/go/1.25.8/x5 (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 --local --get (http block)
  • https://api.github.com/repos/test/repo
    • Triggering command: /usr/bin/gh gh api /repos/test/repo --jq .default_branch /tmp/gh-aw-test-runs/20260501-103319-7731/test-1101177594 show /usr/bin/git (http block)

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

Copilot AI requested a review from pelikhan May 1, 2026 10:36
@pelikhan pelikhan added the smoke label May 1, 2026
@pelikhan pelikhan marked this pull request as ready for review May 1, 2026 10:40
Copilot AI review requested due to automatic review settings May 1, 2026 10:40
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 a reusable TruffleHog-based secret scanning job to the smoke-codex agentic workflow suite, and wires its failure into the conclusion job for issue reporting.

Changes:

  • Introduces a new shared workflow import shared/trufflehog.md that runs TruffleHog scans over workflow artifacts and fails on detections.
  • Updates smoke-codex to import the new shared TruffleHog workflow.
  • Recompiles smoke-codex.lock.yml to include the new trufflehog_scan job and conclusion pre-step reporting.
Show a summary per file
File Description
.github/workflows/shared/trufflehog.md New shared workflow defining trufflehog_scan job + conclusion pre-step for secret detection reporting.
.github/workflows/smoke-codex.md Adds the new shared/trufflehog.md import to enable TruffleHog scanning in smoke-codex.
.github/workflows/smoke-codex.lock.yml Recompiled lock output including the new job and conclusion pre-step integration.

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)

.github/workflows/shared/trufflehog.md:80

  • Same issue as the agent-output scan: non-zero exit codes other than 183 are ignored (and stderr is suppressed), so scan failures can be misreported as clean. Consider failing the job (or surfacing an explicit scan_error output) when TruffleHog returns an error code other than 0/183.
            trufflehog filesystem "$SCAN_DIR" --json --no-update --fail 2>/dev/null | tee "$OUTPUT_FILE" || SCAN_EXIT=${PIPESTATUS[0]}
            SCAN_EXIT=${SCAN_EXIT:-0}

.github/workflows/shared/trufflehog.md:99

  • Same issue as the other scan steps: errors from TruffleHog (exit code other than 0/183) are currently swallowed due to continue-on-error: true and lack of error handling, which can yield false negatives. Treat scan errors as failures (and don’t discard stderr) to ensure secrets scanning is reliable.
            echo "Scanning repo-memory in $SCAN_DIR"
            trufflehog filesystem "$SCAN_DIR" --json --no-update --fail 2>/dev/null | tee "$OUTPUT_FILE" || SCAN_EXIT=${PIPESTATUS[0]}
            SCAN_EXIT=${SCAN_EXIT:-0}
  • Files reviewed: 3/3 changed files
  • Comments generated: 3

Comment on lines +13 to +33
- name: Download agent output artifact
id: download-agent
continue-on-error: true
uses: actions/download-artifact@v8
with:
name: agent
path: /tmp/gh-aw

- name: Download cache-memory artifact
id: download-cache-memory
continue-on-error: true
uses: actions/download-artifact@v8
with:
name: cache-memory
path: /tmp/gh-aw/cache-memory

- name: Download repo-memory artifact
id: download-repo-memory
continue-on-error: true
uses: actions/download-artifact@v8
with:
TRUFFLEHOG_VERSION: "3.88.27"
run: |
echo "Installing TruffleHog v${TRUFFLEHOG_VERSION}..."
curl -sSfL https://raw.githubusercontent.com/trufflesecurity/trufflehog/main/scripts/install.sh | sh -s -- -b /usr/local/bin "v${TRUFFLEHOG_VERSION}"
Comment on lines +48 to +87
continue-on-error: true
run: |
mkdir -p /tmp/gh-aw/trufflehog
SCAN_DIR="/tmp/gh-aw"
OUTPUT_FILE="/tmp/gh-aw/trufflehog/agent-output-results.jsonl"
if [ -d "$SCAN_DIR" ] && find "$SCAN_DIR" -mindepth 1 -maxdepth 1 -quit 2>/dev/null | grep -q .; then
echo "Scanning agent output in $SCAN_DIR"
trufflehog filesystem "$SCAN_DIR" \
--json --no-update --fail \
--exclude-paths /tmp/gh-aw/cache-memory \
--exclude-paths /tmp/gh-aw/repo-memory \
--exclude-paths /tmp/gh-aw/trufflehog \
2>/dev/null | tee "$OUTPUT_FILE" || SCAN_EXIT=${PIPESTATUS[0]}
SCAN_EXIT=${SCAN_EXIT:-0}
else
echo "Agent output directory is empty or missing, skipping"
SCAN_EXIT=0
fi
if [ "$SCAN_EXIT" -eq 183 ]; then
echo "secrets_found=true" >> "$GITHUB_OUTPUT"
fi

- name: Scan cache-memory for secrets
id: scan-cache-memory
continue-on-error: true
run: |
mkdir -p /tmp/gh-aw/trufflehog
SCAN_DIR="/tmp/gh-aw/cache-memory"
OUTPUT_FILE="/tmp/gh-aw/trufflehog/cache-memory-results.jsonl"
if [ -d "$SCAN_DIR" ] && find "$SCAN_DIR" -mindepth 1 -maxdepth 1 -quit 2>/dev/null | grep -q .; then
echo "Scanning cache-memory in $SCAN_DIR"
trufflehog filesystem "$SCAN_DIR" --json --no-update --fail 2>/dev/null | tee "$OUTPUT_FILE" || SCAN_EXIT=${PIPESTATUS[0]}
SCAN_EXIT=${SCAN_EXIT:-0}
else
echo "cache-memory directory is empty or missing, skipping"
SCAN_EXIT=0
fi
if [ "$SCAN_EXIT" -eq 183 ]; then
echo "secrets_found=true" >> "$GITHUB_OUTPUT"
fi
@pelikhan
Copy link
Copy Markdown
Collaborator

pelikhan commented May 1, 2026

@copilot merge main and recompile

Copilot AI and others added 2 commits May 1, 2026 10:57
…g-secret-detection

# Conflicts:
#	.github/workflows/smoke-codex.lock.yml

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/bba9fa15-76e4-4647-8ecc-eea1a79bc66d

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

Copilot AI commented May 1, 2026

@copilot merge main and recompile

Done in b493ca6 — merged origin/main, rebuilt the binary, and recompiled all 205 workflow lock files successfully.

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 -embedcfg /tmp/go-build2897698000/b063/embedcfg -pack (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, .object.type] | @tsv (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv .Core.RunCommandLinux-1.0.9/bin/../config (http block)
  • https://api.github.com/repos/actions/download-artifact/git/ref/tags/v8
    • Triggering command: /usr/bin/gh gh api /repos/actions/download-artifact/git/ref/tags/v8 --jq [.object.sha, .object.type] | @tsv (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/download-artifact/git/ref/tags/v8 --jq [.object.sha, .object.type] | @tsv cli/install.sh...&#34; (http block)
  • https://api.github.com/repos/actions/setup-node/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv (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, .object.type] | @tsv (http block)
  • https://api.github.com/repos/github/gh-aw
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw --jq .default_branch (http block)

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

@pelikhan pelikhan added smoke and removed smoke labels May 1, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 1, 2026

⚠️ Smoke Crush failed. Crush encountered unexpected challenges...

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 1, 2026

⚠️ Smoke Gemini failed. Gemini encountered unexpected challenges...

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 1, 2026

📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing...

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 1, 2026

🚀 Smoke OpenCode MISSION COMPLETE! OpenCode delivered. 🔥

@github-actions github-actions Bot removed the smoke label May 1, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 1, 2026

✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 1, 2026

🎬 THE ENDSmoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 1, 2026

Agent Container Tool Check

Tool Status Version
bash 5.2.21
sh available
git 2.53.0
jq 1.7
yq 4.52.5
curl 8.5.0
gh 2.89.0
node 22.22.2
python3 3.10.16 (PyPy 7.3.19)
go 1.24.13
java 10.0.201
dotnet 10.0.201

Result: 12/12 tools available ✅

Overall Status: PASS

🔧 Tool validation by Agent Container Smoke Test · ● 167.1K ·

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 1, 2026

Codex smoke: FAIL
PRs: #29518 [docs] Update glossary - daily scan; #29516 docs: add refusal-labels to integrity filtering and MCP gateway spec (v1.14.0)
✅ GitHub/Serena/Playwright/File/Bash/Build/Comment Memory/Cache Memory
❌ Web Fetch: MCP tool unavailable
Run: https://github.com/github/gh-aw/actions/runs/25212030877

Warning

Firewall blocked 2 domains

The following domains were blocked by the firewall during workflow execution:

  • ab.chatgpt.com
  • chatgpt.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "ab.chatgpt.com"
    - "chatgpt.com"

See Network Configuration for more information.

🔮 The oracle has spoken through Smoke Codex ·

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 1, 2026

Comment Memory

Quiet checks complete
Caches hold the timestamp
Smoke fades into green

Note

This comment is managed by comment memory.

It stores persistent context for this thread in the code block at the top of this comment.
Edit only the text inside the backtick fences; workflow metadata and the footer are regenerated automatically.

Learn more about comment memory

Warning

Firewall blocked 2 domains

The following domains were blocked by the firewall during workflow execution:

  • ab.chatgpt.com
  • chatgpt.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "ab.chatgpt.com"
    - "chatgpt.com"

See Network Configuration for more information.

🔮 The oracle has spoken through Smoke Codex ·

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 1, 2026

Commit pushed: dc1d9bb

Generated by Changeset Generator

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 1, 2026

👻 The smoke test agent was here! Passing through like a friendly ghost in the machine. All systems nominal, all tests run, nothing to see here... except maybe some ✅ vibes! 🤖💨

📰 BREAKING: Report filed by Smoke Copilot · ● 1.3M ·

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 1, 2026

🎉 Smoke test complete! The Copilot agent swooped in, ran all the tests, found 8 Config symbols in your Go codebase, built the binary successfully, and is now moonwalking out the door. See you next run! 🕺🤖

📰 BREAKING: Report filed by Smoke Copilot · ● 1.3M ·

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

Reviewed PR #29512: Add TruffleHog shared agentic workflow. The implementation looks solid - clean separation as a shared workflow, proper artifact downloading, and good use of continue-on-error for resilience. Left 2 inline comments on minor improvement opportunities.

📰 BREAKING: Report filed by Smoke Copilot · ● 1.3M

runs-on: ubuntu-latest
needs: [agent, detection]
if: always() && needs.agent.result != 'skipped' && needs.detection.result != 'skipped'
permissions:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The if: always() condition is good, but consider also checking needs.agent.outputs.artifact_uploaded == true to avoid wasted scans when no artifact was produced.

- shared/gh.md
- shared/reporting-otlp.md
- shared/mcp/serena-go.md
- shared/trufflehog.md
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Adding shared/trufflehog.md as an import is clean. Make sure any required secrets (e.g., GITHUB_TOKEN) are documented in the workflow's secrets section.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 1, 2026

📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 1, 2026

💥 Smoke Test Results — Run 25212030870

Status: PARTIAL (15✅ 2❌ 2⚠️)

Core (#1–12): ✅✅ 1,3,4,5,6,7,8,10,11,12 | ❌ 2,9 (mcpscripts server error)

PR Review (#13–19):13,14,15,17,18 | ⚠️ 16 (no thread IDs) | ⚠️ 19 (no test PR)

Failures: mcpscripts tool.handler is not a function for gh + github_discussion_query tools.

💥 [THE END] — Illustrated by Smoke Claude · ● 283.7K ·

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

💥 Automated smoke test review - all systems nominal! (Run 25212030870)

💥 [THE END] — Illustrated by Smoke Claude · ● 283.7K

jobs:
trufflehog_scan:
runs-on: ubuntu-latest
needs: [agent, detection]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔬 Smoke Test Review Comment — The needs: [agent, detection] dependency ensures TruffleHog runs only after the agent has produced its output artifacts. This is a sound pattern for security scanning jobs. Consider also adding update_cache_memory to needs if cache artifacts need scanning, or document why they're excluded.

if: always() && needs.trufflehog_scan.result == 'failure' && needs.trufflehog_scan.outputs.secrets_found == 'true'
continue-on-error: true
uses: actions/github-script@v9
env:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔬 Smoke Test Review Comment — The if: always() guard on the Upload step ensures scan results are preserved even when the evaluate step exits with code 1. This is excellent practice for post-failure forensics. The if-no-files-found: ignore option also prevents false failures when scanned directories were empty.

@pelikhan pelikhan merged commit a487395 into main May 1, 2026
1 check passed
@pelikhan pelikhan deleted the copilot/add-trufflehog-secret-detection branch May 1, 2026 11:23
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.

3 participants