Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to request resources using http.send

When I run the following code:

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

I get this error:

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

Im using the rego play to run that policy. https://play.openpolicyagent.org/p/iqK8Zt5L62

like image 694
Karim H Avatar asked Jul 28 '26 03:07

Karim H


1 Answers

I believe that is specific to the playground, as allowing arbitrary HTTP requests to be sent from there could potentially be misused. Your rule should work fine in any other context.

like image 151
Devoops Avatar answered Jul 31 '26 00:07

Devoops



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!