Skip to content

fix(ci): persist-credentials: false on remaining workflows#1269

Closed
jpr5 wants to merge 8 commits into
aws:mainfrom
CopilotKit:fix/persist-credentials-remaining
Closed

fix(ci): persist-credentials: false on remaining workflows#1269
jpr5 wants to merge 8 commits into
aws:mainfrom
CopilotKit:fix/persist-credentials-remaining

Conversation

@jpr5

@jpr5 jpr5 commented May 15, 2026

Copy link
Copy Markdown

Summary

  • release.yml: persist-credentials: false on prepare-release + publish-npm checkout steps; explicit insteadOf credential config before every git push so pushes still work without the persisted token
  • agent-restricted.yml: persist-credentials: false on checkout (strands-action manages its own credentials via pat_token input)
  • strands-command.yml: persist-credentials: false on checkout (same pattern as agent-restricted)

No changes to test-and-build job (already had persist-credentials: false) or zizmor.yml (no artipacked suppressions for these files).

jpr5 added 8 commits May 14, 2026 17:39
…at new files

e2e-tests.yml: Remove pull_request_target trigger entirely. The workflow
is now workflow_dispatch-only with an optional pr_number input that
checks out the PR merge ref. Maintainers trigger E2E runs manually,
eliminating the risk of fork PRs executing arbitrary code with AWS
credentials and API keys. The AUTHORIZED_USERS gate is removed since
workflow_dispatch is already restricted to repo collaborators.

pr-tarball.yml: Split into two workflows. The build step (pr-tarball.yml)
now uses a plain pull_request trigger with read-only permissions — it
builds the tarball and uploads it as an artifact. A new pr-tarball-publish.yml
workflow triggers via workflow_run after the build succeeds, downloading
the artifact and creating the draft release + PR comment with write
permissions. The publish workflow runs base-branch code only, never
PR-controlled code.

zizmor.yml: Remove suppressions for e2e-tests.yml and pr-tarball.yml
dangerous-triggers and excessive-permissions since neither workflow uses
pull_request_target anymore.

Also runs prettier on the three new workflow files (dependabot-auto-merge,
dependabot-major-analysis, security_zizmor) and the redesigned files.
- Fix impostor commit: upload-artifact SHA was ea165f8d65b6db9a...
  (nonexistent), corrected to ea165f8d65b6e75b... (v4.6.2)
- Fix template injection in e2e-tests.yml: move github.ref into
  env var (GH_REF) instead of inline ${{ }} expansion in run block
- Fix version comment mismatch in codeql.yml: v4 -> v4.35.4
- Suppress workflow_run trigger warning for pr-tarball-publish.yml
  (by-design split build/publish pattern, never executes PR code)
…ands-command

Defense-in-depth: stop persisting the GITHUB_TOKEN in the git
credential store on three workflows that previously left it
populated after checkout.

- release.yml (prepare-release + publish-npm): add
  persist-credentials: false and explicit insteadOf step before
  every git push so push still works without the persisted token.
- agent-restricted.yml: add persist-credentials: false; the
  strands-action already configures its own git credentials via
  pat_token input.
- strands-command.yml: same pattern as agent-restricted.
- test-and-build job already had persist-credentials: false and
  is left unchanged.
@jpr5 jpr5 requested a review from a team May 15, 2026 17:44
@github-actions github-actions Bot added the size/l PR size: L label May 15, 2026
@jpr5

jpr5 commented May 15, 2026

Copy link
Copy Markdown
Author

Opened against the wrong repo by mistake. Recreating on CopilotKit/agentcore-cli.

@jpr5 jpr5 closed this May 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/l PR size: L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant