Files
codeql/javascript/ql/examples/constantbrackets.ql
2019-07-26 17:47:11 +02:00

17 lines
390 B
Plaintext

/**
* @name Constant property name in `[]` property access
* @description Finds property accesses using the square bracket notation
* where the property name is a constant string
* @tags property access
* computed
* brackets
* index
* constant
*/
import javascript
from IndexExpr idx
where idx.getIndex() instanceof StringLiteral
select idx