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

Provide better error message when branch protection API are disabled #273

Open
blkt opened this issue May 27, 2024 · 1 comment
Open

Provide better error message when branch protection API are disabled #273

blkt opened this issue May 27, 2024 · 1 comment
Labels
good first issue Good for newcomers P2 Nice to fix: non-critical items that should be evaluated and planned during issue triage

Comments

@blkt
Copy link
Contributor

blkt commented May 27, 2024

In case a repository is configured with Branch Protection API disabled, any remediation action will fail giving an ugly error message (see "404 branch protection has been disabled" message).

      entity: repository
      entityInfo:
        provider: github-app-blkt
        repo_name: demo-repo-python
        repo_owner: blkt
        repository_id: cbad8277-cf35-431c-a92f-48be2d3e8c5a
      profileId: 4d59b709-d3d7-417c-8086-dc0b79034be4
      remediationDetails: 'error getting branch protection: error getting branch protection: GET https://api.github.com/repos/blkt/demo-repo-python/branches/main/protection: 404 Branch protection has been disabled on this reposito>
      remediationStatus: error
      ruleDescriptionName: branch_protection_allow_force_pushes
      ruleId: 6a29d6fe-73c7-4d2d-b8d1-fa0517366d65
      ruleName: branch_protection_allow_force_pushes
      ruleTypeName: branch_protection_allow_force_pushes
      status: failure

We should provide the user a better message in case the API is not enabled.

@evankanderson evankanderson added the P2 Nice to fix: non-critical items that should be evaluated and planned during issue triage label Aug 27, 2024
@evankanderson evankanderson added the good first issue Good for newcomers label Jan 14, 2025
@evankanderson
Copy link
Member

This is probably just an improvement in the rule definition at this point.

@evankanderson evankanderson transferred this issue from mindersec/minder Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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

2 participants