mirror of
https://github.com/github/codeql.git
synced 2025-12-17 17:23:36 +01:00
18 lines
425 B
Plaintext
18 lines
425 B
Plaintext
/**
|
|
* @id js/examples/constantbrackets
|
|
* @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
|