Repository navigation
fix(processor): log symlinks leading outside /dev at debug unless allowed - #27
Merged
Merged
Conversation
…owed Every whole-/dev mount holds symlinks into /proc and /run (/dev/stdin, /dev/fd, /dev/log, /dev/core, ...). Each was a WARN on every pass for every such container, which buried the warnings that matter. Log them at DEBUG, and keep the WARN for a path an explicit allow glob names, where the operator expected a device, as for a dangling name. The skip itself is unchanged.
7 of 11 tasks
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
Every container that bind-mounts all of
/devcontains standard symlinks into/procand/run:/dev/fd,/dev/stdin,/dev/stdout,/dev/stderr,/dev/core,/dev/logand/dev/initctl. The daemon correctly skips each one asoutside_dev, but it also logged a WARN for each of them. In the first 1.0.0 deployment that meant 7 warnings per/devconsumer on every reconcile pass.After this change, these links are logged at DEBUG. The WARN stays for a path that an explicit allow glob names, because there the operator expected a device. This is the same rule the daemon already applies to dangling names (
skipUnresolvable). Only the log level changes:outside_devskip metric are unchanged;/devat all;Tests:
TestCollect_SymlinkOutsideDevRejectednow requires DEBUG when no allow glob names the link.TestCollect_SymlinkOutsideDevWarnsOnlyWhenAllowedchecks that a matching link warns and a non-matching one logs at DEBUG.The README,
docs/architecture.mdand the trust-boundary skill describe the new behavior.Pull request checklist
masterbranchmake checklocally before creating the commit and it has run successfullyWIPcommits in this PRType of changes