Repository navigation
ci: stop leaving the TT_LLM_ENGINE token on CI machines - #5561
Open
vcankovicTT wants to merge 1 commit into
Open
vcankovicTT wants to merge 1 commit into
vcankovicTT wants to merge 1 commit into
Conversation
The C++ jobs need the TT_LLM_ENGINE token to download the private tt-llm-engine submodule. Today the token is also saved to .git/config and left there: - setup-cpp-ci wrote it with `git config --local` and nothing removed it. - The actions/checkout steps that use it keep it in .git/config for the rest of the job (persist-credentials defaults to true). Saved there, every later step in the job can read it, and on a reused runner it stays on disk after the job. Changes: - setup-cpp-ci: remove the "Configure git for private submodules" step. The next step already gives the token to the one git command that needs it (`git -c ... submodule update`). Git does not use the saved --local setting for the submodule download anyway, so nothing else changes. The token now comes in through env: instead of being pasted into the script. - test-gate, cpp-heavy-checks, nightly-cpp-benchmarks: set `persist-credentials: false` on the checkouts that use the token. - nightly-cpp-benchmarks: its submodule step relied on the token saved by checkout and has been failing at that step, so it now gets the token the same way as setup-cpp-ci. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
idjuricTT
approved these changes
Nov 10, 2026
vcankovicTT
marked this pull request as ready for review
November 10, 2026 12:58
vcankovicTT
requested review from
a team,
acvejicTT,
bgoelTT,
mdobrosavljevicTT,
mjeremicTT and
vmaksimovicTT
as code owners
November 10, 2026 12:58
fivanovicTT
approved these changes
Nov 11, 2026
fivanovicTT
enabled auto-merge
November 11, 2026 12:25
ztorlakTT
approved these changes
Nov 12, 2026
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.
Where the token is exposed today (example)
Take the job C++ Build & Unit Tests in
test-gate.yml, which runs on pull requests that touch C++ code:TT_LLM_ENGINEtokentoken: ${{ secrets.TT_LLM_ENGINE }}. Checkout saves the token in the repo's git settings file,.git/config, and keeps it there for the rest of the job.git config --local …and saves the token in.git/configa second time. Nothing ever removes this copy.install_dependencies.shdownloads and builds third-party code (for example Drogon).FetchContent.After steps 1 and 2, the job's
.git/configcontains this (real token replaced with<TOKEN>):Anything that runs later in the job, including third-party code, can read the token with a simple
cat .git/config.The same happens in 9 more jobs:
test-gate.yml: C++ Lint & Format Check, RemoteKVManager Kafka E2Ecpp-heavy-checks.yml: C++ Build (artifact for benches), C++ Server Mock Pipeline Benchmark, C++ Server Prefill/Decode Split Test, C++ Server Gateway Split Test, C++ Server Prefill/Decode Smoke Tests, C++ ThreadSanitizernightly-cpp-benchmarks.yml: Full Benchmark Suite (only the checkout copy)Four of the
cpp-heavy-checksjobs run ontt-ubuntu-2204-large-stablerunners. If such a runner is reused between jobs, the copy saved bygit config --localstays on its disk after the job ends.Why this is risky
git config --localcopy stays on disk after the job.Anyone who gets this token can read the private
tt-llm-enginerepository. A token should be handed only to the command that needs it, and only while that command runs.What this PR changes
.github/actions/setup-cpp-ci/action.yml: removes the "Configure git for private submodules" step, the one that saved the token. The next step already gives the token to the one git command that needs it (git -c … submodule update), and a-cvalue is never written to disk. The token now comes in throughenv:instead of being pasted into the script text.test-gate.yml,cpp-heavy-checks.yml,nightly-cpp-benchmarks.yml: addpersist-credentials: falseto the 10 checkout steps that use the token, so checkout doesn't keep it either.nightly-cpp-benchmarks.yml: its "Init tt-llm-engine submodule" step relied on the token saved by checkout. It now gets the token the same way assetup-cpp-ci.After this PR, the token is used only inside the single "Init tt-llm-engine submodule" command and is never saved to
.git/config.Why nothing should break
--localsetting when it downloads a submodule; only the-con the next line does. I checked this with throwaway local repos: with only-c, the submodule download works and nothing is saved; with only the saved--localsetting, the download fails and the value is left in.git/config.cpp-heavy-checks, which uses-c, passed its submodule setup on 2026-11-07.nightly-cpp-benchmarks, which relies on the token saved by checkout, failed at its "Init tt-llm-engine submodule" step on 2026-11-07 and 2026-11-08. This PR should fix that step.Testing
actionlint: no new findings in the changed workflows.test-gateruns on this PR, and its C++ jobs usesetup-cpp-ci. Right now every workflow in this repo ends instartup_failureon all branches (unrelated to this PR), so CI will confirm this change once that is fixed.cpp-heavy-checksandnightly-cpp-benchmarksdon't run on PRs; they can be checked with a manual run on this branch.