Repository navigation
Security: log only the host when a ping fails - #26
Merged
Merged
Conversation
The failure record wrote the origin and the request path. Some services carry an API key as a path segment rather than in the query string, so a failed ping could write a credential into the container log, where it persists for the life of the log. The origin alone answers the operator's question, which is which service is unreachable. Credentials in the authority and the query string were already excluded; the path is the remaining half.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
u.originalone in the ping failure record, dropping the request path.Credentials in the authority and secrets in the query string were already excluded. The path was not, and several self-hosted services carry an API key as a path segment rather than as a query parameter, so a failed ping could write a live credential into the container log and leave it there for the life of the log.
The origin answers what the operator needs to know, which is which service is unreachable.
Testing
All green, including the Docker build. Added 1 test for the path case and updated 3 existing assertions; no other test asserted on the field.
Checklist