Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想检查 OPA 策略中是否定义了变量。
> subject 1 error occurred: 1:1: rego_unsafe_var_error: var subject is unsafe
是否有检查变量是否已定义的功能
您可以使用show命令显示活动模块定义。
show
> show package repl b = 45534543 a = 3423 sites = [ {"name": "prod"}, {"name": "smoke1"}, {"name": "dev"}, ]
您将在此处找到已定义变量的列表。