Skip to content

fix(splunk): make the integration actually work (secret-save, docker net, index) - #152

Merged
Jovonni merged 2 commits into
developfrom
fix/splunk-config-networking
Oct 17, 2026
Merged

Jovonni merged 2 commits into
developfrom
fix/splunk-config-networking

Conversation

@Jovonni

@Jovonni Jovonni commented Oct 17, 2026

Copy link
Copy Markdown
Collaborator

makes the splunk integration actually work for a real operator. targets develop (follow-up to the splunk work in #151).

  • blocking: saving any integration wrote the masked secret back over the real one — GET returns secrets masked, the UI echoes them on save, so re-saving (or clicking Test, which saves first) corrupted the splunk token/hec_token (and smtp password) and auth died. now the backend keeps the stored secret when the incoming value is just its mask.
  • docker: rewrite localhost/127.0.0.1 → host.docker.internal for SPLUNK_HOST/SPLUNK_HEC_URL (we already do this for db/es) so a host- or compose-local splunk is reachable from the runner.
  • index: splunk_index was accepted but never applied to the search — now it scopes the SPL when the query doesn't already pin an index.

tested: secret-merge round-trip + index scoping, 52 splunk/runner tests green. SSRF guard / HEC output / REST search were verified correct and untouched.

follow-ups (separate, not here): forward-anomalies toggle shows on but saves off until toggled; docker infer double-persists anomalies (runner + orchestrator).

- blocking: saving an integration wrote the MASKED secret back over the real
  one (GET returns secrets masked, the UI echoes them on save) — corrupting
  the splunk token/hec_token (and smtp password) so auth died. keep the stored
  secret when the incoming value is just its mask (_merge_preserving_secrets).
- docker: rewrite localhost/127.0.0.1 -> host.docker.internal for SPLUNK_HOST/
  SPLUNK_HEC_URL (we already do this for db/es) so a host/compose splunk is
  reachable from the runner's bridge network.
- splunk_index was accepted everywhere but never applied to the search; scope
  the SPL to it when the query doesn't already pin an index.

tests: secret-merge round-trip + index scoping. 52 splunk/runner tests pass.
splunk_index is user-controlled (models:write) and was interpolated into the
SPL unescaped. restrict it to [A-Za-z0-9_-] and reject anything else; add
rejection tests and a docs note on the index field.
@Jovonni
Jovonni merged commit 0fc9dd4 into develop Oct 17, 2026
14 checks passed
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