Fix: [DEV3-5002] Add cleanup step to remove settings.json for self-hosted runners#30
Merged
Pavel-tabnine merged 4 commits intoApr 19, 2026
Merged
Conversation
Self-hosted / named GHES runners do not wipe the workspace between runs, causing settings.json (which contains auth credentials) to persist and leak state across consecutive PR review jobs. Add an unconditional post-run step (if: always()) that deletes ~/.tabnine/agent/settings.json, ensuring no sensitive data is retained between runs regardless of success or failure. Fixes DEV3-5002
Self-hosted / named runners retain the workspace between runs, causing settings.json to persist across jobs. Add opt-in cleanup controlled by the TABNINE_CLEANUP env var (set to "true" to enable). - GitHub Actions (GitHub/tabnine-review.yml): new post-step with if: always() - Bitbucket Pipelines (Bitbucket/bitbucket-pipelines.yml): appended shell block - GitLab CI (.gitlab-ci.yml): after_script block The action.yml composite already received the cleanup in the previous commit; this adds the same protection (as opt-in) to the standalone workflow templates. Relates to DEV3-5002
Add a 'cleanup' input (default: empty / off) and gate the cleanup step on inputs.cleanup == 'true', consistent with the TABNINE_CLEANUP env var approach used in the standalone CI templates. Relates to DEV3-5002
Clarifies intent: cleanup is opt-in and defaults to false rather than an empty/unset value, making it consistent and unambiguous across all CI integrations.
amirbilu
approved these changes
Apr 19, 2026
amirbilu
left a comment
There was a problem hiding this comment.
in my experience, cleanups are the workflow job
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.
Problem
Self-hosted / named GHES runners do not wipe the workspace between runs. This causes
settings.json(which contains Tabnine auth credentials) to persist across consecutive PR review jobs, leaking state between runs.Fix
Add an unconditional cleanup step (
if: always()) at the end of the composite action that deletes~/.tabnine/agent/settings.jsonafter every run — on both success and failure.Impact
settings.jsonbetween runsFixes DEV3-5002