Files
codeql/python/ql/src/Expressions/UnsupportedFormatCharacter.ql
Joe Farebrother 5c4548df45 Tag more quality queries.
Excluded for now for uncertainty: incomplete ordering, import deprecated module
2025-06-19 14:06:57 +01:00

20 lines
501 B
Plaintext

/**
* @name Unsupported format character
* @description An unsupported format character in a format string
* @kind problem
* @tags quality
* reliability
* correctness
* @problem.severity error
* @sub-severity low
* @precision high
* @id py/percent-format/unsupported-character
*/
import python
import semmle.python.strings
from Expr e, int start
where start = illegal_conversion_specifier(e)
select e, "Invalid conversion specifier at index " + start + " of " + repr(e) + "."