无法使用 http.send 请求资源

Unable to request resources using http.send

当我运行以下代码时:

data := response {
    response := http.send({
        "method" : "GET",
        "url": "https://httpbin.org/status/200"
    })
}

我收到这个错误:

1 error occurred: policy.rego:4: rego_type_error: unsafe built-in function calls in expression: http.send

我正在使用 rego 播放 运行 该政策。 https://play.openpolicyagent.org/p/iqK8Zt5L62

我认为这是 playground 特有的,因为允许从那里发送任意 HTTP 请求可能会被滥用。您的规则在任何其他情况下都应该可以正常工作。