Skip to content

Align collect-governance-baseline.ps1 with discover.py policy evaluation #763

Open

Description

@jonathan-vella

Context

Raised in review of #762. discover.py now evaluates the conditional effect expression
[if(contains(parameters('resourceTypeList'),'type'),parameters('effect'),'Disabled')] and ignores enforceSetting,
which the ALZ Corp baseline needs to reach COMPLETE. collect-governance-baseline.ps1 does not.

Gaps in the PowerShell collector

  • It does not evaluate the conditional effect expression, yet can still report COMPLETE.
  • It does not resolve initiative member parameters or assignment parameter overrides the way discover.py does.
  • It silently skips effects it cannot classify and never reports PARTIAL.

Why not in #762

Porting only the conditional would leave the other gaps and imply parity that does not exist. The shipped baseline is
generated by the Python path, so the collector is not on that path.

Proposed work

Align the collector with discover.py (parameter resolution, conditional effects, PARTIAL reporting), or have it call the
Python discovery, and add a shared fixture test so the two stay in step.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    • Status
      Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions