Add support for the concept of `fuel`. Limit execution of expressions to be constrained by this `fuel`.
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
Research direction
Start by tracing the expression evaluation and compilation entry points described in the issue, then review how execution cycles could be measured during both static and dynamic analysis. Define how a fuel parameter is passed and enforced, and verify that malicious expressions cannot exceed the configured execution window without breaking normal evaluation.
Written by the indexing model from the issue text.
Description
This would require some static analysis and dynamic analysis to build.
I can tackle this.
This issue is to add support for a fuel parameter when evaluating or compiling expressions. This fuel parameter can then be used to limit the execution window of an expression.
Currently expr cannot be used in outward facing code since we can't really "sanitize" expressions. So in order to prevent DOS attacks via malicious expressions, we should be able to limit the amount of cycles afforded to evaluating an expression.
Happy to tackle this if I get the go ahead that this will be accepted after it's implementation.
- Dominant language
- Go
- Stars
- 8k
- Forks
- 529
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from expr-lang/expr
-
docs needed
Difficulty 1/5 1-3 hours Newbie friendliness 62/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
-
log2 builtin Open
Difficulty 3/5 1-2 days Newbie friendliness 48/100
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
Similar issues
-
feature-request helm
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
gravitational/teleport#69785 ·
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
crossplane/crossplane#7859 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100