github / github/codeql-cli-binaries

CodeQL: Make any() expression and exists() formula variable identifier optional

Đang mở
#53 4 bình luận 0 reaction 0 người được giao Xem trên GitHub
CLI Engine: Compiler and Optimiser enhancement QLIP
Ngôn ngữ chính
Không có dữ liệu ngôn ngữ
Star
1k
Fork
184
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

What do you think about making the variable identifiers of the CodeQL [`any(...)` expression](https://codeql.github.com/docs/ql-language-reference/expressions/#any) and [`exists(...)` formula](https://codeql.github.com/docs/ql-language-reference/formulas/#exists) optional if they do not have any formulas?
Currently the CodeQL language specification requires an identifier even though it is not used.

Examples:
```ql
exists(GadgetClass unused) // Check whether a vulnerable "gadget" class exists on the class path
and any(CustomMethodCall unused).getArgument(0) instanceof CustomArgument
```
Here in both cases it is currently necessary to specify a variable identifier (`unused`), even though it is not used.

For the `exists` formula this could lead to some ambiguity because it currently allows using expressions (e.g. `exists(call.getAnArgument())`), however because type names as part of variable declarations cannot contain a period, this should be unambiguous.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.