From 1d3f10a8f5b3ad8c44a90bcabb121e295d79a410 Mon Sep 17 00:00:00 2001 From: mateo-berri <277851410+mateo-berri@users.noreply.github.com> Date: Tue, 19 May 2026 01:38:59 +0000 Subject: [PATCH] =?UTF-8?q?fix(ci):=20veria=20=E2=80=94=20scrub=20provider?= =?UTF-8?q?=20secrets=20from=20uv=20sync=20env=20in=20PR=20gate?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit uv sync runs PR-controlled install code (build backends, postinstall hooks); the prior job env exposed Anthropic/AWS/Vertex/Azure/GitHub credentials to that step. Wrap it in env -i with the same allowlist already used by the resolver, npm install, and pytest steps below. --- .circleci/config.yml | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 71e3636efe9..9220635864e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2303,7 +2303,27 @@ jobs: - run: name: Install Dependencies command: | - uv sync --frozen --all-groups --all-extras --python 3.12 + # `uv sync` resolves and installs Python packages declared + # in the PR's `pyproject.toml` / `uv.lock`. A malicious PR + # could add a dependency whose build backend or + # post-install hook reads ANTHROPIC_API_KEY / AWS_* / + # VERTEXAI_* / AZURE_FOUNDRY_* / GITHUB_TOKEN out of + # `os.environ` during the install and exfiltrates them. + # Run the install under `env -i` with the same minimal + # allowlist as the resolver / npm install / pytest steps + # below so PR-controlled install code cannot see provider + # credentials. Public PyPI does not require auth and uv's + # cache lives under `$HOME`, so this allowlist is + # sufficient. + env -i \ + PATH="$PATH" \ + HOME="$HOME" \ + USER="${USER:-circleci}" \ + TERM="${TERM:-dumb}" \ + LANG="${LANG:-C.UTF-8}" \ + LC_ALL="${LC_ALL:-}" \ + TMPDIR="${TMPDIR:-/tmp}" \ + uv sync --frozen --all-groups --all-extras --python 3.12 - start_postgres - attach_workspace: at: ~/project