mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
9.3 KiB
9.3 KiB
0.6.1
Minor Analysis Improvements
- Added the ability to refer to subscript operations in the API graph. It is now possible to write
response().getMember("cookies").getASubscript()to find code likeresp.cookies["key"](assumingresponsereturns an API node for reponse objects). - Added modeling of creating Flask responses with
flask.jsonify.
0.6.0
Deprecated APIs
- Some unused predicates in
SsaDefinitions.qll,TObject.qll,protocols.qll, and thepointsto/folder have been deprecated. - Some classes/modules with upper-case acronyms in their name have been renamed to follow our style-guide. The old name still exists as a deprecated alias.
Minor Analysis Improvements
- Changed
CallNode.getArgByNamesuch that it has results for keyword arguments given after a dictionary unpacking argument, as thebar=2argument infunc(foo=1, **kwargs, bar=2). getStarArgmember-predicate onCallandCallNodehas been changed for calls that have multiple*argsarguments (for examplefunc(42, *my_args, *other_args)): Instead of producing no results, it will always have a result for the first such*argsargument.- Reads of global/non-local variables (without annotations) inside functions defined on classes now works properly in the case where the class had an attribute defined with the same name as the non-local variable.
Bug Fixes
- Fixed an issue in the taint tracking analysis where implicit reads were not allowed by default in sinks or additional taint steps that used flow states.
0.5.5
0.5.4
Deprecated APIs
- Many classes/predicates/modules with upper-case acronyms in their name have been renamed to follow our style-guide. The old name still exists as a deprecated alias.
- The utility files previously in the
semmle.python.security.performancepackage have been moved to thesemmle.python.security.regexppackage.
The previous files still exist as deprecated aliases.
Minor Analysis Improvements
- Most deprecated predicates/classes/modules that have been deprecated for over a year have been deleted.
0.5.3
Minor Analysis Improvements
- Change
.getASubclass()onAPI::Nodeso it allows to follow subclasses even if the class has a class decorator.
0.5.2
0.5.1
Deprecated APIs
- The documentation of API graphs (the
APImodule) has been expanded, and some of the members predicates ofAPI::Nodehave been renamed as follows:getAnImmediateUse->asSourcegetARhs->asSinkgetAUse->getAValueReachableFromSourcegetAValueReachingRhs->getAValueReachingSink
Minor Analysis Improvements
- Improved modeling of sensitive data sources, so common words like
certainandsecretaryare no longer considered a certificate and a secret (respectively).
0.5.0
Deprecated APIs
- The
BarrierGuardclass has been deprecated. Such barriers and sanitizers can now instead be created using the newBarrierGuardparameterized module.
0.4.1
0.4.0
Breaking Changes
API::moduleImportno longer has any results for dotted names, such asAPI::moduleImport("foo.bar"). UsingAPI::moduleImport("foo.bar").getMember("baz").getACall()previously worked if the Python code wasfrom foo.bar import baz; baz(), but not if the code wasimport foo.bar; foo.bar.baz()-- we are making this change to ensure the approach that can handle all cases is always used.
0.3.0
Breaking Changes
- The imports made available from
import pythonare no longer exposed underDataFlow::after doingimport semmle.python.dataflow.new.DataFlow, for example usingDataFlow::Addwill now cause a compile error.
Minor Analysis Improvements
- The modeling of
request.filesin Flask has been fixed, so we now properly handle assignments to local variables (such asfiles = request.files; files['key'].filename). - Added taint propagation for
io.StringIOandio.BytesIO. This addition was originally submitted as part of an experimental query by @jorgectf.
0.2.0
Breaking Changes
- The signature of
allowImplicitReadonDataFlow::ConfigurationandTaintTracking::Configurationhas changed fromallowImplicitRead(DataFlow::Node node, DataFlow::Content c)toallowImplicitRead(DataFlow::Node node, DataFlow::ContentSet c).
0.1.0
Breaking Changes
- The recently added flow-state versions of
isBarrierIn,isBarrierOut,isSanitizerIn, andisSanitizerOutin the data flow and taint tracking libraries have been removed.
Deprecated APIs
- Queries importing a data-flow configuration from
semmle.python.security.dataflowshould ensure that the imported file ends withQuery, and only import its top-level module. For example, a query that usedCommandInjection::Configurationfromsemmle.python.security.dataflow.CommandInjectionshould from now useConfigurationfromsemmle.python.security.dataflow.CommandInjectionQueryinstead.
Major Analysis Improvements
- Added data-flow for Django ORM models that are saved in a database (no
models.ForeignKeysupport).
Minor Analysis Improvements
- Improved modeling of Flask
Responseobjects, so passing a response body with the keyword argumentresponseis now recognized.
0.0.13
0.0.12
Breaking Changes
- The flow state variants of
isBarrierandisAdditionalFlowStepare no longer exposed in the taint tracking library. TheisSanitizerandisAdditionalTaintSteppredicates should be used instead.
Deprecated APIs
- Many classes/predicates/modules that had upper-case acronyms have been renamed to follow our style-guide. The old name still exists as a deprecated alias.
- Some modules that started with a lowercase letter have been renamed to follow our style-guide. The old name still exists as a deprecated alias.
New Features
- The data flow and taint tracking libraries have been extended with versions of
isBarrierIn,isBarrierOut, andisBarrierGuard, respectivelyisSanitizerIn,isSanitizerOut, andisSanitizerGuard, that support flow states.
Minor Analysis Improvements
- All deprecated predicates/classes/modules that have been deprecated for over a year have been deleted.
0.0.11
Minor Analysis Improvements
- Added new SSRF sinks for
httpx,pycurl,urllib,urllib2,urllib3, andlibtaxii. This improvement was submitted by @haby0. - The regular expression parser now groups sequences of normal characters. This reduces the number of instances of
RegExpNormalChar. - Fixed taint propagation for attribute assignment. In the assignment
x.foo = taintedwe no longer treat the entire objectxas tainted, just because the attributefoocontains tainted data. This leads to slightly fewer false positives. - Improved analysis of attributes for data-flow and taint tracking queries, so
getattr/setattrare supported, and a write to an attribute properly stops flow for the old value in that attribute. - Added post-update nodes (
DataFlow::PostUpdateNode) for arguments in calls that can't be resolved.
0.0.10
Deprecated APIs
- The old points-to based modeling has been deprecated. Use the new type-tracking/API-graphs based modeling instead.
0.0.9
0.0.8
Deprecated APIs
- Moved the files defining regex injection configuration and customization, instead of
import semmle.python.security.injection.RegexInjectionplease useimport semmle.python.security.dataflow.RegexInjection(the same forRegexInjectionCustomizations). - The
codeql/python-upgradesCodeQL pack has been removed. All upgrades scripts have been merged into thecodeql/python-allCodeQL pack.
0.0.7
0.0.6
0.0.5
Minor Analysis Improvements
- Added modeling of many functions from the
osmodule that uses file system paths, such asos.stat,os.chdir,os.mkdir, and so on. - Added modeling of the
tempfilemodule for creating temporary files and directories, such as the functionstempfile.NamedTemporaryFileandtempfile.TemporaryDirectory. - Extended the modeling of FastAPI such that custom subclasses of
fastapi.APIRouterare recognized. - Extended the modeling of FastAPI such that
fastapi.responses.FileResponseare consideredFileSystemAccess. - Added modeling of the
posixpath,ntpath, andgenericpathmodules for path operations (although these are not supposed to be used), resulting in new sinks. - Added modeling of
wsgiref.simple_serverapplications, leading to new remote flow sources.
0.0.4
Major Analysis Improvements
- Added modeling of
os.stat,os.lstat,os.statvfs,os.fstat, andos.fstatvfs, which are new sinks for the Uncontrolled data used in path expression (py/path-injection) query. - Added modeling of the
posixpath,ntpath, andgenericpathmodules for path operations (although these are not supposed to be used), resulting in new sinks for the Uncontrolled data used in path expression (py/path-injection) query. - Added modeling of
wsgiref.simple_serverapplications, leading to new remote flow sources. - Added modeling of
aiopgfor sinks executing SQL. - Added modeling of HTTP requests and responses when using
flask_admin(Flask-AdminPyPI package), which leads to additional remote flow sources. - Added modeling of the PyPI package
toml, which provides encoding/decoding of TOML documents, leading to new taint-tracking steps.