False positive (javascript): "Invalid regular expression flag" for v flag
Offen
false-positive
- Vorherrschende Sprache
- CodeQL
- Sterne
- 10.1k
- Forks
- 2.1k
- Ø Merge
- 2 T. 15 Std.
- Gemergte PRs (30 T.)
- 141
Beschreibung
**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)**
Beitragsleitfaden
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript
- Bereich
- security
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100