False positive (javascript): "Invalid regular expression flag" for v flag
Open
false-positive
- Dominant language
- CodeQL
- Stars
- 10.1k
- Forks
- 2.1k
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 141
Description
**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)**
Contributor guide
Research direction
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.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- security
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100