GitHub secret uploads rely on the current directory's implicit repository context
Source references: 2`set_secret` invokes `gh secret set` without naming a repository and does not display or confirm the GitHub account and repository before upload. The command therefore uses the destination inferred by `gh` from the current environment.
If the wizard runs from the wrong project, the remote is misconfigured, or `gh` is authenticated to an unintended account, credentials can be stored in another repository and become usable by that repository's administrators or workflows.
When gh is installed and authenticated, the function directly runs `gh secret set` without an explicit target such as `--repo`, and it does not display or confirm the account or repository. The destination therefore depends on the runtime gh/current-directory context; running from the wrong repository could place the secret in an unintended repository. A user can require the script to display and confirm the resolved repository or pass an explicit repository.
# set_secret NAME VALUE sets a GitHub Actions repo secret via gh. Falls back# to a warning (and records it) if gh is unavailable or unauthenticated.set_secret() { local name="$1" value="$2" if command -v gh >/dev/null 2>&1 && gh auth status >/dev/null 2>&1; then if printf '%s' "$value" | gh secret set "$name" >/dev/null 2>&1; then WRITTEN_SECRET+=("$name") printf ' %s✓ set%s GitHub secret %s\n' "$GREEN" "$RESET" "$name" returnShow 1 other places
ask_secret STRIPE_SECRET_KEY "Paste the secret key:"write_env STRIPE_PUBLISHABLE_KEY "$STRIPE_PUBLISHABLE_KEY"write_env STRIPE_SECRET_KEY "$STRIPE_SECRET_KEY"set_secret STRIPE_SECRET_KEY "$STRIPE_SECRET_KEY" # CI needs this one# ──────────────────────────────────────────────────────────────────────────