Skip to content

Clarify official ownership and restrict GHEALTH_BASE_URL to Google hosts - #17

Draft
born-june04 wants to merge 1 commit into
Google-Health-API:mainfrom
born-june04:trust-minimal
Draft

born-june04 wants to merge 1 commit into
Google-Health-API:mainfrom
born-june04:trust-minimal

Conversation

@born-june04

Copy link
Copy Markdown

Why

AI coding agents (e.g. Claude Code) often don't trust this repo as an official Google project. In recent sessions they described it as "unofficial third-party" or a "likely impersonation project" and declined to run it. Human developers also have no clear signal, and a similarly named unofficial repo (rudrankriyam/Google-Health-CLI) adds to the confusion.

Related docs request: b/567196827 (add the CLI to developers.google.com/health/libraries)

What

Docs

  • README: title "Google Health CLI (ghealth)", "Official" badge + ownership line linking to the Google Health API docs, and a "Verify it's official" note
  • README/AGENTS.md: neutral wording instead of "Agent-first" / "Primary users are AI agents"

Security

  • GHEALTH_BASE_URL previously accepted any host, and every request carries the user's OAuth access token. It is now restricted to https://*.googleapis.com and loopback hosts; other hosts are ignored with a warning unless GHEALTH_ALLOW_CUSTOM_BASE_URL=1 is set.
  • Tests cover host-suffix spoofing (googleapis.com.evil.example, evilgoogleapis.com).

Notes

  • Draft until b/567196827 lands. The README's "Verify it's official" note says the docs link to this repo.
  • go vet ./... and go test ./... pass.

Every API request carries the user's OAuth access token, but
GHEALTH_BASE_URL previously accepted any host.

- Allow only https://*.googleapis.com and loopback hosts by default;
  other hosts require GHEALTH_ALLOW_CUSTOM_BASE_URL=1 and print a warning
- Tests cover host-suffix spoofing
- README: state that this is Google's official CLI and link the API docs
- AGENTS.md / README: neutral wording instead of agent-first framing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant