Skip to content

Commit e3002aa

Browse files
committed
Python: model for sys.exc_info
made _easy_ by API graphs :D
1 parent 0ea2f45 commit e3002aa

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

python/ql/src/semmle/python/frameworks/Stdlib.qll

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ private import python
77
private import semmle.python.dataflow.new.DataFlow
88
private import semmle.python.dataflow.new.TaintTracking
99
private import semmle.python.dataflow.new.RemoteFlowSources
10+
private import semmle.python.ApiGraphs
1011
private import semmle.python.Concepts
1112
private import PEP249
1213

@@ -1788,6 +1789,11 @@ private class Exception extends ExceptionSource::Range {
17881789
}
17891790
}
17901791

1792+
/** A call to `sys.exc_info` */
1793+
private class SysExcInfoCall extends ErrorInfoSource::Range, DataFlow::CfgNode {
1794+
SysExcInfoCall() { this = API::moduleImport("sys").getMember("exc_info").getACall() }
1795+
}
1796+
17911797
// ---------------------------------------------------------------------------
17921798
// OTHER
17931799
// ---------------------------------------------------------------------------

0 commit comments

Comments
 (0)