Repository navigation
Report Group Policy-forced "do not overwrite" instead of fighting it - #85
Merged
Merged
Conversation
Some published GPO baselines enable the Event Log Service policy "Control Event Log behavior when the log file reaches its maximum size" (registry value Retention = 1) on the classic logs. Enable's #73 repair was then undone at every policy refresh and Test failed forever. New Test-RetentionForcedByPolicy (Common) reads that policy; Enable leaves such a log's retention alone and reports the policy to change, and Test's FAIL says the same. The Group Policy paths page says to leave it Disabled or Not configured. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedNext included review available in 47 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Repository: spydisec/WinLogKit/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (9)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Merged
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.
From the review of darkoperator/Windows-Auditing-Guide, whose baseline sets
Retention = 1("do not overwrite") with 4 GB sizes on Application, Security and System.Problem: under such a GPO, Enable's #73 repair (
wevtutil sl /rt:false) is undone at the next policy refresh, and Test fails that log forever with advice (run Enable) that can't work.Change
Test-RetentionForcedByPolicyinWinLogKit.Common.ps1: readsHKLM\SOFTWARE\Policies\Microsoft\Windows\EventLog\<log>\Retentionfor the classic logs (Application, Security, Setup, System; the only ones with this policy, per Microsoft's EventLogService CSP / Event Log Service templates). Compared as text, so a DWORD or string1both count.retention 'do not overwrite' is set by Group Policy (Event Log Service > <log> > Control Event Log behavior when the log file reaches its maximum size): set it to Disabled or Not configured there.Checks: Pester 70/70 on PowerShell 7 and 5.1 (3 new, mocking the registry read: classic logs only; DWORD/string 1 vs 0/absent; wired into Enable and Test). PSScriptAnalyzer clean for the kit;
mkdocs build --strictpasses. Not exercised against a real GPO here.🤖 Generated with Claude Code