Skip to content

Files

Latest commit

 

History

History
14 lines (9 loc) · 493 Bytes

non-literal-require.md

File metadata and controls

14 lines (9 loc) · 493 Bytes

Pattern: Use of non-literal require()

Issue: -

Description

Detects require() function calls for something that is not a string literal. For security reasons, it may be best to only require() string literals. Otherwise, it may be possible for an attacker to somehow change the value and download arbitrary Javascript into your page.

Further Reading