Repository navigation
Conversation
Contributor
Windows Unit Test Results 3 files 21 suites 1m 6s ⏱️ Results for commit baf5180. |
Contributor
Contributor
Contributor
|
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Sanitization leaves sudo.log, warn, and localmessages behind, while unit discovery can abort generalization on journal-only images with no matching syslog units.
2 open issues
What changed in this PR
Adds security-focused log cleanup to AgentBaker’s Linux image generalization before capture, without changing node-mode behavior.
Changes:
- Clears selected authentication/system logs, login history, and persistent journals while preventing late writes.
- Runs cleanup after agent deprovisioning and installation, in image mode only.
- Documents the behavior and adds cleanup, preservation, and failure-handling tests.
| File | Description |
|---|---|
| aks-node-controller/README.md | Documents image-mode log sanitization. |
| aks-node-controller/generalize/logs.go | Implements cleanup and late-write protection. |
| aks-node-controller/generalize/generalize.go | Adds the image-only cleanup step before sync. |
| aks-node-controller/generalize/generalize_test.go | Tests cleanup, preserved files, and failure handling. |
Review effort: Max
| "secure", | ||
| "messages", | ||
| "auth.log", | ||
| "syslog", |
Comment on lines
+27
to
+28
| output, err := g.runCmd(ctx, "systemctl", "list-unit-files", "--no-legend", "--no-pager", | ||
| "rsyslog.service", "syslog-ng.service", "syslog.socket") |
This branch has not been deployed
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.

What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #