Skip to content

update cagent-action to latest (with better permissions)#2233

Merged
derekmisler merged 1 commit intodocker:mainfrom
derekmisler:update-cagent-action-to-latest-with-better-permis
Mar 24, 2026
Merged

update cagent-action to latest (with better permissions)#2233
derekmisler merged 1 commit intodocker:mainfrom
derekmisler:update-cagent-action-to-latest-with-better-permis

Conversation

@derekmisler
Copy link
Contributor

@derekmisler derekmisler commented Mar 24, 2026

Summary

Hardens the PR Review workflow by pinning cagent-action to v1.3.1 (from v1.2.13), switching from pull_request_target to pull_request for safer secret handling, and explicitly passing only the secrets the reusable workflow needs instead of secrets: inherit.

Closes: https://github.com/docker/gordon/issues/281

Changes

  • Pinned workflow version: Updated docker/cagent-action from @3a12dbd (v1.2.13) to @dba0ca5 (v1.3.1).
  • Trigger change: Replaced pull_request_target with pull_request — auto-reviews now run only for same-repo branches (fork PRs use the /review command via issue_comment).
  • Scoped permissions: Added inline comments explaining each permission. Added a job-level scoping comment for clarity.
  • Explicit secrets: Replaced secrets: inherit with individually named secrets (ANTHROPIC_API_KEY, CAGENT_ORG_MEMBERSHIP_TOKEN, CAGENT_REVIEWER_APP_ID, CAGENT_REVIEWER_APP_PRIVATE_KEY), reducing exposure of unrelated repository secrets.
  • Inline documentation: Added comments explaining each trigger, permission, and secret for future maintainers.

Test plan

  • Open or re-open a PR against main and verify the review workflow triggers automatically.
  • Post a /review comment on a PR and verify the workflow triggers via issue_comment.
  • Confirm review comments appear under the configured GitHub App identity (not github-actions[bot]).

…16:21:07]

Signed-off-by: Derek Misler <derek.misler@docker.com>
@derekmisler derekmisler marked this pull request as ready for review March 24, 2026 20:21
@derekmisler derekmisler requested a review from a team as a code owner March 24, 2026 20:21
@derekmisler derekmisler self-assigned this Mar 24, 2026
Copy link

@docker-agent docker-agent bot left a comment

Choose a reason for hiding this comment

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

Assessment: 🔴 CRITICAL

This PR updates the cagent-action workflow with improved security practices, but introduces a critical security vulnerability through the issue_comment trigger.

@derekmisler derekmisler merged commit 9318923 into docker:main Mar 24, 2026
20 checks passed
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.

2 participants