feat: use get.agent-vault.dev short URL and add anonymous install beacon#95
feat: use get.agent-vault.dev short URL and add anonymous install beacon#95dangtony98 merged 2 commits intomainfrom
Conversation
Switches install command from raw.githubusercontent.com URL to get.agent-vault.dev across docs, installer, and Register page. Installer pings the same host on success with OS/arch/version only; opt out via AGENT_VAULT_NO_TELEMETRY=1. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
| # | ||
| # Privacy: on successful install, sends an anonymous ping with OS, arch, | ||
| # and version only — no identifiers, no IP retention. Opt out with: | ||
| # AGENT_VAULT_NO_TELEMETRY=1 curl -fsSL https://get.agent-vault.dev | sh |
There was a problem hiding this comment.
🔴 The telemetry opt-out command documented in install.sh (line 12) and docs/installation.mdx is syntactically incorrect: AGENT_VAULT_NO_TELEMETRY=1 curl -fsSL https://get.agent-vault.dev | sh sets the variable only in curl's environment, not in the downstream sh process that actually checks it — so the beacon fires regardless. Fix by moving the prefix to sh: curl -fsSL https://get.agent-vault.dev | AGENT_VAULT_NO_TELEMETRY=1 sh, or use export AGENT_VAULT_NO_TELEMETRY=1 && before the pipeline.
Extended reasoning...
What the bug is and how it manifests
The install.sh comment (line 12) and the docs/installation.mdx <Note> both document the telemetry opt-out as:
AGENT_VAULT_NO_TELEMETRY=1 curl -fsSL https://get.agent-vault.dev | shThis syntax is incorrect. In POSIX shell, a VAR=value prefix on a command sets that variable only in the environment of the immediately following command — here, curl. It does not propagate to subsequent stages of the pipeline. The sh process that fetches and executes the downloaded script is a separate process that inherits from the parent shell's environment, where AGENT_VAULT_NO_TELEMETRY is not set.
The specific code path that triggers it
At install.sh line 186 (in the new main() block added by this PR), the script checks:
if [ -z "$AGENT_VAULT_NO_TELEMETRY" ]; thenWhen a user follows the documented procedure, sh sees AGENT_VAULT_NO_TELEMETRY as empty (because curl consumed the prefix, not sh), the condition is true, and the beacon fires unconditionally.
Why existing code doesn't prevent it
The check itself is correct — it correctly gates the beacon on the variable being non-empty. The problem is purely in the documentation: the example command sets the variable in the wrong process. No runtime guard exists to detect or compensate for this mis-invocation.
What the impact would be
Users who explicitly follow the documented privacy opt-out procedure will still have their install telemetrized without their knowledge or consent. This silently violates stated user intent and contradicts the privacy promise made in both the script comment and the docs Note. Since this is a new feature introduced by this PR, the broken opt-out ships alongside the first deployment of the beacon.
How to fix it
Two correct forms exist:
- Move the prefix to
sh(the process that actually uses it):
curl -fsSL https://get.agent-vault.dev | AGENT_VAULT_NO_TELEMETRY=1 sh- Export the variable before the pipeline:
export AGENT_VAULT_NO_TELEMETRY=1 && curl -fsSL https://get.agent-vault.dev | shBoth install.sh line 12 and docs/installation.mdx should be updated with the correct form. The docs Note currently says only Opt out with AGENT_VAULT_NO_TELEMETRY=1`` without showing any command — it should show the correct invocation explicitly.
Step-by-step proof
- User reads the docs/installation.mdx Note or the install.sh comment and decides to opt out.
- User runs:
AGENT_VAULT_NO_TELEMETRY=1 curl -fsSL https://get.agent-vault.dev | sh - The shell forks
curlwithAGENT_VAULT_NO_TELEMETRY=1in its environment;curldownloads the script and writes it to the pipe.AGENT_VAULT_NO_TELEMETRYplays no role in curl's behavior. - The shell simultaneously forks
shto read from the pipe.shinherits the parent shell's environment, which has noAGENT_VAULT_NO_TELEMETRYvariable set. - The script runs inside
sh; at line 186,[ -z "$AGENT_VAULT_NO_TELEMETRY" ]evaluates to true (variable is unset/empty). - The beacon
curl -fsS -m 3 "https://get.agent-vault.dev/ok?..."fires. - User believes they opted out; telemetry was collected anyway.
Empirical confirmation: running TEST=1 true | bash -c 'echo ${TEST:-UNSET}' outputs UNSET, proving the variable does not cross pipeline stage boundaries.
…l refs - install.sh + docs: the opt-out env var must be placed before `sh` (the process that actually reads it), not before `curl`. Updated both the script header and the docs Note to show the correct form: `curl -fsSL https://get.agent-vault.dev | AGENT_VAULT_NO_TELEMETRY=1 sh`. - Mirror the telemetry disclosure to docs/self-hosting/local.mdx (install and upgrade sections) so users landing on the self-hosting guide see the same notice and opt-out as the primary install page. - Document AGENT_VAULT_NO_TELEMETRY in the three canonical env-var refs called out by CLAUDE.md: .env.example, environment-variables.mdx, and cli.mdx (new "Installer" subsections, clearly scoped to install.sh). - install.sh: guard "A database backup was saved at" / "Database backup" messages on BACKUP_FILE being set. Previously, a reinstall over a binary-only install (no database file) printed a blank path and falsely claimed a backup was made. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Addressed all four review comments in bae6cee:
|
Summary
raw.githubusercontent.com/Infisical/agent-vault/main/install.shtohttps://get.agent-vault.devin docs/installation.mdx, docs/self-hosting/local.mdx, and web/src/pages/Register.tsx.install/upgradebeacon (OS, arch, version) toget.agent-vault.dev/okon success; opt out withAGENT_VAULT_NO_TELEMETRY=1. Failure is swallowed so it never breaks an install.<Note>on the install page.Test plan
curl -fsSL https://get.agent-vault.dev | shon macOS (fresh install) — binary lands in/usr/local/bin, beacon fires withevent=install.event=upgrade.AGENT_VAULT_NO_TELEMETRY=1— no beacon request.🤖 Generated with Claude Code