github / github/codeql

False positive (javascript): "Invalid regular expression flag" for v flag

Đang mở
#18,721 3 bình luận 0 reaction 0 người được giao Xem trên GitHub
false-positive
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ả

**Description of the false positive**

`v` is a valid regular expression flag

**Code samples or links to source code**

```js
let x = /abc/v;
```

https://github.com/mozilla/pdf.js/blob/d88035525c69b72ecec2f5ea21b591d2d541a2b5/web/autolinker.js#L112

**URL to the alert on GitHub code scanning (optional)**

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

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

Hướng nghiên cứu

Start with the JavaScript sample and the referenced web/autolinker.js line 112 in pdf.js, then reproduce the code-scanning alert for the /abc/v expression. Trace which regular-expression flag handling produces the warning and verify that the valid v flag no longer triggers it.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
javascript
Lĩnh vực
security
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

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.