chore(ci): pass VERCEL_DEPLOY_HOOK via env block, not inline expression#23664
Open
0xDevNinja wants to merge 1 commit into
Open
chore(ci): pass VERCEL_DEPLOY_HOOK via env block, not inline expression#236640xDevNinja wants to merge 1 commit into
0xDevNinja wants to merge 1 commit into
Conversation
Direct `${{ secrets.VERCEL_DEPLOY_HOOK }}` interpolation inside a
shell `run:` block embeds the secret in the rendered command line.
GitHub's secret masking covers the value, but the indirection via an
`env:` mapping is the documented hardening pattern and avoids any
chance of the URL surfacing through `set -x`, error traces, or a
custom shell wrapper.
Fixes NousResearch#23631
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.
What does this PR do?
Wraps
VERCEL_DEPLOY_HOOKin anenv:block instead of expanding the secret directly inside therun:command line. Same call, just routed through an environment variable so the secret never appears on the rendered shell command.GitHub auto-masks secret values in logs either way, but the env-mapping pattern is the documented hardening and avoids edge cases (shell
set -x, custom wrappers, error traces) where the URL could otherwise surface.Related Issue
Fixes #23631
Type of Change
Changes Made
.github/workflows/deploy-site.yml: move${{ secrets.VERCEL_DEPLOY_HOOK }}into the step'senv:block;run:consumes the env var via"$VERCEL_DEPLOY_HOOK".How to Test
The step only runs on a release publish, but the change is a mechanical YAML rewrite. To verify locally:
yq '.jobs.deploy-vercel.steps[0]' .github/workflows/deploy-site.yml— confirmenv.VERCEL_DEPLOY_HOOKis now present andrun:references$VERCEL_DEPLOY_HOOK.actionlint .github/workflows/deploy-site.yml(if installed) — no lint errors.deploy-verceljob continues to fire; secret remains masked in logs.Checklist
Code
pytest tests/ -qand all tests pass (no test impact — workflow YAML only)Documentation & Housekeeping
cli-config.yaml.exampleif I added/changed config keys — N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — N/ANotes for reviewer
Operational follow-ups from the issue (rotate the hook, audit deploy logs) are outside the scope of a code change and should be handled by whoever owns the Vercel project.