4 Commits
Author SHA1 Message Date
Thomas KosiewskiandClaude Opus 5.5 bc4a573535 ci: isolate depot caches from pull request writes (#32756)
## Description

Secure depot caches shared across branches by preventing pull requests
from restoring cached artifacts that could contain malicious code. This
ensures that trusted runs (pushes to main, scheduled jobs) only look up
cache keys without restoring pull request-written content, while pull
requests can still benefit from caches written by trusted runs.

## Changes

- **ci.yaml**: Add `lookup-only` flag to golangci-lint and coder-e2e
cache restore steps for non-pull-request runs. Invert pnpm cache
condition to only restore on pull requests.
- **setup-mise/action.yml**: Add `lookup-only: true` to cache step on
main branch; change restore condition from `github.ref !=
'refs/heads/main'` to `github.event_name == 'pull_request'`.
- **pnpm-install/action.yml**: Add `lookup-only: true` to cache step on
main branch; change restore condition from `github.ref !=
'refs/heads/main'` to `github.event_name == 'pull_request'`.
- **eval-coder-agents.yaml**: Disable caching in setup-mise and setup-uv
for the eval job, which holds secrets and must not restore pull request
artifacts.
- **embedded-pg-cache/download/action.yml**: Restrict cache restore to
pull request runs only.
- **test-cache/download/action.yml**: Restrict cache restore to pull
request runs only.

All changes include explanatory comments documenting the security
rationale.

## Test Plan

CI workflows will validate the changes. The logic ensures:
- Pull requests can restore caches from trusted runs
- Trusted runs only look up keys without restoring pull request content
- Secret-holding jobs disable caching entirely

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 17:12:36 +01:00
Kyle CarberryandClaude Opus 5.5 555069ef80 ci: run eval-coder-agents in its own eval environment (#32363)
The `run` job in `eval-coder-agents.yaml` checks out the PR's head and
runs its code, including its own `scripts/harbor-coder`. It currently
uses the `main` environment, which holds main-only secrets for other
workflows. This moves it to a dedicated `eval` environment, so only eval
secrets are ever in scope.

- **Depends on** coder/github-org-terraform#124, which creates `eval`
(only `main` may deploy, no reviewers, no admin bypass). Merge that
first; otherwise GitHub creates `eval` unprotected on the first run.
- **`EVAL_CODER_SESSION_TOKEN`:** the job references it, but it isn't
set in `main` today. When it's added, put it in `eval`.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 01:51:27 +00:00
Jon Ayers eb616306f0 ci: run main-only secret consumers in the main environment (#31763) 2026-11-06 18:52:22 -06:00
Garrett Delfosse dbd7db6877 feat: add Harbor-based A/B eval for Coder Agents against main (#30686) 2026-10-28 08:21:44 -04:00