ellipsis operator
The three-dot token in a Semgrep pattern, which stands for any arguments, any string contents or any statements in between.
In more detail
It saves writing a separate pattern for every number of arguments or every possible statement in between. Metavariables and ellipses together let one rule cover many spellings of the same risky code.
Related terms
- metavariable — A placeholder in a Semgrep pattern, written as a dollar sign and capital letters such as $X, that matches any expression.
- Semgrep — An open-source static analysis tool whose rules look like the code they match, with metavariables and ellipses for the parts that vary.
Taught in
- Static Application Security Testing with Semgrep — Cloud Security & DevSecOps Engineering