CI: GITHUB_TOKEN to fix vscode-ripgrep downloading issues #45
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.
Requirements for Contributing a Bug Fix (from template)
Requirements for Contributing a Bug Fix
Identify the Bug
#1 (comment) (bug)
#1 (comment) (explanation)
Description of the Change
Pass the
GITHUB_TOKEN
env var through to the bootstrapscript
step of CI.Given that we have set this as a secret variable in Azure DevOps UI, the variable will not be passed through to
- script
steps in the Azure DevOps CI unless we explicitly pass it with the- env
yaml key.More context, and thoughts on how upstream may be handling this (click to expand):
(I noticed some time ago that the configs use this variable
GITHUB_TOKEN
in several places, but I was recently surprised to find it is not used here, at least not the way a secret variable would need to be used.I can only infer that Upstream has a GITHUB_TOKEN that isn't set as secret, or they would theoretically be seeing this issue as well.)
Alternate Designs
GITHUB_TOKEN
as a regular (not secret) variable in Azure DevOps UI, but the personal tokens are arguably somewhat sensitive, so this isn't recommended.More thoughts on whether Personal Access Tokens are sensitive or not (click to expand):
A properly configured Personal Access Token is capable of accessing the API on your behalf, such as for read-only access to information on GitHub. But by default, Personal Access Tokens are apparently not authorized to update your repos, or do anything else destructive. Still, keeping the token secret is in line with guidance from GitHub, and just seems prudent. Maybe an exploit will be discovered, which could allowing Personal Access Tokens to have more authority to make destructive changes than they are supposed to be able to have. In any case, having the access token be a secret variable seems sensible to me.
Possible Drawbacks
None that I am aware of.
Verification Process
I have been using this in my CI runs lately, and I don't think I've observed the "failure to download ripgrep" error with this set up properly.
Release Notes
N/A