mirror of
https://github.com/github/codeql.git
synced 2025-12-24 12:46:34 +01:00
24 lines
710 B
Plaintext
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"
|