github / github/codeql

JS: How to mark the value of a property

Đang mở
#5,969 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
JS question
Ngôn ngữ chính
CodeQL
Star
10.1k
Fork
2.1k
Merge trung bình
2 ngày 15 giờ
Pull request đã merge (30 ngày)
141

Mô tả

The Ajax method accepts a key-pair value group, and I wish to set S in URL :s[n.view] as sink。wuu.....,I can't find way to mark the s。

![image](https://user-images.githubusercontent.com/55187516/120055490-03349500-c026-11eb-9697-11221e5978e3.png)

I can find "url:s" by the property method but I don't know how to work further
```
import javascript
from ObjectExpr oe, Property p1
where
p1 = oe.getProperty(0)
and
p1.getName()="url"

select p1

```

Rough tracking doesn't get any inflow
```
import javascript

class Method_fingerprint extends TaintTracking::Configuration {
Method_fingerprint() { this = "fingerprint" }

override predicate isSource(DataFlow::Node source) {
any()
}

override predicate isSink(DataFlow::Node sink) {
exists(DataFlow::CallNode call |
call.getCalleeName() = "ajax"
and
sink = call.getArgument(0)
)
}
}
from Method_fingerprint pt, DataFlow::Node source, DataFlow::Node sink
where pt.hasFlow(source, sink)
select source, sink
```

The test JavaScript file is shown below
[test.md](https://github.com/github/codeql/files/6563952/test.md)

I'm truly grateful for any help.
thanks!!

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.