Skip to content

Local Rule Exclusion when using a Baseline #2765

Answered by BernieWhite
paulmccrady asked this question in Q&A
Discussion options

You must be logged in to vote

@paulmccrady After doing some more digging and testing, I think the behaviour you are experiencing is intended (to preserve other behaviour) but agree it's not ideal in your case and could be confusing.

The problem stems from:

When baseline options are set, PSRule uses the following order to determine precedence.

  • Parameter - -Name and -Tag.
  • Explicit - A named baseline specified with -Baseline.
  • Workspace - Included in ps-rule.yaml or specified on the command line with -Option.
  • Module - A baseline object included in a .Rule.yaml or .Rule.json file.

After precedence is determined, baselines are merged and null values are ignored.

So in this case:

  • You are explicitly setting the baseline …

Replies: 1 comment 9 replies

Comment options

You must be logged in to vote
9 replies
@paulmccrady
Comment options

@paulmccrady
Comment options

@BernieWhite
Comment options

@BernieWhite
Comment options

Answer selected by paulmccrady
@paulmccrady
Comment options

@BernieWhite
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants