Skip to content

Add "Advanced Audit Policy" Rule Handling#1556

Draft
FrederickGeek8 wants to merge 2 commits into
microsoft:devfrom
FrederickGeek8:fix-auditpol-advanced
Draft

Add "Advanced Audit Policy" Rule Handling#1556
FrederickGeek8 wants to merge 2 commits into
microsoft:devfrom
FrederickGeek8:fix-auditpol-advanced

Conversation

@FrederickGeek8

@FrederickGeek8 FrederickGeek8 commented Jun 17, 2026

Copy link
Copy Markdown

Pull Request (PR) description:

This PR adds proper handling for "Advanced Audit Policy" rules that were not being applied (as was reported in #1533). These rules appear in Windows 10, 11, and Server STIGs are currently are no-ops. In essence, this PR is just changing the parsing logic of AuditPolicyRule to support the new language used by those items.

This PR is marked as "WIP", but please do a review and help me answer some PowerStig contribution-specific questions :)

  • My approach was to break copy AuditPolicyRuleConvert into a new file rather than overload the parsing of AuditPolicyRuleConvert. Do we want to keep this delineation or merge the two?
  • I was not creative when I came up with the name "AuditPolicyRuleAdvancedConvert". What should we change it to?
  • I did not update or write any unit tests. I manually tested my code with a few checklists. I will have to figure out how tests are written in this repo. Suggestions on how to approach tests would be appreciated.
  • Once we are happy with the code, I will update the xml outputs that are stored in the repo. For now, I have not added the updated outputs.

This Pull Request (PR) fixes the following issues:

This PR fixes #1533 (and other related STIGs like Win11 and WinServer)

Task list:

  • Change details added to Unreleased section of CHANGELOG.md (Not required for Convert modules)?
  • Added/updated documentation, comment-based help and descriptions where appropriate?
  • Examples appropriately updated?
  • New/changed code adheres to Style Guidelines?
  • Unit and (optional) Integration tests created/updated where possible?

I'd appreciate answers to my "WIP blocking" questions above and other feedback on this approach. Thanks!

No code has been changed. This new module will be modified for
"Advanced" audit policy parsing in another commit. Making a copy here
makes the changes in subsequent commits more obvious.
This assumes a certain stability in the RawString text, but the pattern
seems to hold for now.
@FrederickGeek8

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree company="Full Spectrum Software LLC"

@FrederickGeek8

FrederickGeek8 commented Jun 22, 2026

Copy link
Copy Markdown
Author

@MrAutomater can you (or someone else) take a look at this and tell me if it's a reasonable approach for addressing #1533?

If I get a thumbs up for this general approach then I can work on adding tests, rebasing, and updating generated files.

Thanks!

@MrAutomater

MrAutomater commented Jun 22, 2026 via email

Copy link
Copy Markdown
Collaborator

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.

Win10 "Advanced Audit Policy" Rules Not Applied

2 participants