From d5d4b05545810a0261ff6d9d8a4e40a51d8d7ddb Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 28 Oct 2025 07:24:14 +0000 Subject: [PATCH 1/4] Initial plan From f5ff3188782307b97d23b96a999a22dc8c2537b4 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 28 Oct 2025 07:35:39 +0000 Subject: [PATCH 2/4] Replace persist-credentials with git remote set-url authentication - Changed buildCheckoutRepository to use persist-credentials: false - Updated generateGitConfigurationSteps to add git remote set-url command - Updated all tests to expect persist-credentials: false - All unit tests passing Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- .github/workflows/artifacts-summary.lock.yml | 4 ++++ .github/workflows/audit-workflows.lock.yml | 4 ++++ .github/workflows/blog-auditor.lock.yml | 4 ++++ .github/workflows/brave.lock.yml | 4 ++++ .../changeset-generator.firewall.lock.yml | 10 +++++++- .github/workflows/ci-doctor.lock.yml | 4 ++++ .../workflows/cli-version-checker.lock.yml | 4 ++++ .../commit-changes-analyzer.lock.yml | 4 ++++ .../workflows/copilot-agent-analysis.lock.yml | 4 ++++ .github/workflows/daily-doc-updater.lock.yml | 10 +++++++- .../workflows/daily-firewall-report.lock.yml | 4 ++++ .github/workflows/daily-news.lock.yml | 4 ++++ .../workflows/daily-perf-improver.lock.yml | 10 +++++++- .../workflows/daily-repo-chronicle.lock.yml | 4 ++++ .../workflows/daily-test-improver.lock.yml | 10 +++++++- .github/workflows/dev-hawk.lock.yml | 4 ++++ .github/workflows/dev.firewall.lock.yml | 4 ++++ .github/workflows/dev.lock.yml | 10 +++++++- .github/workflows/dictation-prompt.lock.yml | 10 +++++++- .../duplicate-code-detector.lock.yml | 4 ++++ .../example-workflow-analyzer.lock.yml | 4 ++++ .github/workflows/firewall.lock.yml | 4 ++++ .../github-mcp-tools-report.lock.yml | 10 +++++++- .github/workflows/go-logger.lock.yml | 10 +++++++- .../workflows/go-pattern-detector.lock.yml | 4 ++++ .../workflows/instructions-janitor.lock.yml | 10 +++++++- .github/workflows/issue-classifier.lock.yml | 4 ++++ .github/workflows/lockfile-stats.lock.yml | 4 ++++ .github/workflows/mcp-inspector.lock.yml | 4 ++++ .github/workflows/mergefest.lock.yml | 10 +++++++- .../workflows/notion-issue-summary.lock.yml | 4 ++++ .github/workflows/pdf-summary.lock.yml | 4 ++++ .github/workflows/plan.lock.yml | 4 ++++ .github/workflows/poem-bot.lock.yml | 22 ++++++++++++++--- .github/workflows/q.lock.yml | 10 +++++++- .github/workflows/repo-tree-map.lock.yml | 4 ++++ .github/workflows/research.lock.yml | 4 ++++ .github/workflows/safe-output-health.lock.yml | 4 ++++ .../schema-consistency-checker.lock.yml | 4 ++++ .github/workflows/scout.lock.yml | 4 ++++ .github/workflows/security-fix-pr.lock.yml | 10 +++++++- .../semantic-function-refactor.lock.yml | 4 ++++ .github/workflows/smoke-claude.lock.yml | 4 ++++ .github/workflows/smoke-codex.lock.yml | 4 ++++ .../workflows/smoke-copilot.firewall.lock.yml | 4 ++++ .github/workflows/smoke-copilot.lock.yml | 4 ++++ .github/workflows/smoke-detector.lock.yml | 4 ++++ .github/workflows/smoke-opencode.lock.yml | 4 ++++ .../workflows/technical-doc-writer.lock.yml | 16 +++++++++++-- .github/workflows/test-jqschema.lock.yml | 4 ++++ .github/workflows/test-post-steps.lock.yml | 4 ++++ .github/workflows/test-svelte.lock.yml | 4 ++++ .github/workflows/tidy.lock.yml | 16 +++++++++++-- .github/workflows/unbloat-docs.lock.yml | 16 +++++++++++-- .github/workflows/video-analyzer.lock.yml | 4 ++++ .../workflows/weekly-issue-summary.lock.yml | 4 ++++ .../checkout_persist_credentials_test.go | 24 ++++++------------- pkg/workflow/git_config_test.go | 8 ++++--- pkg/workflow/push_to_pull_request_branch.go | 2 +- pkg/workflow/yaml_generation.go | 4 ++++ 60 files changed, 346 insertions(+), 42 deletions(-) diff --git a/.github/workflows/artifacts-summary.lock.yml b/.github/workflows/artifacts-summary.lock.yml index 9dd72c52146..42952ad0860 100644 --- a/.github/workflows/artifacts-summary.lock.yml +++ b/.github/workflows/artifacts-summary.lock.yml @@ -85,6 +85,10 @@ jobs: run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Checkout PR branch if: | diff --git a/.github/workflows/audit-workflows.lock.yml b/.github/workflows/audit-workflows.lock.yml index dadea57e7fd..48bbdda815e 100644 --- a/.github/workflows/audit-workflows.lock.yml +++ b/.github/workflows/audit-workflows.lock.yml @@ -127,6 +127,10 @@ jobs: run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Checkout PR branch if: | diff --git a/.github/workflows/blog-auditor.lock.yml b/.github/workflows/blog-auditor.lock.yml index 4c5b1338402..5c25ce9c89e 100644 --- a/.github/workflows/blog-auditor.lock.yml +++ b/.github/workflows/blog-auditor.lock.yml @@ -85,6 +85,10 @@ jobs: run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Checkout PR branch if: | diff --git a/.github/workflows/brave.lock.yml b/.github/workflows/brave.lock.yml index 9948d0479db..54f8090cd59 100644 --- a/.github/workflows/brave.lock.yml +++ b/.github/workflows/brave.lock.yml @@ -987,6 +987,10 @@ jobs: run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Checkout PR branch if: | diff --git a/.github/workflows/changeset-generator.firewall.lock.yml b/.github/workflows/changeset-generator.firewall.lock.yml index b1d2e556694..09bc71c2e48 100644 --- a/.github/workflows/changeset-generator.firewall.lock.yml +++ b/.github/workflows/changeset-generator.firewall.lock.yml @@ -601,6 +601,10 @@ jobs: run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Checkout PR branch if: | @@ -4929,12 +4933,16 @@ jobs: - name: Checkout repository uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 with: - persist-credentials: true + persist-credentials: false fetch-depth: 0 - name: Configure Git credentials run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Download agent output artifact continue-on-error: true diff --git a/.github/workflows/ci-doctor.lock.yml b/.github/workflows/ci-doctor.lock.yml index 094d1881b34..6472d5a8f07 100644 --- a/.github/workflows/ci-doctor.lock.yml +++ b/.github/workflows/ci-doctor.lock.yml @@ -501,6 +501,10 @@ jobs: run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Checkout PR branch if: | diff --git a/.github/workflows/cli-version-checker.lock.yml b/.github/workflows/cli-version-checker.lock.yml index ebf7f96e2c6..9cd6afc60c2 100644 --- a/.github/workflows/cli-version-checker.lock.yml +++ b/.github/workflows/cli-version-checker.lock.yml @@ -108,6 +108,10 @@ jobs: run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Checkout PR branch if: | diff --git a/.github/workflows/commit-changes-analyzer.lock.yml b/.github/workflows/commit-changes-analyzer.lock.yml index b0e873acd9a..0503d95515f 100644 --- a/.github/workflows/commit-changes-analyzer.lock.yml +++ b/.github/workflows/commit-changes-analyzer.lock.yml @@ -84,6 +84,10 @@ jobs: run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Checkout PR branch if: | diff --git a/.github/workflows/copilot-agent-analysis.lock.yml b/.github/workflows/copilot-agent-analysis.lock.yml index 9518195142a..1c69128b4c8 100644 --- a/.github/workflows/copilot-agent-analysis.lock.yml +++ b/.github/workflows/copilot-agent-analysis.lock.yml @@ -110,6 +110,10 @@ jobs: run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Checkout PR branch if: | diff --git a/.github/workflows/daily-doc-updater.lock.yml b/.github/workflows/daily-doc-updater.lock.yml index f4d9a6357df..173a6d94329 100644 --- a/.github/workflows/daily-doc-updater.lock.yml +++ b/.github/workflows/daily-doc-updater.lock.yml @@ -103,6 +103,10 @@ jobs: run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Checkout PR branch if: | @@ -3332,12 +3336,16 @@ jobs: - name: Checkout repository uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 with: - persist-credentials: true + persist-credentials: false fetch-depth: 0 - name: Configure Git credentials run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Download agent output artifact continue-on-error: true diff --git a/.github/workflows/daily-firewall-report.lock.yml b/.github/workflows/daily-firewall-report.lock.yml index 098a5763d8a..eca23b3993b 100644 --- a/.github/workflows/daily-firewall-report.lock.yml +++ b/.github/workflows/daily-firewall-report.lock.yml @@ -81,6 +81,10 @@ jobs: run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Checkout PR branch if: | diff --git a/.github/workflows/daily-news.lock.yml b/.github/workflows/daily-news.lock.yml index f270822382c..313dc6637dc 100644 --- a/.github/workflows/daily-news.lock.yml +++ b/.github/workflows/daily-news.lock.yml @@ -106,6 +106,10 @@ jobs: run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Checkout PR branch if: | diff --git a/.github/workflows/daily-perf-improver.lock.yml b/.github/workflows/daily-perf-improver.lock.yml index 8f57fd18ca2..29fd056cfa3 100644 --- a/.github/workflows/daily-perf-improver.lock.yml +++ b/.github/workflows/daily-perf-improver.lock.yml @@ -527,6 +527,10 @@ jobs: run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Checkout PR branch if: | @@ -4256,12 +4260,16 @@ jobs: - name: Checkout repository uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 with: - persist-credentials: true + persist-credentials: false fetch-depth: 0 - name: Configure Git credentials run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Download agent output artifact continue-on-error: true diff --git a/.github/workflows/daily-repo-chronicle.lock.yml b/.github/workflows/daily-repo-chronicle.lock.yml index a175b8d238e..6face0c2882 100644 --- a/.github/workflows/daily-repo-chronicle.lock.yml +++ b/.github/workflows/daily-repo-chronicle.lock.yml @@ -87,6 +87,10 @@ jobs: run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Checkout PR branch if: | diff --git a/.github/workflows/daily-test-improver.lock.yml b/.github/workflows/daily-test-improver.lock.yml index 56ddfa84aa7..83b9d2921bd 100644 --- a/.github/workflows/daily-test-improver.lock.yml +++ b/.github/workflows/daily-test-improver.lock.yml @@ -527,6 +527,10 @@ jobs: run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Checkout PR branch if: | @@ -4230,12 +4234,16 @@ jobs: - name: Checkout repository uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 with: - persist-credentials: true + persist-credentials: false fetch-depth: 0 - name: Configure Git credentials run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Download agent output artifact continue-on-error: true diff --git a/.github/workflows/dev-hawk.lock.yml b/.github/workflows/dev-hawk.lock.yml index 89bbc3957ed..9146ac45336 100644 --- a/.github/workflows/dev-hawk.lock.yml +++ b/.github/workflows/dev-hawk.lock.yml @@ -476,6 +476,10 @@ jobs: run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Checkout PR branch if: | diff --git a/.github/workflows/dev.firewall.lock.yml b/.github/workflows/dev.firewall.lock.yml index ccfc85f8946..23263da6516 100644 --- a/.github/workflows/dev.firewall.lock.yml +++ b/.github/workflows/dev.firewall.lock.yml @@ -66,6 +66,10 @@ jobs: run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Checkout PR branch if: | diff --git a/.github/workflows/dev.lock.yml b/.github/workflows/dev.lock.yml index 27122c66724..83674deb695 100644 --- a/.github/workflows/dev.lock.yml +++ b/.github/workflows/dev.lock.yml @@ -76,6 +76,10 @@ jobs: run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Checkout PR branch if: | @@ -3583,12 +3587,16 @@ jobs: - name: Checkout repository uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 with: - persist-credentials: true + persist-credentials: false fetch-depth: 0 - name: Configure Git credentials run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Download agent output artifact continue-on-error: true diff --git a/.github/workflows/dictation-prompt.lock.yml b/.github/workflows/dictation-prompt.lock.yml index 8b99b64a9da..5a9626102bd 100644 --- a/.github/workflows/dictation-prompt.lock.yml +++ b/.github/workflows/dictation-prompt.lock.yml @@ -85,6 +85,10 @@ jobs: run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Checkout PR branch if: | @@ -3956,12 +3960,16 @@ jobs: - name: Checkout repository uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 with: - persist-credentials: true + persist-credentials: false fetch-depth: 0 - name: Configure Git credentials run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Download agent output artifact continue-on-error: true diff --git a/.github/workflows/duplicate-code-detector.lock.yml b/.github/workflows/duplicate-code-detector.lock.yml index 9e07f771dec..f832eb7cc03 100644 --- a/.github/workflows/duplicate-code-detector.lock.yml +++ b/.github/workflows/duplicate-code-detector.lock.yml @@ -103,6 +103,10 @@ jobs: run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Checkout PR branch if: | diff --git a/.github/workflows/example-workflow-analyzer.lock.yml b/.github/workflows/example-workflow-analyzer.lock.yml index 94959554135..368de42bc32 100644 --- a/.github/workflows/example-workflow-analyzer.lock.yml +++ b/.github/workflows/example-workflow-analyzer.lock.yml @@ -81,6 +81,10 @@ jobs: run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Checkout PR branch if: | diff --git a/.github/workflows/firewall.lock.yml b/.github/workflows/firewall.lock.yml index cae773aff86..75b1ebe12c0 100644 --- a/.github/workflows/firewall.lock.yml +++ b/.github/workflows/firewall.lock.yml @@ -63,6 +63,10 @@ jobs: run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Checkout PR branch if: | diff --git a/.github/workflows/github-mcp-tools-report.lock.yml b/.github/workflows/github-mcp-tools-report.lock.yml index ba81642c785..32532fe4c31 100644 --- a/.github/workflows/github-mcp-tools-report.lock.yml +++ b/.github/workflows/github-mcp-tools-report.lock.yml @@ -108,6 +108,10 @@ jobs: run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Checkout PR branch if: | @@ -3888,12 +3892,16 @@ jobs: - name: Checkout repository uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 with: - persist-credentials: true + persist-credentials: false fetch-depth: 0 - name: Configure Git credentials run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Download agent output artifact continue-on-error: true diff --git a/.github/workflows/go-logger.lock.yml b/.github/workflows/go-logger.lock.yml index 9becdccbcab..4ad1010ec2b 100644 --- a/.github/workflows/go-logger.lock.yml +++ b/.github/workflows/go-logger.lock.yml @@ -96,6 +96,10 @@ jobs: run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Checkout PR branch if: | @@ -3379,12 +3383,16 @@ jobs: - name: Checkout repository uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 with: - persist-credentials: true + persist-credentials: false fetch-depth: 0 - name: Configure Git credentials run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Download agent output artifact continue-on-error: true diff --git a/.github/workflows/go-pattern-detector.lock.yml b/.github/workflows/go-pattern-detector.lock.yml index 97a924360a4..0cf4608d940 100644 --- a/.github/workflows/go-pattern-detector.lock.yml +++ b/.github/workflows/go-pattern-detector.lock.yml @@ -90,6 +90,10 @@ jobs: run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Checkout PR branch if: | diff --git a/.github/workflows/instructions-janitor.lock.yml b/.github/workflows/instructions-janitor.lock.yml index 7ccf13c706a..9b78fad284c 100644 --- a/.github/workflows/instructions-janitor.lock.yml +++ b/.github/workflows/instructions-janitor.lock.yml @@ -103,6 +103,10 @@ jobs: run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Checkout PR branch if: | @@ -3329,12 +3333,16 @@ jobs: - name: Checkout repository uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 with: - persist-credentials: true + persist-credentials: false fetch-depth: 0 - name: Configure Git credentials run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Download agent output artifact continue-on-error: true diff --git a/.github/workflows/issue-classifier.lock.yml b/.github/workflows/issue-classifier.lock.yml index 0690ff0a261..f87f7af3fc6 100644 --- a/.github/workflows/issue-classifier.lock.yml +++ b/.github/workflows/issue-classifier.lock.yml @@ -833,6 +833,10 @@ jobs: run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Checkout PR branch if: | diff --git a/.github/workflows/lockfile-stats.lock.yml b/.github/workflows/lockfile-stats.lock.yml index 8e29090df72..94ca7866eb1 100644 --- a/.github/workflows/lockfile-stats.lock.yml +++ b/.github/workflows/lockfile-stats.lock.yml @@ -105,6 +105,10 @@ jobs: run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Checkout PR branch if: | diff --git a/.github/workflows/mcp-inspector.lock.yml b/.github/workflows/mcp-inspector.lock.yml index 242455a56a4..d75cf9fb018 100644 --- a/.github/workflows/mcp-inspector.lock.yml +++ b/.github/workflows/mcp-inspector.lock.yml @@ -159,6 +159,10 @@ jobs: run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Checkout PR branch if: | diff --git a/.github/workflows/mergefest.lock.yml b/.github/workflows/mergefest.lock.yml index ebda562c245..fe886170e84 100644 --- a/.github/workflows/mergefest.lock.yml +++ b/.github/workflows/mergefest.lock.yml @@ -436,6 +436,10 @@ jobs: run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Checkout PR branch if: | @@ -4623,12 +4627,16 @@ jobs: - name: Checkout repository uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 with: - persist-credentials: true + persist-credentials: false fetch-depth: 0 - name: Configure Git credentials run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Download agent output artifact continue-on-error: true diff --git a/.github/workflows/notion-issue-summary.lock.yml b/.github/workflows/notion-issue-summary.lock.yml index 853faa463a3..7e59eb007fb 100644 --- a/.github/workflows/notion-issue-summary.lock.yml +++ b/.github/workflows/notion-issue-summary.lock.yml @@ -84,6 +84,10 @@ jobs: run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Checkout PR branch if: | diff --git a/.github/workflows/pdf-summary.lock.yml b/.github/workflows/pdf-summary.lock.yml index 3d51aee97b7..d38c47d6083 100644 --- a/.github/workflows/pdf-summary.lock.yml +++ b/.github/workflows/pdf-summary.lock.yml @@ -1032,6 +1032,10 @@ jobs: run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Checkout PR branch if: | diff --git a/.github/workflows/plan.lock.yml b/.github/workflows/plan.lock.yml index f553407ed8e..5009b4c5e63 100644 --- a/.github/workflows/plan.lock.yml +++ b/.github/workflows/plan.lock.yml @@ -598,6 +598,10 @@ jobs: run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Checkout PR branch if: | diff --git a/.github/workflows/poem-bot.lock.yml b/.github/workflows/poem-bot.lock.yml index 6523a1cd8f8..50ca8fe288b 100644 --- a/.github/workflows/poem-bot.lock.yml +++ b/.github/workflows/poem-bot.lock.yml @@ -1294,6 +1294,10 @@ jobs: run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Checkout PR branch if: | @@ -5424,12 +5428,16 @@ jobs: - name: Checkout repository uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 with: - persist-credentials: true + persist-credentials: false fetch-depth: 0 - name: Configure Git credentials run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Download agent output artifact continue-on-error: true @@ -6428,12 +6436,16 @@ jobs: - name: Checkout repository uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 with: - persist-credentials: true + persist-credentials: false fetch-depth: 0 - name: Configure Git credentials run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Download agent output artifact continue-on-error: true @@ -7135,12 +7147,16 @@ jobs: - name: Checkout repository uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 with: - persist-credentials: true + persist-credentials: false fetch-depth: 0 - name: Configure Git credentials run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Download assets continue-on-error: true diff --git a/.github/workflows/q.lock.yml b/.github/workflows/q.lock.yml index 25a84bc5b9c..723a1077a18 100644 --- a/.github/workflows/q.lock.yml +++ b/.github/workflows/q.lock.yml @@ -1071,6 +1071,10 @@ jobs: run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Checkout PR branch if: | @@ -4854,12 +4858,16 @@ jobs: - name: Checkout repository uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 with: - persist-credentials: true + persist-credentials: false fetch-depth: 0 - name: Configure Git credentials run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Download agent output artifact continue-on-error: true diff --git a/.github/workflows/repo-tree-map.lock.yml b/.github/workflows/repo-tree-map.lock.yml index 421422b6753..6b7b3fba171 100644 --- a/.github/workflows/repo-tree-map.lock.yml +++ b/.github/workflows/repo-tree-map.lock.yml @@ -79,6 +79,10 @@ jobs: run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Checkout PR branch if: | diff --git a/.github/workflows/research.lock.yml b/.github/workflows/research.lock.yml index d94e9b5db0f..5614c91521d 100644 --- a/.github/workflows/research.lock.yml +++ b/.github/workflows/research.lock.yml @@ -88,6 +88,10 @@ jobs: run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Checkout PR branch if: | diff --git a/.github/workflows/safe-output-health.lock.yml b/.github/workflows/safe-output-health.lock.yml index a1c02b12be6..f2449f11013 100644 --- a/.github/workflows/safe-output-health.lock.yml +++ b/.github/workflows/safe-output-health.lock.yml @@ -127,6 +127,10 @@ jobs: run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Checkout PR branch if: | diff --git a/.github/workflows/schema-consistency-checker.lock.yml b/.github/workflows/schema-consistency-checker.lock.yml index 92793fee6fa..c97b3f2b7e7 100644 --- a/.github/workflows/schema-consistency-checker.lock.yml +++ b/.github/workflows/schema-consistency-checker.lock.yml @@ -105,6 +105,10 @@ jobs: run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Checkout PR branch if: | diff --git a/.github/workflows/scout.lock.yml b/.github/workflows/scout.lock.yml index 540ad4066fd..79f03fb9410 100644 --- a/.github/workflows/scout.lock.yml +++ b/.github/workflows/scout.lock.yml @@ -1059,6 +1059,10 @@ jobs: run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Checkout PR branch if: | diff --git a/.github/workflows/security-fix-pr.lock.yml b/.github/workflows/security-fix-pr.lock.yml index 55090cbebb3..6b9d5b81024 100644 --- a/.github/workflows/security-fix-pr.lock.yml +++ b/.github/workflows/security-fix-pr.lock.yml @@ -101,6 +101,10 @@ jobs: run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Checkout PR branch if: | @@ -3274,12 +3278,16 @@ jobs: - name: Checkout repository uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 with: - persist-credentials: true + persist-credentials: false fetch-depth: 0 - name: Configure Git credentials run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Download agent output artifact continue-on-error: true diff --git a/.github/workflows/semantic-function-refactor.lock.yml b/.github/workflows/semantic-function-refactor.lock.yml index 897ce3c5aae..4bb9bc923a8 100644 --- a/.github/workflows/semantic-function-refactor.lock.yml +++ b/.github/workflows/semantic-function-refactor.lock.yml @@ -103,6 +103,10 @@ jobs: run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Checkout PR branch if: | diff --git a/.github/workflows/smoke-claude.lock.yml b/.github/workflows/smoke-claude.lock.yml index 2992bd0d34b..af9548dd393 100644 --- a/.github/workflows/smoke-claude.lock.yml +++ b/.github/workflows/smoke-claude.lock.yml @@ -83,6 +83,10 @@ jobs: run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Checkout PR branch if: | diff --git a/.github/workflows/smoke-codex.lock.yml b/.github/workflows/smoke-codex.lock.yml index 6273654369a..10e7bb0786d 100644 --- a/.github/workflows/smoke-codex.lock.yml +++ b/.github/workflows/smoke-codex.lock.yml @@ -83,6 +83,10 @@ jobs: run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Checkout PR branch if: | diff --git a/.github/workflows/smoke-copilot.firewall.lock.yml b/.github/workflows/smoke-copilot.firewall.lock.yml index 2d59a5bb51c..2c9a8dd1a7a 100644 --- a/.github/workflows/smoke-copilot.firewall.lock.yml +++ b/.github/workflows/smoke-copilot.firewall.lock.yml @@ -83,6 +83,10 @@ jobs: run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Checkout PR branch if: | diff --git a/.github/workflows/smoke-copilot.lock.yml b/.github/workflows/smoke-copilot.lock.yml index 37bc971a934..a8ffc2cde2f 100644 --- a/.github/workflows/smoke-copilot.lock.yml +++ b/.github/workflows/smoke-copilot.lock.yml @@ -83,6 +83,10 @@ jobs: run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Checkout PR branch if: | diff --git a/.github/workflows/smoke-detector.lock.yml b/.github/workflows/smoke-detector.lock.yml index 0fec03e5bb1..f656f63f3b9 100644 --- a/.github/workflows/smoke-detector.lock.yml +++ b/.github/workflows/smoke-detector.lock.yml @@ -862,6 +862,10 @@ jobs: run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Checkout PR branch if: | diff --git a/.github/workflows/smoke-opencode.lock.yml b/.github/workflows/smoke-opencode.lock.yml index 140707dc994..fbf04927008 100644 --- a/.github/workflows/smoke-opencode.lock.yml +++ b/.github/workflows/smoke-opencode.lock.yml @@ -91,6 +91,10 @@ jobs: run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Checkout PR branch if: | diff --git a/.github/workflows/technical-doc-writer.lock.yml b/.github/workflows/technical-doc-writer.lock.yml index 230067a6b78..74a259d6875 100644 --- a/.github/workflows/technical-doc-writer.lock.yml +++ b/.github/workflows/technical-doc-writer.lock.yml @@ -521,6 +521,10 @@ jobs: run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Checkout PR branch if: | @@ -4009,12 +4013,16 @@ jobs: - name: Checkout repository uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 with: - persist-credentials: true + persist-credentials: false fetch-depth: 0 - name: Configure Git credentials run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Download agent output artifact continue-on-error: true @@ -4874,12 +4882,16 @@ jobs: - name: Checkout repository uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 with: - persist-credentials: true + persist-credentials: false fetch-depth: 0 - name: Configure Git credentials run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Download assets continue-on-error: true diff --git a/.github/workflows/test-jqschema.lock.yml b/.github/workflows/test-jqschema.lock.yml index 9d21e14e3a6..867a1900234 100644 --- a/.github/workflows/test-jqschema.lock.yml +++ b/.github/workflows/test-jqschema.lock.yml @@ -70,6 +70,10 @@ jobs: run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Checkout PR branch if: | diff --git a/.github/workflows/test-post-steps.lock.yml b/.github/workflows/test-post-steps.lock.yml index 05607182ceb..229362f8106 100644 --- a/.github/workflows/test-post-steps.lock.yml +++ b/.github/workflows/test-post-steps.lock.yml @@ -65,6 +65,10 @@ jobs: run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Checkout PR branch if: | diff --git a/.github/workflows/test-svelte.lock.yml b/.github/workflows/test-svelte.lock.yml index 8c233585889..fc9eaf790cd 100644 --- a/.github/workflows/test-svelte.lock.yml +++ b/.github/workflows/test-svelte.lock.yml @@ -67,6 +67,10 @@ jobs: run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Checkout PR branch if: | diff --git a/.github/workflows/tidy.lock.yml b/.github/workflows/tidy.lock.yml index 79d3e1d4527..0cbe5564c0a 100644 --- a/.github/workflows/tidy.lock.yml +++ b/.github/workflows/tidy.lock.yml @@ -459,6 +459,10 @@ jobs: run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Checkout PR branch if: | @@ -3936,12 +3940,16 @@ jobs: - name: Checkout repository uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 with: - persist-credentials: true + persist-credentials: false fetch-depth: 0 - name: Configure Git credentials run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Download agent output artifact continue-on-error: true @@ -4939,12 +4947,16 @@ jobs: - name: Checkout repository uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 with: - persist-credentials: true + persist-credentials: false fetch-depth: 0 - name: Configure Git credentials run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Download agent output artifact continue-on-error: true diff --git a/.github/workflows/unbloat-docs.lock.yml b/.github/workflows/unbloat-docs.lock.yml index 306f5fb6305..4fc7e3e2f45 100644 --- a/.github/workflows/unbloat-docs.lock.yml +++ b/.github/workflows/unbloat-docs.lock.yml @@ -874,6 +874,10 @@ jobs: run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Checkout PR branch if: | @@ -4243,12 +4247,16 @@ jobs: - name: Checkout repository uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 with: - persist-credentials: true + persist-credentials: false fetch-depth: 0 - name: Configure Git credentials run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Download agent output artifact continue-on-error: true @@ -5369,12 +5377,16 @@ jobs: - name: Checkout repository uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 with: - persist-credentials: true + persist-credentials: false fetch-depth: 0 - name: Configure Git credentials run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Download assets continue-on-error: true diff --git a/.github/workflows/video-analyzer.lock.yml b/.github/workflows/video-analyzer.lock.yml index 4887ee89b09..71460189180 100644 --- a/.github/workflows/video-analyzer.lock.yml +++ b/.github/workflows/video-analyzer.lock.yml @@ -96,6 +96,10 @@ jobs: run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Checkout PR branch if: | diff --git a/.github/workflows/weekly-issue-summary.lock.yml b/.github/workflows/weekly-issue-summary.lock.yml index ae73ad26e2a..8a64e8b576f 100644 --- a/.github/workflows/weekly-issue-summary.lock.yml +++ b/.github/workflows/weekly-issue-summary.lock.yml @@ -83,6 +83,10 @@ jobs: run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Re-authenticate git with GitHub token + SERVER_URL="${{ github.server_url }}" + SERVER_URL="${SERVER_URL#https://}" + git remote set-url origin "https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git" echo "Git configured with standard GitHub Actions identity" - name: Checkout PR branch if: | diff --git a/pkg/workflow/checkout_persist_credentials_test.go b/pkg/workflow/checkout_persist_credentials_test.go index 4c22e7ad8a6..380683adddc 100644 --- a/pkg/workflow/checkout_persist_credentials_test.go +++ b/pkg/workflow/checkout_persist_credentials_test.go @@ -46,7 +46,7 @@ engine: claude description: "Create issue job checkout should include persist-credentials: false", }, { - name: "safe output create-pull-request checkout includes persist-credentials true", + name: "safe output create-pull-request checkout includes persist-credentials false", frontmatter: `--- on: push: @@ -58,10 +58,10 @@ safe-outputs: create-pull-request: engine: claude ---`, - description: "Create pull request job checkout should include persist-credentials: true", + description: "Create pull request job checkout should include persist-credentials: false", }, { - name: "safe output push-to-pull-request-branch checkout includes persist-credentials true", + name: "safe output push-to-pull-request-branch checkout includes persist-credentials false", frontmatter: `--- on: pull_request: @@ -73,10 +73,10 @@ safe-outputs: push-to-pull-request-branch: engine: claude ---`, - description: "Push to PR branch job checkout should include persist-credentials: true", + description: "Push to PR branch job checkout should include persist-credentials: false", }, { - name: "safe output upload_assets checkout includes persist-credentials true", + name: "safe output upload_assets checkout includes persist-credentials false", frontmatter: `--- on: workflow_dispatch: @@ -87,7 +87,7 @@ safe-outputs: upload-assets: engine: claude ---`, - description: "Upload assets job checkout should include persist-credentials: true", + description: "Upload assets job checkout should include persist-credentials: false", }, { name: "safe output create-agent-task checkout includes persist-credentials false", @@ -180,18 +180,8 @@ engine: claude } // Determine which job(s) we expect to have persist-credentials: true - // For safe-output workflows, we expect the safe-output job to have true, - // but the agent job should still have false + // All jobs now use persist-credentials: false and rely on git remote set-url for authentication expectTrueJobs := make(map[string]bool) - if strings.Contains(tt.name, "create-pull-request") { - expectTrueJobs["create_pull_request"] = true - } - if strings.Contains(tt.name, "push-to-pull-request-branch") { - expectTrueJobs["push_to_pull_request_branch"] = true - } - if strings.Contains(tt.name, "upload_assets") { - expectTrueJobs["upload_assets"] = true - } // Verify each checkout has persist-credentials set correctly based on its job for jobName, checkouts := range checkoutsByJob { diff --git a/pkg/workflow/git_config_test.go b/pkg/workflow/git_config_test.go index 8e1155551a4..fa9be09a31c 100644 --- a/pkg/workflow/git_config_test.go +++ b/pkg/workflow/git_config_test.go @@ -74,9 +74,9 @@ func TestGitConfigurationStepsHelper(t *testing.T) { steps := compiler.generateGitConfigurationSteps() - // Verify we get expected number of lines - if len(steps) != 5 { - t.Errorf("Expected 5 lines in git configuration steps, got %d", len(steps)) + // Verify we get expected number of lines (now 9 instead of 5) + if len(steps) != 9 { + t.Errorf("Expected 9 lines in git configuration steps, got %d", len(steps)) } // Verify the content of the steps @@ -85,6 +85,8 @@ func TestGitConfigurationStepsHelper(t *testing.T) { "run: |", "git config --global user.email", "git config --global user.name", + "git remote set-url origin", + "x-access-token", "Git configured with standard GitHub Actions identity", } diff --git a/pkg/workflow/push_to_pull_request_branch.go b/pkg/workflow/push_to_pull_request_branch.go index ea35bde2deb..685db63edd4 100644 --- a/pkg/workflow/push_to_pull_request_branch.go +++ b/pkg/workflow/push_to_pull_request_branch.go @@ -123,7 +123,7 @@ func buildCheckoutRepository(steps []string, c *Compiler) []string { steps = append(steps, " - name: Checkout repository\n") steps = append(steps, fmt.Sprintf(" uses: %s\n", GetActionPin("actions/checkout"))) steps = append(steps, " with:\n") - steps = append(steps, " persist-credentials: true\n") + steps = append(steps, " persist-credentials: false\n") steps = append(steps, " fetch-depth: 0\n") if c.trialMode { if c.trialLogicalRepoSlug != "" { diff --git a/pkg/workflow/yaml_generation.go b/pkg/workflow/yaml_generation.go index 35eb9921b12..22fc2f77900 100644 --- a/pkg/workflow/yaml_generation.go +++ b/pkg/workflow/yaml_generation.go @@ -7,6 +7,10 @@ func (c *Compiler) generateGitConfigurationSteps() []string { " run: |\n", " git config --global user.email \"github-actions[bot]@users.noreply.github.com\"\n", " git config --global user.name \"github-actions[bot]\"\n", + " # Re-authenticate git with GitHub token\n", + " SERVER_URL=\"${{ github.server_url }}\"\n", + " SERVER_URL=\"${SERVER_URL#https://}\"\n", + " git remote set-url origin \"https://x-access-token:${{ github.token }}@${SERVER_URL}/${{ github.repository }}.git\"\n", " echo \"Git configured with standard GitHub Actions identity\"\n", } } From edc6754dd0e91b19c41df3bab4520e10c7a4d700 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 28 Oct 2025 07:38:05 +0000 Subject: [PATCH 3/4] Format code with gofmt Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- pkg/workflow/checkout_persist_credentials_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/workflow/checkout_persist_credentials_test.go b/pkg/workflow/checkout_persist_credentials_test.go index 380683adddc..73bda8b7e51 100644 --- a/pkg/workflow/checkout_persist_credentials_test.go +++ b/pkg/workflow/checkout_persist_credentials_test.go @@ -144,7 +144,7 @@ engine: claude checkoutsByJob := make(map[string][]string) var currentJob string lines := strings.Split(lockContentStr, "\n") - + for i, line := range lines { // Detect job names: they should be indented with exactly 2 spaces and end with : // and they should come under a "jobs:" section @@ -155,7 +155,7 @@ engine: claude currentJob = strings.TrimSuffix(jobNameWithColon, ":") } } - + if strings.Contains(line, "actions/checkout@") { // Collect the next several lines to check for persist-credentials context := "" @@ -186,7 +186,7 @@ engine: claude // Verify each checkout has persist-credentials set correctly based on its job for jobName, checkouts := range checkoutsByJob { expectTrue := expectTrueJobs[jobName] - + for idx, checkoutContext := range checkouts { if expectTrue { if !strings.Contains(checkoutContext, "persist-credentials: true") { From 810fc59024b0178fc24b4c25fa4294db3fde85a8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 28 Oct 2025 07:51:54 +0000 Subject: [PATCH 4/4] Add changeset for git re-authentication changes [skip-ci] --- .../patch-replace-persist-credentials-with-git-reauth.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/patch-replace-persist-credentials-with-git-reauth.md diff --git a/.changeset/patch-replace-persist-credentials-with-git-reauth.md b/.changeset/patch-replace-persist-credentials-with-git-reauth.md new file mode 100644 index 00000000000..46d722f93a0 --- /dev/null +++ b/.changeset/patch-replace-persist-credentials-with-git-reauth.md @@ -0,0 +1,5 @@ +--- +"gh-aw": patch +--- + +Replace persist-credentials with explicit git re-authentication