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

Remediation status does not change after being "error" #4949

Open
eleftherias opened this issue Nov 12, 2024 · 0 comments
Open

Remediation status does not change after being "error" #4949

eleftherias opened this issue Nov 12, 2024 · 0 comments
Labels
bug Something isn't working good first issue Good for newcomers P2 Nice to fix: non-critical items that should be evaluated and planned during issue triage

Comments

@eleftherias
Copy link
Contributor

Describe the issue

When a rule remediation fails, the remediation status is set to "error". If the cause of the error is fixed, then the remediation status should change, but it stays as "error".

For example, I had the rule type scorecard_enabled and initially it failed because I hadn't set a field that was required by the remediation. This was the YAML output:

      remediationDetails: 'cannot get PR remediation params: cannot create PR entries: cannot execute content template (index 0): template: Content[0]:26:36: executing "Content[0]" at <.Profile.sarif_file>: map has no entry for key "sarif_file"'
      remediationLastUpdated: "2024-11-12T12:41:55.941493Z"
      remediationStatus: error

Then, I set the sarif_file and the new YAML output was:

      remediationDetails: 'generic remediation error status: error'
      remediationLastUpdated: "2024-11-12T12:42:45.319731Z"
      remediationStatus: error

The same rule configuration does not produce a remediation error if applied from the start (i.e if there wasn't already an error in remediation)

To Reproduce

No response

What version are you using?

No response

@eleftherias eleftherias added bug Something isn't working good first issue Good for newcomers P2 Nice to fix: non-critical items that should be evaluated and planned during issue triage labels Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers P2 Nice to fix: non-critical items that should be evaluated and planned during issue triage
Projects
None yet
Development

No branches or pull requests

1 participant