-
-
Notifications
You must be signed in to change notification settings - Fork 521
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
Potential issue with longest matching branch namespace control rules #8622
Comments
The exact details are mentioned in the linked PR. There was a bug with longest matching, where we weren't properly handling the check for the longest match. With the correct logic, To explain a little more, the algorithm first checks the database and branch names. In this case, it will match all three rows:
Once longest match is applied, it will narrow it down to the longest branch.
The algorithm will now check for the user and host combination. I'm assuming the intention was for I hope this helps! |
That was the intention. It wouldn't matter if only Background: I plan to let untrusted agents (gen AI) perform tasks by generating and executing SQL on short-lived task branches as the
Alright, thanks, that makes sense. I don't know why, probably because I don't work with security that much, but my brain isn't wired to think in terms of longest matching expressions intuitively it seems. Thanks! |
Version: 1.43.19.
Setup:
I would expect ttask to be allowed to create a branch named "task_feature" but that results in an error:
However tadmin can:
The text was updated successfully, but these errors were encountered: