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

feat: adding scopedenforcementactions #3321

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

JaydipGabani
Copy link
Contributor

@JaydipGabani JaydipGabani commented Mar 18, 2024

What this PR does / why we need it:

Which issue(s) this PR fixes (optional, using fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when the PR gets merged):
Fixes #2266 #2945

Special notes for your reviewer:
Depends on #frameworks/403

Signed-off-by: Jaydip Gabani <gabanijaydip@gmail.com>
Signed-off-by: Jaydip Gabani <gabanijaydip@gmail.com>
@codecov-commenter
Copy link

codecov-commenter commented Mar 21, 2024

Codecov Report

Attention: Patch coverage is 41.91617% with 97 lines in your changes are missing coverage. Please review.

Project coverage is 46.83%. Comparing base (3350319) to head (fb231e6).
Report is 56 commits behind head on master.

Files Patch % Lines
pkg/webhook/policy.go 15.51% 47 Missing and 2 partials ⚠️
pkg/util/enforcement_action.go 46.42% 23 Missing and 7 partials ⚠️
pkg/audit/manager.go 6.66% 14 Missing ⚠️
cmd/gator/test/test.go 0.00% 3 Missing ⚠️
pkg/gator/test/test.go 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3321      +/-   ##
==========================================
- Coverage   54.49%   46.83%   -7.67%     
==========================================
  Files         134      218      +84     
  Lines       12329    14857    +2528     
==========================================
+ Hits         6719     6958     +239     
- Misses       5116     7090    +1974     
- Partials      494      809     +315     
Flag Coverage Δ
unittests 46.83% <41.91%> (-7.67%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Jaydip Gabani <gabanijaydip@gmail.com>
pkg/audit/manager_test.go Outdated Show resolved Hide resolved
@@ -2,6 +2,8 @@ module github.com/open-policy-agent/gatekeeper/v3

go 1.21

replace github.com/open-policy-agent/frameworks/constraint => /mount/d/go/src/github.com/open-policy-agent/frameworks/constraint
Copy link
Member

Choose a reason for hiding this comment

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

commenting so we don't forget updating this

wantViolation: true,
},
{
name: "audit excluded from constraint",
Copy link
Member

Choose a reason for hiding this comment

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

webhook?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

can you clarify a little more here wdym? @sozercan

This is a test for constraint without audit enforcementPoint.

Signed-off-by: Jaydip Gabani <gabanijaydip@gmail.com>
Signed-off-by: Jaydip Gabani <gabanijaydip@gmail.com>
Signed-off-by: Jaydip Gabani <gabanijaydip@gmail.com>
Signed-off-by: Jaydip Gabani <gabanijaydip@gmail.com>
Signed-off-by: Jaydip Gabani <gabanijaydip@gmail.com>
Signed-off-by: Jaydip Gabani <gabanijaydip@gmail.com>
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.

Disable audit for constraint
3 participants