Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for overriding rule severity level with baselines #1180

Closed
BernieWhite opened this issue Jul 23, 2022 · 0 comments · Fixed by #2621
Closed

Add support for overriding rule severity level with baselines #1180

BernieWhite opened this issue Jul 23, 2022 · 0 comments · Fixed by #2621
Assignees
Labels
enhancement New feature or request feature: baselines Issues that affect baselines
Milestone

Comments

@BernieWhite
Copy link
Member

BernieWhite commented Jul 23, 2022

PSRule v2 introduced a severity level for rules that can be configured as Error, Warning, or Information.

The Level can be defined on each rule or inherits from the default Error level.

It would be helpful for some scenarios to be able to override the severity level for rules with a baseline.


Please 👍 if you have a specific requirement for this issue.


Update 2023-05-07

A baseline can override the severity by specifying the name of the rule and the severity level.

---
# Synopsis: A custom baseline.
apiVersion: github.com/microsoft/PSRule/v1
kind: Baseline
metadata:
  name: Corp.Azure
spec:
  rule:
    tag:
      release: GA
  override:
    level:
      Azure.APIM.APIDescriptors: Information
      Azure.Template.UseLocationParameter: Error

Update 2023-08-28

To support reporting of this we should include ruleConfigurationOverrides in SARIF to identify and rules that have been overridden.

@BernieWhite BernieWhite added enhancement New feature or request feature: baselines Issues that affect baselines labels Jul 23, 2022
@BernieWhite BernieWhite added this to the v2.7.0 milestone Oct 6, 2022
@BernieWhite BernieWhite modified the milestones: v2.7.0, v2.8.0 Nov 21, 2022
@BernieWhite BernieWhite modified the milestones: v2.8.0, v2.9.0 Mar 23, 2023
@BernieWhite BernieWhite modified the milestones: v2.9.0, v3.0.0 May 30, 2023
@BernieWhite BernieWhite modified the milestones: v3.0.0, v3.1.0 May 7, 2024
@BernieWhite BernieWhite modified the milestones: v3.1.0, v3.0.0 Nov 21, 2024
BernieWhite added a commit to BernieWhite/PSRule that referenced this issue Nov 21, 2024
@BernieWhite BernieWhite self-assigned this Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature: baselines Issues that affect baselines
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant