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

Test use case Secret Push Protection check #4627

Open
blkt opened this issue Oct 3, 2024 · 0 comments
Open

Test use case Secret Push Protection check #4627

blkt opened this issue Oct 3, 2024 · 0 comments
Assignees
Labels
P0 Fix Now: These are urgent issues that preempt other work in the current sprint

Comments

@blkt
Copy link
Contributor

blkt commented Oct 3, 2024

Write an integration test covering the code path that goes from Minder receiving a webhook event to Minder opening a PR.

The test should cover

  • webhook handler
  • transmission of the event through watermill from the handler to the executor (preferably via Postgres)
  • execution of the desired ingestion engine
  • execution of the desired evaluation engine
  • execution of the desired remediation engine

The test should check that a PR comment with the expected content is created.

Acceptance criteria

Given a profile test exists
Given profile test has a rule of type secret_push_protection
Given remediate is disabled in profile test
When I receive a webhook event about a repository
Then a record exists in history with status failed

Given a profile test exists
Given profile test has a rule of type secret_push_protection
Given remediate is enabled in profile test
When I receive a webhook event about a repository
Then a record exists in history with status failed
Then request is made to enable Secret Push Protection

@blkt blkt changed the title Test Secret Push Protection check use case Test use case Secret Push Protection check Oct 3, 2024
@blkt blkt added the P0 Fix Now: These are urgent issues that preempt other work in the current sprint label Oct 9, 2024
@blkt blkt self-assigned this Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P0 Fix Now: These are urgent issues that preempt other work in the current sprint
Projects
None yet
Development

No branches or pull requests

1 participant