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

Add option to use inaccessible accumulator var #1097

Merged
merged 2 commits into from
Jan 7, 2025

Conversation

jnthntatum
Copy link
Collaborator

@jnthntatum jnthntatum commented Dec 17, 2024

Add an option to use @result as the accumulator variable for builtin comprehensions. The current default __result__ is accessible in the CEL Source, allowing for expressions to type check but lead to unexpected or incorrect results. @result' isn't a normally accessible identifier in the source expression so a bit safer as a default.

@jnthntatum jnthntatum force-pushed the restrict-accu-var branch 3 times, most recently from 690e79c to dc1bbd5 Compare December 17, 2024 21:39
@jnthntatum jnthntatum marked this pull request as ready for review December 17, 2024 22:07
Add an option to use '@Result' as the accumulator variable for builtin
comprehensions. The current default "__result__" is accesible in the CEL
Source, allowing for expressions to type check but lead to unexpected or
incorrect results. '@Result' isn't a normally accessible identifier in the
source expression so a bit safer as a default.
@jnthntatum jnthntatum merged commit fa6eb32 into google:master Jan 7, 2025
2 checks passed
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.

2 participants