bazelbuild / starlark

Starlark Language
Apache License 2.0
2.38k stars 158 forks source link

Clarify safety on untrusted code #249

Open afq984 opened 1 year ago

afq984 commented 1 year ago

https://github.com/bazelbuild/starlark/blob/ce1fdb0e4eb2c85dfc549ddee4dcf55974392334/README.md?plain=1#L36-L37

The readme says:

It is safe to execute untrusted code.

https://github.com/google/starlark-go/issues/241#issuecomment-816369357 says:

we've never claimed that it is secure for running untrusted code. Scripts can easily cause denial of service by exhausting all memory, or by hash flooding.

It seems like executing arbitrary starlark code could crash a system, but other than that, there should be no way to escape the execution environment. Is this expectation correct?

The safety expectations also sound different from what https://github.com/google/cel-go offers, so it would be great if this could be elaborated in README.

stepancheg commented 1 year ago

(Deleted wrong comment)