mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
8.8 KiB
8.8 KiB
0.4.1
Minor Analysis Improvements
- The following classes have been moved from
codeql.ruby.frameworks.ActionControllertocodeql.ruby.frameworks.Rails:ParamsCall, now accessed asRails::ParamsCall.CookieCall, now accessed asRails::CookieCall.
- The following classes have been moved from
codeql.ruby.frameworks.ActionViewtocodeql.ruby.frameworks.Rails:HtmlSafeCall, now accessed asRails::HtmlSafeCall.HtmlEscapeCall, now accessed asRails::HtmlEscapeCall.RenderCall, now accessed asRails::RenderCall.RenderToCall, now accessed asRails::RenderToCall.
- Subclasses of
ActionController::Metalare now recognised as controllers. ActionController::DataStreaming::send_fileis now recognized as aFileSystemAccess.- Various XSS sinks in the ActionView library are now recognized.
- Calls to
ActiveRecord::Base.createare now recognized as model instantiations. - Various code executions, command executions and HTTP requests in the ActiveStorage library are now recognized.
MethodBasenow has two new predicates related to visibility:isPublicandisProtected. These hold, respectively, if the method is public or protected.
0.4.0
Breaking Changes
import rubyno longer brings the standard Ruby AST library into scope; it instead brings a moduleAstinto scope, which must be imported. Alternatively, it is also possible to importcodeql.ruby.AST.- Changed the
HTTP::Client::Requestconcept from usingMethodCallas base class, to usingDataFlow::Nodeas base class. Any class that extendsHTTP::Client::Request::Rangemust be changed, but if you only use the member predicates ofHTTP::Client::Request, no changes are required.
Deprecated APIs
- 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
- Uses of
ActionView::FileSystemResolverare now recognized as filesystem accesses. - Accesses of ActiveResource models are now recognized as HTTP requests.
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.3.5
0.3.4
Deprecated APIs
- The utility files previously in the
codeql.ruby.security.performancepackage have been moved to thecodeql.ruby.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.
- Calls to
renderin Rails controllers and views are now recognized as HTTP response bodies.
0.3.3
Minor Analysis Improvements
- Calls to methods generated by ActiveRecord associations are now recognised as
instantiations of ActiveRecord objects. This increases the sensitivity of
queries such as
rb/sql-injectionandrb/stored-xss. - Calls to
ActiveRecord::Base.createandActiveRecord::Base.updateare now recognised as write accesses. - Arguments to
Mime::Type#match?andMime::Type#=~are now recognised as regular expression sources.
0.3.2
Minor Analysis Improvements
- Calls to
Arel.sqlare now recognised as propagating taint from their argument. - Calls to
ActiveRecord::Relation#annotateare now recognized asSqlExecutions so that it will be considered as a sink for queries like rb/sql-injection.
0.3.1
Minor Analysis Improvements
- Fixed a bug causing every expression in the database to be considered a system-command execution sink when calls to any of the following methods exist:
- The
spawn,fspawn,popen4,pspawn,system,_pspawnmethods and the backtick operator from thePOSIX::spawngem. - The
execute_command,rake,rails_command, andgitmethods inRails::Generation::Actions.
- The
- Improved modeling of sensitive data sources, so common words like
certainandsecretaryare no longer considered a certificate and a secret (respectively).
0.3.0
Deprecated APIs
- The
BarrierGuardclass has been deprecated. Such barriers and sanitizers can now instead be created using the newBarrierGuardparameterized module.
0.2.3
Minor Analysis Improvements
- Calls to
Zip::File.openandZip::File.newhave been added asFileSystemAccesssinks. As a result queries likerb/path-injectionnow flag up cases where users may access arbitrary archive files.
0.2.2
Major Analysis Improvements
- Added data-flow support for hashes.
Minor Analysis Improvements
- Support for data flow through instance variables has been added.
- Support of the safe navigation operator (
&.) has been added; there is a new predicateMethodCall.isSafeNavigation().
0.2.1
Bug Fixes
- The Tree-sitter Ruby grammar has been updated; this fixes several issues where Ruby code was parsed incorrectly.
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. - The
getURLmember-predicates of theHTTP::Client::RequestandHTTP::Client::Request::Rangeclasses fromConcepts.qllhave been renamed togetAUrlPart.
Deprecated APIs
ConstantValue::getStringOrSymbolandConstantValue::isStringOrSymbol, which return/hold for all string-like values (strings, symbols, and regular expressions), have been renamed toConstantValue::getStringlikeValueandConstantValue::isStringlikeValue, respectively. The old names have been marked asdeprecated.
Minor Analysis Improvements
- Whereas
ConstantValue::getString()previously returned both string and regular-expression values, it now returns only string values. The same applies toConstantValue::isString(value). - Regular-expression values can now be accessed with the new predicates
ConstantValue::getRegExp(),ConstantValue::isRegExp(value), andConstantValue::isRegExpWithFlags(value, flags). - The
ParseRegExpandRegExpTreeViewmodules are now "internal" modules. Users should usecodeql.ruby.Regexpinstead.
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.
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
getConstantValue()now returns the contents of strings and symbols after escape sequences have been interpreted. For example, for the Ruby string literal"\n",getConstantValue().getString()previously returned a QL string with two characters, a backslash followed byn; now it returns the single-character string "\n" (U+000A, known as newline).getConstantValue().getInt()previously returned incorrect values for integers larger than 231-1 (the largest value that can be represented by the QLinttype). It now returns no result in those cases.- Added
OrmWriteAccessconcept to model data written to a database using an object-relational mapping (ORM) library.
0.0.11
Minor Analysis Improvements
- The
Regexclass is now an abstract class that extendsStringlikeLiteralwith implementations forRegExpLiteraland string literals that 'flow' into functions that are known to interpret string arguments as regular expressions such asRegex.newandString.match. - The regular expression parser now groups sequences of normal characters. This reduces the number of instances of
RegExpNormalChar.
0.0.10
Minor Analysis Improvements
- Added
FileSystemWriteAccessconcept to model data written to the filesystem.
0.0.9
0.0.8
0.0.7
0.0.6
Deprecated APIs
ConstantWriteAccess.getQualifiedName()has been deprecated in favor ofgetAQualifiedName()which can return multiple possible qualified names for a given constant write access.
0.0.5
New Features
- A new library,
Customizations.qll, has been added, which allows for global customizations that affect all queries.