Skip to content

Allow secrets in step-level env: bindings under strict mode#25747

Closed
Copilot wants to merge 7 commits intomainfrom
copilot/fix-strict-mode-secrets-issue
Closed

Allow secrets in step-level env: bindings under strict mode#25747
Copilot wants to merge 7 commits intomainfrom
copilot/fix-strict-mode-secrets-issue

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 11, 2026

Strict mode blocks all secrets.* in user-defined steps, but step-level env: bindings are controlled, masked surfaces — functionally equivalent to what the framework's own generated jobs do. This forces workflows needing tool credentials (API tokens, OAuth keys) to disable strict mode entirely via strict: false, losing all other protections.

The validation now classifies secrets by location within each step:

  • env: bindings → allowed (masked by Actions, scoped to step)
  • run:, with:, other fields → still blocked (inline interpolation, potential leak)

Changes

  • classifyStepSecrets() — new helper that partitions a step's secret refs into unsafeRefs (non-env fields) and envRefs (env bindings)
  • validateStepsSectionSecrets() — now only errors on unsafeRefs in strict mode; env-only secrets pass through
  • Error message updated to suggest env: bindings as an alternative

Example

This now compiles under strict mode:

steps:
  - name: Export secrets as env vars
    env:
      SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
      CORONA_TOKEN: ${{ secrets.CORONA_TOKEN }}
    run: |
      echo "SONAR_TOKEN=${SONAR_TOKEN}" >> "$GITHUB_ENV"

While this is still blocked:

steps:
  - name: Inline secret usage
    run: curl -H 'Authorization: ${{ secrets.API_TOKEN }}' https://example.com

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 -trimpath /tmp/go-build218--show-toplevel git rev-�� --show-toplevel /tmp/go-build218962774/b406/constants.test /usr/bin/git -test.paniconexigit -test.v=true /usr/bin/gh 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 git /usr/bin/git go env -json GO111MODULE modules/@npmcli/run-script/lib/node-gyp-bin/node GOINSECURE GOMOD GOMODCACHE go (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 git /usr/bin/git go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (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 -c=4 -nolocalimports -importcfg /tmp/go-build218962774/b411/importcfg -pack /home/REDACTED/work/gh-aw/gh-aw/pkg/fileutil/fileutil.go LtLQmmiTOziM env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /orgs/test-owner/actions/secrets --jq .secrets[].name ithub/workflows GO111MODULE ache/go/1.25.8/x64/bin/sh GOINSECURE GOMOD GOMODCACHE go env ock.yml GO111MODULE r: $owner, name: $name) { hasDiscussionsEnabled } } GOINSECURE GOMOD ed } } go (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 --show-toplevel 64/pkg/tool/linutest@example.com /usr/bin/infocmp -obugO3Wj om/segmentio/asmapi ache/go/1.25.8/x/repos/github/gh-aw-actions/git/ref/tags/v0.1.2 infocmp -1 xterm-color ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile /usr/bin/git 3982010/b159/_pknode om/segmentio/enc/opt/hostedtoolcache/node/24.14.1/x64/bin/npm cfg git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha --show-toplevel git /usr/bin/git mpiledOutput3762git rev-parse 64/pkg/tool/linu--show-toplevel git rev-�� --show-toplevel 64/pkg/tool/linux_amd64/vet /usr/bin/git pload-artifact/gnode rev-parse 64/pkg/tool/linuinstall 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 /v1.0.0 (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha GOMODCACHE go om/myorg/repo.git ck '**/*.cjs' '*git GO111MODULE k/_temp/uv-pytho--show-toplevel git init�� GOMODCACHE go /usr/bin/git -json GO111MODULE /opt/hostedtoolc--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 3982010/b154/_pkg_.a om/google/jsonschema-go@v0.4.2/jsonschema/annotations.go cfg GOINSECURE ntio/asm/internaremote GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile env 3982010/b143/_pkg_.a GO111MODULE ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet GOINSECURE ntio/encoding/jsrev-parse GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linutest@example.com (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha --show-toplevel ache/go/1.25.8/x^remote\..*\.gh-resolved$ /usr/bin/git -json bR-V/1lTwEKDRhnW-c ache/go/1.25.8/xexport GOROOT="/tmp/TestGetNpmBinPathSetup_GorootOrdering1003089226/001/go/1.25.0/x64"; export PATH="$(find "/tmp/TestGetNpmBinPathSetup_GorootOrdering1003089226/001" -maxdepth 4 -type d -name bin 2>/dev/null | tr '\n' ':')$PATH"; [ -n "$GO ROOT" ] && expo rev-�� --show-toplevel ache/go/1.25.8/x64/pkg/include /usr/bin/git 3982010/b037/impgit GO111MODULE e/git-receive-pa--show-toplevel git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha --show-toplevel git /usr/bin/git --show-toplevel go /opt/hostedtoolc--show-toplevel git rev-�� --show-toplevel node /usr/bin/git /tmp/TestHashStagit x_amd64/compile /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 GOMODCACHE 64/pkg/tool/linux_amd64/compile /bin/sh g_.a GO111MODULE 64/pkg/tool/linu--show-toplevel /bin/sh -c f() { test "$1" = get && echo "******"; }; f get f() { test "$1" = get && echo "******"; }; f get /usr/bin/git mpiledOutput2074git 1y3cTijPK At,event,headBra--show-toplevel git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha --show-toplevel 64/pkg/tool/linuremote /usr/bin/git ty-test.md GO111MODULE 64/pkg/tool/linu--show-toplevel git rev-�� --show-toplevel 64/pkg/tool/linuremote.origin.url /usr/bin/git mpiledOutput2049git dtNyzpRaw At,event,headBra--show-toplevel git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha --show-toplevel 1/x64/bin/node /usr/bin/infocmp mrfP/Z8h6TsDdn-6git go /usr/bin/git infocmp -1 xterm-color 962774/b443/importcfg /usr/bin/git k/gh-aw/gh-aw/pkgit k/gh-aw/gh-aw/pkrev-parse /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 --show-toplevel /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linurev-parse /usr/bin/git archie.md faultBranchFromLrev-parse 64/pkg/tool/linu--show-toplevel git rev-�� --show-toplevel 64/pkg/tool/linux_amd64/vet /usr/bin/git /tmp/go-build142git cfg /opt/hostedtoolc--show-toplevel git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha --show-toplevel git /usr/bin/git /ref/tags/v9 config /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git /actions/secretsgit config /usr/bin/infocmp--show-toplevel 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 go1.25.8 -c=4 -nolocalimports -importcfg /tmp/go-build1423982010/b253/importcfg -pack /home/REDACTED/work/gh-aw/gh-aw/pkg/semverutil/semverutil.go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v9 --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env sm-opt -Oz (size optimization)..."; \ BEFORE=$(wc -c < gh-aw.wasm); \ wasm-opt -Oz --enable-bugit GO111MODULE x_amd64/asm GOINSECURE GOMOD GOMODCACHE x_amd64/asm (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v9 --jq .object.sha (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 --show-toplevel 64/pkg/tool/linux_amd64/asm /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/link -json GO111MODULE 64/pkg/tool/linu--show-toplevel /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/link -o /tmp/go-build218962774/b452/workflow.test -importcfg /usr/bin/git -s -w -buildmode=exe git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq .object.sha --show-toplevel git /usr/bin/git plorer.md config me: String!) { --show-toplevel git rev-�� --show-toplevel infocmp /usr/bin/infocmp 4190604476/.githgit go me: String!) { --show-toplevel infocmp (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 --show-toplevel pd/XJ3yBE12j21iuxq3TT-m/ckFlJ1_Qconfig /usr/lib/git-core/git g_.a GO111MODULE 64/pkg/tool/linu--show-toplevel /usr/lib/git-core/git remo�� origin REDACTED /usr/bin/git g_.a xCmVfTE68 64/pkg/tool/linu--show-toplevel git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq .object.sha --git-dir infocmp /usr/bin/git LsRemoteWithRealgit LsRemoteWithRealrev-parse /usr/bin/git git rev-�� --show-toplevel git /usr/bin/infocmp 4190604476/.githgit go (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 . l /usr/bin/git --ignore-path node 64/bin/go git -C /tmp/TestGuardPolicyMinIntegrityOnlyCompiledOutput2044008935/001 config clusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle remote.origin.urgit GO111MODULE 64/bin/go git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v4 --jq .object.sha --show-toplevel go /usr/bin/git -json GO111MODULE $name) { has--show-toplevel git -C /tmp/gh-aw-test-runs/20260411-034709-49738/test-463697477/.github/workflows config /usr/bin/git remote.origin.urgit 3077861552/001' me: String!) { --show-toplevel git (http block)
  • https://api.github.com/repos/actions/upload-artifact/git/ref/tags/v7
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v7 --jq .object.sha 3982010/b256/_pkg_.a REzZ/UVSmm-gThuyfG0BeREzZ 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet -o api-consumption-report.md KCNC/8pxJci1-OLrDK7hiKCNC 962774/b418=> -p internal/chacha8rev-parse -lang=go1.25 /opt/hostedtoolcache/go/1.25.8/xrepos/{owner}/{repo}/actions/runs/12346/artifacts (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v7 --jq .object.sha ithub/workflows PhBz/zFhWbVgzMlk1T9iaPhBz e/git GOINSECURE GOMOD GOMODCACHE e/git -o mplied -trimpath trepo.git -p set -lang=go1.25 /opt/hostedtoolcache/go/1.25.8/x1 (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v7 --jq .object.sha 3982010/b115/importcfg 1tRE/zlLpwqk7lm3kTMme1tRE /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/compile ."; \ BEFORE=$(git GOWORK 64/bin/go /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/compile -o 3982010/b251/importcfg -trimpath (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 -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env re GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --jq .object.sha ath ../../../.pr**/*.json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env re GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/docker/build-push-action/git/ref/tags/v7
    • Triggering command: /usr/bin/gh gh api /repos/docker/build-push-action/git/ref/tags/v7 --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 1/x64/bin/node GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/docker/build-push-action/git/ref/tags/v7 --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE h GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/docker/metadata-action/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/docker/metadata-action/git/ref/tags/v6 --jq .object.sha -json GO111MODULE oFiles,IgnoredOtherFiles,CFiles,CgoFiles,CXXFiles,MFiles,HFiles,FFiles,SFiles,SwigFiles,SwigCXXFxterm-color GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE ache/go/1.25.8/x-f GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/docker/metadata-action/git/ref/tags/v6 --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE tions/setup/js/node_modules/.bin/sh GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/docker/setup-buildx-action/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/docker/setup-buildx-action/git/ref/tags/v4 --jq .object.sha -json GO111MODULE r: $owner, name: $name) { hasDiscussionsEnabled } } GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 86_64/node GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/docker/setup-buildx-action/git/ref/tags/v4 --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE tions/node_modul-f GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/github/gh-aw
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw --jq .visibility -json GO111MODULE tions/setup/js/node_modules/.bin-f GOINSECURE GOMOD GOMODCACHE go 1/x6�� -json GO111MODULE ache/go/1.25.8/x64/bin/go GOINSECURE GOMOD GOMODCACHE go (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 --git-dir 64/pkg/tool/linux_amd64/compile /usr/bin/git g_.a oding@v0.5.4/jsorev-parse 64/pkg/tool/linu--show-toplevel /usr/bin/git remo�� -v 64/pkg/tool/linux_amd64/compile /usr/bin/git y_with_repos=pubgit YGaDW_VvF 64/pkg/tool/linu--show-toplevel git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v0.1.2 --jq .object.sha --show-toplevel infocmp /usr/bin/git xterm-color make /usr/bin/docker git rev-�� --show-toplevel docker /usr/bin/gh 885925528/.githugit :latest /usr/bin/git gh (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 mKXx/M289NJ7fl33W_GzsmKXx (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.0.0 --jq .object.sha --bare --initial-branch=master ache/node/24.14.1/x64/bin/node -json GO111MODULE ache/go/1.25.8/x--show-toplevel ache/node/24.14.1/x64/bin/node 4751�� ts.result rev-parse /usr/bin/git ithub/workflows GO111MODULE k/gh-aw/gh-aw/ac--show-toplevel 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 run --auto e/git sions.md -nolocalimports -importcfg e/git -C /tmp/TestGuardPolicyTrustedUsersCompiledOutput3557964937/001 config /usr/bin/infocmp remote.origin.urgit GO111MODULE 64/bin/go infocmp (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.2.3 --jq .object.sha git-upload-pack '/tmp/TestParseDefaultBranchFromLsRemoteWithRealGitmain_branch2019653335/001' git-upload-pack '/tmp/TestParseDefaultBranchFromLsRemoteWithRealGitmain_branch2019653335/001' /usr/bin/git -json rty ache/go/1.25.8/x--show-toplevel git rev-�� --show-toplevel go /usr/bin/git -json GO111MODULE repository(owne--show-toplevel 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 5.0/deviceauth.go 64/pkg/tool/linux_amd64/compile GOINSECURE 64 GOMODCACHE 64/pkg/tool/linuTest User env 3621218173 GO111MODULE ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE go-sdk/oauthex GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh run download 1 --dir test-logs/run-1 h1Ee82J5b 64/pkg/tool/linux_amd64/cgo GOINSECURE l/format GOMODCACHE 64/pkg/tool/linutest@example.com env t5smDhwOz GO111MODULE ache/go/1.25.8/x64/pkg/tool/linux_amd64/asm GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linu-trimpath (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/1/artifacts --jq .artifacts[].name go /usr/bin/git l GO111MODULE ed } } git -C kflows/prompt-clustering-analysis.lock.yml config /usr/bin/git remote.origin.urgit GO111MODULE 64/bin/go git (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 0/internal/catmsg/catmsg.go 64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD abis 64/pkg/tool/linux_amd64/compile env g_.a J9_2Hh5RJ ache/go/1.25.8/x64/pkg/tool/linu-test.short=true GOINSECURE r GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/asm (http block)
    • Triggering command: /usr/bin/gh gh run download 12345 --dir test-logs/run-12345 4LOc7tzcC 64/pkg/tool/linux_amd64/compile GOINSECURE tants GOMODCACHE 64/pkg/tool/linux_amd64/compile env e-analyzer.md GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/12345/artifacts --jq .artifacts[].name go er: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabl--get -json GO111MODULE 64/bin/go docker imag�� k/gh-aw/gh-aw/.github/workflows ghcr.io/github/serena-mcp-server:latest me: String!) { repository(owner: $owner, name:-nilfunc l GO111MODULE 64/bin/go git (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 GO111MODULE 64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD abis 64/pkg/tool/linux_amd64/compile env g_.a ortcfg 64/pkg/tool/linux_amd64/link GOINSECURE g 64/src/reflect/auser.email 64/pkg/tool/linutest@example.com (http block)
    • Triggering command: /usr/bin/gh gh run download 12346 --dir test-logs/run-12346 0/message/catalog.go 64/pkg/tool/linux_amd64/compile GOINSECURE cha8_stub.o 64/src/internal//home/REDACTED/work/gh-aw/gh-aw/.github/workflows/agentic-observability-kit.md 64/pkg/tool/linux_amd64/compile env g_.a Bzwz7Kv-X ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE chema/v6/kind GOMODCACHE ache/go/1.25.8/xremote.origin.url (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/12346/artifacts --jq .artifacts[].name -f /usr/bin/gh -f owner=github DiscussionsEnabl--show-toplevel /usr/bin/gh api 2828872641 -f ck -f owner=github -f docker (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 rotocol/go-sdk@v1.5.0/oauthex/auth_meta.go 64/pkg/tool/linux_amd64/compile GOINSECURE (http block)
    • Triggering command: /usr/bin/gh gh run download 2 --dir test-logs/run-2 GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE _other.o 64/src/crypto/in--show-toplevel 64/pkg/tool/linux_amd64/vet env -json cfg 64/pkg/tool/linux_amd64/compile GOINSECURE th_wasm.o 64/src/math/big/--show-toplevel 64/pkg/tool/linux_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/2/artifacts --jq .artifacts[].name rev-parse /usr/bin/git ath ../../../.prgit GO111MODULE 64/bin/go git rev-�� 901502626/custom/workflows go er: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabl--get-regexp re GO111MODULE 64/bin/go git (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 rotocol/go-sdk@v1.5.0/mcp/client.go 64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/compile env g_.a GO111MODULE ache/go/1.25.8/x64/pkg/tool/linux_amd64/asm GOINSECURE er GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/asm (http block)
    • Triggering command: /usr/bin/gh gh run download 3 --dir test-logs/run-3 NgK5Xenpy 64/pkg/tool/linu-importcfg GOINSECURE l/errors GOMODCACHE 64/pkg/tool/linuTest User env _.a GO111MODULE ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE setup/js/node_morev-parse GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/3/artifacts --jq .artifacts[].name config 64/bin/go remote.origin.urgit GO111MODULE 64/bin/go git -C k/gh-aw/gh-aw/.github/workflows config /usr/bin/git l GO111MODULE 64/bin/go git (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 rotocol/go-sdk@v1.5.0/auth/auth.go 64/pkg/tool/linux_amd64/compile GOINSECURE ty.o 64/src/internal/--git-dir 64/pkg/tool/linux_amd64/compile env 3621218173 GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE go-sdk/mcp GOMODCACHE 64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh run download 4 --dir test-logs/run-4 GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE er abis 64/pkg/tool/linux_amd64/vet env PefC8rlji ortcfg k GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linu-importcfg (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/4/artifacts --jq .artifacts[].name go (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 GO111MODULE ache/go/1.25.8/x64/bin/go GOINSECURE GOMOD abis r env 3621218173 GO111MODULE ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh run download 5 --dir test-logs/run-5 GO111MODULE ache/go/1.25.8/x-nolocalimports GOINSECURE (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/5/artifacts --jq .artifacts[].name go /usr/bin/gh ath ../../../.prgit GO111MODULE 64/bin/go /usr/bin/gh api 901502626/custom/workflows -f k -f owner=github -f /usr/bin/gh (http block)
  • https://api.github.com/repos/github/gh-aw/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path -m -json 64/bin/go npx prettier --w/opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/compile x_amd64/vet 64/bin/go go env -json go 64/bin/go GOINSECURE GOMOD y.s go (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 GOMODCACHE x_amd64/asm 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 6 GOMOD GOMODCACHE 64/pkg/tool/linuremote1 env g_.a 5-yTJqrnP /opt/hostedtoolcache/go/1.25.8/x64/bin/go GOINSECURE age GOMODCACHE go (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 ache/go/1.25.8/x64/pkg/tool/linux_amd64/link /usr/bin/git agent-persona-exgit k/gh-aw/gh-aw/pkrev-parse e/git-upload-pac--show-toplevel git rev-�� --show-toplevel /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linu-goversion /usr/bin/git /tmp/go-build142git pkg/mod/github.crev-parse 64/pkg/tool/linu--show-toplevel git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v0.47.4 --jq .object.sha --show-toplevel git /usr/bin/git --show-toplevel go cfg git rev-�� --show-toplevel ache/go/1.25.8/x64/pkg/tool/linuremote.origin.url /usr/bin/git graphql -f ache/go/1.25.8/x--show-toplevel 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 til.go o 64/pkg/tool/linux_amd64/compile GOINSECURE go-sdk/internal/rev-parse abis 64/pkg/tool/linux_amd64/compile env 06/001/test-simple-frontmatter.m-p ortcfg ache/go/1.25.8/x64/pkg/tool/linu-lang=go1.25 GOINSECURE til GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linu-goversion (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq .object.sha k/gh-aw/gh-aw/.github/workflows go /usr/bin/infocmp -json GO111MODULE 64/bin/go infocmp -1 k/gh-aw/gh-aw/.github/workflows go /usr/bin/git l GO111MODULE ed } } git (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/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json .go x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.2.3 --jq .object.sha -json GO111MODULE (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/asm GOINSECURE GOMOD GOMODCACHE x_amd64/asm env -json l/format/format.go x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --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/github/gh-aw/git/ref/tags/v2.0.0 --jq .object.sha -json GO111MODULE x_amd64/asm 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/v3.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v3.0.0 --jq .object.sha -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env 193183293/001 193183293/002/work x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v3.0.0 --jq .object.sha -json GO111MODULE repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } GOINSECURE GOMOD GOMODCACHE go env ithub/workflows GO111MODULE (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 -json GO111MODULE $name) { hasDiscussionsEnabled } } GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE ode_modules/.bin/node GOINSECURE GOMOD GOMODCACHE go (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 g_.a QyquJZDcH /opt/hostedtoolcache/go/1.25.8/x64/bin/go GOINSECURE go-sdk/internal/rev-parse GOMODCACHE go env 7DvO3RCYu GO111MODULE ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq .object.sha ithub/workflows iptables /usr/bin/git l security 64/bin/go git rev-�� edOutput1157528882/001 go 64/pkg/tool/linux_amd64/compile ath ../../../.prgit GO111MODULE ed } } 64/pkg/tool/linux_amd64/compile (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 _wasm.o 64/src/runtime/s--show-toplevel 64/pkg/tool/linux_amd64/vet env -json Q8gElMZ6A k GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/asm (http block)
    • Triggering command: /usr/bin/gh gh run view 12345 --repo nonexistent/repo --json status,conclusion re GO111MODULE 64/bin/go git show�� efaultBranchFromLsRemoteWithRealGitbranch_with_hyphen1909269643/001' efaultBranchFromLsRemoteWithRealGitbranch_with_hyphen1909269643/001' /usr/bin/git l GO111MODULE $name) { has--paginate git (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 -nolocalimports -importcfg /tmp/go-build218962774/b415/importcfg -pack /tmp/go-build218962774/b415/_testmain.go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo /opt/hostedtoolcache/go/1.25.8/x64/bin/go GOINSECURE GOMOD GOMODCACHE go env heck '**/*.cjs' '**/*.ts' '**/*.remote.origin.url GO111MODULE me: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/owner/repo/contents/file.md
    • Triggering command: /tmp/go-build218962774/b397/cli.test /tmp/go-build218962774/b397/cli.test -test.testlogfile=/tmp/go-build218962774/b397/testlog.txt -test.paniconexit0 -test.v=true -test.parallel=4 -test.timeout=10m0s -test.run=^Test -test.short=true -nolocalimports -importcfg /tmp/go-build1423982010/b216/importcfg -pack -o /tmp/go-build281-p -trimpath 64/bin/go -p github.com/githu-o -lang=go1.25 go (http block)
    • Triggering command: /tmp/go-build908670536/b397/cli.test /tmp/go-build908670536/b397/cli.test -test.testlogfile=/tmp/go-build908670536/b397/testlog.txt -test.paniconexit0 -test.v=true -test.parallel=4 -test.timeout=10m0s -test.run=^Test -test.short=true GOINSECURE GOMOD GOMODCACHE 1; \ fi env ck.yml GO111MODULE r: $owner, name: $name) { hasDiscussionsEnabled } } GOINSECURE GOMOD GOMODCACHE go (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 /tmp/go-build281-p -trimpath 64/bin/go -p main -lang=go1.25 go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/test-owner/test-repo/actions/secrets --jq .secrets[].name -json GO111MODULE cal/bin/sh GOINSECURE GOMOD GOMODCACHE go env lifier.lock.yml GO111MODULE tnet/tools/sh GOINSECURE GOMOD ode-gyp-bin/sh go (http block)

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

In strict mode, secrets in step-level env: bindings are now allowed
because they are controlled bindings that are automatically masked
by GitHub Actions. Secrets in other step fields (run, with, etc.)
are still treated as errors.

This enables workflows that need to pass tool credentials to CLI
tools via environment variables without requiring strict: false.

Fixes #24831

Agent-Logs-Url: https://github.com/github/gh-aw/sessions/69aadbf2-ba69-4b70-b1d4-3e0ca143bc92

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix strict mode blocking secrets in step env bindings Allow secrets in step-level env: bindings under strict mode Apr 11, 2026
Copilot AI requested a review from pelikhan April 11, 2026 04:00
@pelikhan
Copy link
Copy Markdown
Collaborator

@copilot Add integration tests

Add full compilation integration tests that verify:
- Secrets in step-level env: bindings compile successfully in strict mode
- Multiple secrets across multiple steps in env: compile
- pre-steps and post-steps env secrets compile
- GITHUB_TOKEN mixed with user secrets in env: compiles
- Secrets in run/with fields are still blocked in strict mode
- Mixed env + non-env secrets correctly block on non-env only
- Error message suggests env: bindings as alternative
- Non-strict mode allows all step secrets with warning

Agent-Logs-Url: https://github.com/github/gh-aw/sessions/a0c18b3c-f110-48b2-a4a3-aa1447934a32

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

Copilot AI commented Apr 11, 2026

@copilot Add integration tests

Added integration tests in pkg/workflow/strict_mode_steps_secrets_integration_test.go (commit 47332f0). The tests compile full markdown workflows end-to-end and cover:

  • Secrets in step-level env: bindings compile successfully in strict mode (single, multiple, across steps, pre-steps, post-steps)
  • Secrets in run:/with: fields are still blocked
  • Mixed env: + run: secrets correctly block on run: only
  • Error message suggests env: bindings as alternative
  • Non-strict mode allows all step secrets with warning

@github-actions
Copy link
Copy Markdown
Contributor

Hey @Copilot 👋 — great work on this strict-mode relaxation for env: bindings! The distinction between controlled env: surfaces and unsafe inline interpolation (in run:, with:, etc.) is well-reasoned and the implementation is clean.

This PR looks well-aligned with the project's contribution guidelines and ready for maintainer review. A few quick observations for context:

  • Tests are solid — both the unit tests in strict_mode_steps_validation_test.go (+160 lines) and the new integration test file strict_mode_steps_secrets_integration_test.go (+334 lines) provide excellent coverage of the happy path, the blocked path, and edge cases.
  • classifyStepSecrets() helper is a clean refactor — isolating the classification logic makes the validation easier to reason about and extend.
  • Description is clear and informative — the PR body explains the rationale, summarises the changes, and shows before/after YAML examples.
  • The firewall-block warning in the PR body is an agent runtime artifact and not a functional concern.

The PR is still marked as draft — once you're satisfied with the changes, marking it ready for review will help @pelikhan proceed with the merge.

Overall this looks 🟢 aligned and in great shape!

Generated by Contribution Check · ● 2.7M ·

@pelikhan pelikhan marked this pull request as ready for review April 11, 2026 09:02
Copilot AI review requested due to automatic review settings April 11, 2026 09:02
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

Updates strict-mode secrets validation for custom steps so that secrets referenced only in step-level env: bindings are permitted (while secrets in run:, with:, etc. remain blocked), aligning strict mode with GitHub Actions’ masked env surface.

Changes:

  • Added classifyStepSecrets() to partition secret references into env vs non-env locations per step.
  • Updated validateStepsSectionSecrets() to error only on non-env (“unsafe”) secret references in strict mode, and to suggest env: bindings in the error message.
  • Updated/added unit and integration tests to cover env-only allowance and mixed env+unsafe cases.
Show a summary per file
File Description
pkg/workflow/strict_mode_steps_validation.go Implements env-vs-unsafe secret classification and strict-mode enforcement changes.
pkg/workflow/strict_mode_steps_validation_test.go Updates unit tests for env-only allowance and adds direct tests for classifyStepSecrets.
pkg/workflow/strict_mode_steps_secrets_integration_test.go Adds integration coverage for full compilation with env-only secrets allowed and unsafe secrets blocked.

Copilot's findings

Tip

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

  • Files reviewed: 3/3 changed files
  • Comments generated: 2

Comment on lines +117 to +129
func classifyStepSecrets(step any) (unsafeRefs, envRefs []string) {
stepMap, ok := step.(map[string]any)
if !ok {
// Non-map steps: all secrets are considered unsafe.
return extractSecretsFromStepValue(step), nil
}
for key, val := range stepMap {
refs := extractSecretsFromStepValue(val)
if key == "env" {
envRefs = append(envRefs, refs...)
} else {
unsafeRefs = append(unsafeRefs, refs...)
}
Copy link

Copilot AI Apr 11, 2026

Choose a reason for hiding this comment

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

classifyStepSecrets treats any secrets found under the env key as safe regardless of the env field’s type. This creates a strict-mode bypass for malformed steps like env: "${{ secrets.TOKEN }}" (string/array/etc.), where the secret is not actually a step env binding but would still be allowed.

Consider only classifying secrets as envRefs when env is a mapping type (e.g., map[string]any / map[string]string). If env is not a map, classify its secrets as unsafe (or fail validation earlier). Adding a unit test for the non-map env case would prevent regressions.

Copilot uses AI. Check for mistakes.
expectedUnsafe: []string{"${{ secrets.LEAKED }}"},
expectedEnv: []string{"${{ secrets.SAFE }}"},
},
{
Copy link

Copilot AI Apr 11, 2026

Choose a reason for hiding this comment

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

The new strict-mode allowance for env secrets should include a regression test for malformed env values (e.g., env is a string/slice instead of a map). Without this, a workflow could potentially bypass strict mode by placing a secret expression under an invalid env type that is still classified as safe.

Add a TestClassifyStepSecrets case (and/or TestValidateStepsSecrets) asserting that secrets under non-map env are treated as unsafe and still fail strict mode.

Suggested change
{
{
name: "secret in malformed string env is unsafe",
step: map[string]any{
"name": "Malformed env step",
"env": "${{ secrets.TOKEN }}",
"run": "echo hi",
},
expectedUnsafe: []string{"${{ secrets.TOKEN }}"},
expectedEnv: nil,
},
{
name: "secret in malformed slice env is unsafe",
step: map[string]any{
"name": "Malformed env slice step",
"env": []any{
"${{ secrets.ARRAY_TOKEN }}",
},
"run": "echo hi",
},
expectedUnsafe: []string{"${{ secrets.ARRAY_TOKEN }}"},
expectedEnv: nil,
},
{

Copilot uses AI. Check for mistakes.
@github-actions
Copy link
Copy Markdown
Contributor

🧪 Test Quality Sentinel Report

Test Quality Score: 80/100

Excellent — behavioral contracts well covered

Metric Value
New/modified tests analyzed 6
✅ Design tests (behavioral contracts) 6 (100%)
⚠️ Implementation tests (low value) 0 (0%)
Tests with error/edge cases 4 (67%)
Duplicate test clusters 0
Test inflation detected ⚠️ Yes — strict_mode_steps_validation_test.go (160 lines added) vs strict_mode_steps_validation.go (60 lines added) = 2.67:1 ratio
🚨 Coding-guideline violations None

Test Classification Details

📋 All 6 test functions (click to expand)
Test File Classification Issues Detected
TestStrictModeStepEnvSecretsAllowed strict_mode_steps_secrets_integration_test.go ✅ Design 5 table rows; all happy-path (no negative case in this function — intentionally paired with TestStrictModeStepUnsafeSecretsBlocked)
TestStrictModeStepUnsafeSecretsBlocked strict_mode_steps_secrets_integration_test.go ✅ Design 3 error cases covering run, with, and mixed env+run
TestStrictModeStepEnvSecretsErrorSuggestsEnvBindings strict_mode_steps_secrets_integration_test.go ✅ Design Verifies user-facing error message quality
TestNonStrictModeStepSecretsAllowedWithWarning strict_mode_steps_secrets_integration_test.go ✅ Design ⚠️ Doesn't verify a warning is actually emitted to stderr — only checks no error is returned
TestValidateStepsSecrets (modified) strict_mode_steps_validation_test.go ✅ Design 9 changed/new table rows including both expectError: true and expectError: false cases
TestClassifyStepSecrets (new) strict_mode_steps_validation_test.go ✅ Design 6 table rows covering non-map step, env-only, run-only, mixed, with field, and empty

Flagged Tests — Minor Issues

⚠️ TestNonStrictModeStepSecretsAllowedWithWarning (strict_mode_steps_secrets_integration_test.go:~290)

Issue: The test name promises it verifies "with warning", but the implementation only asserts err == nil. It does not assert that a warning was actually emitted to stderr.

What design invariant does this enforce? That non-strict mode does not reject secrets in step fields — correct and valuable. But the "warning" part of the contract is untested.

Suggested improvement: Capture stderr output (e.g., by redirecting os.Stderr to a buffer before compilation) and assert that the output contains an expected warning string, confirming the warning behavior is actually present.


i️ Test Inflation — not a red flag given context

The strict_mode_steps_validation_test.go has a 2.67:1 test-to-production line ratio. This is expected here: the PR introduces a behavioral distinction that flips several existing test cases and adds new ones for both the "allowed" and "blocked" sides of the new behavior. The inflation is justified.


Language Support

Tests analyzed:

  • 🐹 Go (*_test.go): 6 test functions — 1 integration (//go:build integration), 2 unit (//go:build !integration)
  • 🟨 JavaScript (*.test.cjs, *.test.js): 0 tests

Verdict

Check passed. 0% of new tests are implementation tests (threshold: 30%). All 6 test functions verify behavioral contracts directly. No mock-library violations or missing build tags detected.

The test suite is well-structured: integration tests exercise the full compiler pipeline for both allowed and blocked scenarios, while unit tests pin down the behavior of the new classifyStepSecrets helper. The only minor gap is the missing stderr-assertion in TestNonStrictModeStepSecretsAllowedWithWarning.


📖 Understanding Test Classifications

Design Tests (High Value) verify what the system does:

  • Assert on observable outputs, return values, or state changes
  • Cover error paths and boundary conditions
  • Would catch a behavioral regression if deleted
  • Remain valid even after internal refactoring

Implementation Tests (Low Value) verify how the system does it:

  • Assert on internal function calls (mocking internals)
  • Only test the happy path with typical inputs
  • Break during legitimate refactoring even when behavior is correct
  • Give false assurance: they pass even when the system is wrong

Goal: Shift toward tests that describe the system's behavioral contract — the promises it makes to its users and collaborators.

🧪 Test quality analysis by Test Quality Sentinel · ● 582.8K ·

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.

✅ Test Quality Sentinel: 80/100. Test quality is excellent — 0% of new tests are implementation tests (threshold: 30%). All 6 test functions verify behavioral contracts. No coding-guideline violations detected.

…bindings under strict mode

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

Commit pushed: 0ae124a

🏗️ ADR gate enforced by Design Decision Gate 🏗️

@github-actions
Copy link
Copy Markdown
Contributor

🏗️ Design Decision Gate — ADR Required

This PR makes significant changes to core business logic (554 new lines in pkg/workflow/) but does not have a linked Architecture Decision Record (ADR).

AI has analyzed the PR diff and generated a draft ADR to help you get started:

📄 Draft ADR: docs/adr/0001-allow-secrets-in-step-env-bindings-under-strict-mode.md

The draft captures the key design decision: introducing a per-field classification of secret references (env:-bound vs. unsafe inline interpolation) and permitting the safe class in strict mode while continuing to block the unsafe class.

What to do next

  1. Review the draft ADR committed to your branch — it was generated from the PR diff
  2. Complete any missing sections — verify the alternatives are accurate, add context the AI couldn't infer, and refine the rationale as needed
  3. Commit the finalized ADR to docs/adr/ on your branch
  4. Reference the ADR in this PR body by adding a line such as:

    ADR: ADR-0001: Allow Secrets in Step-Level env: Bindings Under Strict Mode

Once an ADR is linked in the PR body, this gate will re-run and verify the implementation matches the decision.

Why ADRs Matter

"AI made me procrastinate on key design decisions. Because refactoring was cheap, I could always say 'I'll deal with this later.' Deferring decisions corroded my ability to think clearly."

ADRs create a searchable, permanent record of why the codebase looks the way it does. Future contributors (and your future self) will thank you.


📋 Michael Nygard ADR Format Reference

An ADR must contain these four sections to be considered complete:

  • Context — What is the problem? What forces are at play?
  • Decision — What did you decide? Why?
  • Alternatives Considered — What else could have been done?
  • Consequences — What are the trade-offs (positive and negative)?

All ADRs are stored in docs/adr/ as numbered Markdown files (e.g., 0001-allow-secrets-in-step-env-bindings-under-strict-mode.md).

🔒 This PR has been marked as requesting changes. It cannot merge until an ADR is linked in the PR body.

Note

🔒 Integrity filter blocked 1 item

The following item were blocked because they don't meet the GitHub integrity level.

To allow these resources, lower min-integrity in your GitHub frontmatter:

tools:
  github:
    min-integrity: approved  # merged | approved | unapproved | none

🏗️ ADR gate enforced by Design Decision Gate 🏗️ · ● 162.1K ·

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.

This PR requires an Architecture Decision Record (ADR) before it can merge. A draft ADR has been generated and committed to your branch at docs/adr/0001-allow-secrets-in-step-env-bindings-under-strict-mode.md. Please review, complete, and link it in the PR body. See the comment above for instructions.

@pelikhan
Copy link
Copy Markdown
Collaborator

@copilot merge main, review comments, fix conflicts

…de-secrets-issue

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Secrets under non-map env fields (string, slice, etc.) are now classified
as unsafe to prevent strict-mode bypass via malformed YAML like:
  env: "${{ secrets.TOKEN }}"

Added regression tests for both classifyStepSecrets and
validateStepsSecrets covering malformed string and slice env values.

Addresses review feedback from copilot-pull-request-reviewer.

Agent-Logs-Url: https://github.com/github/gh-aw/sessions/7d544dbb-98d3-4ad6-9aae-3d5e269e44d9

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

Copilot AI commented Apr 11, 2026

@copilot merge main, review comments, fix conflicts

Done in f3c652c:

  • Merged main (no conflicts)
  • Fixed classifyStepSecrets to only classify secrets as envRefs when env is a well-formed map[string]any. Malformed env values (string, slice, etc.) are now treated as unsafe to prevent strict-mode bypass.
  • Added regression tests for malformed string and slice env values in both TestClassifyStepSecrets and TestValidateStepsSecrets.

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 -trimpath /opt/hostedtoolc--show-toplevel git rev-�� --show-toplevel /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/vet /usr/bin/git k/gh-aw/gh-aw/.ggit -buildtags /usr/lib/git-cor--show-toplevel 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 64/pkg/tool/linu-c /usr/bin/git git rev-�� &amp;1 git /usr/bin/git --show-toplevel ache/go/1.25.8/x/opt/hostedtoolcache/node/24.14.1/x64/bin/npx /usr/bin/git 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 64/pkg/tool/linu-c /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git --show-toplevel ache/go/1.25.8/x/opt/hostedtoolcache/node/24.14.1/x64/bin/npx /usr/bin/git git (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 /tmp/go-build307-p -trimpath 64/bin/go -p github.com/githu-o -lang=go1.25 go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE y.s (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 --show-toplevel 64/pkg/tool/linux_amd64/link /usr/bin/git /a.out 9xL6IaqNl x_amd64/compile git rev-�� --show-toplevel x_amd64/compile /usr/bin/git g_.a GO111MODULE ache/go/1.25.8/xinstall 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 /v1.0.0 -buildtags /usr/bin/git -errorsas -ifaceassert -nilfunc git conf�� --get remote.origin.url (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 5998707/b154/_pkg_.a om/segmentio/asm@v1.1.3/cpu/cpu.go cfg GOINSECURE ntio/asm/interna-1 GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile env Onlymin-integrity_with_repos=public_559247488/001 GO111MODULE ache/go/1.25.8/x64/pkg/tool/linux_amd64/vet GOINSECURE ntio/asm/keyset GOMODCACHE 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 --show-toplevel ache/go/1.25.8/x12346 (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha --show-toplevel git /usr/bin/git /tmp/gh-aw-test-git remote om/org1/repo1.gi--show-toplevel git rev-�� --show-toplevel git /usr/bin/git GOMODCACHE (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 64/pkg/tool/linuf /usr/lib/git-core/git-remote-https g_.a GO111MODULE 64/pkg/tool/linu--show-toplevel /usr/lib/git-core/git-remote-https orig�� REDACTED 64/pkg/tool/linuorigin /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 /home/REDACTED/work/gh-aw/gh-aw/.github/workflows/approach-validator.md 64/pkg/tool/linuTest User /usr/bin/git g_.a rotocol/go-sdk@vrev-parse 64/pkg/tool/linu--show-toplevel git rev-�� --show-toplevel 64/pkg/tool/linuremote.origin.url /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 _c5WKOia6VGY3/-IOpUI6xgANH-v6KNFAo/mFDodc1Uylrbu^remote\..*\.gh-resolved$ /usr/bin/git sistency_WithImpgit -tests 357240/b440/_pkg--show-toplevel git rev-�� --show-toplevel gh /usr/bin/git l &amp;&amp; debian-sa1 git --jq om/myorg/repo.gi--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 --show-toplevel e/git /usr/bin/git vaScript33589896git -trimpath /opt/hostedtoolc--show-toplevel git rev-�� --show-toplevel /opt/hostedtoolcache/go/1.25.8/xrepos/{owner}/{repo}/actions/runs/3/artifacts /usr/bin/git /tmp/go-build304git pkg/mod/github.crev-parse /opt/hostedtoolc--show-toplevel 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 go1.25.8 -c=4 -nolocalimports -importcfg /tmp/go-build3045998707/b255/importcfg -pack /home/REDACTED/go/pkg/mod/go.yaml.in/yaml/v3@v3.0.4/apic.go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v9 --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go 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/v9 --jq .object.sha 1 GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE g/sig_other.s env -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (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 --show-toplevel 64/pkg/tool/linu-dwarf=false /usr/lib/sysstat/debian-sa1 LsRemoteWithRealgit LsRemoteWithRealrev-parse 64/pkg/tool/linu--show-toplevel debian-sa1 1 1 64/pkg/tool/linuremote.origin.url /usr/bin/git g_.a KmEF_rn9z w.test 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 --show-toplevel 64/pkg/tool/linux_amd64/compile /usr/bin/docker g_.a GO111MODULE 64/pkg/tool/linu--show-toplevel docker pull�� test/concurrent-image:v1.0.0 64/pkg/tool/linuorigin (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 /tmp/go-build274357240/b429/_pkg_.a (http block)
  • https://api.github.com/repos/actions/upload-artifact/git/ref/tags/v7
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v7 --jq .object.sha 2451-32390/test-1781378810 cYAj/2RoSUfAH8dMcuiX4cYAj 1/x64/bin/node GOINSECURE GOMOD GOMODCACHE /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/asm t-ha�� vaScript3358989680/001/test-frontmatter-with-nested-objects.md KCNC/8pxJci1-OLrDK7hiKCNC /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/compile -I /tmp/go-build304rev-parse -I /opt/hostedtoolcache/go/1.25.8/x^remote\..*\.gh-resolved$ (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v7 --jq .object.sha FieldEnforcement1164631692/001 H1pk/4iEaJqVikveop5fLH1pk /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/compile -o 5998707/b186/importcfg -trimpath 357240/b396/vet.cfg -p weak -lang=go1.25 /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linuorigin (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v7 --jq .object.sha _.a -trimpath 64/pkg/tool/linux_amd64/compile 24)&#34; internal/byteordrev-parse -lang=go1.25 64/pkg/tool/linux_amd64/compile 5998�� _.a pkg/mod/github.com/modelcontextprotocol/go-sdk@v1.5.0/jsonrpc/jsonrpc.go 64/pkg/tool/linux_amd64/vet -p regexp/syntax -lang=go1.25 64/pkg/tool/linux_amd64/vet (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 h ../../../.prettierignore git $name) { hasDiscussionsEnabled } } --show-toplevel ache/go/1.25.8/xbuild /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git --show-toplevel ache/go/1.25.8/x-1 /usr/bin/git git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --jq .object.sha x_amd64/compile git /sh --show-toplevel x_amd64/compile /usr/bin/git git rev-�� js/**/*.json&#39; --ignore-path ../../../.prettierignore git /usr/bin/git --show-toplevel x_amd64/vet /usr/bin/infocmp--show-toplevel git (http block)
  • https://api.github.com/repos/docker/build-push-action/git/ref/tags/v7
    • Triggering command: /usr/bin/gh gh api /repos/docker/build-push-action/git/ref/tags/v7 --jq .object.sha ../pkg/workflow/js/**/*.json&#39; --ignore-path ../../../.prettierignore git 64/bin/node --show-toplevel /opt/hostedtoolc-C /usr/bin/git git 1/x6�� --show-toplevel git /usr/bin/git --show-toplevel ache/go/1.25.8/x-C /usr/bin/git git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/docker/build-push-action/git/ref/tags/v7 --jq .object.sha --show-toplevel git tions/node_modules/.bin/sh --show-toplevel cut /usr/bin/git git rev-�� &#39;**/*.ts&#39; &#39;**/*.-f git /usr/bin/git --show-toplevel git /usr/bin/git git (http block)
  • https://api.github.com/repos/docker/metadata-action/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/docker/metadata-action/git/ref/tags/v6 --jq .object.sha ../pkg/workflow/js/**/*.json&#39; --ignore-path ../../../.prettierignore git /usr/bin/git --show-toplevel /opt/hostedtoolcapi /usr/bin/git git 1/x6�� --show-toplevel git h --show-toplevel /bin/sh /usr/bin/git git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/docker/metadata-action/git/ref/tags/v6 --jq .object.sha --show-toplevel git h --show-toplevel /opt/hostedtoolcrev-parse /usr/bin/git git rev-�� &#39;**/*.ts&#39; &#39;**/*.json&#39; --ignore-path ../../../.pr**/*.json git de/node/bin/sh --show-toplevel ache/go/1.25.8/xshow /usr/bin/git gh (http block)
  • https://api.github.com/repos/docker/setup-buildx-action/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/docker/setup-buildx-action/git/ref/tags/v4 --jq .object.sha ../pkg/workflow/js/**/*.json&#39; ---f git r: $owner, name: $name) { hasDiscussionsEnabled } } --show-toplevel /opt/hostedtoolcrev-parse /usr/bin/git git 1/x6�� --show-toplevel git ules/.bin/sh --show-toplevel 357240/b435/stri-C /usr/bin/git git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/docker/setup-buildx-action/git/ref/tags/v4 --jq .object.sha --show-toplevel git tions/setup/js/node_modules/.bin-f --show-toplevel x_amd64/vet /usr/bin/git git rev-�� &#39;**/*.ts&#39; &#39;**/*.json&#39; --ignore-path ../../../.pr**/*.json git n-dir/sh --show-toplevel /tmp/go-build274show /usr/bin/git git (http block)
  • https://api.github.com/repos/github/gh-aw
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw --jq .visibility --show-toplevel git 1/x64/bin/node --show-toplevel git-upload-pack /usr/bin/git git tion�� --show-toplevel git nfig/composer/vendor/bin/bash ref/tags/v0.1.2 git (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 --show-toplevel 64/pkg/tool/linux_amd64/compile /usr/bin/git g_.a @v1.1.3/ascii/asrev-parse 64/pkg/tool/linu--show-toplevel /usr/bin/git remo�� -v 64/pkg/tool/linuremote.origin.url /usr/bin/git g_.a i0dFibft1 64/pkg/tool/linu--show-toplevel 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 for-each-ref --format=%(objectname) 1/x64/bin/node /tmp/go-build307git -trimpath 64/bin/go 1/x64/bin/node rev-�� --show-toplevel go /usr/bin/git -json GO111MODULE 64/bin/go 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 --pack_header=2,3 -q /usr/bin/git go1.25.8 -c=4 -nolocalimports git -C /tmp/TestGuardPolicyTrustedUsersExpressionCompiledOutput2521321649/001 config 357240/b437/vet.cfg remote.origin.urgit GO111MODULE 64/bin/go 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 5.0/internal/doc.go 64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD abis 64/pkg/tool/linux_amd64/compile env 1565446258 QuPWq4ACQ ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linu-trimpath (http block)
    • Triggering command: /usr/bin/gh gh run download 1 --dir test-logs/run-1 h1Ee82J5b 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linuTest User env ortcfg uKJh7UXOD ache/go/1.25.8/x64/pkg/tool/linu-buildmode=exe GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linu-extld=gcc (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 verutil.go 64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/compile env g_.a DfcRFzBGz ache/go/1.25.8/x64/pkg/tool/linux_amd64/asm GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linutest@example.com (http block)
    • Triggering command: /usr/bin/gh gh run download 12345 --dir test-logs/run-12345 0/internal/format/format.go 64/pkg/tool/linux_amd64/compile GOINSECURE cha8_stub.o 64/src/internal/chacha8rand/chacha8_stub.s 64/pkg/tool/linux_amd64/compile env g_.a bBouUBHdz x_amd64/compile GOINSECURE (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 4/apic.go 64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD abis 64/pkg/tool/linux_amd64/compile 64/s�� g_.a GO111MODULE ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linuorigin (http block)
    • Triggering command: /usr/bin/gh gh run download 12346 --dir test-logs/run-12346 0/internal/internal.go 64/pkg/tool/linux_amd64/compile GOINSECURE al_wasm.o 64/src/internal/--show-toplevel 64/pkg/tool/linux_amd64/compile env g_.a GO111MODULE ache/go/1.25.8/x64/pkg/tool/linux_amd64/asm GOINSECURE g 64/src/reflect/a--show-toplevel ache/go/1.25.8/x64/pkg/tool/linux_amd64/asm (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 5.0/deviceauth.g-nolocalimports 64/pkg/tool/linu-importcfg GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linu/home/REDACTED/work/gh-aw/gh-aw/pkg/timeutil/format_test.go env 1565446258 tVIFB3NxN ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE go-sdk/oauthex GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh run download 2 --dir test-logs/run-2 GO111MODULE 64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD abis 64/pkg/tool/linux_amd64/compile env 3296077465/.github/workflows til_test.go x_amd64/link GOINSECURE GOMOD GOMODCACHE x_amd64/link (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 rotocol/go-sdk@v1.5.0/oauthex/auth_meta.go 64/pkg/tool/linux_amd64/compile GOINSECURE tants GOMODCACHE 64/pkg/tool/linuTest User env g_.a GO111MODULE ache/go/1.25.8/x64/pkg/tool/linu-nilfunc GOINSECURE go-sdk/auth GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linu-trimpath (http block)
    • Triggering command: /usr/bin/gh gh run download 3 --dir test-logs/run-3 4GDF0MOYT 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE ylQP4Z8/vCNYLdc7D8RXanEmFBss env IIAr-WTp5 GO111MODULE ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile (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 rotocol/go-sdk@v-c=4 64/pkg/tool/linu-nolocalimports GOINSECURE ty.o 64/src/internal/user.email 64/pkg/tool/linutest@example.com env 1565446258 NG8R67gve ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE go-sdk/mcp GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linu-importcfg (http block)
    • Triggering command: /usr/bin/gh gh run download 4 --dir test-logs/run-4 NgK5Xenpy 64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/compile env _.a GO111MODULE k GOINSECURE setup/js/node_morev-parse GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile (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 rotocol/go-sdk@v1.5.0/mcp/client.go 64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/compile env 1565446258 GO111MODULE ache/go/1.25.8/x64/pkg/tool/linu-test.short=true GOINSECURE er GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/asm (http block)
    • Triggering command: /usr/bin/gh gh run download 5 --dir test-logs/run-5 GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD abis 64/pkg/tool/linutest@example.com env -json cfg 64/pkg/tool/linux_amd64/compile GOINSECURE th_wasm.o 64/src/math/big/--show-toplevel 64/pkg/tool/linux_amd64/compile (http block)
  • https://api.github.com/repos/github/gh-aw/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path /tmp/go-build307-I -trimpath 64/bin/go -p main -lang=go1.25 go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (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 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 6 GOMOD GOMODCACHE 64/pkg/tool/linumyorg env g_.a yVIFwLdjv til.test GOINSECURE /bidi GOMODCACHE til.test (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 ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile /usr/bin/git 2451-32390/test-git GO111MODULE ngutil.test git rev-�� --show-toplevel ngutil.test /usr/bin/git p04a/EbsXVlIN5vBgit pkg/mod/golang.orev-parse /opt/hostedtoolc--show-toplevel 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 b/workflows JtV1iahb4 /opt/hostedtoolcache/go/1.25.8/x-nilfunc GOINSECURE GOMOD GOMODCACHE go env ortcfg yi2fVdpoL x_amd64/link GOINSECURE GOMOD GOMODCACHE x_amd64/link (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/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile _bra�� -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (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/asm GOINSECURE GOMOD GOMODCACHE x_amd64/asm env -json oken.go x_amd64/asm GOINSECURE GOMOD GOMODCACHE x_amd64/asm (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --jq .object.sha -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json .go x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --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)
  • 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 -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env 247082206/001 247082206/002/work x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile (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 --show-toplevel git $name) { hasDiscussionsEnabled } } --show-toplevel ache/go/1.25.8/x-C /usr/bin/git git rev-�� on&#39; --ignore-path ../../../.prettierignore git /usr/bin/git --show-toplevel /opt/hostedtoolcshow /usr/bin/git 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 g_.a JytyNgNV_ 64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/compile stlo�� _.a gmGb0FnMM ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/compile (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 _js_wasm.o 64/src/runtime/r--show-toplevel 64/pkg/tool/linux_amd64/vet env -json Q8gElMZ6A ache/go/1.25.8/x64/pkg/tool/linux_amd64/asm GOINSECURE GOMOD GOMODCACHE ache/go/1.25.8/x64/pkg/tool/linux_amd64/asm (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 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/owner/repo/contents/file.md
    • Triggering command: /tmp/go-build274357240/b397/cli.test /tmp/go-build274357240/b397/cli.test -test.testlogfile=/tmp/go-build274357240/b397/testlog.txt -test.paniconexit0 -test.v=true -test.parallel=4 -test.timeout=10m0s -test.run=^Test -test.short=true -nolocalimports -importcfg /tmp/go-build3045998707/b212/importcfg -pack -o /tmp/go-build307-p -trimpath 64/bin/go -p github.com/githu-o -lang=go1.25 go (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 /tmp/go-build307-I -trimpath 64/bin/go -p main -lang=go1.25 go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD tomic_wasm.s go (http block)

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

@pelikhan
Copy link
Copy Markdown
Collaborator

@copilot merge main and recompile

…de-secrets-issue

# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.

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

Copilot AI commented Apr 11, 2026

@copilot merge main and recompile

Merged main (no conflicts) and recompiled all 187 workflows successfully in 3a9e024. No lock file changes were needed.

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)
  • https://api.github.com/repos/actions/upload-artifact/git/ref/tags/v7
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v7 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v7 --jq .object.sha issue^{commit} (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/docker/build-push-action/git/ref/tags/v7
    • Triggering command: /usr/bin/gh gh api /repos/docker/build-push-action/git/ref/tags/v7 --jq .object.sha (http block)
  • https://api.github.com/repos/docker/metadata-action/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/docker/metadata-action/git/ref/tags/v6 --jq .object.sha (http block)
  • https://api.github.com/repos/docker/setup-buildx-action/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/docker/setup-buildx-action/git/ref/tags/v4 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/docker/setup-buildx-action/git/ref/tags/v4 --jq .object.sha 07a9d4d84ff7a3b (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:

Copilot AI added a commit that referenced this pull request Apr 11, 2026
Strict mode blocks all secrets.* in user-defined steps, but step-level
env: bindings are controlled, masked surfaces — functionally equivalent
to what the framework's own generated jobs do.

The validation now classifies secrets by location within each step:
- env: bindings → allowed (masked by Actions, scoped to step)
- run:, with:, other fields → still blocked (inline interpolation)

Add classifyStepSecrets() helper, update validateStepsSectionSecrets(),
improve error message to suggest env: bindings as alternative.

Refs: #25747

Agent-Logs-Url: https://github.com/github/gh-aw/sessions/cbccafb7-fb26-495b-85dc-786315599518

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
@pelikhan pelikhan closed this Apr 11, 2026
@github-actions github-actions Bot deleted the copilot/fix-strict-mode-secrets-issue branch April 19, 2026 02:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Strict mode blocks secrets.* in step env: bindings — no secure path for workflows that need external secret managers

3 participants