Skip to content

Harden local HTTP, Git delivery, and software-update defaults - #42

Open
ascendedent wants to merge 2 commits into
splunk:mainfrom
ascendedent:harden-local-http
Open

Harden local HTTP, Git delivery, and software-update defaults#42
ascendedent wants to merge 2 commits into
splunk:mainfrom
ascendedent:harden-local-http

Conversation

@ascendedent

Copy link
Copy Markdown

These changes close the local-security issues I opened:

What changed

  • Every HTTP request now requires a loopback Host (127.0.0.1, localhost, or ::1).
  • Responses set Content-Security-Policy: frame-ancestors 'none', X-Frame-Options: DENY, and nosniff.
  • Dashboard JSON no longer includes user_message / user_input; the UI no longer renders prompt text.
  • Git delivery runs git with aliases and hooks disabled.
  • Quota HTTP fails closed on redirects instead of following them with provider credentials.
  • Auto-install is off by default and only proceeds when origin is github.com/splunk/token-meter.
  • /health still returns page_path for the installer ownership check, but no longer lists page_candidates.
  • install-systemd-user rejects control characters, quotes, and similar in the install path.
  • New settings files are written 0600.

page_path stays on /health because scripts/install / install-linux use it to confirm the process on :8722 is this runtime.

Fixes #34
Fixes #35
Fixes #36
Fixes #37
Fixes #38
Fixes #39
Fixes #40
Fixes #41

Reject non-loopback Host headers, add frame-ancestors, and strip prompt
fields from dashboard JSON. Git delivery ignores local aliases and hooks.
Quota HTTP no longer follows redirects. Auto-install is off by default
and only runs from the official origin. Health no longer lists local
path candidates. systemd unit generation rejects control characters in
the install path.

Fixes splunk#34 splunk#35 splunk#36 splunk#37 splunk#38 splunk#39 splunk#40 splunk#41
@bhavsarpratik

Copy link
Copy Markdown
Member

Thanks for putting this together and for documenting the security rationale.

We reviewed the current head (5d158e1) and are holding the merge for now. The next revision should:

  • keep the action token out of unauthenticated GET responses and close the missing-Origin mutation path without breaking approved native clients;
  • replace the absolute /health page_path with an installer-safe ownership signal that does not disclose a local path; and
  • send 404 and other error responses through the same security-header path as successful responses.

Once the head is updated, we’ll rerun the security, privacy, and cross-platform checks and get back to you soon.

— Pratik's agent

Keep the action token off unauthenticated GET /updates/status, replace
/health page_path with a boolean ownership signal, reject remote Origin
or Referer on mutations while still allowing native clients that omit
Origin, and send 404 responses through the same security headers.
@ascendedent

Copy link
Copy Markdown
Author

Thanks for the hold notes. Head is now f5a94b7.

  • GET /updates/status no longer returns the action token. Native update install still reads the token from GET /menubar; dashboard mutations still use the same-origin state payload. A cookie-only token is a larger follow-up and was not required to keep approved clients working.
  • Mutations now reject a remote Origin or Referer. Native companions that omit Origin still work when Host is loopback and the action token is valid. Origin: null is rejected.
  • /health reports page_owned / page_ready instead of an absolute page_path.
  • send_error (including 404) goes through the same security-header path as _send.

Happy to rerun the security and privacy checks on this head.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment