Skip to content

Conversation

@GeekMasher
Copy link
Contributor

Fixes #174

Copilot AI review requested due to automatic review settings June 27, 2025 12:07
@github-actions
Copy link

github-actions bot commented Jun 27, 2025

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes the violation remediation logic and enhances the tests to cover additional scenarios.

  • Updated the remediation logic in the policy module by replacing an "and" operator with an "or" operator.
  • Added new tests to verify remediation behavior both through general and dependabot-specific configurations.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
tests/test_policy_remediate.py Added tests for remediation inheritance and behavior validation.
ghascompliance/policy.py Updated violation logic by changing a boolean operator.
Comments suppressed due to low confidence (2)

tests/test_policy_remediate.py:127

  • The test function name 'testDepdendabotRemediationUsingGeneral' appears to have a typo. Consider renaming it to 'testDependabotRemediationUsingGeneral' for improved clarity.
    def testDepdendabotRemediationUsingGeneral(self):

ghascompliance/policy.py:331

  • Changing the logic from 'and' to 'or' significantly affects the remediation flow. Please add an inline comment to clarify the rationale behind this change for future maintainability.
                return violation_remediation or self.checkViolationAgainstPolicy(

@GeekMasher GeekMasher merged commit dc54241 into main Jun 30, 2025
18 checks passed
@GeekMasher GeekMasher deleted the fix-time-to-remediate branch June 30, 2025 13:23
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.

[Bug]: Time-to-Remediate not detecting threshold breach

2 participants