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 a mechanism for limiting the number of expressions #56

Open
lucperkins opened this issue Jun 25, 2024 · 4 comments
Open

Provide a mechanism for limiting the number of expressions #56

lucperkins opened this issue Jun 25, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@lucperkins
Copy link
Contributor

Providing massive expressions is a good way to bring down a server. It's pretty trivial to, for example, write a little script that creates an "or" chain 100,000 Booleans long. Because of this, it'd be good to provide support for optionally limiting the number of expressions evaluated by a Program.

@lucperkins
Copy link
Contributor Author

I have some ideas on how to make this happen and am happy to do the work. Just wanted to see if I encounter any resistance before I submit a PR 😄

@clarkmcc
Copy link
Owner

No resistance from me! That's actually something I've been thinking about recently. I know other CEL implementations do something similar to this, i.e. cel-go.

@lucperkins
Copy link
Contributor Author

@clarkmcc Oh, nice! I was not aware of that implementation, but great to know. Glad you're amenable to this 😄 I'll submit a PR pretty soon here.

@clarkmcc
Copy link
Owner

Documenting for posterity: this should probably be our guiding star for expression cost estimation/limiting.

@clarkmcc clarkmcc added the enhancement New feature or request label Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants