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: gatekeeper repo ambiguous prefix #327

Merged
merged 5 commits into from
Jan 29, 2025
Merged

Conversation

itaysk
Copy link
Contributor

@itaysk itaysk commented Jan 23, 2025

Gatekeeper does a prefix-match (startswith) to check if a repo is allowed. this can be leveraged by attackers who create repos with simlar prefix which can bypass the prefix matching (see tests for examples)

related: open-policy-agent/gatekeeper-library#616

@itaysk itaysk requested a review from simar7 as a code owner January 23, 2025 19:14
@itaysk
Copy link
Contributor Author

itaysk commented Jan 23, 2025

the docs generator didn't pick this up BTW, I'm not sure why

@itaysk itaysk marked this pull request as draft January 23, 2025 19:15
@itaysk itaysk marked this pull request as ready for review January 23, 2025 19:24
@itaysk
Copy link
Contributor Author

itaysk commented Jan 23, 2025

FYI @yakirk

@itaysk
Copy link
Contributor Author

itaysk commented Jan 24, 2025

BTW I also wasn't sure if this is a KSV or KUBE check. what's the difference?

@itaysk
Copy link
Contributor Author

itaysk commented Jan 29, 2025

about the docs - this will be covered in a blog post (which is blocked by this PR), i will add a link after it publishes.

@simar7
Copy link
Member

simar7 commented Jan 29, 2025

BTW I also wasn't sure if this is a KSV or KUBE check. what's the difference?

Good catch, I don't think they are different it's probably just not organized. However, changing IDs will cause breakage.

But there are two options:

  1. Add aliases
  2. Deprecate and re-write checks.

@simar7 simar7 added this pull request to the merge queue Jan 29, 2025
Merged via the queue into aquasecurity:main with commit 0afa905 Jan 29, 2025
6 checks passed
@itaysk itaysk deleted the gatekeeper branch January 29, 2025 19:00
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.

3 participants