Files
codeql/python/ql/src/Functions/ModificationOfParameterWithDefault.ql

24 lines
710 B
Plaintext

/**
* @name Modification of parameter with default
* @description Modifying the default value of a parameter can lead to unexpected
* results.
* @kind path-problem
* @tags reliability
* maintainability
* @problem.severity error
* @sub-severity low
* @precision high
* @id py/modification-of-default-value
*/
import python
import semmle.python.functions.ModificationOfParameterWithDefault
import DataFlow::PathGraph
from
ModificationOfParameterWithDefault::Configuration config, DataFlow::PathNode source,
DataFlow::PathNode sink
where config.hasFlowPath(source, sink)
select sink.getNode(), source, sink, "This expression mutates a $@.", source.getNode(),
"default value"