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

Variables with same name as built-in should not be considered safe #206

Closed
tsandall opened this issue Dec 21, 2016 · 0 comments
Closed

Variables with same name as built-in should not be considered safe #206

tsandall opened this issue Dec 21, 2016 · 0 comments
Labels

Comments

@tsandall
Copy link
Member

Currently, policy authors can use built-in names for local variables and the compiler will not complain.

However, the compiler should not automatically consider these variables safe:

> abs(eq, 1)
error: 1:1: expected number (operand abs is not a number): unbound value: eq
@tsandall tsandall added the bug label Dec 21, 2016
tsandall added a commit to tsandall/opa that referenced this issue Dec 22, 2016
The built-in operator names should never have been added to the ReservedVars
set. These changes remove them from the ReservedVars set so they are not
considered global/safe when performing the safety checks.

Fixes open-policy-agent#206
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant