fix(ci): persist-credentials: false on remaining workflows#1269
Closed
jpr5 wants to merge 8 commits into
Closed
Conversation
…n, persist-credentials
…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)
ci: harden CI/CD security
…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.
Author
|
Opened against the wrong repo by mistake. Recreating on CopilotKit/agentcore-cli. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
persist-credentials: falseonprepare-release+publish-npmcheckout steps; explicitinsteadOfcredential config before everygit pushso pushes still work without the persisted tokenpersist-credentials: falseon checkout (strands-action manages its own credentials viapat_tokeninput)persist-credentials: falseon checkout (same pattern as agent-restricted)No changes to
test-and-buildjob (already hadpersist-credentials: false) orzizmor.yml(no artipacked suppressions for these files).