Skip to content

🔒 security: fix path traversal in service log reading#100

Merged
scobru merged 1 commit into
mainfrom
security-fix-path-traversal-logs-8690225840888427296
Apr 27, 2026
Merged

🔒 security: fix path traversal in service log reading#100
scobru merged 1 commit into
mainfrom
security-fix-path-traversal-logs-8690225840888427296

Conversation

@scobru
Copy link
Copy Markdown
Owner

@scobru scobru commented Apr 27, 2026

Replaced loose string-based validation with strict whitelist-based regular expression validation for service names in the logs endpoint. This prevents path traversal and other potential injection attacks.

Modified:

  • relay/src/routes/system.ts: implemented strict regex validation for serviceName

Added:

  • relay/src/tests/service-logs-security.test.ts: security tests for the logs endpoint

Replaced loose string-based validation with strict whitelist-based
regular expression validation for service names in the logs endpoint.
This prevents path traversal and other potential injection attacks.

Modified:
- relay/src/routes/system.ts: implemented strict regex validation for `serviceName`

Added:
- relay/src/tests/service-logs-security.test.ts: security tests for the logs endpoint

Co-authored-by: scobru <1079164+scobru@users.noreply.github.com>
@scobru scobru merged commit 3090ed0 into main Apr 27, 2026
0 of 4 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