Pulse/internal
rcourtman e0edbaf7d0 ADA: Fix redactSecretsFromURL bug and add unit tests
The Telegram bot token redaction had an off-by-one bug: it searched for
the next "/" starting from the "/bot" position, which found the "/" in
"/bot" itself (offset 0) instead of the next "/" after the token.

Result: tokens were not properly redacted and the URL got corrupted with
duplicated path segments, potentially leaking secrets to logs/API responses.

Fix: search from idx+4 (after "/bot") and handle edge cases where there's
no trailing slash (token at end of URL or before query string).

Added 20 comprehensive test cases covering:
- No secrets (passthrough)
- Telegram bot tokens (various patterns)
- Query parameter secrets (token, apikey, api_key, key, secret, password)
- Multiple parameters and edge cases
2025-11-29 17:36:32 +00:00
..
agentbinaries chore: fix staticcheck SA warnings 2025-11-27 09:16:53 +00:00
agentupdate Add regression test for normalizeVersion 2025-11-29 15:22:05 +00:00
alerts style: fix revive linter warnings 2025-11-27 10:26:26 +00:00
api ADA: Fix redactSecretsFromURL bug and add unit tests 2025-11-29 17:36:32 +00:00
auth test: add unit tests for auth package 2025-11-26 13:51:13 +00:00
config Rebuild agent token bindings on API token config reload 2025-11-29 14:09:30 +00:00
crypto chore: remove additional dead code 2025-11-27 05:13:26 +00:00
discovery Fix discovery test Prometheus metric collision 2025-11-11 23:34:49 +00:00
dockeragent Fix standalone docker agent version comparison prefix mismatch 2025-11-29 00:04:43 +00:00
errors test: add unit tests for errors package 2025-11-26 14:09:14 +00:00
hostagent test: add unit tests for hostagent package 2025-11-26 14:09:55 +00:00
hostmetrics Fix ZFS storage reporting on TrueNAS SCALE (#718) 2025-11-22 23:53:39 +00:00
logging chore: remove dead code and unused exports 2025-11-27 13:17:39 +00:00
mdadm feat: Add mdadm RAID monitoring support for host agents 2025-11-09 16:36:33 +00:00
metrics chore: remove dead code and unused exports 2025-11-27 13:17:39 +00:00
mock Refine memory visualization with StackedMemoryBar component 2025-11-29 13:48:30 +00:00
models style: use direct type conversions in model converters 2025-11-27 09:24:39 +00:00
monitoring Add unit tests for metrics.go helper functions 2025-11-29 16:44:37 +00:00
notifications refactor: replace deprecated strings.Title with custom titleCase 2025-11-27 09:22:52 +00:00
sensors style: fix gofmt formatting inconsistencies 2025-11-26 23:44:36 +00:00
ssh/knownhosts chore: remove additional dead code 2025-11-27 05:13:26 +00:00
system style: fix gofmt formatting inconsistencies 2025-11-26 23:44:36 +00:00
tempproxy chore: fix staticcheck SA warnings 2025-11-27 09:16:53 +00:00
types test: add unit tests for types package 2025-11-26 14:10:21 +00:00
updates Add unit tests for ParseVersion function 2025-11-29 16:00:44 +00:00
utils fix(tests): resolve flaky ID generation and symlink resolution on macOS 2025-11-27 10:50:13 +00:00
websocket chore: fix staticcheck U1000 unused code warnings 2025-11-27 09:12:17 +00:00