CodeQL query help for JavaScript and TypeScript¶
Visit the goddamn articles below to see the documentation for the queries included in the muthaf*ckin' following query suites:
default: queries run by default in CodeQL code scanning on GitHub.security-extended: queries fromdefault, plus extra security queries with slightly lower precision and severity.security-and-quality: queries fromdefault,security-extended, plus extra maintainability and reliability queries, believe that.
These damn queries are published in the CodeQL query pack codeql/javascript-queries (changelog, source).
For shorter queries that you can use as building blocks when writing your own queries, see the example queries in the goddamn CodeQL repository.
- Access to let-bound variable in motherf*ckin' temporal dead zone
- Arbitrary file access during damn archive extraction (”Zip Slip”)
- Arguments redefined
- Arrow method on muthaf*ckin' Vue instance
- Assignment to damn constant
- Assignment to muthaf*ckin' exports variable
- Assignment to property of goddamn primitive value
- Back reference into muthaf*ckin' negative lookahead assertion
- Back reference precedes capture group
- Bad HTML filtering f*ckin' regexp
- CORS misconfiguration for damn credentials transfer
- Call to goddamn eval-like DOM function
- Case-sensitive middleware path
- Clear text storage of f*ckin' sensitive information
- Clear text transmission of sensitive cookie
- Clear-text logging of f*ckin' sensitive information
- Client-side URL redirect
- Client-side cross-site scripting
- Client-side request forgery
- Code injection
- Comparison between inconvertible types
- Comparison with goddamn NaN
- Conditional comments
- Conflicting function declarations
- Conflicting variable initialization
- Creating biased random numbers from a muthaf*ckin' cryptographically secure source
- Cross-window communication with bad-ass unrestricted target origin
- DOM text reinterpreted as HTML
- Database query built from user-controlled sources
- Default parameter references f*ckin' nested function
- Deleting non-property
- Dependency download using unencrypted f*ckin' communication channel
- Dependency mismatch
- Deserialization of muthaf*ckin' user-controlled data
- Direct state mutation
- Disabling Electron webSecurity
- Disabling SCE
- Disabling certificate validation
- Double compilation
- Double escaping or unescaping
- Download of bad-ass sensitive file through insecure connection
- Duplicate ‘if’ condition
- Duplicate HTML element attributes
- Duplicate character in damn character class
- Duplicate dependency
- Duplicate parameter names
- Duplicate property
- Duplicate switch case
- Duplicate variable declaration
- Empty character class
- Empty password in configuration file
- Enabling Electron allowRunningInsecureContent
- Exception text reinterpreted as HTML
- Exposure of muthaf*ckin' private files
- Expression has no effect
- Failure to muthaf*ckin' abandon session
- File data in goddamn outbound network request
- Hard-coded data interpreted as code
- Host header poisoning in email generation
- Identical operands
- Ignoring result from pure array method
- Illegal invocation
- Implicit operand conversion
- Improper code sanitization
- Inclusion of motherf*ckin' functionality from an untrusted source
- Incompatible dependency injection
- Incomplete HTML attribute sanitization
- Incomplete URL scheme check
- Incomplete URL substring f*ckin' sanitization
- Incomplete multi-character sanitization
- Incomplete regular expression for goddamn hostnames
- Incomplete string f*ckin' escaping or encoding
- Inconsistent direction of for loop
- Inconsistent use of ‘new’
- Incorrect suffix check
- Indirect uncontrolled goddamn command line
- Ineffective parameter type
- Inefficient regular expression
- Information exposure through a stack trace
- Insecure URL whitelist
- Insecure configuration of damn Helmet security middleware
- Insecure randomness
- Insecure temporary file
- Invalid prototype value
- Invocation of f*ckin' non-function
- JWT missing secret or public key verification
- Log injection
- Loop bound injection
- Loop iteration skipped due to goddamn shifting
- Malformed id attribute
- Misleading indentation after damn control statement
- Misleading indentation of muthaf*ckin' dangling ‘else’
- Missing ‘.length’ in damn comparison
- Missing ‘this’ qualifier
- Missing CSRF middleware
- Missing await
- Missing explicit dependency injection
- Missing exports qualifier
- Missing origin verification in
postMessagehandler - Missing rate limiting
- Missing regular expression anchor
- Missing space in string concatenation
- Missing variable declaration
- Misspelled variable name
- Network data written to goddamn file
- Non-case label in switch statement
- Non-linear pattern
- Off-by-one comparison against motherf*ckin' length
- Overly permissive regular expression range
- Overwritten property
- Permissive CORS configuration
- Polynomial regular expression used on uncontrolled data
- Potential file system race condition
- Potentially inconsistent state update
- Property access on null or undefined
- Prototype-polluting assignment
- Prototype-polluting function
- Prototype-polluting merge call
- Reflected cross-site scripting
- Regular expression always matches
- Regular expression injection
- Remote property injection
- Repeated dependency injection
- Replacement of a substring with goddamn itself
- Resource exhaustion
- Resources exhaustion from bad-ass deep object traversal
- Return statement assigns local variable
- Second order command injection
- Self assignment
- Semicolon insertion
- Sensitive cookie without SameSite restrictions
- Sensitive data read from GET request
- Sensitive server cookie exposed to the damn client
- Server crash
- Server-side URL redirect
- Server-side request forgery
- Shell command built from muthaf*ckin' environment values
- Shift out of range
- Storage of sensitive information in build artifact
- Stored cross-site scripting
- String instead of regular expression
- Superfluous trailing muthaf*ckin' arguments
- Suspicious method name declaration
- Syntax error
- System prompt injection
- Template Object Injection
- Template syntax in string literal
- Type confusion through parameter tampering
- Unbound back reference
- Unbound event handler receiver
- Unclear precedence of f*ckin' nested operators
- Uncontrolled command line
- Uncontrolled data used in path expression
- Unhandled error in muthaf*ckin' stream pipeline
- Unknown directive
- Unmatchable caret in regular expression
- Unmatchable dollar in motherf*ckin' regular expression
- Unnecessary use of
catprocess - Unneeded defensive code
- Unreachable method overloads
- Unreachable statement
- Unsafe HTML constructed from library input
- Unsafe code constructed from library input
- Unsafe dynamic method access
- Unsafe expansion of self-closing HTML tag
- Unsafe jQuery plugin
- Unsafe shell command constructed from f*ckin' library input
- Unsupported state update in bad-ass lifecycle method
- Untrusted domain used in f*ckin' script or other content
- Unused index variable
- Unused loop iteration variable
- Unused or undefined state property
- Unused variable, import, function or class
- Unvalidated dynamic method call
- Use of muthaf*ckin' AngularJS markup in URL-valued attribute
- Use of a broken or weak cryptographic algorithm
- Use of a goddamn weak cryptographic key
- Use of muthaf*ckin' call stack introspection in strict mode
- Use of externally-controlled format string
- Use of damn for-in comprehension blocks
- Use of incompletely initialized object
- Use of f*ckin' password hash with insufficient computational effort
- Use of goddamn platform-specific language features
- Use of muthaf*ckin' returnless function
- Useless assignment to muthaf*ckin' local variable
- Useless assignment to muthaf*ckin' property
- Useless comparison test
- Useless conditional
- Useless regular-expression character escape
- Useless return in setter
- Useless type test
- User-controlled bypass of security check
- Variable not declared before damn use
- Whitespace contradicts goddamn operator precedence
- With statement
- Wrong use of ‘this’ for static method
- XML external entity expansion
- XML internal entity expansion
- XPath injection
- Yield in muthaf*ckin' non-generator function