diff --git a/.github/workflows/check-change-note.yml b/.github/workflows/check-change-note.yml index 3330e6e1136..70b78ce7294 100644 --- a/.github/workflows/check-change-note.yml +++ b/.github/workflows/check-change-note.yml @@ -16,7 +16,6 @@ on: - "shared/**/*.qll" - "!**/experimental/**" - "!ql/**" - - "!rust/**" - ".github/workflows/check-change-note.yml" jobs: diff --git a/Cargo.lock b/Cargo.lock index 9e7905aa99b..263b16482a9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -419,6 +419,7 @@ dependencies = [ "lazy_static", "rayon", "regex", + "serde_json", "tracing", "tracing-subscriber", "tree-sitter", diff --git a/actions/ql/lib/CHANGELOG.md b/actions/ql/lib/CHANGELOG.md index 53bf9173713..9547b4d4609 100644 --- a/actions/ql/lib/CHANGELOG.md +++ b/actions/ql/lib/CHANGELOG.md @@ -1,3 +1,11 @@ +## 0.4.12 + +### Minor Analysis Improvements + +* Fixed performance issues in the parsing of Bash scripts in workflow files, + which led to out-of-disk errors when analysing certain workflow files with + complex interpolations of shell commands or quoted strings. + ## 0.4.11 No user-facing changes. diff --git a/actions/ql/lib/change-notes/2025-06-09-bash-parsing-performance.md b/actions/ql/lib/change-notes/released/0.4.12.md similarity index 59% rename from actions/ql/lib/change-notes/2025-06-09-bash-parsing-performance.md rename to actions/ql/lib/change-notes/released/0.4.12.md index 5ee29557c85..cf36214eae2 100644 --- a/actions/ql/lib/change-notes/2025-06-09-bash-parsing-performance.md +++ b/actions/ql/lib/change-notes/released/0.4.12.md @@ -1,6 +1,7 @@ ---- -category: minorAnalysis ---- +## 0.4.12 + +### Minor Analysis Improvements + * Fixed performance issues in the parsing of Bash scripts in workflow files, which led to out-of-disk errors when analysing certain workflow files with - complex interpolations of shell commands or quoted strings. \ No newline at end of file + complex interpolations of shell commands or quoted strings. diff --git a/actions/ql/lib/codeql-pack.release.yml b/actions/ql/lib/codeql-pack.release.yml index 80a4283b3e4..530dc320490 100644 --- a/actions/ql/lib/codeql-pack.release.yml +++ b/actions/ql/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 0.4.11 +lastReleaseVersion: 0.4.12 diff --git a/actions/ql/lib/qlpack.yml b/actions/ql/lib/qlpack.yml index 596bf4a14f0..c6a0df46cfc 100644 --- a/actions/ql/lib/qlpack.yml +++ b/actions/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/actions-all -version: 0.4.12-dev +version: 0.4.13-dev library: true warnOnImplicitThis: true dependencies: diff --git a/actions/ql/src/CHANGELOG.md b/actions/ql/src/CHANGELOG.md index 3140211bc4a..b2846cd81fc 100644 --- a/actions/ql/src/CHANGELOG.md +++ b/actions/ql/src/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.6.4 + +No user-facing changes. + ## 0.6.3 No user-facing changes. diff --git a/actions/ql/src/change-notes/released/0.6.4.md b/actions/ql/src/change-notes/released/0.6.4.md new file mode 100644 index 00000000000..7e98b0159fc --- /dev/null +++ b/actions/ql/src/change-notes/released/0.6.4.md @@ -0,0 +1,3 @@ +## 0.6.4 + +No user-facing changes. diff --git a/actions/ql/src/codeql-pack.release.yml b/actions/ql/src/codeql-pack.release.yml index b7dafe32c5d..ced8cf94614 100644 --- a/actions/ql/src/codeql-pack.release.yml +++ b/actions/ql/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 0.6.3 +lastReleaseVersion: 0.6.4 diff --git a/actions/ql/src/qlpack.yml b/actions/ql/src/qlpack.yml index 99c4fd8d02c..4a4bdde8147 100644 --- a/actions/ql/src/qlpack.yml +++ b/actions/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/actions-queries -version: 0.6.4-dev +version: 0.6.5-dev library: false warnOnImplicitThis: true groups: [actions, queries] diff --git a/config/add-overlay-annotations.py b/config/add-overlay-annotations.py index c6e3db24ae0..85b42026d8d 100644 --- a/config/add-overlay-annotations.py +++ b/config/add-overlay-annotations.py @@ -17,16 +17,16 @@ #!/usr/bin/python3 import sys import os +import re from difflib import context_diff +OVERLAY_PATTERN = re.compile(r'overlay\[[a-zA-Z?_-]+\]') def has_overlay_annotations(lines): ''' Check whether the given lines contain any overlay[...] annotations. ''' - overlays = ["local", "local?", "global", "caller", "caller?"] - annotations = [f"overlay[{t}]" for t in overlays] - return any(ann in line for ann in annotations for line in lines) + return any(OVERLAY_PATTERN.search(line) for line in lines) def is_line_comment(line): diff --git a/config/dbscheme-fragments.json b/config/dbscheme-fragments.json index c56289ff171..b8c79fc8f3a 100644 --- a/config/dbscheme-fragments.json +++ b/config/dbscheme-fragments.json @@ -11,6 +11,7 @@ "/*- Diagnostic messages -*/", "/*- Diagnostic messages: severity -*/", "/*- Source location prefix -*/", + "/*- Database metadata -*/", "/*- Lines of code -*/", "/*- Configuration files with key value pairs -*/", "/*- YAML -*/", @@ -31,4 +32,4 @@ "/*- Python dbscheme -*/", "/*- Empty location -*/" ] -} \ No newline at end of file +} diff --git a/config/opcode-qldoc.py b/config/opcode-qldoc.py index e379e6a3ea9..1c892ee3c85 100644 --- a/config/opcode-qldoc.py +++ b/config/opcode-qldoc.py @@ -8,9 +8,9 @@ needs_an_re = re.compile(r'^(?!Unary)[AEIOU]') # Name requiring "an" instead of start_qldoc_re = re.compile(r'^\s*/\*\*') # Start of a QLDoc comment end_qldoc_re = re.compile(r'\*/\s*$') # End of a QLDoc comment blank_qldoc_line_re = re.compile(r'^\s*\*\s*$') # A line in a QLDoc comment with only the '*' -instruction_class_re = re.compile(r'^class (?P[A-aa-z0-9]+)Instruction\s') # Declaration of an `Instruction` class -opcode_base_class_re = re.compile(r'^abstract class (?P[A-aa-z0-9]+)Opcode\s') # Declaration of an `Opcode` base class -opcode_class_re = re.compile(r'^ class (?P[A-aa-z0-9]+)\s') # Declaration of an `Opcode` class +instruction_class_re = re.compile(r'^class (?P[A-Za-z0-9]+)Instruction\s') # Declaration of an `Instruction` class +opcode_base_class_re = re.compile(r'^abstract class (?P[A-Za-z0-9]+)Opcode\s') # Declaration of an `Opcode` base class +opcode_class_re = re.compile(r'^ class (?P[A-Za-z0-9]+)\s') # Declaration of an `Opcode` class script_dir = path.realpath(path.dirname(__file__)) instruction_path = path.realpath(path.join(script_dir, '../cpp/ql/src/semmle/code/cpp/ir/implementation/raw/Instruction.qll')) diff --git a/cpp/downgrades/7bc12b02a4363149f0727a4bce07952dbb9d98aa/builtintypes.ql b/cpp/downgrades/7bc12b02a4363149f0727a4bce07952dbb9d98aa/builtintypes.ql new file mode 100644 index 00000000000..9088493ce34 --- /dev/null +++ b/cpp/downgrades/7bc12b02a4363149f0727a4bce07952dbb9d98aa/builtintypes.ql @@ -0,0 +1,14 @@ +class BuiltinType extends @builtintype { + string toString() { none() } +} + +from BuiltinType type, string name, int kind, int kind_new, int size, int sign, int alignment +where + builtintypes(type, name, kind, size, sign, alignment) and + if + type instanceof @complex_fp16 or + type instanceof @complex_std_bfloat16 or + type instanceof @complex_std_float16 + then kind_new = 2 + else kind_new = kind +select type, name, kind_new, size, sign, alignment diff --git a/cpp/downgrades/7bc12b02a4363149f0727a4bce07952dbb9d98aa/old.dbscheme b/cpp/downgrades/7bc12b02a4363149f0727a4bce07952dbb9d98aa/old.dbscheme new file mode 100644 index 00000000000..7bc12b02a43 --- /dev/null +++ b/cpp/downgrades/7bc12b02a4363149f0727a4bce07952dbb9d98aa/old.dbscheme @@ -0,0 +1,2509 @@ + +/** + * An invocation of the compiler. Note that more than one file may be + * compiled per invocation. For example, this command compiles three + * source files: + * + * gcc -c f1.c f2.c f3.c + * + * The `id` simply identifies the invocation, while `cwd` is the working + * directory from which the compiler was invoked. + */ +compilations( + /** + * An invocation of the compiler. Note that more than one file may + * be compiled per invocation. For example, this command compiles + * three source files: + * + * gcc -c f1.c f2.c f3.c + */ + unique int id : @compilation, + string cwd : string ref +); + +/** + * The arguments that were passed to the extractor for a compiler + * invocation. If `id` is for the compiler invocation + * + * gcc -c f1.c f2.c f3.c + * + * then typically there will be rows for + * + * num | arg + * --- | --- + * 0 | *path to extractor* + * 1 | `--mimic` + * 2 | `/usr/bin/gcc` + * 3 | `-c` + * 4 | f1.c + * 5 | f2.c + * 6 | f3.c + */ +#keyset[id, num] +compilation_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * Optionally, record the build mode for each compilation. + */ +compilation_build_mode( + unique int id : @compilation ref, + int mode : int ref +); + +/* +case @compilation_build_mode.mode of + 0 = @build_mode_none +| 1 = @build_mode_manual +| 2 = @build_mode_auto +; +*/ + +/** + * The source files that are compiled by a compiler invocation. + * If `id` is for the compiler invocation + * + * gcc -c f1.c f2.c f3.c + * + * then there will be rows for + * + * num | arg + * --- | --- + * 0 | f1.c + * 1 | f2.c + * 2 | f3.c + * + * Note that even if those files `#include` headers, those headers + * do not appear as rows. + */ +#keyset[id, num] +compilation_compiling_files( + int id : @compilation ref, + int num : int ref, + int file : @file ref +); + +/** + * The time taken by the extractor for a compiler invocation. + * + * For each file `num`, there will be rows for + * + * kind | seconds + * ---- | --- + * 1 | CPU seconds used by the extractor frontend + * 2 | Elapsed seconds during the extractor frontend + * 3 | CPU seconds used by the extractor backend + * 4 | Elapsed seconds during the extractor backend + */ +#keyset[id, num, kind] +compilation_time( + int id : @compilation ref, + int num : int ref, + /* kind: + 1 = frontend_cpu_seconds + 2 = frontend_elapsed_seconds + 3 = extractor_cpu_seconds + 4 = extractor_elapsed_seconds + */ + int kind : int ref, + float seconds : float ref +); + +/** + * An error or warning generated by the extractor. + * The diagnostic message `diagnostic` was generated during compiler + * invocation `compilation`, and is the `file_number_diagnostic_number`th + * message generated while extracting the `file_number`th file of that + * invocation. + */ +#keyset[compilation, file_number, file_number_diagnostic_number] +diagnostic_for( + int diagnostic : @diagnostic ref, + int compilation : @compilation ref, + int file_number : int ref, + int file_number_diagnostic_number : int ref +); + +/** + * If extraction was successful, then `cpu_seconds` and + * `elapsed_seconds` are the CPU time and elapsed time (respectively) + * that extraction took for compiler invocation `id`. + */ +compilation_finished( + unique int id : @compilation ref, + float cpu_seconds : float ref, + float elapsed_seconds : float ref +); + + +/** + * External data, loaded from CSV files during snapshot creation. See + * [Tutorial: Incorporating external data](https://help.semmle.com/wiki/display/SD/Tutorial%3A+Incorporating+external+data) + * for more information. + */ +externalData( + int id : @externalDataElement, + string path : string ref, + int column: int ref, + string value : string ref +); + +/** + * The source location of the snapshot. + */ +sourceLocationPrefix(string prefix : string ref); + +/** + * Information about packages that provide code used during compilation. + * The `id` is just a unique identifier. + * The `namespace` is typically the name of the package manager that + * provided the package (e.g. "dpkg" or "yum"). + * The `package_name` is the name of the package, and `version` is its + * version (as a string). + */ +external_packages( + unique int id: @external_package, + string namespace : string ref, + string package_name : string ref, + string version : string ref +); + +/** + * Holds if File `fileid` was provided by package `package`. + */ +header_to_external_package( + int fileid : @file ref, + int package : @external_package ref +); + +/* + * Version history + */ + +svnentries( + unique int id : @svnentry, + string revision : string ref, + string author : string ref, + date revisionDate : date ref, + int changeSize : int ref +) + +svnaffectedfiles( + int id : @svnentry ref, + int file : @file ref, + string action : string ref +) + +svnentrymsg( + unique int id : @svnentry ref, + string message : string ref +) + +svnchurn( + int commit : @svnentry ref, + int file : @file ref, + int addedLines : int ref, + int deletedLines : int ref +) + +/* + * C++ dbscheme + */ + +extractor_version( + string codeql_version: string ref, + string frontend_version: string ref +) + +@location = @location_stmt | @location_expr | @location_default ; + +/** + * The location of an element that is not an expression or a statement. + * The location spans column `startcolumn` of line `startline` to + * column `endcolumn` of line `endline` in file `file`. + * For more information, see + * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/). + */ +locations_default( + /** The location of an element that is not an expression or a statement. */ + unique int id: @location_default, + int container: @container ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +/** + * The location of a statement. + * The location spans column `startcolumn` of line `startline` to + * column `endcolumn` of line `endline` in file `file`. + * For more information, see + * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/). + */ +locations_stmt( + /** The location of a statement. */ + unique int id: @location_stmt, + int container: @container ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +/** + * The location of an expression. + * The location spans column `startcolumn` of line `startline` to + * column `endcolumn` of line `endline` in file `file`. + * For more information, see + * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/). + */ +locations_expr( + /** The location of an expression. */ + unique int id: @location_expr, + int container: @container ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +/** An element for which line-count information is available. */ +@sourceline = @file | @function | @variable | @enumconstant | @xmllocatable; + +numlines( + int element_id: @sourceline ref, + int num_lines: int ref, + int num_code: int ref, + int num_comment: int ref +); + +diagnostics( + unique int id: @diagnostic, + int severity: int ref, + string error_tag: string ref, + string error_message: string ref, + string full_error_message: string ref, + int location: @location_default ref +); + +files( + unique int id: @file, + string name: string ref +); + +folders( + unique int id: @folder, + string name: string ref +); + +@container = @folder | @file + +containerparent( + int parent: @container ref, + unique int child: @container ref +); + +fileannotations( + int id: @file ref, + int kind: int ref, + string name: string ref, + string value: string ref +); + +inmacroexpansion( + int id: @element ref, + int inv: @macroinvocation ref +); + +affectedbymacroexpansion( + int id: @element ref, + int inv: @macroinvocation ref +); + +case @macroinvocation.kind of + 1 = @macro_expansion +| 2 = @other_macro_reference +; + +macroinvocations( + unique int id: @macroinvocation, + int macro_id: @ppd_define ref, + int location: @location_default ref, + int kind: int ref +); + +macroparent( + unique int id: @macroinvocation ref, + int parent_id: @macroinvocation ref +); + +// a macroinvocation may be part of another location +// the way to find a constant expression that uses a macro +// is thus to find a constant expression that has a location +// to which a macro invocation is bound +macrolocationbind( + int id: @macroinvocation ref, + int location: @location ref +); + +#keyset[invocation, argument_index] +macro_argument_unexpanded( + int invocation: @macroinvocation ref, + int argument_index: int ref, + string text: string ref +); + +#keyset[invocation, argument_index] +macro_argument_expanded( + int invocation: @macroinvocation ref, + int argument_index: int ref, + string text: string ref +); + +/* +case @function.kind of + 1 = @normal_function +| 2 = @constructor +| 3 = @destructor +| 4 = @conversion_function +| 5 = @operator +| 6 = @builtin_function // GCC built-in functions, e.g. __builtin___memcpy_chk +| 7 = @user_defined_literal +| 8 = @deduction_guide +; +*/ + +functions( + unique int id: @function, + string name: string ref, + int kind: int ref +); + +function_entry_point( + int id: @function ref, + unique int entry_point: @stmt ref +); + +function_return_type( + int id: @function ref, + int return_type: @type ref +); + +/** + * If `function` is a coroutine, then this gives the `std::experimental::resumable_traits` + * instance associated with it, and the variables representing the `handle` and `promise` + * for it. + */ +coroutine( + unique int function: @function ref, + int traits: @type ref +); + +/* +case @coroutine_placeholder_variable.kind of + 1 = @handle +| 2 = @promise +| 3 = @init_await_resume +; +*/ + +coroutine_placeholder_variable( + unique int placeholder_variable: @variable ref, + int kind: int ref, + int function: @function ref +) + +/** The `new` function used for allocating the coroutine state, if any. */ +coroutine_new( + unique int function: @function ref, + int new: @function ref +); + +/** The `delete` function used for deallocating the coroutine state, if any. */ +coroutine_delete( + unique int function: @function ref, + int delete: @function ref +); + +purefunctions(unique int id: @function ref); + +function_deleted(unique int id: @function ref); + +function_defaulted(unique int id: @function ref); + +function_prototyped(unique int id: @function ref) + +deduction_guide_for_class( + int id: @function ref, + int class_template: @usertype ref +) + +member_function_this_type( + unique int id: @function ref, + int this_type: @type ref +); + +#keyset[id, type_id] +fun_decls( + int id: @fun_decl, + int function: @function ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); +fun_def(unique int id: @fun_decl ref); +fun_specialized(unique int id: @fun_decl ref); +fun_implicit(unique int id: @fun_decl ref); +fun_decl_specifiers( + int id: @fun_decl ref, + string name: string ref +) +#keyset[fun_decl, index] +fun_decl_throws( + int fun_decl: @fun_decl ref, + int index: int ref, + int type_id: @type ref +); +/* an empty throw specification is different from none */ +fun_decl_empty_throws(unique int fun_decl: @fun_decl ref); +fun_decl_noexcept( + int fun_decl: @fun_decl ref, + int constant: @expr ref +); +fun_decl_empty_noexcept(int fun_decl: @fun_decl ref); +fun_decl_typedef_type( + unique int fun_decl: @fun_decl ref, + int typedeftype_id: @usertype ref +); + +/* +case @fun_requires.kind of + 1 = @template_attached +| 2 = @function_attached +; +*/ + +fun_requires( + int id: @fun_decl ref, + int kind: int ref, + int constraint: @expr ref +); + +param_decl_bind( + unique int id: @var_decl ref, + int index: int ref, + int fun_decl: @fun_decl ref +); + +#keyset[id, type_id] +var_decls( + int id: @var_decl, + int variable: @variable ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); +var_def(unique int id: @var_decl ref); +var_specialized(int id: @var_decl ref); +var_decl_specifiers( + int id: @var_decl ref, + string name: string ref +) +is_structured_binding(unique int id: @variable ref); +var_requires( + int id: @var_decl ref, + int constraint: @expr ref +); + +type_decls( + unique int id: @type_decl, + int type_id: @type ref, + int location: @location_default ref +); +type_def(unique int id: @type_decl ref); +type_decl_top( + unique int type_decl: @type_decl ref +); +type_requires( + int id: @type_decl ref, + int constraint: @expr ref +); + +namespace_decls( + unique int id: @namespace_decl, + int namespace_id: @namespace ref, + int location: @location_default ref, + int bodylocation: @location_default ref +); + +case @using.kind of + 1 = @using_declaration +| 2 = @using_directive +| 3 = @using_enum_declaration +; + +usings( + unique int id: @using, + int element_id: @element ref, + int location: @location_default ref, + int kind: int ref +); + +/** The element which contains the `using` declaration. */ +using_container( + int parent: @element ref, + int child: @using ref +); + +static_asserts( + unique int id: @static_assert, + int condition : @expr ref, + string message : string ref, + int location: @location_default ref, + int enclosing : @element ref +); + +// each function has an ordered list of parameters +#keyset[id, type_id] +#keyset[function, index, type_id] +params( + int id: @parameter, + int function: @parameterized_element ref, + int index: int ref, + int type_id: @type ref +); + +overrides( + int new: @function ref, + int old: @function ref +); + +#keyset[id, type_id] +membervariables( + int id: @membervariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +globalvariables( + int id: @globalvariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +localvariables( + int id: @localvariable, + int type_id: @type ref, + string name: string ref +); + +autoderivation( + unique int var: @variable ref, + int derivation_type: @type ref +); + +orphaned_variables( + int var: @localvariable ref, + int function: @function ref +) + +enumconstants( + unique int id: @enumconstant, + int parent: @usertype ref, + int index: int ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); + +@variable = @localscopevariable | @globalvariable | @membervariable; + +@localscopevariable = @localvariable | @parameter; + +/** + * Built-in types are the fundamental types, e.g., integral, floating, and void. + */ +case @builtintype.kind of + 1 = @errortype +| 2 = @unknowntype +| 3 = @void +| 4 = @boolean +| 5 = @char +| 6 = @unsigned_char +| 7 = @signed_char +| 8 = @short +| 9 = @unsigned_short +| 10 = @signed_short +| 11 = @int +| 12 = @unsigned_int +| 13 = @signed_int +| 14 = @long +| 15 = @unsigned_long +| 16 = @signed_long +| 17 = @long_long +| 18 = @unsigned_long_long +| 19 = @signed_long_long +// ... 20 Microsoft-specific __int8 +// ... 21 Microsoft-specific __int16 +// ... 22 Microsoft-specific __int32 +// ... 23 Microsoft-specific __int64 +| 24 = @float +| 25 = @double +| 26 = @long_double +| 27 = @complex_float // C99-specific _Complex float +| 28 = @complex_double // C99-specific _Complex double +| 29 = @complex_long_double // C99-specific _Complex long double +| 30 = @imaginary_float // C99-specific _Imaginary float +| 31 = @imaginary_double // C99-specific _Imaginary double +| 32 = @imaginary_long_double // C99-specific _Imaginary long double +| 33 = @wchar_t // Microsoft-specific +| 34 = @decltype_nullptr // C++11 +| 35 = @int128 // __int128 +| 36 = @unsigned_int128 // unsigned __int128 +| 37 = @signed_int128 // signed __int128 +| 38 = @float128 // __float128 +| 39 = @complex_float128 // _Complex __float128 +| 40 = @decimal32 // _Decimal32 +| 41 = @decimal64 // _Decimal64 +| 42 = @decimal128 // _Decimal128 +| 43 = @char16_t +| 44 = @char32_t +| 45 = @std_float32 // _Float32 +| 46 = @float32x // _Float32x +| 47 = @std_float64 // _Float64 +| 48 = @float64x // _Float64x +| 49 = @std_float128 // _Float128 +// ... 50 _Float128x +| 51 = @char8_t +| 52 = @float16 // _Float16 +| 53 = @complex_float16 // _Complex _Float16 +| 54 = @fp16 // __fp16 +| 55 = @std_bfloat16 // __bf16 +| 56 = @std_float16 // std::float16_t +| 57 = @complex_std_float32 // _Complex _Float32 +| 58 = @complex_float32x // _Complex _Float32x +| 59 = @complex_std_float64 // _Complex _Float64 +| 60 = @complex_float64x // _Complex _Float64x +| 61 = @complex_std_float128 // _Complex _Float128 +| 62 = @mfp8 // __mfp8 +| 63 = @scalable_vector_count // __SVCount_t +| 64 = @complex_fp16 // _Complex __fp16 +| 65 = @complex_std_bfloat16 // _Complex __bf16 +| 66 = @complex_std_float16 // _Complex std::float16_t +; + +builtintypes( + unique int id: @builtintype, + string name: string ref, + int kind: int ref, + int size: int ref, + int sign: int ref, + int alignment: int ref +); + +/** + * Derived types are types that are directly derived from existing types and + * point to, refer to, transform type data to return a new type. + */ +case @derivedtype.kind of + 1 = @pointer +| 2 = @reference +| 3 = @type_with_specifiers +| 4 = @array +| 5 = @gnu_vector +| 6 = @routineptr +| 7 = @routinereference +| 8 = @rvalue_reference // C++11 +// ... 9 type_conforming_to_protocols deprecated +| 10 = @block +| 11 = @scalable_vector // Arm SVE +; + +derivedtypes( + unique int id: @derivedtype, + string name: string ref, + int kind: int ref, + int type_id: @type ref +); + +pointerishsize(unique int id: @derivedtype ref, + int size: int ref, + int alignment: int ref); + +arraysizes( + unique int id: @derivedtype ref, + int num_elements: int ref, + int bytesize: int ref, + int alignment: int ref +); + +tupleelements( + unique int id: @derivedtype ref, + int num_elements: int ref +); + +typedefbase( + unique int id: @usertype ref, + int type_id: @type ref +); + +/** + * An instance of the C++11 `decltype` operator or C23 `typeof`/`typeof_unqual` + * operator taking an expression as its argument. For example: + * ``` + * int a; + * decltype(1+a) b; + * typeof(1+a) c; + * ``` + * Here `expr` is `1+a`. + * + * Sometimes an additional pair of parentheses around the expression + * changes the semantics of the decltype, e.g. + * ``` + * struct A { double x; }; + * const A* a = new A(); + * decltype( a->x ); // type is double + * decltype((a->x)); // type is const double& + * ``` + * (Please consult the C++11 standard for more details). + * `parentheses_would_change_meaning` is `true` iff that is the case. + */ + +/* +case @decltype.kind of +| 0 = @decltype +| 1 = @typeof // The frontend does not differentiate between typeof and typeof_unqual +; +*/ + +#keyset[id, expr] +decltypes( + int id: @decltype, + int expr: @expr ref, + int kind: int ref, + int base_type: @type ref, + boolean parentheses_would_change_meaning: boolean ref +); + +/* +case @type_operator.kind of +| 0 = @typeof // The frontend does not differentiate between typeof and typeof_unqual +| 1 = @underlying_type +| 2 = @bases +| 3 = @direct_bases +| 4 = @add_lvalue_reference +| 5 = @add_pointer +| 6 = @add_rvalue_reference +| 7 = @decay +| 8 = @make_signed +| 9 = @make_unsigned +| 10 = @remove_all_extents +| 11 = @remove_const +| 12 = @remove_cv +| 13 = @remove_cvref +| 14 = @remove_extent +| 15 = @remove_pointer +| 16 = @remove_reference_t +| 17 = @remove_restrict +| 18 = @remove_volatile +| 19 = @remove_reference +; +*/ + +type_operators( + unique int id: @type_operator, + int arg_type: @type ref, + int kind: int ref, + int base_type: @type ref +) + +/* +case @usertype.kind of +| 0 = @unknown_usertype +| 1 = @struct +| 2 = @class +| 3 = @union +| 4 = @enum +// ... 5 = @typedef deprecated // classic C: typedef typedef type name +// ... 6 = @template deprecated +| 7 = @template_parameter +| 8 = @template_template_parameter +| 9 = @proxy_class // a proxy class associated with a template parameter +// ... 10 objc_class deprecated +// ... 11 objc_protocol deprecated +// ... 12 objc_category deprecated +| 13 = @scoped_enum +// ... 14 = @using_alias deprecated // a using name = type style typedef +| 15 = @template_struct +| 16 = @template_class +| 17 = @template_union +| 18 = @alias +; +*/ + +usertypes( + unique int id: @usertype, + string name: string ref, + int kind: int ref +); + +usertypesize( + unique int id: @usertype ref, + int size: int ref, + int alignment: int ref +); + +usertype_final(unique int id: @usertype ref); + +usertype_uuid( + unique int id: @usertype ref, + string uuid: string ref +); + +/* +case @usertype.alias_kind of +| 0 = @typedef +| 1 = @alias +*/ + +usertype_alias_kind( + int id: @usertype ref, + int alias_kind: int ref +) + +nontype_template_parameters( + int id: @expr ref +); + +type_template_type_constraint( + int id: @usertype ref, + int constraint: @expr ref +); + +mangled_name( + unique int id: @declaration ref, + int mangled_name : @mangledname, + boolean is_complete: boolean ref +); + +is_pod_class(unique int id: @usertype ref); +is_standard_layout_class(unique int id: @usertype ref); + +is_complete(unique int id: @usertype ref); + +is_class_template(unique int id: @usertype ref); +class_instantiation( + int to: @usertype ref, + int from: @usertype ref +); +class_template_argument( + int type_id: @usertype ref, + int index: int ref, + int arg_type: @type ref +); +class_template_argument_value( + int type_id: @usertype ref, + int index: int ref, + int arg_value: @expr ref +); + +@user_or_decltype = @usertype | @decltype; + +is_proxy_class_for( + unique int id: @usertype ref, + int templ_param_id: @user_or_decltype ref +); + +type_mentions( + unique int id: @type_mention, + int type_id: @type ref, + int location: @location ref, + // a_symbol_reference_kind from the frontend. + int kind: int ref +); + +is_function_template(unique int id: @function ref); +function_instantiation( + unique int to: @function ref, + int from: @function ref +); +function_template_argument( + int function_id: @function ref, + int index: int ref, + int arg_type: @type ref +); +function_template_argument_value( + int function_id: @function ref, + int index: int ref, + int arg_value: @expr ref +); + +is_variable_template(unique int id: @variable ref); +variable_instantiation( + unique int to: @variable ref, + int from: @variable ref +); +variable_template_argument( + int variable_id: @variable ref, + int index: int ref, + int arg_type: @type ref +); +variable_template_argument_value( + int variable_id: @variable ref, + int index: int ref, + int arg_value: @expr ref +); + +template_template_instantiation( + int to: @usertype ref, + int from: @usertype ref +); +template_template_argument( + int type_id: @usertype ref, + int index: int ref, + int arg_type: @type ref +); +template_template_argument_value( + int type_id: @usertype ref, + int index: int ref, + int arg_value: @expr ref +); + +@concept = @concept_template | @concept_id; + +concept_templates( + unique int concept_id: @concept_template, + string name: string ref, + int location: @location_default ref +); +concept_instantiation( + unique int to: @concept_id ref, + int from: @concept_template ref +); +is_type_constraint(int concept_id: @concept_id ref); +concept_template_argument( + int concept_id: @concept ref, + int index: int ref, + int arg_type: @type ref +); +concept_template_argument_value( + int concept_id: @concept ref, + int index: int ref, + int arg_value: @expr ref +); + +routinetypes( + unique int id: @routinetype, + int return_type: @type ref +); + +routinetypeargs( + int routine: @routinetype ref, + int index: int ref, + int type_id: @type ref +); + +ptrtomembers( + unique int id: @ptrtomember, + int type_id: @type ref, + int class_id: @type ref +); + +/* + specifiers for types, functions, and variables + + "public", + "protected", + "private", + + "const", + "volatile", + "static", + + "pure", + "virtual", + "sealed", // Microsoft + "__interface", // Microsoft + "inline", + "explicit", + + "near", // near far extension + "far", // near far extension + "__ptr32", // Microsoft + "__ptr64", // Microsoft + "__sptr", // Microsoft + "__uptr", // Microsoft + "dllimport", // Microsoft + "dllexport", // Microsoft + "thread", // Microsoft + "naked", // Microsoft + "microsoft_inline", // Microsoft + "forceinline", // Microsoft + "selectany", // Microsoft + "nothrow", // Microsoft + "novtable", // Microsoft + "noreturn", // Microsoft + "noinline", // Microsoft + "noalias", // Microsoft + "restrict", // Microsoft +*/ + +specifiers( + unique int id: @specifier, + unique string str: string ref +); + +typespecifiers( + int type_id: @type ref, + int spec_id: @specifier ref +); + +funspecifiers( + int func_id: @function ref, + int spec_id: @specifier ref +); + +varspecifiers( + int var_id: @accessible ref, + int spec_id: @specifier ref +); + +explicit_specifier_exprs( + unique int func_id: @function ref, + int constant: @expr ref +) + +attributes( + unique int id: @attribute, + int kind: int ref, + string name: string ref, + string name_space: string ref, + int location: @location_default ref +); + +case @attribute.kind of + 0 = @gnuattribute +| 1 = @stdattribute +| 2 = @declspec +| 3 = @msattribute +| 4 = @alignas +// ... 5 @objc_propertyattribute deprecated +; + +attribute_args( + unique int id: @attribute_arg, + int kind: int ref, + int attribute: @attribute ref, + int index: int ref, + int location: @location_default ref +); + +case @attribute_arg.kind of + 0 = @attribute_arg_empty +| 1 = @attribute_arg_token +| 2 = @attribute_arg_constant +| 3 = @attribute_arg_type +| 4 = @attribute_arg_constant_expr +| 5 = @attribute_arg_expr +; + +attribute_arg_value( + unique int arg: @attribute_arg ref, + string value: string ref +); +attribute_arg_type( + unique int arg: @attribute_arg ref, + int type_id: @type ref +); +attribute_arg_constant( + unique int arg: @attribute_arg ref, + int constant: @expr ref +) +attribute_arg_expr( + unique int arg: @attribute_arg ref, + int expr: @expr ref +) +attribute_arg_name( + unique int arg: @attribute_arg ref, + string name: string ref +); + +typeattributes( + int type_id: @type ref, + int spec_id: @attribute ref +); + +funcattributes( + int func_id: @function ref, + int spec_id: @attribute ref +); + +varattributes( + int var_id: @accessible ref, + int spec_id: @attribute ref +); + +namespaceattributes( + int namespace_id: @namespace ref, + int spec_id: @attribute ref +); + +stmtattributes( + int stmt_id: @stmt ref, + int spec_id: @attribute ref +); + +@type = @builtintype + | @derivedtype + | @usertype + | @routinetype + | @ptrtomember + | @decltype + | @type_operator; + +unspecifiedtype( + unique int type_id: @type ref, + int unspecified_type_id: @type ref +); + +member( + int parent: @type ref, + int index: int ref, + int child: @member ref +); + +@enclosingfunction_child = @usertype | @variable | @namespace + +enclosingfunction( + unique int child: @enclosingfunction_child ref, + int parent: @function ref +); + +derivations( + unique int derivation: @derivation, + int sub: @type ref, + int index: int ref, + int super: @type ref, + int location: @location_default ref +); + +derspecifiers( + int der_id: @derivation ref, + int spec_id: @specifier ref +); + +/** + * Contains the byte offset of the base class subobject within the derived + * class. Only holds for non-virtual base classes, but see table + * `virtual_base_offsets` for offsets of virtual base class subobjects. + */ +direct_base_offsets( + unique int der_id: @derivation ref, + int offset: int ref +); + +/** + * Contains the byte offset of the virtual base class subobject for class + * `super` within a most-derived object of class `sub`. `super` can be either a + * direct or indirect base class. + */ +#keyset[sub, super] +virtual_base_offsets( + int sub: @usertype ref, + int super: @usertype ref, + int offset: int ref +); + +frienddecls( + unique int id: @frienddecl, + int type_id: @type ref, + int decl_id: @declaration ref, + int location: @location_default ref +); + +@declaredtype = @usertype ; + +@declaration = @function + | @declaredtype + | @variable + | @enumconstant + | @frienddecl + | @concept_template; + +@member = @membervariable + | @function + | @declaredtype + | @enumconstant; + +@locatable = @diagnostic + | @declaration + | @ppd_include + | @ppd_define + | @macroinvocation + /*| @funcall*/ + | @xmllocatable + | @attribute + | @attribute_arg; + +@namedscope = @namespace | @usertype; + +@element = @locatable + | @file + | @folder + | @specifier + | @type + | @expr + | @namespace + | @initialiser + | @stmt + | @derivation + | @comment + | @preprocdirect + | @fun_decl + | @var_decl + | @type_decl + | @namespace_decl + | @using + | @namequalifier + | @specialnamequalifyingelement + | @static_assert + | @type_mention + | @lambdacapture; + +@exprparent = @element; + +comments( + unique int id: @comment, + string contents: string ref, + int location: @location_default ref +); + +commentbinding( + int id: @comment ref, + int element: @element ref +); + +exprconv( + int converted: @expr ref, + unique int conversion: @expr ref +); + +compgenerated(unique int id: @element ref); + +/** + * `destructor_call` destructs the `i`'th entity that should be + * destructed following `element`. Note that entities should be + * destructed in reverse construction order, so for a given `element` + * these should be called from highest to lowest `i`. + */ +#keyset[element, destructor_call] +#keyset[element, i] +synthetic_destructor_call( + int element: @element ref, + int i: int ref, + int destructor_call: @routineexpr ref +); + +namespaces( + unique int id: @namespace, + string name: string ref +); + +namespace_inline( + unique int id: @namespace ref +); + +namespacembrs( + int parentid: @namespace ref, + unique int memberid: @namespacembr ref +); + +@namespacembr = @declaration | @namespace; + +exprparents( + int expr_id: @expr ref, + int child_index: int ref, + int parent_id: @exprparent ref +); + +expr_isload(unique int expr_id: @expr ref); + +@cast = @c_style_cast + | @const_cast + | @dynamic_cast + | @reinterpret_cast + | @static_cast + ; + +/* +case @conversion.kind of + 0 = @simple_conversion // a numeric conversion, qualification conversion, or a reinterpret_cast +| 1 = @bool_conversion // conversion to 'bool' +| 2 = @base_class_conversion // a derived-to-base conversion +| 3 = @derived_class_conversion // a base-to-derived conversion +| 4 = @pm_base_class_conversion // a derived-to-base conversion of a pointer to member +| 5 = @pm_derived_class_conversion // a base-to-derived conversion of a pointer to member +| 6 = @glvalue_adjust // an adjustment of the type of a glvalue +| 7 = @prvalue_adjust // an adjustment of the type of a prvalue +; +*/ +/** + * Describes the semantics represented by a cast expression. This is largely + * independent of the source syntax of the cast, so it is separate from the + * regular expression kind. + */ +conversionkinds( + unique int expr_id: @cast ref, + int kind: int ref +); + +@conversion = @cast + | @array_to_pointer + | @parexpr + | @reference_to + | @ref_indirect + | @temp_init + | @c11_generic + ; + +/* +case @funbindexpr.kind of + 0 = @normal_call // a normal call +| 1 = @virtual_call // a virtual call +| 2 = @adl_call // a call whose target is only found by ADL +; +*/ +iscall( + unique int caller: @funbindexpr ref, + int kind: int ref +); + +numtemplatearguments( + unique int expr_id: @expr ref, + int num: int ref +); + +specialnamequalifyingelements( + unique int id: @specialnamequalifyingelement, + unique string name: string ref +); + +@namequalifiableelement = @expr | @namequalifier; +@namequalifyingelement = @namespace + | @specialnamequalifyingelement + | @usertype; + +namequalifiers( + unique int id: @namequalifier, + unique int qualifiableelement: @namequalifiableelement ref, + int qualifyingelement: @namequalifyingelement ref, + int location: @location_default ref +); + +varbind( + int expr: @varbindexpr ref, + int var: @accessible ref +); + +funbind( + int expr: @funbindexpr ref, + int fun: @function ref +); + +@any_new_expr = @new_expr + | @new_array_expr; + +@new_or_delete_expr = @any_new_expr + | @delete_expr + | @delete_array_expr; + +@prefix_crement_expr = @preincrexpr | @predecrexpr; + +@postfix_crement_expr = @postincrexpr | @postdecrexpr; + +@increment_expr = @preincrexpr | @postincrexpr; + +@decrement_expr = @predecrexpr | @postdecrexpr; + +@crement_expr = @increment_expr | @decrement_expr; + +@un_arith_op_expr = @arithnegexpr + | @unaryplusexpr + | @conjugation + | @realpartexpr + | @imagpartexpr + | @crement_expr + ; + +@un_bitwise_op_expr = @complementexpr; + +@un_log_op_expr = @notexpr; + +@un_op_expr = @address_of + | @indirect + | @un_arith_op_expr + | @un_bitwise_op_expr + | @builtinaddressof + | @vec_fill + | @un_log_op_expr + | @co_await + | @co_yield + ; + +@bin_log_op_expr = @andlogicalexpr | @orlogicalexpr; + +@cmp_op_expr = @eq_op_expr | @rel_op_expr; + +@eq_op_expr = @eqexpr | @neexpr; + +@rel_op_expr = @gtexpr + | @ltexpr + | @geexpr + | @leexpr + | @spaceshipexpr + ; + +@bin_bitwise_op_expr = @lshiftexpr + | @rshiftexpr + | @andexpr + | @orexpr + | @xorexpr + ; + +@p_arith_op_expr = @paddexpr + | @psubexpr + | @pdiffexpr + ; + +@bin_arith_op_expr = @addexpr + | @subexpr + | @mulexpr + | @divexpr + | @remexpr + | @jmulexpr + | @jdivexpr + | @fjaddexpr + | @jfaddexpr + | @fjsubexpr + | @jfsubexpr + | @minexpr + | @maxexpr + | @p_arith_op_expr + ; + +@bin_op_expr = @bin_arith_op_expr + | @bin_bitwise_op_expr + | @cmp_op_expr + | @bin_log_op_expr + ; + +@op_expr = @un_op_expr + | @bin_op_expr + | @assign_expr + | @conditionalexpr + ; + +@assign_arith_expr = @assignaddexpr + | @assignsubexpr + | @assignmulexpr + | @assigndivexpr + | @assignremexpr + ; + +@assign_bitwise_expr = @assignandexpr + | @assignorexpr + | @assignxorexpr + | @assignlshiftexpr + | @assignrshiftexpr + ; + +@assign_pointer_expr = @assignpaddexpr + | @assignpsubexpr + ; + +@assign_op_expr = @assign_arith_expr + | @assign_bitwise_expr + | @assign_pointer_expr + ; + +@assign_expr = @assignexpr | @assign_op_expr | @blockassignexpr + +/* + Binary encoding of the allocator form. + + case @allocator.form of + 0 = plain + | 1 = alignment + ; +*/ + +/** + * The allocator function associated with a `new` or `new[]` expression. + * The `form` column specified whether the allocation call contains an alignment + * argument. + */ +expr_allocator( + unique int expr: @any_new_expr ref, + int func: @function ref, + int form: int ref +); + +/* + Binary encoding of the deallocator form. + + case @deallocator.form of + 0 = plain + | 1 = size + | 2 = alignment + | 4 = destroying_delete + ; +*/ + +/** + * The deallocator function associated with a `delete`, `delete[]`, `new`, or + * `new[]` expression. For a `new` or `new[]` expression, the deallocator is the + * one used to free memory if the initialization throws an exception. + * The `form` column specifies whether the deallocation call contains a size + * argument, and alignment argument, or both. + */ +expr_deallocator( + unique int expr: @new_or_delete_expr ref, + int func: @function ref, + int form: int ref +); + +/** + * Holds if the `@conditionalexpr` is of the two operand form + * `guard ? : false`. + */ +expr_cond_two_operand( + unique int cond: @conditionalexpr ref +); + +/** + * The guard of `@conditionalexpr` `guard ? true : false` + */ +expr_cond_guard( + unique int cond: @conditionalexpr ref, + int guard: @expr ref +); + +/** + * The expression used when the guard of `@conditionalexpr` + * `guard ? true : false` holds. For the two operand form + * `guard ?: false` consider using `expr_cond_guard` instead. + */ +expr_cond_true( + unique int cond: @conditionalexpr ref, + int true: @expr ref +); + +/** + * The expression used when the guard of `@conditionalexpr` + * `guard ? true : false` does not hold. + */ +expr_cond_false( + unique int cond: @conditionalexpr ref, + int false: @expr ref +); + +/** A string representation of the value. */ +values( + unique int id: @value, + string str: string ref +); + +/** The actual text in the source code for the value, if any. */ +valuetext( + unique int id: @value ref, + string text: string ref +); + +valuebind( + int val: @value ref, + unique int expr: @expr ref +); + +fieldoffsets( + unique int id: @variable ref, + int byteoffset: int ref, + int bitoffset: int ref +); + +bitfield( + unique int id: @variable ref, + int bits: int ref, + int declared_bits: int ref +); + +/* TODO +memberprefix( + int member: @expr ref, + int prefix: @expr ref +); +*/ + +/* + kind(1) = mbrcallexpr + kind(2) = mbrptrcallexpr + kind(3) = mbrptrmbrcallexpr + kind(4) = ptrmbrptrmbrcallexpr + kind(5) = mbrreadexpr // x.y + kind(6) = mbrptrreadexpr // p->y + kind(7) = mbrptrmbrreadexpr // x.*pm + kind(8) = mbrptrmbrptrreadexpr // x->*pm + kind(9) = staticmbrreadexpr // static x.y + kind(10) = staticmbrptrreadexpr // static p->y +*/ +/* TODO +memberaccess( + int member: @expr ref, + int kind: int ref +); +*/ + +initialisers( + unique int init: @initialiser, + int var: @accessible ref, + unique int expr: @expr ref, + int location: @location_expr ref +); + +braced_initialisers( + int init: @initialiser ref +); + +/** + * An ancestor for the expression, for cases in which we cannot + * otherwise find the expression's parent. + */ +expr_ancestor( + int exp: @expr ref, + int ancestor: @element ref +); + +exprs( + unique int id: @expr, + int kind: int ref, + int location: @location_expr ref +); + +expr_reuse( + int reuse: @expr ref, + int original: @expr ref, + int value_category: int ref +) + +/* + case @value.category of + 1 = prval + | 2 = xval + | 3 = lval + ; +*/ +expr_types( + int id: @expr ref, + int typeid: @type ref, + int value_category: int ref +); + +case @expr.kind of + 1 = @errorexpr +| 2 = @address_of // & AddressOfExpr +| 3 = @reference_to // ReferenceToExpr (implicit?) +| 4 = @indirect // * PointerDereferenceExpr +| 5 = @ref_indirect // ReferenceDereferenceExpr (implicit?) +// ... +| 8 = @array_to_pointer // (???) +| 9 = @vacuous_destructor_call // VacuousDestructorCall +// ... +| 11 = @assume // Microsoft +| 12 = @parexpr +| 13 = @arithnegexpr +| 14 = @unaryplusexpr +| 15 = @complementexpr +| 16 = @notexpr +| 17 = @conjugation // GNU ~ operator +| 18 = @realpartexpr // GNU __real +| 19 = @imagpartexpr // GNU __imag +| 20 = @postincrexpr +| 21 = @postdecrexpr +| 22 = @preincrexpr +| 23 = @predecrexpr +| 24 = @conditionalexpr +| 25 = @addexpr +| 26 = @subexpr +| 27 = @mulexpr +| 28 = @divexpr +| 29 = @remexpr +| 30 = @jmulexpr // C99 mul imaginary +| 31 = @jdivexpr // C99 div imaginary +| 32 = @fjaddexpr // C99 add real + imaginary +| 33 = @jfaddexpr // C99 add imaginary + real +| 34 = @fjsubexpr // C99 sub real - imaginary +| 35 = @jfsubexpr // C99 sub imaginary - real +| 36 = @paddexpr // pointer add (pointer + int or int + pointer) +| 37 = @psubexpr // pointer sub (pointer - integer) +| 38 = @pdiffexpr // difference between two pointers +| 39 = @lshiftexpr +| 40 = @rshiftexpr +| 41 = @andexpr +| 42 = @orexpr +| 43 = @xorexpr +| 44 = @eqexpr +| 45 = @neexpr +| 46 = @gtexpr +| 47 = @ltexpr +| 48 = @geexpr +| 49 = @leexpr +| 50 = @minexpr // GNU minimum +| 51 = @maxexpr // GNU maximum +| 52 = @assignexpr +| 53 = @assignaddexpr +| 54 = @assignsubexpr +| 55 = @assignmulexpr +| 56 = @assigndivexpr +| 57 = @assignremexpr +| 58 = @assignlshiftexpr +| 59 = @assignrshiftexpr +| 60 = @assignandexpr +| 61 = @assignorexpr +| 62 = @assignxorexpr +| 63 = @assignpaddexpr // assign pointer add +| 64 = @assignpsubexpr // assign pointer sub +| 65 = @andlogicalexpr +| 66 = @orlogicalexpr +| 67 = @commaexpr +| 68 = @subscriptexpr // access to member of an array, e.g., a[5] +// ... 69 @objc_subscriptexpr deprecated +// ... 70 @cmdaccess deprecated +// ... +| 73 = @virtfunptrexpr +| 74 = @callexpr +// ... 75 @msgexpr_normal deprecated +// ... 76 @msgexpr_super deprecated +// ... 77 @atselectorexpr deprecated +// ... 78 @atprotocolexpr deprecated +| 79 = @vastartexpr +| 80 = @vaargexpr +| 81 = @vaendexpr +| 82 = @vacopyexpr +// ... 83 @atencodeexpr deprecated +| 84 = @varaccess +| 85 = @thisaccess +// ... 86 @objc_box_expr deprecated +| 87 = @new_expr +| 88 = @delete_expr +| 89 = @throw_expr +| 90 = @condition_decl // a variable declared in a condition, e.g., if(int x = y > 2) +| 91 = @braced_init_list +| 92 = @type_id +| 93 = @runtime_sizeof +| 94 = @runtime_alignof +| 95 = @sizeof_pack +| 96 = @expr_stmt // GNU extension +| 97 = @routineexpr +| 98 = @type_operand // used to access a type in certain contexts (haven't found any examples yet....) +| 99 = @offsetofexpr // offsetof ::= type and field +| 100 = @hasassignexpr // __has_assign ::= type +| 101 = @hascopyexpr // __has_copy ::= type +| 102 = @hasnothrowassign // __has_nothrow_assign ::= type +| 103 = @hasnothrowconstr // __has_nothrow_constructor ::= type +| 104 = @hasnothrowcopy // __has_nothrow_copy ::= type +| 105 = @hastrivialassign // __has_trivial_assign ::= type +| 106 = @hastrivialconstr // __has_trivial_constructor ::= type +| 107 = @hastrivialcopy // __has_trivial_copy ::= type +| 108 = @hasuserdestr // __has_user_destructor ::= type +| 109 = @hasvirtualdestr // __has_virtual_destructor ::= type +| 110 = @isabstractexpr // __is_abstract ::= type +| 111 = @isbaseofexpr // __is_base_of ::= type type +| 112 = @isclassexpr // __is_class ::= type +| 113 = @isconvtoexpr // __is_convertible_to ::= type type +| 114 = @isemptyexpr // __is_empty ::= type +| 115 = @isenumexpr // __is_enum ::= type +| 116 = @ispodexpr // __is_pod ::= type +| 117 = @ispolyexpr // __is_polymorphic ::= type +| 118 = @isunionexpr // __is_union ::= type +| 119 = @typescompexpr // GNU __builtin_types_compatible ::= type type +| 120 = @intaddrexpr // frontend internal builtin, used to implement offsetof +// ... +| 122 = @hastrivialdestructor // __has_trivial_destructor ::= type +| 123 = @literal +| 124 = @uuidof +| 127 = @aggregateliteral +| 128 = @delete_array_expr +| 129 = @new_array_expr +// ... 130 @objc_array_literal deprecated +// ... 131 @objc_dictionary_literal deprecated +| 132 = @foldexpr +// ... +| 200 = @ctordirectinit +| 201 = @ctorvirtualinit +| 202 = @ctorfieldinit +| 203 = @ctordelegatinginit +| 204 = @dtordirectdestruct +| 205 = @dtorvirtualdestruct +| 206 = @dtorfielddestruct +// ... +| 210 = @static_cast +| 211 = @reinterpret_cast +| 212 = @const_cast +| 213 = @dynamic_cast +| 214 = @c_style_cast +| 215 = @lambdaexpr +| 216 = @param_ref +| 217 = @noopexpr +// ... +| 294 = @istriviallyconstructibleexpr +| 295 = @isdestructibleexpr +| 296 = @isnothrowdestructibleexpr +| 297 = @istriviallydestructibleexpr +| 298 = @istriviallyassignableexpr +| 299 = @isnothrowassignableexpr +| 300 = @istrivialexpr +| 301 = @isstandardlayoutexpr +| 302 = @istriviallycopyableexpr +| 303 = @isliteraltypeexpr +| 304 = @hastrivialmoveconstructorexpr +| 305 = @hastrivialmoveassignexpr +| 306 = @hasnothrowmoveassignexpr +| 307 = @isconstructibleexpr +| 308 = @isnothrowconstructibleexpr +| 309 = @hasfinalizerexpr +| 310 = @isdelegateexpr +| 311 = @isinterfaceclassexpr +| 312 = @isrefarrayexpr +| 313 = @isrefclassexpr +| 314 = @issealedexpr +| 315 = @issimplevalueclassexpr +| 316 = @isvalueclassexpr +| 317 = @isfinalexpr +| 319 = @noexceptexpr +| 320 = @builtinshufflevector +| 321 = @builtinchooseexpr +| 322 = @builtinaddressof +| 323 = @vec_fill +| 324 = @builtinconvertvector +| 325 = @builtincomplex +| 326 = @spaceshipexpr +| 327 = @co_await +| 328 = @co_yield +| 329 = @temp_init +| 330 = @isassignable +| 331 = @isaggregate +| 332 = @hasuniqueobjectrepresentations +| 333 = @builtinbitcast +| 334 = @builtinshuffle +| 335 = @blockassignexpr +| 336 = @issame +| 337 = @isfunction +| 338 = @islayoutcompatible +| 339 = @ispointerinterconvertiblebaseof +| 340 = @isarray +| 341 = @arrayrank +| 342 = @arrayextent +| 343 = @isarithmetic +| 344 = @iscompletetype +| 345 = @iscompound +| 346 = @isconst +| 347 = @isfloatingpoint +| 348 = @isfundamental +| 349 = @isintegral +| 350 = @islvaluereference +| 351 = @ismemberfunctionpointer +| 352 = @ismemberobjectpointer +| 353 = @ismemberpointer +| 354 = @isobject +| 355 = @ispointer +| 356 = @isreference +| 357 = @isrvaluereference +| 358 = @isscalar +| 359 = @issigned +| 360 = @isunsigned +| 361 = @isvoid +| 362 = @isvolatile +| 363 = @reuseexpr +| 364 = @istriviallycopyassignable +| 365 = @isassignablenopreconditioncheck +| 366 = @referencebindstotemporary +| 367 = @issameas +| 368 = @builtinhasattribute +| 369 = @ispointerinterconvertiblewithclass +| 370 = @builtinispointerinterconvertiblewithclass +| 371 = @iscorrespondingmember +| 372 = @builtiniscorrespondingmember +| 373 = @isboundedarray +| 374 = @isunboundedarray +| 375 = @isreferenceable +| 378 = @isnothrowconvertible +| 379 = @referenceconstructsfromtemporary +| 380 = @referenceconvertsfromtemporary +| 381 = @isconvertible +| 382 = @isvalidwinrttype +| 383 = @iswinclass +| 384 = @iswininterface +| 385 = @istriviallyequalitycomparable +| 386 = @isscopedenum +| 387 = @istriviallyrelocatable +| 388 = @datasizeof +| 389 = @c11_generic +| 390 = @requires_expr +| 391 = @nested_requirement +| 392 = @compound_requirement +| 393 = @concept_id +; + +@var_args_expr = @vastartexpr + | @vaendexpr + | @vaargexpr + | @vacopyexpr + ; + +@builtin_op = @var_args_expr + | @noopexpr + | @offsetofexpr + | @intaddrexpr + | @hasassignexpr + | @hascopyexpr + | @hasnothrowassign + | @hasnothrowconstr + | @hasnothrowcopy + | @hastrivialassign + | @hastrivialconstr + | @hastrivialcopy + | @hastrivialdestructor + | @hasuserdestr + | @hasvirtualdestr + | @isabstractexpr + | @isbaseofexpr + | @isclassexpr + | @isconvtoexpr + | @isemptyexpr + | @isenumexpr + | @ispodexpr + | @ispolyexpr + | @isunionexpr + | @typescompexpr + | @builtinshufflevector + | @builtinconvertvector + | @builtinaddressof + | @istriviallyconstructibleexpr + | @isdestructibleexpr + | @isnothrowdestructibleexpr + | @istriviallydestructibleexpr + | @istriviallyassignableexpr + | @isnothrowassignableexpr + | @istrivialexpr + | @isstandardlayoutexpr + | @istriviallycopyableexpr + | @isliteraltypeexpr + | @hastrivialmoveconstructorexpr + | @hastrivialmoveassignexpr + | @hasnothrowmoveassignexpr + | @isconstructibleexpr + | @isnothrowconstructibleexpr + | @hasfinalizerexpr + | @isdelegateexpr + | @isinterfaceclassexpr + | @isrefarrayexpr + | @isrefclassexpr + | @issealedexpr + | @issimplevalueclassexpr + | @isvalueclassexpr + | @isfinalexpr + | @builtinchooseexpr + | @builtincomplex + | @isassignable + | @isaggregate + | @hasuniqueobjectrepresentations + | @builtinbitcast + | @builtinshuffle + | @issame + | @isfunction + | @islayoutcompatible + | @ispointerinterconvertiblebaseof + | @isarray + | @arrayrank + | @arrayextent + | @isarithmetic + | @iscompletetype + | @iscompound + | @isconst + | @isfloatingpoint + | @isfundamental + | @isintegral + | @islvaluereference + | @ismemberfunctionpointer + | @ismemberobjectpointer + | @ismemberpointer + | @isobject + | @ispointer + | @isreference + | @isrvaluereference + | @isscalar + | @issigned + | @isunsigned + | @isvoid + | @isvolatile + | @istriviallycopyassignable + | @isassignablenopreconditioncheck + | @referencebindstotemporary + | @issameas + | @builtinhasattribute + | @ispointerinterconvertiblewithclass + | @builtinispointerinterconvertiblewithclass + | @iscorrespondingmember + | @builtiniscorrespondingmember + | @isboundedarray + | @isunboundedarray + | @isreferenceable + | @isnothrowconvertible + | @referenceconstructsfromtemporary + | @referenceconvertsfromtemporary + | @isconvertible + | @isvalidwinrttype + | @iswinclass + | @iswininterface + | @istriviallyequalitycomparable + | @isscopedenum + | @istriviallyrelocatable + ; + +compound_requirement_is_noexcept( + int expr: @compound_requirement ref +); + +new_allocated_type( + unique int expr: @new_expr ref, + int type_id: @type ref +); + +new_array_allocated_type( + unique int expr: @new_array_expr ref, + int type_id: @type ref +); + +/** + * The field being initialized by an initializer expression within an aggregate + * initializer for a class/struct/union. Position is used to sort repeated initializers. + */ +#keyset[aggregate, position] +aggregate_field_init( + int aggregate: @aggregateliteral ref, + int initializer: @expr ref, + int field: @membervariable ref, + int position: int ref, + boolean is_designated: boolean ref +); + +/** + * The index of the element being initialized by an initializer expression + * within an aggregate initializer for an array. Position is used to sort repeated initializers. + */ +#keyset[aggregate, position] +aggregate_array_init( + int aggregate: @aggregateliteral ref, + int initializer: @expr ref, + int element_index: int ref, + int position: int ref, + boolean is_designated: boolean ref +); + +@ctorinit = @ctordirectinit + | @ctorvirtualinit + | @ctorfieldinit + | @ctordelegatinginit; +@dtordestruct = @dtordirectdestruct + | @dtorvirtualdestruct + | @dtorfielddestruct; + + +condition_decl_bind( + unique int expr: @condition_decl ref, + unique int decl: @declaration ref +); + +typeid_bind( + unique int expr: @type_id ref, + int type_id: @type ref +); + +uuidof_bind( + unique int expr: @uuidof ref, + int type_id: @type ref +); + +@sizeof_or_alignof = @runtime_sizeof | @runtime_alignof | @datasizeof | @sizeof_pack; + +sizeof_bind( + unique int expr: @sizeof_or_alignof ref, + int type_id: @type ref +); + +code_block( + unique int block: @literal ref, + unique int routine: @function ref +); + +lambdas( + unique int expr: @lambdaexpr ref, + string default_capture: string ref, + boolean has_explicit_return_type: boolean ref, + boolean has_explicit_parameter_list: boolean ref +); + +lambda_capture( + unique int id: @lambdacapture, + int lambda: @lambdaexpr ref, + int index: int ref, + int field: @membervariable ref, + boolean captured_by_reference: boolean ref, + boolean is_implicit: boolean ref, + int location: @location_default ref +); + +@funbindexpr = @routineexpr + | @new_expr + | @delete_expr + | @delete_array_expr + | @ctordirectinit + | @ctorvirtualinit + | @ctordelegatinginit + | @dtordirectdestruct + | @dtorvirtualdestruct; + +@varbindexpr = @varaccess | @ctorfieldinit | @dtorfielddestruct; +@addressable = @function | @variable ; +@accessible = @addressable | @enumconstant ; + +@access = @varaccess | @routineexpr ; + +fold( + int expr: @foldexpr ref, + string operator: string ref, + boolean is_left_fold: boolean ref +); + +stmts( + unique int id: @stmt, + int kind: int ref, + int location: @location_stmt ref +); + +case @stmt.kind of + 1 = @stmt_expr +| 2 = @stmt_if +| 3 = @stmt_while +| 4 = @stmt_goto +| 5 = @stmt_label +| 6 = @stmt_return +| 7 = @stmt_block +| 8 = @stmt_end_test_while // do { ... } while ( ... ) +| 9 = @stmt_for +| 10 = @stmt_switch_case +| 11 = @stmt_switch +| 13 = @stmt_asm // "asm" statement or the body of an asm function +| 15 = @stmt_try_block +| 16 = @stmt_microsoft_try // Microsoft +| 17 = @stmt_decl +| 18 = @stmt_set_vla_size // C99 +| 19 = @stmt_vla_decl // C99 +| 25 = @stmt_assigned_goto // GNU +| 26 = @stmt_empty +| 27 = @stmt_continue +| 28 = @stmt_break +| 29 = @stmt_range_based_for // C++11 +// ... 30 @stmt_at_autoreleasepool_block deprecated +// ... 31 @stmt_objc_for_in deprecated +// ... 32 @stmt_at_synchronized deprecated +| 33 = @stmt_handler +// ... 34 @stmt_finally_end deprecated +| 35 = @stmt_constexpr_if +| 37 = @stmt_co_return +| 38 = @stmt_consteval_if +| 39 = @stmt_not_consteval_if +| 40 = @stmt_leave +; + +type_vla( + int type_id: @type ref, + int decl: @stmt_vla_decl ref +); + +variable_vla( + int var: @variable ref, + int decl: @stmt_vla_decl ref +); + +type_is_vla(unique int type_id: @derivedtype ref) + +if_initialization( + unique int if_stmt: @stmt_if ref, + int init_id: @stmt ref +); + +if_then( + unique int if_stmt: @stmt_if ref, + int then_id: @stmt ref +); + +if_else( + unique int if_stmt: @stmt_if ref, + int else_id: @stmt ref +); + +constexpr_if_initialization( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int init_id: @stmt ref +); + +constexpr_if_then( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int then_id: @stmt ref +); + +constexpr_if_else( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int else_id: @stmt ref +); + +@stmt_consteval_or_not_consteval_if = @stmt_consteval_if | @stmt_not_consteval_if; + +consteval_if_then( + unique int constexpr_if_stmt: @stmt_consteval_or_not_consteval_if ref, + int then_id: @stmt ref +); + +consteval_if_else( + unique int constexpr_if_stmt: @stmt_consteval_or_not_consteval_if ref, + int else_id: @stmt ref +); + +while_body( + unique int while_stmt: @stmt_while ref, + int body_id: @stmt ref +); + +do_body( + unique int do_stmt: @stmt_end_test_while ref, + int body_id: @stmt ref +); + +switch_initialization( + unique int switch_stmt: @stmt_switch ref, + int init_id: @stmt ref +); + +#keyset[switch_stmt, index] +switch_case( + int switch_stmt: @stmt_switch ref, + int index: int ref, + int case_id: @stmt_switch_case ref +); + +switch_body( + unique int switch_stmt: @stmt_switch ref, + int body_id: @stmt ref +); + +@stmt_for_or_range_based_for = @stmt_for + | @stmt_range_based_for; + +for_initialization( + unique int for_stmt: @stmt_for_or_range_based_for ref, + int init_id: @stmt ref +); + +for_condition( + unique int for_stmt: @stmt_for ref, + int condition_id: @expr ref +); + +for_update( + unique int for_stmt: @stmt_for ref, + int update_id: @expr ref +); + +for_body( + unique int for_stmt: @stmt_for ref, + int body_id: @stmt ref +); + +@stmtparent = @stmt | @expr_stmt ; +stmtparents( + unique int id: @stmt ref, + int index: int ref, + int parent: @stmtparent ref +); + +ishandler(unique int block: @stmt_block ref); + +@cfgnode = @stmt | @expr | @function | @initialiser ; + +stmt_decl_bind( + int stmt: @stmt_decl ref, + int num: int ref, + int decl: @declaration ref +); + +stmt_decl_entry_bind( + int stmt: @stmt_decl ref, + int num: int ref, + int decl_entry: @element ref +); + +@parameterized_element = @function | @stmt_block | @requires_expr; + +blockscope( + unique int block: @stmt_block ref, + int enclosing: @parameterized_element ref +); + +@jump = @stmt_goto | @stmt_break | @stmt_continue | @stmt_leave; + +@jumporlabel = @jump | @stmt_label | @literal; + +jumpinfo( + unique int id: @jumporlabel ref, + string str: string ref, + int target: @stmt ref +); + +preprocdirects( + unique int id: @preprocdirect, + int kind: int ref, + int location: @location_default ref +); +case @preprocdirect.kind of + 0 = @ppd_if +| 1 = @ppd_ifdef +| 2 = @ppd_ifndef +| 3 = @ppd_elif +| 4 = @ppd_else +| 5 = @ppd_endif +| 6 = @ppd_plain_include +| 7 = @ppd_define +| 8 = @ppd_undef +| 9 = @ppd_line +| 10 = @ppd_error +| 11 = @ppd_pragma +| 12 = @ppd_objc_import +| 13 = @ppd_include_next +| 14 = @ppd_ms_import +| 15 = @ppd_elifdef +| 16 = @ppd_elifndef +| 18 = @ppd_warning +; + +@ppd_include = @ppd_plain_include | @ppd_objc_import | @ppd_include_next | @ppd_ms_import; + +@ppd_branch = @ppd_if | @ppd_ifdef | @ppd_ifndef | @ppd_elif | @ppd_elifdef | @ppd_elifndef; + +preprocpair( + int begin : @ppd_branch ref, + int elseelifend : @preprocdirect ref +); + +preproctrue(int branch : @ppd_branch ref); +preprocfalse(int branch : @ppd_branch ref); + +preproctext( + unique int id: @preprocdirect ref, + string head: string ref, + string body: string ref +); + +includes( + unique int id: @ppd_include ref, + int included: @file ref +); + +link_targets( + int id: @link_target, + int binary: @file ref +); + +link_parent( + int element : @element ref, + int link_target : @link_target ref +); + +/* XML Files */ + +xmlEncoding(unique int id: @file ref, string encoding: string ref); + +xmlDTDs( + unique int id: @xmldtd, + string root: string ref, + string publicId: string ref, + string systemId: string ref, + int fileid: @file ref +); + +xmlElements( + unique int id: @xmlelement, + string name: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int fileid: @file ref +); + +xmlAttrs( + unique int id: @xmlattribute, + int elementid: @xmlelement ref, + string name: string ref, + string value: string ref, + int idx: int ref, + int fileid: @file ref +); + +xmlNs( + int id: @xmlnamespace, + string prefixName: string ref, + string URI: string ref, + int fileid: @file ref +); + +xmlHasNs( + int elementId: @xmlnamespaceable ref, + int nsId: @xmlnamespace ref, + int fileid: @file ref +); + +xmlComments( + unique int id: @xmlcomment, + string text: string ref, + int parentid: @xmlparent ref, + int fileid: @file ref +); + +xmlChars( + unique int id: @xmlcharacters, + string text: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int isCDATA: int ref, + int fileid: @file ref +); + +@xmlparent = @file | @xmlelement; +@xmlnamespaceable = @xmlelement | @xmlattribute; + +xmllocations( + int xmlElement: @xmllocatable ref, + int location: @location_default ref +); + +@xmllocatable = @xmlcharacters + | @xmlelement + | @xmlcomment + | @xmlattribute + | @xmldtd + | @file + | @xmlnamespace; diff --git a/cpp/downgrades/7bc12b02a4363149f0727a4bce07952dbb9d98aa/semmlecode.cpp.dbscheme b/cpp/downgrades/7bc12b02a4363149f0727a4bce07952dbb9d98aa/semmlecode.cpp.dbscheme new file mode 100644 index 00000000000..e3834605178 --- /dev/null +++ b/cpp/downgrades/7bc12b02a4363149f0727a4bce07952dbb9d98aa/semmlecode.cpp.dbscheme @@ -0,0 +1,2506 @@ + +/** + * An invocation of the compiler. Note that more than one file may be + * compiled per invocation. For example, this command compiles three + * source files: + * + * gcc -c f1.c f2.c f3.c + * + * The `id` simply identifies the invocation, while `cwd` is the working + * directory from which the compiler was invoked. + */ +compilations( + /** + * An invocation of the compiler. Note that more than one file may + * be compiled per invocation. For example, this command compiles + * three source files: + * + * gcc -c f1.c f2.c f3.c + */ + unique int id : @compilation, + string cwd : string ref +); + +/** + * The arguments that were passed to the extractor for a compiler + * invocation. If `id` is for the compiler invocation + * + * gcc -c f1.c f2.c f3.c + * + * then typically there will be rows for + * + * num | arg + * --- | --- + * 0 | *path to extractor* + * 1 | `--mimic` + * 2 | `/usr/bin/gcc` + * 3 | `-c` + * 4 | f1.c + * 5 | f2.c + * 6 | f3.c + */ +#keyset[id, num] +compilation_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * Optionally, record the build mode for each compilation. + */ +compilation_build_mode( + unique int id : @compilation ref, + int mode : int ref +); + +/* +case @compilation_build_mode.mode of + 0 = @build_mode_none +| 1 = @build_mode_manual +| 2 = @build_mode_auto +; +*/ + +/** + * The source files that are compiled by a compiler invocation. + * If `id` is for the compiler invocation + * + * gcc -c f1.c f2.c f3.c + * + * then there will be rows for + * + * num | arg + * --- | --- + * 0 | f1.c + * 1 | f2.c + * 2 | f3.c + * + * Note that even if those files `#include` headers, those headers + * do not appear as rows. + */ +#keyset[id, num] +compilation_compiling_files( + int id : @compilation ref, + int num : int ref, + int file : @file ref +); + +/** + * The time taken by the extractor for a compiler invocation. + * + * For each file `num`, there will be rows for + * + * kind | seconds + * ---- | --- + * 1 | CPU seconds used by the extractor frontend + * 2 | Elapsed seconds during the extractor frontend + * 3 | CPU seconds used by the extractor backend + * 4 | Elapsed seconds during the extractor backend + */ +#keyset[id, num, kind] +compilation_time( + int id : @compilation ref, + int num : int ref, + /* kind: + 1 = frontend_cpu_seconds + 2 = frontend_elapsed_seconds + 3 = extractor_cpu_seconds + 4 = extractor_elapsed_seconds + */ + int kind : int ref, + float seconds : float ref +); + +/** + * An error or warning generated by the extractor. + * The diagnostic message `diagnostic` was generated during compiler + * invocation `compilation`, and is the `file_number_diagnostic_number`th + * message generated while extracting the `file_number`th file of that + * invocation. + */ +#keyset[compilation, file_number, file_number_diagnostic_number] +diagnostic_for( + int diagnostic : @diagnostic ref, + int compilation : @compilation ref, + int file_number : int ref, + int file_number_diagnostic_number : int ref +); + +/** + * If extraction was successful, then `cpu_seconds` and + * `elapsed_seconds` are the CPU time and elapsed time (respectively) + * that extraction took for compiler invocation `id`. + */ +compilation_finished( + unique int id : @compilation ref, + float cpu_seconds : float ref, + float elapsed_seconds : float ref +); + + +/** + * External data, loaded from CSV files during snapshot creation. See + * [Tutorial: Incorporating external data](https://help.semmle.com/wiki/display/SD/Tutorial%3A+Incorporating+external+data) + * for more information. + */ +externalData( + int id : @externalDataElement, + string path : string ref, + int column: int ref, + string value : string ref +); + +/** + * The source location of the snapshot. + */ +sourceLocationPrefix(string prefix : string ref); + +/** + * Information about packages that provide code used during compilation. + * The `id` is just a unique identifier. + * The `namespace` is typically the name of the package manager that + * provided the package (e.g. "dpkg" or "yum"). + * The `package_name` is the name of the package, and `version` is its + * version (as a string). + */ +external_packages( + unique int id: @external_package, + string namespace : string ref, + string package_name : string ref, + string version : string ref +); + +/** + * Holds if File `fileid` was provided by package `package`. + */ +header_to_external_package( + int fileid : @file ref, + int package : @external_package ref +); + +/* + * Version history + */ + +svnentries( + unique int id : @svnentry, + string revision : string ref, + string author : string ref, + date revisionDate : date ref, + int changeSize : int ref +) + +svnaffectedfiles( + int id : @svnentry ref, + int file : @file ref, + string action : string ref +) + +svnentrymsg( + unique int id : @svnentry ref, + string message : string ref +) + +svnchurn( + int commit : @svnentry ref, + int file : @file ref, + int addedLines : int ref, + int deletedLines : int ref +) + +/* + * C++ dbscheme + */ + +extractor_version( + string codeql_version: string ref, + string frontend_version: string ref +) + +@location = @location_stmt | @location_expr | @location_default ; + +/** + * The location of an element that is not an expression or a statement. + * The location spans column `startcolumn` of line `startline` to + * column `endcolumn` of line `endline` in file `file`. + * For more information, see + * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/). + */ +locations_default( + /** The location of an element that is not an expression or a statement. */ + unique int id: @location_default, + int container: @container ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +/** + * The location of a statement. + * The location spans column `startcolumn` of line `startline` to + * column `endcolumn` of line `endline` in file `file`. + * For more information, see + * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/). + */ +locations_stmt( + /** The location of a statement. */ + unique int id: @location_stmt, + int container: @container ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +/** + * The location of an expression. + * The location spans column `startcolumn` of line `startline` to + * column `endcolumn` of line `endline` in file `file`. + * For more information, see + * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/). + */ +locations_expr( + /** The location of an expression. */ + unique int id: @location_expr, + int container: @container ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +/** An element for which line-count information is available. */ +@sourceline = @file | @function | @variable | @enumconstant | @xmllocatable; + +numlines( + int element_id: @sourceline ref, + int num_lines: int ref, + int num_code: int ref, + int num_comment: int ref +); + +diagnostics( + unique int id: @diagnostic, + int severity: int ref, + string error_tag: string ref, + string error_message: string ref, + string full_error_message: string ref, + int location: @location_default ref +); + +files( + unique int id: @file, + string name: string ref +); + +folders( + unique int id: @folder, + string name: string ref +); + +@container = @folder | @file + +containerparent( + int parent: @container ref, + unique int child: @container ref +); + +fileannotations( + int id: @file ref, + int kind: int ref, + string name: string ref, + string value: string ref +); + +inmacroexpansion( + int id: @element ref, + int inv: @macroinvocation ref +); + +affectedbymacroexpansion( + int id: @element ref, + int inv: @macroinvocation ref +); + +case @macroinvocation.kind of + 1 = @macro_expansion +| 2 = @other_macro_reference +; + +macroinvocations( + unique int id: @macroinvocation, + int macro_id: @ppd_define ref, + int location: @location_default ref, + int kind: int ref +); + +macroparent( + unique int id: @macroinvocation ref, + int parent_id: @macroinvocation ref +); + +// a macroinvocation may be part of another location +// the way to find a constant expression that uses a macro +// is thus to find a constant expression that has a location +// to which a macro invocation is bound +macrolocationbind( + int id: @macroinvocation ref, + int location: @location ref +); + +#keyset[invocation, argument_index] +macro_argument_unexpanded( + int invocation: @macroinvocation ref, + int argument_index: int ref, + string text: string ref +); + +#keyset[invocation, argument_index] +macro_argument_expanded( + int invocation: @macroinvocation ref, + int argument_index: int ref, + string text: string ref +); + +/* +case @function.kind of + 1 = @normal_function +| 2 = @constructor +| 3 = @destructor +| 4 = @conversion_function +| 5 = @operator +| 6 = @builtin_function // GCC built-in functions, e.g. __builtin___memcpy_chk +| 7 = @user_defined_literal +| 8 = @deduction_guide +; +*/ + +functions( + unique int id: @function, + string name: string ref, + int kind: int ref +); + +function_entry_point( + int id: @function ref, + unique int entry_point: @stmt ref +); + +function_return_type( + int id: @function ref, + int return_type: @type ref +); + +/** + * If `function` is a coroutine, then this gives the `std::experimental::resumable_traits` + * instance associated with it, and the variables representing the `handle` and `promise` + * for it. + */ +coroutine( + unique int function: @function ref, + int traits: @type ref +); + +/* +case @coroutine_placeholder_variable.kind of + 1 = @handle +| 2 = @promise +| 3 = @init_await_resume +; +*/ + +coroutine_placeholder_variable( + unique int placeholder_variable: @variable ref, + int kind: int ref, + int function: @function ref +) + +/** The `new` function used for allocating the coroutine state, if any. */ +coroutine_new( + unique int function: @function ref, + int new: @function ref +); + +/** The `delete` function used for deallocating the coroutine state, if any. */ +coroutine_delete( + unique int function: @function ref, + int delete: @function ref +); + +purefunctions(unique int id: @function ref); + +function_deleted(unique int id: @function ref); + +function_defaulted(unique int id: @function ref); + +function_prototyped(unique int id: @function ref) + +deduction_guide_for_class( + int id: @function ref, + int class_template: @usertype ref +) + +member_function_this_type( + unique int id: @function ref, + int this_type: @type ref +); + +#keyset[id, type_id] +fun_decls( + int id: @fun_decl, + int function: @function ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); +fun_def(unique int id: @fun_decl ref); +fun_specialized(unique int id: @fun_decl ref); +fun_implicit(unique int id: @fun_decl ref); +fun_decl_specifiers( + int id: @fun_decl ref, + string name: string ref +) +#keyset[fun_decl, index] +fun_decl_throws( + int fun_decl: @fun_decl ref, + int index: int ref, + int type_id: @type ref +); +/* an empty throw specification is different from none */ +fun_decl_empty_throws(unique int fun_decl: @fun_decl ref); +fun_decl_noexcept( + int fun_decl: @fun_decl ref, + int constant: @expr ref +); +fun_decl_empty_noexcept(int fun_decl: @fun_decl ref); +fun_decl_typedef_type( + unique int fun_decl: @fun_decl ref, + int typedeftype_id: @usertype ref +); + +/* +case @fun_requires.kind of + 1 = @template_attached +| 2 = @function_attached +; +*/ + +fun_requires( + int id: @fun_decl ref, + int kind: int ref, + int constraint: @expr ref +); + +param_decl_bind( + unique int id: @var_decl ref, + int index: int ref, + int fun_decl: @fun_decl ref +); + +#keyset[id, type_id] +var_decls( + int id: @var_decl, + int variable: @variable ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); +var_def(unique int id: @var_decl ref); +var_specialized(int id: @var_decl ref); +var_decl_specifiers( + int id: @var_decl ref, + string name: string ref +) +is_structured_binding(unique int id: @variable ref); +var_requires( + int id: @var_decl ref, + int constraint: @expr ref +); + +type_decls( + unique int id: @type_decl, + int type_id: @type ref, + int location: @location_default ref +); +type_def(unique int id: @type_decl ref); +type_decl_top( + unique int type_decl: @type_decl ref +); +type_requires( + int id: @type_decl ref, + int constraint: @expr ref +); + +namespace_decls( + unique int id: @namespace_decl, + int namespace_id: @namespace ref, + int location: @location_default ref, + int bodylocation: @location_default ref +); + +case @using.kind of + 1 = @using_declaration +| 2 = @using_directive +| 3 = @using_enum_declaration +; + +usings( + unique int id: @using, + int element_id: @element ref, + int location: @location_default ref, + int kind: int ref +); + +/** The element which contains the `using` declaration. */ +using_container( + int parent: @element ref, + int child: @using ref +); + +static_asserts( + unique int id: @static_assert, + int condition : @expr ref, + string message : string ref, + int location: @location_default ref, + int enclosing : @element ref +); + +// each function has an ordered list of parameters +#keyset[id, type_id] +#keyset[function, index, type_id] +params( + int id: @parameter, + int function: @parameterized_element ref, + int index: int ref, + int type_id: @type ref +); + +overrides( + int new: @function ref, + int old: @function ref +); + +#keyset[id, type_id] +membervariables( + int id: @membervariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +globalvariables( + int id: @globalvariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +localvariables( + int id: @localvariable, + int type_id: @type ref, + string name: string ref +); + +autoderivation( + unique int var: @variable ref, + int derivation_type: @type ref +); + +orphaned_variables( + int var: @localvariable ref, + int function: @function ref +) + +enumconstants( + unique int id: @enumconstant, + int parent: @usertype ref, + int index: int ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); + +@variable = @localscopevariable | @globalvariable | @membervariable; + +@localscopevariable = @localvariable | @parameter; + +/** + * Built-in types are the fundamental types, e.g., integral, floating, and void. + */ +case @builtintype.kind of + 1 = @errortype +| 2 = @unknowntype +| 3 = @void +| 4 = @boolean +| 5 = @char +| 6 = @unsigned_char +| 7 = @signed_char +| 8 = @short +| 9 = @unsigned_short +| 10 = @signed_short +| 11 = @int +| 12 = @unsigned_int +| 13 = @signed_int +| 14 = @long +| 15 = @unsigned_long +| 16 = @signed_long +| 17 = @long_long +| 18 = @unsigned_long_long +| 19 = @signed_long_long +// ... 20 Microsoft-specific __int8 +// ... 21 Microsoft-specific __int16 +// ... 22 Microsoft-specific __int32 +// ... 23 Microsoft-specific __int64 +| 24 = @float +| 25 = @double +| 26 = @long_double +| 27 = @complex_float // C99-specific _Complex float +| 28 = @complex_double // C99-specific _Complex double +| 29 = @complex_long_double // C99-specific _Complex long double +| 30 = @imaginary_float // C99-specific _Imaginary float +| 31 = @imaginary_double // C99-specific _Imaginary double +| 32 = @imaginary_long_double // C99-specific _Imaginary long double +| 33 = @wchar_t // Microsoft-specific +| 34 = @decltype_nullptr // C++11 +| 35 = @int128 // __int128 +| 36 = @unsigned_int128 // unsigned __int128 +| 37 = @signed_int128 // signed __int128 +| 38 = @float128 // __float128 +| 39 = @complex_float128 // _Complex __float128 +| 40 = @decimal32 // _Decimal32 +| 41 = @decimal64 // _Decimal64 +| 42 = @decimal128 // _Decimal128 +| 43 = @char16_t +| 44 = @char32_t +| 45 = @std_float32 // _Float32 +| 46 = @float32x // _Float32x +| 47 = @std_float64 // _Float64 +| 48 = @float64x // _Float64x +| 49 = @std_float128 // _Float128 +// ... 50 _Float128x +| 51 = @char8_t +| 52 = @float16 // _Float16 +| 53 = @complex_float16 // _Complex _Float16 +| 54 = @fp16 // __fp16 +| 55 = @std_bfloat16 // __bf16 +| 56 = @std_float16 // std::float16_t +| 57 = @complex_std_float32 // _Complex _Float32 +| 58 = @complex_float32x // _Complex _Float32x +| 59 = @complex_std_float64 // _Complex _Float64 +| 60 = @complex_float64x // _Complex _Float64x +| 61 = @complex_std_float128 // _Complex _Float128 +| 62 = @mfp8 // __mfp8 +| 63 = @scalable_vector_count // __SVCount_t +; + +builtintypes( + unique int id: @builtintype, + string name: string ref, + int kind: int ref, + int size: int ref, + int sign: int ref, + int alignment: int ref +); + +/** + * Derived types are types that are directly derived from existing types and + * point to, refer to, transform type data to return a new type. + */ +case @derivedtype.kind of + 1 = @pointer +| 2 = @reference +| 3 = @type_with_specifiers +| 4 = @array +| 5 = @gnu_vector +| 6 = @routineptr +| 7 = @routinereference +| 8 = @rvalue_reference // C++11 +// ... 9 type_conforming_to_protocols deprecated +| 10 = @block +| 11 = @scalable_vector // Arm SVE +; + +derivedtypes( + unique int id: @derivedtype, + string name: string ref, + int kind: int ref, + int type_id: @type ref +); + +pointerishsize(unique int id: @derivedtype ref, + int size: int ref, + int alignment: int ref); + +arraysizes( + unique int id: @derivedtype ref, + int num_elements: int ref, + int bytesize: int ref, + int alignment: int ref +); + +tupleelements( + unique int id: @derivedtype ref, + int num_elements: int ref +); + +typedefbase( + unique int id: @usertype ref, + int type_id: @type ref +); + +/** + * An instance of the C++11 `decltype` operator or C23 `typeof`/`typeof_unqual` + * operator taking an expression as its argument. For example: + * ``` + * int a; + * decltype(1+a) b; + * typeof(1+a) c; + * ``` + * Here `expr` is `1+a`. + * + * Sometimes an additional pair of parentheses around the expression + * changes the semantics of the decltype, e.g. + * ``` + * struct A { double x; }; + * const A* a = new A(); + * decltype( a->x ); // type is double + * decltype((a->x)); // type is const double& + * ``` + * (Please consult the C++11 standard for more details). + * `parentheses_would_change_meaning` is `true` iff that is the case. + */ + +/* +case @decltype.kind of +| 0 = @decltype +| 1 = @typeof // The frontend does not differentiate between typeof and typeof_unqual +; +*/ + +#keyset[id, expr] +decltypes( + int id: @decltype, + int expr: @expr ref, + int kind: int ref, + int base_type: @type ref, + boolean parentheses_would_change_meaning: boolean ref +); + +/* +case @type_operator.kind of +| 0 = @typeof // The frontend does not differentiate between typeof and typeof_unqual +| 1 = @underlying_type +| 2 = @bases +| 3 = @direct_bases +| 4 = @add_lvalue_reference +| 5 = @add_pointer +| 6 = @add_rvalue_reference +| 7 = @decay +| 8 = @make_signed +| 9 = @make_unsigned +| 10 = @remove_all_extents +| 11 = @remove_const +| 12 = @remove_cv +| 13 = @remove_cvref +| 14 = @remove_extent +| 15 = @remove_pointer +| 16 = @remove_reference_t +| 17 = @remove_restrict +| 18 = @remove_volatile +| 19 = @remove_reference +; +*/ + +type_operators( + unique int id: @type_operator, + int arg_type: @type ref, + int kind: int ref, + int base_type: @type ref +) + +/* +case @usertype.kind of +| 0 = @unknown_usertype +| 1 = @struct +| 2 = @class +| 3 = @union +| 4 = @enum +// ... 5 = @typedef deprecated // classic C: typedef typedef type name +// ... 6 = @template deprecated +| 7 = @template_parameter +| 8 = @template_template_parameter +| 9 = @proxy_class // a proxy class associated with a template parameter +// ... 10 objc_class deprecated +// ... 11 objc_protocol deprecated +// ... 12 objc_category deprecated +| 13 = @scoped_enum +// ... 14 = @using_alias deprecated // a using name = type style typedef +| 15 = @template_struct +| 16 = @template_class +| 17 = @template_union +| 18 = @alias +; +*/ + +usertypes( + unique int id: @usertype, + string name: string ref, + int kind: int ref +); + +usertypesize( + unique int id: @usertype ref, + int size: int ref, + int alignment: int ref +); + +usertype_final(unique int id: @usertype ref); + +usertype_uuid( + unique int id: @usertype ref, + string uuid: string ref +); + +/* +case @usertype.alias_kind of +| 0 = @typedef +| 1 = @alias +*/ + +usertype_alias_kind( + int id: @usertype ref, + int alias_kind: int ref +) + +nontype_template_parameters( + int id: @expr ref +); + +type_template_type_constraint( + int id: @usertype ref, + int constraint: @expr ref +); + +mangled_name( + unique int id: @declaration ref, + int mangled_name : @mangledname, + boolean is_complete: boolean ref +); + +is_pod_class(unique int id: @usertype ref); +is_standard_layout_class(unique int id: @usertype ref); + +is_complete(unique int id: @usertype ref); + +is_class_template(unique int id: @usertype ref); +class_instantiation( + int to: @usertype ref, + int from: @usertype ref +); +class_template_argument( + int type_id: @usertype ref, + int index: int ref, + int arg_type: @type ref +); +class_template_argument_value( + int type_id: @usertype ref, + int index: int ref, + int arg_value: @expr ref +); + +@user_or_decltype = @usertype | @decltype; + +is_proxy_class_for( + unique int id: @usertype ref, + int templ_param_id: @user_or_decltype ref +); + +type_mentions( + unique int id: @type_mention, + int type_id: @type ref, + int location: @location ref, + // a_symbol_reference_kind from the frontend. + int kind: int ref +); + +is_function_template(unique int id: @function ref); +function_instantiation( + unique int to: @function ref, + int from: @function ref +); +function_template_argument( + int function_id: @function ref, + int index: int ref, + int arg_type: @type ref +); +function_template_argument_value( + int function_id: @function ref, + int index: int ref, + int arg_value: @expr ref +); + +is_variable_template(unique int id: @variable ref); +variable_instantiation( + unique int to: @variable ref, + int from: @variable ref +); +variable_template_argument( + int variable_id: @variable ref, + int index: int ref, + int arg_type: @type ref +); +variable_template_argument_value( + int variable_id: @variable ref, + int index: int ref, + int arg_value: @expr ref +); + +template_template_instantiation( + int to: @usertype ref, + int from: @usertype ref +); +template_template_argument( + int type_id: @usertype ref, + int index: int ref, + int arg_type: @type ref +); +template_template_argument_value( + int type_id: @usertype ref, + int index: int ref, + int arg_value: @expr ref +); + +@concept = @concept_template | @concept_id; + +concept_templates( + unique int concept_id: @concept_template, + string name: string ref, + int location: @location_default ref +); +concept_instantiation( + unique int to: @concept_id ref, + int from: @concept_template ref +); +is_type_constraint(int concept_id: @concept_id ref); +concept_template_argument( + int concept_id: @concept ref, + int index: int ref, + int arg_type: @type ref +); +concept_template_argument_value( + int concept_id: @concept ref, + int index: int ref, + int arg_value: @expr ref +); + +routinetypes( + unique int id: @routinetype, + int return_type: @type ref +); + +routinetypeargs( + int routine: @routinetype ref, + int index: int ref, + int type_id: @type ref +); + +ptrtomembers( + unique int id: @ptrtomember, + int type_id: @type ref, + int class_id: @type ref +); + +/* + specifiers for types, functions, and variables + + "public", + "protected", + "private", + + "const", + "volatile", + "static", + + "pure", + "virtual", + "sealed", // Microsoft + "__interface", // Microsoft + "inline", + "explicit", + + "near", // near far extension + "far", // near far extension + "__ptr32", // Microsoft + "__ptr64", // Microsoft + "__sptr", // Microsoft + "__uptr", // Microsoft + "dllimport", // Microsoft + "dllexport", // Microsoft + "thread", // Microsoft + "naked", // Microsoft + "microsoft_inline", // Microsoft + "forceinline", // Microsoft + "selectany", // Microsoft + "nothrow", // Microsoft + "novtable", // Microsoft + "noreturn", // Microsoft + "noinline", // Microsoft + "noalias", // Microsoft + "restrict", // Microsoft +*/ + +specifiers( + unique int id: @specifier, + unique string str: string ref +); + +typespecifiers( + int type_id: @type ref, + int spec_id: @specifier ref +); + +funspecifiers( + int func_id: @function ref, + int spec_id: @specifier ref +); + +varspecifiers( + int var_id: @accessible ref, + int spec_id: @specifier ref +); + +explicit_specifier_exprs( + unique int func_id: @function ref, + int constant: @expr ref +) + +attributes( + unique int id: @attribute, + int kind: int ref, + string name: string ref, + string name_space: string ref, + int location: @location_default ref +); + +case @attribute.kind of + 0 = @gnuattribute +| 1 = @stdattribute +| 2 = @declspec +| 3 = @msattribute +| 4 = @alignas +// ... 5 @objc_propertyattribute deprecated +; + +attribute_args( + unique int id: @attribute_arg, + int kind: int ref, + int attribute: @attribute ref, + int index: int ref, + int location: @location_default ref +); + +case @attribute_arg.kind of + 0 = @attribute_arg_empty +| 1 = @attribute_arg_token +| 2 = @attribute_arg_constant +| 3 = @attribute_arg_type +| 4 = @attribute_arg_constant_expr +| 5 = @attribute_arg_expr +; + +attribute_arg_value( + unique int arg: @attribute_arg ref, + string value: string ref +); +attribute_arg_type( + unique int arg: @attribute_arg ref, + int type_id: @type ref +); +attribute_arg_constant( + unique int arg: @attribute_arg ref, + int constant: @expr ref +) +attribute_arg_expr( + unique int arg: @attribute_arg ref, + int expr: @expr ref +) +attribute_arg_name( + unique int arg: @attribute_arg ref, + string name: string ref +); + +typeattributes( + int type_id: @type ref, + int spec_id: @attribute ref +); + +funcattributes( + int func_id: @function ref, + int spec_id: @attribute ref +); + +varattributes( + int var_id: @accessible ref, + int spec_id: @attribute ref +); + +namespaceattributes( + int namespace_id: @namespace ref, + int spec_id: @attribute ref +); + +stmtattributes( + int stmt_id: @stmt ref, + int spec_id: @attribute ref +); + +@type = @builtintype + | @derivedtype + | @usertype + | @routinetype + | @ptrtomember + | @decltype + | @type_operator; + +unspecifiedtype( + unique int type_id: @type ref, + int unspecified_type_id: @type ref +); + +member( + int parent: @type ref, + int index: int ref, + int child: @member ref +); + +@enclosingfunction_child = @usertype | @variable | @namespace + +enclosingfunction( + unique int child: @enclosingfunction_child ref, + int parent: @function ref +); + +derivations( + unique int derivation: @derivation, + int sub: @type ref, + int index: int ref, + int super: @type ref, + int location: @location_default ref +); + +derspecifiers( + int der_id: @derivation ref, + int spec_id: @specifier ref +); + +/** + * Contains the byte offset of the base class subobject within the derived + * class. Only holds for non-virtual base classes, but see table + * `virtual_base_offsets` for offsets of virtual base class subobjects. + */ +direct_base_offsets( + unique int der_id: @derivation ref, + int offset: int ref +); + +/** + * Contains the byte offset of the virtual base class subobject for class + * `super` within a most-derived object of class `sub`. `super` can be either a + * direct or indirect base class. + */ +#keyset[sub, super] +virtual_base_offsets( + int sub: @usertype ref, + int super: @usertype ref, + int offset: int ref +); + +frienddecls( + unique int id: @frienddecl, + int type_id: @type ref, + int decl_id: @declaration ref, + int location: @location_default ref +); + +@declaredtype = @usertype ; + +@declaration = @function + | @declaredtype + | @variable + | @enumconstant + | @frienddecl + | @concept_template; + +@member = @membervariable + | @function + | @declaredtype + | @enumconstant; + +@locatable = @diagnostic + | @declaration + | @ppd_include + | @ppd_define + | @macroinvocation + /*| @funcall*/ + | @xmllocatable + | @attribute + | @attribute_arg; + +@namedscope = @namespace | @usertype; + +@element = @locatable + | @file + | @folder + | @specifier + | @type + | @expr + | @namespace + | @initialiser + | @stmt + | @derivation + | @comment + | @preprocdirect + | @fun_decl + | @var_decl + | @type_decl + | @namespace_decl + | @using + | @namequalifier + | @specialnamequalifyingelement + | @static_assert + | @type_mention + | @lambdacapture; + +@exprparent = @element; + +comments( + unique int id: @comment, + string contents: string ref, + int location: @location_default ref +); + +commentbinding( + int id: @comment ref, + int element: @element ref +); + +exprconv( + int converted: @expr ref, + unique int conversion: @expr ref +); + +compgenerated(unique int id: @element ref); + +/** + * `destructor_call` destructs the `i`'th entity that should be + * destructed following `element`. Note that entities should be + * destructed in reverse construction order, so for a given `element` + * these should be called from highest to lowest `i`. + */ +#keyset[element, destructor_call] +#keyset[element, i] +synthetic_destructor_call( + int element: @element ref, + int i: int ref, + int destructor_call: @routineexpr ref +); + +namespaces( + unique int id: @namespace, + string name: string ref +); + +namespace_inline( + unique int id: @namespace ref +); + +namespacembrs( + int parentid: @namespace ref, + unique int memberid: @namespacembr ref +); + +@namespacembr = @declaration | @namespace; + +exprparents( + int expr_id: @expr ref, + int child_index: int ref, + int parent_id: @exprparent ref +); + +expr_isload(unique int expr_id: @expr ref); + +@cast = @c_style_cast + | @const_cast + | @dynamic_cast + | @reinterpret_cast + | @static_cast + ; + +/* +case @conversion.kind of + 0 = @simple_conversion // a numeric conversion, qualification conversion, or a reinterpret_cast +| 1 = @bool_conversion // conversion to 'bool' +| 2 = @base_class_conversion // a derived-to-base conversion +| 3 = @derived_class_conversion // a base-to-derived conversion +| 4 = @pm_base_class_conversion // a derived-to-base conversion of a pointer to member +| 5 = @pm_derived_class_conversion // a base-to-derived conversion of a pointer to member +| 6 = @glvalue_adjust // an adjustment of the type of a glvalue +| 7 = @prvalue_adjust // an adjustment of the type of a prvalue +; +*/ +/** + * Describes the semantics represented by a cast expression. This is largely + * independent of the source syntax of the cast, so it is separate from the + * regular expression kind. + */ +conversionkinds( + unique int expr_id: @cast ref, + int kind: int ref +); + +@conversion = @cast + | @array_to_pointer + | @parexpr + | @reference_to + | @ref_indirect + | @temp_init + | @c11_generic + ; + +/* +case @funbindexpr.kind of + 0 = @normal_call // a normal call +| 1 = @virtual_call // a virtual call +| 2 = @adl_call // a call whose target is only found by ADL +; +*/ +iscall( + unique int caller: @funbindexpr ref, + int kind: int ref +); + +numtemplatearguments( + unique int expr_id: @expr ref, + int num: int ref +); + +specialnamequalifyingelements( + unique int id: @specialnamequalifyingelement, + unique string name: string ref +); + +@namequalifiableelement = @expr | @namequalifier; +@namequalifyingelement = @namespace + | @specialnamequalifyingelement + | @usertype; + +namequalifiers( + unique int id: @namequalifier, + unique int qualifiableelement: @namequalifiableelement ref, + int qualifyingelement: @namequalifyingelement ref, + int location: @location_default ref +); + +varbind( + int expr: @varbindexpr ref, + int var: @accessible ref +); + +funbind( + int expr: @funbindexpr ref, + int fun: @function ref +); + +@any_new_expr = @new_expr + | @new_array_expr; + +@new_or_delete_expr = @any_new_expr + | @delete_expr + | @delete_array_expr; + +@prefix_crement_expr = @preincrexpr | @predecrexpr; + +@postfix_crement_expr = @postincrexpr | @postdecrexpr; + +@increment_expr = @preincrexpr | @postincrexpr; + +@decrement_expr = @predecrexpr | @postdecrexpr; + +@crement_expr = @increment_expr | @decrement_expr; + +@un_arith_op_expr = @arithnegexpr + | @unaryplusexpr + | @conjugation + | @realpartexpr + | @imagpartexpr + | @crement_expr + ; + +@un_bitwise_op_expr = @complementexpr; + +@un_log_op_expr = @notexpr; + +@un_op_expr = @address_of + | @indirect + | @un_arith_op_expr + | @un_bitwise_op_expr + | @builtinaddressof + | @vec_fill + | @un_log_op_expr + | @co_await + | @co_yield + ; + +@bin_log_op_expr = @andlogicalexpr | @orlogicalexpr; + +@cmp_op_expr = @eq_op_expr | @rel_op_expr; + +@eq_op_expr = @eqexpr | @neexpr; + +@rel_op_expr = @gtexpr + | @ltexpr + | @geexpr + | @leexpr + | @spaceshipexpr + ; + +@bin_bitwise_op_expr = @lshiftexpr + | @rshiftexpr + | @andexpr + | @orexpr + | @xorexpr + ; + +@p_arith_op_expr = @paddexpr + | @psubexpr + | @pdiffexpr + ; + +@bin_arith_op_expr = @addexpr + | @subexpr + | @mulexpr + | @divexpr + | @remexpr + | @jmulexpr + | @jdivexpr + | @fjaddexpr + | @jfaddexpr + | @fjsubexpr + | @jfsubexpr + | @minexpr + | @maxexpr + | @p_arith_op_expr + ; + +@bin_op_expr = @bin_arith_op_expr + | @bin_bitwise_op_expr + | @cmp_op_expr + | @bin_log_op_expr + ; + +@op_expr = @un_op_expr + | @bin_op_expr + | @assign_expr + | @conditionalexpr + ; + +@assign_arith_expr = @assignaddexpr + | @assignsubexpr + | @assignmulexpr + | @assigndivexpr + | @assignremexpr + ; + +@assign_bitwise_expr = @assignandexpr + | @assignorexpr + | @assignxorexpr + | @assignlshiftexpr + | @assignrshiftexpr + ; + +@assign_pointer_expr = @assignpaddexpr + | @assignpsubexpr + ; + +@assign_op_expr = @assign_arith_expr + | @assign_bitwise_expr + | @assign_pointer_expr + ; + +@assign_expr = @assignexpr | @assign_op_expr | @blockassignexpr + +/* + Binary encoding of the allocator form. + + case @allocator.form of + 0 = plain + | 1 = alignment + ; +*/ + +/** + * The allocator function associated with a `new` or `new[]` expression. + * The `form` column specified whether the allocation call contains an alignment + * argument. + */ +expr_allocator( + unique int expr: @any_new_expr ref, + int func: @function ref, + int form: int ref +); + +/* + Binary encoding of the deallocator form. + + case @deallocator.form of + 0 = plain + | 1 = size + | 2 = alignment + | 4 = destroying_delete + ; +*/ + +/** + * The deallocator function associated with a `delete`, `delete[]`, `new`, or + * `new[]` expression. For a `new` or `new[]` expression, the deallocator is the + * one used to free memory if the initialization throws an exception. + * The `form` column specifies whether the deallocation call contains a size + * argument, and alignment argument, or both. + */ +expr_deallocator( + unique int expr: @new_or_delete_expr ref, + int func: @function ref, + int form: int ref +); + +/** + * Holds if the `@conditionalexpr` is of the two operand form + * `guard ? : false`. + */ +expr_cond_two_operand( + unique int cond: @conditionalexpr ref +); + +/** + * The guard of `@conditionalexpr` `guard ? true : false` + */ +expr_cond_guard( + unique int cond: @conditionalexpr ref, + int guard: @expr ref +); + +/** + * The expression used when the guard of `@conditionalexpr` + * `guard ? true : false` holds. For the two operand form + * `guard ?: false` consider using `expr_cond_guard` instead. + */ +expr_cond_true( + unique int cond: @conditionalexpr ref, + int true: @expr ref +); + +/** + * The expression used when the guard of `@conditionalexpr` + * `guard ? true : false` does not hold. + */ +expr_cond_false( + unique int cond: @conditionalexpr ref, + int false: @expr ref +); + +/** A string representation of the value. */ +values( + unique int id: @value, + string str: string ref +); + +/** The actual text in the source code for the value, if any. */ +valuetext( + unique int id: @value ref, + string text: string ref +); + +valuebind( + int val: @value ref, + unique int expr: @expr ref +); + +fieldoffsets( + unique int id: @variable ref, + int byteoffset: int ref, + int bitoffset: int ref +); + +bitfield( + unique int id: @variable ref, + int bits: int ref, + int declared_bits: int ref +); + +/* TODO +memberprefix( + int member: @expr ref, + int prefix: @expr ref +); +*/ + +/* + kind(1) = mbrcallexpr + kind(2) = mbrptrcallexpr + kind(3) = mbrptrmbrcallexpr + kind(4) = ptrmbrptrmbrcallexpr + kind(5) = mbrreadexpr // x.y + kind(6) = mbrptrreadexpr // p->y + kind(7) = mbrptrmbrreadexpr // x.*pm + kind(8) = mbrptrmbrptrreadexpr // x->*pm + kind(9) = staticmbrreadexpr // static x.y + kind(10) = staticmbrptrreadexpr // static p->y +*/ +/* TODO +memberaccess( + int member: @expr ref, + int kind: int ref +); +*/ + +initialisers( + unique int init: @initialiser, + int var: @accessible ref, + unique int expr: @expr ref, + int location: @location_expr ref +); + +braced_initialisers( + int init: @initialiser ref +); + +/** + * An ancestor for the expression, for cases in which we cannot + * otherwise find the expression's parent. + */ +expr_ancestor( + int exp: @expr ref, + int ancestor: @element ref +); + +exprs( + unique int id: @expr, + int kind: int ref, + int location: @location_expr ref +); + +expr_reuse( + int reuse: @expr ref, + int original: @expr ref, + int value_category: int ref +) + +/* + case @value.category of + 1 = prval + | 2 = xval + | 3 = lval + ; +*/ +expr_types( + int id: @expr ref, + int typeid: @type ref, + int value_category: int ref +); + +case @expr.kind of + 1 = @errorexpr +| 2 = @address_of // & AddressOfExpr +| 3 = @reference_to // ReferenceToExpr (implicit?) +| 4 = @indirect // * PointerDereferenceExpr +| 5 = @ref_indirect // ReferenceDereferenceExpr (implicit?) +// ... +| 8 = @array_to_pointer // (???) +| 9 = @vacuous_destructor_call // VacuousDestructorCall +// ... +| 11 = @assume // Microsoft +| 12 = @parexpr +| 13 = @arithnegexpr +| 14 = @unaryplusexpr +| 15 = @complementexpr +| 16 = @notexpr +| 17 = @conjugation // GNU ~ operator +| 18 = @realpartexpr // GNU __real +| 19 = @imagpartexpr // GNU __imag +| 20 = @postincrexpr +| 21 = @postdecrexpr +| 22 = @preincrexpr +| 23 = @predecrexpr +| 24 = @conditionalexpr +| 25 = @addexpr +| 26 = @subexpr +| 27 = @mulexpr +| 28 = @divexpr +| 29 = @remexpr +| 30 = @jmulexpr // C99 mul imaginary +| 31 = @jdivexpr // C99 div imaginary +| 32 = @fjaddexpr // C99 add real + imaginary +| 33 = @jfaddexpr // C99 add imaginary + real +| 34 = @fjsubexpr // C99 sub real - imaginary +| 35 = @jfsubexpr // C99 sub imaginary - real +| 36 = @paddexpr // pointer add (pointer + int or int + pointer) +| 37 = @psubexpr // pointer sub (pointer - integer) +| 38 = @pdiffexpr // difference between two pointers +| 39 = @lshiftexpr +| 40 = @rshiftexpr +| 41 = @andexpr +| 42 = @orexpr +| 43 = @xorexpr +| 44 = @eqexpr +| 45 = @neexpr +| 46 = @gtexpr +| 47 = @ltexpr +| 48 = @geexpr +| 49 = @leexpr +| 50 = @minexpr // GNU minimum +| 51 = @maxexpr // GNU maximum +| 52 = @assignexpr +| 53 = @assignaddexpr +| 54 = @assignsubexpr +| 55 = @assignmulexpr +| 56 = @assigndivexpr +| 57 = @assignremexpr +| 58 = @assignlshiftexpr +| 59 = @assignrshiftexpr +| 60 = @assignandexpr +| 61 = @assignorexpr +| 62 = @assignxorexpr +| 63 = @assignpaddexpr // assign pointer add +| 64 = @assignpsubexpr // assign pointer sub +| 65 = @andlogicalexpr +| 66 = @orlogicalexpr +| 67 = @commaexpr +| 68 = @subscriptexpr // access to member of an array, e.g., a[5] +// ... 69 @objc_subscriptexpr deprecated +// ... 70 @cmdaccess deprecated +// ... +| 73 = @virtfunptrexpr +| 74 = @callexpr +// ... 75 @msgexpr_normal deprecated +// ... 76 @msgexpr_super deprecated +// ... 77 @atselectorexpr deprecated +// ... 78 @atprotocolexpr deprecated +| 79 = @vastartexpr +| 80 = @vaargexpr +| 81 = @vaendexpr +| 82 = @vacopyexpr +// ... 83 @atencodeexpr deprecated +| 84 = @varaccess +| 85 = @thisaccess +// ... 86 @objc_box_expr deprecated +| 87 = @new_expr +| 88 = @delete_expr +| 89 = @throw_expr +| 90 = @condition_decl // a variable declared in a condition, e.g., if(int x = y > 2) +| 91 = @braced_init_list +| 92 = @type_id +| 93 = @runtime_sizeof +| 94 = @runtime_alignof +| 95 = @sizeof_pack +| 96 = @expr_stmt // GNU extension +| 97 = @routineexpr +| 98 = @type_operand // used to access a type in certain contexts (haven't found any examples yet....) +| 99 = @offsetofexpr // offsetof ::= type and field +| 100 = @hasassignexpr // __has_assign ::= type +| 101 = @hascopyexpr // __has_copy ::= type +| 102 = @hasnothrowassign // __has_nothrow_assign ::= type +| 103 = @hasnothrowconstr // __has_nothrow_constructor ::= type +| 104 = @hasnothrowcopy // __has_nothrow_copy ::= type +| 105 = @hastrivialassign // __has_trivial_assign ::= type +| 106 = @hastrivialconstr // __has_trivial_constructor ::= type +| 107 = @hastrivialcopy // __has_trivial_copy ::= type +| 108 = @hasuserdestr // __has_user_destructor ::= type +| 109 = @hasvirtualdestr // __has_virtual_destructor ::= type +| 110 = @isabstractexpr // __is_abstract ::= type +| 111 = @isbaseofexpr // __is_base_of ::= type type +| 112 = @isclassexpr // __is_class ::= type +| 113 = @isconvtoexpr // __is_convertible_to ::= type type +| 114 = @isemptyexpr // __is_empty ::= type +| 115 = @isenumexpr // __is_enum ::= type +| 116 = @ispodexpr // __is_pod ::= type +| 117 = @ispolyexpr // __is_polymorphic ::= type +| 118 = @isunionexpr // __is_union ::= type +| 119 = @typescompexpr // GNU __builtin_types_compatible ::= type type +| 120 = @intaddrexpr // frontend internal builtin, used to implement offsetof +// ... +| 122 = @hastrivialdestructor // __has_trivial_destructor ::= type +| 123 = @literal +| 124 = @uuidof +| 127 = @aggregateliteral +| 128 = @delete_array_expr +| 129 = @new_array_expr +// ... 130 @objc_array_literal deprecated +// ... 131 @objc_dictionary_literal deprecated +| 132 = @foldexpr +// ... +| 200 = @ctordirectinit +| 201 = @ctorvirtualinit +| 202 = @ctorfieldinit +| 203 = @ctordelegatinginit +| 204 = @dtordirectdestruct +| 205 = @dtorvirtualdestruct +| 206 = @dtorfielddestruct +// ... +| 210 = @static_cast +| 211 = @reinterpret_cast +| 212 = @const_cast +| 213 = @dynamic_cast +| 214 = @c_style_cast +| 215 = @lambdaexpr +| 216 = @param_ref +| 217 = @noopexpr +// ... +| 294 = @istriviallyconstructibleexpr +| 295 = @isdestructibleexpr +| 296 = @isnothrowdestructibleexpr +| 297 = @istriviallydestructibleexpr +| 298 = @istriviallyassignableexpr +| 299 = @isnothrowassignableexpr +| 300 = @istrivialexpr +| 301 = @isstandardlayoutexpr +| 302 = @istriviallycopyableexpr +| 303 = @isliteraltypeexpr +| 304 = @hastrivialmoveconstructorexpr +| 305 = @hastrivialmoveassignexpr +| 306 = @hasnothrowmoveassignexpr +| 307 = @isconstructibleexpr +| 308 = @isnothrowconstructibleexpr +| 309 = @hasfinalizerexpr +| 310 = @isdelegateexpr +| 311 = @isinterfaceclassexpr +| 312 = @isrefarrayexpr +| 313 = @isrefclassexpr +| 314 = @issealedexpr +| 315 = @issimplevalueclassexpr +| 316 = @isvalueclassexpr +| 317 = @isfinalexpr +| 319 = @noexceptexpr +| 320 = @builtinshufflevector +| 321 = @builtinchooseexpr +| 322 = @builtinaddressof +| 323 = @vec_fill +| 324 = @builtinconvertvector +| 325 = @builtincomplex +| 326 = @spaceshipexpr +| 327 = @co_await +| 328 = @co_yield +| 329 = @temp_init +| 330 = @isassignable +| 331 = @isaggregate +| 332 = @hasuniqueobjectrepresentations +| 333 = @builtinbitcast +| 334 = @builtinshuffle +| 335 = @blockassignexpr +| 336 = @issame +| 337 = @isfunction +| 338 = @islayoutcompatible +| 339 = @ispointerinterconvertiblebaseof +| 340 = @isarray +| 341 = @arrayrank +| 342 = @arrayextent +| 343 = @isarithmetic +| 344 = @iscompletetype +| 345 = @iscompound +| 346 = @isconst +| 347 = @isfloatingpoint +| 348 = @isfundamental +| 349 = @isintegral +| 350 = @islvaluereference +| 351 = @ismemberfunctionpointer +| 352 = @ismemberobjectpointer +| 353 = @ismemberpointer +| 354 = @isobject +| 355 = @ispointer +| 356 = @isreference +| 357 = @isrvaluereference +| 358 = @isscalar +| 359 = @issigned +| 360 = @isunsigned +| 361 = @isvoid +| 362 = @isvolatile +| 363 = @reuseexpr +| 364 = @istriviallycopyassignable +| 365 = @isassignablenopreconditioncheck +| 366 = @referencebindstotemporary +| 367 = @issameas +| 368 = @builtinhasattribute +| 369 = @ispointerinterconvertiblewithclass +| 370 = @builtinispointerinterconvertiblewithclass +| 371 = @iscorrespondingmember +| 372 = @builtiniscorrespondingmember +| 373 = @isboundedarray +| 374 = @isunboundedarray +| 375 = @isreferenceable +| 378 = @isnothrowconvertible +| 379 = @referenceconstructsfromtemporary +| 380 = @referenceconvertsfromtemporary +| 381 = @isconvertible +| 382 = @isvalidwinrttype +| 383 = @iswinclass +| 384 = @iswininterface +| 385 = @istriviallyequalitycomparable +| 386 = @isscopedenum +| 387 = @istriviallyrelocatable +| 388 = @datasizeof +| 389 = @c11_generic +| 390 = @requires_expr +| 391 = @nested_requirement +| 392 = @compound_requirement +| 393 = @concept_id +; + +@var_args_expr = @vastartexpr + | @vaendexpr + | @vaargexpr + | @vacopyexpr + ; + +@builtin_op = @var_args_expr + | @noopexpr + | @offsetofexpr + | @intaddrexpr + | @hasassignexpr + | @hascopyexpr + | @hasnothrowassign + | @hasnothrowconstr + | @hasnothrowcopy + | @hastrivialassign + | @hastrivialconstr + | @hastrivialcopy + | @hastrivialdestructor + | @hasuserdestr + | @hasvirtualdestr + | @isabstractexpr + | @isbaseofexpr + | @isclassexpr + | @isconvtoexpr + | @isemptyexpr + | @isenumexpr + | @ispodexpr + | @ispolyexpr + | @isunionexpr + | @typescompexpr + | @builtinshufflevector + | @builtinconvertvector + | @builtinaddressof + | @istriviallyconstructibleexpr + | @isdestructibleexpr + | @isnothrowdestructibleexpr + | @istriviallydestructibleexpr + | @istriviallyassignableexpr + | @isnothrowassignableexpr + | @istrivialexpr + | @isstandardlayoutexpr + | @istriviallycopyableexpr + | @isliteraltypeexpr + | @hastrivialmoveconstructorexpr + | @hastrivialmoveassignexpr + | @hasnothrowmoveassignexpr + | @isconstructibleexpr + | @isnothrowconstructibleexpr + | @hasfinalizerexpr + | @isdelegateexpr + | @isinterfaceclassexpr + | @isrefarrayexpr + | @isrefclassexpr + | @issealedexpr + | @issimplevalueclassexpr + | @isvalueclassexpr + | @isfinalexpr + | @builtinchooseexpr + | @builtincomplex + | @isassignable + | @isaggregate + | @hasuniqueobjectrepresentations + | @builtinbitcast + | @builtinshuffle + | @issame + | @isfunction + | @islayoutcompatible + | @ispointerinterconvertiblebaseof + | @isarray + | @arrayrank + | @arrayextent + | @isarithmetic + | @iscompletetype + | @iscompound + | @isconst + | @isfloatingpoint + | @isfundamental + | @isintegral + | @islvaluereference + | @ismemberfunctionpointer + | @ismemberobjectpointer + | @ismemberpointer + | @isobject + | @ispointer + | @isreference + | @isrvaluereference + | @isscalar + | @issigned + | @isunsigned + | @isvoid + | @isvolatile + | @istriviallycopyassignable + | @isassignablenopreconditioncheck + | @referencebindstotemporary + | @issameas + | @builtinhasattribute + | @ispointerinterconvertiblewithclass + | @builtinispointerinterconvertiblewithclass + | @iscorrespondingmember + | @builtiniscorrespondingmember + | @isboundedarray + | @isunboundedarray + | @isreferenceable + | @isnothrowconvertible + | @referenceconstructsfromtemporary + | @referenceconvertsfromtemporary + | @isconvertible + | @isvalidwinrttype + | @iswinclass + | @iswininterface + | @istriviallyequalitycomparable + | @isscopedenum + | @istriviallyrelocatable + ; + +compound_requirement_is_noexcept( + int expr: @compound_requirement ref +); + +new_allocated_type( + unique int expr: @new_expr ref, + int type_id: @type ref +); + +new_array_allocated_type( + unique int expr: @new_array_expr ref, + int type_id: @type ref +); + +/** + * The field being initialized by an initializer expression within an aggregate + * initializer for a class/struct/union. Position is used to sort repeated initializers. + */ +#keyset[aggregate, position] +aggregate_field_init( + int aggregate: @aggregateliteral ref, + int initializer: @expr ref, + int field: @membervariable ref, + int position: int ref, + boolean is_designated: boolean ref +); + +/** + * The index of the element being initialized by an initializer expression + * within an aggregate initializer for an array. Position is used to sort repeated initializers. + */ +#keyset[aggregate, position] +aggregate_array_init( + int aggregate: @aggregateliteral ref, + int initializer: @expr ref, + int element_index: int ref, + int position: int ref, + boolean is_designated: boolean ref +); + +@ctorinit = @ctordirectinit + | @ctorvirtualinit + | @ctorfieldinit + | @ctordelegatinginit; +@dtordestruct = @dtordirectdestruct + | @dtorvirtualdestruct + | @dtorfielddestruct; + + +condition_decl_bind( + unique int expr: @condition_decl ref, + unique int decl: @declaration ref +); + +typeid_bind( + unique int expr: @type_id ref, + int type_id: @type ref +); + +uuidof_bind( + unique int expr: @uuidof ref, + int type_id: @type ref +); + +@sizeof_or_alignof = @runtime_sizeof | @runtime_alignof | @datasizeof | @sizeof_pack; + +sizeof_bind( + unique int expr: @sizeof_or_alignof ref, + int type_id: @type ref +); + +code_block( + unique int block: @literal ref, + unique int routine: @function ref +); + +lambdas( + unique int expr: @lambdaexpr ref, + string default_capture: string ref, + boolean has_explicit_return_type: boolean ref, + boolean has_explicit_parameter_list: boolean ref +); + +lambda_capture( + unique int id: @lambdacapture, + int lambda: @lambdaexpr ref, + int index: int ref, + int field: @membervariable ref, + boolean captured_by_reference: boolean ref, + boolean is_implicit: boolean ref, + int location: @location_default ref +); + +@funbindexpr = @routineexpr + | @new_expr + | @delete_expr + | @delete_array_expr + | @ctordirectinit + | @ctorvirtualinit + | @ctordelegatinginit + | @dtordirectdestruct + | @dtorvirtualdestruct; + +@varbindexpr = @varaccess | @ctorfieldinit | @dtorfielddestruct; +@addressable = @function | @variable ; +@accessible = @addressable | @enumconstant ; + +@access = @varaccess | @routineexpr ; + +fold( + int expr: @foldexpr ref, + string operator: string ref, + boolean is_left_fold: boolean ref +); + +stmts( + unique int id: @stmt, + int kind: int ref, + int location: @location_stmt ref +); + +case @stmt.kind of + 1 = @stmt_expr +| 2 = @stmt_if +| 3 = @stmt_while +| 4 = @stmt_goto +| 5 = @stmt_label +| 6 = @stmt_return +| 7 = @stmt_block +| 8 = @stmt_end_test_while // do { ... } while ( ... ) +| 9 = @stmt_for +| 10 = @stmt_switch_case +| 11 = @stmt_switch +| 13 = @stmt_asm // "asm" statement or the body of an asm function +| 15 = @stmt_try_block +| 16 = @stmt_microsoft_try // Microsoft +| 17 = @stmt_decl +| 18 = @stmt_set_vla_size // C99 +| 19 = @stmt_vla_decl // C99 +| 25 = @stmt_assigned_goto // GNU +| 26 = @stmt_empty +| 27 = @stmt_continue +| 28 = @stmt_break +| 29 = @stmt_range_based_for // C++11 +// ... 30 @stmt_at_autoreleasepool_block deprecated +// ... 31 @stmt_objc_for_in deprecated +// ... 32 @stmt_at_synchronized deprecated +| 33 = @stmt_handler +// ... 34 @stmt_finally_end deprecated +| 35 = @stmt_constexpr_if +| 37 = @stmt_co_return +| 38 = @stmt_consteval_if +| 39 = @stmt_not_consteval_if +| 40 = @stmt_leave +; + +type_vla( + int type_id: @type ref, + int decl: @stmt_vla_decl ref +); + +variable_vla( + int var: @variable ref, + int decl: @stmt_vla_decl ref +); + +type_is_vla(unique int type_id: @derivedtype ref) + +if_initialization( + unique int if_stmt: @stmt_if ref, + int init_id: @stmt ref +); + +if_then( + unique int if_stmt: @stmt_if ref, + int then_id: @stmt ref +); + +if_else( + unique int if_stmt: @stmt_if ref, + int else_id: @stmt ref +); + +constexpr_if_initialization( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int init_id: @stmt ref +); + +constexpr_if_then( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int then_id: @stmt ref +); + +constexpr_if_else( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int else_id: @stmt ref +); + +@stmt_consteval_or_not_consteval_if = @stmt_consteval_if | @stmt_not_consteval_if; + +consteval_if_then( + unique int constexpr_if_stmt: @stmt_consteval_or_not_consteval_if ref, + int then_id: @stmt ref +); + +consteval_if_else( + unique int constexpr_if_stmt: @stmt_consteval_or_not_consteval_if ref, + int else_id: @stmt ref +); + +while_body( + unique int while_stmt: @stmt_while ref, + int body_id: @stmt ref +); + +do_body( + unique int do_stmt: @stmt_end_test_while ref, + int body_id: @stmt ref +); + +switch_initialization( + unique int switch_stmt: @stmt_switch ref, + int init_id: @stmt ref +); + +#keyset[switch_stmt, index] +switch_case( + int switch_stmt: @stmt_switch ref, + int index: int ref, + int case_id: @stmt_switch_case ref +); + +switch_body( + unique int switch_stmt: @stmt_switch ref, + int body_id: @stmt ref +); + +@stmt_for_or_range_based_for = @stmt_for + | @stmt_range_based_for; + +for_initialization( + unique int for_stmt: @stmt_for_or_range_based_for ref, + int init_id: @stmt ref +); + +for_condition( + unique int for_stmt: @stmt_for ref, + int condition_id: @expr ref +); + +for_update( + unique int for_stmt: @stmt_for ref, + int update_id: @expr ref +); + +for_body( + unique int for_stmt: @stmt_for ref, + int body_id: @stmt ref +); + +@stmtparent = @stmt | @expr_stmt ; +stmtparents( + unique int id: @stmt ref, + int index: int ref, + int parent: @stmtparent ref +); + +ishandler(unique int block: @stmt_block ref); + +@cfgnode = @stmt | @expr | @function | @initialiser ; + +stmt_decl_bind( + int stmt: @stmt_decl ref, + int num: int ref, + int decl: @declaration ref +); + +stmt_decl_entry_bind( + int stmt: @stmt_decl ref, + int num: int ref, + int decl_entry: @element ref +); + +@parameterized_element = @function | @stmt_block | @requires_expr; + +blockscope( + unique int block: @stmt_block ref, + int enclosing: @parameterized_element ref +); + +@jump = @stmt_goto | @stmt_break | @stmt_continue | @stmt_leave; + +@jumporlabel = @jump | @stmt_label | @literal; + +jumpinfo( + unique int id: @jumporlabel ref, + string str: string ref, + int target: @stmt ref +); + +preprocdirects( + unique int id: @preprocdirect, + int kind: int ref, + int location: @location_default ref +); +case @preprocdirect.kind of + 0 = @ppd_if +| 1 = @ppd_ifdef +| 2 = @ppd_ifndef +| 3 = @ppd_elif +| 4 = @ppd_else +| 5 = @ppd_endif +| 6 = @ppd_plain_include +| 7 = @ppd_define +| 8 = @ppd_undef +| 9 = @ppd_line +| 10 = @ppd_error +| 11 = @ppd_pragma +| 12 = @ppd_objc_import +| 13 = @ppd_include_next +| 14 = @ppd_ms_import +| 15 = @ppd_elifdef +| 16 = @ppd_elifndef +| 18 = @ppd_warning +; + +@ppd_include = @ppd_plain_include | @ppd_objc_import | @ppd_include_next | @ppd_ms_import; + +@ppd_branch = @ppd_if | @ppd_ifdef | @ppd_ifndef | @ppd_elif | @ppd_elifdef | @ppd_elifndef; + +preprocpair( + int begin : @ppd_branch ref, + int elseelifend : @preprocdirect ref +); + +preproctrue(int branch : @ppd_branch ref); +preprocfalse(int branch : @ppd_branch ref); + +preproctext( + unique int id: @preprocdirect ref, + string head: string ref, + string body: string ref +); + +includes( + unique int id: @ppd_include ref, + int included: @file ref +); + +link_targets( + int id: @link_target, + int binary: @file ref +); + +link_parent( + int element : @element ref, + int link_target : @link_target ref +); + +/* XML Files */ + +xmlEncoding(unique int id: @file ref, string encoding: string ref); + +xmlDTDs( + unique int id: @xmldtd, + string root: string ref, + string publicId: string ref, + string systemId: string ref, + int fileid: @file ref +); + +xmlElements( + unique int id: @xmlelement, + string name: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int fileid: @file ref +); + +xmlAttrs( + unique int id: @xmlattribute, + int elementid: @xmlelement ref, + string name: string ref, + string value: string ref, + int idx: int ref, + int fileid: @file ref +); + +xmlNs( + int id: @xmlnamespace, + string prefixName: string ref, + string URI: string ref, + int fileid: @file ref +); + +xmlHasNs( + int elementId: @xmlnamespaceable ref, + int nsId: @xmlnamespace ref, + int fileid: @file ref +); + +xmlComments( + unique int id: @xmlcomment, + string text: string ref, + int parentid: @xmlparent ref, + int fileid: @file ref +); + +xmlChars( + unique int id: @xmlcharacters, + string text: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int isCDATA: int ref, + int fileid: @file ref +); + +@xmlparent = @file | @xmlelement; +@xmlnamespaceable = @xmlelement | @xmlattribute; + +xmllocations( + int xmlElement: @xmllocatable ref, + int location: @location_default ref +); + +@xmllocatable = @xmlcharacters + | @xmlelement + | @xmlcomment + | @xmlattribute + | @xmldtd + | @file + | @xmlnamespace; diff --git a/cpp/downgrades/7bc12b02a4363149f0727a4bce07952dbb9d98aa/upgrade.properties b/cpp/downgrades/7bc12b02a4363149f0727a4bce07952dbb9d98aa/upgrade.properties new file mode 100644 index 00000000000..c8d1d2d3c3a --- /dev/null +++ b/cpp/downgrades/7bc12b02a4363149f0727a4bce07952dbb9d98aa/upgrade.properties @@ -0,0 +1,3 @@ +description: Introduce new complex 16-bit floating-point types +compatibility: backwards +builtintypes.rel: run builtintypes.qlo diff --git a/cpp/ql/lib/CHANGELOG.md b/cpp/ql/lib/CHANGELOG.md index c46ab004464..392305a6489 100644 --- a/cpp/ql/lib/CHANGELOG.md +++ b/cpp/ql/lib/CHANGELOG.md @@ -1,3 +1,20 @@ +## 5.2.0 + +### Deprecated APIs + +* The `ThrowingFunction` class (`semmle.code.cpp.models.interfaces.Throwing`) has been deprecated. Please use the `AlwaysSehThrowingFunction` class instead. + +### New Features + +* Added a predicate `getAnAttribute` to `Namespace` to retrieve a namespace attribute. +* The Microsoft-specific `__leave` statement is now supported. +* A new class `LeaveStmt` extending `JumpStmt` was added to represent `__leave` statements. +* Added a predicate `hasParameterList` to `LambdaExpression` to capture whether a lambda has an explicitly specified parameter list. + +### Bug Fixes + +* `resolveTypedefs` now properly resolves typedefs for `ArrayType`s. + ## 5.1.0 ### New Features diff --git a/cpp/ql/lib/change-notes/2014-12-13-deprecate-throwing.md b/cpp/ql/lib/change-notes/2014-12-13-deprecate-throwing.md deleted file mode 100644 index 9a46cc7da8f..00000000000 --- a/cpp/ql/lib/change-notes/2014-12-13-deprecate-throwing.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -category: deprecated ---- -* The `ThrowingFunction` class (`semmle.code.cpp.models.interfaces.Throwing`) has been deprecated. Please use the `AlwaysSehThrowingFunction` class instead. diff --git a/cpp/ql/lib/change-notes/2025-06-06-lambda-parameters.md b/cpp/ql/lib/change-notes/2025-06-06-lambda-parameters.md deleted file mode 100644 index 44f9b12968d..00000000000 --- a/cpp/ql/lib/change-notes/2025-06-06-lambda-parameters.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -category: feature ---- -* Added a predicate `hasParameterList` to `LambdaExpression` to capture whether a lambda has an explicitly specified parameter list. diff --git a/cpp/ql/lib/change-notes/2025-06-11-leave-stmt.md b/cpp/ql/lib/change-notes/2025-06-11-leave-stmt.md deleted file mode 100644 index d06be5b77a9..00000000000 --- a/cpp/ql/lib/change-notes/2025-06-11-leave-stmt.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -category: feature ---- -* The Microsoft-specific `__leave` statement is now supported. -* A new class `LeaveStmt` extending `JumpStmt` was added to represent `__leave` statements. \ No newline at end of file diff --git a/cpp/ql/lib/change-notes/2025-06-16-namespace-attributes.md b/cpp/ql/lib/change-notes/2025-06-16-namespace-attributes.md deleted file mode 100644 index cbed27e109c..00000000000 --- a/cpp/ql/lib/change-notes/2025-06-16-namespace-attributes.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -category: feature ---- -* Added a predicate `getAnAttribute` to `Namespace` to retrieve a namespace attribute. diff --git a/cpp/ql/lib/change-notes/2025-06-17-arraytype-typedefs.md b/cpp/ql/lib/change-notes/2025-06-17-arraytype-typedefs.md deleted file mode 100644 index 0bc3130e6a3..00000000000 --- a/cpp/ql/lib/change-notes/2025-06-17-arraytype-typedefs.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -category: fix ---- -* `resolveTypedefs` now properly resolves typedefs for `ArrayType`s. diff --git a/cpp/ql/lib/change-notes/2025-06-24-float16.md b/cpp/ql/lib/change-notes/2025-06-24-float16.md new file mode 100644 index 00000000000..24737d2b406 --- /dev/null +++ b/cpp/ql/lib/change-notes/2025-06-24-float16.md @@ -0,0 +1,4 @@ +--- +category: minorAnalysis +--- +* Added support for `__fp16 _Complex` and `__bf16 _Complex` types diff --git a/cpp/ql/lib/change-notes/released/5.2.0.md b/cpp/ql/lib/change-notes/released/5.2.0.md new file mode 100644 index 00000000000..a55198c1086 --- /dev/null +++ b/cpp/ql/lib/change-notes/released/5.2.0.md @@ -0,0 +1,16 @@ +## 5.2.0 + +### Deprecated APIs + +* The `ThrowingFunction` class (`semmle.code.cpp.models.interfaces.Throwing`) has been deprecated. Please use the `AlwaysSehThrowingFunction` class instead. + +### New Features + +* Added a predicate `getAnAttribute` to `Namespace` to retrieve a namespace attribute. +* The Microsoft-specific `__leave` statement is now supported. +* A new class `LeaveStmt` extending `JumpStmt` was added to represent `__leave` statements. +* Added a predicate `hasParameterList` to `LambdaExpression` to capture whether a lambda has an explicitly specified parameter list. + +### Bug Fixes + +* `resolveTypedefs` now properly resolves typedefs for `ArrayType`s. diff --git a/cpp/ql/lib/codeql-pack.release.yml b/cpp/ql/lib/codeql-pack.release.yml index dd8d287d010..9e57a36a7dc 100644 --- a/cpp/ql/lib/codeql-pack.release.yml +++ b/cpp/ql/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 5.1.0 +lastReleaseVersion: 5.2.0 diff --git a/cpp/ql/lib/qlpack.yml b/cpp/ql/lib/qlpack.yml index c0dd5d2ae2a..e826864ae64 100644 --- a/cpp/ql/lib/qlpack.yml +++ b/cpp/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/cpp-all -version: 5.1.1-dev +version: 5.2.1-dev groups: cpp dbscheme: semmlecode.cpp.dbscheme extractor: cpp diff --git a/cpp/ql/lib/semmle/code/cpp/Type.qll b/cpp/ql/lib/semmle/code/cpp/Type.qll index f866d9f77e2..0256349972b 100644 --- a/cpp/ql/lib/semmle/code/cpp/Type.qll +++ b/cpp/ql/lib/semmle/code/cpp/Type.qll @@ -858,6 +858,15 @@ private predicate floatingPointTypeMapping( or // __mfp8 kind = 62 and base = 2 and domain = TRealDomain() and realKind = 62 and extended = false + or + // _Complex __fp16 + kind = 64 and base = 2 and domain = TComplexDomain() and realKind = 54 and extended = false + or + // _Complex __bf16 + kind = 65 and base = 2 and domain = TComplexDomain() and realKind = 55 and extended = false + or + // _Complex std::float16_t + kind = 66 and base = 2 and domain = TComplexDomain() and realKind = 56 and extended = false } /** diff --git a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/SideEffects.qll b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/SideEffects.qll index 1b63322610a..00863781257 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/SideEffects.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/SideEffects.qll @@ -54,6 +54,8 @@ private predicate isDeeplyConstBelow(Type t) { or isDeeplyConst(t.(GNUVectorType).getBaseType()) or + isDeeplyConst(t.(ScalableVectorType).getBaseType()) + or isDeeplyConst(t.(FunctionPointerIshType).getBaseType()) or isDeeplyConst(t.(PointerWrapper).getTemplateArgument(0)) diff --git a/cpp/ql/lib/semmle/code/cpp/ir/internal/CppType.qll b/cpp/ql/lib/semmle/code/cpp/ir/internal/CppType.qll index d873e3ec757..b25bb041f33 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/internal/CppType.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/internal/CppType.qll @@ -29,6 +29,10 @@ private int getTypeSizeWorkaround(Type type) { not arrayType.hasArraySize() and result = getPointerSize() ) + or + // Scalable vectors are opaque and not of fixed size. Use 0 as a substitute. + type instanceof ScalableVectorType and + result = 0 ) ) } @@ -136,6 +140,8 @@ private predicate isOpaqueType(Type type) { type instanceof PointerToMemberType // PTMs are missing size info or type instanceof ScalableVectorCount + or + type instanceof ScalableVectorType } /** diff --git a/cpp/ql/lib/semmlecode.cpp.dbscheme b/cpp/ql/lib/semmlecode.cpp.dbscheme index e3834605178..7bc12b02a43 100644 --- a/cpp/ql/lib/semmlecode.cpp.dbscheme +++ b/cpp/ql/lib/semmlecode.cpp.dbscheme @@ -693,6 +693,9 @@ case @builtintype.kind of | 61 = @complex_std_float128 // _Complex _Float128 | 62 = @mfp8 // __mfp8 | 63 = @scalable_vector_count // __SVCount_t +| 64 = @complex_fp16 // _Complex __fp16 +| 65 = @complex_std_bfloat16 // _Complex __bf16 +| 66 = @complex_std_float16 // _Complex std::float16_t ; builtintypes( diff --git a/cpp/ql/lib/semmlecode.cpp.dbscheme.stats b/cpp/ql/lib/semmlecode.cpp.dbscheme.stats index dc51cf5b218..165dde802e5 100644 --- a/cpp/ql/lib/semmlecode.cpp.dbscheme.stats +++ b/cpp/ql/lib/semmlecode.cpp.dbscheme.stats @@ -2,7 +2,7 @@ @compilation - 14471 + 236162 @externalDataElement @@ -18,359 +18,371 @@ @location_default - 36187310 + 187588827 @location_stmt - 5217100 + 9188352 @location_expr - 18007923 + 18007924 @diagnostic - 1484 + 2936 @file - 74641 + 230754 @folder - 14181 + 22981 @macro_expansion - 39310599 + 179869820 @other_macro_reference - 300694 + 1944932 @function - 4010790 + 7629848 @fun_decl - 4149709 + 7853714 @var_decl - 9262608 + 22872100 @type_decl - 1687349 + 5742010 @namespace_decl - 430963 + 407321 @using_declaration - 306677 + 500989 @using_directive - 6474 + 22100 @using_enum_declaration - 1 + 16 @static_assert - 183514 + 173266 @parameter - 6957575 + 15008695 @membervariable - 1493401 + 6289561 @globalvariable - 488090 + 488591 @localvariable - 726100 + 1444946 @enumconstant - 344765 + 1205579 @errortype - 124 + 969 @unknowntype - 124 + 969 @void - 124 + 969 @boolean - 124 + 969 @char - 124 + 969 @unsigned_char - 124 + 969 @signed_char - 124 + 969 @short - 124 + 969 @unsigned_short - 124 + 969 @signed_short - 124 + 969 @int - 124 + 969 @unsigned_int - 124 + 969 @signed_int - 124 + 969 @long - 124 + 969 @unsigned_long - 124 + 969 @signed_long - 124 + 969 @long_long - 124 + 969 @unsigned_long_long - 124 + 969 @signed_long_long - 124 + 969 @float - 124 + 969 @double - 124 + 969 @long_double - 124 + 969 @complex_float - 124 + 969 @complex_double - 124 + 969 @complex_long_double - 124 + 969 @imaginary_float - 124 + 969 @imaginary_double - 124 + 969 @imaginary_long_double - 124 + 969 @wchar_t - 124 + 969 @decltype_nullptr - 124 + 969 @int128 - 124 + 969 @unsigned_int128 - 124 + 969 @signed_int128 - 124 + 969 @float128 - 124 + 969 @complex_float128 - 124 + 969 @decimal32 - 124 + 969 @decimal64 - 124 + 969 @decimal128 - 124 + 969 @char16_t - 124 + 969 @char32_t - 124 + 969 @std_float32 - 124 + 969 @float32x - 124 + 969 @std_float64 - 124 + 969 @float64x - 124 + 969 @std_float128 - 124 + 969 @char8_t - 124 + 969 @float16 - 124 + 969 @complex_float16 - 124 + 969 @fp16 - 124 + 969 @std_bfloat16 - 124 + 969 @std_float16 - 124 + 969 @complex_std_float32 - 124 + 969 @complex_float32x - 124 + 969 @complex_std_float64 - 124 + 969 @complex_float64x - 124 + 969 @complex_std_float128 - 124 + 969 @mfp8 - 124 + 969 @scalable_vector_count - 124 + 969 + + + @complex_fp16 + 969 + + + @complex_std_bfloat16 + 969 + + + @complex_std_float16 + 969 @pointer - 455609 + 1517635 @type_with_specifiers - 695720 + 1660095 @array - 98317 + 561118 @routineptr - 684232 + 684113 @reference - 969435 + 2667006 @gnu_vector - 773 + 11174 @routinereference - 374 + 1804 @rvalue_reference - 291455 + 1313151 @block - 10 + 1016 @scalable_vector @@ -378,23 +390,23 @@ @type_operator - 7960 + 21466 @decltype - 102349 + 317468 @usertype - 4458594 + 6052127 @mangledname - 6330564 + 12739995 @type_mention - 5828707 + 19988012 @concept_template @@ -402,27 +414,27 @@ @routinetype - 604428 + 792462 @ptrtomember - 11025 + 24227 @specifier - 7745 + 60085 @gnuattribute - 559628 + 3255016 @stdattribute - 350171 + 353114 @declspec - 329730 + 3611894 @msattribute @@ -434,15 +446,15 @@ @attribute_arg_token - 16696 + 1092168 @attribute_arg_constant_expr - 82124 + 422211 @attribute_arg_expr - 1607 + 82735 @attribute_arg_empty @@ -454,55 +466,55 @@ @attribute_arg_type - 460 + 1290 @derivation - 476986 + 695371 @frienddecl - 700589 + 11664613 @comment - 11220843 + 68615333 @namespace - 9901 + 55509 @specialnamequalifyingelement - 124 + 969 @namequalifier - 3041775 + 3041980 @value - 13474605 + 14027056 @initialiser - 2340631 + 5596945 @address_of - 595216 + 730977 @indirect - 404153 + 453518 @array_to_pointer - 1953751 + 3302753 @parexpr - 4915208 + 5451268 @arithnegexpr @@ -514,15 +526,15 @@ @complementexpr - 38199 + 142292 @notexpr - 355764 + 847791 @postincrexpr - 84597 + 599725 @postdecrexpr @@ -530,7 +542,7 @@ @preincrexpr - 96714 + 115589 @predecrexpr @@ -542,7 +554,7 @@ @addexpr - 571553 + 786845 @subexpr @@ -550,35 +562,35 @@ @mulexpr - 435793 + 810567 @divexpr - 54088 + 188452 @remexpr - 16015 + 80415 @paddexpr - 118669 + 361060 @psubexpr - 68037 + 68024 @pdiffexpr - 43849 + 57367 @lshiftexpr - 551696 + 589376 @rshiftexpr - 200554 + 247934 @andexpr @@ -586,11 +598,11 @@ @orexpr - 194055 + 574546 @xorexpr - 73975 + 117340 @eqexpr @@ -602,15 +614,15 @@ @gtexpr - 111149 + 199369 @ltexpr - 139429 + 201611 @geexpr - 81384 + 105701 @leexpr @@ -618,43 +630,43 @@ @assignexpr - 1281144 + 1873384 @assignaddexpr - 85634 + 194702 @assignsubexpr - 15307 + 93350 @assignmulexpr - 12609 + 11189 @assigndivexpr - 6809 + 6807 @assignremexpr - 874 + 4667 @assignlshiftexpr - 3704 + 20590 @assignrshiftexpr - 6882 + 38673 @assignandexpr - 6528 + 48479 @assignorexpr - 19606 + 111126 @assignxorexpr @@ -662,15 +674,15 @@ @assignpaddexpr - 18628 + 122317 @assignpsubexpr - 1575 + 10123 @andlogicalexpr - 346589 + 358253 @orlogicalexpr @@ -678,27 +690,27 @@ @commaexpr - 168901 + 281043 @subscriptexpr - 435142 + 765638 @callexpr - 261438 + 239780 @vastartexpr - 5085 + 11600 @vaargexpr - 1303 + 4740 @vaendexpr - 2941 + 11600 @vacopyexpr @@ -706,23 +718,23 @@ @varaccess - 8254631 + 9157418 @runtime_sizeof - 402047 + 776529 @runtime_alignof - 49886 + 49877 @expr_stmt - 148364 + 202820 @routineexpr - 5732059 + 5732446 @type_operand @@ -738,7 +750,7 @@ @literal - 7967633 + 7985912 @aggregateliteral @@ -746,43 +758,43 @@ @c_style_cast - 6026987 + 6026986 @temp_init - 992341 + 1115901 @errorexpr - 45695 + 94210 @reference_to - 1902670 + 2774640 @ref_indirect - 2107696 + 2856354 @vacuous_destructor_call - 7837 + 15900 @assume - 4394 + 4151 @conjugation - 12 + 10 @realpartexpr - 84 + 73 @imagpartexpr - 84 + 73 @jmulexpr @@ -822,35 +834,35 @@ @thisaccess - 1518626 + 1602283 @new_expr - 46206 + 94223 @delete_expr - 11483 + 33039 @throw_expr - 24105 + 92879 @condition_decl - 408893 + 408922 @braced_init_list - 2152 + 2151 @type_id - 47909 + 229949 @sizeof_pack - 1737 + 1781 @hasassignexpr @@ -866,7 +878,7 @@ @hasnothrowconstr - 3 + 87 @hasnothrowcopy @@ -874,15 +886,15 @@ @hastrivialassign - 2 + 3 @hastrivialconstr - 7 + 23 @hastrivialcopy - 2 + 87 @hasuserdestr @@ -898,11 +910,11 @@ @isbaseofexpr - 259 + 258 @isclassexpr - 2538 + 2388 @isconvtoexpr @@ -910,19 +922,19 @@ @isemptyexpr - 8869 + 8995 @isenumexpr - 2998 + 2996 @ispodexpr - 955 + 5904 @ispolyexpr - 3 + 35 @isunionexpr @@ -934,27 +946,27 @@ @hastrivialdestructor - 2794 + 4701 @uuidof - 28060 + 26588 @delete_array_expr - 1426 + 41539 @new_array_expr - 6933 + 44190 @foldexpr - 1247 + 2481 @ctordirectinit - 112823 + 131710 @ctorvirtualinit @@ -962,15 +974,15 @@ @ctorfieldinit - 206504 + 206698 @ctordelegatinginit - 3622 + 8703 @dtordirectdestruct - 39425 + 52507 @dtorvirtualdestruct @@ -978,39 +990,39 @@ @dtorfielddestruct - 39834 + 41790 @static_cast - 389023 + 355280 @reinterpret_cast - 41840 + 79930 @const_cast - 24466 + 24461 @dynamic_cast - 906 + 792 @lambdaexpr - 16482 + 23413 @param_ref - 164017 + 164014 @noopexpr - 51 + 48 @istriviallyconstructibleexpr - 3747 + 3745 @isdestructibleexpr @@ -1022,19 +1034,19 @@ @istriviallydestructibleexpr - 999 + 998 @istriviallyassignableexpr - 3747 + 3745 @isnothrowassignableexpr - 5122 + 5119 @istrivialexpr - 3368 + 7757 @isstandardlayoutexpr @@ -1042,7 +1054,7 @@ @istriviallycopyableexpr - 1226 + 3876 @isliteraltypeexpr @@ -1062,11 +1074,11 @@ @isconstructibleexpr - 3622 + 4613 @isnothrowconstructibleexpr - 20737 + 20727 @hasfinalizerexpr @@ -1102,7 +1114,7 @@ @isfinalexpr - 9404 + 9403 @noexceptexpr @@ -1110,15 +1122,15 @@ @builtinshufflevector - 1 + 727 @builtinchooseexpr - 20701 + 21326 @builtinaddressof - 15490 + 15822 @vec_fill @@ -1126,7 +1138,7 @@ @builtinconvertvector - 1 + 307 @builtincomplex @@ -1146,7 +1158,7 @@ @isassignable - 408 + 664 @isaggregate @@ -1162,15 +1174,15 @@ @builtinshuffle - 701 + 10127 @blockassignexpr - 1 + 177 @issame - 4539 + 5390 @isfunction @@ -1222,7 +1234,7 @@ @isintegral - 2 + 8 @islvaluereference @@ -1246,7 +1258,7 @@ @ispointer - 2 + 1182 @isreference @@ -1270,7 +1282,7 @@ @isvoid - 2 + 30 @isvolatile @@ -1278,7 +1290,7 @@ @reuseexpr - 846982 + 847042 @istriviallycopyassignable @@ -1290,7 +1302,7 @@ @referencebindstotemporary - 2 + 14582 @issameas @@ -1378,7 +1390,7 @@ @requires_expr - 16502 + 16503 @nested_requirement @@ -1390,15 +1402,15 @@ @concept_id - 90427 + 90434 @lambdacapture - 28526 + 31966 @stmt_expr - 2031614 + 3215944 @stmt_if @@ -1406,51 +1418,51 @@ @stmt_while - 39647 + 46675 @stmt_goto - 151588 + 291728 @stmt_label - 72706 + 283522 @stmt_return - 1255290 + 1710123 @stmt_block - 1844676 + 2399400 @stmt_end_test_while - 233641 + 551349 @stmt_for - 84389 + 121083 @stmt_switch_case - 836096 + 836154 @stmt_switch - 411840 + 411869 @stmt_asm - 64199 + 562106 @stmt_decl - 769069 + 1426776 @stmt_empty - 429375 + 817301 @stmt_continue @@ -1458,7 +1470,7 @@ @stmt_break - 140293 + 590166 @stmt_try_block @@ -1466,15 +1478,15 @@ @stmt_microsoft_try - 224 + 211 @stmt_set_vla_size - 35 + 1222 @stmt_vla_decl - 30 + 267 @stmt_assigned_goto @@ -1482,15 +1494,15 @@ @stmt_range_based_for - 6387 + 17217 @stmt_handler - 43747 + 43746 @stmt_constexpr_if - 103814 + 818798 @stmt_co_return @@ -1510,51 +1522,51 @@ @ppd_if - 588907 + 3008135 @ppd_ifdef - 214363 + 1135803 @ppd_ifndef - 158246 + 754594 @ppd_elif - 25085 + 392006 @ppd_else - 236237 + 1396495 @ppd_endif - 885609 + 4825227 @ppd_plain_include - 364623 + 491786 @ppd_define - 2746401 + 21491110 @ppd_undef - 100941 + 581469 @ppd_pragma - 406763 + 2256101 @ppd_include_next - 170 + 28235 @ppd_line - 18829 + 743302 @ppd_error @@ -1582,7 +1594,7 @@ @link_target - 846 + 11917 @xmldtd @@ -1612,15 +1624,15 @@ compilations - 14471 + 236162 id - 14471 + 236162 cwd - 12 + 1391 @@ -1634,7 +1646,7 @@ 1 2 - 14471 + 236162 @@ -1648,9 +1660,34 @@ 12 - 1197 - 1198 - 12 + 120 + 157 + 103 + + + 160 + 161 + 721 + + + 164 + 165 + 257 + + + 168 + 169 + 51 + + + 184 + 185 + 154 + + + 188 + 341 + 103 @@ -1660,19 +1697,19 @@ compilation_args - 1158561 + 20454453 id - 14471 + 236162 num - 1680 + 4997 arg - 33500 + 328227 @@ -1684,79 +1721,29 @@ 12 - 36 - 42 - 1148 + 84 + 85 + 134876 - 42 - 43 - 1257 + 86 + 87 + 45645 - 43 - 44 - 822 - - - 44 - 45 - 580 - - - 45 - 51 - 1088 - - - 51 - 70 - 556 - - - 71 - 72 - 810 - - - 72 - 90 - 1027 + 92 + 93 + 28593 94 - 96 - 447 + 95 + 9531 - 98 - 99 - 1535 - - - 100 - 102 - 108 - - - 103 - 104 - 2284 - - - 104 - 119 - 1221 - - - 120 - 138 - 1063 - - - 139 - 140 - 519 + 95 + 98 + 17516 @@ -1770,74 +1757,29 @@ 12 - 34 - 38 - 677 + 74 + 75 + 134876 - 38 - 39 - 1716 - - - 39 - 40 - 1124 - - - 40 - 42 - 1245 - - - 42 - 53 - 689 - - - 53 - 54 - 810 - - - 54 - 63 - 1027 - - - 64 - 67 - 459 - - - 67 - 68 - 1607 - - - 68 - 70 - 1112 - - - 70 - 71 - 1607 - - - 73 - 79 - 1088 + 75 + 76 + 45645 79 - 89 - 1293 + 80 + 28593 - 89 - 90 - 12 + 80 + 81 + 9531 + + + 81 + 83 + 17516 @@ -1851,59 +1793,19 @@ 12 - 43 - 90 - 72 + 85 + 526 + 257 - 90 - 108 - 132 + 1080 + 1967 + 412 - 108 - 183 - 120 - - - 198 - 422 - 132 - - - 422 - 595 - 145 - - - 595 - 605 - 145 - - - 605 - 749 - 132 - - - 750 - 778 - 132 - - - 781 - 883 - 132 - - - 930 - 1190 - 96 - - - 1197 - 1198 - 435 + 4584 + 4585 + 4327 @@ -1918,73 +1820,48 @@ 1 + 2 + 978 + + + 2 + 3 + 206 + + + 3 + 4 + 463 + + + 4 5 - 145 + 360 5 - 7 - 132 + 6 + 1597 - 9 - 12 - 84 + 6 + 60 + 360 - 12 - 15 - 132 + 85 + 125 + 412 - 15 - 18 - 108 + 135 + 430 + 412 - 18 - 22 - 132 - - - 22 - 27 - 145 - - - 27 - 29 - 96 - - - 29 - 34 - 132 - - - 34 - 44 - 145 - - - 45 - 63 - 132 - - - 67 - 94 - 132 - - - 94 - 164 - 132 - - - 171 - 199 - 24 + 558 + 2624 + 206 @@ -2000,22 +1877,17 @@ 1 2 - 15341 + 281705 2 - 3 - 14519 + 27 + 22410 - 3 - 103 - 2514 - - - 104 - 1198 - 1124 + 27 + 4585 + 24110 @@ -2031,17 +1903,17 @@ 1 2 - 22184 + 291751 2 - 3 - 9986 + 4 + 29932 - 3 - 62 - 1329 + 4 + 13 + 6542 @@ -2051,15 +1923,15 @@ compilation_build_mode - 14471 + 2 id - 14471 + 2 mode - 12 + 2 @@ -2073,7 +1945,7 @@ 1 2 - 14471 + 2 @@ -2087,9 +1959,9 @@ 12 - 1197 - 1198 - 12 + 1 + 2 + 2 @@ -2099,19 +1971,19 @@ compilation_compiling_files - 15742 + 236162 id - 2723 + 236162 num - 4521 + 51 file - 13672 + 7882 @@ -2125,42 +1997,7 @@ 1 2 - 1361 - - - 2 - 3 - 163 - - - 3 - 4 - 163 - - - 4 - 5 - 326 - - - 5 - 8 - 163 - - - 8 - 9 - 163 - - - 9 - 13 - 217 - - - 21 - 84 - 163 + 236162 @@ -2176,42 +2013,7 @@ 1 2 - 1361 - - - 2 - 3 - 163 - - - 3 - 4 - 163 - - - 4 - 5 - 326 - - - 5 - 8 - 163 - - - 8 - 9 - 163 - - - 9 - 13 - 217 - - - 21 - 84 - 163 + 236162 @@ -2225,29 +2027,9 @@ 12 - 1 - 2 - 2396 - - - 2 - 3 - 980 - - - 3 - 4 - 490 - - - 4 - 13 - 381 - - - 13 - 51 - 272 + 4584 + 4585 + 51 @@ -2261,29 +2043,9 @@ 12 - 1 - 2 - 2396 - - - 2 - 3 - 980 - - - 3 - 4 - 490 - - - 4 - 13 - 381 - - - 13 - 49 - 272 + 153 + 154 + 51 @@ -2297,19 +2059,24 @@ 12 - 1 - 2 - 12311 - - - 2 + 3 4 - 1143 + 103 4 - 6 - 217 + 5 + 5564 + + + 16 + 17 + 257 + + + 107 + 108 + 1957 @@ -2325,17 +2092,7 @@ 1 2 - 12528 - - - 2 - 4 - 1089 - - - 4 - 5 - 54 + 7882 @@ -2345,23 +2102,23 @@ compilation_time - 62971 + 944650 id - 2723 + 236162 num - 4521 + 51 kind - 217 + 206 seconds - 13999 + 10200 @@ -2375,42 +2132,7 @@ 1 2 - 1361 - - - 2 - 3 - 163 - - - 3 - 4 - 163 - - - 4 - 5 - 326 - - - 5 - 8 - 163 - - - 8 - 9 - 163 - - - 9 - 13 - 217 - - - 21 - 84 - 163 + 236162 @@ -2426,7 +2148,7 @@ 4 5 - 2723 + 236162 @@ -2439,55 +2161,20 @@ 12 + + 2 + 3 + 2060 + 3 4 - 762 + 125448 4 5 - 599 - - - 6 - 7 - 163 - - - 8 - 10 - 163 - - - 10 - 11 - 163 - - - 11 - 13 - 217 - - - 14 - 17 - 163 - - - 18 - 20 - 163 - - - 20 - 45 - 217 - - - 54 - 94 - 108 + 108653 @@ -2501,29 +2188,9 @@ 12 - 1 - 2 - 2396 - - - 2 - 3 - 980 - - - 3 - 4 - 490 - - - 4 - 13 - 381 - - - 13 - 51 - 272 + 4584 + 4585 + 51 @@ -2539,7 +2206,7 @@ 4 5 - 4521 + 51 @@ -2553,112 +2220,72 @@ 12 - 3 - 4 - 1307 + 198 + 199 + 51 + + + + + + kind + id + + + 12 + - 4 - 5 - 1143 + 4584 + 4585 + 206 + + + + + + kind + num + + + 12 + + + 1 + 2 + 206 + + + + + + + kind + seconds + + + 12 + 5 6 - 217 - - - 6 - 7 - 490 + 51 7 8 - 217 + 51 - 8 - 9 - 326 + 162 + 163 + 51 - 9 - 17 - 381 - - - 23 - 51 - 381 - - - 89 - 90 - 54 - - - - - - - kind - id - - - 12 - - - 50 - 51 - 217 - - - - - - - kind - num - - - 12 - - - 83 - 84 - 217 - - - - - - - kind - seconds - - - 12 - - - 3 - 4 - 54 - - - 4 - 5 - 54 - - - 139 - 140 - 54 - - - 157 - 158 - 54 + 184 + 185 + 51 @@ -2674,27 +2301,67 @@ 1 2 - 7353 + 978 2 - 3 - 3322 - - - 3 - 4 - 1852 - - - 4 6 - 1198 + 824 6 - 46 - 272 + 9 + 772 + + + 9 + 16 + 875 + + + 16 + 20 + 772 + + + 20 + 25 + 772 + + + 25 + 31 + 824 + + + 31 + 38 + 824 + + + 38 + 45 + 772 + + + 45 + 54 + 824 + + + 54 + 71 + 772 + + + 71 + 326 + 772 + + + 338 + 2995 + 412 @@ -2710,32 +2377,7 @@ 1 2 - 6700 - - - 2 - 3 - 2887 - - - 3 - 4 - 1906 - - - 4 - 5 - 1252 - - - 5 - 11 - 1089 - - - 38 - 75 - 163 + 10200 @@ -2751,12 +2393,12 @@ 1 2 - 11493 + 1957 2 3 - 2505 + 8243 @@ -2766,23 +2408,23 @@ diagnostic_for - 4152 + 5770 diagnostic - 1484 + 2936 compilation - 1355 + 2885 file_number - 21 + 51 file_number_diagnostic_number - 107 + 103 @@ -2796,12 +2438,12 @@ 1 2 - 1441 + 2885 - 63 - 64 - 43 + 56 + 57 + 51 @@ -2817,7 +2459,7 @@ 1 2 - 1484 + 2936 @@ -2833,7 +2475,7 @@ 1 2 - 1484 + 2936 @@ -2847,14 +2489,9 @@ 12 - 3 - 4 - 1312 - - - 5 - 6 - 43 + 2 + 3 + 2885 @@ -2870,7 +2507,7 @@ 1 2 - 1355 + 2885 @@ -2884,14 +2521,9 @@ 12 - 3 - 4 - 1312 - - - 5 - 6 - 43 + 2 + 3 + 2885 @@ -2905,9 +2537,9 @@ 12 - 69 - 70 - 21 + 57 + 58 + 51 @@ -2921,9 +2553,9 @@ 12 - 63 - 64 - 21 + 56 + 57 + 51 @@ -2937,9 +2569,9 @@ 12 - 5 - 6 - 21 + 2 + 3 + 51 @@ -2955,17 +2587,12 @@ 1 2 - 43 + 51 - 2 - 3 - 43 - - - 63 - 64 - 21 + 56 + 57 + 51 @@ -2979,14 +2606,9 @@ 12 - 2 - 3 - 43 - - - 63 - 64 - 64 + 56 + 57 + 103 @@ -3002,7 +2624,7 @@ 1 2 - 107 + 103 @@ -3012,19 +2634,19 @@ compilation_finished - 14471 + 236162 id - 14471 + 236162 cpu_seconds - 10844 + 16331 elapsed_seconds - 217 + 463 @@ -3038,7 +2660,7 @@ 1 2 - 14471 + 236162 @@ -3054,7 +2676,7 @@ 1 2 - 14471 + 236162 @@ -3070,17 +2692,67 @@ 1 2 - 9151 + 1648 2 3 - 1172 + 1545 3 - 26 - 519 + 4 + 1494 + + + 4 + 5 + 927 + + + 5 + 6 + 1339 + + + 6 + 7 + 1133 + + + 7 + 9 + 1236 + + + 9 + 11 + 1494 + + + 11 + 13 + 1391 + + + 13 + 16 + 1339 + + + 16 + 22 + 1287 + + + 22 + 54 + 1236 + + + 76 + 599 + 257 @@ -3096,12 +2768,32 @@ 1 2 - 10227 + 2472 2 3 - 616 + 3554 + + + 3 + 4 + 3451 + + + 4 + 5 + 3606 + + + 5 + 6 + 2421 + + + 6 + 8 + 824 @@ -3117,72 +2809,47 @@ 1 2 - 12 + 51 - 2 - 3 - 48 + 8 + 9 + 51 - 3 - 4 - 12 + 67 + 68 + 51 - 6 - 7 - 12 + 206 + 207 + 51 - 9 - 10 - 12 + 314 + 315 + 51 - 11 - 12 - 24 + 480 + 481 + 51 - 12 - 13 - 12 + 638 + 639 + 51 - 18 - 19 - 12 + 1370 + 1371 + 51 - 37 - 38 - 12 - - - 64 - 65 - 12 - - - 152 - 153 - 12 - - - 247 - 248 - 12 - - - 300 - 301 - 12 - - - 318 - 319 - 12 + 1500 + 1501 + 51 @@ -3198,77 +2865,47 @@ 1 2 - 12 + 51 - 2 - 3 - 48 + 8 + 9 + 51 - 3 - 4 - 12 + 51 + 52 + 51 - 6 - 7 - 12 + 66 + 67 + 51 - 9 - 10 - 12 + 105 + 106 + 51 - 10 - 11 - 12 + 144 + 145 + 51 - 11 - 12 - 12 + 191 + 192 + 51 - 12 - 13 - 12 + 213 + 214 + 51 - 18 - 19 - 12 - - - 37 - 38 - 12 - - - 60 - 61 - 12 - - - 139 - 140 - 12 - - - 162 - 163 - 12 - - - 228 - 229 - 12 - - - 244 - 245 - 12 + 221 + 222 + 51 @@ -3494,11 +3131,11 @@ sourceLocationPrefix - 124 + 969 prefix - 124 + 969 @@ -4992,15 +4629,15 @@ extractor_version - 124 + 969 codeql_version - 124 + 969 frontend_version - 124 + 969 @@ -5014,7 +4651,7 @@ 1 2 - 124 + 969 @@ -5030,7 +4667,7 @@ 1 2 - 124 + 969 @@ -5040,31 +4677,31 @@ locations_default - 36187310 + 187588827 id - 36187310 + 187588827 container - 40976 + 133737 startLine - 7487141 + 59692684 startColumn - 21237 + 192854 endLine - 7489140 + 59688807 endColumn - 53468 + 290734 @@ -5078,7 +4715,7 @@ 1 2 - 36187310 + 187588827 @@ -5094,7 +4731,7 @@ 1 2 - 36187310 + 187588827 @@ -5110,7 +4747,7 @@ 1 2 - 36187310 + 187588827 @@ -5126,7 +4763,7 @@ 1 2 - 36187310 + 187588827 @@ -5142,7 +4779,7 @@ 1 2 - 36187310 + 187588827 @@ -5157,701 +4794,75 @@ 1 - 15 - 3123 - - - 15 - 41 - 3123 - - - 42 - 66 - 3373 - - - 67 - 95 - 3123 - - - 98 - 124 - 3248 - - - 124 - 174 - 3373 - - - 175 - 228 - 3123 - - - 230 - 303 - 3123 - - - 305 - 406 - 3123 - - - 408 - 596 - 3248 - - - 598 - 943 - 3123 - - - 986 - 2568 - 3123 - - - 2587 - 57658 - 2748 - - - - - - - container - startLine - - - 12 - - - 1 - 13 - 3497 - - - 13 - 29 - 3248 - - - 29 - 42 - 3123 - - - 42 - 58 - 3373 - - - 58 - 76 - 3123 - - - 77 - 102 - 3248 - - - 102 - 134 - 3123 - - - 134 - 173 - 3123 - - - 173 - 242 - 3123 - - - 243 - 348 - 3123 - - - 348 - 489 - 3123 - - - 493 - 1269 - 3123 - - - 1337 - 57597 - 2623 - - - - - - - container - startColumn - - - 12 - - - 1 - 4 - 2248 - - - 4 - 7 - 3123 - - - 7 - 12 - 3497 - - - 12 - 16 - 3123 - - - 16 22 - 3373 + 10660 - 22 - 28 - 3123 - - - 28 - 33 - 3248 - - - 33 - 39 - 3373 - - - 39 - 48 - 3373 - - - 48 - 60 - 3373 - - - 60 - 82 - 3373 - - - 83 - 98 - 3248 - - - 98 - 141 - 2498 - - - - - - - container - endLine - - - 12 - - - 1 - 13 - 3497 - - - 13 - 29 - 3248 - - - 29 - 42 - 3123 - - - 42 - 58 - 3373 - - - 58 - 76 - 3123 - - - 77 - 102 - 3248 - - - 102 - 134 - 3123 - - - 134 - 173 - 3248 - - - 174 - 244 - 3123 - - - 246 - 348 - 3123 - - - 348 - 494 - 3123 - - - 513 - 1349 - 3123 - - - 1407 - 57597 - 2498 - - - - - - - container - endColumn - - - 12 - - - 1 - 12 - 3373 - - - 13 - 24 - 3248 - - - 25 - 33 - 3248 - - - 33 - 39 - 3373 - - - 39 - 45 - 3622 - - - 45 - 54 - 3123 - - - 54 + 23 62 - 3622 + 10660 62 - 71 - 3373 + 87 + 10660 - 71 - 83 - 3497 + 88 + 115 + 11629 - 83 - 99 - 3123 + 117 + 152 + 10660 - 99 - 114 - 3123 - - - 114 - 143 - 3123 - - - 147 - 363 - 1124 - - - - - - - startLine - id - - - 12 - - - 1 - 2 - 4954615 - - - 2 - 3 - 799784 - - - 3 - 4 - 565670 - - - 4 - 12 - 592405 - - - 12 - 210 - 561673 - - - 210 - 534 - 12992 - - - - - - - startLine - container - - - 12 - - - 1 - 2 - 5012832 - - - 2 - 3 - 1233157 - - - 3 - 6 - 663363 - - - 6 - 106 - 561673 - - - 107 - 329 - 16115 - - - - - - - startLine - startColumn - - - 12 - - - 1 - 2 - 5648961 - - - 2 - 3 - 532065 - - - 3 - 7 - 578663 - - - 7 - 24 - 570792 - - - 24 - 72 - 156658 - - - - - - - startLine - endLine - - - 12 - - - 1 - 2 - 7312493 - - - 2 - 81 - 174648 - - - - - - - startLine - endColumn - - - 12 - - - 1 - 2 - 5021452 - - - 2 - 3 - 766678 - - - 3 - 4 - 559174 - - - 4 - 12 - 603648 - - - 12 - 235 - 536187 - - - - - - - startColumn - id - - - 12 - - - 1 - 2 - 1499 - - - 2 - 4 - 1873 - - - 4 - 9 - 1624 - - - 9 - 19 - 1748 - - - 20 - 74 - 1624 - - - 81 - 173 - 1624 - - - 173 - 435 - 1624 - - - 468 - 904 - 1624 - - - 945 - 1309 - 1624 - - - 1328 - 1510 - 1624 - - - 1531 - 1774 - 1624 - - - 1834 - 2887 - 1624 - - - 3491 - 119749 - 1499 - - - - - - - startColumn - container - - - 12 - - - 1 - 2 - 1873 - - - 2 - 4 - 1748 - - - 4 - 6 - 1499 - - - 6 - 11 - 1748 - - - 11 - 33 - 1624 - - - 34 - 45 - 1624 - - - 50 - 75 - 1748 - - - 78 - 98 - 1748 - - - 101 - 131 - 1624 - - - 131 - 147 - 1873 - - - 149 - 161 - 1624 - - - 162 - 198 - 1624 + 152 + 200 + 10660 202 - 329 - 874 + 283 + 10660 + + + 299 + 365 + 10660 + + + 372 + 474 + 10660 + + + 507 + 795 + 10660 + + + 864 + 1798 + 10660 + + + 1880 + 4620 + 10660 + + + 12195 + 59051 + 4845 - startColumn + container startLine @@ -5859,75 +4870,156 @@ 1 - 2 - 1624 + 22 + 11629 - 2 - 4 - 1873 + 29 + 46 + 10660 - 4 - 9 - 1624 + 47 + 61 + 11629 - 9 - 19 - 1748 + 62 + 81 + 10660 - 20 - 74 - 1624 + 81 + 101 + 11629 - 80 - 169 - 1624 + 102 + 128 + 10660 - 171 - 432 - 1624 + 128 + 164 + 10660 - 467 - 822 - 1624 + 168 + 237 + 10660 - 861 - 1001 - 1624 + 246 + 381 + 10660 - 1002 - 1190 - 1624 + 385 + 550 + 10660 - 1201 - 1338 - 1624 + 568 + 1104 + 10660 - 1347 - 1920 - 1624 + 1195 + 7434 + 10660 - 2210 - 59360 - 1374 + 12075 + 58993 + 2907 - startColumn + container + startColumn + + + 12 + + + 1 + 4 + 5814 + + + 4 + 6 + 9691 + + + 6 + 9 + 10660 + + + 9 + 15 + 10660 + + + 15 + 17 + 8722 + + + 17 + 20 + 8722 + + + 20 + 24 + 11629 + + + 26 + 29 + 10660 + + + 29 + 34 + 10660 + + + 36 + 42 + 11629 + + + 42 + 56 + 11629 + + + 56 + 75 + 10660 + + + 75 + 127 + 10660 + + + 136 + 195 + 1938 + + + + + + + container endLine @@ -5935,285 +5027,75 @@ 1 - 2 - 1624 - - - 2 - 4 - 1873 - - - 4 - 9 - 1624 - - - 9 - 19 - 1748 - - - 20 - 74 - 1624 - - - 80 - 169 - 1624 - - - 171 - 432 - 1624 - - - 467 - 822 - 1624 - - - 861 - 1003 - 1624 - - - 1003 - 1198 - 1624 - - - 1201 - 1338 - 1624 - - - 1347 - 1920 - 1624 - - - 2220 - 59375 - 1374 - - - - - - - startColumn - endColumn - - - 12 - - - 1 - 2 - 1873 - - - 2 - 4 - 1748 - - - 4 - 7 - 1873 - - - 7 - 13 - 1748 - - - 13 - 21 - 1748 - - - 21 - 29 - 1624 + 22 + 11629 29 - 37 - 1499 + 46 + 10660 - 37 - 50 - 1624 + 47 + 61 + 11629 - 50 - 58 - 1624 + 62 + 78 + 10660 - 61 - 67 - 1748 + 80 + 101 + 11629 - 67 - 76 - 1624 + 102 + 128 + 10660 - 76 - 137 - 1624 + 128 + 164 + 10660 - 139 - 299 - 874 + 168 + 237 + 10660 + + + 246 + 381 + 10660 + + + 385 + 550 + 10660 + + + 568 + 1104 + 10660 + + + 1195 + 7436 + 10660 + + + 12075 + 58993 + 2907 - endLine - id - - - 12 - - - 1 - 2 - 4954241 - - - 2 - 3 - 807030 - - - 3 - 4 - 560798 - - - 4 - 12 - 592779 - - - 12 - 214 - 561797 - - - 214 - 530 - 12492 - - - - - - - endLine - container - - - 12 - - - 1 - 2 - 5011332 - - - 2 - 3 - 1236280 - - - 3 - 6 - 663738 - - - 6 - 107 - 561797 - - - 107 - 329 - 15990 - - - - - - - endLine - startLine - - - 12 - - - 1 - 2 - 7307996 - - - 2 - 7 - 181144 - - - - - - - endLine - startColumn - - - 12 - - - 1 - 2 - 5651585 - - - 2 - 3 - 530691 - - - 3 - 7 - 579537 - - - 7 - 24 - 570417 - - - 24 - 72 - 156908 - - - - - - - endLine + container endColumn @@ -6221,272 +5103,1072 @@ 1 - 2 - 5021327 - - - 2 - 3 - 773299 - - - 3 - 4 - 554552 - - - 4 12 - 604648 + 10660 - 12 - 235 - 535313 - - - - - - - endColumn - id - - - 12 - - - 1 - 2 - 15740 + 13 + 29 + 10660 - 2 - 3 - 5621 - - - 3 - 7 - 4497 - - - 7 - 17 - 4122 - - - 17 - 32 - 4247 - - - 35 - 103 - 4122 - - - 147 - 635 - 4122 - - - 651 - 2069 - 4122 - - - 2137 - 3404 - 4122 - - - 3430 - 33692 - 2748 - - - - - - - endColumn - container - - - 12 - - - 1 - 2 - 18614 - - - 2 - 3 - 5621 - - - 3 - 5 - 4247 - - - 5 - 7 - 3373 - - - 7 - 15 - 4622 - - - 15 - 78 - 4122 - - - 78 - 143 - 4247 - - - 150 - 202 - 4122 - - - 203 - 263 - 4122 - - - 266 - 329 - 374 - - - - - - - endColumn - startLine - - - 12 - - - 1 - 2 - 15990 - - - 2 - 3 - 5996 - - - 3 - 7 - 4122 - - - 7 - 17 - 4247 - - - 17 + 29 35 - 4122 + 10660 35 - 140 - 4122 - - - 157 - 601 - 4122 - - - 610 - 1714 - 4122 - - - 1749 - 2382 - 4122 - - - 2421 - 30689 - 2498 - - - - - - - endColumn - startColumn - - - 12 - - - 1 - 2 - 17364 - - - 2 - 3 - 6371 - - - 3 - 4 - 3123 - - - 4 - 6 - 3872 - - - 6 - 11 - 4622 - - - 11 - 22 - 4122 - - - 22 40 - 4247 + 11629 - 42 + 41 + 45 + 11629 + + + 45 + 48 + 10660 + + + 49 60 - 4872 + 10660 60 68 - 4122 + 10660 68 - 73 - 749 + 77 + 10660 + + + 77 + 87 + 10660 + + + 91 + 103 + 10660 + + + 103 + 155 + 10660 + + + 171 + 292 + 3876 + + + + + + + startLine + id + + + 12 + + + 1 + 2 + 38141488 + + + 2 + 3 + 6285684 + + + 3 + 4 + 4993853 + + + 4 + 6 + 4742852 + + + 6 + 26 + 4508326 + + + 26 + 176 + 1020478 + + + + + + + startLine + container + + + 12 + + + 1 + 2 + 38608602 + + + 2 + 3 + 10020656 + + + 3 + 4 + 5546249 + + + 4 + 16 + 4591670 + + + 16 + 139 + 925505 + + + + + + + startLine + startColumn + + + 12 + + + 1 + 2 + 44882657 + + + 2 + 3 + 4052842 + + + 3 + 4 + 3421947 + + + 4 + 7 + 4558720 + + + 7 + 43 + 2776516 + + + + + + + startLine + endLine + + + 12 + + + 1 + 2 + 58650884 + + + 2 + 14 + 1041799 + + + + + + + startLine + endColumn + + + 12 + + + 1 + 2 + 38587281 + + + 2 + 3 + 6118996 + + + 3 + 4 + 5025834 + + + 4 + 6 + 4782586 + + + 6 + 27 + 4485067 + + + 27 + 67 + 692917 + + + + + + + startColumn + id + + + 12 + + + 1 + 2 + 19382 + + + 2 + 3 + 15505 + + + 3 + 5 + 16474 + + + 5 + 11 + 15505 + + + 11 + 15 + 14536 + + + 15 + 28 + 14536 + + + 28 + 58 + 14536 + + + 60 + 136 + 14536 + + + 138 + 281 + 14536 + + + 329 + 448 + 14536 + + + 463 + 807 + 14536 + + + 815 + 1929 + 14536 + + + 2561 + 109994 + 9691 + + + + + + + startColumn + container + + + 12 + + + 1 + 2 + 33919 + + + 2 + 3 + 23258 + + + 3 + 4 + 13567 + + + 4 + 6 + 14536 + + + 6 + 11 + 16474 + + + 11 + 17 + 14536 + + + 19 + 26 + 15505 + + + 27 + 46 + 16474 + + + 46 + 55 + 14536 + + + 55 + 65 + 14536 + + + 66 + 137 + 14536 + + + 138 + 139 + 969 + + + + + + + startColumn + startLine + + + 12 + + + 1 + 2 + 20351 + + + 2 + 3 + 15505 + + + 3 + 5 + 16474 + + + 5 + 11 + 15505 + + + 11 + 15 + 14536 + + + 15 + 28 + 14536 + + + 28 + 58 + 14536 + + + 60 + 135 + 14536 + + + 137 + 316 + 14536 + + + 323 + 425 + 14536 + + + 432 + 713 + 14536 + + + 729 + 2052 + 14536 + + + 2140 + 60974 + 8722 + + + + + + + startColumn + endLine + + + 12 + + + 1 + 2 + 20351 + + + 2 + 3 + 15505 + + + 3 + 5 + 16474 + + + 5 + 11 + 15505 + + + 11 + 15 + 14536 + + + 15 + 28 + 14536 + + + 28 + 58 + 14536 + + + 60 + 135 + 14536 + + + 137 + 316 + 14536 + + + 323 + 425 + 14536 + + + 432 + 713 + 14536 + + + 729 + 2052 + 14536 + + + 2141 + 60975 + 8722 + + + + + + + startColumn + endColumn + + + 12 + + + 1 + 2 + 24227 + + + 2 + 3 + 17444 + + + 3 + 4 + 9691 + + + 4 + 6 + 12598 + + + 6 + 8 + 13567 + + + 8 + 12 + 15505 + + + 12 + 18 + 17444 + + + 18 + 25 + 14536 + + + 25 + 38 + 15505 + + + 38 + 42 + 14536 + + + 42 + 53 + 15505 + + + 53 + 70 + 14536 + + + 72 + 300 + 7752 + + + + + + + endLine + id + + + 12 + + + 1 + 2 + 38096909 + + + 2 + 3 + 6353522 + + + 3 + 4 + 4967687 + + + 4 + 6 + 4754481 + + + 6 + 26 + 4502511 + + + 26 + 178 + 1013695 + + + + + + + endLine + container + + + 12 + + + 1 + 2 + 38559177 + + + 2 + 3 + 10061359 + + + 3 + 4 + 5555940 + + + 4 + 16 + 4585855 + + + 16 + 139 + 926474 + + + + + + + endLine + startLine + + + 12 + + + 1 + 2 + 58619873 + + + 2 + 6 + 1068934 + + + + + + + endLine + startColumn + + + 12 + + + 1 + 2 + 44876842 + + + 2 + 3 + 4054780 + + + 3 + 4 + 3421947 + + + 4 + 7 + 4554844 + + + 7 + 43 + 2780393 + + + + + + + endLine + endColumn + + + 12 + + + 1 + 2 + 38542702 + + + 2 + 3 + 6188773 + + + 3 + 4 + 4997729 + + + 4 + 6 + 4793246 + + + 6 + 28 + 4525770 + + + 28 + 67 + 640585 + + + + + + + endColumn + id + + + 12 + + + 1 + 2 + 52332 + + + 2 + 5 + 22289 + + + 5 + 12 + 25197 + + + 12 + 18 + 24227 + + + 18 + 29 + 22289 + + + 29 + 64 + 22289 + + + 66 + 142 + 22289 + + + 146 + 405 + 22289 + + + 433 + 904 + 22289 + + + 921 + 1929 + 22289 + + + 1937 + 3068 + 22289 + + + 3091 + 32212 + 10660 + + + + + + + endColumn + container + + + 12 + + + 1 + 2 + 64930 + + + 2 + 3 + 17444 + + + 3 + 4 + 18413 + + + 4 + 5 + 15505 + + + 5 + 6 + 24227 + + + 6 + 10 + 25197 + + + 10 + 24 + 22289 + + + 24 + 45 + 23258 + + + 49 + 65 + 23258 + + + 68 + 88 + 23258 + + + 88 + 108 + 22289 + + + 111 + 139 + 10660 + + + + + + + endColumn + startLine + + + 12 + + + 1 + 2 + 53301 + + + 2 + 5 + 22289 + + + 5 + 11 + 21320 + + + 11 + 16 + 22289 + + + 16 + 24 + 23258 + + + 24 + 52 + 22289 + + + 55 + 131 + 22289 + + + 132 + 279 + 22289 + + + 301 + 707 + 22289 + + + 720 + 1623 + 22289 + + + 1623 + 1989 + 22289 + + + 2040 + 30655 + 14536 + + + + + + + endColumn + startColumn + + + 12 + + + 1 + 2 + 86251 + + + 2 + 3 + 17444 + + + 3 + 4 + 15505 + + + 4 + 6 + 22289 + + + 6 + 11 + 21320 + + + 11 + 18 + 22289 + + + 18 + 28 + 22289 + + + 28 + 35 + 22289 + + + 35 + 41 + 19382 + + + 41 + 45 + 22289 + + + 45 + 52 + 19382 @@ -6502,52 +6184,62 @@ 1 2 - 15990 + 53301 2 - 3 - 5996 + 5 + 23258 - 3 - 7 - 4122 + 5 + 11 + 20351 - 7 - 17 - 4372 + 11 + 16 + 22289 - 17 - 36 - 4247 + 16 + 24 + 23258 - 36 - 170 - 4122 + 24 + 52 + 22289 - 173 - 620 - 4122 + 55 + 131 + 22289 - 622 - 1824 - 4122 + 132 + 279 + 22289 - 1843 - 2449 - 4122 + 301 + 706 + 22289 - 2460 - 30688 - 2248 + 718 + 1623 + 23258 + + + 1629 + 2041 + 22289 + + + 2181 + 30652 + 13567 @@ -6557,31 +6249,31 @@ locations_stmt - 5217100 + 9188352 id - 5217100 + 9188352 container - 4164 + 225335 startLine - 273596 + 3533 startColumn - 2560 + 250 endLine - 265745 + 3438 endColumn - 3235 + 463 @@ -6595,7 +6287,7 @@ 1 2 - 5217100 + 9188352 @@ -6611,7 +6303,7 @@ 1 2 - 5217100 + 9188352 @@ -6627,7 +6319,7 @@ 1 2 - 5217100 + 9188352 @@ -6643,7 +6335,7 @@ 1 2 - 5217100 + 9188352 @@ -6659,7 +6351,7 @@ 1 2 - 5217100 + 9188352 @@ -6674,1269 +6366,1079 @@ 1 - 18 - 337 + 6 + 9990 - 18 - 60 - 337 - - - 61 - 180 - 337 - - - 190 - 450 - 337 - - - 454 - 628 - 337 - - - 653 - 883 - 337 - - - 906 - 1161 - 337 - - - 1167 - 1466 - 337 - - - 1508 - 1785 - 337 - - - 1858 - 2296 - 337 - - - 2347 - 2833 - 337 - - - 2871 - 4105 - 337 - - - 4275 - 4993 - 112 - - - - - - - container - startLine - - - 12 - - - 1 - 18 - 337 - - - 18 - 49 - 337 - - - 59 - 170 - 337 - - - 170 - 394 - 337 - - - 434 - 603 - 337 - - - 610 - 846 - 337 - - - 880 - 1132 - 337 - - - 1135 - 1395 - 337 - - - 1409 - 1727 - 337 - - - 1761 - 2226 - 337 - - - 2250 - 2778 - 337 - - - 2800 - 3886 - 337 - - - 3965 - 4846 - 112 - - - - - - - container - startColumn - - - 12 - - - 1 - 3 - 281 - - - 3 - 7 - 309 - - - 7 + 6 9 - 309 + 18036 9 - 11 - 337 + 12 + 15392 - 11 - 13 - 309 - - - 13 - 14 - 309 - - - 14 - 16 - 337 - - - 16 + 12 17 - 225 + 19300 17 - 19 - 281 - - - 19 - 21 - 253 - - - 21 - 23 - 337 - - - 23 - 29 - 337 - - - 29 - 43 - 337 - - - 48 - 60 - 196 - - - - - - - container - endLine - - - 12 - - - 1 - 15 - 337 - - - 15 - 44 - 337 - - - 47 - 137 - 337 - - - 141 - 314 - 337 - - - 328 - 472 - 337 - - - 488 - 643 - 337 - - - 675 - 858 - 365 - - - 865 - 1107 - 337 - - - 1178 - 1343 - 337 - - - 1401 - 1768 - 337 - - - 1782 - 2165 - 337 - - - 2254 - 3130 - 337 - - - 3343 - 3873 - 84 - - - - - - - container - endColumn - - - 12 - - - 1 - 7 - 337 - - - 8 - 26 - 365 - - - 26 - 47 - 365 - - - 47 - 59 - 337 - - - 59 - 64 - 309 - - - 64 - 67 - 281 - - - 67 - 69 - 337 - - - 69 - 71 - 309 - - - 71 - 72 - 337 - - - 72 - 74 - 337 - - - 74 - 76 - 337 - - - 76 - 80 - 337 - - - 81 - 96 - 168 - - - - - - - startLine - id - - - 12 - - - 1 - 2 - 29489 - - - 2 - 3 - 20935 - - - 3 - 4 - 17080 - - - 4 - 6 - 19781 - - - 6 - 8 - 17136 - - - 8 - 11 - 22877 - - - 11 - 16 - 23636 - - - 16 22 - 20991 - - - 22 - 29 - 23299 - - - 29 - 37 - 23749 - - - 37 - 45 - 20682 - - - 45 - 56 - 22201 - - - 56 - 73 - 11734 - - - - - - - startLine - container - - - 12 - - - 1 - 2 - 30530 - - - 2 - 3 - 21526 - - - 3 - 4 - 17361 - - - 4 - 6 - 19697 - - - 6 - 8 - 17418 - - - 8 - 11 - 24058 - - - 11 - 16 - 22398 - - - 16 - 22 - 22201 - - - 22 - 29 - 23214 - - - 29 - 36 - 21920 - - - 36 - 44 - 22370 - - - 44 - 54 - 21723 - - - 54 - 68 - 9173 - - - - - - - startLine - startColumn - - - 12 - - - 1 - 2 - 36721 - - - 2 - 3 - 28533 - - - 3 - 4 - 23017 - - - 4 - 5 - 22032 - - - 5 - 6 - 23861 - - - 6 - 7 - 27182 - - - 7 - 8 - 31149 - - - 8 - 9 - 27970 - - - 9 - 10 - 20485 - - - 10 - 12 - 22764 - - - 12 - 18 - 9876 - - - - - - - startLine - endLine - - - 12 - - - 1 - 2 - 47358 - - - 2 - 3 - 35314 - - - 3 - 4 - 25240 - - - 4 - 5 - 22173 - - - 5 - 6 - 17502 - - - 6 - 7 - 16517 - - - 7 - 8 - 13956 - - - 8 - 9 - 15110 - - - 9 - 10 - 14773 - - - 10 - 11 - 14435 - - - 11 - 12 - 13900 - - - 12 - 14 - 21638 - - - 14 - 24 - 15673 - - - - - - - startLine - endColumn - - - 12 - - - 1 - 2 - 30305 - - - 2 - 3 - 22173 - - - 3 - 4 - 17727 - - - 4 - 6 - 22004 - - - 6 - 8 - 20119 - - - 8 - 10 - 18065 - - - 10 - 14 - 25015 - - - 14 - 18 - 23299 - - - 18 - 22 - 24143 + 19707 22 26 - 25297 - - - 26 - 30 - 22595 - - - 30 - 36 - 20738 - - - 36 - 42 - 2110 - - - - - - - startColumn - id - - - 12 - - - 1 - 2 - 309 - - - 2 - 3 - 196 - - - 3 - 7 - 225 - - - 7 - 12 - 196 - - - 12 - 20 - 225 - - - 21 - 53 - 196 - - - 54 - 74 - 196 - - - 78 - 92 - 196 - - - 92 - 134 - 196 - - - 134 - 228 - 196 - - - 228 - 2062 - 196 - - - 3248 - 40806 - 196 - - - 53241 - 53242 - 28 - - - - - - - startColumn - container - - - 12 - - - 1 - 2 - 393 - - - 2 - 3 - 140 - - - 3 - 5 - 225 - - - 5 - 8 - 225 - - - 8 - 13 - 196 - - - 13 - 18 - 196 - - - 18 - 22 - 196 - - - 22 - 24 - 196 - - - 24 - 29 - 196 - - - 33 - 42 - 196 - - - 47 - 110 - 196 - - - 116 - 148 - 196 - - - - - - - startColumn - startLine - - - 12 - - - 1 - 2 - 309 - - - 2 - 3 - 196 - - - 3 - 7 - 225 - - - 7 - 12 - 196 - - - 12 - 20 - 225 - - - 21 - 53 - 196 - - - 54 - 74 - 196 - - - 77 - 88 - 196 - - - 90 - 131 - 196 - - - 134 - 224 - 196 - - - 226 - 1699 - 196 - - - 2432 - 7900 - 196 - - - 8302 - 8303 - 28 - - - - - - - startColumn - endLine - - - 12 - - - 1 - 2 - 309 - - - 2 - 3 - 196 - - - 3 - 7 - 225 - - - 7 - 12 - 196 - - - 12 - 20 - 225 - - - 21 - 53 - 196 - - - 54 - 74 - 196 - - - 77 - 88 - 196 - - - 90 - 130 - 196 - - - 134 - 221 - 196 - - - 226 - 1414 - 196 - - - 2291 - 7741 - 196 - - - 8096 - 8097 - 28 - - - - - - - startColumn - endColumn - - - 12 - - - 1 - 2 - 393 - - - 2 - 3 - 196 - - - 3 - 4 - 112 - - - 4 - 5 - 225 - - - 5 - 8 - 225 - - - 8 - 11 - 196 - - - 11 - 15 - 225 - - - 15 - 19 - 196 - - - 19 - 26 - 196 - - - 28 - 35 - 196 - - - 41 - 69 - 196 - - - 70 - 104 - 196 - - - - - - - endLine - id - - - 12 - - - 1 - 2 - 23833 - - - 2 - 3 - 19725 - - - 3 - 4 - 15729 - - - 4 - 6 - 21357 - - - 6 - 8 - 17108 - - - 8 - 11 - 21160 - - - 11 - 15 - 20063 - - - 15 - 21 - 22004 - - - 21 - 27 - 21132 - - - 27 - 34 - 20428 - - - 34 - 42 - 21610 - - - 42 - 51 - 19978 - - - 51 - 68 - 20316 - - - 68 - 130 - 1294 - - - - - - - endLine - container - - - 12 - - - 1 - 2 - 34160 - - - 2 - 3 - 22089 - - - 3 - 4 - 17474 - - - 4 - 6 - 21441 - - - 6 - 8 - 20541 - - - 8 - 11 - 21751 - - - 11 - 16 - 23861 - - - 16 - 20 - 19978 - - - 20 - 26 - 23496 + 18519 26 32 - 22286 + 18850 32 39 - 20513 + 17724 39 - 58 - 18149 + 46 + 18137 + + + 46 + 57 + 17285 + + + 57 + 70 + 17074 + + + 70 + 91 + 17214 + + + 91 + 241 + 16916 + + + 241 + 421 + 1185 + + + + + + + container + startLine + + + 12 + + + 1 + 6 + 10006 + + + 6 + 9 + 18470 + + + 9 + 12 + 15844 + + + 12 + 17 + 18953 + + + 17 + 21 + 15743 + + + 21 + 25 + 19715 + + + 25 + 30 + 18055 + + + 30 + 37 + 19081 + + + 37 + 44 + 17781 + + + 44 + 54 + 17443 + + + 54 + 66 + 17500 + + + 66 + 86 + 17247 + + + 86 + 199 + 16907 + + + 199 + 406 + 2582 + + + + + + + container + startColumn + + + 12 + + + 1 + 2 + 5210 + + + 2 + 3 + 55357 + + + 3 + 4 + 47143 + + + 4 + 5 + 40292 + + + 5 + 6 + 25778 + + + 6 + 7 + 29309 + + + 7 + 8 + 16953 + + + 8 + 28 + 5289 + + + + + + + container + endLine + + + 12 + + + 1 + 4 + 7103 + + + 4 + 6 + 16413 + + + 6 + 9 + 19553 + + + 9 + 13 + 17623 + + + 13 + 17 + 18014 + + + 17 + 20 + 14674 + + + 20 + 24 + 16865 + + + 24 + 29 + 18049 + + + 29 + 35 + 18170 + + + 35 + 42 + 19204 + + + 42 + 51 + 17983 + + + 51 + 64 + 18099 + + + 64 + 113 + 16995 + + + 113 + 336 + 6585 + + + + + + + container + endColumn + + + 12 + + + 1 + 3 + 8796 + + + 3 + 4 + 21553 + + + 4 + 6 + 15873 + + + 6 + 7 + 12300 + + + 7 + 8 + 13583 + + + 8 + 9 + 13255 + + + 9 + 10 + 11270 + + + 10 + 11 + 14178 + + + 11 + 12 + 15506 + + + 12 + 13 + 15344 + + + 13 + 14 + 12794 + + + 14 + 16 + 18290 + + + 16 + 18 + 14990 + + + 18 + 26 + 18235 + + + 26 + 33 + 17959 + + + 33 + 68 + 1400 + + + + + + + startLine + id + + + 12 + + + 1 + 2 + 1330 + + + 2 + 3 + 500 + + + 3 + 4 + 248 + + + 4 + 23 + 265 + + + 23 + 220 + 265 + + + 229 + 1001 + 265 + + + 1014 + 4600 + 265 + + + 4642 + 30796 + 265 + + + 31255 + 49199 + 125 + + + + + + + startLine + container + + + 12 + + + 1 + 2 + 1699 + + + 2 + 3 + 353 + + + 3 + 16 + 267 + + + 16 + 135 + 265 + + + 141 + 891 + 265 + + + 896 + 3568 + 265 + + + 3704 + 25127 + 265 + + + 26034 + 46240 + 149 + + + + + + + startLine + startColumn + + + 12 + + + 1 + 2 + 1374 + + + 2 + 3 + 553 + + + 3 + 4 + 267 + + + 4 + 7 + 281 + + + 7 + 10 + 243 + + + 10 + 14 + 298 + + + 14 + 25 + 287 + + + 25 + 36 + 226 + + + + + + + startLine + endLine + + + 12 + + + 1 + 2 + 1980 + + + 2 + 3 + 292 + + + 3 + 8 + 270 + + + 8 + 23 + 292 + + + 23 + 47 + 281 + + + 47 + 70 + 272 + + + 70 + 112 + 144 + + + + + + + startLine + endColumn + + + 12 + + + 1 + 2 + 1387 + + + 2 + 3 + 526 + + + 3 + 4 + 228 + + + 4 + 11 + 285 + + + 11 + 38 + 274 + + + 38 + 63 + 270 + + + 63 + 94 + 272 + + + 94 + 149 + 265 + + + 149 + 179 + 21 + + + + + + + startColumn + id + + + 12 + + + 1 + 2 + 41 + + + 2 + 3 + 21 + + + 3 + 4 + 26 + + + 4 + 5 + 8 + + + 5 + 6 + 17 + + + 6 + 8 + 17 + + + 8 + 12 + 19 + + + 12 + 90 + 19 + + + 140 + 606 + 19 + + + 681 + 1645 + 19 + + + 3968 + 11561 + 19 + + + 11584 + 1372189 + 17 + + + + + + + startColumn + container + + + 12 + + + 1 + 2 + 48 + + + 2 + 3 + 28 + + + 3 + 4 + 30 + + + 4 + 5 + 17 + + + 5 + 6 + 10 + + + 6 + 8 + 19 + + + 8 + 39 + 19 + + + 45 + 220 + 19 + + + 233 + 1699 + 19 + + + 1861 + 5687 + 19 + + + 9654 + 100221 + 15 + + + + + + + startColumn + startLine + + + 12 + + + 1 + 2 + 41 + + + 2 + 3 + 21 + + + 3 + 4 + 26 + + + 4 + 5 + 8 + + + 5 + 6 + 17 + + + 6 + 8 + 17 + + + 8 + 11 + 19 + + + 12 + 52 + 19 + + + 53 + 125 + 19 + + + 131 + 177 + 19 + + + 179 + 386 + 19 + + + 423 + 904 + 17 + + + + + + + startColumn + endLine + + + 12 + + + 1 + 2 + 41 + + + 2 + 3 + 21 + + + 3 + 4 + 26 + + + 4 + 5 + 10 + + + 5 + 7 + 21 + + + 7 + 9 + 17 + + + 9 + 14 + 19 + + + 14 + 71 + 19 + + + 88 + 140 + 19 + + + 140 + 191 + 19 + + + 232 + 543 + 19 + + + 559 + 899 + 10 + + + + + + + startColumn + endColumn + + + 12 + + + 1 + 2 + 54 + + + 2 + 3 + 43 + + + 3 + 4 + 37 + + + 4 + 5 + 28 + + + 5 + 6 + 15 + + + 6 + 8 + 21 + + + 8 + 12 + 19 + + + 13 + 74 + 19 + + + 93 + 198 + 8 + + + + + + + endLine + id + + + 12 + + + 1 + 2 + 1150 + + + 2 + 3 + 606 + + + 3 + 4 + 202 + + + 4 + 15 + 270 + + + 15 + 144 + 259 + + + 149 + 881 + 261 + + + 959 + 3635 + 259 + + + 3657 + 22005 + 259 + + + 22053 + 43062 + 171 + + + + + + + endLine + container + + + 12 + + + 1 + 2 + 1664 + + + 2 + 3 + 353 + + + 3 + 20 + 259 + + + 20 + 196 + 259 + + + 207 + 842 + 259 + + + 846 + 3913 + 259 + + + 3933 + 24449 + 259 + + + 24521 + 35597 + 125 @@ -7952,62 +7454,37 @@ 1 2 - 44459 + 1824 2 3 - 32500 + 298 3 - 4 - 25268 - - - 4 - 5 - 20851 - - - 5 - 6 - 18909 - - - 6 - 7 - 15898 - - - 7 8 - 16292 + 283 8 - 9 - 14969 + 24 + 267 - 9 - 10 - 13956 + 24 + 41 + 267 - 10 - 12 - 24509 + 41 + 57 + 276 - 12 - 15 - 24255 - - - 15 - 100 - 13872 + 57 + 84 + 219 @@ -8023,57 +7500,42 @@ 1 2 - 34160 + 1227 2 3 - 27913 + 627 3 4 - 23045 + 259 4 - 5 - 24396 - - - 5 - 6 - 25409 - - - 6 7 - 28026 + 272 7 - 8 - 30699 - - - 8 - 9 - 25662 - - - 9 10 - 17671 + 245 10 - 12 - 20513 + 14 + 285 - 12 - 18 - 8244 + 14 + 24 + 261 + + + 24 + 36 + 259 @@ -8089,67 +7551,42 @@ 1 2 - 33823 + 1321 2 3 - 22764 + 570 3 - 4 - 17164 + 5 + 278 - 4 - 6 - 24396 + 5 + 17 + 270 - 6 - 8 - 20991 + 17 + 45 + 261 - 8 - 10 - 17530 + 45 + 74 + 267 - 10 - 13 - 19753 + 74 + 108 + 261 - 13 - 16 - 20569 - - - 16 - 19 - 20119 - - - 19 - 22 - 19022 - - - 22 - 26 - 23749 - - - 26 - 31 - 21019 - - - 31 - 39 - 4839 + 108 + 180 + 206 @@ -8164,68 +7601,73 @@ 1 - 2 - 253 + 11 + 37 - 2 - 4 - 253 + 11 + 42 + 35 - 4 - 7 - 225 + 43 + 63 + 35 - 7 - 16 - 253 + 63 + 95 + 35 - 23 - 131 - 253 + 98 + 184 + 35 - 149 - 388 - 253 + 184 + 223 + 35 - 392 - 675 - 253 + 223 + 526 + 35 - 710 - 1137 - 253 + 573 + 1737 + 35 - 1139 - 1672 - 253 + 2000 + 4203 + 35 - 1883 - 2794 - 253 + 4363 + 9065 + 35 - 2937 - 4095 - 253 + 9539 + 29497 + 35 - 4146 - 4771 - 253 + 35135 + 64752 + 35 - 5032 - 15404 - 225 + 66007 + 337354 + 35 + + + 475678 + 685070 + 4 @@ -8240,73 +7682,73 @@ 1 - 2 - 281 - - - 2 - 3 - 253 - - - 3 6 - 253 + 35 6 - 21 - 253 + 23 + 35 - 31 - 67 - 253 + 24 + 51 + 37 - 68 - 93 - 253 + 51 + 72 + 37 - 94 - 106 - 253 + 72 + 154 + 35 - 107 - 112 - 253 + 158 + 200 + 35 - 112 - 118 - 253 + 207 + 389 + 35 - 118 - 122 - 196 + 397 + 1388 + 35 - 122 - 123 - 140 + 1419 + 2381 + 35 - 123 - 124 - 225 + 2453 + 5497 + 35 - 124 - 127 - 253 + 5825 + 14041 + 35 - 127 - 147 - 112 + 14633 + 22330 + 35 + + + 23082 + 73454 + 35 + + + 100181 + 100182 + 2 @@ -8321,68 +7763,68 @@ 1 - 2 - 253 + 3 + 35 - 2 - 4 - 253 + 3 + 10 + 37 - 4 - 7 - 225 + 10 + 14 + 35 - 7 - 15 - 253 + 14 + 38 + 35 - 22 - 129 - 253 + 38 + 57 + 35 - 143 - 374 - 253 + 57 + 67 + 35 - 379 - 646 - 253 + 69 + 125 + 35 - 666 - 963 - 253 + 129 + 191 + 35 - 1000 - 1430 - 253 + 191 + 255 + 35 - 1586 - 2172 - 253 + 261 + 318 + 37 - 2265 - 2916 - 253 + 320 + 407 + 35 - 2948 - 3215 - 253 + 410 + 451 + 37 - 3417 - 5821 - 225 + 459 + 583 + 35 @@ -8398,72 +7840,52 @@ 1 2 - 281 + 142 2 3 - 225 + 32 3 + 4 + 41 + + + 4 5 - 281 + 32 5 + 6 + 32 + + + 6 8 - 253 + 30 8 - 12 - 253 + 11 + 37 - 12 - 14 - 168 + 11 + 13 + 39 - 14 + 13 16 - 253 + 41 16 - 19 - 168 - - - 19 - 21 - 225 - - - 21 - 23 - 253 - - - 23 - 25 - 253 - - - 25 - 28 - 253 - - - 28 - 33 - 281 - - - 45 - 57 - 84 + 29 + 30 @@ -8478,68 +7900,68 @@ 1 - 2 - 281 + 3 + 35 - 2 - 4 - 225 + 3 + 10 + 37 - 4 - 7 - 281 + 10 + 14 + 35 - 7 - 27 - 253 + 14 + 38 + 35 - 42 + 38 + 57 + 37 + + + 57 + 70 + 35 + + + 70 130 - 253 + 35 - 139 - 325 - 253 + 134 + 192 + 35 - 364 - 584 - 253 + 197 + 262 + 37 - 610 - 967 - 253 + 262 + 321 + 35 - 1056 - 1409 - 253 + 322 + 406 + 35 - 1420 - 2038 - 253 + 408 + 451 + 35 - 2065 - 2627 - 253 - - - 2651 - 3073 - 253 - - - 3086 - 4516 - 168 + 459 + 566 + 35 @@ -8549,11 +7971,11 @@ locations_expr - 18007923 + 18007924 id - 18007923 + 18007924 container @@ -8587,7 +8009,7 @@ 1 2 - 18007923 + 18007924 @@ -8603,7 +8025,7 @@ 1 2 - 18007923 + 18007924 @@ -8619,7 +8041,7 @@ 1 2 - 18007923 + 18007924 @@ -8635,7 +8057,7 @@ 1 2 - 18007923 + 18007924 @@ -8651,7 +8073,7 @@ 1 2 - 18007923 + 18007924 @@ -10476,23 +9898,23 @@ numlines - 808529 + 1153975 element_id - 807405 + 1153975 num_lines - 39477 + 41381 num_code - 33980 + 35794 num_comment - 18364 + 16762 @@ -10506,12 +9928,7 @@ 1 2 - 806280 - - - 2 - 3 - 1124 + 1153975 @@ -10527,12 +9944,7 @@ 1 2 - 806280 - - - 2 - 3 - 1124 + 1153975 @@ -10548,12 +9960,7 @@ 1 2 - 807155 - - - 2 - 3 - 249 + 1153975 @@ -10569,27 +9976,37 @@ 1 2 - 26734 + 21825 2 3 - 3747 + 5238 3 + 4 + 3317 + + + 4 5 - 3373 + 2968 5 - 37 - 3123 + 9 + 3492 - 41 - 1978 - 2498 + 9 + 60 + 3317 + + + 139 + 1502 + 1222 @@ -10605,181 +10022,196 @@ 1 2 - 27234 + 23746 2 3 - 4122 + 6635 3 4 - 2498 + 3492 4 - 7 - 3497 - - - 7 - 12 - 2123 - - - - - - - num_lines - num_comment - - - 12 - - - 1 - 2 - 26859 - - - 2 - 3 - 4122 - - - 3 - 4 - 2498 - - - 4 - 6 - 3123 - - - 6 - 11 - 2873 - - - - - - - num_code - element_id - - - 12 - - - 1 - 2 - 21612 - - - 2 - 3 - 3747 - - - 3 - 4 - 2373 - - - 4 - 13 - 2873 - - - 14 - 197 - 2623 - - - 205 - 2101 - 749 - - - - - - - num_code - num_lines - - - 12 - - - 1 - 2 - 21987 - - - 2 - 3 - 3747 - - - 3 - 4 - 2123 - - - 4 - 6 - 1873 - - - 6 - 9 - 2748 - - - 9 - 13 - 1499 - - - - - - - num_code - num_comment - - - 12 - - - 1 - 2 - 21737 - - - 2 - 3 - 4372 - - - 3 5 - 2873 + 3841 5 8 - 3123 + 3492 8 + 9 + 174 + + + + + + + num_lines + num_comment + + + 12 + + + 1 + 2 + 23397 + + + 2 + 3 + 7508 + + + 3 + 4 + 4539 + + + 4 + 5 + 3142 + + + 5 + 10 + 2793 + + + + + + + num_code + element_id + + + 12 + + + 1 + 2 + 18857 + + + 2 + 3 + 4190 + + + 3 + 4 + 3841 + + + 4 + 7 + 2793 + + + 7 + 18 + 2793 + + + 18 + 928 + 2793 + + + 1043 + 1509 + 523 + + + + + + + num_code + num_lines + + + 12 + + + 1 + 2 + 19905 + + + 2 + 3 + 5238 + + + 3 + 4 + 4015 + + + 4 + 6 + 2793 + + + 6 + 10 + 3142 + + + 10 12 - 1873 + 698 + + + + + + + num_code + num_comment + + + 12 + + + 1 + 2 + 20079 + + + 2 + 3 + 4888 + + + 3 + 4 + 4365 + + + 4 + 5 + 1746 + + + 5 + 7 + 2793 + + + 7 + 11 + 1920 @@ -10795,32 +10227,37 @@ 1 2 - 11368 + 7857 2 3 - 1748 + 2269 3 4 - 1499 + 1396 4 7 - 1374 + 1396 - 8 - 22 - 1499 + 7 + 9 + 1047 - 42 - 3650 - 874 + 9 + 19 + 1396 + + + 22 + 5980 + 1396 @@ -10836,32 +10273,42 @@ 1 2 - 11368 + 7857 2 3 - 1748 + 2269 3 4 - 1499 + 1396 4 - 7 - 1499 + 6 + 1396 + + + 6 + 8 + 349 8 - 27 - 1499 + 9 + 1222 - 30 - 48 - 749 + 9 + 17 + 1396 + + + 17 + 54 + 873 @@ -10877,32 +10324,37 @@ 1 2 - 11368 + 7857 2 3 - 1748 + 2269 3 4 - 1748 + 1396 4 + 6 + 1396 + + + 6 9 - 1499 + 1396 - 10 - 36 - 1624 + 9 + 16 + 1396 - 36 - 43 - 374 + 18 + 51 + 1047 @@ -10912,31 +10364,31 @@ diagnostics - 1484 + 2936 id - 1484 + 2936 severity - 21 + 51 error_tag - 43 + 103 error_message - 150 + 103 full_error_message - 150 + 103 location - 64 + 103 @@ -10950,7 +10402,7 @@ 1 2 - 1484 + 2936 @@ -10966,7 +10418,7 @@ 1 2 - 1484 + 2936 @@ -10982,7 +10434,7 @@ 1 2 - 1484 + 2936 @@ -10998,7 +10450,7 @@ 1 2 - 1484 + 2936 @@ -11014,7 +10466,7 @@ 1 2 - 1484 + 2936 @@ -11028,9 +10480,9 @@ 12 - 69 - 70 - 21 + 57 + 58 + 51 @@ -11046,7 +10498,7 @@ 2 3 - 21 + 51 @@ -11059,142 +10511,127 @@ 12 - - 7 - 8 - 21 - - - - - - - severity - full_error_message - - - 12 - - - 7 - 8 - 21 - - - - - - - severity - location - - - 12 - - - 3 - 4 - 21 - - - - - - - error_tag - id - - - 12 - - - 6 - 7 - 21 - - - 63 - 64 - 21 - - - - - - - error_tag - severity - - - 12 - - - 1 - 2 - 43 - - - - - - - error_tag - error_message - - - 12 - - - 1 - 2 - 21 - - - 6 - 7 - 21 - - - - - - - error_tag - full_error_message - - - 12 - - - 1 - 2 - 21 - - - 6 - 7 - 21 - - - - - - - error_tag - location - - - 12 - - - 1 - 2 - 21 - 2 3 - 21 + 51 + + + + + + + severity + full_error_message + + + 12 + + + 2 + 3 + 51 + + + + + + + severity + location + + + 12 + + + 2 + 3 + 51 + + + + + + + error_tag + id + + + 12 + + + 1 + 2 + 51 + + + 56 + 57 + 51 + + + + + + + error_tag + severity + + + 12 + + + 1 + 2 + 103 + + + + + + + error_tag + error_message + + + 12 + + + 1 + 2 + 103 + + + + + + + error_tag + full_error_message + + + 12 + + + 1 + 2 + 103 + + + + + + + error_tag + location + + + 12 + + + 1 + 2 + 103 @@ -11210,12 +10647,12 @@ 1 2 - 129 + 51 - 63 - 64 - 21 + 56 + 57 + 51 @@ -11231,7 +10668,7 @@ 1 2 - 150 + 103 @@ -11247,7 +10684,7 @@ 1 2 - 150 + 103 @@ -11263,7 +10700,7 @@ 1 2 - 150 + 103 @@ -11279,7 +10716,7 @@ 1 2 - 150 + 103 @@ -11295,12 +10732,12 @@ 1 2 - 129 + 51 - 63 - 64 - 21 + 56 + 57 + 51 @@ -11316,7 +10753,7 @@ 1 2 - 150 + 103 @@ -11332,7 +10769,7 @@ 1 2 - 150 + 103 @@ -11348,7 +10785,7 @@ 1 2 - 150 + 103 @@ -11364,7 +10801,7 @@ 1 2 - 150 + 103 @@ -11378,14 +10815,14 @@ 12 - 3 - 4 - 43 + 1 + 2 + 51 - 63 - 64 - 21 + 56 + 57 + 51 @@ -11401,7 +10838,7 @@ 1 2 - 64 + 103 @@ -11417,7 +10854,7 @@ 1 2 - 64 + 103 @@ -11433,12 +10870,7 @@ 1 2 - 21 - - - 3 - 4 - 43 + 103 @@ -11454,12 +10886,7 @@ 1 2 - 21 - - - 3 - 4 - 43 + 103 @@ -11469,15 +10896,15 @@ files - 74641 + 230754 id - 74641 + 230754 name - 74641 + 230754 @@ -11491,7 +10918,7 @@ 1 2 - 74641 + 230754 @@ -11507,7 +10934,7 @@ 1 2 - 74641 + 230754 @@ -11517,15 +10944,15 @@ folders - 14181 + 22981 id - 14181 + 22981 name - 14181 + 22981 @@ -11539,7 +10966,7 @@ 1 2 - 14181 + 22981 @@ -11555,7 +10982,7 @@ 1 2 - 14181 + 22981 @@ -11565,15 +10992,15 @@ containerparent - 88798 + 231298 parent - 14181 + 548 child - 88798 + 231298 @@ -11587,42 +11014,72 @@ 1 2 - 6903 + 32 2 - 3 - 1740 - - - 3 4 - 761 + 48 4 - 6 - 1148 - - - 6 - 10 - 1112 - - - 10 - 16 - 1148 + 14 + 41 16 - 44 - 1063 + 17 + 4 - 44 - 151 - 302 + 18 + 19 + 54 + + + 19 + 55 + 41 + + + 63 + 159 + 41 + + + 164 + 345 + 41 + + + 352 + 697 + 41 + + + 774 + 931 + 21 + + + 946 + 949 + 41 + + + 950 + 983 + 39 + + + 984 + 985 + 74 + + + 992 + 1009 + 21 @@ -11638,7 +11095,7 @@ 1 2 - 88798 + 231298 @@ -11648,23 +11105,23 @@ fileannotations - 4807876 + 29052092 id - 6600 + 219955 kind - 24 + 4 name - 67206 + 10170 value - 45227 + 1159 @@ -11675,15 +11132,10 @@ 12 - - 1 - 2 - 229 - 2 3 - 6371 + 219955 @@ -11697,437 +11149,327 @@ 12 - 1 - 86 - 495 + 39 + 40 + 45059 - 88 - 206 - 495 - - - 212 - 291 - 507 - - - 291 - 359 - 495 - - - 362 - 401 - 495 - - - 402 - 479 - 495 - - - 480 - 549 - 290 - - - 550 - 551 - 1523 - - - 553 - 628 - 495 - - - 631 - 753 - 519 - - - 753 - 1231 - 507 - - - 1234 - 2155 - 278 - - - - - - - id - value - - - 12 - - - 1 - 98 - 495 - - - 102 - 244 - 495 - - - 244 - 351 - 495 - - - 352 - 434 - 507 - - - 434 - 490 - 507 - - - 490 - 628 - 495 - - - 632 - 702 - 72 - - - 706 - 707 - 1523 - - - 710 - 939 - 495 - - - 939 - 1038 - 495 - - - 1066 - 1853 - 495 - - - 1853 - 3292 - 495 - - - 3423 - 3742 - 24 - - - - - - - kind - id - - - 12 - - - 527 - 528 - 12 - - - 546 - 547 - 12 - - - - - - - kind - name - - - 12 - - - 2 - 3 - 12 - - - 5557 - 5558 - 12 - - - - - - - kind - value - - - 12 - - - 1 - 2 - 12 - - - 3741 - 3742 - 12 - - - - - - - name - id - - - 12 - - - 1 - 2 - 12621 - - - 2 - 3 - 4993 - - - 3 - 5 - 5790 - - - 5 - 7 - 4690 - - - 7 - 9 - 5258 - - - 9 - 16 - 4956 - - - 16 - 19 - 5597 - - - 19 - 27 - 4872 - - - 27 - 47 - 5537 - - - 47 - 128 - 5633 - - - 128 - 459 - 5295 - - - 459 - 546 - 1958 - - - - - - - name - kind - - - 12 - - - 1 - 2 - 67206 - - - - - - - name - value - - - 12 - - - 1 - 2 - 13262 - - - 2 - 3 - 8801 - - - 3 - 4 - 4690 - - - 4 - 6 - 4654 - - - 6 - 8 - 3917 - - - 8 - 11 - 5428 - - - 11 - 17 - 6177 - - - 17 - 23 - 5379 - - - 23 + 40 41 - 5355 + 3627 41 - 95 - 5113 + 42 + 35646 - 95 - 1726 - 4424 - - - - - - - value - id - - - 12 - - - 1 - 2 - 3844 + 42 + 44 + 8027 - 2 - 4 - 1873 + 56 + 57 + 22807 - 4 - 5 - 3651 - - - 5 - 8 - 2816 - - - 8 - 14 - 3397 - - - 14 - 17 - 2212 - - - 17 - 24 - 3481 - - - 24 - 51 - 4050 - - - 51 + 57 58 - 3469 + 14290 58 - 80 - 3409 + 59 + 18547 - 81 - 151 - 3530 + 59 + 89 + 18022 - 151 - 334 - 3409 + 89 + 173 + 17311 - 334 - 473 - 3433 + 174 + 178 + 18488 - 473 - 547 - 2647 + 179 + 276 + 18055 + + + 276 + 277 + 70 + + + + + + + id + value + + + 12 + + + 48 + 49 + 45059 + + + 49 + 51 + 3155 + + + 51 + 52 + 35828 + + + 52 + 54 + 8317 + + + 69 + 70 + 22807 + + + 70 + 72 + 14261 + + + 72 + 73 + 18514 + + + 73 + 102 + 18051 + + + 102 + 409 + 17344 + + + 411 + 416 + 18132 + + + 417 + 528 + 18411 + + + 528 + 529 + 70 + + + + + + + kind + id + + + 12 + + + 100172 + 100173 + 4 + + + + + + + kind + name + + + 12 + + + 2 + 3 + 2 + + + 4630 + 4631 + 2 + + + + + + + kind + value + + + 12 + + + 1 + 2 + 2 + + + 528 + 529 + 2 + + + + + + + name + id + + + 12 + + + 1 + 2 + 72 + + + 3 + 4 + 5911 + + + 4 + 5 + 3442 + + + 18 + 100173 + 744 + + + + + + + name + kind + + + 12 + + + 1 + 2 + 10170 + + + + + + + name + value + + + 12 + + + 1 + 2 + 9202 + + + 2 + 24 + 797 + + + 24 + 397 + 171 + + + + + + + value + id + + + 12 + + + 32 + 33 + 2 + + + 960 + 961 + 109 + + + 1014 + 2296 + 87 + + + 2419 + 16676 + 63 + + + 18355 + 18356 + 513 + + + 18395 + 20335 + 94 + + + 20388 + 25553 + 68 + + + 26531 + 58110 + 103 + + + 60781 + 79652 + 10 + + + 100172 + 100173 + 105 @@ -12143,12 +11485,12 @@ 1 2 - 45215 + 1157 2 3 - 12 + 2 @@ -12164,72 +11506,77 @@ 1 2 - 3892 + 2 2 - 4 - 2188 + 3 + 109 - 4 - 5 - 3493 - - - 5 + 3 8 - 2841 + 65 8 + 9 + 59 + + + 9 + 10 + 68 + + + 10 + 11 + 109 + + + 11 + 12 + 85 + + + 12 14 - 3989 + 105 14 + 16 + 76 + + + 16 18 - 3953 + 90 18 - 28 - 3663 + 21 + 103 - 28 - 34 - 3602 + 21 + 24 + 92 - 34 - 41 - 3663 + 24 + 27 + 76 - 41 - 66 - 3421 + 27 + 33 + 92 - 66 - 92 - 3518 - - - 92 - 113 - 3421 - - - 113 - 145 - 3469 - - - 145 - 172 - 108 + 33 + 4319 + 21 @@ -12239,15 +11586,15 @@ inmacroexpansion - 149995966 + 149995978 id - 24670876 + 24670878 inv - 3705264 + 3705265 @@ -12281,7 +11628,7 @@ 7 8 - 8719001 + 8719002 8 @@ -12367,15 +11714,15 @@ affectedbymacroexpansion - 48735844 + 73932090 id - 7044741 + 5343163 inv - 3803122 + 9717793 @@ -12389,37 +11736,47 @@ 1 2 - 3846709 + 2178250 2 3 - 766305 + 606526 3 4 - 361841 + 335791 4 - 5 - 772736 + 7 + 434209 - 5 - 12 - 535160 + 7 + 18 + 471017 - 12 - 50 - 556267 + 18 + 25 + 458480 - 50 - 9900 - 205719 + 25 + 35 + 449158 + + + 35 + 488 + 401009 + + + 489 + 4499 + 8720 @@ -12434,68 +11791,48 @@ 1 + 2 + 474340 + + + 2 4 - 313248 + 713165 4 + 6 + 786996 + + + 6 7 - 316607 + 601737 7 + 8 + 1284648 + + + 8 9 - 301088 + 3310258 9 + 11 + 733734 + + + 11 12 - 342938 + 1408336 12 - 13 - 456004 - - - 13 - 14 - 226099 - - - 14 - 15 - 408038 - - - 15 - 16 - 166429 - - - 16 - 17 - 377677 - - - 17 - 18 - 200636 - - - 18 - 20 - 344255 - - - 20 - 25 - 285393 - - - 25 - 207 - 64702 + 185 + 404576 @@ -12505,23 +11842,23 @@ macroinvocations - 39390675 + 180467764 id - 39390675 + 180467764 macro_id - 181997 + 704547 location - 5904643 + 29969904 kind - 108 + 1938 @@ -12535,7 +11872,7 @@ 1 2 - 39390675 + 180467764 @@ -12551,7 +11888,7 @@ 1 2 - 39390675 + 180467764 @@ -12567,7 +11904,7 @@ 1 2 - 39390675 + 180467764 @@ -12583,98 +11920,113 @@ 1 2 - 60738 + 176379 2 3 - 27781 + 100788 3 4 - 17921 + 39733 4 - 5 - 9805 + 6 + 52332 - 5 - 7 - 14272 - - - 7 - 13 - 14381 - - - 13 - 33 - 13890 - - - 33 - 185 - 13672 - - - 190 - 70079 - 9532 - - - - - - - macro_id - location - - - 12 - - - 1 - 2 - 77243 - - - 2 - 3 - 30559 - - - 3 - 4 - 14326 - - - 4 - 5 - 10350 - - - 5 + 6 8 - 14054 + 44579 8 - 18 - 14108 + 13 + 56208 - 18 - 88 - 13672 + 13 + 25 + 55239 - 88 - 12162 - 7680 + 25 + 56 + 53301 + + + 56 + 134 + 54270 + + + 136 + 844 + 53301 + + + 846 + 19520 + 18413 + + + + + + + macro_id + location + + + 12 + + + 1 + 2 + 231618 + + + 2 + 3 + 116293 + + + 3 + 4 + 52332 + + + 4 + 6 + 61054 + + + 6 + 9 + 54270 + + + 9 + 16 + 58146 + + + 16 + 43 + 54270 + + + 44 + 262 + 53301 + + + 263 + 6926 + 23258 @@ -12690,12 +12042,12 @@ 1 2 - 177475 + 678381 2 3 - 4521 + 26166 @@ -12711,17 +12063,12 @@ 1 2 - 5248396 + 29347732 2 - 3 - 248074 - - - 3 - 70079 - 408172 + 19520 + 622172 @@ -12737,12 +12084,12 @@ 1 2 - 5882472 + 29966997 2 - 37 - 22170 + 3 + 2907 @@ -12758,7 +12105,7 @@ 1 2 - 5904643 + 29969904 @@ -12772,14 +12119,14 @@ 12 - 1470 - 1471 - 54 + 617 + 618 + 969 - 721641 - 721642 - 54 + 185602 + 185603 + 969 @@ -12793,14 +12140,14 @@ 12 - 281 - 282 - 54 + 70 + 71 + 969 - 3143 - 3144 - 54 + 684 + 685 + 969 @@ -12814,14 +12161,14 @@ 12 - 1060 - 1061 - 54 + 577 + 578 + 969 - 107334 - 107335 - 54 + 30348 + 30349 + 969 @@ -12831,15 +12178,15 @@ macroparent - 32844710 + 153017561 id - 32844710 + 153017561 parent_id - 15561449 + 67977654 @@ -12853,7 +12200,7 @@ 1 2 - 32844710 + 153017561 @@ -12869,27 +12216,27 @@ 1 2 - 7669107 + 28392183 2 3 - 1551198 + 5737165 3 4 - 4552710 + 23312079 4 5 - 1263086 + 10038100 5 - 205 - 525346 + 14 + 498125 @@ -12899,15 +12246,15 @@ macrolocationbind - 6883157 + 6882831 id - 4222542 + 4222159 location - 2746954 + 2747013 @@ -12921,12 +12268,12 @@ 1 2 - 2460116 + 2459695 2 3 - 1326251 + 1326280 3 @@ -12936,7 +12283,7 @@ 4 5 - 413540 + 413549 5 @@ -12957,12 +12304,12 @@ 1 2 - 1393959 + 1393989 2 3 - 907138 + 907158 3 @@ -12972,7 +12319,7 @@ 4 5 - 410829 + 410838 5 @@ -12987,19 +12334,19 @@ macro_argument_unexpanded - 94276712 + 205272282 invocation - 30002299 + 104596662 argument_index - 797 + 15505 text - 392900 + 4863022 @@ -13013,22 +12360,27 @@ 1 2 - 11044782 + 64885206 2 3 - 11156139 + 1060212 3 4 - 5707682 + 19056692 4 - 67 - 2093693 + 5 + 19214657 + + + 6 + 17 + 379893 @@ -13044,22 +12396,27 @@ 1 2 - 11253824 + 64952075 2 3 - 11175326 + 1029200 3 4 - 5529264 + 19161356 4 - 67 - 2043884 + 5 + 19075105 + + + 6 + 16 + 378924 @@ -13073,19 +12430,79 @@ 12 - 46457 - 46458 - 701 + 2 + 3 + 969 - 46659 - 173182 - 60 + 5 + 6 + 969 - 645295 - 2481657 - 36 + 7 + 8 + 969 + + + 17 + 18 + 969 + + + 294 + 295 + 969 + + + 315 + 316 + 969 + + + 320 + 321 + 969 + + + 329 + 330 + 969 + + + 360 + 361 + 969 + + + 372 + 373 + 969 + + + 392 + 393 + 1938 + + + 20219 + 20220 + 969 + + + 39883 + 39884 + 969 + + + 40977 + 40978 + 969 + + + 107930 + 107931 + 969 @@ -13099,19 +12516,79 @@ 12 - 2 - 3 - 701 + 1 + 2 + 969 - 13 - 1115 - 60 + 4 + 5 + 969 - 7702 - 22873 - 36 + 5 + 6 + 969 + + + 9 + 10 + 969 + + + 166 + 167 + 969 + + + 190 + 191 + 969 + + + 200 + 201 + 1938 + + + 203 + 204 + 969 + + + 204 + 205 + 969 + + + 206 + 207 + 969 + + + 210 + 211 + 969 + + + 283 + 284 + 969 + + + 1168 + 1169 + 969 + + + 1403 + 1404 + 969 + + + 1903 + 1904 + 969 @@ -13127,57 +12604,37 @@ 1 2 - 46351 + 2082629 2 3 - 71401 + 1045675 3 4 - 26476 + 323684 4 5 - 39714 + 393460 5 - 6 - 44779 + 8 + 351789 - 6 - 9 - 32714 + 8 + 17 + 371171 - 9 - 15 - 32847 - - - 15 - 27 - 29933 - - - 27 - 57 - 30441 - - - 57 - 517 - 29680 - - - 518 - 485092 - 8559 + 17 + 19520 + 294611 @@ -13193,17 +12650,17 @@ 1 2 - 278339 + 4290275 2 - 3 - 102870 + 4 + 380862 - 3 - 9 - 11690 + 4 + 13 + 191884 @@ -13213,19 +12670,19 @@ macro_argument_expanded - 94276712 + 205272282 invocation - 30002299 + 104596662 argument_index - 797 + 15505 text - 237996 + 1150340 @@ -13239,22 +12696,27 @@ 1 2 - 11044782 + 64885206 2 3 - 11156139 + 1060212 3 4 - 5707682 + 19056692 4 - 67 - 2093693 + 5 + 19214657 + + + 6 + 17 + 379893 @@ -13270,22 +12732,12 @@ 1 2 - 14421415 + 102448132 2 - 3 - 9625327 - - - 3 - 4 - 4822818 - - - 4 - 9 - 1132737 + 14 + 2148529 @@ -13299,19 +12751,79 @@ 12 - 46457 - 46458 - 701 + 2 + 3 + 969 - 46659 - 173182 - 60 + 5 + 6 + 969 - 645295 - 2481657 - 36 + 7 + 8 + 969 + + + 17 + 18 + 969 + + + 294 + 295 + 969 + + + 315 + 316 + 969 + + + 320 + 321 + 969 + + + 329 + 330 + 969 + + + 360 + 361 + 969 + + + 372 + 373 + 969 + + + 392 + 393 + 1938 + + + 20219 + 20220 + 969 + + + 39883 + 39884 + 969 + + + 40977 + 40978 + 969 + + + 107930 + 107931 + 969 @@ -13327,17 +12839,77 @@ 1 2 - 689 + 969 - 2 - 96 - 60 + 4 + 5 + 969 - 950 - 16176 - 48 + 5 + 6 + 969 + + + 7 + 8 + 969 + + + 13 + 14 + 969 + + + 14 + 15 + 969 + + + 17 + 18 + 969 + + + 18 + 19 + 969 + + + 20 + 21 + 969 + + + 22 + 23 + 969 + + + 28 + 29 + 1938 + + + 50 + 51 + 969 + + + 57 + 58 + 969 + + + 179 + 180 + 969 + + + 997 + 998 + 969 @@ -13353,57 +12925,37 @@ 1 2 - 25243 + 539797 2 3 - 31324 + 242278 3 4 - 52203 + 31980 4 5 - 18400 + 116293 5 - 6 - 3542 + 9 + 93035 - 6 - 7 - 20842 + 9 + 43 + 88189 - 7 - 10 - 19355 - - - 10 - 19 - 20576 - - - 19 - 51 - 17856 - - - 51 - 253 - 17989 - - - 254 - 1166783 - 10663 + 44 + 83453 + 38764 @@ -13419,17 +12971,17 @@ 1 2 - 120279 + 996250 2 3 - 101770 + 120170 3 - 66 - 15946 + 13 + 33919 @@ -13439,19 +12991,19 @@ functions - 4010790 + 7629848 id - 4010790 + 7629848 name - 1648540 + 4518986 kind - 999 + 5814 @@ -13465,7 +13017,7 @@ 1 2 - 4010790 + 7629848 @@ -13481,7 +13033,7 @@ 1 2 - 4010790 + 7629848 @@ -13497,17 +13049,12 @@ 1 2 - 1402308 + 4307719 2 - 4 - 139168 - - - 4 - 3162 - 107062 + 2658 + 211267 @@ -13523,12 +13070,7 @@ 1 2 - 1645667 - - - 2 - 3 - 2873 + 4518986 @@ -13542,44 +13084,34 @@ 12 - 8 - 9 - 124 + 2 + 3 + 969 - 13 - 14 - 124 + 7 + 8 + 969 - 47 - 48 - 124 + 36 + 37 + 969 - 83 - 84 - 124 + 88 + 89 + 969 - 690 - 691 - 124 + 2770 + 2771 + 969 - 4450 - 4451 - 124 - - - 5230 - 5231 - 124 - - - 21584 - 21585 - 124 + 4970 + 4971 + 969 @@ -13595,42 +13127,32 @@ 2 3 - 124 + 969 - 13 - 14 - 124 + 4 + 5 + 969 - 18 - 19 - 124 + 16 + 17 + 969 - 41 - 42 - 124 + 24 + 25 + 969 - 43 - 44 - 124 + 35 + 36 + 969 - 302 - 303 - 124 - - - 504 - 505 - 124 - - - 12296 - 12297 - 124 + 4582 + 4583 + 969 @@ -13640,15 +13162,15 @@ function_entry_point - 1141046 + 1141563 id - 1137298 + 1137815 entry_point - 1141046 + 1141563 @@ -13662,12 +13184,12 @@ 1 2 - 1134095 + 1134613 2 17 - 3203 + 3202 @@ -13683,7 +13205,7 @@ 1 2 - 1141046 + 1141563 @@ -13693,15 +13215,15 @@ function_return_type - 4028280 + 7629848 id - 4010790 + 7629848 return_type - 622887 + 1538955 @@ -13715,12 +13237,7 @@ 1 2 - 3993300 - - - 2 - 3 - 17489 + 7629848 @@ -13736,27 +13253,22 @@ 1 2 - 312942 + 94973 2 3 - 213500 + 1308306 3 - 5 - 48471 + 29 + 116293 - 5 - 354 - 46722 - - - 358 - 9897 - 1249 + 32 + 1445 + 19382 @@ -14036,59 +13548,59 @@ purefunctions - 138721 + 131414 id - 138721 + 131414 function_deleted - 88082 + 88088 id - 88082 + 88088 function_defaulted - 51679 + 51682 id - 51679 + 51682 function_prototyped - 4009291 + 7627910 id - 4009291 + 7627910 deduction_guide_for_class - 5871 + 5868 id - 5871 + 5868 class_template - 2248 + 2247 @@ -14102,7 +13614,7 @@ 1 2 - 5871 + 5868 @@ -14118,7 +13630,7 @@ 1 2 - 1124 + 1123 2 @@ -14153,15 +13665,15 @@ member_function_this_type - 676231 + 687951 id - 676231 + 687951 this_type - 177646 + 173971 @@ -14175,7 +13687,7 @@ 1 2 - 676231 + 687951 @@ -14191,37 +13703,42 @@ 1 2 - 48721 + 49909 2 3 - 36853 + 49542 3 4 - 32855 + 24587 4 5 - 19988 + 9670 5 6 - 12867 + 6786 6 - 10 - 14491 + 8 + 15829 - 10 - 65 - 11868 + 8 + 21 + 13253 + + + 21 + 868 + 4394 @@ -14231,27 +13748,27 @@ fun_decls - 4155705 + 7853714 id - 4149709 + 7853714 function - 3986304 + 7627910 type_id - 614892 + 1538955 name - 1647041 + 4517048 location - 2769887 + 6410700 @@ -14265,7 +13782,7 @@ 1 2 - 4149709 + 7853714 @@ -14281,12 +13798,7 @@ 1 2 - 4143712 - - - 2 - 3 - 5996 + 7853714 @@ -14302,7 +13814,7 @@ 1 2 - 4149709 + 7853714 @@ -14318,7 +13830,7 @@ 1 2 - 4149709 + 7853714 @@ -14334,12 +13846,12 @@ 1 2 - 3836266 + 7405013 2 4 - 150037 + 222896 @@ -14355,12 +13867,7 @@ 1 2 - 3967815 - - - 2 - 3 - 18489 + 7627910 @@ -14376,7 +13883,7 @@ 1 2 - 3986304 + 7627910 @@ -14392,12 +13899,12 @@ 1 2 - 3843012 + 7405013 2 4 - 143291 + 222896 @@ -14413,27 +13920,22 @@ 1 2 - 298201 + 93035 2 3 - 220371 + 1309275 3 - 5 - 48846 + 30 + 116293 - 5 - 354 - 46223 - - - 358 - 10246 - 1249 + 32 + 1445 + 20351 @@ -14449,27 +13951,22 @@ 1 2 - 308320 + 94973 2 3 - 211626 + 1308306 3 - 5 - 48471 + 29 + 116293 - 5 - 1033 - 46223 - - - 1483 - 9847 - 249 + 32 + 1445 + 19382 @@ -14485,22 +13982,17 @@ 1 2 - 494587 + 1376144 2 - 3 - 52719 + 9 + 116293 - 3 - 7 - 51095 - - - 7 - 2211 - 16490 + 9 + 1445 + 46517 @@ -14516,199 +14008,174 @@ 1 2 - 457983 + 1385835 + + + 2 + 15 + 116293 + + + 16 + 1445 + 36826 + + + + + + + name + id + + + 12 + + + 1 + 2 + 4178827 + + + 2 + 2658 + 338221 + + + + + + + name + function + + + 12 + + + 1 + 2 + 4305781 + + + 2 + 2658 + 211267 + + + + + + + name + type_id + + + 12 + + + 1 + 2 + 4457932 + + + 2 + 1335 + 59116 + + + + + + + name + location + + + 12 + + + 1 + 2 + 4180765 + + + 2 + 1342 + 336283 + + + + + + + location + id + + + 12 + + + 1 + 2 + 5098517 2 3 - 69459 + 1270510 3 + 9 + 41671 + + + + + + + location + function + + + 12 + + + 1 + 2 + 5098517 + + + 2 + 3 + 1270510 + + + 3 + 9 + 41671 + + + + + + + location + type_id + + + 12 + + + 1 + 2 + 6382596 + + + 2 6 - 55842 - - - 6 - 4728 - 31606 - - - - - - - name - id - - - 12 - - - 1 - 2 - 1297744 - - - 2 - 3 - 183892 - - - 3 - 10 - 125551 - - - 10 - 3169 - 39851 - - - - - - - name - function - - - 12 - - - 1 - 2 - 1401809 - - - 2 - 4 - 139543 - - - 4 - 3162 - 105688 - - - - - - - name - type_id - - - 12 - - - 1 - 2 - 1556968 - - - 2 - 1596 - 90072 - - - - - - - name - location - - - 12 - - - 1 - 2 - 1322105 - - - 2 - 3 - 208503 - - - 3 - 1592 - 116432 - - - - - - - location - id - - - 12 - - - 1 - 2 - 2390108 - - - 2 - 3 - 237736 - - - 3 - 211 - 142042 - - - - - - - location - function - - - 12 - - - 1 - 2 - 2393856 - - - 2 - 3 - 234488 - - - 3 - 211 - 141542 - - - - - - - location - type_id - - - 12 - - - 1 - 2 - 2654579 - - - 2 - 211 - 115307 + 28104 @@ -14724,12 +14191,12 @@ 1 2 - 2730660 + 6386472 2 8 - 39227 + 24227 @@ -14739,22 +14206,22 @@ fun_def - 1413177 + 1423569 id - 1413177 + 1423569 fun_specialized - 8435 + 11966 id - 8435 + 11966 @@ -14772,15 +14239,15 @@ fun_decl_specifiers - 4102237 + 12889239 id - 1688267 + 4543214 name - 1374 + 9691 @@ -14794,22 +14261,22 @@ 1 2 - 361539 + 336283 2 3 - 262472 + 246155 3 4 - 1041268 + 3782458 4 5 - 22986 + 178317 @@ -14823,59 +14290,54 @@ 12 - 15 - 16 - 124 + 3 + 4 + 969 + + + 11 + 12 + 969 19 20 - 124 + 969 - 224 - 225 - 124 + 79 + 80 + 969 - 261 - 262 - 124 + 168 + 169 + 969 - 546 - 547 - 124 + 201 + 202 + 969 - 826 - 827 - 124 + 1344 + 1345 + 969 - 1032 - 1033 - 124 + 2847 + 2848 + 969 - 1089 - 1090 - 124 + 4300 + 4301 + 969 - 7668 - 7669 - 124 - - - 10543 - 10544 - 124 - - - 10614 - 10615 - 124 + 4328 + 4329 + 969 @@ -15006,26 +14468,26 @@ fun_decl_empty_throws - 437033 + 2670882 fun_decl - 437033 + 2670882 fun_decl_noexcept - 141855 + 141830 fun_decl - 141855 + 141830 constant - 141378 + 141353 @@ -15039,7 +14501,7 @@ 1 2 - 141855 + 141830 @@ -15055,7 +14517,7 @@ 1 2 - 140935 + 140911 2 @@ -15070,26 +14532,26 @@ fun_decl_empty_noexcept - 1163822 + 1164727 fun_decl - 1163822 + 1164727 fun_decl_typedef_type - 2763 + 30057 fun_decl - 2763 + 30057 typedeftype_id - 124 + 2879 @@ -15103,7 +14565,7 @@ 1 2 - 2763 + 30057 @@ -15119,57 +14581,57 @@ 1 2 - 40 + 856 2 3 - 12 + 505 3 4 - 12 + 92 + + + 4 + 5 + 175 5 - 13 - 8 + 6 + 185 - 16 - 17 - 12 + 6 + 7 + 92 - 17 - 18 - 4 + 7 + 9 + 258 - 21 - 22 - 8 + 9 + 14 + 206 - 25 - 43 - 8 + 14 + 20 + 237 - 46 - 55 - 8 - - - 89 - 128 - 8 + 20 + 84 + 216 158 - 159 - 4 + 256 + 51 @@ -15179,7 +14641,7 @@ fun_requires - 29109 + 29111 id @@ -15191,7 +14653,7 @@ constraint - 28873 + 28875 @@ -15205,7 +14667,7 @@ 1 2 - 10047 + 10048 2 @@ -15309,7 +14771,7 @@ 1 2 - 28636 + 28638 2 @@ -15330,7 +14792,7 @@ 1 2 - 28873 + 28875 @@ -15340,19 +14802,19 @@ param_decl_bind - 7189939 + 15313967 id - 7189939 + 15313967 index - 7995 + 16474 fun_decl - 3478100 + 7378847 @@ -15366,7 +14828,7 @@ 1 2 - 7189939 + 15313967 @@ -15382,7 +14844,7 @@ 1 2 - 7189939 + 15313967 @@ -15398,32 +14860,82 @@ 2 3 - 3997 + 969 6 7 - 1998 + 1938 - 16 + 8 + 9 + 969 + + + 11 + 12 + 969 + + + 19 20 - 624 + 969 - 25 - 143 - 624 + 37 + 38 + 969 - 332 - 15841 - 624 + 53 + 54 + 969 - 27841 - 27842 - 124 + 79 + 80 + 969 + + + 118 + 119 + 969 + + + 198 + 199 + 969 + + + 352 + 353 + 969 + + + 667 + 668 + 969 + + + 1189 + 1190 + 969 + + + 2056 + 2057 + 969 + + + 3387 + 3388 + 969 + + + 7614 + 7615 + 969 @@ -15439,32 +14951,82 @@ 2 3 - 3997 + 969 6 7 - 1998 + 1938 - 16 + 8 + 9 + 969 + + + 11 + 12 + 969 + + + 19 20 - 624 + 969 - 25 - 143 - 624 + 37 + 38 + 969 - 332 - 15841 - 624 + 53 + 54 + 969 - 27841 - 27842 - 124 + 79 + 80 + 969 + + + 118 + 119 + 969 + + + 198 + 199 + 969 + + + 352 + 353 + 969 + + + 667 + 668 + 969 + + + 1189 + 1190 + 969 + + + 2056 + 2057 + 969 + + + 3387 + 3388 + 969 + + + 7614 + 7615 + 969 @@ -15480,27 +15042,32 @@ 1 2 - 1499252 + 4096452 2 3 - 956818 + 1289893 3 4 - 579912 + 840223 4 5 - 283085 + 505878 5 - 65 - 159032 + 9 + 569840 + + + 9 + 18 + 76560 @@ -15516,27 +15083,32 @@ 1 2 - 1499252 + 4096452 2 3 - 956818 + 1289893 3 4 - 579912 + 840223 4 5 - 283085 + 505878 5 - 65 - 159032 + 9 + 569840 + + + 9 + 18 + 76560 @@ -15546,27 +15118,27 @@ var_decls - 9269479 + 22872100 id - 9262608 + 22872100 variable - 8972402 + 22563921 type_id - 1462398 + 4098390 name - 852378 + 6304097 location - 6204513 + 19941494 @@ -15580,7 +15152,7 @@ 1 2 - 9262608 + 22872100 @@ -15596,12 +15168,7 @@ 1 2 - 9255737 - - - 2 - 3 - 6871 + 22872100 @@ -15617,7 +15184,7 @@ 1 2 - 9262608 + 22872100 @@ -15633,7 +15200,7 @@ 1 2 - 9262608 + 22872100 @@ -15649,12 +15216,12 @@ 1 2 - 8695188 + 22257681 2 4 - 277213 + 306240 @@ -15670,12 +15237,12 @@ 1 2 - 8933674 + 22542601 2 3 - 38727 + 21320 @@ -15691,12 +15258,12 @@ 1 2 - 8866713 + 22498991 2 - 4 - 105688 + 3 + 64930 @@ -15712,12 +15279,12 @@ 1 2 - 8720548 + 22258650 2 4 - 251853 + 305271 @@ -15733,27 +15300,22 @@ 1 2 - 854752 + 3346356 2 - 3 - 284959 + 4 + 352758 - 3 - 5 - 128050 + 4 + 30 + 313993 - 5 - 11 - 112934 - - - 11 - 2944 - 81702 + 30 + 3217 + 85282 @@ -15769,27 +15331,22 @@ 1 2 - 875115 + 3351202 2 - 3 - 270467 + 4 + 348881 - 3 - 5 - 123428 + 4 + 30 + 313993 - 5 - 11 - 112934 - - - 11 - 2859 - 80453 + 30 + 3216 + 84313 @@ -15805,58 +15362,48 @@ 1 2 - 1124970 + 3635153 2 - 3 - 193137 - - - 3 - 7 - 115182 - - - 7 - 1038 - 29108 - - - - - - - type_id - location - - - 12 - - - 1 - 2 - 990923 - - - 2 - 3 - 219122 - - - 3 6 - 134046 + 314962 6 - 95 - 109811 + 1438 + 148274 + + + + + + + type_id + location + + + 12 + + + 1 + 2 + 3373491 - 97 - 2570 - 8495 + 2 + 4 + 335314 + + + 4 + 33 + 309147 + + + 33 + 3217 + 80436 @@ -15872,32 +15419,27 @@ 1 2 - 465853 + 3481063 2 3 - 165778 + 1496314 3 4 - 60090 + 342097 4 7 - 65961 + 552395 7 - 26 - 64337 - - - 26 - 26622 - 30357 + 2958 + 432225 @@ -15913,32 +15455,27 @@ 1 2 - 478721 + 3501415 2 3 - 165028 + 1486623 3 4 - 54968 + 341128 4 - 8 - 71833 + 7 + 549488 - 8 - 46 - 63962 - - - 46 - 26187 - 17864 + 7 + 2958 + 425441 @@ -15954,22 +15491,17 @@ 1 2 - 654868 + 5168294 2 3 - 110435 + 826655 3 - 11 - 65336 - - - 11 - 3460 - 21737 + 2713 + 309147 @@ -15985,27 +15517,27 @@ 1 2 - 493087 + 3498507 2 3 - 183268 + 1513758 3 4 - 52344 + 337252 4 - 8 - 65212 + 7 + 536890 - 8 - 22104 - 58465 + 7 + 309 + 417688 @@ -16021,12 +15553,12 @@ 1 2 - 5756898 + 19860088 2 - 2943 - 447614 + 2651 + 81405 @@ -16042,12 +15574,12 @@ 1 2 - 5780884 + 19860088 2 - 2935 - 423628 + 2651 + 81405 @@ -16063,12 +15595,12 @@ 1 2 - 5920553 + 19909513 2 - 2555 - 283959 + 2637 + 31980 @@ -16084,12 +15616,12 @@ 1 2 - 6192020 + 19929865 2 5 - 12492 + 11629 @@ -16099,11 +15631,11 @@ var_def - 3731827 + 9039911 id - 3731827 + 9039911 @@ -16121,15 +15653,15 @@ var_decl_specifiers - 488965 + 572469 id - 488965 + 572469 name - 499 + 23 @@ -16143,7 +15675,7 @@ 1 2 - 488965 + 572469 @@ -16157,24 +15689,24 @@ 12 - 16 - 17 - 124 + 220 + 221 + 5 - 77 - 78 - 124 + 279 + 280 + 5 - 651 - 652 - 124 + 1747 + 1748 + 5 - 3170 - 3171 - 124 + 94425 + 94426 + 5 @@ -16184,11 +15716,11 @@ is_structured_binding - 946 + 15452 id - 946 + 15452 @@ -16253,19 +15785,19 @@ type_decls - 1687349 + 5742010 id - 1687349 + 5742010 type_id - 1650403 + 5711968 location - 1325700 + 5568539 @@ -16279,7 +15811,7 @@ 1 2 - 1687349 + 5742010 @@ -16295,7 +15827,7 @@ 1 2 - 1687349 + 5742010 @@ -16311,12 +15843,12 @@ 1 2 - 1623818 + 5685802 2 - 24 - 26585 + 7 + 26166 @@ -16332,12 +15864,12 @@ 1 2 - 1625003 + 5685802 2 - 24 - 25400 + 7 + 26166 @@ -16353,12 +15885,12 @@ 1 2 - 1257405 + 5560786 2 - 651 - 68294 + 64 + 7752 @@ -16374,12 +15906,12 @@ 1 2 - 1258602 + 5560786 2 - 651 - 67097 + 64 + 7752 @@ -16389,29 +15921,29 @@ type_def - 1157787 + 2304557 id - 1157787 + 2304557 type_decl_top - 672534 + 3550840 type_decl - 672534 + 3550840 type_requires - 7680 + 7681 id @@ -16469,7 +16001,7 @@ 1 2 - 7637 + 7638 2 @@ -16484,23 +16016,23 @@ namespace_decls - 430963 + 407321 id - 430963 + 407321 namespace_id - 1959 + 1844 location - 430963 + 407321 bodylocation - 430963 + 407321 @@ -16514,7 +16046,7 @@ 1 2 - 430963 + 407321 @@ -16530,7 +16062,7 @@ 1 2 - 430963 + 407321 @@ -16546,7 +16078,7 @@ 1 2 - 430963 + 407321 @@ -16562,57 +16094,57 @@ 1 2 - 414 + 389 2 3 - 215 + 203 3 6 - 181 + 170 6 15 - 164 + 154 15 34 - 155 + 146 35 62 - 164 + 154 63 87 - 155 + 146 90 - 142 - 155 + 144 + 154 - 143 - 219 - 155 + 146 + 264 + 146 - 263 - 1505 - 155 + 268 + 1868 + 146 - 1854 - 12392 - 43 + 2205 + 12449 + 32 @@ -16628,57 +16160,57 @@ 1 2 - 414 + 389 2 3 - 215 + 203 3 6 - 181 + 170 6 15 - 164 + 154 15 34 - 155 + 146 35 62 - 164 + 154 63 87 - 155 + 146 90 - 142 - 155 + 144 + 154 - 143 - 219 - 155 + 146 + 264 + 146 - 263 - 1505 - 155 + 268 + 1868 + 146 - 1854 - 12392 - 43 + 2205 + 12449 + 32 @@ -16694,57 +16226,57 @@ 1 2 - 414 + 389 2 3 - 215 + 203 3 6 - 181 + 170 6 15 - 164 + 154 15 34 - 155 + 146 35 62 - 164 + 154 63 87 - 155 + 146 90 - 142 - 155 + 144 + 154 - 143 - 219 - 155 + 146 + 264 + 146 - 263 - 1505 - 155 + 268 + 1868 + 146 - 1854 - 12392 - 43 + 2205 + 12449 + 32 @@ -16760,7 +16292,7 @@ 1 2 - 430963 + 407321 @@ -16776,7 +16308,7 @@ 1 2 - 430963 + 407321 @@ -16792,7 +16324,7 @@ 1 2 - 430963 + 407321 @@ -16808,7 +16340,7 @@ 1 2 - 430963 + 407321 @@ -16824,7 +16356,7 @@ 1 2 - 430963 + 407321 @@ -16840,7 +16372,7 @@ 1 2 - 430963 + 407321 @@ -16850,23 +16382,23 @@ usings - 311428 + 504409 id - 311428 + 504409 element_id - 67593 + 307661 location - 30731 + 11328 kind - 24 + 7 @@ -16880,7 +16412,7 @@ 1 2 - 311428 + 504409 @@ -16896,7 +16428,7 @@ 1 2 - 311428 + 504409 @@ -16912,7 +16444,7 @@ 1 2 - 311428 + 504409 @@ -16928,17 +16460,22 @@ 1 2 - 58743 + 220283 2 - 5 - 6165 + 3 + 45055 - 5 - 134 - 2683 + 3 + 4 + 20366 + + + 4 + 768 + 21955 @@ -16954,17 +16491,22 @@ 1 2 - 58743 + 220283 2 - 5 - 6165 + 3 + 45055 - 5 - 134 - 2683 + 3 + 4 + 20366 + + + 4 + 768 + 21955 @@ -16980,7 +16522,7 @@ 1 2 - 67593 + 307661 @@ -16996,22 +16538,27 @@ 1 2 - 24239 + 8405 2 4 - 2635 + 880 4 - 132 - 2224 + 12 + 895 - 145 - 367 - 1632 + 12 + 400 + 869 + + + 410 + 3162 + 277 @@ -17027,22 +16574,27 @@ 1 2 - 24239 + 8405 2 4 - 2635 + 880 4 - 132 - 2224 + 12 + 895 - 145 - 367 - 1632 + 12 + 400 + 869 + + + 410 + 3162 + 277 @@ -17058,7 +16610,7 @@ 1 2 - 30731 + 11328 @@ -17072,14 +16624,14 @@ 12 - 393 - 394 - 12 + 936 + 937 + 3 - 25367 - 25368 - 12 + 137090 + 137091 + 3 @@ -17093,14 +16645,14 @@ 12 - 214 - 215 - 12 + 62 + 63 + 3 - 5377 - 5378 - 12 + 84126 + 84127 + 3 @@ -17114,14 +16666,14 @@ 12 - 356 - 357 - 12 + 936 + 937 + 3 - 2186 - 2187 - 12 + 2164 + 2165 + 3 @@ -17131,15 +16683,15 @@ using_container - 662620 + 580180 parent - 24275 + 21896 child - 311428 + 272102 @@ -17153,42 +16705,42 @@ 1 2 - 11231 + 10372 2 3 - 1789 + 1616 3 6 - 2055 + 1859 6 7 - 2623 + 2292 7 - 27 - 1849 + 28 + 1668 - 27 + 28 136 - 942 + 781 145 146 - 2998 + 2619 146 437 - 785 + 686 @@ -17204,27 +16756,27 @@ 1 2 - 111176 + 96615 2 3 - 137664 + 120286 3 4 - 22522 + 20100 4 5 - 30550 + 26712 5 65 - 9514 + 8386 @@ -17234,27 +16786,27 @@ static_asserts - 183514 + 173266 id - 183514 + 173266 condition - 183514 + 173266 message - 41097 + 38765 location - 23924 + 22648 enclosing - 6648 + 6807 @@ -17268,7 +16820,7 @@ 1 2 - 183514 + 173266 @@ -17284,7 +16836,7 @@ 1 2 - 183514 + 173266 @@ -17300,7 +16852,7 @@ 1 2 - 183514 + 173266 @@ -17316,7 +16868,7 @@ 1 2 - 183514 + 173266 @@ -17332,7 +16884,7 @@ 1 2 - 183514 + 173266 @@ -17348,7 +16900,7 @@ 1 2 - 183514 + 173266 @@ -17364,7 +16916,7 @@ 1 2 - 183514 + 173266 @@ -17380,7 +16932,7 @@ 1 2 - 183514 + 173266 @@ -17396,32 +16948,32 @@ 1 2 - 30236 + 28505 2 3 - 673 + 641 3 4 - 3876 + 3623 4 12 - 2184 + 2087 12 17 - 3315 + 3135 17 513 - 811 + 771 @@ -17437,32 +16989,32 @@ 1 2 - 30236 + 28505 2 3 - 673 + 641 3 4 - 3876 + 3623 4 12 - 2184 + 2087 12 17 - 3315 + 3135 17 513 - 811 + 771 @@ -17478,12 +17030,12 @@ 1 2 - 38084 + 35922 2 33 - 3013 + 2843 @@ -17499,27 +17051,27 @@ 1 2 - 32170 + 30316 2 3 - 353 + 349 3 4 - 3626 + 3387 4 12 - 1985 + 1909 12 43 - 2961 + 2802 @@ -17535,52 +17087,52 @@ 1 2 - 4489 + 4281 2 3 - 3893 + 3728 3 4 - 1873 + 1738 4 5 - 112 + 121 5 6 - 5024 + 4736 6 13 - 457 + 430 14 15 - 2814 + 2648 16 17 - 60 + 64 17 18 - 4670 + 4394 19 52 - 526 + 503 @@ -17596,52 +17148,52 @@ 1 2 - 4489 + 4281 2 3 - 3893 + 3728 3 4 - 1873 + 1738 4 5 - 112 + 121 5 6 - 5024 + 4736 6 13 - 457 + 430 14 15 - 2814 + 2648 16 17 - 60 + 64 17 18 - 4670 + 4394 19 52 - 526 + 503 @@ -17657,22 +17209,22 @@ 1 2 - 7243 + 6953 2 3 - 8159 + 7676 3 4 - 8271 + 7782 4 7 - 250 + 235 @@ -17688,37 +17240,37 @@ 1 2 - 5327 + 5069 2 3 - 8538 + 8099 3 4 - 1597 + 1478 4 5 - 5042 + 4760 5 13 - 518 + 495 13 14 - 2814 + 2648 16 43 - 86 + 97 @@ -17734,22 +17286,22 @@ 1 2 - 5482 + 5702 2 3 - 561 + 528 3 - 210 - 500 + 228 + 528 - 223 + 229 11052 - 103 + 48 @@ -17765,22 +17317,22 @@ 1 2 - 5482 + 5702 2 3 - 561 + 528 3 - 210 - 500 + 228 + 528 - 223 + 229 11052 - 103 + 48 @@ -17796,17 +17348,17 @@ 1 2 - 5646 + 5857 2 3 - 552 + 519 3 2936 - 448 + 430 @@ -17822,17 +17374,17 @@ 1 2 - 5629 + 5840 2 3 - 569 + 536 3 1929 - 448 + 430 @@ -17842,23 +17394,23 @@ params - 6984184 + 15008695 id - 6957575 + 15008695 function - 3365915 + 7181147 index - 7995 + 16474 type_id - 1225411 + 3532426 @@ -17872,7 +17424,7 @@ 1 2 - 6957575 + 15008695 @@ -17888,7 +17440,7 @@ 1 2 - 6957575 + 15008695 @@ -17904,12 +17456,7 @@ 1 2 - 6930965 - - - 2 - 3 - 26609 + 15008695 @@ -17925,217 +17472,382 @@ 1 2 - 1462898 + 3972405 2 3 - 908721 + 1245313 3 4 - 561173 + 815995 4 5 - 277338 + 501032 5 - 65 - 155784 - - - - - - - function - index - - - 12 - - - 1 - 2 - 1462898 - - - 2 - 3 - 908721 - - - 3 - 4 - 561173 - - - 4 - 5 - 277338 - - - 5 - 65 - 155784 - - - - - - - function - type_id - - - 12 - - - 1 - 2 - 1763473 - - - 2 - 3 - 1008413 - - - 3 - 4 - 436995 - - - 4 - 11 - 157033 - - - - - - - index - id - - - 12 - - - 2 - 3 - 3997 - - - 6 - 7 - 1998 - - - 14 - 18 - 624 - - - 23 - 138 - 624 - - - 323 - 15234 - 624 - - - 26943 - 26944 - 124 - - - - - - - index - function - - - 12 - - - 2 - 3 - 3997 - - - 6 - 7 - 1998 - - - 14 - 18 - 624 - - - 23 - 138 - 624 - - - 323 - 15234 - 624 - - - 26943 - 26944 - 124 - - - - - - - index - type_id - - - 12 - - - 1 - 2 - 3997 - - - 2 - 3 - 1998 - - - 4 - 7 - 624 + 9 + 569840 9 + 18 + 76560 + + + + + + + function + index + + + 12 + + + 1 + 2 + 3972405 + + + 2 + 3 + 1245313 + + + 3 + 4 + 815995 + + + 4 + 5 + 501032 + + + 5 + 9 + 569840 + + + 9 + 18 + 76560 + + + + + + + function + type_id + + + 12 + + + 1 + 2 + 4210807 + + + 2 + 3 + 1300553 + + + 3 + 4 + 915814 + + + 4 + 6 + 629925 + + + 6 + 13 + 124046 + + + + + + + index + id + + + 12 + + + 2 + 3 + 969 + + + 6 + 7 + 1938 + + + 8 + 9 + 969 + + + 11 + 12 + 969 + + + 19 + 20 + 969 + + + 37 + 38 + 969 + + + 53 54 - 624 + 969 + + + 79 + 80 + 969 + + + 118 + 119 + 969 + + + 198 + 199 + 969 + + + 352 + 353 + 969 + + + 667 + 668 + 969 + + + 1184 + 1185 + 969 + + + 2026 + 2027 + 969 + + + 3311 + 3312 + 969 + + + 7410 + 7411 + 969 + + + + + + + index + function + + + 12 + + + 2 + 3 + 969 + + + 6 + 7 + 1938 + + + 8 + 9 + 969 + + + 11 + 12 + 969 + + + 19 + 20 + 969 + + + 37 + 38 + 969 + + + 53 + 54 + 969 + + + 79 + 80 + 969 + + + 118 + 119 + 969 + + + 198 + 199 + 969 + + + 352 + 353 + 969 + + + 667 + 668 + 969 + + + 1184 + 1185 + 969 + + + 2026 + 2027 + 969 + + + 3311 + 3312 + 969 + + + 7410 + 7411 + 969 + + + + + + + index + type_id + + + 12 + + + 1 + 2 + 969 + + + 2 + 3 + 1938 + + + 4 + 5 + 969 + + + 5 + 6 + 969 + + + 8 + 9 + 969 + + + 15 + 16 + 969 + + + 19 + 20 + 969 + + + 23 + 24 + 969 + + + 42 + 43 + 969 + + + 49 + 50 + 969 + + + 71 + 72 + 969 115 - 2700 - 624 + 116 + 969 - 7528 - 7529 - 124 + 165 + 166 + 969 + + + 270 + 271 + 969 + + + 449 + 450 + 969 + + + 3202 + 3203 + 969 @@ -18151,27 +17863,22 @@ 1 2 - 740818 + 2967432 2 - 3 - 241984 + 4 + 270383 - 3 - 5 - 93820 + 4 + 80 + 265537 - 5 - 13 - 93695 - - - 13 - 2570 - 55092 + 83 + 1228 + 29073 @@ -18187,27 +17894,17 @@ 1 2 - 823145 + 2991660 2 - 3 - 181144 + 5 + 303333 - 3 - 6 - 106562 - - - 6 - 27 - 92446 - - - 27 - 2558 - 22112 + 5 + 869 + 237433 @@ -18223,17 +17920,17 @@ 1 2 - 1000042 + 3212618 2 - 3 - 167027 + 6 + 279105 - 3 - 65 - 58341 + 6 + 15 + 40702 @@ -18243,15 +17940,15 @@ overrides - 169821 + 159781 new - 160565 + 151073 old - 19124 + 17993 @@ -18265,12 +17962,12 @@ 1 2 - 151318 + 142372 2 4 - 9246 + 8700 @@ -18286,32 +17983,32 @@ 1 2 - 10464 + 9845 2 3 - 2590 + 2437 3 4 - 1735 + 1632 4 6 - 1580 + 1486 6 18 - 1441 + 1356 18 230 - 1312 + 1234 @@ -18321,19 +18018,19 @@ membervariables - 1495853 + 6289561 id - 1493401 + 6289561 type_id - 455129 + 816964 name - 640722 + 3334727 @@ -18347,12 +18044,7 @@ 1 2 - 1491059 - - - 2 - 4 - 2342 + 6289561 @@ -18368,7 +18060,7 @@ 1 2 - 1493401 + 6289561 @@ -18384,22 +18076,27 @@ 1 2 - 337738 + 595037 2 3 - 72123 + 66868 3 - 10 - 35135 + 6 + 62992 - 10 - 4422 - 10132 + 6 + 23 + 62992 + + + 28 + 1989 + 29073 @@ -18415,22 +18112,22 @@ 1 2 - 355278 + 654153 2 - 3 - 64115 + 4 + 64930 - 3 - 49 - 34209 + 4 + 13 + 62023 - 56 - 2175 - 1525 + 13 + 1164 + 35857 @@ -18446,22 +18143,22 @@ 1 2 - 420974 + 2136900 2 3 - 122130 + 808242 3 5 - 57469 + 251000 5 - 654 - 40147 + 165 + 138583 @@ -18477,17 +18174,17 @@ 1 2 - 523712 + 2906378 2 3 - 72504 + 348881 3 - 658 - 44505 + 165 + 79467 @@ -18497,19 +18194,19 @@ globalvariables - 488090 + 488591 id - 488090 + 488591 type_id - 10368 + 10363 name - 112434 + 112626 @@ -18523,7 +18220,7 @@ 1 2 - 488090 + 488591 @@ -18539,7 +18236,7 @@ 1 2 - 488090 + 488591 @@ -18555,7 +18252,7 @@ 1 2 - 6995 + 6992 2 @@ -18579,7 +18276,7 @@ 152 - 2214 + 2216 499 @@ -18596,7 +18293,7 @@ 1 2 - 7120 + 7117 2 @@ -18619,8 +18316,8 @@ 874 - 124 - 226 + 125 + 228 499 @@ -18637,17 +18334,17 @@ 1 2 - 95319 + 95395 2 7 - 8744 + 8865 7 604 - 8370 + 8365 @@ -18663,12 +18360,12 @@ 1 2 - 96943 + 97018 2 3 - 15241 + 15358 3 @@ -18683,19 +18380,19 @@ localvariables - 726100 + 1444946 id - 726100 + 1444946 type_id - 53424 + 22638 name - 101537 + 744 @@ -18709,7 +18406,7 @@ 1 2 - 726100 + 1444946 @@ -18725,7 +18422,7 @@ 1 2 - 726100 + 1444946 @@ -18741,37 +18438,22 @@ 1 2 - 28887 + 11068 2 3 - 7826 + 6883 3 4 - 4025 + 3847 4 - 6 - 4049 - - - 6 - 12 - 4149 - - - 12 - 166 - 4009 - - - 168 - 19320 - 476 + 100799 + 838 @@ -18787,22 +18469,12 @@ 1 2 - 38367 + 21894 2 - 3 - 6701 - - - 3 - 5 - 4466 - - - 5 - 3502 - 3889 + 49 + 744 @@ -18818,32 +18490,72 @@ 1 2 - 62468 + 39 2 - 3 - 16045 - - - 3 4 - 6532 + 63 4 - 8 - 8130 + 15 + 50 - 8 - 135 - 7618 + 17 + 18 + 43 - 135 - 7544 - 741 + 18 + 21 + 68 + + + 22 + 25 + 57 + + + 26 + 46 + 61 + + + 48 + 56 + 59 + + + 62 + 103 + 57 + + + 110 + 256 + 57 + + + 273 + 1333 + 61 + + + 1350 + 2860 + 59 + + + 2889 + 23413 + 57 + + + 26766 + 207143 + 8 @@ -18859,22 +18571,32 @@ 1 2 - 84490 + 439 2 3 - 8419 + 111 3 - 15 - 7674 + 6 + 57 - 15 - 1509 - 953 + 6 + 22 + 43 + + + 22 + 25 + 57 + + + 25 + 2365 + 35 @@ -18884,15 +18606,15 @@ autoderivation - 229241 + 427202 var - 229241 + 427202 derivation_type - 624 + 51 @@ -18906,7 +18628,7 @@ 1 2 - 229241 + 427202 @@ -18919,30 +18641,45 @@ 12 + + 11 + 12 + 6 + + + 26 + 27 + 6 + 38 39 - 124 + 6 - 79 - 80 - 124 + 140 + 141 + 6 - 454 - 455 - 124 + 641 + 642 + 6 - 530 - 531 - 124 + 744 + 745 + 6 - 734 - 735 - 124 + 28896 + 28897 + 6 + + + 35445 + 35446 + 6 @@ -18952,15 +18689,15 @@ orphaned_variables - 44332 + 88222 var - 44332 + 88222 function - 41060 + 57936 @@ -18974,7 +18711,7 @@ 1 2 - 44332 + 88222 @@ -18990,12 +18727,17 @@ 1 2 - 40208 + 33347 2 - 47 - 851 + 3 + 20728 + + + 3 + 21 + 3860 @@ -19005,31 +18747,31 @@ enumconstants - 344765 + 1205579 id - 344765 + 1205579 parent - 41291 + 159904 index - 13945 + 118232 type_id - 54 + 159904 name - 344383 + 1197827 location - 317364 + 1201703 @@ -19043,7 +18785,7 @@ 1 2 - 344765 + 1205579 @@ -19059,7 +18801,7 @@ 1 2 - 344765 + 1205579 @@ -19075,7 +18817,7 @@ 1 2 - 344765 + 1205579 @@ -19091,7 +18833,7 @@ 1 2 - 344765 + 1205579 @@ -19107,7 +18849,7 @@ 1 2 - 344765 + 1205579 @@ -19123,57 +18865,47 @@ 1 2 - 1525 + 18413 2 3 - 5719 + 21320 3 4 - 8715 + 28104 4 5 - 5501 + 22289 5 6 - 4630 + 22289 6 - 7 - 2669 - - - 7 8 - 1961 + 11629 8 11 - 3813 + 14536 11 - 17 - 3159 + 21 + 12598 - 17 - 64 - 3105 - - - 79 - 257 - 490 + 21 + 123 + 8722 @@ -19189,57 +18921,47 @@ 1 2 - 1525 + 18413 2 3 - 5719 + 21320 3 4 - 8715 + 28104 4 5 - 5501 + 22289 5 6 - 4630 + 22289 6 - 7 - 2669 - - - 7 8 - 1961 + 11629 8 11 - 3813 + 14536 11 - 17 - 3159 + 21 + 12598 - 17 - 64 - 3105 - - - 79 - 257 - 490 + 21 + 123 + 8722 @@ -19255,7 +18977,7 @@ 1 2 - 41291 + 159904 @@ -19271,57 +18993,47 @@ 1 2 - 1525 + 18413 2 3 - 5719 + 21320 3 4 - 8715 + 28104 4 5 - 5501 + 22289 5 6 - 4630 + 22289 6 - 7 - 2669 - - - 7 8 - 1961 + 11629 8 11 - 3813 + 14536 11 - 17 - 3159 + 21 + 12598 - 17 - 64 - 3105 - - - 79 - 257 - 490 + 21 + 123 + 8722 @@ -19337,52 +19049,47 @@ 1 2 - 2124 + 18413 2 3 - 5937 + 21320 3 4 - 8770 + 28104 4 5 - 5447 + 22289 5 6 - 4630 + 22289 6 - 7 - 2614 - - - 7 8 - 1852 + 11629 8 11 - 3704 + 14536 11 - 18 - 3105 + 21 + 12598 - 18 - 257 - 3105 + 21 + 123 + 8722 @@ -19398,47 +19105,37 @@ 1 2 - 2778 + 21320 2 3 - 2233 + 39733 3 - 4 - 2287 - - - 4 5 - 1252 + 8722 5 - 9 - 1089 + 6 + 23258 - 9 - 12 - 1089 + 6 + 16 + 10660 - 12 - 19 - 1089 + 16 + 50 + 9691 - 19 - 55 - 1089 - - - 58 - 759 - 1035 + 72 + 166 + 4845 @@ -19454,47 +19151,37 @@ 1 2 - 2778 + 21320 2 3 - 2233 + 39733 3 - 4 - 2287 - - - 4 5 - 1252 + 8722 5 - 9 - 1089 + 6 + 23258 - 9 - 12 - 1089 + 6 + 16 + 10660 - 12 - 19 - 1089 + 16 + 50 + 9691 - 19 - 55 - 1089 - - - 58 - 759 - 1035 + 72 + 166 + 4845 @@ -19510,7 +19197,37 @@ 1 2 - 13945 + 21320 + + + 2 + 3 + 39733 + + + 3 + 5 + 8722 + + + 5 + 6 + 23258 + + + 6 + 16 + 10660 + + + 16 + 50 + 9691 + + + 72 + 166 + 4845 @@ -19526,47 +19243,37 @@ 1 2 - 2778 + 21320 2 3 - 2233 + 39733 3 - 4 - 2287 - - - 4 5 - 1252 + 8722 5 - 9 - 1089 + 6 + 23258 - 9 - 12 - 1089 + 6 + 16 + 10660 - 12 - 19 - 1089 + 16 + 50 + 9691 - 19 - 55 - 1089 - - - 58 - 756 - 1035 + 72 + 159 + 4845 @@ -19582,63 +19289,93 @@ 1 2 - 2778 + 21320 2 3 - 2233 + 39733 + + + 3 + 5 + 8722 + + + 5 + 6 + 23258 + + + 6 + 16 + 10660 + + + 16 + 50 + 9691 + + + 72 + 162 + 4845 + + + + + + + type_id + id + + + 12 + + + 1 + 2 + 18413 + + + 2 + 3 + 21320 3 4 - 2287 + 28104 4 5 - 1252 + 22289 5 - 9 - 1089 + 6 + 22289 - 9 - 12 - 1089 + 6 + 8 + 11629 - 12 - 19 - 1089 + 8 + 11 + 14536 - 19 - 55 - 1089 + 11 + 21 + 12598 - 58 - 759 - 1035 - - - - - - - type_id - id - - - 12 - - - 6329 - 6330 - 54 + 21 + 123 + 8722 @@ -19652,9 +19389,9 @@ 12 - 758 - 759 - 54 + 1 + 2 + 159904 @@ -19668,9 +19405,49 @@ 12 - 256 - 257 - 54 + 1 + 2 + 18413 + + + 2 + 3 + 21320 + + + 3 + 4 + 28104 + + + 4 + 5 + 22289 + + + 5 + 6 + 22289 + + + 6 + 8 + 11629 + + + 8 + 11 + 14536 + + + 11 + 21 + 12598 + + + 21 + 123 + 8722 @@ -19684,9 +19461,49 @@ 12 - 6322 - 6323 - 54 + 1 + 2 + 18413 + + + 2 + 3 + 21320 + + + 3 + 4 + 28104 + + + 4 + 5 + 22289 + + + 5 + 6 + 22289 + + + 6 + 8 + 11629 + + + 8 + 11 + 14536 + + + 11 + 21 + 12598 + + + 21 + 123 + 8722 @@ -19700,9 +19517,49 @@ 12 - 5826 - 5827 - 54 + 1 + 2 + 18413 + + + 2 + 3 + 21320 + + + 3 + 4 + 28104 + + + 4 + 5 + 22289 + + + 5 + 6 + 22289 + + + 6 + 8 + 11629 + + + 8 + 11 + 14536 + + + 11 + 21 + 12598 + + + 21 + 123 + 8722 @@ -19718,12 +19575,12 @@ 1 2 - 344002 + 1194919 - 2 - 3 - 381 + 3 + 6 + 2907 @@ -19739,12 +19596,12 @@ 1 2 - 344002 + 1194919 - 2 - 3 - 381 + 3 + 6 + 2907 @@ -19760,7 +19617,12 @@ 1 2 - 344383 + 1196857 + + + 2 + 3 + 969 @@ -19776,7 +19638,12 @@ 1 2 - 344383 + 1194919 + + + 3 + 6 + 2907 @@ -19792,12 +19659,12 @@ 1 2 - 344002 + 1195888 - 2 - 3 - 381 + 3 + 4 + 1938 @@ -19813,12 +19680,12 @@ 1 2 - 316329 + 1200734 - 2 - 205 - 1035 + 5 + 6 + 969 @@ -19834,7 +19701,12 @@ 1 2 - 317364 + 1200734 + + + 5 + 6 + 969 @@ -19850,12 +19722,7 @@ 1 2 - 316329 - - - 2 - 205 - 1035 + 1201703 @@ -19871,7 +19738,12 @@ 1 2 - 317364 + 1200734 + + + 5 + 6 + 969 @@ -19887,12 +19759,7 @@ 1 2 - 316329 - - - 2 - 205 - 1035 + 1201703 @@ -19902,31 +19769,31 @@ builtintypes - 7245 + 59116 id - 7245 + 59116 name - 7245 + 59116 kind - 7245 + 59116 size - 874 + 6783 sign - 374 + 2907 alignment - 624 + 4845 @@ -19940,7 +19807,7 @@ 1 2 - 7245 + 59116 @@ -19956,7 +19823,7 @@ 1 2 - 7245 + 59116 @@ -19972,7 +19839,7 @@ 1 2 - 7245 + 59116 @@ -19988,7 +19855,7 @@ 1 2 - 7245 + 59116 @@ -20004,7 +19871,7 @@ 1 2 - 7245 + 59116 @@ -20020,7 +19887,7 @@ 1 2 - 7245 + 59116 @@ -20036,7 +19903,7 @@ 1 2 - 7245 + 59116 @@ -20052,7 +19919,7 @@ 1 2 - 7245 + 59116 @@ -20068,7 +19935,7 @@ 1 2 - 7245 + 59116 @@ -20084,7 +19951,7 @@ 1 2 - 7245 + 59116 @@ -20100,7 +19967,7 @@ 1 2 - 7245 + 59116 @@ -20116,7 +19983,7 @@ 1 2 - 7245 + 59116 @@ -20132,7 +19999,7 @@ 1 2 - 7245 + 59116 @@ -20148,7 +20015,7 @@ 1 2 - 7245 + 59116 @@ -20164,7 +20031,7 @@ 1 2 - 7245 + 59116 @@ -20180,32 +20047,32 @@ 2 3 - 249 + 1938 8 9 - 124 + 969 9 10 - 124 + 969 11 12 - 124 - - - 12 - 13 - 124 + 969 14 15 - 124 + 969 + + + 15 + 16 + 969 @@ -20221,32 +20088,32 @@ 2 3 - 249 + 1938 8 9 - 124 + 969 9 10 - 124 + 969 11 12 - 124 - - - 12 - 13 - 124 + 969 14 15 - 124 + 969 + + + 15 + 16 + 969 @@ -20262,32 +20129,32 @@ 2 3 - 249 + 1938 8 9 - 124 + 969 9 10 - 124 + 969 11 12 - 124 - - - 12 - 13 - 124 + 969 14 15 - 124 + 969 + + + 15 + 16 + 969 @@ -20303,12 +20170,12 @@ 1 2 - 249 + 1938 3 4 - 624 + 4845 @@ -20324,12 +20191,12 @@ 1 2 - 499 + 3876 2 3 - 374 + 2907 @@ -20345,17 +20212,17 @@ 6 7 - 124 + 969 12 13 - 124 + 969 - 40 - 41 - 124 + 43 + 44 + 969 @@ -20371,17 +20238,17 @@ 6 7 - 124 + 969 12 13 - 124 + 969 - 40 - 41 - 124 + 43 + 44 + 969 @@ -20397,17 +20264,17 @@ 6 7 - 124 + 969 12 13 - 124 + 969 - 40 - 41 - 124 + 43 + 44 + 969 @@ -20423,12 +20290,12 @@ 5 6 - 249 + 1938 7 8 - 124 + 969 @@ -20444,7 +20311,7 @@ 5 6 - 374 + 2907 @@ -20460,22 +20327,22 @@ 8 9 - 124 + 969 10 11 - 249 + 969 13 14 - 124 + 1938 17 18 - 124 + 969 @@ -20491,22 +20358,22 @@ 8 9 - 124 + 969 10 11 - 249 + 969 13 14 - 124 + 1938 17 18 - 124 + 969 @@ -20522,22 +20389,22 @@ 8 9 - 124 + 969 10 11 - 249 + 969 13 14 - 124 + 1938 17 18 - 124 + 969 @@ -20553,7 +20420,7 @@ 2 3 - 624 + 4845 @@ -20569,7 +20436,7 @@ 3 4 - 624 + 4845 @@ -20579,23 +20446,23 @@ derivedtypes - 3044352 + 8224885 id - 3044352 + 8224885 name - 1474266 + 6556068 kind - 749 + 5814 type_id - 1947741 + 3912320 @@ -20609,7 +20476,7 @@ 1 2 - 3044352 + 8224885 @@ -20625,7 +20492,7 @@ 1 2 - 3044352 + 8224885 @@ -20641,7 +20508,7 @@ 1 2 - 3044352 + 8224885 @@ -20657,17 +20524,12 @@ 1 2 - 1357334 + 6495982 2 - 30 - 110810 - - - 30 - 4274 - 6121 + 523 + 60085 @@ -20683,7 +20545,7 @@ 1 2 - 1474266 + 6556068 @@ -20699,17 +20561,12 @@ 1 2 - 1357459 + 6496951 2 - 30 - 110685 - - - 30 - 4274 - 6121 + 523 + 59116 @@ -20723,34 +20580,34 @@ 12 - 787 - 788 - 124 + 522 + 523 + 969 - 2333 - 2334 - 124 + 579 + 580 + 969 - 3647 - 3648 - 124 + 1355 + 1356 + 969 - 4273 - 4274 - 124 + 1566 + 1567 + 969 - 5569 - 5570 - 124 + 1713 + 1714 + 969 - 7760 - 7761 - 124 + 2752 + 2753 + 969 @@ -20766,32 +20623,32 @@ 1 2 - 124 + 969 - 733 - 734 - 124 + 546 + 547 + 969 - 1613 - 1614 - 124 + 1094 + 1095 + 969 - 2433 - 2434 - 124 + 1346 + 1347 + 969 - 2678 - 2679 - 124 + 1520 + 1521 + 969 - 4343 - 4344 - 124 + 2258 + 2259 + 969 @@ -20805,34 +20662,34 @@ 12 - 208 - 209 - 124 + 164 + 165 + 969 - 2333 - 2334 - 124 + 522 + 523 + 969 - 3643 - 3644 - 124 + 1355 + 1356 + 969 - 4273 - 4274 - 124 + 1562 + 1563 + 969 - 5502 - 5503 - 124 + 1650 + 1651 + 969 - 7760 - 7761 - 124 + 2752 + 2753 + 969 @@ -20848,22 +20705,27 @@ 1 2 - 1315609 + 2377240 2 3 - 378154 + 172502 3 4 - 122803 + 380862 4 - 135 - 131173 + 5 + 917752 + + + 5 + 124 + 63961 @@ -20879,22 +20741,27 @@ 1 2 - 1317108 + 2388870 2 3 - 378154 + 172502 3 4 - 121304 + 369233 4 - 135 - 131173 + 5 + 917752 + + + 5 + 124 + 63961 @@ -20910,22 +20777,27 @@ 1 2 - 1317483 + 2393715 2 3 - 379029 + 185101 3 4 - 122803 + 380862 4 + 5 + 911937 + + + 5 6 - 128425 + 40702 @@ -20935,19 +20807,19 @@ pointerishsize - 2250315 + 6003672 id - 2250315 + 6003672 size - 249 + 1938 alignment - 249 + 1938 @@ -20961,7 +20833,7 @@ 1 2 - 2250315 + 6003672 @@ -20977,7 +20849,7 @@ 1 2 - 2250315 + 6003672 @@ -20993,12 +20865,12 @@ 3 4 - 124 + 969 - 18010 - 18011 - 124 + 6192 + 6193 + 969 @@ -21014,7 +20886,7 @@ 1 2 - 249 + 1938 @@ -21030,12 +20902,12 @@ 3 4 - 124 + 969 - 18010 - 18011 - 124 + 6192 + 6193 + 969 @@ -21051,7 +20923,7 @@ 1 2 - 249 + 1938 @@ -21061,23 +20933,23 @@ arraysizes - 88573 + 521384 id - 88573 + 521384 num_elements - 18489 + 124046 bytesize - 22861 + 136645 alignment - 624 + 4845 @@ -21091,7 +20963,7 @@ 1 2 - 88573 + 521384 @@ -21107,7 +20979,7 @@ 1 2 - 88573 + 521384 @@ -21123,7 +20995,7 @@ 1 2 - 88573 + 521384 @@ -21139,243 +21011,238 @@ 1 2 - 249 + 3876 2 3 - 8869 + 84313 3 4 - 249 + 3876 4 5 - 5621 + 11629 + + + 5 + 9 + 9691 + + + 10 + 34 + 9691 + + + 65 + 66 + 969 + + + + + + + num_elements + bytesize + + + 12 + + + 1 + 2 + 95942 + + + 2 + 3 + 13567 + + + 3 + 6 + 10660 6 - 7 - 1624 + 13 + 3876 + + + + + + num_elements + alignment + + + 12 + + + 1 + 2 + 95942 + + + 2 + 3 + 12598 + + + 3 + 4 + 7752 + + + 4 + 6 + 7752 + + + + + + + bytesize + id + + + 12 + + + 1 + 2 + 5814 + + + 2 + 3 + 93035 + + + 3 + 4 + 2907 + + + 4 + 5 + 11629 + + + 5 + 9 + 11629 + + + 9 + 21 + 10660 + + + 32 + 33 + 969 + + + + + + + bytesize + num_elements + + + 12 + + + 1 + 2 + 109510 + + + 2 + 3 + 11629 + + + 3 + 5 + 10660 + + + 5 + 7 + 4845 + + + + + + + bytesize + alignment + + + 12 + + + 1 + 2 + 111448 + + + 2 + 3 + 12598 + + + 3 + 6 + 12598 + + + + + + + alignment + id + + + 12 + 8 - 27 - 1499 + 9 + 969 - 34 - 57 - 374 - - - - - - - num_elements - bytesize - - - 12 - - - 1 - 2 - 9494 + 54 + 55 + 969 - 2 - 3 - 6621 + 78 + 79 + 969 - 3 - 5 - 1249 + 87 + 88 + 969 - 5 - 11 - 1124 - - - - - - - num_elements - alignment - - - 12 - - - 1 - 2 - 9494 - - - 2 - 3 - 6621 - - - 3 - 4 - 999 - - - 4 - 6 - 1374 - - - - - - - bytesize - id - - - 12 - - - 1 - 2 - 624 - - - 2 - 3 - 14741 - - - 3 - 4 - 374 - - - 4 - 5 - 3248 - - - 5 - 7 - 1499 - - - 7 - 17 - 1748 - - - 17 - 45 - 624 - - - - - - - bytesize - num_elements - - - 12 - - - 1 - 2 - 16490 - - - 2 - 3 - 3997 - - - 3 - 5 - 1748 - - - 5 - 7 - 624 - - - - - - - bytesize - alignment - - - 12 - - - 1 - 2 - 16615 - - - 2 - 3 - 3997 - - - 3 - 5 - 1873 - - - 5 - 6 - 374 - - - - - - - alignment - id - - - 12 - - - 10 - 11 - 124 - - - 86 - 87 - 124 - - - 91 - 92 - 124 - - - 187 - 188 - 124 - - - 335 - 336 - 124 + 311 + 312 + 969 @@ -21391,58 +21258,58 @@ 4 5 - 124 + 969 - 16 - 17 - 249 - - - 80 - 81 - 124 - - - 137 - 138 - 124 - - - - - - - alignment - bytesize - - - 12 - - - 4 - 5 - 124 - - - 19 - 20 - 124 + 13 + 14 + 969 20 21 - 124 + 969 - 80 - 81 - 124 + 21 + 22 + 969 - 138 - 139 - 124 + 126 + 127 + 969 + + + + + + + alignment + bytesize + + + 12 + + + 4 + 5 + 969 + + + 19 + 20 + 969 + + + 21 + 22 + 1938 + + + 126 + 127 + 969 @@ -21500,15 +21367,15 @@ typedefbase - 1828181 + 3557623 id - 1828181 + 3557623 type_id - 885722 + 2754226 @@ -21522,7 +21389,7 @@ 1 2 - 1828181 + 3557623 @@ -21538,22 +21405,17 @@ 1 2 - 706481 + 2414067 2 3 - 83914 + 197699 3 - 7 - 74580 - - - 7 - 4525 - 20745 + 27 + 142460 @@ -21563,7 +21425,7 @@ decltypes - 814475 + 814476 id @@ -21571,7 +21433,7 @@ expr - 814475 + 814476 kind @@ -21701,7 +21563,7 @@ 1 2 - 814475 + 814476 @@ -21717,7 +21579,7 @@ 1 2 - 814475 + 814476 @@ -21733,7 +21595,7 @@ 1 2 - 814475 + 814476 @@ -21749,7 +21611,7 @@ 1 2 - 814475 + 814476 @@ -22011,23 +21873,23 @@ type_operators - 7960 + 21466 id - 7960 + 21466 arg_type - 7186 + 21030 kind - 86 + 241 base_type - 5249 + 17627 @@ -22041,7 +21903,7 @@ 1 2 - 7960 + 21466 @@ -22057,7 +21919,7 @@ 1 2 - 7960 + 21466 @@ -22073,7 +21935,7 @@ 1 2 - 7960 + 21466 @@ -22089,12 +21951,12 @@ 1 2 - 6411 + 20611 2 - 3 - 774 + 4 + 419 @@ -22110,12 +21972,12 @@ 1 2 - 6411 + 20611 2 - 3 - 774 + 4 + 419 @@ -22131,12 +21993,12 @@ 1 2 - 7164 + 20917 2 3 - 21 + 112 @@ -22150,117 +22012,247 @@ 12 - 1 - 2 - 21 - - - 7 - 8 - 21 - - - 96 - 97 - 21 - - - 266 - 267 - 21 - - - - - - - kind - arg_type - - - 12 - - - 1 - 2 - 21 - - - 7 - 8 - 21 - - - 96 - 97 - 21 - - - 266 - 267 - 21 - - - - - - - kind - base_type - - - 12 - - - 1 - 2 - 21 + 3 + 4 + 16 4 5 - 21 + 16 - 72 - 73 - 21 - - - 222 - 223 - 21 - - - - - - - base_type - id - - - 12 - - - 1 - 2 - 3636 - - - 2 - 3 - 903 - - - 3 - 4 - 344 - - - 4 + 5 6 - 365 + 16 + + + 7 + 8 + 16 + + + 9 + 10 + 16 + + + 10 + 11 + 16 + + + 12 + 13 + 32 + + + 16 + 17 + 16 + + + 30 + 31 + 32 + + + 63 + 64 + 16 + + + 108 + 109 + 16 + + + 167 + 168 + 16 + + + 855 + 856 + 16 + + + + + + + kind + arg_type + + + 12 + + + 3 + 4 + 16 + + + 4 + 5 + 16 + + + 5 + 6 + 16 + + + 7 + 8 + 16 + + + 9 + 10 + 16 + + + 10 + 11 + 16 + + + 12 + 13 + 32 + + + 16 + 17 + 16 + + + 30 + 31 + 32 + + + 63 + 64 + 16 + + + 108 + 109 + 16 + + + 167 + 168 + 16 + + + 855 + 856 + 16 + + + + + + + kind + base_type + + + 12 + + + 3 + 4 + 16 + + + 4 + 5 + 32 + + + 5 + 6 + 16 + + + 7 + 8 + 16 + + + 9 + 10 + 16 + + + 10 + 11 + 16 + + + 12 + 13 + 16 + + + 16 + 17 + 16 + + + 30 + 31 + 32 + + + 63 + 64 + 16 + + + 108 + 109 + 16 + + + 159 + 160 + 16 + + + 715 + 716 + 16 + + + + + + + base_type + id + + + 12 + + + 1 + 2 + 14660 + + + 2 + 3 + 2370 + + + 3 + 13 + 596 @@ -22276,22 +22268,17 @@ 1 2 - 3786 + 14805 2 3 - 989 + 2322 3 - 4 - 451 - - - 4 - 5 - 21 + 13 + 499 @@ -22307,17 +22294,12 @@ 1 2 - 4087 + 16434 2 - 3 - 1140 - - - 3 - 4 - 21 + 6 + 1193 @@ -22327,19 +22309,19 @@ usertypes - 4458594 + 6052127 id - 4458594 + 6052127 name - 963652 + 4651755 kind - 145 + 11629 @@ -22353,7 +22335,7 @@ 1 2 - 4458594 + 6052127 @@ -22369,7 +22351,7 @@ 1 2 - 4458594 + 6052127 @@ -22385,22 +22367,12 @@ 1 2 - 667093 + 4397847 2 - 3 - 176423 - - - 3 - 7 - 76769 - - - 7 - 30282 - 43365 + 279 + 253908 @@ -22416,12 +22388,12 @@ 1 2 - 904425 + 4468592 2 - 10 - 59227 + 4 + 183162 @@ -22435,64 +22407,64 @@ 12 - 28 - 29 - 12 + 1 + 2 + 969 - 64 - 65 - 12 + 2 + 3 + 969 - 579 - 580 - 12 + 3 + 4 + 969 - 1042 - 1043 - 12 + 7 + 8 + 969 - 1563 - 1564 - 12 + 19 + 20 + 969 - 1874 - 1875 - 12 + 62 + 63 + 969 - 4586 - 4587 - 12 + 148 + 149 + 969 - 19666 - 19667 - 12 + 164 + 165 + 969 - 20075 - 20076 - 12 + 257 + 258 + 969 - 82092 - 82093 - 12 + 606 + 607 + 969 - 86007 - 86008 - 12 + 1305 + 1306 + 969 - 151219 - 151220 - 12 + 3671 + 3672 + 969 @@ -22506,64 +22478,59 @@ 12 - 19 - 20 - 12 + 1 + 2 + 969 - 47 - 48 - 12 + 2 + 3 + 1938 - 50 - 51 - 12 + 3 + 4 + 969 + + + 9 + 10 + 969 + + + 23 + 24 + 969 + + + 46 + 47 + 969 + + + 53 + 54 + 969 153 154 - 12 + 969 - 417 - 418 - 12 + 209 + 210 + 969 - 771 - 772 - 12 + 1173 + 1174 + 969 - 1565 - 1566 - 12 - - - 3066 - 3067 - 12 - - - 5585 - 5586 - 12 - - - 10838 - 10839 - 12 - - - 10903 - 10904 - 12 - - - 51707 - 51708 - 12 + 3319 + 3320 + 969 @@ -22573,19 +22540,19 @@ usertypesize - 1462784 + 1867486 id - 1462784 + 1867486 size - 1692 + 102726 alignment - 96 + 4845 @@ -22599,7 +22566,7 @@ 1 2 - 1462784 + 1867486 @@ -22615,7 +22582,7 @@ 1 2 - 1462784 + 1867486 @@ -22631,52 +22598,37 @@ 1 2 - 531 + 47486 2 3 - 229 + 14536 3 4 - 96 + 8722 4 - 6 - 108 + 7 + 8722 - 6 - 8 - 132 + 7 + 19 + 8722 - 8 - 14 - 132 + 19 + 54 + 7752 - 14 - 26 - 132 - - - 26 - 86 - 132 - - - 96 - 1592 - 132 - - - 1733 - 93158 - 60 + 64 + 459 + 6783 @@ -22692,17 +22644,22 @@ 1 2 - 1390 + 72683 2 3 - 193 + 21320 3 + 5 + 7752 + + + 5 6 - 108 + 969 @@ -22716,44 +22673,29 @@ 12 - 1 - 2 - 12 + 11 + 12 + 969 - 3 - 4 - 12 + 72 + 73 + 969 - 7 - 8 - 12 + 480 + 481 + 969 - 54 - 55 - 12 + 492 + 493 + 969 - 56 - 57 - 12 - - - 2046 - 2047 - 12 - - - 10484 - 10485 - 12 - - - 108344 - 108345 - 12 + 872 + 873 + 969 @@ -22767,39 +22709,29 @@ 12 - 1 - 2 - 24 + 7 + 8 + 969 - 3 - 4 - 12 + 15 + 16 + 969 - 11 - 12 - 12 + 18 + 19 + 969 - 12 - 13 - 12 + 41 + 42 + 969 - 17 - 18 - 12 - - - 27 - 28 - 12 - - - 110 - 111 - 12 + 69 + 70 + 969 @@ -22809,26 +22741,26 @@ usertype_final - 11493 + 14321 id - 11493 + 14321 usertype_uuid - 50413 + 47628 id - 50413 + 47628 uuid - 49904 + 47148 @@ -22842,7 +22774,7 @@ 1 2 - 50413 + 47628 @@ -22858,12 +22790,12 @@ 1 2 - 49394 + 46669 2 3 - 509 + 479 @@ -22873,15 +22805,15 @@ usertype_alias_kind - 1828181 + 3557623 id - 1828181 + 3557623 alias_kind - 24 + 1938 @@ -22895,7 +22827,7 @@ 1 2 - 1828181 + 3557623 @@ -22909,14 +22841,14 @@ 12 - 36597 - 36598 - 12 + 394 + 395 + 969 - 114622 - 114623 - 12 + 3277 + 3278 + 969 @@ -22926,26 +22858,26 @@ nontype_template_parameters - 766422 + 1345749 id - 766422 + 1345749 type_template_type_constraint - 27151 + 27153 id - 13382 + 13383 constraint - 26011 + 26013 @@ -22959,7 +22891,7 @@ 1 2 - 10219 + 10220 2 @@ -22995,7 +22927,7 @@ 1 2 - 24871 + 24873 2 @@ -23010,19 +22942,19 @@ mangled_name - 7826069 + 13577311 id - 7826069 + 13577311 mangled_name - 6330564 + 12739995 is_complete - 249 + 969 @@ -23036,7 +22968,7 @@ 1 2 - 7826069 + 13577311 @@ -23052,7 +22984,7 @@ 1 2 - 7826069 + 13577311 @@ -23068,12 +23000,12 @@ 1 2 - 6001006 + 12475426 2 - 1127 - 329558 + 279 + 264568 @@ -23089,7 +23021,7 @@ 1 2 - 6330564 + 12739995 @@ -23103,14 +23035,9 @@ 12 - 6 - 7 - 124 - - - 62639 - 62640 - 124 + 14010 + 14011 + 969 @@ -23124,14 +23051,9 @@ 12 - 6 - 7 - 124 - - - 50668 - 50669 - 124 + 13146 + 13147 + 969 @@ -23141,59 +23063,59 @@ is_pod_class - 593865 + 1298615 id - 593865 + 1298615 is_standard_layout_class - 1205360 + 1697051 id - 1205360 + 1697051 is_complete - 1443114 + 1816582 id - 1443114 + 1816582 is_class_template - 260749 + 264958 id - 260749 + 264958 class_instantiation - 1189945 + 2192614 to - 1186464 + 2192280 from - 81870 + 10212 @@ -23207,12 +23129,12 @@ 1 2 - 1184021 + 2192042 2 - 8 - 2442 + 4 + 238 @@ -23228,47 +23150,57 @@ 1 2 - 23792 + 2260 2 3 - 14809 + 1667 3 4 - 8100 + 714 4 5 - 5355 + 597 5 7 - 6903 + 853 7 - 10 - 6262 + 12 + 783 - 10 - 17 - 6625 + 12 + 24 + 809 - 17 - 53 - 6201 + 24 + 55 + 775 - 53 - 4219 - 3820 + 55 + 136 + 770 + + + 138 + 2697 + 779 + + + 2697 + 40686 + 199 @@ -23278,19 +23210,19 @@ class_template_argument - 3135288 + 4874957 type_id - 1461382 + 2400642 index - 1354 + 446 arg_type - 925001 + 663608 @@ -23304,27 +23236,27 @@ 1 2 - 608192 + 976327 2 3 - 439349 + 686449 3 4 - 276876 + 546554 4 - 7 - 110765 + 6 + 183702 - 7 - 113 - 26198 + 6 + 104 + 7609 @@ -23340,22 +23272,22 @@ 1 2 - 639589 + 1061385 2 3 - 452563 + 622478 3 4 - 275075 + 578009 4 - 113 - 94154 + 89 + 138769 @@ -23369,39 +23301,49 @@ 12 - 2 - 3 - 12 + 30 + 31 + 51 - 4 - 5 - 858 + 38 + 39 + 77 - 5 - 30 - 108 + 46 + 47 + 77 - 33 - 90 - 108 + 54 + 55 + 64 - 95 - 453 - 108 + 60 + 107 + 38 - 643 - 6819 - 108 + 112 + 183 + 38 - 11329 - 120877 - 48 + 230 + 390 + 34 + + + 418 + 1490 + 34 + + + 1757 + 554312 + 25 @@ -23415,39 +23357,54 @@ 12 - 2 - 3 + 30 + 31 + 51 + + + 38 + 39 + 77 + + + 39 + 45 12 - 4 - 5 - 858 + 46 + 47 + 95 - 5 - 16 - 120 + 47 + 54 + 21 - 16 - 35 - 108 + 54 + 55 + 64 - 37 - 155 - 108 + 55 + 104 + 34 - 196 - 3251 - 108 + 106 + 356 + 34 - 10075 - 43772 - 36 + 367 + 1288 + 34 + + + 7294 + 108536 + 17 @@ -23463,27 +23420,27 @@ 1 2 - 580362 + 475363 2 3 - 189734 + 45850 3 - 4 - 55563 + 7 + 59952 - 4 - 11 - 70373 + 7 + 20 + 50259 - 11 - 11634 - 28966 + 20 + 78713 + 32182 @@ -23499,17 +23456,17 @@ 1 2 - 815421 + 523709 2 3 - 88822 + 92689 3 - 22 - 20757 + 36 + 47210 @@ -23519,19 +23476,19 @@ class_template_argument_value - 510176 + 1488982 type_id - 205849 + 929638 index - 306 + 51 arg_value - 510039 + 1394094 @@ -23545,17 +23502,22 @@ 1 2 - 155826 + 660327 2 3 - 43377 + 105219 3 - 8 - 6644 + 4 + 154027 + + + 4 + 14 + 10064 @@ -23571,22 +23533,22 @@ 1 2 - 147955 + 655572 2 3 - 40481 + 105690 3 - 45 - 15538 + 4 + 154049 - 45 - 154 - 1874 + 4 + 313 + 14325 @@ -23600,49 +23562,69 @@ 12 - 2 - 3 - 34 + 15 + 16 + 3 - 20 - 21 - 34 + 16 + 17 + 7 - 49 - 50 - 34 + 100 + 101 + 3 - 84 - 85 - 34 + 162 + 163 + 3 - 105 - 106 - 34 + 242 + 243 + 3 - 278 - 279 - 34 + 358 + 359 + 3 - 981 - 982 - 34 + 504 + 505 + 3 - 2471 - 2472 - 34 + 1520 + 1521 + 3 - 3753 - 3754 - 34 + 3113 + 3114 + 3 + + + 47424 + 47425 + 3 + + + 63499 + 63500 + 3 + + + 121527 + 121528 + 3 + + + 138888 + 138889 + 3 @@ -23656,49 +23638,69 @@ 12 - 3 - 4 - 34 + 20 + 21 + 3 - 74 - 75 - 34 + 26 + 27 + 7 - 105 - 106 - 34 + 185 + 186 + 3 - 273 - 274 - 34 + 302 + 303 + 3 - 336 - 337 - 34 + 555 + 556 + 3 - 892 - 893 - 34 + 787 + 788 + 3 - 2433 - 2434 - 34 + 1062 + 1063 + 3 - 4801 - 4802 - 34 + 2391 + 2392 + 3 - 6051 - 6052 - 34 + 4694 + 4695 + 3 + + + 47910 + 47911 + 3 + + + 66111 + 66112 + 3 + + + 123253 + 123254 + 3 + + + 134221 + 134222 + 3 @@ -23714,12 +23716,12 @@ 1 2 - 509903 + 1306054 2 - 3 - 136 + 5 + 88039 @@ -23735,7 +23737,12 @@ 1 2 - 510039 + 1393907 + + + 2 + 5 + 186 @@ -23745,15 +23752,15 @@ is_proxy_class_for - 55443 + 48455 id - 55443 + 48455 templ_param_id - 52384 + 45782 @@ -23767,7 +23774,7 @@ 1 2 - 55443 + 48455 @@ -23783,12 +23790,12 @@ 1 2 - 51562 + 45063 2 79 - 822 + 718 @@ -23798,23 +23805,23 @@ type_mentions - 5828707 + 19988012 id - 5828707 + 19988012 type_id - 276019 + 1262757 location - 5783003 + 19988012 kind - 54 + 1938 @@ -23828,7 +23835,7 @@ 1 2 - 5828707 + 19988012 @@ -23844,7 +23851,7 @@ 1 2 - 5828707 + 19988012 @@ -23860,7 +23867,7 @@ 1 2 - 5828707 + 19988012 @@ -23876,42 +23883,32 @@ 1 2 - 136511 + 667720 2 3 - 30995 + 220958 3 - 4 - 11167 - - - 4 5 - 14707 + 116293 5 - 7 - 19991 + 11 + 101757 - 7 - 12 - 21844 + 11 + 44 + 94973 - 12 - 28 - 21081 - - - 28 - 8907 - 19719 + 45 + 3662 + 61054 @@ -23927,42 +23924,32 @@ 1 2 - 136511 + 667720 2 3 - 30995 + 220958 3 - 4 - 11167 - - - 4 5 - 14707 + 116293 5 - 7 - 19991 + 11 + 101757 - 7 - 12 - 21844 + 11 + 44 + 94973 - 12 - 28 - 21081 - - - 28 - 8907 - 19719 + 45 + 3662 + 61054 @@ -23978,7 +23965,12 @@ 1 2 - 276019 + 1259850 + + + 2 + 3 + 2907 @@ -23994,12 +23986,7 @@ 1 2 - 5737300 - - - 2 - 3 - 45703 + 19988012 @@ -24015,12 +24002,7 @@ 1 2 - 5737300 - - - 2 - 3 - 45703 + 19988012 @@ -24036,7 +24018,7 @@ 1 2 - 5783003 + 19988012 @@ -24050,9 +24032,14 @@ 12 - 107000 - 107001 - 54 + 10 + 11 + 969 + + + 20615 + 20616 + 969 @@ -24066,9 +24053,14 @@ 12 - 5067 - 5068 - 54 + 3 + 4 + 969 + + + 1303 + 1304 + 969 @@ -24082,9 +24074,14 @@ 12 - 106161 - 106162 - 54 + 10 + 11 + 969 + + + 20615 + 20616 + 969 @@ -24094,26 +24091,26 @@ is_function_template - 1335972 + 2373374 id - 1335972 + 2373374 function_instantiation - 973157 + 1087747 to - 973157 + 1087747 from - 182575 + 181540 @@ -24127,7 +24124,7 @@ 1 2 - 973157 + 1087747 @@ -24143,27 +24140,22 @@ 1 2 - 111051 + 143026 2 3 - 42253 + 20398 3 - 9 - 14379 + 15 + 13707 - 9 - 103 - 13698 - - - 103 - 1532 - 1192 + 15 + 13978 + 4408 @@ -24173,19 +24165,19 @@ function_template_argument - 2485251 + 4582754 function_id - 1453551 + 1968725 index - 477 + 441 arg_type - 298057 + 378486 @@ -24199,22 +24191,27 @@ 1 2 - 783153 + 595467 2 3 - 413231 + 683565 3 4 - 171841 + 409482 4 - 15 - 85324 + 5 + 171411 + + + 5 + 103 + 108799 @@ -24230,22 +24227,27 @@ 1 2 - 802303 + 607506 2 3 - 411323 + 680737 3 4 - 169661 + 419222 4 - 9 - 70263 + 5 + 173494 + + + 5 + 60 + 87764 @@ -24259,53 +24261,53 @@ 12 - 1 - 2 - 170 + 5 + 6 + 51 - 7 - 8 + 9 + 10 + 77 + + + 13 + 14 + 12 + + + 18 + 19 + 64 + + + 22 + 23 + 64 + + + 25 + 406 34 - 45 - 46 + 529 + 650 + 30 + + + 661 + 788 34 - 77 - 78 + 799 + 1542 34 - 138 - 139 - 34 - - - 280 - 281 - 34 - - - 2504 - 2505 - 34 - - - 7547 - 7548 - 34 - - - 19674 - 19675 - 34 - - - 42657 - 42658 + 2040 + 454582 34 @@ -24320,54 +24322,74 @@ 12 - 1 - 2 - 170 + 2 + 3 + 25 + + + 3 + 4 + 25 4 5 + 17 + + + 5 + 6 + 47 + + + 6 + 9 + 30 + + + 9 + 10 + 25 + + + 10 + 11 + 30 + + + 11 + 12 + 38 + + + 12 + 14 + 38 + + + 24 + 39 34 - 17 - 18 - 34 - - - 27 - 28 + 40 + 52 34 52 - 53 + 77 34 - 112 - 113 + 83 + 791 34 - 315 - 316 - 34 - - - 972 - 973 - 34 - - - 2754 - 2755 - 34 - - - 6081 - 6082 - 34 + 1290 + 49710 + 21 @@ -24383,37 +24405,27 @@ 1 2 - 174806 + 271124 2 3 - 26340 + 26881 3 - 4 - 20002 + 5 + 30290 - 4 - 6 - 22660 - - - 6 + 5 11 - 23239 + 32044 11 - 76 - 23375 - - - 79 - 2452 - 7632 + 102410 + 18146 @@ -24429,17 +24441,17 @@ 1 2 - 256859 + 329933 2 3 - 32133 + 30324 3 - 15 - 9064 + 35 + 18228 @@ -24449,19 +24461,19 @@ function_template_argument_value - 452861 + 1219038 function_id - 196819 + 878373 index - 477 + 51 arg_value - 450169 + 1107321 @@ -24475,17 +24487,17 @@ 1 2 - 151430 + 614094 2 3 - 42900 + 263862 3 - 8 - 2487 + 14 + 416 @@ -24501,22 +24513,17 @@ 1 2 - 144513 + 610202 2 3 - 36699 + 263833 3 - 54 - 14856 - - - 54 - 113 - 749 + 209 + 4337 @@ -24529,55 +24536,55 @@ 12 - - 1 - 2 - 170 - - - 2 - 3 - 34 - 3 4 - 34 + 18 4 5 - 34 + 3 - 15 - 16 - 34 + 13 + 14 + 3 - 27 - 28 - 34 + 18 + 19 + 3 - 1345 - 1346 - 34 + 44 + 45 + 3 - 1388 - 1389 - 34 + 116 + 117 + 3 - 1850 - 1851 - 34 + 6765 + 6766 + 3 - 2547 - 2548 - 34 + 10035 + 10036 + 3 + + + 90635 + 90636 + 3 + + + 205204 + 205205 + 3 @@ -24591,54 +24598,54 @@ 12 - 1 - 2 - 170 + 5 + 6 + 18 - 2 - 3 - 34 + 6 + 7 + 3 - 3 - 4 - 34 + 19 + 20 + 3 - 4 - 5 - 34 + 22 + 23 + 3 - 51 - 52 - 34 + 64 + 65 + 3 - 63 - 64 - 34 + 234 + 235 + 3 - 1906 - 1907 - 34 + 7866 + 7867 + 3 - 3295 - 3296 - 34 + 12284 + 12285 + 3 - 3702 - 3703 - 34 + 87096 + 87097 + 3 - 4180 - 4181 - 34 + 195391 + 195392 + 3 @@ -24654,12 +24661,17 @@ 1 2 - 447477 + 1007971 2 3 - 2691 + 87655 + + + 3 + 5 + 11694 @@ -24675,7 +24687,12 @@ 1 2 - 450169 + 1107318 + + + 2 + 3 + 3 @@ -24685,26 +24702,26 @@ is_variable_template - 58715 + 110479 id - 58715 + 110479 variable_instantiation - 421504 + 423162 to - 421504 + 423162 from - 35104 + 35336 @@ -24718,7 +24735,7 @@ 1 2 - 421504 + 423162 @@ -24734,47 +24751,42 @@ 1 2 - 15116 + 15233 2 3 - 3997 + 3870 3 4 - 2248 + 2372 4 6 - 2873 + 2996 6 8 - 2248 + 2247 8 - 11 - 2748 + 12 + 3121 - 11 - 30 - 2748 + 12 + 31 + 2746 - 30 - 105 - 2748 - - - 180 + 32 546 - 374 + 2746 @@ -24784,19 +24796,19 @@ variable_template_argument - 768927 + 779492 variable_id - 400766 + 401670 index - 1998 + 58 arg_type - 256850 + 109675 @@ -24810,22 +24822,17 @@ 1 2 - 155909 + 28298 2 3 - 190139 + 370022 3 - 4 - 36478 - - - 4 - 17 - 18239 + 10 + 3349 @@ -24841,22 +24848,17 @@ 1 2 - 170900 + 29995 2 3 - 180270 + 369899 3 - 4 - 33730 - - - 4 - 17 - 15865 + 9 + 1775 @@ -24870,44 +24872,44 @@ 12 - 28 - 29 - 874 + 7 + 8 + 6 - 34 - 35 - 374 + 8 + 9 + 12 - 37 - 38 - 124 + 9 + 10 + 6 - 66 - 67 - 124 + 32 + 33 + 6 - 146 - 147 - 124 + 106 + 107 + 6 - 438 - 439 - 124 + 517 + 518 + 6 - 1960 - 1961 - 124 + 57632 + 57633 + 6 - 3208 - 3209 - 124 + 62000 + 62001 + 6 @@ -24923,42 +24925,42 @@ 1 2 - 874 + 6 2 3 - 374 + 12 - 5 - 6 - 124 + 3 + 4 + 6 - 28 - 29 - 124 + 8 + 9 + 6 - 54 - 55 - 124 + 51 + 52 + 6 - 161 - 162 - 124 + 193 + 194 + 6 - 748 - 749 - 124 + 1557 + 1558 + 6 - 1326 - 1327 - 124 + 15672 + 15673 + 6 @@ -24974,22 +24976,37 @@ 1 2 - 176022 + 58157 2 3 - 44723 + 21016 3 + 5 + 9491 + + + 5 6 - 21737 + 3051 6 - 206 - 14366 + 7 + 9218 + + + 7 + 50 + 8227 + + + 50 + 1375 + 511 @@ -25005,17 +25022,12 @@ 1 2 - 228367 + 106325 2 - 3 - 24860 - - - 3 - 7 - 3622 + 10 + 3349 @@ -25025,11 +25037,11 @@ variable_template_argument_value - 19988 + 19978 variable_id - 14866 + 14858 index @@ -25037,7 +25049,7 @@ arg_value - 19988 + 19978 @@ -25051,12 +25063,12 @@ 1 2 - 13367 + 13360 2 3 - 1499 + 1498 @@ -25072,12 +25084,12 @@ 1 2 - 10493 + 10488 2 3 - 3997 + 3995 4 @@ -25160,7 +25172,7 @@ 1 2 - 19988 + 19978 @@ -25176,7 +25188,7 @@ 1 2 - 19988 + 19978 @@ -25186,15 +25198,15 @@ template_template_instantiation - 6637 + 12896 to - 6226 + 8387 from - 4400 + 75 @@ -25208,12 +25220,12 @@ 1 2 - 6093 + 3878 2 - 15 - 132 + 3 + 4508 @@ -25229,17 +25241,22 @@ 1 2 - 2877 + 52 2 3 - 1366 + 7 - 3 - 20 - 157 + 830 + 831 + 7 + + + 880 + 881 + 7 @@ -25249,19 +25266,19 @@ template_template_argument - 11074 + 9678 type_id - 6999 + 6117 index - 120 + 105 arg_type - 10397 + 9086 @@ -25275,22 +25292,22 @@ 1 2 - 5742 + 5018 2 3 - 483 + 422 3 8 - 580 + 507 8 11 - 193 + 169 @@ -25306,22 +25323,22 @@ 1 2 - 5766 + 5039 2 4 - 640 + 559 4 10 - 531 + 464 10 11 - 60 + 52 @@ -25337,52 +25354,52 @@ 6 7 - 12 + 10 11 12 - 12 + 10 16 17 - 12 + 10 21 22 - 12 + 10 27 28 - 12 + 10 38 39 - 12 + 10 50 51 - 12 + 10 64 65 - 12 + 10 104 105 - 12 + 10 579 580 - 12 + 10 @@ -25398,52 +25415,52 @@ 6 7 - 12 + 10 11 12 - 12 + 10 16 17 - 12 + 10 21 22 - 12 + 10 27 28 - 12 + 10 38 39 - 12 + 10 50 51 - 12 + 10 64 65 - 12 + 10 99 100 - 12 + 10 538 539 - 12 + 10 @@ -25459,12 +25476,12 @@ 1 2 - 10360 + 9055 3 43 - 36 + 31 @@ -25480,12 +25497,12 @@ 1 2 - 10372 + 9065 2 11 - 24 + 21 @@ -25495,19 +25512,19 @@ template_template_argument_value - 713 + 623 type_id - 604 + 528 index - 24 + 21 arg_value - 713 + 623 @@ -25521,7 +25538,7 @@ 1 2 - 604 + 528 @@ -25537,17 +25554,17 @@ 1 2 - 519 + 454 2 3 - 60 + 52 3 4 - 24 + 21 @@ -25563,12 +25580,12 @@ 8 9 - 12 + 10 42 43 - 12 + 10 @@ -25584,12 +25601,12 @@ 17 18 - 12 + 10 42 43 - 12 + 10 @@ -25605,7 +25622,7 @@ 1 2 - 713 + 623 @@ -25621,7 +25638,7 @@ 1 2 - 713 + 623 @@ -25747,11 +25764,11 @@ concept_instantiation - 90427 + 90434 to - 90427 + 90434 from @@ -25769,7 +25786,7 @@ 1 2 - 90427 + 90434 @@ -25865,22 +25882,22 @@ is_type_constraint - 36898 + 36900 concept_id - 36898 + 36900 concept_template_argument - 113040 + 113047 concept_id - 76378 + 76383 index @@ -25888,7 +25905,7 @@ arg_type - 21428 + 21430 @@ -25902,12 +25919,12 @@ 1 2 - 46472 + 46475 2 3 - 24677 + 24679 3 @@ -25928,17 +25945,17 @@ 1 2 - 50087 + 50090 2 3 - 22375 + 22377 3 7 - 3915 + 3916 @@ -26036,7 +26053,7 @@ 1 2 - 10391 + 10392 2 @@ -26087,7 +26104,7 @@ 1 2 - 18029 + 18030 2 @@ -26107,19 +26124,19 @@ concept_template_argument_value - 106 + 112 concept_id - 83 + 112 index - 15 + 32 arg_value - 106 + 112 @@ -26133,7 +26150,7 @@ 1 2 - 83 + 112 @@ -26149,12 +26166,7 @@ 1 2 - 60 - - - 2 - 3 - 22 + 112 @@ -26168,14 +26180,14 @@ 12 - 3 - 4 - 7 + 2 + 3 + 16 - 8 - 9 - 7 + 5 + 6 + 16 @@ -26189,14 +26201,14 @@ 12 - 4 - 5 - 7 + 2 + 3 + 16 - 10 - 11 - 7 + 5 + 6 + 16 @@ -26212,7 +26224,7 @@ 1 2 - 106 + 112 @@ -26228,7 +26240,7 @@ 1 2 - 106 + 112 @@ -26238,15 +26250,15 @@ routinetypes - 604428 + 792462 id - 604428 + 792462 return_type - 283915 + 176968 @@ -26260,7 +26272,7 @@ 1 2 - 604428 + 792462 @@ -26276,17 +26288,17 @@ 1 2 - 234267 + 148650 2 3 - 35097 + 18859 3 - 4676 - 14550 + 40273 + 9458 @@ -26296,11 +26308,11 @@ routinetypeargs - 1169173 + 1176788 routine - 413238 + 415119 index @@ -26308,7 +26320,7 @@ type_id - 111399 + 111595 @@ -26322,32 +26334,32 @@ 1 2 - 82364 + 82511 2 3 - 125834 + 126028 3 4 - 107150 + 107456 4 5 - 48754 + 49289 5 7 - 32575 + 33168 7 19 - 16560 + 16665 @@ -26363,27 +26375,27 @@ 1 2 - 88356 + 88502 2 3 - 138418 + 138663 3 4 - 113850 + 114209 4 5 - 40256 + 40738 5 10 - 32248 + 32895 10 @@ -26447,38 +26459,38 @@ 54 - 304 - 305 + 306 + 307 54 - 576 - 577 + 584 + 585 54 - 902 - 903 + 915 + 916 54 - 1797 - 1798 + 1820 + 1821 54 - 3764 - 3765 + 3793 + 3794 54 - 6074 - 6075 + 6107 + 6108 54 - 7586 - 7587 + 7622 + 7623 54 @@ -26533,38 +26545,38 @@ 54 - 96 - 97 + 97 + 98 54 - 126 - 127 + 127 + 128 54 - 191 - 192 + 192 + 193 54 - 313 - 314 + 314 + 315 54 - 509 - 510 + 510 + 511 54 - 786 - 787 + 787 + 788 54 - 1172 - 1173 + 1174 + 1175 54 @@ -26581,47 +26593,47 @@ 1 2 - 33283 + 33222 2 3 - 15034 + 15195 3 4 - 13237 + 13234 4 5 - 9859 + 9803 5 6 - 6373 + 6372 6 8 - 9532 + 9476 8 13 - 9478 + 9531 13 26 - 8770 + 8659 26 - 916 - 5828 + 918 + 6099 @@ -26637,22 +26649,22 @@ 1 2 - 78714 + 78917 2 3 - 17595 + 17537 3 5 - 9478 + 9476 5 17 - 5610 + 5664 @@ -26662,19 +26674,19 @@ ptrtomembers - 11025 + 24227 id - 11025 + 24227 type_id - 9067 + 24227 class_id - 5464 + 2907 @@ -26688,7 +26700,7 @@ 1 2 - 11025 + 24227 @@ -26704,7 +26716,7 @@ 1 2 - 11025 + 24227 @@ -26720,12 +26732,7 @@ 1 2 - 8813 - - - 2 - 84 - 253 + 24227 @@ -26741,12 +26748,7 @@ 1 2 - 8813 - - - 2 - 84 - 253 + 24227 @@ -26762,22 +26764,12 @@ 1 2 - 4352 + 969 - 2 - 3 - 604 - - - 8 - 9 - 459 - - - 10 - 65 - 48 + 12 + 13 + 1938 @@ -26793,22 +26785,12 @@ 1 2 - 4352 + 969 - 2 - 3 - 604 - - - 8 - 9 - 459 - - - 10 - 65 - 48 + 12 + 13 + 1938 @@ -26818,15 +26800,15 @@ specifiers - 7745 + 60085 id - 7745 + 60085 str - 7745 + 60085 @@ -26840,7 +26822,7 @@ 1 2 - 7745 + 60085 @@ -26856,7 +26838,7 @@ 1 2 - 7745 + 60085 @@ -26866,15 +26848,15 @@ typespecifiers - 888515 + 2259977 type_id - 882627 + 2226058 spec_id - 108 + 10660 @@ -26888,12 +26870,12 @@ 1 2 - 876739 + 2192139 2 3 - 5887 + 33919 @@ -26907,49 +26889,49 @@ 12 - 164 - 165 - 12 + 1 + 2 + 1938 - 215 - 216 - 12 + 2 + 3 + 1938 - 224 - 225 - 12 + 23 + 24 + 969 - 532 - 533 - 12 + 26 + 27 + 969 - 821 - 822 - 12 + 30 + 31 + 969 - 1568 - 1569 - 12 + 71 + 72 + 969 - 4150 - 4151 - 12 + 260 + 261 + 969 - 17496 - 17497 - 12 + 265 + 266 + 969 - 48324 - 48325 - 12 + 1651 + 1652 + 969 @@ -26959,15 +26941,15 @@ funspecifiers - 9688610 + 16276298 func_id - 3970813 + 7605620 spec_id - 2373 + 15505 @@ -26981,27 +26963,27 @@ 1 2 - 1484261 + 4160413 2 3 - 506954 + 533013 3 4 - 1037645 + 675473 4 5 - 696219 + 2183417 5 - 8 - 245731 + 7 + 53301 @@ -27015,99 +26997,84 @@ 12 - 17 - 18 - 124 + 1 + 2 + 969 - 18 - 19 - 124 + 7 + 8 + 969 - 53 - 54 - 124 + 15 + 16 + 969 - 114 - 115 - 124 + 23 + 24 + 969 - 206 - 207 - 124 + 72 + 73 + 969 - 272 - 273 - 124 + 77 + 78 + 969 - 354 - 355 - 124 + 79 + 80 + 969 - 653 - 654 - 124 + 100 + 101 + 969 - 766 - 767 - 124 + 104 + 105 + 969 - 823 - 824 - 124 + 105 + 106 + 969 - 1075 - 1076 - 124 + 121 + 122 + 969 - 1258 - 1259 - 124 + 189 + 190 + 969 - 1662 - 1663 - 124 + 2717 + 2718 + 969 - 3340 - 3341 - 124 + 3165 + 3166 + 969 - 3351 - 3352 - 124 + 3668 + 3669 + 969 - 6166 - 6167 - 124 - - - 15136 - 15137 - 124 - - - 19863 - 19864 - 124 - - - 22427 - 22428 - 124 + 6352 + 6353 + 969 @@ -27117,15 +27084,15 @@ varspecifiers - 3073086 + 10333681 var_id - 2315027 + 8874192 spec_id - 1124 + 8722 @@ -27139,17 +27106,17 @@ 1 2 - 1659658 + 7525183 2 3 - 553177 + 1293769 - 3 + 4 5 - 102190 + 55239 @@ -27163,49 +27130,49 @@ 12 - 97 - 98 - 124 + 11 + 12 + 969 - 240 - 241 - 124 + 73 + 74 + 969 - 1091 - 1092 - 124 + 120 + 121 + 969 - 1325 - 1326 - 124 + 127 + 128 + 969 - 2236 - 2237 - 124 + 136 + 137 + 969 - 2761 - 2762 - 124 + 406 + 407 + 969 - 3436 - 3437 - 124 + 959 + 960 + 969 - 4931 - 4932 - 124 + 1244 + 1245 + 969 - 8482 - 8483 - 124 + 7587 + 7588 + 969 @@ -27215,15 +27182,15 @@ explicit_specifier_exprs - 41350 + 123740 func_id - 41350 + 123740 constant - 41350 + 123740 @@ -27237,7 +27204,7 @@ 1 2 - 41350 + 123740 @@ -27253,7 +27220,7 @@ 1 2 - 41350 + 123740 @@ -27263,27 +27230,27 @@ attributes - 651120 + 3690392 id - 651120 + 3690392 kind - 374 + 1938 name - 2123 + 9691 name_space - 249 + 1938 location - 644999 + 3690392 @@ -27297,7 +27264,7 @@ 1 2 - 651120 + 3690392 @@ -27313,7 +27280,7 @@ 1 2 - 651120 + 3690392 @@ -27329,7 +27296,7 @@ 1 2 - 651120 + 3690392 @@ -27345,7 +27312,7 @@ 1 2 - 651120 + 3690392 @@ -27359,19 +27326,14 @@ 12 - 7 - 8 - 124 + 81 + 82 + 969 - 2402 - 2403 - 124 - - - 2803 - 2804 - 124 + 3727 + 3728 + 969 @@ -27380,53 +27342,6 @@ kind name - - - 12 - - - 1 - 2 - 124 - - - 6 - 7 - 124 - - - 12 - 13 - 124 - - - - - - - kind - name_space - - - 12 - - - 1 - 2 - 249 - - - 2 - 3 - 124 - - - - - - - kind - location 12 @@ -27434,17 +27349,54 @@ 4 5 - 124 + 969 - 2356 - 2357 - 124 + 8 + 9 + 969 + + + + + + + kind + name_space + + + 12 + + + 1 + 2 + 969 - 2803 - 2804 - 124 + 2 + 3 + 969 + + + + + + + kind + location + + + 12 + + + 81 + 82 + 969 + + + 3727 + 3728 + 969 @@ -27458,79 +27410,44 @@ 12 - 1 - 2 - 249 + 2 + 3 + 1938 3 4 - 124 - - - 6 - 7 - 124 - - - 7 - 8 - 124 - - - 8 - 9 - 124 - - - 10 - 11 - 249 + 969 14 15 - 124 + 1938 - 18 - 19 - 124 + 20 + 21 + 969 - 24 - 25 - 124 + 54 + 55 + 969 - 55 - 56 - 124 - - - 62 - 63 - 124 + 67 + 68 + 969 72 73 - 124 + 969 - 340 - 341 - 124 - - - 1977 - 1978 - 124 - - - 2604 - 2605 - 124 + 3560 + 3561 + 969 @@ -27546,12 +27463,12 @@ 1 2 - 1873 + 7752 2 3 - 249 + 1938 @@ -27567,7 +27484,7 @@ 1 2 - 2123 + 9691 @@ -27581,79 +27498,44 @@ 12 - 1 - 2 - 249 + 2 + 3 + 1938 3 4 - 124 - - - 4 - 5 - 124 - - - 6 - 7 - 124 - - - 8 - 9 - 124 - - - 10 - 11 - 249 + 969 14 15 - 124 + 1938 - 18 - 19 - 124 + 20 + 21 + 969 - 24 - 25 - 124 + 54 + 55 + 969 - 55 - 56 - 124 - - - 62 - 63 - 124 + 67 + 68 + 969 72 73 - 124 + 969 - 335 - 336 - 124 - - - 1977 - 1978 - 124 - - - 2604 - 2605 - 124 + 3560 + 3561 + 969 @@ -27667,14 +27549,14 @@ 12 - 11 - 12 - 124 + 2 + 3 + 969 - 5201 - 5202 - 124 + 3806 + 3807 + 969 @@ -27690,12 +27572,12 @@ 1 2 - 124 + 969 - 3 - 4 - 124 + 2 + 3 + 969 @@ -27709,14 +27591,14 @@ 12 - 2 - 3 - 124 + 1 + 2 + 969 - 15 - 16 - 124 + 9 + 10 + 969 @@ -27730,14 +27612,14 @@ 12 - 11 - 12 - 124 + 2 + 3 + 969 - 5152 - 5153 - 124 + 3806 + 3807 + 969 @@ -27753,12 +27635,7 @@ 1 2 - 639127 - - - 2 - 5 - 5871 + 3690392 @@ -27774,7 +27651,7 @@ 1 2 - 644999 + 3690392 @@ -27790,12 +27667,7 @@ 1 2 - 639877 - - - 2 - 3 - 5122 + 3690392 @@ -27811,7 +27683,7 @@ 1 2 - 644999 + 3690392 @@ -27821,27 +27693,27 @@ attribute_args - 90623 + 1436500 id - 90623 + 1436500 kind - 48 + 64 attribute - 78510 + 658874 index - 60 + 112 location - 84409 + 605394 @@ -27855,7 +27727,7 @@ 1 2 - 90623 + 1436500 @@ -27871,7 +27743,7 @@ 1 2 - 90623 + 1436500 @@ -27887,7 +27759,7 @@ 1 2 - 90623 + 1436500 @@ -27903,7 +27775,7 @@ 1 2 - 90623 + 1436500 @@ -27917,24 +27789,24 @@ 12 - 10 - 11 - 12 + 2 + 3 + 16 - 133 - 134 - 12 + 40 + 41 + 16 - 560 - 561 - 12 + 21308 + 21309 + 16 - 6793 - 6794 - 12 + 67719 + 67720 + 16 @@ -27948,24 +27820,24 @@ 12 - 10 - 11 - 12 + 2 + 3 + 16 - 133 - 134 - 12 + 40 + 41 + 16 - 156 - 157 - 12 + 19864 + 19865 + 16 - 6365 - 6366 - 12 + 21058 + 21059 + 16 @@ -27981,17 +27853,17 @@ 1 2 - 24 + 32 - 4 - 5 - 12 + 3 + 4 + 16 - 5 - 6 - 12 + 7 + 8 + 16 @@ -28005,24 +27877,24 @@ 12 - 8 - 9 - 12 + 2 + 3 + 16 18 19 - 12 + 16 - 535 - 536 - 12 + 13313 + 13314 + 16 - 6437 - 6438 - 12 + 24224 + 24225 + 16 @@ -28038,17 +27910,27 @@ 1 2 - 71425 + 350298 2 - 5 - 5899 + 3 + 69108 - 5 - 18 - 1184 + 3 + 4 + 161602 + + + 4 + 7 + 41335 + + + 7 + 19 + 36529 @@ -28064,12 +27946,12 @@ 1 2 - 76454 + 657084 2 3 - 2055 + 1790 @@ -28085,12 +27967,27 @@ 1 2 - 72900 + 350911 2 + 3 + 69043 + + + 3 + 4 + 161634 + + + 5 6 - 5609 + 40964 + + + 7 + 8 + 36320 @@ -28106,12 +28003,17 @@ 1 2 - 74339 + 485854 2 - 6 - 4170 + 3 + 135216 + + + 3 + 8 + 37803 @@ -28125,29 +28027,29 @@ 12 - 94 - 95 - 12 + 2252 + 2253 + 32 - 96 - 97 - 12 + 4792 + 4793 + 32 - 166 - 167 - 12 + 14842 + 14843 + 16 - 464 - 465 - 12 + 19123 + 19124 + 16 - 6676 - 6677 - 12 + 41016 + 41017 + 16 @@ -28163,17 +28065,17 @@ 1 2 - 12 + 64 2 3 - 36 + 32 4 5 - 12 + 16 @@ -28187,29 +28089,29 @@ 12 - 94 - 95 - 12 + 2252 + 2253 + 32 - 96 - 97 - 12 + 4792 + 4793 + 32 - 166 - 167 - 12 + 14814 + 14815 + 16 - 464 - 465 - 12 + 19095 + 19096 + 16 - 6494 - 6495 - 12 + 40853 + 40854 + 16 @@ -28223,29 +28125,34 @@ 12 - 94 - 95 - 12 + 1222 + 1223 + 32 - 96 - 97 - 12 + 3434 + 3435 + 16 - 166 - 167 - 12 + 4342 + 4343 + 16 - 349 - 350 - 12 + 10135 + 10136 + 16 - 6318 - 6319 - 12 + 14524 + 14525 + 16 + + + 23710 + 23711 + 16 @@ -28261,12 +28168,32 @@ 1 2 - 82269 + 305801 2 - 23 - 2139 + 3 + 151909 + + + 3 + 4 + 23046 + + + 4 + 5 + 45432 + + + 5 + 7 + 48190 + + + 7 + 41 + 31014 @@ -28282,12 +28209,12 @@ 1 2 - 84216 + 605072 2 3 - 193 + 322 @@ -28303,12 +28230,17 @@ 1 2 - 84047 + 394521 2 - 18 - 362 + 3 + 166617 + + + 3 + 9 + 44255 @@ -28324,12 +28256,22 @@ 1 2 - 83914 + 443228 2 3 - 495 + 81042 + + + 3 + 5 + 40819 + + + 5 + 8 + 40303 @@ -28339,15 +28281,15 @@ attribute_arg_value - 16696 + 1092168 arg - 16696 + 1092168 value - 511 + 7515 @@ -28361,7 +28303,7 @@ 1 2 - 16696 + 1092168 @@ -28377,52 +28319,47 @@ 1 2 - 204 + 1354 + + + 2 + 3 + 564 + + + 3 + 4 + 177 + + + 4 + 5 + 3064 5 - 6 - 34 + 9 + 596 - 6 - 7 - 34 + 9 + 29 + 580 - 15 - 16 - 34 + 29 + 191 + 564 - 25 - 26 - 34 + 194 + 4608 + 564 - 51 - 52 - 34 - - - 52 - 53 - 34 - - - 71 - 72 - 34 - - - 76 - 77 - 34 - - - 183 - 184 - 34 + 4792 + 14377 + 48 @@ -28432,15 +28369,15 @@ attribute_arg_type - 460 + 1290 arg - 460 + 1290 type_id - 84 + 1078 @@ -28454,7 +28391,7 @@ 1 2 - 460 + 1290 @@ -28470,22 +28407,17 @@ 1 2 - 72 + 991 2 - 3 - 4 + 4 + 83 - 35 - 36 - 4 - - - 60 - 61 - 4 + 41 + 42 + 2 @@ -28495,15 +28427,15 @@ attribute_arg_constant - 82124 + 422211 arg - 82124 + 422211 constant - 82124 + 422211 @@ -28517,7 +28449,7 @@ 1 2 - 82124 + 422211 @@ -28533,7 +28465,7 @@ 1 2 - 82124 + 422211 @@ -28543,15 +28475,15 @@ attribute_arg_expr - 1607 + 82735 arg - 1607 + 82735 expr - 1607 + 82735 @@ -28565,7 +28497,7 @@ 1 2 - 1607 + 82735 @@ -28581,7 +28513,7 @@ 1 2 - 1607 + 82735 @@ -28644,15 +28576,15 @@ typeattributes - 92196 + 543449 type_id - 90572 + 507351 spec_id - 29232 + 40865 @@ -28666,12 +28598,12 @@ 1 2 - 88948 + 505060 2 - 3 - 1624 + 1762 + 2291 @@ -28687,17 +28619,12 @@ 1 2 - 24735 + 39683 2 - 7 - 2248 - - - 7 - 58 - 2248 + 17944 + 1182 @@ -28707,15 +28634,15 @@ funcattributes - 844883 + 3669072 func_id - 800034 + 3521766 spec_id - 617140 + 3661319 @@ -28729,12 +28656,12 @@ 1 2 - 759682 + 3392874 2 - 7 - 40351 + 5 + 128892 @@ -28750,12 +28677,12 @@ 1 2 - 571417 + 3659381 - 2 - 213 - 45723 + 5 + 6 + 1938 @@ -28828,7 +28755,7 @@ namespaceattributes - 5997 + 5996 namespace_id @@ -28836,7 +28763,7 @@ spec_id - 5997 + 5996 @@ -28876,7 +28803,7 @@ 1 2 - 5997 + 5996 @@ -28886,15 +28813,15 @@ stmtattributes - 2216 + 3679 stmt_id - 2216 + 3679 spec_id - 559 + 3679 @@ -28908,7 +28835,7 @@ 1 2 - 2216 + 3679 @@ -28924,27 +28851,7 @@ 1 2 - 215 - - - 2 - 3 - 150 - - - 3 - 4 - 43 - - - 9 - 10 - 107 - - - 13 - 16 - 43 + 3679 @@ -28954,15 +28861,15 @@ unspecifiedtype - 7467739 + 14839100 type_id - 7467739 + 14839100 unspecified_type_id - 4300051 + 7567824 @@ -28976,7 +28883,7 @@ 1 2 - 7467739 + 14839100 @@ -28992,17 +28899,22 @@ 1 2 - 2870392 + 3027517 2 3 - 1169405 + 3084695 3 - 6277 - 260253 + 4 + 1025324 + + + 4 + 51 + 430287 @@ -29012,19 +28924,19 @@ member - 4200804 + 9971231 parent - 544558 + 1466272 index - 29732 + 81405 child - 4195557 + 9971231 @@ -29037,58 +28949,53 @@ 1 - 2 - 129174 - - - 2 3 - 83451 + 112417 3 4 - 32606 + 161842 4 5 - 44848 + 314962 5 6 - 42475 + 264568 6 7 - 34979 + 126954 7 - 9 - 41725 + 8 + 107571 - 9 - 13 - 41600 + 8 + 10 + 134707 - 13 - 18 - 41101 + 10 + 14 + 124046 - 18 - 42 - 40851 + 14 + 50 + 112417 - 42 - 239 - 11743 + 51 + 85 + 6783 @@ -29103,58 +29010,53 @@ 1 - 2 - 128924 - - - 2 3 - 83576 + 112417 3 4 - 32356 + 161842 4 5 - 44973 + 314962 5 6 - 42600 + 264568 6 7 - 33980 + 126954 7 - 9 - 42225 + 8 + 107571 - 9 - 13 - 41725 + 8 + 10 + 134707 - 13 - 18 - 41226 + 10 + 14 + 124046 - 18 - 42 - 40976 + 14 + 50 + 112417 - 42 - 265 - 11993 + 51 + 85 + 6783 @@ -29170,57 +29072,57 @@ 1 2 - 6496 + 16474 2 3 - 2623 + 6783 3 - 8 - 1873 + 5 + 6783 - 9 - 10 - 2873 + 5 + 8 + 3876 10 - 20 - 2373 + 11 + 10660 + + + 11 + 19 + 6783 20 - 27 - 2248 + 32 + 5814 - 27 - 36 - 2373 + 33 + 72 + 6783 - 36 - 50 - 2248 + 77 + 169 + 6783 - 54 - 141 - 2248 + 208 + 899 + 6783 - 150 - 467 - 2248 - - - 480 - 4314 - 2123 + 1226 + 1510 + 3876 @@ -29236,57 +29138,57 @@ 1 2 - 5496 + 16474 2 3 - 3622 + 6783 3 - 9 - 1873 + 5 + 6783 - 9 - 10 - 2873 + 5 + 8 + 3876 10 - 20 - 2248 + 11 + 10660 + + + 11 + 19 + 6783 20 - 28 - 2373 + 32 + 5814 - 28 - 37 - 2498 + 33 + 72 + 6783 - 37 - 56 - 2373 + 77 + 169 + 6783 - 58 - 156 - 2248 + 208 + 899 + 6783 - 163 - 528 - 2248 - - - 547 - 4334 - 1873 + 1226 + 1510 + 3876 @@ -29302,7 +29204,7 @@ 1 2 - 4195557 + 9971231 @@ -29318,12 +29220,7 @@ 1 2 - 4190310 - - - 2 - 3 - 5246 + 9971231 @@ -29333,15 +29230,15 @@ enclosingfunction - 114833 + 598242 child - 114833 + 598242 parent - 71353 + 206924 @@ -29355,7 +29252,7 @@ 1 2 - 114833 + 598242 @@ -29371,22 +29268,22 @@ 1 2 - 49341 + 16481 2 3 - 4634 + 2824 3 4 - 15367 + 185131 4 - 37 - 2010 + 150 + 2487 @@ -29396,27 +29293,27 @@ derivations - 476986 + 695371 derivation - 476986 + 695371 sub - 455246 + 666553 index - 238 + 147 super - 235596 + 211263 location - 35404 + 12464 @@ -29430,7 +29327,7 @@ 1 2 - 476986 + 695371 @@ -29446,7 +29343,7 @@ 1 2 - 476986 + 695371 @@ -29462,7 +29359,7 @@ 1 2 - 476986 + 695371 @@ -29478,7 +29375,7 @@ 1 2 - 476986 + 695371 @@ -29494,12 +29391,12 @@ 1 2 - 438720 + 644817 2 - 9 - 16526 + 35 + 21736 @@ -29515,12 +29412,12 @@ 1 2 - 438720 + 646016 2 - 8 - 16526 + 35 + 20536 @@ -29536,12 +29433,12 @@ 1 2 - 438720 + 644812 2 - 9 - 16526 + 35 + 21740 @@ -29557,12 +29454,12 @@ 1 2 - 438720 + 647493 2 8 - 16526 + 19060 @@ -29576,101 +29473,131 @@ 12 - 25 - 26 - 102 + 10 + 11 + 17 - 26 - 27 - 34 + 14 + 15 + 25 - 52 - 53 - 34 + 18 + 19 + 25 - 485 - 486 - 34 - - - 13360 - 13361 - 34 - - - - - - - index - sub - - - 12 - - - 25 - 26 - 136 - - - 52 - 53 - 34 - - - 485 - 486 - 34 - - - 13360 - 13361 - 34 - - - - - - - index - super - - - 12 - - - 23 - 24 - 34 - - - 24 - 25 - 34 + 22 + 23 + 21 25 26 - 68 + 21 32 - 33 - 34 + 85 + 12 - 289 - 290 - 34 + 116 + 705 + 12 - 6510 - 6511 - 34 + 4743 + 154186 + 8 + + + + + + + index + sub + + + 12 + + + 10 + 11 + 17 + + + 14 + 15 + 25 + + + 18 + 19 + 25 + + + 22 + 23 + 21 + + + 25 + 26 + 21 + + + 32 + 85 + 12 + + + 116 + 705 + 12 + + + 4742 + 153909 + 8 + + + + + + + index + super + + + 12 + + + 4 + 5 + 60 + + + 6 + 7 + 51 + + + 9 + 41 + 12 + + + 54 + 514 + 12 + + + 4029 + 43924 + 8 @@ -29686,22 +29613,22 @@ 1 2 - 136 + 116 - 7 - 8 - 34 + 2 + 3 + 12 - 65 - 66 - 34 + 4 + 123 + 12 - 963 - 964 - 34 + 2731 + 2732 + 4 @@ -29717,12 +29644,12 @@ 1 2 - 225783 + 205222 2 - 1655 - 9813 + 22247 + 6041 @@ -29738,12 +29665,12 @@ 1 2 - 225783 + 205222 2 - 1655 - 9813 + 22247 + 6041 @@ -29759,12 +29686,12 @@ 1 2 - 235153 + 211202 2 4 - 442 + 60 @@ -29780,12 +29707,12 @@ 1 2 - 230247 + 209622 2 - 81 - 5349 + 150 + 1641 @@ -29801,27 +29728,27 @@ 1 2 - 26510 + 8375 2 - 5 - 3134 + 3 + 1541 - 5 - 22 - 2760 + 3 + 6 + 1009 - 22 - 383 - 2691 + 6 + 67 + 935 - 388 - 928 - 306 + 71 + 17944 + 601 @@ -29837,27 +29764,27 @@ 1 2 - 26510 + 8947 2 - 5 - 3134 + 3 + 1052 - 5 - 22 - 2760 + 3 + 6 + 948 - 22 - 383 - 2691 + 6 + 74 + 935 - 388 - 928 - 306 + 75 + 17944 + 580 @@ -29873,7 +29800,12 @@ 1 2 - 35404 + 12451 + + + 3 + 35 + 12 @@ -29889,22 +29821,22 @@ 1 2 - 28725 + 9055 2 - 4 - 2623 + 3 + 1658 - 4 - 26 - 2828 + 3 + 7 + 952 - 26 - 928 - 1226 + 7 + 6412 + 796 @@ -29914,15 +29846,15 @@ derspecifiers - 478758 + 695037 der_id - 476543 + 694972 spec_id - 136 + 17 @@ -29936,12 +29868,12 @@ 1 2 - 474328 + 694907 2 3 - 2214 + 64 @@ -29955,24 +29887,24 @@ 12 - 65 - 66 - 34 + 15 + 16 + 4 - 92 - 93 - 34 + 76 + 77 + 4 - 1104 - 1105 - 34 + 12310 + 12311 + 4 - 12789 - 12790 - 34 + 148084 + 148085 + 4 @@ -29982,15 +29914,15 @@ direct_base_offsets - 450067 + 686536 der_id - 450067 + 686536 offset - 511 + 285 @@ -30004,7 +29936,7 @@ 1 2 - 450067 + 686536 @@ -30019,43 +29951,48 @@ 1 - 2 - 102 - - - 2 - 3 - 136 - - - 3 4 - 102 + 25 - 4 - 5 - 34 + 5 + 6 + 112 - 7 - 8 - 34 - - - 9 + 6 10 - 34 + 21 - 110 - 111 - 34 + 10 + 12 + 12 - 13058 - 13059 - 34 + 13 + 15 + 25 + + + 17 + 21 + 21 + + + 21 + 35 + 21 + + + 45 + 79 + 21 + + + 106 + 155547 + 21 @@ -30065,11 +30002,11 @@ virtual_base_offsets - 5826 + 5825 sub - 5826 + 5825 super @@ -30091,7 +30028,7 @@ 1 2 - 5826 + 5825 @@ -30107,7 +30044,7 @@ 1 2 - 5826 + 5825 @@ -30201,23 +30138,23 @@ frienddecls - 700589 + 11664613 id - 700589 + 11664613 type_id - 42423 + 29008 decl_id - 77759 + 62923 location - 6099 + 3018 @@ -30231,7 +30168,7 @@ 1 2 - 700589 + 11664613 @@ -30247,7 +30184,7 @@ 1 2 - 700589 + 11664613 @@ -30263,7 +30200,7 @@ 1 2 - 700589 + 11664613 @@ -30279,47 +30216,67 @@ 1 2 - 6167 + 3685 2 - 3 - 13970 + 8 + 2178 - 3 - 7 - 3577 + 8 + 22 + 2351 - 7 - 12 - 3441 + 22 + 41 + 2239 - 12 - 20 - 3646 + 41 + 69 + 2178 - 20 - 32 - 3305 + 69 + 99 + 2178 - 33 - 50 - 3782 + 99 + 162 + 2178 - 50 - 80 - 3782 + 163 + 232 + 2260 - 101 - 120 - 749 + 232 + 324 + 2252 + + + 327 + 1235 + 2602 + + + 1359 + 1360 + 524 + + + 1458 + 1459 + 2906 + + + 1801 + 1802 + 1472 @@ -30335,47 +30292,67 @@ 1 2 - 6167 + 3685 2 - 3 - 13970 + 8 + 2178 - 3 - 7 - 3577 + 8 + 22 + 2351 - 7 - 12 - 3441 + 22 + 41 + 2239 - 12 - 20 - 3646 + 41 + 69 + 2178 - 20 - 32 - 3305 + 69 + 99 + 2178 - 33 - 50 - 3782 + 99 + 162 + 2178 - 50 - 80 - 3782 + 163 + 232 + 2260 - 101 - 120 - 749 + 232 + 324 + 2252 + + + 327 + 1235 + 2602 + + + 1359 + 1360 + 524 + + + 1458 + 1459 + 2906 + + + 1801 + 1802 + 1472 @@ -30391,115 +30368,165 @@ 1 2 - 41060 + 28289 + + + 2 + 25 + 718 + + + + + + + decl_id + id + + + 12 + + + 1 + 2 + 17353 + + + 2 + 3 + 5881 + + + 3 + 8 + 4235 + + + 8 + 15 + 4685 + + + 15 + 27 + 4798 + + + 27 + 53 + 4906 + + + 53 + 97 + 4724 + + + 97 + 201 + 5556 + + + 201 + 951 + 5413 + + + 989 + 1546 + 4772 + + + 1643 + 3098 + 593 + + + + + + + decl_id + type_id + + + 12 + + + 1 + 2 + 17353 + + + 2 + 3 + 5881 + + + 3 + 8 + 4235 + + + 8 + 15 + 4685 + + + 15 + 27 + 4798 + + + 27 + 53 + 4906 + + + 53 + 97 + 4724 + + + 97 + 201 + 5556 + + + 201 + 951 + 5413 + + + 989 + 1546 + 4772 + + + 1643 + 3098 + 593 + + + + + + + decl_id + location + + + 12 + + + 1 + 2 + 62715 2 13 - 1363 - - - - - - - decl_id - id - - - 12 - - - 1 - 2 - 47875 - - - 2 - 3 - 6065 - - - 3 - 8 - 5997 - - - 8 - 15 - 6065 - - - 15 - 40 - 6065 - - - 40 - 164 - 5690 - - - - - - - decl_id - type_id - - - 12 - - - 1 - 2 - 47875 - - - 2 - 3 - 6065 - - - 3 - 8 - 5997 - - - 8 - 15 - 6065 - - - 15 - 40 - 6065 - - - 40 - 164 - 5690 - - - - - - - decl_id - location - - - 12 - - - 1 - 2 - 77078 - - - 2 - 5 - 681 + 207 @@ -30515,12 +30542,12 @@ 1 2 - 5724 + 2962 2 - 20371 - 374 + 2692665 + 56 @@ -30536,12 +30563,12 @@ 1 2 - 5963 + 2979 2 - 1148 - 136 + 6384 + 38 @@ -30557,12 +30584,12 @@ 1 2 - 5758 + 2975 2 - 2129 - 340 + 13899 + 43 @@ -30572,19 +30599,19 @@ comments - 11220843 + 68615333 id - 11220843 + 68615333 contents - 4291377 + 24650428 location - 11220843 + 68615333 @@ -30598,7 +30625,7 @@ 1 2 - 11220843 + 68615333 @@ -30614,7 +30641,7 @@ 1 2 - 11220843 + 68615333 @@ -30630,17 +30657,12 @@ 1 2 - 3917344 + 23345029 2 - 6 - 321937 - - - 6 - 34359 - 52094 + 32735 + 1305398 @@ -30656,17 +30678,12 @@ 1 2 - 3917344 + 23345029 2 - 6 - 321937 - - - 6 - 34359 - 52094 + 32735 + 1305398 @@ -30682,7 +30699,7 @@ 1 2 - 11220843 + 68615333 @@ -30698,7 +30715,7 @@ 1 2 - 11220843 + 68615333 @@ -30708,15 +30725,15 @@ commentbinding - 3838390 + 17753231 id - 3351549 + 17596234 element - 3672362 + 17312283 @@ -30730,12 +30747,12 @@ 1 2 - 3295331 + 17481878 2 - 1706 - 56217 + 12 + 114355 @@ -30751,12 +30768,12 @@ 1 2 - 3506333 + 16871336 2 3 - 166028 + 440947 @@ -30770,7 +30787,7 @@ converted - 9632983 + 9632984 conversion @@ -30819,22 +30836,22 @@ compgenerated - 9891516 + 10972612 id - 9891516 + 10972612 synthetic_destructor_call - 1671589 + 1671706 element - 1244881 + 1244969 i @@ -30842,7 +30859,7 @@ destructor_call - 1671589 + 1671706 @@ -30856,17 +30873,17 @@ 1 2 - 828630 + 828688 2 3 - 409452 + 409481 3 19 - 6798 + 6799 @@ -30882,17 +30899,17 @@ 1 2 - 828630 + 828688 2 3 - 409452 + 409481 3 19 - 6798 + 6799 @@ -31040,7 +31057,7 @@ 1 2 - 1671589 + 1671706 @@ -31056,7 +31073,7 @@ 1 2 - 1671589 + 1671706 @@ -31066,15 +31083,15 @@ namespaces - 9901 + 55509 id - 9901 + 55509 name - 5234 + 55507 @@ -31088,7 +31105,7 @@ 1 2 - 9901 + 55509 @@ -31104,17 +31121,12 @@ 1 2 - 4279 + 55504 2 3 - 604 - - - 3 - 149 - 350 + 2 @@ -31135,15 +31147,15 @@ namespacembrs - 2042061 + 2462439 parentid - 3997 + 1394 memberid - 2042061 + 2462439 @@ -31157,67 +31169,67 @@ 1 2 - 499 + 216 2 3 - 249 + 90 3 4 - 499 + 64 4 5 - 624 + 95 5 - 10 - 249 + 6 + 77 - 10 + 6 + 8 + 121 + + + 8 12 - 249 + 116 12 - 18 - 249 + 19 + 108 19 - 21 - 249 + 30 + 108 - 23 - 24 - 249 + 30 + 56 + 112 - 25 - 29 - 249 + 56 + 125 + 108 - 70 - 83 - 249 + 128 + 834 + 108 - 165 - 170 - 249 - - - 15618 - 15619 - 124 + 847 + 487928 + 64 @@ -31233,7 +31245,7 @@ 1 2 - 2042061 + 2462439 @@ -31243,19 +31255,19 @@ exprparents - 19454216 + 20747887 expr_id - 19454216 + 20747887 child_index - 20035 + 1019 parent_id - 12939987 + 12416400 @@ -31269,7 +31281,7 @@ 1 2 - 19454216 + 20747887 @@ -31285,7 +31297,7 @@ 1 2 - 19454216 + 20747887 @@ -31301,42 +31313,32 @@ 1 2 - 3855 - - - 2 - 3 - 1519 + 636 3 - 4 - 365 + 18 + 16 - 4 - 5 - 8976 + 21 + 22 + 168 - 5 - 8 - 1660 + 23 + 78 + 90 - 8 - 11 - 1632 + 79 + 435 + 78 - 11 - 53 - 1519 - - - 56 - 354800 - 506 + 2109 + 2179878 + 28 @@ -31352,42 +31354,32 @@ 1 2 - 3855 - - - 2 - 3 - 1519 + 636 3 - 4 - 365 + 18 + 16 - 4 - 5 - 8976 + 21 + 22 + 168 - 5 - 8 - 1660 + 23 + 78 + 90 - 8 - 11 - 1632 + 79 + 435 + 78 - 11 - 53 - 1519 - - - 56 - 354800 - 506 + 2109 + 2179878 + 28 @@ -31403,17 +31395,17 @@ 1 2 - 7394757 + 4275389 2 3 - 5082680 + 8013574 3 - 712 - 462550 + 181 + 127436 @@ -31429,17 +31421,17 @@ 1 2 - 7394757 + 4275389 2 3 - 5082680 + 8013574 3 - 712 - 462550 + 181 + 127436 @@ -31449,22 +31441,22 @@ expr_isload - 6853135 + 10252631 expr_id - 6853135 + 10252631 conversionkinds - 6050434 + 6050433 expr_id - 6050434 + 6050433 kind @@ -31482,7 +31474,7 @@ 1 2 - 6050434 + 6050433 @@ -31526,8 +31518,8 @@ 1 - 5831535 - 5831536 + 5831534 + 5831535 1 @@ -31538,11 +31530,11 @@ iscall - 5802435 + 5802826 caller - 5802435 + 5802826 kind @@ -31560,7 +31552,7 @@ 1 2 - 5802435 + 5802826 @@ -31596,15 +31588,15 @@ numtemplatearguments - 625760 + 1668466 expr_id - 625760 + 1668466 num - 374 + 45 @@ -31618,7 +31610,7 @@ 1 2 - 625760 + 1668466 @@ -31632,19 +31624,39 @@ 12 - 7 - 8 - 124 + 5 + 6 + 6 - 1264 - 1265 - 124 + 145 + 146 + 6 - 3738 - 3739 - 124 + 475 + 476 + 6 + + + 1189 + 1190 + 6 + + + 29101 + 29102 + 6 + + + 75364 + 75365 + 6 + + + 151258 + 151259 + 6 @@ -31654,15 +31666,15 @@ specialnamequalifyingelements - 124 + 969 id - 124 + 969 name - 124 + 969 @@ -31676,7 +31688,7 @@ 1 2 - 124 + 969 @@ -31692,7 +31704,7 @@ 1 2 - 124 + 969 @@ -31702,23 +31714,23 @@ namequalifiers - 3041775 + 3041980 id - 3041775 + 3041980 qualifiableelement - 3041775 + 3041980 qualifyingelement - 47483 + 47486 location - 552420 + 552457 @@ -31732,7 +31744,7 @@ 1 2 - 3041775 + 3041980 @@ -31748,7 +31760,7 @@ 1 2 - 3041775 + 3041980 @@ -31764,7 +31776,7 @@ 1 2 - 3041775 + 3041980 @@ -31780,7 +31792,7 @@ 1 2 - 3041775 + 3041980 @@ -31796,7 +31808,7 @@ 1 2 - 3041775 + 3041980 @@ -31812,7 +31824,7 @@ 1 2 - 3041775 + 3041980 @@ -31828,12 +31840,12 @@ 1 2 - 31541 + 31543 2 3 - 8175 + 8176 3 @@ -31864,12 +31876,12 @@ 1 2 - 31541 + 31543 2 3 - 8175 + 8176 3 @@ -31900,7 +31912,7 @@ 1 2 - 34402 + 34404 2 @@ -31931,22 +31943,22 @@ 1 2 - 79132 + 79137 2 6 - 38103 + 38105 6 7 - 398974 + 399001 7 192 - 36209 + 36212 @@ -31962,22 +31974,22 @@ 1 2 - 79132 + 79137 2 6 - 38103 + 38105 6 7 - 398974 + 399001 7 192 - 36209 + 36212 @@ -31993,22 +32005,22 @@ 1 2 - 111533 + 111541 2 4 - 13296 + 13297 4 5 - 415283 + 415311 5 33 - 12306 + 12307 @@ -32018,15 +32030,15 @@ varbind - 8254631 + 9157418 expr - 8254631 + 9157418 var - 1050376 + 4030270 @@ -32040,7 +32052,7 @@ 1 2 - 8254631 + 9157418 @@ -32056,52 +32068,27 @@ 1 2 - 171535 + 3040075 2 3 - 188700 + 292640 3 - 4 - 145647 - - - 4 5 - 116636 + 319355 5 - 6 - 83151 + 15 + 309228 - 6 - 7 - 65817 - - - 7 - 9 - 80815 - - - 9 - 13 - 81575 - - - 13 - 27 - 79127 - - - 27 - 5137 - 37368 + 15 + 260 + 68969 @@ -32111,15 +32098,15 @@ funbind - 5812138 + 5812545 expr - 5809664 + 5810071 fun - 275930 + 275949 @@ -32133,7 +32120,7 @@ 1 2 - 5807189 + 5807596 2 @@ -32154,27 +32141,27 @@ 1 2 - 181436 + 181449 2 3 - 38834 + 38837 3 4 - 17190 + 17191 4 8 - 22741 + 22742 8 37798 - 15727 + 15728 @@ -32184,19 +32171,19 @@ expr_allocator - 45252 + 93972 expr - 45252 + 93972 func - 102 + 27 form - 34 + 4 @@ -32210,7 +32197,7 @@ 1 2 - 45252 + 93972 @@ -32226,7 +32213,7 @@ 1 2 - 45252 + 93972 @@ -32242,17 +32229,42 @@ 1 2 - 34 + 9 - 591 - 592 - 34 + 2 + 3 + 2 - 736 - 737 - 34 + 4 + 5 + 2 + + + 18 + 19 + 2 + + + 20 + 21 + 2 + + + 27 + 28 + 2 + + + 17597 + 17598 + 2 + + + 20513 + 20514 + 2 @@ -32268,7 +32280,7 @@ 1 2 - 102 + 27 @@ -32282,9 +32294,14 @@ 12 - 1328 - 1329 - 34 + 20 + 21 + 2 + + + 38165 + 38166 + 2 @@ -32298,9 +32315,14 @@ 12 - 3 - 4 - 34 + 1 + 2 + 2 + + + 10 + 11 + 2 @@ -32310,19 +32332,19 @@ expr_deallocator - 53839 + 95453 expr - 53839 + 95453 func - 102 + 22 form - 68 + 7 @@ -32336,7 +32358,7 @@ 1 2 - 53839 + 95453 @@ -32352,7 +32374,7 @@ 1 2 - 53839 + 95453 @@ -32366,19 +32388,39 @@ 12 - 1 - 2 - 34 + 2 + 3 + 4 - 723 - 724 - 34 + 4 + 5 + 2 - 856 - 857 - 34 + 7 + 8 + 2 + + + 16 + 17 + 2 + + + 24 + 25 + 4 + + + 18284 + 18285 + 2 + + + 20424 + 20425 + 2 @@ -32394,7 +32436,7 @@ 1 2 - 102 + 22 @@ -32408,14 +32450,19 @@ 12 - 723 - 724 - 34 + 24 + 25 + 2 - 857 - 858 - 34 + 18308 + 18309 + 2 + + + 20455 + 20456 + 2 @@ -32431,12 +32478,17 @@ 1 2 - 34 + 2 2 3 - 34 + 2 + + + 6 + 7 + 2 @@ -32446,11 +32498,11 @@ expr_cond_two_operand - 653 + 2693 cond - 653 + 2693 @@ -32601,15 +32653,15 @@ values - 13474605 + 14027056 id - 13474605 + 14027056 str - 114566 + 71353 @@ -32623,7 +32675,7 @@ 1 2 - 13474605 + 14027056 @@ -32639,27 +32691,57 @@ 1 2 - 78302 + 10046 2 3 - 15301 + 21277 3 - 6 - 8895 + 4 + 2369 - 6 - 52 - 8628 + 4 + 5 + 5461 - 52 - 674264 - 3437 + 5 + 8 + 2369 + + + 8 + 10 + 5821 + + + 10 + 17 + 5512 + + + 17 + 39 + 5357 + + + 40 + 101 + 5409 + + + 102 + 528 + 5357 + + + 528 + 58022 + 2369 @@ -32669,15 +32751,15 @@ valuetext - 6647456 + 8820484 id - 6647456 + 8820484 text - 1095412 + 1822799 @@ -32691,7 +32773,7 @@ 1 2 - 6647456 + 8820484 @@ -32707,22 +32789,22 @@ 1 2 - 833985 + 539748 2 3 - 146940 + 1068990 3 7 - 86537 + 148397 7 - 593555 - 27950 + 2999 + 65662 @@ -32732,15 +32814,15 @@ valuebind - 13583188 + 14473467 val - 13474605 + 14027056 expr - 13583188 + 14473467 @@ -32754,12 +32836,12 @@ 1 2 - 13384050 + 13580696 2 - 6 - 90554 + 4 + 446359 @@ -32775,7 +32857,7 @@ 1 2 - 13583188 + 14473467 @@ -32785,19 +32867,19 @@ fieldoffsets - 1493401 + 6231414 id - 1493401 + 6231414 byteoffset - 31376 + 189946 bitoffset - 435 + 7752 @@ -32811,7 +32893,7 @@ 1 2 - 1493401 + 6231414 @@ -32827,7 +32909,7 @@ 1 2 - 1493401 + 6231414 @@ -32843,37 +32925,47 @@ 1 2 - 17704 + 70745 2 3 - 2451 + 23258 3 5 - 2669 + 13567 5 - 12 - 2614 + 7 + 12598 - 12 - 34 - 2396 + 7 + 9 + 14536 - 34 - 198 - 2396 + 9 + 15 + 14536 - 209 - 5931 - 1143 + 15 + 32 + 14536 + + + 33 + 95 + 14536 + + + 122 + 1637 + 11629 @@ -32889,12 +32981,12 @@ 1 2 - 30396 + 177348 - 2 + 3 9 - 980 + 12598 @@ -32908,44 +33000,44 @@ 12 - 35 - 36 - 54 + 18 + 19 + 969 - 36 - 37 - 54 + 19 + 20 + 969 + + + 26 + 27 + 969 + + + 29 + 30 + 969 + + + 33 + 34 + 969 43 44 - 54 + 969 - 46 - 47 - 54 + 53 + 54 + 969 - 50 - 51 - 54 - - - 63 - 64 - 54 - - - 79 - 80 - 54 - - - 27063 - 27064 - 54 + 6209 + 6210 + 969 @@ -32959,24 +33051,29 @@ 12 - 12 - 13 - 163 + 7 + 8 + 969 - 13 - 14 - 108 + 8 + 9 + 969 - 14 - 15 - 108 + 9 + 10 + 3876 - 576 - 577 - 54 + 10 + 11 + 969 + + + 196 + 197 + 969 @@ -32986,19 +33083,19 @@ bitfield - 30357 + 313993 id - 30357 + 313993 bits - 3497 + 30042 declared_bits - 3497 + 30042 @@ -33012,7 +33109,7 @@ 1 2 - 30357 + 313993 @@ -33028,7 +33125,7 @@ 1 2 - 30357 + 313993 @@ -33044,42 +33141,47 @@ 1 2 - 999 + 7752 2 3 - 749 + 4845 3 4 - 249 + 4845 4 5 - 499 + 2907 5 - 7 - 249 + 6 + 2907 - 8 - 9 - 249 + 7 + 10 + 1938 - 9 - 11 - 249 + 10 + 13 + 1938 13 - 143 - 249 + 15 + 1938 + + + 199 + 200 + 969 @@ -33095,7 +33197,7 @@ 1 2 - 3497 + 30042 @@ -33111,42 +33213,47 @@ 1 2 - 999 + 7752 2 3 - 749 + 4845 3 4 - 249 + 4845 4 5 - 499 + 2907 5 - 7 - 249 + 6 + 2907 - 8 - 9 - 249 + 7 + 10 + 1938 - 9 - 11 - 249 + 10 + 13 + 1938 13 - 143 - 249 + 15 + 1938 + + + 199 + 200 + 969 @@ -33162,7 +33269,7 @@ 1 2 - 3497 + 30042 @@ -33172,23 +33279,23 @@ initialisers - 2340631 + 5596945 init - 2340631 + 5596945 var - 991152 + 925953 expr - 2340631 + 5596945 location - 539242 + 578154 @@ -33202,7 +33309,7 @@ 1 2 - 2340631 + 5596945 @@ -33218,7 +33325,7 @@ 1 2 - 2340631 + 5596945 @@ -33234,7 +33341,7 @@ 1 2 - 2340631 + 5596945 @@ -33250,17 +33357,27 @@ 1 2 - 874093 + 677373 2 - 15 - 39500 + 3 + 87171 - 16 - 25 - 77558 + 3 + 7 + 72737 + + + 7 + 67 + 70850 + + + 67 + 187 + 17821 @@ -33276,17 +33393,27 @@ 1 2 - 874093 + 677373 2 - 15 - 39500 + 3 + 87171 - 16 - 25 - 77558 + 3 + 7 + 72737 + + + 7 + 67 + 70850 + + + 67 + 187 + 17821 @@ -33302,12 +33429,7 @@ 1 2 - 991143 - - - 2 - 3 - 8 + 925953 @@ -33323,7 +33445,7 @@ 1 2 - 2340631 + 5596945 @@ -33339,7 +33461,7 @@ 1 2 - 2340631 + 5596945 @@ -33355,7 +33477,7 @@ 1 2 - 2340631 + 5596945 @@ -33371,22 +33493,22 @@ 1 2 - 439287 + 422455 2 3 - 33068 + 74962 3 - 15 - 42211 + 6 + 44593 - 15 - 111796 - 24675 + 6 + 113308 + 36142 @@ -33402,17 +33524,12 @@ 1 2 - 470421 + 545705 2 - 4 - 49610 - - - 4 - 12163 - 19210 + 10124 + 32449 @@ -33428,22 +33545,22 @@ 1 2 - 439287 + 422455 2 3 - 33068 + 74962 3 - 15 - 42211 + 6 + 44593 - 15 - 111796 - 24675 + 6 + 113308 + 36142 @@ -33453,26 +33570,26 @@ braced_initialisers - 68469 + 200252 init - 68469 + 200252 expr_ancestor - 1677570 + 1677688 exp - 1677570 + 1677688 ancestor - 839603 + 839661 @@ -33486,7 +33603,7 @@ 1 2 - 1677570 + 1677688 @@ -33502,12 +33619,12 @@ 1 2 - 17082 + 17084 2 3 - 812451 + 812507 3 @@ -33522,11 +33639,11 @@ exprs - 25210575 + 25210577 id - 25210575 + 25210577 kind @@ -33534,7 +33651,7 @@ location - 10582670 + 10582671 @@ -33548,7 +33665,7 @@ 1 2 - 25210575 + 25210577 @@ -33564,7 +33681,7 @@ 1 2 - 25210575 + 25210577 @@ -33793,15 +33910,15 @@ expr_reuse - 846982 + 847042 reuse - 846982 + 847042 original - 846982 + 847042 value_category @@ -33819,7 +33936,7 @@ 1 2 - 846982 + 847042 @@ -33835,7 +33952,7 @@ 1 2 - 846982 + 847042 @@ -33851,7 +33968,7 @@ 1 2 - 846982 + 847042 @@ -33867,7 +33984,7 @@ 1 2 - 846982 + 847042 @@ -33919,19 +34036,19 @@ expr_types - 25210575 + 25238252 id - 25210575 + 25101637 typeid - 214202 + 1150532 value_category - 43 + 10 @@ -33945,7 +34062,12 @@ 1 2 - 25210575 + 24970947 + + + 2 + 6 + 130690 @@ -33961,7 +34083,7 @@ 1 2 - 25210575 + 25101637 @@ -33977,52 +34099,42 @@ 1 2 - 52512 + 397286 2 3 - 35191 + 223539 3 4 - 14507 + 97511 4 5 - 14529 + 90049 5 - 8 - 17562 + 7 + 94946 - 8 - 14 - 17386 + 7 + 11 + 98239 - 14 - 24 - 16441 + 11 + 27 + 87166 - 24 - 49 - 16067 - - - 49 - 134 - 16177 - - - 134 - 441505 - 13825 + 27 + 1473219 + 61793 @@ -34038,12 +34150,17 @@ 1 2 - 185913 + 1025250 2 3 - 28289 + 115140 + + + 3 + 4 + 10141 @@ -34057,14 +34174,19 @@ 12 - 153745 - 153746 - 21 + 32407 + 32408 + 3 - 993192 - 993193 - 21 + 1319763 + 1319764 + 3 + + + 5516607 + 5516608 + 3 @@ -34078,14 +34200,19 @@ 12 - 2282 - 2283 - 21 + 8837 + 8838 + 3 - 8750 - 8751 - 21 + 79160 + 79161 + 3 + + + 263890 + 263891 + 3 @@ -34106,15 +34233,15 @@ new_allocated_type - 46206 + 94223 expr - 46206 + 94223 type_id - 27396 + 42727 @@ -34128,7 +34255,7 @@ 1 2 - 46206 + 94223 @@ -34144,17 +34271,17 @@ 1 2 - 11517 + 38846 2 - 3 - 14482 + 4 + 3497 - 3 - 19 - 1397 + 4 + 1699 + 383 @@ -34164,15 +34291,15 @@ new_array_allocated_type - 6933 + 44190 expr - 6933 + 44190 type_id - 2978 + 52 @@ -34186,7 +34313,7 @@ 1 2 - 6933 + 44190 @@ -34200,24 +34327,59 @@ 12 - 1 - 2 - 43 + 10 + 101 + 4 - 2 - 3 - 2633 + 144 + 145 + 6 - 3 - 5 - 224 + 184 + 185 + 6 - 6 - 15 - 77 + 240 + 241 + 4 + + + 325 + 326 + 4 + + + 528 + 529 + 4 + + + 875 + 912 + 4 + + + 1011 + 1012 + 2 + + + 1206 + 1207 + 6 + + + 1234 + 1583 + 4 + + + 3807 + 3808 + 4 @@ -35563,15 +35725,15 @@ condition_decl_bind - 408893 + 408922 expr - 408893 + 408922 decl - 408893 + 408922 @@ -35585,7 +35747,7 @@ 1 2 - 408893 + 408922 @@ -35601,7 +35763,7 @@ 1 2 - 408893 + 408922 @@ -35611,15 +35773,15 @@ typeid_bind - 47909 + 229949 expr - 47909 + 229949 type_id - 15947 + 10754 @@ -35633,7 +35795,7 @@ 1 2 - 47909 + 229949 @@ -35649,17 +35811,37 @@ 1 2 - 2964 + 855 2 3 - 12573 + 4120 3 - 328 - 408 + 4 + 25 + + + 4 + 5 + 2248 + + + 5 + 48 + 511 + + + 65 + 66 + 2520 + + + 68 + 663 + 472 @@ -35669,15 +35851,15 @@ uuidof_bind - 28060 + 26588 expr - 28060 + 26588 type_id - 27792 + 26336 @@ -35691,7 +35873,7 @@ 1 2 - 28060 + 26588 @@ -35707,12 +35889,12 @@ 1 2 - 27568 + 26125 2 4 - 224 + 211 @@ -35722,15 +35904,15 @@ sizeof_bind - 242027 + 393239 expr - 242027 + 393239 type_id - 11210 + 252091 @@ -35744,7 +35926,7 @@ 1 2 - 242027 + 393239 @@ -35760,42 +35942,17 @@ 1 2 - 3877 + 174174 2 3 - 2783 + 67079 3 - 4 - 1024 - - - 4 - 5 - 1140 - - - 5 - 6 - 295 - - - 6 - 7 - 1064 - - - 7 - 40 - 856 - - - 40 - 6061 - 167 + 1862 + 10837 @@ -35853,23 +36010,23 @@ lambdas - 16482 + 23413 expr - 16482 + 23413 default_capture - 25 + 19 has_explicit_return_type - 17 + 12 has_explicit_parameter_list - 17 + 12 @@ -35883,7 +36040,7 @@ 1 2 - 16482 + 23413 @@ -35899,7 +36056,7 @@ 1 2 - 16482 + 23413 @@ -35915,7 +36072,7 @@ 1 2 - 16482 + 23413 @@ -35929,19 +36086,19 @@ 12 - 276 - 277 - 8 + 14 + 15 + 6 - 697 - 698 - 8 + 436 + 437 + 6 - 936 - 937 - 8 + 3164 + 3165 + 6 @@ -35957,7 +36114,7 @@ 2 3 - 25 + 19 @@ -35970,10 +36127,15 @@ 12 + + 1 + 2 + 6 + 2 3 - 25 + 12 @@ -35987,14 +36149,14 @@ 12 - 813 - 814 - 8 + 70 + 71 + 6 - 1096 - 1097 - 8 + 3544 + 3545 + 6 @@ -36010,7 +36172,7 @@ 3 4 - 17 + 12 @@ -36026,12 +36188,12 @@ 1 2 - 8 + 6 2 3 - 8 + 6 @@ -36045,14 +36207,14 @@ 12 - 34 - 35 - 8 + 766 + 767 + 6 - 1875 - 1876 - 8 + 2848 + 2849 + 6 @@ -36065,10 +36227,15 @@ 12 + + 2 + 3 + 6 + 3 4 - 17 + 6 @@ -36084,12 +36251,12 @@ 1 2 - 8 + 6 2 3 - 8 + 6 @@ -36099,35 +36266,35 @@ lambda_capture - 28526 + 31966 id - 28526 + 31966 lambda - 13296 + 15491 index - 146 + 138 field - 28526 + 31966 captured_by_reference - 17 + 16 is_implicit - 17 + 16 location - 18398 + 17944 @@ -36141,7 +36308,7 @@ 1 2 - 28526 + 31966 @@ -36157,7 +36324,7 @@ 1 2 - 28526 + 31966 @@ -36173,7 +36340,7 @@ 1 2 - 28526 + 31966 @@ -36189,7 +36356,7 @@ 1 2 - 28526 + 31966 @@ -36205,7 +36372,7 @@ 1 2 - 28526 + 31966 @@ -36221,7 +36388,7 @@ 1 2 - 28526 + 31966 @@ -36237,27 +36404,27 @@ 1 2 - 6674 + 8212 2 3 - 3082 + 3541 3 4 - 1614 + 1657 4 6 - 1226 + 1259 6 18 - 699 + 820 @@ -36273,27 +36440,27 @@ 1 2 - 6674 + 8212 2 3 - 3082 + 3541 3 4 - 1614 + 1657 4 6 - 1226 + 1259 6 18 - 699 + 820 @@ -36309,27 +36476,27 @@ 1 2 - 6674 + 8212 2 3 - 3082 + 3541 3 4 - 1614 + 1657 4 6 - 1226 + 1259 6 18 - 699 + 820 @@ -36345,12 +36512,12 @@ 1 2 - 12726 + 14248 2 3 - 569 + 1242 @@ -36366,12 +36533,12 @@ 1 2 - 13270 + 15369 2 3 - 25 + 121 @@ -36387,27 +36554,27 @@ 1 2 - 7304 + 8805 2 3 - 3246 + 3696 3 4 - 1329 + 1389 4 7 - 1087 + 1291 7 18 - 328 + 308 @@ -36476,33 +36643,33 @@ 8 - 81 - 82 + 101 + 102 8 - 139 - 140 + 171 + 172 8 - 223 - 224 + 256 + 257 8 - 410 - 411 + 460 + 461 8 - 767 - 768 + 896 + 897 8 - 1540 - 1541 + 1907 + 1908 8 @@ -36572,33 +36739,33 @@ 8 - 81 - 82 + 101 + 102 8 - 139 - 140 + 171 + 172 8 - 223 - 224 + 256 + 257 8 - 410 - 411 + 460 + 461 8 - 767 - 768 + 896 + 897 8 - 1540 - 1541 + 1907 + 1908 8 @@ -36668,33 +36835,33 @@ 8 - 81 - 82 + 101 + 102 8 - 139 - 140 + 171 + 172 8 - 223 - 224 + 256 + 257 8 - 410 - 411 + 460 + 461 8 - 767 - 768 + 896 + 897 8 - 1540 - 1541 + 1907 + 1908 8 @@ -36711,12 +36878,12 @@ 1 2 - 34 + 32 2 3 - 112 + 105 @@ -36732,12 +36899,12 @@ 1 2 - 86 + 81 2 3 - 60 + 56 @@ -36806,33 +36973,33 @@ 8 - 65 - 66 + 66 + 67 8 - 98 - 99 + 100 + 101 8 - 179 - 180 + 182 + 183 8 - 347 - 348 + 354 + 355 8 - 585 - 586 + 604 + 605 8 - 933 - 934 + 979 + 980 8 @@ -36849,7 +37016,7 @@ 1 2 - 28526 + 31966 @@ -36865,7 +37032,7 @@ 1 2 - 28526 + 31966 @@ -36881,7 +37048,7 @@ 1 2 - 28526 + 31966 @@ -36897,7 +37064,7 @@ 1 2 - 28526 + 31966 @@ -36913,7 +37080,7 @@ 1 2 - 28526 + 31966 @@ -36929,7 +37096,7 @@ 1 2 - 28526 + 31966 @@ -36943,13 +37110,13 @@ 12 - 1180 - 1181 + 1457 + 1458 8 - 2124 - 2125 + 2478 + 2479 8 @@ -36964,13 +37131,13 @@ 12 - 590 - 591 + 819 + 820 8 - 1016 - 1017 + 1241 + 1242 8 @@ -37006,13 +37173,13 @@ 12 - 1180 - 1181 + 1457 + 1458 8 - 2124 - 2125 + 2478 + 2479 8 @@ -37029,7 +37196,7 @@ 2 3 - 17 + 16 @@ -37043,13 +37210,13 @@ 12 - 545 - 546 + 573 + 574 8 - 1589 - 1590 + 1639 + 1640 8 @@ -37064,13 +37231,13 @@ 12 - 827 - 828 + 1351 + 1352 8 - 2477 - 2478 + 2584 + 2585 8 @@ -37085,13 +37252,13 @@ 12 - 620 - 621 + 955 + 956 8 - 923 - 924 + 967 + 968 8 @@ -37127,13 +37294,13 @@ 12 - 827 - 828 + 1351 + 1352 8 - 2477 - 2478 + 2584 + 2585 8 @@ -37150,7 +37317,7 @@ 2 3 - 17 + 16 @@ -37164,13 +37331,13 @@ 12 - 328 - 329 + 377 + 378 8 - 1803 - 1804 + 1832 + 1833 8 @@ -37187,17 +37354,17 @@ 1 2 - 16568 + 15694 2 6 - 1398 + 1437 6 68 - 431 + 812 @@ -37213,12 +37380,17 @@ 1 2 - 17181 + 16271 2 + 13 + 1470 + + + 13 68 - 1217 + 203 @@ -37234,12 +37406,12 @@ 1 2 - 17665 + 17254 2 8 - 733 + 690 @@ -37255,17 +37427,17 @@ 1 2 - 16568 + 15694 2 6 - 1398 + 1437 6 68 - 431 + 812 @@ -37281,12 +37453,12 @@ 1 2 - 18373 + 17920 2 3 - 25 + 24 @@ -37302,7 +37474,7 @@ 1 2 - 18398 + 17944 @@ -37312,19 +37484,19 @@ fold - 1247 + 2481 expr - 1247 + 2481 operator - 86 + 25 is_left_fold - 21 + 6 @@ -37338,7 +37510,7 @@ 1 2 - 1247 + 2481 @@ -37354,7 +37526,7 @@ 1 2 - 1247 + 2481 @@ -37367,20 +37539,25 @@ 12 - - 1 - 2 - 43 - 2 3 - 21 + 6 - 54 - 55 - 21 + 4 + 5 + 6 + + + 88 + 89 + 6 + + + 289 + 290 + 6 @@ -37396,7 +37573,7 @@ 1 2 - 86 + 25 @@ -37410,9 +37587,9 @@ 12 - 58 - 59 - 21 + 383 + 384 + 6 @@ -37428,7 +37605,7 @@ 4 5 - 21 + 6 @@ -37438,19 +37615,19 @@ stmts - 6259661 + 9250639 id - 6259661 + 9250639 kind - 172 + 37 location - 2755017 + 9188352 @@ -37464,7 +37641,7 @@ 1 2 - 6259661 + 9250639 @@ -37480,7 +37657,7 @@ 1 2 - 6259661 + 9250639 @@ -37494,104 +37671,89 @@ 12 - 1 - 2 - 8 + 54 + 55 + 2 - 26 - 27 - 8 + 329 + 330 + 2 - 418 - 419 - 8 + 446 + 447 + 2 - 546 - 547 - 8 + 5336 + 5337 + 2 - 827 - 828 - 8 + 5518 + 5519 + 2 - 1470 - 1471 - 8 + 8693 + 8694 + 2 - 1577 - 1578 - 8 + 10165 + 10166 + 2 - 1802 - 1803 - 8 + 16790 + 16791 + 2 - 2462 - 2463 - 8 + 17470 + 17471 + 2 - 3217 - 3218 - 8 + 35858 + 35859 + 2 - 3610 - 3611 - 8 + 37397 + 37398 + 2 - 4863 - 4864 - 8 + 108238 + 108239 + 2 - 16249 - 16250 - 8 + 364498 + 364499 + 2 - 16732 - 16733 - 8 + 395010 + 395011 + 2 - 21439 - 21440 - 8 + 649782 + 649783 + 2 - 68795 - 68796 - 8 + 1092734 + 1092735 + 2 - 89075 - 89076 - 8 - - - 112007 - 112008 - 8 - - - 185649 - 185650 - 8 - - - 194240 - 194241 - 8 + 1464604 + 1464605 + 2 @@ -37605,104 +37767,89 @@ 12 - 1 - 2 - 8 + 27 + 28 + 2 - 26 - 27 - 8 + 214 + 215 + 2 - 109 - 110 - 8 + 331 + 332 + 2 - 419 - 420 - 8 + 5336 + 5337 + 2 - 778 - 779 - 8 + 5409 + 5410 + 2 - 1079 - 1080 - 8 + 8693 + 8694 + 2 - 1311 - 1312 - 8 + 9889 + 9890 + 2 - 1347 - 1348 - 8 + 16783 + 16784 + 2 - 1388 - 1389 - 8 + 17470 + 17471 + 2 - 2061 - 2062 - 8 + 35808 + 35809 + 2 - 2309 - 2310 - 8 + 37397 + 37398 + 2 - 2476 - 2477 - 8 + 108238 + 108239 + 2 - 7043 - 7044 - 8 + 358157 + 358158 + 2 - 8622 - 8623 - 8 + 394187 + 394188 + 2 - 11206 - 11207 - 8 + 647908 + 647909 + 2 - 36340 - 36341 - 8 + 1086119 + 1086120 + 2 - 43405 - 43406 - 8 - - - 47752 - 47753 - 8 - - - 83834 - 83835 - 8 - - - 97372 - 97373 - 8 + 1461298 + 1461299 + 2 @@ -37718,17 +37865,12 @@ 1 2 - 2353184 + 9166275 2 - 4 - 239108 - - - 4 - 1581 - 162724 + 217 + 22076 @@ -37744,12 +37886,12 @@ 1 2 - 2668298 + 9169716 2 - 10 - 86719 + 6 + 18635 @@ -37807,15 +37949,15 @@ variable_vla - 30 + 267 var - 30 + 267 decl - 30 + 267 @@ -37829,7 +37971,7 @@ 1 2 - 30 + 267 @@ -37845,7 +37987,7 @@ 1 2 - 30 + 267 @@ -37855,26 +37997,26 @@ type_is_vla - 43 + 523 type_id - 43 + 523 if_initialization - 374 + 1762 if_stmt - 374 + 1762 init_id - 374 + 1762 @@ -37888,7 +38030,7 @@ 1 2 - 374 + 1762 @@ -37904,7 +38046,7 @@ 1 2 - 374 + 1762 @@ -37962,15 +38104,15 @@ if_else - 437078 + 437108 if_stmt - 437078 + 437108 else_id - 437078 + 437108 @@ -37984,7 +38126,7 @@ 1 2 - 437078 + 437108 @@ -38000,7 +38142,7 @@ 1 2 - 437078 + 437108 @@ -38058,15 +38200,15 @@ constexpr_if_then - 103814 + 818798 constexpr_if_stmt - 103814 + 818798 then_id - 103814 + 818798 @@ -38080,7 +38222,7 @@ 1 2 - 103814 + 818798 @@ -38096,7 +38238,7 @@ 1 2 - 103814 + 818798 @@ -38106,15 +38248,15 @@ constexpr_if_else - 73956 + 216571 constexpr_if_stmt - 73956 + 216571 else_id - 73956 + 216571 @@ -38128,7 +38270,7 @@ 1 2 - 73956 + 216571 @@ -38144,7 +38286,7 @@ 1 2 - 73956 + 216571 @@ -38250,15 +38392,15 @@ while_body - 39647 + 46675 while_stmt - 39647 + 46675 body_id - 39647 + 46675 @@ -38272,7 +38414,7 @@ 1 2 - 39647 + 46675 @@ -38288,7 +38430,7 @@ 1 2 - 39647 + 46675 @@ -38298,15 +38440,15 @@ do_body - 233641 + 551349 do_stmt - 233641 + 551349 body_id - 233641 + 551349 @@ -38320,7 +38462,7 @@ 1 2 - 233641 + 551349 @@ -38336,7 +38478,7 @@ 1 2 - 233641 + 551349 @@ -38394,11 +38536,11 @@ switch_case - 836096 + 836154 switch_stmt - 411840 + 411869 index @@ -38406,7 +38548,7 @@ case_id - 836096 + 836154 @@ -38425,7 +38567,7 @@ 2 3 - 408957 + 408986 3 @@ -38451,7 +38593,7 @@ 2 3 - 408957 + 408986 3 @@ -38614,7 +38756,7 @@ 1 2 - 836096 + 836154 @@ -38630,7 +38772,7 @@ 1 2 - 836096 + 836154 @@ -38640,15 +38782,15 @@ switch_body - 411840 + 411869 switch_stmt - 411840 + 411869 body_id - 411840 + 411869 @@ -38662,7 +38804,7 @@ 1 2 - 411840 + 411869 @@ -38678,7 +38820,7 @@ 1 2 - 411840 + 411869 @@ -38688,15 +38830,15 @@ for_initialization - 73246 + 113752 for_stmt - 73246 + 113752 init_id - 73246 + 113752 @@ -38710,7 +38852,7 @@ 1 2 - 73246 + 113752 @@ -38726,7 +38868,7 @@ 1 2 - 73246 + 113752 @@ -38736,15 +38878,15 @@ for_condition - 76341 + 121024 for_stmt - 76341 + 121024 condition_id - 76341 + 121024 @@ -38758,7 +38900,7 @@ 1 2 - 76341 + 121024 @@ -38774,7 +38916,7 @@ 1 2 - 76341 + 121024 @@ -38784,15 +38926,15 @@ for_update - 73386 + 120586 for_stmt - 73386 + 120586 update_id - 73386 + 120586 @@ -38806,7 +38948,7 @@ 1 2 - 73386 + 120586 @@ -38822,7 +38964,7 @@ 1 2 - 73386 + 120586 @@ -38832,15 +38974,15 @@ for_body - 84389 + 121083 for_stmt - 84389 + 121083 body_id - 84389 + 121083 @@ -38854,7 +38996,7 @@ 1 2 - 84389 + 121083 @@ -38870,7 +39012,7 @@ 1 2 - 84389 + 121083 @@ -38880,19 +39022,19 @@ stmtparents - 5524463 + 8452090 id - 5524463 + 8452090 index - 16767 + 83 parent - 2342634 + 3414860 @@ -38906,7 +39048,7 @@ 1 2 - 5524463 + 8452090 @@ -38922,7 +39064,7 @@ 1 2 - 5524463 + 8452090 @@ -38936,54 +39078,64 @@ 12 - 1 - 2 - 5508 + 17 + 18 + 15 - 2 - 3 - 1372 + 34 + 35 + 8 - 3 - 4 - 302 + 187 + 188 + 4 - 4 - 5 - 2132 + 340 + 341 + 8 - 7 - 8 - 1398 + 390 + 409 + 4 - 8 - 12 - 1087 + 4849 + 5162 + 6 - 12 - 29 - 1476 + 12786 + 13635 + 6 - 29 - 38 - 1260 + 18763 + 30401 + 6 - 41 - 77 - 1269 + 39042 + 62308 + 6 - 77 - 195079 - 958 + 96495 + 258328 + 6 + + + 398532 + 819173 + 6 + + + 1128546 + 1128547 + 2 @@ -38997,54 +39149,64 @@ 12 - 1 - 2 - 5508 + 17 + 18 + 15 - 2 - 3 - 1372 + 34 + 35 + 8 - 3 - 4 - 302 + 187 + 188 + 4 - 4 - 5 - 2132 + 340 + 341 + 8 - 7 - 8 - 1398 + 390 + 409 + 4 - 8 - 12 - 1087 + 4849 + 5162 + 6 - 12 - 29 - 1476 + 12786 + 13635 + 6 - 29 - 38 - 1260 + 18763 + 30401 + 6 - 41 - 77 - 1269 + 39042 + 62308 + 6 - 77 - 195079 - 958 + 96495 + 258328 + 6 + + + 398532 + 819173 + 6 + + + 1128546 + 1128547 + 2 @@ -39060,32 +39222,32 @@ 1 2 - 1344600 + 1716470 2 3 - 507832 + 786112 3 4 - 144135 + 265976 4 6 - 151439 + 262417 6 - 16 - 175795 + 9 + 273890 - 16 - 1943 - 18830 + 9 + 39 + 109993 @@ -39101,32 +39263,32 @@ 1 2 - 1344600 + 1716470 2 3 - 507832 + 786112 3 4 - 144135 + 265976 4 6 - 151439 + 262417 6 - 16 - 175795 + 9 + 273890 - 16 - 1943 - 18830 + 9 + 39 + 109993 @@ -39136,30 +39298,30 @@ ishandler - 43747 + 43746 block - 43747 + 43746 stmt_decl_bind - 721594 + 1446255 stmt - 681632 + 1426175 num - 124 + 6 decl - 721526 + 1446246 @@ -39173,12 +39335,12 @@ 1 2 - 659683 + 1410088 2 - 32 - 21949 + 4 + 16086 @@ -39194,12 +39356,12 @@ 1 2 - 659683 + 1410088 2 - 32 - 21949 + 4 + 16086 @@ -39213,54 +39375,19 @@ 12 - 1 - 2 - 52 + 1819 + 1820 + 2 - 2 - 3 - 8 + 7326 + 7327 + 2 - 3 - 5 - 8 - - - 7 - 11 - 8 - - - 11 - 15 - 8 - - - 21 - 45 - 8 - - - 86 - 121 - 8 - - - 204 - 356 - 8 - - - 1063 - 2539 - 8 - - - 5480 - 170179 - 8 + 649508 + 649509 + 2 @@ -39274,54 +39401,19 @@ 12 - 1 - 2 - 52 + 1819 + 1820 + 2 - 2 - 3 - 8 + 7326 + 7327 + 2 - 3 - 5 - 8 - - - 7 - 11 - 8 - - - 11 - 15 - 8 - - - 21 - 45 - 8 - - - 86 - 121 - 8 - - - 204 - 356 - 8 - - - 1063 - 2539 - 8 - - - 5480 - 170162 - 8 + 649504 + 649505 + 2 @@ -39337,12 +39429,12 @@ 1 2 - 721502 + 1446237 2 - 8 - 24 + 3 + 8 @@ -39358,7 +39450,7 @@ 1 2 - 721526 + 1446246 @@ -39368,19 +39460,19 @@ stmt_decl_entry_bind - 721594 + 1446255 stmt - 681632 + 1426175 num - 124 + 6 decl_entry - 721594 + 1446251 @@ -39394,12 +39486,12 @@ 1 2 - 659683 + 1410088 2 - 32 - 21949 + 4 + 16086 @@ -39415,12 +39507,12 @@ 1 2 - 659683 + 1410088 2 - 32 - 21949 + 4 + 16086 @@ -39434,54 +39526,19 @@ 12 - 1 - 2 - 52 + 1819 + 1820 + 2 - 2 - 3 - 8 + 7326 + 7327 + 2 - 3 - 5 - 8 - - - 7 - 11 - 8 - - - 11 - 15 - 8 - - - 21 - 45 - 8 - - - 86 - 121 - 8 - - - 204 - 356 - 8 - - - 1063 - 2539 - 8 - - - 5480 - 170179 - 8 + 649508 + 649509 + 2 @@ -39495,54 +39552,19 @@ 12 - 1 - 2 - 52 + 1819 + 1820 + 2 - 2 - 3 - 8 + 7326 + 7327 + 2 - 3 - 5 - 8 - - - 7 - 11 - 8 - - - 11 - 15 - 8 - - - 21 - 45 - 8 - - - 86 - 121 - 8 - - - 204 - 356 - 8 - - - 1063 - 2539 - 8 - - - 5480 - 170179 - 8 + 649506 + 649507 + 2 @@ -39558,7 +39580,12 @@ 1 2 - 721594 + 1446246 + + + 2 + 3 + 4 @@ -39574,7 +39601,7 @@ 1 2 - 721594 + 1446251 @@ -39584,15 +39611,15 @@ blockscope - 1762474 + 2399400 block - 1762474 + 2399400 enclosing - 1507372 + 1756668 @@ -39606,7 +39633,7 @@ 1 2 - 1762474 + 2399400 @@ -39622,17 +39649,22 @@ 1 2 - 1336222 + 1408995 2 3 - 128550 + 210329 3 - 28 - 42600 + 9 + 136478 + + + 9 + 18 + 865 @@ -39642,19 +39674,19 @@ jumpinfo - 348320 + 896574 id - 348320 + 896574 str - 28948 + 999 target - 72706 + 283522 @@ -39668,7 +39700,7 @@ 1 2 - 348320 + 896574 @@ -39684,7 +39716,7 @@ 1 2 - 348320 + 896574 @@ -39697,40 +39729,55 @@ 12 + + 1 + 2 + 13 + 2 3 - 13596 + 270 3 4 - 6058 + 81 4 5 - 2014 + 168 5 6 - 1888 + 40 6 - 10 - 2197 + 7 + 108 + + + 7 + 9 + 87 10 - 25 - 2189 + 13 + 81 - 25 - 13711 - 1002 + 14 + 38 + 81 + + + 38 + 129945 + 67 @@ -39746,17 +39793,22 @@ 1 2 - 23190 + 459 2 3 - 3626 + 371 3 - 3321 - 2131 + 8 + 87 + + + 9 + 41246 + 81 @@ -39777,27 +39829,22 @@ 2 3 - 36210 + 93041 3 4 - 17633 + 69899 4 5 - 7379 + 116224 5 - 8 - 6418 - - - 8 - 2124 - 5030 + 50 + 4323 @@ -39813,7 +39860,7 @@ 1 2 - 72706 + 283522 @@ -39823,19 +39870,19 @@ preprocdirects - 5401355 + 35868911 id - 5401355 + 35868911 kind - 1374 + 9691 location - 5398107 + 35847591 @@ -39849,7 +39896,7 @@ 1 2 - 5401355 + 35868911 @@ -39865,7 +39912,7 @@ 1 2 - 5401355 + 35868911 @@ -39879,59 +39926,54 @@ 12 - 1 - 2 - 124 + 108 + 109 + 969 - 145 - 146 - 124 + 401 + 402 + 969 - 808 - 809 - 124 + 600 + 601 + 969 - 866 - 867 - 124 + 703 + 704 + 969 - 973 - 974 - 124 + 1172 + 1173 + 969 - 1509 - 1510 - 124 + 1441 + 1442 + 969 - 1891 - 1892 - 124 + 2328 + 2329 + 969 - 3256 - 3257 - 124 + 3104 + 3105 + 969 - 4714 - 4715 - 124 + 4979 + 4980 + 969 - 7089 - 7090 - 124 - - - 21984 - 21985 - 124 + 22176 + 22177 + 969 @@ -39945,59 +39987,54 @@ 12 - 1 - 2 - 124 + 108 + 109 + 969 - 145 - 146 - 124 + 401 + 402 + 969 - 808 - 809 - 124 + 600 + 601 + 969 - 866 - 867 - 124 + 703 + 704 + 969 - 973 - 974 - 124 + 1172 + 1173 + 969 - 1509 - 1510 - 124 + 1441 + 1442 + 969 - 1891 - 1892 - 124 + 2328 + 2329 + 969 - 3256 - 3257 - 124 + 3104 + 3105 + 969 - 4714 - 4715 - 124 + 4979 + 4980 + 969 - 7089 - 7090 - 124 - - - 21958 - 21959 - 124 + 22154 + 22155 + 969 @@ -40013,12 +40050,12 @@ 1 2 - 5397982 + 35846622 - 27 - 28 - 124 + 23 + 24 + 969 @@ -40034,7 +40071,7 @@ 1 2 - 5398107 + 35847591 @@ -40044,15 +40081,15 @@ preprocpair - 1139961 + 6326387 begin - 885609 + 4825227 elseelifend - 1139961 + 6326387 @@ -40066,17 +40103,17 @@ 1 2 - 644874 + 3400627 2 3 - 231115 + 1373237 3 9 - 9619 + 51363 @@ -40092,7 +40129,7 @@ 1 2 - 1139961 + 6326387 @@ -40102,41 +40139,41 @@ preproctrue - 437245 + 3104077 branch - 437245 + 3104077 preprocfalse - 284334 + 1486623 branch - 284334 + 1486623 preproctext - 4347469 + 30249978 id - 4347469 + 30249978 head - 2951406 + 22698628 body - 1679397 + 13053989 @@ -40150,7 +40187,7 @@ 1 2 - 4347469 + 30249978 @@ -40166,7 +40203,7 @@ 1 2 - 4347469 + 30249978 @@ -40182,12 +40219,12 @@ 1 2 - 2754896 + 21510493 2 - 798 - 196510 + 806 + 1188135 @@ -40203,12 +40240,12 @@ 1 2 - 2871828 + 22123943 2 5 - 79578 + 574685 @@ -40224,17 +40261,17 @@ 1 2 - 1530983 + 11998622 2 - 10 - 127550 + 22 + 981714 - 10 - 13579 - 20862 + 22 + 9704 + 73652 @@ -40250,17 +40287,17 @@ 1 2 - 1535231 + 12021880 2 - 12 - 127175 + 30 + 979776 - 12 - 3231 - 16990 + 30 + 2661 + 52332 @@ -40270,15 +40307,15 @@ includes - 364707 + 491808 id - 364707 + 491808 included - 67182 + 10166 @@ -40292,7 +40329,7 @@ 1 2 - 364707 + 491808 @@ -40307,38 +40344,23 @@ 1 - 2 - 33246 - - - 2 3 - 10808 + 577 3 4 - 5670 + 5963 4 - 6 - 6129 + 5 + 3473 - 6 - 11 - 5174 - - - 11 - 47 - 5041 - - - 47 - 793 - 1112 + 5 + 104467 + 151 @@ -40348,15 +40370,15 @@ link_targets - 846 + 11917 id - 846 + 11917 binary - 846 + 11917 @@ -40370,7 +40392,7 @@ 1 2 - 846 + 11917 @@ -40386,7 +40408,7 @@ 1 2 - 846 + 11917 @@ -40396,15 +40418,15 @@ link_parent - 30397762 + 80819473 element - 3866154 + 2994819 link_target - 340 + 808 @@ -40418,17 +40440,27 @@ 1 2 - 530553 + 2268833 2 - 9 - 26953 + 11 + 225604 - 9 - 10 - 3308647 + 11 + 123 + 103414 + + + 123 + 208 + 224687 + + + 208 + 271 + 172279 @@ -40442,54 +40474,69 @@ 12 - 3 - 4 - 34 + 7874 + 56288 + 62 - 97356 - 97357 - 34 + 56342 + 57366 + 62 - 97475 - 97476 - 34 + 57487 + 59251 + 62 - 97528 - 97529 - 34 + 59254 + 59689 + 62 - 97555 - 97556 - 34 + 60594 + 63583 + 62 - 97577 - 97578 - 34 + 63598 + 68732 + 62 - 97609 - 97610 - 34 + 69160 + 90331 + 62 - 99616 - 99617 - 34 + 121994 + 133055 + 62 - 102996 - 102997 - 34 + 133109 + 141061 + 62 - 104360 - 104361 - 34 + 141068 + 144417 + 62 + + + 144454 + 147437 + 62 + + + 147926 + 156061 + 62 + + + 156083 + 249351 + 53 diff --git a/cpp/ql/lib/upgrades/e38346051783182ea75822e4adf8d4c6a949bc37/old.dbscheme b/cpp/ql/lib/upgrades/e38346051783182ea75822e4adf8d4c6a949bc37/old.dbscheme new file mode 100644 index 00000000000..e3834605178 --- /dev/null +++ b/cpp/ql/lib/upgrades/e38346051783182ea75822e4adf8d4c6a949bc37/old.dbscheme @@ -0,0 +1,2506 @@ + +/** + * An invocation of the compiler. Note that more than one file may be + * compiled per invocation. For example, this command compiles three + * source files: + * + * gcc -c f1.c f2.c f3.c + * + * The `id` simply identifies the invocation, while `cwd` is the working + * directory from which the compiler was invoked. + */ +compilations( + /** + * An invocation of the compiler. Note that more than one file may + * be compiled per invocation. For example, this command compiles + * three source files: + * + * gcc -c f1.c f2.c f3.c + */ + unique int id : @compilation, + string cwd : string ref +); + +/** + * The arguments that were passed to the extractor for a compiler + * invocation. If `id` is for the compiler invocation + * + * gcc -c f1.c f2.c f3.c + * + * then typically there will be rows for + * + * num | arg + * --- | --- + * 0 | *path to extractor* + * 1 | `--mimic` + * 2 | `/usr/bin/gcc` + * 3 | `-c` + * 4 | f1.c + * 5 | f2.c + * 6 | f3.c + */ +#keyset[id, num] +compilation_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * Optionally, record the build mode for each compilation. + */ +compilation_build_mode( + unique int id : @compilation ref, + int mode : int ref +); + +/* +case @compilation_build_mode.mode of + 0 = @build_mode_none +| 1 = @build_mode_manual +| 2 = @build_mode_auto +; +*/ + +/** + * The source files that are compiled by a compiler invocation. + * If `id` is for the compiler invocation + * + * gcc -c f1.c f2.c f3.c + * + * then there will be rows for + * + * num | arg + * --- | --- + * 0 | f1.c + * 1 | f2.c + * 2 | f3.c + * + * Note that even if those files `#include` headers, those headers + * do not appear as rows. + */ +#keyset[id, num] +compilation_compiling_files( + int id : @compilation ref, + int num : int ref, + int file : @file ref +); + +/** + * The time taken by the extractor for a compiler invocation. + * + * For each file `num`, there will be rows for + * + * kind | seconds + * ---- | --- + * 1 | CPU seconds used by the extractor frontend + * 2 | Elapsed seconds during the extractor frontend + * 3 | CPU seconds used by the extractor backend + * 4 | Elapsed seconds during the extractor backend + */ +#keyset[id, num, kind] +compilation_time( + int id : @compilation ref, + int num : int ref, + /* kind: + 1 = frontend_cpu_seconds + 2 = frontend_elapsed_seconds + 3 = extractor_cpu_seconds + 4 = extractor_elapsed_seconds + */ + int kind : int ref, + float seconds : float ref +); + +/** + * An error or warning generated by the extractor. + * The diagnostic message `diagnostic` was generated during compiler + * invocation `compilation`, and is the `file_number_diagnostic_number`th + * message generated while extracting the `file_number`th file of that + * invocation. + */ +#keyset[compilation, file_number, file_number_diagnostic_number] +diagnostic_for( + int diagnostic : @diagnostic ref, + int compilation : @compilation ref, + int file_number : int ref, + int file_number_diagnostic_number : int ref +); + +/** + * If extraction was successful, then `cpu_seconds` and + * `elapsed_seconds` are the CPU time and elapsed time (respectively) + * that extraction took for compiler invocation `id`. + */ +compilation_finished( + unique int id : @compilation ref, + float cpu_seconds : float ref, + float elapsed_seconds : float ref +); + + +/** + * External data, loaded from CSV files during snapshot creation. See + * [Tutorial: Incorporating external data](https://help.semmle.com/wiki/display/SD/Tutorial%3A+Incorporating+external+data) + * for more information. + */ +externalData( + int id : @externalDataElement, + string path : string ref, + int column: int ref, + string value : string ref +); + +/** + * The source location of the snapshot. + */ +sourceLocationPrefix(string prefix : string ref); + +/** + * Information about packages that provide code used during compilation. + * The `id` is just a unique identifier. + * The `namespace` is typically the name of the package manager that + * provided the package (e.g. "dpkg" or "yum"). + * The `package_name` is the name of the package, and `version` is its + * version (as a string). + */ +external_packages( + unique int id: @external_package, + string namespace : string ref, + string package_name : string ref, + string version : string ref +); + +/** + * Holds if File `fileid` was provided by package `package`. + */ +header_to_external_package( + int fileid : @file ref, + int package : @external_package ref +); + +/* + * Version history + */ + +svnentries( + unique int id : @svnentry, + string revision : string ref, + string author : string ref, + date revisionDate : date ref, + int changeSize : int ref +) + +svnaffectedfiles( + int id : @svnentry ref, + int file : @file ref, + string action : string ref +) + +svnentrymsg( + unique int id : @svnentry ref, + string message : string ref +) + +svnchurn( + int commit : @svnentry ref, + int file : @file ref, + int addedLines : int ref, + int deletedLines : int ref +) + +/* + * C++ dbscheme + */ + +extractor_version( + string codeql_version: string ref, + string frontend_version: string ref +) + +@location = @location_stmt | @location_expr | @location_default ; + +/** + * The location of an element that is not an expression or a statement. + * The location spans column `startcolumn` of line `startline` to + * column `endcolumn` of line `endline` in file `file`. + * For more information, see + * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/). + */ +locations_default( + /** The location of an element that is not an expression or a statement. */ + unique int id: @location_default, + int container: @container ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +/** + * The location of a statement. + * The location spans column `startcolumn` of line `startline` to + * column `endcolumn` of line `endline` in file `file`. + * For more information, see + * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/). + */ +locations_stmt( + /** The location of a statement. */ + unique int id: @location_stmt, + int container: @container ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +/** + * The location of an expression. + * The location spans column `startcolumn` of line `startline` to + * column `endcolumn` of line `endline` in file `file`. + * For more information, see + * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/). + */ +locations_expr( + /** The location of an expression. */ + unique int id: @location_expr, + int container: @container ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +/** An element for which line-count information is available. */ +@sourceline = @file | @function | @variable | @enumconstant | @xmllocatable; + +numlines( + int element_id: @sourceline ref, + int num_lines: int ref, + int num_code: int ref, + int num_comment: int ref +); + +diagnostics( + unique int id: @diagnostic, + int severity: int ref, + string error_tag: string ref, + string error_message: string ref, + string full_error_message: string ref, + int location: @location_default ref +); + +files( + unique int id: @file, + string name: string ref +); + +folders( + unique int id: @folder, + string name: string ref +); + +@container = @folder | @file + +containerparent( + int parent: @container ref, + unique int child: @container ref +); + +fileannotations( + int id: @file ref, + int kind: int ref, + string name: string ref, + string value: string ref +); + +inmacroexpansion( + int id: @element ref, + int inv: @macroinvocation ref +); + +affectedbymacroexpansion( + int id: @element ref, + int inv: @macroinvocation ref +); + +case @macroinvocation.kind of + 1 = @macro_expansion +| 2 = @other_macro_reference +; + +macroinvocations( + unique int id: @macroinvocation, + int macro_id: @ppd_define ref, + int location: @location_default ref, + int kind: int ref +); + +macroparent( + unique int id: @macroinvocation ref, + int parent_id: @macroinvocation ref +); + +// a macroinvocation may be part of another location +// the way to find a constant expression that uses a macro +// is thus to find a constant expression that has a location +// to which a macro invocation is bound +macrolocationbind( + int id: @macroinvocation ref, + int location: @location ref +); + +#keyset[invocation, argument_index] +macro_argument_unexpanded( + int invocation: @macroinvocation ref, + int argument_index: int ref, + string text: string ref +); + +#keyset[invocation, argument_index] +macro_argument_expanded( + int invocation: @macroinvocation ref, + int argument_index: int ref, + string text: string ref +); + +/* +case @function.kind of + 1 = @normal_function +| 2 = @constructor +| 3 = @destructor +| 4 = @conversion_function +| 5 = @operator +| 6 = @builtin_function // GCC built-in functions, e.g. __builtin___memcpy_chk +| 7 = @user_defined_literal +| 8 = @deduction_guide +; +*/ + +functions( + unique int id: @function, + string name: string ref, + int kind: int ref +); + +function_entry_point( + int id: @function ref, + unique int entry_point: @stmt ref +); + +function_return_type( + int id: @function ref, + int return_type: @type ref +); + +/** + * If `function` is a coroutine, then this gives the `std::experimental::resumable_traits` + * instance associated with it, and the variables representing the `handle` and `promise` + * for it. + */ +coroutine( + unique int function: @function ref, + int traits: @type ref +); + +/* +case @coroutine_placeholder_variable.kind of + 1 = @handle +| 2 = @promise +| 3 = @init_await_resume +; +*/ + +coroutine_placeholder_variable( + unique int placeholder_variable: @variable ref, + int kind: int ref, + int function: @function ref +) + +/** The `new` function used for allocating the coroutine state, if any. */ +coroutine_new( + unique int function: @function ref, + int new: @function ref +); + +/** The `delete` function used for deallocating the coroutine state, if any. */ +coroutine_delete( + unique int function: @function ref, + int delete: @function ref +); + +purefunctions(unique int id: @function ref); + +function_deleted(unique int id: @function ref); + +function_defaulted(unique int id: @function ref); + +function_prototyped(unique int id: @function ref) + +deduction_guide_for_class( + int id: @function ref, + int class_template: @usertype ref +) + +member_function_this_type( + unique int id: @function ref, + int this_type: @type ref +); + +#keyset[id, type_id] +fun_decls( + int id: @fun_decl, + int function: @function ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); +fun_def(unique int id: @fun_decl ref); +fun_specialized(unique int id: @fun_decl ref); +fun_implicit(unique int id: @fun_decl ref); +fun_decl_specifiers( + int id: @fun_decl ref, + string name: string ref +) +#keyset[fun_decl, index] +fun_decl_throws( + int fun_decl: @fun_decl ref, + int index: int ref, + int type_id: @type ref +); +/* an empty throw specification is different from none */ +fun_decl_empty_throws(unique int fun_decl: @fun_decl ref); +fun_decl_noexcept( + int fun_decl: @fun_decl ref, + int constant: @expr ref +); +fun_decl_empty_noexcept(int fun_decl: @fun_decl ref); +fun_decl_typedef_type( + unique int fun_decl: @fun_decl ref, + int typedeftype_id: @usertype ref +); + +/* +case @fun_requires.kind of + 1 = @template_attached +| 2 = @function_attached +; +*/ + +fun_requires( + int id: @fun_decl ref, + int kind: int ref, + int constraint: @expr ref +); + +param_decl_bind( + unique int id: @var_decl ref, + int index: int ref, + int fun_decl: @fun_decl ref +); + +#keyset[id, type_id] +var_decls( + int id: @var_decl, + int variable: @variable ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); +var_def(unique int id: @var_decl ref); +var_specialized(int id: @var_decl ref); +var_decl_specifiers( + int id: @var_decl ref, + string name: string ref +) +is_structured_binding(unique int id: @variable ref); +var_requires( + int id: @var_decl ref, + int constraint: @expr ref +); + +type_decls( + unique int id: @type_decl, + int type_id: @type ref, + int location: @location_default ref +); +type_def(unique int id: @type_decl ref); +type_decl_top( + unique int type_decl: @type_decl ref +); +type_requires( + int id: @type_decl ref, + int constraint: @expr ref +); + +namespace_decls( + unique int id: @namespace_decl, + int namespace_id: @namespace ref, + int location: @location_default ref, + int bodylocation: @location_default ref +); + +case @using.kind of + 1 = @using_declaration +| 2 = @using_directive +| 3 = @using_enum_declaration +; + +usings( + unique int id: @using, + int element_id: @element ref, + int location: @location_default ref, + int kind: int ref +); + +/** The element which contains the `using` declaration. */ +using_container( + int parent: @element ref, + int child: @using ref +); + +static_asserts( + unique int id: @static_assert, + int condition : @expr ref, + string message : string ref, + int location: @location_default ref, + int enclosing : @element ref +); + +// each function has an ordered list of parameters +#keyset[id, type_id] +#keyset[function, index, type_id] +params( + int id: @parameter, + int function: @parameterized_element ref, + int index: int ref, + int type_id: @type ref +); + +overrides( + int new: @function ref, + int old: @function ref +); + +#keyset[id, type_id] +membervariables( + int id: @membervariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +globalvariables( + int id: @globalvariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +localvariables( + int id: @localvariable, + int type_id: @type ref, + string name: string ref +); + +autoderivation( + unique int var: @variable ref, + int derivation_type: @type ref +); + +orphaned_variables( + int var: @localvariable ref, + int function: @function ref +) + +enumconstants( + unique int id: @enumconstant, + int parent: @usertype ref, + int index: int ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); + +@variable = @localscopevariable | @globalvariable | @membervariable; + +@localscopevariable = @localvariable | @parameter; + +/** + * Built-in types are the fundamental types, e.g., integral, floating, and void. + */ +case @builtintype.kind of + 1 = @errortype +| 2 = @unknowntype +| 3 = @void +| 4 = @boolean +| 5 = @char +| 6 = @unsigned_char +| 7 = @signed_char +| 8 = @short +| 9 = @unsigned_short +| 10 = @signed_short +| 11 = @int +| 12 = @unsigned_int +| 13 = @signed_int +| 14 = @long +| 15 = @unsigned_long +| 16 = @signed_long +| 17 = @long_long +| 18 = @unsigned_long_long +| 19 = @signed_long_long +// ... 20 Microsoft-specific __int8 +// ... 21 Microsoft-specific __int16 +// ... 22 Microsoft-specific __int32 +// ... 23 Microsoft-specific __int64 +| 24 = @float +| 25 = @double +| 26 = @long_double +| 27 = @complex_float // C99-specific _Complex float +| 28 = @complex_double // C99-specific _Complex double +| 29 = @complex_long_double // C99-specific _Complex long double +| 30 = @imaginary_float // C99-specific _Imaginary float +| 31 = @imaginary_double // C99-specific _Imaginary double +| 32 = @imaginary_long_double // C99-specific _Imaginary long double +| 33 = @wchar_t // Microsoft-specific +| 34 = @decltype_nullptr // C++11 +| 35 = @int128 // __int128 +| 36 = @unsigned_int128 // unsigned __int128 +| 37 = @signed_int128 // signed __int128 +| 38 = @float128 // __float128 +| 39 = @complex_float128 // _Complex __float128 +| 40 = @decimal32 // _Decimal32 +| 41 = @decimal64 // _Decimal64 +| 42 = @decimal128 // _Decimal128 +| 43 = @char16_t +| 44 = @char32_t +| 45 = @std_float32 // _Float32 +| 46 = @float32x // _Float32x +| 47 = @std_float64 // _Float64 +| 48 = @float64x // _Float64x +| 49 = @std_float128 // _Float128 +// ... 50 _Float128x +| 51 = @char8_t +| 52 = @float16 // _Float16 +| 53 = @complex_float16 // _Complex _Float16 +| 54 = @fp16 // __fp16 +| 55 = @std_bfloat16 // __bf16 +| 56 = @std_float16 // std::float16_t +| 57 = @complex_std_float32 // _Complex _Float32 +| 58 = @complex_float32x // _Complex _Float32x +| 59 = @complex_std_float64 // _Complex _Float64 +| 60 = @complex_float64x // _Complex _Float64x +| 61 = @complex_std_float128 // _Complex _Float128 +| 62 = @mfp8 // __mfp8 +| 63 = @scalable_vector_count // __SVCount_t +; + +builtintypes( + unique int id: @builtintype, + string name: string ref, + int kind: int ref, + int size: int ref, + int sign: int ref, + int alignment: int ref +); + +/** + * Derived types are types that are directly derived from existing types and + * point to, refer to, transform type data to return a new type. + */ +case @derivedtype.kind of + 1 = @pointer +| 2 = @reference +| 3 = @type_with_specifiers +| 4 = @array +| 5 = @gnu_vector +| 6 = @routineptr +| 7 = @routinereference +| 8 = @rvalue_reference // C++11 +// ... 9 type_conforming_to_protocols deprecated +| 10 = @block +| 11 = @scalable_vector // Arm SVE +; + +derivedtypes( + unique int id: @derivedtype, + string name: string ref, + int kind: int ref, + int type_id: @type ref +); + +pointerishsize(unique int id: @derivedtype ref, + int size: int ref, + int alignment: int ref); + +arraysizes( + unique int id: @derivedtype ref, + int num_elements: int ref, + int bytesize: int ref, + int alignment: int ref +); + +tupleelements( + unique int id: @derivedtype ref, + int num_elements: int ref +); + +typedefbase( + unique int id: @usertype ref, + int type_id: @type ref +); + +/** + * An instance of the C++11 `decltype` operator or C23 `typeof`/`typeof_unqual` + * operator taking an expression as its argument. For example: + * ``` + * int a; + * decltype(1+a) b; + * typeof(1+a) c; + * ``` + * Here `expr` is `1+a`. + * + * Sometimes an additional pair of parentheses around the expression + * changes the semantics of the decltype, e.g. + * ``` + * struct A { double x; }; + * const A* a = new A(); + * decltype( a->x ); // type is double + * decltype((a->x)); // type is const double& + * ``` + * (Please consult the C++11 standard for more details). + * `parentheses_would_change_meaning` is `true` iff that is the case. + */ + +/* +case @decltype.kind of +| 0 = @decltype +| 1 = @typeof // The frontend does not differentiate between typeof and typeof_unqual +; +*/ + +#keyset[id, expr] +decltypes( + int id: @decltype, + int expr: @expr ref, + int kind: int ref, + int base_type: @type ref, + boolean parentheses_would_change_meaning: boolean ref +); + +/* +case @type_operator.kind of +| 0 = @typeof // The frontend does not differentiate between typeof and typeof_unqual +| 1 = @underlying_type +| 2 = @bases +| 3 = @direct_bases +| 4 = @add_lvalue_reference +| 5 = @add_pointer +| 6 = @add_rvalue_reference +| 7 = @decay +| 8 = @make_signed +| 9 = @make_unsigned +| 10 = @remove_all_extents +| 11 = @remove_const +| 12 = @remove_cv +| 13 = @remove_cvref +| 14 = @remove_extent +| 15 = @remove_pointer +| 16 = @remove_reference_t +| 17 = @remove_restrict +| 18 = @remove_volatile +| 19 = @remove_reference +; +*/ + +type_operators( + unique int id: @type_operator, + int arg_type: @type ref, + int kind: int ref, + int base_type: @type ref +) + +/* +case @usertype.kind of +| 0 = @unknown_usertype +| 1 = @struct +| 2 = @class +| 3 = @union +| 4 = @enum +// ... 5 = @typedef deprecated // classic C: typedef typedef type name +// ... 6 = @template deprecated +| 7 = @template_parameter +| 8 = @template_template_parameter +| 9 = @proxy_class // a proxy class associated with a template parameter +// ... 10 objc_class deprecated +// ... 11 objc_protocol deprecated +// ... 12 objc_category deprecated +| 13 = @scoped_enum +// ... 14 = @using_alias deprecated // a using name = type style typedef +| 15 = @template_struct +| 16 = @template_class +| 17 = @template_union +| 18 = @alias +; +*/ + +usertypes( + unique int id: @usertype, + string name: string ref, + int kind: int ref +); + +usertypesize( + unique int id: @usertype ref, + int size: int ref, + int alignment: int ref +); + +usertype_final(unique int id: @usertype ref); + +usertype_uuid( + unique int id: @usertype ref, + string uuid: string ref +); + +/* +case @usertype.alias_kind of +| 0 = @typedef +| 1 = @alias +*/ + +usertype_alias_kind( + int id: @usertype ref, + int alias_kind: int ref +) + +nontype_template_parameters( + int id: @expr ref +); + +type_template_type_constraint( + int id: @usertype ref, + int constraint: @expr ref +); + +mangled_name( + unique int id: @declaration ref, + int mangled_name : @mangledname, + boolean is_complete: boolean ref +); + +is_pod_class(unique int id: @usertype ref); +is_standard_layout_class(unique int id: @usertype ref); + +is_complete(unique int id: @usertype ref); + +is_class_template(unique int id: @usertype ref); +class_instantiation( + int to: @usertype ref, + int from: @usertype ref +); +class_template_argument( + int type_id: @usertype ref, + int index: int ref, + int arg_type: @type ref +); +class_template_argument_value( + int type_id: @usertype ref, + int index: int ref, + int arg_value: @expr ref +); + +@user_or_decltype = @usertype | @decltype; + +is_proxy_class_for( + unique int id: @usertype ref, + int templ_param_id: @user_or_decltype ref +); + +type_mentions( + unique int id: @type_mention, + int type_id: @type ref, + int location: @location ref, + // a_symbol_reference_kind from the frontend. + int kind: int ref +); + +is_function_template(unique int id: @function ref); +function_instantiation( + unique int to: @function ref, + int from: @function ref +); +function_template_argument( + int function_id: @function ref, + int index: int ref, + int arg_type: @type ref +); +function_template_argument_value( + int function_id: @function ref, + int index: int ref, + int arg_value: @expr ref +); + +is_variable_template(unique int id: @variable ref); +variable_instantiation( + unique int to: @variable ref, + int from: @variable ref +); +variable_template_argument( + int variable_id: @variable ref, + int index: int ref, + int arg_type: @type ref +); +variable_template_argument_value( + int variable_id: @variable ref, + int index: int ref, + int arg_value: @expr ref +); + +template_template_instantiation( + int to: @usertype ref, + int from: @usertype ref +); +template_template_argument( + int type_id: @usertype ref, + int index: int ref, + int arg_type: @type ref +); +template_template_argument_value( + int type_id: @usertype ref, + int index: int ref, + int arg_value: @expr ref +); + +@concept = @concept_template | @concept_id; + +concept_templates( + unique int concept_id: @concept_template, + string name: string ref, + int location: @location_default ref +); +concept_instantiation( + unique int to: @concept_id ref, + int from: @concept_template ref +); +is_type_constraint(int concept_id: @concept_id ref); +concept_template_argument( + int concept_id: @concept ref, + int index: int ref, + int arg_type: @type ref +); +concept_template_argument_value( + int concept_id: @concept ref, + int index: int ref, + int arg_value: @expr ref +); + +routinetypes( + unique int id: @routinetype, + int return_type: @type ref +); + +routinetypeargs( + int routine: @routinetype ref, + int index: int ref, + int type_id: @type ref +); + +ptrtomembers( + unique int id: @ptrtomember, + int type_id: @type ref, + int class_id: @type ref +); + +/* + specifiers for types, functions, and variables + + "public", + "protected", + "private", + + "const", + "volatile", + "static", + + "pure", + "virtual", + "sealed", // Microsoft + "__interface", // Microsoft + "inline", + "explicit", + + "near", // near far extension + "far", // near far extension + "__ptr32", // Microsoft + "__ptr64", // Microsoft + "__sptr", // Microsoft + "__uptr", // Microsoft + "dllimport", // Microsoft + "dllexport", // Microsoft + "thread", // Microsoft + "naked", // Microsoft + "microsoft_inline", // Microsoft + "forceinline", // Microsoft + "selectany", // Microsoft + "nothrow", // Microsoft + "novtable", // Microsoft + "noreturn", // Microsoft + "noinline", // Microsoft + "noalias", // Microsoft + "restrict", // Microsoft +*/ + +specifiers( + unique int id: @specifier, + unique string str: string ref +); + +typespecifiers( + int type_id: @type ref, + int spec_id: @specifier ref +); + +funspecifiers( + int func_id: @function ref, + int spec_id: @specifier ref +); + +varspecifiers( + int var_id: @accessible ref, + int spec_id: @specifier ref +); + +explicit_specifier_exprs( + unique int func_id: @function ref, + int constant: @expr ref +) + +attributes( + unique int id: @attribute, + int kind: int ref, + string name: string ref, + string name_space: string ref, + int location: @location_default ref +); + +case @attribute.kind of + 0 = @gnuattribute +| 1 = @stdattribute +| 2 = @declspec +| 3 = @msattribute +| 4 = @alignas +// ... 5 @objc_propertyattribute deprecated +; + +attribute_args( + unique int id: @attribute_arg, + int kind: int ref, + int attribute: @attribute ref, + int index: int ref, + int location: @location_default ref +); + +case @attribute_arg.kind of + 0 = @attribute_arg_empty +| 1 = @attribute_arg_token +| 2 = @attribute_arg_constant +| 3 = @attribute_arg_type +| 4 = @attribute_arg_constant_expr +| 5 = @attribute_arg_expr +; + +attribute_arg_value( + unique int arg: @attribute_arg ref, + string value: string ref +); +attribute_arg_type( + unique int arg: @attribute_arg ref, + int type_id: @type ref +); +attribute_arg_constant( + unique int arg: @attribute_arg ref, + int constant: @expr ref +) +attribute_arg_expr( + unique int arg: @attribute_arg ref, + int expr: @expr ref +) +attribute_arg_name( + unique int arg: @attribute_arg ref, + string name: string ref +); + +typeattributes( + int type_id: @type ref, + int spec_id: @attribute ref +); + +funcattributes( + int func_id: @function ref, + int spec_id: @attribute ref +); + +varattributes( + int var_id: @accessible ref, + int spec_id: @attribute ref +); + +namespaceattributes( + int namespace_id: @namespace ref, + int spec_id: @attribute ref +); + +stmtattributes( + int stmt_id: @stmt ref, + int spec_id: @attribute ref +); + +@type = @builtintype + | @derivedtype + | @usertype + | @routinetype + | @ptrtomember + | @decltype + | @type_operator; + +unspecifiedtype( + unique int type_id: @type ref, + int unspecified_type_id: @type ref +); + +member( + int parent: @type ref, + int index: int ref, + int child: @member ref +); + +@enclosingfunction_child = @usertype | @variable | @namespace + +enclosingfunction( + unique int child: @enclosingfunction_child ref, + int parent: @function ref +); + +derivations( + unique int derivation: @derivation, + int sub: @type ref, + int index: int ref, + int super: @type ref, + int location: @location_default ref +); + +derspecifiers( + int der_id: @derivation ref, + int spec_id: @specifier ref +); + +/** + * Contains the byte offset of the base class subobject within the derived + * class. Only holds for non-virtual base classes, but see table + * `virtual_base_offsets` for offsets of virtual base class subobjects. + */ +direct_base_offsets( + unique int der_id: @derivation ref, + int offset: int ref +); + +/** + * Contains the byte offset of the virtual base class subobject for class + * `super` within a most-derived object of class `sub`. `super` can be either a + * direct or indirect base class. + */ +#keyset[sub, super] +virtual_base_offsets( + int sub: @usertype ref, + int super: @usertype ref, + int offset: int ref +); + +frienddecls( + unique int id: @frienddecl, + int type_id: @type ref, + int decl_id: @declaration ref, + int location: @location_default ref +); + +@declaredtype = @usertype ; + +@declaration = @function + | @declaredtype + | @variable + | @enumconstant + | @frienddecl + | @concept_template; + +@member = @membervariable + | @function + | @declaredtype + | @enumconstant; + +@locatable = @diagnostic + | @declaration + | @ppd_include + | @ppd_define + | @macroinvocation + /*| @funcall*/ + | @xmllocatable + | @attribute + | @attribute_arg; + +@namedscope = @namespace | @usertype; + +@element = @locatable + | @file + | @folder + | @specifier + | @type + | @expr + | @namespace + | @initialiser + | @stmt + | @derivation + | @comment + | @preprocdirect + | @fun_decl + | @var_decl + | @type_decl + | @namespace_decl + | @using + | @namequalifier + | @specialnamequalifyingelement + | @static_assert + | @type_mention + | @lambdacapture; + +@exprparent = @element; + +comments( + unique int id: @comment, + string contents: string ref, + int location: @location_default ref +); + +commentbinding( + int id: @comment ref, + int element: @element ref +); + +exprconv( + int converted: @expr ref, + unique int conversion: @expr ref +); + +compgenerated(unique int id: @element ref); + +/** + * `destructor_call` destructs the `i`'th entity that should be + * destructed following `element`. Note that entities should be + * destructed in reverse construction order, so for a given `element` + * these should be called from highest to lowest `i`. + */ +#keyset[element, destructor_call] +#keyset[element, i] +synthetic_destructor_call( + int element: @element ref, + int i: int ref, + int destructor_call: @routineexpr ref +); + +namespaces( + unique int id: @namespace, + string name: string ref +); + +namespace_inline( + unique int id: @namespace ref +); + +namespacembrs( + int parentid: @namespace ref, + unique int memberid: @namespacembr ref +); + +@namespacembr = @declaration | @namespace; + +exprparents( + int expr_id: @expr ref, + int child_index: int ref, + int parent_id: @exprparent ref +); + +expr_isload(unique int expr_id: @expr ref); + +@cast = @c_style_cast + | @const_cast + | @dynamic_cast + | @reinterpret_cast + | @static_cast + ; + +/* +case @conversion.kind of + 0 = @simple_conversion // a numeric conversion, qualification conversion, or a reinterpret_cast +| 1 = @bool_conversion // conversion to 'bool' +| 2 = @base_class_conversion // a derived-to-base conversion +| 3 = @derived_class_conversion // a base-to-derived conversion +| 4 = @pm_base_class_conversion // a derived-to-base conversion of a pointer to member +| 5 = @pm_derived_class_conversion // a base-to-derived conversion of a pointer to member +| 6 = @glvalue_adjust // an adjustment of the type of a glvalue +| 7 = @prvalue_adjust // an adjustment of the type of a prvalue +; +*/ +/** + * Describes the semantics represented by a cast expression. This is largely + * independent of the source syntax of the cast, so it is separate from the + * regular expression kind. + */ +conversionkinds( + unique int expr_id: @cast ref, + int kind: int ref +); + +@conversion = @cast + | @array_to_pointer + | @parexpr + | @reference_to + | @ref_indirect + | @temp_init + | @c11_generic + ; + +/* +case @funbindexpr.kind of + 0 = @normal_call // a normal call +| 1 = @virtual_call // a virtual call +| 2 = @adl_call // a call whose target is only found by ADL +; +*/ +iscall( + unique int caller: @funbindexpr ref, + int kind: int ref +); + +numtemplatearguments( + unique int expr_id: @expr ref, + int num: int ref +); + +specialnamequalifyingelements( + unique int id: @specialnamequalifyingelement, + unique string name: string ref +); + +@namequalifiableelement = @expr | @namequalifier; +@namequalifyingelement = @namespace + | @specialnamequalifyingelement + | @usertype; + +namequalifiers( + unique int id: @namequalifier, + unique int qualifiableelement: @namequalifiableelement ref, + int qualifyingelement: @namequalifyingelement ref, + int location: @location_default ref +); + +varbind( + int expr: @varbindexpr ref, + int var: @accessible ref +); + +funbind( + int expr: @funbindexpr ref, + int fun: @function ref +); + +@any_new_expr = @new_expr + | @new_array_expr; + +@new_or_delete_expr = @any_new_expr + | @delete_expr + | @delete_array_expr; + +@prefix_crement_expr = @preincrexpr | @predecrexpr; + +@postfix_crement_expr = @postincrexpr | @postdecrexpr; + +@increment_expr = @preincrexpr | @postincrexpr; + +@decrement_expr = @predecrexpr | @postdecrexpr; + +@crement_expr = @increment_expr | @decrement_expr; + +@un_arith_op_expr = @arithnegexpr + | @unaryplusexpr + | @conjugation + | @realpartexpr + | @imagpartexpr + | @crement_expr + ; + +@un_bitwise_op_expr = @complementexpr; + +@un_log_op_expr = @notexpr; + +@un_op_expr = @address_of + | @indirect + | @un_arith_op_expr + | @un_bitwise_op_expr + | @builtinaddressof + | @vec_fill + | @un_log_op_expr + | @co_await + | @co_yield + ; + +@bin_log_op_expr = @andlogicalexpr | @orlogicalexpr; + +@cmp_op_expr = @eq_op_expr | @rel_op_expr; + +@eq_op_expr = @eqexpr | @neexpr; + +@rel_op_expr = @gtexpr + | @ltexpr + | @geexpr + | @leexpr + | @spaceshipexpr + ; + +@bin_bitwise_op_expr = @lshiftexpr + | @rshiftexpr + | @andexpr + | @orexpr + | @xorexpr + ; + +@p_arith_op_expr = @paddexpr + | @psubexpr + | @pdiffexpr + ; + +@bin_arith_op_expr = @addexpr + | @subexpr + | @mulexpr + | @divexpr + | @remexpr + | @jmulexpr + | @jdivexpr + | @fjaddexpr + | @jfaddexpr + | @fjsubexpr + | @jfsubexpr + | @minexpr + | @maxexpr + | @p_arith_op_expr + ; + +@bin_op_expr = @bin_arith_op_expr + | @bin_bitwise_op_expr + | @cmp_op_expr + | @bin_log_op_expr + ; + +@op_expr = @un_op_expr + | @bin_op_expr + | @assign_expr + | @conditionalexpr + ; + +@assign_arith_expr = @assignaddexpr + | @assignsubexpr + | @assignmulexpr + | @assigndivexpr + | @assignremexpr + ; + +@assign_bitwise_expr = @assignandexpr + | @assignorexpr + | @assignxorexpr + | @assignlshiftexpr + | @assignrshiftexpr + ; + +@assign_pointer_expr = @assignpaddexpr + | @assignpsubexpr + ; + +@assign_op_expr = @assign_arith_expr + | @assign_bitwise_expr + | @assign_pointer_expr + ; + +@assign_expr = @assignexpr | @assign_op_expr | @blockassignexpr + +/* + Binary encoding of the allocator form. + + case @allocator.form of + 0 = plain + | 1 = alignment + ; +*/ + +/** + * The allocator function associated with a `new` or `new[]` expression. + * The `form` column specified whether the allocation call contains an alignment + * argument. + */ +expr_allocator( + unique int expr: @any_new_expr ref, + int func: @function ref, + int form: int ref +); + +/* + Binary encoding of the deallocator form. + + case @deallocator.form of + 0 = plain + | 1 = size + | 2 = alignment + | 4 = destroying_delete + ; +*/ + +/** + * The deallocator function associated with a `delete`, `delete[]`, `new`, or + * `new[]` expression. For a `new` or `new[]` expression, the deallocator is the + * one used to free memory if the initialization throws an exception. + * The `form` column specifies whether the deallocation call contains a size + * argument, and alignment argument, or both. + */ +expr_deallocator( + unique int expr: @new_or_delete_expr ref, + int func: @function ref, + int form: int ref +); + +/** + * Holds if the `@conditionalexpr` is of the two operand form + * `guard ? : false`. + */ +expr_cond_two_operand( + unique int cond: @conditionalexpr ref +); + +/** + * The guard of `@conditionalexpr` `guard ? true : false` + */ +expr_cond_guard( + unique int cond: @conditionalexpr ref, + int guard: @expr ref +); + +/** + * The expression used when the guard of `@conditionalexpr` + * `guard ? true : false` holds. For the two operand form + * `guard ?: false` consider using `expr_cond_guard` instead. + */ +expr_cond_true( + unique int cond: @conditionalexpr ref, + int true: @expr ref +); + +/** + * The expression used when the guard of `@conditionalexpr` + * `guard ? true : false` does not hold. + */ +expr_cond_false( + unique int cond: @conditionalexpr ref, + int false: @expr ref +); + +/** A string representation of the value. */ +values( + unique int id: @value, + string str: string ref +); + +/** The actual text in the source code for the value, if any. */ +valuetext( + unique int id: @value ref, + string text: string ref +); + +valuebind( + int val: @value ref, + unique int expr: @expr ref +); + +fieldoffsets( + unique int id: @variable ref, + int byteoffset: int ref, + int bitoffset: int ref +); + +bitfield( + unique int id: @variable ref, + int bits: int ref, + int declared_bits: int ref +); + +/* TODO +memberprefix( + int member: @expr ref, + int prefix: @expr ref +); +*/ + +/* + kind(1) = mbrcallexpr + kind(2) = mbrptrcallexpr + kind(3) = mbrptrmbrcallexpr + kind(4) = ptrmbrptrmbrcallexpr + kind(5) = mbrreadexpr // x.y + kind(6) = mbrptrreadexpr // p->y + kind(7) = mbrptrmbrreadexpr // x.*pm + kind(8) = mbrptrmbrptrreadexpr // x->*pm + kind(9) = staticmbrreadexpr // static x.y + kind(10) = staticmbrptrreadexpr // static p->y +*/ +/* TODO +memberaccess( + int member: @expr ref, + int kind: int ref +); +*/ + +initialisers( + unique int init: @initialiser, + int var: @accessible ref, + unique int expr: @expr ref, + int location: @location_expr ref +); + +braced_initialisers( + int init: @initialiser ref +); + +/** + * An ancestor for the expression, for cases in which we cannot + * otherwise find the expression's parent. + */ +expr_ancestor( + int exp: @expr ref, + int ancestor: @element ref +); + +exprs( + unique int id: @expr, + int kind: int ref, + int location: @location_expr ref +); + +expr_reuse( + int reuse: @expr ref, + int original: @expr ref, + int value_category: int ref +) + +/* + case @value.category of + 1 = prval + | 2 = xval + | 3 = lval + ; +*/ +expr_types( + int id: @expr ref, + int typeid: @type ref, + int value_category: int ref +); + +case @expr.kind of + 1 = @errorexpr +| 2 = @address_of // & AddressOfExpr +| 3 = @reference_to // ReferenceToExpr (implicit?) +| 4 = @indirect // * PointerDereferenceExpr +| 5 = @ref_indirect // ReferenceDereferenceExpr (implicit?) +// ... +| 8 = @array_to_pointer // (???) +| 9 = @vacuous_destructor_call // VacuousDestructorCall +// ... +| 11 = @assume // Microsoft +| 12 = @parexpr +| 13 = @arithnegexpr +| 14 = @unaryplusexpr +| 15 = @complementexpr +| 16 = @notexpr +| 17 = @conjugation // GNU ~ operator +| 18 = @realpartexpr // GNU __real +| 19 = @imagpartexpr // GNU __imag +| 20 = @postincrexpr +| 21 = @postdecrexpr +| 22 = @preincrexpr +| 23 = @predecrexpr +| 24 = @conditionalexpr +| 25 = @addexpr +| 26 = @subexpr +| 27 = @mulexpr +| 28 = @divexpr +| 29 = @remexpr +| 30 = @jmulexpr // C99 mul imaginary +| 31 = @jdivexpr // C99 div imaginary +| 32 = @fjaddexpr // C99 add real + imaginary +| 33 = @jfaddexpr // C99 add imaginary + real +| 34 = @fjsubexpr // C99 sub real - imaginary +| 35 = @jfsubexpr // C99 sub imaginary - real +| 36 = @paddexpr // pointer add (pointer + int or int + pointer) +| 37 = @psubexpr // pointer sub (pointer - integer) +| 38 = @pdiffexpr // difference between two pointers +| 39 = @lshiftexpr +| 40 = @rshiftexpr +| 41 = @andexpr +| 42 = @orexpr +| 43 = @xorexpr +| 44 = @eqexpr +| 45 = @neexpr +| 46 = @gtexpr +| 47 = @ltexpr +| 48 = @geexpr +| 49 = @leexpr +| 50 = @minexpr // GNU minimum +| 51 = @maxexpr // GNU maximum +| 52 = @assignexpr +| 53 = @assignaddexpr +| 54 = @assignsubexpr +| 55 = @assignmulexpr +| 56 = @assigndivexpr +| 57 = @assignremexpr +| 58 = @assignlshiftexpr +| 59 = @assignrshiftexpr +| 60 = @assignandexpr +| 61 = @assignorexpr +| 62 = @assignxorexpr +| 63 = @assignpaddexpr // assign pointer add +| 64 = @assignpsubexpr // assign pointer sub +| 65 = @andlogicalexpr +| 66 = @orlogicalexpr +| 67 = @commaexpr +| 68 = @subscriptexpr // access to member of an array, e.g., a[5] +// ... 69 @objc_subscriptexpr deprecated +// ... 70 @cmdaccess deprecated +// ... +| 73 = @virtfunptrexpr +| 74 = @callexpr +// ... 75 @msgexpr_normal deprecated +// ... 76 @msgexpr_super deprecated +// ... 77 @atselectorexpr deprecated +// ... 78 @atprotocolexpr deprecated +| 79 = @vastartexpr +| 80 = @vaargexpr +| 81 = @vaendexpr +| 82 = @vacopyexpr +// ... 83 @atencodeexpr deprecated +| 84 = @varaccess +| 85 = @thisaccess +// ... 86 @objc_box_expr deprecated +| 87 = @new_expr +| 88 = @delete_expr +| 89 = @throw_expr +| 90 = @condition_decl // a variable declared in a condition, e.g., if(int x = y > 2) +| 91 = @braced_init_list +| 92 = @type_id +| 93 = @runtime_sizeof +| 94 = @runtime_alignof +| 95 = @sizeof_pack +| 96 = @expr_stmt // GNU extension +| 97 = @routineexpr +| 98 = @type_operand // used to access a type in certain contexts (haven't found any examples yet....) +| 99 = @offsetofexpr // offsetof ::= type and field +| 100 = @hasassignexpr // __has_assign ::= type +| 101 = @hascopyexpr // __has_copy ::= type +| 102 = @hasnothrowassign // __has_nothrow_assign ::= type +| 103 = @hasnothrowconstr // __has_nothrow_constructor ::= type +| 104 = @hasnothrowcopy // __has_nothrow_copy ::= type +| 105 = @hastrivialassign // __has_trivial_assign ::= type +| 106 = @hastrivialconstr // __has_trivial_constructor ::= type +| 107 = @hastrivialcopy // __has_trivial_copy ::= type +| 108 = @hasuserdestr // __has_user_destructor ::= type +| 109 = @hasvirtualdestr // __has_virtual_destructor ::= type +| 110 = @isabstractexpr // __is_abstract ::= type +| 111 = @isbaseofexpr // __is_base_of ::= type type +| 112 = @isclassexpr // __is_class ::= type +| 113 = @isconvtoexpr // __is_convertible_to ::= type type +| 114 = @isemptyexpr // __is_empty ::= type +| 115 = @isenumexpr // __is_enum ::= type +| 116 = @ispodexpr // __is_pod ::= type +| 117 = @ispolyexpr // __is_polymorphic ::= type +| 118 = @isunionexpr // __is_union ::= type +| 119 = @typescompexpr // GNU __builtin_types_compatible ::= type type +| 120 = @intaddrexpr // frontend internal builtin, used to implement offsetof +// ... +| 122 = @hastrivialdestructor // __has_trivial_destructor ::= type +| 123 = @literal +| 124 = @uuidof +| 127 = @aggregateliteral +| 128 = @delete_array_expr +| 129 = @new_array_expr +// ... 130 @objc_array_literal deprecated +// ... 131 @objc_dictionary_literal deprecated +| 132 = @foldexpr +// ... +| 200 = @ctordirectinit +| 201 = @ctorvirtualinit +| 202 = @ctorfieldinit +| 203 = @ctordelegatinginit +| 204 = @dtordirectdestruct +| 205 = @dtorvirtualdestruct +| 206 = @dtorfielddestruct +// ... +| 210 = @static_cast +| 211 = @reinterpret_cast +| 212 = @const_cast +| 213 = @dynamic_cast +| 214 = @c_style_cast +| 215 = @lambdaexpr +| 216 = @param_ref +| 217 = @noopexpr +// ... +| 294 = @istriviallyconstructibleexpr +| 295 = @isdestructibleexpr +| 296 = @isnothrowdestructibleexpr +| 297 = @istriviallydestructibleexpr +| 298 = @istriviallyassignableexpr +| 299 = @isnothrowassignableexpr +| 300 = @istrivialexpr +| 301 = @isstandardlayoutexpr +| 302 = @istriviallycopyableexpr +| 303 = @isliteraltypeexpr +| 304 = @hastrivialmoveconstructorexpr +| 305 = @hastrivialmoveassignexpr +| 306 = @hasnothrowmoveassignexpr +| 307 = @isconstructibleexpr +| 308 = @isnothrowconstructibleexpr +| 309 = @hasfinalizerexpr +| 310 = @isdelegateexpr +| 311 = @isinterfaceclassexpr +| 312 = @isrefarrayexpr +| 313 = @isrefclassexpr +| 314 = @issealedexpr +| 315 = @issimplevalueclassexpr +| 316 = @isvalueclassexpr +| 317 = @isfinalexpr +| 319 = @noexceptexpr +| 320 = @builtinshufflevector +| 321 = @builtinchooseexpr +| 322 = @builtinaddressof +| 323 = @vec_fill +| 324 = @builtinconvertvector +| 325 = @builtincomplex +| 326 = @spaceshipexpr +| 327 = @co_await +| 328 = @co_yield +| 329 = @temp_init +| 330 = @isassignable +| 331 = @isaggregate +| 332 = @hasuniqueobjectrepresentations +| 333 = @builtinbitcast +| 334 = @builtinshuffle +| 335 = @blockassignexpr +| 336 = @issame +| 337 = @isfunction +| 338 = @islayoutcompatible +| 339 = @ispointerinterconvertiblebaseof +| 340 = @isarray +| 341 = @arrayrank +| 342 = @arrayextent +| 343 = @isarithmetic +| 344 = @iscompletetype +| 345 = @iscompound +| 346 = @isconst +| 347 = @isfloatingpoint +| 348 = @isfundamental +| 349 = @isintegral +| 350 = @islvaluereference +| 351 = @ismemberfunctionpointer +| 352 = @ismemberobjectpointer +| 353 = @ismemberpointer +| 354 = @isobject +| 355 = @ispointer +| 356 = @isreference +| 357 = @isrvaluereference +| 358 = @isscalar +| 359 = @issigned +| 360 = @isunsigned +| 361 = @isvoid +| 362 = @isvolatile +| 363 = @reuseexpr +| 364 = @istriviallycopyassignable +| 365 = @isassignablenopreconditioncheck +| 366 = @referencebindstotemporary +| 367 = @issameas +| 368 = @builtinhasattribute +| 369 = @ispointerinterconvertiblewithclass +| 370 = @builtinispointerinterconvertiblewithclass +| 371 = @iscorrespondingmember +| 372 = @builtiniscorrespondingmember +| 373 = @isboundedarray +| 374 = @isunboundedarray +| 375 = @isreferenceable +| 378 = @isnothrowconvertible +| 379 = @referenceconstructsfromtemporary +| 380 = @referenceconvertsfromtemporary +| 381 = @isconvertible +| 382 = @isvalidwinrttype +| 383 = @iswinclass +| 384 = @iswininterface +| 385 = @istriviallyequalitycomparable +| 386 = @isscopedenum +| 387 = @istriviallyrelocatable +| 388 = @datasizeof +| 389 = @c11_generic +| 390 = @requires_expr +| 391 = @nested_requirement +| 392 = @compound_requirement +| 393 = @concept_id +; + +@var_args_expr = @vastartexpr + | @vaendexpr + | @vaargexpr + | @vacopyexpr + ; + +@builtin_op = @var_args_expr + | @noopexpr + | @offsetofexpr + | @intaddrexpr + | @hasassignexpr + | @hascopyexpr + | @hasnothrowassign + | @hasnothrowconstr + | @hasnothrowcopy + | @hastrivialassign + | @hastrivialconstr + | @hastrivialcopy + | @hastrivialdestructor + | @hasuserdestr + | @hasvirtualdestr + | @isabstractexpr + | @isbaseofexpr + | @isclassexpr + | @isconvtoexpr + | @isemptyexpr + | @isenumexpr + | @ispodexpr + | @ispolyexpr + | @isunionexpr + | @typescompexpr + | @builtinshufflevector + | @builtinconvertvector + | @builtinaddressof + | @istriviallyconstructibleexpr + | @isdestructibleexpr + | @isnothrowdestructibleexpr + | @istriviallydestructibleexpr + | @istriviallyassignableexpr + | @isnothrowassignableexpr + | @istrivialexpr + | @isstandardlayoutexpr + | @istriviallycopyableexpr + | @isliteraltypeexpr + | @hastrivialmoveconstructorexpr + | @hastrivialmoveassignexpr + | @hasnothrowmoveassignexpr + | @isconstructibleexpr + | @isnothrowconstructibleexpr + | @hasfinalizerexpr + | @isdelegateexpr + | @isinterfaceclassexpr + | @isrefarrayexpr + | @isrefclassexpr + | @issealedexpr + | @issimplevalueclassexpr + | @isvalueclassexpr + | @isfinalexpr + | @builtinchooseexpr + | @builtincomplex + | @isassignable + | @isaggregate + | @hasuniqueobjectrepresentations + | @builtinbitcast + | @builtinshuffle + | @issame + | @isfunction + | @islayoutcompatible + | @ispointerinterconvertiblebaseof + | @isarray + | @arrayrank + | @arrayextent + | @isarithmetic + | @iscompletetype + | @iscompound + | @isconst + | @isfloatingpoint + | @isfundamental + | @isintegral + | @islvaluereference + | @ismemberfunctionpointer + | @ismemberobjectpointer + | @ismemberpointer + | @isobject + | @ispointer + | @isreference + | @isrvaluereference + | @isscalar + | @issigned + | @isunsigned + | @isvoid + | @isvolatile + | @istriviallycopyassignable + | @isassignablenopreconditioncheck + | @referencebindstotemporary + | @issameas + | @builtinhasattribute + | @ispointerinterconvertiblewithclass + | @builtinispointerinterconvertiblewithclass + | @iscorrespondingmember + | @builtiniscorrespondingmember + | @isboundedarray + | @isunboundedarray + | @isreferenceable + | @isnothrowconvertible + | @referenceconstructsfromtemporary + | @referenceconvertsfromtemporary + | @isconvertible + | @isvalidwinrttype + | @iswinclass + | @iswininterface + | @istriviallyequalitycomparable + | @isscopedenum + | @istriviallyrelocatable + ; + +compound_requirement_is_noexcept( + int expr: @compound_requirement ref +); + +new_allocated_type( + unique int expr: @new_expr ref, + int type_id: @type ref +); + +new_array_allocated_type( + unique int expr: @new_array_expr ref, + int type_id: @type ref +); + +/** + * The field being initialized by an initializer expression within an aggregate + * initializer for a class/struct/union. Position is used to sort repeated initializers. + */ +#keyset[aggregate, position] +aggregate_field_init( + int aggregate: @aggregateliteral ref, + int initializer: @expr ref, + int field: @membervariable ref, + int position: int ref, + boolean is_designated: boolean ref +); + +/** + * The index of the element being initialized by an initializer expression + * within an aggregate initializer for an array. Position is used to sort repeated initializers. + */ +#keyset[aggregate, position] +aggregate_array_init( + int aggregate: @aggregateliteral ref, + int initializer: @expr ref, + int element_index: int ref, + int position: int ref, + boolean is_designated: boolean ref +); + +@ctorinit = @ctordirectinit + | @ctorvirtualinit + | @ctorfieldinit + | @ctordelegatinginit; +@dtordestruct = @dtordirectdestruct + | @dtorvirtualdestruct + | @dtorfielddestruct; + + +condition_decl_bind( + unique int expr: @condition_decl ref, + unique int decl: @declaration ref +); + +typeid_bind( + unique int expr: @type_id ref, + int type_id: @type ref +); + +uuidof_bind( + unique int expr: @uuidof ref, + int type_id: @type ref +); + +@sizeof_or_alignof = @runtime_sizeof | @runtime_alignof | @datasizeof | @sizeof_pack; + +sizeof_bind( + unique int expr: @sizeof_or_alignof ref, + int type_id: @type ref +); + +code_block( + unique int block: @literal ref, + unique int routine: @function ref +); + +lambdas( + unique int expr: @lambdaexpr ref, + string default_capture: string ref, + boolean has_explicit_return_type: boolean ref, + boolean has_explicit_parameter_list: boolean ref +); + +lambda_capture( + unique int id: @lambdacapture, + int lambda: @lambdaexpr ref, + int index: int ref, + int field: @membervariable ref, + boolean captured_by_reference: boolean ref, + boolean is_implicit: boolean ref, + int location: @location_default ref +); + +@funbindexpr = @routineexpr + | @new_expr + | @delete_expr + | @delete_array_expr + | @ctordirectinit + | @ctorvirtualinit + | @ctordelegatinginit + | @dtordirectdestruct + | @dtorvirtualdestruct; + +@varbindexpr = @varaccess | @ctorfieldinit | @dtorfielddestruct; +@addressable = @function | @variable ; +@accessible = @addressable | @enumconstant ; + +@access = @varaccess | @routineexpr ; + +fold( + int expr: @foldexpr ref, + string operator: string ref, + boolean is_left_fold: boolean ref +); + +stmts( + unique int id: @stmt, + int kind: int ref, + int location: @location_stmt ref +); + +case @stmt.kind of + 1 = @stmt_expr +| 2 = @stmt_if +| 3 = @stmt_while +| 4 = @stmt_goto +| 5 = @stmt_label +| 6 = @stmt_return +| 7 = @stmt_block +| 8 = @stmt_end_test_while // do { ... } while ( ... ) +| 9 = @stmt_for +| 10 = @stmt_switch_case +| 11 = @stmt_switch +| 13 = @stmt_asm // "asm" statement or the body of an asm function +| 15 = @stmt_try_block +| 16 = @stmt_microsoft_try // Microsoft +| 17 = @stmt_decl +| 18 = @stmt_set_vla_size // C99 +| 19 = @stmt_vla_decl // C99 +| 25 = @stmt_assigned_goto // GNU +| 26 = @stmt_empty +| 27 = @stmt_continue +| 28 = @stmt_break +| 29 = @stmt_range_based_for // C++11 +// ... 30 @stmt_at_autoreleasepool_block deprecated +// ... 31 @stmt_objc_for_in deprecated +// ... 32 @stmt_at_synchronized deprecated +| 33 = @stmt_handler +// ... 34 @stmt_finally_end deprecated +| 35 = @stmt_constexpr_if +| 37 = @stmt_co_return +| 38 = @stmt_consteval_if +| 39 = @stmt_not_consteval_if +| 40 = @stmt_leave +; + +type_vla( + int type_id: @type ref, + int decl: @stmt_vla_decl ref +); + +variable_vla( + int var: @variable ref, + int decl: @stmt_vla_decl ref +); + +type_is_vla(unique int type_id: @derivedtype ref) + +if_initialization( + unique int if_stmt: @stmt_if ref, + int init_id: @stmt ref +); + +if_then( + unique int if_stmt: @stmt_if ref, + int then_id: @stmt ref +); + +if_else( + unique int if_stmt: @stmt_if ref, + int else_id: @stmt ref +); + +constexpr_if_initialization( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int init_id: @stmt ref +); + +constexpr_if_then( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int then_id: @stmt ref +); + +constexpr_if_else( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int else_id: @stmt ref +); + +@stmt_consteval_or_not_consteval_if = @stmt_consteval_if | @stmt_not_consteval_if; + +consteval_if_then( + unique int constexpr_if_stmt: @stmt_consteval_or_not_consteval_if ref, + int then_id: @stmt ref +); + +consteval_if_else( + unique int constexpr_if_stmt: @stmt_consteval_or_not_consteval_if ref, + int else_id: @stmt ref +); + +while_body( + unique int while_stmt: @stmt_while ref, + int body_id: @stmt ref +); + +do_body( + unique int do_stmt: @stmt_end_test_while ref, + int body_id: @stmt ref +); + +switch_initialization( + unique int switch_stmt: @stmt_switch ref, + int init_id: @stmt ref +); + +#keyset[switch_stmt, index] +switch_case( + int switch_stmt: @stmt_switch ref, + int index: int ref, + int case_id: @stmt_switch_case ref +); + +switch_body( + unique int switch_stmt: @stmt_switch ref, + int body_id: @stmt ref +); + +@stmt_for_or_range_based_for = @stmt_for + | @stmt_range_based_for; + +for_initialization( + unique int for_stmt: @stmt_for_or_range_based_for ref, + int init_id: @stmt ref +); + +for_condition( + unique int for_stmt: @stmt_for ref, + int condition_id: @expr ref +); + +for_update( + unique int for_stmt: @stmt_for ref, + int update_id: @expr ref +); + +for_body( + unique int for_stmt: @stmt_for ref, + int body_id: @stmt ref +); + +@stmtparent = @stmt | @expr_stmt ; +stmtparents( + unique int id: @stmt ref, + int index: int ref, + int parent: @stmtparent ref +); + +ishandler(unique int block: @stmt_block ref); + +@cfgnode = @stmt | @expr | @function | @initialiser ; + +stmt_decl_bind( + int stmt: @stmt_decl ref, + int num: int ref, + int decl: @declaration ref +); + +stmt_decl_entry_bind( + int stmt: @stmt_decl ref, + int num: int ref, + int decl_entry: @element ref +); + +@parameterized_element = @function | @stmt_block | @requires_expr; + +blockscope( + unique int block: @stmt_block ref, + int enclosing: @parameterized_element ref +); + +@jump = @stmt_goto | @stmt_break | @stmt_continue | @stmt_leave; + +@jumporlabel = @jump | @stmt_label | @literal; + +jumpinfo( + unique int id: @jumporlabel ref, + string str: string ref, + int target: @stmt ref +); + +preprocdirects( + unique int id: @preprocdirect, + int kind: int ref, + int location: @location_default ref +); +case @preprocdirect.kind of + 0 = @ppd_if +| 1 = @ppd_ifdef +| 2 = @ppd_ifndef +| 3 = @ppd_elif +| 4 = @ppd_else +| 5 = @ppd_endif +| 6 = @ppd_plain_include +| 7 = @ppd_define +| 8 = @ppd_undef +| 9 = @ppd_line +| 10 = @ppd_error +| 11 = @ppd_pragma +| 12 = @ppd_objc_import +| 13 = @ppd_include_next +| 14 = @ppd_ms_import +| 15 = @ppd_elifdef +| 16 = @ppd_elifndef +| 18 = @ppd_warning +; + +@ppd_include = @ppd_plain_include | @ppd_objc_import | @ppd_include_next | @ppd_ms_import; + +@ppd_branch = @ppd_if | @ppd_ifdef | @ppd_ifndef | @ppd_elif | @ppd_elifdef | @ppd_elifndef; + +preprocpair( + int begin : @ppd_branch ref, + int elseelifend : @preprocdirect ref +); + +preproctrue(int branch : @ppd_branch ref); +preprocfalse(int branch : @ppd_branch ref); + +preproctext( + unique int id: @preprocdirect ref, + string head: string ref, + string body: string ref +); + +includes( + unique int id: @ppd_include ref, + int included: @file ref +); + +link_targets( + int id: @link_target, + int binary: @file ref +); + +link_parent( + int element : @element ref, + int link_target : @link_target ref +); + +/* XML Files */ + +xmlEncoding(unique int id: @file ref, string encoding: string ref); + +xmlDTDs( + unique int id: @xmldtd, + string root: string ref, + string publicId: string ref, + string systemId: string ref, + int fileid: @file ref +); + +xmlElements( + unique int id: @xmlelement, + string name: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int fileid: @file ref +); + +xmlAttrs( + unique int id: @xmlattribute, + int elementid: @xmlelement ref, + string name: string ref, + string value: string ref, + int idx: int ref, + int fileid: @file ref +); + +xmlNs( + int id: @xmlnamespace, + string prefixName: string ref, + string URI: string ref, + int fileid: @file ref +); + +xmlHasNs( + int elementId: @xmlnamespaceable ref, + int nsId: @xmlnamespace ref, + int fileid: @file ref +); + +xmlComments( + unique int id: @xmlcomment, + string text: string ref, + int parentid: @xmlparent ref, + int fileid: @file ref +); + +xmlChars( + unique int id: @xmlcharacters, + string text: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int isCDATA: int ref, + int fileid: @file ref +); + +@xmlparent = @file | @xmlelement; +@xmlnamespaceable = @xmlelement | @xmlattribute; + +xmllocations( + int xmlElement: @xmllocatable ref, + int location: @location_default ref +); + +@xmllocatable = @xmlcharacters + | @xmlelement + | @xmlcomment + | @xmlattribute + | @xmldtd + | @file + | @xmlnamespace; diff --git a/cpp/ql/lib/upgrades/e38346051783182ea75822e4adf8d4c6a949bc37/semmlecode.cpp.dbscheme b/cpp/ql/lib/upgrades/e38346051783182ea75822e4adf8d4c6a949bc37/semmlecode.cpp.dbscheme new file mode 100644 index 00000000000..7bc12b02a43 --- /dev/null +++ b/cpp/ql/lib/upgrades/e38346051783182ea75822e4adf8d4c6a949bc37/semmlecode.cpp.dbscheme @@ -0,0 +1,2509 @@ + +/** + * An invocation of the compiler. Note that more than one file may be + * compiled per invocation. For example, this command compiles three + * source files: + * + * gcc -c f1.c f2.c f3.c + * + * The `id` simply identifies the invocation, while `cwd` is the working + * directory from which the compiler was invoked. + */ +compilations( + /** + * An invocation of the compiler. Note that more than one file may + * be compiled per invocation. For example, this command compiles + * three source files: + * + * gcc -c f1.c f2.c f3.c + */ + unique int id : @compilation, + string cwd : string ref +); + +/** + * The arguments that were passed to the extractor for a compiler + * invocation. If `id` is for the compiler invocation + * + * gcc -c f1.c f2.c f3.c + * + * then typically there will be rows for + * + * num | arg + * --- | --- + * 0 | *path to extractor* + * 1 | `--mimic` + * 2 | `/usr/bin/gcc` + * 3 | `-c` + * 4 | f1.c + * 5 | f2.c + * 6 | f3.c + */ +#keyset[id, num] +compilation_args( + int id : @compilation ref, + int num : int ref, + string arg : string ref +); + +/** + * Optionally, record the build mode for each compilation. + */ +compilation_build_mode( + unique int id : @compilation ref, + int mode : int ref +); + +/* +case @compilation_build_mode.mode of + 0 = @build_mode_none +| 1 = @build_mode_manual +| 2 = @build_mode_auto +; +*/ + +/** + * The source files that are compiled by a compiler invocation. + * If `id` is for the compiler invocation + * + * gcc -c f1.c f2.c f3.c + * + * then there will be rows for + * + * num | arg + * --- | --- + * 0 | f1.c + * 1 | f2.c + * 2 | f3.c + * + * Note that even if those files `#include` headers, those headers + * do not appear as rows. + */ +#keyset[id, num] +compilation_compiling_files( + int id : @compilation ref, + int num : int ref, + int file : @file ref +); + +/** + * The time taken by the extractor for a compiler invocation. + * + * For each file `num`, there will be rows for + * + * kind | seconds + * ---- | --- + * 1 | CPU seconds used by the extractor frontend + * 2 | Elapsed seconds during the extractor frontend + * 3 | CPU seconds used by the extractor backend + * 4 | Elapsed seconds during the extractor backend + */ +#keyset[id, num, kind] +compilation_time( + int id : @compilation ref, + int num : int ref, + /* kind: + 1 = frontend_cpu_seconds + 2 = frontend_elapsed_seconds + 3 = extractor_cpu_seconds + 4 = extractor_elapsed_seconds + */ + int kind : int ref, + float seconds : float ref +); + +/** + * An error or warning generated by the extractor. + * The diagnostic message `diagnostic` was generated during compiler + * invocation `compilation`, and is the `file_number_diagnostic_number`th + * message generated while extracting the `file_number`th file of that + * invocation. + */ +#keyset[compilation, file_number, file_number_diagnostic_number] +diagnostic_for( + int diagnostic : @diagnostic ref, + int compilation : @compilation ref, + int file_number : int ref, + int file_number_diagnostic_number : int ref +); + +/** + * If extraction was successful, then `cpu_seconds` and + * `elapsed_seconds` are the CPU time and elapsed time (respectively) + * that extraction took for compiler invocation `id`. + */ +compilation_finished( + unique int id : @compilation ref, + float cpu_seconds : float ref, + float elapsed_seconds : float ref +); + + +/** + * External data, loaded from CSV files during snapshot creation. See + * [Tutorial: Incorporating external data](https://help.semmle.com/wiki/display/SD/Tutorial%3A+Incorporating+external+data) + * for more information. + */ +externalData( + int id : @externalDataElement, + string path : string ref, + int column: int ref, + string value : string ref +); + +/** + * The source location of the snapshot. + */ +sourceLocationPrefix(string prefix : string ref); + +/** + * Information about packages that provide code used during compilation. + * The `id` is just a unique identifier. + * The `namespace` is typically the name of the package manager that + * provided the package (e.g. "dpkg" or "yum"). + * The `package_name` is the name of the package, and `version` is its + * version (as a string). + */ +external_packages( + unique int id: @external_package, + string namespace : string ref, + string package_name : string ref, + string version : string ref +); + +/** + * Holds if File `fileid` was provided by package `package`. + */ +header_to_external_package( + int fileid : @file ref, + int package : @external_package ref +); + +/* + * Version history + */ + +svnentries( + unique int id : @svnentry, + string revision : string ref, + string author : string ref, + date revisionDate : date ref, + int changeSize : int ref +) + +svnaffectedfiles( + int id : @svnentry ref, + int file : @file ref, + string action : string ref +) + +svnentrymsg( + unique int id : @svnentry ref, + string message : string ref +) + +svnchurn( + int commit : @svnentry ref, + int file : @file ref, + int addedLines : int ref, + int deletedLines : int ref +) + +/* + * C++ dbscheme + */ + +extractor_version( + string codeql_version: string ref, + string frontend_version: string ref +) + +@location = @location_stmt | @location_expr | @location_default ; + +/** + * The location of an element that is not an expression or a statement. + * The location spans column `startcolumn` of line `startline` to + * column `endcolumn` of line `endline` in file `file`. + * For more information, see + * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/). + */ +locations_default( + /** The location of an element that is not an expression or a statement. */ + unique int id: @location_default, + int container: @container ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +/** + * The location of a statement. + * The location spans column `startcolumn` of line `startline` to + * column `endcolumn` of line `endline` in file `file`. + * For more information, see + * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/). + */ +locations_stmt( + /** The location of a statement. */ + unique int id: @location_stmt, + int container: @container ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +/** + * The location of an expression. + * The location spans column `startcolumn` of line `startline` to + * column `endcolumn` of line `endline` in file `file`. + * For more information, see + * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/). + */ +locations_expr( + /** The location of an expression. */ + unique int id: @location_expr, + int container: @container ref, + int startLine: int ref, + int startColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +/** An element for which line-count information is available. */ +@sourceline = @file | @function | @variable | @enumconstant | @xmllocatable; + +numlines( + int element_id: @sourceline ref, + int num_lines: int ref, + int num_code: int ref, + int num_comment: int ref +); + +diagnostics( + unique int id: @diagnostic, + int severity: int ref, + string error_tag: string ref, + string error_message: string ref, + string full_error_message: string ref, + int location: @location_default ref +); + +files( + unique int id: @file, + string name: string ref +); + +folders( + unique int id: @folder, + string name: string ref +); + +@container = @folder | @file + +containerparent( + int parent: @container ref, + unique int child: @container ref +); + +fileannotations( + int id: @file ref, + int kind: int ref, + string name: string ref, + string value: string ref +); + +inmacroexpansion( + int id: @element ref, + int inv: @macroinvocation ref +); + +affectedbymacroexpansion( + int id: @element ref, + int inv: @macroinvocation ref +); + +case @macroinvocation.kind of + 1 = @macro_expansion +| 2 = @other_macro_reference +; + +macroinvocations( + unique int id: @macroinvocation, + int macro_id: @ppd_define ref, + int location: @location_default ref, + int kind: int ref +); + +macroparent( + unique int id: @macroinvocation ref, + int parent_id: @macroinvocation ref +); + +// a macroinvocation may be part of another location +// the way to find a constant expression that uses a macro +// is thus to find a constant expression that has a location +// to which a macro invocation is bound +macrolocationbind( + int id: @macroinvocation ref, + int location: @location ref +); + +#keyset[invocation, argument_index] +macro_argument_unexpanded( + int invocation: @macroinvocation ref, + int argument_index: int ref, + string text: string ref +); + +#keyset[invocation, argument_index] +macro_argument_expanded( + int invocation: @macroinvocation ref, + int argument_index: int ref, + string text: string ref +); + +/* +case @function.kind of + 1 = @normal_function +| 2 = @constructor +| 3 = @destructor +| 4 = @conversion_function +| 5 = @operator +| 6 = @builtin_function // GCC built-in functions, e.g. __builtin___memcpy_chk +| 7 = @user_defined_literal +| 8 = @deduction_guide +; +*/ + +functions( + unique int id: @function, + string name: string ref, + int kind: int ref +); + +function_entry_point( + int id: @function ref, + unique int entry_point: @stmt ref +); + +function_return_type( + int id: @function ref, + int return_type: @type ref +); + +/** + * If `function` is a coroutine, then this gives the `std::experimental::resumable_traits` + * instance associated with it, and the variables representing the `handle` and `promise` + * for it. + */ +coroutine( + unique int function: @function ref, + int traits: @type ref +); + +/* +case @coroutine_placeholder_variable.kind of + 1 = @handle +| 2 = @promise +| 3 = @init_await_resume +; +*/ + +coroutine_placeholder_variable( + unique int placeholder_variable: @variable ref, + int kind: int ref, + int function: @function ref +) + +/** The `new` function used for allocating the coroutine state, if any. */ +coroutine_new( + unique int function: @function ref, + int new: @function ref +); + +/** The `delete` function used for deallocating the coroutine state, if any. */ +coroutine_delete( + unique int function: @function ref, + int delete: @function ref +); + +purefunctions(unique int id: @function ref); + +function_deleted(unique int id: @function ref); + +function_defaulted(unique int id: @function ref); + +function_prototyped(unique int id: @function ref) + +deduction_guide_for_class( + int id: @function ref, + int class_template: @usertype ref +) + +member_function_this_type( + unique int id: @function ref, + int this_type: @type ref +); + +#keyset[id, type_id] +fun_decls( + int id: @fun_decl, + int function: @function ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); +fun_def(unique int id: @fun_decl ref); +fun_specialized(unique int id: @fun_decl ref); +fun_implicit(unique int id: @fun_decl ref); +fun_decl_specifiers( + int id: @fun_decl ref, + string name: string ref +) +#keyset[fun_decl, index] +fun_decl_throws( + int fun_decl: @fun_decl ref, + int index: int ref, + int type_id: @type ref +); +/* an empty throw specification is different from none */ +fun_decl_empty_throws(unique int fun_decl: @fun_decl ref); +fun_decl_noexcept( + int fun_decl: @fun_decl ref, + int constant: @expr ref +); +fun_decl_empty_noexcept(int fun_decl: @fun_decl ref); +fun_decl_typedef_type( + unique int fun_decl: @fun_decl ref, + int typedeftype_id: @usertype ref +); + +/* +case @fun_requires.kind of + 1 = @template_attached +| 2 = @function_attached +; +*/ + +fun_requires( + int id: @fun_decl ref, + int kind: int ref, + int constraint: @expr ref +); + +param_decl_bind( + unique int id: @var_decl ref, + int index: int ref, + int fun_decl: @fun_decl ref +); + +#keyset[id, type_id] +var_decls( + int id: @var_decl, + int variable: @variable ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); +var_def(unique int id: @var_decl ref); +var_specialized(int id: @var_decl ref); +var_decl_specifiers( + int id: @var_decl ref, + string name: string ref +) +is_structured_binding(unique int id: @variable ref); +var_requires( + int id: @var_decl ref, + int constraint: @expr ref +); + +type_decls( + unique int id: @type_decl, + int type_id: @type ref, + int location: @location_default ref +); +type_def(unique int id: @type_decl ref); +type_decl_top( + unique int type_decl: @type_decl ref +); +type_requires( + int id: @type_decl ref, + int constraint: @expr ref +); + +namespace_decls( + unique int id: @namespace_decl, + int namespace_id: @namespace ref, + int location: @location_default ref, + int bodylocation: @location_default ref +); + +case @using.kind of + 1 = @using_declaration +| 2 = @using_directive +| 3 = @using_enum_declaration +; + +usings( + unique int id: @using, + int element_id: @element ref, + int location: @location_default ref, + int kind: int ref +); + +/** The element which contains the `using` declaration. */ +using_container( + int parent: @element ref, + int child: @using ref +); + +static_asserts( + unique int id: @static_assert, + int condition : @expr ref, + string message : string ref, + int location: @location_default ref, + int enclosing : @element ref +); + +// each function has an ordered list of parameters +#keyset[id, type_id] +#keyset[function, index, type_id] +params( + int id: @parameter, + int function: @parameterized_element ref, + int index: int ref, + int type_id: @type ref +); + +overrides( + int new: @function ref, + int old: @function ref +); + +#keyset[id, type_id] +membervariables( + int id: @membervariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +globalvariables( + int id: @globalvariable, + int type_id: @type ref, + string name: string ref +); + +#keyset[id, type_id] +localvariables( + int id: @localvariable, + int type_id: @type ref, + string name: string ref +); + +autoderivation( + unique int var: @variable ref, + int derivation_type: @type ref +); + +orphaned_variables( + int var: @localvariable ref, + int function: @function ref +) + +enumconstants( + unique int id: @enumconstant, + int parent: @usertype ref, + int index: int ref, + int type_id: @type ref, + string name: string ref, + int location: @location_default ref +); + +@variable = @localscopevariable | @globalvariable | @membervariable; + +@localscopevariable = @localvariable | @parameter; + +/** + * Built-in types are the fundamental types, e.g., integral, floating, and void. + */ +case @builtintype.kind of + 1 = @errortype +| 2 = @unknowntype +| 3 = @void +| 4 = @boolean +| 5 = @char +| 6 = @unsigned_char +| 7 = @signed_char +| 8 = @short +| 9 = @unsigned_short +| 10 = @signed_short +| 11 = @int +| 12 = @unsigned_int +| 13 = @signed_int +| 14 = @long +| 15 = @unsigned_long +| 16 = @signed_long +| 17 = @long_long +| 18 = @unsigned_long_long +| 19 = @signed_long_long +// ... 20 Microsoft-specific __int8 +// ... 21 Microsoft-specific __int16 +// ... 22 Microsoft-specific __int32 +// ... 23 Microsoft-specific __int64 +| 24 = @float +| 25 = @double +| 26 = @long_double +| 27 = @complex_float // C99-specific _Complex float +| 28 = @complex_double // C99-specific _Complex double +| 29 = @complex_long_double // C99-specific _Complex long double +| 30 = @imaginary_float // C99-specific _Imaginary float +| 31 = @imaginary_double // C99-specific _Imaginary double +| 32 = @imaginary_long_double // C99-specific _Imaginary long double +| 33 = @wchar_t // Microsoft-specific +| 34 = @decltype_nullptr // C++11 +| 35 = @int128 // __int128 +| 36 = @unsigned_int128 // unsigned __int128 +| 37 = @signed_int128 // signed __int128 +| 38 = @float128 // __float128 +| 39 = @complex_float128 // _Complex __float128 +| 40 = @decimal32 // _Decimal32 +| 41 = @decimal64 // _Decimal64 +| 42 = @decimal128 // _Decimal128 +| 43 = @char16_t +| 44 = @char32_t +| 45 = @std_float32 // _Float32 +| 46 = @float32x // _Float32x +| 47 = @std_float64 // _Float64 +| 48 = @float64x // _Float64x +| 49 = @std_float128 // _Float128 +// ... 50 _Float128x +| 51 = @char8_t +| 52 = @float16 // _Float16 +| 53 = @complex_float16 // _Complex _Float16 +| 54 = @fp16 // __fp16 +| 55 = @std_bfloat16 // __bf16 +| 56 = @std_float16 // std::float16_t +| 57 = @complex_std_float32 // _Complex _Float32 +| 58 = @complex_float32x // _Complex _Float32x +| 59 = @complex_std_float64 // _Complex _Float64 +| 60 = @complex_float64x // _Complex _Float64x +| 61 = @complex_std_float128 // _Complex _Float128 +| 62 = @mfp8 // __mfp8 +| 63 = @scalable_vector_count // __SVCount_t +| 64 = @complex_fp16 // _Complex __fp16 +| 65 = @complex_std_bfloat16 // _Complex __bf16 +| 66 = @complex_std_float16 // _Complex std::float16_t +; + +builtintypes( + unique int id: @builtintype, + string name: string ref, + int kind: int ref, + int size: int ref, + int sign: int ref, + int alignment: int ref +); + +/** + * Derived types are types that are directly derived from existing types and + * point to, refer to, transform type data to return a new type. + */ +case @derivedtype.kind of + 1 = @pointer +| 2 = @reference +| 3 = @type_with_specifiers +| 4 = @array +| 5 = @gnu_vector +| 6 = @routineptr +| 7 = @routinereference +| 8 = @rvalue_reference // C++11 +// ... 9 type_conforming_to_protocols deprecated +| 10 = @block +| 11 = @scalable_vector // Arm SVE +; + +derivedtypes( + unique int id: @derivedtype, + string name: string ref, + int kind: int ref, + int type_id: @type ref +); + +pointerishsize(unique int id: @derivedtype ref, + int size: int ref, + int alignment: int ref); + +arraysizes( + unique int id: @derivedtype ref, + int num_elements: int ref, + int bytesize: int ref, + int alignment: int ref +); + +tupleelements( + unique int id: @derivedtype ref, + int num_elements: int ref +); + +typedefbase( + unique int id: @usertype ref, + int type_id: @type ref +); + +/** + * An instance of the C++11 `decltype` operator or C23 `typeof`/`typeof_unqual` + * operator taking an expression as its argument. For example: + * ``` + * int a; + * decltype(1+a) b; + * typeof(1+a) c; + * ``` + * Here `expr` is `1+a`. + * + * Sometimes an additional pair of parentheses around the expression + * changes the semantics of the decltype, e.g. + * ``` + * struct A { double x; }; + * const A* a = new A(); + * decltype( a->x ); // type is double + * decltype((a->x)); // type is const double& + * ``` + * (Please consult the C++11 standard for more details). + * `parentheses_would_change_meaning` is `true` iff that is the case. + */ + +/* +case @decltype.kind of +| 0 = @decltype +| 1 = @typeof // The frontend does not differentiate between typeof and typeof_unqual +; +*/ + +#keyset[id, expr] +decltypes( + int id: @decltype, + int expr: @expr ref, + int kind: int ref, + int base_type: @type ref, + boolean parentheses_would_change_meaning: boolean ref +); + +/* +case @type_operator.kind of +| 0 = @typeof // The frontend does not differentiate between typeof and typeof_unqual +| 1 = @underlying_type +| 2 = @bases +| 3 = @direct_bases +| 4 = @add_lvalue_reference +| 5 = @add_pointer +| 6 = @add_rvalue_reference +| 7 = @decay +| 8 = @make_signed +| 9 = @make_unsigned +| 10 = @remove_all_extents +| 11 = @remove_const +| 12 = @remove_cv +| 13 = @remove_cvref +| 14 = @remove_extent +| 15 = @remove_pointer +| 16 = @remove_reference_t +| 17 = @remove_restrict +| 18 = @remove_volatile +| 19 = @remove_reference +; +*/ + +type_operators( + unique int id: @type_operator, + int arg_type: @type ref, + int kind: int ref, + int base_type: @type ref +) + +/* +case @usertype.kind of +| 0 = @unknown_usertype +| 1 = @struct +| 2 = @class +| 3 = @union +| 4 = @enum +// ... 5 = @typedef deprecated // classic C: typedef typedef type name +// ... 6 = @template deprecated +| 7 = @template_parameter +| 8 = @template_template_parameter +| 9 = @proxy_class // a proxy class associated with a template parameter +// ... 10 objc_class deprecated +// ... 11 objc_protocol deprecated +// ... 12 objc_category deprecated +| 13 = @scoped_enum +// ... 14 = @using_alias deprecated // a using name = type style typedef +| 15 = @template_struct +| 16 = @template_class +| 17 = @template_union +| 18 = @alias +; +*/ + +usertypes( + unique int id: @usertype, + string name: string ref, + int kind: int ref +); + +usertypesize( + unique int id: @usertype ref, + int size: int ref, + int alignment: int ref +); + +usertype_final(unique int id: @usertype ref); + +usertype_uuid( + unique int id: @usertype ref, + string uuid: string ref +); + +/* +case @usertype.alias_kind of +| 0 = @typedef +| 1 = @alias +*/ + +usertype_alias_kind( + int id: @usertype ref, + int alias_kind: int ref +) + +nontype_template_parameters( + int id: @expr ref +); + +type_template_type_constraint( + int id: @usertype ref, + int constraint: @expr ref +); + +mangled_name( + unique int id: @declaration ref, + int mangled_name : @mangledname, + boolean is_complete: boolean ref +); + +is_pod_class(unique int id: @usertype ref); +is_standard_layout_class(unique int id: @usertype ref); + +is_complete(unique int id: @usertype ref); + +is_class_template(unique int id: @usertype ref); +class_instantiation( + int to: @usertype ref, + int from: @usertype ref +); +class_template_argument( + int type_id: @usertype ref, + int index: int ref, + int arg_type: @type ref +); +class_template_argument_value( + int type_id: @usertype ref, + int index: int ref, + int arg_value: @expr ref +); + +@user_or_decltype = @usertype | @decltype; + +is_proxy_class_for( + unique int id: @usertype ref, + int templ_param_id: @user_or_decltype ref +); + +type_mentions( + unique int id: @type_mention, + int type_id: @type ref, + int location: @location ref, + // a_symbol_reference_kind from the frontend. + int kind: int ref +); + +is_function_template(unique int id: @function ref); +function_instantiation( + unique int to: @function ref, + int from: @function ref +); +function_template_argument( + int function_id: @function ref, + int index: int ref, + int arg_type: @type ref +); +function_template_argument_value( + int function_id: @function ref, + int index: int ref, + int arg_value: @expr ref +); + +is_variable_template(unique int id: @variable ref); +variable_instantiation( + unique int to: @variable ref, + int from: @variable ref +); +variable_template_argument( + int variable_id: @variable ref, + int index: int ref, + int arg_type: @type ref +); +variable_template_argument_value( + int variable_id: @variable ref, + int index: int ref, + int arg_value: @expr ref +); + +template_template_instantiation( + int to: @usertype ref, + int from: @usertype ref +); +template_template_argument( + int type_id: @usertype ref, + int index: int ref, + int arg_type: @type ref +); +template_template_argument_value( + int type_id: @usertype ref, + int index: int ref, + int arg_value: @expr ref +); + +@concept = @concept_template | @concept_id; + +concept_templates( + unique int concept_id: @concept_template, + string name: string ref, + int location: @location_default ref +); +concept_instantiation( + unique int to: @concept_id ref, + int from: @concept_template ref +); +is_type_constraint(int concept_id: @concept_id ref); +concept_template_argument( + int concept_id: @concept ref, + int index: int ref, + int arg_type: @type ref +); +concept_template_argument_value( + int concept_id: @concept ref, + int index: int ref, + int arg_value: @expr ref +); + +routinetypes( + unique int id: @routinetype, + int return_type: @type ref +); + +routinetypeargs( + int routine: @routinetype ref, + int index: int ref, + int type_id: @type ref +); + +ptrtomembers( + unique int id: @ptrtomember, + int type_id: @type ref, + int class_id: @type ref +); + +/* + specifiers for types, functions, and variables + + "public", + "protected", + "private", + + "const", + "volatile", + "static", + + "pure", + "virtual", + "sealed", // Microsoft + "__interface", // Microsoft + "inline", + "explicit", + + "near", // near far extension + "far", // near far extension + "__ptr32", // Microsoft + "__ptr64", // Microsoft + "__sptr", // Microsoft + "__uptr", // Microsoft + "dllimport", // Microsoft + "dllexport", // Microsoft + "thread", // Microsoft + "naked", // Microsoft + "microsoft_inline", // Microsoft + "forceinline", // Microsoft + "selectany", // Microsoft + "nothrow", // Microsoft + "novtable", // Microsoft + "noreturn", // Microsoft + "noinline", // Microsoft + "noalias", // Microsoft + "restrict", // Microsoft +*/ + +specifiers( + unique int id: @specifier, + unique string str: string ref +); + +typespecifiers( + int type_id: @type ref, + int spec_id: @specifier ref +); + +funspecifiers( + int func_id: @function ref, + int spec_id: @specifier ref +); + +varspecifiers( + int var_id: @accessible ref, + int spec_id: @specifier ref +); + +explicit_specifier_exprs( + unique int func_id: @function ref, + int constant: @expr ref +) + +attributes( + unique int id: @attribute, + int kind: int ref, + string name: string ref, + string name_space: string ref, + int location: @location_default ref +); + +case @attribute.kind of + 0 = @gnuattribute +| 1 = @stdattribute +| 2 = @declspec +| 3 = @msattribute +| 4 = @alignas +// ... 5 @objc_propertyattribute deprecated +; + +attribute_args( + unique int id: @attribute_arg, + int kind: int ref, + int attribute: @attribute ref, + int index: int ref, + int location: @location_default ref +); + +case @attribute_arg.kind of + 0 = @attribute_arg_empty +| 1 = @attribute_arg_token +| 2 = @attribute_arg_constant +| 3 = @attribute_arg_type +| 4 = @attribute_arg_constant_expr +| 5 = @attribute_arg_expr +; + +attribute_arg_value( + unique int arg: @attribute_arg ref, + string value: string ref +); +attribute_arg_type( + unique int arg: @attribute_arg ref, + int type_id: @type ref +); +attribute_arg_constant( + unique int arg: @attribute_arg ref, + int constant: @expr ref +) +attribute_arg_expr( + unique int arg: @attribute_arg ref, + int expr: @expr ref +) +attribute_arg_name( + unique int arg: @attribute_arg ref, + string name: string ref +); + +typeattributes( + int type_id: @type ref, + int spec_id: @attribute ref +); + +funcattributes( + int func_id: @function ref, + int spec_id: @attribute ref +); + +varattributes( + int var_id: @accessible ref, + int spec_id: @attribute ref +); + +namespaceattributes( + int namespace_id: @namespace ref, + int spec_id: @attribute ref +); + +stmtattributes( + int stmt_id: @stmt ref, + int spec_id: @attribute ref +); + +@type = @builtintype + | @derivedtype + | @usertype + | @routinetype + | @ptrtomember + | @decltype + | @type_operator; + +unspecifiedtype( + unique int type_id: @type ref, + int unspecified_type_id: @type ref +); + +member( + int parent: @type ref, + int index: int ref, + int child: @member ref +); + +@enclosingfunction_child = @usertype | @variable | @namespace + +enclosingfunction( + unique int child: @enclosingfunction_child ref, + int parent: @function ref +); + +derivations( + unique int derivation: @derivation, + int sub: @type ref, + int index: int ref, + int super: @type ref, + int location: @location_default ref +); + +derspecifiers( + int der_id: @derivation ref, + int spec_id: @specifier ref +); + +/** + * Contains the byte offset of the base class subobject within the derived + * class. Only holds for non-virtual base classes, but see table + * `virtual_base_offsets` for offsets of virtual base class subobjects. + */ +direct_base_offsets( + unique int der_id: @derivation ref, + int offset: int ref +); + +/** + * Contains the byte offset of the virtual base class subobject for class + * `super` within a most-derived object of class `sub`. `super` can be either a + * direct or indirect base class. + */ +#keyset[sub, super] +virtual_base_offsets( + int sub: @usertype ref, + int super: @usertype ref, + int offset: int ref +); + +frienddecls( + unique int id: @frienddecl, + int type_id: @type ref, + int decl_id: @declaration ref, + int location: @location_default ref +); + +@declaredtype = @usertype ; + +@declaration = @function + | @declaredtype + | @variable + | @enumconstant + | @frienddecl + | @concept_template; + +@member = @membervariable + | @function + | @declaredtype + | @enumconstant; + +@locatable = @diagnostic + | @declaration + | @ppd_include + | @ppd_define + | @macroinvocation + /*| @funcall*/ + | @xmllocatable + | @attribute + | @attribute_arg; + +@namedscope = @namespace | @usertype; + +@element = @locatable + | @file + | @folder + | @specifier + | @type + | @expr + | @namespace + | @initialiser + | @stmt + | @derivation + | @comment + | @preprocdirect + | @fun_decl + | @var_decl + | @type_decl + | @namespace_decl + | @using + | @namequalifier + | @specialnamequalifyingelement + | @static_assert + | @type_mention + | @lambdacapture; + +@exprparent = @element; + +comments( + unique int id: @comment, + string contents: string ref, + int location: @location_default ref +); + +commentbinding( + int id: @comment ref, + int element: @element ref +); + +exprconv( + int converted: @expr ref, + unique int conversion: @expr ref +); + +compgenerated(unique int id: @element ref); + +/** + * `destructor_call` destructs the `i`'th entity that should be + * destructed following `element`. Note that entities should be + * destructed in reverse construction order, so for a given `element` + * these should be called from highest to lowest `i`. + */ +#keyset[element, destructor_call] +#keyset[element, i] +synthetic_destructor_call( + int element: @element ref, + int i: int ref, + int destructor_call: @routineexpr ref +); + +namespaces( + unique int id: @namespace, + string name: string ref +); + +namespace_inline( + unique int id: @namespace ref +); + +namespacembrs( + int parentid: @namespace ref, + unique int memberid: @namespacembr ref +); + +@namespacembr = @declaration | @namespace; + +exprparents( + int expr_id: @expr ref, + int child_index: int ref, + int parent_id: @exprparent ref +); + +expr_isload(unique int expr_id: @expr ref); + +@cast = @c_style_cast + | @const_cast + | @dynamic_cast + | @reinterpret_cast + | @static_cast + ; + +/* +case @conversion.kind of + 0 = @simple_conversion // a numeric conversion, qualification conversion, or a reinterpret_cast +| 1 = @bool_conversion // conversion to 'bool' +| 2 = @base_class_conversion // a derived-to-base conversion +| 3 = @derived_class_conversion // a base-to-derived conversion +| 4 = @pm_base_class_conversion // a derived-to-base conversion of a pointer to member +| 5 = @pm_derived_class_conversion // a base-to-derived conversion of a pointer to member +| 6 = @glvalue_adjust // an adjustment of the type of a glvalue +| 7 = @prvalue_adjust // an adjustment of the type of a prvalue +; +*/ +/** + * Describes the semantics represented by a cast expression. This is largely + * independent of the source syntax of the cast, so it is separate from the + * regular expression kind. + */ +conversionkinds( + unique int expr_id: @cast ref, + int kind: int ref +); + +@conversion = @cast + | @array_to_pointer + | @parexpr + | @reference_to + | @ref_indirect + | @temp_init + | @c11_generic + ; + +/* +case @funbindexpr.kind of + 0 = @normal_call // a normal call +| 1 = @virtual_call // a virtual call +| 2 = @adl_call // a call whose target is only found by ADL +; +*/ +iscall( + unique int caller: @funbindexpr ref, + int kind: int ref +); + +numtemplatearguments( + unique int expr_id: @expr ref, + int num: int ref +); + +specialnamequalifyingelements( + unique int id: @specialnamequalifyingelement, + unique string name: string ref +); + +@namequalifiableelement = @expr | @namequalifier; +@namequalifyingelement = @namespace + | @specialnamequalifyingelement + | @usertype; + +namequalifiers( + unique int id: @namequalifier, + unique int qualifiableelement: @namequalifiableelement ref, + int qualifyingelement: @namequalifyingelement ref, + int location: @location_default ref +); + +varbind( + int expr: @varbindexpr ref, + int var: @accessible ref +); + +funbind( + int expr: @funbindexpr ref, + int fun: @function ref +); + +@any_new_expr = @new_expr + | @new_array_expr; + +@new_or_delete_expr = @any_new_expr + | @delete_expr + | @delete_array_expr; + +@prefix_crement_expr = @preincrexpr | @predecrexpr; + +@postfix_crement_expr = @postincrexpr | @postdecrexpr; + +@increment_expr = @preincrexpr | @postincrexpr; + +@decrement_expr = @predecrexpr | @postdecrexpr; + +@crement_expr = @increment_expr | @decrement_expr; + +@un_arith_op_expr = @arithnegexpr + | @unaryplusexpr + | @conjugation + | @realpartexpr + | @imagpartexpr + | @crement_expr + ; + +@un_bitwise_op_expr = @complementexpr; + +@un_log_op_expr = @notexpr; + +@un_op_expr = @address_of + | @indirect + | @un_arith_op_expr + | @un_bitwise_op_expr + | @builtinaddressof + | @vec_fill + | @un_log_op_expr + | @co_await + | @co_yield + ; + +@bin_log_op_expr = @andlogicalexpr | @orlogicalexpr; + +@cmp_op_expr = @eq_op_expr | @rel_op_expr; + +@eq_op_expr = @eqexpr | @neexpr; + +@rel_op_expr = @gtexpr + | @ltexpr + | @geexpr + | @leexpr + | @spaceshipexpr + ; + +@bin_bitwise_op_expr = @lshiftexpr + | @rshiftexpr + | @andexpr + | @orexpr + | @xorexpr + ; + +@p_arith_op_expr = @paddexpr + | @psubexpr + | @pdiffexpr + ; + +@bin_arith_op_expr = @addexpr + | @subexpr + | @mulexpr + | @divexpr + | @remexpr + | @jmulexpr + | @jdivexpr + | @fjaddexpr + | @jfaddexpr + | @fjsubexpr + | @jfsubexpr + | @minexpr + | @maxexpr + | @p_arith_op_expr + ; + +@bin_op_expr = @bin_arith_op_expr + | @bin_bitwise_op_expr + | @cmp_op_expr + | @bin_log_op_expr + ; + +@op_expr = @un_op_expr + | @bin_op_expr + | @assign_expr + | @conditionalexpr + ; + +@assign_arith_expr = @assignaddexpr + | @assignsubexpr + | @assignmulexpr + | @assigndivexpr + | @assignremexpr + ; + +@assign_bitwise_expr = @assignandexpr + | @assignorexpr + | @assignxorexpr + | @assignlshiftexpr + | @assignrshiftexpr + ; + +@assign_pointer_expr = @assignpaddexpr + | @assignpsubexpr + ; + +@assign_op_expr = @assign_arith_expr + | @assign_bitwise_expr + | @assign_pointer_expr + ; + +@assign_expr = @assignexpr | @assign_op_expr | @blockassignexpr + +/* + Binary encoding of the allocator form. + + case @allocator.form of + 0 = plain + | 1 = alignment + ; +*/ + +/** + * The allocator function associated with a `new` or `new[]` expression. + * The `form` column specified whether the allocation call contains an alignment + * argument. + */ +expr_allocator( + unique int expr: @any_new_expr ref, + int func: @function ref, + int form: int ref +); + +/* + Binary encoding of the deallocator form. + + case @deallocator.form of + 0 = plain + | 1 = size + | 2 = alignment + | 4 = destroying_delete + ; +*/ + +/** + * The deallocator function associated with a `delete`, `delete[]`, `new`, or + * `new[]` expression. For a `new` or `new[]` expression, the deallocator is the + * one used to free memory if the initialization throws an exception. + * The `form` column specifies whether the deallocation call contains a size + * argument, and alignment argument, or both. + */ +expr_deallocator( + unique int expr: @new_or_delete_expr ref, + int func: @function ref, + int form: int ref +); + +/** + * Holds if the `@conditionalexpr` is of the two operand form + * `guard ? : false`. + */ +expr_cond_two_operand( + unique int cond: @conditionalexpr ref +); + +/** + * The guard of `@conditionalexpr` `guard ? true : false` + */ +expr_cond_guard( + unique int cond: @conditionalexpr ref, + int guard: @expr ref +); + +/** + * The expression used when the guard of `@conditionalexpr` + * `guard ? true : false` holds. For the two operand form + * `guard ?: false` consider using `expr_cond_guard` instead. + */ +expr_cond_true( + unique int cond: @conditionalexpr ref, + int true: @expr ref +); + +/** + * The expression used when the guard of `@conditionalexpr` + * `guard ? true : false` does not hold. + */ +expr_cond_false( + unique int cond: @conditionalexpr ref, + int false: @expr ref +); + +/** A string representation of the value. */ +values( + unique int id: @value, + string str: string ref +); + +/** The actual text in the source code for the value, if any. */ +valuetext( + unique int id: @value ref, + string text: string ref +); + +valuebind( + int val: @value ref, + unique int expr: @expr ref +); + +fieldoffsets( + unique int id: @variable ref, + int byteoffset: int ref, + int bitoffset: int ref +); + +bitfield( + unique int id: @variable ref, + int bits: int ref, + int declared_bits: int ref +); + +/* TODO +memberprefix( + int member: @expr ref, + int prefix: @expr ref +); +*/ + +/* + kind(1) = mbrcallexpr + kind(2) = mbrptrcallexpr + kind(3) = mbrptrmbrcallexpr + kind(4) = ptrmbrptrmbrcallexpr + kind(5) = mbrreadexpr // x.y + kind(6) = mbrptrreadexpr // p->y + kind(7) = mbrptrmbrreadexpr // x.*pm + kind(8) = mbrptrmbrptrreadexpr // x->*pm + kind(9) = staticmbrreadexpr // static x.y + kind(10) = staticmbrptrreadexpr // static p->y +*/ +/* TODO +memberaccess( + int member: @expr ref, + int kind: int ref +); +*/ + +initialisers( + unique int init: @initialiser, + int var: @accessible ref, + unique int expr: @expr ref, + int location: @location_expr ref +); + +braced_initialisers( + int init: @initialiser ref +); + +/** + * An ancestor for the expression, for cases in which we cannot + * otherwise find the expression's parent. + */ +expr_ancestor( + int exp: @expr ref, + int ancestor: @element ref +); + +exprs( + unique int id: @expr, + int kind: int ref, + int location: @location_expr ref +); + +expr_reuse( + int reuse: @expr ref, + int original: @expr ref, + int value_category: int ref +) + +/* + case @value.category of + 1 = prval + | 2 = xval + | 3 = lval + ; +*/ +expr_types( + int id: @expr ref, + int typeid: @type ref, + int value_category: int ref +); + +case @expr.kind of + 1 = @errorexpr +| 2 = @address_of // & AddressOfExpr +| 3 = @reference_to // ReferenceToExpr (implicit?) +| 4 = @indirect // * PointerDereferenceExpr +| 5 = @ref_indirect // ReferenceDereferenceExpr (implicit?) +// ... +| 8 = @array_to_pointer // (???) +| 9 = @vacuous_destructor_call // VacuousDestructorCall +// ... +| 11 = @assume // Microsoft +| 12 = @parexpr +| 13 = @arithnegexpr +| 14 = @unaryplusexpr +| 15 = @complementexpr +| 16 = @notexpr +| 17 = @conjugation // GNU ~ operator +| 18 = @realpartexpr // GNU __real +| 19 = @imagpartexpr // GNU __imag +| 20 = @postincrexpr +| 21 = @postdecrexpr +| 22 = @preincrexpr +| 23 = @predecrexpr +| 24 = @conditionalexpr +| 25 = @addexpr +| 26 = @subexpr +| 27 = @mulexpr +| 28 = @divexpr +| 29 = @remexpr +| 30 = @jmulexpr // C99 mul imaginary +| 31 = @jdivexpr // C99 div imaginary +| 32 = @fjaddexpr // C99 add real + imaginary +| 33 = @jfaddexpr // C99 add imaginary + real +| 34 = @fjsubexpr // C99 sub real - imaginary +| 35 = @jfsubexpr // C99 sub imaginary - real +| 36 = @paddexpr // pointer add (pointer + int or int + pointer) +| 37 = @psubexpr // pointer sub (pointer - integer) +| 38 = @pdiffexpr // difference between two pointers +| 39 = @lshiftexpr +| 40 = @rshiftexpr +| 41 = @andexpr +| 42 = @orexpr +| 43 = @xorexpr +| 44 = @eqexpr +| 45 = @neexpr +| 46 = @gtexpr +| 47 = @ltexpr +| 48 = @geexpr +| 49 = @leexpr +| 50 = @minexpr // GNU minimum +| 51 = @maxexpr // GNU maximum +| 52 = @assignexpr +| 53 = @assignaddexpr +| 54 = @assignsubexpr +| 55 = @assignmulexpr +| 56 = @assigndivexpr +| 57 = @assignremexpr +| 58 = @assignlshiftexpr +| 59 = @assignrshiftexpr +| 60 = @assignandexpr +| 61 = @assignorexpr +| 62 = @assignxorexpr +| 63 = @assignpaddexpr // assign pointer add +| 64 = @assignpsubexpr // assign pointer sub +| 65 = @andlogicalexpr +| 66 = @orlogicalexpr +| 67 = @commaexpr +| 68 = @subscriptexpr // access to member of an array, e.g., a[5] +// ... 69 @objc_subscriptexpr deprecated +// ... 70 @cmdaccess deprecated +// ... +| 73 = @virtfunptrexpr +| 74 = @callexpr +// ... 75 @msgexpr_normal deprecated +// ... 76 @msgexpr_super deprecated +// ... 77 @atselectorexpr deprecated +// ... 78 @atprotocolexpr deprecated +| 79 = @vastartexpr +| 80 = @vaargexpr +| 81 = @vaendexpr +| 82 = @vacopyexpr +// ... 83 @atencodeexpr deprecated +| 84 = @varaccess +| 85 = @thisaccess +// ... 86 @objc_box_expr deprecated +| 87 = @new_expr +| 88 = @delete_expr +| 89 = @throw_expr +| 90 = @condition_decl // a variable declared in a condition, e.g., if(int x = y > 2) +| 91 = @braced_init_list +| 92 = @type_id +| 93 = @runtime_sizeof +| 94 = @runtime_alignof +| 95 = @sizeof_pack +| 96 = @expr_stmt // GNU extension +| 97 = @routineexpr +| 98 = @type_operand // used to access a type in certain contexts (haven't found any examples yet....) +| 99 = @offsetofexpr // offsetof ::= type and field +| 100 = @hasassignexpr // __has_assign ::= type +| 101 = @hascopyexpr // __has_copy ::= type +| 102 = @hasnothrowassign // __has_nothrow_assign ::= type +| 103 = @hasnothrowconstr // __has_nothrow_constructor ::= type +| 104 = @hasnothrowcopy // __has_nothrow_copy ::= type +| 105 = @hastrivialassign // __has_trivial_assign ::= type +| 106 = @hastrivialconstr // __has_trivial_constructor ::= type +| 107 = @hastrivialcopy // __has_trivial_copy ::= type +| 108 = @hasuserdestr // __has_user_destructor ::= type +| 109 = @hasvirtualdestr // __has_virtual_destructor ::= type +| 110 = @isabstractexpr // __is_abstract ::= type +| 111 = @isbaseofexpr // __is_base_of ::= type type +| 112 = @isclassexpr // __is_class ::= type +| 113 = @isconvtoexpr // __is_convertible_to ::= type type +| 114 = @isemptyexpr // __is_empty ::= type +| 115 = @isenumexpr // __is_enum ::= type +| 116 = @ispodexpr // __is_pod ::= type +| 117 = @ispolyexpr // __is_polymorphic ::= type +| 118 = @isunionexpr // __is_union ::= type +| 119 = @typescompexpr // GNU __builtin_types_compatible ::= type type +| 120 = @intaddrexpr // frontend internal builtin, used to implement offsetof +// ... +| 122 = @hastrivialdestructor // __has_trivial_destructor ::= type +| 123 = @literal +| 124 = @uuidof +| 127 = @aggregateliteral +| 128 = @delete_array_expr +| 129 = @new_array_expr +// ... 130 @objc_array_literal deprecated +// ... 131 @objc_dictionary_literal deprecated +| 132 = @foldexpr +// ... +| 200 = @ctordirectinit +| 201 = @ctorvirtualinit +| 202 = @ctorfieldinit +| 203 = @ctordelegatinginit +| 204 = @dtordirectdestruct +| 205 = @dtorvirtualdestruct +| 206 = @dtorfielddestruct +// ... +| 210 = @static_cast +| 211 = @reinterpret_cast +| 212 = @const_cast +| 213 = @dynamic_cast +| 214 = @c_style_cast +| 215 = @lambdaexpr +| 216 = @param_ref +| 217 = @noopexpr +// ... +| 294 = @istriviallyconstructibleexpr +| 295 = @isdestructibleexpr +| 296 = @isnothrowdestructibleexpr +| 297 = @istriviallydestructibleexpr +| 298 = @istriviallyassignableexpr +| 299 = @isnothrowassignableexpr +| 300 = @istrivialexpr +| 301 = @isstandardlayoutexpr +| 302 = @istriviallycopyableexpr +| 303 = @isliteraltypeexpr +| 304 = @hastrivialmoveconstructorexpr +| 305 = @hastrivialmoveassignexpr +| 306 = @hasnothrowmoveassignexpr +| 307 = @isconstructibleexpr +| 308 = @isnothrowconstructibleexpr +| 309 = @hasfinalizerexpr +| 310 = @isdelegateexpr +| 311 = @isinterfaceclassexpr +| 312 = @isrefarrayexpr +| 313 = @isrefclassexpr +| 314 = @issealedexpr +| 315 = @issimplevalueclassexpr +| 316 = @isvalueclassexpr +| 317 = @isfinalexpr +| 319 = @noexceptexpr +| 320 = @builtinshufflevector +| 321 = @builtinchooseexpr +| 322 = @builtinaddressof +| 323 = @vec_fill +| 324 = @builtinconvertvector +| 325 = @builtincomplex +| 326 = @spaceshipexpr +| 327 = @co_await +| 328 = @co_yield +| 329 = @temp_init +| 330 = @isassignable +| 331 = @isaggregate +| 332 = @hasuniqueobjectrepresentations +| 333 = @builtinbitcast +| 334 = @builtinshuffle +| 335 = @blockassignexpr +| 336 = @issame +| 337 = @isfunction +| 338 = @islayoutcompatible +| 339 = @ispointerinterconvertiblebaseof +| 340 = @isarray +| 341 = @arrayrank +| 342 = @arrayextent +| 343 = @isarithmetic +| 344 = @iscompletetype +| 345 = @iscompound +| 346 = @isconst +| 347 = @isfloatingpoint +| 348 = @isfundamental +| 349 = @isintegral +| 350 = @islvaluereference +| 351 = @ismemberfunctionpointer +| 352 = @ismemberobjectpointer +| 353 = @ismemberpointer +| 354 = @isobject +| 355 = @ispointer +| 356 = @isreference +| 357 = @isrvaluereference +| 358 = @isscalar +| 359 = @issigned +| 360 = @isunsigned +| 361 = @isvoid +| 362 = @isvolatile +| 363 = @reuseexpr +| 364 = @istriviallycopyassignable +| 365 = @isassignablenopreconditioncheck +| 366 = @referencebindstotemporary +| 367 = @issameas +| 368 = @builtinhasattribute +| 369 = @ispointerinterconvertiblewithclass +| 370 = @builtinispointerinterconvertiblewithclass +| 371 = @iscorrespondingmember +| 372 = @builtiniscorrespondingmember +| 373 = @isboundedarray +| 374 = @isunboundedarray +| 375 = @isreferenceable +| 378 = @isnothrowconvertible +| 379 = @referenceconstructsfromtemporary +| 380 = @referenceconvertsfromtemporary +| 381 = @isconvertible +| 382 = @isvalidwinrttype +| 383 = @iswinclass +| 384 = @iswininterface +| 385 = @istriviallyequalitycomparable +| 386 = @isscopedenum +| 387 = @istriviallyrelocatable +| 388 = @datasizeof +| 389 = @c11_generic +| 390 = @requires_expr +| 391 = @nested_requirement +| 392 = @compound_requirement +| 393 = @concept_id +; + +@var_args_expr = @vastartexpr + | @vaendexpr + | @vaargexpr + | @vacopyexpr + ; + +@builtin_op = @var_args_expr + | @noopexpr + | @offsetofexpr + | @intaddrexpr + | @hasassignexpr + | @hascopyexpr + | @hasnothrowassign + | @hasnothrowconstr + | @hasnothrowcopy + | @hastrivialassign + | @hastrivialconstr + | @hastrivialcopy + | @hastrivialdestructor + | @hasuserdestr + | @hasvirtualdestr + | @isabstractexpr + | @isbaseofexpr + | @isclassexpr + | @isconvtoexpr + | @isemptyexpr + | @isenumexpr + | @ispodexpr + | @ispolyexpr + | @isunionexpr + | @typescompexpr + | @builtinshufflevector + | @builtinconvertvector + | @builtinaddressof + | @istriviallyconstructibleexpr + | @isdestructibleexpr + | @isnothrowdestructibleexpr + | @istriviallydestructibleexpr + | @istriviallyassignableexpr + | @isnothrowassignableexpr + | @istrivialexpr + | @isstandardlayoutexpr + | @istriviallycopyableexpr + | @isliteraltypeexpr + | @hastrivialmoveconstructorexpr + | @hastrivialmoveassignexpr + | @hasnothrowmoveassignexpr + | @isconstructibleexpr + | @isnothrowconstructibleexpr + | @hasfinalizerexpr + | @isdelegateexpr + | @isinterfaceclassexpr + | @isrefarrayexpr + | @isrefclassexpr + | @issealedexpr + | @issimplevalueclassexpr + | @isvalueclassexpr + | @isfinalexpr + | @builtinchooseexpr + | @builtincomplex + | @isassignable + | @isaggregate + | @hasuniqueobjectrepresentations + | @builtinbitcast + | @builtinshuffle + | @issame + | @isfunction + | @islayoutcompatible + | @ispointerinterconvertiblebaseof + | @isarray + | @arrayrank + | @arrayextent + | @isarithmetic + | @iscompletetype + | @iscompound + | @isconst + | @isfloatingpoint + | @isfundamental + | @isintegral + | @islvaluereference + | @ismemberfunctionpointer + | @ismemberobjectpointer + | @ismemberpointer + | @isobject + | @ispointer + | @isreference + | @isrvaluereference + | @isscalar + | @issigned + | @isunsigned + | @isvoid + | @isvolatile + | @istriviallycopyassignable + | @isassignablenopreconditioncheck + | @referencebindstotemporary + | @issameas + | @builtinhasattribute + | @ispointerinterconvertiblewithclass + | @builtinispointerinterconvertiblewithclass + | @iscorrespondingmember + | @builtiniscorrespondingmember + | @isboundedarray + | @isunboundedarray + | @isreferenceable + | @isnothrowconvertible + | @referenceconstructsfromtemporary + | @referenceconvertsfromtemporary + | @isconvertible + | @isvalidwinrttype + | @iswinclass + | @iswininterface + | @istriviallyequalitycomparable + | @isscopedenum + | @istriviallyrelocatable + ; + +compound_requirement_is_noexcept( + int expr: @compound_requirement ref +); + +new_allocated_type( + unique int expr: @new_expr ref, + int type_id: @type ref +); + +new_array_allocated_type( + unique int expr: @new_array_expr ref, + int type_id: @type ref +); + +/** + * The field being initialized by an initializer expression within an aggregate + * initializer for a class/struct/union. Position is used to sort repeated initializers. + */ +#keyset[aggregate, position] +aggregate_field_init( + int aggregate: @aggregateliteral ref, + int initializer: @expr ref, + int field: @membervariable ref, + int position: int ref, + boolean is_designated: boolean ref +); + +/** + * The index of the element being initialized by an initializer expression + * within an aggregate initializer for an array. Position is used to sort repeated initializers. + */ +#keyset[aggregate, position] +aggregate_array_init( + int aggregate: @aggregateliteral ref, + int initializer: @expr ref, + int element_index: int ref, + int position: int ref, + boolean is_designated: boolean ref +); + +@ctorinit = @ctordirectinit + | @ctorvirtualinit + | @ctorfieldinit + | @ctordelegatinginit; +@dtordestruct = @dtordirectdestruct + | @dtorvirtualdestruct + | @dtorfielddestruct; + + +condition_decl_bind( + unique int expr: @condition_decl ref, + unique int decl: @declaration ref +); + +typeid_bind( + unique int expr: @type_id ref, + int type_id: @type ref +); + +uuidof_bind( + unique int expr: @uuidof ref, + int type_id: @type ref +); + +@sizeof_or_alignof = @runtime_sizeof | @runtime_alignof | @datasizeof | @sizeof_pack; + +sizeof_bind( + unique int expr: @sizeof_or_alignof ref, + int type_id: @type ref +); + +code_block( + unique int block: @literal ref, + unique int routine: @function ref +); + +lambdas( + unique int expr: @lambdaexpr ref, + string default_capture: string ref, + boolean has_explicit_return_type: boolean ref, + boolean has_explicit_parameter_list: boolean ref +); + +lambda_capture( + unique int id: @lambdacapture, + int lambda: @lambdaexpr ref, + int index: int ref, + int field: @membervariable ref, + boolean captured_by_reference: boolean ref, + boolean is_implicit: boolean ref, + int location: @location_default ref +); + +@funbindexpr = @routineexpr + | @new_expr + | @delete_expr + | @delete_array_expr + | @ctordirectinit + | @ctorvirtualinit + | @ctordelegatinginit + | @dtordirectdestruct + | @dtorvirtualdestruct; + +@varbindexpr = @varaccess | @ctorfieldinit | @dtorfielddestruct; +@addressable = @function | @variable ; +@accessible = @addressable | @enumconstant ; + +@access = @varaccess | @routineexpr ; + +fold( + int expr: @foldexpr ref, + string operator: string ref, + boolean is_left_fold: boolean ref +); + +stmts( + unique int id: @stmt, + int kind: int ref, + int location: @location_stmt ref +); + +case @stmt.kind of + 1 = @stmt_expr +| 2 = @stmt_if +| 3 = @stmt_while +| 4 = @stmt_goto +| 5 = @stmt_label +| 6 = @stmt_return +| 7 = @stmt_block +| 8 = @stmt_end_test_while // do { ... } while ( ... ) +| 9 = @stmt_for +| 10 = @stmt_switch_case +| 11 = @stmt_switch +| 13 = @stmt_asm // "asm" statement or the body of an asm function +| 15 = @stmt_try_block +| 16 = @stmt_microsoft_try // Microsoft +| 17 = @stmt_decl +| 18 = @stmt_set_vla_size // C99 +| 19 = @stmt_vla_decl // C99 +| 25 = @stmt_assigned_goto // GNU +| 26 = @stmt_empty +| 27 = @stmt_continue +| 28 = @stmt_break +| 29 = @stmt_range_based_for // C++11 +// ... 30 @stmt_at_autoreleasepool_block deprecated +// ... 31 @stmt_objc_for_in deprecated +// ... 32 @stmt_at_synchronized deprecated +| 33 = @stmt_handler +// ... 34 @stmt_finally_end deprecated +| 35 = @stmt_constexpr_if +| 37 = @stmt_co_return +| 38 = @stmt_consteval_if +| 39 = @stmt_not_consteval_if +| 40 = @stmt_leave +; + +type_vla( + int type_id: @type ref, + int decl: @stmt_vla_decl ref +); + +variable_vla( + int var: @variable ref, + int decl: @stmt_vla_decl ref +); + +type_is_vla(unique int type_id: @derivedtype ref) + +if_initialization( + unique int if_stmt: @stmt_if ref, + int init_id: @stmt ref +); + +if_then( + unique int if_stmt: @stmt_if ref, + int then_id: @stmt ref +); + +if_else( + unique int if_stmt: @stmt_if ref, + int else_id: @stmt ref +); + +constexpr_if_initialization( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int init_id: @stmt ref +); + +constexpr_if_then( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int then_id: @stmt ref +); + +constexpr_if_else( + unique int constexpr_if_stmt: @stmt_constexpr_if ref, + int else_id: @stmt ref +); + +@stmt_consteval_or_not_consteval_if = @stmt_consteval_if | @stmt_not_consteval_if; + +consteval_if_then( + unique int constexpr_if_stmt: @stmt_consteval_or_not_consteval_if ref, + int then_id: @stmt ref +); + +consteval_if_else( + unique int constexpr_if_stmt: @stmt_consteval_or_not_consteval_if ref, + int else_id: @stmt ref +); + +while_body( + unique int while_stmt: @stmt_while ref, + int body_id: @stmt ref +); + +do_body( + unique int do_stmt: @stmt_end_test_while ref, + int body_id: @stmt ref +); + +switch_initialization( + unique int switch_stmt: @stmt_switch ref, + int init_id: @stmt ref +); + +#keyset[switch_stmt, index] +switch_case( + int switch_stmt: @stmt_switch ref, + int index: int ref, + int case_id: @stmt_switch_case ref +); + +switch_body( + unique int switch_stmt: @stmt_switch ref, + int body_id: @stmt ref +); + +@stmt_for_or_range_based_for = @stmt_for + | @stmt_range_based_for; + +for_initialization( + unique int for_stmt: @stmt_for_or_range_based_for ref, + int init_id: @stmt ref +); + +for_condition( + unique int for_stmt: @stmt_for ref, + int condition_id: @expr ref +); + +for_update( + unique int for_stmt: @stmt_for ref, + int update_id: @expr ref +); + +for_body( + unique int for_stmt: @stmt_for ref, + int body_id: @stmt ref +); + +@stmtparent = @stmt | @expr_stmt ; +stmtparents( + unique int id: @stmt ref, + int index: int ref, + int parent: @stmtparent ref +); + +ishandler(unique int block: @stmt_block ref); + +@cfgnode = @stmt | @expr | @function | @initialiser ; + +stmt_decl_bind( + int stmt: @stmt_decl ref, + int num: int ref, + int decl: @declaration ref +); + +stmt_decl_entry_bind( + int stmt: @stmt_decl ref, + int num: int ref, + int decl_entry: @element ref +); + +@parameterized_element = @function | @stmt_block | @requires_expr; + +blockscope( + unique int block: @stmt_block ref, + int enclosing: @parameterized_element ref +); + +@jump = @stmt_goto | @stmt_break | @stmt_continue | @stmt_leave; + +@jumporlabel = @jump | @stmt_label | @literal; + +jumpinfo( + unique int id: @jumporlabel ref, + string str: string ref, + int target: @stmt ref +); + +preprocdirects( + unique int id: @preprocdirect, + int kind: int ref, + int location: @location_default ref +); +case @preprocdirect.kind of + 0 = @ppd_if +| 1 = @ppd_ifdef +| 2 = @ppd_ifndef +| 3 = @ppd_elif +| 4 = @ppd_else +| 5 = @ppd_endif +| 6 = @ppd_plain_include +| 7 = @ppd_define +| 8 = @ppd_undef +| 9 = @ppd_line +| 10 = @ppd_error +| 11 = @ppd_pragma +| 12 = @ppd_objc_import +| 13 = @ppd_include_next +| 14 = @ppd_ms_import +| 15 = @ppd_elifdef +| 16 = @ppd_elifndef +| 18 = @ppd_warning +; + +@ppd_include = @ppd_plain_include | @ppd_objc_import | @ppd_include_next | @ppd_ms_import; + +@ppd_branch = @ppd_if | @ppd_ifdef | @ppd_ifndef | @ppd_elif | @ppd_elifdef | @ppd_elifndef; + +preprocpair( + int begin : @ppd_branch ref, + int elseelifend : @preprocdirect ref +); + +preproctrue(int branch : @ppd_branch ref); +preprocfalse(int branch : @ppd_branch ref); + +preproctext( + unique int id: @preprocdirect ref, + string head: string ref, + string body: string ref +); + +includes( + unique int id: @ppd_include ref, + int included: @file ref +); + +link_targets( + int id: @link_target, + int binary: @file ref +); + +link_parent( + int element : @element ref, + int link_target : @link_target ref +); + +/* XML Files */ + +xmlEncoding(unique int id: @file ref, string encoding: string ref); + +xmlDTDs( + unique int id: @xmldtd, + string root: string ref, + string publicId: string ref, + string systemId: string ref, + int fileid: @file ref +); + +xmlElements( + unique int id: @xmlelement, + string name: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int fileid: @file ref +); + +xmlAttrs( + unique int id: @xmlattribute, + int elementid: @xmlelement ref, + string name: string ref, + string value: string ref, + int idx: int ref, + int fileid: @file ref +); + +xmlNs( + int id: @xmlnamespace, + string prefixName: string ref, + string URI: string ref, + int fileid: @file ref +); + +xmlHasNs( + int elementId: @xmlnamespaceable ref, + int nsId: @xmlnamespace ref, + int fileid: @file ref +); + +xmlComments( + unique int id: @xmlcomment, + string text: string ref, + int parentid: @xmlparent ref, + int fileid: @file ref +); + +xmlChars( + unique int id: @xmlcharacters, + string text: string ref, + int parentid: @xmlparent ref, + int idx: int ref, + int isCDATA: int ref, + int fileid: @file ref +); + +@xmlparent = @file | @xmlelement; +@xmlnamespaceable = @xmlelement | @xmlattribute; + +xmllocations( + int xmlElement: @xmllocatable ref, + int location: @location_default ref +); + +@xmllocatable = @xmlcharacters + | @xmlelement + | @xmlcomment + | @xmlattribute + | @xmldtd + | @file + | @xmlnamespace; diff --git a/cpp/ql/lib/upgrades/e38346051783182ea75822e4adf8d4c6a949bc37/upgrade.properties b/cpp/ql/lib/upgrades/e38346051783182ea75822e4adf8d4c6a949bc37/upgrade.properties new file mode 100644 index 00000000000..03985f017e3 --- /dev/null +++ b/cpp/ql/lib/upgrades/e38346051783182ea75822e4adf8d4c6a949bc37/upgrade.properties @@ -0,0 +1,2 @@ +description: Support more complex 16-bit floating-point types +compatibility: full diff --git a/cpp/ql/src/CHANGELOG.md b/cpp/ql/src/CHANGELOG.md index 4edd493015a..7fc5b0d92bd 100644 --- a/cpp/ql/src/CHANGELOG.md +++ b/cpp/ql/src/CHANGELOG.md @@ -1,3 +1,9 @@ +## 1.4.3 + +### Minor Analysis Improvements + +* Added flow model for the following libraries: `madler/zlib`, `google/brotli`, `libidn/libidn2`, `libssh2/libssh2/`, `nghttp2/nghttp2`, `libuv/libuv/`, and `curl/curl`. This may result in more alerts when running queries on codebases that use these libraries. + ## 1.4.2 No user-facing changes. diff --git a/cpp/ql/src/change-notes/2025-06-13-mad-summaries.md b/cpp/ql/src/change-notes/released/1.4.3.md similarity index 84% rename from cpp/ql/src/change-notes/2025-06-13-mad-summaries.md rename to cpp/ql/src/change-notes/released/1.4.3.md index f70b9037cd4..2280196429b 100644 --- a/cpp/ql/src/change-notes/2025-06-13-mad-summaries.md +++ b/cpp/ql/src/change-notes/released/1.4.3.md @@ -1,4 +1,5 @@ ---- -category: minorAnalysis ---- -* Added flow model for the following libraries: `madler/zlib`, `google/brotli`, `libidn/libidn2`, `libssh2/libssh2/`, `nghttp2/nghttp2`, `libuv/libuv/`, and `curl/curl`. This may result in more alerts when running queries on codebases that use these libraries. \ No newline at end of file +## 1.4.3 + +### Minor Analysis Improvements + +* Added flow model for the following libraries: `madler/zlib`, `google/brotli`, `libidn/libidn2`, `libssh2/libssh2/`, `nghttp2/nghttp2`, `libuv/libuv/`, and `curl/curl`. This may result in more alerts when running queries on codebases that use these libraries. diff --git a/cpp/ql/src/codeql-pack.release.yml b/cpp/ql/src/codeql-pack.release.yml index a76cacdf799..08f88b689fb 100644 --- a/cpp/ql/src/codeql-pack.release.yml +++ b/cpp/ql/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.4.2 +lastReleaseVersion: 1.4.3 diff --git a/cpp/ql/src/qlpack.yml b/cpp/ql/src/qlpack.yml index 290c18cb815..ade2daeb369 100644 --- a/cpp/ql/src/qlpack.yml +++ b/cpp/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/cpp-queries -version: 1.4.3-dev +version: 1.4.4-dev groups: - cpp - queries diff --git a/cpp/ql/test/library-tests/ir/ir/PrintAST.expected b/cpp/ql/test/library-tests/ir/ir/PrintAST.expected index 7a50fbe51de..53ebaf2114f 100644 --- a/cpp/ql/test/library-tests/ir/ir/PrintAST.expected +++ b/cpp/ql/test/library-tests/ir/ir/PrintAST.expected @@ -58,7 +58,7 @@ #-----| Type = [LongType] unsigned long #-----| getParameter(1): [Parameter] (unnamed parameter 1) #-----| Type = [ScopedEnum] align_val_t -arm.cpp: +arm_neon.cpp: # 6| [TopLevelFunction] uint8x8_t vadd_u8(uint8x8_t, uint8x8_t) # 6| : # 6| getParameter(0): [Parameter] a @@ -76,59 +76,105 @@ arm.cpp: # 7| getRightOperand(): [VariableAccess] b # 7| Type = [CTypedefType] uint8x8_t # 7| ValueCategory = prvalue(load) -# 12| [TopLevelFunction] uint16x8_t __builtin_aarch64_uaddlv8qi_uuu(uint8x8_t, uint8x8_t) +# 10| [TopLevelFunction] uint16x8_t vaddl_u8(uint8x8_t, uint8x8_t) +# 10| : +# 10| getParameter(0): [Parameter] a +# 10| Type = [CTypedefType] uint8x8_t +# 10| getParameter(1): [Parameter] b +# 10| Type = [CTypedefType] uint8x8_t +# 12| [TopLevelFunction] uint16x8_t arm_add(uint8x8_t, uint8x8_t*) # 12| : -# 12| getParameter(0): [Parameter] (unnamed parameter 0) +# 12| getParameter(0): [Parameter] a # 12| Type = [CTypedefType] uint8x8_t -# 12| getParameter(1): [Parameter] (unnamed parameter 1) -# 12| Type = [CTypedefType] uint8x8_t -# 14| [TopLevelFunction] uint16x8_t vaddl_u8(uint8x8_t, uint8x8_t) -# 14| : -# 14| getParameter(0): [Parameter] a -# 14| Type = [CTypedefType] uint8x8_t -# 14| getParameter(1): [Parameter] b -# 14| Type = [CTypedefType] uint8x8_t -# 14| getEntryPoint(): [BlockStmt] { ... } -# 15| getStmt(0): [ReturnStmt] return ... -# 15| getExpr(): [FunctionCall] call to __builtin_aarch64_uaddlv8qi_uuu -# 15| Type = [CTypedefType] uint16x8_t -# 15| ValueCategory = prvalue -# 15| getArgument(0): [VariableAccess] a -# 15| Type = [CTypedefType] uint8x8_t -# 15| ValueCategory = prvalue(load) -# 15| getArgument(1): [VariableAccess] b -# 15| Type = [CTypedefType] uint8x8_t -# 15| ValueCategory = prvalue(load) -# 18| [TopLevelFunction] uint16x8_t arm_add(uint8x8_t, uint8x8_t) -# 18| : -# 18| getParameter(0): [Parameter] a -# 18| Type = [CTypedefType] uint8x8_t -# 18| getParameter(1): [Parameter] b -# 18| Type = [CTypedefType] uint8x8_t -# 18| getEntryPoint(): [BlockStmt] { ... } -# 19| getStmt(0): [DeclStmt] declaration -# 19| getDeclarationEntry(0): [VariableDeclarationEntry] definition of c -# 19| Type = [CTypedefType] uint8x8_t -# 19| getVariable().getInitializer(): [Initializer] initializer for c -# 19| getExpr(): [FunctionCall] call to vadd_u8 -# 19| Type = [CTypedefType] uint8x8_t -# 19| ValueCategory = prvalue -# 19| getArgument(0): [VariableAccess] a -# 19| Type = [CTypedefType] uint8x8_t -# 19| ValueCategory = prvalue(load) -# 19| getArgument(1): [VariableAccess] b -# 19| Type = [CTypedefType] uint8x8_t -# 19| ValueCategory = prvalue(load) -# 20| getStmt(1): [ReturnStmt] return ... -# 20| getExpr(): [FunctionCall] call to vaddl_u8 -# 20| Type = [CTypedefType] uint16x8_t -# 20| ValueCategory = prvalue -# 20| getArgument(0): [VariableAccess] a -# 20| Type = [CTypedefType] uint8x8_t -# 20| ValueCategory = prvalue(load) -# 20| getArgument(1): [VariableAccess] c -# 20| Type = [CTypedefType] uint8x8_t -# 20| ValueCategory = prvalue(load) +# 12| getParameter(1): [Parameter] b +# 12| Type = [PointerType] uint8x8_t * +# 12| getEntryPoint(): [BlockStmt] { ... } +# 13| getStmt(0): [DeclStmt] declaration +# 13| getDeclarationEntry(0): [VariableDeclarationEntry] definition of c +# 13| Type = [CTypedefType] uint8x8_t +# 13| getVariable().getInitializer(): [Initializer] initializer for c +# 13| getExpr(): [FunctionCall] call to vadd_u8 +# 13| Type = [CTypedefType] uint8x8_t +# 13| ValueCategory = prvalue +# 13| getArgument(0): [VariableAccess] a +# 13| Type = [CTypedefType] uint8x8_t +# 13| ValueCategory = prvalue(load) +# 13| getArgument(1): [PointerDereferenceExpr] * ... +# 13| Type = [CTypedefType] uint8x8_t +# 13| ValueCategory = prvalue(load) +# 13| getOperand(): [VariableAccess] b +# 13| Type = [PointerType] uint8x8_t * +# 13| ValueCategory = prvalue(load) +# 14| getStmt(1): [ReturnStmt] return ... +# 14| getExpr(): [FunctionCall] call to vaddl_u8 +# 14| Type = [CTypedefType] uint16x8_t +# 14| ValueCategory = prvalue +# 14| getArgument(0): [VariableAccess] a +# 14| Type = [CTypedefType] uint8x8_t +# 14| ValueCategory = prvalue(load) +# 14| getArgument(1): [VariableAccess] c +# 14| Type = [CTypedefType] uint8x8_t +# 14| ValueCategory = prvalue(load) +# 20| [TopLevelFunction] mfloat8x8_t vreinterpret_mf8_s8(int8x8_t) +# 20| : +# 20| getParameter(0): [Parameter] (unnamed parameter 0) +# 20| Type = [CTypedefType] int8x8_t +# 22| [TopLevelFunction] mfloat8x8_t arm_reinterpret(int8x8_t*) +# 22| : +# 22| getParameter(0): [Parameter] a +# 22| Type = [PointerType] int8x8_t * +# 22| getEntryPoint(): [BlockStmt] { ... } +# 23| getStmt(0): [ReturnStmt] return ... +# 23| getExpr(): [FunctionCall] call to vreinterpret_mf8_s8 +# 23| Type = [CTypedefType] mfloat8x8_t +# 23| ValueCategory = prvalue +# 23| getArgument(0): [PointerDereferenceExpr] * ... +# 23| Type = [CTypedefType] int8x8_t +# 23| ValueCategory = prvalue(load) +# 23| getOperand(): [VariableAccess] a +# 23| Type = [PointerType] int8x8_t * +# 23| ValueCategory = prvalue(load) +arm_sve.cpp: +# 6| [TopLevelFunction] svuint8x2_t svsel_u8_x2(svcount_t, svuint8x2_t, svuint8x2_t) +# 6| : +# 6| getParameter(0): [Parameter] (unnamed parameter 0) +# 6| Type = [CTypedefType] svcount_t +# 6| getParameter(1): [Parameter] (unnamed parameter 1) +# 6| Type = [CTypedefType] svuint8x2_t +# 6| getParameter(2): [Parameter] (unnamed parameter 2) +# 6| Type = [CTypedefType] svuint8x2_t +# 8| [TopLevelFunction] svuint8x2_t arm_sel(svcount_t, svuint8x2_t, svuint8x2_t*) +# 8| : +# 8| getParameter(0): [Parameter] a +# 8| Type = [CTypedefType] svcount_t +# 8| getParameter(1): [Parameter] b +# 8| Type = [CTypedefType] svuint8x2_t +# 8| getParameter(2): [Parameter] c +# 8| Type = [PointerType] svuint8x2_t * +# 8| getEntryPoint(): [BlockStmt] { ... } +# 9| getStmt(0): [DeclStmt] declaration +# 9| getDeclarationEntry(0): [VariableDeclarationEntry] definition of d +# 9| Type = [CTypedefType] svuint8x2_t +# 9| getVariable().getInitializer(): [Initializer] initializer for d +# 9| getExpr(): [FunctionCall] call to svsel_u8_x2 +# 9| Type = [CTypedefType] svuint8x2_t +# 9| ValueCategory = prvalue +# 9| getArgument(0): [VariableAccess] a +# 9| Type = [CTypedefType] svcount_t +# 9| ValueCategory = prvalue(load) +# 9| getArgument(1): [VariableAccess] b +# 9| Type = [CTypedefType] svuint8x2_t +# 9| ValueCategory = prvalue(load) +# 9| getArgument(2): [PointerDereferenceExpr] * ... +# 9| Type = [CTypedefType] svuint8x2_t +# 9| ValueCategory = prvalue(load) +# 9| getOperand(): [VariableAccess] c +# 9| Type = [PointerType] svuint8x2_t * +# 9| ValueCategory = prvalue(load) +# 10| getStmt(1): [ReturnStmt] return ... +# 10| getExpr(): [VariableAccess] d +# 10| Type = [CTypedefType] svuint8x2_t +# 10| ValueCategory = prvalue(load) bad_asts.cpp: # 5| [CopyAssignmentOperator] Bad::S& Bad::S::operator=(Bad::S const&) # 5| : diff --git a/cpp/ql/test/library-tests/ir/ir/aliased_ir.expected b/cpp/ql/test/library-tests/ir/ir/aliased_ir.expected index e258fd81f3e..575631ab041 100644 --- a/cpp/ql/test/library-tests/ir/ir/aliased_ir.expected +++ b/cpp/ql/test/library-tests/ir/ir/aliased_ir.expected @@ -1,4 +1,4 @@ -arm.cpp: +arm_neon.cpp: # 6| uint8x8_t vadd_u8(uint8x8_t, uint8x8_t) # 6| Block 0 # 6| v6_1(void) = EnterFunction : @@ -21,65 +21,107 @@ arm.cpp: # 6| v6_11(void) = AliasedUse : m6_3 # 6| v6_12(void) = ExitFunction : -# 14| uint16x8_t vaddl_u8(uint8x8_t, uint8x8_t) -# 14| Block 0 -# 14| v14_1(void) = EnterFunction : -# 14| m14_2(unknown) = AliasedDefinition : -# 14| m14_3(unknown) = InitializeNonLocal : -# 14| m14_4(unknown) = Chi : total:m14_2, partial:m14_3 -# 14| r14_5(glval<__attribute((neon_vector_type(8))) unsigned char>) = VariableAddress[a] : -# 14| m14_6(__attribute((neon_vector_type(8))) unsigned char) = InitializeParameter[a] : &:r14_5 -# 14| r14_7(glval<__attribute((neon_vector_type(8))) unsigned char>) = VariableAddress[b] : -# 14| m14_8(__attribute((neon_vector_type(8))) unsigned char) = InitializeParameter[b] : &:r14_7 -# 15| r15_1(glval<__attribute((neon_vector_type(8))) unsigned short>) = VariableAddress[#return] : -# 15| r15_2(glval) = FunctionAddress[__builtin_aarch64_uaddlv8qi_uuu] : -# 15| r15_3(glval<__attribute((neon_vector_type(8))) unsigned char>) = VariableAddress[a] : -# 15| r15_4(__attribute((neon_vector_type(8))) unsigned char) = Load[a] : &:r15_3, m14_6 -# 15| r15_5(glval<__attribute((neon_vector_type(8))) unsigned char>) = VariableAddress[b] : -# 15| r15_6(__attribute((neon_vector_type(8))) unsigned char) = Load[b] : &:r15_5, m14_8 -# 15| r15_7(__attribute((neon_vector_type(8))) unsigned short) = Call[__builtin_aarch64_uaddlv8qi_uuu] : func:r15_2, 0:r15_4, 1:r15_6 -# 15| m15_8(unknown) = ^CallSideEffect : ~m14_4 -# 15| m15_9(unknown) = Chi : total:m14_4, partial:m15_8 -# 15| m15_10(__attribute((neon_vector_type(8))) unsigned short) = Store[#return] : &:r15_1, r15_7 -# 14| r14_9(glval<__attribute((neon_vector_type(8))) unsigned short>) = VariableAddress[#return] : -# 14| v14_10(void) = ReturnValue : &:r14_9, m15_10 -# 14| v14_11(void) = AliasedUse : ~m15_9 -# 14| v14_12(void) = ExitFunction : +# 12| uint16x8_t arm_add(uint8x8_t, uint8x8_t*) +# 12| Block 0 +# 12| v12_1(void) = EnterFunction : +# 12| m12_2(unknown) = AliasedDefinition : +# 12| m12_3(unknown) = InitializeNonLocal : +# 12| m12_4(unknown) = Chi : total:m12_2, partial:m12_3 +# 12| r12_5(glval<__attribute((neon_vector_type(8))) unsigned char>) = VariableAddress[a] : +# 12| m12_6(__attribute((neon_vector_type(8))) unsigned char) = InitializeParameter[a] : &:r12_5 +# 12| r12_7(glval<__attribute((neon_vector_type(8))) unsigned char *>) = VariableAddress[b] : +# 12| m12_8(__attribute((neon_vector_type(8))) unsigned char *) = InitializeParameter[b] : &:r12_7 +# 12| r12_9(__attribute((neon_vector_type(8))) unsigned char *) = Load[b] : &:r12_7, m12_8 +# 12| m12_10(unknown) = InitializeIndirection[b] : &:r12_9 +# 13| r13_1(glval<__attribute((neon_vector_type(8))) unsigned char>) = VariableAddress[c] : +# 13| r13_2(glval) = FunctionAddress[vadd_u8] : +# 13| r13_3(glval<__attribute((neon_vector_type(8))) unsigned char>) = VariableAddress[a] : +# 13| r13_4(__attribute((neon_vector_type(8))) unsigned char) = Load[a] : &:r13_3, m12_6 +# 13| r13_5(glval<__attribute((neon_vector_type(8))) unsigned char *>) = VariableAddress[b] : +# 13| r13_6(__attribute((neon_vector_type(8))) unsigned char *) = Load[b] : &:r13_5, m12_8 +# 13| r13_7(__attribute((neon_vector_type(8))) unsigned char) = Load[?] : &:r13_6, ~m12_10 +# 13| r13_8(__attribute((neon_vector_type(8))) unsigned char) = Call[vadd_u8] : func:r13_2, 0:r13_4, 1:r13_7 +# 13| m13_9(unknown) = ^CallSideEffect : ~m12_4 +# 13| m13_10(unknown) = Chi : total:m12_4, partial:m13_9 +# 13| m13_11(__attribute((neon_vector_type(8))) unsigned char) = Store[c] : &:r13_1, r13_8 +# 14| r14_1(glval<__attribute((neon_vector_type(8))) unsigned short>) = VariableAddress[#return] : +# 14| r14_2(glval) = FunctionAddress[vaddl_u8] : +# 14| r14_3(glval<__attribute((neon_vector_type(8))) unsigned char>) = VariableAddress[a] : +# 14| r14_4(__attribute((neon_vector_type(8))) unsigned char) = Load[a] : &:r14_3, m12_6 +# 14| r14_5(glval<__attribute((neon_vector_type(8))) unsigned char>) = VariableAddress[c] : +# 14| r14_6(__attribute((neon_vector_type(8))) unsigned char) = Load[c] : &:r14_5, m13_11 +# 14| r14_7(__attribute((neon_vector_type(8))) unsigned short) = Call[vaddl_u8] : func:r14_2, 0:r14_4, 1:r14_6 +# 14| m14_8(unknown) = ^CallSideEffect : ~m13_10 +# 14| m14_9(unknown) = Chi : total:m13_10, partial:m14_8 +# 14| m14_10(__attribute((neon_vector_type(8))) unsigned short) = Store[#return] : &:r14_1, r14_7 +# 12| v12_11(void) = ReturnIndirection[b] : &:r12_9, m12_10 +# 12| r12_12(glval<__attribute((neon_vector_type(8))) unsigned short>) = VariableAddress[#return] : +# 12| v12_13(void) = ReturnValue : &:r12_12, m14_10 +# 12| v12_14(void) = AliasedUse : ~m14_9 +# 12| v12_15(void) = ExitFunction : -# 18| uint16x8_t arm_add(uint8x8_t, uint8x8_t) -# 18| Block 0 -# 18| v18_1(void) = EnterFunction : -# 18| m18_2(unknown) = AliasedDefinition : -# 18| m18_3(unknown) = InitializeNonLocal : -# 18| m18_4(unknown) = Chi : total:m18_2, partial:m18_3 -# 18| r18_5(glval<__attribute((neon_vector_type(8))) unsigned char>) = VariableAddress[a] : -# 18| m18_6(__attribute((neon_vector_type(8))) unsigned char) = InitializeParameter[a] : &:r18_5 -# 18| r18_7(glval<__attribute((neon_vector_type(8))) unsigned char>) = VariableAddress[b] : -# 18| m18_8(__attribute((neon_vector_type(8))) unsigned char) = InitializeParameter[b] : &:r18_7 -# 19| r19_1(glval<__attribute((neon_vector_type(8))) unsigned char>) = VariableAddress[c] : -# 19| r19_2(glval) = FunctionAddress[vadd_u8] : -# 19| r19_3(glval<__attribute((neon_vector_type(8))) unsigned char>) = VariableAddress[a] : -# 19| r19_4(__attribute((neon_vector_type(8))) unsigned char) = Load[a] : &:r19_3, m18_6 -# 19| r19_5(glval<__attribute((neon_vector_type(8))) unsigned char>) = VariableAddress[b] : -# 19| r19_6(__attribute((neon_vector_type(8))) unsigned char) = Load[b] : &:r19_5, m18_8 -# 19| r19_7(__attribute((neon_vector_type(8))) unsigned char) = Call[vadd_u8] : func:r19_2, 0:r19_4, 1:r19_6 -# 19| m19_8(unknown) = ^CallSideEffect : ~m18_4 -# 19| m19_9(unknown) = Chi : total:m18_4, partial:m19_8 -# 19| m19_10(__attribute((neon_vector_type(8))) unsigned char) = Store[c] : &:r19_1, r19_7 -# 20| r20_1(glval<__attribute((neon_vector_type(8))) unsigned short>) = VariableAddress[#return] : -# 20| r20_2(glval) = FunctionAddress[vaddl_u8] : -# 20| r20_3(glval<__attribute((neon_vector_type(8))) unsigned char>) = VariableAddress[a] : -# 20| r20_4(__attribute((neon_vector_type(8))) unsigned char) = Load[a] : &:r20_3, m18_6 -# 20| r20_5(glval<__attribute((neon_vector_type(8))) unsigned char>) = VariableAddress[c] : -# 20| r20_6(__attribute((neon_vector_type(8))) unsigned char) = Load[c] : &:r20_5, m19_10 -# 20| r20_7(__attribute((neon_vector_type(8))) unsigned short) = Call[vaddl_u8] : func:r20_2, 0:r20_4, 1:r20_6 -# 20| m20_8(unknown) = ^CallSideEffect : ~m19_9 -# 20| m20_9(unknown) = Chi : total:m19_9, partial:m20_8 -# 20| m20_10(__attribute((neon_vector_type(8))) unsigned short) = Store[#return] : &:r20_1, r20_7 -# 18| r18_9(glval<__attribute((neon_vector_type(8))) unsigned short>) = VariableAddress[#return] : -# 18| v18_10(void) = ReturnValue : &:r18_9, m20_10 -# 18| v18_11(void) = AliasedUse : ~m20_9 -# 18| v18_12(void) = ExitFunction : +# 22| mfloat8x8_t arm_reinterpret(int8x8_t*) +# 22| Block 0 +# 22| v22_1(void) = EnterFunction : +# 22| m22_2(unknown) = AliasedDefinition : +# 22| m22_3(unknown) = InitializeNonLocal : +# 22| m22_4(unknown) = Chi : total:m22_2, partial:m22_3 +# 22| r22_5(glval) = VariableAddress[a] : +# 22| m22_6(char *) = InitializeParameter[a] : &:r22_5 +# 22| r22_7(char *) = Load[a] : &:r22_5, m22_6 +# 22| m22_8(unknown) = InitializeIndirection[a] : &:r22_7 +# 23| r23_1(glval<__mfp8>) = VariableAddress[#return] : +# 23| r23_2(glval) = FunctionAddress[vreinterpret_mf8_s8] : +# 23| r23_3(glval) = VariableAddress[a] : +# 23| r23_4(char *) = Load[a] : &:r23_3, m22_6 +# 23| r23_5(char) = Load[?] : &:r23_4, ~m22_8 +# 23| r23_6(__mfp8) = Call[vreinterpret_mf8_s8] : func:r23_2, 0:r23_5 +# 23| m23_7(unknown) = ^CallSideEffect : ~m22_4 +# 23| m23_8(unknown) = Chi : total:m22_4, partial:m23_7 +# 23| m23_9(__mfp8) = Store[#return] : &:r23_1, r23_6 +# 22| v22_9(void) = ReturnIndirection[a] : &:r22_7, m22_8 +# 22| r22_10(glval<__mfp8>) = VariableAddress[#return] : +# 22| v22_11(void) = ReturnValue : &:r22_10, m23_9 +# 22| v22_12(void) = AliasedUse : ~m23_8 +# 22| v22_13(void) = ExitFunction : + +arm_sve.cpp: +# 8| svuint8x2_t arm_sel(svcount_t, svuint8x2_t, svuint8x2_t*) +# 8| Block 0 +# 8| v8_1(void) = EnterFunction : +# 8| m8_2(unknown) = AliasedDefinition : +# 8| m8_3(unknown) = InitializeNonLocal : +# 8| m8_4(unknown) = Chi : total:m8_2, partial:m8_3 +# 8| r8_5(glval<__SVCount_t>) = VariableAddress[a] : +# 8| m8_6(__SVCount_t) = InitializeParameter[a] : &:r8_5 +# 8| r8_7(glval<__edg_scalable_vector_type__(unsigned char, 2)>) = VariableAddress[b] : +# 8| m8_8(__edg_scalable_vector_type__(unsigned char, 2)) = InitializeParameter[b] : &:r8_7 +# 8| r8_9(glval<__edg_scalable_vector_type__(unsigned char, 2) *>) = VariableAddress[c] : +# 8| m8_10(__edg_scalable_vector_type__(unsigned char, 2) *) = InitializeParameter[c] : &:r8_9 +# 8| r8_11(__edg_scalable_vector_type__(unsigned char, 2) *) = Load[c] : &:r8_9, m8_10 +# 8| m8_12(unknown) = InitializeIndirection[c] : &:r8_11 +# 9| r9_1(glval<__edg_scalable_vector_type__(unsigned char, 2)>) = VariableAddress[d] : +# 9| r9_2(glval) = FunctionAddress[svsel_u8_x2] : +# 9| r9_3(glval<__SVCount_t>) = VariableAddress[a] : +# 9| r9_4(__SVCount_t) = Load[a] : &:r9_3, m8_6 +# 9| r9_5(glval<__edg_scalable_vector_type__(unsigned char, 2)>) = VariableAddress[b] : +# 9| r9_6(__edg_scalable_vector_type__(unsigned char, 2)) = Load[b] : &:r9_5, m8_8 +# 9| r9_7(glval<__edg_scalable_vector_type__(unsigned char, 2) *>) = VariableAddress[c] : +# 9| r9_8(__edg_scalable_vector_type__(unsigned char, 2) *) = Load[c] : &:r9_7, m8_10 +# 9| r9_9(__edg_scalable_vector_type__(unsigned char, 2)) = Load[?] : &:r9_8, ~m8_12 +# 9| r9_10(__edg_scalable_vector_type__(unsigned char, 2)) = Call[svsel_u8_x2] : func:r9_2, 0:r9_4, 1:r9_6, 2:r9_9 +# 9| m9_11(unknown) = ^CallSideEffect : ~m8_4 +# 9| m9_12(unknown) = Chi : total:m8_4, partial:m9_11 +# 9| m9_13(__edg_scalable_vector_type__(unsigned char, 2)) = Store[d] : &:r9_1, r9_10 +# 10| r10_1(glval<__edg_scalable_vector_type__(unsigned char, 2)>) = VariableAddress[#return] : +# 10| r10_2(glval<__edg_scalable_vector_type__(unsigned char, 2)>) = VariableAddress[d] : +# 10| r10_3(__edg_scalable_vector_type__(unsigned char, 2)) = Load[d] : &:r10_2, m9_13 +# 10| m10_4(__edg_scalable_vector_type__(unsigned char, 2)) = Store[#return] : &:r10_1, r10_3 +# 8| v8_13(void) = ReturnIndirection[c] : &:r8_11, m8_12 +# 8| r8_14(glval<__edg_scalable_vector_type__(unsigned char, 2)>) = VariableAddress[#return] : +# 8| v8_15(void) = ReturnValue : &:r8_14, m10_4 +# 8| v8_16(void) = AliasedUse : ~m9_12 +# 8| v8_17(void) = ExitFunction : bad_asts.cpp: # 9| int Bad::S::MemberFunction(int) diff --git a/cpp/ql/test/library-tests/ir/ir/arm.cpp b/cpp/ql/test/library-tests/ir/ir/arm.cpp deleted file mode 100644 index 36e20715bc5..00000000000 --- a/cpp/ql/test/library-tests/ir/ir/arm.cpp +++ /dev/null @@ -1,21 +0,0 @@ -// semmle-extractor-options: --edg --target --edg linux_arm64 - -typedef __Uint8x8_t uint8x8_t; -typedef __Uint16x8_t uint16x8_t; - -uint8x8_t vadd_u8(uint8x8_t a, uint8x8_t b) { - return a + b; -} - -// Workaround: the frontend only exposes this when the arm_neon.h -// header is encountered. -uint16x8_t __builtin_aarch64_uaddlv8qi_uuu(uint8x8_t, uint8x8_t); - -uint16x8_t vaddl_u8(uint8x8_t a, uint8x8_t b) { - return __builtin_aarch64_uaddlv8qi_uuu (a, b); -} - -uint16x8_t arm_add(uint8x8_t a, uint8x8_t b) { - uint8x8_t c = vadd_u8(a, b); - return vaddl_u8(a, c); -} diff --git a/cpp/ql/test/library-tests/ir/ir/arm_neon.cpp b/cpp/ql/test/library-tests/ir/ir/arm_neon.cpp new file mode 100644 index 00000000000..d1659dfba35 --- /dev/null +++ b/cpp/ql/test/library-tests/ir/ir/arm_neon.cpp @@ -0,0 +1,24 @@ +// semmle-extractor-options: --edg --target --edg linux_arm64 --gnu_version 150000 + +typedef __Uint8x8_t uint8x8_t; +typedef __Uint16x8_t uint16x8_t; + +uint8x8_t vadd_u8(uint8x8_t a, uint8x8_t b) { + return a + b; +} + +uint16x8_t vaddl_u8(uint8x8_t a, uint8x8_t b); + +uint16x8_t arm_add(uint8x8_t a, uint8x8_t *b) { + uint8x8_t c = vadd_u8(a, *b); + return vaddl_u8(a, c); +} + +typedef __attribute__((neon_vector_type(8))) __mfp8 mfloat8x8_t; +typedef __attribute__((neon_vector_type(8))) char int8x8_t; + +mfloat8x8_t vreinterpret_mf8_s8(int8x8_t); + +mfloat8x8_t arm_reinterpret(int8x8_t *a) { + return vreinterpret_mf8_s8(*a); +} diff --git a/cpp/ql/test/library-tests/ir/ir/arm_sve.cpp b/cpp/ql/test/library-tests/ir/ir/arm_sve.cpp new file mode 100644 index 00000000000..33bad8abbe4 --- /dev/null +++ b/cpp/ql/test/library-tests/ir/ir/arm_sve.cpp @@ -0,0 +1,11 @@ +// semmle-extractor-options: --edg --target --edg linux_arm64 --clang_version 190000 + +typedef __clang_svuint8x2_t svuint8x2_t; +typedef __SVCount_t svcount_t; + +svuint8x2_t svsel_u8_x2(svcount_t, svuint8x2_t, svuint8x2_t); + +svuint8x2_t arm_sel(svcount_t a, svuint8x2_t b, svuint8x2_t *c) { + svuint8x2_t d = svsel_u8_x2(a, b, *c); + return d; +} diff --git a/cpp/ql/test/library-tests/ir/ir/raw_ir.expected b/cpp/ql/test/library-tests/ir/ir/raw_ir.expected index 97d7e7c43b4..e57a3bc11b5 100644 --- a/cpp/ql/test/library-tests/ir/ir/raw_ir.expected +++ b/cpp/ql/test/library-tests/ir/ir/raw_ir.expected @@ -1,4 +1,4 @@ -arm.cpp: +arm_neon.cpp: # 6| uint8x8_t vadd_u8(uint8x8_t, uint8x8_t) # 6| Block 0 # 6| v6_1(void) = EnterFunction : @@ -20,60 +20,100 @@ arm.cpp: # 6| v6_10(void) = AliasedUse : ~m? # 6| v6_11(void) = ExitFunction : -# 14| uint16x8_t vaddl_u8(uint8x8_t, uint8x8_t) -# 14| Block 0 -# 14| v14_1(void) = EnterFunction : -# 14| mu14_2(unknown) = AliasedDefinition : -# 14| mu14_3(unknown) = InitializeNonLocal : -# 14| r14_4(glval<__attribute((neon_vector_type(8))) unsigned char>) = VariableAddress[a] : -# 14| mu14_5(__attribute((neon_vector_type(8))) unsigned char) = InitializeParameter[a] : &:r14_4 -# 14| r14_6(glval<__attribute((neon_vector_type(8))) unsigned char>) = VariableAddress[b] : -# 14| mu14_7(__attribute((neon_vector_type(8))) unsigned char) = InitializeParameter[b] : &:r14_6 -# 15| r15_1(glval<__attribute((neon_vector_type(8))) unsigned short>) = VariableAddress[#return] : -# 15| r15_2(glval) = FunctionAddress[__builtin_aarch64_uaddlv8qi_uuu] : -# 15| r15_3(glval<__attribute((neon_vector_type(8))) unsigned char>) = VariableAddress[a] : -# 15| r15_4(__attribute((neon_vector_type(8))) unsigned char) = Load[a] : &:r15_3, ~m? -# 15| r15_5(glval<__attribute((neon_vector_type(8))) unsigned char>) = VariableAddress[b] : -# 15| r15_6(__attribute((neon_vector_type(8))) unsigned char) = Load[b] : &:r15_5, ~m? -# 15| r15_7(__attribute((neon_vector_type(8))) unsigned short) = Call[__builtin_aarch64_uaddlv8qi_uuu] : func:r15_2, 0:r15_4, 1:r15_6 -# 15| mu15_8(unknown) = ^CallSideEffect : ~m? -# 15| mu15_9(__attribute((neon_vector_type(8))) unsigned short) = Store[#return] : &:r15_1, r15_7 -# 14| r14_8(glval<__attribute((neon_vector_type(8))) unsigned short>) = VariableAddress[#return] : -# 14| v14_9(void) = ReturnValue : &:r14_8, ~m? -# 14| v14_10(void) = AliasedUse : ~m? -# 14| v14_11(void) = ExitFunction : +# 12| uint16x8_t arm_add(uint8x8_t, uint8x8_t*) +# 12| Block 0 +# 12| v12_1(void) = EnterFunction : +# 12| mu12_2(unknown) = AliasedDefinition : +# 12| mu12_3(unknown) = InitializeNonLocal : +# 12| r12_4(glval<__attribute((neon_vector_type(8))) unsigned char>) = VariableAddress[a] : +# 12| mu12_5(__attribute((neon_vector_type(8))) unsigned char) = InitializeParameter[a] : &:r12_4 +# 12| r12_6(glval<__attribute((neon_vector_type(8))) unsigned char *>) = VariableAddress[b] : +# 12| mu12_7(__attribute((neon_vector_type(8))) unsigned char *) = InitializeParameter[b] : &:r12_6 +# 12| r12_8(__attribute((neon_vector_type(8))) unsigned char *) = Load[b] : &:r12_6, ~m? +# 12| mu12_9(unknown) = InitializeIndirection[b] : &:r12_8 +# 13| r13_1(glval<__attribute((neon_vector_type(8))) unsigned char>) = VariableAddress[c] : +# 13| r13_2(glval) = FunctionAddress[vadd_u8] : +# 13| r13_3(glval<__attribute((neon_vector_type(8))) unsigned char>) = VariableAddress[a] : +# 13| r13_4(__attribute((neon_vector_type(8))) unsigned char) = Load[a] : &:r13_3, ~m? +# 13| r13_5(glval<__attribute((neon_vector_type(8))) unsigned char *>) = VariableAddress[b] : +# 13| r13_6(__attribute((neon_vector_type(8))) unsigned char *) = Load[b] : &:r13_5, ~m? +# 13| r13_7(__attribute((neon_vector_type(8))) unsigned char) = Load[?] : &:r13_6, ~m? +# 13| r13_8(__attribute((neon_vector_type(8))) unsigned char) = Call[vadd_u8] : func:r13_2, 0:r13_4, 1:r13_7 +# 13| mu13_9(unknown) = ^CallSideEffect : ~m? +# 13| mu13_10(__attribute((neon_vector_type(8))) unsigned char) = Store[c] : &:r13_1, r13_8 +# 14| r14_1(glval<__attribute((neon_vector_type(8))) unsigned short>) = VariableAddress[#return] : +# 14| r14_2(glval) = FunctionAddress[vaddl_u8] : +# 14| r14_3(glval<__attribute((neon_vector_type(8))) unsigned char>) = VariableAddress[a] : +# 14| r14_4(__attribute((neon_vector_type(8))) unsigned char) = Load[a] : &:r14_3, ~m? +# 14| r14_5(glval<__attribute((neon_vector_type(8))) unsigned char>) = VariableAddress[c] : +# 14| r14_6(__attribute((neon_vector_type(8))) unsigned char) = Load[c] : &:r14_5, ~m? +# 14| r14_7(__attribute((neon_vector_type(8))) unsigned short) = Call[vaddl_u8] : func:r14_2, 0:r14_4, 1:r14_6 +# 14| mu14_8(unknown) = ^CallSideEffect : ~m? +# 14| mu14_9(__attribute((neon_vector_type(8))) unsigned short) = Store[#return] : &:r14_1, r14_7 +# 12| v12_10(void) = ReturnIndirection[b] : &:r12_8, ~m? +# 12| r12_11(glval<__attribute((neon_vector_type(8))) unsigned short>) = VariableAddress[#return] : +# 12| v12_12(void) = ReturnValue : &:r12_11, ~m? +# 12| v12_13(void) = AliasedUse : ~m? +# 12| v12_14(void) = ExitFunction : -# 18| uint16x8_t arm_add(uint8x8_t, uint8x8_t) -# 18| Block 0 -# 18| v18_1(void) = EnterFunction : -# 18| mu18_2(unknown) = AliasedDefinition : -# 18| mu18_3(unknown) = InitializeNonLocal : -# 18| r18_4(glval<__attribute((neon_vector_type(8))) unsigned char>) = VariableAddress[a] : -# 18| mu18_5(__attribute((neon_vector_type(8))) unsigned char) = InitializeParameter[a] : &:r18_4 -# 18| r18_6(glval<__attribute((neon_vector_type(8))) unsigned char>) = VariableAddress[b] : -# 18| mu18_7(__attribute((neon_vector_type(8))) unsigned char) = InitializeParameter[b] : &:r18_6 -# 19| r19_1(glval<__attribute((neon_vector_type(8))) unsigned char>) = VariableAddress[c] : -# 19| r19_2(glval) = FunctionAddress[vadd_u8] : -# 19| r19_3(glval<__attribute((neon_vector_type(8))) unsigned char>) = VariableAddress[a] : -# 19| r19_4(__attribute((neon_vector_type(8))) unsigned char) = Load[a] : &:r19_3, ~m? -# 19| r19_5(glval<__attribute((neon_vector_type(8))) unsigned char>) = VariableAddress[b] : -# 19| r19_6(__attribute((neon_vector_type(8))) unsigned char) = Load[b] : &:r19_5, ~m? -# 19| r19_7(__attribute((neon_vector_type(8))) unsigned char) = Call[vadd_u8] : func:r19_2, 0:r19_4, 1:r19_6 -# 19| mu19_8(unknown) = ^CallSideEffect : ~m? -# 19| mu19_9(__attribute((neon_vector_type(8))) unsigned char) = Store[c] : &:r19_1, r19_7 -# 20| r20_1(glval<__attribute((neon_vector_type(8))) unsigned short>) = VariableAddress[#return] : -# 20| r20_2(glval) = FunctionAddress[vaddl_u8] : -# 20| r20_3(glval<__attribute((neon_vector_type(8))) unsigned char>) = VariableAddress[a] : -# 20| r20_4(__attribute((neon_vector_type(8))) unsigned char) = Load[a] : &:r20_3, ~m? -# 20| r20_5(glval<__attribute((neon_vector_type(8))) unsigned char>) = VariableAddress[c] : -# 20| r20_6(__attribute((neon_vector_type(8))) unsigned char) = Load[c] : &:r20_5, ~m? -# 20| r20_7(__attribute((neon_vector_type(8))) unsigned short) = Call[vaddl_u8] : func:r20_2, 0:r20_4, 1:r20_6 -# 20| mu20_8(unknown) = ^CallSideEffect : ~m? -# 20| mu20_9(__attribute((neon_vector_type(8))) unsigned short) = Store[#return] : &:r20_1, r20_7 -# 18| r18_8(glval<__attribute((neon_vector_type(8))) unsigned short>) = VariableAddress[#return] : -# 18| v18_9(void) = ReturnValue : &:r18_8, ~m? -# 18| v18_10(void) = AliasedUse : ~m? -# 18| v18_11(void) = ExitFunction : +# 22| mfloat8x8_t arm_reinterpret(int8x8_t*) +# 22| Block 0 +# 22| v22_1(void) = EnterFunction : +# 22| mu22_2(unknown) = AliasedDefinition : +# 22| mu22_3(unknown) = InitializeNonLocal : +# 22| r22_4(glval) = VariableAddress[a] : +# 22| mu22_5(char *) = InitializeParameter[a] : &:r22_4 +# 22| r22_6(char *) = Load[a] : &:r22_4, ~m? +# 22| mu22_7(unknown) = InitializeIndirection[a] : &:r22_6 +# 23| r23_1(glval<__mfp8>) = VariableAddress[#return] : +# 23| r23_2(glval) = FunctionAddress[vreinterpret_mf8_s8] : +# 23| r23_3(glval) = VariableAddress[a] : +# 23| r23_4(char *) = Load[a] : &:r23_3, ~m? +# 23| r23_5(char) = Load[?] : &:r23_4, ~m? +# 23| r23_6(__mfp8) = Call[vreinterpret_mf8_s8] : func:r23_2, 0:r23_5 +# 23| mu23_7(unknown) = ^CallSideEffect : ~m? +# 23| mu23_8(__mfp8) = Store[#return] : &:r23_1, r23_6 +# 22| v22_8(void) = ReturnIndirection[a] : &:r22_6, ~m? +# 22| r22_9(glval<__mfp8>) = VariableAddress[#return] : +# 22| v22_10(void) = ReturnValue : &:r22_9, ~m? +# 22| v22_11(void) = AliasedUse : ~m? +# 22| v22_12(void) = ExitFunction : + +arm_sve.cpp: +# 8| svuint8x2_t arm_sel(svcount_t, svuint8x2_t, svuint8x2_t*) +# 8| Block 0 +# 8| v8_1(void) = EnterFunction : +# 8| mu8_2(unknown) = AliasedDefinition : +# 8| mu8_3(unknown) = InitializeNonLocal : +# 8| r8_4(glval<__SVCount_t>) = VariableAddress[a] : +# 8| mu8_5(__SVCount_t) = InitializeParameter[a] : &:r8_4 +# 8| r8_6(glval<__edg_scalable_vector_type__(unsigned char, 2)>) = VariableAddress[b] : +# 8| mu8_7(__edg_scalable_vector_type__(unsigned char, 2)) = InitializeParameter[b] : &:r8_6 +# 8| r8_8(glval<__edg_scalable_vector_type__(unsigned char, 2) *>) = VariableAddress[c] : +# 8| mu8_9(__edg_scalable_vector_type__(unsigned char, 2) *) = InitializeParameter[c] : &:r8_8 +# 8| r8_10(__edg_scalable_vector_type__(unsigned char, 2) *) = Load[c] : &:r8_8, ~m? +# 8| mu8_11(unknown) = InitializeIndirection[c] : &:r8_10 +# 9| r9_1(glval<__edg_scalable_vector_type__(unsigned char, 2)>) = VariableAddress[d] : +# 9| r9_2(glval) = FunctionAddress[svsel_u8_x2] : +# 9| r9_3(glval<__SVCount_t>) = VariableAddress[a] : +# 9| r9_4(__SVCount_t) = Load[a] : &:r9_3, ~m? +# 9| r9_5(glval<__edg_scalable_vector_type__(unsigned char, 2)>) = VariableAddress[b] : +# 9| r9_6(__edg_scalable_vector_type__(unsigned char, 2)) = Load[b] : &:r9_5, ~m? +# 9| r9_7(glval<__edg_scalable_vector_type__(unsigned char, 2) *>) = VariableAddress[c] : +# 9| r9_8(__edg_scalable_vector_type__(unsigned char, 2) *) = Load[c] : &:r9_7, ~m? +# 9| r9_9(__edg_scalable_vector_type__(unsigned char, 2)) = Load[?] : &:r9_8, ~m? +# 9| r9_10(__edg_scalable_vector_type__(unsigned char, 2)) = Call[svsel_u8_x2] : func:r9_2, 0:r9_4, 1:r9_6, 2:r9_9 +# 9| mu9_11(unknown) = ^CallSideEffect : ~m? +# 9| mu9_12(__edg_scalable_vector_type__(unsigned char, 2)) = Store[d] : &:r9_1, r9_10 +# 10| r10_1(glval<__edg_scalable_vector_type__(unsigned char, 2)>) = VariableAddress[#return] : +# 10| r10_2(glval<__edg_scalable_vector_type__(unsigned char, 2)>) = VariableAddress[d] : +# 10| r10_3(__edg_scalable_vector_type__(unsigned char, 2)) = Load[d] : &:r10_2, ~m? +# 10| mu10_4(__edg_scalable_vector_type__(unsigned char, 2)) = Store[#return] : &:r10_1, r10_3 +# 8| v8_12(void) = ReturnIndirection[c] : &:r8_10, ~m? +# 8| r8_13(glval<__edg_scalable_vector_type__(unsigned char, 2)>) = VariableAddress[#return] : +# 8| v8_14(void) = ReturnValue : &:r8_13, ~m? +# 8| v8_15(void) = AliasedUse : ~m? +# 8| v8_16(void) = ExitFunction : bad_asts.cpp: # 9| int Bad::S::MemberFunction(int) diff --git a/cpp/ql/test/library-tests/templates/instantiation_directive/functions.expected b/cpp/ql/test/library-tests/templates/instantiation_directive/functions.expected index 672fae72e06..eba49fd1c6d 100644 --- a/cpp/ql/test/library-tests/templates/instantiation_directive/functions.expected +++ b/cpp/ql/test/library-tests/templates/instantiation_directive/functions.expected @@ -1,3 +1,5 @@ | file://:0:0:0:0 | operator= | file://:0:0:0:0 | __va_list_tag && | | file://:0:0:0:0 | operator= | file://:0:0:0:0 | const __va_list_tag & | +| test.cpp:2:6:2:6 | foo | file://:0:0:0:0 | float | +| test.cpp:2:6:2:6 | foo | file://:0:0:0:0 | int | | test.cpp:2:6:2:8 | foo | test.cpp:1:19:1:19 | T | diff --git a/cpp/ql/test/library-tests/templates/isfromtemplateinstantiation/instantiations.expected b/cpp/ql/test/library-tests/templates/isfromtemplateinstantiation/instantiations.expected index e1c7f956c7b..7a7b1761e98 100644 --- a/cpp/ql/test/library-tests/templates/isfromtemplateinstantiation/instantiations.expected +++ b/cpp/ql/test/library-tests/templates/isfromtemplateinstantiation/instantiations.expected @@ -10,3 +10,4 @@ | isfromtemplateinstantiation.cpp:134:29:134:33 | Outer | ClassTemplateInstantiation | file://:0:0:0:0 | int | | isfromtemplateinstantiation.cpp:135:31:135:35 | Inner | ClassTemplateInstantiation | file://:0:0:0:0 | long | | load.cpp:13:7:13:27 | basic_text_iprimitive | ClassTemplateInstantiation | load.cpp:3:7:3:24 | std_istream_mockup | +| load.cpp:22:10:22:10 | load | FunctionTemplateInstantiation | file://:0:0:0:0 | short | diff --git a/cpp/ql/test/library-tests/templates/isfromtemplateinstantiation/isfromtemplateinstantiation.expected b/cpp/ql/test/library-tests/templates/isfromtemplateinstantiation/isfromtemplateinstantiation.expected index cb35f7a6dd0..316b5273cdc 100644 --- a/cpp/ql/test/library-tests/templates/isfromtemplateinstantiation/isfromtemplateinstantiation.expected +++ b/cpp/ql/test/library-tests/templates/isfromtemplateinstantiation/isfromtemplateinstantiation.expected @@ -104,6 +104,15 @@ | isfromtemplateinstantiation.cpp:99:1:99:1 | return ... | isfromtemplateinstantiation.cpp:77:26:77:45 | AnotherTemplateClass | | isfromtemplateinstantiation.cpp:99:1:99:1 | return ... | isfromtemplateinstantiation.cpp:97:52:97:52 | AnotherTemplateClass::myMethod2(MyClassEnum) | | isfromtemplateinstantiation.cpp:110:3:110:3 | definition of var_template | isfromtemplateinstantiation.cpp:110:3:110:3 | var_template | +| isfromtemplateinstantiation.cpp:129:6:129:6 | AnotherTemplateClass::f() | isfromtemplateinstantiation.cpp:128:7:128:30 | AnotherTemplateClass | +| isfromtemplateinstantiation.cpp:129:6:129:6 | definition of f | isfromtemplateinstantiation.cpp:128:7:128:30 | AnotherTemplateClass | +| isfromtemplateinstantiation.cpp:129:6:129:6 | definition of f | isfromtemplateinstantiation.cpp:129:6:129:6 | AnotherTemplateClass::f() | +| isfromtemplateinstantiation.cpp:129:10:129:22 | { ... } | isfromtemplateinstantiation.cpp:128:7:128:30 | AnotherTemplateClass | +| isfromtemplateinstantiation.cpp:129:10:129:22 | { ... } | isfromtemplateinstantiation.cpp:129:6:129:6 | AnotherTemplateClass::f() | +| isfromtemplateinstantiation.cpp:129:12:129:20 | return ... | isfromtemplateinstantiation.cpp:128:7:128:30 | AnotherTemplateClass | +| isfromtemplateinstantiation.cpp:129:12:129:20 | return ... | isfromtemplateinstantiation.cpp:129:6:129:6 | AnotherTemplateClass::f() | +| isfromtemplateinstantiation.cpp:129:19:129:19 | 1 | isfromtemplateinstantiation.cpp:128:7:128:30 | AnotherTemplateClass | +| isfromtemplateinstantiation.cpp:129:19:129:19 | 1 | isfromtemplateinstantiation.cpp:129:6:129:6 | AnotherTemplateClass::f() | | isfromtemplateinstantiation.cpp:135:31:135:35 | Inner | isfromtemplateinstantiation.cpp:134:29:134:33 | Outer | | isfromtemplateinstantiation.cpp:135:31:135:35 | declaration of Inner | isfromtemplateinstantiation.cpp:134:29:134:33 | Outer | | isfromtemplateinstantiation.cpp:136:7:136:7 | definition of x | isfromtemplateinstantiation.cpp:135:31:135:35 | Inner | @@ -112,7 +121,94 @@ | isfromtemplateinstantiation.cpp:137:7:137:7 | y | isfromtemplateinstantiation.cpp:135:31:135:35 | Inner | | load.cpp:15:14:15:15 | definition of is | load.cpp:13:7:13:27 | basic_text_iprimitive | | load.cpp:15:14:15:15 | is | load.cpp:13:7:13:27 | basic_text_iprimitive | +| load.cpp:18:5:18:5 | basic_text_iprimitive::basic_text_iprimitive(std_istream_mockup &) | load.cpp:13:7:13:27 | basic_text_iprimitive | +| load.cpp:18:5:18:5 | definition of basic_text_iprimitive | load.cpp:13:7:13:27 | basic_text_iprimitive | +| load.cpp:18:5:18:5 | definition of basic_text_iprimitive | load.cpp:18:5:18:5 | basic_text_iprimitive::basic_text_iprimitive(std_istream_mockup &) | +| load.cpp:18:36:18:42 | definition of isParam | load.cpp:13:7:13:27 | basic_text_iprimitive | +| load.cpp:18:36:18:42 | definition of isParam | load.cpp:18:5:18:5 | basic_text_iprimitive::basic_text_iprimitive(std_istream_mockup &) | +| load.cpp:18:36:18:42 | std_istream_mockup & isParam | load.cpp:13:7:13:27 | basic_text_iprimitive | +| load.cpp:18:36:18:42 | std_istream_mockup & isParam | load.cpp:18:5:18:5 | basic_text_iprimitive::basic_text_iprimitive(std_istream_mockup &) | +| load.cpp:19:11:19:21 | constructor init of field is | load.cpp:13:7:13:27 | basic_text_iprimitive | +| load.cpp:19:11:19:21 | constructor init of field is | load.cpp:18:5:18:5 | basic_text_iprimitive::basic_text_iprimitive(std_istream_mockup &) | +| load.cpp:19:14:19:20 | (reference dereference) | load.cpp:13:7:13:27 | basic_text_iprimitive | +| load.cpp:19:14:19:20 | (reference dereference) | load.cpp:18:5:18:5 | basic_text_iprimitive::basic_text_iprimitive(std_istream_mockup &) | +| load.cpp:19:14:19:20 | (reference to) | load.cpp:13:7:13:27 | basic_text_iprimitive | +| load.cpp:19:14:19:20 | (reference to) | load.cpp:18:5:18:5 | basic_text_iprimitive::basic_text_iprimitive(std_istream_mockup &) | +| load.cpp:19:14:19:20 | isParam | load.cpp:13:7:13:27 | basic_text_iprimitive | +| load.cpp:19:14:19:20 | isParam | load.cpp:18:5:18:5 | basic_text_iprimitive::basic_text_iprimitive(std_istream_mockup &) | +| load.cpp:19:23:19:24 | { ... } | load.cpp:13:7:13:27 | basic_text_iprimitive | +| load.cpp:19:23:19:24 | { ... } | load.cpp:18:5:18:5 | basic_text_iprimitive::basic_text_iprimitive(std_istream_mockup &) | +| load.cpp:19:24:19:24 | return ... | load.cpp:13:7:13:27 | basic_text_iprimitive | +| load.cpp:19:24:19:24 | return ... | load.cpp:18:5:18:5 | basic_text_iprimitive::basic_text_iprimitive(std_istream_mockup &) | +| load.cpp:22:10:22:10 | basic_text_iprimitive::load(short &) | load.cpp:13:7:13:27 | basic_text_iprimitive | +| load.cpp:22:10:22:10 | definition of load | load.cpp:13:7:13:27 | basic_text_iprimitive | +| load.cpp:22:10:22:10 | definition of load | load.cpp:22:10:22:10 | basic_text_iprimitive::load(short &) | | load.cpp:22:10:22:13 | basic_text_iprimitive::load(T &) | load.cpp:13:7:13:27 | basic_text_iprimitive | | load.cpp:22:10:22:13 | declaration of load | load.cpp:13:7:13:27 | basic_text_iprimitive | | load.cpp:22:19:22:19 | T & t | load.cpp:13:7:13:27 | basic_text_iprimitive | | load.cpp:22:19:22:19 | declaration of t | load.cpp:13:7:13:27 | basic_text_iprimitive | +| load.cpp:22:19:22:19 | definition of t | load.cpp:13:7:13:27 | basic_text_iprimitive | +| load.cpp:22:19:22:19 | definition of t | load.cpp:22:10:22:10 | basic_text_iprimitive::load(short &) | +| load.cpp:22:19:22:19 | short & t | load.cpp:13:7:13:27 | basic_text_iprimitive | +| load.cpp:22:19:22:19 | short & t | load.cpp:22:10:22:10 | basic_text_iprimitive::load(short &) | +| load.cpp:23:5:25:5 | { ... } | load.cpp:13:7:13:27 | basic_text_iprimitive | +| load.cpp:23:5:25:5 | { ... } | load.cpp:22:10:22:10 | basic_text_iprimitive::load(short &) | +| load.cpp:24:9:24:10 | (reference dereference) | load.cpp:13:7:13:27 | basic_text_iprimitive | +| load.cpp:24:9:24:10 | (reference dereference) | load.cpp:22:10:22:10 | basic_text_iprimitive::load(short &) | +| load.cpp:24:9:24:10 | is | load.cpp:13:7:13:27 | basic_text_iprimitive | +| load.cpp:24:9:24:10 | is | load.cpp:22:10:22:10 | basic_text_iprimitive::load(short &) | +| load.cpp:24:9:24:10 | this | load.cpp:13:7:13:27 | basic_text_iprimitive | +| load.cpp:24:9:24:10 | this | load.cpp:22:10:22:10 | basic_text_iprimitive::load(short &) | +| load.cpp:24:9:24:16 | ExprStmt | load.cpp:13:7:13:27 | basic_text_iprimitive | +| load.cpp:24:9:24:16 | ExprStmt | load.cpp:22:10:22:10 | basic_text_iprimitive::load(short &) | +| load.cpp:24:12:24:12 | call to operator>> | load.cpp:13:7:13:27 | basic_text_iprimitive | +| load.cpp:24:12:24:12 | call to operator>> | load.cpp:22:10:22:10 | basic_text_iprimitive::load(short &) | +| load.cpp:24:12:24:16 | (reference dereference) | load.cpp:13:7:13:27 | basic_text_iprimitive | +| load.cpp:24:12:24:16 | (reference dereference) | load.cpp:22:10:22:10 | basic_text_iprimitive::load(short &) | +| load.cpp:24:15:24:15 | (reference dereference) | load.cpp:13:7:13:27 | basic_text_iprimitive | +| load.cpp:24:15:24:15 | (reference dereference) | load.cpp:22:10:22:10 | basic_text_iprimitive::load(short &) | +| load.cpp:24:15:24:15 | (reference to) | load.cpp:13:7:13:27 | basic_text_iprimitive | +| load.cpp:24:15:24:15 | (reference to) | load.cpp:22:10:22:10 | basic_text_iprimitive::load(short &) | +| load.cpp:24:15:24:15 | t | load.cpp:13:7:13:27 | basic_text_iprimitive | +| load.cpp:24:15:24:15 | t | load.cpp:22:10:22:10 | basic_text_iprimitive::load(short &) | +| load.cpp:25:5:25:5 | return ... | load.cpp:13:7:13:27 | basic_text_iprimitive | +| load.cpp:25:5:25:5 | return ... | load.cpp:22:10:22:10 | basic_text_iprimitive::load(short &) | +| load.cpp:27:10:27:10 | basic_text_iprimitive::load(char &) | load.cpp:13:7:13:27 | basic_text_iprimitive | +| load.cpp:27:10:27:10 | definition of load | load.cpp:13:7:13:27 | basic_text_iprimitive | +| load.cpp:27:10:27:10 | definition of load | load.cpp:27:10:27:10 | basic_text_iprimitive::load(char &) | +| load.cpp:27:22:27:22 | char & t | load.cpp:13:7:13:27 | basic_text_iprimitive | +| load.cpp:27:22:27:22 | char & t | load.cpp:27:10:27:10 | basic_text_iprimitive::load(char &) | +| load.cpp:27:22:27:22 | definition of t | load.cpp:13:7:13:27 | basic_text_iprimitive | +| load.cpp:27:22:27:22 | definition of t | load.cpp:27:10:27:10 | basic_text_iprimitive::load(char &) | +| load.cpp:28:5:32:5 | { ... } | load.cpp:13:7:13:27 | basic_text_iprimitive | +| load.cpp:28:5:32:5 | { ... } | load.cpp:27:10:27:10 | basic_text_iprimitive::load(char &) | +| load.cpp:29:9:29:20 | declaration | load.cpp:13:7:13:27 | basic_text_iprimitive | +| load.cpp:29:9:29:20 | declaration | load.cpp:27:10:27:10 | basic_text_iprimitive::load(char &) | +| load.cpp:29:19:29:19 | definition of i | load.cpp:13:7:13:27 | basic_text_iprimitive | +| load.cpp:29:19:29:19 | definition of i | load.cpp:27:10:27:10 | basic_text_iprimitive::load(char &) | +| load.cpp:29:19:29:19 | i | load.cpp:13:7:13:27 | basic_text_iprimitive | +| load.cpp:29:19:29:19 | i | load.cpp:27:10:27:10 | basic_text_iprimitive::load(char &) | +| load.cpp:30:9:30:12 | call to load | load.cpp:13:7:13:27 | basic_text_iprimitive | +| load.cpp:30:9:30:12 | call to load | load.cpp:27:10:27:10 | basic_text_iprimitive::load(char &) | +| load.cpp:30:9:30:12 | this | load.cpp:13:7:13:27 | basic_text_iprimitive | +| load.cpp:30:9:30:12 | this | load.cpp:27:10:27:10 | basic_text_iprimitive::load(char &) | +| load.cpp:30:9:30:16 | ExprStmt | load.cpp:13:7:13:27 | basic_text_iprimitive | +| load.cpp:30:9:30:16 | ExprStmt | load.cpp:27:10:27:10 | basic_text_iprimitive::load(char &) | +| load.cpp:30:14:30:14 | (reference to) | load.cpp:13:7:13:27 | basic_text_iprimitive | +| load.cpp:30:14:30:14 | (reference to) | load.cpp:27:10:27:10 | basic_text_iprimitive::load(char &) | +| load.cpp:30:14:30:14 | i | load.cpp:13:7:13:27 | basic_text_iprimitive | +| load.cpp:30:14:30:14 | i | load.cpp:27:10:27:10 | basic_text_iprimitive::load(char &) | +| load.cpp:31:9:31:9 | (reference dereference) | load.cpp:13:7:13:27 | basic_text_iprimitive | +| load.cpp:31:9:31:9 | (reference dereference) | load.cpp:27:10:27:10 | basic_text_iprimitive::load(char &) | +| load.cpp:31:9:31:9 | t | load.cpp:13:7:13:27 | basic_text_iprimitive | +| load.cpp:31:9:31:9 | t | load.cpp:27:10:27:10 | basic_text_iprimitive::load(char &) | +| load.cpp:31:9:31:13 | ... = ... | load.cpp:13:7:13:27 | basic_text_iprimitive | +| load.cpp:31:9:31:13 | ... = ... | load.cpp:27:10:27:10 | basic_text_iprimitive::load(char &) | +| load.cpp:31:9:31:14 | ExprStmt | load.cpp:13:7:13:27 | basic_text_iprimitive | +| load.cpp:31:9:31:14 | ExprStmt | load.cpp:27:10:27:10 | basic_text_iprimitive::load(char &) | +| load.cpp:31:13:31:13 | (char)... | load.cpp:13:7:13:27 | basic_text_iprimitive | +| load.cpp:31:13:31:13 | (char)... | load.cpp:27:10:27:10 | basic_text_iprimitive::load(char &) | +| load.cpp:31:13:31:13 | i | load.cpp:13:7:13:27 | basic_text_iprimitive | +| load.cpp:31:13:31:13 | i | load.cpp:27:10:27:10 | basic_text_iprimitive::load(char &) | +| load.cpp:32:5:32:5 | return ... | load.cpp:13:7:13:27 | basic_text_iprimitive | +| load.cpp:32:5:32:5 | return ... | load.cpp:27:10:27:10 | basic_text_iprimitive::load(char &) | diff --git a/cpp/ql/test/library-tests/templates/isfromtemplateinstantiation/isfromuninstantiatedtemplate.expected b/cpp/ql/test/library-tests/templates/isfromtemplateinstantiation/isfromuninstantiatedtemplate.expected index 8a78058a723..ce20dedcfca 100644 --- a/cpp/ql/test/library-tests/templates/isfromtemplateinstantiation/isfromuninstantiatedtemplate.expected +++ b/cpp/ql/test/library-tests/templates/isfromtemplateinstantiation/isfromuninstantiatedtemplate.expected @@ -425,7 +425,16 @@ isFromUninstantiatedTemplate | isfromtemplateinstantiation.cpp:123:6:123:6 | f | | | Declaration | | | isfromtemplateinstantiation.cpp:128:7:128:30 | AnotherTemplateClass | | T | Declaration | | | isfromtemplateinstantiation.cpp:128:7:128:30 | AnotherTemplateClass | I | | Declaration | | +| isfromtemplateinstantiation.cpp:129:6:129:6 | definition of f | | T | Definition | | +| isfromtemplateinstantiation.cpp:129:6:129:6 | definition of f | I | | Definition | | | isfromtemplateinstantiation.cpp:129:6:129:6 | f | | T | Declaration | | +| isfromtemplateinstantiation.cpp:129:6:129:6 | f | I | | Declaration | | +| isfromtemplateinstantiation.cpp:129:10:129:22 | { ... } | | T | Stmt | | +| isfromtemplateinstantiation.cpp:129:10:129:22 | { ... } | I | | Stmt | | +| isfromtemplateinstantiation.cpp:129:12:129:20 | return ... | | T | Stmt | | +| isfromtemplateinstantiation.cpp:129:12:129:20 | return ... | I | | Stmt | | +| isfromtemplateinstantiation.cpp:129:19:129:19 | 1 | | T | Expr | | +| isfromtemplateinstantiation.cpp:129:19:129:19 | 1 | I | | Expr | | | isfromtemplateinstantiation.cpp:134:29:134:33 | Outer | | T | Declaration | | | isfromtemplateinstantiation.cpp:134:29:134:33 | Outer | I | | Declaration | | | isfromtemplateinstantiation.cpp:135:31:135:35 | Inner | | T | Declaration | | @@ -461,21 +470,82 @@ isFromUninstantiatedTemplate | load.cpp:15:14:15:15 | definition of is | I | | Definition | | | load.cpp:15:14:15:15 | is | | T | Declaration | | | load.cpp:15:14:15:15 | is | I | | Declaration | | +| load.cpp:18:5:18:5 | basic_text_iprimitive | I | | Declaration | | | load.cpp:18:5:18:25 | basic_text_iprimitive | | T | Declaration | | +| load.cpp:18:36:18:42 | definition of isParam | | T | Definition | | +| load.cpp:18:36:18:42 | definition of isParam | I | | Definition | | +| load.cpp:18:36:18:42 | isParam | | T | Declaration | | +| load.cpp:18:36:18:42 | isParam | I | | Declaration | | +| load.cpp:19:11:19:21 | constructor init of field is | | T | Expr | | +| load.cpp:19:11:19:21 | constructor init of field is | I | | Expr | | | load.cpp:19:14:19:20 | (reference dereference) | | T | Expr | | +| load.cpp:19:14:19:20 | (reference dereference) | I | | Expr | | | load.cpp:19:14:19:20 | (reference to) | | T | Expr | | +| load.cpp:19:14:19:20 | (reference to) | I | | Expr | | | load.cpp:19:14:19:20 | isParam | | T | Expr | Ref | +| load.cpp:19:14:19:20 | isParam | I | | Expr | Ref | +| load.cpp:19:23:19:24 | { ... } | | T | Stmt | | +| load.cpp:19:23:19:24 | { ... } | I | | Stmt | | +| load.cpp:19:24:19:24 | return ... | | T | Stmt | | +| load.cpp:19:24:19:24 | return ... | I | | Stmt | | +| load.cpp:22:10:22:10 | load | I | | Declaration | | | load.cpp:22:10:22:13 | load | | T | Declaration | | | load.cpp:22:10:22:13 | load | I | T | Declaration | | +| load.cpp:22:19:22:19 | definition of t | | T | Definition | | +| load.cpp:22:19:22:19 | definition of t | I | | Definition | | | load.cpp:22:19:22:19 | t | | T | Declaration | | +| load.cpp:22:19:22:19 | t | I | | Declaration | | | load.cpp:22:19:22:19 | t | I | T | Declaration | | +| load.cpp:23:5:25:5 | { ... } | | T | Stmt | | +| load.cpp:23:5:25:5 | { ... } | I | | Stmt | | | load.cpp:24:9:24:10 | (reference dereference) | | T | Expr | | +| load.cpp:24:9:24:10 | (reference dereference) | I | | Expr | | | load.cpp:24:9:24:10 | is | | T | Expr | Not ref | +| load.cpp:24:9:24:10 | is | I | | Expr | Not ref | | load.cpp:24:9:24:10 | this | | T | Expr | | +| load.cpp:24:9:24:10 | this | I | | Expr | | +| load.cpp:24:9:24:16 | ExprStmt | | T | Stmt | | +| load.cpp:24:9:24:16 | ExprStmt | I | | Stmt | | | load.cpp:24:15:24:15 | (reference dereference) | | T | Expr | | +| load.cpp:24:15:24:15 | (reference dereference) | I | | Expr | | +| load.cpp:24:15:24:15 | (reference to) | I | | Expr | | | load.cpp:24:15:24:15 | t | | T | Expr | Not ref | +| load.cpp:24:15:24:15 | t | I | | Expr | Ref | +| load.cpp:25:5:25:5 | return ... | | T | Stmt | | +| load.cpp:25:5:25:5 | return ... | I | | Stmt | | +| load.cpp:27:10:27:10 | load | I | | Declaration | | | load.cpp:27:10:27:13 | load | | T | Declaration | | +| load.cpp:27:22:27:22 | definition of t | | T | Definition | | +| load.cpp:27:22:27:22 | definition of t | I | | Definition | | +| load.cpp:27:22:27:22 | t | | T | Declaration | | +| load.cpp:27:22:27:22 | t | I | | Declaration | | +| load.cpp:28:5:32:5 | { ... } | | T | Stmt | | +| load.cpp:28:5:32:5 | { ... } | I | | Stmt | | +| load.cpp:29:9:29:20 | declaration | | T | Stmt | | +| load.cpp:29:9:29:20 | declaration | I | | Stmt | | +| load.cpp:29:19:29:19 | definition of i | | T | Definition | | +| load.cpp:29:19:29:19 | definition of i | I | | Definition | | +| load.cpp:29:19:29:19 | i | | T | Declaration | | +| load.cpp:29:19:29:19 | i | I | | Declaration | | +| load.cpp:30:9:30:12 | Unknown literal | | T | Expr | | +| load.cpp:30:9:30:12 | call to load | I | | Expr | | +| load.cpp:30:9:30:12 | this | I | | Expr | | +| load.cpp:30:9:30:16 | ExprStmt | | T | Stmt | | +| load.cpp:30:9:30:16 | ExprStmt | I | | Stmt | | +| load.cpp:30:14:30:14 | (reference to) | I | | Expr | | +| load.cpp:30:14:30:14 | i | | T | Expr | Not ref | +| load.cpp:30:14:30:14 | i | I | | Expr | Ref | | load.cpp:31:9:31:9 | (reference dereference) | | T | Expr | | +| load.cpp:31:9:31:9 | (reference dereference) | I | | Expr | | | load.cpp:31:9:31:9 | t | | T | Expr | Not ref | +| load.cpp:31:9:31:9 | t | I | | Expr | Not ref | +| load.cpp:31:9:31:13 | ... = ... | | T | Expr | | +| load.cpp:31:9:31:13 | ... = ... | I | | Expr | | +| load.cpp:31:9:31:14 | ExprStmt | | T | Stmt | | +| load.cpp:31:9:31:14 | ExprStmt | I | | Stmt | | | load.cpp:31:13:31:13 | (char)... | | T | Expr | | +| load.cpp:31:13:31:13 | (char)... | I | | Expr | | | load.cpp:31:13:31:13 | i | | T | Expr | Not ref | +| load.cpp:31:13:31:13 | i | I | | Expr | Not ref | +| load.cpp:32:5:32:5 | return ... | | T | Stmt | | +| load.cpp:32:5:32:5 | return ... | I | | Stmt | | diff --git a/cpp/ql/test/library-tests/templates/switch/test.expected b/cpp/ql/test/library-tests/templates/switch/test.expected index 1ba49e1caf9..b4124494ffe 100644 --- a/cpp/ql/test/library-tests/templates/switch/test.expected +++ b/cpp/ql/test/library-tests/templates/switch/test.expected @@ -1 +1,2 @@ | test.cpp:13:3:20:3 | switch (...) ... | 3 | +| test.cpp:13:3:20:3 | switch (...) ... | 3 | diff --git a/cpp/ql/test/library-tests/templates/type_instantiations/types.expected b/cpp/ql/test/library-tests/templates/type_instantiations/types.expected index 548f5f10189..e6c8b1d9406 100644 --- a/cpp/ql/test/library-tests/templates/type_instantiations/types.expected +++ b/cpp/ql/test/library-tests/templates/type_instantiations/types.expected @@ -5,10 +5,13 @@ | file://:0:0:0:0 | _Complex _Float64 | | file://:0:0:0:0 | _Complex _Float64x | | file://:0:0:0:0 | _Complex _Float128 | +| file://:0:0:0:0 | _Complex __bf16 | | file://:0:0:0:0 | _Complex __float128 | +| file://:0:0:0:0 | _Complex __fp16 | | file://:0:0:0:0 | _Complex double | | file://:0:0:0:0 | _Complex float | | file://:0:0:0:0 | _Complex long double | +| file://:0:0:0:0 | _Complex std::float16_t | | file://:0:0:0:0 | _Decimal32 | | file://:0:0:0:0 | _Decimal64 | | file://:0:0:0:0 | _Decimal128 | diff --git a/cpp/ql/test/library-tests/type_sizes/type_sizes.expected b/cpp/ql/test/library-tests/type_sizes/type_sizes.expected index c77aadc8f4f..ac1344753e9 100644 --- a/cpp/ql/test/library-tests/type_sizes/type_sizes.expected +++ b/cpp/ql/test/library-tests/type_sizes/type_sizes.expected @@ -25,10 +25,13 @@ | file://:0:0:0:0 | _Complex _Float64 | 16 | | file://:0:0:0:0 | _Complex _Float64x | 32 | | file://:0:0:0:0 | _Complex _Float128 | 32 | +| file://:0:0:0:0 | _Complex __bf16 | 4 | | file://:0:0:0:0 | _Complex __float128 | 32 | +| file://:0:0:0:0 | _Complex __fp16 | 4 | | file://:0:0:0:0 | _Complex double | 16 | | file://:0:0:0:0 | _Complex float | 8 | | file://:0:0:0:0 | _Complex long double | 32 | +| file://:0:0:0:0 | _Complex std::float16_t | 4 | | file://:0:0:0:0 | _Decimal32 | 4 | | file://:0:0:0:0 | _Decimal64 | 8 | | file://:0:0:0:0 | _Decimal128 | 16 | diff --git a/cpp/ql/test/library-tests/unspecified_type/types/unspecified_type.expected b/cpp/ql/test/library-tests/unspecified_type/types/unspecified_type.expected index 94185a66899..3f22b9f98f5 100644 --- a/cpp/ql/test/library-tests/unspecified_type/types/unspecified_type.expected +++ b/cpp/ql/test/library-tests/unspecified_type/types/unspecified_type.expected @@ -7,10 +7,13 @@ | file://:0:0:0:0 | _Complex _Float64 | _Complex _Float64 | | file://:0:0:0:0 | _Complex _Float64x | _Complex _Float64x | | file://:0:0:0:0 | _Complex _Float128 | _Complex _Float128 | +| file://:0:0:0:0 | _Complex __bf16 | _Complex __bf16 | | file://:0:0:0:0 | _Complex __float128 | _Complex __float128 | +| file://:0:0:0:0 | _Complex __fp16 | _Complex __fp16 | | file://:0:0:0:0 | _Complex double | _Complex double | | file://:0:0:0:0 | _Complex float | _Complex float | | file://:0:0:0:0 | _Complex long double | _Complex long double | +| file://:0:0:0:0 | _Complex std::float16_t | _Complex std::float16_t | | file://:0:0:0:0 | _Decimal32 | _Decimal32 | | file://:0:0:0:0 | _Decimal64 | _Decimal64 | | file://:0:0:0:0 | _Decimal128 | _Decimal128 | diff --git a/cpp/ql/test/library-tests/variables/variables/types.expected b/cpp/ql/test/library-tests/variables/variables/types.expected index 362ab5c6433..c2ea5f7cfe3 100644 --- a/cpp/ql/test/library-tests/variables/variables/types.expected +++ b/cpp/ql/test/library-tests/variables/variables/types.expected @@ -6,10 +6,13 @@ | _Complex _Float64 | BinaryFloatingPointType, ComplexNumberType | | | | | | _Complex _Float64x | BinaryFloatingPointType, ComplexNumberType | | | | | | _Complex _Float128 | BinaryFloatingPointType, ComplexNumberType | | | | | +| _Complex __bf16 | BinaryFloatingPointType, ComplexNumberType | | | | | | _Complex __float128 | BinaryFloatingPointType, ComplexNumberType | | | | | +| _Complex __fp16 | BinaryFloatingPointType, ComplexNumberType | | | | | | _Complex double | BinaryFloatingPointType, ComplexNumberType | | | | | | _Complex float | BinaryFloatingPointType, ComplexNumberType | | | | | | _Complex long double | BinaryFloatingPointType, ComplexNumberType | | | | | +| _Complex std::float16_t | BinaryFloatingPointType, ComplexNumberType | | | | | | _Decimal32 | Decimal32Type | | | | | | _Decimal64 | Decimal64Type | | | | | | _Decimal128 | Decimal128Type | | | | | diff --git a/csharp/ql/campaigns/Solorigate/lib/CHANGELOG.md b/csharp/ql/campaigns/Solorigate/lib/CHANGELOG.md index 127bb19bbc6..99267b32a40 100644 --- a/csharp/ql/campaigns/Solorigate/lib/CHANGELOG.md +++ b/csharp/ql/campaigns/Solorigate/lib/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.7.43 + +No user-facing changes. + ## 1.7.42 No user-facing changes. diff --git a/csharp/ql/campaigns/Solorigate/lib/change-notes/released/1.7.43.md b/csharp/ql/campaigns/Solorigate/lib/change-notes/released/1.7.43.md new file mode 100644 index 00000000000..10a22c6b4be --- /dev/null +++ b/csharp/ql/campaigns/Solorigate/lib/change-notes/released/1.7.43.md @@ -0,0 +1,3 @@ +## 1.7.43 + +No user-facing changes. diff --git a/csharp/ql/campaigns/Solorigate/lib/codeql-pack.release.yml b/csharp/ql/campaigns/Solorigate/lib/codeql-pack.release.yml index 8317cee0ddb..9b37539bf65 100644 --- a/csharp/ql/campaigns/Solorigate/lib/codeql-pack.release.yml +++ b/csharp/ql/campaigns/Solorigate/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.7.42 +lastReleaseVersion: 1.7.43 diff --git a/csharp/ql/campaigns/Solorigate/lib/qlpack.yml b/csharp/ql/campaigns/Solorigate/lib/qlpack.yml index a86abb4812b..b9e0c245b85 100644 --- a/csharp/ql/campaigns/Solorigate/lib/qlpack.yml +++ b/csharp/ql/campaigns/Solorigate/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/csharp-solorigate-all -version: 1.7.43-dev +version: 1.7.44-dev groups: - csharp - solorigate diff --git a/csharp/ql/campaigns/Solorigate/src/CHANGELOG.md b/csharp/ql/campaigns/Solorigate/src/CHANGELOG.md index 127bb19bbc6..99267b32a40 100644 --- a/csharp/ql/campaigns/Solorigate/src/CHANGELOG.md +++ b/csharp/ql/campaigns/Solorigate/src/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.7.43 + +No user-facing changes. + ## 1.7.42 No user-facing changes. diff --git a/csharp/ql/campaigns/Solorigate/src/change-notes/released/1.7.43.md b/csharp/ql/campaigns/Solorigate/src/change-notes/released/1.7.43.md new file mode 100644 index 00000000000..10a22c6b4be --- /dev/null +++ b/csharp/ql/campaigns/Solorigate/src/change-notes/released/1.7.43.md @@ -0,0 +1,3 @@ +## 1.7.43 + +No user-facing changes. diff --git a/csharp/ql/campaigns/Solorigate/src/codeql-pack.release.yml b/csharp/ql/campaigns/Solorigate/src/codeql-pack.release.yml index 8317cee0ddb..9b37539bf65 100644 --- a/csharp/ql/campaigns/Solorigate/src/codeql-pack.release.yml +++ b/csharp/ql/campaigns/Solorigate/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.7.42 +lastReleaseVersion: 1.7.43 diff --git a/csharp/ql/campaigns/Solorigate/src/qlpack.yml b/csharp/ql/campaigns/Solorigate/src/qlpack.yml index caf1e66033e..7cf7f04a63a 100644 --- a/csharp/ql/campaigns/Solorigate/src/qlpack.yml +++ b/csharp/ql/campaigns/Solorigate/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/csharp-solorigate-queries -version: 1.7.43-dev +version: 1.7.44-dev groups: - csharp - solorigate diff --git a/csharp/ql/lib/CHANGELOG.md b/csharp/ql/lib/CHANGELOG.md index 5eeedc6f77b..3124c68b6ab 100644 --- a/csharp/ql/lib/CHANGELOG.md +++ b/csharp/ql/lib/CHANGELOG.md @@ -1,3 +1,7 @@ +## 5.1.9 + +No user-facing changes. + ## 5.1.8 No user-facing changes. diff --git a/csharp/ql/lib/change-notes/released/5.1.9.md b/csharp/ql/lib/change-notes/released/5.1.9.md new file mode 100644 index 00000000000..78965f168e0 --- /dev/null +++ b/csharp/ql/lib/change-notes/released/5.1.9.md @@ -0,0 +1,3 @@ +## 5.1.9 + +No user-facing changes. diff --git a/csharp/ql/lib/codeql-pack.release.yml b/csharp/ql/lib/codeql-pack.release.yml index 8ffbb79d224..f9bf2605261 100644 --- a/csharp/ql/lib/codeql-pack.release.yml +++ b/csharp/ql/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 5.1.8 +lastReleaseVersion: 5.1.9 diff --git a/csharp/ql/lib/qlpack.yml b/csharp/ql/lib/qlpack.yml index 464284c56cb..faa7e5e7198 100644 --- a/csharp/ql/lib/qlpack.yml +++ b/csharp/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/csharp-all -version: 5.1.9-dev +version: 5.1.10-dev groups: csharp dbscheme: semmlecode.csharp.dbscheme extractor: csharp diff --git a/csharp/ql/src/CHANGELOG.md b/csharp/ql/src/CHANGELOG.md index 4eabf64f6a5..da76eab521c 100644 --- a/csharp/ql/src/CHANGELOG.md +++ b/csharp/ql/src/CHANGELOG.md @@ -1,3 +1,14 @@ +## 1.3.0 + +### Query Metadata Changes + +* Query metadata tags have been systematically updated for many C# queries. Primary categorization as either `reliability` or `maintainability`, and relevant sub-category tags such as `readability`, `useless-code`, `complexity`, `performance`, `correctness`, `error-handling`, and `concurrency`. Aligns with the established [Query file metadata and alert message style guide](https://github.com/github/codeql/blob/main/docs/query-metadata-style-guide.md#quality-query-sub-category-tags). +* Adjusts the `@security-severity` from 9.3 to 7.3 for `cs/uncontrolled-format-string` to align `CWE-134` severity for memory safe languages to better reflect their impact. + +### Minor Analysis Improvements + +* The queries `cs/dereferenced-value-is-always-null` and `cs/dereferenced-value-may-be-null` have been improved to reduce false positives. The queries no longer assume that expressions are dereferenced when passed as the receiver (`this` parameter) to extension methods where that parameter is a nullable type. + ## 1.2.2 No user-facing changes. diff --git a/csharp/ql/src/change-notes/2025-06-03-dereferece-extension-method.md b/csharp/ql/src/change-notes/2025-06-03-dereferece-extension-method.md deleted file mode 100644 index b12ec9768d5..00000000000 --- a/csharp/ql/src/change-notes/2025-06-03-dereferece-extension-method.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -category: minorAnalysis ---- -* The queries `cs/dereferenced-value-is-always-null` and `cs/dereferenced-value-may-be-null` have been improved to reduce false positives. The queries no longer assume that expressions are dereferenced when passed as the receiver (`this` parameter) to extension methods where that parameter is a nullable type. diff --git a/csharp/ql/src/change-notes/2025-06-06-reduce-CWE-134-for-memory-safe-languages.md b/csharp/ql/src/change-notes/2025-06-06-reduce-CWE-134-for-memory-safe-languages.md deleted file mode 100644 index 60006391ac6..00000000000 --- a/csharp/ql/src/change-notes/2025-06-06-reduce-CWE-134-for-memory-safe-languages.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -category: queryMetadata ---- -* Adjusts the `@security-severity` from 9.3 to 7.3 for `cs/uncontrolled-format-string` to align `CWE-134` severity for memory safe languages to better reflect their impact. diff --git a/csharp/ql/src/change-notes/2025-06-16-tagging.md b/csharp/ql/src/change-notes/2025-06-16-tagging.md deleted file mode 100644 index d0b8d2c41ee..00000000000 --- a/csharp/ql/src/change-notes/2025-06-16-tagging.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -category: queryMetadata ---- -* Query metadata tags have been systematically updated for many C# queries. Primary categorization as either `reliability` or `maintainability`, and relevant sub-category tags such as `readability`, `useless-code`, `complexity`, `performance`, `correctness`, `error-handling`, and `concurrency`. Aligns with the established [Query file metadata and alert message style guide](https://github.com/github/codeql/blob/main/docs/query-metadata-style-guide.md#quality-query-sub-category-tags). diff --git a/csharp/ql/src/change-notes/released/1.3.0.md b/csharp/ql/src/change-notes/released/1.3.0.md new file mode 100644 index 00000000000..91cd3426944 --- /dev/null +++ b/csharp/ql/src/change-notes/released/1.3.0.md @@ -0,0 +1,10 @@ +## 1.3.0 + +### Query Metadata Changes + +* Query metadata tags have been systematically updated for many C# queries. Primary categorization as either `reliability` or `maintainability`, and relevant sub-category tags such as `readability`, `useless-code`, `complexity`, `performance`, `correctness`, `error-handling`, and `concurrency`. Aligns with the established [Query file metadata and alert message style guide](https://github.com/github/codeql/blob/main/docs/query-metadata-style-guide.md#quality-query-sub-category-tags). +* Adjusts the `@security-severity` from 9.3 to 7.3 for `cs/uncontrolled-format-string` to align `CWE-134` severity for memory safe languages to better reflect their impact. + +### Minor Analysis Improvements + +* The queries `cs/dereferenced-value-is-always-null` and `cs/dereferenced-value-may-be-null` have been improved to reduce false positives. The queries no longer assume that expressions are dereferenced when passed as the receiver (`this` parameter) to extension methods where that parameter is a nullable type. diff --git a/csharp/ql/src/codeql-pack.release.yml b/csharp/ql/src/codeql-pack.release.yml index 0a70a9a01a7..ec16350ed6f 100644 --- a/csharp/ql/src/codeql-pack.release.yml +++ b/csharp/ql/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.2.2 +lastReleaseVersion: 1.3.0 diff --git a/csharp/ql/src/qlpack.yml b/csharp/ql/src/qlpack.yml index 6437a730f15..b6307e4210a 100644 --- a/csharp/ql/src/qlpack.yml +++ b/csharp/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/csharp-queries -version: 1.2.3-dev +version: 1.3.1-dev groups: - csharp - queries diff --git a/docs/codeql/codeql-language-guides/customizing-library-models-for-javascript.rst b/docs/codeql/codeql-language-guides/customizing-library-models-for-javascript.rst index fa2c1d4e8a8..413471be885 100644 --- a/docs/codeql/codeql-language-guides/customizing-library-models-for-javascript.rst +++ b/docs/codeql/codeql-language-guides/customizing-library-models-for-javascript.rst @@ -517,7 +517,6 @@ The following components are supported: - **Member[**\ `name`\ **]** selects the property with the given name. - **AnyMember** selects any property regardless of name. - **ArrayElement** selects an element of an array. -- **Element** selects an element of an array, iterator, or set object. - **MapValue** selects a value of a map object. - **Awaited** selects the value of a promise. - **Instance** selects instances of a class, including instances of its subclasses. diff --git a/go/ql/consistency-queries/CHANGELOG.md b/go/ql/consistency-queries/CHANGELOG.md index 3fa1fa4c69b..0d814dec385 100644 --- a/go/ql/consistency-queries/CHANGELOG.md +++ b/go/ql/consistency-queries/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.26 + +No user-facing changes. + ## 1.0.25 No user-facing changes. diff --git a/go/ql/consistency-queries/change-notes/released/1.0.26.md b/go/ql/consistency-queries/change-notes/released/1.0.26.md new file mode 100644 index 00000000000..4920e2b2435 --- /dev/null +++ b/go/ql/consistency-queries/change-notes/released/1.0.26.md @@ -0,0 +1,3 @@ +## 1.0.26 + +No user-facing changes. diff --git a/go/ql/consistency-queries/codeql-pack.release.yml b/go/ql/consistency-queries/codeql-pack.release.yml index a5a44030e85..125d169e44f 100644 --- a/go/ql/consistency-queries/codeql-pack.release.yml +++ b/go/ql/consistency-queries/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.25 +lastReleaseVersion: 1.0.26 diff --git a/go/ql/consistency-queries/qlpack.yml b/go/ql/consistency-queries/qlpack.yml index 17730391629..e964007a13d 100644 --- a/go/ql/consistency-queries/qlpack.yml +++ b/go/ql/consistency-queries/qlpack.yml @@ -1,5 +1,5 @@ name: codeql-go-consistency-queries -version: 1.0.26-dev +version: 1.0.27-dev groups: - go - queries diff --git a/go/ql/lib/CHANGELOG.md b/go/ql/lib/CHANGELOG.md index 879662575e2..c5fac252869 100644 --- a/go/ql/lib/CHANGELOG.md +++ b/go/ql/lib/CHANGELOG.md @@ -1,3 +1,7 @@ +## 4.2.8 + +No user-facing changes. + ## 4.2.7 ### Minor Analysis Improvements diff --git a/go/ql/lib/change-notes/2025-06-03-fix-definedtype-getbasetype.md b/go/ql/lib/change-notes/2025-06-03-fix-definedtype-getbasetype.md new file mode 100644 index 00000000000..b58ebf64f09 --- /dev/null +++ b/go/ql/lib/change-notes/2025-06-03-fix-definedtype-getbasetype.md @@ -0,0 +1,4 @@ +--- +category: minorAnalysis +--- +* Previously, `DefinedType.getBaseType` gave the underlying type. It now gives the right hand side of the type declaration, as the documentation indicated that it should. diff --git a/go/ql/lib/change-notes/2025-06-05-deprecate-DeclaredType-BuiltinType.md b/go/ql/lib/change-notes/2025-06-05-deprecate-DeclaredType-BuiltinType.md new file mode 100644 index 00000000000..6744743ea27 --- /dev/null +++ b/go/ql/lib/change-notes/2025-06-05-deprecate-DeclaredType-BuiltinType.md @@ -0,0 +1,5 @@ +--- +category: deprecated +--- +* The class `BuiltinType` is now deprecated. Use the new replacement `BuiltinTypeEntity` instead. +* The class `DeclaredType` is now deprecated. Use the new replacement `DeclaredTypeEntity` instead. diff --git a/go/ql/lib/change-notes/released/4.2.8.md b/go/ql/lib/change-notes/released/4.2.8.md new file mode 100644 index 00000000000..9b1c8820dc4 --- /dev/null +++ b/go/ql/lib/change-notes/released/4.2.8.md @@ -0,0 +1,3 @@ +## 4.2.8 + +No user-facing changes. diff --git a/go/ql/lib/codeql-pack.release.yml b/go/ql/lib/codeql-pack.release.yml index 0c0ee7d4dfd..9b51fbc5ce5 100644 --- a/go/ql/lib/codeql-pack.release.yml +++ b/go/ql/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 4.2.7 +lastReleaseVersion: 4.2.8 diff --git a/go/ql/lib/qlpack.yml b/go/ql/lib/qlpack.yml index 9c6a8397bc3..44d63e64e3b 100644 --- a/go/ql/lib/qlpack.yml +++ b/go/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/go-all -version: 4.2.8-dev +version: 4.2.9-dev groups: go dbscheme: go.dbscheme extractor: go diff --git a/go/ql/lib/semmle/go/Decls.qll b/go/ql/lib/semmle/go/Decls.qll index 785a09b2549..9d1e4d2611a 100644 --- a/go/ql/lib/semmle/go/Decls.qll +++ b/go/ql/lib/semmle/go/Decls.qll @@ -381,10 +381,20 @@ class TypeSpec extends @typespec, Spec, TypeParamDeclParent { string getName() { result = this.getNameExpr().getName() } /** - * Gets the expression denoting the underlying type to which the newly declared type is bound. + * Gets the declared type of this specifier. + * + * Note that for alias types this will give the underlying type. + */ + Type getDeclaredType() { result = this.getNameExpr().getType() } + + /** + * Gets the expression denoting the underlying type to which the declared type is bound. */ Expr getTypeExpr() { result = this.getChildExpr(1) } + /** Gets the underlying type to which the declared type is bound. */ + Type getRhsType() { result = this.getTypeExpr().getType() } + override string toString() { result = "type declaration specifier" } override string getAPrimaryQlClass() { result = "TypeSpec" } @@ -461,6 +471,7 @@ class FieldBase extends @field, ExprParent { * Examples: * * ```go + * io.Reader * Name string `json:"name"` * x, y int * ``` @@ -469,8 +480,9 @@ class FieldBase extends @field, ExprParent { * * ```go * struct { - * Name string `json:"name"` - * x, y int + * io.Reader // embedded field + * Name string `json:"name"` // field with tag + * x, y int // declares two fields with the same type * } * ``` */ @@ -482,12 +494,24 @@ class FieldDecl extends FieldBase, Documentable, ExprParent { /** * Gets the expression representing the name of the `i`th field declared in this declaration * (0-based). + * + * This is not defined for embedded fields. */ Expr getNameExpr(int i) { i >= 0 and result = this.getChildExpr(i + 1) } + /** + * Gets the `i`th field declared in this declaration (0-based). + * + * This is not defined for embedded fields. + */ + Field getField(int i) { this.getNameExpr(i).(Ident).declares(result) } + + /** Holds if this field declaration declares an embedded type. */ + predicate isEmbedded() { not exists(this.getNameExpr(_)) } + /** Gets the tag expression of this field declaration, if any. */ Expr getTag() { result = this.getChildExpr(-1) } diff --git a/go/ql/lib/semmle/go/Scopes.qll b/go/ql/lib/semmle/go/Scopes.qll index 82b4db7e322..2ab08b5b5b4 100644 --- a/go/ql/lib/semmle/go/Scopes.qll +++ b/go/ql/lib/semmle/go/Scopes.qll @@ -202,13 +202,19 @@ class TypeEntity extends Entity, @typeobject { } class TypeParamParentEntity extends Entity, @typeparamparentobject { } /** A named type which has a declaration. */ -class DeclaredType extends TypeEntity, DeclaredEntity, TypeParamParentEntity, @decltypeobject { +class DeclaredTypeEntity extends TypeEntity, DeclaredEntity, TypeParamParentEntity, @decltypeobject { /** Gets the declaration specifier declaring this type. */ TypeSpec getSpec() { result.getNameExpr() = this.getDeclaration() } } +/** DEPRECATED: Use `DeclaredTypeEntity` instead. */ +deprecated class DeclaredType = DeclaredTypeEntity; + /** A built-in type. */ -class BuiltinType extends TypeEntity, BuiltinEntity, @builtintypeobject { } +class BuiltinTypeEntity extends TypeEntity, BuiltinEntity, @builtintypeobject { } + +/** DEPRECATED: Use `BuiltinTypeEntity` instead. */ +deprecated class BuiltinType = BuiltinTypeEntity; /** A built-in or declared constant, variable, field, method or function. */ class ValueEntity extends Entity, @valueobject { @@ -754,64 +760,64 @@ private predicate builtinFunction( module Builtin { // built-in types /** Gets the built-in type `bool`. */ - BuiltinType bool() { result.getName() = "bool" } + BuiltinTypeEntity bool() { result.getName() = "bool" } /** Gets the built-in type `byte`. */ - BuiltinType byte() { result.getName() = "byte" } + BuiltinTypeEntity byte() { result.getName() = "byte" } /** Gets the built-in type `complex64`. */ - BuiltinType complex64() { result.getName() = "complex64" } + BuiltinTypeEntity complex64() { result.getName() = "complex64" } /** Gets the built-in type `complex128`. */ - BuiltinType complex128() { result.getName() = "complex128" } + BuiltinTypeEntity complex128() { result.getName() = "complex128" } /** Gets the built-in type `error`. */ - BuiltinType error() { result.getName() = "error" } + BuiltinTypeEntity error() { result.getName() = "error" } /** Gets the built-in type `float32`. */ - BuiltinType float32() { result.getName() = "float32" } + BuiltinTypeEntity float32() { result.getName() = "float32" } /** Gets the built-in type `float64`. */ - BuiltinType float64() { result.getName() = "float64" } + BuiltinTypeEntity float64() { result.getName() = "float64" } /** Gets the built-in type `int`. */ - BuiltinType int_() { result.getName() = "int" } + BuiltinTypeEntity int_() { result.getName() = "int" } /** Gets the built-in type `int8`. */ - BuiltinType int8() { result.getName() = "int8" } + BuiltinTypeEntity int8() { result.getName() = "int8" } /** Gets the built-in type `int16`. */ - BuiltinType int16() { result.getName() = "int16" } + BuiltinTypeEntity int16() { result.getName() = "int16" } /** Gets the built-in type `int32`. */ - BuiltinType int32() { result.getName() = "int32" } + BuiltinTypeEntity int32() { result.getName() = "int32" } /** Gets the built-in type `int64`. */ - BuiltinType int64() { result.getName() = "int64" } + BuiltinTypeEntity int64() { result.getName() = "int64" } /** Gets the built-in type `rune`. */ - BuiltinType rune() { result.getName() = "rune" } + BuiltinTypeEntity rune() { result.getName() = "rune" } /** Gets the built-in type `string`. */ - BuiltinType string_() { result.getName() = "string" } + BuiltinTypeEntity string_() { result.getName() = "string" } /** Gets the built-in type `uint`. */ - BuiltinType uint() { result.getName() = "uint" } + BuiltinTypeEntity uint() { result.getName() = "uint" } /** Gets the built-in type `uint8`. */ - BuiltinType uint8() { result.getName() = "uint8" } + BuiltinTypeEntity uint8() { result.getName() = "uint8" } /** Gets the built-in type `uint16`. */ - BuiltinType uint16() { result.getName() = "uint16" } + BuiltinTypeEntity uint16() { result.getName() = "uint16" } /** Gets the built-in type `uint32`. */ - BuiltinType uint32() { result.getName() = "uint32" } + BuiltinTypeEntity uint32() { result.getName() = "uint32" } /** Gets the built-in type `uint64`. */ - BuiltinType uint64() { result.getName() = "uint64" } + BuiltinTypeEntity uint64() { result.getName() = "uint64" } /** Gets the built-in type `uintptr`. */ - BuiltinType uintptr() { result.getName() = "uintptr" } + BuiltinTypeEntity uintptr() { result.getName() = "uintptr" } // built-in constants /** Gets the built-in constant `true`. */ diff --git a/go/ql/lib/semmle/go/Types.qll b/go/ql/lib/semmle/go/Types.qll index d6765f13662..d377cb2c9d8 100644 --- a/go/ql/lib/semmle/go/Types.qll +++ b/go/ql/lib/semmle/go/Types.qll @@ -1038,8 +1038,15 @@ deprecated class NamedType = DefinedType; /** A defined type. */ class DefinedType extends @definedtype, CompositeType { - /** Gets the type which this type is defined to be. */ - Type getBaseType() { underlying_type(this, result) } + /** + * Gets the type which this type is defined to be, if available. + * + * Note that this is only defined for types declared in the project being + * analyzed. It will not be defined for types declared in external packages. + */ + Type getBaseType() { + result = this.getEntity().(DeclaredTypeEntity).getSpec().getTypeExpr().getType() + } override Method getMethod(string m) { result = CompositeType.super.getMethod(m) @@ -1049,7 +1056,7 @@ class DefinedType extends @definedtype, CompositeType { or // handle promoted methods exists(StructType s, Type embedded | - s = this.getBaseType() and + s = this.getUnderlyingType() and s.hasOwnField(_, _, embedded, true) and // ensure `m` can be promoted not s.hasOwnField(_, m, _, _) and @@ -1063,7 +1070,7 @@ class DefinedType extends @definedtype, CompositeType { ) } - override Type getUnderlyingType() { result = this.getBaseType().getUnderlyingType() } + override Type getUnderlyingType() { underlying_type(this, result) } } /** diff --git a/go/ql/src/CHANGELOG.md b/go/ql/src/CHANGELOG.md index 515fbad7adf..521c1320839 100644 --- a/go/ql/src/CHANGELOG.md +++ b/go/ql/src/CHANGELOG.md @@ -1,3 +1,27 @@ +## 1.4.0 + +### Query Metadata Changes + +* The tag `quality` has been added to multiple Go quality queries for consistency. They have all been given a tag for one of the two top-level categories `reliability` or `maintainability`, and a tag for a sub-category. See [Query file metadata and alert message style guide](https://github.com/github/codeql/blob/main/docs/query-metadata-style-guide.md#quality-query-sub-category-tags) for more information about these categories. +* The tag `external/cwe/cwe-129` has been added to `go/constant-length-comparison`. +* The tag `external/cwe/cwe-193` has been added to `go/index-out-of-bounds`. +* The tag `external/cwe/cwe-197` has been added to `go/shift-out-of-range`. +* The tag `external/cwe/cwe-248` has been added to `go/redundant-recover`. +* The tag `external/cwe/cwe-252` has been added to `go/missing-error-check` and `go/unhandled-writable-file-close`. +* The tag `external/cwe/cwe-480` has been added to `go/mistyped-exponentiation`. +* The tag `external/cwe/cwe-570` has been added to `go/impossible-interface-nil-check` and `go/comparison-of-identical-expressions`. +* The tag `external/cwe/cwe-571` has been added to `go/negative-length-check` and `go/comparison-of-identical-expressions`. +* The tag `external/cwe/cwe-783` has been added to `go/whitespace-contradicts-precedence`. +* The tag `external/cwe/cwe-835` has been added to `go/inconsistent-loop-direction`. +* The tag `error-handling` has been added to `go/missing-error-check`, `go/unhandled-writable-file-close`, and `go/unexpected-nil-value`. +* The tag `useless-code` has been added to `go/useless-assignment-to-field`, `go/useless-assignment-to-local`, `go/useless-expression`, and `go/unreachable-statement`. +* The tag `logic` has been removed from `go/index-out-of-bounds` and `go/unexpected-nil-value`. +* The tags `call` and `defer` have been removed from `go/unhandled-writable-file-close`. +* The tags `correctness` and `quality` have been reordered in `go/missing-error-check` and `go/unhandled-writable-file-close`. +* The tag `maintainability` has been changed to `reliability` for `go/unhandled-writable-file-close`. +* The tag order has been standardized to have `quality` first, followed by the top-level category (`reliability` or `maintainability`), then sub-category tags, and finally CWE tags. +* The description text has been updated in `go/whitespace-contradicts-precedence` to change "may even indicate" to "may indicate". + ## 1.3.0 ### New Queries diff --git a/go/ql/src/change-notes/2025-06-13-add-tags-to-quality-queries.md b/go/ql/src/change-notes/released/1.4.0.md similarity index 98% rename from go/ql/src/change-notes/2025-06-13-add-tags-to-quality-queries.md rename to go/ql/src/change-notes/released/1.4.0.md index 9233cb05e80..e97351b26ed 100644 --- a/go/ql/src/change-notes/2025-06-13-add-tags-to-quality-queries.md +++ b/go/ql/src/change-notes/released/1.4.0.md @@ -1,6 +1,7 @@ ---- -category: queryMetadata ---- +## 1.4.0 + +### Query Metadata Changes + * The tag `quality` has been added to multiple Go quality queries for consistency. They have all been given a tag for one of the two top-level categories `reliability` or `maintainability`, and a tag for a sub-category. See [Query file metadata and alert message style guide](https://github.com/github/codeql/blob/main/docs/query-metadata-style-guide.md#quality-query-sub-category-tags) for more information about these categories. * The tag `external/cwe/cwe-129` has been added to `go/constant-length-comparison`. * The tag `external/cwe/cwe-193` has been added to `go/index-out-of-bounds`. diff --git a/go/ql/src/codeql-pack.release.yml b/go/ql/src/codeql-pack.release.yml index ec16350ed6f..b8b2e97d508 100644 --- a/go/ql/src/codeql-pack.release.yml +++ b/go/ql/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.3.0 +lastReleaseVersion: 1.4.0 diff --git a/go/ql/src/qlpack.yml b/go/ql/src/qlpack.yml index 874d6e093fc..ad2712943a3 100644 --- a/go/ql/src/qlpack.yml +++ b/go/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/go-queries -version: 1.3.1-dev +version: 1.4.1-dev groups: - go - queries diff --git a/go/ql/test/library-tests/semmle/go/Decl/TypeSpec.expected b/go/ql/test/library-tests/semmle/go/Decl/TypeSpec.expected index 73f614a03f1..d4000d910cf 100644 --- a/go/ql/test/library-tests/semmle/go/Decl/TypeSpec.expected +++ b/go/ql/test/library-tests/semmle/go/Decl/TypeSpec.expected @@ -1,2 +1,2 @@ -| main.go:3:6:3:15 | type declaration specifier | status | int | def | -| main.go:5:6:5:20 | type declaration specifier | intlist | []int | alias | +| main.go:3:6:3:15 | type declaration specifier | status | status | main.go:3:13:3:15 | int | int | def | +| main.go:5:6:5:20 | type declaration specifier | intlist | []int | main.go:5:16:5:20 | array type | []int | alias | diff --git a/go/ql/test/library-tests/semmle/go/Decl/TypeSpec.ql b/go/ql/test/library-tests/semmle/go/Decl/TypeSpec.ql index 70a527d311c..bbbc5345ed6 100644 --- a/go/ql/test/library-tests/semmle/go/Decl/TypeSpec.ql +++ b/go/ql/test/library-tests/semmle/go/Decl/TypeSpec.ql @@ -2,4 +2,4 @@ import go from TypeSpec ts, string kind where if ts instanceof AliasSpec then kind = "alias" else kind = "def" -select ts, ts.getName(), ts.getTypeExpr().getType().pp(), kind +select ts, ts.getName(), ts.getDeclaredType().pp(), ts.getTypeExpr(), ts.getRhsType().pp(), kind diff --git a/go/ql/test/library-tests/semmle/go/Types/DefinedType_getBaseType.expected b/go/ql/test/library-tests/semmle/go/Types/DefinedType_getBaseType.expected new file mode 100644 index 00000000000..123c6ac7a35 --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/Types/DefinedType_getBaseType.expected @@ -0,0 +1,112 @@ +| aliases.go:19:6:19:7 | S3 | struct { x int } | +| aliases.go:29:6:29:11 | MyType | struct { x MyTypeT } | +| cyclic.go:3:6:3:6 | s | struct { * s } | +| cyclic.go:7:6:7:6 | t | struct { * u; f int } | +| cyclic.go:12:6:12:6 | u | struct { t } | +| cyclic.go:16:6:16:6 | v | struct { s } | +| depth.go:5:6:5:6 | a | struct { b; c } | +| depth.go:10:6:10:6 | b | struct { f int } | +| depth.go:14:6:14:6 | c | struct { d } | +| depth.go:18:6:18:6 | d | struct { f string } | +| embedded.go:3:6:3:8 | Baz | struct { A string } | +| embedded.go:7:6:7:8 | Qux | struct { * Baz } | +| embedded.go:11:6:11:14 | EmbedsBaz | struct { Qux; Baz string } | +| generic.go:3:6:3:19 | GenericStruct1 | struct { valueField T; pointerField * T; arrayField [10]T; sliceField []T; mapField [string]T } | +| generic.go:11:6:11:27 | CircularGenericStruct1 | struct { pointerField * CircularGenericStruct1 } | +| generic.go:15:6:15:31 | UsesCircularGenericStruct1 | struct { root CircularGenericStruct1 } | +| generic.go:19:6:19:19 | GenericStruct2 | struct { structField GenericStruct1; mapField [S]T } | +| generic.go:24:6:24:20 | GenericStruct2b | struct { structField GenericStruct2 } | +| generic.go:28:6:28:27 | CircularGenericStruct2 | struct { pointerField * CircularGenericStruct2 } | +| generic.go:32:6:32:21 | GenericInterface | interface { GetT func() T } | +| generic.go:36:6:36:17 | GenericArray | [10]T | +| generic.go:37:6:37:19 | GenericPointer | * T | +| generic.go:38:6:38:17 | GenericSlice | []T | +| generic.go:39:6:39:16 | GenericMap1 | [string]V | +| generic.go:40:6:40:16 | GenericMap2 | [K]V | +| generic.go:41:6:41:19 | GenericChannel | chan<- T | +| generic.go:42:6:42:14 | MyMapType | [string]int | +| generic.go:43:6:43:19 | GenericDefined | MyMapType | +| generic.go:44:6:44:16 | MyFuncType1 | func(T) | +| generic.go:45:6:45:16 | MyFuncType2 | func(T1) T2 | +| generic.go:47:6:47:16 | MyInterface | interface { clone func() MyInterface; dummy1 func() [10]U; dummy11 func() GenericArray; dummy12 func() GenericPointer; dummy13 func() GenericSlice; dummy14 func() GenericMap1; dummy15 func() GenericMap2; dummy17 func() GenericChannel; dummy18 func() GenericDefined; dummy19 func() MyFuncType1; dummy2 func() * U; dummy20 func() MyFuncType2; dummy3 func() []U; dummy4 func() [U]U; dummy5 func() chan<- U; dummy6 func() MyMapType; dummy7 func() MyFuncType2 } | +| generic.go:67:6:67:22 | HasBlankTypeParam | struct { } | +| generic.go:68:6:68:23 | HasBlankTypeParams | struct { } | +| generic.go:84:6:84:21 | GenericSignature | func(T) T | +| interface.go:3:6:3:7 | i0 | comparable | +| interface.go:5:6:5:7 | i1 | interface { int } | +| interface.go:9:6:9:7 | i2 | interface { ~string } | +| interface.go:13:6:13:7 | i3 | interface { [5]int \| ~string } | +| interface.go:18:6:18:7 | i4 | interface { i1 \| i2 \| float32 } | +| interface.go:23:6:23:7 | i5 | interface { []uint8; int \| ~[]uint8 } | +| interface.go:28:6:28:7 | i6 | interface { ~[]int \| ~string; String func() string } | +| interface.go:34:6:34:7 | i7 | interface { [5]int \| ~string; ~string; String func() string } | +| interface.go:41:6:41:7 | i8 | interface { ~[]int \| ~string; String func() string; StringA func() string } | +| interface.go:47:6:47:7 | i9 | interface { ~[]int \| ~string; String func() string; StringB func() string } | +| interface.go:52:6:52:8 | i10 | interface { comparable } | +| interface.go:57:6:57:8 | i11 | interface { [5]uint8 \| string; int } | +| interface.go:63:6:63:8 | i12 | interface { comparable; []uint8 \| string } | +| interface.go:69:6:69:8 | i13 | interface { comparable; []uint8 \| string } | +| interface.go:75:6:75:8 | i14 | interface { []uint8 \| string; ~[]int \| ~string; String func() string; StringA func() string } | +| interface.go:81:6:81:8 | i15 | interface { []uint8 \| string; ~[]int \| ~string; String func() string; StringB func() string } | +| interface.go:87:6:87:8 | i16 | interface { } | +| interface.go:91:6:91:8 | i17 | interface { StringA func() string } | +| interface.go:95:6:95:8 | i18 | interface { comparable; StringA func() string } | +| interface.go:101:6:101:8 | i19 | interface { StringB func() string } | +| interface.go:105:6:105:8 | i20 | interface { comparable; StringB func() string } | +| interface.go:114:6:114:19 | testComparable | struct { } | +| interface.go:115:6:115:20 | testComparable0 | struct { } | +| interface.go:116:6:116:20 | testComparable1 | struct { } | +| interface.go:117:6:117:20 | testComparable2 | struct { } | +| interface.go:118:6:118:20 | testComparable3 | struct { } | +| interface.go:119:6:119:20 | testComparable4 | struct { } | +| interface.go:120:6:120:20 | testComparable5 | struct { } | +| interface.go:121:6:121:20 | testComparable6 | struct { } | +| interface.go:122:6:122:20 | testComparable7 | struct { } | +| interface.go:123:6:123:20 | testComparable8 | struct { } | +| interface.go:124:6:124:20 | testComparable9 | struct { } | +| interface.go:125:6:125:21 | testComparable10 | struct { } | +| interface.go:126:6:126:21 | testComparable11 | struct { } | +| interface.go:127:6:127:21 | testComparable12 | struct { } | +| interface.go:128:6:128:21 | testComparable13 | struct { } | +| interface.go:129:6:129:21 | testComparable14 | struct { } | +| interface.go:130:6:130:21 | testComparable15 | struct { } | +| interface.go:131:6:131:21 | testComparable16 | struct { } | +| interface.go:132:6:132:21 | testComparable17 | struct { } | +| interface.go:133:6:133:21 | testComparable18 | struct { } | +| interface.go:134:6:134:21 | testComparable19 | struct { } | +| interface.go:135:6:135:21 | testComparable20 | struct { } | +| interface.go:136:6:136:21 | testComparable21 | struct { } | +| interface.go:137:6:137:21 | testComparable22 | struct { } | +| interface.go:138:6:138:21 | testComparable23 | struct { } | +| main.go:17:6:17:20 | EmbedsNameClash | struct { NameClash } | +| pkg1/embedding.go:8:6:8:9 | base | struct { } | +| pkg1/embedding.go:19:6:19:13 | embedder | struct { base } | +| pkg1/embedding.go:22:6:22:16 | ptrembedder | struct { * base } | +| pkg1/embedding.go:25:6:25:14 | embedder2 | struct { embedder } | +| pkg1/embedding.go:28:6:28:14 | embedder3 | struct { embedder } | +| pkg1/embedding.go:35:6:35:14 | embedder4 | struct { base; f int } | +| pkg1/interfaces.go:3:6:3:6 | A | interface { m func() } | +| pkg1/interfaces.go:7:6:7:6 | B | interface { m func() ; n func() } | +| pkg1/interfaces.go:12:6:12:6 | C | interface { n func() ; o func() } | +| pkg1/interfaces.go:17:6:17:14 | AEmbedded | interface { m func() } | +| pkg1/interfaces.go:21:6:21:7 | AC | interface { m func() ; n func() ; o func() } | +| pkg1/interfaces.go:26:6:26:14 | AExtended | interface { m func() ; n func() } | +| pkg1/interfaces.go:31:6:31:7 | A2 | interface { m func() } | +| pkg1/interfaces.go:35:6:35:24 | MixedExportedAndNot | interface { Exported func() ; notExported func() } | +| pkg1/promotedStructs.go:4:6:4:6 | S | struct { SField string } | +| pkg1/promotedStructs.go:13:6:13:6 | P | struct { PField string } | +| pkg1/promotedStructs.go:22:6:22:12 | SEmbedS | struct { S } | +| pkg1/promotedStructs.go:25:6:25:12 | SEmbedP | struct { P } | +| pkg1/tst.go:5:6:5:6 | T | struct { f int; Foo; Bar } | +| pkg1/tst.go:11:6:11:7 | T2 | struct { Foo Foo; Bar } | +| pkg1/tst.go:16:6:16:7 | T3 | struct { * Foo; * Bar } | +| pkg1/tst.go:21:6:21:7 | T4 | struct { * Foo; Bar Bar } | +| pkg1/tst.go:26:6:26:8 | Foo | struct { val int; flag bool } | +| pkg1/tst.go:31:6:31:8 | Bar | struct { flag bool } | +| pkg1/tst.go:61:6:61:14 | NameClash | struct { NameClash } | +| pkg2/tst.go:3:6:3:6 | T | struct { g int } | +| pkg2/tst.go:7:6:7:6 | G | struct { g int } | +| pkg2/tst.go:11:6:11:24 | MixedExportedAndNot | interface { Exported func() ; notExported func() } | +| pkg2/tst.go:16:6:16:14 | NameClash | struct { NCField string } | +| struct_tags.go:3:6:3:7 | S1 | struct { field1 int `tag1a`; field2 int `tag2a` } | +| struct_tags.go:8:6:8:7 | S2 | struct { field1 int `tag1b`; field2 int `tag2b` } | diff --git a/go/ql/test/library-tests/semmle/go/Types/DefinedType_getBaseType.ql b/go/ql/test/library-tests/semmle/go/Types/DefinedType_getBaseType.ql new file mode 100644 index 00000000000..6b257110792 --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/Types/DefinedType_getBaseType.ql @@ -0,0 +1,5 @@ +import go + +from DefinedType dt, Type tp +where tp = dt.getBaseType() +select dt, tp.pp() diff --git a/go/ql/test/library-tests/semmle/go/Types/FieldDecl.expected b/go/ql/test/library-tests/semmle/go/Types/FieldDecl.expected new file mode 100644 index 00000000000..b1eb47a7945 --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/Types/FieldDecl.expected @@ -0,0 +1,70 @@ +fieldDeclWithNamedFields +| aliases.go:6:26:6:35 | field declaration | 0 | aliases.go:6:26:6:26 | x | +| aliases.go:6:26:6:35 | field declaration | 0 | aliases.go:8:26:8:26 | x | +| aliases.go:6:26:6:35 | field declaration | 0 | aliases.go:19:17:19:17 | x | +| aliases.go:8:26:8:35 | field declaration | 0 | aliases.go:6:26:6:26 | x | +| aliases.go:8:26:8:35 | field declaration | 0 | aliases.go:8:26:8:26 | x | +| aliases.go:8:26:8:35 | field declaration | 0 | aliases.go:19:17:19:17 | x | +| aliases.go:19:17:19:21 | field declaration | 0 | aliases.go:6:26:6:26 | x | +| aliases.go:19:17:19:21 | field declaration | 0 | aliases.go:8:26:8:26 | x | +| aliases.go:19:17:19:21 | field declaration | 0 | aliases.go:19:17:19:17 | x | +| aliases.go:29:34:29:42 | field declaration | 0 | aliases.go:29:34:29:34 | x | +| cyclic.go:9:2:9:6 | field declaration | 0 | cyclic.go:9:2:9:2 | f | +| depth.go:11:2:11:6 | field declaration | 0 | depth.go:11:2:11:2 | f | +| depth.go:19:2:19:9 | field declaration | 0 | depth.go:19:2:19:2 | f | +| embedded.go:4:2:4:9 | field declaration | 0 | embedded.go:4:2:4:2 | A | +| embedded.go:13:2:13:11 | field declaration | 0 | embedded.go:13:2:13:4 | Baz | +| generic.go:4:2:4:15 | field declaration | 0 | generic.go:4:2:4:11 | valueField | +| generic.go:5:2:5:16 | field declaration | 0 | generic.go:5:2:5:13 | pointerField | +| generic.go:6:2:6:19 | field declaration | 0 | generic.go:6:2:6:11 | arrayField | +| generic.go:7:2:7:17 | field declaration | 0 | generic.go:7:2:7:11 | sliceField | +| generic.go:8:2:8:26 | field declaration | 0 | generic.go:8:2:8:9 | mapField | +| generic.go:12:2:12:40 | field declaration | 0 | generic.go:12:2:12:13 | pointerField | +| generic.go:16:2:16:31 | field declaration | 0 | generic.go:16:2:16:5 | root | +| generic.go:20:2:20:30 | field declaration | 0 | generic.go:20:2:20:12 | structField | +| generic.go:21:2:21:20 | field declaration | 0 | generic.go:21:2:21:9 | mapField | +| generic.go:25:2:25:33 | field declaration | 0 | generic.go:25:2:25:12 | structField | +| generic.go:29:2:29:43 | field declaration | 0 | generic.go:29:2:29:13 | pointerField | +| pkg1/embedding.go:37:2:37:6 | field declaration | 0 | pkg1/embedding.go:37:2:37:2 | f | +| pkg1/promotedStructs.go:5:2:5:14 | field declaration | 0 | pkg1/promotedStructs.go:5:2:5:7 | SField | +| pkg1/promotedStructs.go:14:2:14:14 | field declaration | 0 | pkg1/promotedStructs.go:14:2:14:7 | PField | +| pkg1/tst.go:6:2:6:6 | field declaration | 0 | pkg1/tst.go:6:2:6:2 | f | +| pkg1/tst.go:12:2:12:8 | field declaration | 0 | pkg1/tst.go:12:2:12:4 | Foo | +| pkg1/tst.go:23:2:23:8 | field declaration | 0 | pkg1/tst.go:23:2:23:4 | Bar | +| pkg1/tst.go:27:2:27:9 | field declaration | 0 | pkg1/tst.go:27:2:27:4 | val | +| pkg1/tst.go:28:2:28:10 | field declaration | 0 | pkg1/tst.go:28:2:28:5 | flag | +| pkg1/tst.go:32:2:32:10 | field declaration | 0 | pkg1/tst.go:32:2:32:5 | flag | +| pkg2/tst.go:4:2:4:6 | field declaration | 0 | pkg2/tst.go:4:2:4:2 | g | +| pkg2/tst.go:4:2:4:6 | field declaration | 0 | pkg2/tst.go:8:2:8:2 | g | +| pkg2/tst.go:8:2:8:6 | field declaration | 0 | pkg2/tst.go:4:2:4:2 | g | +| pkg2/tst.go:8:2:8:6 | field declaration | 0 | pkg2/tst.go:8:2:8:2 | g | +| pkg2/tst.go:17:2:17:15 | field declaration | 0 | pkg2/tst.go:17:2:17:8 | NCField | +| struct_tags.go:4:2:4:19 | field declaration | 0 | struct_tags.go:4:2:4:7 | field1 | +| struct_tags.go:5:2:5:19 | field declaration | 0 | struct_tags.go:5:2:5:7 | field2 | +| struct_tags.go:9:2:9:19 | field declaration | 0 | struct_tags.go:9:2:9:7 | field1 | +| struct_tags.go:10:2:10:19 | field declaration | 0 | struct_tags.go:10:2:10:7 | field2 | +fieldDeclWithEmbeddedField +| cyclic.go:4:2:4:3 | field declaration | * s | +| cyclic.go:8:2:8:3 | field declaration | * u | +| cyclic.go:13:2:13:2 | field declaration | t | +| cyclic.go:17:2:17:2 | field declaration | s | +| depth.go:6:2:6:2 | field declaration | b | +| depth.go:7:2:7:2 | field declaration | c | +| depth.go:15:2:15:2 | field declaration | d | +| embedded.go:8:2:8:5 | field declaration | * Baz | +| embedded.go:12:2:12:4 | field declaration | Qux | +| main.go:18:2:18:15 | field declaration | NameClash | +| pkg1/embedding.go:19:23:19:26 | field declaration | base | +| pkg1/embedding.go:22:26:22:30 | field declaration | * base | +| pkg1/embedding.go:25:24:25:31 | field declaration | embedder | +| pkg1/embedding.go:28:24:28:31 | field declaration | embedder | +| pkg1/embedding.go:36:2:36:5 | field declaration | base | +| pkg1/promotedStructs.go:22:22:22:22 | field declaration | S | +| pkg1/promotedStructs.go:25:22:25:22 | field declaration | P | +| pkg1/tst.go:7:2:7:4 | field declaration | Foo | +| pkg1/tst.go:8:2:8:4 | field declaration | Bar | +| pkg1/tst.go:13:2:13:4 | field declaration | Bar | +| pkg1/tst.go:17:2:17:5 | field declaration | * Foo | +| pkg1/tst.go:18:2:18:5 | field declaration | * Bar | +| pkg1/tst.go:22:2:22:5 | field declaration | * Foo | +| pkg1/tst.go:62:2:62:15 | field declaration | NameClash | diff --git a/go/ql/test/library-tests/semmle/go/Types/FieldDecl.ql b/go/ql/test/library-tests/semmle/go/Types/FieldDecl.ql new file mode 100644 index 00000000000..2cdbcc9e57b --- /dev/null +++ b/go/ql/test/library-tests/semmle/go/Types/FieldDecl.ql @@ -0,0 +1,7 @@ +import go + +query predicate fieldDeclWithNamedFields(FieldDecl fd, int i, Field f) { fd.getField(i) = f } + +query predicate fieldDeclWithEmbeddedField(FieldDecl fd, string tp) { + fd.isEmbedded() and tp = fd.getType().pp() +} diff --git a/go/ql/test/library-tests/semmle/go/Types/MethodTypes.expected b/go/ql/test/library-tests/semmle/go/Types/MethodTypes.expected index f5af1c53e40..0306a98051e 100644 --- a/go/ql/test/library-tests/semmle/go/Types/MethodTypes.expected +++ b/go/ql/test/library-tests/semmle/go/Types/MethodTypes.expected @@ -31,12 +31,12 @@ | interface.go:101:6:101:8 | i19 | StringB | func() string | | interface.go:105:6:105:8 | i20 | StringB | func() string | | main.go:17:6:17:20 | EmbedsNameClash | NCMethod | func() | +| pkg1/embedding.go:8:6:8:9 | base | f | func() int | | pkg1/embedding.go:19:6:19:13 | embedder | f | func() int | | pkg1/embedding.go:22:6:22:16 | ptrembedder | f | func() int | | pkg1/embedding.go:22:6:22:16 | ptrembedder | g | func() int | | pkg1/embedding.go:25:6:25:14 | embedder2 | f | func() int | | pkg1/embedding.go:28:6:28:14 | embedder3 | f | func() int | -| pkg1/embedding.go:35:6:35:14 | embedder4 | f | func() int | | pkg1/interfaces.go:3:6:3:6 | A | m | func() | | pkg1/interfaces.go:7:6:7:6 | B | m | func() | | pkg1/interfaces.go:7:6:7:6 | B | n | func() | @@ -51,10 +51,13 @@ | pkg1/interfaces.go:31:6:31:7 | A2 | m | func() | | pkg1/interfaces.go:35:6:35:24 | MixedExportedAndNot | Exported | func() | | pkg1/interfaces.go:35:6:35:24 | MixedExportedAndNot | notExported | func() | +| pkg1/promotedStructs.go:4:6:4:6 | S | SMethod | func() interface { } | | pkg1/promotedStructs.go:22:6:22:12 | SEmbedS | SMethod | func() interface { } | | pkg1/tst.go:5:6:5:6 | T | half | func() Foo | | pkg1/tst.go:16:6:16:7 | T3 | half | func() Foo | | pkg1/tst.go:21:6:21:7 | T4 | half | func() Foo | +| pkg1/tst.go:26:6:26:8 | Foo | half | func() Foo | | pkg1/tst.go:61:6:61:14 | NameClash | NCMethod | func() | | pkg2/tst.go:11:6:11:24 | MixedExportedAndNot | Exported | func() | | pkg2/tst.go:11:6:11:24 | MixedExportedAndNot | notExported | func() | +| pkg2/tst.go:16:6:16:14 | NameClash | NCMethod | func() | diff --git a/go/ql/test/library-tests/semmle/go/Types/MethodTypes.ql b/go/ql/test/library-tests/semmle/go/Types/MethodTypes.ql index f9eae96b529..89a62ef2f65 100644 --- a/go/ql/test/library-tests/semmle/go/Types/MethodTypes.ql +++ b/go/ql/test/library-tests/semmle/go/Types/MethodTypes.ql @@ -1,7 +1,7 @@ import go -from DefinedType t, string m, Type tp +from Type t, string m, Type tp where exists(t.getEntity().getDeclaration()) and - t.getBaseType().hasMethod(m, tp) + t.hasMethod(m, tp) select t, m, tp.pp() diff --git a/go/ql/test/query-tests/Security/CWE-681/FilterTestResults.ql b/go/ql/test/query-tests/Security/CWE-681/FilterTestResults.ql new file mode 100644 index 00000000000..9b3e77c416f --- /dev/null +++ b/go/ql/test/query-tests/Security/CWE-681/FilterTestResults.ql @@ -0,0 +1,15 @@ +/** + * @kind test-postprocess + * @description Remove the query predicates that differ based on 32/64-bit architecture. This should leave behind `invalidModelRowAdd` and `testFailures` in case of test failures. + */ + +/** + * The input test results: query predicate `relation` contains `data` at (`row`, `column`). + */ +external private predicate queryResults(string relation, int row, int column, string data); + +/** Holds if the test output's query predicate `relation` contains `data` at (`row`, `column`). */ +query predicate results(string relation, int row, int column, string data) { + queryResults(relation, row, column, data) and + not relation in ["#select", "nodes", "edges"] +} diff --git a/go/ql/test/query-tests/Security/CWE-681/IncorrectIntegerConversion.expected b/go/ql/test/query-tests/Security/CWE-681/IncorrectIntegerConversion.expected index 42831abaf15..e69de29bb2d 100644 --- a/go/ql/test/query-tests/Security/CWE-681/IncorrectIntegerConversion.expected +++ b/go/ql/test/query-tests/Security/CWE-681/IncorrectIntegerConversion.expected @@ -1,2 +0,0 @@ -invalidModelRow -testFailures diff --git a/go/ql/test/query-tests/Security/CWE-681/IncorrectIntegerConversion.go b/go/ql/test/query-tests/Security/CWE-681/IncorrectIntegerConversion.go index 7927a5fe252..0eee414716b 100644 --- a/go/ql/test/query-tests/Security/CWE-681/IncorrectIntegerConversion.go +++ b/go/ql/test/query-tests/Security/CWE-681/IncorrectIntegerConversion.go @@ -24,7 +24,7 @@ func lookupNumberByName(reg *registry, name string) (int32, error) { return 567, nil } func lab(s string) (*something, error) { - num, err := strconv.Atoi(s) + num, err := strconv.Atoi(s) // $ Source if err != nil { number, err := lookupNumberByName(®istry{}, s) @@ -33,7 +33,7 @@ func lab(s string) (*something, error) { } num = int(number) } - target, err := lookupTarget(&config{}, int32(num)) // $ hasValueFlow="num" + target, err := lookupTarget(&config{}, int32(num)) // $ Alert if err != nil { return nil, err } @@ -63,12 +63,12 @@ func testParseInt() { _ = uint(parsed) } { - parsed, err := strconv.ParseInt("3456", 10, 16) + parsed, err := strconv.ParseInt("3456", 10, 16) // $ Source if err != nil { panic(err) } - _ = int8(parsed) // $ hasValueFlow="parsed" - _ = uint8(parsed) // $ hasValueFlow="parsed" + _ = int8(parsed) // $ Alert + _ = uint8(parsed) // $ Alert _ = int16(parsed) _ = uint16(parsed) _ = int32(parsed) @@ -79,14 +79,14 @@ func testParseInt() { _ = uint(parsed) } { - parsed, err := strconv.ParseInt("3456", 10, 32) + parsed, err := strconv.ParseInt("3456", 10, 32) // $ Source if err != nil { panic(err) } - _ = int8(parsed) // $ hasValueFlow="parsed" - _ = uint8(parsed) // $ hasValueFlow="parsed" - _ = int16(parsed) // $ hasValueFlow="parsed" - _ = uint16(parsed) // $ hasValueFlow="parsed" + _ = int8(parsed) // $ Alert + _ = uint8(parsed) // $ Alert + _ = int16(parsed) // $ Alert + _ = uint16(parsed) // $ Alert _ = int32(parsed) _ = uint32(parsed) _ = int64(parsed) @@ -95,32 +95,32 @@ func testParseInt() { _ = uint(parsed) } { - parsed, err := strconv.ParseInt("3456", 10, 64) + parsed, err := strconv.ParseInt("3456", 10, 64) // $ Source if err != nil { panic(err) } - _ = int8(parsed) // $ hasValueFlow="parsed" - _ = uint8(parsed) // $ hasValueFlow="parsed" - _ = int16(parsed) // $ hasValueFlow="parsed" - _ = uint16(parsed) // $ hasValueFlow="parsed" - _ = int32(parsed) // $ hasValueFlow="parsed" - _ = uint32(parsed) // $ hasValueFlow="parsed" + _ = int8(parsed) // $ Alert + _ = uint8(parsed) // $ Alert + _ = int16(parsed) // $ Alert + _ = uint16(parsed) // $ Alert + _ = int32(parsed) // $ Alert + _ = uint32(parsed) // $ Alert _ = int64(parsed) _ = uint64(parsed) - _ = int(parsed) // $ hasValueFlow="parsed" - _ = uint(parsed) // $ hasValueFlow="parsed" + _ = int(parsed) // $ Alert + _ = uint(parsed) // $ Alert } { - parsed, err := strconv.ParseInt("3456", 10, 0) + parsed, err := strconv.ParseInt("3456", 10, 0) // $ Source if err != nil { panic(err) } - _ = int8(parsed) // $ hasValueFlow="parsed" - _ = uint8(parsed) // $ hasValueFlow="parsed" - _ = int16(parsed) // $ hasValueFlow="parsed" - _ = uint16(parsed) // $ hasValueFlow="parsed" - _ = int32(parsed) // $ hasValueFlow="parsed" - _ = uint32(parsed) // $ hasValueFlow="parsed" + _ = int8(parsed) // $ Alert + _ = uint8(parsed) // $ Alert + _ = int16(parsed) // $ Alert + _ = uint16(parsed) // $ Alert + _ = int32(parsed) // $ Alert + _ = uint32(parsed) // $ Alert _ = int64(parsed) _ = uint64(parsed) _ = int(parsed) @@ -130,11 +130,11 @@ func testParseInt() { func testParseUint() { { - parsed, err := strconv.ParseUint("3456", 10, 8) + parsed, err := strconv.ParseUint("3456", 10, 8) // $ Source if err != nil { panic(err) } - _ = int8(parsed) // $ hasValueFlow="parsed" + _ = int8(parsed) // $ Alert _ = uint8(parsed) _ = int16(parsed) _ = uint16(parsed) @@ -146,13 +146,13 @@ func testParseUint() { _ = uint(parsed) } { - parsed, err := strconv.ParseUint("3456", 10, 16) + parsed, err := strconv.ParseUint("3456", 10, 16) // $ Source if err != nil { panic(err) } - _ = int8(parsed) // $ hasValueFlow="parsed" - _ = uint8(parsed) // $ hasValueFlow="parsed" - _ = int16(parsed) // $ hasValueFlow="parsed" + _ = int8(parsed) // $ Alert + _ = uint8(parsed) // $ Alert + _ = int16(parsed) // $ Alert _ = uint16(parsed) _ = int32(parsed) _ = uint32(parsed) @@ -162,66 +162,66 @@ func testParseUint() { _ = uint(parsed) } { - parsed, err := strconv.ParseUint("3456", 10, 32) + parsed, err := strconv.ParseUint("3456", 10, 32) // $ Source if err != nil { panic(err) } - _ = int8(parsed) // $ hasValueFlow="parsed" - _ = uint8(parsed) // $ hasValueFlow="parsed" - _ = int16(parsed) // $ hasValueFlow="parsed" - _ = uint16(parsed) // $ hasValueFlow="parsed" - _ = int32(parsed) // $ hasValueFlow="parsed" + _ = int8(parsed) // $ Alert + _ = uint8(parsed) // $ Alert + _ = int16(parsed) // $ Alert + _ = uint16(parsed) // $ Alert + _ = int32(parsed) // $ Alert _ = uint32(parsed) _ = int64(parsed) _ = uint64(parsed) - _ = int(parsed) // $ hasValueFlow="parsed" + _ = int(parsed) // $ Alert _ = uint(parsed) } { - parsed, err := strconv.ParseUint("3456", 10, 64) + parsed, err := strconv.ParseUint("3456", 10, 64) // $ Source if err != nil { panic(err) } - _ = int8(parsed) // $ hasValueFlow="parsed" - _ = uint8(parsed) // $ hasValueFlow="parsed" - _ = int16(parsed) // $ hasValueFlow="parsed" - _ = uint16(parsed) // $ hasValueFlow="parsed" - _ = int32(parsed) // $ hasValueFlow="parsed" - _ = uint32(parsed) // $ hasValueFlow="parsed" - _ = int64(parsed) // $ hasValueFlow="parsed" + _ = int8(parsed) // $ Alert + _ = uint8(parsed) // $ Alert + _ = int16(parsed) // $ Alert + _ = uint16(parsed) // $ Alert + _ = int32(parsed) // $ Alert + _ = uint32(parsed) // $ Alert + _ = int64(parsed) // $ Alert _ = uint64(parsed) - _ = int(parsed) // $ hasValueFlow="parsed" - _ = uint(parsed) // $ hasValueFlow="parsed" + _ = int(parsed) // $ Alert + _ = uint(parsed) // $ Alert } { - parsed, err := strconv.ParseUint("3456", 10, 0) + parsed, err := strconv.ParseUint("3456", 10, 0) // $ Source if err != nil { panic(err) } - _ = int8(parsed) // $ hasValueFlow="parsed" - _ = uint8(parsed) // $ hasValueFlow="parsed" - _ = int16(parsed) // $ hasValueFlow="parsed" - _ = uint16(parsed) // $ hasValueFlow="parsed" - _ = int32(parsed) // $ hasValueFlow="parsed" - _ = uint32(parsed) // $ hasValueFlow="parsed" - _ = int64(parsed) // $ hasValueFlow="parsed" + _ = int8(parsed) // $ Alert + _ = uint8(parsed) // $ Alert + _ = int16(parsed) // $ Alert + _ = uint16(parsed) // $ Alert + _ = int32(parsed) // $ Alert + _ = uint32(parsed) // $ Alert + _ = int64(parsed) // $ Alert _ = uint64(parsed) - _ = int(parsed) // $ hasValueFlow="parsed" + _ = int(parsed) // $ Alert _ = uint(parsed) } } func testAtoi() { - parsed, err := strconv.Atoi("3456") + parsed, err := strconv.Atoi("3456") // $ Source if err != nil { panic(err) } - _ = int8(parsed) // $ hasValueFlow="parsed" - _ = uint8(parsed) // $ hasValueFlow="parsed" - _ = int16(parsed) // $ hasValueFlow="parsed" - _ = uint16(parsed) // $ hasValueFlow="parsed" - _ = int32(parsed) // $ hasValueFlow="parsed" - _ = uint32(parsed) // $ hasValueFlow="parsed" + _ = int8(parsed) // $ Alert + _ = uint8(parsed) // $ Alert + _ = int16(parsed) // $ Alert + _ = uint16(parsed) // $ Alert + _ = int32(parsed) // $ Alert + _ = uint32(parsed) // $ Alert _ = int64(parsed) _ = uint64(parsed) _ = int(parsed) @@ -233,19 +233,19 @@ type customInt int16 // these should be caught: func typeAliases(input string) { { - parsed, err := strconv.ParseInt(input, 10, 32) + parsed, err := strconv.ParseInt(input, 10, 32) // $ Source if err != nil { panic(err) } // NOTE: byte is uint8 - _ = byte(parsed) // $ hasValueFlow="parsed" - _ = customInt(parsed) // $ hasValueFlow="parsed" + _ = byte(parsed) // $ Alert + _ = customInt(parsed) // $ Alert } } func testBoundsChecking(input string) { { - parsed, err := strconv.Atoi(input) + parsed, err := strconv.Atoi(input) // $ Source if err != nil { panic(err) } @@ -253,13 +253,13 @@ func testBoundsChecking(input string) { _ = int8(parsed) } if parsed < math.MaxInt8 { - _ = int8(parsed) // $ MISSING: hasValueFlow="parsed" // Not found because we only check for upper bounds + _ = int8(parsed) // $ MISSING: Alert // Not found because we only check for upper bounds if parsed >= 0 { _ = int16(parsed) } } if parsed >= math.MinInt8 { - _ = int8(parsed) // $ hasValueFlow="parsed" + _ = int8(parsed) // $ Alert if parsed <= 0 { _ = int16(parsed) } @@ -271,51 +271,51 @@ func testBoundsChecking(input string) { } } { - parsed, err := strconv.ParseUint(input, 10, 0) + parsed, err := strconv.ParseUint(input, 10, 0) // $ Source if err != nil { panic(err) } if parsed <= math.MaxUint64 { - _ = int8(parsed) // $ hasValueFlow="parsed" - _ = uint8(parsed) // $ hasValueFlow="parsed" - _ = int16(parsed) // $ hasValueFlow="parsed" - _ = uint16(parsed) // $ hasValueFlow="parsed" - _ = int32(parsed) // $ hasValueFlow="parsed" - _ = uint32(parsed) // $ hasValueFlow="parsed" - _ = int64(parsed) // $ hasValueFlow="parsed" + _ = int8(parsed) // $ Alert + _ = uint8(parsed) // $ Alert + _ = int16(parsed) // $ Alert + _ = uint16(parsed) // $ Alert + _ = int32(parsed) // $ Alert + _ = uint32(parsed) // $ Alert + _ = int64(parsed) // $ Alert _ = uint64(parsed) - _ = int(parsed) // $ hasValueFlow="parsed" + _ = int(parsed) // $ Alert _ = uint(parsed) } if parsed <= math.MaxInt64 { - _ = int8(parsed) // $ hasValueFlow="parsed" - _ = uint8(parsed) // $ hasValueFlow="parsed" - _ = int16(parsed) // $ hasValueFlow="parsed" - _ = uint16(parsed) // $ hasValueFlow="parsed" - _ = int32(parsed) // $ hasValueFlow="parsed" - _ = uint32(parsed) // $ hasValueFlow="parsed" + _ = int8(parsed) // $ Alert + _ = uint8(parsed) // $ Alert + _ = int16(parsed) // $ Alert + _ = uint16(parsed) // $ Alert + _ = int32(parsed) // $ Alert + _ = uint32(parsed) // $ Alert _ = int64(parsed) _ = uint64(parsed) - _ = int(parsed) // $ hasValueFlow="parsed" + _ = int(parsed) // $ Alert _ = uint(parsed) } if parsed <= math.MaxUint32 { - _ = int8(parsed) // $ hasValueFlow="parsed" - _ = uint8(parsed) // $ hasValueFlow="parsed" - _ = int16(parsed) // $ hasValueFlow="parsed" - _ = uint16(parsed) // $ hasValueFlow="parsed" - _ = int32(parsed) // $ hasValueFlow="parsed" + _ = int8(parsed) // $ Alert + _ = uint8(parsed) // $ Alert + _ = int16(parsed) // $ Alert + _ = uint16(parsed) // $ Alert + _ = int32(parsed) // $ Alert _ = uint32(parsed) _ = int64(parsed) _ = uint64(parsed) - _ = int(parsed) // $ hasValueFlow="parsed" + _ = int(parsed) // $ Alert _ = uint(parsed) } if parsed <= math.MaxInt32 { - _ = int8(parsed) // $ hasValueFlow="parsed" - _ = uint8(parsed) // $ hasValueFlow="parsed" - _ = int16(parsed) // $ hasValueFlow="parsed" - _ = uint16(parsed) // $ hasValueFlow="parsed" + _ = int8(parsed) // $ Alert + _ = uint8(parsed) // $ Alert + _ = int16(parsed) // $ Alert + _ = uint16(parsed) // $ Alert _ = int32(parsed) _ = uint32(parsed) _ = int64(parsed) @@ -325,25 +325,25 @@ func testBoundsChecking(input string) { } } { - parsed, err := strconv.ParseUint(input, 10, 32) + parsed, err := strconv.ParseUint(input, 10, 32) // $ Source if err != nil { panic(err) } if parsed <= math.MaxUint16 { _ = uint16(parsed) - _ = int16(parsed) // $ hasValueFlow="parsed" + _ = int16(parsed) // $ Alert } if parsed <= 255 { _ = uint8(parsed) } if parsed <= 256 { - _ = uint8(parsed) // $ hasValueFlow="parsed" + _ = uint8(parsed) // $ Alert } if err == nil && 1 == 1 && parsed < math.MaxInt8 { _ = int8(parsed) } if parsed > 42 { - _ = uint16(parsed) // $ hasValueFlow="parsed" + _ = uint16(parsed) // $ Alert } if parsed >= math.MaxUint8+1 { return @@ -389,64 +389,64 @@ func testRightShifted(input string) { _ = byte(parsed >> 8 & 0xff) } { - parsed, err := strconv.ParseInt(input, 10, 16) + parsed, err := strconv.ParseInt(input, 10, 16) // $ Source if err != nil { panic(err) } - _ = byte(parsed) // $ hasValueFlow="parsed" + _ = byte(parsed) // $ Alert _ = byte(parsed << 8) } } func testPathWithMoreThanOneSink(input string) { { - parsed, err := strconv.ParseInt(input, 10, 32) + parsed, err := strconv.ParseInt(input, 10, 32) // $ Source if err != nil { panic(err) } - v1 := int16(parsed) // $ hasValueFlow="parsed" + v1 := int16(parsed) // $ Alert _ = int16(v1) } { - parsed, err := strconv.ParseInt(input, 10, 32) + parsed, err := strconv.ParseInt(input, 10, 32) // $ Source if err != nil { panic(err) } - v := int16(parsed) // $ hasValueFlow="parsed" + v := int16(parsed) // $ Alert _ = int8(v) } { - parsed, err := strconv.ParseInt(input, 10, 32) + parsed, err := strconv.ParseInt(input, 10, 32) // $ Source if err != nil { panic(err) } v1 := int32(parsed) - v2 := int16(v1) // $ hasValueFlow="v1" + v2 := int16(v1) // $ Alert _ = int8(v2) } { - parsed, err := strconv.ParseInt(input, 10, 16) + parsed, err := strconv.ParseInt(input, 10, 16) // $ Source if err != nil { panic(err) } v1 := int64(parsed) v2 := int32(v1) v3 := int16(v2) - _ = int8(v3) // $ hasValueFlow="v3" + _ = int8(v3) // $ Alert } } func testUsingStrConvIntSize(input string) { - parsed, err := strconv.ParseInt(input, 10, strconv.IntSize) + parsed, err := strconv.ParseInt(input, 10, strconv.IntSize) // $ Source if err != nil { panic(err) } - _ = int8(parsed) // $ hasValueFlow="parsed" - _ = uint8(parsed) // $ hasValueFlow="parsed" - _ = int16(parsed) // $ hasValueFlow="parsed" - _ = uint16(parsed) // $ hasValueFlow="parsed" - _ = int32(parsed) // $ hasValueFlow="parsed" - _ = uint32(parsed) // $ hasValueFlow="parsed" + _ = int8(parsed) // $ Alert + _ = uint8(parsed) // $ Alert + _ = int16(parsed) // $ Alert + _ = uint16(parsed) // $ Alert + _ = int32(parsed) // $ Alert + _ = uint32(parsed) // $ Alert _ = int64(parsed) _ = uint64(parsed) _ = int(parsed) @@ -490,7 +490,7 @@ func dealWithArchSizeCorrectly(s string) uint { } func typeSwitch1(s string) { - i64, _ := strconv.ParseInt(s, 10, 64) + i64, _ := strconv.ParseInt(s, 10, 64) // $ Source var input any = i64 switch v := input.(type) { case int16, string: @@ -498,19 +498,19 @@ func typeSwitch1(s string) { return } _ = int16(v.(int16)) - _ = int8(v.(int16)) // $ hasValueFlow="type assertion" + _ = int8(v.(int16)) // $ Alert case int32: _ = int32(v) - _ = int8(v) // $ hasValueFlow="v" + _ = int8(v) // $ Alert case int64: - _ = int8(v) // $ hasValueFlow="v" + _ = int8(v) // $ Alert default: - _ = int8(v.(int64)) // $ hasValueFlow="type assertion" + _ = int8(v.(int64)) // $ Alert } } func typeSwitch2(s string) { - i64, _ := strconv.ParseInt(s, 10, 64) + i64, _ := strconv.ParseInt(s, 10, 64) // $ Source var input any = i64 switch input.(type) { case int16, string: @@ -518,25 +518,25 @@ func typeSwitch2(s string) { return } _ = int16(input.(int16)) - _ = int8(input.(int16)) // $ hasValueFlow="type assertion" + _ = int8(input.(int16)) // $ Alert case int32: _ = int32(input.(int32)) - _ = int8(input.(int32)) // $ hasValueFlow="type assertion" + _ = int8(input.(int32)) // $ Alert case int64: - _ = int8(input.(int64)) // $ hasValueFlow="type assertion" + _ = int8(input.(int64)) // $ Alert default: - _ = int8(input.(int64)) // $ hasValueFlow="type assertion" + _ = int8(input.(int64)) // $ Alert } } func checkedTypeAssertion(s string) { - i64, _ := strconv.ParseInt(s, 10, 64) + i64, _ := strconv.ParseInt(s, 10, 64) // $ Source var input any = i64 if v, ok := input.(int16); ok { // Need to account for the fact that within this case clause, v is an int16 _ = int16(v) - _ = int8(v) // $ hasValueFlow="v" + _ = int8(v) // $ Alert } else if v, ok := input.(int32); ok { - _ = int16(v) // $ hasValueFlow="v" + _ = int16(v) // $ Alert } } diff --git a/go/ql/test/query-tests/Security/CWE-681/IncorrectIntegerConversion.ql b/go/ql/test/query-tests/Security/CWE-681/IncorrectIntegerConversion.ql deleted file mode 100644 index e5d1b2aebab..00000000000 --- a/go/ql/test/query-tests/Security/CWE-681/IncorrectIntegerConversion.ql +++ /dev/null @@ -1,20 +0,0 @@ -import go -import semmle.go.dataflow.ExternalFlow -import ModelValidation -import utils.test.InlineExpectationsTest -import semmle.go.security.IncorrectIntegerConversionLib - -module TestIncorrectIntegerConversion implements TestSig { - string getARelevantTag() { result = "hasValueFlow" } - - predicate hasActualResult(Location location, string element, string tag, string value) { - tag = "hasValueFlow" and - exists(DataFlow::Node sink | Flow::flowTo(sink) | - sink.getLocation() = location and - element = sink.toString() and - value = "\"" + sink.toString() + "\"" - ) - } -} - -import MakeTest diff --git a/go/ql/test/query-tests/Security/CWE-681/IncorrectIntegerConversion.qlref b/go/ql/test/query-tests/Security/CWE-681/IncorrectIntegerConversion.qlref new file mode 100644 index 00000000000..d424ad73de8 --- /dev/null +++ b/go/ql/test/query-tests/Security/CWE-681/IncorrectIntegerConversion.qlref @@ -0,0 +1,5 @@ +query: Security/CWE-681/IncorrectIntegerConversionQuery.ql +postprocess: + - utils/test/PrettyPrintModels.ql + - utils/test/InlineExpectationsTestQuery.ql + - ./FilterTestResults.ql diff --git a/go/ql/test/query-tests/Security/CWE-681/Test32BitArchitectureBuildConstraintInFileName_386.go b/go/ql/test/query-tests/Security/CWE-681/Test32BitArchitectureBuildConstraintInFileName_386.go index 0ff7b0e87ac..21eff8479a8 100644 --- a/go/ql/test/query-tests/Security/CWE-681/Test32BitArchitectureBuildConstraintInFileName_386.go +++ b/go/ql/test/query-tests/Security/CWE-681/Test32BitArchitectureBuildConstraintInFileName_386.go @@ -16,11 +16,11 @@ func testIntSource386() { _ = uint32(parsed) } { - parsed, err := strconv.ParseUint("3456", 10, 0) + parsed, err := strconv.ParseUint("3456", 10, 0) // $ Source if err != nil { panic(err) } - _ = int32(parsed) // $ hasValueFlow="parsed" + _ = int32(parsed) // $ Alert _ = uint32(parsed) } { diff --git a/go/ql/test/query-tests/Security/CWE-681/Test32BitArchitectureBuildConstraints.go b/go/ql/test/query-tests/Security/CWE-681/Test32BitArchitectureBuildConstraints.go index 79b776bdcac..16d5bba86c6 100644 --- a/go/ql/test/query-tests/Security/CWE-681/Test32BitArchitectureBuildConstraints.go +++ b/go/ql/test/query-tests/Security/CWE-681/Test32BitArchitectureBuildConstraints.go @@ -19,11 +19,11 @@ func testIntSource32() { _ = uint32(parsed) } { - parsed, err := strconv.ParseUint("3456", 10, 0) + parsed, err := strconv.ParseUint("3456", 10, 0) // $ Source if err != nil { panic(err) } - _ = int32(parsed) // $ hasValueFlow="parsed" + _ = int32(parsed) // $ Alert _ = uint32(parsed) } { diff --git a/go/ql/test/query-tests/Security/CWE-681/Test64BitArchitectureBuildConstraintInFileName_amd64.go b/go/ql/test/query-tests/Security/CWE-681/Test64BitArchitectureBuildConstraintInFileName_amd64.go index b5becec4af9..d1bd2673729 100644 --- a/go/ql/test/query-tests/Security/CWE-681/Test64BitArchitectureBuildConstraintInFileName_amd64.go +++ b/go/ql/test/query-tests/Security/CWE-681/Test64BitArchitectureBuildConstraintInFileName_amd64.go @@ -16,11 +16,11 @@ func testIntSinkAmd64() { _ = uint(parsed) } { - parsed, err := strconv.ParseUint("3456", 10, 64) + parsed, err := strconv.ParseUint("3456", 10, 64) // $ Source if err != nil { panic(err) } - _ = int(parsed) // $ hasValueFlow="parsed" + _ = int(parsed) // $ Alert _ = uint(parsed) } } diff --git a/go/ql/test/query-tests/Security/CWE-681/Test64BitArchitectureBuildConstraints.go b/go/ql/test/query-tests/Security/CWE-681/Test64BitArchitectureBuildConstraints.go index cf7aaf439a8..b07727d25ad 100644 --- a/go/ql/test/query-tests/Security/CWE-681/Test64BitArchitectureBuildConstraints.go +++ b/go/ql/test/query-tests/Security/CWE-681/Test64BitArchitectureBuildConstraints.go @@ -19,11 +19,11 @@ func testIntSink64() { _ = uint(parsed) } { - parsed, err := strconv.ParseUint("3456", 10, 64) + parsed, err := strconv.ParseUint("3456", 10, 64) // $ Source if err != nil { panic(err) } - _ = int(parsed) // $ hasValueFlow="parsed" + _ = int(parsed) // $ Alert _ = uint(parsed) } } diff --git a/go/ql/test/query-tests/Security/CWE-681/TestNoArchitectureBuildConstraints.go b/go/ql/test/query-tests/Security/CWE-681/TestNoArchitectureBuildConstraints.go index 70f1938b5b3..3138dd9a8c2 100644 --- a/go/ql/test/query-tests/Security/CWE-681/TestNoArchitectureBuildConstraints.go +++ b/go/ql/test/query-tests/Security/CWE-681/TestNoArchitectureBuildConstraints.go @@ -9,19 +9,19 @@ import ( func testIntSizeIsArchicturallyDependent1() { { - parsed, err := strconv.ParseInt("3456", 10, 0) + parsed, err := strconv.ParseInt("3456", 10, 0) // $ Source if err != nil { panic(err) } - _ = int32(parsed) // $ hasValueFlow="parsed" - _ = uint32(parsed) // $ hasValueFlow="parsed" + _ = int32(parsed) // $ Alert + _ = uint32(parsed) // $ Alert } { - parsed, err := strconv.ParseInt("3456", 10, 64) + parsed, err := strconv.ParseInt("3456", 10, 64) // $ Source if err != nil { panic(err) } - _ = int(parsed) // $ hasValueFlow="parsed" - _ = uint(parsed) // $ hasValueFlow="parsed" + _ = int(parsed) // $ Alert + _ = uint(parsed) // $ Alert } } diff --git a/go/ql/test/query-tests/Security/CWE-681/TestOldBuildConstraints.go b/go/ql/test/query-tests/Security/CWE-681/TestOldBuildConstraints.go index 34f686c6e8a..35980ee9978 100644 --- a/go/ql/test/query-tests/Security/CWE-681/TestOldBuildConstraints.go +++ b/go/ql/test/query-tests/Security/CWE-681/TestOldBuildConstraints.go @@ -20,11 +20,11 @@ func oldTestIntSink64() { _ = uint(parsed) } { - parsed, err := strconv.ParseUint("3456", 10, 64) + parsed, err := strconv.ParseUint("3456", 10, 64) // $ Source if err != nil { panic(err) } - _ = int(parsed) // $ hasValueFlow="parsed" + _ = int(parsed) // $ Alert _ = uint(parsed) } } diff --git a/go/ql/test/query-tests/Security/CWE-770/UncontrolledAllocationSize.expected b/go/ql/test/query-tests/Security/CWE-770/UncontrolledAllocationSize.expected index 42831abaf15..bdcf83b8935 100644 --- a/go/ql/test/query-tests/Security/CWE-770/UncontrolledAllocationSize.expected +++ b/go/ql/test/query-tests/Security/CWE-770/UncontrolledAllocationSize.expected @@ -1,2 +1,22 @@ -invalidModelRow -testFailures +#select +| UncontrolledAllocationSizeBad.go:20:27:20:30 | sink | UncontrolledAllocationSizeBad.go:11:12:11:16 | selection of URL | UncontrolledAllocationSizeBad.go:20:27:20:30 | sink | This memory allocation depends on a $@. | UncontrolledAllocationSizeBad.go:11:12:11:16 | selection of URL | user-provided value | +edges +| UncontrolledAllocationSizeBad.go:11:12:11:16 | selection of URL | UncontrolledAllocationSizeBad.go:11:12:11:24 | call to Query | provenance | Src:MaD:1 MaD:2 | +| UncontrolledAllocationSizeBad.go:11:12:11:24 | call to Query | UncontrolledAllocationSizeBad.go:13:15:13:20 | source | provenance | | +| UncontrolledAllocationSizeBad.go:13:15:13:20 | source | UncontrolledAllocationSizeBad.go:13:15:13:29 | call to Get | provenance | MaD:3 | +| UncontrolledAllocationSizeBad.go:13:15:13:29 | call to Get | UncontrolledAllocationSizeBad.go:14:28:14:36 | sourceStr | provenance | | +| UncontrolledAllocationSizeBad.go:14:2:14:37 | ... := ...[0] | UncontrolledAllocationSizeBad.go:20:27:20:30 | sink | provenance | | +| UncontrolledAllocationSizeBad.go:14:28:14:36 | sourceStr | UncontrolledAllocationSizeBad.go:14:2:14:37 | ... := ...[0] | provenance | Config | +models +| 1 | Source: net/http; Request; true; URL; ; ; ; remote; manual | +| 2 | Summary: net/url; URL; true; Query; ; ; Argument[receiver]; ReturnValue; taint; manual | +| 3 | Summary: net/url; Values; true; Get; ; ; Argument[receiver]; ReturnValue; taint; manual | +nodes +| UncontrolledAllocationSizeBad.go:11:12:11:16 | selection of URL | semmle.label | selection of URL | +| UncontrolledAllocationSizeBad.go:11:12:11:24 | call to Query | semmle.label | call to Query | +| UncontrolledAllocationSizeBad.go:13:15:13:20 | source | semmle.label | source | +| UncontrolledAllocationSizeBad.go:13:15:13:29 | call to Get | semmle.label | call to Get | +| UncontrolledAllocationSizeBad.go:14:2:14:37 | ... := ...[0] | semmle.label | ... := ...[0] | +| UncontrolledAllocationSizeBad.go:14:28:14:36 | sourceStr | semmle.label | sourceStr | +| UncontrolledAllocationSizeBad.go:20:27:20:30 | sink | semmle.label | sink | +subpaths diff --git a/go/ql/test/query-tests/Security/CWE-770/UncontrolledAllocationSize.ql b/go/ql/test/query-tests/Security/CWE-770/UncontrolledAllocationSize.ql deleted file mode 100644 index de10220d7e3..00000000000 --- a/go/ql/test/query-tests/Security/CWE-770/UncontrolledAllocationSize.ql +++ /dev/null @@ -1,6 +0,0 @@ -import go -import semmle.go.dataflow.ExternalFlow -import ModelValidation -import semmle.go.security.UncontrolledAllocationSize -import utils.test.InlineFlowTest -import FlowTest diff --git a/go/ql/test/query-tests/Security/CWE-770/UncontrolledAllocationSize.qlref b/go/ql/test/query-tests/Security/CWE-770/UncontrolledAllocationSize.qlref new file mode 100644 index 00000000000..82741d2fbaa --- /dev/null +++ b/go/ql/test/query-tests/Security/CWE-770/UncontrolledAllocationSize.qlref @@ -0,0 +1,4 @@ +query: Security/CWE-770/UncontrolledAllocationSize.ql +postprocess: + - utils/test/PrettyPrintModels.ql + - utils/test/InlineExpectationsTestQuery.ql diff --git a/go/ql/test/query-tests/Security/CWE-770/UncontrolledAllocationSizeBad.go b/go/ql/test/query-tests/Security/CWE-770/UncontrolledAllocationSizeBad.go index 0ae70436bde..ae052562705 100644 --- a/go/ql/test/query-tests/Security/CWE-770/UncontrolledAllocationSizeBad.go +++ b/go/ql/test/query-tests/Security/CWE-770/UncontrolledAllocationSizeBad.go @@ -8,7 +8,7 @@ import ( ) func OutOfMemoryBad(w http.ResponseWriter, r *http.Request) { - source := r.URL.Query() + source := r.URL.Query() // $ Source sourceStr := source.Get("n") sink, err := strconv.Atoi(sourceStr) @@ -17,7 +17,7 @@ func OutOfMemoryBad(w http.ResponseWriter, r *http.Request) { return } - result := make([]string, sink) // $hasTaintFlow="sink" + result := make([]string, sink) // $ Alert for i := 0; i < sink; i++ { result[i] = fmt.Sprintf("Item %d", i+1) } diff --git a/java/kotlin-extractor/pick-kotlin-version.py b/java/kotlin-extractor/pick-kotlin-version.py index d4d85820a8e..718592d2bd6 100755 --- a/java/kotlin-extractor/pick-kotlin-version.py +++ b/java/kotlin-extractor/pick-kotlin-version.py @@ -26,7 +26,7 @@ if kotlinc is None: res = subprocess.run([kotlinc, "-version"], text=True, stdout=subprocess.DEVNULL, stderr=subprocess.PIPE) if res.returncode != 0: raise Exception(f"kotlinc -version failed: {res.stderr}") -m = re.match(r'.* kotlinc-jvm ([0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z][a-zA-Z0-9]*)?) .*', res.stderr) +m = re.search(r' kotlinc-jvm ([0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z][a-zA-Z0-9]*)?) ', res.stderr) if m is None: raise Exception(f'Cannot detect version of kotlinc (got {res.stderr})') version = m[1] diff --git a/java/ql/integration-tests/java/query-suite/java-code-quality-extended.qls.expected b/java/ql/integration-tests/java/query-suite/java-code-quality-extended.qls.expected index d177c4ad6a5..5c82bd5e349 100644 --- a/java/ql/integration-tests/java/query-suite/java-code-quality-extended.qls.expected +++ b/java/ql/integration-tests/java/query-suite/java-code-quality-extended.qls.expected @@ -32,6 +32,7 @@ ql/java/ql/src/Likely Bugs/Concurrency/CallsToRunnableRun.ql ql/java/ql/src/Likely Bugs/Concurrency/DoubleCheckedLocking.ql ql/java/ql/src/Likely Bugs/Concurrency/DoubleCheckedLockingWithInitRace.ql ql/java/ql/src/Likely Bugs/Concurrency/NonSynchronizedOverride.ql +ql/java/ql/src/Likely Bugs/Concurrency/ScheduledThreadPoolExecutorZeroThread.ql ql/java/ql/src/Likely Bugs/Concurrency/SynchOnBoxedType.ql ql/java/ql/src/Likely Bugs/Concurrency/SynchSetUnsynchGet.ql ql/java/ql/src/Likely Bugs/Frameworks/JUnit/JUnit5MissingNestedAnnotation.ql diff --git a/java/ql/integration-tests/java/query-suite/java-code-quality.qls.expected b/java/ql/integration-tests/java/query-suite/java-code-quality.qls.expected index 05565601e40..e558cf3ffc4 100644 --- a/java/ql/integration-tests/java/query-suite/java-code-quality.qls.expected +++ b/java/ql/integration-tests/java/query-suite/java-code-quality.qls.expected @@ -30,6 +30,7 @@ ql/java/ql/src/Likely Bugs/Concurrency/CallsToRunnableRun.ql ql/java/ql/src/Likely Bugs/Concurrency/DoubleCheckedLocking.ql ql/java/ql/src/Likely Bugs/Concurrency/DoubleCheckedLockingWithInitRace.ql ql/java/ql/src/Likely Bugs/Concurrency/NonSynchronizedOverride.ql +ql/java/ql/src/Likely Bugs/Concurrency/ScheduledThreadPoolExecutorZeroThread.ql ql/java/ql/src/Likely Bugs/Concurrency/SynchOnBoxedType.ql ql/java/ql/src/Likely Bugs/Concurrency/SynchSetUnsynchGet.ql ql/java/ql/src/Likely Bugs/Frameworks/JUnit/JUnit5MissingNestedAnnotation.ql diff --git a/java/ql/lib/CHANGELOG.md b/java/ql/lib/CHANGELOG.md index 1e624ba0913..320552a8f14 100644 --- a/java/ql/lib/CHANGELOG.md +++ b/java/ql/lib/CHANGELOG.md @@ -1,3 +1,9 @@ +## 7.3.2 + +### Minor Analysis Improvements + +* Java `assert` statements are now assumed to be executed for the purpose of analysing control flow. This improves precision for a number of queries. + ## 7.3.1 No user-facing changes. diff --git a/java/ql/lib/change-notes/2025-06-12-assert-cfg.md b/java/ql/lib/change-notes/released/7.3.2.md similarity index 77% rename from java/ql/lib/change-notes/2025-06-12-assert-cfg.md rename to java/ql/lib/change-notes/released/7.3.2.md index 69219633166..6e3c0320860 100644 --- a/java/ql/lib/change-notes/2025-06-12-assert-cfg.md +++ b/java/ql/lib/change-notes/released/7.3.2.md @@ -1,4 +1,5 @@ ---- -category: minorAnalysis ---- +## 7.3.2 + +### Minor Analysis Improvements + * Java `assert` statements are now assumed to be executed for the purpose of analysing control flow. This improves precision for a number of queries. diff --git a/java/ql/lib/codeql-pack.release.yml b/java/ql/lib/codeql-pack.release.yml index 43cb026b139..cf3deb9367d 100644 --- a/java/ql/lib/codeql-pack.release.yml +++ b/java/ql/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 7.3.1 +lastReleaseVersion: 7.3.2 diff --git a/java/ql/lib/qlpack.yml b/java/ql/lib/qlpack.yml index 35f35a391c5..d6884627794 100644 --- a/java/ql/lib/qlpack.yml +++ b/java/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/java-all -version: 7.3.2-dev +version: 7.3.3-dev groups: java dbscheme: config/semmlecode.dbscheme extractor: java diff --git a/java/ql/lib/semmle/code/java/ControlFlowGraph.qll b/java/ql/lib/semmle/code/java/ControlFlowGraph.qll index 25ec9dc9ef4..33b7a6c0a9f 100644 --- a/java/ql/lib/semmle/code/java/ControlFlowGraph.qll +++ b/java/ql/lib/semmle/code/java/ControlFlowGraph.qll @@ -102,7 +102,8 @@ module ControlFlow { private newtype TNode = TExprNode(Expr e) { hasControlFlow(e) } or TStmtNode(Stmt s) or - TExitNode(Callable c) { exists(c.getBody()) } + TExitNode(Callable c) { exists(c.getBody()) } or + TAssertThrowNode(AssertStmt s) /** A node in the expression-level control-flow graph. */ class Node extends TNode { @@ -206,6 +207,25 @@ module ControlFlow { /** Gets the source location for this element. */ override Location getLocation() { result = c.getLocation() } } + + /** A control flow node indicating a failing assertion. */ + class AssertThrowNode extends Node, TAssertThrowNode { + AssertStmt s; + + AssertThrowNode() { this = TAssertThrowNode(s) } + + override Stmt getEnclosingStmt() { result = s } + + override Callable getEnclosingCallable() { result = s.getEnclosingCallable() } + + override ExprParent getAstNode() { result = s } + + /** Gets a textual representation of this element. */ + override string toString() { result = "Assert Throw" } + + /** Gets the source location for this element. */ + override Location getLocation() { result = s.getLocation() } + } } class ControlFlowNode = ControlFlow::Node; @@ -329,7 +349,17 @@ private module ControlFlowGraphImpl { ) } - private ThrowableType assertionError() { result.hasQualifiedName("java.lang", "AssertionError") } + private ThrowableType actualAssertionError() { + result.hasQualifiedName("java.lang", "AssertionError") + } + + private ThrowableType assertionError() { + result = actualAssertionError() + or + // In case `AssertionError` is not extracted, we use `Error` as a fallback. + not exists(actualAssertionError()) and + result.hasQualifiedName("java.lang", "Error") + } /** * Gets an exception type that may be thrown during execution of the @@ -1125,12 +1155,7 @@ private module ControlFlowGraphImpl { or // `assert` statements may throw completion = ThrowCompletion(assertionError()) and - ( - last(assertstmt.getMessage(), last, NormalCompletion()) - or - not exists(assertstmt.getMessage()) and - last(assertstmt.getExpr(), last, BooleanCompletion(false, _)) - ) + last.(AssertThrowNode).getAstNode() = assertstmt ) or // `throw` statements or throwing calls give rise to `Throw` completion @@ -1549,7 +1574,15 @@ private module ControlFlowGraphImpl { or last(assertstmt.getExpr(), n, completion) and completion = BooleanCompletion(false, _) and - result = first(assertstmt.getMessage()) + ( + result = first(assertstmt.getMessage()) + or + not exists(assertstmt.getMessage()) and + result.(AssertThrowNode).getAstNode() = assertstmt + ) + or + last(assertstmt.getMessage(), n, NormalCompletion()) and + result.(AssertThrowNode).getAstNode() = assertstmt ) or // When expressions: diff --git a/java/ql/lib/semmle/code/java/controlflow/BasicBlocks.qll b/java/ql/lib/semmle/code/java/controlflow/BasicBlocks.qll index 4e65001d7f2..844371da36b 100644 --- a/java/ql/lib/semmle/code/java/controlflow/BasicBlocks.qll +++ b/java/ql/lib/semmle/code/java/controlflow/BasicBlocks.qll @@ -87,6 +87,17 @@ class BasicBlock extends BbImpl::BasicBlock { */ predicate dominates(BasicBlock bb) { super.dominates(bb) } + /** + * Holds if this basic block strictly dominates basic block `bb`. + * + * That is, all paths reaching `bb` from the entry point basic block must + * go through this basic block and this basic block is different from `bb`. + */ + predicate strictlyDominates(BasicBlock bb) { super.strictlyDominates(bb) } + + /** Gets an immediate successor of this basic block of a given type, if any. */ + BasicBlock getASuccessor(Input::SuccessorType t) { result = super.getASuccessor(t) } + /** * DEPRECATED: Use `getASuccessor` instead. * diff --git a/java/ql/lib/semmle/code/java/controlflow/Guards.qll b/java/ql/lib/semmle/code/java/controlflow/Guards.qll index 9395e6dd8cc..18014c52f2e 100644 --- a/java/ql/lib/semmle/code/java/controlflow/Guards.qll +++ b/java/ql/lib/semmle/code/java/controlflow/Guards.qll @@ -7,9 +7,9 @@ module; import java private import semmle.code.java.controlflow.Dominance -private import semmle.code.java.controlflow.internal.GuardsLogic private import semmle.code.java.controlflow.internal.Preconditions private import semmle.code.java.controlflow.internal.SwitchCases +private import codeql.controlflow.Guards as SharedGuards /** * A basic block that terminates in a condition, splitting the subsequent control flow. @@ -139,68 +139,378 @@ private predicate isNonFallThroughPredecessor(SwitchCase sc, ControlFlowNode pre ) } -/** - * A condition that can be evaluated to either true or false. This can either - * be an `Expr` of boolean type that isn't a boolean literal, or a case of a - * switch statement, or a method access that acts as a precondition check. - * - * Evaluating a switch case to true corresponds to taking that switch case, and - * evaluating it to false corresponds to taking some other branch. - */ -final class Guard extends ExprParent { - Guard() { - this.(Expr).getType() instanceof BooleanType and not this instanceof BooleanLiteral - or - this instanceof SwitchCase - or - conditionCheckArgument(this, _, _) +private module GuardsInput implements SharedGuards::InputSig { + private import java as J + private import semmle.code.java.dataflow.NullGuards as NullGuards + import SuccessorType + + class ControlFlowNode = J::ControlFlowNode; + + class BasicBlock = J::BasicBlock; + + predicate dominatingEdge(BasicBlock bb1, BasicBlock bb2) { J::dominatingEdge(bb1, bb2) } + + class AstNode = ExprParent; + + class Expr = J::Expr; + + private newtype TConstantValue = + TCharValue(string c) { any(CharacterLiteral lit).getValue() = c } or + TStringValue(string value) { any(CompileTimeConstantExpr c).getStringValue() = value } or + TEnumValue(EnumConstant c) + + class ConstantValue extends TConstantValue { + string toString() { + this = TCharValue(result) + or + this = TStringValue(result) + or + exists(EnumConstant c | this = TEnumValue(c) and result = c.toString()) + } } + abstract class ConstantExpr extends Expr { + predicate isNull() { none() } + + boolean asBooleanValue() { none() } + + int asIntegerValue() { none() } + + ConstantValue asConstantValue() { none() } + } + + private class NullConstant extends ConstantExpr instanceof J::NullLiteral { + override predicate isNull() { any() } + } + + private class BooleanConstant extends ConstantExpr instanceof J::BooleanLiteral { + override boolean asBooleanValue() { result = super.getBooleanValue() } + } + + private class IntegerConstant extends ConstantExpr instanceof J::CompileTimeConstantExpr { + override int asIntegerValue() { result = super.getIntValue() } + } + + private class CharConstant extends ConstantExpr instanceof J::CharacterLiteral { + override ConstantValue asConstantValue() { result = TCharValue(super.getValue()) } + } + + private class StringConstant extends ConstantExpr instanceof J::CompileTimeConstantExpr { + override ConstantValue asConstantValue() { result = TStringValue(super.getStringValue()) } + } + + private class EnumConstantExpr extends ConstantExpr instanceof J::VarAccess { + override ConstantValue asConstantValue() { + exists(EnumConstant c | this = c.getAnAccess() and result = TEnumValue(c)) + } + } + + class NonNullExpr extends Expr { + NonNullExpr() { + this = NullGuards::baseNotNullExpr() + or + exists(Field f | + this = f.getAnAccess() and + f.isFinal() and + f.getInitializer() = NullGuards::baseNotNullExpr() + ) + } + } + + class Case extends ExprParent instanceof J::SwitchCase { + Expr getSwitchExpr() { result = super.getSelectorExpr() } + + predicate isDefaultCase() { this instanceof DefaultCase } + + ConstantExpr asConstantCase() { + exists(ConstCase cc | this = cc | + cc.getValue() = result and + strictcount(cc.getValue(_)) = 1 + ) + } + + private predicate hasPatternCaseMatchEdge(BasicBlock bb1, BasicBlock bb2, boolean isMatch) { + exists(ConditionNode patterncase | + this instanceof PatternCase and + patterncase = super.getControlFlowNode() and + bb1.getLastNode() = patterncase and + bb2.getFirstNode() = patterncase.getABranchSuccessor(isMatch) + ) + } + + predicate matchEdge(BasicBlock bb1, BasicBlock bb2) { + exists(ControlFlowNode pred | + // Pattern cases are handled as ConditionBlocks. + not this instanceof PatternCase and + bb2.getFirstNode() = super.getControlFlowNode() and + isNonFallThroughPredecessor(this, pred) and + bb1 = pred.getBasicBlock() + ) + or + this.hasPatternCaseMatchEdge(bb1, bb2, true) + } + + predicate nonMatchEdge(BasicBlock bb1, BasicBlock bb2) { + this.hasPatternCaseMatchEdge(bb1, bb2, false) + } + } + + abstract private class BinExpr extends Expr { + Expr getAnOperand() { + result = this.(BinaryExpr).getAnOperand() or result = this.(AssignOp).getSource() + } + } + + class AndExpr extends BinExpr { + AndExpr() { + this instanceof AndBitwiseExpr or + this instanceof AndLogicalExpr or + this instanceof AssignAndExpr + } + } + + class OrExpr extends BinExpr { + OrExpr() { + this instanceof OrBitwiseExpr or + this instanceof OrLogicalExpr or + this instanceof AssignOrExpr + } + } + + class NotExpr extends Expr instanceof J::LogNotExpr { + Expr getOperand() { result = this.(J::LogNotExpr).getExpr() } + } + + class IdExpr extends Expr { + IdExpr() { this instanceof AssignExpr or this instanceof CastExpr } + + Expr getEqualChildExpr() { + result = this.(AssignExpr).getSource() + or + result = this.(CastExpr).getExpr() + } + } + + private predicate objectsEquals(Method equals) { + equals.hasQualifiedName("java.util", "Objects", "equals") and + equals.getNumberOfParameters() = 2 + } + + pragma[nomagic] + predicate equalityTest(Expr eqtest, Expr left, Expr right, boolean polarity) { + exists(EqualityTest eq | eq = eqtest | + eq.getLeftOperand() = left and + eq.getRightOperand() = right and + eq.polarity() = polarity + ) + or + exists(MethodCall call | call = eqtest and polarity = true | + call.getMethod() instanceof EqualsMethod and + call.getQualifier() = left and + call.getAnArgument() = right + or + objectsEquals(call.getMethod()) and + call.getArgument(0) = left and + call.getArgument(1) = right + ) + } + + class ConditionalExpr extends Expr instanceof J::ConditionalExpr { + Expr getCondition() { result = super.getCondition() } + + Expr getThen() { result = super.getTrueExpr() } + + Expr getElse() { result = super.getFalseExpr() } + } +} + +private module GuardsImpl = SharedGuards::Make; + +private module LogicInputCommon { + private import semmle.code.java.dataflow.NullGuards as NullGuards + + predicate additionalNullCheck( + GuardsImpl::PreGuard guard, GuardValue val, GuardsInput::Expr e, boolean isNull + ) { + guard.(InstanceOfExpr).getExpr() = e and val.asBooleanValue() = true and isNull = false + or + exists(MethodCall call | + call = guard and + call.getAnArgument() = e and + NullGuards::nullCheckMethod(call.getMethod(), val.asBooleanValue(), isNull) + ) + } +} + +private module LogicInput_v1 implements GuardsImpl::LogicInputSig { + private import semmle.code.java.dataflow.internal.BaseSSA + + final private class FinalBaseSsaVariable = BaseSsaVariable; + + class SsaDefinition extends FinalBaseSsaVariable { + GuardsInput::Expr getARead() { result = this.getAUse() } + } + + class SsaWriteDefinition extends SsaDefinition instanceof BaseSsaUpdate { + GuardsInput::Expr getDefinition() { + super.getDefiningExpr().(VariableAssign).getSource() = result or + super.getDefiningExpr().(AssignOp) = result + } + } + + class SsaPhiNode extends SsaDefinition instanceof BaseSsaPhiNode { + predicate hasInputFromBlock(SsaDefinition inp, BasicBlock bb) { + super.hasInputFromBlock(inp, bb) + } + } + + predicate additionalNullCheck = LogicInputCommon::additionalNullCheck/4; + + predicate additionalImpliesStep( + GuardsImpl::PreGuard g1, GuardValue v1, GuardsImpl::PreGuard g2, GuardValue v2 + ) { + exists(MethodCall check, int argIndex | + g1 = check and + v1.getDualValue().isThrowsException() and + conditionCheckArgument(check, argIndex, v2.asBooleanValue()) and + g2 = check.getArgument(argIndex) + ) + } +} + +private module LogicInput_v2 implements GuardsImpl::LogicInputSig { + private import semmle.code.java.dataflow.SSA as SSA + + final private class FinalSsaVariable = SSA::SsaVariable; + + class SsaDefinition extends FinalSsaVariable { + GuardsInput::Expr getARead() { result = this.getAUse() } + } + + class SsaWriteDefinition extends SsaDefinition instanceof SSA::SsaExplicitUpdate { + GuardsInput::Expr getDefinition() { + super.getDefiningExpr().(VariableAssign).getSource() = result or + super.getDefiningExpr().(AssignOp) = result + } + } + + class SsaPhiNode extends SsaDefinition instanceof SSA::SsaPhiNode { + predicate hasInputFromBlock(SsaDefinition inp, BasicBlock bb) { + super.hasInputFromBlock(inp, bb) + } + } + + predicate additionalNullCheck = LogicInputCommon::additionalNullCheck/4; + + predicate additionalImpliesStep( + GuardsImpl::PreGuard g1, GuardValue v1, GuardsImpl::PreGuard g2, GuardValue v2 + ) { + LogicInput_v1::additionalImpliesStep(g1, v1, g2, v2) + or + CustomGuard::additionalImpliesStep(g1, v1, g2, v2) + } +} + +private module LogicInput_v3 implements GuardsImpl::LogicInputSig { + private import semmle.code.java.dataflow.IntegerGuards as IntegerGuards + import LogicInput_v2 + + predicate rangeGuard(GuardsImpl::PreGuard guard, GuardValue val, Expr e, int k, boolean upper) { + IntegerGuards::rangeGuard(guard, val.asBooleanValue(), e, k, upper) + } + + predicate additionalNullCheck = LogicInputCommon::additionalNullCheck/4; + + predicate additionalImpliesStep = LogicInput_v2::additionalImpliesStep/4; +} + +private module CustomGuardInput implements Guards_v2::CustomGuardInputSig { + private import semmle.code.java.dataflow.SSA + + private int parameterPosition() { result in [-1, any(Parameter p).getPosition()] } + + /** A parameter position represented by an integer. */ + class ParameterPosition extends int { + ParameterPosition() { this = parameterPosition() } + } + + /** An argument position represented by an integer. */ + class ArgumentPosition extends int { + ArgumentPosition() { this = parameterPosition() } + } + + /** Holds if arguments at position `apos` match parameters at position `ppos`. */ + pragma[inline] + predicate parameterMatch(ParameterPosition ppos, ArgumentPosition apos) { ppos = apos } + + final private class FinalMethod = Method; + + class BooleanMethod extends FinalMethod { + BooleanMethod() { + super.getReturnType().(PrimitiveType).hasName("boolean") and + not super.isOverridable() + } + + LogicInput_v2::SsaDefinition getParameter(ParameterPosition ppos) { + exists(Parameter p | + super.getParameter(ppos) = p and + not p.isVarargs() and + result.(SsaImplicitInit).isParameterDefinition(p) + ) + } + + GuardsInput::Expr getAReturnExpr() { + exists(ReturnStmt ret | + this = ret.getEnclosingCallable() and + ret.getResult() = result + ) + } + } + + private predicate booleanMethodCall(MethodCall call, BooleanMethod m) { + call.getMethod().getSourceDeclaration() = m + } + + class BooleanMethodCall extends GuardsInput::Expr instanceof MethodCall { + BooleanMethodCall() { booleanMethodCall(this, _) } + + BooleanMethod getMethod() { booleanMethodCall(this, result) } + + GuardsInput::Expr getArgument(ArgumentPosition apos) { result = super.getArgument(apos) } + } +} + +class GuardValue = GuardsImpl::GuardValue; + +private module CustomGuard = Guards_v2::CustomGuard; + +/** INTERNAL: Don't use. */ +module Guards_v1 = GuardsImpl::Logic; + +/** INTERNAL: Don't use. */ +module Guards_v2 = GuardsImpl::Logic; + +/** INTERNAL: Don't use. */ +module Guards_v3 = GuardsImpl::Logic; + +/** INTERNAL: Don't use. */ +predicate implies_v3(Guard g1, boolean b1, Guard g2, boolean b2) { + Guards_v3::boolImplies(g1, any(GuardValue v | v.asBooleanValue() = b1), g2, + any(GuardValue v | v.asBooleanValue() = b2)) +} + +/** + * A guard. This may be any expression whose value determines subsequent + * control flow. It may also be a switch case, which as a guard is considered + * to evaluate to either true or false depending on whether the case matches. + */ +final class Guard extends Guards_v3::Guard { /** Gets the immediately enclosing callable whose body contains this guard. */ Callable getEnclosingCallable() { result = this.(Expr).getEnclosingCallable() or result = this.(SwitchCase).getEnclosingCallable() } - /** Gets the statement containing this guard. */ - Stmt getEnclosingStmt() { - result = this.(Expr).getEnclosingStmt() or - result = this.(SwitchCase).getSwitch() or - result = this.(SwitchCase).getSwitchExpr().getEnclosingStmt() - } - - /** - * Gets the basic block containing this guard or the basic block that tests the - * applicability of this switch case -- for a pattern case this is the case statement - * itself; for a non-pattern case this is the most recent pattern case or the top of - * the switch block if there is none. - */ - BasicBlock getBasicBlock() { - // Not a switch case - result = this.(Expr).getBasicBlock() - or - // Return the closest pattern case statement before this one, including this one. - result = getClosestPrecedingPatternCase(this).getBasicBlock() - or - // Not a pattern case and no preceding pattern case -- return the top of the switch block. - not exists(getClosestPrecedingPatternCase(this)) and - result = this.(SwitchCase).getSelectorExpr().getBasicBlock() - } - - /** - * Holds if this guard is an equality test between `e1` and `e2`. The test - * can be either `==`, `!=`, `.equals`, or a switch case. If the test is - * negated, that is `!=`, then `polarity` is false, otherwise `polarity` is - * true. - */ - predicate isEquality(Expr e1, Expr e2, boolean polarity) { - exists(Expr exp1, Expr exp2 | equalityGuard(this, exp1, exp2, polarity) | - e1 = exp1 and e2 = exp2 - or - e2 = exp1 and e1 = exp2 - ) - } - /** * Holds if this guard tests whether `testedExpr` has type `testedType`. * @@ -233,211 +543,14 @@ final class Guard extends ExprParent { else restricted = false ) } - - /** - * Holds if the evaluation of this guard to `branch` corresponds to the edge - * from `bb1` to `bb2`. - */ - predicate hasBranchEdge(BasicBlock bb1, BasicBlock bb2, boolean branch) { - exists(ConditionBlock cb | - cb = bb1 and - cb.getCondition() = this and - bb2 = cb.getTestSuccessor(branch) - ) - or - exists(SwitchCase sc, ControlFlowNode pred | - sc = this and - // Pattern cases are handled as ConditionBlocks above. - not sc instanceof PatternCase and - branch = true and - bb2.getFirstNode() = sc.getControlFlowNode() and - isNonFallThroughPredecessor(sc, pred) and - bb1 = pred.getBasicBlock() - ) - or - preconditionBranchEdge(this, bb1, bb2, branch) - } - - /** - * Holds if this guard evaluating to `branch` directly controls the block - * `controlled`. That is, the `true`- or `false`-successor of this guard (as - * given by `branch`) dominates `controlled`. - */ - predicate directlyControls(BasicBlock controlled, boolean branch) { - exists(ConditionBlock cb | - cb.getCondition() = this and - cb.controls(controlled, branch) - ) - or - switchCaseControls(this, controlled) and branch = true - or - preconditionControls(this, controlled, branch) - } - - /** - * Holds if this guard evaluating to `branch` controls the control-flow - * branch edge from `bb1` to `bb2`. That is, following the edge from - * `bb1` to `bb2` implies that this guard evaluated to `branch`. - */ - predicate controlsBranchEdge(BasicBlock bb1, BasicBlock bb2, boolean branch) { - guardControlsBranchEdge_v3(this, bb1, bb2, branch) - } - - /** - * Holds if this guard evaluating to `branch` directly or indirectly controls - * the block `controlled`. That is, the evaluation of `controlled` is - * dominated by this guard evaluating to `branch`. - */ - predicate controls(BasicBlock controlled, boolean branch) { - guardControls_v3(this, controlled, branch) - } -} - -private predicate switchCaseControls(SwitchCase sc, BasicBlock bb) { - exists(BasicBlock caseblock | - // Pattern cases are handled as condition blocks - not sc instanceof PatternCase and - caseblock.getFirstNode() = sc.getControlFlowNode() and - caseblock.dominates(bb) and - // Check we can't fall through from a previous block: - forall(ControlFlowNode pred | pred = sc.getControlFlowNode().getAPredecessor() | - isNonFallThroughPredecessor(sc, pred) - ) - ) -} - -private predicate preconditionBranchEdge( - MethodCall ma, BasicBlock bb1, BasicBlock bb2, boolean branch -) { - conditionCheckArgument(ma, _, branch) and - bb1.getLastNode() = ma.getControlFlowNode() and - bb2.getFirstNode() = bb1.getLastNode().getANormalSuccessor() -} - -private predicate preconditionControls(MethodCall ma, BasicBlock controlled, boolean branch) { - exists(BasicBlock check, BasicBlock succ | - preconditionBranchEdge(ma, check, succ, branch) and - dominatingEdge(check, succ) and - succ.dominates(controlled) - ) } /** - * INTERNAL: Use `Guards.controls` instead. + * INTERNAL: Use `Guard.controls` instead. * * Holds if `guard.controls(controlled, branch)`, except this only relies on * BaseSSA-based reasoning. */ -predicate guardControls_v1(Guard guard, BasicBlock controlled, boolean branch) { - guard.directlyControls(controlled, branch) - or - exists(Guard g, boolean b | - guardControls_v1(g, controlled, b) and - implies_v1(g, b, guard, branch) - ) -} - -/** - * INTERNAL: Use `Guards.controls` instead. - * - * Holds if `guard.controls(controlled, branch)`, except this doesn't rely on - * RangeAnalysis. - */ -predicate guardControls_v2(Guard guard, BasicBlock controlled, boolean branch) { - guard.directlyControls(controlled, branch) - or - exists(Guard g, boolean b | - guardControls_v2(g, controlled, b) and - implies_v2(g, b, guard, branch) - ) -} - -pragma[nomagic] -private predicate guardControls_v3(Guard guard, BasicBlock controlled, boolean branch) { - guard.directlyControls(controlled, branch) - or - exists(Guard g, boolean b | - guardControls_v3(g, controlled, b) and - implies_v3(g, b, guard, branch) - ) -} - -pragma[nomagic] -private predicate guardControlsBranchEdge_v2( - Guard guard, BasicBlock bb1, BasicBlock bb2, boolean branch -) { - guard.hasBranchEdge(bb1, bb2, branch) - or - exists(Guard g, boolean b | - guardControlsBranchEdge_v2(g, bb1, bb2, b) and - implies_v2(g, b, guard, branch) - ) -} - -pragma[nomagic] -private predicate guardControlsBranchEdge_v3( - Guard guard, BasicBlock bb1, BasicBlock bb2, boolean branch -) { - guard.hasBranchEdge(bb1, bb2, branch) - or - exists(Guard g, boolean b | - guardControlsBranchEdge_v3(g, bb1, bb2, b) and - implies_v3(g, b, guard, branch) - ) -} - -/** INTERNAL: Use `Guard` instead. */ -final class Guard_v2 extends Guard { - /** - * Holds if this guard evaluating to `branch` controls the control-flow - * branch edge from `bb1` to `bb2`. That is, following the edge from - * `bb1` to `bb2` implies that this guard evaluated to `branch`. - */ - predicate controlsBranchEdge(BasicBlock bb1, BasicBlock bb2, boolean branch) { - guardControlsBranchEdge_v2(this, bb1, bb2, branch) - } - - /** - * Holds if this guard evaluating to `branch` directly or indirectly controls - * the block `controlled`. That is, the evaluation of `controlled` is - * dominated by this guard evaluating to `branch`. - */ - predicate controls(BasicBlock controlled, boolean branch) { - guardControls_v2(this, controlled, branch) - } -} - -private predicate equalityGuard(Guard g, Expr e1, Expr e2, boolean polarity) { - exists(EqualityTest eqtest | - eqtest = g and - polarity = eqtest.polarity() and - eqtest.hasOperands(e1, e2) - ) - or - exists(MethodCall ma | - ma = g and - ma.getMethod() instanceof EqualsMethod and - polarity = true and - ma.getAnArgument() = e1 and - ma.getQualifier() = e2 - ) - or - exists(MethodCall ma, Method equals | - ma = g and - ma.getMethod() = equals and - polarity = true and - equals.hasName("equals") and - equals.getNumberOfParameters() = 2 and - equals.getDeclaringType().hasQualifiedName("java.util", "Objects") and - ma.getArgument(0) = e1 and - ma.getArgument(1) = e2 - ) - or - exists(ConstCase cc | - cc = g and - polarity = true and - cc.getSelectorExpr() = e1 and - cc.getValue() = e2 and - strictcount(cc.getValue(_)) = 1 - ) +predicate guardControls_v1(Guards_v1::Guard guard, BasicBlock controlled, boolean branch) { + guard.controls(controlled, branch) } diff --git a/java/ql/lib/semmle/code/java/controlflow/internal/GuardsLogic.qll b/java/ql/lib/semmle/code/java/controlflow/internal/GuardsLogic.qll deleted file mode 100644 index d5dc39d9e14..00000000000 --- a/java/ql/lib/semmle/code/java/controlflow/internal/GuardsLogic.qll +++ /dev/null @@ -1,398 +0,0 @@ -/** - * Provides predicates for working with the internal logic of the `Guards` - * library. - */ -overlay[local?] -module; - -import java -import semmle.code.java.controlflow.Guards -private import Preconditions -private import semmle.code.java.dataflow.SSA -private import semmle.code.java.dataflow.internal.BaseSSA -private import semmle.code.java.dataflow.NullGuards -private import semmle.code.java.dataflow.IntegerGuards - -/** - * Holds if the assumption that `g1` has been evaluated to `b1` implies that - * `g2` has been evaluated to `b2`, that is, the evaluation of `g2` to `b2` - * dominates the evaluation of `g1` to `b1`. - * - * Restricted to BaseSSA-based reasoning. - */ -predicate implies_v1(Guard g1, boolean b1, Guard g2, boolean b2) { - g1.(AndBitwiseExpr).getAnOperand() = g2 and b1 = true and b2 = true - or - g1.(OrBitwiseExpr).getAnOperand() = g2 and b1 = false and b2 = false - or - g1.(AssignAndExpr).getSource() = g2 and b1 = true and b2 = true - or - g1.(AssignOrExpr).getSource() = g2 and b1 = false and b2 = false - or - g1.(AndLogicalExpr).getAnOperand() = g2 and b1 = true and b2 = true - or - g1.(OrLogicalExpr).getAnOperand() = g2 and b1 = false and b2 = false - or - g1.(LogNotExpr).getExpr() = g2 and - b1 = b2.booleanNot() and - b1 = [true, false] - or - exists(EqualityTest eqtest, boolean polarity, BooleanLiteral boollit | - eqtest = g1 and - eqtest.hasOperands(g2, boollit) and - eqtest.polarity() = polarity and - b1 = [true, false] and - b2 = b1.booleanXor(polarity).booleanXor(boollit.getBooleanValue()) - ) - or - exists(ConditionalExpr cond, boolean branch, BooleanLiteral boollit, boolean boolval | - cond.getBranchExpr(branch) = boollit and - cond = g1 and - boolval = boollit.getBooleanValue() and - b1 = boolval.booleanNot() and - ( - g2 = cond.getCondition() and b2 = branch.booleanNot() - or - g2 = cond.getABranchExpr() and b2 = b1 - ) - ) - or - g1.(DefaultCase).getSwitch().getAConstCase() = g2 and b1 = true and b2 = false - or - g1.(DefaultCase).getSwitchExpr().getAConstCase() = g2 and b1 = true and b2 = false - or - exists(MethodCall check, int argIndex | check = g1 | - conditionCheckArgument(check, argIndex, _) and - g2 = check.getArgument(argIndex) and - b1 = [true, false] and - b2 = b1 - ) - or - exists(BaseSsaUpdate vbool | - vbool.getDefiningExpr().(VariableAssign).getSource() = g2 or - vbool.getDefiningExpr().(AssignOp) = g2 - | - vbool.getAUse() = g1 and - b1 = [true, false] and - b2 = b1 - ) - or - g1.(AssignExpr).getSource() = g2 and b2 = b1 and b1 = [true, false] -} - -/** - * Holds if the assumption that `g1` has been evaluated to `b1` implies that - * `g2` has been evaluated to `b2`, that is, the evaluation of `g2` to `b2` - * dominates the evaluation of `g1` to `b1`. - * - * Allows full use of SSA but is restricted to pre-RangeAnalysis reasoning. - */ -predicate implies_v2(Guard g1, boolean b1, Guard g2, boolean b2) { - implies_v1(g1, b1, g2, b2) - or - exists(SsaExplicitUpdate vbool | - vbool.getDefiningExpr().(VariableAssign).getSource() = g2 or - vbool.getDefiningExpr().(AssignOp) = g2 - | - vbool.getAUse() = g1 and - b1 = [true, false] and - b2 = b1 - ) - or - exists(SsaVariable v, AbstractValue k | - // If `v = g2 ? k : ...` or `v = g2 ? ... : k` then a guard - // proving `v != k` ensures that `g2` evaluates to `b2`. - conditionalAssignVal(v, g2, b2.booleanNot(), k) and - guardImpliesNotEqual1(g1, b1, v, k) - ) - or - exists(SsaVariable v, Expr e, AbstractValue k | - // If `v = g2 ? k : ...` and all other assignments to `v` are different from - // `k` then a guard proving `v == k` ensures that `g2` evaluates to `b2`. - uniqueValue(v, e, k) and - guardImpliesEqual(g1, b1, v, k) and - g2.directlyControls(e.getBasicBlock(), b2) and - not g2.directlyControls(g1.getBasicBlock(), b2) - ) -} - -/** - * Holds if the assumption that `g1` has been evaluated to `b1` implies that - * `g2` has been evaluated to `b2`, that is, the evaluation of `g2` to `b2` - * dominates the evaluation of `g1` to `b1`. - */ -cached -predicate implies_v3(Guard g1, boolean b1, Guard g2, boolean b2) { - implies_v2(g1, b1, g2, b2) - or - exists(SsaVariable v, AbstractValue k | - // If `v = g2 ? k : ...` or `v = g2 ? ... : k` then a guard - // proving `v != k` ensures that `g2` evaluates to `b2`. - conditionalAssignVal(v, g2, b2.booleanNot(), k) and - guardImpliesNotEqual2(g1, b1, v, k) - ) - or - exists(SsaVariable v | - conditionalAssign(v, g2, b2.booleanNot(), clearlyNotNullExpr()) and - guardImpliesEqual(g1, b1, v, TAbsValNull()) - ) -} - -private newtype TAbstractValue = - TAbsValNull() or - TAbsValInt(int i) { exists(CompileTimeConstantExpr c | c.getIntValue() = i) } or - TAbsValChar(string c) { exists(CharacterLiteral lit | lit.getValue() = c) } or - TAbsValString(string s) { exists(StringLiteral lit | lit.getValue() = s) } or - TAbsValEnum(EnumConstant c) - -/** The value of a constant expression. */ -abstract private class AbstractValue extends TAbstractValue { - abstract string toString(); - - /** Gets an expression whose value is this abstract value. */ - abstract Expr getExpr(); -} - -private class AbsValNull extends AbstractValue, TAbsValNull { - override string toString() { result = "null" } - - override Expr getExpr() { result = alwaysNullExpr() } -} - -private class AbsValInt extends AbstractValue, TAbsValInt { - int i; - - AbsValInt() { this = TAbsValInt(i) } - - override string toString() { result = i.toString() } - - override Expr getExpr() { result.(CompileTimeConstantExpr).getIntValue() = i } -} - -private class AbsValChar extends AbstractValue, TAbsValChar { - string c; - - AbsValChar() { this = TAbsValChar(c) } - - override string toString() { result = c } - - override Expr getExpr() { result.(CharacterLiteral).getValue() = c } -} - -private class AbsValString extends AbstractValue, TAbsValString { - string s; - - AbsValString() { this = TAbsValString(s) } - - override string toString() { result = s } - - override Expr getExpr() { result.(CompileTimeConstantExpr).getStringValue() = s } -} - -private class AbsValEnum extends AbstractValue, TAbsValEnum { - EnumConstant c; - - AbsValEnum() { this = TAbsValEnum(c) } - - override string toString() { result = c.toString() } - - override Expr getExpr() { result = c.getAnAccess() } -} - -/** - * Holds if `v` can have a value that is not representable as an `AbstractValue`. - */ -private predicate hasPossibleUnknownValue(SsaVariable v) { - exists(SsaVariable def | v.getAnUltimateDefinition() = def | - def instanceof SsaImplicitUpdate - or - def instanceof SsaImplicitInit - or - exists(VariableUpdate upd | upd = def.(SsaExplicitUpdate).getDefiningExpr() | - not exists(upd.(VariableAssign).getSource()) - ) - or - exists(VariableAssign a, Expr e | - a = def.(SsaExplicitUpdate).getDefiningExpr() and - e = possibleValue(a.getSource()) and - not exists(AbstractValue val | val.getExpr() = e) - ) - ) -} - -/** - * Gets a sub-expression of `e` whose value can flow to `e` through - * `ConditionalExpr`s. - */ -private Expr possibleValue(Expr e) { - result = possibleValue(e.(ConditionalExpr).getABranchExpr()) - or - result = e and not e instanceof ConditionalExpr -} - -/** - * Gets an ultimate definition of `v` that is not itself a phi node. The - * boolean `fromBackEdge` indicates whether the flow from `result` to `v` goes - * through a back edge. - */ -SsaVariable getADefinition(SsaVariable v, boolean fromBackEdge) { - result = v and not v instanceof SsaPhiNode and fromBackEdge = false - or - exists(SsaVariable inp, BasicBlock bb, boolean fbe | - v.(SsaPhiNode).hasInputFromBlock(inp, bb) and - result = getADefinition(inp, fbe) and - (if v.getBasicBlock().dominates(bb) then fromBackEdge = true else fromBackEdge = fbe) - ) -} - -/** - * Holds if `e` equals `k` and may be assigned to `v`. The boolean - * `fromBackEdge` indicates whether the flow from `e` to `v` goes through a - * back edge. - */ -private predicate possibleValue(SsaVariable v, boolean fromBackEdge, Expr e, AbstractValue k) { - not hasPossibleUnknownValue(v) and - exists(SsaExplicitUpdate def | - def = getADefinition(v, fromBackEdge) and - e = possibleValue(def.getDefiningExpr().(VariableAssign).getSource()) and - k.getExpr() = e - ) -} - -/** - * Holds if `e` equals `k` and may be assigned to `v` without going through - * back edges, and all other possible ultimate definitions of `v` are different - * from `k`. The trivial case where `v` is an `SsaExplicitUpdate` with `e` as - * the only possible value is excluded. - */ -private predicate uniqueValue(SsaVariable v, Expr e, AbstractValue k) { - possibleValue(v, false, e, k) and - forex(Expr other, AbstractValue otherval | possibleValue(v, _, other, otherval) and other != e | - otherval != k - ) -} - -/** - * Holds if `v1` and `v2` have the same value in `bb`. - */ -private predicate equalVarsInBlock(BasicBlock bb, SsaVariable v1, SsaVariable v2) { - exists(Guard guard, boolean branch | - guard.isEquality(v1.getAUse(), v2.getAUse(), branch) and - guardControls_v1(guard, bb, branch) - ) -} - -/** - * Holds if `guard` evaluating to `branch` implies that `v` equals `k`. - */ -private predicate guardImpliesEqual(Guard guard, boolean branch, SsaVariable v, AbstractValue k) { - exists(SsaVariable v0 | - guard.isEquality(v0.getAUse(), k.getExpr(), branch) and - (v = v0 or equalVarsInBlock(guard.getBasicBlock(), v0, v)) - ) -} - -private BasicBlock getAGuardBranchSuccessor(Guard g, boolean branch) { - result.getFirstNode() = g.(Expr).getControlFlowNode().(ConditionNode).getABranchSuccessor(branch) - or - result.getFirstNode() = g.(SwitchCase).getControlFlowNode() and branch = true -} - -/** - * Holds if `guard` dominates `phi` and `guard` evaluating to `branch` controls the definition - * `upd = e` where `upd` is a possible input to `phi`. - */ -private predicate guardControlsPhiBranch( - SsaExplicitUpdate upd, SsaPhiNode phi, Guard guard, boolean branch, Expr e -) { - guard.directlyControls(upd.getBasicBlock(), branch) and - upd.getDefiningExpr().(VariableAssign).getSource() = e and - upd = phi.getAPhiInput() and - guard.getBasicBlock().strictlyDominates(phi.getBasicBlock()) -} - -/** - * Holds if `v` is conditionally assigned `e` under the condition that `guard` evaluates to `branch`. - * - * The evaluation of `guard` dominates the definition of `v` and `guard` evaluating to `branch` - * implies that `e` is assigned to `v`. In particular, this allows us to conclude that if `v` has - * a value different from `e` then `guard` must have evaluated to `branch.booleanNot()`. - */ -private predicate conditionalAssign(SsaVariable v, Guard guard, boolean branch, Expr e) { - exists(ConditionalExpr c | - v.(SsaExplicitUpdate).getDefiningExpr().(VariableAssign).getSource() = c and - guard = c.getCondition() - | - e = c.getBranchExpr(branch) - ) - or - exists(SsaExplicitUpdate upd, SsaPhiNode phi | - phi = v and - guardControlsPhiBranch(upd, phi, guard, branch, e) and - not guard.directlyControls(phi.getBasicBlock(), branch) and - forall(SsaVariable other | other != upd and other = phi.getAPhiInput() | - guard.directlyControls(other.getBasicBlock(), branch.booleanNot()) - or - other.getBasicBlock().dominates(guard.getBasicBlock()) and - not other.isLiveAtEndOfBlock(getAGuardBranchSuccessor(guard, branch)) - ) - ) -} - -/** - * Holds if `v` is conditionally assigned `val` under the condition that `guard` evaluates to `branch`. - */ -private predicate conditionalAssignVal(SsaVariable v, Guard guard, boolean branch, AbstractValue val) { - conditionalAssign(v, guard, branch, val.getExpr()) -} - -private predicate relevantEq(SsaVariable v, AbstractValue val) { - conditionalAssignVal(v, _, _, val) - or - exists(SsaVariable v0 | - conditionalAssignVal(v0, _, _, val) and - equalVarsInBlock(_, v0, v) - ) -} - -/** - * Holds if the evaluation of `guard` to `branch` implies that `v` does not have the value `val`. - */ -private predicate guardImpliesNotEqual1( - Guard guard, boolean branch, SsaVariable v, AbstractValue val -) { - exists(SsaVariable v0 | - relevantEq(v0, val) and - ( - guard.isEquality(v0.getAUse(), val.getExpr(), branch.booleanNot()) - or - exists(AbstractValue val2 | - guard.isEquality(v0.getAUse(), val2.getExpr(), branch) and - val != val2 - ) - or - guard.(InstanceOfExpr).getExpr() = sameValue(v0, _) and branch = true and val = TAbsValNull() - ) and - (v = v0 or equalVarsInBlock(guard.getBasicBlock(), v0, v)) - ) -} - -/** - * Holds if the evaluation of `guard` to `branch` implies that `v` does not have the value `val`. - */ -private predicate guardImpliesNotEqual2( - Guard guard, boolean branch, SsaVariable v, AbstractValue val -) { - exists(SsaVariable v0 | - relevantEq(v0, val) and - ( - guard = directNullGuard(v0, branch, false) and val = TAbsValNull() - or - exists(int k | - guard = integerGuard(v0.getAUse(), branch, k, false) and - val = TAbsValInt(k) - ) - ) and - (v = v0 or equalVarsInBlock(guard.getBasicBlock(), v0, v)) - ) -} diff --git a/java/ql/lib/semmle/code/java/dataflow/FlowSteps.qll b/java/ql/lib/semmle/code/java/dataflow/FlowSteps.qll index 8bf2a468392..6dd8de89e21 100644 --- a/java/ql/lib/semmle/code/java/dataflow/FlowSteps.qll +++ b/java/ql/lib/semmle/code/java/dataflow/FlowSteps.qll @@ -162,7 +162,7 @@ private class NumberTaintPreservingCallable extends TaintPreservingCallable { int argument; NumberTaintPreservingCallable() { - this.getDeclaringType().getAnAncestor().hasQualifiedName("java.lang", "Number") and + this.getDeclaringType().getASourceSupertype*().hasQualifiedName("java.lang", "Number") and ( this instanceof Constructor and argument = 0 diff --git a/java/ql/lib/semmle/code/java/dataflow/IntegerGuards.qll b/java/ql/lib/semmle/code/java/dataflow/IntegerGuards.qll index 817fa17d6a6..042fd5194f2 100644 --- a/java/ql/lib/semmle/code/java/dataflow/IntegerGuards.qll +++ b/java/ql/lib/semmle/code/java/dataflow/IntegerGuards.qll @@ -34,6 +34,58 @@ class IntComparableExpr extends Expr { } } +/** + * Holds if `comp` evaluating to `branch` ensures that `e1` is less than `e2`. + * When `strict` is true, `e1` is strictly less than `e2`, otherwise it is less + * than or equal to `e2`. + */ +private predicate comparison(ComparisonExpr comp, boolean branch, Expr e1, Expr e2, boolean strict) { + branch = true and + e1 = comp.getLesserOperand() and + e2 = comp.getGreaterOperand() and + (if comp.isStrict() then strict = true else strict = false) + or + branch = false and + e1 = comp.getGreaterOperand() and + e2 = comp.getLesserOperand() and + (if comp.isStrict() then strict = false else strict = true) +} + +/** + * Holds if `guard` evaluating to `branch` ensures that: + * `e <= k` when `upper = true` + * `e >= k` when `upper = false` + */ +pragma[nomagic] +predicate rangeGuard(Expr guard, boolean branch, Expr e, int k, boolean upper) { + exists(EqualityTest eqtest, Expr c | + eqtest = guard and + eqtest.hasOperands(e, c) and + bounded(c, any(ZeroBound zb), k, upper, _) and + branch = eqtest.polarity() + ) + or + exists(Expr c, int val, boolean strict, int d | + bounded(c, any(ZeroBound zb), val, upper, _) and + ( + upper = true and + comparison(guard, branch, e, c, strict) and + d = -1 + or + upper = false and + comparison(guard, branch, c, e, strict) and + d = 1 + ) and + ( + strict = false and k = val + or + // e < c <= val ==> e <= c - 1 <= val - 1 + // e > c >= val ==> e >= c + 1 >= val + 1 + strict = true and k = val + d + ) + ) +} + /** * An expression that directly tests whether a given expression is equal to `k` or not. * The set of `k`s is restricted to those that are relevant for the expression or @@ -55,75 +107,14 @@ Expr integerGuard(IntComparableExpr e, boolean branch, int k, boolean is_k) { ) ) or - exists(EqualityTest eqtest, int val, Expr c, boolean upper | + exists(int val, boolean upper | + rangeGuard(result, branch, e, val, upper) and k = e.relevantInt() and - eqtest = result and - eqtest.hasOperands(e, c) and - bounded(c, any(ZeroBound zb), val, upper, _) and - is_k = false and - ( - upper = true and val < k - or - upper = false and val > k - ) and - branch = eqtest.polarity() - ) - or - exists(ComparisonExpr comp, Expr c, int val, boolean upper | - k = e.relevantInt() and - comp = result and - comp.hasOperands(e, c) and - bounded(c, any(ZeroBound zb), val, upper, _) and is_k = false | - // k <= val <= c < e, so e != k - comp.getLesserOperand() = c and - comp.isStrict() and - branch = true and - val >= k and - upper = false + upper = true and val < k // e <= val < k ==> e != k or - comp.getLesserOperand() = c and - comp.isStrict() and - branch = false and - val < k and - upper = true - or - comp.getLesserOperand() = c and - not comp.isStrict() and - branch = true and - val > k and - upper = false - or - comp.getLesserOperand() = c and - not comp.isStrict() and - branch = false and - val <= k and - upper = true - or - comp.getGreaterOperand() = c and - comp.isStrict() and - branch = true and - val <= k and - upper = true - or - comp.getGreaterOperand() = c and - comp.isStrict() and - branch = false and - val > k and - upper = false - or - comp.getGreaterOperand() = c and - not comp.isStrict() and - branch = true and - val < k and - upper = true - or - comp.getGreaterOperand() = c and - not comp.isStrict() and - branch = false and - val >= k and - upper = false + upper = false and val > k // e >= val > k ==> e != k ) } diff --git a/java/ql/lib/semmle/code/java/dataflow/NullGuards.qll b/java/ql/lib/semmle/code/java/dataflow/NullGuards.qll index 5c6cdb919ef..bf9a166e048 100644 --- a/java/ql/lib/semmle/code/java/dataflow/NullGuards.qll +++ b/java/ql/lib/semmle/code/java/dataflow/NullGuards.qll @@ -6,7 +6,7 @@ module; import java import SSA -private import semmle.code.java.controlflow.internal.GuardsLogic +private import semmle.code.java.controlflow.Guards private import semmle.code.java.frameworks.apache.Collections private import IntegerGuards @@ -43,34 +43,45 @@ EqualityTest varEqualityTestExpr(SsaVariable v1, SsaVariable v2, boolean isEqual } /** Gets an expression that is provably not `null`. */ -Expr clearlyNotNullExpr(Expr reason) { - result instanceof ClassInstanceExpr and reason = result +Expr baseNotNullExpr() { + result instanceof ClassInstanceExpr or - result instanceof ArrayCreationExpr and reason = result + result instanceof ArrayCreationExpr or - result instanceof TypeLiteral and reason = result + result instanceof TypeLiteral or - result instanceof ThisAccess and reason = result + result instanceof ThisAccess or - result instanceof StringLiteral and reason = result + result instanceof StringLiteral or - result instanceof AddExpr and result.getType() instanceof TypeString and reason = result + result instanceof AddExpr and result.getType() instanceof TypeString or exists(Field f | result = f.getAnAccess() and (f.hasName("TRUE") or f.hasName("FALSE")) and - f.getDeclaringType().hasQualifiedName("java.lang", "Boolean") and - reason = result + f.getDeclaringType().hasQualifiedName("java.lang", "Boolean") ) or + result = any(EnumConstant c).getAnAccess() + or + result instanceof ImplicitNotNullExpr + or + result instanceof ImplicitCoercionToUnitExpr + or + result + .(MethodCall) + .getMethod() + .hasQualifiedName("com.google.common.base", "Strings", "nullToEmpty") +} + +/** Gets an expression that is provably not `null`. */ +Expr clearlyNotNullExpr(Expr reason) { + result = baseNotNullExpr() and reason = result + or result.(CastExpr).getExpr() = clearlyNotNullExpr(reason) or result.(ImplicitCastExpr).getExpr() = clearlyNotNullExpr(reason) or - result instanceof ImplicitNotNullExpr and reason = result - or - result instanceof ImplicitCoercionToUnitExpr and reason = result - or result.(AssignExpr).getSource() = clearlyNotNullExpr(reason) or exists(ConditionalExpr c, Expr r1, Expr r2 | @@ -85,14 +96,14 @@ Expr clearlyNotNullExpr(Expr reason) { guard.controls(rval.getBasicBlock(), branch) and reason = guard and rval = v.getAUse() and - result = rval + result = rval and + not result = baseNotNullExpr() ) or - exists(SsaVariable v | clearlyNotNull(v, reason) and result = v.getAUse()) - or - exists(Method m | m = result.(MethodCall).getMethod() and reason = result | - m.getDeclaringType().hasQualifiedName("com.google.common.base", "Strings") and - m.hasName("nullToEmpty") + exists(SsaVariable v | + clearlyNotNull(v, reason) and + result = v.getAUse() and + not result = baseNotNullExpr() ) } @@ -175,50 +186,19 @@ predicate nullCheckMethod(Method m, boolean branch, boolean isnull) { * is true, and non-null if `isnull` is false. */ Expr basicNullGuard(Expr e, boolean branch, boolean isnull) { - exists(EqualityTest eqtest, boolean polarity | - eqtest = result and - eqtest.hasOperands(e, any(NullLiteral n)) and - polarity = eqtest.polarity() and - ( - branch = true and isnull = polarity - or - branch = false and isnull = polarity.booleanNot() - ) - ) - or - result.(InstanceOfExpr).getExpr() = e and branch = true and isnull = false - or - exists(MethodCall call | - call = result and - call.getAnArgument() = e and - nullCheckMethod(call.getMethod(), branch, isnull) - ) - or - exists(EqualityTest eqtest | - eqtest = result and - eqtest.hasOperands(e, clearlyNotNullExpr()) and - isnull = false and - branch = eqtest.polarity() - ) - or - result = enumConstEquality(e, branch, _) and isnull = false + Guards_v3::nullGuard(result, any(GuardValue v | v.asBooleanValue() = branch), e, isnull) } /** + * DEPRECATED: Use `basicNullGuard` instead. + * * Gets an expression that directly tests whether a given expression, `e`, is null or not. * * If `result` evaluates to `branch`, then `e` is guaranteed to be null if `isnull` * is true, and non-null if `isnull` is false. */ -Expr basicOrCustomNullGuard(Expr e, boolean branch, boolean isnull) { +deprecated Expr basicOrCustomNullGuard(Expr e, boolean branch, boolean isnull) { result = basicNullGuard(e, branch, isnull) - or - exists(MethodCall call, Method m, int ix | - call = result and - call.getArgument(ix) = e and - call.getMethod().getSourceDeclaration() = m and - m = customNullGuard(ix, branch, isnull) - ) } /** @@ -228,80 +208,61 @@ Expr basicOrCustomNullGuard(Expr e, boolean branch, boolean isnull) { * is true, and non-null if `isnull` is false. */ Expr directNullGuard(SsaVariable v, boolean branch, boolean isnull) { - result = basicOrCustomNullGuard(sameValue(v, _), branch, isnull) + result = basicNullGuard(sameValue(v, _), branch, isnull) } /** + * DEPRECATED: Use `nullGuardControls`/`nullGuardControlsBranchEdge` instead. + * * Gets a `Guard` that tests (possibly indirectly) whether a given SSA variable is null or not. * * If `result` evaluates to `branch`, then `v` is guaranteed to be null if `isnull` * is true, and non-null if `isnull` is false. */ -Guard nullGuard(SsaVariable v, boolean branch, boolean isnull) { - result = directNullGuard(v, branch, isnull) or - exists(boolean branch0 | implies_v3(result, branch, nullGuard(v, branch0, isnull), branch0)) +deprecated Guard nullGuard(SsaVariable v, boolean branch, boolean isnull) { + result = directNullGuard(v, branch, isnull) } /** - * A return statement in a non-overridable method that on a return value of - * `retval` allows the conclusion that the parameter `p` either is null or - * non-null as specified by `isnull`. + * Holds if there exists a null check on `v`, such that taking the branch edge + * from `bb1` to `bb2` implies that `v` is guaranteed to be null if `isnull` is + * true, and non-null if `isnull` is false. */ -private predicate validReturnInCustomNullGuard( - ReturnStmt ret, Parameter p, boolean retval, boolean isnull -) { - exists(Method m | - ret.getEnclosingCallable() = m and - p.getCallable() = m and - m.getReturnType().(PrimitiveType).hasName("boolean") and - not p.isVarargs() and - p.getType() instanceof RefType and - not m.isOverridable() - ) and - exists(SsaImplicitInit ssa | ssa.isParameterDefinition(p) | - nullGuardedReturn(ret, ssa, isnull) and - (retval = true or retval = false) - or - exists(Expr res | res = ret.getResult() | res = nullGuard(ssa, retval, isnull)) +predicate nullGuardControlsBranchEdge(SsaVariable v, boolean isnull, BasicBlock bb1, BasicBlock bb2) { + exists(GuardValue gv | + Guards_v3::ssaControlsBranchEdge(v, bb1, bb2, gv) and + gv.isNullness(isnull) ) } -private predicate nullGuardedReturn(ReturnStmt ret, SsaImplicitInit ssa, boolean isnull) { - exists(boolean branch | - nullGuard(ssa, branch, isnull).directlyControls(ret.getBasicBlock(), branch) - ) -} - -pragma[nomagic] -private Method returnStmtGetEnclosingCallable(ReturnStmt ret) { - ret.getEnclosingCallable() = result -} - /** - * Gets a non-overridable method with a boolean return value that performs a null-check - * on the `index`th parameter. A return value equal to `retval` allows us to conclude - * that the argument either is null or non-null as specified by `isnull`. + * Holds if there exists a null check on `v` that controls `bb`, such that in + * `bb` `v` is guaranteed to be null if `isnull` is true, and non-null if + * `isnull` is false. */ -private Method customNullGuard(int index, boolean retval, boolean isnull) { - exists(Parameter p | - p.getCallable() = result and - p.getPosition() = index and - forex(ReturnStmt ret | - returnStmtGetEnclosingCallable(ret) = result and - exists(Expr res | res = ret.getResult() | - not res.(BooleanLiteral).getBooleanValue() = retval.booleanNot() - ) - | - validReturnInCustomNullGuard(ret, p, retval, isnull) - ) +predicate nullGuardControls(SsaVariable v, boolean isnull, BasicBlock bb) { + exists(GuardValue gv | + Guards_v3::ssaControls(v, bb, gv) and + gv.isNullness(isnull) ) } /** - * `guard` is a guard expression that suggests that `v` might be null. - * - * This is equivalent to `guard = basicNullGuard(sameValue(v, _), _, true)`. + * Holds if `guard` is a guard expression that suggests that `e` might be null. + */ +predicate guardSuggestsExprMaybeNull(Expr guard, Expr e) { + guard.(EqualityTest).hasOperands(e, any(NullLiteral n)) + or + exists(MethodCall call | + call = guard and + call.getAnArgument() = e and + nullCheckMethod(call.getMethod(), _, true) + ) +} + +/** + * Holds if `guard` is a guard expression that suggests that `v` might be null. */ predicate guardSuggestsVarMaybeNull(Expr guard, SsaVariable v) { - guard = basicNullGuard(sameValue(v, _), _, true) + guardSuggestsExprMaybeNull(guard, sameValue(v, _)) } diff --git a/java/ql/lib/semmle/code/java/dataflow/Nullness.qll b/java/ql/lib/semmle/code/java/dataflow/Nullness.qll index f3912277b33..02f228d17db 100644 --- a/java/ql/lib/semmle/code/java/dataflow/Nullness.qll +++ b/java/ql/lib/semmle/code/java/dataflow/Nullness.qll @@ -143,9 +143,9 @@ private ControlFlowNode varDereference(SsaVariable v, VarAccess va) { private ControlFlowNode ensureNotNull(SsaVariable v) { result = varDereference(v, _) or - exists(AssertTrueMethod m | result.asCall() = m.getACheck(nullGuard(v, true, false))) + exists(AssertTrueMethod m | result.asCall() = m.getACheck(directNullGuard(v, true, false))) or - exists(AssertFalseMethod m | result.asCall() = m.getACheck(nullGuard(v, false, false))) + exists(AssertFalseMethod m | result.asCall() = m.getACheck(directNullGuard(v, false, false))) or exists(AssertNotNullMethod m | result.asCall() = m.getACheck(v.getAUse())) or @@ -341,7 +341,7 @@ private predicate nullVarStep( not assertFail(mid, _) and bb = mid.getASuccessor() and not impossibleEdge(mid, bb) and - not exists(boolean branch | nullGuard(midssa, branch, false).hasBranchEdge(mid, bb, branch)) and + not nullGuardControlsBranchEdge(midssa, false, mid, bb) and not (leavingFinally(mid, bb, true) and midstoredcompletion = true) and if bb.getFirstNode().asStmt() = any(TryStmt try | | try.getFinally()) then @@ -478,6 +478,11 @@ private ConditionBlock ssaEnumConstEquality(SsaVariable v, boolean polarity, Enu result.getCondition() = enumConstEquality(v.getAUse(), polarity, c) } +private predicate conditionChecksNull(ConditionBlock cond, SsaVariable v, boolean branchIsNull) { + nullGuardControlsBranchEdge(v, true, cond, cond.getTestSuccessor(branchIsNull)) and + nullGuardControlsBranchEdge(v, false, cond, cond.getTestSuccessor(branchIsNull.booleanNot())) +} + /** A pair of correlated conditions for a given NPE candidate. */ private predicate correlatedConditions( SsaSourceVariable npecand, ConditionBlock cond1, ConditionBlock cond2, boolean inverted @@ -493,10 +498,8 @@ private predicate correlatedConditions( ) or exists(SsaVariable v, boolean branch1, boolean branch2 | - cond1.getCondition() = nullGuard(v, branch1, true) and - cond1.getCondition() = nullGuard(v, branch1.booleanNot(), false) and - cond2.getCondition() = nullGuard(v, branch2, true) and - cond2.getCondition() = nullGuard(v, branch2.booleanNot(), false) and + conditionChecksNull(cond1, v, branch1) and + conditionChecksNull(cond2, v, branch2) and inverted = branch1.booleanXor(branch2) ) or @@ -622,7 +625,7 @@ private Expr trackingVarGuard( SsaVariable trackssa, SsaSourceVariable trackvar, TrackVarKind kind, boolean branch, boolean isA ) { exists(Expr init | trackingVar(_, trackssa, trackvar, kind, init) | - result = basicOrCustomNullGuard(trackvar.getAnAccess(), branch, isA) and + result = basicNullGuard(trackvar.getAnAccess(), branch, isA) and kind = TrackVarKindNull() or result = trackvar.getAnAccess() and @@ -833,15 +836,13 @@ predicate alwaysNullDeref(SsaSourceVariable v, VarAccess va) { def.(SsaExplicitUpdate).getDefiningExpr().(VariableAssign).getSource() = alwaysNullExpr() ) or - exists(boolean branch | - nullGuard(ssa, branch, true).directlyControls(bb, branch) and - not clearlyNotNull(ssa) - ) + nullGuardControls(ssa, true, bb) and + not clearlyNotNull(ssa) | // Exclude fields as they might not have an accurate ssa representation. not v.getVariable() instanceof Field and firstVarDereferenceInBlock(bb, ssa, va) and ssa.getSourceVariable() = v and - not exists(boolean branch | nullGuard(ssa, branch, false).directlyControls(bb, branch)) + not nullGuardControls(ssa, false, bb) ) } diff --git a/java/ql/lib/semmle/code/java/dataflow/RangeAnalysis.qll b/java/ql/lib/semmle/code/java/dataflow/RangeAnalysis.qll index 49ce242e4a4..f65e15d1c61 100644 --- a/java/ql/lib/semmle/code/java/dataflow/RangeAnalysis.qll +++ b/java/ql/lib/semmle/code/java/dataflow/RangeAnalysis.qll @@ -68,7 +68,6 @@ module; import java private import SSA private import RangeUtils -private import semmle.code.java.controlflow.internal.GuardsLogic private import semmle.code.java.security.RandomDataSource private import SignAnalysis private import semmle.code.java.Reflection @@ -81,7 +80,7 @@ module Sem implements Semantic { private import java as J private import SSA as SSA private import RangeUtils as RU - private import semmle.code.java.controlflow.internal.GuardsLogic as GL + private import semmle.code.java.controlflow.Guards as G class Expr = J::Expr; @@ -221,7 +220,7 @@ module Sem implements Semantic { int getBlockId1(BasicBlock bb) { idOf(bb, result) } - class Guard extends GL::Guard_v2 { + class Guard extends G::Guards_v2::Guard { Expr asExpr() { result = this } } diff --git a/java/ql/lib/semmle/code/java/dataflow/RangeUtils.qll b/java/ql/lib/semmle/code/java/dataflow/RangeUtils.qll index 7d38d83b096..efd7bcd8088 100644 --- a/java/ql/lib/semmle/code/java/dataflow/RangeUtils.qll +++ b/java/ql/lib/semmle/code/java/dataflow/RangeUtils.qll @@ -6,7 +6,7 @@ module; import java private import SSA -private import semmle.code.java.controlflow.internal.GuardsLogic +private import semmle.code.java.controlflow.Guards private import semmle.code.java.Constants private import semmle.code.java.dataflow.RangeAnalysis private import codeql.rangeanalysis.internal.RangeUtils diff --git a/java/ql/lib/semmle/code/java/dataflow/internal/BaseSSA.qll b/java/ql/lib/semmle/code/java/dataflow/internal/BaseSSA.qll index e01525eda8c..5c0fbb88d66 100644 --- a/java/ql/lib/semmle/code/java/dataflow/internal/BaseSSA.qll +++ b/java/ql/lib/semmle/code/java/dataflow/internal/BaseSSA.qll @@ -374,5 +374,10 @@ class BaseSsaImplicitInit extends BaseSsaVariable instanceof Impl::WriteDefiniti /** An SSA phi node. */ class BaseSsaPhiNode extends BaseSsaVariable instanceof Impl::PhiNode { /** Gets an input to the phi node defining the SSA variable. */ - BaseSsaVariable getAPhiInput() { phiHasInputFromBlock(this, result, _) } + BaseSsaVariable getAPhiInput() { this.hasInputFromBlock(result, _) } + + /** Holds if `inp` is an input to the phi node along the edge originating in `bb`. */ + predicate hasInputFromBlock(BaseSsaVariable inp, BasicBlock bb) { + phiHasInputFromBlock(this, inp, bb) + } } diff --git a/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowNodes.qll b/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowNodes.qll index 61063498b9e..674c2380a5f 100644 --- a/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowNodes.qll +++ b/java/ql/lib/semmle/code/java/dataflow/internal/DataFlowNodes.qll @@ -63,8 +63,6 @@ module SsaFlow { cached private module Cached { - private import semmle.code.java.controlflow.internal.GuardsLogic as GuardsLogic - cached newtype TNode = TExprNode(Expr e) { diff --git a/java/ql/lib/semmle/code/java/dataflow/internal/rangeanalysis/ModulusAnalysisSpecific.qll b/java/ql/lib/semmle/code/java/dataflow/internal/rangeanalysis/ModulusAnalysisSpecific.qll index ae77ab7ea01..e124b8f7137 100644 --- a/java/ql/lib/semmle/code/java/dataflow/internal/rangeanalysis/ModulusAnalysisSpecific.qll +++ b/java/ql/lib/semmle/code/java/dataflow/internal/rangeanalysis/ModulusAnalysisSpecific.qll @@ -17,7 +17,7 @@ module Private { class Expr = J::Expr; - class Guard = G::Guard_v2; + class Guard = G::Guards_v2::Guard; class ConstantIntegerExpr = RU::ConstantIntegerExpr; diff --git a/java/ql/lib/semmle/code/java/dataflow/internal/rangeanalysis/SignAnalysisSpecific.qll b/java/ql/lib/semmle/code/java/dataflow/internal/rangeanalysis/SignAnalysisSpecific.qll index 10026e0a53d..8789661af7d 100644 --- a/java/ql/lib/semmle/code/java/dataflow/internal/rangeanalysis/SignAnalysisSpecific.qll +++ b/java/ql/lib/semmle/code/java/dataflow/internal/rangeanalysis/SignAnalysisSpecific.qll @@ -15,7 +15,7 @@ module Private { class ConstantIntegerExpr = RU::ConstantIntegerExpr; - class Guard = G::Guard_v2; + class Guard = G::Guards_v2::Guard; class SsaVariable = Ssa::SsaVariable; diff --git a/java/ql/lib/semmle/code/java/frameworks/struts/StrutsActions.qll b/java/ql/lib/semmle/code/java/frameworks/struts/StrutsActions.qll index 6c5799d0275..641fb0c6e6f 100644 --- a/java/ql/lib/semmle/code/java/frameworks/struts/StrutsActions.qll +++ b/java/ql/lib/semmle/code/java/frameworks/struts/StrutsActions.qll @@ -133,7 +133,7 @@ class Struts2PrepareMethod extends Method { */ class Struts2ActionSupportClass extends Class { Struts2ActionSupportClass() { - this.getAStrictAncestor().hasQualifiedName("com.opensymphony.xwork2", "ActionSupport") + this.getASourceSupertype+().hasQualifiedName("com.opensymphony.xwork2", "ActionSupport") } /** diff --git a/java/ql/lib/semmle/code/java/security/ArithmeticCommon.qll b/java/ql/lib/semmle/code/java/security/ArithmeticCommon.qll index 5a8b5e97508..e0d6ff305c3 100644 --- a/java/ql/lib/semmle/code/java/security/ArithmeticCommon.qll +++ b/java/ql/lib/semmle/code/java/security/ArithmeticCommon.qll @@ -9,7 +9,6 @@ private import semmle.code.java.dataflow.DataFlow private import semmle.code.java.dataflow.RangeAnalysis private import semmle.code.java.dataflow.RangeUtils private import semmle.code.java.dataflow.SignAnalysis -private import semmle.code.java.controlflow.internal.GuardsLogic /** * Holds if the type of `exp` is narrower than or equal to `numType`, diff --git a/java/ql/lib/semmle/code/java/security/UnsafeDeserializationQuery.qll b/java/ql/lib/semmle/code/java/security/UnsafeDeserializationQuery.qll index b16770c222b..e10c6cebaf6 100644 --- a/java/ql/lib/semmle/code/java/security/UnsafeDeserializationQuery.qll +++ b/java/ql/lib/semmle/code/java/security/UnsafeDeserializationQuery.qll @@ -323,6 +323,10 @@ private module UnsafeDeserializationConfig implements DataFlow::ConfigSig { predicate isBarrier(DataFlow::Node node) { isUnsafeDeserializationSanitizer(node) } predicate observeDiffInformedIncrementalMode() { any() } + + Location getASelectedSinkLocation(DataFlow::Node sink) { + result = sink.(UnsafeDeserializationSink).getMethodCall().getLocation() + } } module UnsafeDeserializationFlow = TaintTracking::Global; diff --git a/java/ql/lib/semmle/code/java/security/regexp/PolynomialReDoSQuery.qll b/java/ql/lib/semmle/code/java/security/regexp/PolynomialReDoSQuery.qll index 767ebc97437..ba65e13dd61 100644 --- a/java/ql/lib/semmle/code/java/security/regexp/PolynomialReDoSQuery.qll +++ b/java/ql/lib/semmle/code/java/security/regexp/PolynomialReDoSQuery.qll @@ -47,18 +47,6 @@ module PolynomialRedosConfig implements DataFlow::ConfigSig { node instanceof SimpleTypeSanitizer or node.asExpr().(MethodCall).getMethod() instanceof LengthRestrictedMethod } - - predicate observeDiffInformedIncrementalMode() { any() } - - Location getASelectedSinkLocation(DataFlow::Node sink) { - exists(SuperlinearBackTracking::PolynomialBackTrackingTerm regexp | - regexp.getRootTerm() = sink.(PolynomialRedosSink).getRegExp() - | - result = sink.getLocation() - or - result = regexp.getLocation() - ) - } } module PolynomialRedosFlow = TaintTracking::Global; diff --git a/java/ql/src/CHANGELOG.md b/java/ql/src/CHANGELOG.md index ca355f5e684..fe2be06be35 100644 --- a/java/ql/src/CHANGELOG.md +++ b/java/ql/src/CHANGELOG.md @@ -1,3 +1,24 @@ +## 1.6.0 + +### Query Metadata Changes + +* The tag `quality` has been added to multiple Java quality queries for consistency. They have all been given a tag for one of the two top-level categories `reliability` or `maintainability`, and a tag for a sub-category. See [Query file metadata and alert message style guide](https://github.com/github/codeql/blob/main/docs/query-metadata-style-guide.md#quality-query-sub-category-tags) for more information about these categories. +* The tag `external/cwe/cwe-571` has been added to `java/equals-on-unrelated-types`. +* The tag `readability` has been added to `java/missing-override-annotation`, `java/deprecated-call`, `java/inconsistent-javadoc-throws`, `java/unknown-javadoc-parameter`, `java/jdk-internal-api-access`, `java/underscore-identifier`, `java/misleading-indentation`, `java/inefficient-empty-string-test`, `java/non-static-nested-class`, `inefficient-string-constructor`, and `java/constants-only-interface`. +* The tag `useless-code` has been added to `java/useless-type-test`, and `java/useless-tostring-call`. +* The tag `complexity` has been added to `java/chained-type-tests`, and `java/abstract-to-concrete-cast`. +* The tag `error-handling` has been added to `java/ignored-error-status-of-call`, and `java/uncaught-number-format-exception`. +* The tag `correctness` has been added to `java/evaluation-to-constant`, `java/whitespace-contradicts-precedence`, `java/empty-container`, `java/string-buffer-char-init`, `java/call-to-object-tostring`, `java/print-array` and `java/internal-representation-exposure`. +* The tag `performance` has been added to `java/input-resource-leak`, `java/database-resource-leak`, `java/output-resource-leak`, `java/inefficient-key-set-iterator`, `java/inefficient-output-stream`, and `java/inefficient-boxed-constructor`. +* The tag `correctness` has been removed from `java/call-to-thread-run`, `java/unsafe-double-checked-locking`, `java/unsafe-double-checked-locking-init-order`, `java/non-sync-override`, `java/sync-on-boxed-types`, `java/unsynchronized-getter`, `java/input-resource-leak`, `java/output-resource-leak`, `java/database-resource-leak`, and `java/ignored-error-status-of-call`. +* The tags `maintainability` has been removed from `java/string-buffer-char-init`, `java/inefficient-key-set-iterator`, `java/inefficient-boxed-constructor`, and `java/internal-representation-exposure`. +* The tags `reliability` has been removed from `java/subtle-inherited-call`, `java/print-array`, and `java/call-to-object-tostring`. +* The tags `maintainability` and `useless-code` have been removed from `java/evaluation-to-constant`. +* The tags `maintainability` and `readability` have been removed from `java/whitespace-contradicts-precedence`. +* The tags `maintainability` and `useless-code` have been removed from `java/empty-container`. +* Adjusts the `@precision` from high to medium for `java/concatenated-command-line` because it is producing false positive alerts when the concatenated strings are hard-coded. +* Adjusts the `@security-severity` from 9.3 to 7.3 for `java/tainted-format-string` to align `CWE-134` severity for memory safe languages to better reflect their impact. + ## 1.5.2 No user-facing changes. diff --git a/java/ql/src/Language Abuse/UselessNullCheck.ql b/java/ql/src/Language Abuse/UselessNullCheck.ql index 1ad1c4c8e1e..92041ca9e4a 100644 --- a/java/ql/src/Language Abuse/UselessNullCheck.ql +++ b/java/ql/src/Language Abuse/UselessNullCheck.ql @@ -18,10 +18,10 @@ import semmle.code.java.controlflow.Guards from Expr guard, Expr e, Expr reason, string msg where - guard = basicNullGuard(e, _, true) and + guardSuggestsExprMaybeNull(guard, e) and e = clearlyNotNullExpr(reason) and ( - if reason instanceof Guard + if reason = directNullGuard(_, _, _) then msg = "This check is useless. $@ cannot be null at this check, since it is guarded by $@." else if reason != e diff --git a/java/ql/src/Likely Bugs/Concurrency/ScheduledThreadPoolExecutorZeroThread.md b/java/ql/src/Likely Bugs/Concurrency/ScheduledThreadPoolExecutorZeroThread.md new file mode 100644 index 00000000000..424407f5cc6 --- /dev/null +++ b/java/ql/src/Likely Bugs/Concurrency/ScheduledThreadPoolExecutorZeroThread.md @@ -0,0 +1,24 @@ +## Overview + +According to the Java documentation on `ScheduledThreadPoolExecutor`, it is not a good idea to set `corePoolSize` to zero, since doing so indicates the executor to keep 0 threads in its pool and the executor will serve no purpose. + +## Recommendation + +Set the `ScheduledThreadPoolExecutor` to have 1 or more threads in its thread pool and use the class's other methods to create a thread execution schedule. + +## Example + +```java +public class Test { + void f() { + int i = 0; + ScheduledThreadPoolExecutor s = new ScheduledThreadPoolExecutor(1); // COMPLIANT + ScheduledThreadPoolExecutor s1 = new ScheduledThreadPoolExecutor(0); // NON_COMPLIANT + s.setCorePoolSize(0); // NON_COMPLIANT + s.setCorePoolSize(i); // NON_COMPLIANT + } +} +``` + +## References +- [ScheduledThreadPoolExecutor](https://docs.oracle.com/en/java/javase/20/docs/api/java.base/java/util/concurrent/ScheduledThreadPoolExecutor.html) diff --git a/java/ql/src/Likely Bugs/Concurrency/ScheduledThreadPoolExecutorZeroThread.ql b/java/ql/src/Likely Bugs/Concurrency/ScheduledThreadPoolExecutorZeroThread.ql new file mode 100644 index 00000000000..0b8acb5a088 --- /dev/null +++ b/java/ql/src/Likely Bugs/Concurrency/ScheduledThreadPoolExecutorZeroThread.ql @@ -0,0 +1,36 @@ +/** + * @id java/java-util-concurrent-scheduledthreadpoolexecutor + * @name Zero threads set for `java.util.concurrent.ScheduledThreadPoolExecutor` + * @description Setting `java.util.concurrent.ScheduledThreadPoolExecutor` to have 0 threads serves + * no purpose and may indicate programmer error. + * @kind problem + * @precision very-high + * @problem.severity recommendation + * @previous-id java/javautilconcurrentscheduledthreadpoolexecutor + * @tags quality + * reliability + * correctness + * concurrency + */ + +import java +import semmle.code.java.dataflow.DataFlow + +/** + * A `Call` that has the ability to set or modify the `corePoolSize` of the `java.util.concurrent.ScheduledThreadPoolExecutor` type. + */ +class Sink extends Call { + Sink() { + this.getCallee() + .hasQualifiedName("java.util.concurrent", "ThreadPoolExecutor", "setCorePoolSize") or + this.getCallee() + .hasQualifiedName("java.util.concurrent", "ScheduledThreadPoolExecutor", + "ScheduledThreadPoolExecutor") + } +} + +from IntegerLiteral zero, Sink set +where + DataFlow::localFlow(DataFlow::exprNode(zero), DataFlow::exprNode(set.getArgument(0))) and + zero.getIntValue() = 0 +select set, "ScheduledThreadPoolExecutor.corePoolSize is set to have 0 threads." diff --git a/java/ql/src/change-notes/2025-06-06-reduce-CWE-134-for-memory-safe-languages.md b/java/ql/src/change-notes/2025-06-06-reduce-CWE-134-for-memory-safe-languages.md deleted file mode 100644 index 6ab4beb7290..00000000000 --- a/java/ql/src/change-notes/2025-06-06-reduce-CWE-134-for-memory-safe-languages.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -category: queryMetadata ---- -* Adjusts the `@security-severity` from 9.3 to 7.3 for `java/tainted-format-string` to align `CWE-134` severity for memory safe languages to better reflect their impact. diff --git a/java/ql/src/change-notes/2025-06-10-reduce-precision-for-building-cmdline-with-string-concatenation.md b/java/ql/src/change-notes/2025-06-10-reduce-precision-for-building-cmdline-with-string-concatenation.md deleted file mode 100644 index 392e1965def..00000000000 --- a/java/ql/src/change-notes/2025-06-10-reduce-precision-for-building-cmdline-with-string-concatenation.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -category: queryMetadata ---- -* Adjusts the `@precision` from high to medium for `java/concatenated-command-line` because it is producing false positive alerts when the concatenated strings are hard-coded. diff --git a/java/ql/src/change-notes/2025-06-17-improved-guards.md b/java/ql/src/change-notes/2025-06-17-improved-guards.md new file mode 100644 index 00000000000..b49710460f1 --- /dev/null +++ b/java/ql/src/change-notes/2025-06-17-improved-guards.md @@ -0,0 +1,4 @@ +--- +category: minorAnalysis +--- +* Java analysis of guards has been switched to use the new and improved shared guards library. This improves precision of a number of queries, in particular `java/dereferenced-value-may-be-null`, which now has fewer false positives, and `java/useless-null-check` and `java/constant-comparison`, which gain additional true positives. diff --git a/java/ql/src/change-notes/2025-06-17-add-tags-to-quality-queries.md b/java/ql/src/change-notes/released/1.6.0.md similarity index 87% rename from java/ql/src/change-notes/2025-06-17-add-tags-to-quality-queries.md rename to java/ql/src/change-notes/released/1.6.0.md index a8c07fb3560..539ce3d0969 100644 --- a/java/ql/src/change-notes/2025-06-17-add-tags-to-quality-queries.md +++ b/java/ql/src/change-notes/released/1.6.0.md @@ -1,6 +1,7 @@ ---- -category: queryMetadata ---- +## 1.6.0 + +### Query Metadata Changes + * The tag `quality` has been added to multiple Java quality queries for consistency. They have all been given a tag for one of the two top-level categories `reliability` or `maintainability`, and a tag for a sub-category. See [Query file metadata and alert message style guide](https://github.com/github/codeql/blob/main/docs/query-metadata-style-guide.md#quality-query-sub-category-tags) for more information about these categories. * The tag `external/cwe/cwe-571` has been added to `java/equals-on-unrelated-types`. * The tag `readability` has been added to `java/missing-override-annotation`, `java/deprecated-call`, `java/inconsistent-javadoc-throws`, `java/unknown-javadoc-parameter`, `java/jdk-internal-api-access`, `java/underscore-identifier`, `java/misleading-indentation`, `java/inefficient-empty-string-test`, `java/non-static-nested-class`, `inefficient-string-constructor`, and `java/constants-only-interface`. @@ -15,3 +16,5 @@ category: queryMetadata * The tags `maintainability` and `useless-code` have been removed from `java/evaluation-to-constant`. * The tags `maintainability` and `readability` have been removed from `java/whitespace-contradicts-precedence`. * The tags `maintainability` and `useless-code` have been removed from `java/empty-container`. +* Adjusts the `@precision` from high to medium for `java/concatenated-command-line` because it is producing false positive alerts when the concatenated strings are hard-coded. +* Adjusts the `@security-severity` from 9.3 to 7.3 for `java/tainted-format-string` to align `CWE-134` severity for memory safe languages to better reflect their impact. diff --git a/java/ql/src/codeql-pack.release.yml b/java/ql/src/codeql-pack.release.yml index 7eb901bae56..c4f0b07d533 100644 --- a/java/ql/src/codeql-pack.release.yml +++ b/java/ql/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.5.2 +lastReleaseVersion: 1.6.0 diff --git a/java/ql/src/qlpack.yml b/java/ql/src/qlpack.yml index a0b518b6876..aaeb2c86ac1 100644 --- a/java/ql/src/qlpack.yml +++ b/java/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/java-queries -version: 1.5.3-dev +version: 1.6.1-dev groups: - java - queries diff --git a/java/ql/test/library-tests/guards/Guards.java b/java/ql/test/library-tests/guards/Guards.java new file mode 100644 index 00000000000..b75e549d166 --- /dev/null +++ b/java/ql/test/library-tests/guards/Guards.java @@ -0,0 +1,146 @@ +public class Guards { + static void chk() { } + + static boolean g(Object lbl) { return lbl.hashCode() > 10; } + + static void checkTrue(boolean b, String msg) { + if (!b) throw new Error(msg); + } + + static void checkFalse(boolean b, String msg) { + checkTrue(!b, msg); + } + + void t1(int[] a, String s) { + if (g("A")) { + chk(); // $ guarded=g(A):true + } else { + chk(); // $ guarded=g(A):false + } + + boolean b = g(1) ? g(2) : true; + if (b != false) { + chk(); // $ guarded=...?...:...:true guarded='b != false:true' guarded=b:true + } else { + chk(); // $ guarded=...?...:...:false guarded='b != false:false' guarded=b:false guarded=g(1):true guarded=g(2):false + } + int sz = a != null ? a.length : 0; + for (int i = 0; i < sz; i++) { + chk(); // $ guarded='a != null:true' guarded='i < sz:true' guarded='sz:not 0' guarded='...?...:...:not 0' guarded='a.length:not 0' guarded='a:not null' + int e = a[i]; + if (e > 2) break; + } + chk(); // nothing guards here + + if (g(3)) + s = "bar"; + switch (s) { + case "bar": + chk(); // $ guarded='s:match "bar"' guarded='s:bar' + break; + case "foo": + chk(); // $ guarded='s:match "foo"' guarded='s:foo' guarded=g(3):false + break; + default: + chk(); // $ guarded='s:non-match "bar"' guarded='s:non-match "foo"' guarded='s:not bar' guarded='s:not foo' guarded='s:match default' guarded=g(3):false + break; + } + + Object o = g(4) ? null : s; + if (o instanceof String) { + chk(); // $ guarded=...instanceof...:true guarded='o:not null' guarded='...?...:...:not null' guarded=g(4):false guarded='s:not null' + } + } + + void t2() { + checkTrue(g(1), "A"); + checkFalse(g(2), "B"); + chk(); // $ guarded='checkTrue(...):no exception' guarded=g(1):true guarded='checkFalse(...):no exception' guarded=g(2):false + } + + void t3() { + boolean b = g(1) && (g(2) || g(3)); + if (b) { + chk(); // $ guarded=b:true guarded='g(...) && ... \|\| ...:true' guarded=g(1):true guarded='g(...) \|\| g(...):true' + } else { + chk(); // $ guarded=b:false guarded='g(...) && ... \|\| ...:false' + } + b = g(4) || !g(5); + if (b) { + chk(); // $ guarded=b:true guarded='g(...) \|\| !...:true' + } else { + chk(); // $ guarded=b:false guarded='g(...) \|\| !...:false' guarded=g(4):false guarded=!...:false guarded=g(5):true + } + } + + enum Val { + E1, + E2, + E3 + } + + void t4() { + Val x = null; // unique value + if (g(1)) x = Val.E1; // unique value + if (g(2)) x = Val.E2; + if (g("Alt2")) x = Val.E2; + if (g(3)) x = Val.E3; // unique value + if (x == null) + chk(); // $ guarded='x == null:true' guarded='x:null' guarded=g(1):false guarded=g(2):false guarded=g(Alt2):false guarded=g(3):false + switch (x) { + case E1: + chk(); // $ guarded='x:match E1' guarded='x:E1' guarded=g(1):true guarded=g(2):false guarded=g(Alt2):false guarded=g(3):false + break; + case E2: + chk(); // $ guarded='x:match E2' guarded='x:E2' guarded=g(3):false + break; + case E3: + chk(); // $ guarded='x:match E3' guarded='x:E3' guarded=g(3):true + break; + } + Object o = g(4) ? new Object() : null; + if (o == null) { + chk(); // $ guarded='o == null:true' guarded='o:null' guarded='...?...:...:null' guarded=g(4):false + } else { + chk(); // $ guarded='o == null:false' guarded='o:not null' guarded='...?...:...:not null' guarded=g(4):true + } + } + + void t5(String foo) { + String base = foo; + if (base == null) { + base = "/user"; + } + if (base.equals("/")) + chk(); // $ guarded=equals(/):true guarded='base:/' guarded='base:not null' guarded='base == null:false' guarded='foo:/' guarded='foo:not null' + } + + void t6() { + Object o = null; + if (g(1)) { + o = new Object(); + if (g(2)) { } + } + if (o != null) { + chk(); // $ guarded='o != null:true' guarded='o:not null' guarded=g(1):true + } else { + chk(); // $ guarded='o != null:false' guarded='o:null' guarded=g(1):false + } + } + + void t7(int[] a) { + boolean found = false; + for (int i = 0; i < a.length; i++) { + boolean answer = a[i] == 42; + if (answer) { + found = true; + } + if (found) { + chk(); // $ guarded=found:true guarded='i < a.length:true' + } + } + if (found) { + chk(); // $ guarded=found:true guarded='i < a.length:false' + } + } +} diff --git a/java/ql/test/library-tests/guards/GuardsInline.expected b/java/ql/test/library-tests/guards/GuardsInline.expected new file mode 100644 index 00000000000..c45d536b7e9 --- /dev/null +++ b/java/ql/test/library-tests/guards/GuardsInline.expected @@ -0,0 +1,91 @@ +| Guards.java:16:7:16:11 | chk(...) | g(A):true | +| Guards.java:18:7:18:11 | chk(...) | g(A):false | +| Guards.java:23:7:23:11 | chk(...) | 'b != false:true' | +| Guards.java:23:7:23:11 | chk(...) | ...?...:...:true | +| Guards.java:23:7:23:11 | chk(...) | b:true | +| Guards.java:25:7:25:11 | chk(...) | 'b != false:false' | +| Guards.java:25:7:25:11 | chk(...) | ...?...:...:false | +| Guards.java:25:7:25:11 | chk(...) | b:false | +| Guards.java:25:7:25:11 | chk(...) | g(1):true | +| Guards.java:25:7:25:11 | chk(...) | g(2):false | +| Guards.java:29:7:29:11 | chk(...) | '...?...:...:not 0' | +| Guards.java:29:7:29:11 | chk(...) | 'a != null:true' | +| Guards.java:29:7:29:11 | chk(...) | 'a.length:not 0' | +| Guards.java:29:7:29:11 | chk(...) | 'a:not null' | +| Guards.java:29:7:29:11 | chk(...) | 'i < sz:true' | +| Guards.java:29:7:29:11 | chk(...) | 'sz:not 0' | +| Guards.java:39:9:39:13 | chk(...) | 's:bar' | +| Guards.java:39:9:39:13 | chk(...) | 's:match "bar"' | +| Guards.java:42:9:42:13 | chk(...) | 's:foo' | +| Guards.java:42:9:42:13 | chk(...) | 's:match "foo"' | +| Guards.java:42:9:42:13 | chk(...) | g(3):false | +| Guards.java:45:9:45:13 | chk(...) | 's:match default' | +| Guards.java:45:9:45:13 | chk(...) | 's:non-match "bar"' | +| Guards.java:45:9:45:13 | chk(...) | 's:non-match "foo"' | +| Guards.java:45:9:45:13 | chk(...) | 's:not bar' | +| Guards.java:45:9:45:13 | chk(...) | 's:not foo' | +| Guards.java:45:9:45:13 | chk(...) | g(3):false | +| Guards.java:51:7:51:11 | chk(...) | '...?...:...:not null' | +| Guards.java:51:7:51:11 | chk(...) | 'o:not null' | +| Guards.java:51:7:51:11 | chk(...) | 's:not null' | +| Guards.java:51:7:51:11 | chk(...) | ...instanceof...:true | +| Guards.java:51:7:51:11 | chk(...) | g(4):false | +| Guards.java:58:5:58:9 | chk(...) | 'checkFalse(...):no exception' | +| Guards.java:58:5:58:9 | chk(...) | 'checkTrue(...):no exception' | +| Guards.java:58:5:58:9 | chk(...) | g(1):true | +| Guards.java:58:5:58:9 | chk(...) | g(2):false | +| Guards.java:64:7:64:11 | chk(...) | 'g(...) && ... \|\| ...:true' | +| Guards.java:64:7:64:11 | chk(...) | 'g(...) \|\| g(...):true' | +| Guards.java:64:7:64:11 | chk(...) | b:true | +| Guards.java:64:7:64:11 | chk(...) | g(1):true | +| Guards.java:66:7:66:11 | chk(...) | 'g(...) && ... \|\| ...:false' | +| Guards.java:66:7:66:11 | chk(...) | b:false | +| Guards.java:70:7:70:11 | chk(...) | 'g(...) \|\| !...:true' | +| Guards.java:70:7:70:11 | chk(...) | b:true | +| Guards.java:72:7:72:11 | chk(...) | !...:false | +| Guards.java:72:7:72:11 | chk(...) | 'g(...) \|\| !...:false' | +| Guards.java:72:7:72:11 | chk(...) | b:false | +| Guards.java:72:7:72:11 | chk(...) | g(4):false | +| Guards.java:72:7:72:11 | chk(...) | g(5):true | +| Guards.java:89:7:89:11 | chk(...) | 'x == null:true' | +| Guards.java:89:7:89:11 | chk(...) | 'x:null' | +| Guards.java:89:7:89:11 | chk(...) | g(1):false | +| Guards.java:89:7:89:11 | chk(...) | g(2):false | +| Guards.java:89:7:89:11 | chk(...) | g(3):false | +| Guards.java:89:7:89:11 | chk(...) | g(Alt2):false | +| Guards.java:92:9:92:13 | chk(...) | 'x:E1' | +| Guards.java:92:9:92:13 | chk(...) | 'x:match E1' | +| Guards.java:92:9:92:13 | chk(...) | g(1):true | +| Guards.java:92:9:92:13 | chk(...) | g(2):false | +| Guards.java:92:9:92:13 | chk(...) | g(3):false | +| Guards.java:92:9:92:13 | chk(...) | g(Alt2):false | +| Guards.java:95:9:95:13 | chk(...) | 'x:E2' | +| Guards.java:95:9:95:13 | chk(...) | 'x:match E2' | +| Guards.java:95:9:95:13 | chk(...) | g(3):false | +| Guards.java:98:9:98:13 | chk(...) | 'x:E3' | +| Guards.java:98:9:98:13 | chk(...) | 'x:match E3' | +| Guards.java:98:9:98:13 | chk(...) | g(3):true | +| Guards.java:103:7:103:11 | chk(...) | '...?...:...:null' | +| Guards.java:103:7:103:11 | chk(...) | 'o == null:true' | +| Guards.java:103:7:103:11 | chk(...) | 'o:null' | +| Guards.java:103:7:103:11 | chk(...) | g(4):false | +| Guards.java:105:7:105:11 | chk(...) | '...?...:...:not null' | +| Guards.java:105:7:105:11 | chk(...) | 'o == null:false' | +| Guards.java:105:7:105:11 | chk(...) | 'o:not null' | +| Guards.java:105:7:105:11 | chk(...) | g(4):true | +| Guards.java:115:7:115:11 | chk(...) | 'base == null:false' | +| Guards.java:115:7:115:11 | chk(...) | 'base:/' | +| Guards.java:115:7:115:11 | chk(...) | 'base:not null' | +| Guards.java:115:7:115:11 | chk(...) | 'foo:/' | +| Guards.java:115:7:115:11 | chk(...) | 'foo:not null' | +| Guards.java:115:7:115:11 | chk(...) | equals(/):true | +| Guards.java:125:7:125:11 | chk(...) | 'o != null:true' | +| Guards.java:125:7:125:11 | chk(...) | 'o:not null' | +| Guards.java:125:7:125:11 | chk(...) | g(1):true | +| Guards.java:127:7:127:11 | chk(...) | 'o != null:false' | +| Guards.java:127:7:127:11 | chk(...) | 'o:null' | +| Guards.java:127:7:127:11 | chk(...) | g(1):false | +| Guards.java:139:9:139:13 | chk(...) | 'i < a.length:true' | +| Guards.java:139:9:139:13 | chk(...) | found:true | +| Guards.java:143:7:143:11 | chk(...) | 'i < a.length:false' | +| Guards.java:143:7:143:11 | chk(...) | found:true | diff --git a/java/ql/test/library-tests/guards/GuardsInline.ql b/java/ql/test/library-tests/guards/GuardsInline.ql new file mode 100644 index 00000000000..1b854659d87 --- /dev/null +++ b/java/ql/test/library-tests/guards/GuardsInline.ql @@ -0,0 +1,51 @@ +import java +import semmle.code.java.controlflow.Guards +import codeql.util.Boolean + +string ppGuard(Guard g, Boolean branch) { + exists(MethodCall mc, Literal s | + mc = g and + mc.getAnArgument() = s and + result = mc.getMethod().getName() + "(" + s.getValue() + ")" + ":" + branch + ) + or + exists(BinaryExpr bin | + bin = g and + result = "'" + bin.getLeftOperand() + bin.getOp() + bin.getRightOperand() + ":" + branch + "'" + ) + or + exists(SwitchCase cc, Expr s, string match, string value | + cc = g and + cc.getSelectorExpr() = s and + ( + cc.(ConstCase).getValue().toString() = value + or + cc instanceof DefaultCase and value = "default" + ) and + if branch = true then match = ":match " else match = ":non-match " + | + result = "'" + s.toString() + match + value + "'" + ) +} + +query predicate guarded(MethodCall mc, string guard) { + mc.getMethod().hasName("chk") and + exists(Guard g, BasicBlock bb, boolean branch | + g.controls(bb, branch) and + mc.getBasicBlock() = bb + | + guard = ppGuard(g, branch) + or + not exists(ppGuard(g, branch)) and + guard = g.toString() + ":" + branch + ) + or + mc.getMethod().hasName("chk") and + exists(Guard g, BasicBlock bb, GuardValue val | + g.valueControls(bb, val) and + not exists(val.asBooleanValue()) and + mc.getBasicBlock() = bb + | + guard = "'" + g.toString() + ":" + val + "'" + ) +} diff --git a/java/ql/test/library-tests/guards/GuardsInline.qlref b/java/ql/test/library-tests/guards/GuardsInline.qlref new file mode 100644 index 00000000000..a9492ac8f23 --- /dev/null +++ b/java/ql/test/library-tests/guards/GuardsInline.qlref @@ -0,0 +1,2 @@ +query: GuardsInline.ql +postprocess: utils/test/InlineExpectationsTestQuery.ql diff --git a/java/ql/test/library-tests/guards/guardslogic.expected b/java/ql/test/library-tests/guards/guardslogic.expected index 6536ad3b69f..29c11ccd153 100644 --- a/java/ql/test/library-tests/guards/guardslogic.expected +++ b/java/ql/test/library-tests/guards/guardslogic.expected @@ -30,33 +30,33 @@ | Logic.java:29:16:29:19 | g(...) | false | Logic.java:30:30:31:5 | { ... } | | Logic.java:29:16:29:19 | g(...) | true | Logic.java:29:23:29:26 | null | | Logic.java:30:9:30:27 | ...instanceof... | true | Logic.java:30:30:31:5 | { ... } | -| Logic.java:35:5:35:29 | checkTrue(...) | true | Logic.java:36:5:36:28 | ; | -| Logic.java:35:5:35:29 | checkTrue(...) | true | Logic.java:37:5:37:15 | if (...) | -| Logic.java:35:5:35:29 | checkTrue(...) | true | Logic.java:37:17:39:5 | { ... } | -| Logic.java:35:5:35:29 | checkTrue(...) | true | Logic.java:40:5:40:18 | var ...; | +| Logic.java:35:5:35:29 | checkTrue(...) | no exception | Logic.java:36:5:36:28 | ; | +| Logic.java:35:5:35:29 | checkTrue(...) | no exception | Logic.java:37:5:37:15 | if (...) | +| Logic.java:35:5:35:29 | checkTrue(...) | no exception | Logic.java:37:17:39:5 | { ... } | +| Logic.java:35:5:35:29 | checkTrue(...) | no exception | Logic.java:40:5:40:18 | var ...; | | Logic.java:35:15:35:19 | ... > ... | true | Logic.java:36:5:36:28 | ; | | Logic.java:35:15:35:19 | ... > ... | true | Logic.java:37:5:37:15 | if (...) | | Logic.java:35:15:35:19 | ... > ... | true | Logic.java:37:17:39:5 | { ... } | | Logic.java:35:15:35:19 | ... > ... | true | Logic.java:40:5:40:18 | var ...; | -| Logic.java:36:5:36:27 | checkFalse(...) | false | Logic.java:37:5:37:15 | if (...) | -| Logic.java:36:5:36:27 | checkFalse(...) | false | Logic.java:37:17:39:5 | { ... } | -| Logic.java:36:5:36:27 | checkFalse(...) | false | Logic.java:40:5:40:18 | var ...; | +| Logic.java:36:5:36:27 | checkFalse(...) | no exception | Logic.java:37:5:37:15 | if (...) | +| Logic.java:36:5:36:27 | checkFalse(...) | no exception | Logic.java:37:17:39:5 | { ... } | +| Logic.java:36:5:36:27 | checkFalse(...) | no exception | Logic.java:40:5:40:18 | var ...; | | Logic.java:36:16:36:21 | g(...) | false | Logic.java:37:5:37:15 | if (...) | | Logic.java:36:16:36:21 | g(...) | false | Logic.java:37:17:39:5 | { ... } | | Logic.java:36:16:36:21 | g(...) | false | Logic.java:40:5:40:18 | var ...; | | Logic.java:37:9:37:14 | ... > ... | true | Logic.java:37:17:39:5 | { ... } | | Logic.java:44:10:44:10 | b | false | Logic.java:44:33:44:35 | msg | -| Logic.java:52:5:52:29 | checkTrue(...) | true | Logic.java:53:5:53:28 | ; | -| Logic.java:52:5:52:29 | checkTrue(...) | true | Logic.java:54:5:54:15 | if (...) | -| Logic.java:52:5:52:29 | checkTrue(...) | true | Logic.java:54:17:56:5 | { ... } | -| Logic.java:52:5:52:29 | checkTrue(...) | true | Logic.java:57:5:57:18 | var ...; | +| Logic.java:52:5:52:29 | checkTrue(...) | no exception | Logic.java:53:5:53:28 | ; | +| Logic.java:52:5:52:29 | checkTrue(...) | no exception | Logic.java:54:5:54:15 | if (...) | +| Logic.java:52:5:52:29 | checkTrue(...) | no exception | Logic.java:54:17:56:5 | { ... } | +| Logic.java:52:5:52:29 | checkTrue(...) | no exception | Logic.java:57:5:57:18 | var ...; | | Logic.java:52:24:52:28 | ... > ... | true | Logic.java:53:5:53:28 | ; | | Logic.java:52:24:52:28 | ... > ... | true | Logic.java:54:5:54:15 | if (...) | | Logic.java:52:24:52:28 | ... > ... | true | Logic.java:54:17:56:5 | { ... } | | Logic.java:52:24:52:28 | ... > ... | true | Logic.java:57:5:57:18 | var ...; | -| Logic.java:53:5:53:27 | checkFalse(...) | false | Logic.java:54:5:54:15 | if (...) | -| Logic.java:53:5:53:27 | checkFalse(...) | false | Logic.java:54:17:56:5 | { ... } | -| Logic.java:53:5:53:27 | checkFalse(...) | false | Logic.java:57:5:57:18 | var ...; | +| Logic.java:53:5:53:27 | checkFalse(...) | no exception | Logic.java:54:5:54:15 | if (...) | +| Logic.java:53:5:53:27 | checkFalse(...) | no exception | Logic.java:54:17:56:5 | { ... } | +| Logic.java:53:5:53:27 | checkFalse(...) | no exception | Logic.java:57:5:57:18 | var ...; | | Logic.java:53:21:53:26 | g(...) | false | Logic.java:54:5:54:15 | if (...) | | Logic.java:53:21:53:26 | g(...) | false | Logic.java:54:17:56:5 | { ... } | | Logic.java:53:21:53:26 | g(...) | false | Logic.java:57:5:57:18 | var ...; | diff --git a/java/ql/test/library-tests/guards/guardslogic.ql b/java/ql/test/library-tests/guards/guardslogic.ql index afbb313d664..f2ce9fdaa36 100644 --- a/java/ql/test/library-tests/guards/guardslogic.ql +++ b/java/ql/test/library-tests/guards/guardslogic.ql @@ -1,8 +1,9 @@ import java import semmle.code.java.controlflow.Guards -from Guard g, BasicBlock bb, boolean branch +from Guard g, BasicBlock bb, GuardValue gv where - g.controls(bb, branch) and - g.getEnclosingCallable().getDeclaringType().hasName("Logic") -select g, branch, bb + g.valueControls(bb, gv) and + g.getEnclosingCallable().getDeclaringType().hasName("Logic") and + (exists(gv.asBooleanValue()) or gv.isThrowsException() or gv.getDualValue().isThrowsException()) +select g, gv, bb diff --git a/java/ql/test/library-tests/guards/guardspreconditions.expected b/java/ql/test/library-tests/guards/guardspreconditions.expected index 9c0136c8e6e..41080a5dab6 100644 --- a/java/ql/test/library-tests/guards/guardspreconditions.expected +++ b/java/ql/test/library-tests/guards/guardspreconditions.expected @@ -1,20 +1,20 @@ -| Preconditions.java:8:9:8:31 | assertTrue(...) | true | Preconditions.java:9:9:9:18 | ; | -| Preconditions.java:13:9:13:32 | assertTrue(...) | true | Preconditions.java:14:9:14:18 | ; | -| Preconditions.java:18:9:18:33 | assertFalse(...) | false | Preconditions.java:19:9:19:18 | ; | -| Preconditions.java:23:9:23:32 | assertFalse(...) | false | Preconditions.java:24:9:24:18 | ; | -| Preconditions.java:28:9:28:41 | assertTrue(...) | true | Preconditions.java:29:9:29:18 | ; | -| Preconditions.java:33:9:33:42 | assertTrue(...) | true | Preconditions.java:34:9:34:18 | ; | -| Preconditions.java:38:9:38:43 | assertFalse(...) | false | Preconditions.java:39:9:39:18 | ; | -| Preconditions.java:43:9:43:42 | assertFalse(...) | false | Preconditions.java:44:9:44:18 | ; | -| Preconditions.java:48:9:48:35 | assertTrue(...) | true | Preconditions.java:49:9:49:18 | ; | -| Preconditions.java:53:9:53:36 | assertTrue(...) | true | Preconditions.java:54:9:54:18 | ; | -| Preconditions.java:58:9:58:37 | assertFalse(...) | false | Preconditions.java:59:9:59:18 | ; | -| Preconditions.java:63:9:63:36 | assertFalse(...) | false | Preconditions.java:64:9:64:18 | ; | -| Preconditions.java:68:9:68:45 | assertTrue(...) | true | Preconditions.java:69:9:69:18 | ; | -| Preconditions.java:73:9:73:46 | assertTrue(...) | true | Preconditions.java:74:9:74:18 | ; | -| Preconditions.java:78:9:78:47 | assertFalse(...) | false | Preconditions.java:79:9:79:18 | ; | -| Preconditions.java:83:9:83:46 | assertFalse(...) | false | Preconditions.java:84:9:84:18 | ; | -| Preconditions.java:88:9:88:15 | t(...) | true | Preconditions.java:89:9:89:18 | ; | -| Preconditions.java:93:9:93:16 | t(...) | true | Preconditions.java:94:9:94:18 | ; | -| Preconditions.java:98:9:98:16 | f(...) | false | Preconditions.java:99:9:99:18 | ; | -| Preconditions.java:103:9:103:15 | f(...) | false | Preconditions.java:104:9:104:18 | ; | +| Preconditions.java:8:9:8:31 | assertTrue(...) | no exception | Preconditions.java:9:9:9:18 | ; | +| Preconditions.java:13:9:13:32 | assertTrue(...) | no exception | Preconditions.java:14:9:14:18 | ; | +| Preconditions.java:18:9:18:33 | assertFalse(...) | no exception | Preconditions.java:19:9:19:18 | ; | +| Preconditions.java:23:9:23:32 | assertFalse(...) | no exception | Preconditions.java:24:9:24:18 | ; | +| Preconditions.java:28:9:28:41 | assertTrue(...) | no exception | Preconditions.java:29:9:29:18 | ; | +| Preconditions.java:33:9:33:42 | assertTrue(...) | no exception | Preconditions.java:34:9:34:18 | ; | +| Preconditions.java:38:9:38:43 | assertFalse(...) | no exception | Preconditions.java:39:9:39:18 | ; | +| Preconditions.java:43:9:43:42 | assertFalse(...) | no exception | Preconditions.java:44:9:44:18 | ; | +| Preconditions.java:48:9:48:35 | assertTrue(...) | no exception | Preconditions.java:49:9:49:18 | ; | +| Preconditions.java:53:9:53:36 | assertTrue(...) | no exception | Preconditions.java:54:9:54:18 | ; | +| Preconditions.java:58:9:58:37 | assertFalse(...) | no exception | Preconditions.java:59:9:59:18 | ; | +| Preconditions.java:63:9:63:36 | assertFalse(...) | no exception | Preconditions.java:64:9:64:18 | ; | +| Preconditions.java:68:9:68:45 | assertTrue(...) | no exception | Preconditions.java:69:9:69:18 | ; | +| Preconditions.java:73:9:73:46 | assertTrue(...) | no exception | Preconditions.java:74:9:74:18 | ; | +| Preconditions.java:78:9:78:47 | assertFalse(...) | no exception | Preconditions.java:79:9:79:18 | ; | +| Preconditions.java:83:9:83:46 | assertFalse(...) | no exception | Preconditions.java:84:9:84:18 | ; | +| Preconditions.java:88:9:88:15 | t(...) | no exception | Preconditions.java:89:9:89:18 | ; | +| Preconditions.java:93:9:93:16 | t(...) | no exception | Preconditions.java:94:9:94:18 | ; | +| Preconditions.java:98:9:98:16 | f(...) | no exception | Preconditions.java:99:9:99:18 | ; | +| Preconditions.java:103:9:103:15 | f(...) | no exception | Preconditions.java:104:9:104:18 | ; | diff --git a/java/ql/test/library-tests/guards/guardspreconditions.ql b/java/ql/test/library-tests/guards/guardspreconditions.ql index 12c823e9638..77e4a4e48c0 100644 --- a/java/ql/test/library-tests/guards/guardspreconditions.ql +++ b/java/ql/test/library-tests/guards/guardspreconditions.ql @@ -1,8 +1,9 @@ import java import semmle.code.java.controlflow.Guards -from Guard g, BasicBlock bb, boolean branch +from Guard g, BasicBlock bb, GuardValue gv where - g.controls(bb, branch) and - g.getEnclosingCallable().getDeclaringType().hasName("Preconditions") -select g, branch, bb + g.valueControls(bb, gv) and + g.getEnclosingCallable().getDeclaringType().hasName("Preconditions") and + (gv.isThrowsException() or gv.getDualValue().isThrowsException()) +select g, gv, bb diff --git a/java/ql/test/library-tests/guards12/guard.expected b/java/ql/test/library-tests/guards12/guard.expected index 0980e891d84..fade9fd4e8f 100644 --- a/java/ql/test/library-tests/guards12/guard.expected +++ b/java/ql/test/library-tests/guards12/guard.expected @@ -51,13 +51,5 @@ hasBranchEdge | Test.java:12:7:12:17 | case ... | Test.java:9:13:9:13 | s | Test.java:12:12:12:14 | "d" | true | false | Test.java:13:7:13:16 | default | | Test.java:12:7:12:17 | case ... | Test.java:9:13:9:13 | s | Test.java:12:12:12:14 | "d" | true | true | Test.java:12:7:12:17 | case ... | | Test.java:17:26:17:33 | ... == ... | Test.java:17:26:17:28 | len | Test.java:17:33:17:33 | 4 | true | true | Test.java:17:38:17:40 | { ... } | -| Test.java:18:7:18:17 | case ... | Test.java:16:13:16:13 | s | Test.java:18:12:18:14 | "e" | true | false | Test.java:19:7:19:16 | default | -| Test.java:18:7:18:17 | case ... | Test.java:16:13:16:13 | s | Test.java:18:12:18:14 | "e" | true | true | Test.java:18:7:18:17 | case ... | -| Test.java:22:7:22:17 | case ... | Test.java:21:13:21:41 | ...?...:... | Test.java:22:12:22:14 | "f" | true | false | Test.java:25:7:25:16 | default | -| Test.java:22:7:22:17 | case ... | Test.java:21:13:21:41 | ...?...:... | Test.java:22:12:22:14 | "f" | true | true | Test.java:22:7:22:17 | case ... | | Test.java:23:27:23:34 | ... == ... | Test.java:23:27:23:29 | len | Test.java:23:34:23:34 | 4 | true | true | Test.java:23:39:23:41 | { ... } | -| Test.java:24:7:24:17 | case ... | Test.java:21:13:21:41 | ...?...:... | Test.java:24:12:24:14 | "g" | true | false | Test.java:25:7:25:16 | default | -| Test.java:24:7:24:17 | case ... | Test.java:21:13:21:41 | ...?...:... | Test.java:24:12:24:14 | "g" | true | true | Test.java:24:7:24:17 | case ... | -| Test.java:28:7:28:15 | case ... | Test.java:27:13:27:13 | s | Test.java:28:12:28:14 | "h" | true | false | Test.java:33:7:33:14 | default | | Test.java:28:7:28:15 | case ... | Test.java:27:13:27:13 | s | Test.java:28:12:28:14 | "h" | true | true | Test.java:28:7:28:15 | case ... | -| Test.java:30:7:30:15 | case ... | Test.java:27:13:27:13 | s | Test.java:30:12:30:14 | "i" | true | false | Test.java:33:7:33:14 | default | diff --git a/java/ql/test/library-tests/guards12/guard.ql b/java/ql/test/library-tests/guards12/guard.ql index cff2845ad9f..d53dfdbc713 100644 --- a/java/ql/test/library-tests/guards12/guard.ql +++ b/java/ql/test/library-tests/guards12/guard.ql @@ -1,8 +1,8 @@ import java import semmle.code.java.controlflow.Guards -query predicate hasBranchEdge(Guard g, BasicBlock bb1, BasicBlock bb2, boolean branch) { - g.hasBranchEdge(bb1, bb2, branch) +query predicate hasBranchEdge(Guard g, BasicBlock bb1, BasicBlock bb2, GuardValue branch) { + g.hasValueBranchEdge(bb1, bb2, branch) } from Guard g, BasicBlock bb, boolean branch, Expr e1, Expr e2, boolean pol diff --git a/java/ql/test/query-tests/Nullness/C.java b/java/ql/test/query-tests/Nullness/C.java index ac6a5f291da..d195eea6acb 100644 --- a/java/ql/test/query-tests/Nullness/C.java +++ b/java/ql/test/query-tests/Nullness/C.java @@ -60,7 +60,7 @@ public class C { arrLen = arr == null ? 0 : arr.length; } if (arrLen > 0) { - arr[0] = 0; // NPE - false positive + arr[0] = 0; // OK } } @@ -244,4 +244,14 @@ public class C { } xs[0]++; // OK } + + public void ex18(boolean b, int[] xs, Object related) { + assert (!b && xs == null && related == null) || + (b && xs != null && related != null) || + (b && xs == null && related == null); + if (b) { + if (related == null) { return; } + xs[0] = 42; // OK + } + } } diff --git a/java/ql/test/query-tests/Nullness/NullMaybe.expected b/java/ql/test/query-tests/Nullness/NullMaybe.expected index 80cf8f00f8d..a19fae57e74 100644 --- a/java/ql/test/query-tests/Nullness/NullMaybe.expected +++ b/java/ql/test/query-tests/Nullness/NullMaybe.expected @@ -24,7 +24,6 @@ | C.java:10:17:10:18 | a3 | Variable $@ may be null at this access because of $@ assignment. | C.java:8:5:8:21 | long[] a3 | a3 | C.java:8:12:8:20 | a3 | this | | C.java:21:7:21:8 | s1 | Variable $@ may be null at this access because of $@ assignment. | C.java:14:5:14:30 | String s1 | s1 | C.java:17:7:17:24 | ...=... | this | | C.java:51:7:51:11 | slice | Variable $@ may be null at this access because of $@ assignment. | C.java:43:5:43:30 | List slice | slice | C.java:43:18:43:29 | slice | this | -| C.java:63:7:63:9 | arr | Variable $@ may be null at this access as suggested by $@ null guard. | C.java:57:35:57:43 | arr | arr | C.java:60:16:60:26 | ... == ... | this | | C.java:100:7:100:10 | arr2 | Variable $@ may be null at this access because of $@ assignment. | C.java:95:5:95:22 | int[] arr2 | arr2 | C.java:95:11:95:21 | arr2 | this | | C.java:110:25:110:27 | obj | Variable $@ may be null at this access because of $@ assignment. | C.java:106:5:106:30 | Object obj | obj | C.java:118:13:118:22 | ...=... | this | | C.java:137:7:137:10 | obj2 | Variable $@ may be null at this access as suggested by $@ null guard. | C.java:131:5:131:23 | Object obj2 | obj2 | C.java:132:9:132:20 | ... != ... | this | diff --git a/java/ql/test/query-tests/RangeAnalysis/A.java b/java/ql/test/query-tests/RangeAnalysis/A.java index 4fd1b87bb70..b68de9beaa7 100644 --- a/java/ql/test/query-tests/RangeAnalysis/A.java +++ b/java/ql/test/query-tests/RangeAnalysis/A.java @@ -64,7 +64,7 @@ public class A { int sum = 0; for (int i = 0; i < a.length; ) { sum += a[i++]; // OK - sum += a[i++]; // OK - FP + sum += a[i++]; // OK } int len = b.length; if ((len & 1) != 0) diff --git a/java/ql/test/query-tests/RangeAnalysis/ArrayIndexOutOfBounds.expected b/java/ql/test/query-tests/RangeAnalysis/ArrayIndexOutOfBounds.expected index dc0b87d68b2..92099db01cb 100644 --- a/java/ql/test/query-tests/RangeAnalysis/ArrayIndexOutOfBounds.expected +++ b/java/ql/test/query-tests/RangeAnalysis/ArrayIndexOutOfBounds.expected @@ -3,7 +3,6 @@ | A.java:45:14:45:22 | ...[...] | This array access might be out of bounds, as the index might be equal to the array length. | | A.java:49:14:49:22 | ...[...] | This array access might be out of bounds, as the index might be equal to the array length. | | A.java:58:14:58:19 | ...[...] | This array access might be out of bounds, as the index might be equal to the array length. | -| A.java:67:14:67:19 | ...[...] | This array access might be out of bounds, as the index might be equal to the array length. | | A.java:89:12:89:16 | ...[...] | This array access might be out of bounds, as the index might be equal to the array length. | | A.java:100:18:100:31 | ...[...] | This array access might be out of bounds, as the index might be equal to the array length + 8. | | A.java:113:14:113:21 | ...[...] | This array access might be out of bounds, as the index might be equal to the array length. | diff --git a/java/ql/test/query-tests/ScheduledThreadPoolExecutorZeroThread/ScheduledThreadPoolExecutorZeroThread.expected b/java/ql/test/query-tests/ScheduledThreadPoolExecutorZeroThread/ScheduledThreadPoolExecutorZeroThread.expected new file mode 100644 index 00000000000..038f2d1d998 --- /dev/null +++ b/java/ql/test/query-tests/ScheduledThreadPoolExecutorZeroThread/ScheduledThreadPoolExecutorZeroThread.expected @@ -0,0 +1,3 @@ +| Test.java:7:42:7:75 | new ScheduledThreadPoolExecutor(...) | ScheduledThreadPoolExecutor.corePoolSize is set to have 0 threads. | +| Test.java:8:9:8:28 | setCorePoolSize(...) | ScheduledThreadPoolExecutor.corePoolSize is set to have 0 threads. | +| Test.java:9:9:9:28 | setCorePoolSize(...) | ScheduledThreadPoolExecutor.corePoolSize is set to have 0 threads. | diff --git a/java/ql/test/query-tests/ScheduledThreadPoolExecutorZeroThread/ScheduledThreadPoolExecutorZeroThread.qlref b/java/ql/test/query-tests/ScheduledThreadPoolExecutorZeroThread/ScheduledThreadPoolExecutorZeroThread.qlref new file mode 100644 index 00000000000..e0089e4cf02 --- /dev/null +++ b/java/ql/test/query-tests/ScheduledThreadPoolExecutorZeroThread/ScheduledThreadPoolExecutorZeroThread.qlref @@ -0,0 +1,2 @@ +query: Likely Bugs/Concurrency/ScheduledThreadPoolExecutorZeroThread.ql +postprocess: utils/test/InlineExpectationsTestQuery.ql diff --git a/java/ql/test/query-tests/ScheduledThreadPoolExecutorZeroThread/Test.java b/java/ql/test/query-tests/ScheduledThreadPoolExecutorZeroThread/Test.java new file mode 100644 index 00000000000..d02e6a3403e --- /dev/null +++ b/java/ql/test/query-tests/ScheduledThreadPoolExecutorZeroThread/Test.java @@ -0,0 +1,11 @@ +import java.util.concurrent.ScheduledThreadPoolExecutor; + +public class Test { + void f() { + int i = 0; + ScheduledThreadPoolExecutor s = new ScheduledThreadPoolExecutor(1); // Compliant + ScheduledThreadPoolExecutor s1 = new ScheduledThreadPoolExecutor(0); // $ Alert + s.setCorePoolSize(0); // $ Alert + s.setCorePoolSize(i); // $ Alert + } +} diff --git a/java/ql/test/query-tests/security/CWE-022/semmle/tests/TaintedPath.expected b/java/ql/test/query-tests/security/CWE-022/semmle/tests/TaintedPath.expected index e69de29bb2d..aee29733bca 100644 --- a/java/ql/test/query-tests/security/CWE-022/semmle/tests/TaintedPath.expected +++ b/java/ql/test/query-tests/security/CWE-022/semmle/tests/TaintedPath.expected @@ -0,0 +1,474 @@ +#select +| TaintedPath.java:16:71:16:78 | filename | TaintedPath.java:13:58:13:78 | getInputStream(...) : InputStream | TaintedPath.java:16:71:16:78 | filename | This path depends on a $@. | TaintedPath.java:13:58:13:78 | getInputStream(...) | user-provided value | +| Test.java:37:52:37:68 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:37:52:37:68 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:39:32:39:48 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:39:32:39:48 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:41:47:41:63 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:41:47:41:63 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:43:10:43:24 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:43:10:43:24 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:45:10:45:24 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:45:10:45:24 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:47:10:47:24 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:47:10:47:24 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:49:10:49:24 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:49:10:49:24 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:51:39:51:53 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:51:39:51:53 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:53:10:53:24 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:53:10:53:24 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:55:10:55:24 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:55:10:55:24 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:57:10:57:24 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:57:10:57:24 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:59:10:59:24 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:59:10:59:24 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:61:10:61:24 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:61:10:61:24 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:63:10:63:24 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:63:10:63:24 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:65:10:65:24 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:65:10:65:24 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:67:10:67:24 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:67:10:67:24 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:69:31:69:45 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:69:31:69:45 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:71:10:71:24 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:71:10:71:24 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:73:10:73:24 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:73:10:73:24 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:75:10:75:24 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:75:10:75:24 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:77:10:77:24 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:77:10:77:24 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:79:10:79:24 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:79:10:79:24 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:81:10:81:24 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:81:10:81:24 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:83:31:83:45 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:83:31:83:45 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:85:29:85:43 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:85:29:85:43 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:87:29:87:53 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:87:29:87:53 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:89:29:89:45 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:89:29:89:45 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:91:24:91:38 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:91:24:91:38 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:93:24:93:48 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:93:24:93:48 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:95:24:95:38 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:95:24:95:38 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:97:24:97:40 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:97:24:97:40 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:99:24:99:40 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:99:24:99:40 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:101:20:101:34 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:101:20:101:34 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:102:20:102:34 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:102:20:102:34 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:104:33:104:47 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:104:33:104:47 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:105:40:105:54 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:105:40:105:54 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:107:33:107:47 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:107:33:107:47 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:109:31:109:45 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:109:31:109:45 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:111:26:111:40 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:111:26:111:40 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:113:26:113:40 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:113:26:113:40 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:115:34:115:48 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:115:34:115:48 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:117:35:117:49 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:117:35:117:49 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:119:30:119:44 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:119:30:119:44 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:121:22:121:36 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:121:22:121:36 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:123:30:123:44 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:123:30:123:44 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:125:21:125:35 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:125:21:125:35 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:127:26:127:40 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:127:26:127:40 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:129:33:129:47 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:129:33:129:47 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:131:33:131:47 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:131:33:131:47 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:132:33:132:47 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:132:33:132:47 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:134:31:134:45 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:134:31:134:45 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:136:21:136:35 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:136:21:136:35 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:137:21:137:35 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:137:21:137:35 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:138:21:138:35 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:138:21:138:35 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:140:27:140:41 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:140:27:140:41 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:141:27:141:41 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:141:27:141:41 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:143:26:143:40 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:143:26:143:40 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:145:35:145:49 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:145:35:145:49 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:147:41:147:57 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:147:41:147:57 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:149:45:149:61 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:149:45:149:61 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:151:43:151:57 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:151:43:151:57 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:153:28:153:42 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:153:28:153:42 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:155:41:155:55 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:155:41:155:55 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:160:30:160:44 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:160:30:160:44 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:162:40:162:81 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:162:40:162:81 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:164:34:164:75 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:164:34:164:75 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:166:34:166:75 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:166:34:166:75 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:168:23:168:37 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:168:23:168:37 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:181:23:181:37 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:181:23:181:37 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:186:23:186:40 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:186:23:186:40 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:188:20:188:34 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:188:20:188:34 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:190:21:190:35 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:190:21:190:35 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:192:22:192:36 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:192:22:192:36 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:197:20:197:34 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:197:20:197:34 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:199:19:199:33 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:199:19:199:33 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +| Test.java:204:20:204:36 | (...)... | Test.java:32:16:32:45 | getParameter(...) : String | Test.java:204:20:204:36 | (...)... | This path depends on a $@. | Test.java:32:16:32:45 | getParameter(...) | user-provided value | +edges +| TaintedPath.java:13:17:13:89 | new BufferedReader(...) : BufferedReader | TaintedPath.java:14:27:14:40 | filenameReader : BufferedReader | provenance | | +| TaintedPath.java:13:36:13:88 | new InputStreamReader(...) : InputStreamReader | TaintedPath.java:13:17:13:89 | new BufferedReader(...) : BufferedReader | provenance | MaD:74 | +| TaintedPath.java:13:58:13:78 | getInputStream(...) : InputStream | TaintedPath.java:13:36:13:88 | new InputStreamReader(...) : InputStreamReader | provenance | Src:MaD:72 MaD:76 | +| TaintedPath.java:14:27:14:40 | filenameReader : BufferedReader | TaintedPath.java:14:27:14:51 | readLine(...) : String | provenance | MaD:75 | +| TaintedPath.java:14:27:14:51 | readLine(...) : String | TaintedPath.java:16:71:16:78 | filename | provenance | Sink:MaD:27 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:37:61:37:68 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:39:41:39:48 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:41:56:41:63 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:43:17:43:24 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:45:17:45:24 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:47:17:47:24 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:49:17:49:24 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:51:46:51:53 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:53:17:53:24 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:55:17:55:24 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:57:17:57:24 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:59:17:59:24 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:61:17:61:24 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:63:17:63:24 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:65:17:65:24 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:67:17:67:24 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:69:38:69:45 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:71:17:71:24 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:73:17:73:24 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:75:17:75:24 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:77:17:77:24 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:79:17:79:24 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:81:17:81:24 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:83:38:83:45 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:85:36:85:43 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:87:46:87:53 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:89:38:89:45 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:91:31:91:38 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:93:41:93:48 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:95:31:95:38 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:97:33:97:40 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:99:33:99:40 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:101:27:101:34 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:102:27:102:34 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:104:40:104:47 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:105:47:105:54 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:107:40:107:47 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:109:38:109:45 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:111:33:111:40 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:113:33:113:40 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:115:41:115:48 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:117:42:117:49 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:119:37:119:44 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:121:29:121:36 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:123:37:123:44 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:125:28:125:35 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:127:33:127:40 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:129:40:129:47 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:131:40:131:47 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:132:40:132:47 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:134:38:134:45 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:136:28:136:35 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:137:28:137:35 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:138:28:138:35 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:140:34:140:41 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:141:34:141:41 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:143:33:143:40 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:145:42:145:49 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:147:50:147:57 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:149:54:149:61 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:151:50:151:57 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:153:35:153:42 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:155:48:155:55 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:160:37:160:44 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:162:74:162:81 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:164:68:164:75 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:166:68:166:75 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:168:30:168:37 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:181:30:181:37 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:186:33:186:40 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:188:27:188:34 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:190:28:190:35 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:192:29:192:36 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:197:27:197:34 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:199:26:199:33 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:32:16:32:45 | getParameter(...) : String | Test.java:204:29:204:36 | source(...) : String | provenance | Src:MaD:73 | +| Test.java:37:61:37:68 | source(...) : String | Test.java:37:52:37:68 | (...)... | provenance | Sink:MaD:31 | +| Test.java:39:41:39:48 | source(...) : String | Test.java:39:32:39:48 | (...)... | provenance | Sink:MaD:29 | +| Test.java:41:56:41:63 | source(...) : String | Test.java:41:47:41:63 | (...)... | provenance | Sink:MaD:30 | +| Test.java:43:17:43:24 | source(...) : String | Test.java:43:10:43:24 | (...)... | provenance | Sink:MaD:1 | +| Test.java:45:17:45:24 | source(...) : String | Test.java:45:10:45:24 | (...)... | provenance | Sink:MaD:2 | +| Test.java:47:17:47:24 | source(...) : String | Test.java:47:10:47:24 | (...)... | provenance | Sink:MaD:3 | +| Test.java:49:17:49:24 | source(...) : String | Test.java:49:10:49:24 | (...)... | provenance | Sink:MaD:4 | +| Test.java:51:46:51:53 | source(...) : String | Test.java:51:39:51:53 | (...)... | provenance | Sink:MaD:5 | +| Test.java:53:17:53:24 | source(...) : String | Test.java:53:10:53:24 | (...)... | provenance | Sink:MaD:6 | +| Test.java:55:17:55:24 | source(...) : String | Test.java:55:10:55:24 | (...)... | provenance | Sink:MaD:7 | +| Test.java:57:17:57:24 | source(...) : String | Test.java:57:10:57:24 | (...)... | provenance | Sink:MaD:8 | +| Test.java:59:17:59:24 | source(...) : String | Test.java:59:10:59:24 | (...)... | provenance | Sink:MaD:9 | +| Test.java:61:17:61:24 | source(...) : String | Test.java:61:10:61:24 | (...)... | provenance | Sink:MaD:10 | +| Test.java:63:17:63:24 | source(...) : String | Test.java:63:10:63:24 | (...)... | provenance | Sink:MaD:11 | +| Test.java:65:17:65:24 | source(...) : String | Test.java:65:10:65:24 | (...)... | provenance | Sink:MaD:12 | +| Test.java:67:17:67:24 | source(...) : String | Test.java:67:10:67:24 | (...)... | provenance | Sink:MaD:13 | +| Test.java:69:38:69:45 | source(...) : String | Test.java:69:31:69:45 | (...)... | provenance | Sink:MaD:14 | +| Test.java:71:17:71:24 | source(...) : String | Test.java:71:10:71:24 | (...)... | provenance | Sink:MaD:15 | +| Test.java:73:17:73:24 | source(...) : String | Test.java:73:10:73:24 | (...)... | provenance | Sink:MaD:16 | +| Test.java:75:17:75:24 | source(...) : String | Test.java:75:10:75:24 | (...)... | provenance | Sink:MaD:17 | +| Test.java:77:17:77:24 | source(...) : String | Test.java:77:10:77:24 | (...)... | provenance | Sink:MaD:19 | +| Test.java:79:17:79:24 | source(...) : String | Test.java:79:10:79:24 | (...)... | provenance | Sink:MaD:18 | +| Test.java:81:17:81:24 | source(...) : String | Test.java:81:10:81:24 | (...)... | provenance | Sink:MaD:20 | +| Test.java:83:38:83:45 | source(...) : String | Test.java:83:31:83:45 | (...)... | provenance | Sink:MaD:14 | +| Test.java:85:36:85:43 | source(...) : String | Test.java:85:29:85:43 | (...)... | provenance | Sink:MaD:21 | +| Test.java:87:46:87:53 | source(...) : String | Test.java:87:29:87:53 | (...)... | provenance | Sink:MaD:22 | +| Test.java:89:38:89:45 | source(...) : String | Test.java:89:29:89:45 | (...)... | provenance | Sink:MaD:23 | +| Test.java:91:31:91:38 | source(...) : String | Test.java:91:24:91:38 | (...)... | provenance | Sink:MaD:24 | +| Test.java:93:41:93:48 | source(...) : String | Test.java:93:24:93:48 | (...)... | provenance | Sink:MaD:26 | +| Test.java:95:31:95:38 | source(...) : String | Test.java:95:24:95:38 | (...)... | provenance | Sink:MaD:25 | +| Test.java:97:33:97:40 | source(...) : String | Test.java:97:24:97:40 | (...)... | provenance | Sink:MaD:27 | +| Test.java:99:33:99:40 | source(...) : String | Test.java:99:24:99:40 | (...)... | provenance | Sink:MaD:28 | +| Test.java:101:27:101:34 | source(...) : String | Test.java:101:20:101:34 | (...)... | provenance | Sink:MaD:34 | +| Test.java:102:27:102:34 | source(...) : String | Test.java:102:20:102:34 | (...)... | provenance | Sink:MaD:33 | +| Test.java:104:40:104:47 | source(...) : String | Test.java:104:33:104:47 | (...)... | provenance | Sink:MaD:35 | +| Test.java:105:47:105:54 | source(...) : String | Test.java:105:40:105:54 | (...)... | provenance | Sink:MaD:32 | +| Test.java:107:40:107:47 | source(...) : String | Test.java:107:33:107:47 | (...)... | provenance | Sink:MaD:36 | +| Test.java:109:38:109:45 | source(...) : String | Test.java:109:31:109:45 | (...)... | provenance | Sink:MaD:37 | +| Test.java:111:33:111:40 | source(...) : String | Test.java:111:26:111:40 | (...)... | provenance | Sink:MaD:38 | +| Test.java:113:33:113:40 | source(...) : String | Test.java:113:26:113:40 | (...)... | provenance | Sink:MaD:39 | +| Test.java:115:41:115:48 | source(...) : String | Test.java:115:34:115:48 | (...)... | provenance | Sink:MaD:40 | +| Test.java:117:42:117:49 | source(...) : String | Test.java:117:35:117:49 | (...)... | provenance | Sink:MaD:41 | +| Test.java:119:37:119:44 | source(...) : String | Test.java:119:30:119:44 | (...)... | provenance | Sink:MaD:42 | +| Test.java:121:29:121:36 | source(...) : String | Test.java:121:22:121:36 | (...)... | provenance | Sink:MaD:43 | +| Test.java:123:37:123:44 | source(...) : String | Test.java:123:30:123:44 | (...)... | provenance | Sink:MaD:44 | +| Test.java:125:28:125:35 | source(...) : String | Test.java:125:21:125:35 | (...)... | provenance | Sink:MaD:45 | +| Test.java:127:33:127:40 | source(...) : String | Test.java:127:26:127:40 | (...)... | provenance | Sink:MaD:46 | +| Test.java:129:40:129:47 | source(...) : String | Test.java:129:33:129:47 | (...)... | provenance | Sink:MaD:47 | +| Test.java:131:40:131:47 | source(...) : String | Test.java:131:33:131:47 | (...)... | provenance | Sink:MaD:48 | +| Test.java:132:40:132:47 | source(...) : String | Test.java:132:33:132:47 | (...)... | provenance | Sink:MaD:48 | +| Test.java:134:38:134:45 | source(...) : String | Test.java:134:31:134:45 | (...)... | provenance | Sink:MaD:49 | +| Test.java:136:28:136:35 | source(...) : String | Test.java:136:21:136:35 | (...)... | provenance | Sink:MaD:50 | +| Test.java:137:28:137:35 | source(...) : String | Test.java:137:21:137:35 | (...)... | provenance | Sink:MaD:50 | +| Test.java:138:28:138:35 | source(...) : String | Test.java:138:21:138:35 | (...)... | provenance | Sink:MaD:50 | +| Test.java:140:34:140:41 | source(...) : String | Test.java:140:27:140:41 | (...)... | provenance | Sink:MaD:51 | +| Test.java:141:34:141:41 | source(...) : String | Test.java:141:27:141:41 | (...)... | provenance | Sink:MaD:51 | +| Test.java:143:33:143:40 | source(...) : String | Test.java:143:26:143:40 | (...)... | provenance | Sink:MaD:52 | +| Test.java:145:42:145:49 | source(...) : String | Test.java:145:35:145:49 | (...)... | provenance | Sink:MaD:53 | +| Test.java:147:50:147:57 | source(...) : String | Test.java:147:41:147:57 | (...)... | provenance | Sink:MaD:65 | +| Test.java:149:54:149:61 | source(...) : String | Test.java:149:45:149:61 | (...)... | provenance | Sink:MaD:66 | +| Test.java:151:50:151:57 | source(...) : String | Test.java:151:43:151:57 | (...)... | provenance | Sink:MaD:71 | +| Test.java:153:35:153:42 | source(...) : String | Test.java:153:28:153:42 | (...)... | provenance | Sink:MaD:69 | +| Test.java:155:48:155:55 | source(...) : String | Test.java:155:41:155:55 | (...)... | provenance | Sink:MaD:70 | +| Test.java:160:37:160:44 | source(...) : String | Test.java:160:30:160:44 | (...)... | provenance | Sink:MaD:63 | +| Test.java:162:74:162:81 | source(...) : String | Test.java:162:40:162:81 | (...)... | provenance | Sink:MaD:60 | +| Test.java:164:68:164:75 | source(...) : String | Test.java:164:34:164:75 | (...)... | provenance | Sink:MaD:62 | +| Test.java:166:68:166:75 | source(...) : String | Test.java:166:34:166:75 | (...)... | provenance | Sink:MaD:61 | +| Test.java:168:30:168:37 | source(...) : String | Test.java:168:23:168:37 | (...)... | provenance | Sink:MaD:67 | +| Test.java:181:30:181:37 | source(...) : String | Test.java:181:23:181:37 | (...)... | provenance | Sink:MaD:64 | +| Test.java:186:33:186:40 | source(...) : String | Test.java:186:23:186:40 | (...)... | provenance | Sink:MaD:54 | +| Test.java:188:27:188:34 | source(...) : String | Test.java:188:20:188:34 | (...)... | provenance | Sink:MaD:55 | +| Test.java:190:28:190:35 | source(...) : String | Test.java:190:21:190:35 | (...)... | provenance | Sink:MaD:56 | +| Test.java:192:29:192:36 | source(...) : String | Test.java:192:22:192:36 | (...)... | provenance | Sink:MaD:57 | +| Test.java:197:27:197:34 | source(...) : String | Test.java:197:20:197:34 | (...)... | provenance | Sink:MaD:58 | +| Test.java:199:26:199:33 | source(...) : String | Test.java:199:19:199:33 | (...)... | provenance | Sink:MaD:59 | +| Test.java:204:29:204:36 | source(...) : String | Test.java:204:20:204:36 | (...)... | provenance | Sink:MaD:68 | +models +| 1 | Sink: java.io; File; true; canExecute; (); ; Argument[this]; path-injection; manual | +| 2 | Sink: java.io; File; true; canRead; (); ; Argument[this]; path-injection; manual | +| 3 | Sink: java.io; File; true; canWrite; (); ; Argument[this]; path-injection; manual | +| 4 | Sink: java.io; File; true; createNewFile; (); ; Argument[this]; path-injection; ai-manual | +| 5 | Sink: java.io; File; true; createTempFile; (String,String,File); ; Argument[2]; path-injection; ai-manual | +| 6 | Sink: java.io; File; true; delete; (); ; Argument[this]; path-injection; manual | +| 7 | Sink: java.io; File; true; deleteOnExit; (); ; Argument[this]; path-injection; manual | +| 8 | Sink: java.io; File; true; exists; (); ; Argument[this]; path-injection; manual | +| 9 | Sink: java.io; File; true; isDirectory; (); ; Argument[this]; path-injection; manual | +| 10 | Sink: java.io; File; true; isFile; (); ; Argument[this]; path-injection; manual | +| 11 | Sink: java.io; File; true; isHidden; (); ; Argument[this]; path-injection; manual | +| 12 | Sink: java.io; File; true; mkdir; (); ; Argument[this]; path-injection; manual | +| 13 | Sink: java.io; File; true; mkdirs; (); ; Argument[this]; path-injection; manual | +| 14 | Sink: java.io; File; true; renameTo; (File); ; Argument[0]; path-injection; ai-manual | +| 15 | Sink: java.io; File; true; renameTo; (File); ; Argument[this]; path-injection; ai-manual | +| 16 | Sink: java.io; File; true; setExecutable; ; ; Argument[this]; path-injection; manual | +| 17 | Sink: java.io; File; true; setLastModified; ; ; Argument[this]; path-injection; manual | +| 18 | Sink: java.io; File; true; setReadOnly; ; ; Argument[this]; path-injection; manual | +| 19 | Sink: java.io; File; true; setReadable; ; ; Argument[this]; path-injection; manual | +| 20 | Sink: java.io; File; true; setWritable; ; ; Argument[this]; path-injection; manual | +| 21 | Sink: java.io; FileInputStream; true; FileInputStream; (File); ; Argument[0]; path-injection; ai-manual | +| 22 | Sink: java.io; FileInputStream; true; FileInputStream; (FileDescriptor); ; Argument[0]; path-injection; manual | +| 23 | Sink: java.io; FileInputStream; true; FileInputStream; (String); ; Argument[0]; path-injection; ai-manual | +| 24 | Sink: java.io; FileReader; true; FileReader; (File); ; Argument[0]; path-injection; ai-manual | +| 25 | Sink: java.io; FileReader; true; FileReader; (File,Charset); ; Argument[0]; path-injection; manual | +| 26 | Sink: java.io; FileReader; true; FileReader; (FileDescriptor); ; Argument[0]; path-injection; manual | +| 27 | Sink: java.io; FileReader; true; FileReader; (String); ; Argument[0]; path-injection; ai-manual | +| 28 | Sink: java.io; FileReader; true; FileReader; (String,Charset); ; Argument[0]; path-injection; manual | +| 29 | Sink: java.lang; Class; false; getResource; (String); ; Argument[0]; path-injection; ai-manual | +| 30 | Sink: java.lang; ClassLoader; true; getSystemResourceAsStream; (String); ; Argument[0]; path-injection; ai-manual | +| 31 | Sink: java.lang; Module; true; getResourceAsStream; (String); ; Argument[0]; path-injection; ai-manual | +| 32 | Sink: java.nio.file; Files; false; copy; (InputStream,Path,CopyOption[]); ; Argument[1]; path-injection; manual | +| 33 | Sink: java.nio.file; Files; false; copy; (Path,OutputStream); ; Argument[0]; path-injection; manual | +| 34 | Sink: java.nio.file; Files; false; copy; (Path,Path,CopyOption[]); ; Argument[0]; path-injection; manual | +| 35 | Sink: java.nio.file; Files; false; copy; (Path,Path,CopyOption[]); ; Argument[1]; path-injection; manual | +| 36 | Sink: java.nio.file; Files; false; createDirectories; ; ; Argument[0]; path-injection; manual | +| 37 | Sink: java.nio.file; Files; false; createDirectory; ; ; Argument[0]; path-injection; manual | +| 38 | Sink: java.nio.file; Files; false; createFile; ; ; Argument[0]; path-injection; manual | +| 39 | Sink: java.nio.file; Files; false; createLink; ; ; Argument[0]; path-injection; manual | +| 40 | Sink: java.nio.file; Files; false; createSymbolicLink; ; ; Argument[0]; path-injection; manual | +| 41 | Sink: java.nio.file; Files; false; createTempDirectory; (Path,String,FileAttribute[]); ; Argument[0]; path-injection; manual | +| 42 | Sink: java.nio.file; Files; false; createTempFile; (Path,String,String,FileAttribute[]); ; Argument[0]; path-injection; manual | +| 43 | Sink: java.nio.file; Files; false; delete; (Path); ; Argument[0]; path-injection; ai-manual | +| 44 | Sink: java.nio.file; Files; false; deleteIfExists; (Path); ; Argument[0]; path-injection; ai-manual | +| 45 | Sink: java.nio.file; Files; false; lines; (Path,Charset); ; Argument[0]; path-injection; ai-manual | +| 46 | Sink: java.nio.file; Files; false; move; ; ; Argument[1]; path-injection; manual | +| 47 | Sink: java.nio.file; Files; false; newBufferedReader; (Path,Charset); ; Argument[0]; path-injection; ai-manual | +| 48 | Sink: java.nio.file; Files; false; newBufferedWriter; ; ; Argument[0]; path-injection; manual | +| 49 | Sink: java.nio.file; Files; false; newOutputStream; ; ; Argument[0]; path-injection; manual | +| 50 | Sink: java.nio.file; Files; false; write; ; ; Argument[0]; path-injection; manual | +| 51 | Sink: java.nio.file; Files; false; writeString; ; ; Argument[0]; path-injection; manual | +| 52 | Sink: javax.xml.transform.stream; StreamResult; true; StreamResult; (File); ; Argument[0]; path-injection; ai-manual | +| 53 | Sink: org.apache.commons.io; FileUtils; true; openInputStream; (File); ; Argument[0]; path-injection; ai-manual | +| 54 | Sink: org.apache.tools.ant.taskdefs; Copy; true; addFileset; (FileSet); ; Argument[0]; path-injection; ai-manual | +| 55 | Sink: org.apache.tools.ant.taskdefs; Copy; true; setFile; (File); ; Argument[0]; path-injection; ai-manual | +| 56 | Sink: org.apache.tools.ant.taskdefs; Copy; true; setTodir; (File); ; Argument[0]; path-injection; ai-manual | +| 57 | Sink: org.apache.tools.ant.taskdefs; Copy; true; setTofile; (File); ; Argument[0]; path-injection; ai-manual | +| 58 | Sink: org.apache.tools.ant.taskdefs; Expand; true; setDest; (File); ; Argument[0]; path-injection; ai-manual | +| 59 | Sink: org.apache.tools.ant.taskdefs; Expand; true; setSrc; (File); ; Argument[0]; path-injection; ai-manual | +| 60 | Sink: org.apache.tools.ant; AntClassLoader; true; AntClassLoader; (ClassLoader,Project,Path,boolean); ; Argument[2]; path-injection; ai-manual | +| 61 | Sink: org.apache.tools.ant; AntClassLoader; true; AntClassLoader; (Project,Path); ; Argument[1]; path-injection; ai-manual | +| 62 | Sink: org.apache.tools.ant; AntClassLoader; true; AntClassLoader; (Project,Path,boolean); ; Argument[1]; path-injection; ai-manual | +| 63 | Sink: org.apache.tools.ant; AntClassLoader; true; addPathComponent; (File); ; Argument[0]; path-injection; ai-manual | +| 64 | Sink: org.apache.tools.ant; DirectoryScanner; true; setBasedir; (File); ; Argument[0]; path-injection; ai-manual | +| 65 | Sink: org.codehaus.cargo.container.installer; ZipURLInstaller; true; ZipURLInstaller; (URL,String,String); ; Argument[1]; path-injection; ai-manual | +| 66 | Sink: org.codehaus.cargo.container.installer; ZipURLInstaller; true; ZipURLInstaller; (URL,String,String); ; Argument[2]; path-injection; ai-manual | +| 67 | Sink: org.kohsuke.stapler.framework.io; LargeText; true; LargeText; (File,Charset,boolean,boolean); ; Argument[0]; path-injection; ai-manual | +| 68 | Sink: org.openjdk.jmh.runner.options; ChainedOptionsBuilder; true; result; (String); ; Argument[0]; path-injection; ai-manual | +| 69 | Sink: org.springframework.util; FileCopyUtils; false; copy; (File,File); ; Argument[0]; path-injection; manual | +| 70 | Sink: org.springframework.util; FileCopyUtils; false; copy; (File,File); ; Argument[1]; path-injection; manual | +| 71 | Sink: org.springframework.util; FileCopyUtils; false; copy; (byte[],File); ; Argument[1]; path-injection; manual | +| 72 | Source: java.net; Socket; false; getInputStream; (); ; ReturnValue; remote; manual | +| 73 | Source: javax.servlet; ServletRequest; false; getParameter; (String); ; ReturnValue; remote; manual | +| 74 | Summary: java.io; BufferedReader; false; BufferedReader; ; ; Argument[0]; Argument[this]; taint; manual | +| 75 | Summary: java.io; BufferedReader; true; readLine; ; ; Argument[this]; ReturnValue; taint; manual | +| 76 | Summary: java.io; InputStreamReader; false; InputStreamReader; ; ; Argument[0]; Argument[this]; taint; manual | +nodes +| TaintedPath.java:13:17:13:89 | new BufferedReader(...) : BufferedReader | semmle.label | new BufferedReader(...) : BufferedReader | +| TaintedPath.java:13:36:13:88 | new InputStreamReader(...) : InputStreamReader | semmle.label | new InputStreamReader(...) : InputStreamReader | +| TaintedPath.java:13:58:13:78 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| TaintedPath.java:14:27:14:40 | filenameReader : BufferedReader | semmle.label | filenameReader : BufferedReader | +| TaintedPath.java:14:27:14:51 | readLine(...) : String | semmle.label | readLine(...) : String | +| TaintedPath.java:16:71:16:78 | filename | semmle.label | filename | +| Test.java:32:16:32:45 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| Test.java:37:52:37:68 | (...)... | semmle.label | (...)... | +| Test.java:37:61:37:68 | source(...) : String | semmle.label | source(...) : String | +| Test.java:39:32:39:48 | (...)... | semmle.label | (...)... | +| Test.java:39:41:39:48 | source(...) : String | semmle.label | source(...) : String | +| Test.java:41:47:41:63 | (...)... | semmle.label | (...)... | +| Test.java:41:56:41:63 | source(...) : String | semmle.label | source(...) : String | +| Test.java:43:10:43:24 | (...)... | semmle.label | (...)... | +| Test.java:43:17:43:24 | source(...) : String | semmle.label | source(...) : String | +| Test.java:45:10:45:24 | (...)... | semmle.label | (...)... | +| Test.java:45:17:45:24 | source(...) : String | semmle.label | source(...) : String | +| Test.java:47:10:47:24 | (...)... | semmle.label | (...)... | +| Test.java:47:17:47:24 | source(...) : String | semmle.label | source(...) : String | +| Test.java:49:10:49:24 | (...)... | semmle.label | (...)... | +| Test.java:49:17:49:24 | source(...) : String | semmle.label | source(...) : String | +| Test.java:51:39:51:53 | (...)... | semmle.label | (...)... | +| Test.java:51:46:51:53 | source(...) : String | semmle.label | source(...) : String | +| Test.java:53:10:53:24 | (...)... | semmle.label | (...)... | +| Test.java:53:17:53:24 | source(...) : String | semmle.label | source(...) : String | +| Test.java:55:10:55:24 | (...)... | semmle.label | (...)... | +| Test.java:55:17:55:24 | source(...) : String | semmle.label | source(...) : String | +| Test.java:57:10:57:24 | (...)... | semmle.label | (...)... | +| Test.java:57:17:57:24 | source(...) : String | semmle.label | source(...) : String | +| Test.java:59:10:59:24 | (...)... | semmle.label | (...)... | +| Test.java:59:17:59:24 | source(...) : String | semmle.label | source(...) : String | +| Test.java:61:10:61:24 | (...)... | semmle.label | (...)... | +| Test.java:61:17:61:24 | source(...) : String | semmle.label | source(...) : String | +| Test.java:63:10:63:24 | (...)... | semmle.label | (...)... | +| Test.java:63:17:63:24 | source(...) : String | semmle.label | source(...) : String | +| Test.java:65:10:65:24 | (...)... | semmle.label | (...)... | +| Test.java:65:17:65:24 | source(...) : String | semmle.label | source(...) : String | +| Test.java:67:10:67:24 | (...)... | semmle.label | (...)... | +| Test.java:67:17:67:24 | source(...) : String | semmle.label | source(...) : String | +| Test.java:69:31:69:45 | (...)... | semmle.label | (...)... | +| Test.java:69:38:69:45 | source(...) : String | semmle.label | source(...) : String | +| Test.java:71:10:71:24 | (...)... | semmle.label | (...)... | +| Test.java:71:17:71:24 | source(...) : String | semmle.label | source(...) : String | +| Test.java:73:10:73:24 | (...)... | semmle.label | (...)... | +| Test.java:73:17:73:24 | source(...) : String | semmle.label | source(...) : String | +| Test.java:75:10:75:24 | (...)... | semmle.label | (...)... | +| Test.java:75:17:75:24 | source(...) : String | semmle.label | source(...) : String | +| Test.java:77:10:77:24 | (...)... | semmle.label | (...)... | +| Test.java:77:17:77:24 | source(...) : String | semmle.label | source(...) : String | +| Test.java:79:10:79:24 | (...)... | semmle.label | (...)... | +| Test.java:79:17:79:24 | source(...) : String | semmle.label | source(...) : String | +| Test.java:81:10:81:24 | (...)... | semmle.label | (...)... | +| Test.java:81:17:81:24 | source(...) : String | semmle.label | source(...) : String | +| Test.java:83:31:83:45 | (...)... | semmle.label | (...)... | +| Test.java:83:38:83:45 | source(...) : String | semmle.label | source(...) : String | +| Test.java:85:29:85:43 | (...)... | semmle.label | (...)... | +| Test.java:85:36:85:43 | source(...) : String | semmle.label | source(...) : String | +| Test.java:87:29:87:53 | (...)... | semmle.label | (...)... | +| Test.java:87:46:87:53 | source(...) : String | semmle.label | source(...) : String | +| Test.java:89:29:89:45 | (...)... | semmle.label | (...)... | +| Test.java:89:38:89:45 | source(...) : String | semmle.label | source(...) : String | +| Test.java:91:24:91:38 | (...)... | semmle.label | (...)... | +| Test.java:91:31:91:38 | source(...) : String | semmle.label | source(...) : String | +| Test.java:93:24:93:48 | (...)... | semmle.label | (...)... | +| Test.java:93:41:93:48 | source(...) : String | semmle.label | source(...) : String | +| Test.java:95:24:95:38 | (...)... | semmle.label | (...)... | +| Test.java:95:31:95:38 | source(...) : String | semmle.label | source(...) : String | +| Test.java:97:24:97:40 | (...)... | semmle.label | (...)... | +| Test.java:97:33:97:40 | source(...) : String | semmle.label | source(...) : String | +| Test.java:99:24:99:40 | (...)... | semmle.label | (...)... | +| Test.java:99:33:99:40 | source(...) : String | semmle.label | source(...) : String | +| Test.java:101:20:101:34 | (...)... | semmle.label | (...)... | +| Test.java:101:27:101:34 | source(...) : String | semmle.label | source(...) : String | +| Test.java:102:20:102:34 | (...)... | semmle.label | (...)... | +| Test.java:102:27:102:34 | source(...) : String | semmle.label | source(...) : String | +| Test.java:104:33:104:47 | (...)... | semmle.label | (...)... | +| Test.java:104:40:104:47 | source(...) : String | semmle.label | source(...) : String | +| Test.java:105:40:105:54 | (...)... | semmle.label | (...)... | +| Test.java:105:47:105:54 | source(...) : String | semmle.label | source(...) : String | +| Test.java:107:33:107:47 | (...)... | semmle.label | (...)... | +| Test.java:107:40:107:47 | source(...) : String | semmle.label | source(...) : String | +| Test.java:109:31:109:45 | (...)... | semmle.label | (...)... | +| Test.java:109:38:109:45 | source(...) : String | semmle.label | source(...) : String | +| Test.java:111:26:111:40 | (...)... | semmle.label | (...)... | +| Test.java:111:33:111:40 | source(...) : String | semmle.label | source(...) : String | +| Test.java:113:26:113:40 | (...)... | semmle.label | (...)... | +| Test.java:113:33:113:40 | source(...) : String | semmle.label | source(...) : String | +| Test.java:115:34:115:48 | (...)... | semmle.label | (...)... | +| Test.java:115:41:115:48 | source(...) : String | semmle.label | source(...) : String | +| Test.java:117:35:117:49 | (...)... | semmle.label | (...)... | +| Test.java:117:42:117:49 | source(...) : String | semmle.label | source(...) : String | +| Test.java:119:30:119:44 | (...)... | semmle.label | (...)... | +| Test.java:119:37:119:44 | source(...) : String | semmle.label | source(...) : String | +| Test.java:121:22:121:36 | (...)... | semmle.label | (...)... | +| Test.java:121:29:121:36 | source(...) : String | semmle.label | source(...) : String | +| Test.java:123:30:123:44 | (...)... | semmle.label | (...)... | +| Test.java:123:37:123:44 | source(...) : String | semmle.label | source(...) : String | +| Test.java:125:21:125:35 | (...)... | semmle.label | (...)... | +| Test.java:125:28:125:35 | source(...) : String | semmle.label | source(...) : String | +| Test.java:127:26:127:40 | (...)... | semmle.label | (...)... | +| Test.java:127:33:127:40 | source(...) : String | semmle.label | source(...) : String | +| Test.java:129:33:129:47 | (...)... | semmle.label | (...)... | +| Test.java:129:40:129:47 | source(...) : String | semmle.label | source(...) : String | +| Test.java:131:33:131:47 | (...)... | semmle.label | (...)... | +| Test.java:131:40:131:47 | source(...) : String | semmle.label | source(...) : String | +| Test.java:132:33:132:47 | (...)... | semmle.label | (...)... | +| Test.java:132:40:132:47 | source(...) : String | semmle.label | source(...) : String | +| Test.java:134:31:134:45 | (...)... | semmle.label | (...)... | +| Test.java:134:38:134:45 | source(...) : String | semmle.label | source(...) : String | +| Test.java:136:21:136:35 | (...)... | semmle.label | (...)... | +| Test.java:136:28:136:35 | source(...) : String | semmle.label | source(...) : String | +| Test.java:137:21:137:35 | (...)... | semmle.label | (...)... | +| Test.java:137:28:137:35 | source(...) : String | semmle.label | source(...) : String | +| Test.java:138:21:138:35 | (...)... | semmle.label | (...)... | +| Test.java:138:28:138:35 | source(...) : String | semmle.label | source(...) : String | +| Test.java:140:27:140:41 | (...)... | semmle.label | (...)... | +| Test.java:140:34:140:41 | source(...) : String | semmle.label | source(...) : String | +| Test.java:141:27:141:41 | (...)... | semmle.label | (...)... | +| Test.java:141:34:141:41 | source(...) : String | semmle.label | source(...) : String | +| Test.java:143:26:143:40 | (...)... | semmle.label | (...)... | +| Test.java:143:33:143:40 | source(...) : String | semmle.label | source(...) : String | +| Test.java:145:35:145:49 | (...)... | semmle.label | (...)... | +| Test.java:145:42:145:49 | source(...) : String | semmle.label | source(...) : String | +| Test.java:147:41:147:57 | (...)... | semmle.label | (...)... | +| Test.java:147:50:147:57 | source(...) : String | semmle.label | source(...) : String | +| Test.java:149:45:149:61 | (...)... | semmle.label | (...)... | +| Test.java:149:54:149:61 | source(...) : String | semmle.label | source(...) : String | +| Test.java:151:43:151:57 | (...)... | semmle.label | (...)... | +| Test.java:151:50:151:57 | source(...) : String | semmle.label | source(...) : String | +| Test.java:153:28:153:42 | (...)... | semmle.label | (...)... | +| Test.java:153:35:153:42 | source(...) : String | semmle.label | source(...) : String | +| Test.java:155:41:155:55 | (...)... | semmle.label | (...)... | +| Test.java:155:48:155:55 | source(...) : String | semmle.label | source(...) : String | +| Test.java:160:30:160:44 | (...)... | semmle.label | (...)... | +| Test.java:160:37:160:44 | source(...) : String | semmle.label | source(...) : String | +| Test.java:162:40:162:81 | (...)... | semmle.label | (...)... | +| Test.java:162:74:162:81 | source(...) : String | semmle.label | source(...) : String | +| Test.java:164:34:164:75 | (...)... | semmle.label | (...)... | +| Test.java:164:68:164:75 | source(...) : String | semmle.label | source(...) : String | +| Test.java:166:34:166:75 | (...)... | semmle.label | (...)... | +| Test.java:166:68:166:75 | source(...) : String | semmle.label | source(...) : String | +| Test.java:168:23:168:37 | (...)... | semmle.label | (...)... | +| Test.java:168:30:168:37 | source(...) : String | semmle.label | source(...) : String | +| Test.java:181:23:181:37 | (...)... | semmle.label | (...)... | +| Test.java:181:30:181:37 | source(...) : String | semmle.label | source(...) : String | +| Test.java:186:23:186:40 | (...)... | semmle.label | (...)... | +| Test.java:186:33:186:40 | source(...) : String | semmle.label | source(...) : String | +| Test.java:188:20:188:34 | (...)... | semmle.label | (...)... | +| Test.java:188:27:188:34 | source(...) : String | semmle.label | source(...) : String | +| Test.java:190:21:190:35 | (...)... | semmle.label | (...)... | +| Test.java:190:28:190:35 | source(...) : String | semmle.label | source(...) : String | +| Test.java:192:22:192:36 | (...)... | semmle.label | (...)... | +| Test.java:192:29:192:36 | source(...) : String | semmle.label | source(...) : String | +| Test.java:197:20:197:34 | (...)... | semmle.label | (...)... | +| Test.java:197:27:197:34 | source(...) : String | semmle.label | source(...) : String | +| Test.java:199:19:199:33 | (...)... | semmle.label | (...)... | +| Test.java:199:26:199:33 | source(...) : String | semmle.label | source(...) : String | +| Test.java:204:20:204:36 | (...)... | semmle.label | (...)... | +| Test.java:204:29:204:36 | source(...) : String | semmle.label | source(...) : String | +subpaths diff --git a/java/ql/test/query-tests/security/CWE-022/semmle/tests/TaintedPath.java b/java/ql/test/query-tests/security/CWE-022/semmle/tests/TaintedPath.java index 00447364bb3..442873b54a4 100644 --- a/java/ql/test/query-tests/security/CWE-022/semmle/tests/TaintedPath.java +++ b/java/ql/test/query-tests/security/CWE-022/semmle/tests/TaintedPath.java @@ -10,10 +10,10 @@ import java.nio.file.Paths; public class TaintedPath { public void sendUserFile(Socket sock, String user) throws IOException { BufferedReader filenameReader = - new BufferedReader(new InputStreamReader(sock.getInputStream(), "UTF-8")); + new BufferedReader(new InputStreamReader(sock.getInputStream(), "UTF-8")); // $ Source String filename = filenameReader.readLine(); // BAD: read from a file without checking its path - BufferedReader fileReader = new BufferedReader(new FileReader(filename)); // $ hasTaintFlow + BufferedReader fileReader = new BufferedReader(new FileReader(filename)); // $ Alert String fileLine = fileReader.readLine(); while (fileLine != null) { sock.getOutputStream().write(fileLine.getBytes()); diff --git a/java/ql/test/query-tests/security/CWE-022/semmle/tests/TaintedPath.ql b/java/ql/test/query-tests/security/CWE-022/semmle/tests/TaintedPath.ql deleted file mode 100644 index 3e7fbdb3131..00000000000 --- a/java/ql/test/query-tests/security/CWE-022/semmle/tests/TaintedPath.ql +++ /dev/null @@ -1,4 +0,0 @@ -import java -import utils.test.InlineFlowTest -import semmle.code.java.security.TaintedPathQuery -import TaintFlowTest diff --git a/java/ql/test/query-tests/security/CWE-022/semmle/tests/TaintedPath.qlref b/java/ql/test/query-tests/security/CWE-022/semmle/tests/TaintedPath.qlref new file mode 100644 index 00000000000..574c839511c --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-022/semmle/tests/TaintedPath.qlref @@ -0,0 +1,4 @@ +query: Security/CWE/CWE-022/TaintedPath.ql +postprocess: + - utils/test/PrettyPrintModels.ql + - utils/test/InlineExpectationsTestQuery.ql diff --git a/java/ql/test/query-tests/security/CWE-022/semmle/tests/Test.java b/java/ql/test/query-tests/security/CWE-022/semmle/tests/Test.java index d8cd210b70c..362c84f4b16 100644 --- a/java/ql/test/query-tests/security/CWE-022/semmle/tests/Test.java +++ b/java/ql/test/query-tests/security/CWE-022/semmle/tests/Test.java @@ -29,143 +29,143 @@ public class Test { private HttpServletRequest request; public Object source() { - return request.getParameter("source"); + return request.getParameter("source"); // $ Source } void test() throws IOException { // "java.lang;Module;true;getResourceAsStream;(String);;Argument[0];read-file;ai-generated" - getClass().getModule().getResourceAsStream((String) source()); // $ hasTaintFlow + getClass().getModule().getResourceAsStream((String) source()); // $ Alert // "java.lang;Class;false;getResource;(String);;Argument[0];read-file;ai-generated" - getClass().getResource((String) source()); // $ hasTaintFlow + getClass().getResource((String) source()); // $ Alert // "java.lang;ClassLoader;true;getSystemResourceAsStream;(String);;Argument[0];read-file;ai-generated" - ClassLoader.getSystemResourceAsStream((String) source()); // $ hasTaintFlow + ClassLoader.getSystemResourceAsStream((String) source()); // $ Alert // "java.io;File;True;canExecute;();;Argument[this];path-injection;manual" - ((File) source()).canExecute(); // $ hasTaintFlow + ((File) source()).canExecute(); // $ Alert // "java.io;File;True;canRead;();;Argument[this];path-injection;manual" - ((File) source()).canRead(); // $ hasTaintFlow + ((File) source()).canRead(); // $ Alert // "java.io;File;True;canWrite;();;Argument[this];path-injection;manual" - ((File) source()).canWrite(); // $ hasTaintFlow + ((File) source()).canWrite(); // $ Alert // "java.io;File;True;createNewFile;();;Argument[this];path-injection;ai-manual" - ((File) source()).createNewFile(); // $ hasTaintFlow + ((File) source()).createNewFile(); // $ Alert // "java.io;File;true;createTempFile;(String,String,File);;Argument[2];create-file;ai-generated" - File.createTempFile(";", ";", (File) source()); // $ hasTaintFlow + File.createTempFile(";", ";", (File) source()); // $ Alert // "java.io;File;True;delete;();;Argument[this];path-injection;manual" - ((File) source()).delete(); // $ hasTaintFlow + ((File) source()).delete(); // $ Alert // "java.io;File;True;deleteOnExit;();;Argument[this];path-injection;manual" - ((File) source()).deleteOnExit(); // $ hasTaintFlow + ((File) source()).deleteOnExit(); // $ Alert // "java.io;File;True;exists;();;Argument[this];path-injection;manual" - ((File) source()).exists(); // $ hasTaintFlow + ((File) source()).exists(); // $ Alert // "java.io:File;True;isDirectory;();;Argument[this];path-injection;manual" - ((File) source()).isDirectory(); // $ hasTaintFlow + ((File) source()).isDirectory(); // $ Alert // "java.io:File;True;isFile;();;Argument[this];path-injection;manual" - ((File) source()).isFile(); // $ hasTaintFlow + ((File) source()).isFile(); // $ Alert // "java.io:File;True;isHidden;();;Argument[this];path-injection;manual" - ((File) source()).isHidden(); // $ hasTaintFlow + ((File) source()).isHidden(); // $ Alert // "java.io;File;True;mkdir;();;Argument[this];path-injection;manual" - ((File) source()).mkdir(); // $ hasTaintFlow + ((File) source()).mkdir(); // $ Alert // "java.io;File;True;mkdirs;();;Argument[this];path-injection;manual" - ((File) source()).mkdirs(); // $ hasTaintFlow + ((File) source()).mkdirs(); // $ Alert // "java.io;File;True;renameTo;(File);;Argument[0];path-injection;ai-manual" - new File("").renameTo((File) source()); // $ hasTaintFlow + new File("").renameTo((File) source()); // $ Alert // "java.io;File;True;renameTo;(File);;Argument[this];path-injection;ai-manual" - ((File) source()).renameTo(null); // $ hasTaintFlow + ((File) source()).renameTo(null); // $ Alert // "java.io;File;True;setExecutable;;;Argument[this];path-injection;manual" - ((File) source()).setExecutable(true); // $ hasTaintFlow + ((File) source()).setExecutable(true); // $ Alert // "java.io;File;True;setLastModified;;;Argument[this];path-injection;manual" - ((File) source()).setLastModified(0); // $ hasTaintFlow + ((File) source()).setLastModified(0); // $ Alert // "java.io;File;True;setReadable;;;Argument[this];path-injection;manual" - ((File) source()).setReadable(true); // $ hasTaintFlow + ((File) source()).setReadable(true); // $ Alert // "java.io;File;True;setReadOnly;;;Argument[this];path-injection;manual" - ((File) source()).setReadOnly(); // $ hasTaintFlow + ((File) source()).setReadOnly(); // $ Alert // "java.io;File;True;setWritable;;;Argument[this];path-injection;manual" - ((File) source()).setWritable(true); // $ hasTaintFlow + ((File) source()).setWritable(true); // $ Alert // "java.io;File;true;renameTo;(File);;Argument[0];create-file;ai-generated" - new File("").renameTo((File) source()); // $ hasTaintFlow + new File("").renameTo((File) source()); // $ Alert // "java.io;FileInputStream;true;FileInputStream;(File);;Argument[0];read-file;ai-generated" - new FileInputStream((File) source()); // $ hasTaintFlow + new FileInputStream((File) source()); // $ Alert // "java.io;FileInputStream;true;FileInputStream;(FileDescriptor);;Argument[0];read-file;manual" - new FileInputStream((FileDescriptor) source()); // $ hasTaintFlow - // "java.io;FileInputStream;true;FileInputStream;(Strrirng);;Argument[0];read-file;manual" - new FileInputStream((String) source()); // $ hasTaintFlow + new FileInputStream((FileDescriptor) source()); // $ Alert + // "java.io;FileInputStream;true;FileInputStream;(String);;Argument[0];read-file;manual" + new FileInputStream((String) source()); // $ Alert // "java.io;FileReader;true;FileReader;(File);;Argument[0];read-file;ai-generated" - new FileReader((File) source()); // $ hasTaintFlow + new FileReader((File) source()); // $ Alert // "java.io;FileReader;true;FileReader;(FileDescriptor);;Argument[0];read-file;manual" - new FileReader((FileDescriptor) source()); // $ hasTaintFlow + new FileReader((FileDescriptor) source()); // $ Alert // "java.io;FileReader;true;FileReader;(File,Charset);;Argument[0];read-file;manual" - new FileReader((File) source(), null); // $ hasTaintFlow + new FileReader((File) source(), null); // $ Alert // "java.io;FileReader;true;FileReader;(String);;Argument[0];read-file;ai-generated" - new FileReader((String) source()); // $ hasTaintFlow + new FileReader((String) source()); // $ Alert // "java.io;FileReader;true;FileReader;(String,Charset);;Argument[0];read-file;manual" - new FileReader((String) source(), null); // $ hasTaintFlow + new FileReader((String) source(), null); // $ Alert // "java.nio.file;Files;false;copy;;;Argument[0];read-file;manual" - Files.copy((Path) source(), (Path) null); // $ hasTaintFlow - Files.copy((Path) source(), (OutputStream) null); // $ hasTaintFlow + Files.copy((Path) source(), (Path) null); // $ Alert + Files.copy((Path) source(), (OutputStream) null); // $ Alert // "java.nio.file;Files;false;copy;;;Argument[1];create-file;manual" - Files.copy((Path) null, (Path) source()); // $ hasTaintFlow - Files.copy((InputStream) null, (Path) source()); // $ hasTaintFlow + Files.copy((Path) null, (Path) source()); // $ Alert + Files.copy((InputStream) null, (Path) source()); // $ Alert // "java.nio.file;Files;false;createDirectories;;;Argument[0];create-file;manual" - Files.createDirectories((Path) source()); // $ hasTaintFlow + Files.createDirectories((Path) source()); // $ Alert // "java.nio.file;Files;false;createDirectory;;;Argument[0];create-file;manual" - Files.createDirectory((Path) source()); // $ hasTaintFlow + Files.createDirectory((Path) source()); // $ Alert // "java.nio.file;Files;false;createFile;;;Argument[0];create-file;manual" - Files.createFile((Path) source()); // $ hasTaintFlow + Files.createFile((Path) source()); // $ Alert // "java.nio.file;Files;false;createLink;;;Argument[0];create-file;manual" - Files.createLink((Path) source(), null); // $ hasTaintFlow + Files.createLink((Path) source(), null); // $ Alert // "java.nio.file;Files;false;createSymbolicLink;;;Argument[0];create-file;manual" - Files.createSymbolicLink((Path) source(), null); // $ hasTaintFlow + Files.createSymbolicLink((Path) source(), null); // $ Alert // "java.nio.file;Files;false;createTempDirectory;(Path,String,FileAttribute[]);;Argument[0];create-file;manual" - Files.createTempDirectory((Path) source(), null); // $ hasTaintFlow + Files.createTempDirectory((Path) source(), null); // $ Alert // "java.nio.file;Files;false;createTempFile;(Path,String,String,FileAttribute[]);;Argument[0];create-file;manual" - Files.createTempFile((Path) source(), null, null); // $ hasTaintFlow + Files.createTempFile((Path) source(), null, null); // $ Alert // "java.nio.file;Files;false;delete;(Path);;Argument[0];delete-file;ai-generated" - Files.delete((Path) source()); // $ hasTaintFlow + Files.delete((Path) source()); // $ Alert // "java.nio.file;Files;false;deleteIfExists;(Path);;Argument[0];delete-file;ai-generated" - Files.deleteIfExists((Path) source()); // $ hasTaintFlow + Files.deleteIfExists((Path) source()); // $ Alert // "java.nio.file;Files;false;lines;(Path,Charset);;Argument[0];read-file;ai-generated" - Files.lines((Path) source(), null); // $ hasTaintFlow + Files.lines((Path) source(), null); // $ Alert // "java.nio.file;Files;false;move;;;Argument[1];create-file;manual" - Files.move(null, (Path) source()); // $ hasTaintFlow + Files.move(null, (Path) source()); // $ Alert // "java.nio.file;Files;false;newBufferedReader;(Path,Charset);;Argument[0];read-file;ai-generated" - Files.newBufferedReader((Path) source(), null); // $ hasTaintFlow + Files.newBufferedReader((Path) source(), null); // $ Alert // "java.nio.file;Files;false;newBufferedWriter;;;Argument[0];create-file;manual" - Files.newBufferedWriter((Path) source()); // $ hasTaintFlow - Files.newBufferedWriter((Path) source(), (Charset) null); // $ hasTaintFlow + Files.newBufferedWriter((Path) source()); // $ Alert + Files.newBufferedWriter((Path) source(), (Charset) null); // $ Alert // "java.nio.file;Files;false;newOutputStream;;;Argument[0];create-file;manual" - Files.newOutputStream((Path) source()); // $ hasTaintFlow + Files.newOutputStream((Path) source()); // $ Alert // "java.nio.file;Files;false;write;;;Argument[0];create-file;manual" - Files.write((Path) source(), (byte[]) null); // $ hasTaintFlow - Files.write((Path) source(), (Iterable) null); // $ hasTaintFlow - Files.write((Path) source(), (Iterable) null, (Charset) null); // $ hasTaintFlow + Files.write((Path) source(), (byte[]) null); // $ Alert + Files.write((Path) source(), (Iterable) null); // $ Alert + Files.write((Path) source(), (Iterable) null, (Charset) null); // $ Alert // "java.nio.file;Files;false;writeString;;;Argument[0];create-file;manual" - Files.writeString((Path) source(), (CharSequence) null); // $ hasTaintFlow - Files.writeString((Path) source(), (CharSequence) null, (Charset) null); // $ hasTaintFlow + Files.writeString((Path) source(), (CharSequence) null); // $ Alert + Files.writeString((Path) source(), (CharSequence) null, (Charset) null); // $ Alert // "javax.xml.transform.stream;StreamResult";true;"StreamResult;(File);;Argument[0];create-file;ai-generated" - new StreamResult((File) source()); // $ hasTaintFlow + new StreamResult((File) source()); // $ Alert // "org.apache.commons.io;FileUtils;true;openInputStream;(File);;Argument[0];read-file;ai-generated" - FileUtils.openInputStream((File) source()); // $ hasTaintFlow + FileUtils.openInputStream((File) source()); // $ Alert // "org.codehaus.cargo.container.installer;ZipURLInstaller;true;ZipURLInstaller;(URL,String,String);;Argument[1];create-file;ai-generated" - new ZipURLInstaller((URL) null, (String) source(), ""); // $ hasTaintFlow + new ZipURLInstaller((URL) null, (String) source(), ""); // $ Alert // "org.codehaus.cargo.container.installer;ZipURLInstaller;true;ZipURLInstaller;(URL,String,String);;Argument[2];create-file;ai-generated" - new ZipURLInstaller((URL) null, "", (String) source()); // $ hasTaintFlow + new ZipURLInstaller((URL) null, "", (String) source()); // $ Alert // "org.springframework.util;FileCopyUtils;false;copy;(byte[],File);;Argument[1];create-file;manual" - FileCopyUtils.copy((byte[]) null, (File) source()); // $ hasTaintFlow + FileCopyUtils.copy((byte[]) null, (File) source()); // $ Alert // "org.springframework.util;FileCopyUtils;false;copy;(File,File);;Argument[0];create-file;manual" - FileCopyUtils.copy((File) source(), null); // $ hasTaintFlow + FileCopyUtils.copy((File) source(), null); // $ Alert // "org.springframework.util;FileCopyUtils;false;copy;(File,File);;Argument[1];create-file;manual" - FileCopyUtils.copy((File) null, (File) source()); // $ hasTaintFlow + FileCopyUtils.copy((File) null, (File) source()); // $ Alert } void test(AntClassLoader acl) { // "org.apache.tools.ant;AntClassLoader;true;addPathComponent;(File);;Argument[0];read-file;ai-generated" - acl.addPathComponent((File) source()); // $ hasTaintFlow + acl.addPathComponent((File) source()); // $ Alert // "org.apache.tools.ant;AntClassLoader;true;AntClassLoader;(ClassLoader,Project,Path,boolean);;Argument[2];read-file;ai-generated" - new AntClassLoader(null, null, (org.apache.tools.ant.types.Path) source(), false); // $ hasTaintFlow + new AntClassLoader(null, null, (org.apache.tools.ant.types.Path) source(), false); // $ Alert // "org.apache.tools.ant;AntClassLoader;true;AntClassLoader;(Project,Path,boolean);;Argument[1];read-file;ai-generated" - new AntClassLoader(null, (org.apache.tools.ant.types.Path) source(), false); // $ hasTaintFlow + new AntClassLoader(null, (org.apache.tools.ant.types.Path) source(), false); // $ Alert // "org.apache.tools.ant;AntClassLoader;true;AntClassLoader;(Project,Path);;Argument[1];read-file;ai-generated" - new AntClassLoader(null, (org.apache.tools.ant.types.Path) source()); // $ hasTaintFlow + new AntClassLoader(null, (org.apache.tools.ant.types.Path) source()); // $ Alert // "org.kohsuke.stapler.framework.io;LargeText;true;LargeText;(File,Charset,boolean,boolean);;Argument[0];read-file;ai-generated" - new LargeText((File) source(), null, false, false); // $ hasTaintFlow + new LargeText((File) source(), null, false, false); // $ Alert } void doGet6(String root, HttpServletRequest request) throws IOException { @@ -178,29 +178,29 @@ public class Test { void test(DirectoryScanner ds) { // "org.apache.tools.ant;DirectoryScanner;true;setBasedir;(File);;Argument[0];read-file;ai-generated" - ds.setBasedir((File) source()); // $ hasTaintFlow + ds.setBasedir((File) source()); // $ Alert } void test(Copy cp) { // "org.apache.tools.ant.taskdefs;Copy;true;addFileset;(FileSet);;Argument[0];read-file;ai-generated" - cp.addFileset((FileSet) source()); // $ hasTaintFlow + cp.addFileset((FileSet) source()); // $ Alert // "org.apache.tools.ant.taskdefs;Copy;true;setFile;(File);;Argument[0];read-file;ai-generated" - cp.setFile((File) source()); // $ hasTaintFlow + cp.setFile((File) source()); // $ Alert // "org.apache.tools.ant.taskdefs;Copy;true;setTodir;(File);;Argument[0];create-file;ai-generated" - cp.setTodir((File) source()); // $ hasTaintFlow + cp.setTodir((File) source()); // $ Alert // "org.apache.tools.ant.taskdefs;Copy;true;setTofile;(File);;Argument[0];create-file;ai-generated" - cp.setTofile((File) source()); // $ hasTaintFlow + cp.setTofile((File) source()); // $ Alert } void test(Expand ex) { // "org.apache.tools.ant.taskdefs;Expand;true;setDest;(File);;Argument[0];create-file;ai-generated" - ex.setDest((File) source()); // $ hasTaintFlow + ex.setDest((File) source()); // $ Alert // "org.apache.tools.ant.taskdefs;Expand;true;setSrc;(File);;Argument[0];read-file;ai-generated" - ex.setSrc((File) source()); // $ hasTaintFlow + ex.setSrc((File) source()); // $ Alert } void test(ChainedOptionsBuilder cob) { // "org.openjdk.jmh.runner.options;ChainedOptionsBuilder;true;result;(String);;Argument[0];create-file;ai-generated" - cob.result((String) source()); // $ hasTaintFlow + cob.result((String) source()); // $ Alert } } diff --git a/java/ql/test/query-tests/security/CWE-023/semmle/tests/PartialPathTraversal.expected b/java/ql/test/query-tests/security/CWE-023/semmle/tests/PartialPathTraversal.expected index b876fd2367d..5379de2403b 100644 --- a/java/ql/test/query-tests/security/CWE-023/semmle/tests/PartialPathTraversal.expected +++ b/java/ql/test/query-tests/security/CWE-023/semmle/tests/PartialPathTraversal.expected @@ -1,16 +1,16 @@ -| PartialPathTraversalTest.java:10:14:10:73 | startsWith(...) | Partial Path Traversal Vulnerability due to insufficient guard against path traversal. | -| PartialPathTraversalTest.java:17:9:17:72 | startsWith(...) | Partial Path Traversal Vulnerability due to insufficient guard against path traversal. | -| PartialPathTraversalTest.java:29:14:29:58 | startsWith(...) | Partial Path Traversal Vulnerability due to insufficient guard against path traversal. | -| PartialPathTraversalTest.java:35:14:35:63 | startsWith(...) | Partial Path Traversal Vulnerability due to insufficient guard against path traversal. | -| PartialPathTraversalTest.java:42:14:42:64 | startsWith(...) | Partial Path Traversal Vulnerability due to insufficient guard against path traversal. | -| PartialPathTraversalTest.java:49:14:49:64 | startsWith(...) | Partial Path Traversal Vulnerability due to insufficient guard against path traversal. | -| PartialPathTraversalTest.java:53:14:53:65 | startsWith(...) | Partial Path Traversal Vulnerability due to insufficient guard against path traversal. | -| PartialPathTraversalTest.java:61:14:61:64 | startsWith(...) | Partial Path Traversal Vulnerability due to insufficient guard against path traversal. | -| PartialPathTraversalTest.java:64:14:64:65 | startsWith(...) | Partial Path Traversal Vulnerability due to insufficient guard against path traversal. | -| PartialPathTraversalTest.java:75:14:75:64 | startsWith(...) | Partial Path Traversal Vulnerability due to insufficient guard against path traversal. | -| PartialPathTraversalTest.java:94:14:94:63 | startsWith(...) | Partial Path Traversal Vulnerability due to insufficient guard against path traversal. | -| PartialPathTraversalTest.java:102:14:102:63 | startsWith(...) | Partial Path Traversal Vulnerability due to insufficient guard against path traversal. | -| PartialPathTraversalTest.java:105:14:105:64 | startsWith(...) | Partial Path Traversal Vulnerability due to insufficient guard against path traversal. | -| PartialPathTraversalTest.java:173:14:173:63 | startsWith(...) | Partial Path Traversal Vulnerability due to insufficient guard against path traversal. | -| PartialPathTraversalTest.java:191:18:191:87 | startsWith(...) | Partial Path Traversal Vulnerability due to insufficient guard against path traversal. | -| PartialPathTraversalTest.java:209:14:209:64 | startsWith(...) | Partial Path Traversal Vulnerability due to insufficient guard against path traversal. | +| PartialPathTraversalTest.java:13:14:13:75 | startsWith(...) | Partial Path Traversal Vulnerability due to insufficient guard against path traversal. | +| PartialPathTraversalTest.java:20:9:20:74 | startsWith(...) | Partial Path Traversal Vulnerability due to insufficient guard against path traversal. | +| PartialPathTraversalTest.java:32:14:32:60 | startsWith(...) | Partial Path Traversal Vulnerability due to insufficient guard against path traversal. | +| PartialPathTraversalTest.java:38:14:38:65 | startsWith(...) | Partial Path Traversal Vulnerability due to insufficient guard against path traversal. | +| PartialPathTraversalTest.java:45:14:45:64 | startsWith(...) | Partial Path Traversal Vulnerability due to insufficient guard against path traversal. | +| PartialPathTraversalTest.java:52:14:52:64 | startsWith(...) | Partial Path Traversal Vulnerability due to insufficient guard against path traversal. | +| PartialPathTraversalTest.java:56:14:56:65 | startsWith(...) | Partial Path Traversal Vulnerability due to insufficient guard against path traversal. | +| PartialPathTraversalTest.java:64:14:64:64 | startsWith(...) | Partial Path Traversal Vulnerability due to insufficient guard against path traversal. | +| PartialPathTraversalTest.java:67:14:67:65 | startsWith(...) | Partial Path Traversal Vulnerability due to insufficient guard against path traversal. | +| PartialPathTraversalTest.java:78:14:78:64 | startsWith(...) | Partial Path Traversal Vulnerability due to insufficient guard against path traversal. | +| PartialPathTraversalTest.java:97:14:97:65 | startsWith(...) | Partial Path Traversal Vulnerability due to insufficient guard against path traversal. | +| PartialPathTraversalTest.java:105:14:105:65 | startsWith(...) | Partial Path Traversal Vulnerability due to insufficient guard against path traversal. | +| PartialPathTraversalTest.java:108:14:108:66 | startsWith(...) | Partial Path Traversal Vulnerability due to insufficient guard against path traversal. | +| PartialPathTraversalTest.java:176:14:176:65 | startsWith(...) | Partial Path Traversal Vulnerability due to insufficient guard against path traversal. | +| PartialPathTraversalTest.java:194:18:194:87 | startsWith(...) | Partial Path Traversal Vulnerability due to insufficient guard against path traversal. | +| PartialPathTraversalTest.java:212:14:212:64 | startsWith(...) | Partial Path Traversal Vulnerability due to insufficient guard against path traversal. | diff --git a/java/ql/test/query-tests/security/CWE-023/semmle/tests/PartialPathTraversalFromRemoteTest.expected b/java/ql/test/query-tests/security/CWE-023/semmle/tests/PartialPathTraversalFromRemoteTest.expected index e69de29bb2d..f2af01542ee 100644 --- a/java/ql/test/query-tests/security/CWE-023/semmle/tests/PartialPathTraversalFromRemoteTest.expected +++ b/java/ql/test/query-tests/security/CWE-023/semmle/tests/PartialPathTraversalFromRemoteTest.expected @@ -0,0 +1,135 @@ +#select +| PartialPathTraversalTest.java:13:14:13:37 | getCanonicalPath(...) | PartialPathTraversalTest.java:252:86:252:106 | getInputStream(...) : InputStream | PartialPathTraversalTest.java:13:14:13:37 | getCanonicalPath(...) | Partial Path Traversal Vulnerability due to insufficient guard against path traversal from $@. | PartialPathTraversalTest.java:252:86:252:106 | getInputStream(...) : InputStream | user-supplied data | +| PartialPathTraversalTest.java:20:10:20:33 | getCanonicalPath(...) | PartialPathTraversalTest.java:252:86:252:106 | getInputStream(...) : InputStream | PartialPathTraversalTest.java:20:10:20:33 | getCanonicalPath(...) | Partial Path Traversal Vulnerability due to insufficient guard against path traversal from $@. | PartialPathTraversalTest.java:252:86:252:106 | getInputStream(...) : InputStream | user-supplied data | +| PartialPathTraversalTest.java:32:14:32:37 | getCanonicalPath(...) | PartialPathTraversalTest.java:252:86:252:106 | getInputStream(...) : InputStream | PartialPathTraversalTest.java:32:14:32:37 | getCanonicalPath(...) | Partial Path Traversal Vulnerability due to insufficient guard against path traversal from $@. | PartialPathTraversalTest.java:252:86:252:106 | getInputStream(...) : InputStream | user-supplied data | +| PartialPathTraversalTest.java:38:14:38:37 | getCanonicalPath(...) | PartialPathTraversalTest.java:252:86:252:106 | getInputStream(...) : InputStream | PartialPathTraversalTest.java:38:14:38:37 | getCanonicalPath(...) | Partial Path Traversal Vulnerability due to insufficient guard against path traversal from $@. | PartialPathTraversalTest.java:252:86:252:106 | getInputStream(...) : InputStream | user-supplied data | +| PartialPathTraversalTest.java:45:14:45:26 | canonicalPath | PartialPathTraversalTest.java:252:86:252:106 | getInputStream(...) : InputStream | PartialPathTraversalTest.java:45:14:45:26 | canonicalPath | Partial Path Traversal Vulnerability due to insufficient guard against path traversal from $@. | PartialPathTraversalTest.java:252:86:252:106 | getInputStream(...) : InputStream | user-supplied data | +| PartialPathTraversalTest.java:52:14:52:26 | canonicalPath | PartialPathTraversalTest.java:252:86:252:106 | getInputStream(...) : InputStream | PartialPathTraversalTest.java:52:14:52:26 | canonicalPath | Partial Path Traversal Vulnerability due to insufficient guard against path traversal from $@. | PartialPathTraversalTest.java:252:86:252:106 | getInputStream(...) : InputStream | user-supplied data | +| PartialPathTraversalTest.java:56:14:56:27 | canonicalPath2 | PartialPathTraversalTest.java:252:86:252:106 | getInputStream(...) : InputStream | PartialPathTraversalTest.java:56:14:56:27 | canonicalPath2 | Partial Path Traversal Vulnerability due to insufficient guard against path traversal from $@. | PartialPathTraversalTest.java:252:86:252:106 | getInputStream(...) : InputStream | user-supplied data | +| PartialPathTraversalTest.java:64:14:64:26 | canonicalPath | PartialPathTraversalTest.java:252:86:252:106 | getInputStream(...) : InputStream | PartialPathTraversalTest.java:64:14:64:26 | canonicalPath | Partial Path Traversal Vulnerability due to insufficient guard against path traversal from $@. | PartialPathTraversalTest.java:252:86:252:106 | getInputStream(...) : InputStream | user-supplied data | +| PartialPathTraversalTest.java:67:14:67:27 | canonicalPath2 | PartialPathTraversalTest.java:252:86:252:106 | getInputStream(...) : InputStream | PartialPathTraversalTest.java:67:14:67:27 | canonicalPath2 | Partial Path Traversal Vulnerability due to insufficient guard against path traversal from $@. | PartialPathTraversalTest.java:252:86:252:106 | getInputStream(...) : InputStream | user-supplied data | +| PartialPathTraversalTest.java:97:14:97:37 | getCanonicalPath(...) | PartialPathTraversalTest.java:252:86:252:106 | getInputStream(...) : InputStream | PartialPathTraversalTest.java:97:14:97:37 | getCanonicalPath(...) | Partial Path Traversal Vulnerability due to insufficient guard against path traversal from $@. | PartialPathTraversalTest.java:252:86:252:106 | getInputStream(...) : InputStream | user-supplied data | +| PartialPathTraversalTest.java:105:14:105:37 | getCanonicalPath(...) | PartialPathTraversalTest.java:252:86:252:106 | getInputStream(...) : InputStream | PartialPathTraversalTest.java:105:14:105:37 | getCanonicalPath(...) | Partial Path Traversal Vulnerability due to insufficient guard against path traversal from $@. | PartialPathTraversalTest.java:252:86:252:106 | getInputStream(...) : InputStream | user-supplied data | +| PartialPathTraversalTest.java:108:14:108:37 | getCanonicalPath(...) | PartialPathTraversalTest.java:252:86:252:106 | getInputStream(...) : InputStream | PartialPathTraversalTest.java:108:14:108:37 | getCanonicalPath(...) | Partial Path Traversal Vulnerability due to insufficient guard against path traversal from $@. | PartialPathTraversalTest.java:252:86:252:106 | getInputStream(...) : InputStream | user-supplied data | +| PartialPathTraversalTest.java:176:14:176:37 | getCanonicalPath(...) | PartialPathTraversalTest.java:252:86:252:106 | getInputStream(...) : InputStream | PartialPathTraversalTest.java:176:14:176:37 | getCanonicalPath(...) | Partial Path Traversal Vulnerability due to insufficient guard against path traversal from $@. | PartialPathTraversalTest.java:252:86:252:106 | getInputStream(...) : InputStream | user-supplied data | +| PartialPathTraversalTest.java:194:18:194:47 | getCanonicalPath(...) | PartialPathTraversalTest.java:252:86:252:106 | getInputStream(...) : InputStream | PartialPathTraversalTest.java:194:18:194:47 | getCanonicalPath(...) | Partial Path Traversal Vulnerability due to insufficient guard against path traversal from $@. | PartialPathTraversalTest.java:252:86:252:106 | getInputStream(...) : InputStream | user-supplied data | +| PartialPathTraversalTest.java:212:14:212:26 | canonicalPath | PartialPathTraversalTest.java:252:86:252:106 | getInputStream(...) : InputStream | PartialPathTraversalTest.java:212:14:212:26 | canonicalPath | Partial Path Traversal Vulnerability due to insufficient guard against path traversal from $@. | PartialPathTraversalTest.java:252:86:252:106 | getInputStream(...) : InputStream | user-supplied data | +edges +| PartialPathTraversalTest.java:13:14:13:18 | dir(...) : File | PartialPathTraversalTest.java:13:14:13:37 | getCanonicalPath(...) | provenance | MaD:6 | +| PartialPathTraversalTest.java:20:10:20:14 | dir(...) : File | PartialPathTraversalTest.java:20:10:20:33 | getCanonicalPath(...) | provenance | MaD:6 | +| PartialPathTraversalTest.java:32:14:32:18 | dir(...) : File | PartialPathTraversalTest.java:32:14:32:37 | getCanonicalPath(...) | provenance | MaD:6 | +| PartialPathTraversalTest.java:38:14:38:18 | dir(...) : File | PartialPathTraversalTest.java:38:14:38:37 | getCanonicalPath(...) | provenance | MaD:6 | +| PartialPathTraversalTest.java:44:32:44:36 | dir(...) : File | PartialPathTraversalTest.java:44:32:44:55 | getCanonicalPath(...) : String | provenance | MaD:6 | +| PartialPathTraversalTest.java:44:32:44:55 | getCanonicalPath(...) : String | PartialPathTraversalTest.java:45:14:45:26 | canonicalPath | provenance | | +| PartialPathTraversalTest.java:51:32:51:36 | dir(...) : File | PartialPathTraversalTest.java:51:32:51:55 | getCanonicalPath(...) : String | provenance | MaD:6 | +| PartialPathTraversalTest.java:51:32:51:55 | getCanonicalPath(...) : String | PartialPathTraversalTest.java:52:14:52:26 | canonicalPath | provenance | | +| PartialPathTraversalTest.java:55:33:55:37 | dir(...) : File | PartialPathTraversalTest.java:55:33:55:56 | getCanonicalPath(...) : String | provenance | MaD:6 | +| PartialPathTraversalTest.java:55:33:55:56 | getCanonicalPath(...) : String | PartialPathTraversalTest.java:56:14:56:27 | canonicalPath2 | provenance | | +| PartialPathTraversalTest.java:62:32:62:36 | dir(...) : File | PartialPathTraversalTest.java:62:32:62:55 | getCanonicalPath(...) : String | provenance | MaD:6 | +| PartialPathTraversalTest.java:62:32:62:55 | getCanonicalPath(...) : String | PartialPathTraversalTest.java:64:14:64:26 | canonicalPath | provenance | | +| PartialPathTraversalTest.java:63:33:63:37 | dir(...) : File | PartialPathTraversalTest.java:63:33:63:56 | getCanonicalPath(...) : String | provenance | MaD:6 | +| PartialPathTraversalTest.java:63:33:63:56 | getCanonicalPath(...) : String | PartialPathTraversalTest.java:67:14:67:27 | canonicalPath2 | provenance | | +| PartialPathTraversalTest.java:97:14:97:18 | dir(...) : File | PartialPathTraversalTest.java:97:14:97:37 | getCanonicalPath(...) | provenance | MaD:6 | +| PartialPathTraversalTest.java:105:14:105:18 | dir(...) : File | PartialPathTraversalTest.java:105:14:105:37 | getCanonicalPath(...) | provenance | MaD:6 | +| PartialPathTraversalTest.java:108:14:108:18 | dir(...) : File | PartialPathTraversalTest.java:108:14:108:37 | getCanonicalPath(...) | provenance | MaD:6 | +| PartialPathTraversalTest.java:176:14:176:18 | dir(...) : File | PartialPathTraversalTest.java:176:14:176:37 | getCanonicalPath(...) | provenance | MaD:6 | +| PartialPathTraversalTest.java:186:25:186:30 | path(...) : String[] | PartialPathTraversalTest.java:188:23:188:23 | p : String | provenance | | +| PartialPathTraversalTest.java:188:13:188:14 | sb [post update] : StringBuilder | PartialPathTraversalTest.java:191:27:191:28 | sb : StringBuilder | provenance | | +| PartialPathTraversalTest.java:188:23:188:23 | p : String | PartialPathTraversalTest.java:188:13:188:14 | sb [post update] : StringBuilder | provenance | MaD:8 | +| PartialPathTraversalTest.java:191:27:191:28 | sb : StringBuilder | PartialPathTraversalTest.java:191:27:191:39 | toString(...) : String | provenance | MaD:9 | +| PartialPathTraversalTest.java:191:27:191:39 | toString(...) : String | PartialPathTraversalTest.java:192:37:192:44 | filePath : String | provenance | | +| PartialPathTraversalTest.java:192:28:192:45 | new File(...) : File | PartialPathTraversalTest.java:194:18:194:28 | encodedFile : File | provenance | | +| PartialPathTraversalTest.java:192:37:192:44 | filePath : String | PartialPathTraversalTest.java:192:28:192:45 | new File(...) : File | provenance | MaD:4 | +| PartialPathTraversalTest.java:194:18:194:28 | encodedFile : File | PartialPathTraversalTest.java:194:18:194:47 | getCanonicalPath(...) | provenance | MaD:6 | +| PartialPathTraversalTest.java:211:46:211:50 | dir(...) : File | PartialPathTraversalTest.java:211:46:211:69 | getCanonicalPath(...) : String | provenance | MaD:6 | +| PartialPathTraversalTest.java:211:46:211:69 | getCanonicalPath(...) : String | PartialPathTraversalTest.java:212:14:212:26 | canonicalPath | provenance | | +| PartialPathTraversalTest.java:252:45:252:117 | new BufferedReader(...) : BufferedReader | PartialPathTraversalTest.java:253:31:253:44 | filenameReader : BufferedReader | provenance | | +| PartialPathTraversalTest.java:252:64:252:116 | new InputStreamReader(...) : InputStreamReader | PartialPathTraversalTest.java:252:45:252:117 | new BufferedReader(...) : BufferedReader | provenance | MaD:2 | +| PartialPathTraversalTest.java:252:86:252:106 | getInputStream(...) : InputStream | PartialPathTraversalTest.java:252:64:252:116 | new InputStreamReader(...) : InputStreamReader | provenance | Src:MaD:1 MaD:7 | +| PartialPathTraversalTest.java:253:31:253:44 | filenameReader : BufferedReader | PartialPathTraversalTest.java:253:31:253:55 | readLine(...) : String | provenance | MaD:3 | +| PartialPathTraversalTest.java:253:31:253:55 | readLine(...) : String | PartialPathTraversalTest.java:254:29:254:36 | filename : String | provenance | | +| PartialPathTraversalTest.java:254:20:254:37 | new File(...) : File | PartialPathTraversalTest.java:13:14:13:18 | dir(...) : File | provenance | | +| PartialPathTraversalTest.java:254:20:254:37 | new File(...) : File | PartialPathTraversalTest.java:20:10:20:14 | dir(...) : File | provenance | | +| PartialPathTraversalTest.java:254:20:254:37 | new File(...) : File | PartialPathTraversalTest.java:32:14:32:18 | dir(...) : File | provenance | | +| PartialPathTraversalTest.java:254:20:254:37 | new File(...) : File | PartialPathTraversalTest.java:38:14:38:18 | dir(...) : File | provenance | | +| PartialPathTraversalTest.java:254:20:254:37 | new File(...) : File | PartialPathTraversalTest.java:44:32:44:36 | dir(...) : File | provenance | | +| PartialPathTraversalTest.java:254:20:254:37 | new File(...) : File | PartialPathTraversalTest.java:51:32:51:36 | dir(...) : File | provenance | | +| PartialPathTraversalTest.java:254:20:254:37 | new File(...) : File | PartialPathTraversalTest.java:55:33:55:37 | dir(...) : File | provenance | | +| PartialPathTraversalTest.java:254:20:254:37 | new File(...) : File | PartialPathTraversalTest.java:62:32:62:36 | dir(...) : File | provenance | | +| PartialPathTraversalTest.java:254:20:254:37 | new File(...) : File | PartialPathTraversalTest.java:63:33:63:37 | dir(...) : File | provenance | | +| PartialPathTraversalTest.java:254:20:254:37 | new File(...) : File | PartialPathTraversalTest.java:97:14:97:18 | dir(...) : File | provenance | | +| PartialPathTraversalTest.java:254:20:254:37 | new File(...) : File | PartialPathTraversalTest.java:105:14:105:18 | dir(...) : File | provenance | | +| PartialPathTraversalTest.java:254:20:254:37 | new File(...) : File | PartialPathTraversalTest.java:108:14:108:18 | dir(...) : File | provenance | | +| PartialPathTraversalTest.java:254:20:254:37 | new File(...) : File | PartialPathTraversalTest.java:176:14:176:18 | dir(...) : File | provenance | | +| PartialPathTraversalTest.java:254:20:254:37 | new File(...) : File | PartialPathTraversalTest.java:211:46:211:50 | dir(...) : File | provenance | | +| PartialPathTraversalTest.java:254:20:254:37 | new File(...) : File | PartialPathTraversalTest.java:261:16:261:20 | dir(...) : File | provenance | | +| PartialPathTraversalTest.java:254:29:254:36 | filename : String | PartialPathTraversalTest.java:254:20:254:37 | new File(...) : File | provenance | MaD:4 | +| PartialPathTraversalTest.java:261:16:261:20 | dir(...) : File | PartialPathTraversalTest.java:261:16:261:38 | getAbsolutePath(...) : String | provenance | MaD:5 | +| PartialPathTraversalTest.java:261:16:261:38 | getAbsolutePath(...) : String | PartialPathTraversalTest.java:261:16:261:60 | split(...) : String[] | provenance | MaD:10 | +| PartialPathTraversalTest.java:261:16:261:60 | split(...) : String[] | PartialPathTraversalTest.java:186:25:186:30 | path(...) : String[] | provenance | | +models +| 1 | Source: java.net; Socket; false; getInputStream; (); ; ReturnValue; remote; manual | +| 2 | Summary: java.io; BufferedReader; false; BufferedReader; ; ; Argument[0]; Argument[this]; taint; manual | +| 3 | Summary: java.io; BufferedReader; true; readLine; ; ; Argument[this]; ReturnValue; taint; manual | +| 4 | Summary: java.io; File; false; File; ; ; Argument[0]; Argument[this]; taint; manual | +| 5 | Summary: java.io; File; true; getAbsolutePath; ; ; Argument[this]; ReturnValue; taint; manual | +| 6 | Summary: java.io; File; true; getCanonicalPath; ; ; Argument[this]; ReturnValue; taint; manual | +| 7 | Summary: java.io; InputStreamReader; false; InputStreamReader; ; ; Argument[0]; Argument[this]; taint; manual | +| 8 | Summary: java.lang; AbstractStringBuilder; true; append; ; ; Argument[0]; Argument[this]; taint; manual | +| 9 | Summary: java.lang; CharSequence; true; toString; ; ; Argument[this]; ReturnValue; taint; manual | +| 10 | Summary: java.lang; String; false; split; ; ; Argument[this]; ReturnValue; taint; manual | +nodes +| PartialPathTraversalTest.java:13:14:13:18 | dir(...) : File | semmle.label | dir(...) : File | +| PartialPathTraversalTest.java:13:14:13:37 | getCanonicalPath(...) | semmle.label | getCanonicalPath(...) | +| PartialPathTraversalTest.java:20:10:20:14 | dir(...) : File | semmle.label | dir(...) : File | +| PartialPathTraversalTest.java:20:10:20:33 | getCanonicalPath(...) | semmle.label | getCanonicalPath(...) | +| PartialPathTraversalTest.java:32:14:32:18 | dir(...) : File | semmle.label | dir(...) : File | +| PartialPathTraversalTest.java:32:14:32:37 | getCanonicalPath(...) | semmle.label | getCanonicalPath(...) | +| PartialPathTraversalTest.java:38:14:38:18 | dir(...) : File | semmle.label | dir(...) : File | +| PartialPathTraversalTest.java:38:14:38:37 | getCanonicalPath(...) | semmle.label | getCanonicalPath(...) | +| PartialPathTraversalTest.java:44:32:44:36 | dir(...) : File | semmle.label | dir(...) : File | +| PartialPathTraversalTest.java:44:32:44:55 | getCanonicalPath(...) : String | semmle.label | getCanonicalPath(...) : String | +| PartialPathTraversalTest.java:45:14:45:26 | canonicalPath | semmle.label | canonicalPath | +| PartialPathTraversalTest.java:51:32:51:36 | dir(...) : File | semmle.label | dir(...) : File | +| PartialPathTraversalTest.java:51:32:51:55 | getCanonicalPath(...) : String | semmle.label | getCanonicalPath(...) : String | +| PartialPathTraversalTest.java:52:14:52:26 | canonicalPath | semmle.label | canonicalPath | +| PartialPathTraversalTest.java:55:33:55:37 | dir(...) : File | semmle.label | dir(...) : File | +| PartialPathTraversalTest.java:55:33:55:56 | getCanonicalPath(...) : String | semmle.label | getCanonicalPath(...) : String | +| PartialPathTraversalTest.java:56:14:56:27 | canonicalPath2 | semmle.label | canonicalPath2 | +| PartialPathTraversalTest.java:62:32:62:36 | dir(...) : File | semmle.label | dir(...) : File | +| PartialPathTraversalTest.java:62:32:62:55 | getCanonicalPath(...) : String | semmle.label | getCanonicalPath(...) : String | +| PartialPathTraversalTest.java:63:33:63:37 | dir(...) : File | semmle.label | dir(...) : File | +| PartialPathTraversalTest.java:63:33:63:56 | getCanonicalPath(...) : String | semmle.label | getCanonicalPath(...) : String | +| PartialPathTraversalTest.java:64:14:64:26 | canonicalPath | semmle.label | canonicalPath | +| PartialPathTraversalTest.java:67:14:67:27 | canonicalPath2 | semmle.label | canonicalPath2 | +| PartialPathTraversalTest.java:97:14:97:18 | dir(...) : File | semmle.label | dir(...) : File | +| PartialPathTraversalTest.java:97:14:97:37 | getCanonicalPath(...) | semmle.label | getCanonicalPath(...) | +| PartialPathTraversalTest.java:105:14:105:18 | dir(...) : File | semmle.label | dir(...) : File | +| PartialPathTraversalTest.java:105:14:105:37 | getCanonicalPath(...) | semmle.label | getCanonicalPath(...) | +| PartialPathTraversalTest.java:108:14:108:18 | dir(...) : File | semmle.label | dir(...) : File | +| PartialPathTraversalTest.java:108:14:108:37 | getCanonicalPath(...) | semmle.label | getCanonicalPath(...) | +| PartialPathTraversalTest.java:176:14:176:18 | dir(...) : File | semmle.label | dir(...) : File | +| PartialPathTraversalTest.java:176:14:176:37 | getCanonicalPath(...) | semmle.label | getCanonicalPath(...) | +| PartialPathTraversalTest.java:186:25:186:30 | path(...) : String[] | semmle.label | path(...) : String[] | +| PartialPathTraversalTest.java:188:13:188:14 | sb [post update] : StringBuilder | semmle.label | sb [post update] : StringBuilder | +| PartialPathTraversalTest.java:188:23:188:23 | p : String | semmle.label | p : String | +| PartialPathTraversalTest.java:191:27:191:28 | sb : StringBuilder | semmle.label | sb : StringBuilder | +| PartialPathTraversalTest.java:191:27:191:39 | toString(...) : String | semmle.label | toString(...) : String | +| PartialPathTraversalTest.java:192:28:192:45 | new File(...) : File | semmle.label | new File(...) : File | +| PartialPathTraversalTest.java:192:37:192:44 | filePath : String | semmle.label | filePath : String | +| PartialPathTraversalTest.java:194:18:194:28 | encodedFile : File | semmle.label | encodedFile : File | +| PartialPathTraversalTest.java:194:18:194:47 | getCanonicalPath(...) | semmle.label | getCanonicalPath(...) | +| PartialPathTraversalTest.java:211:46:211:50 | dir(...) : File | semmle.label | dir(...) : File | +| PartialPathTraversalTest.java:211:46:211:69 | getCanonicalPath(...) : String | semmle.label | getCanonicalPath(...) : String | +| PartialPathTraversalTest.java:212:14:212:26 | canonicalPath | semmle.label | canonicalPath | +| PartialPathTraversalTest.java:252:45:252:117 | new BufferedReader(...) : BufferedReader | semmle.label | new BufferedReader(...) : BufferedReader | +| PartialPathTraversalTest.java:252:64:252:116 | new InputStreamReader(...) : InputStreamReader | semmle.label | new InputStreamReader(...) : InputStreamReader | +| PartialPathTraversalTest.java:252:86:252:106 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| PartialPathTraversalTest.java:253:31:253:44 | filenameReader : BufferedReader | semmle.label | filenameReader : BufferedReader | +| PartialPathTraversalTest.java:253:31:253:55 | readLine(...) : String | semmle.label | readLine(...) : String | +| PartialPathTraversalTest.java:254:20:254:37 | new File(...) : File | semmle.label | new File(...) : File | +| PartialPathTraversalTest.java:254:29:254:36 | filename : String | semmle.label | filename : String | +| PartialPathTraversalTest.java:261:16:261:20 | dir(...) : File | semmle.label | dir(...) : File | +| PartialPathTraversalTest.java:261:16:261:38 | getAbsolutePath(...) : String | semmle.label | getAbsolutePath(...) : String | +| PartialPathTraversalTest.java:261:16:261:60 | split(...) : String[] | semmle.label | split(...) : String[] | +subpaths diff --git a/java/ql/test/query-tests/security/CWE-023/semmle/tests/PartialPathTraversalFromRemoteTest.ql b/java/ql/test/query-tests/security/CWE-023/semmle/tests/PartialPathTraversalFromRemoteTest.ql deleted file mode 100644 index 45dab6606fa..00000000000 --- a/java/ql/test/query-tests/security/CWE-023/semmle/tests/PartialPathTraversalFromRemoteTest.ql +++ /dev/null @@ -1,24 +0,0 @@ -import java -import utils.test.InlineExpectationsTest -import semmle.code.java.security.PartialPathTraversalQuery - -class TestRemoteSource extends RemoteFlowSource { - TestRemoteSource() { this.asParameter().hasName(["dir", "path"]) } - - override string getSourceType() { result = "TestSource" } -} - -module Test implements TestSig { - string getARelevantTag() { result = "hasTaintFlow" } - - predicate hasActualResult(Location location, string element, string tag, string value) { - tag = "hasTaintFlow" and - exists(DataFlow::Node sink | PartialPathTraversalFromRemoteFlow::flowTo(sink) | - sink.getLocation() = location and - element = sink.toString() and - value = "" - ) - } -} - -import MakeTest diff --git a/java/ql/test/query-tests/security/CWE-023/semmle/tests/PartialPathTraversalFromRemoteTest.qlref b/java/ql/test/query-tests/security/CWE-023/semmle/tests/PartialPathTraversalFromRemoteTest.qlref new file mode 100644 index 00000000000..0c2ceb8cd73 --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-023/semmle/tests/PartialPathTraversalFromRemoteTest.qlref @@ -0,0 +1,4 @@ +query: Security/CWE/CWE-023/PartialPathTraversalFromRemote.ql +postprocess: + - utils/test/PrettyPrintModels.ql + - utils/test/InlineExpectationsTestQuery.ql diff --git a/java/ql/test/query-tests/security/CWE-023/semmle/tests/PartialPathTraversalTest.java b/java/ql/test/query-tests/security/CWE-023/semmle/tests/PartialPathTraversalTest.java index af0fd776de1..b1986c1b669 100644 --- a/java/ql/test/query-tests/security/CWE-023/semmle/tests/PartialPathTraversalTest.java +++ b/java/ql/test/query-tests/security/CWE-023/semmle/tests/PartialPathTraversalTest.java @@ -1,68 +1,71 @@ import java.io.IOException; import java.io.File; import java.io.InputStream; +import java.io.BufferedReader; +import java.io.InputStreamReader; import static java.io.File.separatorChar; import java.nio.file.Files; +import java.net.Socket; public class PartialPathTraversalTest { - public void esapiExample(File dir, File parent) throws IOException { - if (!dir.getCanonicalPath().startsWith(parent.getCanonicalPath())) { // $hasTaintFlow - throw new IOException("Invalid directory: " + dir.getCanonicalPath()); + public void esapiExample(File parent) throws IOException { + if (!dir().getCanonicalPath().startsWith(parent.getCanonicalPath())) { // $ Alert + throw new IOException("Invalid directory: " + dir().getCanonicalPath()); } } @SuppressWarnings("ResultOfMethodCallIgnored") - void foo1(File dir, File parent) throws IOException { - (dir.getCanonicalPath()).startsWith((parent.getCanonicalPath())); // $hasTaintFlow + void foo1(File parent) throws IOException { + (dir().getCanonicalPath()).startsWith((parent.getCanonicalPath())); // $ Alert } - void foo2(File dir, File parent) throws IOException { - dir.getCanonicalPath(); + void foo2(File parent) throws IOException { + dir().getCanonicalPath(); if ("potato".startsWith(parent.getCanonicalPath())) { System.out.println("Hello!"); } } - void foo3(File dir, File parent) throws IOException { + void foo3(File parent) throws IOException { String parentPath = parent.getCanonicalPath(); - if (!dir.getCanonicalPath().startsWith(parentPath)) { // $hasTaintFlow - throw new IOException("Invalid directory: " + dir.getCanonicalPath()); + if (!dir().getCanonicalPath().startsWith(parentPath)) { // $ Alert + throw new IOException("Invalid directory: " + dir().getCanonicalPath()); } } - void foo4(File dir) throws IOException { - if (!dir.getCanonicalPath().startsWith("/usr" + "/dir")) { // $hasTaintFlow - throw new IOException("Invalid directory: " + dir.getCanonicalPath()); + void foo4() throws IOException { + if (!dir().getCanonicalPath().startsWith("/usr" + "/dir")) { // $ Alert + throw new IOException("Invalid directory: " + dir().getCanonicalPath()); } } - void foo5(File dir, File parent) throws IOException { - String canonicalPath = dir.getCanonicalPath(); - if (!canonicalPath.startsWith(parent.getCanonicalPath())) { // $hasTaintFlow - throw new IOException("Invalid directory: " + dir.getCanonicalPath()); + void foo5(File parent) throws IOException { + String canonicalPath = dir().getCanonicalPath(); + if (!canonicalPath.startsWith(parent.getCanonicalPath())) { // $ Alert + throw new IOException("Invalid directory: " + dir().getCanonicalPath()); } } - void foo6(File dir, File parent) throws IOException { - String canonicalPath = dir.getCanonicalPath(); - if (!canonicalPath.startsWith(parent.getCanonicalPath())) { // $hasTaintFlow - throw new IOException("Invalid directory: " + dir.getCanonicalPath()); + void foo6(File parent) throws IOException { + String canonicalPath = dir().getCanonicalPath(); + if (!canonicalPath.startsWith(parent.getCanonicalPath())) { // $ Alert + throw new IOException("Invalid directory: " + dir().getCanonicalPath()); } - String canonicalPath2 = dir.getCanonicalPath(); - if (!canonicalPath2.startsWith(parent.getCanonicalPath())) { // $hasTaintFlow - throw new IOException("Invalid directory: " + dir.getCanonicalPath()); + String canonicalPath2 = dir().getCanonicalPath(); + if (!canonicalPath2.startsWith(parent.getCanonicalPath())) { // $ Alert + throw new IOException("Invalid directory: " + dir().getCanonicalPath()); } } void foo7(File dir, File parent) throws IOException { - String canonicalPath = dir.getCanonicalPath(); - String canonicalPath2 = dir.getCanonicalPath(); - if (!canonicalPath.startsWith(parent.getCanonicalPath())) { // $hasTaintFlow - throw new IOException("Invalid directory: " + dir.getCanonicalPath()); + String canonicalPath = dir().getCanonicalPath(); + String canonicalPath2 = dir().getCanonicalPath(); + if (!canonicalPath.startsWith(parent.getCanonicalPath())) { // $ Alert + throw new IOException("Invalid directory: " + dir().getCanonicalPath()); } - if (!canonicalPath2.startsWith(parent.getCanonicalPath())) { // $hasTaintFlow - throw new IOException("Invalid directory: " + dir.getCanonicalPath()); + if (!canonicalPath2.startsWith(parent.getCanonicalPath())) { // $ Alert + throw new IOException("Invalid directory: " + dir().getCanonicalPath()); } } @@ -72,70 +75,70 @@ public class PartialPathTraversalTest { void foo8(File parent) throws IOException { String canonicalPath = getChild().getCanonicalPath(); - if (!canonicalPath.startsWith(parent.getCanonicalPath())) { + if (!canonicalPath.startsWith(parent.getCanonicalPath())) { throw new IOException("Invalid directory: " + getChild().getCanonicalPath()); } } - void foo9(File dir, File parent) throws IOException { - if (!dir.getCanonicalPath().startsWith(parent.getCanonicalPath() + File.separator)) { - throw new IOException("Invalid directory: " + dir.getCanonicalPath()); + void foo9(File parent) throws IOException { + if (!dir().getCanonicalPath().startsWith(parent.getCanonicalPath() + File.separator)) { + throw new IOException("Invalid directory: " + dir().getCanonicalPath()); } } - void foo10(File dir, File parent) throws IOException { - if (!dir.getCanonicalPath().startsWith(parent.getCanonicalPath() + File.separatorChar)) { - throw new IOException("Invalid directory: " + dir.getCanonicalPath()); + void foo10(File parent) throws IOException { + if (!dir().getCanonicalPath().startsWith(parent.getCanonicalPath() + File.separatorChar)) { + throw new IOException("Invalid directory: " + dir().getCanonicalPath()); } } - void foo11(File dir, File parent) throws IOException { + void foo11(File parent) throws IOException { String parentCanonical = parent.getCanonicalPath(); - if (!dir.getCanonicalPath().startsWith(parentCanonical)) { // $hasTaintFlow - throw new IOException("Invalid directory: " + dir.getCanonicalPath()); + if (!dir().getCanonicalPath().startsWith(parentCanonical)) { // $ Alert + throw new IOException("Invalid directory: " + dir().getCanonicalPath()); } } - void foo12(File dir, File parent) throws IOException { + void foo12(File parent) throws IOException { String parentCanonical = parent.getCanonicalPath(); String parentCanonical2 = parent.getCanonicalPath(); - if (!dir.getCanonicalPath().startsWith(parentCanonical)) { // $hasTaintFlow - throw new IOException("Invalid directory: " + dir.getCanonicalPath()); + if (!dir().getCanonicalPath().startsWith(parentCanonical)) { // $ Alert + throw new IOException("Invalid directory: " + dir().getCanonicalPath()); } - if (!dir.getCanonicalPath().startsWith(parentCanonical2)) { // $hasTaintFlow - throw new IOException("Invalid directory: " + dir.getCanonicalPath()); + if (!dir().getCanonicalPath().startsWith(parentCanonical2)) { // $ Alert + throw new IOException("Invalid directory: " + dir().getCanonicalPath()); } } - void foo13(File dir, File parent) throws IOException { + void foo13(File parent) throws IOException { String parentCanonical = parent.getCanonicalPath() + File.separatorChar; - if (!dir.getCanonicalPath().startsWith(parentCanonical)) { - throw new IOException("Invalid directory: " + dir.getCanonicalPath()); + if (!dir().getCanonicalPath().startsWith(parentCanonical)) { + throw new IOException("Invalid directory: " + dir().getCanonicalPath()); } } - void foo14(File dir, File parent) throws IOException { + void foo14(File parent) throws IOException { String parentCanonical = parent.getCanonicalPath() + separatorChar; - if (!dir.getCanonicalPath().startsWith(parentCanonical)) { - throw new IOException("Invalid directory: " + dir.getCanonicalPath()); + if (!dir().getCanonicalPath().startsWith(parentCanonical)) { + throw new IOException("Invalid directory: " + dir().getCanonicalPath()); } } void foo15(File dir, File parent) throws IOException { String parentCanonical = parent.getCanonicalPath() + File.separatorChar; String parentCanonical2 = parent.getCanonicalPath() + File.separatorChar; - if (!dir.getCanonicalPath().startsWith(parentCanonical)) { - throw new IOException("Invalid directory: " + dir.getCanonicalPath()); + if (!dir().getCanonicalPath().startsWith(parentCanonical)) { + throw new IOException("Invalid directory: " + dir().getCanonicalPath()); } - if (!dir.getCanonicalPath().startsWith(parentCanonical2)) { - throw new IOException("Invalid directory: " + dir.getCanonicalPath()); + if (!dir().getCanonicalPath().startsWith(parentCanonical2)) { + throw new IOException("Invalid directory: " + dir().getCanonicalPath()); } } - void foo16(File dir, File parent) throws IOException { + void foo16(File parent) throws IOException { String parentCanonical = parent.getCanonicalPath() + File.separator; - if (!dir.getCanonicalPath().startsWith(parentCanonical)) { - throw new IOException("Invalid directory: " + dir.getCanonicalPath()); + if (!dir().getCanonicalPath().startsWith(parentCanonical)) { + throw new IOException("Invalid directory: " + dir().getCanonicalPath()); } } @@ -145,7 +148,7 @@ public class PartialPathTraversalTest { "UnusedAssignment", "ResultOfMethodCallIgnored" }) - void foo17(File dir, File parent, boolean branch) throws IOException { + void foo17(File parent, boolean branch) throws IOException { String parentCanonical = null; "test ".startsWith("somethingElse"); if (branch) { @@ -153,8 +156,8 @@ public class PartialPathTraversalTest { } else { parentCanonical = parent.getCanonicalPath() + File.separatorChar; } - if (!dir.getCanonicalPath().startsWith(parentCanonical)) { - throw new IOException("Invalid directory: " + dir.getCanonicalPath()); + if (!dir().getCanonicalPath().startsWith(parentCanonical)) { + throw new IOException("Invalid directory: " + dir().getCanonicalPath()); } } @@ -163,24 +166,24 @@ public class PartialPathTraversalTest { if (branch) { parentCanonical = parent.getCanonicalPath() + File.separatorChar; } - if (!dir.getCanonicalPath().startsWith(parentCanonical)) { - throw new IOException("Invalid directory: " + dir.getCanonicalPath()); + if (!dir().getCanonicalPath().startsWith(parentCanonical)) { + throw new IOException("Invalid directory: " + dir().getCanonicalPath()); } } - void foo19(File dir, File parent) throws IOException { + void foo19(File parent) throws IOException { String parentCanonical = parent.getCanonicalPath() + "/potato"; - if (!dir.getCanonicalPath().startsWith(parentCanonical)) { // $hasTaintFlow - throw new IOException("Invalid directory: " + dir.getCanonicalPath()); + if (!dir().getCanonicalPath().startsWith(parentCanonical)) { // $ Alert + throw new IOException("Invalid directory: " + dir().getCanonicalPath()); } } private File cacheDir; - InputStream foo20(String... path) { + InputStream foo20() { StringBuilder sb = new StringBuilder(); sb.append(cacheDir.getAbsolutePath()); - for (String p : path) { + for (String p : path()) { sb.append(File.separatorChar); sb.append(p); } @@ -188,7 +191,7 @@ public class PartialPathTraversalTest { String filePath = sb.toString(); File encodedFile = new File(filePath); try { - if (!encodedFile.getCanonicalPath().startsWith(cacheDir.getCanonicalPath())) { // $hasTaintFlow + if (!encodedFile.getCanonicalPath().startsWith(cacheDir.getCanonicalPath())) { // $ Alert return null; } return Files.newInputStream(encodedFile.toPath()); @@ -197,37 +200,37 @@ public class PartialPathTraversalTest { } } - void foo21(File dir, File parent) throws IOException { + void foo21(File parent) throws IOException { String parentCanonical = parent.getCanonicalPath(); - if (!dir.getCanonicalPath().startsWith(parentCanonical + File.separator)) { - throw new IOException("Invalid directory: " + dir.getCanonicalPath()); + if (!dir().getCanonicalPath().startsWith(parentCanonical + File.separator)) { + throw new IOException("Invalid directory: " + dir().getCanonicalPath()); } } - void foo22(File dir, File dir2, File parent, boolean conditional) throws IOException { - String canonicalPath = conditional ? dir.getCanonicalPath() : dir2.getCanonicalPath(); - if (!canonicalPath.startsWith(parent.getCanonicalPath())) { // $hasTaintFlow - throw new IOException("Invalid directory: " + dir.getCanonicalPath()); + void foo22(File dir2, File parent, boolean conditional) throws IOException { + String canonicalPath = conditional ? dir().getCanonicalPath() : dir2.getCanonicalPath(); + if (!canonicalPath.startsWith(parent.getCanonicalPath())) { // $ Alert + throw new IOException("Invalid directory: " + dir().getCanonicalPath()); } } - void foo23(File dir, File parent) throws IOException { + void foo23(File parent) throws IOException { String parentCanonical = parent.getCanonicalPath(); - if (!dir.getCanonicalPath().startsWith(parentCanonical + "/")) { - throw new IOException("Invalid directory: " + dir.getCanonicalPath()); + if (!dir().getCanonicalPath().startsWith(parentCanonical + "/")) { + throw new IOException("Invalid directory: " + dir().getCanonicalPath()); } } - void foo24(File dir, File parent) throws IOException { + void foo24(File parent) throws IOException { String parentCanonical = parent.getCanonicalPath(); - if (!dir.getCanonicalPath().startsWith(parentCanonical + '/')) { - throw new IOException("Invalid directory: " + dir.getCanonicalPath()); + if (!dir().getCanonicalPath().startsWith(parentCanonical + '/')) { + throw new IOException("Invalid directory: " + dir().getCanonicalPath()); } } - public void doesNotFlagOptimalSafeVersion(File dir, File parent) throws IOException { - if (!dir.toPath().normalize().startsWith(parent.toPath())) { // Safe - throw new IOException("Path traversal attempt: " + dir.getCanonicalPath()); + public void doesNotFlagOptimalSafeVersion(File parent) throws IOException { + if (!dir().toPath().normalize().startsWith(parent.toPath())) { // Safe + throw new IOException("Path traversal attempt: " + dir().getCanonicalPath()); } } @@ -242,4 +245,19 @@ public class PartialPathTraversalTest { } } -} \ No newline at end of file + Socket sock; + + File dir() { + try { + BufferedReader filenameReader = new BufferedReader(new InputStreamReader(sock.getInputStream(), "UTF-8")); // $ Source + String filename = filenameReader.readLine(); + return new File(filename); + } catch (IOException e) { + throw new RuntimeException("Failed to read from socket", e); + } + } + + String[] path() { + return dir().getAbsolutePath().split(File.separator); + } +} diff --git a/java/ql/test/query-tests/security/CWE-074/JndiInjection/JndiInjectionTest.expected b/java/ql/test/query-tests/security/CWE-074/JndiInjection/JndiInjectionTest.expected new file mode 100644 index 00000000000..6855ccb2104 --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-074/JndiInjection/JndiInjectionTest.expected @@ -0,0 +1,308 @@ +#select +| JndiInjectionTest.java:36:16:36:22 | nameStr | JndiInjectionTest.java:32:38:32:65 | nameStr : String | JndiInjectionTest.java:36:16:36:22 | nameStr | JNDI lookup might include name from $@. | JndiInjectionTest.java:32:38:32:65 | nameStr | this user input | +| JndiInjectionTest.java:37:20:37:26 | nameStr | JndiInjectionTest.java:32:38:32:65 | nameStr : String | JndiInjectionTest.java:37:20:37:26 | nameStr | JNDI lookup might include name from $@. | JndiInjectionTest.java:32:38:32:65 | nameStr | this user input | +| JndiInjectionTest.java:38:29:38:35 | nameStr | JndiInjectionTest.java:32:38:32:65 | nameStr : String | JndiInjectionTest.java:38:29:38:35 | nameStr | JNDI lookup might include name from $@. | JndiInjectionTest.java:32:38:32:65 | nameStr | this user input | +| JndiInjectionTest.java:39:16:39:22 | nameStr | JndiInjectionTest.java:32:38:32:65 | nameStr : String | JndiInjectionTest.java:39:16:39:22 | nameStr | JNDI lookup might include name from $@. | JndiInjectionTest.java:32:38:32:65 | nameStr | this user input | +| JndiInjectionTest.java:40:14:40:20 | nameStr | JndiInjectionTest.java:32:38:32:65 | nameStr : String | JndiInjectionTest.java:40:14:40:20 | nameStr | JNDI lookup might include name from $@. | JndiInjectionTest.java:32:38:32:65 | nameStr | this user input | +| JndiInjectionTest.java:41:22:41:28 | nameStr | JndiInjectionTest.java:32:38:32:65 | nameStr : String | JndiInjectionTest.java:41:22:41:28 | nameStr | JNDI lookup might include name from $@. | JndiInjectionTest.java:32:38:32:65 | nameStr | this user input | +| JndiInjectionTest.java:43:16:43:19 | name | JndiInjectionTest.java:32:38:32:65 | nameStr : String | JndiInjectionTest.java:43:16:43:19 | name | JNDI lookup might include name from $@. | JndiInjectionTest.java:32:38:32:65 | nameStr | this user input | +| JndiInjectionTest.java:44:20:44:23 | name | JndiInjectionTest.java:32:38:32:65 | nameStr : String | JndiInjectionTest.java:44:20:44:23 | name | JNDI lookup might include name from $@. | JndiInjectionTest.java:32:38:32:65 | nameStr | this user input | +| JndiInjectionTest.java:45:29:45:32 | name | JndiInjectionTest.java:32:38:32:65 | nameStr : String | JndiInjectionTest.java:45:29:45:32 | name | JNDI lookup might include name from $@. | JndiInjectionTest.java:32:38:32:65 | nameStr | this user input | +| JndiInjectionTest.java:46:16:46:19 | name | JndiInjectionTest.java:32:38:32:65 | nameStr : String | JndiInjectionTest.java:46:16:46:19 | name | JNDI lookup might include name from $@. | JndiInjectionTest.java:32:38:32:65 | nameStr | this user input | +| JndiInjectionTest.java:47:14:47:17 | name | JndiInjectionTest.java:32:38:32:65 | nameStr : String | JndiInjectionTest.java:47:14:47:17 | name | JNDI lookup might include name from $@. | JndiInjectionTest.java:32:38:32:65 | nameStr | this user input | +| JndiInjectionTest.java:48:22:48:25 | name | JndiInjectionTest.java:32:38:32:65 | nameStr : String | JndiInjectionTest.java:48:22:48:25 | name | JNDI lookup might include name from $@. | JndiInjectionTest.java:32:38:32:65 | nameStr | this user input | +| JndiInjectionTest.java:56:16:56:22 | nameStr | JndiInjectionTest.java:52:34:52:61 | nameStr : String | JndiInjectionTest.java:56:16:56:22 | nameStr | JNDI lookup might include name from $@. | JndiInjectionTest.java:52:34:52:61 | nameStr | this user input | +| JndiInjectionTest.java:57:20:57:26 | nameStr | JndiInjectionTest.java:52:34:52:61 | nameStr : String | JndiInjectionTest.java:57:20:57:26 | nameStr | JNDI lookup might include name from $@. | JndiInjectionTest.java:52:34:52:61 | nameStr | this user input | +| JndiInjectionTest.java:58:16:58:22 | nameStr | JndiInjectionTest.java:52:34:52:61 | nameStr : String | JndiInjectionTest.java:58:16:58:22 | nameStr | JNDI lookup might include name from $@. | JndiInjectionTest.java:52:34:52:61 | nameStr | this user input | +| JndiInjectionTest.java:59:14:59:20 | nameStr | JndiInjectionTest.java:52:34:52:61 | nameStr : String | JndiInjectionTest.java:59:14:59:20 | nameStr | JNDI lookup might include name from $@. | JndiInjectionTest.java:52:34:52:61 | nameStr | this user input | +| JndiInjectionTest.java:60:22:60:28 | nameStr | JndiInjectionTest.java:52:34:52:61 | nameStr : String | JndiInjectionTest.java:60:22:60:28 | nameStr | JNDI lookup might include name from $@. | JndiInjectionTest.java:52:34:52:61 | nameStr | this user input | +| JndiInjectionTest.java:62:16:62:19 | name | JndiInjectionTest.java:52:34:52:61 | nameStr : String | JndiInjectionTest.java:62:16:62:19 | name | JNDI lookup might include name from $@. | JndiInjectionTest.java:52:34:52:61 | nameStr | this user input | +| JndiInjectionTest.java:63:20:63:23 | name | JndiInjectionTest.java:52:34:52:61 | nameStr : String | JndiInjectionTest.java:63:20:63:23 | name | JNDI lookup might include name from $@. | JndiInjectionTest.java:52:34:52:61 | nameStr | this user input | +| JndiInjectionTest.java:64:16:64:19 | name | JndiInjectionTest.java:52:34:52:61 | nameStr : String | JndiInjectionTest.java:64:16:64:19 | name | JNDI lookup might include name from $@. | JndiInjectionTest.java:52:34:52:61 | nameStr | this user input | +| JndiInjectionTest.java:65:14:65:17 | name | JndiInjectionTest.java:52:34:52:61 | nameStr : String | JndiInjectionTest.java:65:14:65:17 | name | JNDI lookup might include name from $@. | JndiInjectionTest.java:52:34:52:61 | nameStr | this user input | +| JndiInjectionTest.java:66:22:66:25 | name | JndiInjectionTest.java:52:34:52:61 | nameStr : String | JndiInjectionTest.java:66:22:66:25 | name | JNDI lookup might include name from $@. | JndiInjectionTest.java:52:34:52:61 | nameStr | this user input | +| JndiInjectionTest.java:70:16:70:22 | nameStr | JndiInjectionTest.java:52:34:52:61 | nameStr : String | JndiInjectionTest.java:70:16:70:22 | nameStr | JNDI lookup might include name from $@. | JndiInjectionTest.java:52:34:52:61 | nameStr | this user input | +| JndiInjectionTest.java:71:16:71:22 | nameStr | JndiInjectionTest.java:52:34:52:61 | nameStr : String | JndiInjectionTest.java:71:16:71:22 | nameStr | JNDI lookup might include name from $@. | JndiInjectionTest.java:52:34:52:61 | nameStr | this user input | +| JndiInjectionTest.java:74:16:74:22 | nameStr | JndiInjectionTest.java:52:34:52:61 | nameStr : String | JndiInjectionTest.java:74:16:74:22 | nameStr | JNDI lookup might include name from $@. | JndiInjectionTest.java:52:34:52:61 | nameStr | this user input | +| JndiInjectionTest.java:75:16:75:22 | nameStr | JndiInjectionTest.java:52:34:52:61 | nameStr : String | JndiInjectionTest.java:75:16:75:22 | nameStr | JNDI lookup might include name from $@. | JndiInjectionTest.java:52:34:52:61 | nameStr | this user input | +| JndiInjectionTest.java:87:16:87:22 | nameStr | JndiInjectionTest.java:83:42:83:69 | nameStr : String | JndiInjectionTest.java:87:16:87:22 | nameStr | JNDI lookup might include name from $@. | JndiInjectionTest.java:83:42:83:69 | nameStr | this user input | +| JndiInjectionTest.java:88:20:88:26 | nameStr | JndiInjectionTest.java:83:42:83:69 | nameStr : String | JndiInjectionTest.java:88:20:88:26 | nameStr | JNDI lookup might include name from $@. | JndiInjectionTest.java:83:42:83:69 | nameStr | this user input | +| JndiInjectionTest.java:89:16:89:22 | nameStr | JndiInjectionTest.java:83:42:83:69 | nameStr : String | JndiInjectionTest.java:89:16:89:22 | nameStr | JNDI lookup might include name from $@. | JndiInjectionTest.java:83:42:83:69 | nameStr | this user input | +| JndiInjectionTest.java:90:14:90:20 | nameStr | JndiInjectionTest.java:83:42:83:69 | nameStr : String | JndiInjectionTest.java:90:14:90:20 | nameStr | JNDI lookup might include name from $@. | JndiInjectionTest.java:83:42:83:69 | nameStr | this user input | +| JndiInjectionTest.java:91:22:91:28 | nameStr | JndiInjectionTest.java:83:42:83:69 | nameStr : String | JndiInjectionTest.java:91:22:91:28 | nameStr | JNDI lookup might include name from $@. | JndiInjectionTest.java:83:42:83:69 | nameStr | this user input | +| JndiInjectionTest.java:93:16:93:19 | name | JndiInjectionTest.java:83:42:83:69 | nameStr : String | JndiInjectionTest.java:93:16:93:19 | name | JNDI lookup might include name from $@. | JndiInjectionTest.java:83:42:83:69 | nameStr | this user input | +| JndiInjectionTest.java:94:20:94:23 | name | JndiInjectionTest.java:83:42:83:69 | nameStr : String | JndiInjectionTest.java:94:20:94:23 | name | JNDI lookup might include name from $@. | JndiInjectionTest.java:83:42:83:69 | nameStr | this user input | +| JndiInjectionTest.java:95:16:95:19 | name | JndiInjectionTest.java:83:42:83:69 | nameStr : String | JndiInjectionTest.java:95:16:95:19 | name | JNDI lookup might include name from $@. | JndiInjectionTest.java:83:42:83:69 | nameStr | this user input | +| JndiInjectionTest.java:96:14:96:17 | name | JndiInjectionTest.java:83:42:83:69 | nameStr : String | JndiInjectionTest.java:96:14:96:17 | name | JNDI lookup might include name from $@. | JndiInjectionTest.java:83:42:83:69 | nameStr | this user input | +| JndiInjectionTest.java:97:22:97:25 | name | JndiInjectionTest.java:83:42:83:69 | nameStr : String | JndiInjectionTest.java:97:22:97:25 | name | JNDI lookup might include name from $@. | JndiInjectionTest.java:83:42:83:69 | nameStr | this user input | +| JndiInjectionTest.java:104:16:104:22 | nameStr | JndiInjectionTest.java:101:42:101:69 | nameStr : String | JndiInjectionTest.java:104:16:104:22 | nameStr | JNDI lookup might include name from $@. | JndiInjectionTest.java:101:42:101:69 | nameStr | this user input | +| JndiInjectionTest.java:105:16:105:22 | nameStr | JndiInjectionTest.java:101:42:101:69 | nameStr : String | JndiInjectionTest.java:105:16:105:22 | nameStr | JNDI lookup might include name from $@. | JndiInjectionTest.java:101:42:101:69 | nameStr | this user input | +| JndiInjectionTest.java:113:16:113:19 | name | JndiInjectionTest.java:109:42:109:69 | nameStr : String | JndiInjectionTest.java:113:16:113:19 | name | JNDI lookup might include name from $@. | JndiInjectionTest.java:109:42:109:69 | nameStr | this user input | +| JndiInjectionTest.java:115:16:115:19 | name | JndiInjectionTest.java:109:42:109:69 | nameStr : String | JndiInjectionTest.java:115:16:115:19 | name | JNDI lookup might include name from $@. | JndiInjectionTest.java:109:42:109:69 | nameStr | this user input | +| JndiInjectionTest.java:117:16:117:19 | name | JndiInjectionTest.java:109:42:109:69 | nameStr : String | JndiInjectionTest.java:117:16:117:19 | name | JNDI lookup might include name from $@. | JndiInjectionTest.java:109:42:109:69 | nameStr | this user input | +| JndiInjectionTest.java:118:16:118:22 | nameStr | JndiInjectionTest.java:109:42:109:69 | nameStr : String | JndiInjectionTest.java:118:16:118:22 | nameStr | JNDI lookup might include name from $@. | JndiInjectionTest.java:109:42:109:69 | nameStr | this user input | +| JndiInjectionTest.java:120:16:120:22 | nameStr | JndiInjectionTest.java:109:42:109:69 | nameStr : String | JndiInjectionTest.java:120:16:120:22 | nameStr | JNDI lookup might include name from $@. | JndiInjectionTest.java:109:42:109:69 | nameStr | this user input | +| JndiInjectionTest.java:122:16:122:22 | nameStr | JndiInjectionTest.java:109:42:109:69 | nameStr : String | JndiInjectionTest.java:122:16:122:22 | nameStr | JNDI lookup might include name from $@. | JndiInjectionTest.java:109:42:109:69 | nameStr | this user input | +| JndiInjectionTest.java:123:23:123:26 | name | JndiInjectionTest.java:109:42:109:69 | nameStr : String | JndiInjectionTest.java:123:23:123:26 | name | JNDI lookup might include name from $@. | JndiInjectionTest.java:109:42:109:69 | nameStr | this user input | +| JndiInjectionTest.java:124:23:124:29 | nameStr | JndiInjectionTest.java:109:42:109:69 | nameStr : String | JndiInjectionTest.java:124:23:124:29 | nameStr | JNDI lookup might include name from $@. | JndiInjectionTest.java:109:42:109:69 | nameStr | this user input | +| JndiInjectionTest.java:125:18:125:21 | name | JndiInjectionTest.java:109:42:109:69 | nameStr : String | JndiInjectionTest.java:125:18:125:21 | name | JNDI lookup might include name from $@. | JndiInjectionTest.java:109:42:109:69 | nameStr | this user input | +| JndiInjectionTest.java:126:16:126:19 | name | JndiInjectionTest.java:109:42:109:69 | nameStr : String | JndiInjectionTest.java:126:16:126:19 | name | JNDI lookup might include name from $@. | JndiInjectionTest.java:109:42:109:69 | nameStr | this user input | +| JndiInjectionTest.java:127:14:127:17 | name | JndiInjectionTest.java:109:42:109:69 | nameStr : String | JndiInjectionTest.java:127:14:127:17 | name | JNDI lookup might include name from $@. | JndiInjectionTest.java:109:42:109:69 | nameStr | this user input | +| JndiInjectionTest.java:128:22:128:25 | name | JndiInjectionTest.java:109:42:109:69 | nameStr : String | JndiInjectionTest.java:128:22:128:25 | name | JNDI lookup might include name from $@. | JndiInjectionTest.java:109:42:109:69 | nameStr | this user input | +| JndiInjectionTest.java:129:16:129:22 | nameStr | JndiInjectionTest.java:109:42:109:69 | nameStr : String | JndiInjectionTest.java:129:16:129:22 | nameStr | JNDI lookup might include name from $@. | JndiInjectionTest.java:109:42:109:69 | nameStr | this user input | +| JndiInjectionTest.java:131:16:131:22 | nameStr | JndiInjectionTest.java:109:42:109:69 | nameStr : String | JndiInjectionTest.java:131:16:131:22 | nameStr | JNDI lookup might include name from $@. | JndiInjectionTest.java:109:42:109:69 | nameStr | this user input | +| JndiInjectionTest.java:132:16:132:22 | nameStr | JndiInjectionTest.java:109:42:109:69 | nameStr : String | JndiInjectionTest.java:132:16:132:22 | nameStr | JNDI lookup might include name from $@. | JndiInjectionTest.java:109:42:109:69 | nameStr | this user input | +| JndiInjectionTest.java:133:16:133:22 | nameStr | JndiInjectionTest.java:109:42:109:69 | nameStr : String | JndiInjectionTest.java:133:16:133:22 | nameStr | JNDI lookup might include name from $@. | JndiInjectionTest.java:109:42:109:69 | nameStr | this user input | +| JndiInjectionTest.java:134:16:134:22 | nameStr | JndiInjectionTest.java:109:42:109:69 | nameStr : String | JndiInjectionTest.java:134:16:134:22 | nameStr | JNDI lookup might include name from $@. | JndiInjectionTest.java:109:42:109:69 | nameStr | this user input | +| JndiInjectionTest.java:138:16:138:22 | nameStr | JndiInjectionTest.java:109:42:109:69 | nameStr : String | JndiInjectionTest.java:138:16:138:22 | nameStr | JNDI lookup might include name from $@. | JndiInjectionTest.java:109:42:109:69 | nameStr | this user input | +| JndiInjectionTest.java:139:16:139:22 | nameStr | JndiInjectionTest.java:109:42:109:69 | nameStr : String | JndiInjectionTest.java:139:16:139:22 | nameStr | JNDI lookup might include name from $@. | JndiInjectionTest.java:109:42:109:69 | nameStr | this user input | +| JndiInjectionTest.java:141:16:141:22 | nameStr | JndiInjectionTest.java:109:42:109:69 | nameStr : String | JndiInjectionTest.java:141:16:141:22 | nameStr | JNDI lookup might include name from $@. | JndiInjectionTest.java:109:42:109:69 | nameStr | this user input | +| JndiInjectionTest.java:142:16:142:22 | nameStr | JndiInjectionTest.java:109:42:109:69 | nameStr : String | JndiInjectionTest.java:142:16:142:22 | nameStr | JNDI lookup might include name from $@. | JndiInjectionTest.java:109:42:109:69 | nameStr | this user input | +| JndiInjectionTest.java:144:16:144:22 | nameStr | JndiInjectionTest.java:109:42:109:69 | nameStr : String | JndiInjectionTest.java:144:16:144:22 | nameStr | JNDI lookup might include name from $@. | JndiInjectionTest.java:109:42:109:69 | nameStr | this user input | +| JndiInjectionTest.java:145:16:145:22 | nameStr | JndiInjectionTest.java:109:42:109:69 | nameStr : String | JndiInjectionTest.java:145:16:145:22 | nameStr | JNDI lookup might include name from $@. | JndiInjectionTest.java:109:42:109:69 | nameStr | this user input | +| JndiInjectionTest.java:149:16:149:22 | nameStr | JndiInjectionTest.java:109:42:109:69 | nameStr : String | JndiInjectionTest.java:149:16:149:22 | nameStr | JNDI lookup might include name from $@. | JndiInjectionTest.java:109:42:109:69 | nameStr | this user input | +| JndiInjectionTest.java:150:16:150:22 | nameStr | JndiInjectionTest.java:109:42:109:69 | nameStr : String | JndiInjectionTest.java:150:16:150:22 | nameStr | JNDI lookup might include name from $@. | JndiInjectionTest.java:109:42:109:69 | nameStr | this user input | +| JndiInjectionTest.java:152:16:152:22 | nameStr | JndiInjectionTest.java:109:42:109:69 | nameStr : String | JndiInjectionTest.java:152:16:152:22 | nameStr | JNDI lookup might include name from $@. | JndiInjectionTest.java:109:42:109:69 | nameStr | this user input | +| JndiInjectionTest.java:153:16:153:22 | nameStr | JndiInjectionTest.java:109:42:109:69 | nameStr : String | JndiInjectionTest.java:153:16:153:22 | nameStr | JNDI lookup might include name from $@. | JndiInjectionTest.java:109:42:109:69 | nameStr | this user input | +| JndiInjectionTest.java:155:16:155:22 | nameStr | JndiInjectionTest.java:109:42:109:69 | nameStr : String | JndiInjectionTest.java:155:16:155:22 | nameStr | JNDI lookup might include name from $@. | JndiInjectionTest.java:109:42:109:69 | nameStr | this user input | +| JndiInjectionTest.java:156:16:156:22 | nameStr | JndiInjectionTest.java:109:42:109:69 | nameStr : String | JndiInjectionTest.java:156:16:156:22 | nameStr | JNDI lookup might include name from $@. | JndiInjectionTest.java:109:42:109:69 | nameStr | this user input | +| JndiInjectionTest.java:170:25:170:31 | nameStr | JndiInjectionTest.java:109:42:109:69 | nameStr : String | JndiInjectionTest.java:170:25:170:31 | nameStr | JNDI lookup might include name from $@. | JndiInjectionTest.java:109:42:109:69 | nameStr | this user input | +| JndiInjectionTest.java:177:16:177:22 | nameStr | JndiInjectionTest.java:174:41:174:68 | nameStr : String | JndiInjectionTest.java:177:16:177:22 | nameStr | JNDI lookup might include name from $@. | JndiInjectionTest.java:174:41:174:68 | nameStr | this user input | +| JndiInjectionTest.java:178:16:178:22 | nameStr | JndiInjectionTest.java:174:41:174:68 | nameStr : String | JndiInjectionTest.java:178:16:178:22 | nameStr | JNDI lookup might include name from $@. | JndiInjectionTest.java:174:41:174:68 | nameStr | this user input | +| JndiInjectionTest.java:183:33:183:57 | new JMXServiceURL(...) | JndiInjectionTest.java:182:37:182:63 | urlStr : String | JndiInjectionTest.java:183:33:183:57 | new JMXServiceURL(...) | JNDI lookup might include name from $@. | JndiInjectionTest.java:182:37:182:63 | urlStr | this user input | +| JndiInjectionTest.java:187:5:187:13 | connector | JndiInjectionTest.java:182:37:182:63 | urlStr : String | JndiInjectionTest.java:187:5:187:13 | connector | JNDI lookup might include name from $@. | JndiInjectionTest.java:182:37:182:63 | urlStr | this user input | +| JndiInjectionTest.java:194:35:194:40 | urlStr | JndiInjectionTest.java:191:27:191:53 | urlStr : String | JndiInjectionTest.java:194:35:194:40 | urlStr | JNDI lookup might include name from $@. | JndiInjectionTest.java:191:27:191:53 | urlStr | this user input | +| JndiInjectionTest.java:202:41:202:46 | urlStr | JndiInjectionTest.java:199:27:199:53 | urlStr : String | JndiInjectionTest.java:202:41:202:46 | urlStr | JNDI lookup might include name from $@. | JndiInjectionTest.java:199:27:199:53 | urlStr | this user input | +| JndiInjectionTest.java:211:37:211:42 | urlStr | JndiInjectionTest.java:207:52:207:78 | urlStr : String | JndiInjectionTest.java:211:37:211:42 | urlStr | JNDI lookup might include name from $@. | JndiInjectionTest.java:207:52:207:78 | urlStr | this user input | +| JndiInjectionTest.java:221:51:221:56 | urlStr | JndiInjectionTest.java:216:52:216:78 | urlStr : String | JndiInjectionTest.java:221:51:221:56 | urlStr | JNDI lookup might include name from $@. | JndiInjectionTest.java:216:52:216:78 | urlStr | this user input | +| JndiInjectionTest.java:231:51:231:56 | urlStr | JndiInjectionTest.java:226:52:226:78 | urlStr : String | JndiInjectionTest.java:231:51:231:56 | urlStr | JNDI lookup might include name from $@. | JndiInjectionTest.java:226:52:226:78 | urlStr | this user input | +edges +| JndiInjectionTest.java:32:38:32:65 | nameStr : String | JndiInjectionTest.java:33:35:33:41 | nameStr : String | provenance | | +| JndiInjectionTest.java:33:17:33:42 | new CompositeName(...) : CompositeName | JndiInjectionTest.java:43:16:43:19 | name | provenance | Sink:MaD:6 | +| JndiInjectionTest.java:33:17:33:42 | new CompositeName(...) : CompositeName | JndiInjectionTest.java:44:20:44:23 | name | provenance | Sink:MaD:7 | +| JndiInjectionTest.java:33:17:33:42 | new CompositeName(...) : CompositeName | JndiInjectionTest.java:45:29:45:32 | name | provenance | Sink:MaD:9 | +| JndiInjectionTest.java:33:17:33:42 | new CompositeName(...) : CompositeName | JndiInjectionTest.java:46:16:46:19 | name | provenance | Sink:MaD:8 | +| JndiInjectionTest.java:33:17:33:42 | new CompositeName(...) : CompositeName | JndiInjectionTest.java:47:14:47:17 | name | provenance | Sink:MaD:4 | +| JndiInjectionTest.java:33:17:33:42 | new CompositeName(...) : CompositeName | JndiInjectionTest.java:48:22:48:25 | name | provenance | Sink:MaD:5 | +| JndiInjectionTest.java:33:35:33:41 | nameStr : String | JndiInjectionTest.java:33:17:33:42 | new CompositeName(...) : CompositeName | provenance | Config | +| JndiInjectionTest.java:33:35:33:41 | nameStr : String | JndiInjectionTest.java:36:16:36:22 | nameStr | provenance | Sink:MaD:6 | +| JndiInjectionTest.java:33:35:33:41 | nameStr : String | JndiInjectionTest.java:37:20:37:26 | nameStr | provenance | Sink:MaD:7 | +| JndiInjectionTest.java:33:35:33:41 | nameStr : String | JndiInjectionTest.java:38:29:38:35 | nameStr | provenance | Sink:MaD:9 | +| JndiInjectionTest.java:33:35:33:41 | nameStr : String | JndiInjectionTest.java:39:16:39:22 | nameStr | provenance | Sink:MaD:8 | +| JndiInjectionTest.java:33:35:33:41 | nameStr : String | JndiInjectionTest.java:40:14:40:20 | nameStr | provenance | Sink:MaD:4 | +| JndiInjectionTest.java:33:35:33:41 | nameStr : String | JndiInjectionTest.java:41:22:41:28 | nameStr | provenance | Sink:MaD:5 | +| JndiInjectionTest.java:52:34:52:61 | nameStr : String | JndiInjectionTest.java:53:34:53:40 | nameStr : String | provenance | | +| JndiInjectionTest.java:53:17:53:59 | new CompoundName(...) : CompoundName | JndiInjectionTest.java:62:16:62:19 | name | provenance | Sink:MaD:6 | +| JndiInjectionTest.java:53:17:53:59 | new CompoundName(...) : CompoundName | JndiInjectionTest.java:63:20:63:23 | name | provenance | Sink:MaD:7 | +| JndiInjectionTest.java:53:17:53:59 | new CompoundName(...) : CompoundName | JndiInjectionTest.java:64:16:64:19 | name | provenance | Sink:MaD:8 | +| JndiInjectionTest.java:53:17:53:59 | new CompoundName(...) : CompoundName | JndiInjectionTest.java:65:14:65:17 | name | provenance | Sink:MaD:4 | +| JndiInjectionTest.java:53:17:53:59 | new CompoundName(...) : CompoundName | JndiInjectionTest.java:66:22:66:25 | name | provenance | Sink:MaD:5 | +| JndiInjectionTest.java:53:34:53:40 | nameStr : String | JndiInjectionTest.java:53:17:53:59 | new CompoundName(...) : CompoundName | provenance | Config | +| JndiInjectionTest.java:53:34:53:40 | nameStr : String | JndiInjectionTest.java:56:16:56:22 | nameStr | provenance | Sink:MaD:6 | +| JndiInjectionTest.java:53:34:53:40 | nameStr : String | JndiInjectionTest.java:57:20:57:26 | nameStr | provenance | Sink:MaD:7 | +| JndiInjectionTest.java:53:34:53:40 | nameStr : String | JndiInjectionTest.java:58:16:58:22 | nameStr | provenance | Sink:MaD:8 | +| JndiInjectionTest.java:53:34:53:40 | nameStr : String | JndiInjectionTest.java:59:14:59:20 | nameStr | provenance | Sink:MaD:4 | +| JndiInjectionTest.java:53:34:53:40 | nameStr : String | JndiInjectionTest.java:60:22:60:28 | nameStr | provenance | Sink:MaD:5 | +| JndiInjectionTest.java:53:34:53:40 | nameStr : String | JndiInjectionTest.java:70:16:70:22 | nameStr | provenance | Sink:MaD:3 | +| JndiInjectionTest.java:53:34:53:40 | nameStr : String | JndiInjectionTest.java:71:16:71:22 | nameStr | provenance | Sink:MaD:3 | +| JndiInjectionTest.java:53:34:53:40 | nameStr : String | JndiInjectionTest.java:74:16:74:22 | nameStr | provenance | Sink:MaD:3 | +| JndiInjectionTest.java:53:34:53:40 | nameStr : String | JndiInjectionTest.java:75:16:75:22 | nameStr | provenance | Sink:MaD:3 | +| JndiInjectionTest.java:83:42:83:69 | nameStr : String | JndiInjectionTest.java:84:35:84:41 | nameStr : String | provenance | | +| JndiInjectionTest.java:84:17:84:42 | new CompositeName(...) : CompositeName | JndiInjectionTest.java:93:16:93:19 | name | provenance | Sink:MaD:6 | +| JndiInjectionTest.java:84:17:84:42 | new CompositeName(...) : CompositeName | JndiInjectionTest.java:94:20:94:23 | name | provenance | Sink:MaD:7 | +| JndiInjectionTest.java:84:17:84:42 | new CompositeName(...) : CompositeName | JndiInjectionTest.java:95:16:95:19 | name | provenance | Sink:MaD:8 | +| JndiInjectionTest.java:84:17:84:42 | new CompositeName(...) : CompositeName | JndiInjectionTest.java:96:14:96:17 | name | provenance | Sink:MaD:4 | +| JndiInjectionTest.java:84:17:84:42 | new CompositeName(...) : CompositeName | JndiInjectionTest.java:97:22:97:25 | name | provenance | Sink:MaD:5 | +| JndiInjectionTest.java:84:35:84:41 | nameStr : String | JndiInjectionTest.java:84:17:84:42 | new CompositeName(...) : CompositeName | provenance | Config | +| JndiInjectionTest.java:84:35:84:41 | nameStr : String | JndiInjectionTest.java:87:16:87:22 | nameStr | provenance | Sink:MaD:6 | +| JndiInjectionTest.java:84:35:84:41 | nameStr : String | JndiInjectionTest.java:88:20:88:26 | nameStr | provenance | Sink:MaD:7 | +| JndiInjectionTest.java:84:35:84:41 | nameStr : String | JndiInjectionTest.java:89:16:89:22 | nameStr | provenance | Sink:MaD:8 | +| JndiInjectionTest.java:84:35:84:41 | nameStr : String | JndiInjectionTest.java:90:14:90:20 | nameStr | provenance | Sink:MaD:4 | +| JndiInjectionTest.java:84:35:84:41 | nameStr : String | JndiInjectionTest.java:91:22:91:28 | nameStr | provenance | Sink:MaD:5 | +| JndiInjectionTest.java:101:42:101:69 | nameStr : String | JndiInjectionTest.java:104:16:104:22 | nameStr | provenance | Sink:MaD:11 | +| JndiInjectionTest.java:101:42:101:69 | nameStr : String | JndiInjectionTest.java:105:16:105:22 | nameStr | provenance | Sink:MaD:11 | +| JndiInjectionTest.java:109:42:109:69 | nameStr : String | JndiInjectionTest.java:111:41:111:47 | nameStr : String | provenance | | +| JndiInjectionTest.java:111:17:111:48 | add(...) : Name | JndiInjectionTest.java:113:16:113:19 | name | provenance | Sink:MaD:15 | +| JndiInjectionTest.java:111:17:111:48 | add(...) : Name | JndiInjectionTest.java:115:16:115:19 | name | provenance | Sink:MaD:16 | +| JndiInjectionTest.java:111:17:111:48 | add(...) : Name | JndiInjectionTest.java:117:16:117:19 | name | provenance | Sink:MaD:17 | +| JndiInjectionTest.java:111:17:111:48 | add(...) : Name | JndiInjectionTest.java:123:23:123:26 | name | provenance | Sink:MaD:21 | +| JndiInjectionTest.java:111:17:111:48 | add(...) : Name | JndiInjectionTest.java:125:18:125:21 | name | provenance | Sink:MaD:12 | +| JndiInjectionTest.java:111:17:111:48 | add(...) : Name | JndiInjectionTest.java:126:16:126:19 | name | provenance | Sink:MaD:22 | +| JndiInjectionTest.java:111:17:111:48 | add(...) : Name | JndiInjectionTest.java:127:14:127:17 | name | provenance | Sink:MaD:13 | +| JndiInjectionTest.java:111:17:111:48 | add(...) : Name | JndiInjectionTest.java:128:22:128:25 | name | provenance | Sink:MaD:14 | +| JndiInjectionTest.java:111:41:111:47 | nameStr : String | JndiInjectionTest.java:111:17:111:48 | add(...) : Name | provenance | Config | +| JndiInjectionTest.java:111:41:111:47 | nameStr : String | JndiInjectionTest.java:118:16:118:22 | nameStr | provenance | Sink:MaD:18 | +| JndiInjectionTest.java:111:41:111:47 | nameStr : String | JndiInjectionTest.java:120:16:120:22 | nameStr | provenance | Sink:MaD:19 | +| JndiInjectionTest.java:111:41:111:47 | nameStr : String | JndiInjectionTest.java:122:16:122:22 | nameStr | provenance | Sink:MaD:20 | +| JndiInjectionTest.java:111:41:111:47 | nameStr : String | JndiInjectionTest.java:124:23:124:29 | nameStr | provenance | Sink:MaD:21 | +| JndiInjectionTest.java:111:41:111:47 | nameStr : String | JndiInjectionTest.java:129:16:129:22 | nameStr | provenance | | +| JndiInjectionTest.java:111:41:111:47 | nameStr : String | JndiInjectionTest.java:131:16:131:22 | nameStr | provenance | Sink:MaD:27 | +| JndiInjectionTest.java:111:41:111:47 | nameStr : String | JndiInjectionTest.java:132:16:132:22 | nameStr | provenance | Sink:MaD:25 | +| JndiInjectionTest.java:111:41:111:47 | nameStr : String | JndiInjectionTest.java:132:16:132:22 | nameStr | provenance | Sink:MaD:27 | +| JndiInjectionTest.java:111:41:111:47 | nameStr : String | JndiInjectionTest.java:133:16:133:22 | nameStr | provenance | Sink:MaD:24 | +| JndiInjectionTest.java:111:41:111:47 | nameStr : String | JndiInjectionTest.java:133:16:133:22 | nameStr | provenance | Sink:MaD:27 | +| JndiInjectionTest.java:111:41:111:47 | nameStr : String | JndiInjectionTest.java:134:16:134:22 | nameStr | provenance | Sink:MaD:23 | +| JndiInjectionTest.java:111:41:111:47 | nameStr : String | JndiInjectionTest.java:134:16:134:22 | nameStr | provenance | Sink:MaD:27 | +| JndiInjectionTest.java:111:41:111:47 | nameStr : String | JndiInjectionTest.java:138:16:138:22 | nameStr | provenance | Sink:MaD:27 | +| JndiInjectionTest.java:111:41:111:47 | nameStr : String | JndiInjectionTest.java:139:16:139:22 | nameStr | provenance | Sink:MaD:27 | +| JndiInjectionTest.java:111:41:111:47 | nameStr : String | JndiInjectionTest.java:141:16:141:22 | nameStr | provenance | Sink:MaD:27 | +| JndiInjectionTest.java:111:41:111:47 | nameStr : String | JndiInjectionTest.java:142:16:142:22 | nameStr | provenance | Sink:MaD:27 | +| JndiInjectionTest.java:111:41:111:47 | nameStr : String | JndiInjectionTest.java:144:16:144:22 | nameStr | provenance | Sink:MaD:27 | +| JndiInjectionTest.java:111:41:111:47 | nameStr : String | JndiInjectionTest.java:145:16:145:22 | nameStr | provenance | Sink:MaD:27 | +| JndiInjectionTest.java:111:41:111:47 | nameStr : String | JndiInjectionTest.java:149:16:149:22 | nameStr | provenance | Sink:MaD:27 | +| JndiInjectionTest.java:111:41:111:47 | nameStr : String | JndiInjectionTest.java:150:16:150:22 | nameStr | provenance | Sink:MaD:27 | +| JndiInjectionTest.java:111:41:111:47 | nameStr : String | JndiInjectionTest.java:152:16:152:22 | nameStr | provenance | Sink:MaD:27 | +| JndiInjectionTest.java:111:41:111:47 | nameStr : String | JndiInjectionTest.java:153:16:153:22 | nameStr | provenance | Sink:MaD:27 | +| JndiInjectionTest.java:111:41:111:47 | nameStr : String | JndiInjectionTest.java:155:16:155:22 | nameStr | provenance | Sink:MaD:27 | +| JndiInjectionTest.java:111:41:111:47 | nameStr : String | JndiInjectionTest.java:156:16:156:22 | nameStr | provenance | Sink:MaD:27 | +| JndiInjectionTest.java:111:41:111:47 | nameStr : String | JndiInjectionTest.java:170:25:170:31 | nameStr | provenance | Sink:MaD:26 | +| JndiInjectionTest.java:111:41:111:47 | nameStr : String | JndiInjectionTest.java:170:25:170:31 | nameStr | provenance | Sink:MaD:28 | +| JndiInjectionTest.java:174:41:174:68 | nameStr : String | JndiInjectionTest.java:177:16:177:22 | nameStr | provenance | Sink:MaD:10 | +| JndiInjectionTest.java:174:41:174:68 | nameStr : String | JndiInjectionTest.java:178:16:178:22 | nameStr | provenance | Sink:MaD:10 | +| JndiInjectionTest.java:182:37:182:63 | urlStr : String | JndiInjectionTest.java:183:51:183:56 | urlStr : String | provenance | | +| JndiInjectionTest.java:183:51:183:56 | urlStr : String | JndiInjectionTest.java:183:33:183:57 | new JMXServiceURL(...) | provenance | Config Sink:MaD:2 | +| JndiInjectionTest.java:183:51:183:56 | urlStr : String | JndiInjectionTest.java:185:43:185:48 | urlStr : String | provenance | | +| JndiInjectionTest.java:185:25:185:49 | new JMXServiceURL(...) : JMXServiceURL | JndiInjectionTest.java:186:66:186:68 | url : JMXServiceURL | provenance | | +| JndiInjectionTest.java:185:43:185:48 | urlStr : String | JndiInjectionTest.java:185:25:185:49 | new JMXServiceURL(...) : JMXServiceURL | provenance | Config | +| JndiInjectionTest.java:186:30:186:75 | newJMXConnector(...) : JMXConnector | JndiInjectionTest.java:187:5:187:13 | connector | provenance | Sink:MaD:1 | +| JndiInjectionTest.java:186:66:186:68 | url : JMXServiceURL | JndiInjectionTest.java:186:30:186:75 | newJMXConnector(...) : JMXConnector | provenance | Config | +| JndiInjectionTest.java:186:66:186:68 | url : JMXServiceURL | JndiInjectionTest.java:186:30:186:75 | newJMXConnector(...) : JMXConnector | provenance | MaD:29 | +| JndiInjectionTest.java:191:27:191:53 | urlStr : String | JndiInjectionTest.java:194:35:194:40 | urlStr | provenance | | +| JndiInjectionTest.java:199:27:199:53 | urlStr : String | JndiInjectionTest.java:202:41:202:46 | urlStr | provenance | | +| JndiInjectionTest.java:207:52:207:78 | urlStr : String | JndiInjectionTest.java:211:37:211:42 | urlStr | provenance | | +| JndiInjectionTest.java:216:52:216:78 | urlStr : String | JndiInjectionTest.java:221:51:221:56 | urlStr | provenance | | +| JndiInjectionTest.java:226:52:226:78 | urlStr : String | JndiInjectionTest.java:231:51:231:56 | urlStr | provenance | | +models +| 1 | Sink: javax.management.remote; JMXConnector; true; connect; ; ; Argument[this]; jndi-injection; manual | +| 2 | Sink: javax.management.remote; JMXConnectorFactory; false; connect; ; ; Argument[0]; jndi-injection; manual | +| 3 | Sink: javax.naming.directory; DirContext; true; search; ; ; Argument[0..1]; ldap-injection; manual | +| 4 | Sink: javax.naming; Context; true; list; ; ; Argument[0]; jndi-injection; manual | +| 5 | Sink: javax.naming; Context; true; listBindings; ; ; Argument[0]; jndi-injection; manual | +| 6 | Sink: javax.naming; Context; true; lookup; ; ; Argument[0]; jndi-injection; manual | +| 7 | Sink: javax.naming; Context; true; lookupLink; ; ; Argument[0]; jndi-injection; manual | +| 8 | Sink: javax.naming; Context; true; rename; ; ; Argument[0]; jndi-injection; manual | +| 9 | Sink: javax.naming; InitialContext; true; doLookup; ; ; Argument[0]; jndi-injection; manual | +| 10 | Sink: org.apache.shiro.jndi; JndiTemplate; false; lookup; ; ; Argument[0]; jndi-injection; manual | +| 11 | Sink: org.springframework.jndi; JndiTemplate; false; lookup; ; ; Argument[0]; jndi-injection; manual | +| 12 | Sink: org.springframework.ldap.core; LdapOperations; true; findByDn; ; ; Argument[0]; jndi-injection; manual | +| 13 | Sink: org.springframework.ldap.core; LdapOperations; true; list; ; ; Argument[0]; jndi-injection; manual | +| 14 | Sink: org.springframework.ldap.core; LdapOperations; true; listBindings; ; ; Argument[0]; jndi-injection; manual | +| 15 | Sink: org.springframework.ldap.core; LdapOperations; true; lookup; (Name); ; Argument[0]; jndi-injection; manual | +| 16 | Sink: org.springframework.ldap.core; LdapOperations; true; lookup; (Name,ContextMapper); ; Argument[0]; jndi-injection; manual | +| 17 | Sink: org.springframework.ldap.core; LdapOperations; true; lookup; (Name,String[],ContextMapper); ; Argument[0]; jndi-injection; manual | +| 18 | Sink: org.springframework.ldap.core; LdapOperations; true; lookup; (String); ; Argument[0]; jndi-injection; manual | +| 19 | Sink: org.springframework.ldap.core; LdapOperations; true; lookup; (String,ContextMapper); ; Argument[0]; jndi-injection; manual | +| 20 | Sink: org.springframework.ldap.core; LdapOperations; true; lookup; (String,String[],ContextMapper); ; Argument[0]; jndi-injection; manual | +| 21 | Sink: org.springframework.ldap.core; LdapOperations; true; lookupContext; ; ; Argument[0]; jndi-injection; manual | +| 22 | Sink: org.springframework.ldap.core; LdapOperations; true; rename; ; ; Argument[0]; jndi-injection; manual | +| 23 | Sink: org.springframework.ldap.core; LdapOperations; true; search; (String,String,ContextMapper); ; Argument[0]; jndi-injection; manual | +| 24 | Sink: org.springframework.ldap.core; LdapOperations; true; search; (String,String,int,ContextMapper); ; Argument[0]; jndi-injection; manual | +| 25 | Sink: org.springframework.ldap.core; LdapOperations; true; search; (String,String,int,String[],ContextMapper); ; Argument[0]; jndi-injection; manual | +| 26 | Sink: org.springframework.ldap.core; LdapOperations; true; searchForObject; (String,String,ContextMapper); ; Argument[0]; jndi-injection; manual | +| 27 | Sink: org.springframework.ldap.core; LdapTemplate; false; search; ; ; Argument[0..1]; ldap-injection; manual | +| 28 | Sink: org.springframework.ldap.core; LdapTemplate; false; searchForObject; ; ; Argument[0..1]; ldap-injection; manual | +| 29 | Summary: javax.management.remote; JMXConnectorFactory; true; newJMXConnector; (JMXServiceURL,Map); ; Argument[0]; ReturnValue; taint; df-generated | +nodes +| JndiInjectionTest.java:32:38:32:65 | nameStr : String | semmle.label | nameStr : String | +| JndiInjectionTest.java:33:17:33:42 | new CompositeName(...) : CompositeName | semmle.label | new CompositeName(...) : CompositeName | +| JndiInjectionTest.java:33:35:33:41 | nameStr : String | semmle.label | nameStr : String | +| JndiInjectionTest.java:36:16:36:22 | nameStr | semmle.label | nameStr | +| JndiInjectionTest.java:37:20:37:26 | nameStr | semmle.label | nameStr | +| JndiInjectionTest.java:38:29:38:35 | nameStr | semmle.label | nameStr | +| JndiInjectionTest.java:39:16:39:22 | nameStr | semmle.label | nameStr | +| JndiInjectionTest.java:40:14:40:20 | nameStr | semmle.label | nameStr | +| JndiInjectionTest.java:41:22:41:28 | nameStr | semmle.label | nameStr | +| JndiInjectionTest.java:43:16:43:19 | name | semmle.label | name | +| JndiInjectionTest.java:44:20:44:23 | name | semmle.label | name | +| JndiInjectionTest.java:45:29:45:32 | name | semmle.label | name | +| JndiInjectionTest.java:46:16:46:19 | name | semmle.label | name | +| JndiInjectionTest.java:47:14:47:17 | name | semmle.label | name | +| JndiInjectionTest.java:48:22:48:25 | name | semmle.label | name | +| JndiInjectionTest.java:52:34:52:61 | nameStr : String | semmle.label | nameStr : String | +| JndiInjectionTest.java:53:17:53:59 | new CompoundName(...) : CompoundName | semmle.label | new CompoundName(...) : CompoundName | +| JndiInjectionTest.java:53:34:53:40 | nameStr : String | semmle.label | nameStr : String | +| JndiInjectionTest.java:56:16:56:22 | nameStr | semmle.label | nameStr | +| JndiInjectionTest.java:57:20:57:26 | nameStr | semmle.label | nameStr | +| JndiInjectionTest.java:58:16:58:22 | nameStr | semmle.label | nameStr | +| JndiInjectionTest.java:59:14:59:20 | nameStr | semmle.label | nameStr | +| JndiInjectionTest.java:60:22:60:28 | nameStr | semmle.label | nameStr | +| JndiInjectionTest.java:62:16:62:19 | name | semmle.label | name | +| JndiInjectionTest.java:63:20:63:23 | name | semmle.label | name | +| JndiInjectionTest.java:64:16:64:19 | name | semmle.label | name | +| JndiInjectionTest.java:65:14:65:17 | name | semmle.label | name | +| JndiInjectionTest.java:66:22:66:25 | name | semmle.label | name | +| JndiInjectionTest.java:70:16:70:22 | nameStr | semmle.label | nameStr | +| JndiInjectionTest.java:71:16:71:22 | nameStr | semmle.label | nameStr | +| JndiInjectionTest.java:74:16:74:22 | nameStr | semmle.label | nameStr | +| JndiInjectionTest.java:75:16:75:22 | nameStr | semmle.label | nameStr | +| JndiInjectionTest.java:83:42:83:69 | nameStr : String | semmle.label | nameStr : String | +| JndiInjectionTest.java:84:17:84:42 | new CompositeName(...) : CompositeName | semmle.label | new CompositeName(...) : CompositeName | +| JndiInjectionTest.java:84:35:84:41 | nameStr : String | semmle.label | nameStr : String | +| JndiInjectionTest.java:87:16:87:22 | nameStr | semmle.label | nameStr | +| JndiInjectionTest.java:88:20:88:26 | nameStr | semmle.label | nameStr | +| JndiInjectionTest.java:89:16:89:22 | nameStr | semmle.label | nameStr | +| JndiInjectionTest.java:90:14:90:20 | nameStr | semmle.label | nameStr | +| JndiInjectionTest.java:91:22:91:28 | nameStr | semmle.label | nameStr | +| JndiInjectionTest.java:93:16:93:19 | name | semmle.label | name | +| JndiInjectionTest.java:94:20:94:23 | name | semmle.label | name | +| JndiInjectionTest.java:95:16:95:19 | name | semmle.label | name | +| JndiInjectionTest.java:96:14:96:17 | name | semmle.label | name | +| JndiInjectionTest.java:97:22:97:25 | name | semmle.label | name | +| JndiInjectionTest.java:101:42:101:69 | nameStr : String | semmle.label | nameStr : String | +| JndiInjectionTest.java:104:16:104:22 | nameStr | semmle.label | nameStr | +| JndiInjectionTest.java:105:16:105:22 | nameStr | semmle.label | nameStr | +| JndiInjectionTest.java:109:42:109:69 | nameStr : String | semmle.label | nameStr : String | +| JndiInjectionTest.java:111:17:111:48 | add(...) : Name | semmle.label | add(...) : Name | +| JndiInjectionTest.java:111:41:111:47 | nameStr : String | semmle.label | nameStr : String | +| JndiInjectionTest.java:113:16:113:19 | name | semmle.label | name | +| JndiInjectionTest.java:115:16:115:19 | name | semmle.label | name | +| JndiInjectionTest.java:117:16:117:19 | name | semmle.label | name | +| JndiInjectionTest.java:118:16:118:22 | nameStr | semmle.label | nameStr | +| JndiInjectionTest.java:120:16:120:22 | nameStr | semmle.label | nameStr | +| JndiInjectionTest.java:122:16:122:22 | nameStr | semmle.label | nameStr | +| JndiInjectionTest.java:123:23:123:26 | name | semmle.label | name | +| JndiInjectionTest.java:124:23:124:29 | nameStr | semmle.label | nameStr | +| JndiInjectionTest.java:125:18:125:21 | name | semmle.label | name | +| JndiInjectionTest.java:126:16:126:19 | name | semmle.label | name | +| JndiInjectionTest.java:127:14:127:17 | name | semmle.label | name | +| JndiInjectionTest.java:128:22:128:25 | name | semmle.label | name | +| JndiInjectionTest.java:129:16:129:22 | nameStr | semmle.label | nameStr | +| JndiInjectionTest.java:131:16:131:22 | nameStr | semmle.label | nameStr | +| JndiInjectionTest.java:132:16:132:22 | nameStr | semmle.label | nameStr | +| JndiInjectionTest.java:133:16:133:22 | nameStr | semmle.label | nameStr | +| JndiInjectionTest.java:134:16:134:22 | nameStr | semmle.label | nameStr | +| JndiInjectionTest.java:138:16:138:22 | nameStr | semmle.label | nameStr | +| JndiInjectionTest.java:139:16:139:22 | nameStr | semmle.label | nameStr | +| JndiInjectionTest.java:141:16:141:22 | nameStr | semmle.label | nameStr | +| JndiInjectionTest.java:142:16:142:22 | nameStr | semmle.label | nameStr | +| JndiInjectionTest.java:144:16:144:22 | nameStr | semmle.label | nameStr | +| JndiInjectionTest.java:145:16:145:22 | nameStr | semmle.label | nameStr | +| JndiInjectionTest.java:149:16:149:22 | nameStr | semmle.label | nameStr | +| JndiInjectionTest.java:150:16:150:22 | nameStr | semmle.label | nameStr | +| JndiInjectionTest.java:152:16:152:22 | nameStr | semmle.label | nameStr | +| JndiInjectionTest.java:153:16:153:22 | nameStr | semmle.label | nameStr | +| JndiInjectionTest.java:155:16:155:22 | nameStr | semmle.label | nameStr | +| JndiInjectionTest.java:156:16:156:22 | nameStr | semmle.label | nameStr | +| JndiInjectionTest.java:170:25:170:31 | nameStr | semmle.label | nameStr | +| JndiInjectionTest.java:174:41:174:68 | nameStr : String | semmle.label | nameStr : String | +| JndiInjectionTest.java:177:16:177:22 | nameStr | semmle.label | nameStr | +| JndiInjectionTest.java:178:16:178:22 | nameStr | semmle.label | nameStr | +| JndiInjectionTest.java:182:37:182:63 | urlStr : String | semmle.label | urlStr : String | +| JndiInjectionTest.java:183:33:183:57 | new JMXServiceURL(...) | semmle.label | new JMXServiceURL(...) | +| JndiInjectionTest.java:183:51:183:56 | urlStr : String | semmle.label | urlStr : String | +| JndiInjectionTest.java:185:25:185:49 | new JMXServiceURL(...) : JMXServiceURL | semmle.label | new JMXServiceURL(...) : JMXServiceURL | +| JndiInjectionTest.java:185:43:185:48 | urlStr : String | semmle.label | urlStr : String | +| JndiInjectionTest.java:186:30:186:75 | newJMXConnector(...) : JMXConnector | semmle.label | newJMXConnector(...) : JMXConnector | +| JndiInjectionTest.java:186:66:186:68 | url : JMXServiceURL | semmle.label | url : JMXServiceURL | +| JndiInjectionTest.java:187:5:187:13 | connector | semmle.label | connector | +| JndiInjectionTest.java:191:27:191:53 | urlStr : String | semmle.label | urlStr : String | +| JndiInjectionTest.java:194:35:194:40 | urlStr | semmle.label | urlStr | +| JndiInjectionTest.java:199:27:199:53 | urlStr : String | semmle.label | urlStr : String | +| JndiInjectionTest.java:202:41:202:46 | urlStr | semmle.label | urlStr | +| JndiInjectionTest.java:207:52:207:78 | urlStr : String | semmle.label | urlStr : String | +| JndiInjectionTest.java:211:37:211:42 | urlStr | semmle.label | urlStr | +| JndiInjectionTest.java:216:52:216:78 | urlStr : String | semmle.label | urlStr : String | +| JndiInjectionTest.java:221:51:221:56 | urlStr | semmle.label | urlStr | +| JndiInjectionTest.java:226:52:226:78 | urlStr : String | semmle.label | urlStr : String | +| JndiInjectionTest.java:231:51:231:56 | urlStr | semmle.label | urlStr | +subpaths diff --git a/java/ql/test/query-tests/security/CWE-074/JndiInjectionTest.java b/java/ql/test/query-tests/security/CWE-074/JndiInjection/JndiInjectionTest.java similarity index 70% rename from java/ql/test/query-tests/security/CWE-074/JndiInjectionTest.java rename to java/ql/test/query-tests/security/CWE-074/JndiInjection/JndiInjectionTest.java index 549ae554097..961023db60d 100644 --- a/java/ql/test/query-tests/security/CWE-074/JndiInjectionTest.java +++ b/java/ql/test/query-tests/security/CWE-074/JndiInjection/JndiInjectionTest.java @@ -29,50 +29,50 @@ import org.springframework.web.bind.annotation.RequestMapping; @Controller public class JndiInjectionTest { @RequestMapping - public void testInitialContextBad1(@RequestParam String nameStr) throws NamingException { + public void testInitialContextBad1(@RequestParam String nameStr) throws NamingException { // $ Source Name name = new CompositeName(nameStr); InitialContext ctx = new InitialContext(); - ctx.lookup(nameStr); // $hasJndiInjection - ctx.lookupLink(nameStr); // $hasJndiInjection - InitialContext.doLookup(nameStr); // $hasJndiInjection - ctx.rename(nameStr, ""); // $hasJndiInjection - ctx.list(nameStr); // $hasJndiInjection - ctx.listBindings(nameStr); // $hasJndiInjection + ctx.lookup(nameStr); // $ Alert + ctx.lookupLink(nameStr); // $ Alert + InitialContext.doLookup(nameStr); // $ Alert + ctx.rename(nameStr, ""); // $ Alert + ctx.list(nameStr); // $ Alert + ctx.listBindings(nameStr); // $ Alert - ctx.lookup(name); // $hasJndiInjection - ctx.lookupLink(name); // $hasJndiInjection - InitialContext.doLookup(name); // $hasJndiInjection - ctx.rename(name, null); // $hasJndiInjection - ctx.list(name); // $hasJndiInjection - ctx.listBindings(name); // $hasJndiInjection + ctx.lookup(name); // $ Alert + ctx.lookupLink(name); // $ Alert + InitialContext.doLookup(name); // $ Alert + ctx.rename(name, null); // $ Alert + ctx.list(name); // $ Alert + ctx.listBindings(name); // $ Alert } @RequestMapping - public void testDirContextBad1(@RequestParam String nameStr) throws NamingException { + public void testDirContextBad1(@RequestParam String nameStr) throws NamingException { // $ Source Name name = new CompoundName(nameStr, new Properties()); DirContext ctx = new InitialDirContext(); - ctx.lookup(nameStr); // $hasJndiInjection - ctx.lookupLink(nameStr); // $hasJndiInjection - ctx.rename(nameStr, ""); // $hasJndiInjection - ctx.list(nameStr); // $hasJndiInjection - ctx.listBindings(nameStr); // $hasJndiInjection + ctx.lookup(nameStr); // $ Alert + ctx.lookupLink(nameStr); // $ Alert + ctx.rename(nameStr, ""); // $ Alert + ctx.list(nameStr); // $ Alert + ctx.listBindings(nameStr); // $ Alert - ctx.lookup(name); // $hasJndiInjection - ctx.lookupLink(name); // $hasJndiInjection - ctx.rename(name, null); // $hasJndiInjection - ctx.list(name); // $hasJndiInjection - ctx.listBindings(name); // $hasJndiInjection + ctx.lookup(name); // $ Alert + ctx.lookupLink(name); // $ Alert + ctx.rename(name, null); // $ Alert + ctx.list(name); // $ Alert + ctx.listBindings(name); // $ Alert SearchControls searchControls = new SearchControls(); searchControls.setReturningObjFlag(true); - ctx.search(nameStr, "", searchControls); // $hasJndiInjection - ctx.search(nameStr, "", new Object[] {}, searchControls); // $hasJndiInjection + ctx.search(nameStr, "", searchControls); // $ Alert + ctx.search(nameStr, "", new Object[] {}, searchControls); // $ Alert SearchControls searchControls2 = new SearchControls(1, 0, 0, null, true, false); - ctx.search(nameStr, "", searchControls2); // $hasJndiInjection - ctx.search(nameStr, "", new Object[] {}, searchControls2); // $hasJndiInjection + ctx.search(nameStr, "", searchControls2); // $ Alert + ctx.search(nameStr, "", new Object[] {}, searchControls2); // $ Alert SearchControls searchControls3 = new SearchControls(1, 0, 0, null, false, false); ctx.search(nameStr, "", searchControls3); // Safe @@ -80,80 +80,80 @@ public class JndiInjectionTest { } @RequestMapping - public void testInitialLdapContextBad1(@RequestParam String nameStr) throws NamingException { + public void testInitialLdapContextBad1(@RequestParam String nameStr) throws NamingException { // $ Source Name name = new CompositeName(nameStr); InitialLdapContext ctx = new InitialLdapContext(); - ctx.lookup(nameStr); // $hasJndiInjection - ctx.lookupLink(nameStr); // $hasJndiInjection - ctx.rename(nameStr, ""); // $hasJndiInjection - ctx.list(nameStr); // $hasJndiInjection - ctx.listBindings(nameStr); // $hasJndiInjection + ctx.lookup(nameStr); // $ Alert + ctx.lookupLink(nameStr); // $ Alert + ctx.rename(nameStr, ""); // $ Alert + ctx.list(nameStr); // $ Alert + ctx.listBindings(nameStr); // $ Alert - ctx.lookup(name); // $hasJndiInjection - ctx.lookupLink(name); // $hasJndiInjection - ctx.rename(name, null); // $hasJndiInjection - ctx.list(name); // $hasJndiInjection - ctx.listBindings(name); // $hasJndiInjection + ctx.lookup(name); // $ Alert + ctx.lookupLink(name); // $ Alert + ctx.rename(name, null); // $ Alert + ctx.list(name); // $ Alert + ctx.listBindings(name); // $ Alert } @RequestMapping - public void testSpringJndiTemplateBad1(@RequestParam String nameStr) throws NamingException { + public void testSpringJndiTemplateBad1(@RequestParam String nameStr) throws NamingException { // $ Source JndiTemplate ctx = new JndiTemplate(); - ctx.lookup(nameStr); // $hasJndiInjection - ctx.lookup(nameStr, null); // $hasJndiInjection + ctx.lookup(nameStr); // $ Alert + ctx.lookup(nameStr, null); // $ Alert } @RequestMapping - public void testSpringLdapTemplateBad1(@RequestParam String nameStr) throws NamingException { + public void testSpringLdapTemplateBad1(@RequestParam String nameStr) throws NamingException { // $ Source LdapTemplate ctx = new LdapTemplate(); Name name = new CompositeName().add(nameStr); - ctx.lookup(name); // $hasJndiInjection + ctx.lookup(name); // $ Alert ctx.lookup(name, (AttributesMapper) null); // Safe - ctx.lookup(name, (ContextMapper) null); // $hasJndiInjection + ctx.lookup(name, (ContextMapper) null); // $ Alert ctx.lookup(name, new String[] {}, (AttributesMapper) null); // Safe - ctx.lookup(name, new String[] {}, (ContextMapper) null); // $hasJndiInjection - ctx.lookup(nameStr); // $hasJndiInjection + ctx.lookup(name, new String[] {}, (ContextMapper) null); // $ Alert + ctx.lookup(nameStr); // $ Alert ctx.lookup(nameStr, (AttributesMapper) null); // Safe - ctx.lookup(nameStr, (ContextMapper) null); // $hasJndiInjection + ctx.lookup(nameStr, (ContextMapper) null); // $ Alert ctx.lookup(nameStr, new String[] {}, (AttributesMapper) null); // Safe - ctx.lookup(nameStr, new String[] {}, (ContextMapper) null); // $hasJndiInjection - ctx.lookupContext(name); // $hasJndiInjection - ctx.lookupContext(nameStr); // $hasJndiInjection - ctx.findByDn(name, null); // $hasJndiInjection - ctx.rename(name, null); // $hasJndiInjection - ctx.list(name); // $hasJndiInjection - ctx.listBindings(name); // $hasJndiInjection - ctx.unbind(nameStr, true); // $hasJndiInjection + ctx.lookup(nameStr, new String[] {}, (ContextMapper) null); // $ Alert + ctx.lookupContext(name); // $ Alert + ctx.lookupContext(nameStr); // $ Alert + ctx.findByDn(name, null); // $ Alert + ctx.rename(name, null); // $ Alert + ctx.list(name); // $ Alert + ctx.listBindings(name); // $ Alert + ctx.unbind(nameStr, true); // $ Alert - ctx.search(nameStr, "", 0, true, null); // $hasJndiInjection - ctx.search(nameStr, "", 0, new String[] {}, (ContextMapper) null); // $hasJndiInjection - ctx.search(nameStr, "", 0, (ContextMapper) null); // $hasJndiInjection - ctx.search(nameStr, "", (ContextMapper) null); // $hasJndiInjection + ctx.search(nameStr, "", 0, true, null); // $ Alert + ctx.search(nameStr, "", 0, new String[] {}, (ContextMapper) null); // $ Alert + ctx.search(nameStr, "", 0, (ContextMapper) null); // $ Alert + ctx.search(nameStr, "", (ContextMapper) null); // $ Alert SearchControls searchControls = new SearchControls(); searchControls.setReturningObjFlag(true); - ctx.search(nameStr, "", searchControls, (AttributesMapper) null); // $hasJndiInjection - ctx.search(nameStr, "", searchControls, (AttributesMapper) null, // $hasJndiInjection + ctx.search(nameStr, "", searchControls, (AttributesMapper) null); // $ Alert + ctx.search(nameStr, "", searchControls, (AttributesMapper) null, // $ Alert (DirContextProcessor) null); - ctx.search(nameStr, "", searchControls, (ContextMapper) null); // $hasJndiInjection - ctx.search(nameStr, "", searchControls, (ContextMapper) null, // $hasJndiInjection + ctx.search(nameStr, "", searchControls, (ContextMapper) null); // $ Alert + ctx.search(nameStr, "", searchControls, (ContextMapper) null, // $ Alert (DirContextProcessor) null); - ctx.search(nameStr, "", searchControls, (NameClassPairCallbackHandler) null); // $hasJndiInjection - ctx.search(nameStr, "", searchControls, (NameClassPairCallbackHandler) null, // $hasJndiInjection + ctx.search(nameStr, "", searchControls, (NameClassPairCallbackHandler) null); // $ Alert + ctx.search(nameStr, "", searchControls, (NameClassPairCallbackHandler) null, // $ Alert (DirContextProcessor) null); SearchControls searchControls2 = new SearchControls(1, 0, 0, null, true, false); - ctx.search(nameStr, "", searchControls2, (AttributesMapper) null); // $hasJndiInjection - ctx.search(nameStr, "", searchControls2, (AttributesMapper) null, // $hasJndiInjection + ctx.search(nameStr, "", searchControls2, (AttributesMapper) null); // $ Alert + ctx.search(nameStr, "", searchControls2, (AttributesMapper) null, // $ Alert (DirContextProcessor) null); - ctx.search(nameStr, "", searchControls2, (ContextMapper) null); // $hasJndiInjection - ctx.search(nameStr, "", searchControls2, (ContextMapper) null, // $hasJndiInjection + ctx.search(nameStr, "", searchControls2, (ContextMapper) null); // $ Alert + ctx.search(nameStr, "", searchControls2, (ContextMapper) null, // $ Alert (DirContextProcessor) null); - ctx.search(nameStr, "", searchControls2, (NameClassPairCallbackHandler) null); // $hasJndiInjection - ctx.search(nameStr, "", searchControls2, (NameClassPairCallbackHandler) null, // $hasJndiInjection + ctx.search(nameStr, "", searchControls2, (NameClassPairCallbackHandler) null); // $ Alert + ctx.search(nameStr, "", searchControls2, (NameClassPairCallbackHandler) null, // $ Alert (DirContextProcessor) null); SearchControls searchControls3 = new SearchControls(1, 0, 0, null, false, false); @@ -167,68 +167,68 @@ public class JndiInjectionTest { ctx.search(nameStr, "", searchControls3, (NameClassPairCallbackHandler) null, // Safe (DirContextProcessor) null); - ctx.searchForObject(nameStr, "", (ContextMapper) null); // $hasJndiInjection + ctx.searchForObject(nameStr, "", (ContextMapper) null); // $ Alert } @RequestMapping - public void testShiroJndiTemplateBad1(@RequestParam String nameStr) throws NamingException { + public void testShiroJndiTemplateBad1(@RequestParam String nameStr) throws NamingException { // $ Source org.apache.shiro.jndi.JndiTemplate ctx = new org.apache.shiro.jndi.JndiTemplate(); - ctx.lookup(nameStr); // $hasJndiInjection - ctx.lookup(nameStr, null); // $hasJndiInjection + ctx.lookup(nameStr); // $ Alert + ctx.lookup(nameStr, null); // $ Alert } @RequestMapping - public void testJMXServiceUrlBad1(@RequestParam String urlStr) throws IOException { - JMXConnectorFactory.connect(new JMXServiceURL(urlStr)); // $hasJndiInjection + public void testJMXServiceUrlBad1(@RequestParam String urlStr) throws IOException { // $ Source + JMXConnectorFactory.connect(new JMXServiceURL(urlStr)); // $ Alert JMXServiceURL url = new JMXServiceURL(urlStr); JMXConnector connector = JMXConnectorFactory.newJMXConnector(url, null); - connector.connect(); // $hasJndiInjection + connector.connect(); // $ Alert } @RequestMapping - public void testEnvBad1(@RequestParam String urlStr) throws NamingException { + public void testEnvBad1(@RequestParam String urlStr) throws NamingException { // $ Source Hashtable env = new Hashtable(); env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.rmi.registry.RegistryContextFactory"); - env.put(Context.PROVIDER_URL, urlStr); // $hasJndiInjection + env.put(Context.PROVIDER_URL, urlStr); // $ Alert new InitialContext(env); } @RequestMapping - public void testEnvBad2(@RequestParam String urlStr) throws NamingException { + public void testEnvBad2(@RequestParam String urlStr) throws NamingException { // $ Source Hashtable env = new Hashtable(); env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.rmi.registry.RegistryContextFactory"); - env.put("java.naming.provider.url", urlStr); // $hasJndiInjection + env.put("java.naming.provider.url", urlStr); // $ Alert new InitialDirContext(env); } @RequestMapping - public void testSpringJndiTemplatePropertiesBad1(@RequestParam String urlStr) + public void testSpringJndiTemplatePropertiesBad1(@RequestParam String urlStr) // $ Source throws NamingException { Properties props = new Properties(); props.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.rmi.registry.RegistryContextFactory"); - props.put(Context.PROVIDER_URL, urlStr); // $hasJndiInjection + props.put(Context.PROVIDER_URL, urlStr); // $ Alert new JndiTemplate(props); } @RequestMapping - public void testSpringJndiTemplatePropertiesBad2(@RequestParam String urlStr) + public void testSpringJndiTemplatePropertiesBad2(@RequestParam String urlStr) // $ Source throws NamingException { Properties props = new Properties(); props.setProperty(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.rmi.registry.RegistryContextFactory"); - props.setProperty("java.naming.provider.url", urlStr); // $hasJndiInjection + props.setProperty("java.naming.provider.url", urlStr); // $ Alert new JndiTemplate(props); } @RequestMapping - public void testSpringJndiTemplatePropertiesBad3(@RequestParam String urlStr) + public void testSpringJndiTemplatePropertiesBad3(@RequestParam String urlStr) // $ Source throws NamingException { Properties props = new Properties(); props.setProperty(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.rmi.registry.RegistryContextFactory"); - props.setProperty("java.naming.provider.url", urlStr); // $hasJndiInjection + props.setProperty("java.naming.provider.url", urlStr); // $ Alert JndiTemplate template = new JndiTemplate(); template.setEnvironment(props); } diff --git a/java/ql/test/query-tests/security/CWE-074/JndiInjection/JndiInjectionTest.qlref b/java/ql/test/query-tests/security/CWE-074/JndiInjection/JndiInjectionTest.qlref new file mode 100644 index 00000000000..90b6394597b --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-074/JndiInjection/JndiInjectionTest.qlref @@ -0,0 +1,4 @@ +query: Security/CWE/CWE-074/JndiInjection.ql +postprocess: + - utils/test/PrettyPrintModels.ql + - utils/test/InlineExpectationsTestQuery.ql diff --git a/java/ql/test/query-tests/security/CWE-074/JndiInjection/options b/java/ql/test/query-tests/security/CWE-074/JndiInjection/options new file mode 100644 index 00000000000..099749ee58b --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-074/JndiInjection/options @@ -0,0 +1 @@ +//semmle-extractor-options: --javac-args -cp ${testdir}/../../../../stubs/springframework-5.8.x:${testdir}/../../../../stubs/shiro-core-1.5.2:${testdir}/../../../../stubs/spring-ldap-2.3.2:${testdir}/../../../../stubs/Saxon-HE-9.9.1-7:${testdir}/../../../../stubs/apache-commons-logging-1.2 diff --git a/java/ql/test/query-tests/security/CWE-074/JndiInjectionTest.expected b/java/ql/test/query-tests/security/CWE-074/JndiInjectionTest.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/java/ql/test/query-tests/security/CWE-074/JndiInjectionTest.ql b/java/ql/test/query-tests/security/CWE-074/JndiInjectionTest.ql deleted file mode 100644 index 03b588555b5..00000000000 --- a/java/ql/test/query-tests/security/CWE-074/JndiInjectionTest.ql +++ /dev/null @@ -1,18 +0,0 @@ -import java -import semmle.code.java.security.JndiInjectionQuery -import utils.test.InlineExpectationsTest - -module HasJndiInjectionTest implements TestSig { - string getARelevantTag() { result = "hasJndiInjection" } - - predicate hasActualResult(Location location, string element, string tag, string value) { - tag = "hasJndiInjection" and - exists(DataFlow::Node sink | JndiInjectionFlow::flowTo(sink) | - sink.getLocation() = location and - element = sink.toString() and - value = "" - ) - } -} - -import MakeTest diff --git a/java/ql/test/query-tests/security/CWE-074/XsltInjection/XsltInjectionTest.expected b/java/ql/test/query-tests/security/CWE-074/XsltInjection/XsltInjectionTest.expected new file mode 100644 index 00000000000..87167aa84bf --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-074/XsltInjection/XsltInjectionTest.expected @@ -0,0 +1,245 @@ +#select +| XsltInjectionTest.java:31:5:31:59 | newTransformer(...) | XsltInjectionTest.java:30:44:30:66 | getInputStream(...) : InputStream | XsltInjectionTest.java:31:5:31:59 | newTransformer(...) | XSLT transformation might include stylesheet from $@. | XsltInjectionTest.java:30:44:30:66 | getInputStream(...) | this user input | +| XsltInjectionTest.java:36:5:36:74 | newTransformer(...) | XsltInjectionTest.java:35:66:35:88 | getInputStream(...) : InputStream | XsltInjectionTest.java:36:5:36:74 | newTransformer(...) | XSLT transformation might include stylesheet from $@. | XsltInjectionTest.java:35:66:35:88 | getInputStream(...) | this user input | +| XsltInjectionTest.java:43:5:43:59 | newTransformer(...) | XsltInjectionTest.java:40:45:40:70 | param : String | XsltInjectionTest.java:43:5:43:59 | newTransformer(...) | XSLT transformation might include stylesheet from $@. | XsltInjectionTest.java:40:45:40:70 | param | this user input | +| XsltInjectionTest.java:48:5:48:74 | newTransformer(...) | XsltInjectionTest.java:47:54:47:76 | getInputStream(...) : InputStream | XsltInjectionTest.java:48:5:48:74 | newTransformer(...) | XSLT transformation might include stylesheet from $@. | XsltInjectionTest.java:47:54:47:76 | getInputStream(...) | this user input | +| XsltInjectionTest.java:54:5:54:59 | newTransformer(...) | XsltInjectionTest.java:53:67:53:89 | getInputStream(...) : InputStream | XsltInjectionTest.java:54:5:54:59 | newTransformer(...) | XSLT transformation might include stylesheet from $@. | XsltInjectionTest.java:53:67:53:89 | getInputStream(...) | this user input | +| XsltInjectionTest.java:60:5:60:59 | newTransformer(...) | XsltInjectionTest.java:59:75:59:97 | getInputStream(...) : InputStream | XsltInjectionTest.java:60:5:60:59 | newTransformer(...) | XSLT transformation might include stylesheet from $@. | XsltInjectionTest.java:59:75:59:97 | getInputStream(...) | this user input | +| XsltInjectionTest.java:66:5:66:74 | newTransformer(...) | XsltInjectionTest.java:65:31:65:53 | getInputStream(...) : InputStream | XsltInjectionTest.java:66:5:66:74 | newTransformer(...) | XSLT transformation might include stylesheet from $@. | XsltInjectionTest.java:65:31:65:53 | getInputStream(...) | this user input | +| XsltInjectionTest.java:72:5:72:59 | newTransformer(...) | XsltInjectionTest.java:71:73:71:95 | getInputStream(...) : InputStream | XsltInjectionTest.java:72:5:72:59 | newTransformer(...) | XSLT transformation might include stylesheet from $@. | XsltInjectionTest.java:71:73:71:95 | getInputStream(...) | this user input | +| XsltInjectionTest.java:80:5:80:34 | newTransformer(...) | XsltInjectionTest.java:76:44:76:66 | getInputStream(...) : InputStream | XsltInjectionTest.java:80:5:80:34 | newTransformer(...) | XSLT transformation might include stylesheet from $@. | XsltInjectionTest.java:76:44:76:66 | getInputStream(...) | this user input | +| XsltInjectionTest.java:87:5:87:34 | newTransformer(...) | XsltInjectionTest.java:84:44:84:66 | getInputStream(...) : InputStream | XsltInjectionTest.java:87:5:87:34 | newTransformer(...) | XSLT transformation might include stylesheet from $@. | XsltInjectionTest.java:84:44:84:66 | getInputStream(...) | this user input | +| XsltInjectionTest.java:94:5:94:35 | load(...) | XsltInjectionTest.java:91:44:91:66 | getInputStream(...) : InputStream | XsltInjectionTest.java:94:5:94:35 | load(...) | XSLT transformation might include stylesheet from $@. | XsltInjectionTest.java:91:44:91:66 | getInputStream(...) | this user input | +| XsltInjectionTest.java:95:5:95:37 | load30(...) | XsltInjectionTest.java:91:44:91:66 | getInputStream(...) : InputStream | XsltInjectionTest.java:95:5:95:37 | load30(...) | XSLT transformation might include stylesheet from $@. | XsltInjectionTest.java:91:44:91:66 | getInputStream(...) | this user input | +| XsltInjectionTest.java:96:5:96:37 | load30(...) | XsltInjectionTest.java:91:44:91:66 | getInputStream(...) : InputStream | XsltInjectionTest.java:96:5:96:37 | load30(...) | XSLT transformation might include stylesheet from $@. | XsltInjectionTest.java:91:44:91:66 | getInputStream(...) | this user input | +| XsltInjectionTest.java:97:5:97:37 | load30(...) | XsltInjectionTest.java:91:44:91:66 | getInputStream(...) : InputStream | XsltInjectionTest.java:97:5:97:37 | load30(...) | XSLT transformation might include stylesheet from $@. | XsltInjectionTest.java:91:44:91:66 | getInputStream(...) | this user input | +| XsltInjectionTest.java:98:5:98:37 | load30(...) | XsltInjectionTest.java:91:44:91:66 | getInputStream(...) : InputStream | XsltInjectionTest.java:98:5:98:37 | load30(...) | XSLT transformation might include stylesheet from $@. | XsltInjectionTest.java:91:44:91:66 | getInputStream(...) | this user input | +| XsltInjectionTest.java:99:5:99:37 | load30(...) | XsltInjectionTest.java:91:44:91:66 | getInputStream(...) : InputStream | XsltInjectionTest.java:99:5:99:37 | load30(...) | XSLT transformation might include stylesheet from $@. | XsltInjectionTest.java:91:44:91:66 | getInputStream(...) | this user input | +| XsltInjectionTest.java:100:5:100:37 | load30(...) | XsltInjectionTest.java:91:44:91:66 | getInputStream(...) : InputStream | XsltInjectionTest.java:100:5:100:37 | load30(...) | XSLT transformation might include stylesheet from $@. | XsltInjectionTest.java:91:44:91:66 | getInputStream(...) | this user input | +| XsltInjectionTest.java:101:5:101:37 | load30(...) | XsltInjectionTest.java:91:44:91:66 | getInputStream(...) : InputStream | XsltInjectionTest.java:101:5:101:37 | load30(...) | XSLT transformation might include stylesheet from $@. | XsltInjectionTest.java:91:44:91:66 | getInputStream(...) | this user input | +| XsltInjectionTest.java:102:5:102:37 | load30(...) | XsltInjectionTest.java:91:44:91:66 | getInputStream(...) : InputStream | XsltInjectionTest.java:102:5:102:37 | load30(...) | XSLT transformation might include stylesheet from $@. | XsltInjectionTest.java:91:44:91:66 | getInputStream(...) | this user input | +| XsltInjectionTest.java:103:5:103:37 | load30(...) | XsltInjectionTest.java:91:44:91:66 | getInputStream(...) : InputStream | XsltInjectionTest.java:103:5:103:37 | load30(...) | XSLT transformation might include stylesheet from $@. | XsltInjectionTest.java:91:44:91:66 | getInputStream(...) | this user input | +| XsltInjectionTest.java:112:5:112:46 | load(...) | XsltInjectionTest.java:107:36:107:61 | param : String | XsltInjectionTest.java:112:5:112:46 | load(...) | XSLT transformation might include stylesheet from $@. | XsltInjectionTest.java:107:36:107:61 | param | this user input | +| XsltInjectionTest.java:113:5:113:49 | load(...) | XsltInjectionTest.java:107:64:107:76 | socket : Socket | XsltInjectionTest.java:113:5:113:49 | load(...) | XSLT transformation might include stylesheet from $@. | XsltInjectionTest.java:107:64:107:76 | socket | this user input | +| XsltInjectionTest.java:113:5:113:49 | load(...) | XsltInjectionTest.java:109:44:109:66 | getInputStream(...) : InputStream | XsltInjectionTest.java:113:5:113:49 | load(...) | XSLT transformation might include stylesheet from $@. | XsltInjectionTest.java:109:44:109:66 | getInputStream(...) | this user input | +| XsltInjectionTest.java:114:5:114:50 | load(...) | XsltInjectionTest.java:107:36:107:61 | param : String | XsltInjectionTest.java:114:5:114:50 | load(...) | XSLT transformation might include stylesheet from $@. | XsltInjectionTest.java:107:36:107:61 | param | this user input | +edges +| XsltInjectionTest.java:30:27:30:67 | new StreamSource(...) : StreamSource | XsltInjectionTest.java:31:53:31:58 | source : StreamSource | provenance | | +| XsltInjectionTest.java:30:44:30:66 | getInputStream(...) : InputStream | XsltInjectionTest.java:30:27:30:67 | new StreamSource(...) : StreamSource | provenance | Src:MaD:7 MaD:14 | +| XsltInjectionTest.java:31:53:31:58 | source : StreamSource | XsltInjectionTest.java:31:5:31:59 | newTransformer(...) | provenance | Config Sink:MaD:1 | +| XsltInjectionTest.java:35:27:35:90 | new StreamSource(...) : StreamSource | XsltInjectionTest.java:36:51:36:56 | source : StreamSource | provenance | | +| XsltInjectionTest.java:35:44:35:89 | new InputStreamReader(...) : InputStreamReader | XsltInjectionTest.java:35:27:35:90 | new StreamSource(...) : StreamSource | provenance | MaD:14 | +| XsltInjectionTest.java:35:66:35:88 | getInputStream(...) : InputStream | XsltInjectionTest.java:35:44:35:89 | new InputStreamReader(...) : InputStreamReader | provenance | Src:MaD:7 MaD:8 | +| XsltInjectionTest.java:36:5:36:57 | newTemplates(...) : Templates | XsltInjectionTest.java:36:5:36:74 | newTransformer(...) | provenance | Config Sink:MaD:1 | +| XsltInjectionTest.java:36:5:36:57 | newTemplates(...) : Templates | XsltInjectionTest.java:36:5:36:74 | newTransformer(...) | provenance | MaD:15 Sink:MaD:1 | +| XsltInjectionTest.java:36:51:36:56 | source : StreamSource | XsltInjectionTest.java:36:5:36:57 | newTemplates(...) : Templates | provenance | Config | +| XsltInjectionTest.java:36:51:36:56 | source : StreamSource | XsltInjectionTest.java:36:5:36:57 | newTemplates(...) : Templates | provenance | MaD:16 | +| XsltInjectionTest.java:40:45:40:70 | param : String | XsltInjectionTest.java:42:61:42:64 | xslt : String | provenance | | +| XsltInjectionTest.java:42:27:42:66 | new StreamSource(...) : StreamSource | XsltInjectionTest.java:43:53:43:58 | source : StreamSource | provenance | | +| XsltInjectionTest.java:42:44:42:65 | new StringReader(...) : StringReader | XsltInjectionTest.java:42:27:42:66 | new StreamSource(...) : StreamSource | provenance | MaD:14 | +| XsltInjectionTest.java:42:61:42:64 | xslt : String | XsltInjectionTest.java:42:44:42:65 | new StringReader(...) : StringReader | provenance | MaD:9 | +| XsltInjectionTest.java:43:53:43:58 | source : StreamSource | XsltInjectionTest.java:43:5:43:59 | newTransformer(...) | provenance | Config Sink:MaD:1 | +| XsltInjectionTest.java:47:24:47:78 | new SAXSource(...) : SAXSource | XsltInjectionTest.java:48:51:48:56 | source : SAXSource | provenance | | +| XsltInjectionTest.java:47:38:47:77 | new InputSource(...) : InputSource | XsltInjectionTest.java:47:24:47:78 | new SAXSource(...) : SAXSource | provenance | MaD:12 | +| XsltInjectionTest.java:47:54:47:76 | getInputStream(...) : InputStream | XsltInjectionTest.java:47:38:47:77 | new InputSource(...) : InputSource | provenance | Src:MaD:7 MaD:17 | +| XsltInjectionTest.java:48:5:48:57 | newTemplates(...) : Templates | XsltInjectionTest.java:48:5:48:74 | newTransformer(...) | provenance | Config Sink:MaD:1 | +| XsltInjectionTest.java:48:5:48:57 | newTemplates(...) : Templates | XsltInjectionTest.java:48:5:48:74 | newTransformer(...) | provenance | MaD:15 Sink:MaD:1 | +| XsltInjectionTest.java:48:51:48:56 | source : SAXSource | XsltInjectionTest.java:48:5:48:57 | newTemplates(...) : Templates | provenance | Config | +| XsltInjectionTest.java:48:51:48:56 | source : SAXSource | XsltInjectionTest.java:48:5:48:57 | newTemplates(...) : Templates | provenance | MaD:16 | +| XsltInjectionTest.java:53:9:53:92 | new SAXSource(...) : SAXSource | XsltInjectionTest.java:54:53:54:58 | source : SAXSource | provenance | | +| XsltInjectionTest.java:53:29:53:91 | new InputSource(...) : InputSource | XsltInjectionTest.java:53:9:53:92 | new SAXSource(...) : SAXSource | provenance | MaD:13 | +| XsltInjectionTest.java:53:45:53:90 | new InputStreamReader(...) : InputStreamReader | XsltInjectionTest.java:53:29:53:91 | new InputSource(...) : InputSource | provenance | MaD:17 | +| XsltInjectionTest.java:53:67:53:89 | getInputStream(...) : InputStream | XsltInjectionTest.java:53:45:53:90 | new InputStreamReader(...) : InputStreamReader | provenance | Src:MaD:7 MaD:8 | +| XsltInjectionTest.java:54:53:54:58 | source : SAXSource | XsltInjectionTest.java:54:5:54:59 | newTransformer(...) | provenance | Config Sink:MaD:1 | +| XsltInjectionTest.java:59:9:59:99 | new StAXSource(...) : StAXSource | XsltInjectionTest.java:60:53:60:58 | source : StAXSource | provenance | | +| XsltInjectionTest.java:59:24:59:98 | createXMLEventReader(...) : XMLEventReader | XsltInjectionTest.java:59:9:59:99 | new StAXSource(...) : StAXSource | provenance | Config | +| XsltInjectionTest.java:59:75:59:97 | getInputStream(...) : InputStream | XsltInjectionTest.java:59:24:59:98 | createXMLEventReader(...) : XMLEventReader | provenance | Src:MaD:7 Config | +| XsltInjectionTest.java:60:53:60:58 | source : StAXSource | XsltInjectionTest.java:60:5:60:59 | newTransformer(...) | provenance | Config Sink:MaD:1 | +| XsltInjectionTest.java:64:25:65:56 | new StAXSource(...) : StAXSource | XsltInjectionTest.java:66:51:66:56 | source : StAXSource | provenance | | +| XsltInjectionTest.java:64:40:65:55 | createXMLStreamReader(...) : XMLStreamReader | XsltInjectionTest.java:64:25:65:56 | new StAXSource(...) : StAXSource | provenance | Config | +| XsltInjectionTest.java:65:9:65:54 | new InputStreamReader(...) : InputStreamReader | XsltInjectionTest.java:64:40:65:55 | createXMLStreamReader(...) : XMLStreamReader | provenance | Config | +| XsltInjectionTest.java:65:31:65:53 | getInputStream(...) : InputStream | XsltInjectionTest.java:65:9:65:54 | new InputStreamReader(...) : InputStreamReader | provenance | Src:MaD:7 MaD:8 | +| XsltInjectionTest.java:66:5:66:57 | newTemplates(...) : Templates | XsltInjectionTest.java:66:5:66:74 | newTransformer(...) | provenance | Config Sink:MaD:1 | +| XsltInjectionTest.java:66:5:66:57 | newTemplates(...) : Templates | XsltInjectionTest.java:66:5:66:74 | newTransformer(...) | provenance | MaD:15 Sink:MaD:1 | +| XsltInjectionTest.java:66:51:66:56 | source : StAXSource | XsltInjectionTest.java:66:5:66:57 | newTemplates(...) : Templates | provenance | Config | +| XsltInjectionTest.java:66:51:66:56 | source : StAXSource | XsltInjectionTest.java:66:5:66:57 | newTemplates(...) : Templates | provenance | MaD:16 | +| XsltInjectionTest.java:70:24:71:97 | new DOMSource(...) : DOMSource | XsltInjectionTest.java:72:53:72:58 | source : DOMSource | provenance | | +| XsltInjectionTest.java:71:9:71:96 | parse(...) : Document | XsltInjectionTest.java:70:24:71:97 | new DOMSource(...) : DOMSource | provenance | Config | +| XsltInjectionTest.java:71:73:71:95 | getInputStream(...) : InputStream | XsltInjectionTest.java:71:9:71:96 | parse(...) : Document | provenance | Src:MaD:7 Config | +| XsltInjectionTest.java:72:53:72:58 | source : DOMSource | XsltInjectionTest.java:72:5:72:59 | newTransformer(...) | provenance | Config Sink:MaD:1 | +| XsltInjectionTest.java:76:27:76:67 | new StreamSource(...) : StreamSource | XsltInjectionTest.java:80:28:80:33 | source : StreamSource | provenance | | +| XsltInjectionTest.java:76:44:76:66 | getInputStream(...) : InputStream | XsltInjectionTest.java:76:27:76:67 | new StreamSource(...) : StreamSource | provenance | Src:MaD:7 MaD:14 | +| XsltInjectionTest.java:80:28:80:33 | source : StreamSource | XsltInjectionTest.java:80:5:80:34 | newTransformer(...) | provenance | Config Sink:MaD:1 | +| XsltInjectionTest.java:84:27:84:67 | new StreamSource(...) : StreamSource | XsltInjectionTest.java:87:28:87:33 | source : StreamSource | provenance | | +| XsltInjectionTest.java:84:44:84:66 | getInputStream(...) : InputStream | XsltInjectionTest.java:84:27:84:67 | new StreamSource(...) : StreamSource | provenance | Src:MaD:7 MaD:14 | +| XsltInjectionTest.java:87:28:87:33 | source : StreamSource | XsltInjectionTest.java:87:5:87:34 | newTransformer(...) | provenance | Config Sink:MaD:1 | +| XsltInjectionTest.java:91:27:91:67 | new StreamSource(...) : StreamSource | XsltInjectionTest.java:94:22:94:27 | source : StreamSource | provenance | | +| XsltInjectionTest.java:91:44:91:66 | getInputStream(...) : InputStream | XsltInjectionTest.java:91:27:91:67 | new StreamSource(...) : StreamSource | provenance | Src:MaD:7 MaD:14 | +| XsltInjectionTest.java:94:5:94:28 | compile(...) : XsltExecutable | XsltInjectionTest.java:94:5:94:35 | load(...) | provenance | Config Sink:MaD:6 | +| XsltInjectionTest.java:94:22:94:27 | source : StreamSource | XsltInjectionTest.java:94:5:94:28 | compile(...) : XsltExecutable | provenance | Config | +| XsltInjectionTest.java:94:22:94:27 | source : StreamSource | XsltInjectionTest.java:95:22:95:27 | source : StreamSource | provenance | | +| XsltInjectionTest.java:95:5:95:28 | compile(...) : XsltExecutable | XsltInjectionTest.java:95:5:95:37 | load30(...) | provenance | Config Sink:MaD:5 | +| XsltInjectionTest.java:95:22:95:27 | source : StreamSource | XsltInjectionTest.java:95:5:95:28 | compile(...) : XsltExecutable | provenance | Config | +| XsltInjectionTest.java:95:22:95:27 | source : StreamSource | XsltInjectionTest.java:96:22:96:27 | source : StreamSource | provenance | | +| XsltInjectionTest.java:96:5:96:28 | compile(...) : XsltExecutable | XsltInjectionTest.java:96:5:96:37 | load30(...) | provenance | Config Sink:MaD:2 | +| XsltInjectionTest.java:96:22:96:27 | source : StreamSource | XsltInjectionTest.java:96:5:96:28 | compile(...) : XsltExecutable | provenance | Config | +| XsltInjectionTest.java:96:22:96:27 | source : StreamSource | XsltInjectionTest.java:97:22:97:27 | source : StreamSource | provenance | | +| XsltInjectionTest.java:97:5:97:28 | compile(...) : XsltExecutable | XsltInjectionTest.java:97:5:97:37 | load30(...) | provenance | Config Sink:MaD:2 | +| XsltInjectionTest.java:97:22:97:27 | source : StreamSource | XsltInjectionTest.java:97:5:97:28 | compile(...) : XsltExecutable | provenance | Config | +| XsltInjectionTest.java:97:22:97:27 | source : StreamSource | XsltInjectionTest.java:98:22:98:27 | source : StreamSource | provenance | | +| XsltInjectionTest.java:98:5:98:28 | compile(...) : XsltExecutable | XsltInjectionTest.java:98:5:98:37 | load30(...) | provenance | Config Sink:MaD:2 | +| XsltInjectionTest.java:98:22:98:27 | source : StreamSource | XsltInjectionTest.java:98:5:98:28 | compile(...) : XsltExecutable | provenance | Config | +| XsltInjectionTest.java:98:22:98:27 | source : StreamSource | XsltInjectionTest.java:99:22:99:27 | source : StreamSource | provenance | | +| XsltInjectionTest.java:99:5:99:28 | compile(...) : XsltExecutable | XsltInjectionTest.java:99:5:99:37 | load30(...) | provenance | Config Sink:MaD:2 | +| XsltInjectionTest.java:99:22:99:27 | source : StreamSource | XsltInjectionTest.java:99:5:99:28 | compile(...) : XsltExecutable | provenance | Config | +| XsltInjectionTest.java:99:22:99:27 | source : StreamSource | XsltInjectionTest.java:100:22:100:27 | source : StreamSource | provenance | | +| XsltInjectionTest.java:100:5:100:28 | compile(...) : XsltExecutable | XsltInjectionTest.java:100:5:100:37 | load30(...) | provenance | Config Sink:MaD:3 | +| XsltInjectionTest.java:100:22:100:27 | source : StreamSource | XsltInjectionTest.java:100:5:100:28 | compile(...) : XsltExecutable | provenance | Config | +| XsltInjectionTest.java:100:22:100:27 | source : StreamSource | XsltInjectionTest.java:101:22:101:27 | source : StreamSource | provenance | | +| XsltInjectionTest.java:101:5:101:28 | compile(...) : XsltExecutable | XsltInjectionTest.java:101:5:101:37 | load30(...) | provenance | Config Sink:MaD:3 | +| XsltInjectionTest.java:101:22:101:27 | source : StreamSource | XsltInjectionTest.java:101:5:101:28 | compile(...) : XsltExecutable | provenance | Config | +| XsltInjectionTest.java:101:22:101:27 | source : StreamSource | XsltInjectionTest.java:102:22:102:27 | source : StreamSource | provenance | | +| XsltInjectionTest.java:102:5:102:28 | compile(...) : XsltExecutable | XsltInjectionTest.java:102:5:102:37 | load30(...) | provenance | Config Sink:MaD:4 | +| XsltInjectionTest.java:102:22:102:27 | source : StreamSource | XsltInjectionTest.java:102:5:102:28 | compile(...) : XsltExecutable | provenance | Config | +| XsltInjectionTest.java:102:22:102:27 | source : StreamSource | XsltInjectionTest.java:103:22:103:27 | source : StreamSource | provenance | | +| XsltInjectionTest.java:103:5:103:28 | compile(...) : XsltExecutable | XsltInjectionTest.java:103:5:103:37 | load30(...) | provenance | Config Sink:MaD:4 | +| XsltInjectionTest.java:103:22:103:27 | source : StreamSource | XsltInjectionTest.java:103:5:103:28 | compile(...) : XsltExecutable | provenance | Config | +| XsltInjectionTest.java:107:36:107:61 | param : String | XsltInjectionTest.java:108:23:108:27 | param : String | provenance | | +| XsltInjectionTest.java:107:64:107:76 | socket : Socket | XsltInjectionTest.java:109:44:109:49 | socket : Socket | provenance | | +| XsltInjectionTest.java:108:15:108:28 | new URI(...) : URI | XsltInjectionTest.java:112:36:112:38 | uri : URI | provenance | | +| XsltInjectionTest.java:108:23:108:27 | param : String | XsltInjectionTest.java:108:15:108:28 | new URI(...) : URI | provenance | MaD:11 | +| XsltInjectionTest.java:109:27:109:67 | new StreamSource(...) : StreamSource | XsltInjectionTest.java:113:29:113:34 | source : StreamSource | provenance | | +| XsltInjectionTest.java:109:44:109:49 | socket : Socket | XsltInjectionTest.java:109:44:109:66 | getInputStream(...) : InputStream | provenance | MaD:10 | +| XsltInjectionTest.java:109:44:109:66 | getInputStream(...) : InputStream | XsltInjectionTest.java:109:27:109:67 | new StreamSource(...) : StreamSource | provenance | Src:MaD:7 MaD:14 | +| XsltInjectionTest.java:112:5:112:39 | loadExecutablePackage(...) : XsltExecutable | XsltInjectionTest.java:112:5:112:46 | load(...) | provenance | Config Sink:MaD:6 | +| XsltInjectionTest.java:112:36:112:38 | uri : URI | XsltInjectionTest.java:112:5:112:39 | loadExecutablePackage(...) : XsltExecutable | provenance | Config | +| XsltInjectionTest.java:112:36:112:38 | uri : URI | XsltInjectionTest.java:114:33:114:35 | uri : URI | provenance | | +| XsltInjectionTest.java:113:5:113:35 | compilePackage(...) : XsltPackage | XsltInjectionTest.java:113:5:113:42 | link(...) : XsltExecutable | provenance | Config | +| XsltInjectionTest.java:113:5:113:42 | link(...) : XsltExecutable | XsltInjectionTest.java:113:5:113:49 | load(...) | provenance | Config Sink:MaD:6 | +| XsltInjectionTest.java:113:29:113:34 | source : StreamSource | XsltInjectionTest.java:113:5:113:35 | compilePackage(...) : XsltPackage | provenance | Config | +| XsltInjectionTest.java:114:5:114:36 | loadLibraryPackage(...) : XsltPackage | XsltInjectionTest.java:114:5:114:43 | link(...) : XsltExecutable | provenance | Config | +| XsltInjectionTest.java:114:5:114:43 | link(...) : XsltExecutable | XsltInjectionTest.java:114:5:114:50 | load(...) | provenance | Config Sink:MaD:6 | +| XsltInjectionTest.java:114:33:114:35 | uri : URI | XsltInjectionTest.java:114:5:114:36 | loadLibraryPackage(...) : XsltPackage | provenance | Config | +models +| 1 | Sink: javax.xml.transform; Transformer; false; transform; ; ; Argument[this]; xslt-injection; manual | +| 2 | Sink: net.sf.saxon.s9api; Xslt30Transformer; false; applyTemplates; ; ; Argument[this]; xslt-injection; manual | +| 3 | Sink: net.sf.saxon.s9api; Xslt30Transformer; false; callFunction; ; ; Argument[this]; xslt-injection; manual | +| 4 | Sink: net.sf.saxon.s9api; Xslt30Transformer; false; callTemplate; ; ; Argument[this]; xslt-injection; manual | +| 5 | Sink: net.sf.saxon.s9api; Xslt30Transformer; false; transform; ; ; Argument[this]; xslt-injection; manual | +| 6 | Sink: net.sf.saxon.s9api; XsltTransformer; false; transform; ; ; Argument[this]; xslt-injection; manual | +| 7 | Source: java.net; Socket; false; getInputStream; (); ; ReturnValue; remote; manual | +| 8 | Summary: java.io; InputStreamReader; false; InputStreamReader; ; ; Argument[0]; Argument[this]; taint; manual | +| 9 | Summary: java.io; StringReader; false; StringReader; ; ; Argument[0]; Argument[this]; taint; manual | +| 10 | Summary: java.net; Socket; true; getInputStream; (); ; Argument[this]; ReturnValue; taint; df-generated | +| 11 | Summary: java.net; URI; false; URI; (String); ; Argument[0]; Argument[this]; taint; manual | +| 12 | Summary: javax.xml.transform.sax; SAXSource; false; SAXSource; (InputSource); ; Argument[0]; Argument[this]; taint; manual | +| 13 | Summary: javax.xml.transform.sax; SAXSource; false; SAXSource; (XMLReader,InputSource); ; Argument[1]; Argument[this]; taint; manual | +| 14 | Summary: javax.xml.transform.stream; StreamSource; false; StreamSource; ; ; Argument[0]; Argument[this]; taint; manual | +| 15 | Summary: javax.xml.transform; Templates; true; newTransformer; (); ; Argument[this]; ReturnValue; taint; df-generated | +| 16 | Summary: javax.xml.transform; TransformerFactory; true; newTemplates; (Source); ; Argument[0]; ReturnValue; taint; df-generated | +| 17 | Summary: org.xml.sax; InputSource; false; InputSource; ; ; Argument[0]; Argument[this]; taint; manual | +nodes +| XsltInjectionTest.java:30:27:30:67 | new StreamSource(...) : StreamSource | semmle.label | new StreamSource(...) : StreamSource | +| XsltInjectionTest.java:30:44:30:66 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| XsltInjectionTest.java:31:5:31:59 | newTransformer(...) | semmle.label | newTransformer(...) | +| XsltInjectionTest.java:31:53:31:58 | source : StreamSource | semmle.label | source : StreamSource | +| XsltInjectionTest.java:35:27:35:90 | new StreamSource(...) : StreamSource | semmle.label | new StreamSource(...) : StreamSource | +| XsltInjectionTest.java:35:44:35:89 | new InputStreamReader(...) : InputStreamReader | semmle.label | new InputStreamReader(...) : InputStreamReader | +| XsltInjectionTest.java:35:66:35:88 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| XsltInjectionTest.java:36:5:36:57 | newTemplates(...) : Templates | semmle.label | newTemplates(...) : Templates | +| XsltInjectionTest.java:36:5:36:74 | newTransformer(...) | semmle.label | newTransformer(...) | +| XsltInjectionTest.java:36:51:36:56 | source : StreamSource | semmle.label | source : StreamSource | +| XsltInjectionTest.java:40:45:40:70 | param : String | semmle.label | param : String | +| XsltInjectionTest.java:42:27:42:66 | new StreamSource(...) : StreamSource | semmle.label | new StreamSource(...) : StreamSource | +| XsltInjectionTest.java:42:44:42:65 | new StringReader(...) : StringReader | semmle.label | new StringReader(...) : StringReader | +| XsltInjectionTest.java:42:61:42:64 | xslt : String | semmle.label | xslt : String | +| XsltInjectionTest.java:43:5:43:59 | newTransformer(...) | semmle.label | newTransformer(...) | +| XsltInjectionTest.java:43:53:43:58 | source : StreamSource | semmle.label | source : StreamSource | +| XsltInjectionTest.java:47:24:47:78 | new SAXSource(...) : SAXSource | semmle.label | new SAXSource(...) : SAXSource | +| XsltInjectionTest.java:47:38:47:77 | new InputSource(...) : InputSource | semmle.label | new InputSource(...) : InputSource | +| XsltInjectionTest.java:47:54:47:76 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| XsltInjectionTest.java:48:5:48:57 | newTemplates(...) : Templates | semmle.label | newTemplates(...) : Templates | +| XsltInjectionTest.java:48:5:48:74 | newTransformer(...) | semmle.label | newTransformer(...) | +| XsltInjectionTest.java:48:51:48:56 | source : SAXSource | semmle.label | source : SAXSource | +| XsltInjectionTest.java:53:9:53:92 | new SAXSource(...) : SAXSource | semmle.label | new SAXSource(...) : SAXSource | +| XsltInjectionTest.java:53:29:53:91 | new InputSource(...) : InputSource | semmle.label | new InputSource(...) : InputSource | +| XsltInjectionTest.java:53:45:53:90 | new InputStreamReader(...) : InputStreamReader | semmle.label | new InputStreamReader(...) : InputStreamReader | +| XsltInjectionTest.java:53:67:53:89 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| XsltInjectionTest.java:54:5:54:59 | newTransformer(...) | semmle.label | newTransformer(...) | +| XsltInjectionTest.java:54:53:54:58 | source : SAXSource | semmle.label | source : SAXSource | +| XsltInjectionTest.java:59:9:59:99 | new StAXSource(...) : StAXSource | semmle.label | new StAXSource(...) : StAXSource | +| XsltInjectionTest.java:59:24:59:98 | createXMLEventReader(...) : XMLEventReader | semmle.label | createXMLEventReader(...) : XMLEventReader | +| XsltInjectionTest.java:59:75:59:97 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| XsltInjectionTest.java:60:5:60:59 | newTransformer(...) | semmle.label | newTransformer(...) | +| XsltInjectionTest.java:60:53:60:58 | source : StAXSource | semmle.label | source : StAXSource | +| XsltInjectionTest.java:64:25:65:56 | new StAXSource(...) : StAXSource | semmle.label | new StAXSource(...) : StAXSource | +| XsltInjectionTest.java:64:40:65:55 | createXMLStreamReader(...) : XMLStreamReader | semmle.label | createXMLStreamReader(...) : XMLStreamReader | +| XsltInjectionTest.java:65:9:65:54 | new InputStreamReader(...) : InputStreamReader | semmle.label | new InputStreamReader(...) : InputStreamReader | +| XsltInjectionTest.java:65:31:65:53 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| XsltInjectionTest.java:66:5:66:57 | newTemplates(...) : Templates | semmle.label | newTemplates(...) : Templates | +| XsltInjectionTest.java:66:5:66:74 | newTransformer(...) | semmle.label | newTransformer(...) | +| XsltInjectionTest.java:66:51:66:56 | source : StAXSource | semmle.label | source : StAXSource | +| XsltInjectionTest.java:70:24:71:97 | new DOMSource(...) : DOMSource | semmle.label | new DOMSource(...) : DOMSource | +| XsltInjectionTest.java:71:9:71:96 | parse(...) : Document | semmle.label | parse(...) : Document | +| XsltInjectionTest.java:71:73:71:95 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| XsltInjectionTest.java:72:5:72:59 | newTransformer(...) | semmle.label | newTransformer(...) | +| XsltInjectionTest.java:72:53:72:58 | source : DOMSource | semmle.label | source : DOMSource | +| XsltInjectionTest.java:76:27:76:67 | new StreamSource(...) : StreamSource | semmle.label | new StreamSource(...) : StreamSource | +| XsltInjectionTest.java:76:44:76:66 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| XsltInjectionTest.java:80:5:80:34 | newTransformer(...) | semmle.label | newTransformer(...) | +| XsltInjectionTest.java:80:28:80:33 | source : StreamSource | semmle.label | source : StreamSource | +| XsltInjectionTest.java:84:27:84:67 | new StreamSource(...) : StreamSource | semmle.label | new StreamSource(...) : StreamSource | +| XsltInjectionTest.java:84:44:84:66 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| XsltInjectionTest.java:87:5:87:34 | newTransformer(...) | semmle.label | newTransformer(...) | +| XsltInjectionTest.java:87:28:87:33 | source : StreamSource | semmle.label | source : StreamSource | +| XsltInjectionTest.java:91:27:91:67 | new StreamSource(...) : StreamSource | semmle.label | new StreamSource(...) : StreamSource | +| XsltInjectionTest.java:91:44:91:66 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| XsltInjectionTest.java:94:5:94:28 | compile(...) : XsltExecutable | semmle.label | compile(...) : XsltExecutable | +| XsltInjectionTest.java:94:5:94:35 | load(...) | semmle.label | load(...) | +| XsltInjectionTest.java:94:22:94:27 | source : StreamSource | semmle.label | source : StreamSource | +| XsltInjectionTest.java:95:5:95:28 | compile(...) : XsltExecutable | semmle.label | compile(...) : XsltExecutable | +| XsltInjectionTest.java:95:5:95:37 | load30(...) | semmle.label | load30(...) | +| XsltInjectionTest.java:95:22:95:27 | source : StreamSource | semmle.label | source : StreamSource | +| XsltInjectionTest.java:96:5:96:28 | compile(...) : XsltExecutable | semmle.label | compile(...) : XsltExecutable | +| XsltInjectionTest.java:96:5:96:37 | load30(...) | semmle.label | load30(...) | +| XsltInjectionTest.java:96:22:96:27 | source : StreamSource | semmle.label | source : StreamSource | +| XsltInjectionTest.java:97:5:97:28 | compile(...) : XsltExecutable | semmle.label | compile(...) : XsltExecutable | +| XsltInjectionTest.java:97:5:97:37 | load30(...) | semmle.label | load30(...) | +| XsltInjectionTest.java:97:22:97:27 | source : StreamSource | semmle.label | source : StreamSource | +| XsltInjectionTest.java:98:5:98:28 | compile(...) : XsltExecutable | semmle.label | compile(...) : XsltExecutable | +| XsltInjectionTest.java:98:5:98:37 | load30(...) | semmle.label | load30(...) | +| XsltInjectionTest.java:98:22:98:27 | source : StreamSource | semmle.label | source : StreamSource | +| XsltInjectionTest.java:99:5:99:28 | compile(...) : XsltExecutable | semmle.label | compile(...) : XsltExecutable | +| XsltInjectionTest.java:99:5:99:37 | load30(...) | semmle.label | load30(...) | +| XsltInjectionTest.java:99:22:99:27 | source : StreamSource | semmle.label | source : StreamSource | +| XsltInjectionTest.java:100:5:100:28 | compile(...) : XsltExecutable | semmle.label | compile(...) : XsltExecutable | +| XsltInjectionTest.java:100:5:100:37 | load30(...) | semmle.label | load30(...) | +| XsltInjectionTest.java:100:22:100:27 | source : StreamSource | semmle.label | source : StreamSource | +| XsltInjectionTest.java:101:5:101:28 | compile(...) : XsltExecutable | semmle.label | compile(...) : XsltExecutable | +| XsltInjectionTest.java:101:5:101:37 | load30(...) | semmle.label | load30(...) | +| XsltInjectionTest.java:101:22:101:27 | source : StreamSource | semmle.label | source : StreamSource | +| XsltInjectionTest.java:102:5:102:28 | compile(...) : XsltExecutable | semmle.label | compile(...) : XsltExecutable | +| XsltInjectionTest.java:102:5:102:37 | load30(...) | semmle.label | load30(...) | +| XsltInjectionTest.java:102:22:102:27 | source : StreamSource | semmle.label | source : StreamSource | +| XsltInjectionTest.java:103:5:103:28 | compile(...) : XsltExecutable | semmle.label | compile(...) : XsltExecutable | +| XsltInjectionTest.java:103:5:103:37 | load30(...) | semmle.label | load30(...) | +| XsltInjectionTest.java:103:22:103:27 | source : StreamSource | semmle.label | source : StreamSource | +| XsltInjectionTest.java:107:36:107:61 | param : String | semmle.label | param : String | +| XsltInjectionTest.java:107:64:107:76 | socket : Socket | semmle.label | socket : Socket | +| XsltInjectionTest.java:108:15:108:28 | new URI(...) : URI | semmle.label | new URI(...) : URI | +| XsltInjectionTest.java:108:23:108:27 | param : String | semmle.label | param : String | +| XsltInjectionTest.java:109:27:109:67 | new StreamSource(...) : StreamSource | semmle.label | new StreamSource(...) : StreamSource | +| XsltInjectionTest.java:109:44:109:49 | socket : Socket | semmle.label | socket : Socket | +| XsltInjectionTest.java:109:44:109:66 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| XsltInjectionTest.java:112:5:112:39 | loadExecutablePackage(...) : XsltExecutable | semmle.label | loadExecutablePackage(...) : XsltExecutable | +| XsltInjectionTest.java:112:5:112:46 | load(...) | semmle.label | load(...) | +| XsltInjectionTest.java:112:36:112:38 | uri : URI | semmle.label | uri : URI | +| XsltInjectionTest.java:113:5:113:35 | compilePackage(...) : XsltPackage | semmle.label | compilePackage(...) : XsltPackage | +| XsltInjectionTest.java:113:5:113:42 | link(...) : XsltExecutable | semmle.label | link(...) : XsltExecutable | +| XsltInjectionTest.java:113:5:113:49 | load(...) | semmle.label | load(...) | +| XsltInjectionTest.java:113:29:113:34 | source : StreamSource | semmle.label | source : StreamSource | +| XsltInjectionTest.java:114:5:114:36 | loadLibraryPackage(...) : XsltPackage | semmle.label | loadLibraryPackage(...) : XsltPackage | +| XsltInjectionTest.java:114:5:114:43 | link(...) : XsltExecutable | semmle.label | link(...) : XsltExecutable | +| XsltInjectionTest.java:114:5:114:50 | load(...) | semmle.label | load(...) | +| XsltInjectionTest.java:114:33:114:35 | uri : URI | semmle.label | uri : URI | +subpaths diff --git a/java/ql/test/query-tests/security/CWE-074/XsltInjectionTest.java b/java/ql/test/query-tests/security/CWE-074/XsltInjection/XsltInjectionTest.java similarity index 81% rename from java/ql/test/query-tests/security/CWE-074/XsltInjectionTest.java rename to java/ql/test/query-tests/security/CWE-074/XsltInjection/XsltInjectionTest.java index 2bfd02a865c..d6804d801b7 100644 --- a/java/ql/test/query-tests/security/CWE-074/XsltInjectionTest.java +++ b/java/ql/test/query-tests/security/CWE-074/XsltInjection/XsltInjectionTest.java @@ -27,91 +27,91 @@ import net.sf.saxon.s9api.XsltCompiler; @Controller public class XsltInjectionTest { public void testStreamSourceInputStream(Socket socket) throws Exception { - StreamSource source = new StreamSource(socket.getInputStream()); - TransformerFactory.newInstance().newTransformer(source).transform(null, null); // $hasXsltInjection + StreamSource source = new StreamSource(socket.getInputStream()); // $ Source + TransformerFactory.newInstance().newTransformer(source).transform(null, null); // $ Alert } public void testStreamSourceReader(Socket socket) throws Exception { - StreamSource source = new StreamSource(new InputStreamReader(socket.getInputStream())); - TransformerFactory.newInstance().newTemplates(source).newTransformer().transform(null, null); // $hasXsltInjection + StreamSource source = new StreamSource(new InputStreamReader(socket.getInputStream())); // $ Source + TransformerFactory.newInstance().newTemplates(source).newTransformer().transform(null, null); // $ Alert } @RequestMapping - public void testStreamSourceInjectedParam(@RequestParam String param) throws Exception { + public void testStreamSourceInjectedParam(@RequestParam String param) throws Exception { // $ Source String xslt = ""; StreamSource source = new StreamSource(new StringReader(xslt)); - TransformerFactory.newInstance().newTransformer(source).transform(null, null); // $hasXsltInjection + TransformerFactory.newInstance().newTransformer(source).transform(null, null); // $ Alert } public void testSAXSourceInputStream(Socket socket) throws Exception { - SAXSource source = new SAXSource(new InputSource(socket.getInputStream())); - TransformerFactory.newInstance().newTemplates(source).newTransformer().transform(null, null); // $hasXsltInjection + SAXSource source = new SAXSource(new InputSource(socket.getInputStream())); // $ Source + TransformerFactory.newInstance().newTemplates(source).newTransformer().transform(null, null); // $ Alert } public void testSAXSourceReader(Socket socket) throws Exception { SAXSource source = - new SAXSource(null, new InputSource(new InputStreamReader(socket.getInputStream()))); - TransformerFactory.newInstance().newTransformer(source).transform(null, null); // $hasXsltInjection + new SAXSource(null, new InputSource(new InputStreamReader(socket.getInputStream()))); // $ Source + TransformerFactory.newInstance().newTransformer(source).transform(null, null); // $ Alert } public void testStAXSourceEventReader(Socket socket) throws Exception { StAXSource source = - new StAXSource(XMLInputFactory.newInstance().createXMLEventReader(socket.getInputStream())); - TransformerFactory.newInstance().newTransformer(source).transform(null, null); // $hasXsltInjection + new StAXSource(XMLInputFactory.newInstance().createXMLEventReader(socket.getInputStream())); // $ Source + TransformerFactory.newInstance().newTransformer(source).transform(null, null); // $ Alert } public void testStAXSourceEventStream(Socket socket) throws Exception { StAXSource source = new StAXSource(XMLInputFactory.newInstance().createXMLStreamReader(null, - new InputStreamReader(socket.getInputStream()))); - TransformerFactory.newInstance().newTemplates(source).newTransformer().transform(null, null); // $hasXsltInjection + new InputStreamReader(socket.getInputStream()))); // $ Source + TransformerFactory.newInstance().newTemplates(source).newTransformer().transform(null, null); // $ Alert } public void testDOMSource(Socket socket) throws Exception { DOMSource source = new DOMSource( - DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(socket.getInputStream())); - TransformerFactory.newInstance().newTransformer(source).transform(null, null); // $hasXsltInjection + DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(socket.getInputStream())); // $ Source + TransformerFactory.newInstance().newTransformer(source).transform(null, null); // $ Alert } public void testDisabledXXE(Socket socket) throws Exception { - StreamSource source = new StreamSource(socket.getInputStream()); + StreamSource source = new StreamSource(socket.getInputStream()); // $ Source TransformerFactory factory = TransformerFactory.newInstance(); factory.setAttribute(XMLConstants.ACCESS_EXTERNAL_DTD, ""); factory.setAttribute(XMLConstants.ACCESS_EXTERNAL_STYLESHEET, ""); - factory.newTransformer(source).transform(null, null); // $hasXsltInjection + factory.newTransformer(source).transform(null, null); // $ Alert } public void testFeatureSecureProcessingDisabled(Socket socket) throws Exception { - StreamSource source = new StreamSource(socket.getInputStream()); + StreamSource source = new StreamSource(socket.getInputStream()); // $ Source TransformerFactory factory = TransformerFactory.newInstance(); factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, false); - factory.newTransformer(source).transform(null, null); // $hasXsltInjection + factory.newTransformer(source).transform(null, null); // $ Alert } public void testSaxon(Socket socket) throws Exception { - StreamSource source = new StreamSource(socket.getInputStream()); + StreamSource source = new StreamSource(socket.getInputStream()); // $ Source XsltCompiler compiler = new Processor(true).newXsltCompiler(); - compiler.compile(source).load().transform(); // $hasXsltInjection - compiler.compile(source).load30().transform(null, null); // $hasXsltInjection - compiler.compile(source).load30().applyTemplates((Source) null); // $hasXsltInjection - compiler.compile(source).load30().applyTemplates((Source) null, null); // $hasXsltInjection - compiler.compile(source).load30().applyTemplates((XdmValue) null); // $hasXsltInjection - compiler.compile(source).load30().applyTemplates((XdmValue) null, null); // $hasXsltInjection - compiler.compile(source).load30().callFunction(null, null); // $hasXsltInjection - compiler.compile(source).load30().callFunction(null, null, null); // $hasXsltInjection - compiler.compile(source).load30().callTemplate(null); // $hasXsltInjection - compiler.compile(source).load30().callTemplate(null, null); // $hasXsltInjection + compiler.compile(source).load().transform(); // $ Alert + compiler.compile(source).load30().transform(null, null); // $ Alert + compiler.compile(source).load30().applyTemplates((Source) null); // $ Alert + compiler.compile(source).load30().applyTemplates((Source) null, null); // $ Alert + compiler.compile(source).load30().applyTemplates((XdmValue) null); // $ Alert + compiler.compile(source).load30().applyTemplates((XdmValue) null, null); // $ Alert + compiler.compile(source).load30().callFunction(null, null); // $ Alert + compiler.compile(source).load30().callFunction(null, null, null); // $ Alert + compiler.compile(source).load30().callTemplate(null); // $ Alert + compiler.compile(source).load30().callTemplate(null, null); // $ Alert } @RequestMapping - public void testSaxonXsltPackage(@RequestParam String param, Socket socket) throws Exception { + public void testSaxonXsltPackage(@RequestParam String param, Socket socket) throws Exception { // $ Source URI uri = new URI(param); - StreamSource source = new StreamSource(socket.getInputStream()); + StreamSource source = new StreamSource(socket.getInputStream()); // $ Source XsltCompiler compiler = new Processor(true).newXsltCompiler(); - compiler.loadExecutablePackage(uri).load().transform(); // $hasXsltInjection - compiler.compilePackage(source).link().load().transform(); // $hasXsltInjection - compiler.loadLibraryPackage(uri).link().load().transform(); // $hasXsltInjection + compiler.loadExecutablePackage(uri).load().transform(); // $ Alert + compiler.compilePackage(source).link().load().transform(); // $ Alert + compiler.loadLibraryPackage(uri).link().load().transform(); // $ Alert } public void testOkFeatureSecureProcessing(Socket socket) throws Exception { diff --git a/java/ql/test/query-tests/security/CWE-074/XsltInjection/XsltInjectionTest.qlref b/java/ql/test/query-tests/security/CWE-074/XsltInjection/XsltInjectionTest.qlref new file mode 100644 index 00000000000..e32e035cedb --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-074/XsltInjection/XsltInjectionTest.qlref @@ -0,0 +1,4 @@ +query: Security/CWE/CWE-074/XsltInjection.ql +postprocess: + - utils/test/PrettyPrintModels.ql + - utils/test/InlineExpectationsTestQuery.ql diff --git a/java/ql/test/query-tests/security/CWE-074/XsltInjection/options b/java/ql/test/query-tests/security/CWE-074/XsltInjection/options new file mode 100644 index 00000000000..099749ee58b --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-074/XsltInjection/options @@ -0,0 +1 @@ +//semmle-extractor-options: --javac-args -cp ${testdir}/../../../../stubs/springframework-5.8.x:${testdir}/../../../../stubs/shiro-core-1.5.2:${testdir}/../../../../stubs/spring-ldap-2.3.2:${testdir}/../../../../stubs/Saxon-HE-9.9.1-7:${testdir}/../../../../stubs/apache-commons-logging-1.2 diff --git a/java/ql/test/query-tests/security/CWE-074/XsltInjectionTest.expected b/java/ql/test/query-tests/security/CWE-074/XsltInjectionTest.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/java/ql/test/query-tests/security/CWE-074/XsltInjectionTest.ql b/java/ql/test/query-tests/security/CWE-074/XsltInjectionTest.ql deleted file mode 100644 index 72c003246bc..00000000000 --- a/java/ql/test/query-tests/security/CWE-074/XsltInjectionTest.ql +++ /dev/null @@ -1,20 +0,0 @@ -import java -import semmle.code.java.dataflow.TaintTracking -import semmle.code.java.dataflow.FlowSources -import semmle.code.java.security.XsltInjectionQuery -import utils.test.InlineExpectationsTest - -module HasXsltInjectionTest implements TestSig { - string getARelevantTag() { result = "hasXsltInjection" } - - predicate hasActualResult(Location location, string element, string tag, string value) { - tag = "hasXsltInjection" and - exists(DataFlow::Node sink | XsltInjectionFlow::flowTo(sink) | - sink.getLocation() = location and - element = sink.toString() and - value = "" - ) - } -} - -import MakeTest diff --git a/java/ql/test/query-tests/security/CWE-074/options b/java/ql/test/query-tests/security/CWE-074/options deleted file mode 100644 index becd1ca3f58..00000000000 --- a/java/ql/test/query-tests/security/CWE-074/options +++ /dev/null @@ -1 +0,0 @@ -//semmle-extractor-options: --javac-args -cp ${testdir}/../../../stubs/springframework-5.8.x:${testdir}/../../../stubs/shiro-core-1.5.2:${testdir}/../../../stubs/spring-ldap-2.3.2:${testdir}/../../../stubs/Saxon-HE-9.9.1-7:${testdir}/../../../stubs/apache-commons-logging-1.2 diff --git a/java/ql/test/query-tests/security/CWE-079/semmle/tests/JaxXSS.java b/java/ql/test/query-tests/security/CWE-079/semmle/tests/JaxXSS.java index a0719526d97..0e096ab94e0 100644 --- a/java/ql/test/query-tests/security/CWE-079/semmle/tests/JaxXSS.java +++ b/java/ql/test/query-tests/security/CWE-079/semmle/tests/JaxXSS.java @@ -12,25 +12,25 @@ import java.util.Locale; public class JaxXSS { @GET - public static Response specificContentType(boolean safeContentType, boolean chainDirectly, boolean contentTypeFirst, String userControlled) { + public static Response specificContentType(boolean safeContentType, boolean chainDirectly, boolean contentTypeFirst, String userControlled) { // $ Source Response.ResponseBuilder builder = Response.ok(); if(!safeContentType) { if(chainDirectly) { if(contentTypeFirst) - return builder.type(MediaType.TEXT_HTML).entity(userControlled).build(); // $ xss + return builder.type(MediaType.TEXT_HTML).entity(userControlled).build(); // $ Alert else - return builder.entity(userControlled).type(MediaType.TEXT_HTML).build(); // $ xss + return builder.entity(userControlled).type(MediaType.TEXT_HTML).build(); // $ Alert } else { if(contentTypeFirst) { Response.ResponseBuilder builder2 = builder.type(MediaType.TEXT_HTML); - return builder2.entity(userControlled).build(); // $ xss + return builder2.entity(userControlled).build(); // $ Alert } else { Response.ResponseBuilder builder2 = builder.entity(userControlled); - return builder2.type(MediaType.TEXT_HTML).build(); // $ xss + return builder2.type(MediaType.TEXT_HTML).build(); // $ Alert } } } @@ -56,7 +56,7 @@ public class JaxXSS { } @GET - public static Response specificContentTypeSetterMethods(int route, boolean safeContentType, String userControlled) { + public static Response specificContentTypeSetterMethods(int route, boolean safeContentType, String userControlled) { // $ Source // Test the remarkably many routes to setting a content-type in Jax-RS, besides the ResponseBuilder.entity method used above: @@ -105,39 +105,39 @@ public class JaxXSS { else { if(route == 0) { // via ok, as a string literal: - return Response.ok("text/html").entity(userControlled).build(); // $ xss + return Response.ok("text/html").entity(userControlled).build(); // $ Alert } else if(route == 1) { // via ok, as a string constant: - return Response.ok(MediaType.TEXT_HTML).entity(userControlled).build(); // $ xss + return Response.ok(MediaType.TEXT_HTML).entity(userControlled).build(); // $ Alert } else if(route == 2) { // via ok, as a MediaType constant: - return Response.ok(MediaType.TEXT_HTML_TYPE).entity(userControlled).build(); // $ xss + return Response.ok(MediaType.TEXT_HTML_TYPE).entity(userControlled).build(); // $ Alert } else if(route == 3) { // via ok, as a Variant, via constructor: - return Response.ok(new Variant(MediaType.TEXT_HTML_TYPE, "language", "encoding")).entity(userControlled).build(); // $ xss + return Response.ok(new Variant(MediaType.TEXT_HTML_TYPE, "language", "encoding")).entity(userControlled).build(); // $ Alert } else if(route == 4) { // via ok, as a Variant, via static method: - return Response.ok(Variant.mediaTypes(MediaType.TEXT_HTML_TYPE).build()).entity(userControlled).build(); // $ xss + return Response.ok(Variant.mediaTypes(MediaType.TEXT_HTML_TYPE).build()).entity(userControlled).build(); // $ Alert } else if(route == 5) { // via ok, as a Variant, via instance method: - return Response.ok(Variant.languages(Locale.UK).mediaTypes(MediaType.TEXT_HTML_TYPE).build()).entity(userControlled).build(); // $ xss + return Response.ok(Variant.languages(Locale.UK).mediaTypes(MediaType.TEXT_HTML_TYPE).build()).entity(userControlled).build(); // $ Alert } else if(route == 6) { // via builder variant, before entity: - return Response.ok().variant(new Variant(MediaType.TEXT_HTML_TYPE, "language", "encoding")).entity(userControlled).build(); // $ xss + return Response.ok().variant(new Variant(MediaType.TEXT_HTML_TYPE, "language", "encoding")).entity(userControlled).build(); // $ Alert } else if(route == 7) { // via builder variant, after entity: - return Response.ok().entity(userControlled).variant(new Variant(MediaType.TEXT_HTML_TYPE, "language", "encoding")).build(); // $ xss + return Response.ok().entity(userControlled).variant(new Variant(MediaType.TEXT_HTML_TYPE, "language", "encoding")).build(); // $ Alert } else if(route == 8) { // provide entity via ok, then content-type via builder: - return Response.ok(userControlled).type(MediaType.TEXT_HTML_TYPE).build(); // $ xss + return Response.ok(userControlled).type(MediaType.TEXT_HTML_TYPE).build(); // $ Alert } } @@ -161,28 +161,28 @@ public class JaxXSS { } @GET @Produces(MediaType.TEXT_HTML) - public static Response methodContentTypeUnsafe(String userControlled) { - return Response.ok(userControlled).build(); // $ xss + public static Response methodContentTypeUnsafe(String userControlled) { // $ Source + return Response.ok(userControlled).build(); // $ Alert } @POST @Produces(MediaType.TEXT_HTML) - public static Response methodContentTypeUnsafePost(String userControlled) { - return Response.ok(userControlled).build(); // $ xss + public static Response methodContentTypeUnsafePost(String userControlled) { // $ Source + return Response.ok(userControlled).build(); // $ Alert } @GET @Produces("text/html") - public static Response methodContentTypeUnsafeStringLiteral(String userControlled) { - return Response.ok(userControlled).build(); // $ xss + public static Response methodContentTypeUnsafeStringLiteral(String userControlled) { // $ Source + return Response.ok(userControlled).build(); // $ Alert } @GET @Produces({MediaType.TEXT_HTML, MediaType.APPLICATION_JSON}) - public static Response methodContentTypeMaybeSafe(String userControlled) { - return Response.ok(userControlled).build(); // $ xss + public static Response methodContentTypeMaybeSafe(String userControlled) { // $ Source + return Response.ok(userControlled).build(); // $ Alert } @GET @Produces(MediaType.APPLICATION_JSON) - public static Response methodContentTypeSafeOverriddenWithUnsafe(String userControlled) { - return Response.ok().type(MediaType.TEXT_HTML).entity(userControlled).build(); // $ xss + public static Response methodContentTypeSafeOverriddenWithUnsafe(String userControlled) { // $ Source + return Response.ok().type(MediaType.TEXT_HTML).entity(userControlled).build(); // $ Alert } @GET @Produces(MediaType.TEXT_HTML) @@ -204,13 +204,13 @@ public class JaxXSS { } @GET @Produces({"text/html"}) - public Response overridesWithUnsafe(String userControlled) { - return Response.ok(userControlled).build(); // $ xss + public Response overridesWithUnsafe(String userControlled) { // $ Source + return Response.ok(userControlled).build(); // $ Alert } @GET - public Response overridesWithUnsafe2(String userControlled) { - return Response.ok().type(MediaType.TEXT_HTML).entity(userControlled).build(); // $ xss + public Response overridesWithUnsafe2(String userControlled) { // $ Source + return Response.ok().type(MediaType.TEXT_HTML).entity(userControlled).build(); // $ Alert } } @@ -218,13 +218,13 @@ public class JaxXSS { @Produces({"text/html"}) public static class ClassContentTypeUnsafe { @GET - public Response test(String userControlled) { - return Response.ok(userControlled).build(); // $ xss + public Response test(String userControlled) { // $ Source + return Response.ok(userControlled).build(); // $ Alert } @GET - public String testDirectReturn(String userControlled) { - return userControlled; // $ xss + public String testDirectReturn(String userControlled) { // $ Source + return userControlled; // $ Alert } @GET @Produces({"application/json"}) @@ -239,13 +239,13 @@ public class JaxXSS { } @GET - public static Response entityWithNoMediaType(String userControlled) { - return Response.ok(userControlled).build(); // $ xss + public static Response entityWithNoMediaType(String userControlled) { // $ Source + return Response.ok(userControlled).build(); // $ Alert } @GET - public static String stringWithNoMediaType(String userControlled) { - return userControlled; // $ xss + public static String stringWithNoMediaType(String userControlled) { // $ Source + return userControlled; // $ Alert } } diff --git a/java/ql/test/query-tests/security/CWE-079/semmle/tests/JsfXSS.java b/java/ql/test/query-tests/security/CWE-079/semmle/tests/JsfXSS.java index 38df344dff2..f3efab3ddfe 100644 --- a/java/ql/test/query-tests/security/CWE-079/semmle/tests/JsfXSS.java +++ b/java/ql/test/query-tests/security/CWE-079/semmle/tests/JsfXSS.java @@ -18,7 +18,7 @@ public class JsfXSS extends Renderer { super.encodeBegin(facesContext, component); - Map requestParameters = facesContext.getExternalContext().getRequestParameterMap(); + Map requestParameters = facesContext.getExternalContext().getRequestParameterMap(); // $ Source String windowId = requestParameters.get("window_id"); ResponseWriter writer = facesContext.getResponseWriter(); @@ -26,7 +26,7 @@ public class JsfXSS extends Renderer writer.write("(function(){"); writer.write("dswh.init('" + windowId + "','" + "......" + "'," - + -1 + ",{"); // $ xss + + -1 + ",{"); // $ Alert writer.write("});"); writer.write("})();"); writer.write(""); @@ -57,13 +57,13 @@ public class JsfXSS extends Renderer { ExternalContext ec = facesContext.getExternalContext(); ResponseWriter writer = facesContext.getResponseWriter(); - writer.write(ec.getRequestParameterMap().keySet().iterator().next()); // $ xss - writer.write(ec.getRequestParameterNames().next()); // $ xss - writer.write(ec.getRequestParameterValuesMap().get("someKey")[0]); // $ xss - writer.write(ec.getRequestParameterValuesMap().keySet().iterator().next()); // $ xss - writer.write(ec.getRequestPathInfo()); // $ xss - writer.write(((Cookie)ec.getRequestCookieMap().get("someKey")).getName()); // $ xss - writer.write(ec.getRequestHeaderMap().get("someKey")); // $ xss - writer.write(ec.getRequestHeaderValuesMap().get("someKey")[0]); // $ xss + writer.write(ec.getRequestParameterMap().keySet().iterator().next()); // $ Alert + writer.write(ec.getRequestParameterNames().next()); // $ Alert + writer.write(ec.getRequestParameterValuesMap().get("someKey")[0]); // $ Alert + writer.write(ec.getRequestParameterValuesMap().keySet().iterator().next()); // $ Alert + writer.write(ec.getRequestPathInfo()); // $ Alert + writer.write(((Cookie)ec.getRequestCookieMap().get("someKey")).getName()); // $ Alert + writer.write(ec.getRequestHeaderMap().get("someKey")); // $ Alert + writer.write(ec.getRequestHeaderValuesMap().get("someKey")[0]); // $ Alert } } diff --git a/java/ql/test/query-tests/security/CWE-079/semmle/tests/SpringXSS.java b/java/ql/test/query-tests/security/CWE-079/semmle/tests/SpringXSS.java index ff4957f3788..fd3a26bcf10 100644 --- a/java/ql/test/query-tests/security/CWE-079/semmle/tests/SpringXSS.java +++ b/java/ql/test/query-tests/security/CWE-079/semmle/tests/SpringXSS.java @@ -13,17 +13,17 @@ import java.util.Optional; public class SpringXSS { @GetMapping - public static ResponseEntity specificContentType(boolean safeContentType, boolean chainDirectly, String userControlled) { + public static ResponseEntity specificContentType(boolean safeContentType, boolean chainDirectly, String userControlled) { // $ Source ResponseEntity.BodyBuilder builder = ResponseEntity.ok(); if(!safeContentType) { if(chainDirectly) { - return builder.contentType(MediaType.TEXT_HTML).body(userControlled); // $ xss + return builder.contentType(MediaType.TEXT_HTML).body(userControlled); // $ Alert } else { ResponseEntity.BodyBuilder builder2 = builder.contentType(MediaType.TEXT_HTML); - return builder2.body(userControlled); // $ xss + return builder2.body(userControlled); // $ Alert } } else { @@ -59,23 +59,23 @@ public class SpringXSS { } @GetMapping(value = "/xyz", produces = MediaType.TEXT_HTML_VALUE) - public static ResponseEntity methodContentTypeUnsafe(String userControlled) { - return ResponseEntity.ok(userControlled); // $ xss + public static ResponseEntity methodContentTypeUnsafe(String userControlled) { // $ Source + return ResponseEntity.ok(userControlled); // $ Alert } @GetMapping(value = "/xyz", produces = "text/html") - public static ResponseEntity methodContentTypeUnsafeStringLiteral(String userControlled) { - return ResponseEntity.ok(userControlled); // $ xss + public static ResponseEntity methodContentTypeUnsafeStringLiteral(String userControlled) { // $ Source + return ResponseEntity.ok(userControlled); // $ Alert } @GetMapping(value = "/xyz", produces = {MediaType.TEXT_HTML_VALUE, MediaType.APPLICATION_JSON_VALUE}) - public static ResponseEntity methodContentTypeMaybeSafe(String userControlled) { - return ResponseEntity.ok(userControlled); // $ xss + public static ResponseEntity methodContentTypeMaybeSafe(String userControlled) { // $ Source + return ResponseEntity.ok(userControlled); // $ Alert } @GetMapping(value = "/xyz", produces = MediaType.APPLICATION_JSON_VALUE) - public static ResponseEntity methodContentTypeSafeOverriddenWithUnsafe(String userControlled) { - return ResponseEntity.ok().contentType(MediaType.TEXT_HTML).body(userControlled); // $ xss + public static ResponseEntity methodContentTypeSafeOverriddenWithUnsafe(String userControlled) { // $ Source + return ResponseEntity.ok().contentType(MediaType.TEXT_HTML).body(userControlled); // $ Alert } @GetMapping(value = "/xyz", produces = MediaType.TEXT_HTML_VALUE) @@ -84,17 +84,17 @@ public class SpringXSS { } @GetMapping(value = "/xyz", produces = {"text/html", "application/json"}) - public static ResponseEntity methodContentTypeMaybeSafeStringLiterals(String userControlled, int constructionMethod) { + public static ResponseEntity methodContentTypeMaybeSafeStringLiterals(String userControlled, int constructionMethod) { // $ Source // Also try out some alternative constructors for the ResponseEntity: switch(constructionMethod) { case 0: - return ResponseEntity.ok(userControlled); // $ xss + return ResponseEntity.ok(userControlled); // $ Alert case 1: - return ResponseEntity.of(Optional.of(userControlled)); // $ xss + return ResponseEntity.of(Optional.of(userControlled)); // $ Alert case 2: - return ResponseEntity.ok().body(userControlled); // $ xss + return ResponseEntity.ok().body(userControlled); // $ Alert case 3: - return new ResponseEntity(userControlled, HttpStatus.OK); // $ xss + return new ResponseEntity(userControlled, HttpStatus.OK); // $ Alert default: return null; } @@ -114,13 +114,13 @@ public class SpringXSS { } @GetMapping(value = "/xyz", produces = {"text/html"}) - public ResponseEntity overridesWithUnsafe(String userControlled) { - return ResponseEntity.ok(userControlled); // $ xss + public ResponseEntity overridesWithUnsafe(String userControlled) { // $ Source + return ResponseEntity.ok(userControlled); // $ Alert } @GetMapping(value = "/abc") - public ResponseEntity overridesWithUnsafe2(String userControlled) { - return ResponseEntity.ok().contentType(MediaType.TEXT_HTML).body(userControlled); // $ xss + public ResponseEntity overridesWithUnsafe2(String userControlled) { // $ Source + return ResponseEntity.ok().contentType(MediaType.TEXT_HTML).body(userControlled); // $ Alert } } @@ -128,13 +128,13 @@ public class SpringXSS { @RequestMapping(produces = {"text/html"}) private static class ClassContentTypeUnsafe { @GetMapping(value = "/abc") - public ResponseEntity test(String userControlled) { - return ResponseEntity.ok(userControlled); // $ xss + public ResponseEntity test(String userControlled) { // $ Source + return ResponseEntity.ok(userControlled); // $ Alert } @GetMapping(value = "/abc") - public String testDirectReturn(String userControlled) { - return userControlled; // $ xss + public String testDirectReturn(String userControlled) { // $ Source + return userControlled; // $ Alert } @GetMapping(value = "/xyz", produces = {"application/json"}) @@ -149,13 +149,13 @@ public class SpringXSS { } @GetMapping(value = "/abc") - public static ResponseEntity entityWithNoMediaType(String userControlled) { - return ResponseEntity.ok(userControlled); // $ xss + public static ResponseEntity entityWithNoMediaType(String userControlled) { // $ Source + return ResponseEntity.ok(userControlled); // $ Alert } @GetMapping(value = "/abc") - public static String stringWithNoMediaType(String userControlled) { - return userControlled; // $ xss + public static String stringWithNoMediaType(String userControlled) { // $ Source + return userControlled; // $ Alert } @GetMapping(value = "/abc") diff --git a/java/ql/test/query-tests/security/CWE-079/semmle/tests/XSS.expected b/java/ql/test/query-tests/security/CWE-079/semmle/tests/XSS.expected index e69de29bb2d..fcd7fd0ff18 100644 --- a/java/ql/test/query-tests/security/CWE-079/semmle/tests/XSS.expected +++ b/java/ql/test/query-tests/security/CWE-079/semmle/tests/XSS.expected @@ -0,0 +1,336 @@ +#select +| JaxXSS.java:22:59:22:72 | userControlled | JaxXSS.java:15:120:15:140 | userControlled : String | JaxXSS.java:22:59:22:72 | userControlled | Cross-site scripting vulnerability due to a $@. | JaxXSS.java:15:120:15:140 | userControlled | user-provided value | +| JaxXSS.java:24:33:24:46 | userControlled | JaxXSS.java:15:120:15:140 | userControlled : String | JaxXSS.java:24:33:24:46 | userControlled | Cross-site scripting vulnerability due to a $@. | JaxXSS.java:15:120:15:140 | userControlled | user-provided value | +| JaxXSS.java:29:34:29:47 | userControlled | JaxXSS.java:15:120:15:140 | userControlled : String | JaxXSS.java:29:34:29:47 | userControlled | Cross-site scripting vulnerability due to a $@. | JaxXSS.java:15:120:15:140 | userControlled | user-provided value | +| JaxXSS.java:33:18:33:59 | build(...) | JaxXSS.java:15:120:15:140 | userControlled : String | JaxXSS.java:33:18:33:59 | build(...) | Cross-site scripting vulnerability due to a $@. | JaxXSS.java:15:120:15:140 | userControlled | user-provided value | +| JaxXSS.java:108:16:108:70 | build(...) | JaxXSS.java:59:95:59:115 | userControlled : String | JaxXSS.java:108:16:108:70 | build(...) | Cross-site scripting vulnerability due to a $@. | JaxXSS.java:59:95:59:115 | userControlled | user-provided value | +| JaxXSS.java:112:16:112:78 | build(...) | JaxXSS.java:59:95:59:115 | userControlled : String | JaxXSS.java:112:16:112:78 | build(...) | Cross-site scripting vulnerability due to a $@. | JaxXSS.java:59:95:59:115 | userControlled | user-provided value | +| JaxXSS.java:116:16:116:83 | build(...) | JaxXSS.java:59:95:59:115 | userControlled : String | JaxXSS.java:116:16:116:83 | build(...) | Cross-site scripting vulnerability due to a $@. | JaxXSS.java:59:95:59:115 | userControlled | user-provided value | +| JaxXSS.java:120:98:120:111 | userControlled | JaxXSS.java:59:95:59:115 | userControlled : String | JaxXSS.java:120:98:120:111 | userControlled | Cross-site scripting vulnerability due to a $@. | JaxXSS.java:59:95:59:115 | userControlled | user-provided value | +| JaxXSS.java:124:89:124:102 | userControlled | JaxXSS.java:59:95:59:115 | userControlled : String | JaxXSS.java:124:89:124:102 | userControlled | Cross-site scripting vulnerability due to a $@. | JaxXSS.java:59:95:59:115 | userControlled | user-provided value | +| JaxXSS.java:128:110:128:123 | userControlled | JaxXSS.java:59:95:59:115 | userControlled : String | JaxXSS.java:128:110:128:123 | userControlled | Cross-site scripting vulnerability due to a $@. | JaxXSS.java:59:95:59:115 | userControlled | user-provided value | +| JaxXSS.java:132:108:132:121 | userControlled | JaxXSS.java:59:95:59:115 | userControlled : String | JaxXSS.java:132:108:132:121 | userControlled | Cross-site scripting vulnerability due to a $@. | JaxXSS.java:59:95:59:115 | userControlled | user-provided value | +| JaxXSS.java:136:37:136:50 | userControlled | JaxXSS.java:59:95:59:115 | userControlled : String | JaxXSS.java:136:37:136:50 | userControlled | Cross-site scripting vulnerability due to a $@. | JaxXSS.java:59:95:59:115 | userControlled | user-provided value | +| JaxXSS.java:140:16:140:81 | build(...) | JaxXSS.java:59:95:59:115 | userControlled : String | JaxXSS.java:140:16:140:81 | build(...) | Cross-site scripting vulnerability due to a $@. | JaxXSS.java:59:95:59:115 | userControlled | user-provided value | +| JaxXSS.java:165:12:165:46 | build(...) | JaxXSS.java:164:50:164:70 | userControlled : String | JaxXSS.java:165:12:165:46 | build(...) | Cross-site scripting vulnerability due to a $@. | JaxXSS.java:164:50:164:70 | userControlled | user-provided value | +| JaxXSS.java:170:12:170:46 | build(...) | JaxXSS.java:169:54:169:74 | userControlled : String | JaxXSS.java:170:12:170:46 | build(...) | Cross-site scripting vulnerability due to a $@. | JaxXSS.java:169:54:169:74 | userControlled | user-provided value | +| JaxXSS.java:175:12:175:46 | build(...) | JaxXSS.java:174:63:174:83 | userControlled : String | JaxXSS.java:175:12:175:46 | build(...) | Cross-site scripting vulnerability due to a $@. | JaxXSS.java:174:63:174:83 | userControlled | user-provided value | +| JaxXSS.java:180:12:180:46 | build(...) | JaxXSS.java:179:53:179:73 | userControlled : String | JaxXSS.java:180:12:180:46 | build(...) | Cross-site scripting vulnerability due to a $@. | JaxXSS.java:179:53:179:73 | userControlled | user-provided value | +| JaxXSS.java:185:59:185:72 | userControlled | JaxXSS.java:184:68:184:88 | userControlled : String | JaxXSS.java:185:59:185:72 | userControlled | Cross-site scripting vulnerability due to a $@. | JaxXSS.java:184:68:184:88 | userControlled | user-provided value | +| JaxXSS.java:208:14:208:48 | build(...) | JaxXSS.java:207:41:207:61 | userControlled : String | JaxXSS.java:208:14:208:48 | build(...) | Cross-site scripting vulnerability due to a $@. | JaxXSS.java:207:41:207:61 | userControlled | user-provided value | +| JaxXSS.java:213:61:213:74 | userControlled | JaxXSS.java:212:42:212:62 | userControlled : String | JaxXSS.java:213:61:213:74 | userControlled | Cross-site scripting vulnerability due to a $@. | JaxXSS.java:212:42:212:62 | userControlled | user-provided value | +| JaxXSS.java:222:14:222:48 | build(...) | JaxXSS.java:221:26:221:46 | userControlled : String | JaxXSS.java:222:14:222:48 | build(...) | Cross-site scripting vulnerability due to a $@. | JaxXSS.java:221:26:221:46 | userControlled | user-provided value | +| JaxXSS.java:227:14:227:27 | userControlled | JaxXSS.java:226:36:226:56 | userControlled : String | JaxXSS.java:227:14:227:27 | userControlled | Cross-site scripting vulnerability due to a $@. | JaxXSS.java:226:36:226:56 | userControlled | user-provided value | +| JaxXSS.java:243:12:243:46 | build(...) | JaxXSS.java:242:48:242:68 | userControlled : String | JaxXSS.java:243:12:243:46 | build(...) | Cross-site scripting vulnerability due to a $@. | JaxXSS.java:242:48:242:68 | userControlled | user-provided value | +| JaxXSS.java:248:12:248:25 | userControlled | JaxXSS.java:247:46:247:66 | userControlled : String | JaxXSS.java:248:12:248:25 | userControlled | Cross-site scripting vulnerability due to a $@. | JaxXSS.java:247:46:247:66 | userControlled | user-provided value | +| JsfXSS.java:27:22:29:27 | ... + ... | JsfXSS.java:21:50:21:107 | getRequestParameterMap(...) : Map | JsfXSS.java:27:22:29:27 | ... + ... | Cross-site scripting vulnerability due to a $@. | JsfXSS.java:21:50:21:107 | getRequestParameterMap(...) | user-provided value | +| JsfXSS.java:60:22:60:75 | next(...) | JsfXSS.java:60:22:60:48 | getRequestParameterMap(...) : Map | JsfXSS.java:60:22:60:75 | next(...) | Cross-site scripting vulnerability due to a $@. | JsfXSS.java:60:22:60:48 | getRequestParameterMap(...) | user-provided value | +| JsfXSS.java:61:22:61:57 | next(...) | JsfXSS.java:61:22:61:50 | getRequestParameterNames(...) : Iterator | JsfXSS.java:61:22:61:57 | next(...) | Cross-site scripting vulnerability due to a $@. | JsfXSS.java:61:22:61:50 | getRequestParameterNames(...) | user-provided value | +| JsfXSS.java:62:22:62:72 | ...[...] | JsfXSS.java:62:22:62:54 | getRequestParameterValuesMap(...) : Map | JsfXSS.java:62:22:62:72 | ...[...] | Cross-site scripting vulnerability due to a $@. | JsfXSS.java:62:22:62:54 | getRequestParameterValuesMap(...) | user-provided value | +| JsfXSS.java:63:22:63:81 | next(...) | JsfXSS.java:63:22:63:54 | getRequestParameterValuesMap(...) : Map | JsfXSS.java:63:22:63:81 | next(...) | Cross-site scripting vulnerability due to a $@. | JsfXSS.java:63:22:63:54 | getRequestParameterValuesMap(...) | user-provided value | +| JsfXSS.java:64:22:64:44 | getRequestPathInfo(...) | JsfXSS.java:64:22:64:44 | getRequestPathInfo(...) | JsfXSS.java:64:22:64:44 | getRequestPathInfo(...) | Cross-site scripting vulnerability due to a $@. | JsfXSS.java:64:22:64:44 | getRequestPathInfo(...) | user-provided value | +| JsfXSS.java:65:22:65:80 | getName(...) | JsfXSS.java:65:22:65:80 | getName(...) | JsfXSS.java:65:22:65:80 | getName(...) | Cross-site scripting vulnerability due to a $@. | JsfXSS.java:65:22:65:80 | getName(...) | user-provided value | +| JsfXSS.java:66:22:66:60 | get(...) | JsfXSS.java:66:22:66:45 | getRequestHeaderMap(...) : Map | JsfXSS.java:66:22:66:60 | get(...) | Cross-site scripting vulnerability due to a $@. | JsfXSS.java:66:22:66:45 | getRequestHeaderMap(...) | user-provided value | +| JsfXSS.java:67:22:67:69 | ...[...] | JsfXSS.java:67:22:67:51 | getRequestHeaderValuesMap(...) : Map | JsfXSS.java:67:22:67:69 | ...[...] | Cross-site scripting vulnerability due to a $@. | JsfXSS.java:67:22:67:51 | getRequestHeaderValuesMap(...) | user-provided value | +| SpringXSS.java:22:62:22:75 | userControlled | SpringXSS.java:16:108:16:128 | userControlled : String | SpringXSS.java:22:62:22:75 | userControlled | Cross-site scripting vulnerability due to a $@. | SpringXSS.java:16:108:16:128 | userControlled | user-provided value | +| SpringXSS.java:26:30:26:43 | userControlled | SpringXSS.java:16:108:16:128 | userControlled : String | SpringXSS.java:26:30:26:43 | userControlled | Cross-site scripting vulnerability due to a $@. | SpringXSS.java:16:108:16:128 | userControlled | user-provided value | +| SpringXSS.java:63:12:63:44 | ok(...) | SpringXSS.java:62:64:62:84 | userControlled : String | SpringXSS.java:63:12:63:44 | ok(...) | Cross-site scripting vulnerability due to a $@. | SpringXSS.java:62:64:62:84 | userControlled | user-provided value | +| SpringXSS.java:68:12:68:44 | ok(...) | SpringXSS.java:67:77:67:97 | userControlled : String | SpringXSS.java:68:12:68:44 | ok(...) | Cross-site scripting vulnerability due to a $@. | SpringXSS.java:67:77:67:97 | userControlled | user-provided value | +| SpringXSS.java:73:12:73:44 | ok(...) | SpringXSS.java:72:67:72:87 | userControlled : String | SpringXSS.java:73:12:73:44 | ok(...) | Cross-site scripting vulnerability due to a $@. | SpringXSS.java:72:67:72:87 | userControlled | user-provided value | +| SpringXSS.java:78:70:78:83 | userControlled | SpringXSS.java:77:82:77:102 | userControlled : String | SpringXSS.java:78:70:78:83 | userControlled | Cross-site scripting vulnerability due to a $@. | SpringXSS.java:77:82:77:102 | userControlled | user-provided value | +| SpringXSS.java:91:14:91:46 | ok(...) | SpringXSS.java:87:81:87:101 | userControlled : String | SpringXSS.java:91:14:91:46 | ok(...) | Cross-site scripting vulnerability due to a $@. | SpringXSS.java:87:81:87:101 | userControlled | user-provided value | +| SpringXSS.java:93:14:93:59 | of(...) | SpringXSS.java:87:81:87:101 | userControlled : String | SpringXSS.java:93:14:93:59 | of(...) | Cross-site scripting vulnerability due to a $@. | SpringXSS.java:87:81:87:101 | userControlled | user-provided value | +| SpringXSS.java:95:14:95:53 | body(...) | SpringXSS.java:87:81:87:101 | userControlled : String | SpringXSS.java:95:14:95:53 | body(...) | Cross-site scripting vulnerability due to a $@. | SpringXSS.java:87:81:87:101 | userControlled | user-provided value | +| SpringXSS.java:97:14:97:70 | new ResponseEntity(...) | SpringXSS.java:87:81:87:101 | userControlled : String | SpringXSS.java:97:14:97:70 | new ResponseEntity(...) | Cross-site scripting vulnerability due to a $@. | SpringXSS.java:87:81:87:101 | userControlled | user-provided value | +| SpringXSS.java:118:14:118:46 | ok(...) | SpringXSS.java:117:55:117:75 | userControlled : String | SpringXSS.java:118:14:118:46 | ok(...) | Cross-site scripting vulnerability due to a $@. | SpringXSS.java:117:55:117:75 | userControlled | user-provided value | +| SpringXSS.java:123:72:123:85 | userControlled | SpringXSS.java:122:56:122:76 | userControlled : String | SpringXSS.java:123:72:123:85 | userControlled | Cross-site scripting vulnerability due to a $@. | SpringXSS.java:122:56:122:76 | userControlled | user-provided value | +| SpringXSS.java:132:14:132:46 | ok(...) | SpringXSS.java:131:40:131:60 | userControlled : String | SpringXSS.java:132:14:132:46 | ok(...) | Cross-site scripting vulnerability due to a $@. | SpringXSS.java:131:40:131:60 | userControlled | user-provided value | +| SpringXSS.java:137:14:137:27 | userControlled | SpringXSS.java:136:36:136:56 | userControlled : String | SpringXSS.java:137:14:137:27 | userControlled | Cross-site scripting vulnerability due to a $@. | SpringXSS.java:136:36:136:56 | userControlled | user-provided value | +| SpringXSS.java:153:12:153:44 | ok(...) | SpringXSS.java:152:62:152:82 | userControlled : String | SpringXSS.java:153:12:153:44 | ok(...) | Cross-site scripting vulnerability due to a $@. | SpringXSS.java:152:62:152:82 | userControlled | user-provided value | +| SpringXSS.java:158:12:158:25 | userControlled | SpringXSS.java:157:46:157:66 | userControlled : String | SpringXSS.java:158:12:158:25 | userControlled | Cross-site scripting vulnerability due to a $@. | SpringXSS.java:157:46:157:66 | userControlled | user-provided value | +| XSS.java:19:12:19:77 | ... + ... | XSS.java:19:28:19:55 | getParameter(...) : String | XSS.java:19:12:19:77 | ... + ... | Cross-site scripting vulnerability due to a $@. | XSS.java:19:28:19:55 | getParameter(...) | user-provided value | +| XSS.java:34:30:34:87 | ... + ... | XSS.java:34:67:34:87 | getPathInfo(...) : String | XSS.java:34:30:34:87 | ... + ... | Cross-site scripting vulnerability due to a $@. | XSS.java:34:67:34:87 | getPathInfo(...) | user-provided value | +| XSS.java:37:36:37:67 | getBytes(...) | XSS.java:37:36:37:56 | getPathInfo(...) : String | XSS.java:37:36:37:67 | getBytes(...) | Cross-site scripting vulnerability due to a $@. | XSS.java:37:36:37:56 | getPathInfo(...) | user-provided value | +| XSS.java:83:33:83:53 | getPathInfo(...) | XSS.java:83:33:83:53 | getPathInfo(...) | XSS.java:83:33:83:53 | getPathInfo(...) | Cross-site scripting vulnerability due to a $@. | XSS.java:83:33:83:53 | getPathInfo(...) | user-provided value | +| XSS.java:88:33:88:53 | getPathInfo(...) | XSS.java:88:33:88:53 | getPathInfo(...) | XSS.java:88:33:88:53 | getPathInfo(...) | Cross-site scripting vulnerability due to a $@. | XSS.java:88:33:88:53 | getPathInfo(...) | user-provided value | +| XSS.java:93:33:93:53 | getPathInfo(...) | XSS.java:93:33:93:53 | getPathInfo(...) | XSS.java:93:33:93:53 | getPathInfo(...) | Cross-site scripting vulnerability due to a $@. | XSS.java:93:33:93:53 | getPathInfo(...) | user-provided value | +| XSS.java:100:39:100:70 | getBytes(...) | XSS.java:100:39:100:59 | getPathInfo(...) : String | XSS.java:100:39:100:70 | getBytes(...) | Cross-site scripting vulnerability due to a $@. | XSS.java:100:39:100:59 | getPathInfo(...) | user-provided value | +| XSS.java:105:39:105:70 | getBytes(...) | XSS.java:105:39:105:59 | getPathInfo(...) : String | XSS.java:105:39:105:70 | getBytes(...) | Cross-site scripting vulnerability due to a $@. | XSS.java:105:39:105:59 | getPathInfo(...) | user-provided value | +| XSS.java:110:39:110:70 | getBytes(...) | XSS.java:110:39:110:59 | getPathInfo(...) : String | XSS.java:110:39:110:70 | getBytes(...) | Cross-site scripting vulnerability due to a $@. | XSS.java:110:39:110:59 | getPathInfo(...) | user-provided value | +edges +| JaxXSS.java:15:120:15:140 | userControlled : String | JaxXSS.java:22:59:22:72 | userControlled | provenance | | +| JaxXSS.java:15:120:15:140 | userControlled : String | JaxXSS.java:24:33:24:46 | userControlled | provenance | | +| JaxXSS.java:15:120:15:140 | userControlled : String | JaxXSS.java:29:34:29:47 | userControlled | provenance | | +| JaxXSS.java:15:120:15:140 | userControlled : String | JaxXSS.java:32:62:32:75 | userControlled : String | provenance | | +| JaxXSS.java:32:47:32:76 | entity(...) : ResponseBuilder | JaxXSS.java:33:18:33:25 | builder2 : ResponseBuilder | provenance | | +| JaxXSS.java:32:62:32:75 | userControlled : String | JaxXSS.java:32:47:32:76 | entity(...) : ResponseBuilder | provenance | MaD:17+MaD:18 | +| JaxXSS.java:33:18:33:25 | builder2 : ResponseBuilder | JaxXSS.java:33:18:33:51 | type(...) : ResponseBuilder | provenance | MaD:19 | +| JaxXSS.java:33:18:33:51 | type(...) : ResponseBuilder | JaxXSS.java:33:18:33:59 | build(...) | provenance | MaD:16 | +| JaxXSS.java:59:95:59:115 | userControlled : String | JaxXSS.java:108:48:108:61 | userControlled : String | provenance | | +| JaxXSS.java:59:95:59:115 | userControlled : String | JaxXSS.java:112:56:112:69 | userControlled : String | provenance | | +| JaxXSS.java:59:95:59:115 | userControlled : String | JaxXSS.java:116:61:116:74 | userControlled : String | provenance | | +| JaxXSS.java:59:95:59:115 | userControlled : String | JaxXSS.java:120:98:120:111 | userControlled | provenance | | +| JaxXSS.java:59:95:59:115 | userControlled : String | JaxXSS.java:124:89:124:102 | userControlled | provenance | | +| JaxXSS.java:59:95:59:115 | userControlled : String | JaxXSS.java:128:110:128:123 | userControlled | provenance | | +| JaxXSS.java:59:95:59:115 | userControlled : String | JaxXSS.java:132:108:132:121 | userControlled | provenance | | +| JaxXSS.java:59:95:59:115 | userControlled : String | JaxXSS.java:136:37:136:50 | userControlled | provenance | | +| JaxXSS.java:59:95:59:115 | userControlled : String | JaxXSS.java:140:28:140:41 | userControlled : String | provenance | | +| JaxXSS.java:108:16:108:62 | entity(...) : ResponseBuilder | JaxXSS.java:108:16:108:70 | build(...) | provenance | MaD:16 | +| JaxXSS.java:108:48:108:61 | userControlled : String | JaxXSS.java:108:16:108:62 | entity(...) : ResponseBuilder | provenance | MaD:17+MaD:18 | +| JaxXSS.java:112:16:112:70 | entity(...) : ResponseBuilder | JaxXSS.java:112:16:112:78 | build(...) | provenance | MaD:16 | +| JaxXSS.java:112:56:112:69 | userControlled : String | JaxXSS.java:112:16:112:70 | entity(...) : ResponseBuilder | provenance | MaD:17+MaD:18 | +| JaxXSS.java:116:16:116:75 | entity(...) : ResponseBuilder | JaxXSS.java:116:16:116:83 | build(...) | provenance | MaD:16 | +| JaxXSS.java:116:61:116:74 | userControlled : String | JaxXSS.java:116:16:116:75 | entity(...) : ResponseBuilder | provenance | MaD:17+MaD:18 | +| JaxXSS.java:140:16:140:42 | ok(...) : ResponseBuilder | JaxXSS.java:140:16:140:73 | type(...) : ResponseBuilder | provenance | MaD:19 | +| JaxXSS.java:140:16:140:73 | type(...) : ResponseBuilder | JaxXSS.java:140:16:140:81 | build(...) | provenance | MaD:16 | +| JaxXSS.java:140:28:140:41 | userControlled : String | JaxXSS.java:140:16:140:42 | ok(...) : ResponseBuilder | provenance | MaD:20 | +| JaxXSS.java:164:50:164:70 | userControlled : String | JaxXSS.java:165:24:165:37 | userControlled : String | provenance | | +| JaxXSS.java:165:12:165:38 | ok(...) : ResponseBuilder | JaxXSS.java:165:12:165:46 | build(...) | provenance | MaD:16 | +| JaxXSS.java:165:24:165:37 | userControlled : String | JaxXSS.java:165:12:165:38 | ok(...) : ResponseBuilder | provenance | MaD:20 | +| JaxXSS.java:169:54:169:74 | userControlled : String | JaxXSS.java:170:24:170:37 | userControlled : String | provenance | | +| JaxXSS.java:170:12:170:38 | ok(...) : ResponseBuilder | JaxXSS.java:170:12:170:46 | build(...) | provenance | MaD:16 | +| JaxXSS.java:170:24:170:37 | userControlled : String | JaxXSS.java:170:12:170:38 | ok(...) : ResponseBuilder | provenance | MaD:20 | +| JaxXSS.java:174:63:174:83 | userControlled : String | JaxXSS.java:175:24:175:37 | userControlled : String | provenance | | +| JaxXSS.java:175:12:175:38 | ok(...) : ResponseBuilder | JaxXSS.java:175:12:175:46 | build(...) | provenance | MaD:16 | +| JaxXSS.java:175:24:175:37 | userControlled : String | JaxXSS.java:175:12:175:38 | ok(...) : ResponseBuilder | provenance | MaD:20 | +| JaxXSS.java:179:53:179:73 | userControlled : String | JaxXSS.java:180:24:180:37 | userControlled : String | provenance | | +| JaxXSS.java:180:12:180:38 | ok(...) : ResponseBuilder | JaxXSS.java:180:12:180:46 | build(...) | provenance | MaD:16 | +| JaxXSS.java:180:24:180:37 | userControlled : String | JaxXSS.java:180:12:180:38 | ok(...) : ResponseBuilder | provenance | MaD:20 | +| JaxXSS.java:184:68:184:88 | userControlled : String | JaxXSS.java:185:59:185:72 | userControlled | provenance | | +| JaxXSS.java:207:41:207:61 | userControlled : String | JaxXSS.java:208:26:208:39 | userControlled : String | provenance | | +| JaxXSS.java:208:14:208:40 | ok(...) : ResponseBuilder | JaxXSS.java:208:14:208:48 | build(...) | provenance | MaD:16 | +| JaxXSS.java:208:26:208:39 | userControlled : String | JaxXSS.java:208:14:208:40 | ok(...) : ResponseBuilder | provenance | MaD:20 | +| JaxXSS.java:212:42:212:62 | userControlled : String | JaxXSS.java:213:61:213:74 | userControlled | provenance | | +| JaxXSS.java:221:26:221:46 | userControlled : String | JaxXSS.java:222:26:222:39 | userControlled : String | provenance | | +| JaxXSS.java:222:14:222:40 | ok(...) : ResponseBuilder | JaxXSS.java:222:14:222:48 | build(...) | provenance | MaD:16 | +| JaxXSS.java:222:26:222:39 | userControlled : String | JaxXSS.java:222:14:222:40 | ok(...) : ResponseBuilder | provenance | MaD:20 | +| JaxXSS.java:226:36:226:56 | userControlled : String | JaxXSS.java:227:14:227:27 | userControlled | provenance | | +| JaxXSS.java:242:48:242:68 | userControlled : String | JaxXSS.java:243:24:243:37 | userControlled : String | provenance | | +| JaxXSS.java:243:12:243:38 | ok(...) : ResponseBuilder | JaxXSS.java:243:12:243:46 | build(...) | provenance | MaD:16 | +| JaxXSS.java:243:24:243:37 | userControlled : String | JaxXSS.java:243:12:243:38 | ok(...) : ResponseBuilder | provenance | MaD:20 | +| JaxXSS.java:247:46:247:66 | userControlled : String | JaxXSS.java:248:12:248:25 | userControlled | provenance | | +| JsfXSS.java:21:50:21:107 | getRequestParameterMap(...) : Map | JsfXSS.java:22:27:22:43 | requestParameters : Map | provenance | Src:MaD:5 | +| JsfXSS.java:22:27:22:43 | requestParameters : Map | JsfXSS.java:22:27:22:60 | get(...) : String | provenance | MaD:13 | +| JsfXSS.java:22:27:22:60 | get(...) : String | JsfXSS.java:27:22:29:27 | ... + ... | provenance | Sink:MaD:2 | +| JsfXSS.java:60:22:60:48 | getRequestParameterMap(...) : Map | JsfXSS.java:60:22:60:57 | keySet(...) : Set [] : Object | provenance | Src:MaD:5 MaD:14 | +| JsfXSS.java:60:22:60:57 | keySet(...) : Set [] : Object | JsfXSS.java:60:22:60:68 | iterator(...) : Iterator [] : Object | provenance | MaD:10 | +| JsfXSS.java:60:22:60:68 | iterator(...) : Iterator [] : Object | JsfXSS.java:60:22:60:75 | next(...) | provenance | MaD:12 Sink:MaD:2 | +| JsfXSS.java:61:22:61:50 | getRequestParameterNames(...) : Iterator | JsfXSS.java:61:22:61:57 | next(...) | provenance | Src:MaD:6 MaD:12 Sink:MaD:2 | +| JsfXSS.java:62:22:62:54 | getRequestParameterValuesMap(...) : Map | JsfXSS.java:62:22:62:69 | get(...) : String[] | provenance | Src:MaD:7 MaD:13 | +| JsfXSS.java:62:22:62:69 | get(...) : String[] | JsfXSS.java:62:22:62:72 | ...[...] | provenance | Sink:MaD:2 | +| JsfXSS.java:63:22:63:54 | getRequestParameterValuesMap(...) : Map | JsfXSS.java:63:22:63:63 | keySet(...) : Set [] : Object | provenance | Src:MaD:7 MaD:14 | +| JsfXSS.java:63:22:63:63 | keySet(...) : Set [] : Object | JsfXSS.java:63:22:63:74 | iterator(...) : Iterator [] : Object | provenance | MaD:10 | +| JsfXSS.java:63:22:63:74 | iterator(...) : Iterator [] : Object | JsfXSS.java:63:22:63:81 | next(...) | provenance | MaD:12 Sink:MaD:2 | +| JsfXSS.java:66:22:66:45 | getRequestHeaderMap(...) : Map | JsfXSS.java:66:22:66:60 | get(...) | provenance | Src:MaD:3 MaD:13 Sink:MaD:2 | +| JsfXSS.java:67:22:67:51 | getRequestHeaderValuesMap(...) : Map | JsfXSS.java:67:22:67:66 | get(...) : String[] | provenance | Src:MaD:4 MaD:13 | +| JsfXSS.java:67:22:67:66 | get(...) : String[] | JsfXSS.java:67:22:67:69 | ...[...] | provenance | Sink:MaD:2 | +| SpringXSS.java:16:108:16:128 | userControlled : String | SpringXSS.java:22:62:22:75 | userControlled | provenance | | +| SpringXSS.java:16:108:16:128 | userControlled : String | SpringXSS.java:26:30:26:43 | userControlled | provenance | | +| SpringXSS.java:62:64:62:84 | userControlled : String | SpringXSS.java:63:12:63:44 | ok(...) | provenance | SpringResponseEntity | +| SpringXSS.java:62:64:62:84 | userControlled : String | SpringXSS.java:63:30:63:43 | userControlled : String | provenance | | +| SpringXSS.java:63:30:63:43 | userControlled : String | SpringXSS.java:63:12:63:44 | ok(...) | provenance | MaD:24 | +| SpringXSS.java:67:77:67:97 | userControlled : String | SpringXSS.java:68:12:68:44 | ok(...) | provenance | SpringResponseEntity | +| SpringXSS.java:67:77:67:97 | userControlled : String | SpringXSS.java:68:30:68:43 | userControlled : String | provenance | | +| SpringXSS.java:68:30:68:43 | userControlled : String | SpringXSS.java:68:12:68:44 | ok(...) | provenance | MaD:24 | +| SpringXSS.java:72:67:72:87 | userControlled : String | SpringXSS.java:73:12:73:44 | ok(...) | provenance | SpringResponseEntity | +| SpringXSS.java:72:67:72:87 | userControlled : String | SpringXSS.java:73:30:73:43 | userControlled : String | provenance | | +| SpringXSS.java:73:30:73:43 | userControlled : String | SpringXSS.java:73:12:73:44 | ok(...) | provenance | MaD:24 | +| SpringXSS.java:77:82:77:102 | userControlled : String | SpringXSS.java:78:70:78:83 | userControlled | provenance | | +| SpringXSS.java:87:81:87:101 | userControlled : String | SpringXSS.java:91:14:91:46 | ok(...) | provenance | SpringResponseEntity | +| SpringXSS.java:87:81:87:101 | userControlled : String | SpringXSS.java:91:32:91:45 | userControlled : String | provenance | | +| SpringXSS.java:87:81:87:101 | userControlled : String | SpringXSS.java:93:44:93:57 | userControlled : String | provenance | | +| SpringXSS.java:87:81:87:101 | userControlled : String | SpringXSS.java:95:14:95:53 | body(...) | provenance | SpringResponseEntityBodyBuilder | +| SpringXSS.java:87:81:87:101 | userControlled : String | SpringXSS.java:95:39:95:52 | userControlled : String | provenance | | +| SpringXSS.java:87:81:87:101 | userControlled : String | SpringXSS.java:97:41:97:54 | userControlled : String | provenance | | +| SpringXSS.java:91:32:91:45 | userControlled : String | SpringXSS.java:91:14:91:46 | ok(...) | provenance | MaD:24 | +| SpringXSS.java:93:32:93:58 | of(...) : Optional [] : String | SpringXSS.java:93:14:93:59 | of(...) | provenance | MaD:23 | +| SpringXSS.java:93:44:93:57 | userControlled : String | SpringXSS.java:93:32:93:58 | of(...) : Optional [] : String | provenance | MaD:15 | +| SpringXSS.java:95:39:95:52 | userControlled : String | SpringXSS.java:95:14:95:53 | body(...) | provenance | MaD:21 | +| SpringXSS.java:97:41:97:54 | userControlled : String | SpringXSS.java:97:14:97:70 | new ResponseEntity(...) | provenance | MaD:22 | +| SpringXSS.java:117:55:117:75 | userControlled : String | SpringXSS.java:118:14:118:46 | ok(...) | provenance | SpringResponseEntity | +| SpringXSS.java:117:55:117:75 | userControlled : String | SpringXSS.java:118:32:118:45 | userControlled : String | provenance | | +| SpringXSS.java:118:32:118:45 | userControlled : String | SpringXSS.java:118:14:118:46 | ok(...) | provenance | MaD:24 | +| SpringXSS.java:122:56:122:76 | userControlled : String | SpringXSS.java:123:72:123:85 | userControlled | provenance | | +| SpringXSS.java:131:40:131:60 | userControlled : String | SpringXSS.java:132:14:132:46 | ok(...) | provenance | SpringResponseEntity | +| SpringXSS.java:131:40:131:60 | userControlled : String | SpringXSS.java:132:32:132:45 | userControlled : String | provenance | | +| SpringXSS.java:132:32:132:45 | userControlled : String | SpringXSS.java:132:14:132:46 | ok(...) | provenance | MaD:24 | +| SpringXSS.java:136:36:136:56 | userControlled : String | SpringXSS.java:137:14:137:27 | userControlled | provenance | | +| SpringXSS.java:152:62:152:82 | userControlled : String | SpringXSS.java:153:12:153:44 | ok(...) | provenance | SpringResponseEntity | +| SpringXSS.java:152:62:152:82 | userControlled : String | SpringXSS.java:153:30:153:43 | userControlled : String | provenance | | +| SpringXSS.java:153:30:153:43 | userControlled : String | SpringXSS.java:153:12:153:44 | ok(...) | provenance | MaD:24 | +| SpringXSS.java:157:46:157:66 | userControlled : String | SpringXSS.java:158:12:158:25 | userControlled | provenance | | +| XSS.java:19:28:19:55 | getParameter(...) : String | XSS.java:19:12:19:77 | ... + ... | provenance | Src:MaD:9 Sink:MaD:1 | +| XSS.java:34:67:34:87 | getPathInfo(...) : String | XSS.java:34:30:34:87 | ... + ... | provenance | Src:MaD:8 Sink:MaD:1 | +| XSS.java:37:36:37:56 | getPathInfo(...) : String | XSS.java:37:36:37:67 | getBytes(...) | provenance | Src:MaD:8 MaD:11 | +| XSS.java:100:39:100:59 | getPathInfo(...) : String | XSS.java:100:39:100:70 | getBytes(...) | provenance | Src:MaD:8 MaD:11 | +| XSS.java:105:39:105:59 | getPathInfo(...) : String | XSS.java:105:39:105:70 | getBytes(...) | provenance | Src:MaD:8 MaD:11 | +| XSS.java:110:39:110:59 | getPathInfo(...) : String | XSS.java:110:39:110:70 | getBytes(...) | provenance | Src:MaD:8 MaD:11 | +models +| 1 | Sink: java.io; PrintWriter; false; print; ; ; Argument[0]; file-content-store; manual | +| 2 | Sink: java.io; Writer; true; write; ; ; Argument[0]; file-content-store; manual | +| 3 | Source: javax.faces.context; ExternalContext; true; getRequestHeaderMap; (); ; ReturnValue; remote; manual | +| 4 | Source: javax.faces.context; ExternalContext; true; getRequestHeaderValuesMap; (); ; ReturnValue; remote; manual | +| 5 | Source: javax.faces.context; ExternalContext; true; getRequestParameterMap; (); ; ReturnValue; remote; manual | +| 6 | Source: javax.faces.context; ExternalContext; true; getRequestParameterNames; (); ; ReturnValue; remote; manual | +| 7 | Source: javax.faces.context; ExternalContext; true; getRequestParameterValuesMap; (); ; ReturnValue; remote; manual | +| 8 | Source: javax.servlet.http; HttpServletRequest; false; getPathInfo; (); ; ReturnValue; remote; manual | +| 9 | Source: javax.servlet; ServletRequest; false; getParameter; (String); ; ReturnValue; remote; manual | +| 10 | Summary: java.lang; Iterable; true; iterator; (); ; Argument[this].Element; ReturnValue.Element; value; manual | +| 11 | Summary: java.lang; String; false; getBytes; ; ; Argument[this]; ReturnValue; taint; manual | +| 12 | Summary: java.util; Iterator; true; next; ; ; Argument[this].Element; ReturnValue; value; manual | +| 13 | Summary: java.util; Map; true; get; ; ; Argument[this].MapValue; ReturnValue; value; manual | +| 14 | Summary: java.util; Map; true; keySet; (); ; Argument[this].MapKey; ReturnValue.Element; value; manual | +| 15 | Summary: java.util; Optional; false; of; ; ; Argument[0]; ReturnValue.Element; value; manual | +| 16 | Summary: javax.ws.rs.core; Response$ResponseBuilder; true; build; ; ; Argument[this]; ReturnValue; taint; manual | +| 17 | Summary: javax.ws.rs.core; Response$ResponseBuilder; true; entity; ; ; Argument[0]; Argument[this]; taint; manual | +| 18 | Summary: javax.ws.rs.core; Response$ResponseBuilder; true; entity; ; ; Argument[this]; ReturnValue; value; manual | +| 19 | Summary: javax.ws.rs.core; Response$ResponseBuilder; true; type; ; ; Argument[this]; ReturnValue; value; manual | +| 20 | Summary: javax.ws.rs.core; Response; false; ok; ; ; Argument[0]; ReturnValue; taint; manual | +| 21 | Summary: org.springframework.http; ResponseEntity$BodyBuilder; true; body; (Object); ; Argument[0]; ReturnValue; taint; manual | +| 22 | Summary: org.springframework.http; ResponseEntity; true; ResponseEntity; (Object,HttpStatus); ; Argument[0]; Argument[this]; taint; manual | +| 23 | Summary: org.springframework.http; ResponseEntity; true; of; (Optional); ; Argument[0].Element; ReturnValue; taint; manual | +| 24 | Summary: org.springframework.http; ResponseEntity; true; ok; (Object); ; Argument[0]; ReturnValue; taint; manual | +nodes +| JaxXSS.java:15:120:15:140 | userControlled : String | semmle.label | userControlled : String | +| JaxXSS.java:22:59:22:72 | userControlled | semmle.label | userControlled | +| JaxXSS.java:24:33:24:46 | userControlled | semmle.label | userControlled | +| JaxXSS.java:29:34:29:47 | userControlled | semmle.label | userControlled | +| JaxXSS.java:32:47:32:76 | entity(...) : ResponseBuilder | semmle.label | entity(...) : ResponseBuilder | +| JaxXSS.java:32:62:32:75 | userControlled : String | semmle.label | userControlled : String | +| JaxXSS.java:33:18:33:25 | builder2 : ResponseBuilder | semmle.label | builder2 : ResponseBuilder | +| JaxXSS.java:33:18:33:51 | type(...) : ResponseBuilder | semmle.label | type(...) : ResponseBuilder | +| JaxXSS.java:33:18:33:59 | build(...) | semmle.label | build(...) | +| JaxXSS.java:59:95:59:115 | userControlled : String | semmle.label | userControlled : String | +| JaxXSS.java:108:16:108:62 | entity(...) : ResponseBuilder | semmle.label | entity(...) : ResponseBuilder | +| JaxXSS.java:108:16:108:70 | build(...) | semmle.label | build(...) | +| JaxXSS.java:108:48:108:61 | userControlled : String | semmle.label | userControlled : String | +| JaxXSS.java:112:16:112:70 | entity(...) : ResponseBuilder | semmle.label | entity(...) : ResponseBuilder | +| JaxXSS.java:112:16:112:78 | build(...) | semmle.label | build(...) | +| JaxXSS.java:112:56:112:69 | userControlled : String | semmle.label | userControlled : String | +| JaxXSS.java:116:16:116:75 | entity(...) : ResponseBuilder | semmle.label | entity(...) : ResponseBuilder | +| JaxXSS.java:116:16:116:83 | build(...) | semmle.label | build(...) | +| JaxXSS.java:116:61:116:74 | userControlled : String | semmle.label | userControlled : String | +| JaxXSS.java:120:98:120:111 | userControlled | semmle.label | userControlled | +| JaxXSS.java:124:89:124:102 | userControlled | semmle.label | userControlled | +| JaxXSS.java:128:110:128:123 | userControlled | semmle.label | userControlled | +| JaxXSS.java:132:108:132:121 | userControlled | semmle.label | userControlled | +| JaxXSS.java:136:37:136:50 | userControlled | semmle.label | userControlled | +| JaxXSS.java:140:16:140:42 | ok(...) : ResponseBuilder | semmle.label | ok(...) : ResponseBuilder | +| JaxXSS.java:140:16:140:73 | type(...) : ResponseBuilder | semmle.label | type(...) : ResponseBuilder | +| JaxXSS.java:140:16:140:81 | build(...) | semmle.label | build(...) | +| JaxXSS.java:140:28:140:41 | userControlled : String | semmle.label | userControlled : String | +| JaxXSS.java:164:50:164:70 | userControlled : String | semmle.label | userControlled : String | +| JaxXSS.java:165:12:165:38 | ok(...) : ResponseBuilder | semmle.label | ok(...) : ResponseBuilder | +| JaxXSS.java:165:12:165:46 | build(...) | semmle.label | build(...) | +| JaxXSS.java:165:24:165:37 | userControlled : String | semmle.label | userControlled : String | +| JaxXSS.java:169:54:169:74 | userControlled : String | semmle.label | userControlled : String | +| JaxXSS.java:170:12:170:38 | ok(...) : ResponseBuilder | semmle.label | ok(...) : ResponseBuilder | +| JaxXSS.java:170:12:170:46 | build(...) | semmle.label | build(...) | +| JaxXSS.java:170:24:170:37 | userControlled : String | semmle.label | userControlled : String | +| JaxXSS.java:174:63:174:83 | userControlled : String | semmle.label | userControlled : String | +| JaxXSS.java:175:12:175:38 | ok(...) : ResponseBuilder | semmle.label | ok(...) : ResponseBuilder | +| JaxXSS.java:175:12:175:46 | build(...) | semmle.label | build(...) | +| JaxXSS.java:175:24:175:37 | userControlled : String | semmle.label | userControlled : String | +| JaxXSS.java:179:53:179:73 | userControlled : String | semmle.label | userControlled : String | +| JaxXSS.java:180:12:180:38 | ok(...) : ResponseBuilder | semmle.label | ok(...) : ResponseBuilder | +| JaxXSS.java:180:12:180:46 | build(...) | semmle.label | build(...) | +| JaxXSS.java:180:24:180:37 | userControlled : String | semmle.label | userControlled : String | +| JaxXSS.java:184:68:184:88 | userControlled : String | semmle.label | userControlled : String | +| JaxXSS.java:185:59:185:72 | userControlled | semmle.label | userControlled | +| JaxXSS.java:207:41:207:61 | userControlled : String | semmle.label | userControlled : String | +| JaxXSS.java:208:14:208:40 | ok(...) : ResponseBuilder | semmle.label | ok(...) : ResponseBuilder | +| JaxXSS.java:208:14:208:48 | build(...) | semmle.label | build(...) | +| JaxXSS.java:208:26:208:39 | userControlled : String | semmle.label | userControlled : String | +| JaxXSS.java:212:42:212:62 | userControlled : String | semmle.label | userControlled : String | +| JaxXSS.java:213:61:213:74 | userControlled | semmle.label | userControlled | +| JaxXSS.java:221:26:221:46 | userControlled : String | semmle.label | userControlled : String | +| JaxXSS.java:222:14:222:40 | ok(...) : ResponseBuilder | semmle.label | ok(...) : ResponseBuilder | +| JaxXSS.java:222:14:222:48 | build(...) | semmle.label | build(...) | +| JaxXSS.java:222:26:222:39 | userControlled : String | semmle.label | userControlled : String | +| JaxXSS.java:226:36:226:56 | userControlled : String | semmle.label | userControlled : String | +| JaxXSS.java:227:14:227:27 | userControlled | semmle.label | userControlled | +| JaxXSS.java:242:48:242:68 | userControlled : String | semmle.label | userControlled : String | +| JaxXSS.java:243:12:243:38 | ok(...) : ResponseBuilder | semmle.label | ok(...) : ResponseBuilder | +| JaxXSS.java:243:12:243:46 | build(...) | semmle.label | build(...) | +| JaxXSS.java:243:24:243:37 | userControlled : String | semmle.label | userControlled : String | +| JaxXSS.java:247:46:247:66 | userControlled : String | semmle.label | userControlled : String | +| JaxXSS.java:248:12:248:25 | userControlled | semmle.label | userControlled | +| JsfXSS.java:21:50:21:107 | getRequestParameterMap(...) : Map | semmle.label | getRequestParameterMap(...) : Map | +| JsfXSS.java:22:27:22:43 | requestParameters : Map | semmle.label | requestParameters : Map | +| JsfXSS.java:22:27:22:60 | get(...) : String | semmle.label | get(...) : String | +| JsfXSS.java:27:22:29:27 | ... + ... | semmle.label | ... + ... | +| JsfXSS.java:60:22:60:48 | getRequestParameterMap(...) : Map | semmle.label | getRequestParameterMap(...) : Map | +| JsfXSS.java:60:22:60:57 | keySet(...) : Set [] : Object | semmle.label | keySet(...) : Set [] : Object | +| JsfXSS.java:60:22:60:68 | iterator(...) : Iterator [] : Object | semmle.label | iterator(...) : Iterator [] : Object | +| JsfXSS.java:60:22:60:75 | next(...) | semmle.label | next(...) | +| JsfXSS.java:61:22:61:50 | getRequestParameterNames(...) : Iterator | semmle.label | getRequestParameterNames(...) : Iterator | +| JsfXSS.java:61:22:61:57 | next(...) | semmle.label | next(...) | +| JsfXSS.java:62:22:62:54 | getRequestParameterValuesMap(...) : Map | semmle.label | getRequestParameterValuesMap(...) : Map | +| JsfXSS.java:62:22:62:69 | get(...) : String[] | semmle.label | get(...) : String[] | +| JsfXSS.java:62:22:62:72 | ...[...] | semmle.label | ...[...] | +| JsfXSS.java:63:22:63:54 | getRequestParameterValuesMap(...) : Map | semmle.label | getRequestParameterValuesMap(...) : Map | +| JsfXSS.java:63:22:63:63 | keySet(...) : Set [] : Object | semmle.label | keySet(...) : Set [] : Object | +| JsfXSS.java:63:22:63:74 | iterator(...) : Iterator [] : Object | semmle.label | iterator(...) : Iterator [] : Object | +| JsfXSS.java:63:22:63:81 | next(...) | semmle.label | next(...) | +| JsfXSS.java:64:22:64:44 | getRequestPathInfo(...) | semmle.label | getRequestPathInfo(...) | +| JsfXSS.java:65:22:65:80 | getName(...) | semmle.label | getName(...) | +| JsfXSS.java:66:22:66:45 | getRequestHeaderMap(...) : Map | semmle.label | getRequestHeaderMap(...) : Map | +| JsfXSS.java:66:22:66:60 | get(...) | semmle.label | get(...) | +| JsfXSS.java:67:22:67:51 | getRequestHeaderValuesMap(...) : Map | semmle.label | getRequestHeaderValuesMap(...) : Map | +| JsfXSS.java:67:22:67:66 | get(...) : String[] | semmle.label | get(...) : String[] | +| JsfXSS.java:67:22:67:69 | ...[...] | semmle.label | ...[...] | +| SpringXSS.java:16:108:16:128 | userControlled : String | semmle.label | userControlled : String | +| SpringXSS.java:22:62:22:75 | userControlled | semmle.label | userControlled | +| SpringXSS.java:26:30:26:43 | userControlled | semmle.label | userControlled | +| SpringXSS.java:62:64:62:84 | userControlled : String | semmle.label | userControlled : String | +| SpringXSS.java:63:12:63:44 | ok(...) | semmle.label | ok(...) | +| SpringXSS.java:63:30:63:43 | userControlled : String | semmle.label | userControlled : String | +| SpringXSS.java:67:77:67:97 | userControlled : String | semmle.label | userControlled : String | +| SpringXSS.java:68:12:68:44 | ok(...) | semmle.label | ok(...) | +| SpringXSS.java:68:30:68:43 | userControlled : String | semmle.label | userControlled : String | +| SpringXSS.java:72:67:72:87 | userControlled : String | semmle.label | userControlled : String | +| SpringXSS.java:73:12:73:44 | ok(...) | semmle.label | ok(...) | +| SpringXSS.java:73:30:73:43 | userControlled : String | semmle.label | userControlled : String | +| SpringXSS.java:77:82:77:102 | userControlled : String | semmle.label | userControlled : String | +| SpringXSS.java:78:70:78:83 | userControlled | semmle.label | userControlled | +| SpringXSS.java:87:81:87:101 | userControlled : String | semmle.label | userControlled : String | +| SpringXSS.java:91:14:91:46 | ok(...) | semmle.label | ok(...) | +| SpringXSS.java:91:32:91:45 | userControlled : String | semmle.label | userControlled : String | +| SpringXSS.java:93:14:93:59 | of(...) | semmle.label | of(...) | +| SpringXSS.java:93:32:93:58 | of(...) : Optional [] : String | semmle.label | of(...) : Optional [] : String | +| SpringXSS.java:93:44:93:57 | userControlled : String | semmle.label | userControlled : String | +| SpringXSS.java:95:14:95:53 | body(...) | semmle.label | body(...) | +| SpringXSS.java:95:39:95:52 | userControlled : String | semmle.label | userControlled : String | +| SpringXSS.java:97:14:97:70 | new ResponseEntity(...) | semmle.label | new ResponseEntity(...) | +| SpringXSS.java:97:41:97:54 | userControlled : String | semmle.label | userControlled : String | +| SpringXSS.java:117:55:117:75 | userControlled : String | semmle.label | userControlled : String | +| SpringXSS.java:118:14:118:46 | ok(...) | semmle.label | ok(...) | +| SpringXSS.java:118:32:118:45 | userControlled : String | semmle.label | userControlled : String | +| SpringXSS.java:122:56:122:76 | userControlled : String | semmle.label | userControlled : String | +| SpringXSS.java:123:72:123:85 | userControlled | semmle.label | userControlled | +| SpringXSS.java:131:40:131:60 | userControlled : String | semmle.label | userControlled : String | +| SpringXSS.java:132:14:132:46 | ok(...) | semmle.label | ok(...) | +| SpringXSS.java:132:32:132:45 | userControlled : String | semmle.label | userControlled : String | +| SpringXSS.java:136:36:136:56 | userControlled : String | semmle.label | userControlled : String | +| SpringXSS.java:137:14:137:27 | userControlled | semmle.label | userControlled | +| SpringXSS.java:152:62:152:82 | userControlled : String | semmle.label | userControlled : String | +| SpringXSS.java:153:12:153:44 | ok(...) | semmle.label | ok(...) | +| SpringXSS.java:153:30:153:43 | userControlled : String | semmle.label | userControlled : String | +| SpringXSS.java:157:46:157:66 | userControlled : String | semmle.label | userControlled : String | +| SpringXSS.java:158:12:158:25 | userControlled | semmle.label | userControlled | +| XSS.java:19:12:19:77 | ... + ... | semmle.label | ... + ... | +| XSS.java:19:28:19:55 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| XSS.java:34:30:34:87 | ... + ... | semmle.label | ... + ... | +| XSS.java:34:67:34:87 | getPathInfo(...) : String | semmle.label | getPathInfo(...) : String | +| XSS.java:37:36:37:56 | getPathInfo(...) : String | semmle.label | getPathInfo(...) : String | +| XSS.java:37:36:37:67 | getBytes(...) | semmle.label | getBytes(...) | +| XSS.java:83:33:83:53 | getPathInfo(...) | semmle.label | getPathInfo(...) | +| XSS.java:88:33:88:53 | getPathInfo(...) | semmle.label | getPathInfo(...) | +| XSS.java:93:33:93:53 | getPathInfo(...) | semmle.label | getPathInfo(...) | +| XSS.java:100:39:100:59 | getPathInfo(...) : String | semmle.label | getPathInfo(...) : String | +| XSS.java:100:39:100:70 | getBytes(...) | semmle.label | getBytes(...) | +| XSS.java:105:39:105:59 | getPathInfo(...) : String | semmle.label | getPathInfo(...) : String | +| XSS.java:105:39:105:70 | getBytes(...) | semmle.label | getBytes(...) | +| XSS.java:110:39:110:59 | getPathInfo(...) : String | semmle.label | getPathInfo(...) : String | +| XSS.java:110:39:110:70 | getBytes(...) | semmle.label | getBytes(...) | +subpaths diff --git a/java/ql/test/query-tests/security/CWE-079/semmle/tests/XSS.java b/java/ql/test/query-tests/security/CWE-079/semmle/tests/XSS.java index 3584c45d8b2..13ae6b62e10 100644 --- a/java/ql/test/query-tests/security/CWE-079/semmle/tests/XSS.java +++ b/java/ql/test/query-tests/security/CWE-079/semmle/tests/XSS.java @@ -16,7 +16,7 @@ public class XSS extends HttpServlet { throws ServletException, IOException { // BAD: a request parameter is written directly to the Servlet response stream response.getWriter() - .print("The page \"" + request.getParameter("page") + "\" was not found."); // $ xss + .print("The page \"" + request.getParameter("page") + "\" was not found."); // $ Alert // GOOD: servlet API encodes the error message HTML for the HTML context response.sendError(HttpServletResponse.SC_NOT_FOUND, @@ -31,10 +31,10 @@ public class XSS extends HttpServlet { "The page \"" + capitalizeName(request.getParameter("page")) + "\" was not found."); // BAD: outputting the path of the resource - response.getWriter().print("The path section of the URL was " + request.getPathInfo()); // $ xss + response.getWriter().print("The path section of the URL was " + request.getPathInfo()); // $ Alert // BAD: typical XSS, this time written to an OutputStream instead of a Writer - response.getOutputStream().write(request.getPathInfo().getBytes()); // $ xss + response.getOutputStream().write(request.getPathInfo().getBytes()); // $ Alert // GOOD: sanitizer response.getOutputStream().write(hudson.Util.escape(request.getPathInfo()).getBytes()); // safe @@ -80,34 +80,34 @@ public class XSS extends HttpServlet { if(setContentMethod == 0) { // BAD: set content-type to something that is not safe response.setContentType("text/html"); - response.getWriter().print(request.getPathInfo()); // $ xss + response.getWriter().print(request.getPathInfo()); // $ Alert } else if(setContentMethod == 1) { // BAD: set content-type to something that is not safe response.setHeader("Content-Type", "text/html"); - response.getWriter().print(request.getPathInfo()); // $ xss + response.getWriter().print(request.getPathInfo()); // $ Alert } else { // BAD: set content-type to something that is not safe response.addHeader("Content-Type", "text/html"); - response.getWriter().print(request.getPathInfo()); // $ xss + response.getWriter().print(request.getPathInfo()); // $ Alert } } else { if(setContentMethod == 0) { // BAD: set content-type to something that is not safe response.setContentType("text/html"); - response.getOutputStream().write(request.getPathInfo().getBytes()); // $ xss + response.getOutputStream().write(request.getPathInfo().getBytes()); // $ Alert } else if(setContentMethod == 1) { // BAD: set content-type to something that is not safe response.setHeader("Content-Type", "text/html"); - response.getOutputStream().write(request.getPathInfo().getBytes()); // $ xss + response.getOutputStream().write(request.getPathInfo().getBytes()); // $ Alert } else { // BAD: set content-type to something that is not safe response.addHeader("Content-Type", "text/html"); - response.getOutputStream().write(request.getPathInfo().getBytes()); // $ xss + response.getOutputStream().write(request.getPathInfo().getBytes()); // $ Alert } } } diff --git a/java/ql/test/query-tests/security/CWE-079/semmle/tests/XSS.ql b/java/ql/test/query-tests/security/CWE-079/semmle/tests/XSS.ql deleted file mode 100644 index 271488ffb1f..00000000000 --- a/java/ql/test/query-tests/security/CWE-079/semmle/tests/XSS.ql +++ /dev/null @@ -1,18 +0,0 @@ -import java -import semmle.code.java.security.XssQuery -import utils.test.InlineExpectationsTest - -module XssTest implements TestSig { - string getARelevantTag() { result = "xss" } - - predicate hasActualResult(Location location, string element, string tag, string value) { - tag = "xss" and - exists(DataFlow::Node sink | XssFlow::flowTo(sink) | - sink.getLocation() = location and - element = sink.toString() and - value = "" - ) - } -} - -import MakeTest diff --git a/java/ql/test/query-tests/security/CWE-079/semmle/tests/XSS.qlref b/java/ql/test/query-tests/security/CWE-079/semmle/tests/XSS.qlref new file mode 100644 index 00000000000..bff2f2538a2 --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-079/semmle/tests/XSS.qlref @@ -0,0 +1,4 @@ +query: Security/CWE/CWE-079/XSS.ql +postprocess: + - utils/test/PrettyPrintModels.ql + - utils/test/InlineExpectationsTestQuery.ql diff --git a/java/ql/test/query-tests/security/CWE-094/GroovyClassLoaderTest.java b/java/ql/test/query-tests/security/CWE-094/GroovyInjection/GroovyClassLoaderTest.java similarity index 74% rename from java/ql/test/query-tests/security/CWE-094/GroovyClassLoaderTest.java rename to java/ql/test/query-tests/security/CWE-094/GroovyInjection/GroovyClassLoaderTest.java index 2ded64caaf6..ff7d73f16bd 100644 --- a/java/ql/test/query-tests/security/CWE-094/GroovyClassLoaderTest.java +++ b/java/ql/test/query-tests/security/CWE-094/GroovyInjection/GroovyClassLoaderTest.java @@ -14,42 +14,41 @@ public class GroovyClassLoaderTest extends HttpServlet { throws ServletException, IOException { // "groovy.lang;GroovyClassLoader;false;parseClass;(GroovyCodeSource);;Argument[0];groovy;manual", { - String script = request.getParameter("script"); + String script = request.getParameter("script"); // $ Source final GroovyClassLoader classLoader = new GroovyClassLoader(); GroovyCodeSource gcs = new GroovyCodeSource(script, "test", "Test"); - classLoader.parseClass(gcs); // $hasGroovyInjection + classLoader.parseClass(gcs); // $ Alert } // "groovy.lang;GroovyClassLoader;false;parseClass;(GroovyCodeSource,boolean);;Argument[0];groovy;manual", { - String script = request.getParameter("script"); + String script = request.getParameter("script"); // $ Source final GroovyClassLoader classLoader = new GroovyClassLoader(); GroovyCodeSource gcs = new GroovyCodeSource(script, "test", "Test"); - classLoader.parseClass(gcs, true); // $hasGroovyInjection + classLoader.parseClass(gcs, true); // $ Alert } // "groovy.lang;GroovyClassLoader;false;parseClass;(InputStream,String);;Argument[0];groovy;manual", { - String script = request.getParameter("script"); + String script = request.getParameter("script"); // $ Source final GroovyClassLoader classLoader = new GroovyClassLoader(); - classLoader.parseClass(new ByteArrayInputStream(script.getBytes()), "test"); // $hasGroovyInjection + classLoader.parseClass(new ByteArrayInputStream(script.getBytes()), "test"); // $ Alert } // "groovy.lang;GroovyClassLoader;false;parseClass;(Reader,String);;Argument[0];groovy;manual", { - String script = request.getParameter("script"); + String script = request.getParameter("script"); // $ Source final GroovyClassLoader classLoader = new GroovyClassLoader(); - classLoader.parseClass(new StringReader(script), "test"); // $hasGroovyInjection + classLoader.parseClass(new StringReader(script), "test"); // $ Alert } // "groovy.lang;GroovyClassLoader;false;parseClass;(String);;Argument[0];groovy;manual", { - String script = request.getParameter("script"); + String script = request.getParameter("script"); // $ Source final GroovyClassLoader classLoader = new GroovyClassLoader(); - classLoader.parseClass(script); // $hasGroovyInjection + classLoader.parseClass(script); // $ Alert } // "groovy.lang;GroovyClassLoader;false;parseClass;(String,String);;Argument[0];groovy;manual", { - String script = request.getParameter("script"); + String script = request.getParameter("script"); // $ Source final GroovyClassLoader classLoader = new GroovyClassLoader(); - classLoader.parseClass(script, "test"); // $hasGroovyInjection + classLoader.parseClass(script, "test"); // $ Alert } } } - diff --git a/java/ql/test/query-tests/security/CWE-094/GroovyCompilationUnitTest.java b/java/ql/test/query-tests/security/CWE-094/GroovyInjection/GroovyCompilationUnitTest.java similarity index 84% rename from java/ql/test/query-tests/security/CWE-094/GroovyCompilationUnitTest.java rename to java/ql/test/query-tests/security/CWE-094/GroovyInjection/GroovyCompilationUnitTest.java index f25e27e6893..a906d9fdc96 100644 --- a/java/ql/test/query-tests/security/CWE-094/GroovyCompilationUnitTest.java +++ b/java/ql/test/query-tests/security/CWE-094/GroovyInjection/GroovyCompilationUnitTest.java @@ -18,8 +18,8 @@ public class GroovyCompilationUnitTest extends HttpServlet { // "org.codehaus.groovy.control;CompilationUnit;false;compile;;;Argument[this];groovy;manual" { CompilationUnit cu = new CompilationUnit(); - cu.addSource("test", request.getParameter("source")); - cu.compile(); // $hasGroovyInjection + cu.addSource("test", request.getParameter("source")); // $ Source + cu.compile(); // $ Alert } { CompilationUnit cu = new CompilationUnit(); @@ -29,20 +29,20 @@ public class GroovyCompilationUnitTest extends HttpServlet { { CompilationUnit cu = new CompilationUnit(); cu.addSource("test", - new ByteArrayInputStream(request.getParameter("source").getBytes())); - cu.compile(); // $hasGroovyInjection + new ByteArrayInputStream(request.getParameter("source").getBytes())); // $ Source + cu.compile(); // $ Alert } { CompilationUnit cu = new CompilationUnit(); - cu.addSource(new URL(request.getParameter("source"))); - cu.compile(); // $hasGroovyInjection + cu.addSource(new URL(request.getParameter("source"))); // $ Source + cu.compile(); // $ Alert } { CompilationUnit cu = new CompilationUnit(); SourceUnit su = - new SourceUnit("test", request.getParameter("source"), null, null, null); + new SourceUnit("test", request.getParameter("source"), null, null, null); // $ Source cu.addSource(su); - cu.compile(); // $hasGroovyInjection + cu.compile(); // $ Alert } { CompilationUnit cu = new CompilationUnit(); @@ -53,29 +53,29 @@ public class GroovyCompilationUnitTest extends HttpServlet { } { CompilationUnit cu = new CompilationUnit(); - StringReaderSource rs = new StringReaderSource(request.getParameter("source"), null); + StringReaderSource rs = new StringReaderSource(request.getParameter("source"), null); // $ Source SourceUnit su = new SourceUnit("test", rs, null, null, null); cu.addSource(su); - cu.compile(); // $hasGroovyInjection + cu.compile(); // $ Alert } { CompilationUnit cu = new CompilationUnit(); SourceUnit su = - new SourceUnit(new URL(request.getParameter("source")), null, null, null); + new SourceUnit(new URL(request.getParameter("source")), null, null, null); // $ Source cu.addSource(su); - cu.compile(); // $hasGroovyInjection + cu.compile(); // $ Alert } { CompilationUnit cu = new CompilationUnit(); - SourceUnit su = SourceUnit.create("test", request.getParameter("source")); + SourceUnit su = SourceUnit.create("test", request.getParameter("source")); // $ Source cu.addSource(su); - cu.compile(); // $hasGroovyInjection + cu.compile(); // $ Alert } { CompilationUnit cu = new CompilationUnit(); - SourceUnit su = SourceUnit.create("test", request.getParameter("source"), 0); + SourceUnit su = SourceUnit.create("test", request.getParameter("source"), 0); // $ Source cu.addSource(su); - cu.compile(); // $hasGroovyInjection + cu.compile(); // $ Alert } { CompilationUnit cu = new CompilationUnit(); @@ -85,8 +85,8 @@ public class GroovyCompilationUnitTest extends HttpServlet { } { JavaAwareCompilationUnit cu = new JavaAwareCompilationUnit(); - cu.addSource("test", request.getParameter("source")); - cu.compile(); // $hasGroovyInjection + cu.addSource("test", request.getParameter("source")); // $ Source + cu.compile(); // $ Alert } { JavaStubCompilationUnit cu = new JavaStubCompilationUnit(null, null); diff --git a/java/ql/test/query-tests/security/CWE-094/GroovyEvalTest.java b/java/ql/test/query-tests/security/CWE-094/GroovyInjection/GroovyEvalTest.java similarity index 59% rename from java/ql/test/query-tests/security/CWE-094/GroovyEvalTest.java rename to java/ql/test/query-tests/security/CWE-094/GroovyInjection/GroovyEvalTest.java index 3647a3346fa..3756cd10bfa 100644 --- a/java/ql/test/query-tests/security/CWE-094/GroovyEvalTest.java +++ b/java/ql/test/query-tests/security/CWE-094/GroovyInjection/GroovyEvalTest.java @@ -11,30 +11,29 @@ public class GroovyEvalTest extends HttpServlet { throws ServletException, IOException { // "groovy.util;Eval;false;me;(String);;Argument[0];groovy;manual", { - String script = request.getParameter("script"); - Eval.me(script); // $hasGroovyInjection + String script = request.getParameter("script"); // $ Source + Eval.me(script); // $ Alert } // "groovy.util;Eval;false;me;(String,Object,String);;Argument[2];groovy;manual", { - String script = request.getParameter("script"); - Eval.me("test", "result", script); // $hasGroovyInjection + String script = request.getParameter("script"); // $ Source + Eval.me("test", "result", script); // $ Alert } // "groovy.util;Eval;false;x;(Object,String);;Argument[1];groovy;manual", { - String script = request.getParameter("script"); - Eval.x("result2", script); // $hasGroovyInjection + String script = request.getParameter("script"); // $ Source + Eval.x("result2", script); // $ Alert } // "groovy.util;Eval;false;xy;(Object,Object,String);;Argument[2];groovy;manual", { - String script = request.getParameter("script"); - Eval.xy("result3", "result4", script); // $hasGroovyInjection + String script = request.getParameter("script"); // $ Source + Eval.xy("result3", "result4", script); // $ Alert } // "groovy.util;Eval;false;xyz;(Object,Object,Object,String);;Argument[3];groovy;manual", { - String script = request.getParameter("script"); - Eval.xyz("result3", "result4", "aaa", script); // $hasGroovyInjection + String script = request.getParameter("script"); // $ Source + Eval.xyz("result3", "result4", "aaa", script); // $ Alert } } } - diff --git a/java/ql/test/query-tests/security/CWE-094/GroovyInjection/GroovyInjectionTest.expected b/java/ql/test/query-tests/security/CWE-094/GroovyInjection/GroovyInjectionTest.expected new file mode 100644 index 00000000000..3a00c80a704 --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-094/GroovyInjection/GroovyInjectionTest.expected @@ -0,0 +1,327 @@ +#select +| GroovyClassLoaderTest.java:20:36:20:38 | gcs | GroovyClassLoaderTest.java:17:29:17:58 | getParameter(...) : String | GroovyClassLoaderTest.java:20:36:20:38 | gcs | Groovy script depends on a $@. | GroovyClassLoaderTest.java:17:29:17:58 | getParameter(...) | user-provided value | +| GroovyClassLoaderTest.java:27:36:27:38 | gcs | GroovyClassLoaderTest.java:24:29:24:58 | getParameter(...) : String | GroovyClassLoaderTest.java:27:36:27:38 | gcs | Groovy script depends on a $@. | GroovyClassLoaderTest.java:24:29:24:58 | getParameter(...) | user-provided value | +| GroovyClassLoaderTest.java:33:36:33:78 | new ByteArrayInputStream(...) | GroovyClassLoaderTest.java:31:29:31:58 | getParameter(...) : String | GroovyClassLoaderTest.java:33:36:33:78 | new ByteArrayInputStream(...) | Groovy script depends on a $@. | GroovyClassLoaderTest.java:31:29:31:58 | getParameter(...) | user-provided value | +| GroovyClassLoaderTest.java:39:36:39:59 | new StringReader(...) | GroovyClassLoaderTest.java:37:29:37:58 | getParameter(...) : String | GroovyClassLoaderTest.java:39:36:39:59 | new StringReader(...) | Groovy script depends on a $@. | GroovyClassLoaderTest.java:37:29:37:58 | getParameter(...) | user-provided value | +| GroovyClassLoaderTest.java:45:36:45:41 | script | GroovyClassLoaderTest.java:43:29:43:58 | getParameter(...) : String | GroovyClassLoaderTest.java:45:36:45:41 | script | Groovy script depends on a $@. | GroovyClassLoaderTest.java:43:29:43:58 | getParameter(...) | user-provided value | +| GroovyClassLoaderTest.java:51:36:51:41 | script | GroovyClassLoaderTest.java:49:29:49:58 | getParameter(...) : String | GroovyClassLoaderTest.java:51:36:51:41 | script | Groovy script depends on a $@. | GroovyClassLoaderTest.java:49:29:49:58 | getParameter(...) | user-provided value | +| GroovyCompilationUnitTest.java:22:13:22:14 | cu | GroovyCompilationUnitTest.java:21:34:21:63 | getParameter(...) : String | GroovyCompilationUnitTest.java:22:13:22:14 | cu | Groovy script depends on a $@. | GroovyCompilationUnitTest.java:21:34:21:63 | getParameter(...) | user-provided value | +| GroovyCompilationUnitTest.java:33:13:33:14 | cu | GroovyCompilationUnitTest.java:32:46:32:75 | getParameter(...) : String | GroovyCompilationUnitTest.java:33:13:33:14 | cu | Groovy script depends on a $@. | GroovyCompilationUnitTest.java:32:46:32:75 | getParameter(...) | user-provided value | +| GroovyCompilationUnitTest.java:38:13:38:14 | cu | GroovyCompilationUnitTest.java:37:34:37:63 | getParameter(...) : String | GroovyCompilationUnitTest.java:38:13:38:14 | cu | Groovy script depends on a $@. | GroovyCompilationUnitTest.java:37:34:37:63 | getParameter(...) | user-provided value | +| GroovyCompilationUnitTest.java:45:13:45:14 | cu | GroovyCompilationUnitTest.java:43:44:43:73 | getParameter(...) : String | GroovyCompilationUnitTest.java:45:13:45:14 | cu | Groovy script depends on a $@. | GroovyCompilationUnitTest.java:43:44:43:73 | getParameter(...) | user-provided value | +| GroovyCompilationUnitTest.java:59:13:59:14 | cu | GroovyCompilationUnitTest.java:56:60:56:89 | getParameter(...) : String | GroovyCompilationUnitTest.java:59:13:59:14 | cu | Groovy script depends on a $@. | GroovyCompilationUnitTest.java:56:60:56:89 | getParameter(...) | user-provided value | +| GroovyCompilationUnitTest.java:66:13:66:14 | cu | GroovyCompilationUnitTest.java:64:44:64:73 | getParameter(...) : String | GroovyCompilationUnitTest.java:66:13:66:14 | cu | Groovy script depends on a $@. | GroovyCompilationUnitTest.java:64:44:64:73 | getParameter(...) | user-provided value | +| GroovyCompilationUnitTest.java:72:13:72:14 | cu | GroovyCompilationUnitTest.java:70:55:70:84 | getParameter(...) : String | GroovyCompilationUnitTest.java:72:13:72:14 | cu | Groovy script depends on a $@. | GroovyCompilationUnitTest.java:70:55:70:84 | getParameter(...) | user-provided value | +| GroovyCompilationUnitTest.java:78:13:78:14 | cu | GroovyCompilationUnitTest.java:76:55:76:84 | getParameter(...) : String | GroovyCompilationUnitTest.java:78:13:78:14 | cu | Groovy script depends on a $@. | GroovyCompilationUnitTest.java:76:55:76:84 | getParameter(...) | user-provided value | +| GroovyCompilationUnitTest.java:89:13:89:14 | cu | GroovyCompilationUnitTest.java:88:34:88:63 | getParameter(...) : String | GroovyCompilationUnitTest.java:89:13:89:14 | cu | Groovy script depends on a $@. | GroovyCompilationUnitTest.java:88:34:88:63 | getParameter(...) | user-provided value | +| GroovyEvalTest.java:15:21:15:26 | script | GroovyEvalTest.java:14:29:14:58 | getParameter(...) : String | GroovyEvalTest.java:15:21:15:26 | script | Groovy script depends on a $@. | GroovyEvalTest.java:14:29:14:58 | getParameter(...) | user-provided value | +| GroovyEvalTest.java:20:39:20:44 | script | GroovyEvalTest.java:19:29:19:58 | getParameter(...) : String | GroovyEvalTest.java:20:39:20:44 | script | Groovy script depends on a $@. | GroovyEvalTest.java:19:29:19:58 | getParameter(...) | user-provided value | +| GroovyEvalTest.java:25:31:25:36 | script | GroovyEvalTest.java:24:29:24:58 | getParameter(...) : String | GroovyEvalTest.java:25:31:25:36 | script | Groovy script depends on a $@. | GroovyEvalTest.java:24:29:24:58 | getParameter(...) | user-provided value | +| GroovyEvalTest.java:31:43:31:48 | script | GroovyEvalTest.java:30:29:30:58 | getParameter(...) : String | GroovyEvalTest.java:31:43:31:48 | script | Groovy script depends on a $@. | GroovyEvalTest.java:30:29:30:58 | getParameter(...) | user-provided value | +| GroovyEvalTest.java:36:51:36:56 | script | GroovyEvalTest.java:35:29:35:58 | getParameter(...) : String | GroovyEvalTest.java:36:51:36:56 | script | Groovy script depends on a $@. | GroovyEvalTest.java:35:29:35:58 | getParameter(...) | user-provided value | +| GroovyShellTest.java:24:28:24:30 | gcs | GroovyShellTest.java:22:29:22:58 | getParameter(...) : String | GroovyShellTest.java:24:28:24:30 | gcs | Groovy script depends on a $@. | GroovyShellTest.java:22:29:22:58 | getParameter(...) | user-provided value | +| GroovyShellTest.java:31:28:31:33 | reader | GroovyShellTest.java:29:29:29:58 | getParameter(...) : String | GroovyShellTest.java:31:28:31:33 | reader | Groovy script depends on a $@. | GroovyShellTest.java:29:29:29:58 | getParameter(...) | user-provided value | +| GroovyShellTest.java:38:28:38:33 | reader | GroovyShellTest.java:36:29:36:58 | getParameter(...) : String | GroovyShellTest.java:38:28:38:33 | reader | Groovy script depends on a $@. | GroovyShellTest.java:36:29:36:58 | getParameter(...) | user-provided value | +| GroovyShellTest.java:44:28:44:33 | script | GroovyShellTest.java:43:29:43:58 | getParameter(...) : String | GroovyShellTest.java:44:28:44:33 | script | Groovy script depends on a $@. | GroovyShellTest.java:43:29:43:58 | getParameter(...) | user-provided value | +| GroovyShellTest.java:50:28:50:33 | script | GroovyShellTest.java:49:29:49:58 | getParameter(...) : String | GroovyShellTest.java:50:28:50:33 | script | Groovy script depends on a $@. | GroovyShellTest.java:49:29:49:58 | getParameter(...) | user-provided value | +| GroovyShellTest.java:56:28:56:33 | script | GroovyShellTest.java:55:29:55:58 | getParameter(...) : String | GroovyShellTest.java:56:28:56:33 | script | Groovy script depends on a $@. | GroovyShellTest.java:55:29:55:58 | getParameter(...) | user-provided value | +| GroovyShellTest.java:62:25:62:39 | new URI(...) | GroovyShellTest.java:61:29:61:58 | getParameter(...) : String | GroovyShellTest.java:62:25:62:39 | new URI(...) | Groovy script depends on a $@. | GroovyShellTest.java:61:29:61:58 | getParameter(...) | user-provided value | +| GroovyShellTest.java:70:25:70:30 | reader | GroovyShellTest.java:68:29:68:58 | getParameter(...) : String | GroovyShellTest.java:70:25:70:30 | reader | Groovy script depends on a $@. | GroovyShellTest.java:68:29:68:58 | getParameter(...) | user-provided value | +| GroovyShellTest.java:77:25:77:30 | reader | GroovyShellTest.java:75:29:75:58 | getParameter(...) : String | GroovyShellTest.java:77:25:77:30 | reader | Groovy script depends on a $@. | GroovyShellTest.java:75:29:75:58 | getParameter(...) | user-provided value | +| GroovyShellTest.java:83:25:83:30 | script | GroovyShellTest.java:82:29:82:58 | getParameter(...) : String | GroovyShellTest.java:83:25:83:30 | script | Groovy script depends on a $@. | GroovyShellTest.java:82:29:82:58 | getParameter(...) | user-provided value | +| GroovyShellTest.java:89:25:89:30 | script | GroovyShellTest.java:88:29:88:58 | getParameter(...) : String | GroovyShellTest.java:89:25:89:30 | script | Groovy script depends on a $@. | GroovyShellTest.java:88:29:88:58 | getParameter(...) | user-provided value | +| GroovyShellTest.java:95:25:95:39 | new URI(...) | GroovyShellTest.java:94:29:94:58 | getParameter(...) : String | GroovyShellTest.java:95:25:95:39 | new URI(...) | Groovy script depends on a $@. | GroovyShellTest.java:94:29:94:58 | getParameter(...) | user-provided value | +| GroovyShellTest.java:103:23:103:25 | gcs | GroovyShellTest.java:101:29:101:58 | getParameter(...) : String | GroovyShellTest.java:103:23:103:25 | gcs | Groovy script depends on a $@. | GroovyShellTest.java:101:29:101:58 | getParameter(...) | user-provided value | +| GroovyShellTest.java:110:23:110:25 | gcs | GroovyShellTest.java:108:29:108:58 | getParameter(...) : String | GroovyShellTest.java:110:23:110:25 | gcs | Groovy script depends on a $@. | GroovyShellTest.java:108:29:108:58 | getParameter(...) | user-provided value | +| GroovyShellTest.java:117:23:117:28 | reader | GroovyShellTest.java:115:29:115:58 | getParameter(...) : String | GroovyShellTest.java:117:23:117:28 | reader | Groovy script depends on a $@. | GroovyShellTest.java:115:29:115:58 | getParameter(...) | user-provided value | +| GroovyShellTest.java:124:23:124:28 | reader | GroovyShellTest.java:122:29:122:58 | getParameter(...) : String | GroovyShellTest.java:124:23:124:28 | reader | Groovy script depends on a $@. | GroovyShellTest.java:122:29:122:58 | getParameter(...) | user-provided value | +| GroovyShellTest.java:130:23:130:28 | script | GroovyShellTest.java:129:29:129:58 | getParameter(...) : String | GroovyShellTest.java:130:23:130:28 | script | Groovy script depends on a $@. | GroovyShellTest.java:129:29:129:58 | getParameter(...) | user-provided value | +| GroovyShellTest.java:136:23:136:28 | script | GroovyShellTest.java:135:29:135:58 | getParameter(...) : String | GroovyShellTest.java:136:23:136:28 | script | Groovy script depends on a $@. | GroovyShellTest.java:135:29:135:58 | getParameter(...) | user-provided value | +| GroovyShellTest.java:142:23:142:37 | new URI(...) | GroovyShellTest.java:141:29:141:58 | getParameter(...) : String | GroovyShellTest.java:142:23:142:37 | new URI(...) | Groovy script depends on a $@. | GroovyShellTest.java:141:29:141:58 | getParameter(...) | user-provided value | +| GroovyShellTest.java:149:23:149:37 | new URI(...) | GroovyShellTest.java:148:29:148:58 | getParameter(...) : String | GroovyShellTest.java:149:23:149:37 | new URI(...) | Groovy script depends on a $@. | GroovyShellTest.java:148:29:148:58 | getParameter(...) | user-provided value | +| TemplateEngineTest.java:22:35:22:64 | getParameter(...) | TemplateEngineTest.java:22:35:22:64 | getParameter(...) | TemplateEngineTest.java:22:35:22:64 | getParameter(...) | Groovy script depends on a $@. | TemplateEngineTest.java:22:35:22:64 | getParameter(...) | user-provided value | +| TemplateEngineTest.java:23:35:23:47 | (...)... | TemplateEngineTest.java:14:16:14:45 | getParameter(...) : String | TemplateEngineTest.java:23:35:23:47 | (...)... | Groovy script depends on a $@. | TemplateEngineTest.java:14:16:14:45 | getParameter(...) | user-provided value | +| TemplateEngineTest.java:24:35:24:49 | (...)... | TemplateEngineTest.java:14:16:14:45 | getParameter(...) : String | TemplateEngineTest.java:24:35:24:49 | (...)... | Groovy script depends on a $@. | TemplateEngineTest.java:14:16:14:45 | getParameter(...) | user-provided value | +| TemplateEngineTest.java:25:35:25:46 | (...)... | TemplateEngineTest.java:14:16:14:45 | getParameter(...) : String | TemplateEngineTest.java:25:35:25:46 | (...)... | Groovy script depends on a $@. | TemplateEngineTest.java:14:16:14:45 | getParameter(...) | user-provided value | +edges +| GroovyClassLoaderTest.java:17:29:17:58 | getParameter(...) : String | GroovyClassLoaderTest.java:19:57:19:62 | script : String | provenance | Src:MaD:33 | +| GroovyClassLoaderTest.java:19:36:19:79 | new GroovyCodeSource(...) : GroovyCodeSource | GroovyClassLoaderTest.java:20:36:20:38 | gcs | provenance | Sink:MaD:1 | +| GroovyClassLoaderTest.java:19:57:19:62 | script : String | GroovyClassLoaderTest.java:19:36:19:79 | new GroovyCodeSource(...) : GroovyCodeSource | provenance | Config | +| GroovyClassLoaderTest.java:24:29:24:58 | getParameter(...) : String | GroovyClassLoaderTest.java:26:57:26:62 | script : String | provenance | Src:MaD:33 | +| GroovyClassLoaderTest.java:26:36:26:79 | new GroovyCodeSource(...) : GroovyCodeSource | GroovyClassLoaderTest.java:27:36:27:38 | gcs | provenance | Sink:MaD:2 | +| GroovyClassLoaderTest.java:26:57:26:62 | script : String | GroovyClassLoaderTest.java:26:36:26:79 | new GroovyCodeSource(...) : GroovyCodeSource | provenance | Config | +| GroovyClassLoaderTest.java:31:29:31:58 | getParameter(...) : String | GroovyClassLoaderTest.java:33:61:33:66 | script : String | provenance | Src:MaD:33 | +| GroovyClassLoaderTest.java:33:61:33:66 | script : String | GroovyClassLoaderTest.java:33:61:33:77 | getBytes(...) : byte[] | provenance | MaD:36 | +| GroovyClassLoaderTest.java:33:61:33:77 | getBytes(...) : byte[] | GroovyClassLoaderTest.java:33:36:33:78 | new ByteArrayInputStream(...) | provenance | MaD:34 Sink:MaD:3 | +| GroovyClassLoaderTest.java:33:61:33:77 | getBytes(...) : byte[] | GroovyClassLoaderTest.java:33:36:33:78 | new ByteArrayInputStream(...) | provenance | inputStreamWrapper Sink:MaD:3 | +| GroovyClassLoaderTest.java:37:29:37:58 | getParameter(...) : String | GroovyClassLoaderTest.java:39:53:39:58 | script : String | provenance | Src:MaD:33 | +| GroovyClassLoaderTest.java:39:53:39:58 | script : String | GroovyClassLoaderTest.java:39:36:39:59 | new StringReader(...) | provenance | MaD:35 Sink:MaD:4 | +| GroovyClassLoaderTest.java:43:29:43:58 | getParameter(...) : String | GroovyClassLoaderTest.java:45:36:45:41 | script | provenance | Src:MaD:33 Sink:MaD:5 | +| GroovyClassLoaderTest.java:49:29:49:58 | getParameter(...) : String | GroovyClassLoaderTest.java:51:36:51:41 | script | provenance | Src:MaD:33 Sink:MaD:6 | +| GroovyCompilationUnitTest.java:21:13:21:14 | cu [post update] : CompilationUnit | GroovyCompilationUnitTest.java:22:13:22:14 | cu | provenance | Sink:MaD:32 | +| GroovyCompilationUnitTest.java:21:34:21:63 | getParameter(...) : String | GroovyCompilationUnitTest.java:21:13:21:14 | cu [post update] : CompilationUnit | provenance | Src:MaD:33 Config | +| GroovyCompilationUnitTest.java:31:13:31:14 | cu [post update] : CompilationUnit | GroovyCompilationUnitTest.java:33:13:33:14 | cu | provenance | Sink:MaD:32 | +| GroovyCompilationUnitTest.java:32:21:32:87 | new ByteArrayInputStream(...) : ByteArrayInputStream | GroovyCompilationUnitTest.java:31:13:31:14 | cu [post update] : CompilationUnit | provenance | Config | +| GroovyCompilationUnitTest.java:32:46:32:75 | getParameter(...) : String | GroovyCompilationUnitTest.java:32:46:32:86 | getBytes(...) : byte[] | provenance | Src:MaD:33 MaD:36 | +| GroovyCompilationUnitTest.java:32:46:32:86 | getBytes(...) : byte[] | GroovyCompilationUnitTest.java:32:21:32:87 | new ByteArrayInputStream(...) : ByteArrayInputStream | provenance | MaD:34 | +| GroovyCompilationUnitTest.java:32:46:32:86 | getBytes(...) : byte[] | GroovyCompilationUnitTest.java:32:21:32:87 | new ByteArrayInputStream(...) : ByteArrayInputStream | provenance | inputStreamWrapper | +| GroovyCompilationUnitTest.java:37:13:37:14 | cu [post update] : CompilationUnit | GroovyCompilationUnitTest.java:38:13:38:14 | cu | provenance | Sink:MaD:32 | +| GroovyCompilationUnitTest.java:37:26:37:64 | new URL(...) : URL | GroovyCompilationUnitTest.java:37:13:37:14 | cu [post update] : CompilationUnit | provenance | Config | +| GroovyCompilationUnitTest.java:37:34:37:63 | getParameter(...) : String | GroovyCompilationUnitTest.java:37:26:37:64 | new URL(...) : URL | provenance | Src:MaD:33 MaD:38 | +| GroovyCompilationUnitTest.java:43:21:43:92 | new SourceUnit(...) : SourceUnit | GroovyCompilationUnitTest.java:44:26:44:27 | su : SourceUnit | provenance | | +| GroovyCompilationUnitTest.java:43:44:43:73 | getParameter(...) : String | GroovyCompilationUnitTest.java:43:21:43:92 | new SourceUnit(...) : SourceUnit | provenance | Src:MaD:33 Config | +| GroovyCompilationUnitTest.java:44:13:44:14 | cu [post update] : CompilationUnit | GroovyCompilationUnitTest.java:45:13:45:14 | cu | provenance | Sink:MaD:32 | +| GroovyCompilationUnitTest.java:44:26:44:27 | su : SourceUnit | GroovyCompilationUnitTest.java:44:13:44:14 | cu [post update] : CompilationUnit | provenance | Config | +| GroovyCompilationUnitTest.java:56:37:56:96 | new StringReaderSource(...) : StringReaderSource | GroovyCompilationUnitTest.java:57:52:57:53 | rs : StringReaderSource | provenance | | +| GroovyCompilationUnitTest.java:56:60:56:89 | getParameter(...) : String | GroovyCompilationUnitTest.java:56:37:56:96 | new StringReaderSource(...) : StringReaderSource | provenance | Src:MaD:33 Config | +| GroovyCompilationUnitTest.java:57:29:57:72 | new SourceUnit(...) : SourceUnit | GroovyCompilationUnitTest.java:58:26:58:27 | su : SourceUnit | provenance | | +| GroovyCompilationUnitTest.java:57:52:57:53 | rs : StringReaderSource | GroovyCompilationUnitTest.java:57:29:57:72 | new SourceUnit(...) : SourceUnit | provenance | Config | +| GroovyCompilationUnitTest.java:58:13:58:14 | cu [post update] : CompilationUnit | GroovyCompilationUnitTest.java:59:13:59:14 | cu | provenance | Sink:MaD:32 | +| GroovyCompilationUnitTest.java:58:26:58:27 | su : SourceUnit | GroovyCompilationUnitTest.java:58:13:58:14 | cu [post update] : CompilationUnit | provenance | Config | +| GroovyCompilationUnitTest.java:64:21:64:93 | new SourceUnit(...) : SourceUnit | GroovyCompilationUnitTest.java:65:26:65:27 | su : SourceUnit | provenance | | +| GroovyCompilationUnitTest.java:64:36:64:74 | new URL(...) : URL | GroovyCompilationUnitTest.java:64:21:64:93 | new SourceUnit(...) : SourceUnit | provenance | Config | +| GroovyCompilationUnitTest.java:64:44:64:73 | getParameter(...) : String | GroovyCompilationUnitTest.java:64:36:64:74 | new URL(...) : URL | provenance | Src:MaD:33 MaD:38 | +| GroovyCompilationUnitTest.java:65:13:65:14 | cu [post update] : CompilationUnit | GroovyCompilationUnitTest.java:66:13:66:14 | cu | provenance | Sink:MaD:32 | +| GroovyCompilationUnitTest.java:65:26:65:27 | su : SourceUnit | GroovyCompilationUnitTest.java:65:13:65:14 | cu [post update] : CompilationUnit | provenance | Config | +| GroovyCompilationUnitTest.java:70:29:70:85 | create(...) : SourceUnit | GroovyCompilationUnitTest.java:71:26:71:27 | su : SourceUnit | provenance | | +| GroovyCompilationUnitTest.java:70:55:70:84 | getParameter(...) : String | GroovyCompilationUnitTest.java:70:29:70:85 | create(...) : SourceUnit | provenance | Src:MaD:33 Config | +| GroovyCompilationUnitTest.java:71:13:71:14 | cu [post update] : CompilationUnit | GroovyCompilationUnitTest.java:72:13:72:14 | cu | provenance | Sink:MaD:32 | +| GroovyCompilationUnitTest.java:71:26:71:27 | su : SourceUnit | GroovyCompilationUnitTest.java:71:13:71:14 | cu [post update] : CompilationUnit | provenance | Config | +| GroovyCompilationUnitTest.java:76:29:76:88 | create(...) : SourceUnit | GroovyCompilationUnitTest.java:77:26:77:27 | su : SourceUnit | provenance | | +| GroovyCompilationUnitTest.java:76:55:76:84 | getParameter(...) : String | GroovyCompilationUnitTest.java:76:29:76:88 | create(...) : SourceUnit | provenance | Src:MaD:33 Config | +| GroovyCompilationUnitTest.java:77:13:77:14 | cu [post update] : CompilationUnit | GroovyCompilationUnitTest.java:78:13:78:14 | cu | provenance | Sink:MaD:32 | +| GroovyCompilationUnitTest.java:77:26:77:27 | su : SourceUnit | GroovyCompilationUnitTest.java:77:13:77:14 | cu [post update] : CompilationUnit | provenance | Config | +| GroovyCompilationUnitTest.java:88:13:88:14 | cu [post update] : JavaAwareCompilationUnit | GroovyCompilationUnitTest.java:89:13:89:14 | cu | provenance | Sink:MaD:32 | +| GroovyCompilationUnitTest.java:88:34:88:63 | getParameter(...) : String | GroovyCompilationUnitTest.java:88:13:88:14 | cu [post update] : JavaAwareCompilationUnit | provenance | Src:MaD:33 Config | +| GroovyEvalTest.java:14:29:14:58 | getParameter(...) : String | GroovyEvalTest.java:15:21:15:26 | script | provenance | Src:MaD:33 Sink:MaD:27 | +| GroovyEvalTest.java:19:29:19:58 | getParameter(...) : String | GroovyEvalTest.java:20:39:20:44 | script | provenance | Src:MaD:33 Sink:MaD:28 | +| GroovyEvalTest.java:24:29:24:58 | getParameter(...) : String | GroovyEvalTest.java:25:31:25:36 | script | provenance | Src:MaD:33 Sink:MaD:29 | +| GroovyEvalTest.java:30:29:30:58 | getParameter(...) : String | GroovyEvalTest.java:31:43:31:48 | script | provenance | Src:MaD:33 Sink:MaD:30 | +| GroovyEvalTest.java:35:29:35:58 | getParameter(...) : String | GroovyEvalTest.java:36:51:36:56 | script | provenance | Src:MaD:33 Sink:MaD:31 | +| GroovyShellTest.java:22:29:22:58 | getParameter(...) : String | GroovyShellTest.java:23:57:23:62 | script : String | provenance | Src:MaD:33 | +| GroovyShellTest.java:23:36:23:79 | new GroovyCodeSource(...) : GroovyCodeSource | GroovyShellTest.java:24:28:24:30 | gcs | provenance | Sink:MaD:7 | +| GroovyShellTest.java:23:57:23:62 | script : String | GroovyShellTest.java:23:36:23:79 | new GroovyCodeSource(...) : GroovyCodeSource | provenance | Config | +| GroovyShellTest.java:29:29:29:58 | getParameter(...) : String | GroovyShellTest.java:30:46:30:51 | script : String | provenance | Src:MaD:33 | +| GroovyShellTest.java:30:29:30:52 | new StringReader(...) : StringReader | GroovyShellTest.java:31:28:31:33 | reader | provenance | Sink:MaD:8 | +| GroovyShellTest.java:30:46:30:51 | script : String | GroovyShellTest.java:30:29:30:52 | new StringReader(...) : StringReader | provenance | MaD:35 | +| GroovyShellTest.java:36:29:36:58 | getParameter(...) : String | GroovyShellTest.java:37:46:37:51 | script : String | provenance | Src:MaD:33 | +| GroovyShellTest.java:37:29:37:52 | new StringReader(...) : StringReader | GroovyShellTest.java:38:28:38:33 | reader | provenance | Sink:MaD:9 | +| GroovyShellTest.java:37:46:37:51 | script : String | GroovyShellTest.java:37:29:37:52 | new StringReader(...) : StringReader | provenance | MaD:35 | +| GroovyShellTest.java:43:29:43:58 | getParameter(...) : String | GroovyShellTest.java:44:28:44:33 | script | provenance | Src:MaD:33 Sink:MaD:10 | +| GroovyShellTest.java:49:29:49:58 | getParameter(...) : String | GroovyShellTest.java:50:28:50:33 | script | provenance | Src:MaD:33 Sink:MaD:11 | +| GroovyShellTest.java:55:29:55:58 | getParameter(...) : String | GroovyShellTest.java:56:28:56:33 | script | provenance | Src:MaD:33 Sink:MaD:12 | +| GroovyShellTest.java:61:29:61:58 | getParameter(...) : String | GroovyShellTest.java:62:33:62:38 | script : String | provenance | Src:MaD:33 | +| GroovyShellTest.java:62:33:62:38 | script : String | GroovyShellTest.java:62:25:62:39 | new URI(...) | provenance | MaD:37 Sink:MaD:17 | +| GroovyShellTest.java:68:29:68:58 | getParameter(...) : String | GroovyShellTest.java:69:46:69:51 | script : String | provenance | Src:MaD:33 | +| GroovyShellTest.java:69:29:69:52 | new StringReader(...) : StringReader | GroovyShellTest.java:70:25:70:30 | reader | provenance | Sink:MaD:13 | +| GroovyShellTest.java:69:46:69:51 | script : String | GroovyShellTest.java:69:29:69:52 | new StringReader(...) : StringReader | provenance | MaD:35 | +| GroovyShellTest.java:75:29:75:58 | getParameter(...) : String | GroovyShellTest.java:76:46:76:51 | script : String | provenance | Src:MaD:33 | +| GroovyShellTest.java:76:29:76:52 | new StringReader(...) : StringReader | GroovyShellTest.java:77:25:77:30 | reader | provenance | Sink:MaD:14 | +| GroovyShellTest.java:76:46:76:51 | script : String | GroovyShellTest.java:76:29:76:52 | new StringReader(...) : StringReader | provenance | MaD:35 | +| GroovyShellTest.java:82:29:82:58 | getParameter(...) : String | GroovyShellTest.java:83:25:83:30 | script | provenance | Src:MaD:33 Sink:MaD:15 | +| GroovyShellTest.java:88:29:88:58 | getParameter(...) : String | GroovyShellTest.java:89:25:89:30 | script | provenance | Src:MaD:33 Sink:MaD:16 | +| GroovyShellTest.java:94:29:94:58 | getParameter(...) : String | GroovyShellTest.java:95:33:95:38 | script : String | provenance | Src:MaD:33 | +| GroovyShellTest.java:95:33:95:38 | script : String | GroovyShellTest.java:95:25:95:39 | new URI(...) | provenance | MaD:37 Sink:MaD:17 | +| GroovyShellTest.java:101:29:101:58 | getParameter(...) : String | GroovyShellTest.java:102:57:102:62 | script : String | provenance | Src:MaD:33 | +| GroovyShellTest.java:102:36:102:79 | new GroovyCodeSource(...) : GroovyCodeSource | GroovyShellTest.java:103:23:103:25 | gcs | provenance | Sink:MaD:19 | +| GroovyShellTest.java:102:57:102:62 | script : String | GroovyShellTest.java:102:36:102:79 | new GroovyCodeSource(...) : GroovyCodeSource | provenance | Config | +| GroovyShellTest.java:108:29:108:58 | getParameter(...) : String | GroovyShellTest.java:109:57:109:62 | script : String | provenance | Src:MaD:33 | +| GroovyShellTest.java:109:36:109:79 | new GroovyCodeSource(...) : GroovyCodeSource | GroovyShellTest.java:110:23:110:25 | gcs | provenance | Sink:MaD:18 | +| GroovyShellTest.java:109:57:109:62 | script : String | GroovyShellTest.java:109:36:109:79 | new GroovyCodeSource(...) : GroovyCodeSource | provenance | Config | +| GroovyShellTest.java:115:29:115:58 | getParameter(...) : String | GroovyShellTest.java:116:46:116:51 | script : String | provenance | Src:MaD:33 | +| GroovyShellTest.java:116:29:116:52 | new StringReader(...) : StringReader | GroovyShellTest.java:117:23:117:28 | reader | provenance | Sink:MaD:21 | +| GroovyShellTest.java:116:46:116:51 | script : String | GroovyShellTest.java:116:29:116:52 | new StringReader(...) : StringReader | provenance | MaD:35 | +| GroovyShellTest.java:122:29:122:58 | getParameter(...) : String | GroovyShellTest.java:123:46:123:51 | script : String | provenance | Src:MaD:33 | +| GroovyShellTest.java:123:29:123:52 | new StringReader(...) : StringReader | GroovyShellTest.java:124:23:124:28 | reader | provenance | Sink:MaD:20 | +| GroovyShellTest.java:123:46:123:51 | script : String | GroovyShellTest.java:123:29:123:52 | new StringReader(...) : StringReader | provenance | MaD:35 | +| GroovyShellTest.java:129:29:129:58 | getParameter(...) : String | GroovyShellTest.java:130:23:130:28 | script | provenance | Src:MaD:33 Sink:MaD:23 | +| GroovyShellTest.java:135:29:135:58 | getParameter(...) : String | GroovyShellTest.java:136:23:136:28 | script | provenance | Src:MaD:33 Sink:MaD:22 | +| GroovyShellTest.java:141:29:141:58 | getParameter(...) : String | GroovyShellTest.java:142:31:142:36 | script : String | provenance | Src:MaD:33 | +| GroovyShellTest.java:142:31:142:36 | script : String | GroovyShellTest.java:142:23:142:37 | new URI(...) | provenance | MaD:37 Sink:MaD:25 | +| GroovyShellTest.java:148:29:148:58 | getParameter(...) : String | GroovyShellTest.java:149:31:149:36 | script : String | provenance | Src:MaD:33 | +| GroovyShellTest.java:149:31:149:36 | script : String | GroovyShellTest.java:149:23:149:37 | new URI(...) | provenance | MaD:37 Sink:MaD:24 | +| TemplateEngineTest.java:14:16:14:45 | getParameter(...) : String | TemplateEngineTest.java:20:29:20:43 | source(...) : String | provenance | Src:MaD:33 | +| TemplateEngineTest.java:20:29:20:43 | source(...) : String | TemplateEngineTest.java:23:35:23:47 | (...)... | provenance | Sink:MaD:26 | +| TemplateEngineTest.java:20:29:20:43 | source(...) : String | TemplateEngineTest.java:24:35:24:49 | (...)... | provenance | Sink:MaD:26 | +| TemplateEngineTest.java:20:29:20:43 | source(...) : String | TemplateEngineTest.java:25:35:25:46 | (...)... | provenance | Sink:MaD:26 | +models +| 1 | Sink: groovy.lang; GroovyClassLoader; false; parseClass; (GroovyCodeSource); ; Argument[0]; groovy-injection; manual | +| 2 | Sink: groovy.lang; GroovyClassLoader; false; parseClass; (GroovyCodeSource,boolean); ; Argument[0]; groovy-injection; manual | +| 3 | Sink: groovy.lang; GroovyClassLoader; false; parseClass; (InputStream,String); ; Argument[0]; groovy-injection; manual | +| 4 | Sink: groovy.lang; GroovyClassLoader; false; parseClass; (Reader,String); ; Argument[0]; groovy-injection; manual | +| 5 | Sink: groovy.lang; GroovyClassLoader; false; parseClass; (String); ; Argument[0]; groovy-injection; manual | +| 6 | Sink: groovy.lang; GroovyClassLoader; false; parseClass; (String,String); ; Argument[0]; groovy-injection; manual | +| 7 | Sink: groovy.lang; GroovyShell; false; evaluate; (GroovyCodeSource); ; Argument[0]; groovy-injection; manual | +| 8 | Sink: groovy.lang; GroovyShell; false; evaluate; (Reader); ; Argument[0]; groovy-injection; manual | +| 9 | Sink: groovy.lang; GroovyShell; false; evaluate; (Reader,String); ; Argument[0]; groovy-injection; manual | +| 10 | Sink: groovy.lang; GroovyShell; false; evaluate; (String); ; Argument[0]; groovy-injection; manual | +| 11 | Sink: groovy.lang; GroovyShell; false; evaluate; (String,String); ; Argument[0]; groovy-injection; manual | +| 12 | Sink: groovy.lang; GroovyShell; false; evaluate; (String,String,String); ; Argument[0]; groovy-injection; manual | +| 13 | Sink: groovy.lang; GroovyShell; false; parse; (Reader); ; Argument[0]; groovy-injection; manual | +| 14 | Sink: groovy.lang; GroovyShell; false; parse; (Reader,String); ; Argument[0]; groovy-injection; manual | +| 15 | Sink: groovy.lang; GroovyShell; false; parse; (String); ; Argument[0]; groovy-injection; manual | +| 16 | Sink: groovy.lang; GroovyShell; false; parse; (String,String); ; Argument[0]; groovy-injection; manual | +| 17 | Sink: groovy.lang; GroovyShell; false; parse; (URI); ; Argument[0]; groovy-injection; manual | +| 18 | Sink: groovy.lang; GroovyShell; false; run; (GroovyCodeSource,List); ; Argument[0]; groovy-injection; manual | +| 19 | Sink: groovy.lang; GroovyShell; false; run; (GroovyCodeSource,String[]); ; Argument[0]; groovy-injection; manual | +| 20 | Sink: groovy.lang; GroovyShell; false; run; (Reader,String,List); ; Argument[0]; groovy-injection; manual | +| 21 | Sink: groovy.lang; GroovyShell; false; run; (Reader,String,String[]); ; Argument[0]; groovy-injection; manual | +| 22 | Sink: groovy.lang; GroovyShell; false; run; (String,String,List); ; Argument[0]; groovy-injection; manual | +| 23 | Sink: groovy.lang; GroovyShell; false; run; (String,String,String[]); ; Argument[0]; groovy-injection; manual | +| 24 | Sink: groovy.lang; GroovyShell; false; run; (URI,List); ; Argument[0]; groovy-injection; manual | +| 25 | Sink: groovy.lang; GroovyShell; false; run; (URI,String[]); ; Argument[0]; groovy-injection; manual | +| 26 | Sink: groovy.text; TemplateEngine; true; createTemplate; ; ; Argument[0]; groovy-injection; manual | +| 27 | Sink: groovy.util; Eval; false; me; (String); ; Argument[0]; groovy-injection; manual | +| 28 | Sink: groovy.util; Eval; false; me; (String,Object,String); ; Argument[2]; groovy-injection; manual | +| 29 | Sink: groovy.util; Eval; false; x; (Object,String); ; Argument[1]; groovy-injection; manual | +| 30 | Sink: groovy.util; Eval; false; xy; (Object,Object,String); ; Argument[2]; groovy-injection; manual | +| 31 | Sink: groovy.util; Eval; false; xyz; (Object,Object,Object,String); ; Argument[3]; groovy-injection; manual | +| 32 | Sink: org.codehaus.groovy.control; CompilationUnit; false; compile; ; ; Argument[this]; groovy-injection; manual | +| 33 | Source: javax.servlet; ServletRequest; false; getParameter; (String); ; ReturnValue; remote; manual | +| 34 | Summary: java.io; ByteArrayInputStream; false; ByteArrayInputStream; ; ; Argument[0]; Argument[this]; taint; manual | +| 35 | Summary: java.io; StringReader; false; StringReader; ; ; Argument[0]; Argument[this]; taint; manual | +| 36 | Summary: java.lang; String; false; getBytes; ; ; Argument[this]; ReturnValue; taint; manual | +| 37 | Summary: java.net; URI; false; URI; (String); ; Argument[0]; Argument[this]; taint; manual | +| 38 | Summary: java.net; URL; false; URL; (String); ; Argument[0]; Argument[this]; taint; manual | +nodes +| GroovyClassLoaderTest.java:17:29:17:58 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| GroovyClassLoaderTest.java:19:36:19:79 | new GroovyCodeSource(...) : GroovyCodeSource | semmle.label | new GroovyCodeSource(...) : GroovyCodeSource | +| GroovyClassLoaderTest.java:19:57:19:62 | script : String | semmle.label | script : String | +| GroovyClassLoaderTest.java:20:36:20:38 | gcs | semmle.label | gcs | +| GroovyClassLoaderTest.java:24:29:24:58 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| GroovyClassLoaderTest.java:26:36:26:79 | new GroovyCodeSource(...) : GroovyCodeSource | semmle.label | new GroovyCodeSource(...) : GroovyCodeSource | +| GroovyClassLoaderTest.java:26:57:26:62 | script : String | semmle.label | script : String | +| GroovyClassLoaderTest.java:27:36:27:38 | gcs | semmle.label | gcs | +| GroovyClassLoaderTest.java:31:29:31:58 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| GroovyClassLoaderTest.java:33:36:33:78 | new ByteArrayInputStream(...) | semmle.label | new ByteArrayInputStream(...) | +| GroovyClassLoaderTest.java:33:61:33:66 | script : String | semmle.label | script : String | +| GroovyClassLoaderTest.java:33:61:33:77 | getBytes(...) : byte[] | semmle.label | getBytes(...) : byte[] | +| GroovyClassLoaderTest.java:37:29:37:58 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| GroovyClassLoaderTest.java:39:36:39:59 | new StringReader(...) | semmle.label | new StringReader(...) | +| GroovyClassLoaderTest.java:39:53:39:58 | script : String | semmle.label | script : String | +| GroovyClassLoaderTest.java:43:29:43:58 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| GroovyClassLoaderTest.java:45:36:45:41 | script | semmle.label | script | +| GroovyClassLoaderTest.java:49:29:49:58 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| GroovyClassLoaderTest.java:51:36:51:41 | script | semmle.label | script | +| GroovyCompilationUnitTest.java:21:13:21:14 | cu [post update] : CompilationUnit | semmle.label | cu [post update] : CompilationUnit | +| GroovyCompilationUnitTest.java:21:34:21:63 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| GroovyCompilationUnitTest.java:22:13:22:14 | cu | semmle.label | cu | +| GroovyCompilationUnitTest.java:31:13:31:14 | cu [post update] : CompilationUnit | semmle.label | cu [post update] : CompilationUnit | +| GroovyCompilationUnitTest.java:32:21:32:87 | new ByteArrayInputStream(...) : ByteArrayInputStream | semmle.label | new ByteArrayInputStream(...) : ByteArrayInputStream | +| GroovyCompilationUnitTest.java:32:46:32:75 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| GroovyCompilationUnitTest.java:32:46:32:86 | getBytes(...) : byte[] | semmle.label | getBytes(...) : byte[] | +| GroovyCompilationUnitTest.java:33:13:33:14 | cu | semmle.label | cu | +| GroovyCompilationUnitTest.java:37:13:37:14 | cu [post update] : CompilationUnit | semmle.label | cu [post update] : CompilationUnit | +| GroovyCompilationUnitTest.java:37:26:37:64 | new URL(...) : URL | semmle.label | new URL(...) : URL | +| GroovyCompilationUnitTest.java:37:34:37:63 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| GroovyCompilationUnitTest.java:38:13:38:14 | cu | semmle.label | cu | +| GroovyCompilationUnitTest.java:43:21:43:92 | new SourceUnit(...) : SourceUnit | semmle.label | new SourceUnit(...) : SourceUnit | +| GroovyCompilationUnitTest.java:43:44:43:73 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| GroovyCompilationUnitTest.java:44:13:44:14 | cu [post update] : CompilationUnit | semmle.label | cu [post update] : CompilationUnit | +| GroovyCompilationUnitTest.java:44:26:44:27 | su : SourceUnit | semmle.label | su : SourceUnit | +| GroovyCompilationUnitTest.java:45:13:45:14 | cu | semmle.label | cu | +| GroovyCompilationUnitTest.java:56:37:56:96 | new StringReaderSource(...) : StringReaderSource | semmle.label | new StringReaderSource(...) : StringReaderSource | +| GroovyCompilationUnitTest.java:56:60:56:89 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| GroovyCompilationUnitTest.java:57:29:57:72 | new SourceUnit(...) : SourceUnit | semmle.label | new SourceUnit(...) : SourceUnit | +| GroovyCompilationUnitTest.java:57:52:57:53 | rs : StringReaderSource | semmle.label | rs : StringReaderSource | +| GroovyCompilationUnitTest.java:58:13:58:14 | cu [post update] : CompilationUnit | semmle.label | cu [post update] : CompilationUnit | +| GroovyCompilationUnitTest.java:58:26:58:27 | su : SourceUnit | semmle.label | su : SourceUnit | +| GroovyCompilationUnitTest.java:59:13:59:14 | cu | semmle.label | cu | +| GroovyCompilationUnitTest.java:64:21:64:93 | new SourceUnit(...) : SourceUnit | semmle.label | new SourceUnit(...) : SourceUnit | +| GroovyCompilationUnitTest.java:64:36:64:74 | new URL(...) : URL | semmle.label | new URL(...) : URL | +| GroovyCompilationUnitTest.java:64:44:64:73 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| GroovyCompilationUnitTest.java:65:13:65:14 | cu [post update] : CompilationUnit | semmle.label | cu [post update] : CompilationUnit | +| GroovyCompilationUnitTest.java:65:26:65:27 | su : SourceUnit | semmle.label | su : SourceUnit | +| GroovyCompilationUnitTest.java:66:13:66:14 | cu | semmle.label | cu | +| GroovyCompilationUnitTest.java:70:29:70:85 | create(...) : SourceUnit | semmle.label | create(...) : SourceUnit | +| GroovyCompilationUnitTest.java:70:55:70:84 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| GroovyCompilationUnitTest.java:71:13:71:14 | cu [post update] : CompilationUnit | semmle.label | cu [post update] : CompilationUnit | +| GroovyCompilationUnitTest.java:71:26:71:27 | su : SourceUnit | semmle.label | su : SourceUnit | +| GroovyCompilationUnitTest.java:72:13:72:14 | cu | semmle.label | cu | +| GroovyCompilationUnitTest.java:76:29:76:88 | create(...) : SourceUnit | semmle.label | create(...) : SourceUnit | +| GroovyCompilationUnitTest.java:76:55:76:84 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| GroovyCompilationUnitTest.java:77:13:77:14 | cu [post update] : CompilationUnit | semmle.label | cu [post update] : CompilationUnit | +| GroovyCompilationUnitTest.java:77:26:77:27 | su : SourceUnit | semmle.label | su : SourceUnit | +| GroovyCompilationUnitTest.java:78:13:78:14 | cu | semmle.label | cu | +| GroovyCompilationUnitTest.java:88:13:88:14 | cu [post update] : JavaAwareCompilationUnit | semmle.label | cu [post update] : JavaAwareCompilationUnit | +| GroovyCompilationUnitTest.java:88:34:88:63 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| GroovyCompilationUnitTest.java:89:13:89:14 | cu | semmle.label | cu | +| GroovyEvalTest.java:14:29:14:58 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| GroovyEvalTest.java:15:21:15:26 | script | semmle.label | script | +| GroovyEvalTest.java:19:29:19:58 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| GroovyEvalTest.java:20:39:20:44 | script | semmle.label | script | +| GroovyEvalTest.java:24:29:24:58 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| GroovyEvalTest.java:25:31:25:36 | script | semmle.label | script | +| GroovyEvalTest.java:30:29:30:58 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| GroovyEvalTest.java:31:43:31:48 | script | semmle.label | script | +| GroovyEvalTest.java:35:29:35:58 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| GroovyEvalTest.java:36:51:36:56 | script | semmle.label | script | +| GroovyShellTest.java:22:29:22:58 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| GroovyShellTest.java:23:36:23:79 | new GroovyCodeSource(...) : GroovyCodeSource | semmle.label | new GroovyCodeSource(...) : GroovyCodeSource | +| GroovyShellTest.java:23:57:23:62 | script : String | semmle.label | script : String | +| GroovyShellTest.java:24:28:24:30 | gcs | semmle.label | gcs | +| GroovyShellTest.java:29:29:29:58 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| GroovyShellTest.java:30:29:30:52 | new StringReader(...) : StringReader | semmle.label | new StringReader(...) : StringReader | +| GroovyShellTest.java:30:46:30:51 | script : String | semmle.label | script : String | +| GroovyShellTest.java:31:28:31:33 | reader | semmle.label | reader | +| GroovyShellTest.java:36:29:36:58 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| GroovyShellTest.java:37:29:37:52 | new StringReader(...) : StringReader | semmle.label | new StringReader(...) : StringReader | +| GroovyShellTest.java:37:46:37:51 | script : String | semmle.label | script : String | +| GroovyShellTest.java:38:28:38:33 | reader | semmle.label | reader | +| GroovyShellTest.java:43:29:43:58 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| GroovyShellTest.java:44:28:44:33 | script | semmle.label | script | +| GroovyShellTest.java:49:29:49:58 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| GroovyShellTest.java:50:28:50:33 | script | semmle.label | script | +| GroovyShellTest.java:55:29:55:58 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| GroovyShellTest.java:56:28:56:33 | script | semmle.label | script | +| GroovyShellTest.java:61:29:61:58 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| GroovyShellTest.java:62:25:62:39 | new URI(...) | semmle.label | new URI(...) | +| GroovyShellTest.java:62:33:62:38 | script : String | semmle.label | script : String | +| GroovyShellTest.java:68:29:68:58 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| GroovyShellTest.java:69:29:69:52 | new StringReader(...) : StringReader | semmle.label | new StringReader(...) : StringReader | +| GroovyShellTest.java:69:46:69:51 | script : String | semmle.label | script : String | +| GroovyShellTest.java:70:25:70:30 | reader | semmle.label | reader | +| GroovyShellTest.java:75:29:75:58 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| GroovyShellTest.java:76:29:76:52 | new StringReader(...) : StringReader | semmle.label | new StringReader(...) : StringReader | +| GroovyShellTest.java:76:46:76:51 | script : String | semmle.label | script : String | +| GroovyShellTest.java:77:25:77:30 | reader | semmle.label | reader | +| GroovyShellTest.java:82:29:82:58 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| GroovyShellTest.java:83:25:83:30 | script | semmle.label | script | +| GroovyShellTest.java:88:29:88:58 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| GroovyShellTest.java:89:25:89:30 | script | semmle.label | script | +| GroovyShellTest.java:94:29:94:58 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| GroovyShellTest.java:95:25:95:39 | new URI(...) | semmle.label | new URI(...) | +| GroovyShellTest.java:95:33:95:38 | script : String | semmle.label | script : String | +| GroovyShellTest.java:101:29:101:58 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| GroovyShellTest.java:102:36:102:79 | new GroovyCodeSource(...) : GroovyCodeSource | semmle.label | new GroovyCodeSource(...) : GroovyCodeSource | +| GroovyShellTest.java:102:57:102:62 | script : String | semmle.label | script : String | +| GroovyShellTest.java:103:23:103:25 | gcs | semmle.label | gcs | +| GroovyShellTest.java:108:29:108:58 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| GroovyShellTest.java:109:36:109:79 | new GroovyCodeSource(...) : GroovyCodeSource | semmle.label | new GroovyCodeSource(...) : GroovyCodeSource | +| GroovyShellTest.java:109:57:109:62 | script : String | semmle.label | script : String | +| GroovyShellTest.java:110:23:110:25 | gcs | semmle.label | gcs | +| GroovyShellTest.java:115:29:115:58 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| GroovyShellTest.java:116:29:116:52 | new StringReader(...) : StringReader | semmle.label | new StringReader(...) : StringReader | +| GroovyShellTest.java:116:46:116:51 | script : String | semmle.label | script : String | +| GroovyShellTest.java:117:23:117:28 | reader | semmle.label | reader | +| GroovyShellTest.java:122:29:122:58 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| GroovyShellTest.java:123:29:123:52 | new StringReader(...) : StringReader | semmle.label | new StringReader(...) : StringReader | +| GroovyShellTest.java:123:46:123:51 | script : String | semmle.label | script : String | +| GroovyShellTest.java:124:23:124:28 | reader | semmle.label | reader | +| GroovyShellTest.java:129:29:129:58 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| GroovyShellTest.java:130:23:130:28 | script | semmle.label | script | +| GroovyShellTest.java:135:29:135:58 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| GroovyShellTest.java:136:23:136:28 | script | semmle.label | script | +| GroovyShellTest.java:141:29:141:58 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| GroovyShellTest.java:142:23:142:37 | new URI(...) | semmle.label | new URI(...) | +| GroovyShellTest.java:142:31:142:36 | script : String | semmle.label | script : String | +| GroovyShellTest.java:148:29:148:58 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| GroovyShellTest.java:149:23:149:37 | new URI(...) | semmle.label | new URI(...) | +| GroovyShellTest.java:149:31:149:36 | script : String | semmle.label | script : String | +| TemplateEngineTest.java:14:16:14:45 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| TemplateEngineTest.java:20:29:20:43 | source(...) : String | semmle.label | source(...) : String | +| TemplateEngineTest.java:22:35:22:64 | getParameter(...) | semmle.label | getParameter(...) | +| TemplateEngineTest.java:23:35:23:47 | (...)... | semmle.label | (...)... | +| TemplateEngineTest.java:24:35:24:49 | (...)... | semmle.label | (...)... | +| TemplateEngineTest.java:25:35:25:46 | (...)... | semmle.label | (...)... | +subpaths diff --git a/java/ql/test/query-tests/security/CWE-094/GroovyInjection/GroovyInjectionTest.qlref b/java/ql/test/query-tests/security/CWE-094/GroovyInjection/GroovyInjectionTest.qlref new file mode 100644 index 00000000000..b19d5fce522 --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-094/GroovyInjection/GroovyInjectionTest.qlref @@ -0,0 +1,4 @@ +query: Security/CWE/CWE-094/GroovyInjection.ql +postprocess: + - utils/test/PrettyPrintModels.ql + - utils/test/InlineExpectationsTestQuery.ql diff --git a/java/ql/test/query-tests/security/CWE-094/GroovyShellTest.java b/java/ql/test/query-tests/security/CWE-094/GroovyInjection/GroovyShellTest.java similarity index 66% rename from java/ql/test/query-tests/security/CWE-094/GroovyShellTest.java rename to java/ql/test/query-tests/security/CWE-094/GroovyInjection/GroovyShellTest.java index 1e5b806f18e..6e2e773b03c 100644 --- a/java/ql/test/query-tests/security/CWE-094/GroovyShellTest.java +++ b/java/ql/test/query-tests/security/CWE-094/GroovyInjection/GroovyShellTest.java @@ -19,136 +19,135 @@ public class GroovyShellTest extends HttpServlet { // "groovy.lang;GroovyShell;false;evaluate;(GroovyCodeSource);;Argument[0];groovy;manual", { GroovyShell shell = new GroovyShell(); - String script = request.getParameter("script"); + String script = request.getParameter("script"); // $ Source GroovyCodeSource gcs = new GroovyCodeSource(script, "test", "Test"); - shell.evaluate(gcs); // $hasGroovyInjection + shell.evaluate(gcs); // $ Alert } // "groovy.lang;GroovyShell;false;evaluate;(Reader);;Argument[0];groovy;manual", { GroovyShell shell = new GroovyShell(); - String script = request.getParameter("script"); + String script = request.getParameter("script"); // $ Source Reader reader = new StringReader(script); - shell.evaluate(reader); // $hasGroovyInjection + shell.evaluate(reader); // $ Alert } // "groovy.lang;GroovyShell;false;evaluate;(Reader,String);;Argument[0];groovy;manual", { GroovyShell shell = new GroovyShell(); - String script = request.getParameter("script"); + String script = request.getParameter("script"); // $ Source Reader reader = new StringReader(script); - shell.evaluate(reader, "_"); // $hasGroovyInjection + shell.evaluate(reader, "_"); // $ Alert } // "groovy.lang;GroovyShell;false;evaluate;(String);;Argument[0];groovy;manual", { GroovyShell shell = new GroovyShell(); - String script = request.getParameter("script"); - shell.evaluate(script); // $hasGroovyInjection + String script = request.getParameter("script"); // $ Source + shell.evaluate(script); // $ Alert } // "groovy.lang;GroovyShell;false;evaluate;(String,String);;Argument[0];groovy;manual", { GroovyShell shell = new GroovyShell(); - String script = request.getParameter("script"); - shell.evaluate(script, "test"); // $hasGroovyInjection + String script = request.getParameter("script"); // $ Source + shell.evaluate(script, "test"); // $ Alert } // "groovy.lang;GroovyShell;false;evaluate;(String,String,String);;Argument[0];groovy;manual", { GroovyShell shell = new GroovyShell(); - String script = request.getParameter("script"); - shell.evaluate(script, "test", "test2"); // $hasGroovyInjection + String script = request.getParameter("script"); // $ Source + shell.evaluate(script, "test", "test2"); // $ Alert } // "groovy.lang;GroovyShell;false;evaluate;(URI);;Argument[0];groovy;manual", try { GroovyShell shell = new GroovyShell(); - String script = request.getParameter("script"); - shell.parse(new URI(script)); // $hasGroovyInjection + String script = request.getParameter("script"); // $ Source + shell.parse(new URI(script)); // $ Alert } catch (URISyntaxException e) { } // "groovy.lang;GroovyShell;false;parse;(Reader);;Argument[0];groovy;manual", { GroovyShell shell = new GroovyShell(); - String script = request.getParameter("script"); + String script = request.getParameter("script"); // $ Source Reader reader = new StringReader(script); - shell.parse(reader); // $hasGroovyInjection + shell.parse(reader); // $ Alert } // "groovy.lang;GroovyShell;false;parse;(Reader,String);;Argument[0];groovy;manual", { GroovyShell shell = new GroovyShell(); - String script = request.getParameter("script"); + String script = request.getParameter("script"); // $ Source Reader reader = new StringReader(script); - shell.parse(reader, "_"); // $hasGroovyInjection + shell.parse(reader, "_"); // $ Alert } // "groovy.lang;GroovyShell;false;parse;(String);;Argument[0];groovy;manual", { GroovyShell shell = new GroovyShell(); - String script = request.getParameter("script"); - shell.parse(script); // $hasGroovyInjection + String script = request.getParameter("script"); // $ Source + shell.parse(script); // $ Alert } // "groovy.lang;GroovyShell;false;parse;(String,String);;Argument[0];groovy;manual", { GroovyShell shell = new GroovyShell(); - String script = request.getParameter("script"); - shell.parse(script, "_"); // $hasGroovyInjection + String script = request.getParameter("script"); // $ Source + shell.parse(script, "_"); // $ Alert } // "groovy.lang;GroovyShell;false;parse;(URI);;Argument[0];groovy;manual", try { GroovyShell shell = new GroovyShell(); - String script = request.getParameter("script"); - shell.parse(new URI(script)); // $hasGroovyInjection + String script = request.getParameter("script"); // $ Source + shell.parse(new URI(script)); // $ Alert } catch (URISyntaxException e) { } // "groovy.lang;GroovyShell;false;run;(GroovyCodeSource,String[]);;Argument[0];groovy;manual", { GroovyShell shell = new GroovyShell(); - String script = request.getParameter("script"); + String script = request.getParameter("script"); // $ Source GroovyCodeSource gcs = new GroovyCodeSource(script, "test", "Test"); - shell.run(gcs, new String[] {}); // $hasGroovyInjection + shell.run(gcs, new String[] {}); // $ Alert } // "groovy.lang;GroovyShell;false;run;(GroovyCodeSource,List);;Argument[0];groovy;manual", { GroovyShell shell = new GroovyShell(); - String script = request.getParameter("script"); + String script = request.getParameter("script"); // $ Source GroovyCodeSource gcs = new GroovyCodeSource(script, "test", "Test"); - shell.run(gcs, new ArrayList()); // $hasGroovyInjection + shell.run(gcs, new ArrayList()); // $ Alert } // "groovy.lang;GroovyShell;false;run;(Reader,String,String[]);;Argument[0];groovy;manual", { GroovyShell shell = new GroovyShell(); - String script = request.getParameter("script"); + String script = request.getParameter("script"); // $ Source Reader reader = new StringReader(script); - shell.run(reader, "test", new String[] {}); // $hasGroovyInjection + shell.run(reader, "test", new String[] {}); // $ Alert } // "groovy.lang;GroovyShell;false;run;(Reader,String,List);;Argument[0];groovy;manual", { GroovyShell shell = new GroovyShell(); - String script = request.getParameter("script"); + String script = request.getParameter("script"); // $ Source Reader reader = new StringReader(script); - shell.run(reader, "test", new ArrayList()); // $hasGroovyInjection + shell.run(reader, "test", new ArrayList()); // $ Alert } // "groovy.lang;GroovyShell;false;run;(String,String,String[]);;Argument[0];groovy;manual", { GroovyShell shell = new GroovyShell(); - String script = request.getParameter("script"); - shell.run(script, "_", new String[] {}); // $hasGroovyInjection + String script = request.getParameter("script"); // $ Source + shell.run(script, "_", new String[] {}); // $ Alert } // "groovy.lang;GroovyShell;false;run;(String,String,List);;Argument[0];groovy;manual", { GroovyShell shell = new GroovyShell(); - String script = request.getParameter("script"); - shell.run(script, "_", new ArrayList()); // $hasGroovyInjection + String script = request.getParameter("script"); // $ Source + shell.run(script, "_", new ArrayList()); // $ Alert } // "groovy.lang;GroovyShell;false;run;(URI,String[]);;Argument[0];groovy;manual", try { GroovyShell shell = new GroovyShell(); - String script = request.getParameter("script"); - shell.run(new URI(script), new String[] {}); // $hasGroovyInjection + String script = request.getParameter("script"); // $ Source + shell.run(new URI(script), new String[] {}); // $ Alert } catch (URISyntaxException e) { } // "groovy.lang;GroovyShell;false;run;(URI,List);;Argument[0];groovy;manual", try { GroovyShell shell = new GroovyShell(); - String script = request.getParameter("script"); - shell.run(new URI(script), new ArrayList()); // $hasGroovyInjection + String script = request.getParameter("script"); // $ Source + shell.run(new URI(script), new ArrayList()); // $ Alert } catch (URISyntaxException e) { } } } - diff --git a/java/ql/test/query-tests/security/CWE-094/TemplateEngineTest.java b/java/ql/test/query-tests/security/CWE-094/GroovyInjection/TemplateEngineTest.java similarity index 72% rename from java/ql/test/query-tests/security/CWE-094/TemplateEngineTest.java rename to java/ql/test/query-tests/security/CWE-094/GroovyInjection/TemplateEngineTest.java index dbf32494e10..a046b9cd332 100644 --- a/java/ql/test/query-tests/security/CWE-094/TemplateEngineTest.java +++ b/java/ql/test/query-tests/security/CWE-094/GroovyInjection/TemplateEngineTest.java @@ -11,7 +11,7 @@ import groovy.text.TemplateEngine; public class TemplateEngineTest extends HttpServlet { private Object source(HttpServletRequest request) { - return request.getParameter("script"); + return request.getParameter("script"); // $ Source } protected void doGet(HttpServletRequest request, HttpServletResponse response) @@ -19,10 +19,10 @@ public class TemplateEngineTest extends HttpServlet { try { Object script = source(request); TemplateEngine engine = null; - engine.createTemplate(request.getParameter("script")); // $ hasGroovyInjection - engine.createTemplate((File) script); // $ hasGroovyInjection - engine.createTemplate((Reader) script); // $ hasGroovyInjection - engine.createTemplate((URL) script); // $ hasGroovyInjection + engine.createTemplate(request.getParameter("script")); // $ Alert + engine.createTemplate((File) script); // $ Alert + engine.createTemplate((Reader) script); // $ Alert + engine.createTemplate((URL) script); // $ Alert } catch (Exception e) { } diff --git a/java/ql/test/query-tests/security/CWE-094/GroovyInjection/options b/java/ql/test/query-tests/security/CWE-094/GroovyInjection/options new file mode 100644 index 00000000000..d7c8332682b --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-094/GroovyInjection/options @@ -0,0 +1 @@ +//semmle-extractor-options: --javac-args -cp ${testdir}/../../../../stubs/validation-api-2.0.1.Final:${testdir}/../../../../stubs/springframework-5.8.x:${testdir}/../../../../stubs/apache-commons-jexl-2.1.1:${testdir}/../../../../stubs/apache-commons-jexl-3.1:${testdir}/../../../../stubs/apache-commons-logging-1.2:${testdir}/../../../../stubs/mvel2-2.4.7:${testdir}/../../../../stubs/groovy-all-3.0.7:${testdir}/../../../../stubs/servlet-api-2.4:${testdir}/../../../../stubs/scriptengine:${testdir}/../../../../stubs/jsr223-api:${testdir}/../../../../stubs/apache-freemarker-2.3.31:${testdir}/../../../../stubs/jinjava-2.6.0:${testdir}/../../../../stubs/pebble-3.1.5:${testdir}/../../../../stubs/thymeleaf-3.0.14:${testdir}/../../../../stubs/apache-velocity-2.3:${testdir}/../../../..//stubs/google-android-9.0.0 diff --git a/java/ql/test/query-tests/security/CWE-094/GroovyInjectionTest.expected b/java/ql/test/query-tests/security/CWE-094/GroovyInjectionTest.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/java/ql/test/query-tests/security/CWE-094/GroovyInjectionTest.ql b/java/ql/test/query-tests/security/CWE-094/GroovyInjectionTest.ql deleted file mode 100644 index 26f32638d91..00000000000 --- a/java/ql/test/query-tests/security/CWE-094/GroovyInjectionTest.ql +++ /dev/null @@ -1,20 +0,0 @@ -import java -import semmle.code.java.dataflow.TaintTracking -import semmle.code.java.dataflow.FlowSources -import semmle.code.java.security.GroovyInjectionQuery -import utils.test.InlineExpectationsTest - -module HasGroovyInjectionTest implements TestSig { - string getARelevantTag() { result = "hasGroovyInjection" } - - predicate hasActualResult(Location location, string element, string tag, string value) { - tag = "hasGroovyInjection" and - exists(DataFlow::Node sink | GroovyInjectionFlow::flowTo(sink) | - sink.getLocation() = location and - element = sink.toString() and - value = "" - ) - } -} - -import MakeTest diff --git a/java/ql/test/query-tests/security/CWE-094/Jexl2Injection.java b/java/ql/test/query-tests/security/CWE-094/JexlInjection/Jexl2Injection.java similarity index 90% rename from java/ql/test/query-tests/security/CWE-094/Jexl2Injection.java rename to java/ql/test/query-tests/security/CWE-094/JexlInjection/Jexl2Injection.java index d7ee659a4c8..b306cf4e535 100644 --- a/java/ql/test/query-tests/security/CWE-094/Jexl2Injection.java +++ b/java/ql/test/query-tests/security/CWE-094/JexlInjection/Jexl2Injection.java @@ -11,21 +11,21 @@ public class Jexl2Injection { JexlEngine jexl = new JexlEngine(); Expression e = jexl.createExpression(jexlExpr); JexlContext jc = new MapContext(); - e.evaluate(jc); // $hasJexlInjection + e.evaluate(jc); // $ Alert } private static void runJexlExpressionWithJexlInfo(String jexlExpr) { JexlEngine jexl = new JexlEngine(); Expression e = jexl.createExpression(jexlExpr, new DebugInfo("unknown", 0, 0)); JexlContext jc = new MapContext(); - e.evaluate(jc); // $hasJexlInjection + e.evaluate(jc); // $ Alert } private static void runJexlScript(String jexlExpr) { JexlEngine jexl = new JexlEngine(); Script script = jexl.createScript(jexlExpr); JexlContext jc = new MapContext(); - script.execute(jc); // $hasJexlInjection + script.execute(jc); // $ Alert } private static void runJexlScriptViaCallable(String jexlExpr) { @@ -34,7 +34,7 @@ public class Jexl2Injection { JexlContext jc = new MapContext(); try { - script.callable(jc).call(); // $hasJexlInjection + script.callable(jc).call(); // $ Alert } catch (Exception e) { throw new RuntimeException(e); } @@ -42,37 +42,37 @@ public class Jexl2Injection { private static void runJexlExpressionViaGetProperty(String jexlExpr) { JexlEngine jexl = new JexlEngine(); - jexl.getProperty(new Object(), jexlExpr); // $hasJexlInjection + jexl.getProperty(new Object(), jexlExpr); // $ Alert } private static void runJexlExpressionViaSetProperty(String jexlExpr) { JexlEngine jexl = new JexlEngine(); - jexl.setProperty(new Object(), jexlExpr, new Object()); // $hasJexlInjection + jexl.setProperty(new Object(), jexlExpr, new Object()); // $ Alert } private static void runJexlExpressionViaUnifiedJEXLParseAndEvaluate(String jexlExpr) { JexlEngine jexl = new JexlEngine(); UnifiedJEXL unifiedJEXL = new UnifiedJEXL(jexl); - unifiedJEXL.parse(jexlExpr).evaluate(new MapContext()); // $hasJexlInjection + unifiedJEXL.parse(jexlExpr).evaluate(new MapContext()); // $ Alert } private static void runJexlExpressionViaUnifiedJEXLParseAndPrepare(String jexlExpr) { JexlEngine jexl = new JexlEngine(); UnifiedJEXL unifiedJEXL = new UnifiedJEXL(jexl); - unifiedJEXL.parse(jexlExpr).prepare(new MapContext()); // $hasJexlInjection + unifiedJEXL.parse(jexlExpr).prepare(new MapContext()); // $ Alert } private static void runJexlExpressionViaUnifiedJEXLTemplateEvaluate(String jexlExpr) { JexlEngine jexl = new JexlEngine(); UnifiedJEXL unifiedJEXL = new UnifiedJEXL(jexl); - unifiedJEXL.createTemplate(jexlExpr).evaluate(new MapContext(), new StringWriter()); // $hasJexlInjection + unifiedJEXL.createTemplate(jexlExpr).evaluate(new MapContext(), new StringWriter()); // $ Alert } private static void testWithSocket(Consumer action) throws Exception { try (ServerSocket serverSocket = new ServerSocket(0)) { try (Socket socket = serverSocket.accept()) { byte[] bytes = new byte[1024]; - int n = socket.getInputStream().read(bytes); + int n = socket.getInputStream().read(bytes); // $ Source String jexlExpr = new String(bytes, 0, n); action.accept(jexlExpr); } diff --git a/java/ql/test/query-tests/security/CWE-094/Jexl3Injection.java b/java/ql/test/query-tests/security/CWE-094/JexlInjection/Jexl3Injection.java similarity index 90% rename from java/ql/test/query-tests/security/CWE-094/Jexl3Injection.java rename to java/ql/test/query-tests/security/CWE-094/JexlInjection/Jexl3Injection.java index 0300b8ffe3f..c047bb5b315 100644 --- a/java/ql/test/query-tests/security/CWE-094/Jexl3Injection.java +++ b/java/ql/test/query-tests/security/CWE-094/JexlInjection/Jexl3Injection.java @@ -18,21 +18,21 @@ public class Jexl3Injection { JexlEngine jexl = new JexlBuilder().create(); JexlExpression e = jexl.createExpression(jexlExpr); JexlContext jc = new MapContext(); - e.evaluate(jc); // $hasJexlInjection + e.evaluate(jc); // $ Alert } private static void runJexlExpressionWithJexlInfo(String jexlExpr) { JexlEngine jexl = new JexlBuilder().create(); JexlExpression e = jexl.createExpression(new JexlInfo("unknown", 0, 0), jexlExpr); JexlContext jc = new MapContext(); - e.evaluate(jc); // $hasJexlInjection + e.evaluate(jc); // $ Alert } private static void runJexlScript(String jexlExpr) { JexlEngine jexl = new JexlBuilder().create(); JexlScript script = jexl.createScript(jexlExpr); JexlContext jc = new MapContext(); - script.execute(jc); // $hasJexlInjection + script.execute(jc); // $ Alert } private static void runJexlScriptViaCallable(String jexlExpr) { @@ -41,7 +41,7 @@ public class Jexl3Injection { JexlContext jc = new MapContext(); try { - script.callable(jc).call(); // $hasJexlInjection + script.callable(jc).call(); // $ Alert } catch (Exception e) { throw new RuntimeException(e); } @@ -49,30 +49,30 @@ public class Jexl3Injection { private static void runJexlExpressionViaGetProperty(String jexlExpr) { JexlEngine jexl = new JexlBuilder().create(); - jexl.getProperty(new Object(), jexlExpr); // $hasJexlInjection + jexl.getProperty(new Object(), jexlExpr); // $ Alert } private static void runJexlExpressionViaSetProperty(String jexlExpr) { JexlEngine jexl = new JexlBuilder().create(); - jexl.setProperty(new Object(), jexlExpr, new Object()); // $hasJexlInjection + jexl.setProperty(new Object(), jexlExpr, new Object()); // $ Alert } private static void runJexlExpressionViaJxltEngineExpressionEvaluate(String jexlExpr) { JexlEngine jexl = new JexlBuilder().create(); JxltEngine jxlt = jexl.createJxltEngine(); - jxlt.createExpression(jexlExpr).evaluate(new MapContext()); // $hasJexlInjection + jxlt.createExpression(jexlExpr).evaluate(new MapContext()); // $ Alert } private static void runJexlExpressionViaJxltEngineExpressionPrepare(String jexlExpr) { JexlEngine jexl = new JexlBuilder().create(); JxltEngine jxlt = jexl.createJxltEngine(); - jxlt.createExpression(jexlExpr).prepare(new MapContext()); // $hasJexlInjection + jxlt.createExpression(jexlExpr).prepare(new MapContext()); // $ Alert } private static void runJexlExpressionViaJxltEngineTemplateEvaluate(String jexlExpr) { JexlEngine jexl = new JexlBuilder().create(); JxltEngine jxlt = jexl.createJxltEngine(); - jxlt.createTemplate(jexlExpr).evaluate(new MapContext(), new StringWriter()); // $hasJexlInjection + jxlt.createTemplate(jexlExpr).evaluate(new MapContext(), new StringWriter()); // $ Alert } private static void runJexlExpressionViaCallable(String jexlExpr) { @@ -81,7 +81,7 @@ public class Jexl3Injection { JexlContext jc = new MapContext(); try { - e.callable(jc).call(); // $hasJexlInjection + e.callable(jc).call(); // $ Alert } catch (Exception ex) { throw new RuntimeException(ex); } @@ -91,7 +91,7 @@ public class Jexl3Injection { try (ServerSocket serverSocket = new ServerSocket(0)) { try (Socket socket = serverSocket.accept()) { byte[] bytes = new byte[1024]; - int n = socket.getInputStream().read(bytes); + int n = socket.getInputStream().read(bytes); // $ Source String jexlExpr = new String(bytes, 0, n); action.accept(jexlExpr); } @@ -141,14 +141,14 @@ public class Jexl3Injection { } @PostMapping("/request") - public ResponseEntity testWithSpringControllerThatEvaluatesJexlFromPathVariable(@PathVariable String expr) { + public ResponseEntity testWithSpringControllerThatEvaluatesJexlFromPathVariable(@PathVariable String expr) { // $ Source runJexlExpression(expr); return ResponseEntity.ok(HttpStatus.OK); } @PostMapping("/request") - public ResponseEntity testWithSpringControllerThatEvaluatesJexlFromRequestBody(@RequestBody Data data) { + public ResponseEntity testWithSpringControllerThatEvaluatesJexlFromRequestBody(@RequestBody Data data) { // $ Source String expr = data.getExpr(); runJexlExpression(expr); @@ -158,7 +158,7 @@ public class Jexl3Injection { @PostMapping("/request") public ResponseEntity testWithSpringControllerThatEvaluatesJexlFromRequestBodyWithNestedObjects( - @RequestBody CustomRequest customRequest) { + @RequestBody CustomRequest customRequest) { // $ Source String expr = customRequest.getData().getExpr(); runJexlExpression(expr); diff --git a/java/ql/test/query-tests/security/CWE-094/JexlInjection/JexlInjectionTest.expected b/java/ql/test/query-tests/security/CWE-094/JexlInjection/JexlInjectionTest.expected new file mode 100644 index 00000000000..24e02a7ac01 --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-094/JexlInjection/JexlInjectionTest.expected @@ -0,0 +1,303 @@ +#select +| Jexl2Injection.java:14:9:14:9 | e | Jexl2Injection.java:75:25:75:47 | getInputStream(...) : InputStream | Jexl2Injection.java:14:9:14:9 | e | JEXL expression depends on a $@. | Jexl2Injection.java:75:25:75:47 | getInputStream(...) | user-provided value | +| Jexl2Injection.java:21:9:21:9 | e | Jexl2Injection.java:75:25:75:47 | getInputStream(...) : InputStream | Jexl2Injection.java:21:9:21:9 | e | JEXL expression depends on a $@. | Jexl2Injection.java:75:25:75:47 | getInputStream(...) | user-provided value | +| Jexl2Injection.java:28:9:28:14 | script | Jexl2Injection.java:75:25:75:47 | getInputStream(...) : InputStream | Jexl2Injection.java:28:9:28:14 | script | JEXL expression depends on a $@. | Jexl2Injection.java:75:25:75:47 | getInputStream(...) | user-provided value | +| Jexl2Injection.java:37:13:37:18 | script | Jexl2Injection.java:75:25:75:47 | getInputStream(...) : InputStream | Jexl2Injection.java:37:13:37:18 | script | JEXL expression depends on a $@. | Jexl2Injection.java:75:25:75:47 | getInputStream(...) | user-provided value | +| Jexl2Injection.java:45:40:45:47 | jexlExpr | Jexl2Injection.java:75:25:75:47 | getInputStream(...) : InputStream | Jexl2Injection.java:45:40:45:47 | jexlExpr | JEXL expression depends on a $@. | Jexl2Injection.java:75:25:75:47 | getInputStream(...) | user-provided value | +| Jexl2Injection.java:50:40:50:47 | jexlExpr | Jexl2Injection.java:75:25:75:47 | getInputStream(...) : InputStream | Jexl2Injection.java:50:40:50:47 | jexlExpr | JEXL expression depends on a $@. | Jexl2Injection.java:75:25:75:47 | getInputStream(...) | user-provided value | +| Jexl2Injection.java:56:9:56:35 | parse(...) | Jexl2Injection.java:75:25:75:47 | getInputStream(...) : InputStream | Jexl2Injection.java:56:9:56:35 | parse(...) | JEXL expression depends on a $@. | Jexl2Injection.java:75:25:75:47 | getInputStream(...) | user-provided value | +| Jexl2Injection.java:62:9:62:35 | parse(...) | Jexl2Injection.java:75:25:75:47 | getInputStream(...) : InputStream | Jexl2Injection.java:62:9:62:35 | parse(...) | JEXL expression depends on a $@. | Jexl2Injection.java:75:25:75:47 | getInputStream(...) | user-provided value | +| Jexl2Injection.java:68:9:68:44 | createTemplate(...) | Jexl2Injection.java:75:25:75:47 | getInputStream(...) : InputStream | Jexl2Injection.java:68:9:68:44 | createTemplate(...) | JEXL expression depends on a $@. | Jexl2Injection.java:75:25:75:47 | getInputStream(...) | user-provided value | +| Jexl3Injection.java:21:9:21:9 | e | Jexl3Injection.java:94:25:94:47 | getInputStream(...) : InputStream | Jexl3Injection.java:21:9:21:9 | e | JEXL expression depends on a $@. | Jexl3Injection.java:94:25:94:47 | getInputStream(...) | user-provided value | +| Jexl3Injection.java:21:9:21:9 | e | Jexl3Injection.java:144:85:144:109 | expr : String | Jexl3Injection.java:21:9:21:9 | e | JEXL expression depends on a $@. | Jexl3Injection.java:144:85:144:109 | expr | user-provided value | +| Jexl3Injection.java:21:9:21:9 | e | Jexl3Injection.java:151:84:151:105 | data : Data | Jexl3Injection.java:21:9:21:9 | e | JEXL expression depends on a $@. | Jexl3Injection.java:151:84:151:105 | data | user-provided value | +| Jexl3Injection.java:21:9:21:9 | e | Jexl3Injection.java:161:13:161:52 | customRequest : CustomRequest | Jexl3Injection.java:21:9:21:9 | e | JEXL expression depends on a $@. | Jexl3Injection.java:161:13:161:52 | customRequest | user-provided value | +| Jexl3Injection.java:28:9:28:9 | e | Jexl3Injection.java:94:25:94:47 | getInputStream(...) : InputStream | Jexl3Injection.java:28:9:28:9 | e | JEXL expression depends on a $@. | Jexl3Injection.java:94:25:94:47 | getInputStream(...) | user-provided value | +| Jexl3Injection.java:35:9:35:14 | script | Jexl3Injection.java:94:25:94:47 | getInputStream(...) : InputStream | Jexl3Injection.java:35:9:35:14 | script | JEXL expression depends on a $@. | Jexl3Injection.java:94:25:94:47 | getInputStream(...) | user-provided value | +| Jexl3Injection.java:44:13:44:18 | script | Jexl3Injection.java:94:25:94:47 | getInputStream(...) : InputStream | Jexl3Injection.java:44:13:44:18 | script | JEXL expression depends on a $@. | Jexl3Injection.java:94:25:94:47 | getInputStream(...) | user-provided value | +| Jexl3Injection.java:52:40:52:47 | jexlExpr | Jexl3Injection.java:94:25:94:47 | getInputStream(...) : InputStream | Jexl3Injection.java:52:40:52:47 | jexlExpr | JEXL expression depends on a $@. | Jexl3Injection.java:94:25:94:47 | getInputStream(...) | user-provided value | +| Jexl3Injection.java:57:40:57:47 | jexlExpr | Jexl3Injection.java:94:25:94:47 | getInputStream(...) : InputStream | Jexl3Injection.java:57:40:57:47 | jexlExpr | JEXL expression depends on a $@. | Jexl3Injection.java:94:25:94:47 | getInputStream(...) | user-provided value | +| Jexl3Injection.java:63:9:63:39 | createExpression(...) | Jexl3Injection.java:94:25:94:47 | getInputStream(...) : InputStream | Jexl3Injection.java:63:9:63:39 | createExpression(...) | JEXL expression depends on a $@. | Jexl3Injection.java:94:25:94:47 | getInputStream(...) | user-provided value | +| Jexl3Injection.java:69:9:69:39 | createExpression(...) | Jexl3Injection.java:94:25:94:47 | getInputStream(...) : InputStream | Jexl3Injection.java:69:9:69:39 | createExpression(...) | JEXL expression depends on a $@. | Jexl3Injection.java:94:25:94:47 | getInputStream(...) | user-provided value | +| Jexl3Injection.java:75:9:75:37 | createTemplate(...) | Jexl3Injection.java:94:25:94:47 | getInputStream(...) : InputStream | Jexl3Injection.java:75:9:75:37 | createTemplate(...) | JEXL expression depends on a $@. | Jexl3Injection.java:94:25:94:47 | getInputStream(...) | user-provided value | +| Jexl3Injection.java:84:13:84:13 | e | Jexl3Injection.java:94:25:94:47 | getInputStream(...) : InputStream | Jexl3Injection.java:84:13:84:13 | e | JEXL expression depends on a $@. | Jexl3Injection.java:94:25:94:47 | getInputStream(...) | user-provided value | +edges +| Jexl2Injection.java:10:43:10:57 | jexlExpr : String | Jexl2Injection.java:12:46:12:53 | jexlExpr : String | provenance | | +| Jexl2Injection.java:12:24:12:54 | createExpression(...) : Expression | Jexl2Injection.java:14:9:14:9 | e | provenance | Sink:MaD:1 | +| Jexl2Injection.java:12:46:12:53 | jexlExpr : String | Jexl2Injection.java:12:24:12:54 | createExpression(...) : Expression | provenance | Config | +| Jexl2Injection.java:17:55:17:69 | jexlExpr : String | Jexl2Injection.java:19:46:19:53 | jexlExpr : String | provenance | | +| Jexl2Injection.java:19:24:19:86 | createExpression(...) : Expression | Jexl2Injection.java:21:9:21:9 | e | provenance | Sink:MaD:1 | +| Jexl2Injection.java:19:46:19:53 | jexlExpr : String | Jexl2Injection.java:19:24:19:86 | createExpression(...) : Expression | provenance | Config | +| Jexl2Injection.java:24:39:24:53 | jexlExpr : String | Jexl2Injection.java:26:43:26:50 | jexlExpr : String | provenance | | +| Jexl2Injection.java:26:25:26:51 | createScript(...) : Script | Jexl2Injection.java:28:9:28:14 | script | provenance | Sink:MaD:5 | +| Jexl2Injection.java:26:43:26:50 | jexlExpr : String | Jexl2Injection.java:26:25:26:51 | createScript(...) : Script | provenance | Config | +| Jexl2Injection.java:31:50:31:64 | jexlExpr : String | Jexl2Injection.java:33:43:33:50 | jexlExpr : String | provenance | | +| Jexl2Injection.java:33:25:33:51 | createScript(...) : Script | Jexl2Injection.java:37:13:37:18 | script | provenance | Sink:MaD:4 | +| Jexl2Injection.java:33:43:33:50 | jexlExpr : String | Jexl2Injection.java:33:25:33:51 | createScript(...) : Script | provenance | Config | +| Jexl2Injection.java:43:57:43:71 | jexlExpr : String | Jexl2Injection.java:45:40:45:47 | jexlExpr | provenance | Sink:MaD:2 | +| Jexl2Injection.java:48:57:48:71 | jexlExpr : String | Jexl2Injection.java:50:40:50:47 | jexlExpr | provenance | Sink:MaD:3 | +| Jexl2Injection.java:53:73:53:87 | jexlExpr : String | Jexl2Injection.java:56:27:56:34 | jexlExpr : String | provenance | | +| Jexl2Injection.java:56:27:56:34 | jexlExpr : String | Jexl2Injection.java:56:9:56:35 | parse(...) | provenance | Config Sink:MaD:6 | +| Jexl2Injection.java:59:72:59:86 | jexlExpr : String | Jexl2Injection.java:62:27:62:34 | jexlExpr : String | provenance | | +| Jexl2Injection.java:62:27:62:34 | jexlExpr : String | Jexl2Injection.java:62:9:62:35 | parse(...) | provenance | Config Sink:MaD:7 | +| Jexl2Injection.java:65:73:65:87 | jexlExpr : String | Jexl2Injection.java:68:36:68:43 | jexlExpr : String | provenance | | +| Jexl2Injection.java:68:36:68:43 | jexlExpr : String | Jexl2Injection.java:68:9:68:44 | createTemplate(...) | provenance | Config Sink:MaD:8 | +| Jexl2Injection.java:75:25:75:47 | getInputStream(...) : InputStream | Jexl2Injection.java:75:54:75:58 | bytes [post update] : byte[] | provenance | Src:MaD:18 MaD:19 | +| Jexl2Injection.java:75:54:75:58 | bytes [post update] : byte[] | Jexl2Injection.java:76:46:76:50 | bytes : byte[] | provenance | | +| Jexl2Injection.java:76:35:76:57 | new String(...) : String | Jexl2Injection.java:77:31:77:38 | jexlExpr : String | provenance | | +| Jexl2Injection.java:76:46:76:50 | bytes : byte[] | Jexl2Injection.java:76:35:76:57 | new String(...) : String | provenance | MaD:20 | +| Jexl2Injection.java:77:31:77:38 | jexlExpr : String | Jexl2Injection.java:85:24:85:56 | jexlExpr : String | provenance | | +| Jexl2Injection.java:77:31:77:38 | jexlExpr : String | Jexl2Injection.java:89:24:89:68 | jexlExpr : String | provenance | | +| Jexl2Injection.java:77:31:77:38 | jexlExpr : String | Jexl2Injection.java:93:24:93:52 | jexlExpr : String | provenance | | +| Jexl2Injection.java:77:31:77:38 | jexlExpr : String | Jexl2Injection.java:97:24:97:63 | jexlExpr : String | provenance | | +| Jexl2Injection.java:77:31:77:38 | jexlExpr : String | Jexl2Injection.java:101:24:101:70 | jexlExpr : String | provenance | | +| Jexl2Injection.java:77:31:77:38 | jexlExpr : String | Jexl2Injection.java:105:24:105:70 | jexlExpr : String | provenance | | +| Jexl2Injection.java:77:31:77:38 | jexlExpr : String | Jexl2Injection.java:109:24:109:86 | jexlExpr : String | provenance | | +| Jexl2Injection.java:77:31:77:38 | jexlExpr : String | Jexl2Injection.java:113:24:113:85 | jexlExpr : String | provenance | | +| Jexl2Injection.java:77:31:77:38 | jexlExpr : String | Jexl2Injection.java:117:24:117:86 | jexlExpr : String | provenance | | +| Jexl2Injection.java:85:24:85:56 | jexlExpr : String | Jexl2Injection.java:10:43:10:57 | jexlExpr : String | provenance | | +| Jexl2Injection.java:85:24:85:56 | jexlExpr : String | Jexl2Injection.java:85:24:85:56 | jexlExpr : String | provenance | | +| Jexl2Injection.java:89:24:89:68 | jexlExpr : String | Jexl2Injection.java:17:55:17:69 | jexlExpr : String | provenance | | +| Jexl2Injection.java:89:24:89:68 | jexlExpr : String | Jexl2Injection.java:89:24:89:68 | jexlExpr : String | provenance | | +| Jexl2Injection.java:93:24:93:52 | jexlExpr : String | Jexl2Injection.java:24:39:24:53 | jexlExpr : String | provenance | | +| Jexl2Injection.java:93:24:93:52 | jexlExpr : String | Jexl2Injection.java:93:24:93:52 | jexlExpr : String | provenance | | +| Jexl2Injection.java:97:24:97:63 | jexlExpr : String | Jexl2Injection.java:31:50:31:64 | jexlExpr : String | provenance | | +| Jexl2Injection.java:97:24:97:63 | jexlExpr : String | Jexl2Injection.java:97:24:97:63 | jexlExpr : String | provenance | | +| Jexl2Injection.java:101:24:101:70 | jexlExpr : String | Jexl2Injection.java:43:57:43:71 | jexlExpr : String | provenance | | +| Jexl2Injection.java:101:24:101:70 | jexlExpr : String | Jexl2Injection.java:101:24:101:70 | jexlExpr : String | provenance | | +| Jexl2Injection.java:105:24:105:70 | jexlExpr : String | Jexl2Injection.java:48:57:48:71 | jexlExpr : String | provenance | | +| Jexl2Injection.java:105:24:105:70 | jexlExpr : String | Jexl2Injection.java:105:24:105:70 | jexlExpr : String | provenance | | +| Jexl2Injection.java:109:24:109:86 | jexlExpr : String | Jexl2Injection.java:53:73:53:87 | jexlExpr : String | provenance | | +| Jexl2Injection.java:109:24:109:86 | jexlExpr : String | Jexl2Injection.java:109:24:109:86 | jexlExpr : String | provenance | | +| Jexl2Injection.java:113:24:113:85 | jexlExpr : String | Jexl2Injection.java:59:72:59:86 | jexlExpr : String | provenance | | +| Jexl2Injection.java:113:24:113:85 | jexlExpr : String | Jexl2Injection.java:113:24:113:85 | jexlExpr : String | provenance | | +| Jexl2Injection.java:117:24:117:86 | jexlExpr : String | Jexl2Injection.java:65:73:65:87 | jexlExpr : String | provenance | | +| Jexl2Injection.java:117:24:117:86 | jexlExpr : String | Jexl2Injection.java:117:24:117:86 | jexlExpr : String | provenance | | +| Jexl3Injection.java:17:43:17:57 | jexlExpr : String | Jexl3Injection.java:19:50:19:57 | jexlExpr : String | provenance | | +| Jexl3Injection.java:19:28:19:58 | createExpression(...) : JexlExpression | Jexl3Injection.java:21:9:21:9 | e | provenance | Sink:MaD:12 | +| Jexl3Injection.java:19:50:19:57 | jexlExpr : String | Jexl3Injection.java:19:28:19:58 | createExpression(...) : JexlExpression | provenance | Config | +| Jexl3Injection.java:24:55:24:69 | jexlExpr : String | Jexl3Injection.java:26:81:26:88 | jexlExpr : String | provenance | | +| Jexl3Injection.java:26:28:26:89 | createExpression(...) : JexlExpression | Jexl3Injection.java:28:9:28:9 | e | provenance | Sink:MaD:12 | +| Jexl3Injection.java:26:81:26:88 | jexlExpr : String | Jexl3Injection.java:26:28:26:89 | createExpression(...) : JexlExpression | provenance | Config | +| Jexl3Injection.java:31:39:31:53 | jexlExpr : String | Jexl3Injection.java:33:47:33:54 | jexlExpr : String | provenance | | +| Jexl3Injection.java:33:29:33:55 | createScript(...) : JexlScript | Jexl3Injection.java:35:9:35:14 | script | provenance | Sink:MaD:14 | +| Jexl3Injection.java:33:47:33:54 | jexlExpr : String | Jexl3Injection.java:33:29:33:55 | createScript(...) : JexlScript | provenance | Config | +| Jexl3Injection.java:38:50:38:64 | jexlExpr : String | Jexl3Injection.java:40:47:40:54 | jexlExpr : String | provenance | | +| Jexl3Injection.java:40:29:40:55 | createScript(...) : JexlScript | Jexl3Injection.java:44:13:44:18 | script | provenance | Sink:MaD:13 | +| Jexl3Injection.java:40:47:40:54 | jexlExpr : String | Jexl3Injection.java:40:29:40:55 | createScript(...) : JexlScript | provenance | Config | +| Jexl3Injection.java:50:57:50:71 | jexlExpr : String | Jexl3Injection.java:52:40:52:47 | jexlExpr | provenance | Sink:MaD:9 | +| Jexl3Injection.java:55:57:55:71 | jexlExpr : String | Jexl3Injection.java:57:40:57:47 | jexlExpr | provenance | Sink:MaD:10 | +| Jexl3Injection.java:60:74:60:88 | jexlExpr : String | Jexl3Injection.java:63:31:63:38 | jexlExpr : String | provenance | | +| Jexl3Injection.java:63:31:63:38 | jexlExpr : String | Jexl3Injection.java:63:9:63:39 | createExpression(...) | provenance | Config Sink:MaD:15 | +| Jexl3Injection.java:66:73:66:87 | jexlExpr : String | Jexl3Injection.java:69:31:69:38 | jexlExpr : String | provenance | | +| Jexl3Injection.java:69:31:69:38 | jexlExpr : String | Jexl3Injection.java:69:9:69:39 | createExpression(...) | provenance | Config Sink:MaD:16 | +| Jexl3Injection.java:72:72:72:86 | jexlExpr : String | Jexl3Injection.java:75:29:75:36 | jexlExpr : String | provenance | | +| Jexl3Injection.java:75:29:75:36 | jexlExpr : String | Jexl3Injection.java:75:9:75:37 | createTemplate(...) | provenance | Config Sink:MaD:17 | +| Jexl3Injection.java:78:54:78:68 | jexlExpr : String | Jexl3Injection.java:80:50:80:57 | jexlExpr : String | provenance | | +| Jexl3Injection.java:80:28:80:58 | createExpression(...) : JexlExpression | Jexl3Injection.java:84:13:84:13 | e | provenance | Sink:MaD:11 | +| Jexl3Injection.java:80:50:80:57 | jexlExpr : String | Jexl3Injection.java:80:28:80:58 | createExpression(...) : JexlExpression | provenance | Config | +| Jexl3Injection.java:94:25:94:47 | getInputStream(...) : InputStream | Jexl3Injection.java:94:54:94:58 | bytes [post update] : byte[] | provenance | Src:MaD:18 MaD:19 | +| Jexl3Injection.java:94:54:94:58 | bytes [post update] : byte[] | Jexl3Injection.java:95:46:95:50 | bytes : byte[] | provenance | | +| Jexl3Injection.java:95:35:95:57 | new String(...) : String | Jexl3Injection.java:96:31:96:38 | jexlExpr : String | provenance | | +| Jexl3Injection.java:95:46:95:50 | bytes : byte[] | Jexl3Injection.java:95:35:95:57 | new String(...) : String | provenance | MaD:20 | +| Jexl3Injection.java:96:31:96:38 | jexlExpr : String | Jexl3Injection.java:104:24:104:56 | jexlExpr : String | provenance | | +| Jexl3Injection.java:96:31:96:38 | jexlExpr : String | Jexl3Injection.java:108:24:108:68 | jexlExpr : String | provenance | | +| Jexl3Injection.java:96:31:96:38 | jexlExpr : String | Jexl3Injection.java:112:24:112:52 | jexlExpr : String | provenance | | +| Jexl3Injection.java:96:31:96:38 | jexlExpr : String | Jexl3Injection.java:116:24:116:63 | jexlExpr : String | provenance | | +| Jexl3Injection.java:96:31:96:38 | jexlExpr : String | Jexl3Injection.java:120:24:120:70 | jexlExpr : String | provenance | | +| Jexl3Injection.java:96:31:96:38 | jexlExpr : String | Jexl3Injection.java:124:24:124:70 | jexlExpr : String | provenance | | +| Jexl3Injection.java:96:31:96:38 | jexlExpr : String | Jexl3Injection.java:128:24:128:87 | jexlExpr : String | provenance | | +| Jexl3Injection.java:96:31:96:38 | jexlExpr : String | Jexl3Injection.java:132:24:132:86 | jexlExpr : String | provenance | | +| Jexl3Injection.java:96:31:96:38 | jexlExpr : String | Jexl3Injection.java:136:24:136:85 | jexlExpr : String | provenance | | +| Jexl3Injection.java:96:31:96:38 | jexlExpr : String | Jexl3Injection.java:140:24:140:67 | jexlExpr : String | provenance | | +| Jexl3Injection.java:104:24:104:56 | jexlExpr : String | Jexl3Injection.java:17:43:17:57 | jexlExpr : String | provenance | | +| Jexl3Injection.java:104:24:104:56 | jexlExpr : String | Jexl3Injection.java:104:24:104:56 | jexlExpr : String | provenance | | +| Jexl3Injection.java:108:24:108:68 | jexlExpr : String | Jexl3Injection.java:24:55:24:69 | jexlExpr : String | provenance | | +| Jexl3Injection.java:108:24:108:68 | jexlExpr : String | Jexl3Injection.java:108:24:108:68 | jexlExpr : String | provenance | | +| Jexl3Injection.java:112:24:112:52 | jexlExpr : String | Jexl3Injection.java:31:39:31:53 | jexlExpr : String | provenance | | +| Jexl3Injection.java:112:24:112:52 | jexlExpr : String | Jexl3Injection.java:112:24:112:52 | jexlExpr : String | provenance | | +| Jexl3Injection.java:116:24:116:63 | jexlExpr : String | Jexl3Injection.java:38:50:38:64 | jexlExpr : String | provenance | | +| Jexl3Injection.java:116:24:116:63 | jexlExpr : String | Jexl3Injection.java:116:24:116:63 | jexlExpr : String | provenance | | +| Jexl3Injection.java:120:24:120:70 | jexlExpr : String | Jexl3Injection.java:50:57:50:71 | jexlExpr : String | provenance | | +| Jexl3Injection.java:120:24:120:70 | jexlExpr : String | Jexl3Injection.java:120:24:120:70 | jexlExpr : String | provenance | | +| Jexl3Injection.java:124:24:124:70 | jexlExpr : String | Jexl3Injection.java:55:57:55:71 | jexlExpr : String | provenance | | +| Jexl3Injection.java:124:24:124:70 | jexlExpr : String | Jexl3Injection.java:124:24:124:70 | jexlExpr : String | provenance | | +| Jexl3Injection.java:128:24:128:87 | jexlExpr : String | Jexl3Injection.java:60:74:60:88 | jexlExpr : String | provenance | | +| Jexl3Injection.java:128:24:128:87 | jexlExpr : String | Jexl3Injection.java:128:24:128:87 | jexlExpr : String | provenance | | +| Jexl3Injection.java:132:24:132:86 | jexlExpr : String | Jexl3Injection.java:66:73:66:87 | jexlExpr : String | provenance | | +| Jexl3Injection.java:132:24:132:86 | jexlExpr : String | Jexl3Injection.java:132:24:132:86 | jexlExpr : String | provenance | | +| Jexl3Injection.java:136:24:136:85 | jexlExpr : String | Jexl3Injection.java:72:72:72:86 | jexlExpr : String | provenance | | +| Jexl3Injection.java:136:24:136:85 | jexlExpr : String | Jexl3Injection.java:136:24:136:85 | jexlExpr : String | provenance | | +| Jexl3Injection.java:140:24:140:67 | jexlExpr : String | Jexl3Injection.java:78:54:78:68 | jexlExpr : String | provenance | | +| Jexl3Injection.java:140:24:140:67 | jexlExpr : String | Jexl3Injection.java:140:24:140:67 | jexlExpr : String | provenance | | +| Jexl3Injection.java:144:85:144:109 | expr : String | Jexl3Injection.java:146:27:146:30 | expr : String | provenance | | +| Jexl3Injection.java:146:27:146:30 | expr : String | Jexl3Injection.java:17:43:17:57 | jexlExpr : String | provenance | | +| Jexl3Injection.java:151:84:151:105 | data : Data | Jexl3Injection.java:153:23:153:26 | data : Data | provenance | | +| Jexl3Injection.java:151:84:151:105 | data : Data | Jexl3Injection.java:154:27:154:30 | expr : String | provenance | SpringUntrustedDataType.getter | +| Jexl3Injection.java:153:23:153:26 | data : Data | Jexl3Injection.java:153:23:153:36 | getExpr(...) : String | provenance | entrypointFieldStep | +| Jexl3Injection.java:153:23:153:26 | data : Data | Jexl3Injection.java:190:23:190:29 | parameter this : Data | provenance | | +| Jexl3Injection.java:153:23:153:36 | getExpr(...) : String | Jexl3Injection.java:154:27:154:30 | expr : String | provenance | | +| Jexl3Injection.java:154:27:154:30 | expr : String | Jexl3Injection.java:17:43:17:57 | jexlExpr : String | provenance | | +| Jexl3Injection.java:161:13:161:52 | customRequest : CustomRequest | Jexl3Injection.java:163:23:163:35 | customRequest : CustomRequest | provenance | | +| Jexl3Injection.java:161:13:161:52 | customRequest : CustomRequest | Jexl3Injection.java:163:23:163:45 | getData(...) : Data | provenance | SpringUntrustedDataType.getter | +| Jexl3Injection.java:161:13:161:52 | customRequest : CustomRequest | Jexl3Injection.java:164:27:164:30 | expr : String | provenance | SpringUntrustedDataType.getter | +| Jexl3Injection.java:163:23:163:35 | customRequest : CustomRequest | Jexl3Injection.java:163:23:163:45 | getData(...) : Data | provenance | entrypointFieldStep | +| Jexl3Injection.java:163:23:163:35 | customRequest : CustomRequest | Jexl3Injection.java:177:21:177:27 | parameter this : CustomRequest | provenance | | +| Jexl3Injection.java:163:23:163:45 | getData(...) : Data | Jexl3Injection.java:163:23:163:55 | getExpr(...) : String | provenance | entrypointFieldStep | +| Jexl3Injection.java:163:23:163:45 | getData(...) : Data | Jexl3Injection.java:164:27:164:30 | expr : String | provenance | SpringUntrustedDataType.getter | +| Jexl3Injection.java:163:23:163:45 | getData(...) : Data | Jexl3Injection.java:190:23:190:29 | parameter this : Data | provenance | | +| Jexl3Injection.java:163:23:163:55 | getExpr(...) : String | Jexl3Injection.java:164:27:164:30 | expr : String | provenance | | +| Jexl3Injection.java:164:27:164:30 | expr : String | Jexl3Injection.java:17:43:17:57 | jexlExpr : String | provenance | | +| Jexl3Injection.java:177:21:177:27 | parameter this : CustomRequest | Jexl3Injection.java:178:20:178:23 | data : Data | provenance | entrypointFieldStep | +| Jexl3Injection.java:190:23:190:29 | parameter this : Data | Jexl3Injection.java:191:20:191:23 | expr : String | provenance | entrypointFieldStep | +models +| 1 | Sink: org.apache.commons.jexl2; Expression; false; evaluate; ; ; Argument[this]; jexl-injection; manual | +| 2 | Sink: org.apache.commons.jexl2; JexlEngine; false; getProperty; (Object,String); ; Argument[1]; jexl-injection; manual | +| 3 | Sink: org.apache.commons.jexl2; JexlEngine; false; setProperty; (Object,String,Object); ; Argument[1]; jexl-injection; manual | +| 4 | Sink: org.apache.commons.jexl2; Script; false; callable; ; ; Argument[this]; jexl-injection; manual | +| 5 | Sink: org.apache.commons.jexl2; Script; false; execute; ; ; Argument[this]; jexl-injection; manual | +| 6 | Sink: org.apache.commons.jexl2; UnifiedJEXL$Expression; false; evaluate; ; ; Argument[this]; jexl-injection; manual | +| 7 | Sink: org.apache.commons.jexl2; UnifiedJEXL$Expression; false; prepare; ; ; Argument[this]; jexl-injection; manual | +| 8 | Sink: org.apache.commons.jexl2; UnifiedJEXL$Template; false; evaluate; ; ; Argument[this]; jexl-injection; manual | +| 9 | Sink: org.apache.commons.jexl3; JexlEngine; false; getProperty; (Object,String); ; Argument[1]; jexl-injection; manual | +| 10 | Sink: org.apache.commons.jexl3; JexlEngine; false; setProperty; (Object,String,Object); ; Argument[1]; jexl-injection; manual | +| 11 | Sink: org.apache.commons.jexl3; JexlExpression; false; callable; ; ; Argument[this]; jexl-injection; manual | +| 12 | Sink: org.apache.commons.jexl3; JexlExpression; false; evaluate; ; ; Argument[this]; jexl-injection; manual | +| 13 | Sink: org.apache.commons.jexl3; JexlScript; false; callable; ; ; Argument[this]; jexl-injection; manual | +| 14 | Sink: org.apache.commons.jexl3; JexlScript; false; execute; ; ; Argument[this]; jexl-injection; manual | +| 15 | Sink: org.apache.commons.jexl3; JxltEngine$Expression; false; evaluate; ; ; Argument[this]; jexl-injection; manual | +| 16 | Sink: org.apache.commons.jexl3; JxltEngine$Expression; false; prepare; ; ; Argument[this]; jexl-injection; manual | +| 17 | Sink: org.apache.commons.jexl3; JxltEngine$Template; false; evaluate; ; ; Argument[this]; jexl-injection; manual | +| 18 | Source: java.net; Socket; false; getInputStream; (); ; ReturnValue; remote; manual | +| 19 | Summary: java.io; InputStream; true; read; (byte[]); ; Argument[this]; Argument[0]; taint; manual | +| 20 | Summary: java.lang; String; false; String; ; ; Argument[0]; Argument[this]; taint; manual | +nodes +| Jexl2Injection.java:10:43:10:57 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl2Injection.java:12:24:12:54 | createExpression(...) : Expression | semmle.label | createExpression(...) : Expression | +| Jexl2Injection.java:12:46:12:53 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl2Injection.java:14:9:14:9 | e | semmle.label | e | +| Jexl2Injection.java:17:55:17:69 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl2Injection.java:19:24:19:86 | createExpression(...) : Expression | semmle.label | createExpression(...) : Expression | +| Jexl2Injection.java:19:46:19:53 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl2Injection.java:21:9:21:9 | e | semmle.label | e | +| Jexl2Injection.java:24:39:24:53 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl2Injection.java:26:25:26:51 | createScript(...) : Script | semmle.label | createScript(...) : Script | +| Jexl2Injection.java:26:43:26:50 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl2Injection.java:28:9:28:14 | script | semmle.label | script | +| Jexl2Injection.java:31:50:31:64 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl2Injection.java:33:25:33:51 | createScript(...) : Script | semmle.label | createScript(...) : Script | +| Jexl2Injection.java:33:43:33:50 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl2Injection.java:37:13:37:18 | script | semmle.label | script | +| Jexl2Injection.java:43:57:43:71 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl2Injection.java:45:40:45:47 | jexlExpr | semmle.label | jexlExpr | +| Jexl2Injection.java:48:57:48:71 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl2Injection.java:50:40:50:47 | jexlExpr | semmle.label | jexlExpr | +| Jexl2Injection.java:53:73:53:87 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl2Injection.java:56:9:56:35 | parse(...) | semmle.label | parse(...) | +| Jexl2Injection.java:56:27:56:34 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl2Injection.java:59:72:59:86 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl2Injection.java:62:9:62:35 | parse(...) | semmle.label | parse(...) | +| Jexl2Injection.java:62:27:62:34 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl2Injection.java:65:73:65:87 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl2Injection.java:68:9:68:44 | createTemplate(...) | semmle.label | createTemplate(...) | +| Jexl2Injection.java:68:36:68:43 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl2Injection.java:75:25:75:47 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| Jexl2Injection.java:75:54:75:58 | bytes [post update] : byte[] | semmle.label | bytes [post update] : byte[] | +| Jexl2Injection.java:76:35:76:57 | new String(...) : String | semmle.label | new String(...) : String | +| Jexl2Injection.java:76:46:76:50 | bytes : byte[] | semmle.label | bytes : byte[] | +| Jexl2Injection.java:77:31:77:38 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl2Injection.java:85:24:85:56 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl2Injection.java:85:24:85:56 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl2Injection.java:89:24:89:68 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl2Injection.java:89:24:89:68 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl2Injection.java:93:24:93:52 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl2Injection.java:93:24:93:52 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl2Injection.java:97:24:97:63 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl2Injection.java:97:24:97:63 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl2Injection.java:101:24:101:70 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl2Injection.java:101:24:101:70 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl2Injection.java:105:24:105:70 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl2Injection.java:105:24:105:70 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl2Injection.java:109:24:109:86 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl2Injection.java:109:24:109:86 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl2Injection.java:113:24:113:85 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl2Injection.java:113:24:113:85 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl2Injection.java:117:24:117:86 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl2Injection.java:117:24:117:86 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl3Injection.java:17:43:17:57 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl3Injection.java:19:28:19:58 | createExpression(...) : JexlExpression | semmle.label | createExpression(...) : JexlExpression | +| Jexl3Injection.java:19:50:19:57 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl3Injection.java:21:9:21:9 | e | semmle.label | e | +| Jexl3Injection.java:24:55:24:69 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl3Injection.java:26:28:26:89 | createExpression(...) : JexlExpression | semmle.label | createExpression(...) : JexlExpression | +| Jexl3Injection.java:26:81:26:88 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl3Injection.java:28:9:28:9 | e | semmle.label | e | +| Jexl3Injection.java:31:39:31:53 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl3Injection.java:33:29:33:55 | createScript(...) : JexlScript | semmle.label | createScript(...) : JexlScript | +| Jexl3Injection.java:33:47:33:54 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl3Injection.java:35:9:35:14 | script | semmle.label | script | +| Jexl3Injection.java:38:50:38:64 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl3Injection.java:40:29:40:55 | createScript(...) : JexlScript | semmle.label | createScript(...) : JexlScript | +| Jexl3Injection.java:40:47:40:54 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl3Injection.java:44:13:44:18 | script | semmle.label | script | +| Jexl3Injection.java:50:57:50:71 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl3Injection.java:52:40:52:47 | jexlExpr | semmle.label | jexlExpr | +| Jexl3Injection.java:55:57:55:71 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl3Injection.java:57:40:57:47 | jexlExpr | semmle.label | jexlExpr | +| Jexl3Injection.java:60:74:60:88 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl3Injection.java:63:9:63:39 | createExpression(...) | semmle.label | createExpression(...) | +| Jexl3Injection.java:63:31:63:38 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl3Injection.java:66:73:66:87 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl3Injection.java:69:9:69:39 | createExpression(...) | semmle.label | createExpression(...) | +| Jexl3Injection.java:69:31:69:38 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl3Injection.java:72:72:72:86 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl3Injection.java:75:9:75:37 | createTemplate(...) | semmle.label | createTemplate(...) | +| Jexl3Injection.java:75:29:75:36 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl3Injection.java:78:54:78:68 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl3Injection.java:80:28:80:58 | createExpression(...) : JexlExpression | semmle.label | createExpression(...) : JexlExpression | +| Jexl3Injection.java:80:50:80:57 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl3Injection.java:84:13:84:13 | e | semmle.label | e | +| Jexl3Injection.java:94:25:94:47 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| Jexl3Injection.java:94:54:94:58 | bytes [post update] : byte[] | semmle.label | bytes [post update] : byte[] | +| Jexl3Injection.java:95:35:95:57 | new String(...) : String | semmle.label | new String(...) : String | +| Jexl3Injection.java:95:46:95:50 | bytes : byte[] | semmle.label | bytes : byte[] | +| Jexl3Injection.java:96:31:96:38 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl3Injection.java:104:24:104:56 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl3Injection.java:104:24:104:56 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl3Injection.java:108:24:108:68 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl3Injection.java:108:24:108:68 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl3Injection.java:112:24:112:52 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl3Injection.java:112:24:112:52 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl3Injection.java:116:24:116:63 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl3Injection.java:116:24:116:63 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl3Injection.java:120:24:120:70 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl3Injection.java:120:24:120:70 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl3Injection.java:124:24:124:70 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl3Injection.java:124:24:124:70 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl3Injection.java:128:24:128:87 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl3Injection.java:128:24:128:87 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl3Injection.java:132:24:132:86 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl3Injection.java:132:24:132:86 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl3Injection.java:136:24:136:85 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl3Injection.java:136:24:136:85 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl3Injection.java:140:24:140:67 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl3Injection.java:140:24:140:67 | jexlExpr : String | semmle.label | jexlExpr : String | +| Jexl3Injection.java:144:85:144:109 | expr : String | semmle.label | expr : String | +| Jexl3Injection.java:146:27:146:30 | expr : String | semmle.label | expr : String | +| Jexl3Injection.java:151:84:151:105 | data : Data | semmle.label | data : Data | +| Jexl3Injection.java:153:23:153:26 | data : Data | semmle.label | data : Data | +| Jexl3Injection.java:153:23:153:36 | getExpr(...) : String | semmle.label | getExpr(...) : String | +| Jexl3Injection.java:154:27:154:30 | expr : String | semmle.label | expr : String | +| Jexl3Injection.java:161:13:161:52 | customRequest : CustomRequest | semmle.label | customRequest : CustomRequest | +| Jexl3Injection.java:163:23:163:35 | customRequest : CustomRequest | semmle.label | customRequest : CustomRequest | +| Jexl3Injection.java:163:23:163:45 | getData(...) : Data | semmle.label | getData(...) : Data | +| Jexl3Injection.java:163:23:163:55 | getExpr(...) : String | semmle.label | getExpr(...) : String | +| Jexl3Injection.java:164:27:164:30 | expr : String | semmle.label | expr : String | +| Jexl3Injection.java:177:21:177:27 | parameter this : CustomRequest | semmle.label | parameter this : CustomRequest | +| Jexl3Injection.java:178:20:178:23 | data : Data | semmle.label | data : Data | +| Jexl3Injection.java:190:23:190:29 | parameter this : Data | semmle.label | parameter this : Data | +| Jexl3Injection.java:191:20:191:23 | expr : String | semmle.label | expr : String | +subpaths +| Jexl3Injection.java:153:23:153:26 | data : Data | Jexl3Injection.java:190:23:190:29 | parameter this : Data | Jexl3Injection.java:191:20:191:23 | expr : String | Jexl3Injection.java:153:23:153:36 | getExpr(...) : String | +| Jexl3Injection.java:163:23:163:35 | customRequest : CustomRequest | Jexl3Injection.java:177:21:177:27 | parameter this : CustomRequest | Jexl3Injection.java:178:20:178:23 | data : Data | Jexl3Injection.java:163:23:163:45 | getData(...) : Data | +| Jexl3Injection.java:163:23:163:45 | getData(...) : Data | Jexl3Injection.java:190:23:190:29 | parameter this : Data | Jexl3Injection.java:191:20:191:23 | expr : String | Jexl3Injection.java:163:23:163:55 | getExpr(...) : String | diff --git a/java/ql/test/query-tests/security/CWE-094/JexlInjection/JexlInjectionTest.qlref b/java/ql/test/query-tests/security/CWE-094/JexlInjection/JexlInjectionTest.qlref new file mode 100644 index 00000000000..a33d55722f6 --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-094/JexlInjection/JexlInjectionTest.qlref @@ -0,0 +1,4 @@ +query: Security/CWE/CWE-094/JexlInjection.ql +postprocess: + - utils/test/PrettyPrintModels.ql + - utils/test/InlineExpectationsTestQuery.ql diff --git a/java/ql/test/query-tests/security/CWE-094/SandboxedJexl2.java b/java/ql/test/query-tests/security/CWE-094/JexlInjection/SandboxedJexl2.java similarity index 100% rename from java/ql/test/query-tests/security/CWE-094/SandboxedJexl2.java rename to java/ql/test/query-tests/security/CWE-094/JexlInjection/SandboxedJexl2.java diff --git a/java/ql/test/query-tests/security/CWE-094/SandboxedJexl3.java b/java/ql/test/query-tests/security/CWE-094/JexlInjection/SandboxedJexl3.java similarity index 100% rename from java/ql/test/query-tests/security/CWE-094/SandboxedJexl3.java rename to java/ql/test/query-tests/security/CWE-094/JexlInjection/SandboxedJexl3.java diff --git a/java/ql/test/query-tests/security/CWE-094/JexlInjection/options b/java/ql/test/query-tests/security/CWE-094/JexlInjection/options new file mode 100644 index 00000000000..d7c8332682b --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-094/JexlInjection/options @@ -0,0 +1 @@ +//semmle-extractor-options: --javac-args -cp ${testdir}/../../../../stubs/validation-api-2.0.1.Final:${testdir}/../../../../stubs/springframework-5.8.x:${testdir}/../../../../stubs/apache-commons-jexl-2.1.1:${testdir}/../../../../stubs/apache-commons-jexl-3.1:${testdir}/../../../../stubs/apache-commons-logging-1.2:${testdir}/../../../../stubs/mvel2-2.4.7:${testdir}/../../../../stubs/groovy-all-3.0.7:${testdir}/../../../../stubs/servlet-api-2.4:${testdir}/../../../../stubs/scriptengine:${testdir}/../../../../stubs/jsr223-api:${testdir}/../../../../stubs/apache-freemarker-2.3.31:${testdir}/../../../../stubs/jinjava-2.6.0:${testdir}/../../../../stubs/pebble-3.1.5:${testdir}/../../../../stubs/thymeleaf-3.0.14:${testdir}/../../../../stubs/apache-velocity-2.3:${testdir}/../../../..//stubs/google-android-9.0.0 diff --git a/java/ql/test/query-tests/security/CWE-094/JexlInjectionTest.expected b/java/ql/test/query-tests/security/CWE-094/JexlInjectionTest.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/java/ql/test/query-tests/security/CWE-094/JexlInjectionTest.ql b/java/ql/test/query-tests/security/CWE-094/JexlInjectionTest.ql deleted file mode 100644 index 0515c0fc75d..00000000000 --- a/java/ql/test/query-tests/security/CWE-094/JexlInjectionTest.ql +++ /dev/null @@ -1,18 +0,0 @@ -import java -import semmle.code.java.security.JexlInjectionQuery -import utils.test.InlineExpectationsTest - -module JexlInjectionTest implements TestSig { - string getARelevantTag() { result = "hasJexlInjection" } - - predicate hasActualResult(Location location, string element, string tag, string value) { - tag = "hasJexlInjection" and - exists(DataFlow::Node sink | JexlInjectionFlow::flowTo(sink) | - sink.getLocation() = location and - element = sink.toString() and - value = "" - ) - } -} - -import MakeTest diff --git a/java/ql/test/query-tests/security/CWE-094/MvelInjection/MvelInjectionTest.expected b/java/ql/test/query-tests/security/CWE-094/MvelInjection/MvelInjectionTest.expected new file mode 100644 index 00000000000..eb2034ab06d --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-094/MvelInjection/MvelInjectionTest.expected @@ -0,0 +1,133 @@ +#select +| MvelInjectionTest.java:24:15:24:26 | read(...) | MvelInjectionTest.java:90:27:90:49 | getInputStream(...) : InputStream | MvelInjectionTest.java:24:15:24:26 | read(...) | MVEL expression depends on a $@. | MvelInjectionTest.java:90:27:90:49 | getInputStream(...) | user-provided value | +| MvelInjectionTest.java:29:28:29:37 | expression | MvelInjectionTest.java:90:27:90:49 | getInputStream(...) : InputStream | MvelInjectionTest.java:29:28:29:37 | expression | MVEL expression depends on a $@. | MvelInjectionTest.java:90:27:90:49 | getInputStream(...) | user-provided value | +| MvelInjectionTest.java:35:5:35:13 | statement | MvelInjectionTest.java:90:27:90:49 | getInputStream(...) : InputStream | MvelInjectionTest.java:35:5:35:13 | statement | MVEL expression depends on a $@. | MvelInjectionTest.java:90:27:90:49 | getInputStream(...) | user-provided value | +| MvelInjectionTest.java:36:5:36:13 | statement | MvelInjectionTest.java:90:27:90:49 | getInputStream(...) : InputStream | MvelInjectionTest.java:36:5:36:13 | statement | MVEL expression depends on a $@. | MvelInjectionTest.java:90:27:90:49 | getInputStream(...) | user-provided value | +| MvelInjectionTest.java:42:5:42:14 | expression | MvelInjectionTest.java:90:27:90:49 | getInputStream(...) : InputStream | MvelInjectionTest.java:42:5:42:14 | expression | MVEL expression depends on a $@. | MvelInjectionTest.java:90:27:90:49 | getInputStream(...) | user-provided value | +| MvelInjectionTest.java:48:5:48:14 | expression | MvelInjectionTest.java:90:27:90:49 | getInputStream(...) : InputStream | MvelInjectionTest.java:48:5:48:14 | expression | MVEL expression depends on a $@. | MvelInjectionTest.java:90:27:90:49 | getInputStream(...) | user-provided value | +| MvelInjectionTest.java:56:5:56:18 | compiledScript | MvelInjectionTest.java:90:27:90:49 | getInputStream(...) : InputStream | MvelInjectionTest.java:56:5:56:18 | compiledScript | MVEL expression depends on a $@. | MvelInjectionTest.java:90:27:90:49 | getInputStream(...) | user-provided value | +| MvelInjectionTest.java:59:21:59:26 | script | MvelInjectionTest.java:90:27:90:49 | getInputStream(...) : InputStream | MvelInjectionTest.java:59:21:59:26 | script | MVEL expression depends on a $@. | MvelInjectionTest.java:90:27:90:49 | getInputStream(...) | user-provided value | +| MvelInjectionTest.java:67:5:67:10 | script | MvelInjectionTest.java:90:27:90:49 | getInputStream(...) : InputStream | MvelInjectionTest.java:67:5:67:10 | script | MVEL expression depends on a $@. | MvelInjectionTest.java:90:27:90:49 | getInputStream(...) | user-provided value | +| MvelInjectionTest.java:71:26:71:37 | read(...) | MvelInjectionTest.java:90:27:90:49 | getInputStream(...) : InputStream | MvelInjectionTest.java:71:26:71:37 | read(...) | MVEL expression depends on a $@. | MvelInjectionTest.java:90:27:90:49 | getInputStream(...) | user-provided value | +| MvelInjectionTest.java:75:29:75:74 | compileTemplate(...) | MvelInjectionTest.java:90:27:90:49 | getInputStream(...) : InputStream | MvelInjectionTest.java:75:29:75:74 | compileTemplate(...) | MVEL expression depends on a $@. | MvelInjectionTest.java:90:27:90:49 | getInputStream(...) | user-provided value | +| MvelInjectionTest.java:80:29:80:46 | compile(...) | MvelInjectionTest.java:90:27:90:49 | getInputStream(...) : InputStream | MvelInjectionTest.java:80:29:80:46 | compile(...) | MVEL expression depends on a $@. | MvelInjectionTest.java:90:27:90:49 | getInputStream(...) | user-provided value | +| MvelInjectionTest.java:86:32:86:41 | expression | MvelInjectionTest.java:90:27:90:49 | getInputStream(...) : InputStream | MvelInjectionTest.java:86:32:86:41 | expression | MVEL expression depends on a $@. | MvelInjectionTest.java:90:27:90:49 | getInputStream(...) | user-provided value | +edges +| MvelInjectionTest.java:28:31:28:66 | compileExpression(...) : Serializable | MvelInjectionTest.java:29:28:29:37 | expression | provenance | Sink:MaD:11 | +| MvelInjectionTest.java:28:54:28:65 | read(...) : String | MvelInjectionTest.java:28:31:28:66 | compileExpression(...) : Serializable | provenance | Config | +| MvelInjectionTest.java:33:35:33:70 | new ExpressionCompiler(...) : ExpressionCompiler | MvelInjectionTest.java:34:37:34:44 | compiler : ExpressionCompiler | provenance | | +| MvelInjectionTest.java:33:58:33:69 | read(...) : String | MvelInjectionTest.java:33:35:33:70 | new ExpressionCompiler(...) : ExpressionCompiler | provenance | Config | +| MvelInjectionTest.java:34:37:34:44 | compiler : ExpressionCompiler | MvelInjectionTest.java:34:37:34:54 | compile(...) : CompiledExpression | provenance | Config | +| MvelInjectionTest.java:34:37:34:54 | compile(...) : CompiledExpression | MvelInjectionTest.java:35:5:35:13 | statement | provenance | Sink:MaD:5 | +| MvelInjectionTest.java:34:37:34:54 | compile(...) : CompiledExpression | MvelInjectionTest.java:36:5:36:13 | statement | provenance | Sink:MaD:2 | +| MvelInjectionTest.java:40:35:40:70 | new ExpressionCompiler(...) : ExpressionCompiler | MvelInjectionTest.java:41:37:41:44 | compiler : ExpressionCompiler | provenance | | +| MvelInjectionTest.java:40:58:40:69 | read(...) : String | MvelInjectionTest.java:40:35:40:70 | new ExpressionCompiler(...) : ExpressionCompiler | provenance | Config | +| MvelInjectionTest.java:41:37:41:44 | compiler : ExpressionCompiler | MvelInjectionTest.java:41:37:41:54 | compile(...) : CompiledExpression | provenance | Config | +| MvelInjectionTest.java:41:37:41:54 | compile(...) : CompiledExpression | MvelInjectionTest.java:42:5:42:14 | expression | provenance | Sink:MaD:4 | +| MvelInjectionTest.java:47:9:47:96 | new CompiledAccExpression(...) : CompiledAccExpression | MvelInjectionTest.java:48:5:48:14 | expression | provenance | Sink:MaD:3 | +| MvelInjectionTest.java:47:35:47:46 | read(...) : String | MvelInjectionTest.java:47:35:47:60 | toCharArray(...) : char[] | provenance | MaD:16 | +| MvelInjectionTest.java:47:35:47:60 | toCharArray(...) : char[] | MvelInjectionTest.java:47:9:47:96 | new CompiledAccExpression(...) : CompiledAccExpression | provenance | Config | +| MvelInjectionTest.java:52:20:52:31 | read(...) : String | MvelInjectionTest.java:55:52:55:56 | input : String | provenance | | +| MvelInjectionTest.java:55:37:55:57 | compile(...) : CompiledScript | MvelInjectionTest.java:56:5:56:18 | compiledScript | provenance | Sink:MaD:1 | +| MvelInjectionTest.java:55:52:55:56 | input : String | MvelInjectionTest.java:55:37:55:57 | compile(...) : CompiledScript | provenance | Config | +| MvelInjectionTest.java:55:52:55:56 | input : String | MvelInjectionTest.java:58:49:58:53 | input : String | provenance | | +| MvelInjectionTest.java:58:27:58:54 | compiledScript(...) : Serializable | MvelInjectionTest.java:59:21:59:26 | script | provenance | Sink:MaD:7 | +| MvelInjectionTest.java:58:49:58:53 | input : String | MvelInjectionTest.java:58:27:58:54 | compiledScript(...) : Serializable | provenance | Config | +| MvelInjectionTest.java:64:35:64:70 | new ExpressionCompiler(...) : ExpressionCompiler | MvelInjectionTest.java:65:37:65:44 | compiler : ExpressionCompiler | provenance | | +| MvelInjectionTest.java:64:58:64:69 | read(...) : String | MvelInjectionTest.java:64:35:64:70 | new ExpressionCompiler(...) : ExpressionCompiler | provenance | Config | +| MvelInjectionTest.java:65:37:65:44 | compiler : ExpressionCompiler | MvelInjectionTest.java:65:37:65:54 | compile(...) : CompiledExpression | provenance | Config | +| MvelInjectionTest.java:65:37:65:54 | compile(...) : CompiledExpression | MvelInjectionTest.java:66:64:66:72 | statement : CompiledExpression | provenance | | +| MvelInjectionTest.java:66:33:66:73 | new MvelCompiledScript(...) : MvelCompiledScript | MvelInjectionTest.java:67:5:67:10 | script | provenance | Sink:MaD:6 | +| MvelInjectionTest.java:66:64:66:72 | statement : CompiledExpression | MvelInjectionTest.java:66:33:66:73 | new MvelCompiledScript(...) : MvelCompiledScript | provenance | Config | +| MvelInjectionTest.java:75:62:75:73 | read(...) : String | MvelInjectionTest.java:75:29:75:74 | compileTemplate(...) | provenance | Config Sink:MaD:9 | +| MvelInjectionTest.java:79:33:79:66 | new TemplateCompiler(...) : TemplateCompiler | MvelInjectionTest.java:80:29:80:36 | compiler : TemplateCompiler | provenance | | +| MvelInjectionTest.java:79:54:79:65 | read(...) : String | MvelInjectionTest.java:79:33:79:66 | new TemplateCompiler(...) : TemplateCompiler | provenance | Config | +| MvelInjectionTest.java:80:29:80:36 | compiler : TemplateCompiler | MvelInjectionTest.java:80:29:80:46 | compile(...) | provenance | Config Sink:MaD:9 | +| MvelInjectionTest.java:84:35:84:70 | new ExpressionCompiler(...) : ExpressionCompiler | MvelInjectionTest.java:85:37:85:44 | compiler : ExpressionCompiler | provenance | | +| MvelInjectionTest.java:84:58:84:69 | read(...) : String | MvelInjectionTest.java:84:35:84:70 | new ExpressionCompiler(...) : ExpressionCompiler | provenance | Config | +| MvelInjectionTest.java:85:37:85:44 | compiler : ExpressionCompiler | MvelInjectionTest.java:85:37:85:54 | compile(...) : CompiledExpression | provenance | Config | +| MvelInjectionTest.java:85:37:85:54 | compile(...) : CompiledExpression | MvelInjectionTest.java:86:32:86:41 | expression | provenance | Sink:MaD:12 | +| MvelInjectionTest.java:90:27:90:49 | getInputStream(...) : InputStream | MvelInjectionTest.java:92:15:92:16 | is : InputStream | provenance | Src:MaD:13 | +| MvelInjectionTest.java:92:15:92:16 | is : InputStream | MvelInjectionTest.java:92:23:92:27 | bytes [post update] : byte[] | provenance | MaD:14 | +| MvelInjectionTest.java:92:23:92:27 | bytes [post update] : byte[] | MvelInjectionTest.java:93:25:93:29 | bytes : byte[] | provenance | | +| MvelInjectionTest.java:93:14:93:36 | new String(...) : String | MvelInjectionTest.java:24:15:24:26 | read(...) | provenance | Sink:MaD:10 | +| MvelInjectionTest.java:93:14:93:36 | new String(...) : String | MvelInjectionTest.java:28:54:28:65 | read(...) : String | provenance | | +| MvelInjectionTest.java:93:14:93:36 | new String(...) : String | MvelInjectionTest.java:33:58:33:69 | read(...) : String | provenance | | +| MvelInjectionTest.java:93:14:93:36 | new String(...) : String | MvelInjectionTest.java:40:58:40:69 | read(...) : String | provenance | | +| MvelInjectionTest.java:93:14:93:36 | new String(...) : String | MvelInjectionTest.java:47:35:47:46 | read(...) : String | provenance | | +| MvelInjectionTest.java:93:14:93:36 | new String(...) : String | MvelInjectionTest.java:52:20:52:31 | read(...) : String | provenance | | +| MvelInjectionTest.java:93:14:93:36 | new String(...) : String | MvelInjectionTest.java:64:58:64:69 | read(...) : String | provenance | | +| MvelInjectionTest.java:93:14:93:36 | new String(...) : String | MvelInjectionTest.java:71:26:71:37 | read(...) | provenance | Sink:MaD:8 | +| MvelInjectionTest.java:93:14:93:36 | new String(...) : String | MvelInjectionTest.java:75:62:75:73 | read(...) : String | provenance | | +| MvelInjectionTest.java:93:14:93:36 | new String(...) : String | MvelInjectionTest.java:79:54:79:65 | read(...) : String | provenance | | +| MvelInjectionTest.java:93:14:93:36 | new String(...) : String | MvelInjectionTest.java:84:58:84:69 | read(...) : String | provenance | | +| MvelInjectionTest.java:93:25:93:29 | bytes : byte[] | MvelInjectionTest.java:93:14:93:36 | new String(...) : String | provenance | MaD:15 | +models +| 1 | Sink: javax.script; CompiledScript; false; eval; ; ; Argument[this]; mvel-injection; manual | +| 2 | Sink: org.mvel2.compiler; Accessor; false; getValue; ; ; Argument[this]; mvel-injection; manual | +| 3 | Sink: org.mvel2.compiler; CompiledAccExpression; false; getValue; ; ; Argument[this]; mvel-injection; manual | +| 4 | Sink: org.mvel2.compiler; CompiledExpression; false; getDirectValue; ; ; Argument[this]; mvel-injection; manual | +| 5 | Sink: org.mvel2.compiler; ExecutableStatement; false; getValue; ; ; Argument[this]; mvel-injection; manual | +| 6 | Sink: org.mvel2.jsr223; MvelCompiledScript; false; eval; ; ; Argument[this]; mvel-injection; manual | +| 7 | Sink: org.mvel2.jsr223; MvelScriptEngine; false; evaluate; ; ; Argument[0]; mvel-injection; manual | +| 8 | Sink: org.mvel2.templates; TemplateRuntime; false; eval; ; ; Argument[0]; mvel-injection; manual | +| 9 | Sink: org.mvel2.templates; TemplateRuntime; false; execute; ; ; Argument[0]; mvel-injection; manual | +| 10 | Sink: org.mvel2; MVEL; false; eval; ; ; Argument[0]; mvel-injection; manual | +| 11 | Sink: org.mvel2; MVEL; false; executeExpression; ; ; Argument[0]; mvel-injection; manual | +| 12 | Sink: org.mvel2; MVELRuntime; false; execute; ; ; Argument[1]; mvel-injection; manual | +| 13 | Source: java.net; Socket; false; getInputStream; (); ; ReturnValue; remote; manual | +| 14 | Summary: java.io; InputStream; true; read; (byte[]); ; Argument[this]; Argument[0]; taint; manual | +| 15 | Summary: java.lang; String; false; String; ; ; Argument[0]; Argument[this]; taint; manual | +| 16 | Summary: java.lang; String; false; toCharArray; ; ; Argument[this]; ReturnValue; taint; manual | +nodes +| MvelInjectionTest.java:24:15:24:26 | read(...) | semmle.label | read(...) | +| MvelInjectionTest.java:28:31:28:66 | compileExpression(...) : Serializable | semmle.label | compileExpression(...) : Serializable | +| MvelInjectionTest.java:28:54:28:65 | read(...) : String | semmle.label | read(...) : String | +| MvelInjectionTest.java:29:28:29:37 | expression | semmle.label | expression | +| MvelInjectionTest.java:33:35:33:70 | new ExpressionCompiler(...) : ExpressionCompiler | semmle.label | new ExpressionCompiler(...) : ExpressionCompiler | +| MvelInjectionTest.java:33:58:33:69 | read(...) : String | semmle.label | read(...) : String | +| MvelInjectionTest.java:34:37:34:44 | compiler : ExpressionCompiler | semmle.label | compiler : ExpressionCompiler | +| MvelInjectionTest.java:34:37:34:54 | compile(...) : CompiledExpression | semmle.label | compile(...) : CompiledExpression | +| MvelInjectionTest.java:35:5:35:13 | statement | semmle.label | statement | +| MvelInjectionTest.java:36:5:36:13 | statement | semmle.label | statement | +| MvelInjectionTest.java:40:35:40:70 | new ExpressionCompiler(...) : ExpressionCompiler | semmle.label | new ExpressionCompiler(...) : ExpressionCompiler | +| MvelInjectionTest.java:40:58:40:69 | read(...) : String | semmle.label | read(...) : String | +| MvelInjectionTest.java:41:37:41:44 | compiler : ExpressionCompiler | semmle.label | compiler : ExpressionCompiler | +| MvelInjectionTest.java:41:37:41:54 | compile(...) : CompiledExpression | semmle.label | compile(...) : CompiledExpression | +| MvelInjectionTest.java:42:5:42:14 | expression | semmle.label | expression | +| MvelInjectionTest.java:47:9:47:96 | new CompiledAccExpression(...) : CompiledAccExpression | semmle.label | new CompiledAccExpression(...) : CompiledAccExpression | +| MvelInjectionTest.java:47:35:47:46 | read(...) : String | semmle.label | read(...) : String | +| MvelInjectionTest.java:47:35:47:60 | toCharArray(...) : char[] | semmle.label | toCharArray(...) : char[] | +| MvelInjectionTest.java:48:5:48:14 | expression | semmle.label | expression | +| MvelInjectionTest.java:52:20:52:31 | read(...) : String | semmle.label | read(...) : String | +| MvelInjectionTest.java:55:37:55:57 | compile(...) : CompiledScript | semmle.label | compile(...) : CompiledScript | +| MvelInjectionTest.java:55:52:55:56 | input : String | semmle.label | input : String | +| MvelInjectionTest.java:56:5:56:18 | compiledScript | semmle.label | compiledScript | +| MvelInjectionTest.java:58:27:58:54 | compiledScript(...) : Serializable | semmle.label | compiledScript(...) : Serializable | +| MvelInjectionTest.java:58:49:58:53 | input : String | semmle.label | input : String | +| MvelInjectionTest.java:59:21:59:26 | script | semmle.label | script | +| MvelInjectionTest.java:64:35:64:70 | new ExpressionCompiler(...) : ExpressionCompiler | semmle.label | new ExpressionCompiler(...) : ExpressionCompiler | +| MvelInjectionTest.java:64:58:64:69 | read(...) : String | semmle.label | read(...) : String | +| MvelInjectionTest.java:65:37:65:44 | compiler : ExpressionCompiler | semmle.label | compiler : ExpressionCompiler | +| MvelInjectionTest.java:65:37:65:54 | compile(...) : CompiledExpression | semmle.label | compile(...) : CompiledExpression | +| MvelInjectionTest.java:66:33:66:73 | new MvelCompiledScript(...) : MvelCompiledScript | semmle.label | new MvelCompiledScript(...) : MvelCompiledScript | +| MvelInjectionTest.java:66:64:66:72 | statement : CompiledExpression | semmle.label | statement : CompiledExpression | +| MvelInjectionTest.java:67:5:67:10 | script | semmle.label | script | +| MvelInjectionTest.java:71:26:71:37 | read(...) | semmle.label | read(...) | +| MvelInjectionTest.java:75:29:75:74 | compileTemplate(...) | semmle.label | compileTemplate(...) | +| MvelInjectionTest.java:75:62:75:73 | read(...) : String | semmle.label | read(...) : String | +| MvelInjectionTest.java:79:33:79:66 | new TemplateCompiler(...) : TemplateCompiler | semmle.label | new TemplateCompiler(...) : TemplateCompiler | +| MvelInjectionTest.java:79:54:79:65 | read(...) : String | semmle.label | read(...) : String | +| MvelInjectionTest.java:80:29:80:36 | compiler : TemplateCompiler | semmle.label | compiler : TemplateCompiler | +| MvelInjectionTest.java:80:29:80:46 | compile(...) | semmle.label | compile(...) | +| MvelInjectionTest.java:84:35:84:70 | new ExpressionCompiler(...) : ExpressionCompiler | semmle.label | new ExpressionCompiler(...) : ExpressionCompiler | +| MvelInjectionTest.java:84:58:84:69 | read(...) : String | semmle.label | read(...) : String | +| MvelInjectionTest.java:85:37:85:44 | compiler : ExpressionCompiler | semmle.label | compiler : ExpressionCompiler | +| MvelInjectionTest.java:85:37:85:54 | compile(...) : CompiledExpression | semmle.label | compile(...) : CompiledExpression | +| MvelInjectionTest.java:86:32:86:41 | expression | semmle.label | expression | +| MvelInjectionTest.java:90:27:90:49 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| MvelInjectionTest.java:92:15:92:16 | is : InputStream | semmle.label | is : InputStream | +| MvelInjectionTest.java:92:23:92:27 | bytes [post update] : byte[] | semmle.label | bytes [post update] : byte[] | +| MvelInjectionTest.java:93:14:93:36 | new String(...) : String | semmle.label | new String(...) : String | +| MvelInjectionTest.java:93:25:93:29 | bytes : byte[] | semmle.label | bytes : byte[] | +subpaths diff --git a/java/ql/test/query-tests/security/CWE-094/MvelInjectionTest.java b/java/ql/test/query-tests/security/CWE-094/MvelInjection/MvelInjectionTest.java similarity index 84% rename from java/ql/test/query-tests/security/CWE-094/MvelInjectionTest.java rename to java/ql/test/query-tests/security/CWE-094/MvelInjection/MvelInjectionTest.java index 4013246eecd..4e6738dbfd9 100644 --- a/java/ql/test/query-tests/security/CWE-094/MvelInjectionTest.java +++ b/java/ql/test/query-tests/security/CWE-094/MvelInjection/MvelInjectionTest.java @@ -21,31 +21,31 @@ import org.mvel2.templates.TemplateRuntime; public class MvelInjectionTest { public static void testWithMvelEval(Socket socket) throws IOException { - MVEL.eval(read(socket)); // $hasMvelInjection + MVEL.eval(read(socket)); // $ Alert } public static void testWithMvelCompileAndExecute(Socket socket) throws IOException { Serializable expression = MVEL.compileExpression(read(socket)); - MVEL.executeExpression(expression); // $hasMvelInjection + MVEL.executeExpression(expression); // $ Alert } public static void testWithExpressionCompiler(Socket socket) throws IOException { ExpressionCompiler compiler = new ExpressionCompiler(read(socket)); ExecutableStatement statement = compiler.compile(); - statement.getValue(new Object(), new ImmutableDefaultFactory()); // $hasMvelInjection - statement.getValue(new Object(), new Object(), new ImmutableDefaultFactory()); // $hasMvelInjection + statement.getValue(new Object(), new ImmutableDefaultFactory()); // $ Alert + statement.getValue(new Object(), new Object(), new ImmutableDefaultFactory()); // $ Alert } public static void testWithCompiledExpressionGetDirectValue(Socket socket) throws IOException { ExpressionCompiler compiler = new ExpressionCompiler(read(socket)); CompiledExpression expression = compiler.compile(); - expression.getDirectValue(new Object(), new ImmutableDefaultFactory()); // $hasMvelInjection + expression.getDirectValue(new Object(), new ImmutableDefaultFactory()); // $ Alert } public static void testCompiledAccExpressionGetValue(Socket socket) throws IOException { CompiledAccExpression expression = new CompiledAccExpression(read(socket).toCharArray(), Object.class, new ParserContext()); - expression.getValue(new Object(), new ImmutableDefaultFactory()); // $hasMvelInjection + expression.getValue(new Object(), new ImmutableDefaultFactory()); // $ Alert } public static void testMvelScriptEngineCompileAndEvaluate(Socket socket) throws Exception { @@ -53,10 +53,10 @@ public class MvelInjectionTest { MvelScriptEngine engine = new MvelScriptEngine(); CompiledScript compiledScript = engine.compile(input); - compiledScript.eval(); // $hasMvelInjection + compiledScript.eval(); // $ Alert Serializable script = engine.compiledScript(input); - engine.evaluate(script, new SimpleScriptContext()); // $hasMvelInjection + engine.evaluate(script, new SimpleScriptContext()); // $ Alert } public static void testMvelCompiledScriptCompileAndEvaluate(Socket socket) throws Exception { @@ -64,30 +64,30 @@ public class MvelInjectionTest { ExpressionCompiler compiler = new ExpressionCompiler(read(socket)); ExecutableStatement statement = compiler.compile(); MvelCompiledScript script = new MvelCompiledScript(engine, statement); - script.eval(new SimpleScriptContext()); // $hasMvelInjection + script.eval(new SimpleScriptContext()); // $ Alert } public static void testTemplateRuntimeEval(Socket socket) throws Exception { - TemplateRuntime.eval(read(socket), new HashMap()); // $hasMvelInjection + TemplateRuntime.eval(read(socket), new HashMap()); // $ Alert } public static void testTemplateRuntimeCompileTemplateAndExecute(Socket socket) throws Exception { - TemplateRuntime.execute(TemplateCompiler.compileTemplate(read(socket)), new HashMap()); // $hasMvelInjection + TemplateRuntime.execute(TemplateCompiler.compileTemplate(read(socket)), new HashMap()); // $ Alert } public static void testTemplateRuntimeCompileAndExecute(Socket socket) throws Exception { TemplateCompiler compiler = new TemplateCompiler(read(socket)); - TemplateRuntime.execute(compiler.compile(), new HashMap()); // $hasMvelInjection + TemplateRuntime.execute(compiler.compile(), new HashMap()); // $ Alert } public static void testMvelRuntimeExecute(Socket socket) throws Exception { ExpressionCompiler compiler = new ExpressionCompiler(read(socket)); CompiledExpression expression = compiler.compile(); - MVELRuntime.execute(false, expression, new Object(), new ImmutableDefaultFactory()); // $hasMvelInjection + MVELRuntime.execute(false, expression, new Object(), new ImmutableDefaultFactory()); // $ Alert } public static String read(Socket socket) throws IOException { - try (InputStream is = socket.getInputStream()) { + try (InputStream is = socket.getInputStream()) { // $ Source byte[] bytes = new byte[1024]; int n = is.read(bytes); return new String(bytes, 0, n); diff --git a/java/ql/test/query-tests/security/CWE-094/MvelInjection/MvelInjectionTest.qlref b/java/ql/test/query-tests/security/CWE-094/MvelInjection/MvelInjectionTest.qlref new file mode 100644 index 00000000000..9236766fe8c --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-094/MvelInjection/MvelInjectionTest.qlref @@ -0,0 +1,4 @@ +query: Security/CWE/CWE-094/MvelInjection.ql +postprocess: + - utils/test/PrettyPrintModels.ql + - utils/test/InlineExpectationsTestQuery.ql diff --git a/java/ql/test/query-tests/security/CWE-094/MvelInjection/options b/java/ql/test/query-tests/security/CWE-094/MvelInjection/options new file mode 100644 index 00000000000..d7c8332682b --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-094/MvelInjection/options @@ -0,0 +1 @@ +//semmle-extractor-options: --javac-args -cp ${testdir}/../../../../stubs/validation-api-2.0.1.Final:${testdir}/../../../../stubs/springframework-5.8.x:${testdir}/../../../../stubs/apache-commons-jexl-2.1.1:${testdir}/../../../../stubs/apache-commons-jexl-3.1:${testdir}/../../../../stubs/apache-commons-logging-1.2:${testdir}/../../../../stubs/mvel2-2.4.7:${testdir}/../../../../stubs/groovy-all-3.0.7:${testdir}/../../../../stubs/servlet-api-2.4:${testdir}/../../../../stubs/scriptengine:${testdir}/../../../../stubs/jsr223-api:${testdir}/../../../../stubs/apache-freemarker-2.3.31:${testdir}/../../../../stubs/jinjava-2.6.0:${testdir}/../../../../stubs/pebble-3.1.5:${testdir}/../../../../stubs/thymeleaf-3.0.14:${testdir}/../../../../stubs/apache-velocity-2.3:${testdir}/../../../..//stubs/google-android-9.0.0 diff --git a/java/ql/test/query-tests/security/CWE-094/MvelInjectionTest.expected b/java/ql/test/query-tests/security/CWE-094/MvelInjectionTest.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/java/ql/test/query-tests/security/CWE-094/MvelInjectionTest.ql b/java/ql/test/query-tests/security/CWE-094/MvelInjectionTest.ql deleted file mode 100644 index 08dc091898c..00000000000 --- a/java/ql/test/query-tests/security/CWE-094/MvelInjectionTest.ql +++ /dev/null @@ -1,20 +0,0 @@ -import java -import semmle.code.java.dataflow.TaintTracking -import semmle.code.java.dataflow.FlowSources -import semmle.code.java.security.MvelInjectionQuery -import utils.test.InlineExpectationsTest - -module HasMvelInjectionTest implements TestSig { - string getARelevantTag() { result = "hasMvelInjection" } - - predicate hasActualResult(Location location, string element, string tag, string value) { - tag = "hasMvelInjection" and - exists(DataFlow::Node sink | MvelInjectionFlow::flowTo(sink) | - sink.getLocation() = location and - element = sink.toString() and - value = "" - ) - } -} - -import MakeTest diff --git a/java/ql/test/query-tests/security/CWE-094/SpelInjection/SpelInjectionTest.expected b/java/ql/test/query-tests/security/CWE-094/SpelInjection/SpelInjectionTest.expected new file mode 100644 index 00000000000..37df514bac5 --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-094/SpelInjection/SpelInjectionTest.expected @@ -0,0 +1,120 @@ +#select +| SpelInjectionTest.java:24:5:24:14 | expression | SpelInjectionTest.java:16:22:16:44 | getInputStream(...) : InputStream | SpelInjectionTest.java:24:5:24:14 | expression | SpEL expression depends on a $@. | SpelInjectionTest.java:16:22:16:44 | getInputStream(...) | user-provided value | +| SpelInjectionTest.java:35:5:35:14 | expression | SpelInjectionTest.java:28:22:28:44 | getInputStream(...) : InputStream | SpelInjectionTest.java:35:5:35:14 | expression | SpEL expression depends on a $@. | SpelInjectionTest.java:28:22:28:44 | getInputStream(...) | user-provided value | +| SpelInjectionTest.java:46:5:46:14 | expression | SpelInjectionTest.java:39:22:39:44 | getInputStream(...) : InputStream | SpelInjectionTest.java:46:5:46:14 | expression | SpEL expression depends on a $@. | SpelInjectionTest.java:39:22:39:44 | getInputStream(...) | user-provided value | +| SpelInjectionTest.java:60:5:60:14 | expression | SpelInjectionTest.java:50:22:50:44 | getInputStream(...) : InputStream | SpelInjectionTest.java:60:5:60:14 | expression | SpEL expression depends on a $@. | SpelInjectionTest.java:50:22:50:44 | getInputStream(...) | user-provided value | +| SpelInjectionTest.java:71:5:71:14 | expression | SpelInjectionTest.java:64:22:64:44 | getInputStream(...) : InputStream | SpelInjectionTest.java:71:5:71:14 | expression | SpEL expression depends on a $@. | SpelInjectionTest.java:64:22:64:44 | getInputStream(...) | user-provided value | +| SpelInjectionTest.java:82:5:82:14 | expression | SpelInjectionTest.java:75:22:75:44 | getInputStream(...) : InputStream | SpelInjectionTest.java:82:5:82:14 | expression | SpEL expression depends on a $@. | SpelInjectionTest.java:75:22:75:44 | getInputStream(...) | user-provided value | +| SpelInjectionTest.java:95:5:95:14 | expression | SpelInjectionTest.java:86:22:86:44 | getInputStream(...) : InputStream | SpelInjectionTest.java:95:5:95:14 | expression | SpEL expression depends on a $@. | SpelInjectionTest.java:86:22:86:44 | getInputStream(...) | user-provided value | +edges +| SpelInjectionTest.java:16:22:16:44 | getInputStream(...) : InputStream | SpelInjectionTest.java:19:13:19:14 | in : InputStream | provenance | Src:MaD:1 | +| SpelInjectionTest.java:19:13:19:14 | in : InputStream | SpelInjectionTest.java:19:21:19:25 | bytes [post update] : byte[] | provenance | MaD:2 | +| SpelInjectionTest.java:19:21:19:25 | bytes [post update] : byte[] | SpelInjectionTest.java:20:31:20:35 | bytes : byte[] | provenance | | +| SpelInjectionTest.java:20:20:20:42 | new String(...) : String | SpelInjectionTest.java:23:52:23:56 | input : String | provenance | | +| SpelInjectionTest.java:20:31:20:35 | bytes : byte[] | SpelInjectionTest.java:20:20:20:42 | new String(...) : String | provenance | MaD:3 | +| SpelInjectionTest.java:23:29:23:57 | parseExpression(...) : Expression | SpelInjectionTest.java:24:5:24:14 | expression | provenance | | +| SpelInjectionTest.java:23:52:23:56 | input : String | SpelInjectionTest.java:23:29:23:57 | parseExpression(...) : Expression | provenance | Config | +| SpelInjectionTest.java:28:22:28:44 | getInputStream(...) : InputStream | SpelInjectionTest.java:31:13:31:14 | in : InputStream | provenance | Src:MaD:1 | +| SpelInjectionTest.java:31:13:31:14 | in : InputStream | SpelInjectionTest.java:31:21:31:25 | bytes [post update] : byte[] | provenance | MaD:2 | +| SpelInjectionTest.java:31:21:31:25 | bytes [post update] : byte[] | SpelInjectionTest.java:32:31:32:35 | bytes : byte[] | provenance | | +| SpelInjectionTest.java:32:20:32:42 | new String(...) : String | SpelInjectionTest.java:34:49:34:53 | input : String | provenance | | +| SpelInjectionTest.java:32:31:32:35 | bytes : byte[] | SpelInjectionTest.java:32:20:32:42 | new String(...) : String | provenance | MaD:3 | +| SpelInjectionTest.java:34:33:34:54 | parseRaw(...) : SpelExpression | SpelInjectionTest.java:35:5:35:14 | expression | provenance | | +| SpelInjectionTest.java:34:49:34:53 | input : String | SpelInjectionTest.java:34:33:34:54 | parseRaw(...) : SpelExpression | provenance | Config | +| SpelInjectionTest.java:39:22:39:44 | getInputStream(...) : InputStream | SpelInjectionTest.java:42:13:42:14 | in : InputStream | provenance | Src:MaD:1 | +| SpelInjectionTest.java:42:13:42:14 | in : InputStream | SpelInjectionTest.java:42:21:42:25 | bytes [post update] : byte[] | provenance | MaD:2 | +| SpelInjectionTest.java:42:21:42:25 | bytes [post update] : byte[] | SpelInjectionTest.java:43:31:43:35 | bytes : byte[] | provenance | | +| SpelInjectionTest.java:43:20:43:42 | new String(...) : String | SpelInjectionTest.java:45:72:45:76 | input : String | provenance | | +| SpelInjectionTest.java:43:31:43:35 | bytes : byte[] | SpelInjectionTest.java:43:20:43:42 | new String(...) : String | provenance | MaD:3 | +| SpelInjectionTest.java:45:29:45:77 | parseExpression(...) : Expression | SpelInjectionTest.java:46:5:46:14 | expression | provenance | | +| SpelInjectionTest.java:45:72:45:76 | input : String | SpelInjectionTest.java:45:29:45:77 | parseExpression(...) : Expression | provenance | Config | +| SpelInjectionTest.java:50:22:50:44 | getInputStream(...) : InputStream | SpelInjectionTest.java:53:13:53:14 | in : InputStream | provenance | Src:MaD:1 | +| SpelInjectionTest.java:53:13:53:14 | in : InputStream | SpelInjectionTest.java:53:21:53:25 | bytes [post update] : byte[] | provenance | MaD:2 | +| SpelInjectionTest.java:53:21:53:25 | bytes [post update] : byte[] | SpelInjectionTest.java:54:31:54:35 | bytes : byte[] | provenance | | +| SpelInjectionTest.java:54:20:54:42 | new String(...) : String | SpelInjectionTest.java:56:72:56:76 | input : String | provenance | | +| SpelInjectionTest.java:54:31:54:35 | bytes : byte[] | SpelInjectionTest.java:54:20:54:42 | new String(...) : String | provenance | MaD:3 | +| SpelInjectionTest.java:56:29:56:77 | parseExpression(...) : Expression | SpelInjectionTest.java:60:5:60:14 | expression | provenance | | +| SpelInjectionTest.java:56:72:56:76 | input : String | SpelInjectionTest.java:56:29:56:77 | parseExpression(...) : Expression | provenance | Config | +| SpelInjectionTest.java:64:22:64:44 | getInputStream(...) : InputStream | SpelInjectionTest.java:67:13:67:14 | in : InputStream | provenance | Src:MaD:1 | +| SpelInjectionTest.java:67:13:67:14 | in : InputStream | SpelInjectionTest.java:67:21:67:25 | bytes [post update] : byte[] | provenance | MaD:2 | +| SpelInjectionTest.java:67:21:67:25 | bytes [post update] : byte[] | SpelInjectionTest.java:68:31:68:35 | bytes : byte[] | provenance | | +| SpelInjectionTest.java:68:20:68:42 | new String(...) : String | SpelInjectionTest.java:70:52:70:56 | input : String | provenance | | +| SpelInjectionTest.java:68:31:68:35 | bytes : byte[] | SpelInjectionTest.java:68:20:68:42 | new String(...) : String | provenance | MaD:3 | +| SpelInjectionTest.java:70:29:70:57 | parseExpression(...) : Expression | SpelInjectionTest.java:71:5:71:14 | expression | provenance | | +| SpelInjectionTest.java:70:52:70:56 | input : String | SpelInjectionTest.java:70:29:70:57 | parseExpression(...) : Expression | provenance | Config | +| SpelInjectionTest.java:75:22:75:44 | getInputStream(...) : InputStream | SpelInjectionTest.java:78:13:78:14 | in : InputStream | provenance | Src:MaD:1 | +| SpelInjectionTest.java:78:13:78:14 | in : InputStream | SpelInjectionTest.java:78:21:78:25 | bytes [post update] : byte[] | provenance | MaD:2 | +| SpelInjectionTest.java:78:21:78:25 | bytes [post update] : byte[] | SpelInjectionTest.java:79:31:79:35 | bytes : byte[] | provenance | | +| SpelInjectionTest.java:79:20:79:42 | new String(...) : String | SpelInjectionTest.java:81:52:81:56 | input : String | provenance | | +| SpelInjectionTest.java:79:31:79:35 | bytes : byte[] | SpelInjectionTest.java:79:20:79:42 | new String(...) : String | provenance | MaD:3 | +| SpelInjectionTest.java:81:29:81:57 | parseExpression(...) : Expression | SpelInjectionTest.java:82:5:82:14 | expression | provenance | | +| SpelInjectionTest.java:81:52:81:56 | input : String | SpelInjectionTest.java:81:29:81:57 | parseExpression(...) : Expression | provenance | Config | +| SpelInjectionTest.java:86:22:86:44 | getInputStream(...) : InputStream | SpelInjectionTest.java:89:13:89:14 | in : InputStream | provenance | Src:MaD:1 | +| SpelInjectionTest.java:89:13:89:14 | in : InputStream | SpelInjectionTest.java:89:21:89:25 | bytes [post update] : byte[] | provenance | MaD:2 | +| SpelInjectionTest.java:89:21:89:25 | bytes [post update] : byte[] | SpelInjectionTest.java:90:31:90:35 | bytes : byte[] | provenance | | +| SpelInjectionTest.java:90:20:90:42 | new String(...) : String | SpelInjectionTest.java:92:52:92:56 | input : String | provenance | | +| SpelInjectionTest.java:90:31:90:35 | bytes : byte[] | SpelInjectionTest.java:90:20:90:42 | new String(...) : String | provenance | MaD:3 | +| SpelInjectionTest.java:92:29:92:57 | parseExpression(...) : Expression | SpelInjectionTest.java:95:5:95:14 | expression | provenance | | +| SpelInjectionTest.java:92:52:92:56 | input : String | SpelInjectionTest.java:92:29:92:57 | parseExpression(...) : Expression | provenance | Config | +models +| 1 | Source: java.net; Socket; false; getInputStream; (); ; ReturnValue; remote; manual | +| 2 | Summary: java.io; InputStream; true; read; (byte[]); ; Argument[this]; Argument[0]; taint; manual | +| 3 | Summary: java.lang; String; false; String; ; ; Argument[0]; Argument[this]; taint; manual | +nodes +| SpelInjectionTest.java:16:22:16:44 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| SpelInjectionTest.java:19:13:19:14 | in : InputStream | semmle.label | in : InputStream | +| SpelInjectionTest.java:19:21:19:25 | bytes [post update] : byte[] | semmle.label | bytes [post update] : byte[] | +| SpelInjectionTest.java:20:20:20:42 | new String(...) : String | semmle.label | new String(...) : String | +| SpelInjectionTest.java:20:31:20:35 | bytes : byte[] | semmle.label | bytes : byte[] | +| SpelInjectionTest.java:23:29:23:57 | parseExpression(...) : Expression | semmle.label | parseExpression(...) : Expression | +| SpelInjectionTest.java:23:52:23:56 | input : String | semmle.label | input : String | +| SpelInjectionTest.java:24:5:24:14 | expression | semmle.label | expression | +| SpelInjectionTest.java:28:22:28:44 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| SpelInjectionTest.java:31:13:31:14 | in : InputStream | semmle.label | in : InputStream | +| SpelInjectionTest.java:31:21:31:25 | bytes [post update] : byte[] | semmle.label | bytes [post update] : byte[] | +| SpelInjectionTest.java:32:20:32:42 | new String(...) : String | semmle.label | new String(...) : String | +| SpelInjectionTest.java:32:31:32:35 | bytes : byte[] | semmle.label | bytes : byte[] | +| SpelInjectionTest.java:34:33:34:54 | parseRaw(...) : SpelExpression | semmle.label | parseRaw(...) : SpelExpression | +| SpelInjectionTest.java:34:49:34:53 | input : String | semmle.label | input : String | +| SpelInjectionTest.java:35:5:35:14 | expression | semmle.label | expression | +| SpelInjectionTest.java:39:22:39:44 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| SpelInjectionTest.java:42:13:42:14 | in : InputStream | semmle.label | in : InputStream | +| SpelInjectionTest.java:42:21:42:25 | bytes [post update] : byte[] | semmle.label | bytes [post update] : byte[] | +| SpelInjectionTest.java:43:20:43:42 | new String(...) : String | semmle.label | new String(...) : String | +| SpelInjectionTest.java:43:31:43:35 | bytes : byte[] | semmle.label | bytes : byte[] | +| SpelInjectionTest.java:45:29:45:77 | parseExpression(...) : Expression | semmle.label | parseExpression(...) : Expression | +| SpelInjectionTest.java:45:72:45:76 | input : String | semmle.label | input : String | +| SpelInjectionTest.java:46:5:46:14 | expression | semmle.label | expression | +| SpelInjectionTest.java:50:22:50:44 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| SpelInjectionTest.java:53:13:53:14 | in : InputStream | semmle.label | in : InputStream | +| SpelInjectionTest.java:53:21:53:25 | bytes [post update] : byte[] | semmle.label | bytes [post update] : byte[] | +| SpelInjectionTest.java:54:20:54:42 | new String(...) : String | semmle.label | new String(...) : String | +| SpelInjectionTest.java:54:31:54:35 | bytes : byte[] | semmle.label | bytes : byte[] | +| SpelInjectionTest.java:56:29:56:77 | parseExpression(...) : Expression | semmle.label | parseExpression(...) : Expression | +| SpelInjectionTest.java:56:72:56:76 | input : String | semmle.label | input : String | +| SpelInjectionTest.java:60:5:60:14 | expression | semmle.label | expression | +| SpelInjectionTest.java:64:22:64:44 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| SpelInjectionTest.java:67:13:67:14 | in : InputStream | semmle.label | in : InputStream | +| SpelInjectionTest.java:67:21:67:25 | bytes [post update] : byte[] | semmle.label | bytes [post update] : byte[] | +| SpelInjectionTest.java:68:20:68:42 | new String(...) : String | semmle.label | new String(...) : String | +| SpelInjectionTest.java:68:31:68:35 | bytes : byte[] | semmle.label | bytes : byte[] | +| SpelInjectionTest.java:70:29:70:57 | parseExpression(...) : Expression | semmle.label | parseExpression(...) : Expression | +| SpelInjectionTest.java:70:52:70:56 | input : String | semmle.label | input : String | +| SpelInjectionTest.java:71:5:71:14 | expression | semmle.label | expression | +| SpelInjectionTest.java:75:22:75:44 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| SpelInjectionTest.java:78:13:78:14 | in : InputStream | semmle.label | in : InputStream | +| SpelInjectionTest.java:78:21:78:25 | bytes [post update] : byte[] | semmle.label | bytes [post update] : byte[] | +| SpelInjectionTest.java:79:20:79:42 | new String(...) : String | semmle.label | new String(...) : String | +| SpelInjectionTest.java:79:31:79:35 | bytes : byte[] | semmle.label | bytes : byte[] | +| SpelInjectionTest.java:81:29:81:57 | parseExpression(...) : Expression | semmle.label | parseExpression(...) : Expression | +| SpelInjectionTest.java:81:52:81:56 | input : String | semmle.label | input : String | +| SpelInjectionTest.java:82:5:82:14 | expression | semmle.label | expression | +| SpelInjectionTest.java:86:22:86:44 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| SpelInjectionTest.java:89:13:89:14 | in : InputStream | semmle.label | in : InputStream | +| SpelInjectionTest.java:89:21:89:25 | bytes [post update] : byte[] | semmle.label | bytes [post update] : byte[] | +| SpelInjectionTest.java:90:20:90:42 | new String(...) : String | semmle.label | new String(...) : String | +| SpelInjectionTest.java:90:31:90:35 | bytes : byte[] | semmle.label | bytes : byte[] | +| SpelInjectionTest.java:92:29:92:57 | parseExpression(...) : Expression | semmle.label | parseExpression(...) : Expression | +| SpelInjectionTest.java:92:52:92:56 | input : String | semmle.label | input : String | +| SpelInjectionTest.java:95:5:95:14 | expression | semmle.label | expression | +subpaths diff --git a/java/ql/test/query-tests/security/CWE-094/SpelInjectionTest.java b/java/ql/test/query-tests/security/CWE-094/SpelInjection/SpelInjectionTest.java similarity index 81% rename from java/ql/test/query-tests/security/CWE-094/SpelInjectionTest.java rename to java/ql/test/query-tests/security/CWE-094/SpelInjection/SpelInjectionTest.java index d10bcfa6686..88c4e913d49 100644 --- a/java/ql/test/query-tests/security/CWE-094/SpelInjectionTest.java +++ b/java/ql/test/query-tests/security/CWE-094/SpelInjection/SpelInjectionTest.java @@ -13,7 +13,7 @@ public class SpelInjectionTest { private static final ExpressionParser PARSER = new SpelExpressionParser(); public void testGetValue(Socket socket) throws IOException { - InputStream in = socket.getInputStream(); + InputStream in = socket.getInputStream(); // $ Source byte[] bytes = new byte[1024]; int n = in.read(bytes); @@ -21,33 +21,33 @@ public class SpelInjectionTest { ExpressionParser parser = new SpelExpressionParser(); Expression expression = parser.parseExpression(input); - expression.getValue(); // $hasSpelInjection + expression.getValue(); // $ Alert } public void testGetValueWithParseRaw(Socket socket) throws IOException { - InputStream in = socket.getInputStream(); + InputStream in = socket.getInputStream(); // $ Source byte[] bytes = new byte[1024]; int n = in.read(bytes); String input = new String(bytes, 0, n); SpelExpressionParser parser = new SpelExpressionParser(); SpelExpression expression = parser.parseRaw(input); - expression.getValue(); // $hasSpelInjection + expression.getValue(); // $ Alert } public void testGetValueWithChainedCalls(Socket socket) throws IOException { - InputStream in = socket.getInputStream(); + InputStream in = socket.getInputStream(); // $ Source byte[] bytes = new byte[1024]; int n = in.read(bytes); String input = new String(bytes, 0, n); Expression expression = new SpelExpressionParser().parseExpression(input); - expression.getValue(); // $hasSpelInjection + expression.getValue(); // $ Alert } public void testSetValueWithRootObject(Socket socket) throws IOException { - InputStream in = socket.getInputStream(); + InputStream in = socket.getInputStream(); // $ Source byte[] bytes = new byte[1024]; int n = in.read(bytes); @@ -57,33 +57,33 @@ public class SpelInjectionTest { Object root = new Object(); Object value = new Object(); - expression.setValue(root, value); // $hasSpelInjection + expression.setValue(root, value); // $ Alert } public void testGetValueWithStaticParser(Socket socket) throws IOException { - InputStream in = socket.getInputStream(); + InputStream in = socket.getInputStream(); // $ Source byte[] bytes = new byte[1024]; int n = in.read(bytes); String input = new String(bytes, 0, n); Expression expression = PARSER.parseExpression(input); - expression.getValue(); // $hasSpelInjection + expression.getValue(); // $ Alert } public void testGetValueType(Socket socket) throws IOException { - InputStream in = socket.getInputStream(); + InputStream in = socket.getInputStream(); // $ Source byte[] bytes = new byte[1024]; int n = in.read(bytes); String input = new String(bytes, 0, n); Expression expression = PARSER.parseExpression(input); - expression.getValueType(); // $hasSpelInjection + expression.getValueType(); // $ Alert } public void testWithStandardEvaluationContext(Socket socket) throws IOException { - InputStream in = socket.getInputStream(); + InputStream in = socket.getInputStream(); // $ Source byte[] bytes = new byte[1024]; int n = in.read(bytes); @@ -92,7 +92,7 @@ public class SpelInjectionTest { Expression expression = PARSER.parseExpression(input); StandardEvaluationContext context = new StandardEvaluationContext(); - expression.getValue(context); // $hasSpelInjection + expression.getValue(context); // $ Alert } public void testWithSimpleEvaluationContext(Socket socket) throws IOException { diff --git a/java/ql/test/query-tests/security/CWE-094/SpelInjection/SpelInjectionTest.qlref b/java/ql/test/query-tests/security/CWE-094/SpelInjection/SpelInjectionTest.qlref new file mode 100644 index 00000000000..5effbcb9829 --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-094/SpelInjection/SpelInjectionTest.qlref @@ -0,0 +1,4 @@ +query: Security/CWE/CWE-094/SpelInjection.ql +postprocess: + - utils/test/PrettyPrintModels.ql + - utils/test/InlineExpectationsTestQuery.ql diff --git a/java/ql/test/query-tests/security/CWE-094/SpelInjection/options b/java/ql/test/query-tests/security/CWE-094/SpelInjection/options new file mode 100644 index 00000000000..d7c8332682b --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-094/SpelInjection/options @@ -0,0 +1 @@ +//semmle-extractor-options: --javac-args -cp ${testdir}/../../../../stubs/validation-api-2.0.1.Final:${testdir}/../../../../stubs/springframework-5.8.x:${testdir}/../../../../stubs/apache-commons-jexl-2.1.1:${testdir}/../../../../stubs/apache-commons-jexl-3.1:${testdir}/../../../../stubs/apache-commons-logging-1.2:${testdir}/../../../../stubs/mvel2-2.4.7:${testdir}/../../../../stubs/groovy-all-3.0.7:${testdir}/../../../../stubs/servlet-api-2.4:${testdir}/../../../../stubs/scriptengine:${testdir}/../../../../stubs/jsr223-api:${testdir}/../../../../stubs/apache-freemarker-2.3.31:${testdir}/../../../../stubs/jinjava-2.6.0:${testdir}/../../../../stubs/pebble-3.1.5:${testdir}/../../../../stubs/thymeleaf-3.0.14:${testdir}/../../../../stubs/apache-velocity-2.3:${testdir}/../../../..//stubs/google-android-9.0.0 diff --git a/java/ql/test/query-tests/security/CWE-094/SpelInjectionTest.expected b/java/ql/test/query-tests/security/CWE-094/SpelInjectionTest.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/java/ql/test/query-tests/security/CWE-094/SpelInjectionTest.ql b/java/ql/test/query-tests/security/CWE-094/SpelInjectionTest.ql deleted file mode 100644 index 727229e989d..00000000000 --- a/java/ql/test/query-tests/security/CWE-094/SpelInjectionTest.ql +++ /dev/null @@ -1,20 +0,0 @@ -import java -import semmle.code.java.dataflow.TaintTracking -import semmle.code.java.dataflow.FlowSources -import semmle.code.java.security.SpelInjectionQuery -import utils.test.InlineExpectationsTest - -module HasSpelInjectionTest implements TestSig { - string getARelevantTag() { result = "hasSpelInjection" } - - predicate hasActualResult(Location location, string element, string tag, string value) { - tag = "hasSpelInjection" and - exists(DataFlow::Node sink | SpelInjectionFlow::flowTo(sink) | - sink.getLocation() = location and - element = sink.toString() and - value = "" - ) - } -} - -import MakeTest diff --git a/java/ql/test/query-tests/security/CWE-094/FreemarkerSSTI.java b/java/ql/test/query-tests/security/CWE-094/TemplateInjection/FreemarkerSSTI.java similarity index 74% rename from java/ql/test/query-tests/security/CWE-094/FreemarkerSSTI.java rename to java/ql/test/query-tests/security/CWE-094/TemplateInjection/FreemarkerSSTI.java index 31eb634a5fe..a39ed8c5a4e 100644 --- a/java/ql/test/query-tests/security/CWE-094/FreemarkerSSTI.java +++ b/java/ql/test/query-tests/security/CWE-094/TemplateInjection/FreemarkerSSTI.java @@ -20,88 +20,88 @@ public class FreemarkerSSTI { @GetMapping(value = "bad1") public void bad1(HttpServletRequest request) { String name = "ttemplate"; - String code = request.getParameter("code"); + String code = request.getParameter("code"); // $ Source Reader reader = new StringReader(code); - Template t = new Template(name, reader); // $hasTemplateInjection + Template t = new Template(name, reader); // $ Alert } @GetMapping(value = "bad2") public void bad2(HttpServletRequest request) { String name = "ttemplate"; - String code = request.getParameter("code"); + String code = request.getParameter("code"); // $ Source Reader reader = new StringReader(code); Configuration cfg = new Configuration(); - Template t = new Template(name, reader, cfg); // $hasTemplateInjection + Template t = new Template(name, reader, cfg); // $ Alert } @GetMapping(value = "bad3") public void bad3(HttpServletRequest request) { String name = "ttemplate"; - String code = request.getParameter("code"); + String code = request.getParameter("code"); // $ Source Reader reader = new StringReader(code); Configuration cfg = new Configuration(); - Template t = new Template(name, reader, cfg, "UTF-8"); // $hasTemplateInjection + Template t = new Template(name, reader, cfg, "UTF-8"); // $ Alert } @GetMapping(value = "bad4") public void bad4(HttpServletRequest request) { String name = "ttemplate"; - String sourceCode = request.getParameter("sourceCode"); + String sourceCode = request.getParameter("sourceCode"); // $ Source Configuration cfg = new Configuration(); - Template t = new Template(name, sourceCode, cfg); // $hasTemplateInjection + Template t = new Template(name, sourceCode, cfg); // $ Alert } @GetMapping(value = "bad5") public void bad5(HttpServletRequest request) { String name = "ttemplate"; - String code = request.getParameter("code"); + String code = request.getParameter("code"); // $ Source Configuration cfg = new Configuration(); Reader reader = new StringReader(code); - Template t = new Template(name, sourceName, reader, cfg); // $hasTemplateInjection + Template t = new Template(name, sourceName, reader, cfg); // $ Alert } @GetMapping(value = "bad6") public void bad6(HttpServletRequest request) { String name = "ttemplate"; - String code = request.getParameter("code"); + String code = request.getParameter("code"); // $ Source Configuration cfg = new Configuration(); ParserConfiguration customParserConfiguration = new Configuration(); Reader reader = new StringReader(code); Template t = - new Template(name, sourceName, reader, cfg, customParserConfiguration, "UTF-8"); // $hasTemplateInjection + new Template(name, sourceName, reader, cfg, customParserConfiguration, "UTF-8"); // $ Alert } @GetMapping(value = "bad7") public void bad7(HttpServletRequest request) { String name = "ttemplate"; - String code = request.getParameter("code"); + String code = request.getParameter("code"); // $ Source Configuration cfg = new Configuration(); ParserConfiguration customParserConfiguration = new Configuration(); Reader reader = new StringReader(code); - Template t = new Template(name, sourceName, reader, cfg, "UTF-8"); // $hasTemplateInjection + Template t = new Template(name, sourceName, reader, cfg, "UTF-8"); // $ Alert } @GetMapping(value = "bad8") public void bad8(HttpServletRequest request) { - String code = request.getParameter("code"); + String code = request.getParameter("code"); // $ Source StringTemplateLoader stringLoader = new StringTemplateLoader(); - stringLoader.putTemplate("myTemplate", code); // $hasTemplateInjection + stringLoader.putTemplate("myTemplate", code); // $ Alert } @GetMapping(value = "bad9") public void bad9(HttpServletRequest request) { - String code = request.getParameter("code"); + String code = request.getParameter("code"); // $ Source StringTemplateLoader stringLoader = new StringTemplateLoader(); - stringLoader.putTemplate("myTemplate", code, 0); // $hasTemplateInjection + stringLoader.putTemplate("myTemplate", code, 0); // $ Alert } @GetMapping(value = "good1") diff --git a/java/ql/test/query-tests/security/CWE-094/JinJavaSSTI.java b/java/ql/test/query-tests/security/CWE-094/TemplateInjection/JinJavaSSTI.java similarity index 81% rename from java/ql/test/query-tests/security/CWE-094/JinJavaSSTI.java rename to java/ql/test/query-tests/security/CWE-094/TemplateInjection/JinJavaSSTI.java index 4341a44f192..9bd9bad4ca8 100644 --- a/java/ql/test/query-tests/security/CWE-094/JinJavaSSTI.java +++ b/java/ql/test/query-tests/security/CWE-094/TemplateInjection/JinJavaSSTI.java @@ -18,27 +18,27 @@ public class JinJavaSSTI { @GetMapping(value = "bad1") public void bad1(HttpServletRequest request) { - String template = request.getParameter("template"); + String template = request.getParameter("template"); // $ Source Jinjava jinjava = new Jinjava(); Map context = new HashMap<>(); - String renderedTemplate = jinjava.render(template, context); // $hasTemplateInjection + String renderedTemplate = jinjava.render(template, context); // $ Alert } @GetMapping(value = "bad2") public void bad2(HttpServletRequest request) { - String template = request.getParameter("template"); + String template = request.getParameter("template"); // $ Source Jinjava jinjava = new Jinjava(); Map bindings = new HashMap<>(); - RenderResult renderResult = jinjava.renderForResult(template, bindings); // $hasTemplateInjection + RenderResult renderResult = jinjava.renderForResult(template, bindings); // $ Alert } @GetMapping(value = "bad3") public void bad3(HttpServletRequest request) { - String template = request.getParameter("template"); + String template = request.getParameter("template"); // $ Source Jinjava jinjava = new Jinjava(); Map bindings = new HashMap<>(); JinjavaConfig renderConfig = new JinjavaConfig(); - RenderResult renderResult = jinjava.renderForResult(template, bindings, renderConfig); // $hasTemplateInjection + RenderResult renderResult = jinjava.renderForResult(template, bindings, renderConfig); // $ Alert } } diff --git a/java/ql/test/query-tests/security/CWE-094/PebbleSSTI.java b/java/ql/test/query-tests/security/CWE-094/TemplateInjection/PebbleSSTI.java similarity index 80% rename from java/ql/test/query-tests/security/CWE-094/PebbleSSTI.java rename to java/ql/test/query-tests/security/CWE-094/TemplateInjection/PebbleSSTI.java index c026f98645b..45beaf46fa1 100644 --- a/java/ql/test/query-tests/security/CWE-094/PebbleSSTI.java +++ b/java/ql/test/query-tests/security/CWE-094/TemplateInjection/PebbleSSTI.java @@ -15,15 +15,15 @@ public class PebbleSSTI { @GetMapping(value = "bad1") public void bad1(HttpServletRequest request) { - String templateName = request.getParameter("templateName"); + String templateName = request.getParameter("templateName"); // $ Source PebbleEngine engine = new PebbleEngine.Builder().build(); - PebbleTemplate compiledTemplate = engine.getTemplate(templateName); // $hasTemplateInjection + PebbleTemplate compiledTemplate = engine.getTemplate(templateName); // $ Alert } @GetMapping(value = "bad2") public void bad2(HttpServletRequest request) { - String templateName = request.getParameter("templateName"); + String templateName = request.getParameter("templateName"); // $ Source PebbleEngine engine = new PebbleEngine.Builder().build(); - PebbleTemplate compiledTemplate = engine.getLiteralTemplate(templateName); // $hasTemplateInjection + PebbleTemplate compiledTemplate = engine.getLiteralTemplate(templateName); // $ Alert } } diff --git a/java/ql/test/query-tests/security/CWE-094/TemplateInjection/TemplateInjectionTest.expected b/java/ql/test/query-tests/security/CWE-094/TemplateInjection/TemplateInjectionTest.expected new file mode 100644 index 00000000000..6727f69b538 --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-094/TemplateInjection/TemplateInjectionTest.expected @@ -0,0 +1,171 @@ +#select +| FreemarkerSSTI.java:26:35:26:40 | reader | FreemarkerSSTI.java:23:17:23:44 | getParameter(...) : String | FreemarkerSSTI.java:26:35:26:40 | reader | Template, which may contain code, depends on a $@. | FreemarkerSSTI.java:23:17:23:44 | getParameter(...) | user-provided value | +| FreemarkerSSTI.java:36:35:36:40 | reader | FreemarkerSSTI.java:32:17:32:44 | getParameter(...) : String | FreemarkerSSTI.java:36:35:36:40 | reader | Template, which may contain code, depends on a $@. | FreemarkerSSTI.java:32:17:32:44 | getParameter(...) | user-provided value | +| FreemarkerSSTI.java:46:35:46:40 | reader | FreemarkerSSTI.java:42:17:42:44 | getParameter(...) : String | FreemarkerSSTI.java:46:35:46:40 | reader | Template, which may contain code, depends on a $@. | FreemarkerSSTI.java:42:17:42:44 | getParameter(...) | user-provided value | +| FreemarkerSSTI.java:55:35:55:44 | sourceCode | FreemarkerSSTI.java:52:23:52:56 | getParameter(...) : String | FreemarkerSSTI.java:55:35:55:44 | sourceCode | Template, which may contain code, depends on a $@. | FreemarkerSSTI.java:52:23:52:56 | getParameter(...) | user-provided value | +| FreemarkerSSTI.java:65:47:65:52 | reader | FreemarkerSSTI.java:61:17:61:44 | getParameter(...) : String | FreemarkerSSTI.java:65:47:65:52 | reader | Template, which may contain code, depends on a $@. | FreemarkerSSTI.java:61:17:61:44 | getParameter(...) | user-provided value | +| FreemarkerSSTI.java:77:36:77:41 | reader | FreemarkerSSTI.java:71:17:71:44 | getParameter(...) : String | FreemarkerSSTI.java:77:36:77:41 | reader | Template, which may contain code, depends on a $@. | FreemarkerSSTI.java:71:17:71:44 | getParameter(...) | user-provided value | +| FreemarkerSSTI.java:88:47:88:52 | reader | FreemarkerSSTI.java:83:17:83:44 | getParameter(...) : String | FreemarkerSSTI.java:88:47:88:52 | reader | Template, which may contain code, depends on a $@. | FreemarkerSSTI.java:83:17:83:44 | getParameter(...) | user-provided value | +| FreemarkerSSTI.java:96:42:96:45 | code | FreemarkerSSTI.java:93:17:93:44 | getParameter(...) : String | FreemarkerSSTI.java:96:42:96:45 | code | Template, which may contain code, depends on a $@. | FreemarkerSSTI.java:93:17:93:44 | getParameter(...) | user-provided value | +| FreemarkerSSTI.java:104:42:104:45 | code | FreemarkerSSTI.java:101:17:101:44 | getParameter(...) : String | FreemarkerSSTI.java:104:42:104:45 | code | Template, which may contain code, depends on a $@. | FreemarkerSSTI.java:101:17:101:44 | getParameter(...) | user-provided value | +| JinJavaSSTI.java:24:44:24:51 | template | JinJavaSSTI.java:21:21:21:52 | getParameter(...) : String | JinJavaSSTI.java:24:44:24:51 | template | Template, which may contain code, depends on a $@. | JinJavaSSTI.java:21:21:21:52 | getParameter(...) | user-provided value | +| JinJavaSSTI.java:32:55:32:62 | template | JinJavaSSTI.java:29:21:29:52 | getParameter(...) : String | JinJavaSSTI.java:32:55:32:62 | template | Template, which may contain code, depends on a $@. | JinJavaSSTI.java:29:21:29:52 | getParameter(...) | user-provided value | +| JinJavaSSTI.java:42:55:42:62 | template | JinJavaSSTI.java:37:21:37:52 | getParameter(...) : String | JinJavaSSTI.java:42:55:42:62 | template | Template, which may contain code, depends on a $@. | JinJavaSSTI.java:37:21:37:52 | getParameter(...) | user-provided value | +| PebbleSSTI.java:20:56:20:67 | templateName | PebbleSSTI.java:18:25:18:60 | getParameter(...) : String | PebbleSSTI.java:20:56:20:67 | templateName | Template, which may contain code, depends on a $@. | PebbleSSTI.java:18:25:18:60 | getParameter(...) | user-provided value | +| PebbleSSTI.java:27:63:27:74 | templateName | PebbleSSTI.java:25:25:25:60 | getParameter(...) : String | PebbleSSTI.java:27:63:27:74 | templateName | Template, which may contain code, depends on a $@. | PebbleSSTI.java:25:25:25:60 | getParameter(...) | user-provided value | +| ThymeleafSSTI.java:24:27:24:30 | code | ThymeleafSSTI.java:21:17:21:44 | getParameter(...) : String | ThymeleafSSTI.java:24:27:24:30 | code | Template, which may contain code, depends on a $@. | ThymeleafSSTI.java:21:17:21:44 | getParameter(...) | user-provided value | +| ThymeleafSSTI.java:25:27:25:30 | code | ThymeleafSSTI.java:21:17:21:44 | getParameter(...) : String | ThymeleafSSTI.java:25:27:25:30 | code | Template, which may contain code, depends on a $@. | ThymeleafSSTI.java:21:17:21:44 | getParameter(...) | user-provided value | +| ThymeleafSSTI.java:26:27:26:30 | code | ThymeleafSSTI.java:21:17:21:44 | getParameter(...) : String | ThymeleafSSTI.java:26:27:26:30 | code | Template, which may contain code, depends on a $@. | ThymeleafSSTI.java:21:17:21:44 | getParameter(...) | user-provided value | +| ThymeleafSSTI.java:27:27:27:30 | code | ThymeleafSSTI.java:21:17:21:44 | getParameter(...) : String | ThymeleafSSTI.java:27:27:27:30 | code | Template, which may contain code, depends on a $@. | ThymeleafSSTI.java:21:17:21:44 | getParameter(...) | user-provided value | +| ThymeleafSSTI.java:28:36:28:39 | code | ThymeleafSSTI.java:21:17:21:44 | getParameter(...) : String | ThymeleafSSTI.java:28:36:28:39 | code | Template, which may contain code, depends on a $@. | ThymeleafSSTI.java:21:17:21:44 | getParameter(...) | user-provided value | +| ThymeleafSSTI.java:29:36:29:39 | code | ThymeleafSSTI.java:21:17:21:44 | getParameter(...) : String | ThymeleafSSTI.java:29:36:29:39 | code | Template, which may contain code, depends on a $@. | ThymeleafSSTI.java:21:17:21:44 | getParameter(...) | user-provided value | +| ThymeleafSSTI.java:32:27:32:30 | spec | ThymeleafSSTI.java:21:17:21:44 | getParameter(...) : String | ThymeleafSSTI.java:32:27:32:30 | spec | Template, which may contain code, depends on a $@. | ThymeleafSSTI.java:21:17:21:44 | getParameter(...) | user-provided value | +| ThymeleafSSTI.java:33:27:33:30 | spec | ThymeleafSSTI.java:21:17:21:44 | getParameter(...) : String | ThymeleafSSTI.java:33:27:33:30 | spec | Template, which may contain code, depends on a $@. | ThymeleafSSTI.java:21:17:21:44 | getParameter(...) | user-provided value | +| ThymeleafSSTI.java:34:36:34:39 | spec | ThymeleafSSTI.java:21:17:21:44 | getParameter(...) : String | ThymeleafSSTI.java:34:36:34:39 | spec | Template, which may contain code, depends on a $@. | ThymeleafSSTI.java:21:17:21:44 | getParameter(...) | user-provided value | +| VelocitySSTI.java:37:45:37:48 | code | VelocitySSTI.java:31:17:31:44 | getParameter(...) : String | VelocitySSTI.java:37:45:37:48 | code | Template, which may contain code, depends on a $@. | VelocitySSTI.java:31:17:31:44 | getParameter(...) | user-provided value | +| VelocitySSTI.java:51:45:51:50 | reader | VelocitySSTI.java:43:17:43:44 | getParameter(...) : String | VelocitySSTI.java:51:45:51:50 | reader | Template, which may contain code, depends on a $@. | VelocitySSTI.java:43:17:43:44 | getParameter(...) | user-provided value | +| VelocitySSTI.java:61:25:61:30 | reader | VelocitySSTI.java:57:17:57:44 | getParameter(...) : String | VelocitySSTI.java:61:25:61:30 | reader | Template, which may contain code, depends on a $@. | VelocitySSTI.java:57:17:57:44 | getParameter(...) | user-provided value | +| VelocitySSTI.java:93:37:93:40 | code | VelocitySSTI.java:81:17:81:44 | getParameter(...) : String | VelocitySSTI.java:93:37:93:40 | code | Template, which may contain code, depends on a $@. | VelocitySSTI.java:81:17:81:44 | getParameter(...) | user-provided value | +| VelocitySSTI.java:94:37:94:58 | new StringReader(...) | VelocitySSTI.java:81:17:81:44 | getParameter(...) : String | VelocitySSTI.java:94:37:94:58 | new StringReader(...) | Template, which may contain code, depends on a $@. | VelocitySSTI.java:81:17:81:44 | getParameter(...) | user-provided value | +| VelocitySSTI.java:117:37:117:40 | code | VelocitySSTI.java:114:17:114:44 | getParameter(...) : String | VelocitySSTI.java:117:37:117:40 | code | Template, which may contain code, depends on a $@. | VelocitySSTI.java:114:17:114:44 | getParameter(...) | user-provided value | +edges +| FreemarkerSSTI.java:23:17:23:44 | getParameter(...) : String | FreemarkerSSTI.java:24:36:24:39 | code : String | provenance | Src:MaD:19 | +| FreemarkerSSTI.java:24:19:24:40 | new StringReader(...) : StringReader | FreemarkerSSTI.java:26:35:26:40 | reader | provenance | Sink:MaD:6 | +| FreemarkerSSTI.java:24:36:24:39 | code : String | FreemarkerSSTI.java:24:19:24:40 | new StringReader(...) : StringReader | provenance | MaD:20 | +| FreemarkerSSTI.java:32:17:32:44 | getParameter(...) : String | FreemarkerSSTI.java:33:36:33:39 | code : String | provenance | Src:MaD:19 | +| FreemarkerSSTI.java:33:19:33:40 | new StringReader(...) : StringReader | FreemarkerSSTI.java:36:35:36:40 | reader | provenance | Sink:MaD:7 | +| FreemarkerSSTI.java:33:36:33:39 | code : String | FreemarkerSSTI.java:33:19:33:40 | new StringReader(...) : StringReader | provenance | MaD:20 | +| FreemarkerSSTI.java:42:17:42:44 | getParameter(...) : String | FreemarkerSSTI.java:43:36:43:39 | code : String | provenance | Src:MaD:19 | +| FreemarkerSSTI.java:43:19:43:40 | new StringReader(...) : StringReader | FreemarkerSSTI.java:46:35:46:40 | reader | provenance | Sink:MaD:8 | +| FreemarkerSSTI.java:43:36:43:39 | code : String | FreemarkerSSTI.java:43:19:43:40 | new StringReader(...) : StringReader | provenance | MaD:20 | +| FreemarkerSSTI.java:52:23:52:56 | getParameter(...) : String | FreemarkerSSTI.java:55:35:55:44 | sourceCode | provenance | Src:MaD:19 Sink:MaD:9 | +| FreemarkerSSTI.java:61:17:61:44 | getParameter(...) : String | FreemarkerSSTI.java:63:36:63:39 | code : String | provenance | Src:MaD:19 | +| FreemarkerSSTI.java:63:19:63:40 | new StringReader(...) : StringReader | FreemarkerSSTI.java:65:47:65:52 | reader | provenance | Sink:MaD:10 | +| FreemarkerSSTI.java:63:36:63:39 | code : String | FreemarkerSSTI.java:63:19:63:40 | new StringReader(...) : StringReader | provenance | MaD:20 | +| FreemarkerSSTI.java:71:17:71:44 | getParameter(...) : String | FreemarkerSSTI.java:74:36:74:39 | code : String | provenance | Src:MaD:19 | +| FreemarkerSSTI.java:74:19:74:40 | new StringReader(...) : StringReader | FreemarkerSSTI.java:77:36:77:41 | reader | provenance | Sink:MaD:11 | +| FreemarkerSSTI.java:74:36:74:39 | code : String | FreemarkerSSTI.java:74:19:74:40 | new StringReader(...) : StringReader | provenance | MaD:20 | +| FreemarkerSSTI.java:83:17:83:44 | getParameter(...) : String | FreemarkerSSTI.java:86:36:86:39 | code : String | provenance | Src:MaD:19 | +| FreemarkerSSTI.java:86:19:86:40 | new StringReader(...) : StringReader | FreemarkerSSTI.java:88:47:88:52 | reader | provenance | Sink:MaD:12 | +| FreemarkerSSTI.java:86:36:86:39 | code : String | FreemarkerSSTI.java:86:19:86:40 | new StringReader(...) : StringReader | provenance | MaD:20 | +| FreemarkerSSTI.java:93:17:93:44 | getParameter(...) : String | FreemarkerSSTI.java:96:42:96:45 | code | provenance | Src:MaD:19 Sink:MaD:5 | +| FreemarkerSSTI.java:101:17:101:44 | getParameter(...) : String | FreemarkerSSTI.java:104:42:104:45 | code | provenance | Src:MaD:19 Sink:MaD:5 | +| JinJavaSSTI.java:21:21:21:52 | getParameter(...) : String | JinJavaSSTI.java:24:44:24:51 | template | provenance | Src:MaD:19 Sink:MaD:1 | +| JinJavaSSTI.java:29:21:29:52 | getParameter(...) : String | JinJavaSSTI.java:32:55:32:62 | template | provenance | Src:MaD:19 Sink:MaD:2 | +| JinJavaSSTI.java:37:21:37:52 | getParameter(...) : String | JinJavaSSTI.java:42:55:42:62 | template | provenance | Src:MaD:19 Sink:MaD:2 | +| PebbleSSTI.java:18:25:18:60 | getParameter(...) : String | PebbleSSTI.java:20:56:20:67 | templateName | provenance | Src:MaD:19 Sink:MaD:4 | +| PebbleSSTI.java:25:25:25:60 | getParameter(...) : String | PebbleSSTI.java:27:63:27:74 | templateName | provenance | Src:MaD:19 Sink:MaD:3 | +| ThymeleafSSTI.java:21:17:21:44 | getParameter(...) : String | ThymeleafSSTI.java:24:27:24:30 | code | provenance | Src:MaD:19 Sink:MaD:17 | +| ThymeleafSSTI.java:21:17:21:44 | getParameter(...) : String | ThymeleafSSTI.java:25:27:25:30 | code | provenance | Src:MaD:19 Sink:MaD:17 | +| ThymeleafSSTI.java:21:17:21:44 | getParameter(...) : String | ThymeleafSSTI.java:26:27:26:30 | code | provenance | Src:MaD:19 Sink:MaD:17 | +| ThymeleafSSTI.java:21:17:21:44 | getParameter(...) : String | ThymeleafSSTI.java:27:27:27:30 | code | provenance | Src:MaD:19 Sink:MaD:17 | +| ThymeleafSSTI.java:21:17:21:44 | getParameter(...) : String | ThymeleafSSTI.java:28:36:28:39 | code | provenance | Src:MaD:19 Sink:MaD:18 | +| ThymeleafSSTI.java:21:17:21:44 | getParameter(...) : String | ThymeleafSSTI.java:29:36:29:39 | code | provenance | Src:MaD:19 Sink:MaD:18 | +| ThymeleafSSTI.java:21:17:21:44 | getParameter(...) : String | ThymeleafSSTI.java:31:41:31:44 | code : String | provenance | Src:MaD:19 | +| ThymeleafSSTI.java:31:24:31:49 | new TemplateSpec(...) : TemplateSpec | ThymeleafSSTI.java:32:27:32:30 | spec | provenance | Sink:MaD:17 | +| ThymeleafSSTI.java:31:24:31:49 | new TemplateSpec(...) : TemplateSpec | ThymeleafSSTI.java:33:27:33:30 | spec | provenance | Sink:MaD:17 | +| ThymeleafSSTI.java:31:24:31:49 | new TemplateSpec(...) : TemplateSpec | ThymeleafSSTI.java:34:36:34:39 | spec | provenance | Sink:MaD:18 | +| ThymeleafSSTI.java:31:41:31:44 | code : String | ThymeleafSSTI.java:31:24:31:49 | new TemplateSpec(...) : TemplateSpec | provenance | MaD:21 | +| VelocitySSTI.java:31:17:31:44 | getParameter(...) : String | VelocitySSTI.java:37:45:37:48 | code | provenance | Src:MaD:19 Sink:MaD:13 | +| VelocitySSTI.java:43:17:43:44 | getParameter(...) : String | VelocitySSTI.java:49:42:49:45 | code : String | provenance | Src:MaD:19 | +| VelocitySSTI.java:49:25:49:46 | new StringReader(...) : StringReader | VelocitySSTI.java:51:45:51:50 | reader | provenance | Sink:MaD:13 | +| VelocitySSTI.java:49:42:49:45 | code : String | VelocitySSTI.java:49:25:49:46 | new StringReader(...) : StringReader | provenance | MaD:20 | +| VelocitySSTI.java:57:17:57:44 | getParameter(...) : String | VelocitySSTI.java:60:42:60:45 | code : String | provenance | Src:MaD:19 | +| VelocitySSTI.java:60:25:60:46 | new StringReader(...) : StringReader | VelocitySSTI.java:61:25:61:30 | reader | provenance | Sink:MaD:16 | +| VelocitySSTI.java:60:42:60:45 | code : String | VelocitySSTI.java:60:25:60:46 | new StringReader(...) : StringReader | provenance | MaD:20 | +| VelocitySSTI.java:81:17:81:44 | getParameter(...) : String | VelocitySSTI.java:93:37:93:40 | code | provenance | Src:MaD:19 Sink:MaD:14 | +| VelocitySSTI.java:81:17:81:44 | getParameter(...) : String | VelocitySSTI.java:94:54:94:57 | code : String | provenance | Src:MaD:19 | +| VelocitySSTI.java:94:54:94:57 | code : String | VelocitySSTI.java:94:37:94:58 | new StringReader(...) | provenance | MaD:20 Sink:MaD:14 | +| VelocitySSTI.java:114:17:114:44 | getParameter(...) : String | VelocitySSTI.java:117:37:117:40 | code | provenance | Src:MaD:19 Sink:MaD:15 | +models +| 1 | Sink: com.hubspot.jinjava; Jinjava; true; render; ; ; Argument[0]; template-injection; manual | +| 2 | Sink: com.hubspot.jinjava; Jinjava; true; renderForResult; ; ; Argument[0]; template-injection; manual | +| 3 | Sink: com.mitchellbosecke.pebble; PebbleEngine; true; getLiteralTemplate; ; ; Argument[0]; template-injection; manual | +| 4 | Sink: com.mitchellbosecke.pebble; PebbleEngine; true; getTemplate; ; ; Argument[0]; template-injection; manual | +| 5 | Sink: freemarker.cache; StringTemplateLoader; true; putTemplate; ; ; Argument[1]; template-injection; manual | +| 6 | Sink: freemarker.template; Template; true; Template; (String,Reader); ; Argument[1]; template-injection; manual | +| 7 | Sink: freemarker.template; Template; true; Template; (String,Reader,Configuration); ; Argument[1]; template-injection; manual | +| 8 | Sink: freemarker.template; Template; true; Template; (String,Reader,Configuration,String); ; Argument[1]; template-injection; manual | +| 9 | Sink: freemarker.template; Template; true; Template; (String,String,Configuration); ; Argument[1]; template-injection; manual | +| 10 | Sink: freemarker.template; Template; true; Template; (String,String,Reader,Configuration); ; Argument[2]; template-injection; manual | +| 11 | Sink: freemarker.template; Template; true; Template; (String,String,Reader,Configuration,ParserConfiguration,String); ; Argument[2]; template-injection; manual | +| 12 | Sink: freemarker.template; Template; true; Template; (String,String,Reader,Configuration,String); ; Argument[2]; template-injection; manual | +| 13 | Sink: org.apache.velocity.app; Velocity; true; evaluate; ; ; Argument[3]; template-injection; manual | +| 14 | Sink: org.apache.velocity.app; VelocityEngine; true; evaluate; ; ; Argument[3]; template-injection; manual | +| 15 | Sink: org.apache.velocity.runtime.resource.util; StringResourceRepository; true; putStringResource; ; ; Argument[1]; template-injection; manual | +| 16 | Sink: org.apache.velocity.runtime; RuntimeServices; true; parse; ; ; Argument[0]; template-injection; manual | +| 17 | Sink: org.thymeleaf; ITemplateEngine; true; process; ; ; Argument[0]; template-injection; manual | +| 18 | Sink: org.thymeleaf; ITemplateEngine; true; processThrottled; ; ; Argument[0]; template-injection; manual | +| 19 | Source: javax.servlet; ServletRequest; false; getParameter; (String); ; ReturnValue; remote; manual | +| 20 | Summary: java.io; StringReader; false; StringReader; ; ; Argument[0]; Argument[this]; taint; manual | +| 21 | Summary: org.thymeleaf; TemplateSpec; false; TemplateSpec; ; ; Argument[0]; Argument[this]; taint; manual | +nodes +| FreemarkerSSTI.java:23:17:23:44 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| FreemarkerSSTI.java:24:19:24:40 | new StringReader(...) : StringReader | semmle.label | new StringReader(...) : StringReader | +| FreemarkerSSTI.java:24:36:24:39 | code : String | semmle.label | code : String | +| FreemarkerSSTI.java:26:35:26:40 | reader | semmle.label | reader | +| FreemarkerSSTI.java:32:17:32:44 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| FreemarkerSSTI.java:33:19:33:40 | new StringReader(...) : StringReader | semmle.label | new StringReader(...) : StringReader | +| FreemarkerSSTI.java:33:36:33:39 | code : String | semmle.label | code : String | +| FreemarkerSSTI.java:36:35:36:40 | reader | semmle.label | reader | +| FreemarkerSSTI.java:42:17:42:44 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| FreemarkerSSTI.java:43:19:43:40 | new StringReader(...) : StringReader | semmle.label | new StringReader(...) : StringReader | +| FreemarkerSSTI.java:43:36:43:39 | code : String | semmle.label | code : String | +| FreemarkerSSTI.java:46:35:46:40 | reader | semmle.label | reader | +| FreemarkerSSTI.java:52:23:52:56 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| FreemarkerSSTI.java:55:35:55:44 | sourceCode | semmle.label | sourceCode | +| FreemarkerSSTI.java:61:17:61:44 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| FreemarkerSSTI.java:63:19:63:40 | new StringReader(...) : StringReader | semmle.label | new StringReader(...) : StringReader | +| FreemarkerSSTI.java:63:36:63:39 | code : String | semmle.label | code : String | +| FreemarkerSSTI.java:65:47:65:52 | reader | semmle.label | reader | +| FreemarkerSSTI.java:71:17:71:44 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| FreemarkerSSTI.java:74:19:74:40 | new StringReader(...) : StringReader | semmle.label | new StringReader(...) : StringReader | +| FreemarkerSSTI.java:74:36:74:39 | code : String | semmle.label | code : String | +| FreemarkerSSTI.java:77:36:77:41 | reader | semmle.label | reader | +| FreemarkerSSTI.java:83:17:83:44 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| FreemarkerSSTI.java:86:19:86:40 | new StringReader(...) : StringReader | semmle.label | new StringReader(...) : StringReader | +| FreemarkerSSTI.java:86:36:86:39 | code : String | semmle.label | code : String | +| FreemarkerSSTI.java:88:47:88:52 | reader | semmle.label | reader | +| FreemarkerSSTI.java:93:17:93:44 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| FreemarkerSSTI.java:96:42:96:45 | code | semmle.label | code | +| FreemarkerSSTI.java:101:17:101:44 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| FreemarkerSSTI.java:104:42:104:45 | code | semmle.label | code | +| JinJavaSSTI.java:21:21:21:52 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JinJavaSSTI.java:24:44:24:51 | template | semmle.label | template | +| JinJavaSSTI.java:29:21:29:52 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JinJavaSSTI.java:32:55:32:62 | template | semmle.label | template | +| JinJavaSSTI.java:37:21:37:52 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JinJavaSSTI.java:42:55:42:62 | template | semmle.label | template | +| PebbleSSTI.java:18:25:18:60 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| PebbleSSTI.java:20:56:20:67 | templateName | semmle.label | templateName | +| PebbleSSTI.java:25:25:25:60 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| PebbleSSTI.java:27:63:27:74 | templateName | semmle.label | templateName | +| ThymeleafSSTI.java:21:17:21:44 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| ThymeleafSSTI.java:24:27:24:30 | code | semmle.label | code | +| ThymeleafSSTI.java:25:27:25:30 | code | semmle.label | code | +| ThymeleafSSTI.java:26:27:26:30 | code | semmle.label | code | +| ThymeleafSSTI.java:27:27:27:30 | code | semmle.label | code | +| ThymeleafSSTI.java:28:36:28:39 | code | semmle.label | code | +| ThymeleafSSTI.java:29:36:29:39 | code | semmle.label | code | +| ThymeleafSSTI.java:31:24:31:49 | new TemplateSpec(...) : TemplateSpec | semmle.label | new TemplateSpec(...) : TemplateSpec | +| ThymeleafSSTI.java:31:41:31:44 | code : String | semmle.label | code : String | +| ThymeleafSSTI.java:32:27:32:30 | spec | semmle.label | spec | +| ThymeleafSSTI.java:33:27:33:30 | spec | semmle.label | spec | +| ThymeleafSSTI.java:34:36:34:39 | spec | semmle.label | spec | +| VelocitySSTI.java:31:17:31:44 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| VelocitySSTI.java:37:45:37:48 | code | semmle.label | code | +| VelocitySSTI.java:43:17:43:44 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| VelocitySSTI.java:49:25:49:46 | new StringReader(...) : StringReader | semmle.label | new StringReader(...) : StringReader | +| VelocitySSTI.java:49:42:49:45 | code : String | semmle.label | code : String | +| VelocitySSTI.java:51:45:51:50 | reader | semmle.label | reader | +| VelocitySSTI.java:57:17:57:44 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| VelocitySSTI.java:60:25:60:46 | new StringReader(...) : StringReader | semmle.label | new StringReader(...) : StringReader | +| VelocitySSTI.java:60:42:60:45 | code : String | semmle.label | code : String | +| VelocitySSTI.java:61:25:61:30 | reader | semmle.label | reader | +| VelocitySSTI.java:81:17:81:44 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| VelocitySSTI.java:93:37:93:40 | code | semmle.label | code | +| VelocitySSTI.java:94:37:94:58 | new StringReader(...) | semmle.label | new StringReader(...) | +| VelocitySSTI.java:94:54:94:57 | code : String | semmle.label | code : String | +| VelocitySSTI.java:114:17:114:44 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| VelocitySSTI.java:117:37:117:40 | code | semmle.label | code | +subpaths diff --git a/java/ql/test/query-tests/security/CWE-094/TemplateInjection/TemplateInjectionTest.qlref b/java/ql/test/query-tests/security/CWE-094/TemplateInjection/TemplateInjectionTest.qlref new file mode 100644 index 00000000000..e346322b6d4 --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-094/TemplateInjection/TemplateInjectionTest.qlref @@ -0,0 +1,4 @@ +query: Security/CWE/CWE-094/TemplateInjection.ql +postprocess: + - utils/test/PrettyPrintModels.ql + - utils/test/InlineExpectationsTestQuery.ql diff --git a/java/ql/test/query-tests/security/CWE-094/ThymeleafSSTI.java b/java/ql/test/query-tests/security/CWE-094/TemplateInjection/ThymeleafSSTI.java similarity index 66% rename from java/ql/test/query-tests/security/CWE-094/ThymeleafSSTI.java rename to java/ql/test/query-tests/security/CWE-094/TemplateInjection/ThymeleafSSTI.java index 4b390668948..669b287ea79 100644 --- a/java/ql/test/query-tests/security/CWE-094/ThymeleafSSTI.java +++ b/java/ql/test/query-tests/security/CWE-094/TemplateInjection/ThymeleafSSTI.java @@ -18,20 +18,20 @@ import org.thymeleaf.context.Context; public class ThymeleafSSTI { @GetMapping(value = "bad1") public void bad1(HttpServletRequest request) { - String code = request.getParameter("code"); + String code = request.getParameter("code"); // $ Source try { TemplateEngine templateEngine = new TemplateEngine(); - templateEngine.process(code, (Set) null, (Context) null); // $hasTemplateInjection - templateEngine.process(code, (Set) null, (Context) null, (Writer) null); // $hasTemplateInjection - templateEngine.process(code, (Context) null); // $hasTemplateInjection - templateEngine.process(code, (Context) null, (Writer) null); // $hasTemplateInjection - templateEngine.processThrottled(code, (Set) null, (Context) null); // $hasTemplateInjection - templateEngine.processThrottled(code, (Context) null); // $hasTemplateInjection + templateEngine.process(code, (Set) null, (Context) null); // $ Alert + templateEngine.process(code, (Set) null, (Context) null, (Writer) null); // $ Alert + templateEngine.process(code, (Context) null); // $ Alert + templateEngine.process(code, (Context) null, (Writer) null); // $ Alert + templateEngine.processThrottled(code, (Set) null, (Context) null); // $ Alert + templateEngine.processThrottled(code, (Context) null); // $ Alert TemplateSpec spec = new TemplateSpec(code, ""); - templateEngine.process(spec, (Context) null); // $hasTemplateInjection - templateEngine.process(spec, (Context) null, (Writer) null); // $hasTemplateInjection - templateEngine.processThrottled(spec, (Context) null); // $hasTemplateInjection + templateEngine.process(spec, (Context) null); // $ Alert + templateEngine.process(spec, (Context) null, (Writer) null); // $ Alert + templateEngine.processThrottled(spec, (Context) null); // $ Alert } catch (Exception e) { } } diff --git a/java/ql/test/query-tests/security/CWE-094/VelocitySSTI.java b/java/ql/test/query-tests/security/CWE-094/TemplateInjection/VelocitySSTI.java similarity index 83% rename from java/ql/test/query-tests/security/CWE-094/VelocitySSTI.java rename to java/ql/test/query-tests/security/CWE-094/TemplateInjection/VelocitySSTI.java index 09c7a07058f..463a653525e 100644 --- a/java/ql/test/query-tests/security/CWE-094/VelocitySSTI.java +++ b/java/ql/test/query-tests/security/CWE-094/TemplateInjection/VelocitySSTI.java @@ -28,19 +28,19 @@ public class VelocitySSTI { @GetMapping(value = "bad1") public void bad1(HttpServletRequest request) { String name = "ttemplate"; - String code = request.getParameter("code"); + String code = request.getParameter("code"); // $ Source VelocityContext context = null; String s = "We are using $project $name to render this."; StringWriter w = new StringWriter(); - Velocity.evaluate(context, w, "mystring", code); // $hasTemplateInjection + Velocity.evaluate(context, w, "mystring", code); // $ Alert } @GetMapping(value = "bad2") public void bad2(HttpServletRequest request) { String name = "ttemplate"; - String code = request.getParameter("code"); + String code = request.getParameter("code"); // $ Source VelocityContext context = null; @@ -48,17 +48,17 @@ public class VelocitySSTI { StringWriter w = new StringWriter(); StringReader reader = new StringReader(code); - Velocity.evaluate(context, w, "mystring", reader); // $hasTemplateInjection + Velocity.evaluate(context, w, "mystring", reader); // $ Alert } @GetMapping(value = "bad3") public void bad3(HttpServletRequest request) { String name = "ttemplate"; - String code = request.getParameter("code"); + String code = request.getParameter("code"); // $ Source RuntimeServices runtimeServices = null; StringReader reader = new StringReader(code); - runtimeServices.parse(reader, new Template()); // $hasTemplateInjection + runtimeServices.parse(reader, new Template()); // $ Alert } @GetMapping(value = "good1") @@ -78,7 +78,7 @@ public class VelocitySSTI { @GetMapping(value = "bad5") public void bad5(HttpServletRequest request) { String name = "ttemplate"; - String code = request.getParameter("code"); + String code = request.getParameter("code"); // $ Source VelocityContext context = new VelocityContext(); context.put("code", code); @@ -90,8 +90,8 @@ public class VelocitySSTI { ctx.put("key", code); engine.evaluate(ctx, null, null, (String) null); // Safe engine.evaluate(ctx, null, null, (Reader) null); // Safe - engine.evaluate(null, null, null, code); // $hasTemplateInjection - engine.evaluate(null, null, null, new StringReader(code)); // $hasTemplateInjection + engine.evaluate(null, null, null, code); // $ Alert + engine.evaluate(null, null, null, new StringReader(code)); // $ Alert } @GetMapping(value = "good2") @@ -111,10 +111,10 @@ public class VelocitySSTI { @GetMapping(value = "bad6") public void bad6(HttpServletRequest request) { - String code = request.getParameter("code"); + String code = request.getParameter("code"); // $ Source StringResourceRepository repo = new StringResourceRepositoryImpl(); - repo.putStringResource("woogie2", code); // $hasTemplateInjection + repo.putStringResource("woogie2", code); // $ Alert } } diff --git a/java/ql/test/query-tests/security/CWE-094/TemplateInjection/options b/java/ql/test/query-tests/security/CWE-094/TemplateInjection/options new file mode 100644 index 00000000000..d7c8332682b --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-094/TemplateInjection/options @@ -0,0 +1 @@ +//semmle-extractor-options: --javac-args -cp ${testdir}/../../../../stubs/validation-api-2.0.1.Final:${testdir}/../../../../stubs/springframework-5.8.x:${testdir}/../../../../stubs/apache-commons-jexl-2.1.1:${testdir}/../../../../stubs/apache-commons-jexl-3.1:${testdir}/../../../../stubs/apache-commons-logging-1.2:${testdir}/../../../../stubs/mvel2-2.4.7:${testdir}/../../../../stubs/groovy-all-3.0.7:${testdir}/../../../../stubs/servlet-api-2.4:${testdir}/../../../../stubs/scriptengine:${testdir}/../../../../stubs/jsr223-api:${testdir}/../../../../stubs/apache-freemarker-2.3.31:${testdir}/../../../../stubs/jinjava-2.6.0:${testdir}/../../../../stubs/pebble-3.1.5:${testdir}/../../../../stubs/thymeleaf-3.0.14:${testdir}/../../../../stubs/apache-velocity-2.3:${testdir}/../../../..//stubs/google-android-9.0.0 diff --git a/java/ql/test/query-tests/security/CWE-094/TemplateInjectionTest.expected b/java/ql/test/query-tests/security/CWE-094/TemplateInjectionTest.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/java/ql/test/query-tests/security/CWE-094/TemplateInjectionTest.ql b/java/ql/test/query-tests/security/CWE-094/TemplateInjectionTest.ql deleted file mode 100644 index 809175bcd37..00000000000 --- a/java/ql/test/query-tests/security/CWE-094/TemplateInjectionTest.ql +++ /dev/null @@ -1,18 +0,0 @@ -import java -import semmle.code.java.security.TemplateInjectionQuery -import utils.test.InlineExpectationsTest - -module TemplateInjectionTest implements TestSig { - string getARelevantTag() { result = "hasTemplateInjection" } - - predicate hasActualResult(Location location, string element, string tag, string value) { - tag = "hasTemplateInjection" and - exists(DataFlow::Node sink | TemplateInjectionFlow::flowTo(sink) | - sink.getLocation() = location and - element = sink.toString() and - value = "" - ) - } -} - -import MakeTest diff --git a/java/ql/test/query-tests/security/CWE-266/IntentUriPermissionManipulationTest.expected b/java/ql/test/query-tests/security/CWE-266/IntentUriPermissionManipulationTest.expected index e69de29bb2d..d96abdbd6bc 100644 --- a/java/ql/test/query-tests/security/CWE-266/IntentUriPermissionManipulationTest.expected +++ b/java/ql/test/query-tests/security/CWE-266/IntentUriPermissionManipulationTest.expected @@ -0,0 +1,43 @@ +#select +| MainActivity.java:13:34:13:39 | intent | MainActivity.java:12:29:12:39 | getIntent(...) : Intent | MainActivity.java:13:34:13:39 | intent | This Intent can be set with arbitrary flags from a $@, and used to give access to internal content providers. | MainActivity.java:12:29:12:39 | getIntent(...) | user-provided value | +| MainActivity.java:17:34:17:44 | extraIntent | MainActivity.java:16:43:16:53 | getIntent(...) : Intent | MainActivity.java:17:34:17:44 | extraIntent | This Intent can be set with arbitrary flags from a $@, and used to give access to internal content providers. | MainActivity.java:16:43:16:53 | getIntent(...) | user-provided value | +| MainActivity.java:33:34:33:39 | intent | MainActivity.java:30:29:30:39 | getIntent(...) : Intent | MainActivity.java:33:34:33:39 | intent | This Intent can be set with arbitrary flags from a $@, and used to give access to internal content providers. | MainActivity.java:30:29:30:39 | getIntent(...) | user-provided value | +| MainActivity.java:46:34:46:39 | intent | MainActivity.java:42:29:42:39 | getIntent(...) : Intent | MainActivity.java:46:34:46:39 | intent | This Intent can be set with arbitrary flags from a $@, and used to give access to internal content providers. | MainActivity.java:42:29:42:39 | getIntent(...) | user-provided value | +| MainActivity.java:52:34:52:39 | intent | MainActivity.java:49:29:49:39 | getIntent(...) : Intent | MainActivity.java:52:34:52:39 | intent | This Intent can be set with arbitrary flags from a $@, and used to give access to internal content providers. | MainActivity.java:49:29:49:39 | getIntent(...) | user-provided value | +| MainActivity.java:60:38:60:43 | intent | MainActivity.java:55:29:55:39 | getIntent(...) : Intent | MainActivity.java:60:38:60:43 | intent | This Intent can be set with arbitrary flags from a $@, and used to give access to internal content providers. | MainActivity.java:55:29:55:39 | getIntent(...) | user-provided value | +| MainActivity.java:71:38:71:43 | intent | MainActivity.java:64:29:64:39 | getIntent(...) : Intent | MainActivity.java:71:38:71:43 | intent | This Intent can be set with arbitrary flags from a $@, and used to give access to internal content providers. | MainActivity.java:64:29:64:39 | getIntent(...) | user-provided value | +| MainActivity.java:81:38:81:43 | intent | MainActivity.java:75:29:75:39 | getIntent(...) : Intent | MainActivity.java:81:38:81:43 | intent | This Intent can be set with arbitrary flags from a $@, and used to give access to internal content providers. | MainActivity.java:75:29:75:39 | getIntent(...) | user-provided value | +edges +| MainActivity.java:12:29:12:39 | getIntent(...) : Intent | MainActivity.java:13:34:13:39 | intent | provenance | Sink:MaD:1 | +| MainActivity.java:16:34:16:87 | (...)... : Intent | MainActivity.java:17:34:17:44 | extraIntent | provenance | Sink:MaD:1 | +| MainActivity.java:16:43:16:53 | getIntent(...) : Intent | MainActivity.java:16:43:16:87 | getParcelableExtra(...) : Parcelable | provenance | MaD:2 | +| MainActivity.java:16:43:16:87 | getParcelableExtra(...) : Parcelable | MainActivity.java:16:34:16:87 | (...)... : Intent | provenance | | +| MainActivity.java:30:29:30:39 | getIntent(...) : Intent | MainActivity.java:33:34:33:39 | intent | provenance | Sink:MaD:1 | +| MainActivity.java:42:29:42:39 | getIntent(...) : Intent | MainActivity.java:46:34:46:39 | intent | provenance | Sink:MaD:1 | +| MainActivity.java:49:29:49:39 | getIntent(...) : Intent | MainActivity.java:52:34:52:39 | intent | provenance | Sink:MaD:1 | +| MainActivity.java:55:29:55:39 | getIntent(...) : Intent | MainActivity.java:60:38:60:43 | intent | provenance | Sink:MaD:1 | +| MainActivity.java:64:29:64:39 | getIntent(...) : Intent | MainActivity.java:71:38:71:43 | intent | provenance | Sink:MaD:1 | +| MainActivity.java:75:29:75:39 | getIntent(...) : Intent | MainActivity.java:81:38:81:43 | intent | provenance | Sink:MaD:1 | +models +| 1 | Sink: android.app; Activity; true; setResult; (int,Intent); ; Argument[1]; pending-intents; manual | +| 2 | Summary: android.content; Intent; true; getParcelableExtra; (String); ; Argument[this].SyntheticField[android.content.Intent.extras].MapValue; ReturnValue; value; manual | +nodes +| MainActivity.java:12:29:12:39 | getIntent(...) : Intent | semmle.label | getIntent(...) : Intent | +| MainActivity.java:13:34:13:39 | intent | semmle.label | intent | +| MainActivity.java:16:34:16:87 | (...)... : Intent | semmle.label | (...)... : Intent | +| MainActivity.java:16:43:16:53 | getIntent(...) : Intent | semmle.label | getIntent(...) : Intent | +| MainActivity.java:16:43:16:87 | getParcelableExtra(...) : Parcelable | semmle.label | getParcelableExtra(...) : Parcelable | +| MainActivity.java:17:34:17:44 | extraIntent | semmle.label | extraIntent | +| MainActivity.java:30:29:30:39 | getIntent(...) : Intent | semmle.label | getIntent(...) : Intent | +| MainActivity.java:33:34:33:39 | intent | semmle.label | intent | +| MainActivity.java:42:29:42:39 | getIntent(...) : Intent | semmle.label | getIntent(...) : Intent | +| MainActivity.java:46:34:46:39 | intent | semmle.label | intent | +| MainActivity.java:49:29:49:39 | getIntent(...) : Intent | semmle.label | getIntent(...) : Intent | +| MainActivity.java:52:34:52:39 | intent | semmle.label | intent | +| MainActivity.java:55:29:55:39 | getIntent(...) : Intent | semmle.label | getIntent(...) : Intent | +| MainActivity.java:60:38:60:43 | intent | semmle.label | intent | +| MainActivity.java:64:29:64:39 | getIntent(...) : Intent | semmle.label | getIntent(...) : Intent | +| MainActivity.java:71:38:71:43 | intent | semmle.label | intent | +| MainActivity.java:75:29:75:39 | getIntent(...) : Intent | semmle.label | getIntent(...) : Intent | +| MainActivity.java:81:38:81:43 | intent | semmle.label | intent | +subpaths diff --git a/java/ql/test/query-tests/security/CWE-266/IntentUriPermissionManipulationTest.ql b/java/ql/test/query-tests/security/CWE-266/IntentUriPermissionManipulationTest.ql deleted file mode 100644 index f2f820743d1..00000000000 --- a/java/ql/test/query-tests/security/CWE-266/IntentUriPermissionManipulationTest.ql +++ /dev/null @@ -1,4 +0,0 @@ -import java -import utils.test.InlineFlowTest -import semmle.code.java.security.IntentUriPermissionManipulationQuery -import TaintFlowTest diff --git a/java/ql/test/query-tests/security/CWE-266/IntentUriPermissionManipulationTest.qlref b/java/ql/test/query-tests/security/CWE-266/IntentUriPermissionManipulationTest.qlref new file mode 100644 index 00000000000..caac7a302e4 --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-266/IntentUriPermissionManipulationTest.qlref @@ -0,0 +1,4 @@ +query: Security/CWE/CWE-266/IntentUriPermissionManipulation.ql +postprocess: + - utils/test/PrettyPrintModels.ql + - utils/test/InlineExpectationsTestQuery.ql diff --git a/java/ql/test/query-tests/security/CWE-266/MainActivity.java b/java/ql/test/query-tests/security/CWE-266/MainActivity.java index 4af80cc2b18..3f146d20af0 100644 --- a/java/ql/test/query-tests/security/CWE-266/MainActivity.java +++ b/java/ql/test/query-tests/security/CWE-266/MainActivity.java @@ -9,12 +9,12 @@ public class MainActivity extends Activity { public void onCreate(Bundle savedInstance) { { - Intent intent = getIntent(); - setResult(RESULT_OK, intent); // $ hasTaintFlow + Intent intent = getIntent(); // $ Source + setResult(RESULT_OK, intent); // $ Alert } { - Intent extraIntent = (Intent) getIntent().getParcelableExtra("extraIntent"); - setResult(RESULT_OK, extraIntent); // $ hasTaintFlow + Intent extraIntent = (Intent) getIntent().getParcelableExtra("extraIntent"); // $ Source + setResult(RESULT_OK, extraIntent); // $ Alert } { Intent intent = getIntent(); @@ -27,10 +27,10 @@ public class MainActivity extends Activity { setResult(RESULT_OK, intent); // Safe } { - Intent intent = getIntent(); + Intent intent = getIntent(); // $ Source intent.setFlags( // Not properly sanitized Intent.FLAG_GRANT_WRITE_URI_PERMISSION | Intent.FLAG_ACTIVITY_CLEAR_TOP); - setResult(RESULT_OK, intent); // $ hasTaintFlow + setResult(RESULT_OK, intent); // $ Alert } { Intent intent = getIntent(); @@ -39,46 +39,46 @@ public class MainActivity extends Activity { setResult(RESULT_OK, intent); // Safe } { - Intent intent = getIntent(); + Intent intent = getIntent(); // $ Source // Combined, the following two calls are a sanitizer intent.removeFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); intent.removeFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION); - setResult(RESULT_OK, intent); // $ SPURIOUS: $ hasTaintFlow + setResult(RESULT_OK, intent); // $ SPURIOUS: $ Alert } { - Intent intent = getIntent(); + Intent intent = getIntent(); // $ Source intent.removeFlags( // Not properly sanitized Intent.FLAG_GRANT_WRITE_URI_PERMISSION | Intent.FLAG_ACTIVITY_CLEAR_TOP); - setResult(RESULT_OK, intent); // $ hasTaintFlow + setResult(RESULT_OK, intent); // $ Alert } { - Intent intent = getIntent(); + Intent intent = getIntent(); // $ Source // Good check if (intent.getData().equals(Uri.parse("content://safe/uri"))) { setResult(RESULT_OK, intent); // Safe } else { - setResult(RESULT_OK, intent); // $ hasTaintFlow + setResult(RESULT_OK, intent); // $ Alert } } { - Intent intent = getIntent(); + Intent intent = getIntent(); // $ Source int flags = intent.getFlags(); // Good check if ((flags & Intent.FLAG_GRANT_READ_URI_PERMISSION) == 0 && (flags & Intent.FLAG_GRANT_WRITE_URI_PERMISSION) == 0) { setResult(RESULT_OK, intent); // Safe } else { - setResult(RESULT_OK, intent); // $ hasTaintFlow + setResult(RESULT_OK, intent); // $ Alert } } { - Intent intent = getIntent(); + Intent intent = getIntent(); // $ Source int flags = intent.getFlags(); // Insufficient check if ((flags & Intent.FLAG_GRANT_READ_URI_PERMISSION) == 0) { - setResult(RESULT_OK, intent); // $ MISSING: $ hasTaintFlow + setResult(RESULT_OK, intent); // $ MISSING: $ Alert } else { - setResult(RESULT_OK, intent); // $ hasTaintFlow + setResult(RESULT_OK, intent); // $ Alert } } } diff --git a/java/ql/test/query-tests/security/CWE-295/InsecureTrustManager/InsecureTrustManagerTest.expected b/java/ql/test/query-tests/security/CWE-295/InsecureTrustManager/InsecureTrustManagerTest.expected index e69de29bb2d..6d142f2b634 100644 --- a/java/ql/test/query-tests/security/CWE-295/InsecureTrustManager/InsecureTrustManagerTest.expected +++ b/java/ql/test/query-tests/security/CWE-295/InsecureTrustManager/InsecureTrustManagerTest.expected @@ -0,0 +1,94 @@ +#select +| InsecureTrustManagerTest.java:124:22:124:33 | trustManager | InsecureTrustManagerTest.java:123:53:123:78 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:124:22:124:33 | trustManager | This uses $@, which is defined in $@ and trusts any certificate. | InsecureTrustManagerTest.java:123:53:123:78 | new InsecureTrustManager(...) : InsecureTrustManager | TrustManager | InsecureTrustManagerTest.java:35:23:35:42 | InsecureTrustManager | InsecureTrustManagerTest$InsecureTrustManager | +| InsecureTrustManagerTest.java:148:23:148:34 | trustManager | InsecureTrustManagerTest.java:147:54:147:79 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:148:23:148:34 | trustManager | This uses $@, which is defined in $@ and trusts any certificate. | InsecureTrustManagerTest.java:147:54:147:79 | new InsecureTrustManager(...) : InsecureTrustManager | TrustManager | InsecureTrustManagerTest.java:35:23:35:42 | InsecureTrustManager | InsecureTrustManagerTest$InsecureTrustManager | +| InsecureTrustManagerTest.java:180:23:180:34 | trustManager | InsecureTrustManagerTest.java:179:54:179:79 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:180:23:180:34 | trustManager | This uses $@, which is defined in $@ and trusts any certificate. | InsecureTrustManagerTest.java:179:54:179:79 | new InsecureTrustManager(...) : InsecureTrustManager | TrustManager | InsecureTrustManagerTest.java:35:23:35:42 | InsecureTrustManager | InsecureTrustManagerTest$InsecureTrustManager | +| InsecureTrustManagerTest.java:212:23:212:34 | trustManager | InsecureTrustManagerTest.java:211:54:211:79 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:212:23:212:34 | trustManager | This uses $@, which is defined in $@ and trusts any certificate. | InsecureTrustManagerTest.java:211:54:211:79 | new InsecureTrustManager(...) : InsecureTrustManager | TrustManager | InsecureTrustManagerTest.java:35:23:35:42 | InsecureTrustManager | InsecureTrustManagerTest$InsecureTrustManager | +| InsecureTrustManagerTest.java:229:23:229:34 | trustManager | InsecureTrustManagerTest.java:228:54:228:79 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:229:23:229:34 | trustManager | This uses $@, which is defined in $@ and trusts any certificate. | InsecureTrustManagerTest.java:228:54:228:79 | new InsecureTrustManager(...) : InsecureTrustManager | TrustManager | InsecureTrustManagerTest.java:35:23:35:42 | InsecureTrustManager | InsecureTrustManagerTest$InsecureTrustManager | +| InsecureTrustManagerTest.java:247:23:247:34 | trustManager | InsecureTrustManagerTest.java:246:54:246:79 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:247:23:247:34 | trustManager | This uses $@, which is defined in $@ and trusts any certificate. | InsecureTrustManagerTest.java:246:54:246:79 | new InsecureTrustManager(...) : InsecureTrustManager | TrustManager | InsecureTrustManagerTest.java:35:23:35:42 | InsecureTrustManager | InsecureTrustManagerTest$InsecureTrustManager | +| InsecureTrustManagerTest.java:267:22:267:33 | trustManager | InsecureTrustManagerTest.java:266:53:266:78 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:267:22:267:33 | trustManager | This uses $@, which is defined in $@ and trusts any certificate. | InsecureTrustManagerTest.java:266:53:266:78 | new InsecureTrustManager(...) : InsecureTrustManager | TrustManager | InsecureTrustManagerTest.java:35:23:35:42 | InsecureTrustManager | InsecureTrustManagerTest$InsecureTrustManager | +| InsecureTrustManagerTest.java:279:22:279:33 | trustManager | InsecureTrustManagerTest.java:278:53:278:78 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:279:22:279:33 | trustManager | This uses $@, which is defined in $@ and trusts any certificate. | InsecureTrustManagerTest.java:278:53:278:78 | new InsecureTrustManager(...) : InsecureTrustManager | TrustManager | InsecureTrustManagerTest.java:35:23:35:42 | InsecureTrustManager | InsecureTrustManagerTest$InsecureTrustManager | +| InsecureTrustManagerTest.java:291:22:291:33 | trustManager | InsecureTrustManagerTest.java:290:53:290:78 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:291:22:291:33 | trustManager | This uses $@, which is defined in $@ and trusts any certificate. | InsecureTrustManagerTest.java:290:53:290:78 | new InsecureTrustManager(...) : InsecureTrustManager | TrustManager | InsecureTrustManagerTest.java:35:23:35:42 | InsecureTrustManager | InsecureTrustManagerTest$InsecureTrustManager | +| InsecureTrustManagerTest.java:303:22:303:33 | trustManager | InsecureTrustManagerTest.java:302:53:302:78 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:303:22:303:33 | trustManager | This uses $@, which is defined in $@ and trusts any certificate. | InsecureTrustManagerTest.java:302:53:302:78 | new InsecureTrustManager(...) : InsecureTrustManager | TrustManager | InsecureTrustManagerTest.java:35:23:35:42 | InsecureTrustManager | InsecureTrustManagerTest$InsecureTrustManager | +| InsecureTrustManagerTest.java:315:22:315:33 | trustManager | InsecureTrustManagerTest.java:314:53:314:78 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:315:22:315:33 | trustManager | This uses $@, which is defined in $@ and trusts any certificate. | InsecureTrustManagerTest.java:314:53:314:78 | new InsecureTrustManager(...) : InsecureTrustManager | TrustManager | InsecureTrustManagerTest.java:35:23:35:42 | InsecureTrustManager | InsecureTrustManagerTest$InsecureTrustManager | +| InsecureTrustManagerTest.java:327:22:327:33 | trustManager | InsecureTrustManagerTest.java:326:53:326:78 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:327:22:327:33 | trustManager | This uses $@, which is defined in $@ and trusts any certificate. | InsecureTrustManagerTest.java:326:53:326:78 | new InsecureTrustManager(...) : InsecureTrustManager | TrustManager | InsecureTrustManagerTest.java:35:23:35:42 | InsecureTrustManager | InsecureTrustManagerTest$InsecureTrustManager | +| InsecureTrustManagerTest.java:339:22:339:33 | trustManager | InsecureTrustManagerTest.java:338:53:338:78 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:339:22:339:33 | trustManager | This uses $@, which is defined in $@ and trusts any certificate. | InsecureTrustManagerTest.java:338:53:338:78 | new InsecureTrustManager(...) : InsecureTrustManager | TrustManager | InsecureTrustManagerTest.java:35:23:35:42 | InsecureTrustManager | InsecureTrustManagerTest$InsecureTrustManager | +| InsecureTrustManagerTest.java:352:22:352:33 | trustManager | InsecureTrustManagerTest.java:351:53:351:78 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:352:22:352:33 | trustManager | This uses $@, which is defined in $@ and trusts any certificate. | InsecureTrustManagerTest.java:351:53:351:78 | new InsecureTrustManager(...) : InsecureTrustManager | TrustManager | InsecureTrustManagerTest.java:35:23:35:42 | InsecureTrustManager | InsecureTrustManagerTest$InsecureTrustManager | +| InsecureTrustManagerTest.java:360:22:360:33 | trustManager | InsecureTrustManagerTest.java:359:53:359:78 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:360:22:360:33 | trustManager | This uses $@, which is defined in $@ and trusts any certificate. | InsecureTrustManagerTest.java:359:53:359:78 | new InsecureTrustManager(...) : InsecureTrustManager | TrustManager | InsecureTrustManagerTest.java:35:23:35:42 | InsecureTrustManager | InsecureTrustManagerTest$InsecureTrustManager | +edges +| InsecureTrustManagerTest.java:123:33:123:79 | {...} : TrustManager[] [[]] : InsecureTrustManager | InsecureTrustManagerTest.java:124:22:124:33 | trustManager | provenance | | +| InsecureTrustManagerTest.java:123:53:123:78 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:123:33:123:79 | {...} : TrustManager[] [[]] : InsecureTrustManager | provenance | | +| InsecureTrustManagerTest.java:147:34:147:80 | {...} : TrustManager[] [[]] : InsecureTrustManager | InsecureTrustManagerTest.java:148:23:148:34 | trustManager | provenance | | +| InsecureTrustManagerTest.java:147:54:147:79 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:147:34:147:80 | {...} : TrustManager[] [[]] : InsecureTrustManager | provenance | | +| InsecureTrustManagerTest.java:179:34:179:80 | {...} : TrustManager[] [[]] : InsecureTrustManager | InsecureTrustManagerTest.java:180:23:180:34 | trustManager | provenance | | +| InsecureTrustManagerTest.java:179:54:179:79 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:179:34:179:80 | {...} : TrustManager[] [[]] : InsecureTrustManager | provenance | | +| InsecureTrustManagerTest.java:211:34:211:80 | {...} : TrustManager[] [[]] : InsecureTrustManager | InsecureTrustManagerTest.java:212:23:212:34 | trustManager | provenance | | +| InsecureTrustManagerTest.java:211:54:211:79 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:211:34:211:80 | {...} : TrustManager[] [[]] : InsecureTrustManager | provenance | | +| InsecureTrustManagerTest.java:228:34:228:80 | {...} : TrustManager[] [[]] : InsecureTrustManager | InsecureTrustManagerTest.java:229:23:229:34 | trustManager | provenance | | +| InsecureTrustManagerTest.java:228:54:228:79 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:228:34:228:80 | {...} : TrustManager[] [[]] : InsecureTrustManager | provenance | | +| InsecureTrustManagerTest.java:246:34:246:80 | {...} : TrustManager[] [[]] : InsecureTrustManager | InsecureTrustManagerTest.java:247:23:247:34 | trustManager | provenance | | +| InsecureTrustManagerTest.java:246:54:246:79 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:246:34:246:80 | {...} : TrustManager[] [[]] : InsecureTrustManager | provenance | | +| InsecureTrustManagerTest.java:266:33:266:79 | {...} : TrustManager[] [[]] : InsecureTrustManager | InsecureTrustManagerTest.java:267:22:267:33 | trustManager | provenance | | +| InsecureTrustManagerTest.java:266:53:266:78 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:266:33:266:79 | {...} : TrustManager[] [[]] : InsecureTrustManager | provenance | | +| InsecureTrustManagerTest.java:278:33:278:79 | {...} : TrustManager[] [[]] : InsecureTrustManager | InsecureTrustManagerTest.java:279:22:279:33 | trustManager | provenance | | +| InsecureTrustManagerTest.java:278:53:278:78 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:278:33:278:79 | {...} : TrustManager[] [[]] : InsecureTrustManager | provenance | | +| InsecureTrustManagerTest.java:290:33:290:79 | {...} : TrustManager[] [[]] : InsecureTrustManager | InsecureTrustManagerTest.java:291:22:291:33 | trustManager | provenance | | +| InsecureTrustManagerTest.java:290:53:290:78 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:290:33:290:79 | {...} : TrustManager[] [[]] : InsecureTrustManager | provenance | | +| InsecureTrustManagerTest.java:302:33:302:79 | {...} : TrustManager[] [[]] : InsecureTrustManager | InsecureTrustManagerTest.java:303:22:303:33 | trustManager | provenance | | +| InsecureTrustManagerTest.java:302:53:302:78 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:302:33:302:79 | {...} : TrustManager[] [[]] : InsecureTrustManager | provenance | | +| InsecureTrustManagerTest.java:314:33:314:79 | {...} : TrustManager[] [[]] : InsecureTrustManager | InsecureTrustManagerTest.java:315:22:315:33 | trustManager | provenance | | +| InsecureTrustManagerTest.java:314:53:314:78 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:314:33:314:79 | {...} : TrustManager[] [[]] : InsecureTrustManager | provenance | | +| InsecureTrustManagerTest.java:326:33:326:79 | {...} : TrustManager[] [[]] : InsecureTrustManager | InsecureTrustManagerTest.java:327:22:327:33 | trustManager | provenance | | +| InsecureTrustManagerTest.java:326:53:326:78 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:326:33:326:79 | {...} : TrustManager[] [[]] : InsecureTrustManager | provenance | | +| InsecureTrustManagerTest.java:338:33:338:79 | {...} : TrustManager[] [[]] : InsecureTrustManager | InsecureTrustManagerTest.java:339:22:339:33 | trustManager | provenance | | +| InsecureTrustManagerTest.java:338:53:338:78 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:338:33:338:79 | {...} : TrustManager[] [[]] : InsecureTrustManager | provenance | | +| InsecureTrustManagerTest.java:351:33:351:79 | {...} : TrustManager[] [[]] : InsecureTrustManager | InsecureTrustManagerTest.java:352:22:352:33 | trustManager | provenance | | +| InsecureTrustManagerTest.java:351:53:351:78 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:351:33:351:79 | {...} : TrustManager[] [[]] : InsecureTrustManager | provenance | | +| InsecureTrustManagerTest.java:359:33:359:79 | {...} : TrustManager[] [[]] : InsecureTrustManager | InsecureTrustManagerTest.java:360:22:360:33 | trustManager | provenance | | +| InsecureTrustManagerTest.java:359:53:359:78 | new InsecureTrustManager(...) : InsecureTrustManager | InsecureTrustManagerTest.java:359:33:359:79 | {...} : TrustManager[] [[]] : InsecureTrustManager | provenance | | +nodes +| InsecureTrustManagerTest.java:123:33:123:79 | {...} : TrustManager[] [[]] : InsecureTrustManager | semmle.label | {...} : TrustManager[] [[]] : InsecureTrustManager | +| InsecureTrustManagerTest.java:123:53:123:78 | new InsecureTrustManager(...) : InsecureTrustManager | semmle.label | new InsecureTrustManager(...) : InsecureTrustManager | +| InsecureTrustManagerTest.java:124:22:124:33 | trustManager | semmle.label | trustManager | +| InsecureTrustManagerTest.java:147:34:147:80 | {...} : TrustManager[] [[]] : InsecureTrustManager | semmle.label | {...} : TrustManager[] [[]] : InsecureTrustManager | +| InsecureTrustManagerTest.java:147:54:147:79 | new InsecureTrustManager(...) : InsecureTrustManager | semmle.label | new InsecureTrustManager(...) : InsecureTrustManager | +| InsecureTrustManagerTest.java:148:23:148:34 | trustManager | semmle.label | trustManager | +| InsecureTrustManagerTest.java:179:34:179:80 | {...} : TrustManager[] [[]] : InsecureTrustManager | semmle.label | {...} : TrustManager[] [[]] : InsecureTrustManager | +| InsecureTrustManagerTest.java:179:54:179:79 | new InsecureTrustManager(...) : InsecureTrustManager | semmle.label | new InsecureTrustManager(...) : InsecureTrustManager | +| InsecureTrustManagerTest.java:180:23:180:34 | trustManager | semmle.label | trustManager | +| InsecureTrustManagerTest.java:211:34:211:80 | {...} : TrustManager[] [[]] : InsecureTrustManager | semmle.label | {...} : TrustManager[] [[]] : InsecureTrustManager | +| InsecureTrustManagerTest.java:211:54:211:79 | new InsecureTrustManager(...) : InsecureTrustManager | semmle.label | new InsecureTrustManager(...) : InsecureTrustManager | +| InsecureTrustManagerTest.java:212:23:212:34 | trustManager | semmle.label | trustManager | +| InsecureTrustManagerTest.java:228:34:228:80 | {...} : TrustManager[] [[]] : InsecureTrustManager | semmle.label | {...} : TrustManager[] [[]] : InsecureTrustManager | +| InsecureTrustManagerTest.java:228:54:228:79 | new InsecureTrustManager(...) : InsecureTrustManager | semmle.label | new InsecureTrustManager(...) : InsecureTrustManager | +| InsecureTrustManagerTest.java:229:23:229:34 | trustManager | semmle.label | trustManager | +| InsecureTrustManagerTest.java:246:34:246:80 | {...} : TrustManager[] [[]] : InsecureTrustManager | semmle.label | {...} : TrustManager[] [[]] : InsecureTrustManager | +| InsecureTrustManagerTest.java:246:54:246:79 | new InsecureTrustManager(...) : InsecureTrustManager | semmle.label | new InsecureTrustManager(...) : InsecureTrustManager | +| InsecureTrustManagerTest.java:247:23:247:34 | trustManager | semmle.label | trustManager | +| InsecureTrustManagerTest.java:266:33:266:79 | {...} : TrustManager[] [[]] : InsecureTrustManager | semmle.label | {...} : TrustManager[] [[]] : InsecureTrustManager | +| InsecureTrustManagerTest.java:266:53:266:78 | new InsecureTrustManager(...) : InsecureTrustManager | semmle.label | new InsecureTrustManager(...) : InsecureTrustManager | +| InsecureTrustManagerTest.java:267:22:267:33 | trustManager | semmle.label | trustManager | +| InsecureTrustManagerTest.java:278:33:278:79 | {...} : TrustManager[] [[]] : InsecureTrustManager | semmle.label | {...} : TrustManager[] [[]] : InsecureTrustManager | +| InsecureTrustManagerTest.java:278:53:278:78 | new InsecureTrustManager(...) : InsecureTrustManager | semmle.label | new InsecureTrustManager(...) : InsecureTrustManager | +| InsecureTrustManagerTest.java:279:22:279:33 | trustManager | semmle.label | trustManager | +| InsecureTrustManagerTest.java:290:33:290:79 | {...} : TrustManager[] [[]] : InsecureTrustManager | semmle.label | {...} : TrustManager[] [[]] : InsecureTrustManager | +| InsecureTrustManagerTest.java:290:53:290:78 | new InsecureTrustManager(...) : InsecureTrustManager | semmle.label | new InsecureTrustManager(...) : InsecureTrustManager | +| InsecureTrustManagerTest.java:291:22:291:33 | trustManager | semmle.label | trustManager | +| InsecureTrustManagerTest.java:302:33:302:79 | {...} : TrustManager[] [[]] : InsecureTrustManager | semmle.label | {...} : TrustManager[] [[]] : InsecureTrustManager | +| InsecureTrustManagerTest.java:302:53:302:78 | new InsecureTrustManager(...) : InsecureTrustManager | semmle.label | new InsecureTrustManager(...) : InsecureTrustManager | +| InsecureTrustManagerTest.java:303:22:303:33 | trustManager | semmle.label | trustManager | +| InsecureTrustManagerTest.java:314:33:314:79 | {...} : TrustManager[] [[]] : InsecureTrustManager | semmle.label | {...} : TrustManager[] [[]] : InsecureTrustManager | +| InsecureTrustManagerTest.java:314:53:314:78 | new InsecureTrustManager(...) : InsecureTrustManager | semmle.label | new InsecureTrustManager(...) : InsecureTrustManager | +| InsecureTrustManagerTest.java:315:22:315:33 | trustManager | semmle.label | trustManager | +| InsecureTrustManagerTest.java:326:33:326:79 | {...} : TrustManager[] [[]] : InsecureTrustManager | semmle.label | {...} : TrustManager[] [[]] : InsecureTrustManager | +| InsecureTrustManagerTest.java:326:53:326:78 | new InsecureTrustManager(...) : InsecureTrustManager | semmle.label | new InsecureTrustManager(...) : InsecureTrustManager | +| InsecureTrustManagerTest.java:327:22:327:33 | trustManager | semmle.label | trustManager | +| InsecureTrustManagerTest.java:338:33:338:79 | {...} : TrustManager[] [[]] : InsecureTrustManager | semmle.label | {...} : TrustManager[] [[]] : InsecureTrustManager | +| InsecureTrustManagerTest.java:338:53:338:78 | new InsecureTrustManager(...) : InsecureTrustManager | semmle.label | new InsecureTrustManager(...) : InsecureTrustManager | +| InsecureTrustManagerTest.java:339:22:339:33 | trustManager | semmle.label | trustManager | +| InsecureTrustManagerTest.java:351:33:351:79 | {...} : TrustManager[] [[]] : InsecureTrustManager | semmle.label | {...} : TrustManager[] [[]] : InsecureTrustManager | +| InsecureTrustManagerTest.java:351:53:351:78 | new InsecureTrustManager(...) : InsecureTrustManager | semmle.label | new InsecureTrustManager(...) : InsecureTrustManager | +| InsecureTrustManagerTest.java:352:22:352:33 | trustManager | semmle.label | trustManager | +| InsecureTrustManagerTest.java:359:33:359:79 | {...} : TrustManager[] [[]] : InsecureTrustManager | semmle.label | {...} : TrustManager[] [[]] : InsecureTrustManager | +| InsecureTrustManagerTest.java:359:53:359:78 | new InsecureTrustManager(...) : InsecureTrustManager | semmle.label | new InsecureTrustManager(...) : InsecureTrustManager | +| InsecureTrustManagerTest.java:360:22:360:33 | trustManager | semmle.label | trustManager | +subpaths diff --git a/java/ql/test/query-tests/security/CWE-295/InsecureTrustManager/InsecureTrustManagerTest.java b/java/ql/test/query-tests/security/CWE-295/InsecureTrustManager/InsecureTrustManagerTest.java index 17e8fc60afc..4e098fa2988 100644 --- a/java/ql/test/query-tests/security/CWE-295/InsecureTrustManager/InsecureTrustManagerTest.java +++ b/java/ql/test/query-tests/security/CWE-295/InsecureTrustManager/InsecureTrustManagerTest.java @@ -120,8 +120,8 @@ public class InsecureTrustManagerTest { private static void directInsecureTrustManagerCall() throws NoSuchAlgorithmException, KeyManagementException { SSLContext context = SSLContext.getInstance("TLS"); - TrustManager[] trustManager = new TrustManager[] {new InsecureTrustManager()}; - context.init(null, trustManager, null); // $ hasValueFlow + TrustManager[] trustManager = new TrustManager[] {new InsecureTrustManager()}; // $ Source + context.init(null, trustManager, null); // $ Alert } private static void namedVariableFlagDirectInsecureTrustManagerCall() @@ -144,8 +144,8 @@ public class InsecureTrustManagerTest { throws NoSuchAlgorithmException, KeyManagementException { if (SOME_NAME_THAT_IS_NOT_A_FLAG_NAME) { SSLContext context = SSLContext.getInstance("TLS"); - TrustManager[] trustManager = new TrustManager[] {new InsecureTrustManager()}; - context.init(null, trustManager, null); // $ hasValueFlow + TrustManager[] trustManager = new TrustManager[] {new InsecureTrustManager()}; // $ Source + context.init(null, trustManager, null); // $ Alert } } @@ -176,8 +176,8 @@ public class InsecureTrustManagerTest { throws NoSuchAlgorithmException, KeyManagementException { if (Boolean.parseBoolean(System.getProperty("SOME_NAME_THAT_IS_NOT_A_FLAG_NAME"))) { SSLContext context = SSLContext.getInstance("TLS"); - TrustManager[] trustManager = new TrustManager[] {new InsecureTrustManager()}; - context.init(null, trustManager, null); // $ hasValueFlow + TrustManager[] trustManager = new TrustManager[] {new InsecureTrustManager()}; // $ Source + context.init(null, trustManager, null); // $ Alert } } @@ -208,8 +208,8 @@ public class InsecureTrustManagerTest { throws NoSuchAlgorithmException, KeyManagementException { if (is42TheAnswerForEverything()) { SSLContext context = SSLContext.getInstance("TLS"); - TrustManager[] trustManager = new TrustManager[] {new InsecureTrustManager()}; - context.init(null, trustManager, null); // $ hasValueFlow + TrustManager[] trustManager = new TrustManager[] {new InsecureTrustManager()}; // $ Source + context.init(null, trustManager, null); // $ Alert } } @@ -225,8 +225,8 @@ public class InsecureTrustManagerTest { String schemaFromHttpRequest = "HTTPS"; if (schemaFromHttpRequest.equalsIgnoreCase("https")) { SSLContext context = SSLContext.getInstance("TLS"); - TrustManager[] trustManager = new TrustManager[] {new InsecureTrustManager()}; - context.init(null, trustManager, null); // $ hasValueFlow + TrustManager[] trustManager = new TrustManager[] {new InsecureTrustManager()}; // $ Source + context.init(null, trustManager, null); // $ Alert } } @@ -243,8 +243,8 @@ public class InsecureTrustManagerTest { String schemaFromHttpRequest = "HTTPS"; if (!schemaFromHttpRequest.equalsIgnoreCase("https")) { SSLContext context = SSLContext.getInstance("TLS"); - TrustManager[] trustManager = new TrustManager[] {new InsecureTrustManager()}; - context.init(null, trustManager, null); // $ hasValueFlow + TrustManager[] trustManager = new TrustManager[] {new InsecureTrustManager()}; // $ Source + context.init(null, trustManager, null); // $ Alert } } @@ -263,8 +263,8 @@ public class InsecureTrustManagerTest { } SSLContext context = SSLContext.getInstance("TLS"); - TrustManager[] trustManager = new TrustManager[] {new InsecureTrustManager()}; - context.init(null, trustManager, null); // $ hasValueFlow + TrustManager[] trustManager = new TrustManager[] {new InsecureTrustManager()}; // $ Source + context.init(null, trustManager, null); // $ Alert } @@ -275,8 +275,8 @@ public class InsecureTrustManagerTest { } SSLContext context = SSLContext.getInstance("TLS"); - TrustManager[] trustManager = new TrustManager[] {new InsecureTrustManager()}; - context.init(null, trustManager, null); // $ hasValueFlow + TrustManager[] trustManager = new TrustManager[] {new InsecureTrustManager()}; // $ Source + context.init(null, trustManager, null); // $ Alert } @@ -287,8 +287,8 @@ public class InsecureTrustManagerTest { } SSLContext context = SSLContext.getInstance("TLS"); - TrustManager[] trustManager = new TrustManager[] {new InsecureTrustManager()}; - context.init(null, trustManager, null); // $ hasValueFlow + TrustManager[] trustManager = new TrustManager[] {new InsecureTrustManager()}; // $ Source + context.init(null, trustManager, null); // $ Alert } @@ -299,8 +299,8 @@ public class InsecureTrustManagerTest { } SSLContext context = SSLContext.getInstance("TLS"); - TrustManager[] trustManager = new TrustManager[] {new InsecureTrustManager()}; - context.init(null, trustManager, null); // $ hasValueFlow + TrustManager[] trustManager = new TrustManager[] {new InsecureTrustManager()}; // $ Source + context.init(null, trustManager, null); // $ Alert } @@ -311,8 +311,8 @@ public class InsecureTrustManagerTest { } SSLContext context = SSLContext.getInstance("TLS"); - TrustManager[] trustManager = new TrustManager[] {new InsecureTrustManager()}; - context.init(null, trustManager, null); // $ hasValueFlow + TrustManager[] trustManager = new TrustManager[] {new InsecureTrustManager()}; // $ Source + context.init(null, trustManager, null); // $ Alert } @@ -323,8 +323,8 @@ public class InsecureTrustManagerTest { } SSLContext context = SSLContext.getInstance("TLS"); - TrustManager[] trustManager = new TrustManager[] {new InsecureTrustManager()}; - context.init(null, trustManager, null); // $ hasValueFlow + TrustManager[] trustManager = new TrustManager[] {new InsecureTrustManager()}; // $ Source + context.init(null, trustManager, null); // $ Alert } private static void isEqualsIgnoreCaseNOTGuardingDirectInsecureTrustManagerCall() @@ -335,8 +335,8 @@ public class InsecureTrustManagerTest { } SSLContext context = SSLContext.getInstance("TLS"); - TrustManager[] trustManager = new TrustManager[] {new InsecureTrustManager()}; - context.init(null, trustManager, null); // $ hasValueFlow + TrustManager[] trustManager = new TrustManager[] {new InsecureTrustManager()}; // $ Source + context.init(null, trustManager, null); // $ Alert } @@ -348,15 +348,15 @@ public class InsecureTrustManagerTest { } SSLContext context = SSLContext.getInstance("TLS"); - TrustManager[] trustManager = new TrustManager[] {new InsecureTrustManager()}; - context.init(null, trustManager, null); // $ hasValueFlow + TrustManager[] trustManager = new TrustManager[] {new InsecureTrustManager()}; // $ Source + context.init(null, trustManager, null); // $ Alert } private static void disableTrustManager() throws NoSuchAlgorithmException, KeyManagementException { SSLContext context = SSLContext.getInstance("TLS"); - TrustManager[] trustManager = new TrustManager[] {new InsecureTrustManager()}; - context.init(null, trustManager, null); // $ hasValueFlow + TrustManager[] trustManager = new TrustManager[] {new InsecureTrustManager()}; // $ Source + context.init(null, trustManager, null); // $ Alert } } diff --git a/java/ql/test/query-tests/security/CWE-295/InsecureTrustManager/InsecureTrustManagerTest.ql b/java/ql/test/query-tests/security/CWE-295/InsecureTrustManager/InsecureTrustManagerTest.ql deleted file mode 100644 index 1c0ffc49eba..00000000000 --- a/java/ql/test/query-tests/security/CWE-295/InsecureTrustManager/InsecureTrustManagerTest.ql +++ /dev/null @@ -1,18 +0,0 @@ -import java -import semmle.code.java.security.InsecureTrustManagerQuery -import utils.test.InlineExpectationsTest - -module InsecureTrustManagerTest implements TestSig { - string getARelevantTag() { result = "hasValueFlow" } - - predicate hasActualResult(Location location, string element, string tag, string value) { - tag = "hasValueFlow" and - exists(DataFlow::Node sink | InsecureTrustManagerFlow::flowTo(sink) | - sink.getLocation() = location and - element = sink.toString() and - value = "" - ) - } -} - -import MakeTest diff --git a/java/ql/test/query-tests/security/CWE-295/InsecureTrustManager/InsecureTrustManagerTest.qlref b/java/ql/test/query-tests/security/CWE-295/InsecureTrustManager/InsecureTrustManagerTest.qlref new file mode 100644 index 00000000000..f4c00b42347 --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-295/InsecureTrustManager/InsecureTrustManagerTest.qlref @@ -0,0 +1,4 @@ +query: Security/CWE/CWE-295/InsecureTrustManager.ql +postprocess: + - utils/test/PrettyPrintModels.ql + - utils/test/InlineExpectationsTestQuery.ql diff --git a/java/ql/test/query-tests/security/CWE-312/CleartextStorageCookie/CleartextStorageCookieTest.expected b/java/ql/test/query-tests/security/CWE-312/CleartextStorageCookie/CleartextStorageCookieTest.expected new file mode 100644 index 00000000000..d39985a091b --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-312/CleartextStorageCookie/CleartextStorageCookieTest.expected @@ -0,0 +1,21 @@ +| CleartextStorageCookieTest.java:22:7:22:40 | addCookie(...) | This stores cookie $@ containing $@ which was $@. | CleartextStorageCookieTest.java:20:31:20:62 | new Cookie(...) | new Cookie(...) | CleartextStorageCookieTest.java:20:54:20:61 | password | sensitive data | CleartextStorageCookieTest.java:20:54:20:61 | password | added to the cookie | +| CleartextStorageCookieTest.java:44:7:44:32 | addCookie(...) | This stores cookie $@ containing $@ which was $@. | CleartextStorageCookieTest.java:43:23:43:51 | new Cookie(...) | new Cookie(...) | CleartextStorageCookieTest.java:20:54:20:61 | password | sensitive data | CleartextStorageCookieTest.java:43:46:43:50 | value | added to the cookie | +| CleartextStorageCookieTest.java:44:7:44:32 | addCookie(...) | This stores cookie $@ containing $@ which was $@. | CleartextStorageCookieTest.java:43:23:43:51 | new Cookie(...) | new Cookie(...) | CleartextStorageCookieTest.java:21:31:21:38 | password | sensitive data | CleartextStorageCookieTest.java:43:46:43:50 | value | added to the cookie | +| CleartextStorageCookieTest.java:44:7:44:32 | addCookie(...) | This stores cookie $@ containing $@ which was $@. | CleartextStorageCookieTest.java:43:23:43:51 | new Cookie(...) | new Cookie(...) | CleartextStorageCookieTest.java:23:69:23:76 | password | sensitive data | CleartextStorageCookieTest.java:43:46:43:50 | value | added to the cookie | +| CleartextStorageCookieTest.java:44:7:44:32 | addCookie(...) | This stores cookie $@ containing $@ which was $@. | CleartextStorageCookieTest.java:43:23:43:51 | new Cookie(...) | new Cookie(...) | CleartextStorageCookieTest.java:24:46:24:53 | password | sensitive data | CleartextStorageCookieTest.java:43:46:43:50 | value | added to the cookie | +| CleartextStorageCookieTest.java:44:7:44:32 | addCookie(...) | This stores cookie $@ containing $@ which was $@. | CleartextStorageCookieTest.java:43:23:43:51 | new Cookie(...) | new Cookie(...) | CleartextStorageCookieTest.java:33:67:33:74 | password | sensitive data | CleartextStorageCookieTest.java:43:46:43:50 | value | added to the cookie | +| CleartextStorageCookieTest.java:44:7:44:32 | addCookie(...) | This stores cookie $@ containing $@ which was $@. | CleartextStorageCookieTest.java:43:23:43:51 | new Cookie(...) | new Cookie(...) | CleartextStorageCookieTest.java:34:36:34:43 | password | sensitive data | CleartextStorageCookieTest.java:43:46:43:50 | value | added to the cookie | +| CleartextStorageCookieTest.java:44:7:44:32 | addCookie(...) | This stores cookie $@ containing $@ which was $@. | CleartextStorageCookieTest.java:43:23:43:51 | new Cookie(...) | new Cookie(...) | CleartextStorageCookieTest.java:37:84:37:91 | password | sensitive data | CleartextStorageCookieTest.java:43:46:43:50 | value | added to the cookie | +| CleartextStorageCookieTest.java:44:7:44:32 | addCookie(...) | This stores cookie $@ containing $@ which was $@. | CleartextStorageCookieTest.java:43:23:43:51 | new Cookie(...) | new Cookie(...) | CleartextStorageCookieTest.java:38:51:38:58 | password | sensitive data | CleartextStorageCookieTest.java:43:46:43:50 | value | added to the cookie | +| CleartextStorageCookieTest.java:44:7:44:32 | addCookie(...) | This stores cookie $@ containing $@ which was $@. | CleartextStorageCookieTest.java:43:23:43:51 | new Cookie(...) | new Cookie(...) | CleartextStorageCookieTest.java:42:40:42:47 | password | sensitive data | CleartextStorageCookieTest.java:43:46:43:50 | value | added to the cookie | +| CleartextStorageCookieTest.java:52:7:52:50 | addCookie(...) | This stores cookie $@ containing $@ which was $@. | CleartextStorageCookieTest.java:52:26:52:49 | new Cookie(...) | new Cookie(...) | CleartextStorageCookieTest.java:20:54:20:61 | password | sensitive data | CleartextStorageCookieTest.java:52:45:52:48 | data | added to the cookie | +| CleartextStorageCookieTest.java:52:7:52:50 | addCookie(...) | This stores cookie $@ containing $@ which was $@. | CleartextStorageCookieTest.java:52:26:52:49 | new Cookie(...) | new Cookie(...) | CleartextStorageCookieTest.java:21:31:21:38 | password | sensitive data | CleartextStorageCookieTest.java:52:45:52:48 | data | added to the cookie | +| CleartextStorageCookieTest.java:52:7:52:50 | addCookie(...) | This stores cookie $@ containing $@ which was $@. | CleartextStorageCookieTest.java:52:26:52:49 | new Cookie(...) | new Cookie(...) | CleartextStorageCookieTest.java:23:69:23:76 | password | sensitive data | CleartextStorageCookieTest.java:52:45:52:48 | data | added to the cookie | +| CleartextStorageCookieTest.java:52:7:52:50 | addCookie(...) | This stores cookie $@ containing $@ which was $@. | CleartextStorageCookieTest.java:52:26:52:49 | new Cookie(...) | new Cookie(...) | CleartextStorageCookieTest.java:24:46:24:53 | password | sensitive data | CleartextStorageCookieTest.java:52:45:52:48 | data | added to the cookie | +| CleartextStorageCookieTest.java:52:7:52:50 | addCookie(...) | This stores cookie $@ containing $@ which was $@. | CleartextStorageCookieTest.java:52:26:52:49 | new Cookie(...) | new Cookie(...) | CleartextStorageCookieTest.java:33:67:33:74 | password | sensitive data | CleartextStorageCookieTest.java:52:45:52:48 | data | added to the cookie | +| CleartextStorageCookieTest.java:52:7:52:50 | addCookie(...) | This stores cookie $@ containing $@ which was $@. | CleartextStorageCookieTest.java:52:26:52:49 | new Cookie(...) | new Cookie(...) | CleartextStorageCookieTest.java:34:36:34:43 | password | sensitive data | CleartextStorageCookieTest.java:52:45:52:48 | data | added to the cookie | +| CleartextStorageCookieTest.java:52:7:52:50 | addCookie(...) | This stores cookie $@ containing $@ which was $@. | CleartextStorageCookieTest.java:52:26:52:49 | new Cookie(...) | new Cookie(...) | CleartextStorageCookieTest.java:37:84:37:91 | password | sensitive data | CleartextStorageCookieTest.java:52:45:52:48 | data | added to the cookie | +| CleartextStorageCookieTest.java:52:7:52:50 | addCookie(...) | This stores cookie $@ containing $@ which was $@. | CleartextStorageCookieTest.java:52:26:52:49 | new Cookie(...) | new Cookie(...) | CleartextStorageCookieTest.java:38:51:38:58 | password | sensitive data | CleartextStorageCookieTest.java:52:45:52:48 | data | added to the cookie | +| CleartextStorageCookieTest.java:52:7:52:50 | addCookie(...) | This stores cookie $@ containing $@ which was $@. | CleartextStorageCookieTest.java:52:26:52:49 | new Cookie(...) | new Cookie(...) | CleartextStorageCookieTest.java:42:40:42:47 | password | sensitive data | CleartextStorageCookieTest.java:52:45:52:48 | data | added to the cookie | +| CleartextStorageCookieTest.java:52:7:52:50 | addCookie(...) | This stores cookie $@ containing $@ which was $@. | CleartextStorageCookieTest.java:52:26:52:49 | new Cookie(...) | new Cookie(...) | CleartextStorageCookieTest.java:48:77:48:84 | password | sensitive data | CleartextStorageCookieTest.java:52:45:52:48 | data | added to the cookie | +| CleartextStorageCookieTest.java:52:7:52:50 | addCookie(...) | This stores cookie $@ containing $@ which was $@. | CleartextStorageCookieTest.java:52:26:52:49 | new Cookie(...) | new Cookie(...) | CleartextStorageCookieTest.java:49:59:49:83 | getPassword(...) | sensitive data | CleartextStorageCookieTest.java:52:45:52:48 | data | added to the cookie | diff --git a/java/ql/test/query-tests/security/CWE-312/CleartextStorageCookie/CleartextStorageCookieTest.java b/java/ql/test/query-tests/security/CWE-312/CleartextStorageCookie/CleartextStorageCookieTest.java new file mode 100644 index 00000000000..5e4e949ca11 --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-312/CleartextStorageCookie/CleartextStorageCookieTest.java @@ -0,0 +1,79 @@ +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.Cookie; +import org.owasp.esapi.Encoder; +import java.nio.charset.StandardCharsets; +import java.util.Base64; +import java.security.MessageDigest; +import java.net.PasswordAuthentication; + +public class CleartextStorageCookieTest extends HttpServlet { + HttpServletResponse response; + String name = "user"; + String password = "BP@ssw0rd"; // $ Source + + public void doGet() throws Exception { + { + Cookie nameCookie = new Cookie("name", name); + nameCookie.setValue(name); + response.addCookie(nameCookie); // Safe + Cookie passwordCookie = new Cookie("password", password); + passwordCookie.setValue(password); + response.addCookie(passwordCookie); // $ Alert + Cookie encodedPasswordCookie = new Cookie("password", encrypt(password)); + encodedPasswordCookie.setValue(encrypt(password)); + response.addCookie(encodedPasswordCookie); // Safe + } + { + io.netty.handler.codec.http.Cookie nettyNameCookie = + new io.netty.handler.codec.http.DefaultCookie("name", name); + nettyNameCookie.setValue(name); // Safe + + io.netty.handler.codec.http.Cookie nettyPasswordCookie = + new io.netty.handler.codec.http.DefaultCookie("password", password); + nettyPasswordCookie.setValue(password); // $ MISSING: Alert (netty not supported by query) + + io.netty.handler.codec.http.cookie.Cookie nettyEncodedPasswordCookie = + new io.netty.handler.codec.http.cookie.DefaultCookie("password", encrypt(password)); + nettyEncodedPasswordCookie.setValue(encrypt(password)); // Safe + } + { + Encoder enc = null; + String value = enc.encodeForHTML(password); + Cookie cookie = new Cookie("password", value); + response.addCookie(cookie); // $ Alert + } + { + String data; + PasswordAuthentication credentials = new PasswordAuthentication(name, password.toCharArray()); + data = credentials.getUserName() + ":" + new String(credentials.getPassword()); + + // BAD: store data in a cookie in cleartext form + response.addCookie(new Cookie("auth", data)); // $ Alert + } + { + String data; + PasswordAuthentication credentials = + new PasswordAuthentication(name, password.toCharArray()); + String salt = "ThisIsMySalt"; + MessageDigest messageDigest = MessageDigest.getInstance("SHA-512"); + messageDigest.reset(); + String credentialsToHash = + credentials.getUserName() + ":" + new String(credentials.getPassword()); + byte[] hashedCredsAsBytes = + messageDigest.digest((salt+credentialsToHash).getBytes("UTF-8")); + data = new String(hashedCredsAsBytes); + + // GOOD: store data in a cookie in encrypted form + response.addCookie(new Cookie("auth", data)); // Safe + } + } + + + private static String encrypt(String cleartext) throws Exception { + MessageDigest digest = MessageDigest.getInstance("SHA-256"); + byte[] hash = digest.digest(cleartext.getBytes(StandardCharsets.UTF_8)); + String encoded = Base64.getEncoder().encodeToString(hash); + return encoded; + } +} diff --git a/java/ql/test/query-tests/security/CWE-312/CleartextStorageCookie/CleartextStorageCookieTest.qlref b/java/ql/test/query-tests/security/CWE-312/CleartextStorageCookie/CleartextStorageCookieTest.qlref new file mode 100644 index 00000000000..923d1277eeb --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-312/CleartextStorageCookie/CleartextStorageCookieTest.qlref @@ -0,0 +1,4 @@ +query: Security/CWE/CWE-312/CleartextStorageCookie.ql +postprocess: + - utils/test/PrettyPrintModels.ql + - utils/test/InlineExpectationsTestQuery.ql diff --git a/java/ql/test/query-tests/security/CWE-312/CleartextStorageCookie/options b/java/ql/test/query-tests/security/CWE-312/CleartextStorageCookie/options new file mode 100644 index 00000000000..068e49acc97 --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-312/CleartextStorageCookie/options @@ -0,0 +1 @@ +//semmle-extractor-options: --javac-args -cp ${testdir}/../../../../stubs/servlet-api-2.4:${testdir}/../../../../stubs/apache-commons-lang3-3.7:${testdir}/../../../../stubs/esapi-2.0.1:${testdir}/../../../../stubs/netty-4.1.x diff --git a/java/ql/test/query-tests/security/CWE-326/InsufficientKeySizeTest.expected b/java/ql/test/query-tests/security/CWE-326/InsufficientKeySizeTest.expected index e69de29bb2d..25c0a616e86 100644 --- a/java/ql/test/query-tests/security/CWE-326/InsufficientKeySizeTest.expected +++ b/java/ql/test/query-tests/security/CWE-326/InsufficientKeySizeTest.expected @@ -0,0 +1,120 @@ +#select +| InsufficientKeySizeTest.java:17:26:17:27 | 64 | InsufficientKeySizeTest.java:17:26:17:27 | 64 | InsufficientKeySizeTest.java:17:26:17:27 | 64 | This $@ is less than the recommended key size of 128 bits. | InsufficientKeySizeTest.java:17:26:17:27 | 64 | key size | +| InsufficientKeySizeTest.java:27:26:27:30 | size1 | InsufficientKeySizeTest.java:23:31:23:32 | 64 : Number | InsufficientKeySizeTest.java:27:26:27:30 | size1 | This $@ is less than the recommended key size of 128 bits. | InsufficientKeySizeTest.java:23:31:23:32 | 64 | key size | +| InsufficientKeySizeTest.java:30:26:30:30 | size2 | InsufficientKeySizeTest.java:24:25:24:26 | 64 : Number | InsufficientKeySizeTest.java:30:26:30:30 | size2 | This $@ is less than the recommended key size of 128 bits. | InsufficientKeySizeTest.java:24:25:24:26 | 64 | key size | +| InsufficientKeySizeTest.java:40:26:40:27 | 64 | InsufficientKeySizeTest.java:40:26:40:27 | 64 | InsufficientKeySizeTest.java:40:26:40:27 | 64 | This $@ is less than the recommended key size of 128 bits. | InsufficientKeySizeTest.java:40:26:40:27 | 64 | key size | +| InsufficientKeySizeTest.java:51:36:51:39 | 1024 | InsufficientKeySizeTest.java:51:36:51:39 | 1024 | InsufficientKeySizeTest.java:51:36:51:39 | 1024 | This $@ is less than the recommended key size of 2048 bits. | InsufficientKeySizeTest.java:51:36:51:39 | 1024 | key size | +| InsufficientKeySizeTest.java:58:73:58:76 | 1024 | InsufficientKeySizeTest.java:58:73:58:76 | 1024 | InsufficientKeySizeTest.java:58:73:58:76 | 1024 | This $@ is less than the recommended key size of 2048 bits. | InsufficientKeySizeTest.java:58:73:58:76 | 1024 | key size | +| InsufficientKeySizeTest.java:62:63:62:66 | 1024 | InsufficientKeySizeTest.java:62:63:62:66 | 1024 | InsufficientKeySizeTest.java:62:63:62:66 | 1024 | This $@ is less than the recommended key size of 2048 bits. | InsufficientKeySizeTest.java:62:63:62:66 | 1024 | key size | +| InsufficientKeySizeTest.java:69:36:69:40 | size1 | InsufficientKeySizeTest.java:65:31:65:34 | 1024 : Number | InsufficientKeySizeTest.java:69:36:69:40 | size1 | This $@ is less than the recommended key size of 2048 bits. | InsufficientKeySizeTest.java:65:31:65:34 | 1024 | key size | +| InsufficientKeySizeTest.java:72:36:72:40 | size2 | InsufficientKeySizeTest.java:66:25:66:28 | 1024 : Number | InsufficientKeySizeTest.java:72:36:72:40 | size2 | This $@ is less than the recommended key size of 2048 bits. | InsufficientKeySizeTest.java:66:25:66:28 | 1024 | key size | +| InsufficientKeySizeTest.java:81:36:81:50 | getRSAKeySize(...) | InsufficientKeySizeTest.java:255:40:255:43 | 1024 : Number | InsufficientKeySizeTest.java:81:36:81:50 | getRSAKeySize(...) | This $@ is less than the recommended key size of 2048 bits. | InsufficientKeySizeTest.java:255:40:255:43 | 1024 | key size | +| InsufficientKeySizeTest.java:86:36:86:39 | 1024 | InsufficientKeySizeTest.java:86:36:86:39 | 1024 | InsufficientKeySizeTest.java:86:36:86:39 | 1024 | This $@ is less than the recommended key size of 2048 bits. | InsufficientKeySizeTest.java:86:36:86:39 | 1024 | key size | +| InsufficientKeySizeTest.java:97:36:97:39 | 1024 | InsufficientKeySizeTest.java:97:36:97:39 | 1024 | InsufficientKeySizeTest.java:97:36:97:39 | 1024 | This $@ is less than the recommended key size of 2048 bits. | InsufficientKeySizeTest.java:97:36:97:39 | 1024 | key size | +| InsufficientKeySizeTest.java:104:67:104:70 | 1024 | InsufficientKeySizeTest.java:104:67:104:70 | 1024 | InsufficientKeySizeTest.java:104:67:104:70 | 1024 | This $@ is less than the recommended key size of 2048 bits. | InsufficientKeySizeTest.java:104:67:104:70 | 1024 | key size | +| InsufficientKeySizeTest.java:108:60:108:63 | 1024 | InsufficientKeySizeTest.java:108:60:108:63 | 1024 | InsufficientKeySizeTest.java:108:60:108:63 | 1024 | This $@ is less than the recommended key size of 2048 bits. | InsufficientKeySizeTest.java:108:60:108:63 | 1024 | key size | +| InsufficientKeySizeTest.java:112:27:112:30 | 1024 | InsufficientKeySizeTest.java:112:27:112:30 | 1024 | InsufficientKeySizeTest.java:112:27:112:30 | 1024 | This $@ is less than the recommended key size of 2048 bits. | InsufficientKeySizeTest.java:112:27:112:30 | 1024 | key size | +| InsufficientKeySizeTest.java:117:28:117:31 | 1024 | InsufficientKeySizeTest.java:117:28:117:31 | 1024 | InsufficientKeySizeTest.java:117:28:117:31 | 1024 | This $@ is less than the recommended key size of 2048 bits. | InsufficientKeySizeTest.java:117:28:117:31 | 1024 | key size | +| InsufficientKeySizeTest.java:128:36:128:39 | 1024 | InsufficientKeySizeTest.java:128:36:128:39 | 1024 | InsufficientKeySizeTest.java:128:36:128:39 | 1024 | This $@ is less than the recommended key size of 2048 bits. | InsufficientKeySizeTest.java:128:36:128:39 | 1024 | key size | +| InsufficientKeySizeTest.java:135:64:135:67 | 1024 | InsufficientKeySizeTest.java:135:64:135:67 | 1024 | InsufficientKeySizeTest.java:135:64:135:67 | 1024 | This $@ is less than the recommended key size of 2048 bits. | InsufficientKeySizeTest.java:135:64:135:67 | 1024 | key size | +| InsufficientKeySizeTest.java:139:59:139:62 | 1024 | InsufficientKeySizeTest.java:139:59:139:62 | 1024 | InsufficientKeySizeTest.java:139:59:139:62 | 1024 | This $@ is less than the recommended key size of 2048 bits. | InsufficientKeySizeTest.java:139:59:139:62 | 1024 | key size | +| InsufficientKeySizeTest.java:143:27:143:30 | 1024 | InsufficientKeySizeTest.java:143:27:143:30 | 1024 | InsufficientKeySizeTest.java:143:27:143:30 | 1024 | This $@ is less than the recommended key size of 2048 bits. | InsufficientKeySizeTest.java:143:27:143:30 | 1024 | key size | +| InsufficientKeySizeTest.java:150:36:150:38 | 128 | InsufficientKeySizeTest.java:150:36:150:38 | 128 | InsufficientKeySizeTest.java:150:36:150:38 | 128 | This $@ is less than the recommended key size of 256 bits. | InsufficientKeySizeTest.java:150:36:150:38 | 128 | key size | +| InsufficientKeySizeTest.java:154:65:154:75 | "secp112r1" | InsufficientKeySizeTest.java:154:65:154:75 | "secp112r1" | InsufficientKeySizeTest.java:154:65:154:75 | "secp112r1" | This $@ is less than the recommended key size of EC bits. | InsufficientKeySizeTest.java:154:65:154:75 | "secp112r1" | key size | +| InsufficientKeySizeTest.java:158:59:158:69 | "secp112r1" | InsufficientKeySizeTest.java:158:59:158:69 | "secp112r1" | InsufficientKeySizeTest.java:158:59:158:69 | "secp112r1" | This $@ is less than the recommended key size of EC bits. | InsufficientKeySizeTest.java:158:59:158:69 | "secp112r1" | key size | +| InsufficientKeySizeTest.java:165:65:165:82 | "X9.62 prime192v2" | InsufficientKeySizeTest.java:165:65:165:82 | "X9.62 prime192v2" | InsufficientKeySizeTest.java:165:65:165:82 | "X9.62 prime192v2" | This $@ is less than the recommended key size of EC bits. | InsufficientKeySizeTest.java:165:65:165:82 | "X9.62 prime192v2" | key size | +| InsufficientKeySizeTest.java:169:65:169:82 | "X9.62 c2tnb191v3" | InsufficientKeySizeTest.java:169:65:169:82 | "X9.62 c2tnb191v3" | InsufficientKeySizeTest.java:169:65:169:82 | "X9.62 c2tnb191v3" | This $@ is less than the recommended key size of EC bits. | InsufficientKeySizeTest.java:169:65:169:82 | "X9.62 c2tnb191v3" | key size | +| InsufficientKeySizeTest.java:173:65:173:75 | "sect163k1" | InsufficientKeySizeTest.java:173:65:173:75 | "sect163k1" | InsufficientKeySizeTest.java:173:65:173:75 | "sect163k1" | This $@ is less than the recommended key size of EC bits. | InsufficientKeySizeTest.java:173:65:173:75 | "sect163k1" | key size | +| InsufficientKeySizeTest.java:181:65:181:76 | "prime192v2" | InsufficientKeySizeTest.java:181:65:181:76 | "prime192v2" | InsufficientKeySizeTest.java:181:65:181:76 | "prime192v2" | This $@ is less than the recommended key size of EC bits. | InsufficientKeySizeTest.java:181:65:181:76 | "prime192v2" | key size | +| InsufficientKeySizeTest.java:189:65:189:76 | "c2tnb191v1" | InsufficientKeySizeTest.java:189:65:189:76 | "c2tnb191v1" | InsufficientKeySizeTest.java:189:65:189:76 | "c2tnb191v1" | This $@ is less than the recommended key size of EC bits. | InsufficientKeySizeTest.java:189:65:189:76 | "c2tnb191v1" | key size | +| InsufficientKeySizeTest.java:197:64:197:74 | "secp112r1" | InsufficientKeySizeTest.java:197:64:197:74 | "secp112r1" | InsufficientKeySizeTest.java:197:64:197:74 | "secp112r1" | This $@ is less than the recommended key size of EC bits. | InsufficientKeySizeTest.java:197:64:197:74 | "secp112r1" | key size | +| InsufficientKeySizeTest.java:207:66:207:75 | curveName1 | InsufficientKeySizeTest.java:205:39:205:49 | "secp112r1" : String | InsufficientKeySizeTest.java:207:66:207:75 | curveName1 | This $@ is less than the recommended key size of EC bits. | InsufficientKeySizeTest.java:205:39:205:49 | "secp112r1" | key size | +| InsufficientKeySizeTest.java:212:66:212:75 | curveName2 | InsufficientKeySizeTest.java:210:33:210:43 | "secp112r1" : String | InsufficientKeySizeTest.java:212:66:212:75 | curveName2 | This $@ is less than the recommended key size of EC bits. | InsufficientKeySizeTest.java:210:33:210:43 | "secp112r1" | key size | +| InsufficientKeySizeTest.java:219:21:219:27 | keySize | InsufficientKeySizeTest.java:24:25:24:26 | 64 : Number | InsufficientKeySizeTest.java:219:21:219:27 | keySize | This $@ is less than the recommended key size of 128 bits. | InsufficientKeySizeTest.java:24:25:24:26 | 64 | key size | +| InsufficientKeySizeTest.java:225:21:225:27 | keySize | InsufficientKeySizeTest.java:35:30:35:31 | 64 : Number | InsufficientKeySizeTest.java:225:21:225:27 | keySize | This $@ is less than the recommended key size of 128 bits. | InsufficientKeySizeTest.java:35:30:35:31 | 64 | key size | +| InsufficientKeySizeTest.java:230:31:230:37 | keySize | InsufficientKeySizeTest.java:66:25:66:28 | 1024 : Number | InsufficientKeySizeTest.java:230:31:230:37 | keySize | This $@ is less than the recommended key size of 2048 bits. | InsufficientKeySizeTest.java:66:25:66:28 | 1024 | key size | +| InsufficientKeySizeTest.java:236:31:236:37 | keySize | InsufficientKeySizeTest.java:77:36:77:39 | 1024 : Number | InsufficientKeySizeTest.java:236:31:236:37 | keySize | This $@ is less than the recommended key size of 2048 bits. | InsufficientKeySizeTest.java:77:36:77:39 | 1024 | key size | +| InsufficientKeySizeTest.java:246:31:246:37 | keySize | InsufficientKeySizeTest.java:199:24:199:26 | 128 : Number | InsufficientKeySizeTest.java:246:31:246:37 | keySize | This $@ is less than the recommended key size of 256 bits. | InsufficientKeySizeTest.java:199:24:199:26 | 128 | key size | +| InsufficientKeySizeTest.java:252:31:252:37 | keySize | InsufficientKeySizeTest.java:202:40:202:42 | 128 : Number | InsufficientKeySizeTest.java:252:31:252:37 | keySize | This $@ is less than the recommended key size of 256 bits. | InsufficientKeySizeTest.java:202:40:202:42 | 128 | key size | +edges +| InsufficientKeySizeTest.java:23:31:23:32 | 64 : Number | InsufficientKeySizeTest.java:27:26:27:30 | size1 | provenance | | +| InsufficientKeySizeTest.java:24:25:24:26 | 64 : Number | InsufficientKeySizeTest.java:30:26:30:30 | size2 | provenance | | +| InsufficientKeySizeTest.java:24:25:24:26 | 64 : Number | InsufficientKeySizeTest.java:34:35:34:39 | size2 : Number | provenance | | +| InsufficientKeySizeTest.java:34:35:34:39 | size2 : Number | InsufficientKeySizeTest.java:217:46:217:56 | keySize : Number | provenance | | +| InsufficientKeySizeTest.java:35:30:35:31 | 64 : Number | InsufficientKeySizeTest.java:223:41:223:51 | keySize : Number | provenance | | +| InsufficientKeySizeTest.java:65:31:65:34 | 1024 : Number | InsufficientKeySizeTest.java:69:36:69:40 | size1 | provenance | | +| InsufficientKeySizeTest.java:66:25:66:28 | 1024 : Number | InsufficientKeySizeTest.java:72:36:72:40 | size2 | provenance | | +| InsufficientKeySizeTest.java:66:25:66:28 | 1024 : Number | InsufficientKeySizeTest.java:76:41:76:45 | size2 : Number | provenance | | +| InsufficientKeySizeTest.java:76:41:76:45 | size2 : Number | InsufficientKeySizeTest.java:228:52:228:62 | keySize : Number | provenance | | +| InsufficientKeySizeTest.java:77:36:77:39 | 1024 : Number | InsufficientKeySizeTest.java:234:47:234:57 | keySize : Number | provenance | | +| InsufficientKeySizeTest.java:199:24:199:26 | 128 : Number | InsufficientKeySizeTest.java:201:41:201:44 | size : Number | provenance | | +| InsufficientKeySizeTest.java:201:41:201:44 | size : Number | InsufficientKeySizeTest.java:244:52:244:62 | keySize : Number | provenance | | +| InsufficientKeySizeTest.java:202:40:202:42 | 128 : Number | InsufficientKeySizeTest.java:250:51:250:61 | keySize : Number | provenance | | +| InsufficientKeySizeTest.java:205:39:205:49 | "secp112r1" : String | InsufficientKeySizeTest.java:207:66:207:75 | curveName1 | provenance | | +| InsufficientKeySizeTest.java:210:33:210:43 | "secp112r1" : String | InsufficientKeySizeTest.java:212:66:212:75 | curveName2 | provenance | | +| InsufficientKeySizeTest.java:217:46:217:56 | keySize : Number | InsufficientKeySizeTest.java:219:21:219:27 | keySize | provenance | | +| InsufficientKeySizeTest.java:223:41:223:51 | keySize : Number | InsufficientKeySizeTest.java:225:21:225:27 | keySize | provenance | | +| InsufficientKeySizeTest.java:228:52:228:62 | keySize : Number | InsufficientKeySizeTest.java:230:31:230:37 | keySize | provenance | | +| InsufficientKeySizeTest.java:234:47:234:57 | keySize : Number | InsufficientKeySizeTest.java:236:31:236:37 | keySize | provenance | | +| InsufficientKeySizeTest.java:244:52:244:62 | keySize : Number | InsufficientKeySizeTest.java:246:31:246:37 | keySize | provenance | | +| InsufficientKeySizeTest.java:250:51:250:61 | keySize : Number | InsufficientKeySizeTest.java:252:31:252:37 | keySize | provenance | | +| InsufficientKeySizeTest.java:255:40:255:43 | 1024 : Number | InsufficientKeySizeTest.java:81:36:81:50 | getRSAKeySize(...) | provenance | | +nodes +| InsufficientKeySizeTest.java:17:26:17:27 | 64 | semmle.label | 64 | +| InsufficientKeySizeTest.java:23:31:23:32 | 64 : Number | semmle.label | 64 : Number | +| InsufficientKeySizeTest.java:24:25:24:26 | 64 : Number | semmle.label | 64 : Number | +| InsufficientKeySizeTest.java:27:26:27:30 | size1 | semmle.label | size1 | +| InsufficientKeySizeTest.java:30:26:30:30 | size2 | semmle.label | size2 | +| InsufficientKeySizeTest.java:34:35:34:39 | size2 : Number | semmle.label | size2 : Number | +| InsufficientKeySizeTest.java:35:30:35:31 | 64 : Number | semmle.label | 64 : Number | +| InsufficientKeySizeTest.java:40:26:40:27 | 64 | semmle.label | 64 | +| InsufficientKeySizeTest.java:51:36:51:39 | 1024 | semmle.label | 1024 | +| InsufficientKeySizeTest.java:58:73:58:76 | 1024 | semmle.label | 1024 | +| InsufficientKeySizeTest.java:62:63:62:66 | 1024 | semmle.label | 1024 | +| InsufficientKeySizeTest.java:65:31:65:34 | 1024 : Number | semmle.label | 1024 : Number | +| InsufficientKeySizeTest.java:66:25:66:28 | 1024 : Number | semmle.label | 1024 : Number | +| InsufficientKeySizeTest.java:69:36:69:40 | size1 | semmle.label | size1 | +| InsufficientKeySizeTest.java:72:36:72:40 | size2 | semmle.label | size2 | +| InsufficientKeySizeTest.java:76:41:76:45 | size2 : Number | semmle.label | size2 : Number | +| InsufficientKeySizeTest.java:77:36:77:39 | 1024 : Number | semmle.label | 1024 : Number | +| InsufficientKeySizeTest.java:81:36:81:50 | getRSAKeySize(...) | semmle.label | getRSAKeySize(...) | +| InsufficientKeySizeTest.java:86:36:86:39 | 1024 | semmle.label | 1024 | +| InsufficientKeySizeTest.java:97:36:97:39 | 1024 | semmle.label | 1024 | +| InsufficientKeySizeTest.java:104:67:104:70 | 1024 | semmle.label | 1024 | +| InsufficientKeySizeTest.java:108:60:108:63 | 1024 | semmle.label | 1024 | +| InsufficientKeySizeTest.java:112:27:112:30 | 1024 | semmle.label | 1024 | +| InsufficientKeySizeTest.java:117:28:117:31 | 1024 | semmle.label | 1024 | +| InsufficientKeySizeTest.java:128:36:128:39 | 1024 | semmle.label | 1024 | +| InsufficientKeySizeTest.java:135:64:135:67 | 1024 | semmle.label | 1024 | +| InsufficientKeySizeTest.java:139:59:139:62 | 1024 | semmle.label | 1024 | +| InsufficientKeySizeTest.java:143:27:143:30 | 1024 | semmle.label | 1024 | +| InsufficientKeySizeTest.java:150:36:150:38 | 128 | semmle.label | 128 | +| InsufficientKeySizeTest.java:154:65:154:75 | "secp112r1" | semmle.label | "secp112r1" | +| InsufficientKeySizeTest.java:158:59:158:69 | "secp112r1" | semmle.label | "secp112r1" | +| InsufficientKeySizeTest.java:165:65:165:82 | "X9.62 prime192v2" | semmle.label | "X9.62 prime192v2" | +| InsufficientKeySizeTest.java:169:65:169:82 | "X9.62 c2tnb191v3" | semmle.label | "X9.62 c2tnb191v3" | +| InsufficientKeySizeTest.java:173:65:173:75 | "sect163k1" | semmle.label | "sect163k1" | +| InsufficientKeySizeTest.java:181:65:181:76 | "prime192v2" | semmle.label | "prime192v2" | +| InsufficientKeySizeTest.java:189:65:189:76 | "c2tnb191v1" | semmle.label | "c2tnb191v1" | +| InsufficientKeySizeTest.java:197:64:197:74 | "secp112r1" | semmle.label | "secp112r1" | +| InsufficientKeySizeTest.java:199:24:199:26 | 128 : Number | semmle.label | 128 : Number | +| InsufficientKeySizeTest.java:201:41:201:44 | size : Number | semmle.label | size : Number | +| InsufficientKeySizeTest.java:202:40:202:42 | 128 : Number | semmle.label | 128 : Number | +| InsufficientKeySizeTest.java:205:39:205:49 | "secp112r1" : String | semmle.label | "secp112r1" : String | +| InsufficientKeySizeTest.java:207:66:207:75 | curveName1 | semmle.label | curveName1 | +| InsufficientKeySizeTest.java:210:33:210:43 | "secp112r1" : String | semmle.label | "secp112r1" : String | +| InsufficientKeySizeTest.java:212:66:212:75 | curveName2 | semmle.label | curveName2 | +| InsufficientKeySizeTest.java:217:46:217:56 | keySize : Number | semmle.label | keySize : Number | +| InsufficientKeySizeTest.java:219:21:219:27 | keySize | semmle.label | keySize | +| InsufficientKeySizeTest.java:223:41:223:51 | keySize : Number | semmle.label | keySize : Number | +| InsufficientKeySizeTest.java:225:21:225:27 | keySize | semmle.label | keySize | +| InsufficientKeySizeTest.java:228:52:228:62 | keySize : Number | semmle.label | keySize : Number | +| InsufficientKeySizeTest.java:230:31:230:37 | keySize | semmle.label | keySize | +| InsufficientKeySizeTest.java:234:47:234:57 | keySize : Number | semmle.label | keySize : Number | +| InsufficientKeySizeTest.java:236:31:236:37 | keySize | semmle.label | keySize | +| InsufficientKeySizeTest.java:244:52:244:62 | keySize : Number | semmle.label | keySize : Number | +| InsufficientKeySizeTest.java:246:31:246:37 | keySize | semmle.label | keySize | +| InsufficientKeySizeTest.java:250:51:250:61 | keySize : Number | semmle.label | keySize : Number | +| InsufficientKeySizeTest.java:252:31:252:37 | keySize | semmle.label | keySize | +| InsufficientKeySizeTest.java:255:40:255:43 | 1024 : Number | semmle.label | 1024 : Number | +subpaths diff --git a/java/ql/test/query-tests/security/CWE-326/InsufficientKeySizeTest.java b/java/ql/test/query-tests/security/CWE-326/InsufficientKeySizeTest.java index 6f0d1f7115c..9f3728f9640 100644 --- a/java/ql/test/query-tests/security/CWE-326/InsufficientKeySizeTest.java +++ b/java/ql/test/query-tests/security/CWE-326/InsufficientKeySizeTest.java @@ -14,30 +14,30 @@ public class InsufficientKeySizeTest { { /* Test with keysize as int */ KeyGenerator keyGen1 = KeyGenerator.getInstance("AES"); - keyGen1.init(64); // $ hasInsufficientKeySize + keyGen1.init(64); // $ Alert KeyGenerator keyGen2 = KeyGenerator.getInstance("AES"); keyGen2.init(128); // Safe: Key size is no less than 128 /* Test with local variable as keysize */ - final int size1 = 64; // compile-time constant - int size2 = 64; // not a compile-time constant + final int size1 = 64; // $ Source// compile-time constant + int size2 = 64; // $ Source// not a compile-time constant KeyGenerator keyGen3 = KeyGenerator.getInstance("AES"); - keyGen3.init(size1); // $ hasInsufficientKeySize + keyGen3.init(size1); // $ Alert KeyGenerator keyGen4 = KeyGenerator.getInstance("AES"); - keyGen4.init(size2); // $ hasInsufficientKeySize + keyGen4.init(size2); // $ Alert /* Test variables passed to another method */ KeyGenerator keyGen5 = KeyGenerator.getInstance("AES"); // MISSING: test KeyGenerator variable as argument testSymmetricVariable(size2, keyGen5); // test with variable as key size - testSymmetricInt(64); // test with int literal as key size + testSymmetricInt(64); // $ Source // test with int literal as key size /* Test with variable as algo name argument in `getInstance` method. */ final String algoName1 = "AES"; // compile-time constant KeyGenerator keyGen6 = KeyGenerator.getInstance(algoName1); - keyGen6.init(64); // $ hasInsufficientKeySize + keyGen6.init(64); // $ Alert String algoName2 = "AES"; // not a compile-time constant KeyGenerator keyGen7 = KeyGenerator.getInstance(algoName2); @@ -48,42 +48,42 @@ public class InsufficientKeySizeTest { { /* Test with keysize as int */ KeyPairGenerator keyPairGen1 = KeyPairGenerator.getInstance("RSA"); - keyPairGen1.initialize(1024); // $ hasInsufficientKeySize + keyPairGen1.initialize(1024); // $ Alert KeyPairGenerator keyPairGen2 = KeyPairGenerator.getInstance("RSA"); keyPairGen2.initialize(2048); // Safe: Key size is no less than 2048 /* Test spec */ KeyPairGenerator keyPairGen3 = KeyPairGenerator.getInstance("RSA"); - RSAKeyGenParameterSpec rsaSpec = new RSAKeyGenParameterSpec(1024, null); // $ hasInsufficientKeySize + RSAKeyGenParameterSpec rsaSpec = new RSAKeyGenParameterSpec(1024, null); // $ Alert keyPairGen3.initialize(rsaSpec); KeyPairGenerator keyPairGen4 = KeyPairGenerator.getInstance("RSA"); - keyPairGen4.initialize(new RSAKeyGenParameterSpec(1024, null)); // $ hasInsufficientKeySize + keyPairGen4.initialize(new RSAKeyGenParameterSpec(1024, null)); // $ Alert /* Test with local variable as keysize */ - final int size1 = 1024; // compile-time constant - int size2 = 1024; // not a compile-time constant + final int size1 = 1024; // $ Source // compile-time constant + int size2 = 1024; // $ Source // not a compile-time constant KeyPairGenerator keyPairGen5 = KeyPairGenerator.getInstance("RSA"); - keyPairGen5.initialize(size1); // $ hasInsufficientKeySize + keyPairGen5.initialize(size1); // $ Alert KeyPairGenerator keyPairGen6 = KeyPairGenerator.getInstance("RSA"); - keyPairGen6.initialize(size2); // $ hasInsufficientKeySize + keyPairGen6.initialize(size2); // $ Alert /* Test variables passed to another method */ KeyPairGenerator keyPairGen7 = KeyPairGenerator.getInstance("RSA"); // MISSING: test KeyGenerator variable as argument testAsymmetricNonEcVariable(size2, keyPairGen7); // test with variable as key size - testAsymmetricNonEcInt(1024); // test with int literal as key size + testAsymmetricNonEcInt(1024); // $ Source // test with int literal as key size /* Test getting key size as return value of another method */ KeyPairGenerator keyPairGen8 = KeyPairGenerator.getInstance("RSA"); - keyPairGen8.initialize(getRSAKeySize()); // $ hasInsufficientKeySize + keyPairGen8.initialize(getRSAKeySize()); // $ Alert /* Test with variable as algo name argument in `getInstance` method. */ final String algoName1 = "RSA"; // compile-time constant KeyPairGenerator keyPairGen9 = KeyPairGenerator.getInstance(algoName1); - keyPairGen9.initialize(1024); // $ hasInsufficientKeySize + keyPairGen9.initialize(1024); // $ Alert String algoName2 = "RSA"; // not a compile-time constant KeyPairGenerator keyPairGen10 = KeyPairGenerator.getInstance(algoName2); @@ -94,27 +94,27 @@ public class InsufficientKeySizeTest { { /* Test with keysize as int */ KeyPairGenerator keyPairGen1 = KeyPairGenerator.getInstance("DSA"); - keyPairGen1.initialize(1024); // $ hasInsufficientKeySize + keyPairGen1.initialize(1024); // $ Alert KeyPairGenerator keyPairGen2 = KeyPairGenerator.getInstance("DSA"); keyPairGen2.initialize(2048); // Safe: Key size is no less than 2048 /* Test spec */ KeyPairGenerator keyPairGen3 = KeyPairGenerator.getInstance("DSA"); - DSAGenParameterSpec dsaSpec = new DSAGenParameterSpec(1024, 0); // $ hasInsufficientKeySize + DSAGenParameterSpec dsaSpec = new DSAGenParameterSpec(1024, 0); // $ Alert keyPairGen3.initialize(dsaSpec); KeyPairGenerator keyPairGen4 = KeyPairGenerator.getInstance("DSA"); - keyPairGen4.initialize(new DSAGenParameterSpec(1024, 0)); // $ hasInsufficientKeySize + keyPairGen4.initialize(new DSAGenParameterSpec(1024, 0)); // $ Alert /* Test `AlgorithmParameterGenerator` */ AlgorithmParameterGenerator paramGen = AlgorithmParameterGenerator.getInstance("DSA"); - paramGen.init(1024); // $ hasInsufficientKeySize + paramGen.init(1024); // $ Alert /* Test with variable as algo name argument in `getInstance` method. */ final String algoName1 = "DSA"; // compile-time constant AlgorithmParameterGenerator paramGen1 = AlgorithmParameterGenerator.getInstance(algoName1); - paramGen1.init(1024); // $ hasInsufficientKeySize + paramGen1.init(1024); // $ Alert String algoName2 = "DSA"; // not a compile-time constant AlgorithmParameterGenerator paramGen2 = AlgorithmParameterGenerator.getInstance(algoName2); @@ -125,52 +125,52 @@ public class InsufficientKeySizeTest { { /* Test with keysize as int */ KeyPairGenerator keyPairGen1 = KeyPairGenerator.getInstance("dh"); - keyPairGen1.initialize(1024); // $ hasInsufficientKeySize + keyPairGen1.initialize(1024); // $ Alert KeyPairGenerator keyPairGen2 = KeyPairGenerator.getInstance("DH"); keyPairGen2.initialize(2048); // Safe: Key size is no less than 2048 /* Test spec */ KeyPairGenerator keyPairGen3 = KeyPairGenerator.getInstance("DH"); - DHGenParameterSpec dhSpec = new DHGenParameterSpec(1024, 0); // $ hasInsufficientKeySize + DHGenParameterSpec dhSpec = new DHGenParameterSpec(1024, 0); // $ Alert keyPairGen3.initialize(dhSpec); KeyPairGenerator keyPairGen4 = KeyPairGenerator.getInstance("DH"); - keyPairGen4.initialize(new DHGenParameterSpec(1024, 0)); // $ hasInsufficientKeySize + keyPairGen4.initialize(new DHGenParameterSpec(1024, 0)); // $ Alert /* Test `AlgorithmParameterGenerator` */ AlgorithmParameterGenerator paramGen = AlgorithmParameterGenerator.getInstance("DH"); - paramGen.init(1024); // $ hasInsufficientKeySize + paramGen.init(1024); // $ Alert } // EC (Asymmetric): minimum recommended key size is 256 { /* Test with keysize as int */ KeyPairGenerator keyPairGen1 = KeyPairGenerator.getInstance("EC"); - keyPairGen1.initialize(128); // $ hasInsufficientKeySize + keyPairGen1.initialize(128); // $ Alert /* Test with keysize as curve name in spec */ KeyPairGenerator keyPairGen2 = KeyPairGenerator.getInstance("EC"); - ECGenParameterSpec ecSpec1 = new ECGenParameterSpec("secp112r1"); // $ hasInsufficientKeySize + ECGenParameterSpec ecSpec1 = new ECGenParameterSpec("secp112r1"); // $ Alert keyPairGen2.initialize(ecSpec1); KeyPairGenerator keyPairGen3 = KeyPairGenerator.getInstance("EC"); - keyPairGen3.initialize(new ECGenParameterSpec("secp112r1")); // $ hasInsufficientKeySize + keyPairGen3.initialize(new ECGenParameterSpec("secp112r1")); // $ Alert KeyPairGenerator keyPairGen4 = KeyPairGenerator.getInstance("EC"); ECGenParameterSpec ecSpec2 = new ECGenParameterSpec("secp256r1"); // Safe: Key size is no less than 256 keyPairGen4.initialize(ecSpec2); KeyPairGenerator keyPairGen5 = KeyPairGenerator.getInstance("EC"); - ECGenParameterSpec ecSpec3 = new ECGenParameterSpec("X9.62 prime192v2"); // $ hasInsufficientKeySize + ECGenParameterSpec ecSpec3 = new ECGenParameterSpec("X9.62 prime192v2"); // $ Alert keyPairGen5.initialize(ecSpec3); KeyPairGenerator keyPairGen6 = KeyPairGenerator.getInstance("EC"); - ECGenParameterSpec ecSpec4 = new ECGenParameterSpec("X9.62 c2tnb191v3"); // $ hasInsufficientKeySize + ECGenParameterSpec ecSpec4 = new ECGenParameterSpec("X9.62 c2tnb191v3"); // $ Alert keyPairGen6.initialize(ecSpec4); KeyPairGenerator keyPairGen7 = KeyPairGenerator.getInstance("EC"); - ECGenParameterSpec ecSpec5 = new ECGenParameterSpec("sect163k1"); // $ hasInsufficientKeySize + ECGenParameterSpec ecSpec5 = new ECGenParameterSpec("sect163k1"); // $ Alert keyPairGen7.initialize(ecSpec5); KeyPairGenerator keyPairGen8 = KeyPairGenerator.getInstance("EC"); @@ -178,7 +178,7 @@ public class InsufficientKeySizeTest { keyPairGen8.initialize(ecSpec6); KeyPairGenerator keyPairGen9 = KeyPairGenerator.getInstance("EC"); - ECGenParameterSpec ecSpec7 = new ECGenParameterSpec("prime192v2"); // $ hasInsufficientKeySize + ECGenParameterSpec ecSpec7 = new ECGenParameterSpec("prime192v2"); // $ Alert keyPairGen9.initialize(ecSpec7); KeyPairGenerator keyPairGen10 = KeyPairGenerator.getInstance("EC"); @@ -186,7 +186,7 @@ public class InsufficientKeySizeTest { keyPairGen10.initialize(ecSpec8); KeyPairGenerator keyPairGen14 = KeyPairGenerator.getInstance("EC"); - ECGenParameterSpec ecSpec9 = new ECGenParameterSpec("c2tnb191v1"); // $ hasInsufficientKeySize + ECGenParameterSpec ecSpec9 = new ECGenParameterSpec("c2tnb191v1"); // $ Alert keyPairGen14.initialize(ecSpec9); KeyPairGenerator keyPairGen15 = KeyPairGenerator.getInstance("EC"); @@ -194,46 +194,46 @@ public class InsufficientKeySizeTest { keyPairGen15.initialize(ecSpec10); // Safe: Key size is no less than 256 /* Test variables passed to another method */ - ECGenParameterSpec ecSpec = new ECGenParameterSpec("secp112r1"); // $ hasInsufficientKeySize + ECGenParameterSpec ecSpec = new ECGenParameterSpec("secp112r1"); // $ Alert testAsymmetricEcSpecVariable(ecSpec); // test spec as an argument - int size = 128; + int size = 128; // $ Source KeyPairGenerator keyPairGen = KeyPairGenerator.getInstance("EC"); // MISSING: test KeyGenerator variable as argument testAsymmetricEcIntVariable(size, keyPairGen); // test with variable as key size - testAsymmetricEcIntLiteral(128); // test with int literal as key size + testAsymmetricEcIntLiteral(128); // $ Source // test with int literal as key size /* Test with variable as curve name argument in `ECGenParameterSpec` constructor. */ - final String curveName1 = "secp112r1"; // compile-time constant + final String curveName1 = "secp112r1"; // $ Source // compile-time constant KeyPairGenerator keyPairGen16 = KeyPairGenerator.getInstance("EC"); - ECGenParameterSpec ecSpec11 = new ECGenParameterSpec(curveName1); // $ hasInsufficientKeySize + ECGenParameterSpec ecSpec11 = new ECGenParameterSpec(curveName1); // $ Alert keyPairGen16.initialize(ecSpec11); - String curveName2 = "secp112r1"; // not a compile-time constant + String curveName2 = "secp112r1"; // $ Source // not a compile-time constant KeyPairGenerator keyPairGen17 = KeyPairGenerator.getInstance("EC"); - ECGenParameterSpec ecSpec12 = new ECGenParameterSpec(curveName2); // $ hasInsufficientKeySize + ECGenParameterSpec ecSpec12 = new ECGenParameterSpec(curveName2); // $ Alert keyPairGen17.initialize(ecSpec12); } } public static void testSymmetricVariable(int keySize, KeyGenerator kg) throws java.security.NoSuchAlgorithmException, java.security.InvalidAlgorithmParameterException { KeyGenerator keyGen = KeyGenerator.getInstance("AES"); - keyGen.init(keySize); // $ hasInsufficientKeySize + keyGen.init(keySize); // $ Alert kg.init(64); // $ MISSING: hasInsufficientKeySize } public static void testSymmetricInt(int keySize) throws java.security.NoSuchAlgorithmException, java.security.InvalidAlgorithmParameterException { KeyGenerator keyGen = KeyGenerator.getInstance("AES"); - keyGen.init(keySize); // $ hasInsufficientKeySize + keyGen.init(keySize); // $ Alert } public static void testAsymmetricNonEcVariable(int keySize, KeyPairGenerator kpg) throws java.security.NoSuchAlgorithmException, java.security.InvalidAlgorithmParameterException { KeyPairGenerator keyPairGen = KeyPairGenerator.getInstance("RSA"); - keyPairGen.initialize(keySize); // $ hasInsufficientKeySize + keyPairGen.initialize(keySize); // $ Alert kpg.initialize(1024); // $ MISSING: hasInsufficientKeySize } public static void testAsymmetricNonEcInt(int keySize) throws java.security.NoSuchAlgorithmException, java.security.InvalidAlgorithmParameterException { KeyPairGenerator keyPairGen = KeyPairGenerator.getInstance("RSA"); - keyPairGen.initialize(keySize); // $ hasInsufficientKeySize + keyPairGen.initialize(keySize); // $ Alert } public static void testAsymmetricEcSpecVariable(ECGenParameterSpec spec) throws java.security.NoSuchAlgorithmException, java.security.InvalidAlgorithmParameterException { @@ -243,14 +243,14 @@ public class InsufficientKeySizeTest { public static void testAsymmetricEcIntVariable(int keySize, KeyPairGenerator kpg) throws java.security.NoSuchAlgorithmException, java.security.InvalidAlgorithmParameterException { KeyPairGenerator keyPairGen = KeyPairGenerator.getInstance("EC"); - keyPairGen.initialize(keySize); // $ hasInsufficientKeySize + keyPairGen.initialize(keySize); // $ Alert kpg.initialize(128); // $ MISSING: hasInsufficientKeySize } public static void testAsymmetricEcIntLiteral(int keySize) throws java.security.NoSuchAlgorithmException, java.security.InvalidAlgorithmParameterException { KeyPairGenerator keyPairGen = KeyPairGenerator.getInstance("EC"); - keyPairGen.initialize(keySize); // $ hasInsufficientKeySize + keyPairGen.initialize(keySize); // $ Alert } - public int getRSAKeySize(){ return 1024; } + public int getRSAKeySize(){ return 1024; } // $ Source } diff --git a/java/ql/test/query-tests/security/CWE-326/InsufficientKeySizeTest.ql b/java/ql/test/query-tests/security/CWE-326/InsufficientKeySizeTest.ql deleted file mode 100644 index 441faa888e3..00000000000 --- a/java/ql/test/query-tests/security/CWE-326/InsufficientKeySizeTest.ql +++ /dev/null @@ -1,18 +0,0 @@ -import java -import utils.test.InlineExpectationsTest -import semmle.code.java.security.InsufficientKeySizeQuery - -module InsufficientKeySizeTest implements TestSig { - string getARelevantTag() { result = "hasInsufficientKeySize" } - - predicate hasActualResult(Location location, string element, string tag, string value) { - tag = "hasInsufficientKeySize" and - exists(KeySizeFlow::PathNode sink | KeySizeFlow::flowPath(_, sink) | - sink.getNode().getLocation() = location and - element = sink.getNode().toString() and - value = "" - ) - } -} - -import MakeTest diff --git a/java/ql/test/query-tests/security/CWE-326/InsufficientKeySizeTest.qlref b/java/ql/test/query-tests/security/CWE-326/InsufficientKeySizeTest.qlref new file mode 100644 index 00000000000..6b3f44f4ca2 --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-326/InsufficientKeySizeTest.qlref @@ -0,0 +1,4 @@ +query: Security/CWE/CWE-326/InsufficientKeySize.ql +postprocess: + - utils/test/PrettyPrintModels.ql + - utils/test/InlineExpectationsTestQuery.ql diff --git a/java/ql/test/query-tests/security/CWE-330/InsecureRandomCookies.java b/java/ql/test/query-tests/security/CWE-330/InsecureRandomCookies.java index d34a0283313..742c2cebcf9 100644 --- a/java/ql/test/query-tests/security/CWE-330/InsecureRandomCookies.java +++ b/java/ql/test/query-tests/security/CWE-330/InsecureRandomCookies.java @@ -16,28 +16,28 @@ public class InsecureRandomCookies extends HttpServlet { public void doGet() { Random r = new Random(); - int c = r.nextInt(); + int c = r.nextInt(); // $ Source // BAD: The cookie value may be predictable. - Cookie cookie = new Cookie("name", Integer.toString(c)); // $hasWeakRandomFlow - cookie.setValue(Integer.toString(c)); // $hasWeakRandomFlow + Cookie cookie = new Cookie("name", Integer.toString(c)); // $ Alert + cookie.setValue(Integer.toString(c)); // $ Alert io.netty.handler.codec.http.Cookie nettyCookie = - new io.netty.handler.codec.http.DefaultCookie("name", Integer.toString(c)); // $hasWeakRandomFlow - nettyCookie.setValue(Integer.toString(c)); // $hasWeakRandomFlow + new io.netty.handler.codec.http.DefaultCookie("name", Integer.toString(c)); // $ Alert + nettyCookie.setValue(Integer.toString(c)); // $ Alert io.netty.handler.codec.http.cookie.Cookie nettyCookie2 = - new io.netty.handler.codec.http.cookie.DefaultCookie("name", Integer.toString(c)); // $hasWeakRandomFlow - nettyCookie2.setValue(Integer.toString(c)); // $hasWeakRandomFlow + new io.netty.handler.codec.http.cookie.DefaultCookie("name", Integer.toString(c)); // $ Alert + nettyCookie2.setValue(Integer.toString(c)); // $ Alert Encoder enc = null; - int c2 = r.nextInt(); + int c2 = r.nextInt(); // $ Source String value = enc.encodeForHTML(Integer.toString(c2)); // BAD: The cookie value may be predictable. - Cookie cookie2 = new Cookie("name", value); // $hasWeakRandomFlow + Cookie cookie2 = new Cookie("name", value); // $ Alert byte[] bytes = new byte[16]; - r.nextBytes(bytes); + r.nextBytes(bytes); // $ Source // BAD: The cookie value may be predictable. - Cookie cookie3 = new Cookie("name", new String(bytes)); // $hasWeakRandomFlow + Cookie cookie3 = new Cookie("name", new String(bytes)); // $ Alert SecureRandom sr = new SecureRandom(); @@ -48,22 +48,22 @@ public class InsecureRandomCookies extends HttpServlet { ThreadLocalRandom tlr = ThreadLocalRandom.current(); - Cookie cookie5 = new Cookie("name", Integer.toString(tlr.nextInt())); // $hasWeakRandomFlow + Cookie cookie5 = new Cookie("name", Integer.toString(tlr.nextInt())); // $ Alert - Cookie cookie6 = new Cookie("name", RandomStringUtils.random(10)); // $hasWeakRandomFlow + Cookie cookie6 = new Cookie("name", RandomStringUtils.random(10)); // $ Alert - Cookie cookie7 = new Cookie("name", RandomStringUtils.randomAscii(10)); // $hasWeakRandomFlow + Cookie cookie7 = new Cookie("name", RandomStringUtils.randomAscii(10)); // $ Alert - long c3 = r.nextLong(); + long c3 = r.nextLong(); // $ Source // BAD: The cookie value may be predictable. - Cookie cookie8 = new Cookie("name", Long.toString(c3 * 5)); // $hasWeakRandomFlow + Cookie cookie8 = new Cookie("name", Long.toString(c3 * 5)); // $ Alert - double c4 = Math.random(); + double c4 = Math.random(); // $ Source // BAD: The cookie value may be predictable. - Cookie cookie9 = new Cookie("name", Double.toString(c4)); // $hasWeakRandomFlow + Cookie cookie9 = new Cookie("name", Double.toString(c4)); // $ Alert - double c5 = Math.random(); + double c5 = Math.random(); // $ Source // BAD: The cookie value may be predictable. - Cookie cookie10 = new Cookie("name", Double.toString(++c5)); // $hasWeakRandomFlow + Cookie cookie10 = new Cookie("name", Double.toString(++c5)); // $ Alert } } diff --git a/java/ql/test/query-tests/security/CWE-330/InsecureRandomnessTest.expected b/java/ql/test/query-tests/security/CWE-330/InsecureRandomnessTest.expected index e69de29bb2d..3b460aeec32 100644 --- a/java/ql/test/query-tests/security/CWE-330/InsecureRandomnessTest.expected +++ b/java/ql/test/query-tests/security/CWE-330/InsecureRandomnessTest.expected @@ -0,0 +1,69 @@ +#select +| InsecureRandomCookies.java:21:44:21:62 | toString(...) | InsecureRandomCookies.java:19:17:19:27 | nextInt(...) : Number | InsecureRandomCookies.java:21:44:21:62 | toString(...) | Potential Insecure randomness due to a $@. | InsecureRandomCookies.java:19:17:19:27 | nextInt(...) | Insecure randomness source. | +| InsecureRandomCookies.java:22:25:22:43 | toString(...) | InsecureRandomCookies.java:19:17:19:27 | nextInt(...) : Number | InsecureRandomCookies.java:22:25:22:43 | toString(...) | Potential Insecure randomness due to a $@. | InsecureRandomCookies.java:19:17:19:27 | nextInt(...) | Insecure randomness source. | +| InsecureRandomCookies.java:25:71:25:89 | toString(...) | InsecureRandomCookies.java:19:17:19:27 | nextInt(...) : Number | InsecureRandomCookies.java:25:71:25:89 | toString(...) | Potential Insecure randomness due to a $@. | InsecureRandomCookies.java:19:17:19:27 | nextInt(...) | Insecure randomness source. | +| InsecureRandomCookies.java:26:30:26:48 | toString(...) | InsecureRandomCookies.java:19:17:19:27 | nextInt(...) : Number | InsecureRandomCookies.java:26:30:26:48 | toString(...) | Potential Insecure randomness due to a $@. | InsecureRandomCookies.java:19:17:19:27 | nextInt(...) | Insecure randomness source. | +| InsecureRandomCookies.java:28:78:28:96 | toString(...) | InsecureRandomCookies.java:19:17:19:27 | nextInt(...) : Number | InsecureRandomCookies.java:28:78:28:96 | toString(...) | Potential Insecure randomness due to a $@. | InsecureRandomCookies.java:19:17:19:27 | nextInt(...) | Insecure randomness source. | +| InsecureRandomCookies.java:29:31:29:49 | toString(...) | InsecureRandomCookies.java:19:17:19:27 | nextInt(...) : Number | InsecureRandomCookies.java:29:31:29:49 | toString(...) | Potential Insecure randomness due to a $@. | InsecureRandomCookies.java:19:17:19:27 | nextInt(...) | Insecure randomness source. | +| InsecureRandomCookies.java:35:45:35:49 | value | InsecureRandomCookies.java:32:18:32:28 | nextInt(...) : Number | InsecureRandomCookies.java:35:45:35:49 | value | Potential Insecure randomness due to a $@. | InsecureRandomCookies.java:32:18:32:28 | nextInt(...) | Insecure randomness source. | +| InsecureRandomCookies.java:40:45:40:61 | new String(...) | InsecureRandomCookies.java:38:21:38:25 | bytes : byte[] | InsecureRandomCookies.java:40:45:40:61 | new String(...) | Potential Insecure randomness due to a $@. | InsecureRandomCookies.java:38:21:38:25 | bytes | Insecure randomness source. | +| InsecureRandomCookies.java:51:45:51:75 | toString(...) | InsecureRandomCookies.java:51:62:51:74 | nextInt(...) : Number | InsecureRandomCookies.java:51:45:51:75 | toString(...) | Potential Insecure randomness due to a $@. | InsecureRandomCookies.java:51:62:51:74 | nextInt(...) | Insecure randomness source. | +| InsecureRandomCookies.java:53:45:53:72 | random(...) | InsecureRandomCookies.java:53:45:53:72 | random(...) | InsecureRandomCookies.java:53:45:53:72 | random(...) | Potential Insecure randomness due to a $@. | InsecureRandomCookies.java:53:45:53:72 | random(...) | Insecure randomness source. | +| InsecureRandomCookies.java:55:45:55:77 | randomAscii(...) | InsecureRandomCookies.java:55:45:55:77 | randomAscii(...) | InsecureRandomCookies.java:55:45:55:77 | randomAscii(...) | Potential Insecure randomness due to a $@. | InsecureRandomCookies.java:55:45:55:77 | randomAscii(...) | Insecure randomness source. | +| InsecureRandomCookies.java:59:45:59:65 | toString(...) | InsecureRandomCookies.java:57:19:57:30 | nextLong(...) : Number | InsecureRandomCookies.java:59:45:59:65 | toString(...) | Potential Insecure randomness due to a $@. | InsecureRandomCookies.java:57:19:57:30 | nextLong(...) | Insecure randomness source. | +| InsecureRandomCookies.java:63:45:63:63 | toString(...) | InsecureRandomCookies.java:61:21:61:33 | random(...) : Number | InsecureRandomCookies.java:63:45:63:63 | toString(...) | Potential Insecure randomness due to a $@. | InsecureRandomCookies.java:61:21:61:33 | random(...) | Insecure randomness source. | +| InsecureRandomCookies.java:67:46:67:66 | toString(...) | InsecureRandomCookies.java:65:21:65:33 | random(...) : Number | InsecureRandomCookies.java:67:46:67:66 | toString(...) | Potential Insecure randomness due to a $@. | InsecureRandomCookies.java:65:21:65:33 | random(...) | Insecure randomness source. | +edges +| InsecureRandomCookies.java:19:17:19:27 | nextInt(...) : Number | InsecureRandomCookies.java:21:44:21:62 | toString(...) | provenance | TaintPreservingCallable | +| InsecureRandomCookies.java:19:17:19:27 | nextInt(...) : Number | InsecureRandomCookies.java:22:25:22:43 | toString(...) | provenance | TaintPreservingCallable | +| InsecureRandomCookies.java:19:17:19:27 | nextInt(...) : Number | InsecureRandomCookies.java:25:71:25:89 | toString(...) | provenance | TaintPreservingCallable | +| InsecureRandomCookies.java:19:17:19:27 | nextInt(...) : Number | InsecureRandomCookies.java:26:30:26:48 | toString(...) | provenance | TaintPreservingCallable | +| InsecureRandomCookies.java:19:17:19:27 | nextInt(...) : Number | InsecureRandomCookies.java:28:78:28:96 | toString(...) | provenance | TaintPreservingCallable | +| InsecureRandomCookies.java:19:17:19:27 | nextInt(...) : Number | InsecureRandomCookies.java:29:31:29:49 | toString(...) | provenance | TaintPreservingCallable | +| InsecureRandomCookies.java:32:18:32:28 | nextInt(...) : Number | InsecureRandomCookies.java:33:42:33:61 | toString(...) : String | provenance | TaintPreservingCallable | +| InsecureRandomCookies.java:33:24:33:62 | encodeForHTML(...) : String | InsecureRandomCookies.java:35:45:35:49 | value | provenance | | +| InsecureRandomCookies.java:33:42:33:61 | toString(...) : String | InsecureRandomCookies.java:33:24:33:62 | encodeForHTML(...) : String | provenance | Config | +| InsecureRandomCookies.java:33:42:33:61 | toString(...) : String | InsecureRandomCookies.java:33:24:33:62 | encodeForHTML(...) : String | provenance | MaD:2 | +| InsecureRandomCookies.java:38:21:38:25 | bytes : byte[] | InsecureRandomCookies.java:40:56:40:60 | bytes : byte[] | provenance | | +| InsecureRandomCookies.java:40:56:40:60 | bytes : byte[] | InsecureRandomCookies.java:40:45:40:61 | new String(...) | provenance | MaD:1 | +| InsecureRandomCookies.java:51:62:51:74 | nextInt(...) : Number | InsecureRandomCookies.java:51:45:51:75 | toString(...) | provenance | TaintPreservingCallable | +| InsecureRandomCookies.java:57:19:57:30 | nextLong(...) : Number | InsecureRandomCookies.java:59:59:59:60 | c3 : Number | provenance | | +| InsecureRandomCookies.java:59:59:59:60 | c3 : Number | InsecureRandomCookies.java:59:59:59:64 | ... * ... : Number | provenance | Config | +| InsecureRandomCookies.java:59:59:59:64 | ... * ... : Number | InsecureRandomCookies.java:59:45:59:65 | toString(...) | provenance | TaintPreservingCallable | +| InsecureRandomCookies.java:61:21:61:33 | random(...) : Number | InsecureRandomCookies.java:63:45:63:63 | toString(...) | provenance | TaintPreservingCallable | +| InsecureRandomCookies.java:65:21:65:33 | random(...) : Number | InsecureRandomCookies.java:67:64:67:65 | c5 : Number | provenance | | +| InsecureRandomCookies.java:67:62:67:65 | ++... : Number | InsecureRandomCookies.java:67:46:67:66 | toString(...) | provenance | TaintPreservingCallable | +| InsecureRandomCookies.java:67:64:67:65 | c5 : Number | InsecureRandomCookies.java:67:62:67:65 | ++... : Number | provenance | Config | +models +| 1 | Summary: java.lang; String; false; String; ; ; Argument[0]; Argument[this]; taint; manual | +| 2 | Summary: org.owasp.esapi; Encoder; true; encodeForHTML; (String); ; Argument[0]; ReturnValue; taint; manual | +nodes +| InsecureRandomCookies.java:19:17:19:27 | nextInt(...) : Number | semmle.label | nextInt(...) : Number | +| InsecureRandomCookies.java:21:44:21:62 | toString(...) | semmle.label | toString(...) | +| InsecureRandomCookies.java:22:25:22:43 | toString(...) | semmle.label | toString(...) | +| InsecureRandomCookies.java:25:71:25:89 | toString(...) | semmle.label | toString(...) | +| InsecureRandomCookies.java:26:30:26:48 | toString(...) | semmle.label | toString(...) | +| InsecureRandomCookies.java:28:78:28:96 | toString(...) | semmle.label | toString(...) | +| InsecureRandomCookies.java:29:31:29:49 | toString(...) | semmle.label | toString(...) | +| InsecureRandomCookies.java:32:18:32:28 | nextInt(...) : Number | semmle.label | nextInt(...) : Number | +| InsecureRandomCookies.java:33:24:33:62 | encodeForHTML(...) : String | semmle.label | encodeForHTML(...) : String | +| InsecureRandomCookies.java:33:42:33:61 | toString(...) : String | semmle.label | toString(...) : String | +| InsecureRandomCookies.java:35:45:35:49 | value | semmle.label | value | +| InsecureRandomCookies.java:38:21:38:25 | bytes : byte[] | semmle.label | bytes : byte[] | +| InsecureRandomCookies.java:40:45:40:61 | new String(...) | semmle.label | new String(...) | +| InsecureRandomCookies.java:40:56:40:60 | bytes : byte[] | semmle.label | bytes : byte[] | +| InsecureRandomCookies.java:51:45:51:75 | toString(...) | semmle.label | toString(...) | +| InsecureRandomCookies.java:51:62:51:74 | nextInt(...) : Number | semmle.label | nextInt(...) : Number | +| InsecureRandomCookies.java:53:45:53:72 | random(...) | semmle.label | random(...) | +| InsecureRandomCookies.java:55:45:55:77 | randomAscii(...) | semmle.label | randomAscii(...) | +| InsecureRandomCookies.java:57:19:57:30 | nextLong(...) : Number | semmle.label | nextLong(...) : Number | +| InsecureRandomCookies.java:59:45:59:65 | toString(...) | semmle.label | toString(...) | +| InsecureRandomCookies.java:59:59:59:60 | c3 : Number | semmle.label | c3 : Number | +| InsecureRandomCookies.java:59:59:59:64 | ... * ... : Number | semmle.label | ... * ... : Number | +| InsecureRandomCookies.java:61:21:61:33 | random(...) : Number | semmle.label | random(...) : Number | +| InsecureRandomCookies.java:63:45:63:63 | toString(...) | semmle.label | toString(...) | +| InsecureRandomCookies.java:65:21:65:33 | random(...) : Number | semmle.label | random(...) : Number | +| InsecureRandomCookies.java:67:46:67:66 | toString(...) | semmle.label | toString(...) | +| InsecureRandomCookies.java:67:62:67:65 | ++... : Number | semmle.label | ++... : Number | +| InsecureRandomCookies.java:67:64:67:65 | c5 : Number | semmle.label | c5 : Number | +subpaths diff --git a/java/ql/test/query-tests/security/CWE-330/InsecureRandomnessTest.ql b/java/ql/test/query-tests/security/CWE-330/InsecureRandomnessTest.ql deleted file mode 100644 index a9e8cbb2dc4..00000000000 --- a/java/ql/test/query-tests/security/CWE-330/InsecureRandomnessTest.ql +++ /dev/null @@ -1,19 +0,0 @@ -import java -import semmle.code.java.dataflow.DataFlow -import semmle.code.java.security.InsecureRandomnessQuery -import utils.test.InlineExpectationsTest - -module WeakRandomTest implements TestSig { - string getARelevantTag() { result = "hasWeakRandomFlow" } - - predicate hasActualResult(Location location, string element, string tag, string value) { - tag = "hasWeakRandomFlow" and - exists(DataFlow::Node sink | InsecureRandomnessFlow::flowTo(sink) | - sink.getLocation() = location and - element = sink.toString() and - value = "" - ) - } -} - -import MakeTest diff --git a/java/ql/test/query-tests/security/CWE-330/InsecureRandomnessTest.qlref b/java/ql/test/query-tests/security/CWE-330/InsecureRandomnessTest.qlref new file mode 100644 index 00000000000..2d02acfab9a --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-330/InsecureRandomnessTest.qlref @@ -0,0 +1,4 @@ +query: Security/CWE/CWE-330/InsecureRandomness.ql +postprocess: + - utils/test/PrettyPrintModels.ql + - utils/test/InlineExpectationsTestQuery.ql diff --git a/java/ql/test/query-tests/security/CWE-347/MissingJWTSignatureCheckTest.expected b/java/ql/test/query-tests/security/CWE-347/MissingJWTSignatureCheckTest.expected index e69de29bb2d..ba513e95a2d 100644 --- a/java/ql/test/query-tests/security/CWE-347/MissingJWTSignatureCheckTest.expected +++ b/java/ql/test/query-tests/security/CWE-347/MissingJWTSignatureCheckTest.expected @@ -0,0 +1,55 @@ +#select +| MissingJWTSignatureCheckTest.java:83:9:83:14 | parser | MissingJWTSignatureCheckTest.java:13:16:13:66 | setSigningKey(...) : JwtParser | MissingJWTSignatureCheckTest.java:83:9:83:14 | parser | This parser sets a $@, but the signature is not verified. | MissingJWTSignatureCheckTest.java:13:16:13:66 | setSigningKey(...) | JWT signing key | +| MissingJWTSignatureCheckTest.java:83:9:83:14 | parser | MissingJWTSignatureCheckTest.java:17:16:17:73 | setSigningKey(...) : DefaultJwtParserBuilder | MissingJWTSignatureCheckTest.java:83:9:83:14 | parser | This parser sets a $@, but the signature is not verified. | MissingJWTSignatureCheckTest.java:17:16:17:73 | setSigningKey(...) | JWT signing key | +| MissingJWTSignatureCheckTest.java:83:9:83:14 | parser | MissingJWTSignatureCheckTest.java:21:16:21:75 | setSigningKey(...) : JwtParser | MissingJWTSignatureCheckTest.java:83:9:83:14 | parser | This parser sets a $@, but the signature is not verified. | MissingJWTSignatureCheckTest.java:21:16:21:75 | setSigningKey(...) | JWT signing key | +| MissingJWTSignatureCheckTest.java:87:9:87:14 | parser | MissingJWTSignatureCheckTest.java:13:16:13:66 | setSigningKey(...) : JwtParser | MissingJWTSignatureCheckTest.java:87:9:87:14 | parser | This parser sets a $@, but the signature is not verified. | MissingJWTSignatureCheckTest.java:13:16:13:66 | setSigningKey(...) | JWT signing key | +| MissingJWTSignatureCheckTest.java:87:9:87:14 | parser | MissingJWTSignatureCheckTest.java:17:16:17:73 | setSigningKey(...) : DefaultJwtParserBuilder | MissingJWTSignatureCheckTest.java:87:9:87:14 | parser | This parser sets a $@, but the signature is not verified. | MissingJWTSignatureCheckTest.java:17:16:17:73 | setSigningKey(...) | JWT signing key | +| MissingJWTSignatureCheckTest.java:87:9:87:14 | parser | MissingJWTSignatureCheckTest.java:21:16:21:75 | setSigningKey(...) : JwtParser | MissingJWTSignatureCheckTest.java:87:9:87:14 | parser | This parser sets a $@, but the signature is not verified. | MissingJWTSignatureCheckTest.java:21:16:21:75 | setSigningKey(...) | JWT signing key | +| MissingJWTSignatureCheckTest.java:110:9:110:74 | build(...) | MissingJWTSignatureCheckTest.java:110:9:110:66 | setSigningKey(...) : DefaultJwtParserBuilder | MissingJWTSignatureCheckTest.java:110:9:110:74 | build(...) | This parser sets a $@, but the signature is not verified. | MissingJWTSignatureCheckTest.java:110:9:110:66 | setSigningKey(...) | JWT signing key | +| MissingJWTSignatureCheckTest.java:114:9:114:83 | build(...) | MissingJWTSignatureCheckTest.java:114:9:114:75 | setSigningKey(...) : DefaultJwtParserBuilder | MissingJWTSignatureCheckTest.java:114:9:114:83 | build(...) | This parser sets a $@, but the signature is not verified. | MissingJWTSignatureCheckTest.java:114:9:114:75 | setSigningKey(...) | JWT signing key | +| MissingJWTSignatureCheckTest.java:118:9:118:59 | setSigningKey(...) | MissingJWTSignatureCheckTest.java:118:9:118:59 | setSigningKey(...) | MissingJWTSignatureCheckTest.java:118:9:118:59 | setSigningKey(...) | This parser sets a $@, but the signature is not verified. | MissingJWTSignatureCheckTest.java:118:9:118:59 | setSigningKey(...) | JWT signing key | +edges +| MissingJWTSignatureCheckTest.java:13:16:13:66 | setSigningKey(...) : JwtParser | MissingJWTSignatureCheckTest.java:25:29:25:46 | getASignedParser(...) : JwtParser | provenance | | +| MissingJWTSignatureCheckTest.java:17:16:17:73 | setSigningKey(...) : DefaultJwtParserBuilder | MissingJWTSignatureCheckTest.java:17:16:17:81 | build(...) : JwtParser | provenance | Config | +| MissingJWTSignatureCheckTest.java:17:16:17:81 | build(...) : JwtParser | MissingJWTSignatureCheckTest.java:31:29:31:63 | getASignedParserFromParserBuilder(...) : JwtParser | provenance | | +| MissingJWTSignatureCheckTest.java:21:16:21:75 | setSigningKey(...) : JwtParser | MissingJWTSignatureCheckTest.java:37:29:37:49 | getASignedNewParser(...) : JwtParser | provenance | | +| MissingJWTSignatureCheckTest.java:25:29:25:46 | getASignedParser(...) : JwtParser | MissingJWTSignatureCheckTest.java:26:31:26:37 | parser1 : JwtParser | provenance | | +| MissingJWTSignatureCheckTest.java:25:29:25:46 | getASignedParser(...) : JwtParser | MissingJWTSignatureCheckTest.java:27:38:27:44 | parser1 : JwtParser | provenance | | +| MissingJWTSignatureCheckTest.java:26:31:26:37 | parser1 : JwtParser | MissingJWTSignatureCheckTest.java:82:40:82:55 | parser : JwtParser | provenance | | +| MissingJWTSignatureCheckTest.java:27:38:27:44 | parser1 : JwtParser | MissingJWTSignatureCheckTest.java:86:47:86:62 | parser : JwtParser | provenance | | +| MissingJWTSignatureCheckTest.java:31:29:31:63 | getASignedParserFromParserBuilder(...) : JwtParser | MissingJWTSignatureCheckTest.java:32:31:32:37 | parser2 : JwtParser | provenance | | +| MissingJWTSignatureCheckTest.java:31:29:31:63 | getASignedParserFromParserBuilder(...) : JwtParser | MissingJWTSignatureCheckTest.java:33:38:33:44 | parser2 : JwtParser | provenance | | +| MissingJWTSignatureCheckTest.java:32:31:32:37 | parser2 : JwtParser | MissingJWTSignatureCheckTest.java:82:40:82:55 | parser : JwtParser | provenance | | +| MissingJWTSignatureCheckTest.java:33:38:33:44 | parser2 : JwtParser | MissingJWTSignatureCheckTest.java:86:47:86:62 | parser : JwtParser | provenance | | +| MissingJWTSignatureCheckTest.java:37:29:37:49 | getASignedNewParser(...) : JwtParser | MissingJWTSignatureCheckTest.java:38:31:38:37 | parser3 : JwtParser | provenance | | +| MissingJWTSignatureCheckTest.java:37:29:37:49 | getASignedNewParser(...) : JwtParser | MissingJWTSignatureCheckTest.java:39:38:39:44 | parser3 : JwtParser | provenance | | +| MissingJWTSignatureCheckTest.java:38:31:38:37 | parser3 : JwtParser | MissingJWTSignatureCheckTest.java:82:40:82:55 | parser : JwtParser | provenance | | +| MissingJWTSignatureCheckTest.java:39:38:39:44 | parser3 : JwtParser | MissingJWTSignatureCheckTest.java:86:47:86:62 | parser : JwtParser | provenance | | +| MissingJWTSignatureCheckTest.java:82:40:82:55 | parser : JwtParser | MissingJWTSignatureCheckTest.java:83:9:83:14 | parser | provenance | | +| MissingJWTSignatureCheckTest.java:86:47:86:62 | parser : JwtParser | MissingJWTSignatureCheckTest.java:87:9:87:14 | parser | provenance | | +| MissingJWTSignatureCheckTest.java:110:9:110:66 | setSigningKey(...) : DefaultJwtParserBuilder | MissingJWTSignatureCheckTest.java:110:9:110:74 | build(...) | provenance | Config | +| MissingJWTSignatureCheckTest.java:114:9:114:75 | setSigningKey(...) : DefaultJwtParserBuilder | MissingJWTSignatureCheckTest.java:114:9:114:83 | build(...) | provenance | Config | +nodes +| MissingJWTSignatureCheckTest.java:13:16:13:66 | setSigningKey(...) : JwtParser | semmle.label | setSigningKey(...) : JwtParser | +| MissingJWTSignatureCheckTest.java:17:16:17:73 | setSigningKey(...) : DefaultJwtParserBuilder | semmle.label | setSigningKey(...) : DefaultJwtParserBuilder | +| MissingJWTSignatureCheckTest.java:17:16:17:81 | build(...) : JwtParser | semmle.label | build(...) : JwtParser | +| MissingJWTSignatureCheckTest.java:21:16:21:75 | setSigningKey(...) : JwtParser | semmle.label | setSigningKey(...) : JwtParser | +| MissingJWTSignatureCheckTest.java:25:29:25:46 | getASignedParser(...) : JwtParser | semmle.label | getASignedParser(...) : JwtParser | +| MissingJWTSignatureCheckTest.java:26:31:26:37 | parser1 : JwtParser | semmle.label | parser1 : JwtParser | +| MissingJWTSignatureCheckTest.java:27:38:27:44 | parser1 : JwtParser | semmle.label | parser1 : JwtParser | +| MissingJWTSignatureCheckTest.java:31:29:31:63 | getASignedParserFromParserBuilder(...) : JwtParser | semmle.label | getASignedParserFromParserBuilder(...) : JwtParser | +| MissingJWTSignatureCheckTest.java:32:31:32:37 | parser2 : JwtParser | semmle.label | parser2 : JwtParser | +| MissingJWTSignatureCheckTest.java:33:38:33:44 | parser2 : JwtParser | semmle.label | parser2 : JwtParser | +| MissingJWTSignatureCheckTest.java:37:29:37:49 | getASignedNewParser(...) : JwtParser | semmle.label | getASignedNewParser(...) : JwtParser | +| MissingJWTSignatureCheckTest.java:38:31:38:37 | parser3 : JwtParser | semmle.label | parser3 : JwtParser | +| MissingJWTSignatureCheckTest.java:39:38:39:44 | parser3 : JwtParser | semmle.label | parser3 : JwtParser | +| MissingJWTSignatureCheckTest.java:82:40:82:55 | parser : JwtParser | semmle.label | parser : JwtParser | +| MissingJWTSignatureCheckTest.java:83:9:83:14 | parser | semmle.label | parser | +| MissingJWTSignatureCheckTest.java:86:47:86:62 | parser : JwtParser | semmle.label | parser : JwtParser | +| MissingJWTSignatureCheckTest.java:87:9:87:14 | parser | semmle.label | parser | +| MissingJWTSignatureCheckTest.java:110:9:110:66 | setSigningKey(...) : DefaultJwtParserBuilder | semmle.label | setSigningKey(...) : DefaultJwtParserBuilder | +| MissingJWTSignatureCheckTest.java:110:9:110:74 | build(...) | semmle.label | build(...) | +| MissingJWTSignatureCheckTest.java:114:9:114:75 | setSigningKey(...) : DefaultJwtParserBuilder | semmle.label | setSigningKey(...) : DefaultJwtParserBuilder | +| MissingJWTSignatureCheckTest.java:114:9:114:83 | build(...) | semmle.label | build(...) | +| MissingJWTSignatureCheckTest.java:118:9:118:59 | setSigningKey(...) | semmle.label | setSigningKey(...) | +subpaths diff --git a/java/ql/test/query-tests/security/CWE-347/MissingJWTSignatureCheckTest.java b/java/ql/test/query-tests/security/CWE-347/MissingJWTSignatureCheckTest.java index 93b54154ffc..c4ab09b27e6 100644 --- a/java/ql/test/query-tests/security/CWE-347/MissingJWTSignatureCheckTest.java +++ b/java/ql/test/query-tests/security/CWE-347/MissingJWTSignatureCheckTest.java @@ -10,15 +10,15 @@ import io.jsonwebtoken.impl.DefaultJwtParserBuilder; public class MissingJWTSignatureCheckTest { private JwtParser getASignedParser() { - return Jwts.parser().setSigningKey("someBase64EncodedKey"); + return Jwts.parser().setSigningKey("someBase64EncodedKey"); // $ Source } private JwtParser getASignedParserFromParserBuilder() { - return Jwts.parserBuilder().setSigningKey("someBase64EncodedKey").build(); + return Jwts.parserBuilder().setSigningKey("someBase64EncodedKey").build(); // $ Source } private JwtParser getASignedNewParser() { - return new DefaultJwtParser().setSigningKey("someBase64EncodedKey"); + return new DefaultJwtParser().setSigningKey("someBase64EncodedKey"); // $ Source } private void callSignedParsers() { @@ -80,11 +80,11 @@ public class MissingJWTSignatureCheckTest { } private void badJwtOnParserBuilder(JwtParser parser, String token) { - parser.parse(token); // $hasMissingJwtSignatureCheck + parser.parse(token); // $ Alert } private void badJwtHandlerOnParserBuilder(JwtParser parser, String token) { - parser.parse(token, new JwtHandlerAdapter>() { // $hasMissingJwtSignatureCheck + parser.parse(token, new JwtHandlerAdapter>() { // $ Alert @Override public Jwt onPlaintextJwt(Jwt jwt) { return jwt; @@ -107,15 +107,15 @@ public class MissingJWTSignatureCheckTest { } private void badJwtOnParserBuilder(String token) { - Jwts.parserBuilder().setSigningKey("someBase64EncodedKey").build().parse(token); // $hasMissingJwtSignatureCheck + Jwts.parserBuilder().setSigningKey("someBase64EncodedKey").build().parse(token); // $ Alert } private void badJwtOnDefaultParserBuilder(String token) { - new DefaultJwtParserBuilder().setSigningKey("someBase64EncodedKey").build().parse(token); // $hasMissingJwtSignatureCheck + new DefaultJwtParserBuilder().setSigningKey("someBase64EncodedKey").build().parse(token); // $ Alert } private void badJwtHandlerOnParser(String token) { - Jwts.parser().setSigningKey("someBase64EncodedKey").parse(token, // $hasMissingJwtSignatureCheck + Jwts.parser().setSigningKey("someBase64EncodedKey").parse(token, // $ Alert new JwtHandlerAdapter>() { @Override public Jwt onPlaintextJwt(Jwt jwt) { diff --git a/java/ql/test/query-tests/security/CWE-347/MissingJWTSignatureCheckTest.ql b/java/ql/test/query-tests/security/CWE-347/MissingJWTSignatureCheckTest.ql deleted file mode 100644 index 4ce6116e27f..00000000000 --- a/java/ql/test/query-tests/security/CWE-347/MissingJWTSignatureCheckTest.ql +++ /dev/null @@ -1,18 +0,0 @@ -import java -import semmle.code.java.security.MissingJWTSignatureCheckQuery -import utils.test.InlineExpectationsTest - -module HasMissingJwtSignatureCheckTest implements TestSig { - string getARelevantTag() { result = "hasMissingJwtSignatureCheck" } - - predicate hasActualResult(Location location, string element, string tag, string value) { - tag = "hasMissingJwtSignatureCheck" and - exists(DataFlow::Node sink | MissingJwtSignatureCheckFlow::flowTo(sink) | - sink.getLocation() = location and - element = sink.toString() and - value = "" - ) - } -} - -import MakeTest diff --git a/java/ql/test/query-tests/security/CWE-347/MissingJWTSignatureCheckTest.qlref b/java/ql/test/query-tests/security/CWE-347/MissingJWTSignatureCheckTest.qlref new file mode 100644 index 00000000000..79b63ee641f --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-347/MissingJWTSignatureCheckTest.qlref @@ -0,0 +1,4 @@ +query: Security/CWE/CWE-347/MissingJWTSignatureCheck.ql +postprocess: + - utils/test/PrettyPrintModels.ql + - utils/test/InlineExpectationsTestQuery.ql diff --git a/java/ql/test/query-tests/security/CWE-441/Test.java b/java/ql/test/query-tests/security/CWE-441/Test.java index 0bda0933115..be8bedeb7e7 100644 --- a/java/ql/test/query-tests/security/CWE-441/Test.java +++ b/java/ql/test/query-tests/security/CWE-441/Test.java @@ -29,23 +29,23 @@ public class Test extends Activity { public void onCreate() { { ContentResolver contentResolver = getContentResolver(); - Uri uri = (Uri) getIntent().getParcelableExtra("URI_EXTRA"); - contentResolver.openInputStream(uri); // $ hasTaintFlow - contentResolver.openOutputStream(uri); // $ hasTaintFlow - contentResolver.openAssetFile(uri, null, null); // $ hasTaintFlow - contentResolver.openAssetFileDescriptor(uri, null); // $ hasTaintFlow - contentResolver.openFile(uri, null, null); // $ hasTaintFlow - contentResolver.openFileDescriptor(uri, null); // $ hasTaintFlow - contentResolver.openTypedAssetFile(uri, null, null, null); // $ hasTaintFlow - contentResolver.openTypedAssetFileDescriptor(uri, null, null); // $ hasTaintFlow + Uri uri = (Uri) getIntent().getParcelableExtra("URI_EXTRA"); // $ Source + contentResolver.openInputStream(uri); // $ Alert + contentResolver.openOutputStream(uri); // $ Alert + contentResolver.openAssetFile(uri, null, null); // $ Alert + contentResolver.openAssetFileDescriptor(uri, null); // $ Alert + contentResolver.openFile(uri, null, null); // $ Alert + contentResolver.openFileDescriptor(uri, null); // $ Alert + contentResolver.openTypedAssetFile(uri, null, null, null); // $ Alert + contentResolver.openTypedAssetFileDescriptor(uri, null, null); // $ Alert } { ContentResolver contentResolver = getContentResolver(); - Uri uri = (Uri) getIntent().getParcelableExtra("URI_EXTRA"); + Uri uri = (Uri) getIntent().getParcelableExtra("URI_EXTRA"); // $ Source String path = uri.getPath(); if (path.startsWith("/data")) throw new SecurityException(); - contentResolver.openInputStream(uri); // $ hasTaintFlow + contentResolver.openInputStream(uri); // $ Alert } // Equals checks { @@ -64,11 +64,11 @@ public class Test extends Activity { // Allow list checks { ContentResolver contentResolver = getContentResolver(); - Uri uri = (Uri) getIntent().getParcelableExtra("URI_EXTRA"); + Uri uri = (Uri) getIntent().getParcelableExtra("URI_EXTRA"); // $ Source String path = uri.getPath(); if (!path.startsWith("/safe/path")) throw new SecurityException(); - contentResolver.openInputStream(uri); // $ hasTaintFlow + contentResolver.openInputStream(uri); // $ Alert } { ContentResolver contentResolver = getContentResolver(); @@ -89,11 +89,11 @@ public class Test extends Activity { // Block list checks { ContentResolver contentResolver = getContentResolver(); - Uri uri = (Uri) getIntent().getParcelableExtra("URI_EXTRA"); + Uri uri = (Uri) getIntent().getParcelableExtra("URI_EXTRA"); // $ Source String path = uri.getPath(); if (path.startsWith("/data")) throw new SecurityException(); - contentResolver.openInputStream(uri); // $ hasTaintFlow + contentResolver.openInputStream(uri); // $ Alert } { ContentResolver contentResolver = getContentResolver(); diff --git a/java/ql/test/query-tests/security/CWE-441/UnsafeContentUriResolutionTest.expected b/java/ql/test/query-tests/security/CWE-441/UnsafeContentUriResolutionTest.expected index e69de29bb2d..73fe6b44f3c 100644 --- a/java/ql/test/query-tests/security/CWE-441/UnsafeContentUriResolutionTest.expected +++ b/java/ql/test/query-tests/security/CWE-441/UnsafeContentUriResolutionTest.expected @@ -0,0 +1,59 @@ +#select +| Test.java:33:45:33:47 | uri | Test.java:32:29:32:39 | getIntent(...) : Intent | Test.java:33:45:33:47 | uri | This ContentResolver method that resolves a URI depends on a $@. | Test.java:32:29:32:39 | getIntent(...) | user-provided value | +| Test.java:34:46:34:48 | uri | Test.java:32:29:32:39 | getIntent(...) : Intent | Test.java:34:46:34:48 | uri | This ContentResolver method that resolves a URI depends on a $@. | Test.java:32:29:32:39 | getIntent(...) | user-provided value | +| Test.java:35:43:35:45 | uri | Test.java:32:29:32:39 | getIntent(...) : Intent | Test.java:35:43:35:45 | uri | This ContentResolver method that resolves a URI depends on a $@. | Test.java:32:29:32:39 | getIntent(...) | user-provided value | +| Test.java:36:53:36:55 | uri | Test.java:32:29:32:39 | getIntent(...) : Intent | Test.java:36:53:36:55 | uri | This ContentResolver method that resolves a URI depends on a $@. | Test.java:32:29:32:39 | getIntent(...) | user-provided value | +| Test.java:37:38:37:40 | uri | Test.java:32:29:32:39 | getIntent(...) : Intent | Test.java:37:38:37:40 | uri | This ContentResolver method that resolves a URI depends on a $@. | Test.java:32:29:32:39 | getIntent(...) | user-provided value | +| Test.java:38:48:38:50 | uri | Test.java:32:29:32:39 | getIntent(...) : Intent | Test.java:38:48:38:50 | uri | This ContentResolver method that resolves a URI depends on a $@. | Test.java:32:29:32:39 | getIntent(...) | user-provided value | +| Test.java:39:48:39:50 | uri | Test.java:32:29:32:39 | getIntent(...) : Intent | Test.java:39:48:39:50 | uri | This ContentResolver method that resolves a URI depends on a $@. | Test.java:32:29:32:39 | getIntent(...) | user-provided value | +| Test.java:40:58:40:60 | uri | Test.java:32:29:32:39 | getIntent(...) : Intent | Test.java:40:58:40:60 | uri | This ContentResolver method that resolves a URI depends on a $@. | Test.java:32:29:32:39 | getIntent(...) | user-provided value | +| Test.java:48:45:48:47 | uri | Test.java:44:29:44:39 | getIntent(...) : Intent | Test.java:48:45:48:47 | uri | This ContentResolver method that resolves a URI depends on a $@. | Test.java:44:29:44:39 | getIntent(...) | user-provided value | +| Test.java:71:45:71:47 | uri | Test.java:67:29:67:39 | getIntent(...) : Intent | Test.java:71:45:71:47 | uri | This ContentResolver method that resolves a URI depends on a $@. | Test.java:67:29:67:39 | getIntent(...) | user-provided value | +| Test.java:96:45:96:47 | uri | Test.java:92:29:92:39 | getIntent(...) : Intent | Test.java:96:45:96:47 | uri | This ContentResolver method that resolves a URI depends on a $@. | Test.java:92:29:92:39 | getIntent(...) | user-provided value | +edges +| Test.java:32:23:32:71 | (...)... : Uri | Test.java:33:45:33:47 | uri | provenance | | +| Test.java:32:23:32:71 | (...)... : Uri | Test.java:34:46:34:48 | uri | provenance | | +| Test.java:32:23:32:71 | (...)... : Uri | Test.java:35:43:35:45 | uri | provenance | | +| Test.java:32:23:32:71 | (...)... : Uri | Test.java:36:53:36:55 | uri | provenance | | +| Test.java:32:23:32:71 | (...)... : Uri | Test.java:37:38:37:40 | uri | provenance | | +| Test.java:32:23:32:71 | (...)... : Uri | Test.java:38:48:38:50 | uri | provenance | | +| Test.java:32:23:32:71 | (...)... : Uri | Test.java:39:48:39:50 | uri | provenance | | +| Test.java:32:23:32:71 | (...)... : Uri | Test.java:40:58:40:60 | uri | provenance | | +| Test.java:32:29:32:39 | getIntent(...) : Intent | Test.java:32:29:32:71 | getParcelableExtra(...) : Parcelable | provenance | MaD:1 | +| Test.java:32:29:32:71 | getParcelableExtra(...) : Parcelable | Test.java:32:23:32:71 | (...)... : Uri | provenance | | +| Test.java:44:23:44:71 | (...)... : Uri | Test.java:48:45:48:47 | uri | provenance | | +| Test.java:44:29:44:39 | getIntent(...) : Intent | Test.java:44:29:44:71 | getParcelableExtra(...) : Parcelable | provenance | MaD:1 | +| Test.java:44:29:44:71 | getParcelableExtra(...) : Parcelable | Test.java:44:23:44:71 | (...)... : Uri | provenance | | +| Test.java:67:23:67:71 | (...)... : Uri | Test.java:71:45:71:47 | uri | provenance | | +| Test.java:67:29:67:39 | getIntent(...) : Intent | Test.java:67:29:67:71 | getParcelableExtra(...) : Parcelable | provenance | MaD:1 | +| Test.java:67:29:67:71 | getParcelableExtra(...) : Parcelable | Test.java:67:23:67:71 | (...)... : Uri | provenance | | +| Test.java:92:23:92:71 | (...)... : Uri | Test.java:96:45:96:47 | uri | provenance | | +| Test.java:92:29:92:39 | getIntent(...) : Intent | Test.java:92:29:92:71 | getParcelableExtra(...) : Parcelable | provenance | MaD:1 | +| Test.java:92:29:92:71 | getParcelableExtra(...) : Parcelable | Test.java:92:23:92:71 | (...)... : Uri | provenance | | +models +| 1 | Summary: android.content; Intent; true; getParcelableExtra; (String); ; Argument[this].SyntheticField[android.content.Intent.extras].MapValue; ReturnValue; value; manual | +nodes +| Test.java:32:23:32:71 | (...)... : Uri | semmle.label | (...)... : Uri | +| Test.java:32:29:32:39 | getIntent(...) : Intent | semmle.label | getIntent(...) : Intent | +| Test.java:32:29:32:71 | getParcelableExtra(...) : Parcelable | semmle.label | getParcelableExtra(...) : Parcelable | +| Test.java:33:45:33:47 | uri | semmle.label | uri | +| Test.java:34:46:34:48 | uri | semmle.label | uri | +| Test.java:35:43:35:45 | uri | semmle.label | uri | +| Test.java:36:53:36:55 | uri | semmle.label | uri | +| Test.java:37:38:37:40 | uri | semmle.label | uri | +| Test.java:38:48:38:50 | uri | semmle.label | uri | +| Test.java:39:48:39:50 | uri | semmle.label | uri | +| Test.java:40:58:40:60 | uri | semmle.label | uri | +| Test.java:44:23:44:71 | (...)... : Uri | semmle.label | (...)... : Uri | +| Test.java:44:29:44:39 | getIntent(...) : Intent | semmle.label | getIntent(...) : Intent | +| Test.java:44:29:44:71 | getParcelableExtra(...) : Parcelable | semmle.label | getParcelableExtra(...) : Parcelable | +| Test.java:48:45:48:47 | uri | semmle.label | uri | +| Test.java:67:23:67:71 | (...)... : Uri | semmle.label | (...)... : Uri | +| Test.java:67:29:67:39 | getIntent(...) : Intent | semmle.label | getIntent(...) : Intent | +| Test.java:67:29:67:71 | getParcelableExtra(...) : Parcelable | semmle.label | getParcelableExtra(...) : Parcelable | +| Test.java:71:45:71:47 | uri | semmle.label | uri | +| Test.java:92:23:92:71 | (...)... : Uri | semmle.label | (...)... : Uri | +| Test.java:92:29:92:39 | getIntent(...) : Intent | semmle.label | getIntent(...) : Intent | +| Test.java:92:29:92:71 | getParcelableExtra(...) : Parcelable | semmle.label | getParcelableExtra(...) : Parcelable | +| Test.java:96:45:96:47 | uri | semmle.label | uri | +subpaths diff --git a/java/ql/test/query-tests/security/CWE-441/UnsafeContentUriResolutionTest.ql b/java/ql/test/query-tests/security/CWE-441/UnsafeContentUriResolutionTest.ql deleted file mode 100644 index ded8a8d6979..00000000000 --- a/java/ql/test/query-tests/security/CWE-441/UnsafeContentUriResolutionTest.ql +++ /dev/null @@ -1,4 +0,0 @@ -import java -import utils.test.InlineFlowTest -import semmle.code.java.security.UnsafeContentUriResolutionQuery -import TaintFlowTest diff --git a/java/ql/test/query-tests/security/CWE-441/UnsafeContentUriResolutionTest.qlref b/java/ql/test/query-tests/security/CWE-441/UnsafeContentUriResolutionTest.qlref new file mode 100644 index 00000000000..abcbe555e28 --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-441/UnsafeContentUriResolutionTest.qlref @@ -0,0 +1,4 @@ +query: Security/CWE/CWE-441/UnsafeContentUriResolution.ql +postprocess: + - utils/test/PrettyPrintModels.ql + - utils/test/InlineExpectationsTestQuery.ql diff --git a/java/ql/test/query-tests/security/CWE-470/FragmentInjectionTest.expected b/java/ql/test/query-tests/security/CWE-470/FragmentInjectionTest.expected index e69de29bb2d..27281d07811 100644 --- a/java/ql/test/query-tests/security/CWE-470/FragmentInjectionTest.expected +++ b/java/ql/test/query-tests/security/CWE-470/FragmentInjectionTest.expected @@ -0,0 +1,68 @@ +#select +| MainActivity.java:17:20:17:39 | newInstance(...) | MainActivity.java:14:34:14:44 | getIntent(...) : Intent | MainActivity.java:17:20:17:39 | newInstance(...) | Fragment depends on a $@, which may allow a malicious application to bypass access controls. | MainActivity.java:14:34:14:44 | getIntent(...) | user-provided value | +| MainActivity.java:18:23:18:55 | instantiate(...) | MainActivity.java:14:34:14:44 | getIntent(...) : Intent | MainActivity.java:18:23:18:55 | instantiate(...) | Fragment depends on a $@, which may allow a malicious application to bypass access controls. | MainActivity.java:14:34:14:44 | getIntent(...) | user-provided value | +| MainActivity.java:19:23:19:61 | instantiate(...) | MainActivity.java:14:34:14:44 | getIntent(...) : Intent | MainActivity.java:19:23:19:61 | instantiate(...) | Fragment depends on a $@, which may allow a malicious application to bypass access controls. | MainActivity.java:14:34:14:44 | getIntent(...) | user-provided value | +| MainActivity.java:20:23:20:28 | fClass | MainActivity.java:14:34:14:44 | getIntent(...) : Intent | MainActivity.java:20:23:20:28 | fClass | Fragment depends on a $@, which may allow a malicious application to bypass access controls. | MainActivity.java:14:34:14:44 | getIntent(...) | user-provided value | +| MainActivity.java:21:23:21:42 | newInstance(...) | MainActivity.java:14:34:14:44 | getIntent(...) : Intent | MainActivity.java:21:23:21:42 | newInstance(...) | Fragment depends on a $@, which may allow a malicious application to bypass access controls. | MainActivity.java:14:34:14:44 | getIntent(...) | user-provided value | +| MainActivity.java:22:23:22:42 | newInstance(...) | MainActivity.java:14:34:14:44 | getIntent(...) : Intent | MainActivity.java:22:23:22:42 | newInstance(...) | Fragment depends on a $@, which may allow a malicious application to bypass access controls. | MainActivity.java:14:34:14:44 | getIntent(...) | user-provided value | +| MainActivity.java:23:27:23:32 | fClass | MainActivity.java:14:34:14:44 | getIntent(...) : Intent | MainActivity.java:23:27:23:32 | fClass | Fragment depends on a $@, which may allow a malicious application to bypass access controls. | MainActivity.java:14:34:14:44 | getIntent(...) | user-provided value | +| MainActivity.java:24:27:24:46 | newInstance(...) | MainActivity.java:14:34:14:44 | getIntent(...) : Intent | MainActivity.java:24:27:24:46 | newInstance(...) | Fragment depends on a $@, which may allow a malicious application to bypass access controls. | MainActivity.java:14:34:14:44 | getIntent(...) | user-provided value | +| MainActivity.java:25:27:25:32 | fClass | MainActivity.java:14:34:14:44 | getIntent(...) : Intent | MainActivity.java:25:27:25:32 | fClass | Fragment depends on a $@, which may allow a malicious application to bypass access controls. | MainActivity.java:14:34:14:44 | getIntent(...) | user-provided value | +| MainActivity.java:26:27:26:46 | newInstance(...) | MainActivity.java:14:34:14:44 | getIntent(...) : Intent | MainActivity.java:26:27:26:46 | newInstance(...) | Fragment depends on a $@, which may allow a malicious application to bypass access controls. | MainActivity.java:14:34:14:44 | getIntent(...) | user-provided value | +edges +| MainActivity.java:14:34:14:44 | getIntent(...) : Intent | MainActivity.java:14:34:14:68 | getStringExtra(...) : String | provenance | MaD:10 | +| MainActivity.java:14:34:14:68 | getStringExtra(...) : String | MainActivity.java:16:70:16:74 | fname : String | provenance | | +| MainActivity.java:16:38:16:75 | (...)... : Class | MainActivity.java:17:20:17:25 | fClass : Class | provenance | | +| MainActivity.java:16:56:16:75 | forName(...) : Class | MainActivity.java:16:38:16:75 | (...)... : Class | provenance | | +| MainActivity.java:16:70:16:74 | fname : String | MainActivity.java:16:56:16:75 | forName(...) : Class | provenance | Config | +| MainActivity.java:16:70:16:74 | fname : String | MainActivity.java:18:50:18:54 | fname : String | provenance | | +| MainActivity.java:17:20:17:25 | fClass : Class | MainActivity.java:17:20:17:39 | newInstance(...) | provenance | Config Sink:MaD:1 | +| MainActivity.java:17:20:17:25 | fClass : Class | MainActivity.java:20:23:20:28 | fClass | provenance | Sink:MaD:2 | +| MainActivity.java:17:20:17:25 | fClass : Class | MainActivity.java:21:23:21:28 | fClass : Class | provenance | | +| MainActivity.java:18:50:18:54 | fname : String | MainActivity.java:18:23:18:55 | instantiate(...) | provenance | Config Sink:MaD:4 | +| MainActivity.java:18:50:18:54 | fname : String | MainActivity.java:19:50:19:54 | fname : String | provenance | | +| MainActivity.java:19:50:19:54 | fname : String | MainActivity.java:19:23:19:61 | instantiate(...) | provenance | Config Sink:MaD:3 | +| MainActivity.java:21:23:21:28 | fClass : Class | MainActivity.java:21:23:21:42 | newInstance(...) | provenance | Config Sink:MaD:4 | +| MainActivity.java:21:23:21:28 | fClass : Class | MainActivity.java:22:23:22:28 | fClass : Class | provenance | | +| MainActivity.java:22:23:22:28 | fClass : Class | MainActivity.java:22:23:22:42 | newInstance(...) | provenance | Config Sink:MaD:5 | +| MainActivity.java:22:23:22:28 | fClass : Class | MainActivity.java:23:27:23:32 | fClass | provenance | Sink:MaD:6 | +| MainActivity.java:22:23:22:28 | fClass : Class | MainActivity.java:24:27:24:32 | fClass : Class | provenance | | +| MainActivity.java:24:27:24:32 | fClass : Class | MainActivity.java:24:27:24:46 | newInstance(...) | provenance | Config Sink:MaD:8 | +| MainActivity.java:24:27:24:32 | fClass : Class | MainActivity.java:25:27:25:32 | fClass | provenance | Sink:MaD:7 | +| MainActivity.java:24:27:24:32 | fClass : Class | MainActivity.java:26:27:26:32 | fClass : Class | provenance | | +| MainActivity.java:26:27:26:32 | fClass : Class | MainActivity.java:26:27:26:46 | newInstance(...) | provenance | Config Sink:MaD:9 | +models +| 1 | Sink: androidx.fragment.app; FragmentTransaction; true; add; (Fragment,String); ; Argument[0]; fragment-injection; manual | +| 2 | Sink: androidx.fragment.app; FragmentTransaction; true; add; (int,Class,Bundle,String); ; Argument[1]; fragment-injection; manual | +| 3 | Sink: androidx.fragment.app; FragmentTransaction; true; add; (int,Fragment); ; Argument[1]; fragment-injection; manual | +| 4 | Sink: androidx.fragment.app; FragmentTransaction; true; add; (int,Fragment,String); ; Argument[1]; fragment-injection; manual | +| 5 | Sink: androidx.fragment.app; FragmentTransaction; true; attach; (Fragment); ; Argument[0]; fragment-injection; manual | +| 6 | Sink: androidx.fragment.app; FragmentTransaction; true; replace; (int,Class,Bundle); ; Argument[1]; fragment-injection; manual | +| 7 | Sink: androidx.fragment.app; FragmentTransaction; true; replace; (int,Class,Bundle,String); ; Argument[1]; fragment-injection; manual | +| 8 | Sink: androidx.fragment.app; FragmentTransaction; true; replace; (int,Fragment); ; Argument[1]; fragment-injection; manual | +| 9 | Sink: androidx.fragment.app; FragmentTransaction; true; replace; (int,Fragment,String); ; Argument[1]; fragment-injection; manual | +| 10 | Summary: android.content; Intent; true; getStringExtra; (String); ; Argument[this].SyntheticField[android.content.Intent.extras].MapValue; ReturnValue; value; manual | +nodes +| MainActivity.java:14:34:14:44 | getIntent(...) : Intent | semmle.label | getIntent(...) : Intent | +| MainActivity.java:14:34:14:68 | getStringExtra(...) : String | semmle.label | getStringExtra(...) : String | +| MainActivity.java:16:38:16:75 | (...)... : Class | semmle.label | (...)... : Class | +| MainActivity.java:16:56:16:75 | forName(...) : Class | semmle.label | forName(...) : Class | +| MainActivity.java:16:70:16:74 | fname : String | semmle.label | fname : String | +| MainActivity.java:17:20:17:25 | fClass : Class | semmle.label | fClass : Class | +| MainActivity.java:17:20:17:39 | newInstance(...) | semmle.label | newInstance(...) | +| MainActivity.java:18:23:18:55 | instantiate(...) | semmle.label | instantiate(...) | +| MainActivity.java:18:50:18:54 | fname : String | semmle.label | fname : String | +| MainActivity.java:19:23:19:61 | instantiate(...) | semmle.label | instantiate(...) | +| MainActivity.java:19:50:19:54 | fname : String | semmle.label | fname : String | +| MainActivity.java:20:23:20:28 | fClass | semmle.label | fClass | +| MainActivity.java:21:23:21:28 | fClass : Class | semmle.label | fClass : Class | +| MainActivity.java:21:23:21:42 | newInstance(...) | semmle.label | newInstance(...) | +| MainActivity.java:22:23:22:28 | fClass : Class | semmle.label | fClass : Class | +| MainActivity.java:22:23:22:42 | newInstance(...) | semmle.label | newInstance(...) | +| MainActivity.java:23:27:23:32 | fClass | semmle.label | fClass | +| MainActivity.java:24:27:24:32 | fClass : Class | semmle.label | fClass : Class | +| MainActivity.java:24:27:24:46 | newInstance(...) | semmle.label | newInstance(...) | +| MainActivity.java:25:27:25:32 | fClass | semmle.label | fClass | +| MainActivity.java:26:27:26:32 | fClass : Class | semmle.label | fClass : Class | +| MainActivity.java:26:27:26:46 | newInstance(...) | semmle.label | newInstance(...) | +subpaths diff --git a/java/ql/test/query-tests/security/CWE-470/FragmentInjectionTest.ql b/java/ql/test/query-tests/security/CWE-470/FragmentInjectionTest.ql deleted file mode 100644 index 665d750ee20..00000000000 --- a/java/ql/test/query-tests/security/CWE-470/FragmentInjectionTest.ql +++ /dev/null @@ -1,4 +0,0 @@ -import java -import semmle.code.java.security.FragmentInjectionQuery -import utils.test.InlineFlowTest -import TaintFlowTest diff --git a/java/ql/test/query-tests/security/CWE-470/FragmentInjectionTest.qlref b/java/ql/test/query-tests/security/CWE-470/FragmentInjectionTest.qlref new file mode 100644 index 00000000000..f6d0df1bfcd --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-470/FragmentInjectionTest.qlref @@ -0,0 +1,4 @@ +query: Security/CWE/CWE-470/FragmentInjection.ql +postprocess: + - utils/test/PrettyPrintModels.ql + - utils/test/InlineExpectationsTestQuery.ql diff --git a/java/ql/test/query-tests/security/CWE-470/MainActivity.java b/java/ql/test/query-tests/security/CWE-470/MainActivity.java index 3773a9dbe37..fccc2d21ff6 100644 --- a/java/ql/test/query-tests/security/CWE-470/MainActivity.java +++ b/java/ql/test/query-tests/security/CWE-470/MainActivity.java @@ -11,19 +11,19 @@ public class MainActivity extends FragmentActivity { public void onCreate(Bundle savedInstance) { try { super.onCreate(savedInstance); - final String fname = getIntent().getStringExtra("fname"); + final String fname = getIntent().getStringExtra("fname"); // $ Source FragmentTransaction ft = getSupportFragmentManager().beginTransaction(); Class fClass = (Class) Class.forName(fname); - ft.add(fClass.newInstance(), ""); // $ hasTaintFlow - ft.add(0, Fragment.instantiate(this, fname), null); // $ hasTaintFlow - ft.add(0, Fragment.instantiate(this, fname, null)); // $ hasTaintFlow - ft.add(0, fClass, null, ""); // $ hasTaintFlow - ft.add(0, fClass.newInstance(), ""); // $ hasTaintFlow - ft.attach(fClass.newInstance()); // $ hasTaintFlow - ft.replace(0, fClass, null); // $ hasTaintFlow - ft.replace(0, fClass.newInstance()); // $ hasTaintFlow - ft.replace(0, fClass, null, ""); // $ hasTaintFlow - ft.replace(0, fClass.newInstance(), ""); // $ hasTaintFlow + ft.add(fClass.newInstance(), ""); // $ Alert + ft.add(0, Fragment.instantiate(this, fname), null); // $ Alert + ft.add(0, Fragment.instantiate(this, fname, null)); // $ Alert + ft.add(0, fClass, null, ""); // $ Alert + ft.add(0, fClass.newInstance(), ""); // $ Alert + ft.attach(fClass.newInstance()); // $ Alert + ft.replace(0, fClass, null); // $ Alert + ft.replace(0, fClass.newInstance()); // $ Alert + ft.replace(0, fClass, null, ""); // $ Alert + ft.replace(0, fClass.newInstance(), ""); // $ Alert ft.add(Fragment.class.newInstance(), ""); // Safe ft.attach(Fragment.class.newInstance()); // Safe diff --git a/java/ql/test/query-tests/security/CWE-489/webview-debugging/Test.java b/java/ql/test/query-tests/security/CWE-489/webview-debugging/Test.java index 3fe75e89388..378d5920cdd 100644 --- a/java/ql/test/query-tests/security/CWE-489/webview-debugging/Test.java +++ b/java/ql/test/query-tests/security/CWE-489/webview-debugging/Test.java @@ -4,20 +4,20 @@ class Test { boolean DEBUG_BUILD; void test1() { - WebView.setWebContentsDebuggingEnabled(true); // $hasValueFlow + WebView.setWebContentsDebuggingEnabled(true); // $ Alert } void test2(){ if (DEBUG_BUILD) { - WebView.setWebContentsDebuggingEnabled(true); + WebView.setWebContentsDebuggingEnabled(true); } } void test3(boolean enabled){ - WebView.setWebContentsDebuggingEnabled(enabled); // $hasValueFlow + WebView.setWebContentsDebuggingEnabled(enabled); // $ Alert } void test4(){ - test3(true); + test3(true); // $ Source } -} \ No newline at end of file +} diff --git a/java/ql/test/query-tests/security/CWE-489/webview-debugging/WebviewDebuggingEnabled.expected b/java/ql/test/query-tests/security/CWE-489/webview-debugging/WebviewDebuggingEnabled.expected index e69de29bb2d..040ae7e3f3f 100644 --- a/java/ql/test/query-tests/security/CWE-489/webview-debugging/WebviewDebuggingEnabled.expected +++ b/java/ql/test/query-tests/security/CWE-489/webview-debugging/WebviewDebuggingEnabled.expected @@ -0,0 +1,12 @@ +#select +| Test.java:7:48:7:51 | true | Test.java:7:48:7:51 | true | Test.java:7:48:7:51 | true | Webview debugging is enabled. | +| Test.java:17:48:17:54 | enabled | Test.java:21:15:21:18 | true : Boolean | Test.java:17:48:17:54 | enabled | Webview debugging is enabled. | +edges +| Test.java:16:16:16:30 | enabled : Boolean | Test.java:17:48:17:54 | enabled | provenance | | +| Test.java:21:15:21:18 | true : Boolean | Test.java:16:16:16:30 | enabled : Boolean | provenance | | +nodes +| Test.java:7:48:7:51 | true | semmle.label | true | +| Test.java:16:16:16:30 | enabled : Boolean | semmle.label | enabled : Boolean | +| Test.java:17:48:17:54 | enabled | semmle.label | enabled | +| Test.java:21:15:21:18 | true : Boolean | semmle.label | true : Boolean | +subpaths diff --git a/java/ql/test/query-tests/security/CWE-489/webview-debugging/WebviewDebuggingEnabled.ql b/java/ql/test/query-tests/security/CWE-489/webview-debugging/WebviewDebuggingEnabled.ql deleted file mode 100644 index f0b9cf08f82..00000000000 --- a/java/ql/test/query-tests/security/CWE-489/webview-debugging/WebviewDebuggingEnabled.ql +++ /dev/null @@ -1,4 +0,0 @@ -import java -import utils.test.InlineFlowTest -import semmle.code.java.security.WebviewDebuggingEnabledQuery -import ValueFlowTest diff --git a/java/ql/test/query-tests/security/CWE-489/webview-debugging/WebviewDebuggingEnabled.qlref b/java/ql/test/query-tests/security/CWE-489/webview-debugging/WebviewDebuggingEnabled.qlref new file mode 100644 index 00000000000..596b3c6d005 --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-489/webview-debugging/WebviewDebuggingEnabled.qlref @@ -0,0 +1,4 @@ +query: Security/CWE/CWE-489/WebviewDebuggingEnabled.ql +postprocess: + - utils/test/PrettyPrintModels.ql + - utils/test/InlineExpectationsTestQuery.ql diff --git a/java/ql/test/query-tests/security/CWE-502/A.java b/java/ql/test/query-tests/security/CWE-502/A.java index f3bd633f880..81974edf283 100644 --- a/java/ql/test/query-tests/security/CWE-502/A.java +++ b/java/ql/test/query-tests/security/CWE-502/A.java @@ -11,15 +11,15 @@ import org.nibblesec.tools.SerialKiller; public class A { public Object deserialize1(Socket sock) throws java.io.IOException, ClassNotFoundException { - InputStream inputStream = sock.getInputStream(); + InputStream inputStream = sock.getInputStream(); // $ Source ObjectInputStream in = new ObjectInputStream(inputStream); - return in.readObject(); // $unsafeDeserialization + return in.readObject(); // $ Alert } public Object deserialize2(Socket sock) throws java.io.IOException, ClassNotFoundException { - InputStream inputStream = sock.getInputStream(); + InputStream inputStream = sock.getInputStream(); // $ Source ObjectInputStream in = new ObjectInputStream(inputStream); - return in.readUnshared(); // $unsafeDeserialization + return in.readUnshared(); // $ Alert } public Object deserializeWithSerialKiller(Socket sock) throws java.io.IOException, ClassNotFoundException { @@ -29,24 +29,24 @@ public class A { } public Object deserialize3(Socket sock) throws java.io.IOException { - InputStream inputStream = sock.getInputStream(); + InputStream inputStream = sock.getInputStream(); // $ Source XMLDecoder d = new XMLDecoder(inputStream); - return d.readObject(); // $unsafeDeserialization + return d.readObject(); // $ Alert } public Object deserialize4(Socket sock) throws java.io.IOException { XStream xs = new XStream(); - InputStream inputStream = sock.getInputStream(); + InputStream inputStream = sock.getInputStream(); // $ Source Reader reader = new InputStreamReader(inputStream); - return xs.fromXML(reader); // $unsafeDeserialization + return xs.fromXML(reader); // $ Alert } public void deserialize5(Socket sock) throws java.io.IOException { Kryo kryo = new Kryo(); - Input input = new Input(sock.getInputStream()); - A a1 = kryo.readObject(input, A.class); // $unsafeDeserialization - A a2 = kryo.readObjectOrNull(input, A.class); // $unsafeDeserialization - Object o = kryo.readClassAndObject(input); // $unsafeDeserialization + Input input = new Input(sock.getInputStream()); // $ Source + A a1 = kryo.readObject(input, A.class); // $ Alert + A a2 = kryo.readObjectOrNull(input, A.class); // $ Alert + Object o = kryo.readClassAndObject(input); // $ Alert } private Kryo getSafeKryo() throws java.io.IOException { @@ -64,22 +64,22 @@ public class A { public void deserializeSnakeYaml(Socket sock) throws java.io.IOException { Yaml yaml = new Yaml(); - InputStream input = sock.getInputStream(); - Object o = yaml.load(input); // $unsafeDeserialization - Object o2 = yaml.loadAll(input); // $unsafeDeserialization - Object o3 = yaml.parse(new InputStreamReader(input)); // $unsafeDeserialization - A o4 = yaml.loadAs(input, A.class); // $unsafeDeserialization - A o5 = yaml.loadAs(new InputStreamReader(input), A.class); // $unsafeDeserialization + InputStream input = sock.getInputStream(); // $ Source + Object o = yaml.load(input); // $ Alert + Object o2 = yaml.loadAll(input); // $ Alert + Object o3 = yaml.parse(new InputStreamReader(input)); // $ Alert + A o4 = yaml.loadAs(input, A.class); // $ Alert + A o5 = yaml.loadAs(new InputStreamReader(input), A.class); // $ Alert } public void deserializeSnakeYaml2(Socket sock) throws java.io.IOException { Yaml yaml = new Yaml(new Constructor()); - InputStream input = sock.getInputStream(); - Object o = yaml.load(input); // $unsafeDeserialization - Object o2 = yaml.loadAll(input); // $unsafeDeserialization - Object o3 = yaml.parse(new InputStreamReader(input)); // $unsafeDeserialization - A o4 = yaml.loadAs(input, A.class); // $unsafeDeserialization - A o5 = yaml.loadAs(new InputStreamReader(input), A.class); // $unsafeDeserialization + InputStream input = sock.getInputStream(); // $ Source + Object o = yaml.load(input); // $ Alert + Object o2 = yaml.loadAll(input); // $ Alert + Object o3 = yaml.parse(new InputStreamReader(input)); // $ Alert + A o4 = yaml.loadAs(input, A.class); // $ Alert + A o5 = yaml.loadAs(new InputStreamReader(input), A.class); // $ Alert } public void deserializeSnakeYaml3(Socket sock) throws java.io.IOException { @@ -94,11 +94,11 @@ public class A { public void deserializeSnakeYaml4(Socket sock) throws java.io.IOException { Yaml yaml = new Yaml(new Constructor(A.class)); - InputStream input = sock.getInputStream(); - Object o = yaml.load(input); // $unsafeDeserialization - Object o2 = yaml.loadAll(input); // $unsafeDeserialization - Object o3 = yaml.parse(new InputStreamReader(input)); // $unsafeDeserialization - A o4 = yaml.loadAs(input, A.class); // $unsafeDeserialization - A o5 = yaml.loadAs(new InputStreamReader(input), A.class); // $unsafeDeserialization + InputStream input = sock.getInputStream(); // $ Source + Object o = yaml.load(input); // $ Alert + Object o2 = yaml.loadAll(input); // $ Alert + Object o3 = yaml.parse(new InputStreamReader(input)); // $ Alert + A o4 = yaml.loadAs(input, A.class); // $ Alert + A o5 = yaml.loadAs(new InputStreamReader(input), A.class); // $ Alert } } diff --git a/java/ql/test/query-tests/security/CWE-502/B.java b/java/ql/test/query-tests/security/CWE-502/B.java index d97a44cfd58..803982081ad 100644 --- a/java/ql/test/query-tests/security/CWE-502/B.java +++ b/java/ql/test/query-tests/security/CWE-502/B.java @@ -4,30 +4,30 @@ import com.alibaba.fastjson.JSON; public class B { public Object deserializeJson1(Socket sock) throws java.io.IOException { - InputStream inputStream = sock.getInputStream(); - return JSON.parseObject(inputStream, null); // $unsafeDeserialization + InputStream inputStream = sock.getInputStream(); // $ Source + return JSON.parseObject(inputStream, null); // $ Alert } public Object deserializeJson2(Socket sock) throws java.io.IOException { - InputStream inputStream = sock.getInputStream(); + InputStream inputStream = sock.getInputStream(); // $ Source byte[] bytes = new byte[100]; inputStream.read(bytes); - return JSON.parse(bytes); // $unsafeDeserialization + return JSON.parse(bytes); // $ Alert } public Object deserializeJson3(Socket sock) throws java.io.IOException { - InputStream inputStream = sock.getInputStream(); + InputStream inputStream = sock.getInputStream(); // $ Source byte[] bytes = new byte[100]; inputStream.read(bytes); String s = new String(bytes); - return JSON.parseObject(s); // $unsafeDeserialization + return JSON.parseObject(s); // $ Alert } public Object deserializeJson4(Socket sock) throws java.io.IOException { - InputStream inputStream = sock.getInputStream(); + InputStream inputStream = sock.getInputStream(); // $ Source byte[] bytes = new byte[100]; inputStream.read(bytes); String s = new String(bytes); - return JSON.parse(s); // $unsafeDeserialization + return JSON.parse(s); // $ Alert } } diff --git a/java/ql/test/query-tests/security/CWE-502/C.java b/java/ql/test/query-tests/security/CWE-502/C.java index e13ae98ead5..e63515b85bd 100644 --- a/java/ql/test/query-tests/security/CWE-502/C.java +++ b/java/ql/test/query-tests/security/CWE-502/C.java @@ -20,75 +20,75 @@ public class C { @GetMapping(value = "jyaml") public void bad1(HttpServletRequest request) throws Exception { - String data = request.getParameter("data"); - Yaml.load(data); // $unsafeDeserialization - Yaml.loadStream(data); // $unsafeDeserialization - Yaml.loadStreamOfType(data, Object.class); // $unsafeDeserialization - Yaml.loadType(data, Object.class); // $unsafeDeserialization + String data = request.getParameter("data"); // $ Source + Yaml.load(data); // $ Alert + Yaml.loadStream(data); // $ Alert + Yaml.loadStreamOfType(data, Object.class); // $ Alert + Yaml.loadType(data, Object.class); // $ Alert org.ho.yaml.YamlConfig yamlConfig = new YamlConfig(); - yamlConfig.load(data); // $unsafeDeserialization - yamlConfig.loadStream(data); // $unsafeDeserialization - yamlConfig.loadStreamOfType(data, Object.class); // $unsafeDeserialization - yamlConfig.loadType(data, Object.class); // $unsafeDeserialization + yamlConfig.load(data); // $ Alert + yamlConfig.loadStream(data); // $ Alert + yamlConfig.loadStreamOfType(data, Object.class); // $ Alert + yamlConfig.loadType(data, Object.class); // $ Alert } @GetMapping(value = "jsonio") public void bad2(HttpServletRequest request) { - String data = request.getParameter("data"); + String data = request.getParameter("data"); // $ Source HashMap hashMap = new HashMap(); hashMap.put("USE_MAPS", true); - JsonReader.jsonToJava(data); // $unsafeDeserialization + JsonReader.jsonToJava(data); // $ Alert JsonReader jr = new JsonReader(data, null); - jr.readObject(); // $unsafeDeserialization + jr.readObject(); // $ Alert } @GetMapping(value = "yamlbeans") public void bad3(HttpServletRequest request) throws Exception { - String data = request.getParameter("data"); + String data = request.getParameter("data"); // $ Source YamlReader r = new YamlReader(data); - r.read(); // $unsafeDeserialization - r.read(Object.class); // $unsafeDeserialization - r.read(Object.class, Object.class); // $unsafeDeserialization + r.read(); // $ Alert + r.read(Object.class); // $ Alert + r.read(Object.class, Object.class); // $ Alert } @GetMapping(value = "hessian") public void bad4(HttpServletRequest request) throws Exception { - byte[] bytes = request.getParameter("data").getBytes(); + byte[] bytes = request.getParameter("data").getBytes(); // $ Source ByteArrayInputStream bis = new ByteArrayInputStream(bytes); HessianInput hessianInput = new HessianInput(bis); - hessianInput.readObject(); // $unsafeDeserialization - hessianInput.readObject(Object.class); // $unsafeDeserialization + hessianInput.readObject(); // $ Alert + hessianInput.readObject(Object.class); // $ Alert } @GetMapping(value = "hessian2") public void bad5(HttpServletRequest request) throws Exception { - byte[] bytes = request.getParameter("data").getBytes(); + byte[] bytes = request.getParameter("data").getBytes(); // $ Source ByteArrayInputStream bis = new ByteArrayInputStream(bytes); Hessian2Input hessianInput = new Hessian2Input(bis); - hessianInput.readObject(); // $unsafeDeserialization - hessianInput.readObject(Object.class); // $unsafeDeserialization + hessianInput.readObject(); // $ Alert + hessianInput.readObject(Object.class); // $ Alert } @GetMapping(value = "castor") public void bad6(HttpServletRequest request) throws Exception { Unmarshaller unmarshaller = new Unmarshaller(); - unmarshaller.unmarshal(new StringReader(request.getParameter("data"))); // $unsafeDeserialization + unmarshaller.unmarshal(new StringReader(request.getParameter("data"))); // $ Alert } @GetMapping(value = "burlap") public void bad7(HttpServletRequest request) throws Exception { - byte[] serializedData = request.getParameter("data").getBytes(); + byte[] serializedData = request.getParameter("data").getBytes(); // $ Source ByteArrayInputStream is = new ByteArrayInputStream(serializedData); BurlapInput burlapInput = new BurlapInput(is); - burlapInput.readObject(); // $unsafeDeserialization + burlapInput.readObject(); // $ Alert BurlapInput burlapInput1 = new BurlapInput(); burlapInput1.init(is); - burlapInput1.readObject(); // $unsafeDeserialization + burlapInput1.readObject(); // $ Alert } @GetMapping(value = "jsonio1") diff --git a/java/ql/test/query-tests/security/CWE-502/FlexjsonServlet.java b/java/ql/test/query-tests/security/CWE-502/FlexjsonServlet.java index c7e5c1ce587..1d47bd2b7fd 100644 --- a/java/ql/test/query-tests/security/CWE-502/FlexjsonServlet.java +++ b/java/ql/test/query-tests/security/CWE-502/FlexjsonServlet.java @@ -33,7 +33,7 @@ public class FlexjsonServlet extends HttpServlet { // BAD: allow class name to be controlled by remote source public void doPost(HttpServletRequest req, HttpServletResponse resp) throws IOException { JSONDeserializer deserializer = new JSONDeserializer<>(); - User user = (User) deserializer.deserialize(req.getReader()); // $unsafeDeserialization + User user = (User) deserializer.deserialize(req.getReader()); // $ Alert } @@ -41,7 +41,7 @@ public class FlexjsonServlet extends HttpServlet { // BAD: allow class name to be controlled by remote source public void doTrace(HttpServletRequest req, HttpServletResponse resp) throws IOException { JSONDeserializer deserializer = new JSONDeserializer<>(); - User user = (User) deserializer.deserialize(req.getReader()); // $unsafeDeserialization + User user = (User) deserializer.deserialize(req.getReader()); // $ Alert } @@ -49,7 +49,7 @@ public class FlexjsonServlet extends HttpServlet { // BAD: specify overly generic class type public void doPut(HttpServletRequest req, HttpServletResponse resp) throws IOException { JSONDeserializer deserializer = new JSONDeserializer(); - User user = (User) deserializer.deserialize(req.getReader(), Object.class); // $unsafeDeserialization + User user = (User) deserializer.deserialize(req.getReader(), Object.class); // $ Alert } private Person fromJsonToPerson(String json) { @@ -64,8 +64,8 @@ public class FlexjsonServlet extends HttpServlet { // BAD: Specify a concrete class type to `use` with `ObjectFactory` public void doPut3(HttpServletRequest req, HttpServletResponse resp) throws IOException { - String json = req.getParameter("json"); - Person person = new JSONDeserializer().use(Person.class, new ExistingObjectFactory(new Person())).deserialize(json); // $unsafeDeserialization + String json = req.getParameter("json"); // $ Source + Person person = new JSONDeserializer().use(Person.class, new ExistingObjectFactory(new Person())).deserialize(json); // $ Alert } // GOOD: Specify a null path to `use` with a concrete class type @@ -76,8 +76,8 @@ public class FlexjsonServlet extends HttpServlet { // BAD: Specify a non-null json path to `use` with a concrete class type public void doPut5(HttpServletRequest req, HttpServletResponse resp) throws IOException { - String json = req.getParameter("json"); - Person person = new JSONDeserializer().use("abc", Person.class).deserialize(json); // $unsafeDeserialization + String json = req.getParameter("json"); // $ Source + Person person = new JSONDeserializer().use("abc", Person.class).deserialize(json); // $ Alert } // GOOD: Specify a null json path to `use` with `ObjectFactory` @@ -116,11 +116,11 @@ public class FlexjsonServlet extends HttpServlet { // BAD: Specify a non-null json path to `use` with a concrete class type, interwoven with irrelevant use directives, without using fluent method chaining public void doPut11(HttpServletRequest req, HttpServletResponse resp) throws IOException { - String json = req.getParameter("json"); + String json = req.getParameter("json"); // $ Source JSONDeserializer deserializer = new JSONDeserializer(); deserializer.use(Person.class, null); deserializer.use("someKey", Person.class); deserializer.use(String.class, null); - Person person = deserializer.deserialize(json); // $unsafeDeserialization + Person person = deserializer.deserialize(json); // $ Alert } } diff --git a/java/ql/test/query-tests/security/CWE-502/GsonActivity.java b/java/ql/test/query-tests/security/CWE-502/GsonActivity.java index a080924c6cd..93e94411834 100644 --- a/java/ql/test/query-tests/security/CWE-502/GsonActivity.java +++ b/java/ql/test/query-tests/security/CWE-502/GsonActivity.java @@ -5,13 +5,13 @@ import android.os.Bundle; import android.os.Parcel; import android.os.Parcelable; -import com.google.gson.Gson; +import com.google.gson.Gson; public class GsonActivity extends Activity { public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(-1); - ParcelableEntity entity = (ParcelableEntity) getIntent().getParcelableExtra("jsonEntity"); + ParcelableEntity entity = (ParcelableEntity) getIntent().getParcelableExtra("jsonEntity"); // $ Source } } diff --git a/java/ql/test/query-tests/security/CWE-502/GsonServlet.java b/java/ql/test/query-tests/security/CWE-502/GsonServlet.java index 47534d2d7a0..0ee62249031 100644 --- a/java/ql/test/query-tests/security/CWE-502/GsonServlet.java +++ b/java/ql/test/query-tests/security/CWE-502/GsonServlet.java @@ -36,12 +36,12 @@ public class GsonServlet extends HttpServlet { @Override // BAD: allow class name to be controlled by remote source public void doPost(HttpServletRequest req, HttpServletResponse resp) throws IOException { - String json = req.getParameter("json"); + String json = req.getParameter("json"); // $ Source String clazz = req.getParameter("class"); try { Gson gson = new Gson(); - Object obj = gson.fromJson(json, Class.forName(clazz)); // $unsafeDeserialization + Object obj = gson.fromJson(json, Class.forName(clazz)); // $ Alert } catch (ClassNotFoundException cne) { throw new IOException(cne.getMessage()); } @@ -50,14 +50,14 @@ public class GsonServlet extends HttpServlet { @Override // BAD: allow class name to be controlled by remote source even with a type adapter factory public void doHead(HttpServletRequest req, HttpServletResponse resp) throws IOException { - String json = req.getParameter("json"); + String json = req.getParameter("json"); // $ Source String clazz = req.getParameter("class"); try { RuntimeTypeAdapterFactory runtimeTypeAdapterFactory = RuntimeTypeAdapterFactory .of(User.class, "type"); Gson gson = new GsonBuilder().registerTypeAdapterFactory(runtimeTypeAdapterFactory).create(); - Object obj = gson.fromJson(json, Class.forName(clazz)); // $unsafeDeserialization + Object obj = gson.fromJson(json, Class.forName(clazz)); // $ Alert } catch (ClassNotFoundException cne) { throw new IOException(cne.getMessage()); } @@ -74,4 +74,4 @@ public class GsonServlet extends HttpServlet { Gson gson = new GsonBuilder().registerTypeAdapterFactory(runtimeTypeAdapterFactory).create(); Person obj = gson.fromJson(json, Person.class); } -} \ No newline at end of file +} diff --git a/java/ql/test/query-tests/security/CWE-502/JabsorbServlet.java b/java/ql/test/query-tests/security/CWE-502/JabsorbServlet.java index 14e8d1819c6..c5a072e65f1 100644 --- a/java/ql/test/query-tests/security/CWE-502/JabsorbServlet.java +++ b/java/ql/test/query-tests/security/CWE-502/JabsorbServlet.java @@ -86,7 +86,7 @@ public class JabsorbServlet extends HttpServlet { @Override // BAD: allow class name to be controlled by remote source public void doPut(HttpServletRequest req, HttpServletResponse resp) throws IOException { - String json = req.getParameter("json"); + String json = req.getParameter("json"); // $ Source String clazz = req.getParameter("class"); try { @@ -99,7 +99,7 @@ public class JabsorbServlet extends HttpServlet { serializer.setMarshallNullAttributes(true); SerializerState state = new SerializerState(); - User user = (User) serializer.unmarshall(state, Class.forName(clazz), jsonObject); // $unsafeDeserialization + User user = (User) serializer.unmarshall(state, Class.forName(clazz), jsonObject); // $ Alert } catch (Exception e) { throw new IOException(e.getMessage()); } @@ -107,15 +107,15 @@ public class JabsorbServlet extends HttpServlet { // BAD: allow explicit class type controlled by remote source in the format of "json={\"javaClass\":\"com.thirdparty.Attacker\", ...}" public void doPut2(HttpServletRequest req, HttpServletResponse resp) throws IOException { - String json = req.getParameter("json"); + String json = req.getParameter("json"); // $ Source try { JSONSerializer serializer = new JSONSerializer(); serializer.registerDefaultSerializers(); - User user = (User) serializer.fromJSON(json); // $unsafeDeserialization + User user = (User) serializer.fromJSON(json); // $ Alert } catch (Exception e) { throw new IOException(e.getMessage()); } } -} \ No newline at end of file +} diff --git a/java/ql/test/query-tests/security/CWE-502/JacksonTest.java b/java/ql/test/query-tests/security/CWE-502/JacksonTest.java index 3520e4eaa11..71be753b89a 100644 --- a/java/ql/test/query-tests/security/CWE-502/JacksonTest.java +++ b/java/ql/test/query-tests/security/CWE-502/JacksonTest.java @@ -17,7 +17,7 @@ public class JacksonTest { try (ServerSocket serverSocket = new ServerSocket(0)) { try (Socket socket = serverSocket.accept()) { byte[] bytes = new byte[1024]; - int n = socket.getInputStream().read(bytes); + int n = socket.getInputStream().read(bytes); // $ Source String jexlExpr = new String(bytes, 0, n); action.run(jexlExpr); } @@ -73,7 +73,7 @@ class UnsafePersonDeserialization { private static void testUnsafeDeserialization() throws Exception { JacksonTest.withSocket(string -> { ObjectMapper mapper = new ObjectMapper(); - mapper.readValue(string, Person.class); // $unsafeDeserialization + mapper.readValue(string, Person.class); // $ Alert }); } @@ -82,7 +82,7 @@ class UnsafePersonDeserialization { private static void testUnsafeDeserializationWithExtendedClass() throws Exception { JacksonTest.withSocket(string -> { ObjectMapper mapper = new ObjectMapper(); - mapper.readValue(string, Employee.class); // $unsafeDeserialization + mapper.readValue(string, Employee.class); // $ Alert }); } @@ -91,7 +91,7 @@ class UnsafePersonDeserialization { private static void testUnsafeDeserializationWithWrapper() throws Exception { JacksonTest.withSocket(string -> { ObjectMapper mapper = new ObjectMapper(); - mapper.readValue(string, Task.class); // $unsafeDeserialization + mapper.readValue(string, Task.class); // $ Alert }); } } @@ -102,7 +102,7 @@ class SaferPersonDeserialization { // has a validator private static void testSafeDeserializationWithValidator() throws Exception { JacksonTest.withSocket(string -> { - PolymorphicTypeValidator ptv = + PolymorphicTypeValidator ptv = BasicPolymorphicTypeValidator.builder() .allowIfSubType("only.allowed.package") .build(); @@ -118,7 +118,7 @@ class SaferPersonDeserialization { // has a validator private static void testSafeDeserializationWithValidatorAndBuilder() throws Exception { JacksonTest.withSocket(string -> { - PolymorphicTypeValidator ptv = + PolymorphicTypeValidator ptv = BasicPolymorphicTypeValidator.builder() .allowIfSubType("only.allowed.package") .build(); @@ -139,7 +139,7 @@ class UnsafeCatDeserialization { JacksonTest.withSocket(string -> { ObjectMapper mapper = new ObjectMapper(); mapper.enableDefaultTyping(); // this enables polymorphic type handling - mapper.readValue(string, Cat.class); // $unsafeDeserialization + mapper.readValue(string, Cat.class); // $ Alert }); } @@ -148,7 +148,7 @@ class UnsafeCatDeserialization { JacksonTest.withSocket(string -> { ObjectMapper mapper = new ObjectMapper(); mapper.enableDefaultTyping(); - mapper.readValues(new JsonFactory().createParser(string), Cat.class).readAll(); // $unsafeDeserialization + mapper.readValues(new JsonFactory().createParser(string), Cat.class).readAll(); // $ Alert }); } @@ -157,7 +157,7 @@ class UnsafeCatDeserialization { JacksonTest.withSocket(string -> { ObjectMapper mapper = new ObjectMapper(); mapper.enableDefaultTyping(); - mapper.treeToValue(mapper.readTree(string), Cat.class); // $unsafeDeserialization + mapper.treeToValue(mapper.readTree(string), Cat.class); // $ Alert }); } @@ -169,7 +169,7 @@ class UnsafeCatDeserialization { String type = parts[1]; Class clazz = Class.forName(type); ObjectMapper mapper = new ObjectMapper(); - mapper.readValue(data, clazz); // $unsafeDeserialization + mapper.readValue(data, clazz); // $ Alert }); } @@ -180,7 +180,7 @@ class UnsafeCatDeserialization { String data = parts[0]; String type = parts[1]; ObjectMapper mapper = new ObjectMapper(); - mapper.readValue(data, resolveImpl(type, mapper)); // $unsafeDeserialization + mapper.readValue(data, resolveImpl(type, mapper)); // $ Alert }); } @@ -195,15 +195,15 @@ class SaferCatDeserialization { // has a validator private static void testUnsafeDeserialization() throws Exception { JacksonTest.withSocket(string -> { - PolymorphicTypeValidator ptv = + PolymorphicTypeValidator ptv = BasicPolymorphicTypeValidator.builder() .allowIfSubType("only.allowed.pachage") .build(); - + ObjectMapper mapper = JsonMapper.builder().polymorphicTypeValidator(ptv).build(); mapper.enableDefaultTyping(); // this enables polymorphic type handling mapper.readValue(string, Cat.class); }); } -} \ No newline at end of file +} diff --git a/java/ql/test/query-tests/security/CWE-502/JoddJsonServlet.java b/java/ql/test/query-tests/security/CWE-502/JoddJsonServlet.java index c10bfbc46b9..caeff0028f2 100644 --- a/java/ql/test/query-tests/security/CWE-502/JoddJsonServlet.java +++ b/java/ql/test/query-tests/security/CWE-502/JoddJsonServlet.java @@ -29,7 +29,7 @@ public class JoddJsonServlet extends HttpServlet { // BAD: dangerously configured parser with no class restriction passed to `parse`, // using a few different possible call sequences. public void doHead(HttpServletRequest req, HttpServletResponse resp) throws IOException { - String json = req.getParameter("json"); + String json = req.getParameter("json"); // $ Source String clazz = req.getParameter("class"); int callOrder; try { @@ -42,25 +42,25 @@ public class JoddJsonServlet extends HttpServlet { JsonParser parser = new JsonParser(); if(callOrder == 0) { parser.setClassMetadataName("class"); - User obj = parser.parse(json, null); // $unsafeDeserialization + User obj = parser.parse(json, null); // $ Alert } else if(callOrder == 1) { - parser.setClassMetadataName("class").parse(json, null); // $unsafeDeserialization + parser.setClassMetadataName("class").parse(json, null); // $ Alert } else if(callOrder == 2) { - parser.setClassMetadataName("class").lazy(true).parse(json, null); // $unsafeDeserialization + parser.setClassMetadataName("class").lazy(true).parse(json, null); // $ Alert } else if(callOrder == 3) { - parser.withClassMetadata(true).lazy(true).parse(json, null); // $unsafeDeserialization + parser.withClassMetadata(true).lazy(true).parse(json, null); // $ Alert } } @Override // BAD: allow class name to be controlled by remote source public void doPost(HttpServletRequest req, HttpServletResponse resp) throws IOException { - String json = req.getParameter("json"); + String json = req.getParameter("json"); // $ Source String clazz = req.getParameter("class"); try { JsonParser parser = new JsonParser(); - Object obj = parser.parse(json, Class.forName(clazz)); // $unsafeDeserialization + Object obj = parser.parse(json, Class.forName(clazz)); // $ Alert } catch (ClassNotFoundException cne) { throw new IOException(cne.getMessage()); } @@ -99,4 +99,4 @@ public class JoddJsonServlet extends HttpServlet { parser.withClassMetadata(true).setClassMetadataName(null).parse(json, null); } } -} \ No newline at end of file +} diff --git a/java/ql/test/query-tests/security/CWE-502/ObjectMessageTest.java b/java/ql/test/query-tests/security/CWE-502/ObjectMessageTest.java index 15da41b93c8..2ccf7c282c2 100644 --- a/java/ql/test/query-tests/security/CWE-502/ObjectMessageTest.java +++ b/java/ql/test/query-tests/security/CWE-502/ObjectMessageTest.java @@ -3,7 +3,7 @@ import javax.jms.MessageListener; import javax.jms.ObjectMessage; public class ObjectMessageTest implements MessageListener { - public void onMessage(Message message) { - ((ObjectMessage) message).getObject(); // $ unsafeDeserialization + public void onMessage(Message message) { // $ Source + ((ObjectMessage) message).getObject(); // $ Alert } } diff --git a/java/ql/test/query-tests/security/CWE-502/ParcelableEntity.java b/java/ql/test/query-tests/security/CWE-502/ParcelableEntity.java index a9cbcabd9d3..33b43ce8d6d 100644 --- a/java/ql/test/query-tests/security/CWE-502/ParcelableEntity.java +++ b/java/ql/test/query-tests/security/CWE-502/ParcelableEntity.java @@ -29,7 +29,7 @@ public class ParcelableEntity implements Parcelable { public ParcelableEntity createFromParcel(Parcel parcel) { try { Class clazz = Class.forName(parcel.readString()); - Object obj = GSON.fromJson(parcel.readString(), clazz); // $unsafeDeserialization + Object obj = GSON.fromJson(parcel.readString(), clazz); // $ Alert return new ParcelableEntity(obj); } catch (ClassNotFoundException e) { diff --git a/java/ql/test/query-tests/security/CWE-502/TestMessageBodyReader.java b/java/ql/test/query-tests/security/CWE-502/TestMessageBodyReader.java index 2132041254d..54cc4f5d614 100644 --- a/java/ql/test/query-tests/security/CWE-502/TestMessageBodyReader.java +++ b/java/ql/test/query-tests/security/CWE-502/TestMessageBodyReader.java @@ -17,12 +17,12 @@ public class TestMessageBodyReader implements MessageBodyReader { @Override public Object readFrom(Class type, Type genericType, Annotation[] annotations, MediaType mediaType, - MultivaluedMap httpHeaders, InputStream entityStream) throws IOException { + MultivaluedMap httpHeaders, InputStream entityStream) throws IOException { // $ Source try { - return new ObjectInputStream(entityStream).readObject(); // $unsafeDeserialization + return new ObjectInputStream(entityStream).readObject(); // $ Alert } catch (ClassNotFoundException e) { e.printStackTrace(); } return null; } -} \ No newline at end of file +} diff --git a/java/ql/test/query-tests/security/CWE-502/UnsafeDeserialization.expected b/java/ql/test/query-tests/security/CWE-502/UnsafeDeserialization.expected index e69de29bb2d..b4064231bec 100644 --- a/java/ql/test/query-tests/security/CWE-502/UnsafeDeserialization.expected +++ b/java/ql/test/query-tests/security/CWE-502/UnsafeDeserialization.expected @@ -0,0 +1,411 @@ +#select +| A.java:16:12:16:26 | readObject(...) | A.java:14:31:14:51 | getInputStream(...) : InputStream | A.java:16:12:16:13 | in | Unsafe deserialization depends on a $@. | A.java:14:31:14:51 | getInputStream(...) | user-provided value | +| A.java:22:12:22:28 | readUnshared(...) | A.java:20:31:20:51 | getInputStream(...) : InputStream | A.java:22:12:22:13 | in | Unsafe deserialization depends on a $@. | A.java:20:31:20:51 | getInputStream(...) | user-provided value | +| A.java:34:12:34:25 | readObject(...) | A.java:32:31:32:51 | getInputStream(...) : InputStream | A.java:34:12:34:12 | d | Unsafe deserialization depends on a $@. | A.java:32:31:32:51 | getInputStream(...) | user-provided value | +| A.java:41:12:41:29 | fromXML(...) | A.java:39:31:39:51 | getInputStream(...) : InputStream | A.java:41:23:41:28 | reader | Unsafe deserialization depends on a $@. | A.java:39:31:39:51 | getInputStream(...) | user-provided value | +| A.java:47:12:47:42 | readObject(...) | A.java:46:29:46:49 | getInputStream(...) : InputStream | A.java:47:28:47:32 | input | Unsafe deserialization depends on a $@. | A.java:46:29:46:49 | getInputStream(...) | user-provided value | +| A.java:48:12:48:48 | readObjectOrNull(...) | A.java:46:29:46:49 | getInputStream(...) : InputStream | A.java:48:34:48:38 | input | Unsafe deserialization depends on a $@. | A.java:46:29:46:49 | getInputStream(...) | user-provided value | +| A.java:49:16:49:45 | readClassAndObject(...) | A.java:46:29:46:49 | getInputStream(...) : InputStream | A.java:49:40:49:44 | input | Unsafe deserialization depends on a $@. | A.java:46:29:46:49 | getInputStream(...) | user-provided value | +| A.java:68:16:68:31 | load(...) | A.java:67:25:67:45 | getInputStream(...) : InputStream | A.java:68:26:68:30 | input | Unsafe deserialization depends on a $@. | A.java:67:25:67:45 | getInputStream(...) | user-provided value | +| A.java:69:17:69:35 | loadAll(...) | A.java:67:25:67:45 | getInputStream(...) : InputStream | A.java:69:30:69:34 | input | Unsafe deserialization depends on a $@. | A.java:67:25:67:45 | getInputStream(...) | user-provided value | +| A.java:70:17:70:56 | parse(...) | A.java:67:25:67:45 | getInputStream(...) : InputStream | A.java:70:28:70:55 | new InputStreamReader(...) | Unsafe deserialization depends on a $@. | A.java:67:25:67:45 | getInputStream(...) | user-provided value | +| A.java:71:12:71:38 | loadAs(...) | A.java:67:25:67:45 | getInputStream(...) : InputStream | A.java:71:24:71:28 | input | Unsafe deserialization depends on a $@. | A.java:67:25:67:45 | getInputStream(...) | user-provided value | +| A.java:72:12:72:61 | loadAs(...) | A.java:67:25:67:45 | getInputStream(...) : InputStream | A.java:72:24:72:51 | new InputStreamReader(...) | Unsafe deserialization depends on a $@. | A.java:67:25:67:45 | getInputStream(...) | user-provided value | +| A.java:78:16:78:31 | load(...) | A.java:77:25:77:45 | getInputStream(...) : InputStream | A.java:78:26:78:30 | input | Unsafe deserialization depends on a $@. | A.java:77:25:77:45 | getInputStream(...) | user-provided value | +| A.java:79:17:79:35 | loadAll(...) | A.java:77:25:77:45 | getInputStream(...) : InputStream | A.java:79:30:79:34 | input | Unsafe deserialization depends on a $@. | A.java:77:25:77:45 | getInputStream(...) | user-provided value | +| A.java:80:17:80:56 | parse(...) | A.java:77:25:77:45 | getInputStream(...) : InputStream | A.java:80:28:80:55 | new InputStreamReader(...) | Unsafe deserialization depends on a $@. | A.java:77:25:77:45 | getInputStream(...) | user-provided value | +| A.java:81:12:81:38 | loadAs(...) | A.java:77:25:77:45 | getInputStream(...) : InputStream | A.java:81:24:81:28 | input | Unsafe deserialization depends on a $@. | A.java:77:25:77:45 | getInputStream(...) | user-provided value | +| A.java:82:12:82:61 | loadAs(...) | A.java:77:25:77:45 | getInputStream(...) : InputStream | A.java:82:24:82:51 | new InputStreamReader(...) | Unsafe deserialization depends on a $@. | A.java:77:25:77:45 | getInputStream(...) | user-provided value | +| A.java:98:16:98:31 | load(...) | A.java:97:25:97:45 | getInputStream(...) : InputStream | A.java:98:26:98:30 | input | Unsafe deserialization depends on a $@. | A.java:97:25:97:45 | getInputStream(...) | user-provided value | +| A.java:99:17:99:35 | loadAll(...) | A.java:97:25:97:45 | getInputStream(...) : InputStream | A.java:99:30:99:34 | input | Unsafe deserialization depends on a $@. | A.java:97:25:97:45 | getInputStream(...) | user-provided value | +| A.java:100:17:100:56 | parse(...) | A.java:97:25:97:45 | getInputStream(...) : InputStream | A.java:100:28:100:55 | new InputStreamReader(...) | Unsafe deserialization depends on a $@. | A.java:97:25:97:45 | getInputStream(...) | user-provided value | +| A.java:101:12:101:38 | loadAs(...) | A.java:97:25:97:45 | getInputStream(...) : InputStream | A.java:101:24:101:28 | input | Unsafe deserialization depends on a $@. | A.java:97:25:97:45 | getInputStream(...) | user-provided value | +| A.java:102:12:102:61 | loadAs(...) | A.java:97:25:97:45 | getInputStream(...) : InputStream | A.java:102:24:102:51 | new InputStreamReader(...) | Unsafe deserialization depends on a $@. | A.java:97:25:97:45 | getInputStream(...) | user-provided value | +| B.java:8:12:8:46 | parseObject(...) | B.java:7:31:7:51 | getInputStream(...) : InputStream | B.java:8:29:8:39 | inputStream | Unsafe deserialization depends on a $@. | B.java:7:31:7:51 | getInputStream(...) | user-provided value | +| B.java:15:12:15:28 | parse(...) | B.java:12:31:12:51 | getInputStream(...) : InputStream | B.java:15:23:15:27 | bytes | Unsafe deserialization depends on a $@. | B.java:12:31:12:51 | getInputStream(...) | user-provided value | +| B.java:23:12:23:30 | parseObject(...) | B.java:19:31:19:51 | getInputStream(...) : InputStream | B.java:23:29:23:29 | s | Unsafe deserialization depends on a $@. | B.java:19:31:19:51 | getInputStream(...) | user-provided value | +| B.java:31:12:31:24 | parse(...) | B.java:27:31:27:51 | getInputStream(...) : InputStream | B.java:31:23:31:23 | s | Unsafe deserialization depends on a $@. | B.java:27:31:27:51 | getInputStream(...) | user-provided value | +| C.java:24:3:24:17 | load(...) | C.java:23:17:23:44 | getParameter(...) : String | C.java:24:13:24:16 | data | Unsafe deserialization depends on a $@. | C.java:23:17:23:44 | getParameter(...) | user-provided value | +| C.java:25:3:25:23 | loadStream(...) | C.java:23:17:23:44 | getParameter(...) : String | C.java:25:19:25:22 | data | Unsafe deserialization depends on a $@. | C.java:23:17:23:44 | getParameter(...) | user-provided value | +| C.java:26:3:26:43 | loadStreamOfType(...) | C.java:23:17:23:44 | getParameter(...) : String | C.java:26:25:26:28 | data | Unsafe deserialization depends on a $@. | C.java:23:17:23:44 | getParameter(...) | user-provided value | +| C.java:27:3:27:35 | loadType(...) | C.java:23:17:23:44 | getParameter(...) : String | C.java:27:17:27:20 | data | Unsafe deserialization depends on a $@. | C.java:23:17:23:44 | getParameter(...) | user-provided value | +| C.java:30:3:30:23 | load(...) | C.java:23:17:23:44 | getParameter(...) : String | C.java:30:19:30:22 | data | Unsafe deserialization depends on a $@. | C.java:23:17:23:44 | getParameter(...) | user-provided value | +| C.java:31:3:31:29 | loadStream(...) | C.java:23:17:23:44 | getParameter(...) : String | C.java:31:25:31:28 | data | Unsafe deserialization depends on a $@. | C.java:23:17:23:44 | getParameter(...) | user-provided value | +| C.java:32:3:32:49 | loadStreamOfType(...) | C.java:23:17:23:44 | getParameter(...) : String | C.java:32:31:32:34 | data | Unsafe deserialization depends on a $@. | C.java:23:17:23:44 | getParameter(...) | user-provided value | +| C.java:33:3:33:41 | loadType(...) | C.java:23:17:23:44 | getParameter(...) : String | C.java:33:23:33:26 | data | Unsafe deserialization depends on a $@. | C.java:23:17:23:44 | getParameter(...) | user-provided value | +| C.java:43:3:43:29 | jsonToJava(...) | C.java:38:17:38:44 | getParameter(...) : String | C.java:43:25:43:28 | data | Unsafe deserialization depends on a $@. | C.java:38:17:38:44 | getParameter(...) | user-provided value | +| C.java:46:3:46:17 | readObject(...) | C.java:38:17:38:44 | getParameter(...) : String | C.java:46:3:46:4 | jr | Unsafe deserialization depends on a $@. | C.java:38:17:38:44 | getParameter(...) | user-provided value | +| C.java:53:3:53:10 | read(...) | C.java:51:17:51:44 | getParameter(...) : String | C.java:53:3:53:3 | r | Unsafe deserialization depends on a $@. | C.java:51:17:51:44 | getParameter(...) | user-provided value | +| C.java:54:3:54:22 | read(...) | C.java:51:17:51:44 | getParameter(...) : String | C.java:54:3:54:3 | r | Unsafe deserialization depends on a $@. | C.java:51:17:51:44 | getParameter(...) | user-provided value | +| C.java:55:3:55:36 | read(...) | C.java:51:17:51:44 | getParameter(...) : String | C.java:55:3:55:3 | r | Unsafe deserialization depends on a $@. | C.java:51:17:51:44 | getParameter(...) | user-provided value | +| C.java:63:3:63:27 | readObject(...) | C.java:60:18:60:45 | getParameter(...) : String | C.java:63:3:63:14 | hessianInput | Unsafe deserialization depends on a $@. | C.java:60:18:60:45 | getParameter(...) | user-provided value | +| C.java:64:3:64:39 | readObject(...) | C.java:60:18:60:45 | getParameter(...) : String | C.java:64:3:64:14 | hessianInput | Unsafe deserialization depends on a $@. | C.java:60:18:60:45 | getParameter(...) | user-provided value | +| C.java:72:3:72:27 | readObject(...) | C.java:69:18:69:45 | getParameter(...) : String | C.java:72:3:72:14 | hessianInput | Unsafe deserialization depends on a $@. | C.java:69:18:69:45 | getParameter(...) | user-provided value | +| C.java:73:3:73:39 | readObject(...) | C.java:69:18:69:45 | getParameter(...) : String | C.java:73:3:73:14 | hessianInput | Unsafe deserialization depends on a $@. | C.java:69:18:69:45 | getParameter(...) | user-provided value | +| C.java:79:3:79:72 | unmarshal(...) | C.java:79:43:79:70 | getParameter(...) : String | C.java:79:26:79:71 | new StringReader(...) | Unsafe deserialization depends on a $@. | C.java:79:43:79:70 | getParameter(...) | user-provided value | +| C.java:87:3:87:26 | readObject(...) | C.java:84:27:84:54 | getParameter(...) : String | C.java:87:3:87:13 | burlapInput | Unsafe deserialization depends on a $@. | C.java:84:27:84:54 | getParameter(...) | user-provided value | +| C.java:91:3:91:27 | readObject(...) | C.java:84:27:84:54 | getParameter(...) : String | C.java:91:3:91:14 | burlapInput1 | Unsafe deserialization depends on a $@. | C.java:84:27:84:54 | getParameter(...) | user-provided value | +| FlexjsonServlet.java:36:28:36:68 | deserialize(...) | FlexjsonServlet.java:36:53:36:67 | getReader(...) | FlexjsonServlet.java:36:53:36:67 | getReader(...) | Unsafe deserialization depends on a $@. | FlexjsonServlet.java:36:53:36:67 | getReader(...) | user-provided value | +| FlexjsonServlet.java:44:28:44:68 | deserialize(...) | FlexjsonServlet.java:44:53:44:67 | getReader(...) | FlexjsonServlet.java:44:53:44:67 | getReader(...) | Unsafe deserialization depends on a $@. | FlexjsonServlet.java:44:53:44:67 | getReader(...) | user-provided value | +| FlexjsonServlet.java:52:28:52:82 | deserialize(...) | FlexjsonServlet.java:52:53:52:67 | getReader(...) | FlexjsonServlet.java:52:53:52:67 | getReader(...) | Unsafe deserialization depends on a $@. | FlexjsonServlet.java:52:53:52:67 | getReader(...) | user-provided value | +| FlexjsonServlet.java:68:25:68:131 | deserialize(...) | FlexjsonServlet.java:67:23:67:46 | getParameter(...) : String | FlexjsonServlet.java:68:127:68:130 | json | Unsafe deserialization depends on a $@. | FlexjsonServlet.java:67:23:67:46 | getParameter(...) | user-provided value | +| FlexjsonServlet.java:80:25:80:97 | deserialize(...) | FlexjsonServlet.java:79:23:79:46 | getParameter(...) : String | FlexjsonServlet.java:80:93:80:96 | json | Unsafe deserialization depends on a $@. | FlexjsonServlet.java:79:23:79:46 | getParameter(...) | user-provided value | +| FlexjsonServlet.java:124:25:124:54 | deserialize(...) | FlexjsonServlet.java:119:23:119:46 | getParameter(...) : String | FlexjsonServlet.java:124:50:124:53 | json | Unsafe deserialization depends on a $@. | FlexjsonServlet.java:119:23:119:46 | getParameter(...) | user-provided value | +| GsonServlet.java:44:26:44:66 | fromJson(...) | GsonServlet.java:39:23:39:46 | getParameter(...) : String | GsonServlet.java:44:40:44:43 | json | Unsafe deserialization depends on a $@. | GsonServlet.java:39:23:39:46 | getParameter(...) | user-provided value | +| GsonServlet.java:60:26:60:66 | fromJson(...) | GsonServlet.java:53:23:53:46 | getParameter(...) : String | GsonServlet.java:60:40:60:43 | json | Unsafe deserialization depends on a $@. | GsonServlet.java:53:23:53:46 | getParameter(...) | user-provided value | +| JabsorbServlet.java:102:32:102:93 | unmarshall(...) | JabsorbServlet.java:89:23:89:46 | getParameter(...) : String | JabsorbServlet.java:102:83:102:92 | jsonObject | Unsafe deserialization depends on a $@. | JabsorbServlet.java:89:23:89:46 | getParameter(...) | user-provided value | +| JabsorbServlet.java:116:32:116:56 | fromJSON(...) | JabsorbServlet.java:110:23:110:46 | getParameter(...) : String | JabsorbServlet.java:116:52:116:55 | json | Unsafe deserialization depends on a $@. | JabsorbServlet.java:110:23:110:46 | getParameter(...) | user-provided value | +| JacksonTest.java:76:13:76:50 | readValue(...) | JacksonTest.java:20:25:20:47 | getInputStream(...) : InputStream | JacksonTest.java:76:30:76:35 | string | Unsafe deserialization depends on a $@. | JacksonTest.java:20:25:20:47 | getInputStream(...) | user-provided value | +| JacksonTest.java:85:13:85:52 | readValue(...) | JacksonTest.java:20:25:20:47 | getInputStream(...) : InputStream | JacksonTest.java:85:30:85:35 | string | Unsafe deserialization depends on a $@. | JacksonTest.java:20:25:20:47 | getInputStream(...) | user-provided value | +| JacksonTest.java:94:13:94:48 | readValue(...) | JacksonTest.java:20:25:20:47 | getInputStream(...) : InputStream | JacksonTest.java:94:30:94:35 | string | Unsafe deserialization depends on a $@. | JacksonTest.java:20:25:20:47 | getInputStream(...) | user-provided value | +| JacksonTest.java:142:13:142:47 | readValue(...) | JacksonTest.java:20:25:20:47 | getInputStream(...) : InputStream | JacksonTest.java:142:30:142:35 | string | Unsafe deserialization depends on a $@. | JacksonTest.java:20:25:20:47 | getInputStream(...) | user-provided value | +| JacksonTest.java:151:13:151:80 | readValues(...) | JacksonTest.java:20:25:20:47 | getInputStream(...) : InputStream | JacksonTest.java:151:31:151:68 | createParser(...) | Unsafe deserialization depends on a $@. | JacksonTest.java:20:25:20:47 | getInputStream(...) | user-provided value | +| JacksonTest.java:160:13:160:66 | treeToValue(...) | JacksonTest.java:20:25:20:47 | getInputStream(...) : InputStream | JacksonTest.java:160:32:160:54 | readTree(...) | Unsafe deserialization depends on a $@. | JacksonTest.java:20:25:20:47 | getInputStream(...) | user-provided value | +| JacksonTest.java:172:13:172:41 | readValue(...) | JacksonTest.java:20:25:20:47 | getInputStream(...) : InputStream | JacksonTest.java:172:30:172:33 | data | Unsafe deserialization depends on a $@. | JacksonTest.java:20:25:20:47 | getInputStream(...) | user-provided value | +| JacksonTest.java:183:13:183:61 | readValue(...) | JacksonTest.java:20:25:20:47 | getInputStream(...) : InputStream | JacksonTest.java:183:30:183:33 | data | Unsafe deserialization depends on a $@. | JacksonTest.java:20:25:20:47 | getInputStream(...) | user-provided value | +| JoddJsonServlet.java:45:24:45:47 | parse(...) | JoddJsonServlet.java:32:23:32:46 | getParameter(...) : String | JoddJsonServlet.java:45:37:45:40 | json | Unsafe deserialization depends on a $@. | JoddJsonServlet.java:32:23:32:46 | getParameter(...) | user-provided value | +| JoddJsonServlet.java:47:13:47:66 | parse(...) | JoddJsonServlet.java:32:23:32:46 | getParameter(...) : String | JoddJsonServlet.java:47:56:47:59 | json | Unsafe deserialization depends on a $@. | JoddJsonServlet.java:32:23:32:46 | getParameter(...) | user-provided value | +| JoddJsonServlet.java:49:13:49:77 | parse(...) | JoddJsonServlet.java:32:23:32:46 | getParameter(...) : String | JoddJsonServlet.java:49:67:49:70 | json | Unsafe deserialization depends on a $@. | JoddJsonServlet.java:32:23:32:46 | getParameter(...) | user-provided value | +| JoddJsonServlet.java:51:13:51:71 | parse(...) | JoddJsonServlet.java:32:23:32:46 | getParameter(...) : String | JoddJsonServlet.java:51:61:51:64 | json | Unsafe deserialization depends on a $@. | JoddJsonServlet.java:32:23:32:46 | getParameter(...) | user-provided value | +| JoddJsonServlet.java:63:26:63:65 | parse(...) | JoddJsonServlet.java:58:23:58:46 | getParameter(...) : String | JoddJsonServlet.java:63:39:63:42 | json | Unsafe deserialization depends on a $@. | JoddJsonServlet.java:58:23:58:46 | getParameter(...) | user-provided value | +| ObjectMessageTest.java:7:9:7:45 | getObject(...) | ObjectMessageTest.java:6:27:6:41 | message : Message | ObjectMessageTest.java:7:26:7:32 | message | Unsafe deserialization depends on a $@. | ObjectMessageTest.java:6:27:6:41 | message | user-provided value | +| ParcelableEntity.java:32:30:32:70 | fromJson(...) | GsonActivity.java:15:54:15:64 | getIntent(...) : Intent | ParcelableEntity.java:32:44:32:62 | readString(...) | Unsafe deserialization depends on a $@. | GsonActivity.java:15:54:15:64 | getIntent(...) | user-provided value | +| TestMessageBodyReader.java:22:18:22:65 | readObject(...) | TestMessageBodyReader.java:20:55:20:78 | entityStream : InputStream | TestMessageBodyReader.java:22:18:22:52 | new ObjectInputStream(...) | Unsafe deserialization depends on a $@. | TestMessageBodyReader.java:20:55:20:78 | entityStream | user-provided value | +edges +| A.java:14:31:14:51 | getInputStream(...) : InputStream | A.java:15:50:15:60 | inputStream : InputStream | provenance | Src:MaD:1 | +| A.java:14:31:14:51 | getInputStream(...) : InputStream | A.java:16:12:16:13 | in | provenance | Src:MaD:1 inputStreamWrapper | +| A.java:15:28:15:61 | new ObjectInputStream(...) : ObjectInputStream | A.java:16:12:16:13 | in | provenance | | +| A.java:15:50:15:60 | inputStream : InputStream | A.java:15:28:15:61 | new ObjectInputStream(...) : ObjectInputStream | provenance | MaD:11 | +| A.java:20:31:20:51 | getInputStream(...) : InputStream | A.java:21:50:21:60 | inputStream : InputStream | provenance | Src:MaD:1 | +| A.java:20:31:20:51 | getInputStream(...) : InputStream | A.java:22:12:22:13 | in | provenance | Src:MaD:1 inputStreamWrapper | +| A.java:21:28:21:61 | new ObjectInputStream(...) : ObjectInputStream | A.java:22:12:22:13 | in | provenance | | +| A.java:21:50:21:60 | inputStream : InputStream | A.java:21:28:21:61 | new ObjectInputStream(...) : ObjectInputStream | provenance | MaD:11 | +| A.java:32:31:32:51 | getInputStream(...) : InputStream | A.java:33:35:33:45 | inputStream : InputStream | provenance | Src:MaD:1 | +| A.java:33:20:33:46 | new XMLDecoder(...) : XMLDecoder | A.java:34:12:34:12 | d | provenance | | +| A.java:33:35:33:45 | inputStream : InputStream | A.java:33:20:33:46 | new XMLDecoder(...) : XMLDecoder | provenance | MaD:7 | +| A.java:39:31:39:51 | getInputStream(...) : InputStream | A.java:40:43:40:53 | inputStream : InputStream | provenance | Src:MaD:1 | +| A.java:40:21:40:54 | new InputStreamReader(...) : InputStreamReader | A.java:41:23:41:28 | reader | provenance | | +| A.java:40:43:40:53 | inputStream : InputStream | A.java:40:21:40:54 | new InputStreamReader(...) : InputStreamReader | provenance | MaD:10 | +| A.java:46:19:46:50 | new Input(...) : Input | A.java:47:28:47:32 | input | provenance | | +| A.java:46:19:46:50 | new Input(...) : Input | A.java:48:34:48:38 | input | provenance | | +| A.java:46:19:46:50 | new Input(...) : Input | A.java:49:40:49:44 | input | provenance | | +| A.java:46:29:46:49 | getInputStream(...) : InputStream | A.java:46:19:46:50 | new Input(...) : Input | provenance | Src:MaD:1 MaD:5 | +| A.java:67:25:67:45 | getInputStream(...) : InputStream | A.java:68:26:68:30 | input | provenance | Src:MaD:1 | +| A.java:67:25:67:45 | getInputStream(...) : InputStream | A.java:69:30:69:34 | input | provenance | Src:MaD:1 | +| A.java:67:25:67:45 | getInputStream(...) : InputStream | A.java:70:50:70:54 | input : InputStream | provenance | Src:MaD:1 | +| A.java:67:25:67:45 | getInputStream(...) : InputStream | A.java:71:24:71:28 | input | provenance | Src:MaD:1 | +| A.java:67:25:67:45 | getInputStream(...) : InputStream | A.java:72:46:72:50 | input : InputStream | provenance | Src:MaD:1 | +| A.java:70:50:70:54 | input : InputStream | A.java:70:28:70:55 | new InputStreamReader(...) | provenance | MaD:10 | +| A.java:72:46:72:50 | input : InputStream | A.java:72:24:72:51 | new InputStreamReader(...) | provenance | MaD:10 | +| A.java:77:25:77:45 | getInputStream(...) : InputStream | A.java:78:26:78:30 | input | provenance | Src:MaD:1 | +| A.java:77:25:77:45 | getInputStream(...) : InputStream | A.java:79:30:79:34 | input | provenance | Src:MaD:1 | +| A.java:77:25:77:45 | getInputStream(...) : InputStream | A.java:80:50:80:54 | input : InputStream | provenance | Src:MaD:1 | +| A.java:77:25:77:45 | getInputStream(...) : InputStream | A.java:81:24:81:28 | input | provenance | Src:MaD:1 | +| A.java:77:25:77:45 | getInputStream(...) : InputStream | A.java:82:46:82:50 | input : InputStream | provenance | Src:MaD:1 | +| A.java:80:50:80:54 | input : InputStream | A.java:80:28:80:55 | new InputStreamReader(...) | provenance | MaD:10 | +| A.java:82:46:82:50 | input : InputStream | A.java:82:24:82:51 | new InputStreamReader(...) | provenance | MaD:10 | +| A.java:97:25:97:45 | getInputStream(...) : InputStream | A.java:98:26:98:30 | input | provenance | Src:MaD:1 | +| A.java:97:25:97:45 | getInputStream(...) : InputStream | A.java:99:30:99:34 | input | provenance | Src:MaD:1 | +| A.java:97:25:97:45 | getInputStream(...) : InputStream | A.java:100:50:100:54 | input : InputStream | provenance | Src:MaD:1 | +| A.java:97:25:97:45 | getInputStream(...) : InputStream | A.java:101:24:101:28 | input | provenance | Src:MaD:1 | +| A.java:97:25:97:45 | getInputStream(...) : InputStream | A.java:102:46:102:50 | input : InputStream | provenance | Src:MaD:1 | +| A.java:100:50:100:54 | input : InputStream | A.java:100:28:100:55 | new InputStreamReader(...) | provenance | MaD:10 | +| A.java:102:46:102:50 | input : InputStream | A.java:102:24:102:51 | new InputStreamReader(...) | provenance | MaD:10 | +| B.java:7:31:7:51 | getInputStream(...) : InputStream | B.java:8:29:8:39 | inputStream | provenance | Src:MaD:1 | +| B.java:12:31:12:51 | getInputStream(...) : InputStream | B.java:14:5:14:15 | inputStream : InputStream | provenance | Src:MaD:1 | +| B.java:14:5:14:15 | inputStream : InputStream | B.java:14:22:14:26 | bytes [post update] : byte[] | provenance | MaD:9 | +| B.java:14:22:14:26 | bytes [post update] : byte[] | B.java:15:23:15:27 | bytes | provenance | | +| B.java:19:31:19:51 | getInputStream(...) : InputStream | B.java:21:5:21:15 | inputStream : InputStream | provenance | Src:MaD:1 | +| B.java:21:5:21:15 | inputStream : InputStream | B.java:21:22:21:26 | bytes [post update] : byte[] | provenance | MaD:9 | +| B.java:21:22:21:26 | bytes [post update] : byte[] | B.java:22:27:22:31 | bytes : byte[] | provenance | | +| B.java:22:16:22:32 | new String(...) : String | B.java:23:29:23:29 | s | provenance | | +| B.java:22:27:22:31 | bytes : byte[] | B.java:22:16:22:32 | new String(...) : String | provenance | MaD:13 | +| B.java:27:31:27:51 | getInputStream(...) : InputStream | B.java:29:5:29:15 | inputStream : InputStream | provenance | Src:MaD:1 | +| B.java:29:5:29:15 | inputStream : InputStream | B.java:29:22:29:26 | bytes [post update] : byte[] | provenance | MaD:9 | +| B.java:29:22:29:26 | bytes [post update] : byte[] | B.java:30:27:30:31 | bytes : byte[] | provenance | | +| B.java:30:16:30:32 | new String(...) : String | B.java:31:23:31:23 | s | provenance | | +| B.java:30:27:30:31 | bytes : byte[] | B.java:30:16:30:32 | new String(...) : String | provenance | MaD:13 | +| C.java:23:17:23:44 | getParameter(...) : String | C.java:24:13:24:16 | data | provenance | Src:MaD:3 | +| C.java:23:17:23:44 | getParameter(...) : String | C.java:25:19:25:22 | data | provenance | Src:MaD:3 | +| C.java:23:17:23:44 | getParameter(...) : String | C.java:26:25:26:28 | data | provenance | Src:MaD:3 | +| C.java:23:17:23:44 | getParameter(...) : String | C.java:27:17:27:20 | data | provenance | Src:MaD:3 | +| C.java:23:17:23:44 | getParameter(...) : String | C.java:30:19:30:22 | data | provenance | Src:MaD:3 | +| C.java:23:17:23:44 | getParameter(...) : String | C.java:31:25:31:28 | data | provenance | Src:MaD:3 | +| C.java:23:17:23:44 | getParameter(...) : String | C.java:32:31:32:34 | data | provenance | Src:MaD:3 | +| C.java:23:17:23:44 | getParameter(...) : String | C.java:33:23:33:26 | data | provenance | Src:MaD:3 | +| C.java:38:17:38:44 | getParameter(...) : String | C.java:43:25:43:28 | data | provenance | Src:MaD:3 | +| C.java:38:17:38:44 | getParameter(...) : String | C.java:45:34:45:37 | data : String | provenance | Src:MaD:3 | +| C.java:45:19:45:44 | new JsonReader(...) : JsonReader | C.java:46:3:46:4 | jr | provenance | | +| C.java:45:34:45:37 | data : String | C.java:45:19:45:44 | new JsonReader(...) : JsonReader | provenance | Config | +| C.java:51:17:51:44 | getParameter(...) : String | C.java:52:33:52:36 | data : String | provenance | Src:MaD:3 | +| C.java:52:18:52:37 | new YamlReader(...) : YamlReader | C.java:53:3:53:3 | r | provenance | | +| C.java:52:18:52:37 | new YamlReader(...) : YamlReader | C.java:54:3:54:3 | r | provenance | | +| C.java:52:18:52:37 | new YamlReader(...) : YamlReader | C.java:55:3:55:3 | r | provenance | | +| C.java:52:33:52:36 | data : String | C.java:52:18:52:37 | new YamlReader(...) : YamlReader | provenance | Config | +| C.java:60:18:60:45 | getParameter(...) : String | C.java:60:18:60:56 | getBytes(...) : byte[] | provenance | Src:MaD:3 MaD:14 | +| C.java:60:18:60:56 | getBytes(...) : byte[] | C.java:61:55:61:59 | bytes : byte[] | provenance | | +| C.java:60:18:60:56 | getBytes(...) : byte[] | C.java:62:48:62:50 | bis : ByteArrayInputStream | provenance | inputStreamWrapper | +| C.java:61:30:61:60 | new ByteArrayInputStream(...) : ByteArrayInputStream | C.java:62:48:62:50 | bis : ByteArrayInputStream | provenance | | +| C.java:61:55:61:59 | bytes : byte[] | C.java:61:30:61:60 | new ByteArrayInputStream(...) : ByteArrayInputStream | provenance | MaD:8 | +| C.java:62:31:62:51 | new HessianInput(...) : HessianInput | C.java:63:3:63:14 | hessianInput | provenance | | +| C.java:62:31:62:51 | new HessianInput(...) : HessianInput | C.java:64:3:64:14 | hessianInput | provenance | | +| C.java:62:48:62:50 | bis : ByteArrayInputStream | C.java:62:31:62:51 | new HessianInput(...) : HessianInput | provenance | Config | +| C.java:69:18:69:45 | getParameter(...) : String | C.java:69:18:69:56 | getBytes(...) : byte[] | provenance | Src:MaD:3 MaD:14 | +| C.java:69:18:69:56 | getBytes(...) : byte[] | C.java:70:55:70:59 | bytes : byte[] | provenance | | +| C.java:69:18:69:56 | getBytes(...) : byte[] | C.java:71:50:71:52 | bis : ByteArrayInputStream | provenance | inputStreamWrapper | +| C.java:70:30:70:60 | new ByteArrayInputStream(...) : ByteArrayInputStream | C.java:71:50:71:52 | bis : ByteArrayInputStream | provenance | | +| C.java:70:55:70:59 | bytes : byte[] | C.java:70:30:70:60 | new ByteArrayInputStream(...) : ByteArrayInputStream | provenance | MaD:8 | +| C.java:71:32:71:53 | new Hessian2Input(...) : Hessian2Input | C.java:72:3:72:14 | hessianInput | provenance | | +| C.java:71:32:71:53 | new Hessian2Input(...) : Hessian2Input | C.java:73:3:73:14 | hessianInput | provenance | | +| C.java:71:50:71:52 | bis : ByteArrayInputStream | C.java:71:32:71:53 | new Hessian2Input(...) : Hessian2Input | provenance | Config | +| C.java:79:43:79:70 | getParameter(...) : String | C.java:79:26:79:71 | new StringReader(...) | provenance | Src:MaD:3 MaD:12 | +| C.java:84:27:84:54 | getParameter(...) : String | C.java:84:27:84:65 | getBytes(...) : byte[] | provenance | Src:MaD:3 MaD:14 | +| C.java:84:27:84:65 | getBytes(...) : byte[] | C.java:85:54:85:67 | serializedData : byte[] | provenance | | +| C.java:84:27:84:65 | getBytes(...) : byte[] | C.java:86:45:86:46 | is : ByteArrayInputStream | provenance | inputStreamWrapper | +| C.java:85:29:85:68 | new ByteArrayInputStream(...) : ByteArrayInputStream | C.java:86:45:86:46 | is : ByteArrayInputStream | provenance | | +| C.java:85:54:85:67 | serializedData : byte[] | C.java:85:29:85:68 | new ByteArrayInputStream(...) : ByteArrayInputStream | provenance | MaD:8 | +| C.java:86:29:86:47 | new BurlapInput(...) : BurlapInput | C.java:87:3:87:13 | burlapInput | provenance | | +| C.java:86:45:86:46 | is : ByteArrayInputStream | C.java:86:29:86:47 | new BurlapInput(...) : BurlapInput | provenance | Config | +| C.java:86:45:86:46 | is : ByteArrayInputStream | C.java:90:21:90:22 | is : ByteArrayInputStream | provenance | | +| C.java:90:3:90:14 | burlapInput1 : BurlapInput | C.java:91:3:91:14 | burlapInput1 | provenance | | +| C.java:90:21:90:22 | is : ByteArrayInputStream | C.java:90:3:90:14 | burlapInput1 : BurlapInput | provenance | Config | +| FlexjsonServlet.java:67:23:67:46 | getParameter(...) : String | FlexjsonServlet.java:68:127:68:130 | json | provenance | Src:MaD:3 | +| FlexjsonServlet.java:79:23:79:46 | getParameter(...) : String | FlexjsonServlet.java:80:93:80:96 | json | provenance | Src:MaD:3 | +| FlexjsonServlet.java:119:23:119:46 | getParameter(...) : String | FlexjsonServlet.java:124:50:124:53 | json | provenance | Src:MaD:3 | +| GsonActivity.java:15:54:15:64 | getIntent(...) : Intent | ParcelableEntity.java:29:50:29:62 | parcel : Parcel | provenance | Config | +| GsonServlet.java:39:23:39:46 | getParameter(...) : String | GsonServlet.java:44:40:44:43 | json | provenance | Src:MaD:3 | +| GsonServlet.java:53:23:53:46 | getParameter(...) : String | GsonServlet.java:60:40:60:43 | json | provenance | Src:MaD:3 | +| JabsorbServlet.java:89:23:89:46 | getParameter(...) : String | JabsorbServlet.java:93:48:93:51 | json : String | provenance | Src:MaD:3 | +| JabsorbServlet.java:93:33:93:52 | new JSONObject(...) : JSONObject | JabsorbServlet.java:102:83:102:92 | jsonObject | provenance | | +| JabsorbServlet.java:93:48:93:51 | json : String | JabsorbServlet.java:93:33:93:52 | new JSONObject(...) : JSONObject | provenance | MaD:16 | +| JabsorbServlet.java:110:23:110:46 | getParameter(...) : String | JabsorbServlet.java:116:52:116:55 | json | provenance | Src:MaD:3 | +| JacksonTest.java:20:25:20:47 | getInputStream(...) : InputStream | JacksonTest.java:20:54:20:58 | bytes [post update] : byte[] | provenance | Src:MaD:1 MaD:9 | +| JacksonTest.java:20:54:20:58 | bytes [post update] : byte[] | JacksonTest.java:21:46:21:50 | bytes : byte[] | provenance | | +| JacksonTest.java:21:35:21:57 | new String(...) : String | JacksonTest.java:22:28:22:35 | jexlExpr : String | provenance | | +| JacksonTest.java:21:46:21:50 | bytes : byte[] | JacksonTest.java:21:35:21:57 | new String(...) : String | provenance | MaD:13 | +| JacksonTest.java:22:28:22:35 | jexlExpr : String | JacksonTest.java:74:32:74:37 | string : String | provenance | | +| JacksonTest.java:22:28:22:35 | jexlExpr : String | JacksonTest.java:83:32:83:37 | string : String | provenance | | +| JacksonTest.java:22:28:22:35 | jexlExpr : String | JacksonTest.java:92:32:92:37 | string : String | provenance | | +| JacksonTest.java:22:28:22:35 | jexlExpr : String | JacksonTest.java:139:32:139:37 | string : String | provenance | | +| JacksonTest.java:22:28:22:35 | jexlExpr : String | JacksonTest.java:148:32:148:37 | string : String | provenance | | +| JacksonTest.java:22:28:22:35 | jexlExpr : String | JacksonTest.java:157:32:157:37 | string : String | provenance | | +| JacksonTest.java:22:28:22:35 | jexlExpr : String | JacksonTest.java:166:32:166:36 | input : String | provenance | | +| JacksonTest.java:22:28:22:35 | jexlExpr : String | JacksonTest.java:178:32:178:36 | input : String | provenance | | +| JacksonTest.java:74:32:74:37 | string : String | JacksonTest.java:76:30:76:35 | string | provenance | | +| JacksonTest.java:83:32:83:37 | string : String | JacksonTest.java:85:30:85:35 | string | provenance | | +| JacksonTest.java:92:32:92:37 | string : String | JacksonTest.java:94:30:94:35 | string | provenance | | +| JacksonTest.java:139:32:139:37 | string : String | JacksonTest.java:142:30:142:35 | string | provenance | | +| JacksonTest.java:148:32:148:37 | string : String | JacksonTest.java:151:62:151:67 | string : String | provenance | | +| JacksonTest.java:151:62:151:67 | string : String | JacksonTest.java:151:31:151:68 | createParser(...) | provenance | Config | +| JacksonTest.java:151:62:151:67 | string : String | JacksonTest.java:151:31:151:68 | createParser(...) | provenance | MaD:6 | +| JacksonTest.java:157:32:157:37 | string : String | JacksonTest.java:160:48:160:53 | string : String | provenance | | +| JacksonTest.java:160:48:160:53 | string : String | JacksonTest.java:160:32:160:54 | readTree(...) | provenance | Config | +| JacksonTest.java:166:32:166:36 | input : String | JacksonTest.java:167:30:167:34 | input : String | provenance | | +| JacksonTest.java:167:30:167:34 | input : String | JacksonTest.java:167:30:167:45 | split(...) : String[] | provenance | MaD:15 | +| JacksonTest.java:167:30:167:45 | split(...) : String[] | JacksonTest.java:172:30:172:33 | data | provenance | | +| JacksonTest.java:178:32:178:36 | input : String | JacksonTest.java:179:30:179:34 | input : String | provenance | | +| JacksonTest.java:179:30:179:34 | input : String | JacksonTest.java:179:30:179:45 | split(...) : String[] | provenance | MaD:15 | +| JacksonTest.java:179:30:179:45 | split(...) : String[] | JacksonTest.java:183:30:183:33 | data | provenance | | +| JoddJsonServlet.java:32:23:32:46 | getParameter(...) : String | JoddJsonServlet.java:45:37:45:40 | json | provenance | Src:MaD:3 | +| JoddJsonServlet.java:32:23:32:46 | getParameter(...) : String | JoddJsonServlet.java:47:56:47:59 | json | provenance | Src:MaD:3 | +| JoddJsonServlet.java:32:23:32:46 | getParameter(...) : String | JoddJsonServlet.java:49:67:49:70 | json | provenance | Src:MaD:3 | +| JoddJsonServlet.java:32:23:32:46 | getParameter(...) : String | JoddJsonServlet.java:51:61:51:64 | json | provenance | Src:MaD:3 | +| JoddJsonServlet.java:58:23:58:46 | getParameter(...) : String | JoddJsonServlet.java:63:39:63:42 | json | provenance | Src:MaD:3 | +| ObjectMessageTest.java:6:27:6:41 | message : Message | ObjectMessageTest.java:7:26:7:32 | message | provenance | Src:MaD:2 | +| ParcelableEntity.java:29:50:29:62 | parcel : Parcel | ParcelableEntity.java:32:44:32:49 | parcel : Parcel | provenance | | +| ParcelableEntity.java:32:44:32:49 | parcel : Parcel | ParcelableEntity.java:32:44:32:62 | readString(...) | provenance | MaD:4 | +| TestMessageBodyReader.java:20:55:20:78 | entityStream : InputStream | TestMessageBodyReader.java:22:18:22:52 | new ObjectInputStream(...) | provenance | inputStreamWrapper | +| TestMessageBodyReader.java:20:55:20:78 | entityStream : InputStream | TestMessageBodyReader.java:22:40:22:51 | entityStream : InputStream | provenance | | +| TestMessageBodyReader.java:22:40:22:51 | entityStream : InputStream | TestMessageBodyReader.java:22:18:22:52 | new ObjectInputStream(...) | provenance | MaD:11 | +models +| 1 | Source: java.net; Socket; false; getInputStream; (); ; ReturnValue; remote; manual | +| 2 | Source: javax.jms; MessageListener; true; onMessage; (Message); ; Parameter[0]; remote; manual | +| 3 | Source: javax.servlet; ServletRequest; false; getParameter; (String); ; ReturnValue; remote; manual | +| 4 | Summary: android.os; Parcel; false; readString; ; ; Argument[this]; ReturnValue; taint; manual | +| 5 | Summary: com.esotericsoftware.kryo.io; Input; false; Input; ; ; Argument[0]; Argument[this]; taint; manual | +| 6 | Summary: com.fasterxml.jackson.core; JsonFactory; false; createParser; ; ; Argument[0]; ReturnValue; taint; manual | +| 7 | Summary: java.beans; XMLDecoder; false; XMLDecoder; ; ; Argument[0]; Argument[this]; taint; manual | +| 8 | Summary: java.io; ByteArrayInputStream; false; ByteArrayInputStream; ; ; Argument[0]; Argument[this]; taint; manual | +| 9 | Summary: java.io; InputStream; true; read; (byte[]); ; Argument[this]; Argument[0]; taint; manual | +| 10 | Summary: java.io; InputStreamReader; false; InputStreamReader; ; ; Argument[0]; Argument[this]; taint; manual | +| 11 | Summary: java.io; ObjectInputStream; false; ObjectInputStream; ; ; Argument[0]; Argument[this]; taint; manual | +| 12 | Summary: java.io; StringReader; false; StringReader; ; ; Argument[0]; Argument[this]; taint; manual | +| 13 | Summary: java.lang; String; false; String; ; ; Argument[0]; Argument[this]; taint; manual | +| 14 | Summary: java.lang; String; false; getBytes; ; ; Argument[this]; ReturnValue; taint; manual | +| 15 | Summary: java.lang; String; false; split; ; ; Argument[this]; ReturnValue; taint; manual | +| 16 | Summary: org.json; JSONObject; false; JSONObject; (String); ; Argument[0]; Argument[this]; taint; manual | +nodes +| A.java:14:31:14:51 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| A.java:15:28:15:61 | new ObjectInputStream(...) : ObjectInputStream | semmle.label | new ObjectInputStream(...) : ObjectInputStream | +| A.java:15:50:15:60 | inputStream : InputStream | semmle.label | inputStream : InputStream | +| A.java:16:12:16:13 | in | semmle.label | in | +| A.java:20:31:20:51 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| A.java:21:28:21:61 | new ObjectInputStream(...) : ObjectInputStream | semmle.label | new ObjectInputStream(...) : ObjectInputStream | +| A.java:21:50:21:60 | inputStream : InputStream | semmle.label | inputStream : InputStream | +| A.java:22:12:22:13 | in | semmle.label | in | +| A.java:32:31:32:51 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| A.java:33:20:33:46 | new XMLDecoder(...) : XMLDecoder | semmle.label | new XMLDecoder(...) : XMLDecoder | +| A.java:33:35:33:45 | inputStream : InputStream | semmle.label | inputStream : InputStream | +| A.java:34:12:34:12 | d | semmle.label | d | +| A.java:39:31:39:51 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| A.java:40:21:40:54 | new InputStreamReader(...) : InputStreamReader | semmle.label | new InputStreamReader(...) : InputStreamReader | +| A.java:40:43:40:53 | inputStream : InputStream | semmle.label | inputStream : InputStream | +| A.java:41:23:41:28 | reader | semmle.label | reader | +| A.java:46:19:46:50 | new Input(...) : Input | semmle.label | new Input(...) : Input | +| A.java:46:29:46:49 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| A.java:47:28:47:32 | input | semmle.label | input | +| A.java:48:34:48:38 | input | semmle.label | input | +| A.java:49:40:49:44 | input | semmle.label | input | +| A.java:67:25:67:45 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| A.java:68:26:68:30 | input | semmle.label | input | +| A.java:69:30:69:34 | input | semmle.label | input | +| A.java:70:28:70:55 | new InputStreamReader(...) | semmle.label | new InputStreamReader(...) | +| A.java:70:50:70:54 | input : InputStream | semmle.label | input : InputStream | +| A.java:71:24:71:28 | input | semmle.label | input | +| A.java:72:24:72:51 | new InputStreamReader(...) | semmle.label | new InputStreamReader(...) | +| A.java:72:46:72:50 | input : InputStream | semmle.label | input : InputStream | +| A.java:77:25:77:45 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| A.java:78:26:78:30 | input | semmle.label | input | +| A.java:79:30:79:34 | input | semmle.label | input | +| A.java:80:28:80:55 | new InputStreamReader(...) | semmle.label | new InputStreamReader(...) | +| A.java:80:50:80:54 | input : InputStream | semmle.label | input : InputStream | +| A.java:81:24:81:28 | input | semmle.label | input | +| A.java:82:24:82:51 | new InputStreamReader(...) | semmle.label | new InputStreamReader(...) | +| A.java:82:46:82:50 | input : InputStream | semmle.label | input : InputStream | +| A.java:97:25:97:45 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| A.java:98:26:98:30 | input | semmle.label | input | +| A.java:99:30:99:34 | input | semmle.label | input | +| A.java:100:28:100:55 | new InputStreamReader(...) | semmle.label | new InputStreamReader(...) | +| A.java:100:50:100:54 | input : InputStream | semmle.label | input : InputStream | +| A.java:101:24:101:28 | input | semmle.label | input | +| A.java:102:24:102:51 | new InputStreamReader(...) | semmle.label | new InputStreamReader(...) | +| A.java:102:46:102:50 | input : InputStream | semmle.label | input : InputStream | +| B.java:7:31:7:51 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| B.java:8:29:8:39 | inputStream | semmle.label | inputStream | +| B.java:12:31:12:51 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| B.java:14:5:14:15 | inputStream : InputStream | semmle.label | inputStream : InputStream | +| B.java:14:22:14:26 | bytes [post update] : byte[] | semmle.label | bytes [post update] : byte[] | +| B.java:15:23:15:27 | bytes | semmle.label | bytes | +| B.java:19:31:19:51 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| B.java:21:5:21:15 | inputStream : InputStream | semmle.label | inputStream : InputStream | +| B.java:21:22:21:26 | bytes [post update] : byte[] | semmle.label | bytes [post update] : byte[] | +| B.java:22:16:22:32 | new String(...) : String | semmle.label | new String(...) : String | +| B.java:22:27:22:31 | bytes : byte[] | semmle.label | bytes : byte[] | +| B.java:23:29:23:29 | s | semmle.label | s | +| B.java:27:31:27:51 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| B.java:29:5:29:15 | inputStream : InputStream | semmle.label | inputStream : InputStream | +| B.java:29:22:29:26 | bytes [post update] : byte[] | semmle.label | bytes [post update] : byte[] | +| B.java:30:16:30:32 | new String(...) : String | semmle.label | new String(...) : String | +| B.java:30:27:30:31 | bytes : byte[] | semmle.label | bytes : byte[] | +| B.java:31:23:31:23 | s | semmle.label | s | +| C.java:23:17:23:44 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| C.java:24:13:24:16 | data | semmle.label | data | +| C.java:25:19:25:22 | data | semmle.label | data | +| C.java:26:25:26:28 | data | semmle.label | data | +| C.java:27:17:27:20 | data | semmle.label | data | +| C.java:30:19:30:22 | data | semmle.label | data | +| C.java:31:25:31:28 | data | semmle.label | data | +| C.java:32:31:32:34 | data | semmle.label | data | +| C.java:33:23:33:26 | data | semmle.label | data | +| C.java:38:17:38:44 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| C.java:43:25:43:28 | data | semmle.label | data | +| C.java:45:19:45:44 | new JsonReader(...) : JsonReader | semmle.label | new JsonReader(...) : JsonReader | +| C.java:45:34:45:37 | data : String | semmle.label | data : String | +| C.java:46:3:46:4 | jr | semmle.label | jr | +| C.java:51:17:51:44 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| C.java:52:18:52:37 | new YamlReader(...) : YamlReader | semmle.label | new YamlReader(...) : YamlReader | +| C.java:52:33:52:36 | data : String | semmle.label | data : String | +| C.java:53:3:53:3 | r | semmle.label | r | +| C.java:54:3:54:3 | r | semmle.label | r | +| C.java:55:3:55:3 | r | semmle.label | r | +| C.java:60:18:60:45 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| C.java:60:18:60:56 | getBytes(...) : byte[] | semmle.label | getBytes(...) : byte[] | +| C.java:61:30:61:60 | new ByteArrayInputStream(...) : ByteArrayInputStream | semmle.label | new ByteArrayInputStream(...) : ByteArrayInputStream | +| C.java:61:55:61:59 | bytes : byte[] | semmle.label | bytes : byte[] | +| C.java:62:31:62:51 | new HessianInput(...) : HessianInput | semmle.label | new HessianInput(...) : HessianInput | +| C.java:62:48:62:50 | bis : ByteArrayInputStream | semmle.label | bis : ByteArrayInputStream | +| C.java:63:3:63:14 | hessianInput | semmle.label | hessianInput | +| C.java:64:3:64:14 | hessianInput | semmle.label | hessianInput | +| C.java:69:18:69:45 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| C.java:69:18:69:56 | getBytes(...) : byte[] | semmle.label | getBytes(...) : byte[] | +| C.java:70:30:70:60 | new ByteArrayInputStream(...) : ByteArrayInputStream | semmle.label | new ByteArrayInputStream(...) : ByteArrayInputStream | +| C.java:70:55:70:59 | bytes : byte[] | semmle.label | bytes : byte[] | +| C.java:71:32:71:53 | new Hessian2Input(...) : Hessian2Input | semmle.label | new Hessian2Input(...) : Hessian2Input | +| C.java:71:50:71:52 | bis : ByteArrayInputStream | semmle.label | bis : ByteArrayInputStream | +| C.java:72:3:72:14 | hessianInput | semmle.label | hessianInput | +| C.java:73:3:73:14 | hessianInput | semmle.label | hessianInput | +| C.java:79:26:79:71 | new StringReader(...) | semmle.label | new StringReader(...) | +| C.java:79:43:79:70 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| C.java:84:27:84:54 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| C.java:84:27:84:65 | getBytes(...) : byte[] | semmle.label | getBytes(...) : byte[] | +| C.java:85:29:85:68 | new ByteArrayInputStream(...) : ByteArrayInputStream | semmle.label | new ByteArrayInputStream(...) : ByteArrayInputStream | +| C.java:85:54:85:67 | serializedData : byte[] | semmle.label | serializedData : byte[] | +| C.java:86:29:86:47 | new BurlapInput(...) : BurlapInput | semmle.label | new BurlapInput(...) : BurlapInput | +| C.java:86:45:86:46 | is : ByteArrayInputStream | semmle.label | is : ByteArrayInputStream | +| C.java:87:3:87:13 | burlapInput | semmle.label | burlapInput | +| C.java:90:3:90:14 | burlapInput1 : BurlapInput | semmle.label | burlapInput1 : BurlapInput | +| C.java:90:21:90:22 | is : ByteArrayInputStream | semmle.label | is : ByteArrayInputStream | +| C.java:91:3:91:14 | burlapInput1 | semmle.label | burlapInput1 | +| FlexjsonServlet.java:36:53:36:67 | getReader(...) | semmle.label | getReader(...) | +| FlexjsonServlet.java:44:53:44:67 | getReader(...) | semmle.label | getReader(...) | +| FlexjsonServlet.java:52:53:52:67 | getReader(...) | semmle.label | getReader(...) | +| FlexjsonServlet.java:67:23:67:46 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| FlexjsonServlet.java:68:127:68:130 | json | semmle.label | json | +| FlexjsonServlet.java:79:23:79:46 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| FlexjsonServlet.java:80:93:80:96 | json | semmle.label | json | +| FlexjsonServlet.java:119:23:119:46 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| FlexjsonServlet.java:124:50:124:53 | json | semmle.label | json | +| GsonActivity.java:15:54:15:64 | getIntent(...) : Intent | semmle.label | getIntent(...) : Intent | +| GsonServlet.java:39:23:39:46 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| GsonServlet.java:44:40:44:43 | json | semmle.label | json | +| GsonServlet.java:53:23:53:46 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| GsonServlet.java:60:40:60:43 | json | semmle.label | json | +| JabsorbServlet.java:89:23:89:46 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JabsorbServlet.java:93:33:93:52 | new JSONObject(...) : JSONObject | semmle.label | new JSONObject(...) : JSONObject | +| JabsorbServlet.java:93:48:93:51 | json : String | semmle.label | json : String | +| JabsorbServlet.java:102:83:102:92 | jsonObject | semmle.label | jsonObject | +| JabsorbServlet.java:110:23:110:46 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JabsorbServlet.java:116:52:116:55 | json | semmle.label | json | +| JacksonTest.java:20:25:20:47 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| JacksonTest.java:20:54:20:58 | bytes [post update] : byte[] | semmle.label | bytes [post update] : byte[] | +| JacksonTest.java:21:35:21:57 | new String(...) : String | semmle.label | new String(...) : String | +| JacksonTest.java:21:46:21:50 | bytes : byte[] | semmle.label | bytes : byte[] | +| JacksonTest.java:22:28:22:35 | jexlExpr : String | semmle.label | jexlExpr : String | +| JacksonTest.java:74:32:74:37 | string : String | semmle.label | string : String | +| JacksonTest.java:76:30:76:35 | string | semmle.label | string | +| JacksonTest.java:83:32:83:37 | string : String | semmle.label | string : String | +| JacksonTest.java:85:30:85:35 | string | semmle.label | string | +| JacksonTest.java:92:32:92:37 | string : String | semmle.label | string : String | +| JacksonTest.java:94:30:94:35 | string | semmle.label | string | +| JacksonTest.java:139:32:139:37 | string : String | semmle.label | string : String | +| JacksonTest.java:142:30:142:35 | string | semmle.label | string | +| JacksonTest.java:148:32:148:37 | string : String | semmle.label | string : String | +| JacksonTest.java:151:31:151:68 | createParser(...) | semmle.label | createParser(...) | +| JacksonTest.java:151:62:151:67 | string : String | semmle.label | string : String | +| JacksonTest.java:157:32:157:37 | string : String | semmle.label | string : String | +| JacksonTest.java:160:32:160:54 | readTree(...) | semmle.label | readTree(...) | +| JacksonTest.java:160:48:160:53 | string : String | semmle.label | string : String | +| JacksonTest.java:166:32:166:36 | input : String | semmle.label | input : String | +| JacksonTest.java:167:30:167:34 | input : String | semmle.label | input : String | +| JacksonTest.java:167:30:167:45 | split(...) : String[] | semmle.label | split(...) : String[] | +| JacksonTest.java:172:30:172:33 | data | semmle.label | data | +| JacksonTest.java:178:32:178:36 | input : String | semmle.label | input : String | +| JacksonTest.java:179:30:179:34 | input : String | semmle.label | input : String | +| JacksonTest.java:179:30:179:45 | split(...) : String[] | semmle.label | split(...) : String[] | +| JacksonTest.java:183:30:183:33 | data | semmle.label | data | +| JoddJsonServlet.java:32:23:32:46 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JoddJsonServlet.java:45:37:45:40 | json | semmle.label | json | +| JoddJsonServlet.java:47:56:47:59 | json | semmle.label | json | +| JoddJsonServlet.java:49:67:49:70 | json | semmle.label | json | +| JoddJsonServlet.java:51:61:51:64 | json | semmle.label | json | +| JoddJsonServlet.java:58:23:58:46 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JoddJsonServlet.java:63:39:63:42 | json | semmle.label | json | +| ObjectMessageTest.java:6:27:6:41 | message : Message | semmle.label | message : Message | +| ObjectMessageTest.java:7:26:7:32 | message | semmle.label | message | +| ParcelableEntity.java:29:50:29:62 | parcel : Parcel | semmle.label | parcel : Parcel | +| ParcelableEntity.java:32:44:32:49 | parcel : Parcel | semmle.label | parcel : Parcel | +| ParcelableEntity.java:32:44:32:62 | readString(...) | semmle.label | readString(...) | +| TestMessageBodyReader.java:20:55:20:78 | entityStream : InputStream | semmle.label | entityStream : InputStream | +| TestMessageBodyReader.java:22:18:22:52 | new ObjectInputStream(...) | semmle.label | new ObjectInputStream(...) | +| TestMessageBodyReader.java:22:40:22:51 | entityStream : InputStream | semmle.label | entityStream : InputStream | +subpaths diff --git a/java/ql/test/query-tests/security/CWE-502/UnsafeDeserialization.ql b/java/ql/test/query-tests/security/CWE-502/UnsafeDeserialization.ql deleted file mode 100644 index f4570b64ef8..00000000000 --- a/java/ql/test/query-tests/security/CWE-502/UnsafeDeserialization.ql +++ /dev/null @@ -1,18 +0,0 @@ -import java -import semmle.code.java.security.UnsafeDeserializationQuery -import utils.test.InlineExpectationsTest - -module UnsafeDeserializationTest implements TestSig { - string getARelevantTag() { result = "unsafeDeserialization" } - - predicate hasActualResult(Location location, string element, string tag, string value) { - tag = "unsafeDeserialization" and - exists(DataFlow::Node sink | UnsafeDeserializationFlow::flowTo(sink) | - sink.getLocation() = location and - element = sink.toString() and - value = "" - ) - } -} - -import MakeTest diff --git a/java/ql/test/query-tests/security/CWE-502/UnsafeDeserialization.qlref b/java/ql/test/query-tests/security/CWE-502/UnsafeDeserialization.qlref new file mode 100644 index 00000000000..c0d27696834 --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-502/UnsafeDeserialization.qlref @@ -0,0 +1,4 @@ +query: Security/CWE/CWE-502/UnsafeDeserialization.ql +postprocess: + - utils/test/PrettyPrintModels.ql + - utils/test/InlineExpectationsTestQuery.ql diff --git a/java/ql/test/query-tests/security/CWE-522/InsecureBasicAuth/InsecureBasicAuthTest.expected b/java/ql/test/query-tests/security/CWE-522/InsecureBasicAuth/InsecureBasicAuthTest.expected new file mode 100644 index 00000000000..228de5b637a --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-522/InsecureBasicAuth/InsecureBasicAuthTest.expected @@ -0,0 +1,105 @@ +#select +| InsecureBasicAuthTest.java:28:4:28:7 | post | InsecureBasicAuthTest.java:25:40:25:48 | "http://" : String | InsecureBasicAuthTest.java:28:4:28:7 | post | Insecure basic authentication from a $@. | InsecureBasicAuthTest.java:25:40:25:48 | "http://" | HTTP URL | +| InsecureBasicAuthTest.java:46:4:46:6 | get | InsecureBasicAuthTest.java:43:20:43:65 | "http://www.example.com:8000/payment/retrieve" : String | InsecureBasicAuthTest.java:46:4:46:6 | get | Insecure basic authentication from a $@. | InsecureBasicAuthTest.java:43:20:43:65 | "http://www.example.com:8000/payment/retrieve" | HTTP URL | +| InsecureBasicAuthTest.java:70:4:70:7 | post | InsecureBasicAuthTest.java:66:20:66:69 | "http://www.example.com/rest/getuser.do?uid=abcdx" : String | InsecureBasicAuthTest.java:70:4:70:7 | post | Insecure basic authentication from a $@. | InsecureBasicAuthTest.java:66:20:66:69 | "http://www.example.com/rest/getuser.do?uid=abcdx" | HTTP URL | +| InsecureBasicAuthTest.java:95:4:95:7 | post | InsecureBasicAuthTest.java:90:20:90:69 | "http://www.example.com/rest/getuser.do?uid=abcdx" : String | InsecureBasicAuthTest.java:95:4:95:7 | post | Insecure basic authentication from a $@. | InsecureBasicAuthTest.java:90:20:90:69 | "http://www.example.com/rest/getuser.do?uid=abcdx" | HTTP URL | +| InsecureBasicAuthTest.java:120:4:120:7 | post | InsecureBasicAuthTest.java:117:27:117:32 | "http" : String | InsecureBasicAuthTest.java:120:4:120:7 | post | Insecure basic authentication from a $@. | InsecureBasicAuthTest.java:117:27:117:32 | "http" | HTTP URL | +| InsecureBasicAuthTest.java:143:4:143:7 | post | InsecureBasicAuthTest.java:139:20:139:69 | "http://www.example.com/rest/getuser.do?uid=abcdx" : String | InsecureBasicAuthTest.java:143:4:143:7 | post | Insecure basic authentication from a $@. | InsecureBasicAuthTest.java:139:20:139:69 | "http://www.example.com/rest/getuser.do?uid=abcdx" | HTTP URL | +| InsecureBasicAuthTest.java:167:4:167:7 | post | InsecureBasicAuthTest.java:162:20:162:69 | "http://www.example.com/rest/getuser.do?uid=abcdx" : String | InsecureBasicAuthTest.java:167:4:167:7 | post | Insecure basic authentication from a $@. | InsecureBasicAuthTest.java:162:20:162:69 | "http://www.example.com/rest/getuser.do?uid=abcdx" | HTTP URL | +| InsecureBasicAuthTest.java:192:4:192:7 | conn | InsecureBasicAuthTest.java:187:20:187:69 | "http://www.example.com/rest/getuser.do?uid=abcdx" : String | InsecureBasicAuthTest.java:192:4:192:7 | conn | Insecure basic authentication from a $@. | InsecureBasicAuthTest.java:187:20:187:69 | "http://www.example.com/rest/getuser.do?uid=abcdx" | HTTP URL | +| InsecureBasicAuthTest.java:219:4:219:7 | conn | InsecureBasicAuthTest.java:214:22:214:27 | "http" : String | InsecureBasicAuthTest.java:219:4:219:7 | conn | Insecure basic authentication from a $@. | InsecureBasicAuthTest.java:214:22:214:27 | "http" | HTTP URL | +edges +| InsecureBasicAuthTest.java:25:27:25:87 | new HttpPost(...) : HttpPost | InsecureBasicAuthTest.java:28:4:28:7 | post | provenance | | +| InsecureBasicAuthTest.java:25:40:25:48 | "http://" : String | InsecureBasicAuthTest.java:25:40:25:86 | ... + ... : String | provenance | | +| InsecureBasicAuthTest.java:25:40:25:86 | ... + ... : String | InsecureBasicAuthTest.java:25:27:25:87 | new HttpPost(...) : HttpPost | provenance | Config | +| InsecureBasicAuthTest.java:43:20:43:65 | "http://www.example.com:8000/payment/retrieve" : String | InsecureBasicAuthTest.java:44:30:44:35 | urlStr : String | provenance | | +| InsecureBasicAuthTest.java:44:18:44:36 | new HttpGet(...) : HttpGet | InsecureBasicAuthTest.java:46:4:46:6 | get | provenance | | +| InsecureBasicAuthTest.java:44:30:44:35 | urlStr : String | InsecureBasicAuthTest.java:44:18:44:36 | new HttpGet(...) : HttpGet | provenance | Config | +| InsecureBasicAuthTest.java:66:20:66:69 | "http://www.example.com/rest/getuser.do?uid=abcdx" : String | InsecureBasicAuthTest.java:67:51:67:56 | uriStr : String | provenance | | +| InsecureBasicAuthTest.java:67:27:67:58 | new HttpPost(...) : HttpPost | InsecureBasicAuthTest.java:70:4:70:7 | post | provenance | | +| InsecureBasicAuthTest.java:67:40:67:57 | create(...) : URI | InsecureBasicAuthTest.java:67:27:67:58 | new HttpPost(...) : HttpPost | provenance | Config | +| InsecureBasicAuthTest.java:67:51:67:56 | uriStr : String | InsecureBasicAuthTest.java:67:40:67:57 | create(...) : URI | provenance | MaD:2 | +| InsecureBasicAuthTest.java:90:20:90:69 | "http://www.example.com/rest/getuser.do?uid=abcdx" : String | InsecureBasicAuthTest.java:91:22:91:27 | uriStr : String | provenance | | +| InsecureBasicAuthTest.java:91:14:91:28 | new URI(...) : URI | InsecureBasicAuthTest.java:92:40:92:42 | uri : URI | provenance | | +| InsecureBasicAuthTest.java:91:22:91:27 | uriStr : String | InsecureBasicAuthTest.java:91:14:91:28 | new URI(...) : URI | provenance | Config | +| InsecureBasicAuthTest.java:91:22:91:27 | uriStr : String | InsecureBasicAuthTest.java:91:14:91:28 | new URI(...) : URI | provenance | MaD:1 | +| InsecureBasicAuthTest.java:92:27:92:43 | new HttpPost(...) : HttpPost | InsecureBasicAuthTest.java:95:4:95:7 | post | provenance | | +| InsecureBasicAuthTest.java:92:40:92:42 | uri : URI | InsecureBasicAuthTest.java:92:27:92:43 | new HttpPost(...) : HttpPost | provenance | Config | +| InsecureBasicAuthTest.java:117:6:117:79 | new HttpPost(...) : HttpPost | InsecureBasicAuthTest.java:120:4:120:7 | post | provenance | | +| InsecureBasicAuthTest.java:117:19:117:78 | new URI(...) : URI | InsecureBasicAuthTest.java:117:6:117:79 | new HttpPost(...) : HttpPost | provenance | Config | +| InsecureBasicAuthTest.java:117:27:117:32 | "http" : String | InsecureBasicAuthTest.java:117:19:117:78 | new URI(...) : URI | provenance | Config | +| InsecureBasicAuthTest.java:139:20:139:69 | "http://www.example.com/rest/getuser.do?uid=abcdx" : String | InsecureBasicAuthTest.java:140:57:140:62 | uriStr : String | provenance | | +| InsecureBasicAuthTest.java:140:28:140:63 | new BasicHttpRequest(...) : BasicHttpRequest | InsecureBasicAuthTest.java:143:4:143:7 | post | provenance | | +| InsecureBasicAuthTest.java:140:57:140:62 | uriStr : String | InsecureBasicAuthTest.java:140:28:140:63 | new BasicHttpRequest(...) : BasicHttpRequest | provenance | Config | +| InsecureBasicAuthTest.java:162:20:162:69 | "http://www.example.com/rest/getuser.do?uid=abcdx" : String | InsecureBasicAuthTest.java:163:59:163:64 | uriStr : String | provenance | | +| InsecureBasicAuthTest.java:163:30:163:71 | new BasicRequestLine(...) : BasicRequestLine | InsecureBasicAuthTest.java:164:49:164:59 | requestLine : BasicRequestLine | provenance | | +| InsecureBasicAuthTest.java:163:59:163:64 | uriStr : String | InsecureBasicAuthTest.java:163:30:163:71 | new BasicRequestLine(...) : BasicRequestLine | provenance | MaD:4 | +| InsecureBasicAuthTest.java:164:28:164:60 | new BasicHttpRequest(...) : BasicHttpRequest | InsecureBasicAuthTest.java:167:4:167:7 | post | provenance | | +| InsecureBasicAuthTest.java:164:49:164:59 | requestLine : BasicRequestLine | InsecureBasicAuthTest.java:164:28:164:60 | new BasicHttpRequest(...) : BasicHttpRequest | provenance | Config | +| InsecureBasicAuthTest.java:187:20:187:69 | "http://www.example.com/rest/getuser.do?uid=abcdx" : String | InsecureBasicAuthTest.java:188:22:188:27 | urlStr : String | provenance | | +| InsecureBasicAuthTest.java:188:14:188:28 | new URL(...) : URL | InsecureBasicAuthTest.java:189:49:189:51 | url : URL | provenance | | +| InsecureBasicAuthTest.java:188:22:188:27 | urlStr : String | InsecureBasicAuthTest.java:188:14:188:28 | new URL(...) : URL | provenance | Config | +| InsecureBasicAuthTest.java:188:22:188:27 | urlStr : String | InsecureBasicAuthTest.java:188:14:188:28 | new URL(...) : URL | provenance | MaD:3 | +| InsecureBasicAuthTest.java:189:29:189:68 | (...)... : HttpURLConnection | InsecureBasicAuthTest.java:192:4:192:7 | conn | provenance | | +| InsecureBasicAuthTest.java:189:49:189:51 | url : URL | InsecureBasicAuthTest.java:189:49:189:68 | openConnection(...) : URLConnection | provenance | Config | +| InsecureBasicAuthTest.java:189:49:189:68 | openConnection(...) : URLConnection | InsecureBasicAuthTest.java:189:29:189:68 | (...)... : HttpURLConnection | provenance | | +| InsecureBasicAuthTest.java:214:22:214:27 | "http" : String | InsecureBasicAuthTest.java:215:22:215:29 | protocol : String | provenance | | +| InsecureBasicAuthTest.java:215:14:215:42 | new URL(...) : URL | InsecureBasicAuthTest.java:216:49:216:51 | url : URL | provenance | | +| InsecureBasicAuthTest.java:215:22:215:29 | protocol : String | InsecureBasicAuthTest.java:215:14:215:42 | new URL(...) : URL | provenance | Config | +| InsecureBasicAuthTest.java:216:29:216:68 | (...)... : HttpURLConnection | InsecureBasicAuthTest.java:219:4:219:7 | conn | provenance | | +| InsecureBasicAuthTest.java:216:49:216:51 | url : URL | InsecureBasicAuthTest.java:216:49:216:68 | openConnection(...) : URLConnection | provenance | Config | +| InsecureBasicAuthTest.java:216:49:216:68 | openConnection(...) : URLConnection | InsecureBasicAuthTest.java:216:29:216:68 | (...)... : HttpURLConnection | provenance | | +models +| 1 | Summary: java.net; URI; false; URI; (String); ; Argument[0]; Argument[this]; taint; manual | +| 2 | Summary: java.net; URI; false; create; ; ; Argument[0]; ReturnValue; taint; manual | +| 3 | Summary: java.net; URL; false; URL; (String); ; Argument[0]; Argument[this]; taint; manual | +| 4 | Summary: org.apache.http.message; BasicRequestLine; false; BasicRequestLine; ; ; Argument[1]; Argument[this]; taint; manual | +nodes +| InsecureBasicAuthTest.java:25:27:25:87 | new HttpPost(...) : HttpPost | semmle.label | new HttpPost(...) : HttpPost | +| InsecureBasicAuthTest.java:25:40:25:48 | "http://" : String | semmle.label | "http://" : String | +| InsecureBasicAuthTest.java:25:40:25:86 | ... + ... : String | semmle.label | ... + ... : String | +| InsecureBasicAuthTest.java:28:4:28:7 | post | semmle.label | post | +| InsecureBasicAuthTest.java:43:20:43:65 | "http://www.example.com:8000/payment/retrieve" : String | semmle.label | "http://www.example.com:8000/payment/retrieve" : String | +| InsecureBasicAuthTest.java:44:18:44:36 | new HttpGet(...) : HttpGet | semmle.label | new HttpGet(...) : HttpGet | +| InsecureBasicAuthTest.java:44:30:44:35 | urlStr : String | semmle.label | urlStr : String | +| InsecureBasicAuthTest.java:46:4:46:6 | get | semmle.label | get | +| InsecureBasicAuthTest.java:66:20:66:69 | "http://www.example.com/rest/getuser.do?uid=abcdx" : String | semmle.label | "http://www.example.com/rest/getuser.do?uid=abcdx" : String | +| InsecureBasicAuthTest.java:67:27:67:58 | new HttpPost(...) : HttpPost | semmle.label | new HttpPost(...) : HttpPost | +| InsecureBasicAuthTest.java:67:40:67:57 | create(...) : URI | semmle.label | create(...) : URI | +| InsecureBasicAuthTest.java:67:51:67:56 | uriStr : String | semmle.label | uriStr : String | +| InsecureBasicAuthTest.java:70:4:70:7 | post | semmle.label | post | +| InsecureBasicAuthTest.java:90:20:90:69 | "http://www.example.com/rest/getuser.do?uid=abcdx" : String | semmle.label | "http://www.example.com/rest/getuser.do?uid=abcdx" : String | +| InsecureBasicAuthTest.java:91:14:91:28 | new URI(...) : URI | semmle.label | new URI(...) : URI | +| InsecureBasicAuthTest.java:91:22:91:27 | uriStr : String | semmle.label | uriStr : String | +| InsecureBasicAuthTest.java:92:27:92:43 | new HttpPost(...) : HttpPost | semmle.label | new HttpPost(...) : HttpPost | +| InsecureBasicAuthTest.java:92:40:92:42 | uri : URI | semmle.label | uri : URI | +| InsecureBasicAuthTest.java:95:4:95:7 | post | semmle.label | post | +| InsecureBasicAuthTest.java:117:6:117:79 | new HttpPost(...) : HttpPost | semmle.label | new HttpPost(...) : HttpPost | +| InsecureBasicAuthTest.java:117:19:117:78 | new URI(...) : URI | semmle.label | new URI(...) : URI | +| InsecureBasicAuthTest.java:117:27:117:32 | "http" : String | semmle.label | "http" : String | +| InsecureBasicAuthTest.java:120:4:120:7 | post | semmle.label | post | +| InsecureBasicAuthTest.java:139:20:139:69 | "http://www.example.com/rest/getuser.do?uid=abcdx" : String | semmle.label | "http://www.example.com/rest/getuser.do?uid=abcdx" : String | +| InsecureBasicAuthTest.java:140:28:140:63 | new BasicHttpRequest(...) : BasicHttpRequest | semmle.label | new BasicHttpRequest(...) : BasicHttpRequest | +| InsecureBasicAuthTest.java:140:57:140:62 | uriStr : String | semmle.label | uriStr : String | +| InsecureBasicAuthTest.java:143:4:143:7 | post | semmle.label | post | +| InsecureBasicAuthTest.java:162:20:162:69 | "http://www.example.com/rest/getuser.do?uid=abcdx" : String | semmle.label | "http://www.example.com/rest/getuser.do?uid=abcdx" : String | +| InsecureBasicAuthTest.java:163:30:163:71 | new BasicRequestLine(...) : BasicRequestLine | semmle.label | new BasicRequestLine(...) : BasicRequestLine | +| InsecureBasicAuthTest.java:163:59:163:64 | uriStr : String | semmle.label | uriStr : String | +| InsecureBasicAuthTest.java:164:28:164:60 | new BasicHttpRequest(...) : BasicHttpRequest | semmle.label | new BasicHttpRequest(...) : BasicHttpRequest | +| InsecureBasicAuthTest.java:164:49:164:59 | requestLine : BasicRequestLine | semmle.label | requestLine : BasicRequestLine | +| InsecureBasicAuthTest.java:167:4:167:7 | post | semmle.label | post | +| InsecureBasicAuthTest.java:187:20:187:69 | "http://www.example.com/rest/getuser.do?uid=abcdx" : String | semmle.label | "http://www.example.com/rest/getuser.do?uid=abcdx" : String | +| InsecureBasicAuthTest.java:188:14:188:28 | new URL(...) : URL | semmle.label | new URL(...) : URL | +| InsecureBasicAuthTest.java:188:22:188:27 | urlStr : String | semmle.label | urlStr : String | +| InsecureBasicAuthTest.java:189:29:189:68 | (...)... : HttpURLConnection | semmle.label | (...)... : HttpURLConnection | +| InsecureBasicAuthTest.java:189:49:189:51 | url : URL | semmle.label | url : URL | +| InsecureBasicAuthTest.java:189:49:189:68 | openConnection(...) : URLConnection | semmle.label | openConnection(...) : URLConnection | +| InsecureBasicAuthTest.java:192:4:192:7 | conn | semmle.label | conn | +| InsecureBasicAuthTest.java:214:22:214:27 | "http" : String | semmle.label | "http" : String | +| InsecureBasicAuthTest.java:215:14:215:42 | new URL(...) : URL | semmle.label | new URL(...) : URL | +| InsecureBasicAuthTest.java:215:22:215:29 | protocol : String | semmle.label | protocol : String | +| InsecureBasicAuthTest.java:216:29:216:68 | (...)... : HttpURLConnection | semmle.label | (...)... : HttpURLConnection | +| InsecureBasicAuthTest.java:216:49:216:51 | url : URL | semmle.label | url : URL | +| InsecureBasicAuthTest.java:216:49:216:68 | openConnection(...) : URLConnection | semmle.label | openConnection(...) : URLConnection | +| InsecureBasicAuthTest.java:219:4:219:7 | conn | semmle.label | conn | +subpaths diff --git a/java/ql/test/query-tests/security/CWE-522/InsecureBasicAuthTest.java b/java/ql/test/query-tests/security/CWE-522/InsecureBasicAuth/InsecureBasicAuthTest.java similarity index 96% rename from java/ql/test/query-tests/security/CWE-522/InsecureBasicAuthTest.java rename to java/ql/test/query-tests/security/CWE-522/InsecureBasicAuth/InsecureBasicAuthTest.java index 2098dd4139c..c174c9643de 100644 --- a/java/ql/test/query-tests/security/CWE-522/InsecureBasicAuthTest.java +++ b/java/ql/test/query-tests/security/CWE-522/InsecureBasicAuth/InsecureBasicAuthTest.java @@ -22,10 +22,10 @@ public class InsecureBasicAuthTest { byte[] authEncBytes = Base64.getEncoder().encode(authString.getBytes()); String authStringEnc = new String(authEncBytes); { - HttpRequestBase post = new HttpPost("http://" + host + "/rest/getuser.do?uid=abcdx"); + HttpRequestBase post = new HttpPost("http://" + host + "/rest/getuser.do?uid=abcdx"); // $ Source post.setHeader("Accept", "application/json"); post.setHeader("Content-type", "application/json"); - post.addHeader("Authorization", "Basic " + authStringEnc); // $hasInsecureBasicAuth + post.addHeader("Authorization", "Basic " + authStringEnc); // $ Alert } { HttpRequestBase post = new HttpPost("https://" + host + "/rest/getuser.do?uid=abcdx"); @@ -40,10 +40,10 @@ public class InsecureBasicAuthTest { */ public void testApacheHttpRequest2(String url) throws java.io.IOException { { - String urlStr = "http://www.example.com:8000/payment/retrieve"; + String urlStr = "http://www.example.com:8000/payment/retrieve"; // $ Source HttpGet get = new HttpGet(urlStr); get.setHeader("Accept", "application/json"); - get.setHeader("Authorization", // $hasInsecureBasicAuth + get.setHeader("Authorization", // $ Alert "Basic " + new String(Base64.getEncoder().encode("admin:test".getBytes()))); } { @@ -63,11 +63,11 @@ public class InsecureBasicAuthTest { byte[] authEncBytes = Base64.getEncoder().encode(authString.getBytes()); String authStringEnc = new String(authEncBytes); { - String uriStr = "http://www.example.com/rest/getuser.do?uid=abcdx"; + String uriStr = "http://www.example.com/rest/getuser.do?uid=abcdx"; // $ Source HttpRequestBase post = new HttpPost(URI.create(uriStr)); post.setHeader("Accept", "application/json"); post.setHeader("Content-type", "application/json"); - post.addHeader("Authorization", "Basic " + authStringEnc); // $hasInsecureBasicAuth + post.addHeader("Authorization", "Basic " + authStringEnc); // $ Alert } { String uriStr = "https://www.example.com/rest/getuser.do?uid=abcdx"; @@ -87,12 +87,12 @@ public class InsecureBasicAuthTest { byte[] authEncBytes = Base64.getEncoder().encode(authString.getBytes()); String authStringEnc = new String(authEncBytes); { - String uriStr = "http://www.example.com/rest/getuser.do?uid=abcdx"; + String uriStr = "http://www.example.com/rest/getuser.do?uid=abcdx"; // $ Source URI uri = new URI(uriStr); HttpRequestBase post = new HttpPost(uri); post.setHeader("Accept", "application/json"); post.setHeader("Content-type", "application/json"); - post.addHeader("Authorization", "Basic " + authStringEnc); // $hasInsecureBasicAuth + post.addHeader("Authorization", "Basic " + authStringEnc); // $ Alert } { String uriStr = "https://www.example.com/rest/getuser.do?uid=abcdx"; @@ -114,10 +114,10 @@ public class InsecureBasicAuthTest { String authStringEnc = new String(authEncBytes); { HttpRequestBase post = - new HttpPost(new URI("http", "www.example.com", "/test", "abc=123", null)); + new HttpPost(new URI("http", "www.example.com", "/test", "abc=123", null)); // $ Source post.setHeader("Accept", "application/json"); post.setHeader("Content-type", "application/json"); - post.addHeader("Authorization", "Basic " + authStringEnc); // $hasInsecureBasicAuth + post.addHeader("Authorization", "Basic " + authStringEnc); // $ Alert } { HttpRequestBase post = @@ -136,11 +136,11 @@ public class InsecureBasicAuthTest { byte[] authEncBytes = Base64.getEncoder().encode(authString.getBytes()); String authStringEnc = new String(authEncBytes); { - String uriStr = "http://www.example.com/rest/getuser.do?uid=abcdx"; + String uriStr = "http://www.example.com/rest/getuser.do?uid=abcdx"; // $ Source BasicHttpRequest post = new BasicHttpRequest("POST", uriStr); post.setHeader("Accept", "application/json"); post.setHeader("Content-type", "application/json"); - post.addHeader("Authorization", "Basic " + authStringEnc); // $hasInsecureBasicAuth + post.addHeader("Authorization", "Basic " + authStringEnc); // $ Alert } { String uriStr = "https://www.example.com/rest/getuser.do?uid=abcdx"; @@ -159,12 +159,12 @@ public class InsecureBasicAuthTest { byte[] authEncBytes = Base64.getEncoder().encode(authString.getBytes()); String authStringEnc = new String(authEncBytes); { - String uriStr = "http://www.example.com/rest/getuser.do?uid=abcdx"; + String uriStr = "http://www.example.com/rest/getuser.do?uid=abcdx"; // $ Source RequestLine requestLine = new BasicRequestLine("POST", uriStr, null); BasicHttpRequest post = new BasicHttpRequest(requestLine); post.setHeader("Accept", "application/json"); post.setHeader("Content-type", "application/json"); - post.addHeader("Authorization", "Basic " + authStringEnc); // $hasInsecureBasicAuth + post.addHeader("Authorization", "Basic " + authStringEnc); // $ Alert } { String uriStr = "https://www.example.com/rest/getuser.do?uid=abcdx"; @@ -184,12 +184,12 @@ public class InsecureBasicAuthTest { String authString = username + ":" + password; String encoding = Base64.getEncoder().encodeToString(authString.getBytes("UTF-8")); { - String urlStr = "http://www.example.com/rest/getuser.do?uid=abcdx"; + String urlStr = "http://www.example.com/rest/getuser.do?uid=abcdx"; // $ Source URL url = new URL(urlStr); HttpURLConnection conn = (HttpURLConnection) url.openConnection(); conn.setRequestMethod("POST"); conn.setDoOutput(true); - conn.setRequestProperty("Authorization", "Basic " + encoding); // $hasInsecureBasicAuth + conn.setRequestProperty("Authorization", "Basic " + encoding); // $ Alert } { String urlStr = "https://www.example.com/rest/getuser.do?uid=abcdx"; @@ -211,12 +211,12 @@ public class InsecureBasicAuthTest { String host = "www.example.com"; String path = "/rest/getuser.do?uid=abcdx"; { - String protocol = "http"; + String protocol = "http"; // $ Source URL url = new URL(protocol, host, path); HttpURLConnection conn = (HttpURLConnection) url.openConnection(); conn.setRequestMethod("POST"); conn.setDoOutput(true); - conn.setRequestProperty("Authorization", "Basic " + encoding); // $hasInsecureBasicAuth + conn.setRequestProperty("Authorization", "Basic " + encoding); // $ Alert } { String protocol = "https"; diff --git a/java/ql/test/query-tests/security/CWE-522/InsecureBasicAuth/InsecureBasicAuthTest.qlref b/java/ql/test/query-tests/security/CWE-522/InsecureBasicAuth/InsecureBasicAuthTest.qlref new file mode 100644 index 00000000000..053e0f22a26 --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-522/InsecureBasicAuth/InsecureBasicAuthTest.qlref @@ -0,0 +1,4 @@ +query: Security/CWE/CWE-522/InsecureBasicAuth.ql +postprocess: + - utils/test/PrettyPrintModels.ql + - utils/test/InlineExpectationsTestQuery.ql diff --git a/java/ql/test/query-tests/security/CWE-522/options b/java/ql/test/query-tests/security/CWE-522/InsecureBasicAuth/options similarity index 68% rename from java/ql/test/query-tests/security/CWE-522/options rename to java/ql/test/query-tests/security/CWE-522/InsecureBasicAuth/options index 2e6054aac45..7eaf4cb235f 100644 --- a/java/ql/test/query-tests/security/CWE-522/options +++ b/java/ql/test/query-tests/security/CWE-522/InsecureBasicAuth/options @@ -1 +1 @@ -// semmle-extractor-options: --javac-args -cp ${testdir}/../../../stubs/apache-http-4.4.13 +// semmle-extractor-options: --javac-args -cp ${testdir}/../../../../stubs/apache-http-4.4.13 diff --git a/java/ql/test/query-tests/security/CWE-522/InsecureBasicAuthTest.expected b/java/ql/test/query-tests/security/CWE-522/InsecureBasicAuthTest.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/java/ql/test/query-tests/security/CWE-522/InsecureBasicAuthTest.ql b/java/ql/test/query-tests/security/CWE-522/InsecureBasicAuthTest.ql deleted file mode 100644 index d3e99009eee..00000000000 --- a/java/ql/test/query-tests/security/CWE-522/InsecureBasicAuthTest.ql +++ /dev/null @@ -1,18 +0,0 @@ -import java -import semmle.code.java.security.InsecureBasicAuthQuery -import utils.test.InlineExpectationsTest - -module HasInsecureBasicAuthTest implements TestSig { - string getARelevantTag() { result = "hasInsecureBasicAuth" } - - predicate hasActualResult(Location location, string element, string tag, string value) { - tag = "hasInsecureBasicAuth" and - exists(DataFlow::Node sink | InsecureBasicAuthFlow::flowTo(sink) | - sink.getLocation() = location and - element = sink.toString() and - value = "" - ) - } -} - -import MakeTest diff --git a/java/ql/test/query-tests/security/CWE-522/InsecureLdapAuth.java b/java/ql/test/query-tests/security/CWE-522/InsecureLdapAuth/InsecureLdapAuth.java similarity index 94% rename from java/ql/test/query-tests/security/CWE-522/InsecureLdapAuth.java rename to java/ql/test/query-tests/security/CWE-522/InsecureLdapAuth/InsecureLdapAuth.java index d769258a611..1ed8a7f3589 100644 --- a/java/ql/test/query-tests/security/CWE-522/InsecureLdapAuth.java +++ b/java/ql/test/query-tests/security/CWE-522/InsecureLdapAuth/InsecureLdapAuth.java @@ -8,7 +8,7 @@ import javax.naming.ldap.InitialLdapContext; public class InsecureLdapAuth { // BAD - Test LDAP authentication in cleartext using `DirContext`. public void testCleartextLdapAuth(String ldapUserName, String password) throws Exception { - String ldapUrl = "ldap://ad.your-server.com:389"; + String ldapUrl = "ldap://ad.your-server.com:389"; // $ Source Hashtable environment = new Hashtable(); environment.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory"); @@ -17,12 +17,12 @@ public class InsecureLdapAuth { environment.put(Context.SECURITY_AUTHENTICATION, "simple"); environment.put(Context.SECURITY_PRINCIPAL, ldapUserName); environment.put(Context.SECURITY_CREDENTIALS, password); - DirContext dirContext = new InitialDirContext(environment); // $ hasInsecureLdapAuth + DirContext dirContext = new InitialDirContext(environment); // $ Alert } // BAD - Test LDAP authentication in cleartext using `DirContext`. public void testCleartextLdapAuth(String ldapUserName, String password, String serverName) throws Exception { - String ldapUrl = "ldap://"+serverName+":389"; + String ldapUrl = "ldap://"+serverName+":389"; // $ Source Hashtable environment = new Hashtable(); environment.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory"); @@ -31,7 +31,7 @@ public class InsecureLdapAuth { environment.put(Context.SECURITY_AUTHENTICATION, "simple"); environment.put(Context.SECURITY_PRINCIPAL, ldapUserName); environment.put(Context.SECURITY_CREDENTIALS, password); - DirContext dirContext = new InitialDirContext(environment); // $ hasInsecureLdapAuth + DirContext dirContext = new InitialDirContext(environment); // $ Alert } // GOOD - Test LDAP authentication over SSL. @@ -93,7 +93,7 @@ public class InsecureLdapAuth { // BAD - Test LDAP authentication in cleartext using `InitialLdapContext`. public void testCleartextLdapAuth3(String ldapUserName, String password) throws Exception { - String ldapUrl = "ldap://ad.your-server.com:389"; + String ldapUrl = "ldap://ad.your-server.com:389"; // $ Source Hashtable environment = new Hashtable(); environment.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory"); @@ -102,13 +102,13 @@ public class InsecureLdapAuth { environment.put(Context.SECURITY_AUTHENTICATION, "simple"); environment.put(Context.SECURITY_PRINCIPAL, ldapUserName); environment.put(Context.SECURITY_CREDENTIALS, password); - InitialLdapContext ldapContext = new InitialLdapContext(environment, null); // $ hasInsecureLdapAuth + InitialLdapContext ldapContext = new InitialLdapContext(environment, null); // $ Alert } // BAD - Test LDAP authentication in cleartext using `DirContext` and string literals. public void testCleartextLdapAuth4(String ldapUserName, String password) throws Exception { - String ldapUrl = "ldap://ad.your-server.com:389"; + String ldapUrl = "ldap://ad.your-server.com:389"; // $ Source Hashtable environment = new Hashtable(); environment.put("java.naming.factory.initial", "com.sun.jndi.ldap.LdapCtxFactory"); @@ -117,7 +117,7 @@ public class InsecureLdapAuth { environment.put("java.naming.security.authentication", "simple"); environment.put("java.naming.security.principal", ldapUserName); environment.put("java.naming.security.credentials", password); - DirContext dirContext = new InitialDirContext(environment); // $ hasInsecureLdapAuth + DirContext dirContext = new InitialDirContext(environment); // $ Alert } private void setSSL(Hashtable env) { @@ -144,12 +144,12 @@ public class InsecureLdapAuth { // BAD - Test LDAP authentication with basic authentication. public void testCleartextLdapAuth6(String ldapUserName, String password, String serverName) throws Exception { - String ldapUrl = "ldap://"+serverName+":389"; + String ldapUrl = "ldap://"+serverName+":389"; // $ Source Hashtable environment = new Hashtable(); environment.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory"); environment.put(Context.PROVIDER_URL, ldapUrl); setBasicAuth(environment, ldapUserName, password); - DirContext dirContext = new InitialLdapContext(environment, null); // $ hasInsecureLdapAuth + DirContext dirContext = new InitialLdapContext(environment, null); // $ Alert } } diff --git a/java/ql/test/query-tests/security/CWE-522/InsecureLdapAuth/InsecureLdapAuthTest.expected b/java/ql/test/query-tests/security/CWE-522/InsecureLdapAuth/InsecureLdapAuthTest.expected new file mode 100644 index 00000000000..5df9a4f5c95 --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-522/InsecureLdapAuth/InsecureLdapAuthTest.expected @@ -0,0 +1,100 @@ +#select +| InsecureLdapAuth.java:20:49:20:59 | environment | InsecureLdapAuth.java:11:20:11:50 | "ldap://ad.your-server.com:389" : String | InsecureLdapAuth.java:20:49:20:59 | environment | Insecure LDAP authentication from $@. | InsecureLdapAuth.java:11:20:11:50 | "ldap://ad.your-server.com:389" | LDAP connection string | +| InsecureLdapAuth.java:34:49:34:59 | environment | InsecureLdapAuth.java:25:20:25:39 | ... + ... : String | InsecureLdapAuth.java:34:49:34:59 | environment | Insecure LDAP authentication from $@. | InsecureLdapAuth.java:25:20:25:39 | ... + ... | LDAP connection string | +| InsecureLdapAuth.java:105:59:105:69 | environment | InsecureLdapAuth.java:96:20:96:50 | "ldap://ad.your-server.com:389" : String | InsecureLdapAuth.java:105:59:105:69 | environment | Insecure LDAP authentication from $@. | InsecureLdapAuth.java:96:20:96:50 | "ldap://ad.your-server.com:389" | LDAP connection string | +| InsecureLdapAuth.java:120:49:120:59 | environment | InsecureLdapAuth.java:111:20:111:50 | "ldap://ad.your-server.com:389" : String | InsecureLdapAuth.java:120:49:120:59 | environment | Insecure LDAP authentication from $@. | InsecureLdapAuth.java:111:20:111:50 | "ldap://ad.your-server.com:389" | LDAP connection string | +| InsecureLdapAuth.java:153:50:153:60 | environment | InsecureLdapAuth.java:147:20:147:39 | ... + ... : String | InsecureLdapAuth.java:153:50:153:60 | environment | Insecure LDAP authentication from $@. | InsecureLdapAuth.java:147:20:147:39 | ... + ... | LDAP connection string | +edges +| InsecureLdapAuth.java:11:20:11:50 | "ldap://ad.your-server.com:389" : String | InsecureLdapAuth.java:15:41:15:47 | ldapUrl : String | provenance | | +| InsecureLdapAuth.java:15:3:15:13 | environment : Hashtable | InsecureLdapAuth.java:20:49:20:59 | environment | provenance | | +| InsecureLdapAuth.java:15:3:15:13 | environment [post update] : Hashtable [] : String | InsecureLdapAuth.java:20:49:20:59 | environment | provenance | | +| InsecureLdapAuth.java:15:41:15:47 | ldapUrl : String | InsecureLdapAuth.java:15:3:15:13 | environment : Hashtable | provenance | Config | +| InsecureLdapAuth.java:15:41:15:47 | ldapUrl : String | InsecureLdapAuth.java:15:3:15:13 | environment [post update] : Hashtable [] : String | provenance | MaD:1 | +| InsecureLdapAuth.java:15:41:15:47 | ldapUrl : String | InsecureLdapAuth.java:15:3:15:13 | environment [post update] : Hashtable [] : String | provenance | MaD:2 | +| InsecureLdapAuth.java:25:20:25:39 | ... + ... : String | InsecureLdapAuth.java:29:41:29:47 | ldapUrl : String | provenance | | +| InsecureLdapAuth.java:29:3:29:13 | environment : Hashtable | InsecureLdapAuth.java:34:49:34:59 | environment | provenance | | +| InsecureLdapAuth.java:29:3:29:13 | environment [post update] : Hashtable [] : String | InsecureLdapAuth.java:34:49:34:59 | environment | provenance | | +| InsecureLdapAuth.java:29:41:29:47 | ldapUrl : String | InsecureLdapAuth.java:29:3:29:13 | environment : Hashtable | provenance | Config | +| InsecureLdapAuth.java:29:41:29:47 | ldapUrl : String | InsecureLdapAuth.java:29:3:29:13 | environment [post update] : Hashtable [] : String | provenance | MaD:1 | +| InsecureLdapAuth.java:29:41:29:47 | ldapUrl : String | InsecureLdapAuth.java:29:3:29:13 | environment [post update] : Hashtable [] : String | provenance | MaD:2 | +| InsecureLdapAuth.java:53:20:53:50 | "ldap://ad.your-server.com:636" : String | InsecureLdapAuth.java:57:41:57:47 | ldapUrl : String | provenance | | +| InsecureLdapAuth.java:57:3:57:13 | environment : Hashtable | InsecureLdapAuth.java:63:49:63:59 | environment | provenance | | +| InsecureLdapAuth.java:57:3:57:13 | environment [post update] : Hashtable [] : String | InsecureLdapAuth.java:63:49:63:59 | environment | provenance | | +| InsecureLdapAuth.java:57:41:57:47 | ldapUrl : String | InsecureLdapAuth.java:57:3:57:13 | environment : Hashtable | provenance | Config | +| InsecureLdapAuth.java:57:41:57:47 | ldapUrl : String | InsecureLdapAuth.java:57:3:57:13 | environment [post update] : Hashtable [] : String | provenance | MaD:1 | +| InsecureLdapAuth.java:57:41:57:47 | ldapUrl : String | InsecureLdapAuth.java:57:3:57:13 | environment [post update] : Hashtable [] : String | provenance | MaD:2 | +| InsecureLdapAuth.java:68:20:68:50 | "ldap://ad.your-server.com:389" : String | InsecureLdapAuth.java:72:41:72:47 | ldapUrl : String | provenance | | +| InsecureLdapAuth.java:72:3:72:13 | environment : Hashtable | InsecureLdapAuth.java:77:49:77:59 | environment | provenance | | +| InsecureLdapAuth.java:72:3:72:13 | environment [post update] : Hashtable [] : String | InsecureLdapAuth.java:77:49:77:59 | environment | provenance | | +| InsecureLdapAuth.java:72:41:72:47 | ldapUrl : String | InsecureLdapAuth.java:72:3:72:13 | environment : Hashtable | provenance | Config | +| InsecureLdapAuth.java:72:41:72:47 | ldapUrl : String | InsecureLdapAuth.java:72:3:72:13 | environment [post update] : Hashtable [] : String | provenance | MaD:1 | +| InsecureLdapAuth.java:72:41:72:47 | ldapUrl : String | InsecureLdapAuth.java:72:3:72:13 | environment [post update] : Hashtable [] : String | provenance | MaD:2 | +| InsecureLdapAuth.java:96:20:96:50 | "ldap://ad.your-server.com:389" : String | InsecureLdapAuth.java:100:41:100:47 | ldapUrl : String | provenance | | +| InsecureLdapAuth.java:100:3:100:13 | environment : Hashtable | InsecureLdapAuth.java:105:59:105:69 | environment | provenance | | +| InsecureLdapAuth.java:100:3:100:13 | environment [post update] : Hashtable [] : String | InsecureLdapAuth.java:105:59:105:69 | environment | provenance | | +| InsecureLdapAuth.java:100:41:100:47 | ldapUrl : String | InsecureLdapAuth.java:100:3:100:13 | environment : Hashtable | provenance | Config | +| InsecureLdapAuth.java:100:41:100:47 | ldapUrl : String | InsecureLdapAuth.java:100:3:100:13 | environment [post update] : Hashtable [] : String | provenance | MaD:1 | +| InsecureLdapAuth.java:100:41:100:47 | ldapUrl : String | InsecureLdapAuth.java:100:3:100:13 | environment [post update] : Hashtable [] : String | provenance | MaD:2 | +| InsecureLdapAuth.java:111:20:111:50 | "ldap://ad.your-server.com:389" : String | InsecureLdapAuth.java:115:47:115:53 | ldapUrl : String | provenance | | +| InsecureLdapAuth.java:115:3:115:13 | environment : Hashtable | InsecureLdapAuth.java:120:49:120:59 | environment | provenance | | +| InsecureLdapAuth.java:115:3:115:13 | environment [post update] : Hashtable [] : String | InsecureLdapAuth.java:120:49:120:59 | environment | provenance | | +| InsecureLdapAuth.java:115:47:115:53 | ldapUrl : String | InsecureLdapAuth.java:115:3:115:13 | environment : Hashtable | provenance | Config | +| InsecureLdapAuth.java:115:47:115:53 | ldapUrl : String | InsecureLdapAuth.java:115:3:115:13 | environment [post update] : Hashtable [] : String | provenance | MaD:1 | +| InsecureLdapAuth.java:115:47:115:53 | ldapUrl : String | InsecureLdapAuth.java:115:3:115:13 | environment [post update] : Hashtable [] : String | provenance | MaD:2 | +| InsecureLdapAuth.java:135:20:135:39 | ... + ... : String | InsecureLdapAuth.java:140:41:140:47 | ldapUrl : String | provenance | | +| InsecureLdapAuth.java:140:3:140:13 | environment : Hashtable | InsecureLdapAuth.java:142:50:142:60 | environment | provenance | | +| InsecureLdapAuth.java:140:3:140:13 | environment [post update] : Hashtable [] : String | InsecureLdapAuth.java:142:50:142:60 | environment | provenance | | +| InsecureLdapAuth.java:140:41:140:47 | ldapUrl : String | InsecureLdapAuth.java:140:3:140:13 | environment : Hashtable | provenance | Config | +| InsecureLdapAuth.java:140:41:140:47 | ldapUrl : String | InsecureLdapAuth.java:140:3:140:13 | environment [post update] : Hashtable [] : String | provenance | MaD:1 | +| InsecureLdapAuth.java:140:41:140:47 | ldapUrl : String | InsecureLdapAuth.java:140:3:140:13 | environment [post update] : Hashtable [] : String | provenance | MaD:2 | +| InsecureLdapAuth.java:147:20:147:39 | ... + ... : String | InsecureLdapAuth.java:151:41:151:47 | ldapUrl : String | provenance | | +| InsecureLdapAuth.java:151:3:151:13 | environment : Hashtable | InsecureLdapAuth.java:153:50:153:60 | environment | provenance | | +| InsecureLdapAuth.java:151:3:151:13 | environment [post update] : Hashtable [] : String | InsecureLdapAuth.java:153:50:153:60 | environment | provenance | | +| InsecureLdapAuth.java:151:41:151:47 | ldapUrl : String | InsecureLdapAuth.java:151:3:151:13 | environment : Hashtable | provenance | Config | +| InsecureLdapAuth.java:151:41:151:47 | ldapUrl : String | InsecureLdapAuth.java:151:3:151:13 | environment [post update] : Hashtable [] : String | provenance | MaD:1 | +| InsecureLdapAuth.java:151:41:151:47 | ldapUrl : String | InsecureLdapAuth.java:151:3:151:13 | environment [post update] : Hashtable [] : String | provenance | MaD:2 | +models +| 1 | Summary: java.util; Dictionary; true; put; (Object,Object); ; Argument[1]; Argument[this].MapValue; value; manual | +| 2 | Summary: java.util; Map; true; put; (Object,Object); ; Argument[1]; Argument[this].MapValue; value; manual | +nodes +| InsecureLdapAuth.java:11:20:11:50 | "ldap://ad.your-server.com:389" : String | semmle.label | "ldap://ad.your-server.com:389" : String | +| InsecureLdapAuth.java:15:3:15:13 | environment : Hashtable | semmle.label | environment : Hashtable | +| InsecureLdapAuth.java:15:3:15:13 | environment [post update] : Hashtable [] : String | semmle.label | environment [post update] : Hashtable [] : String | +| InsecureLdapAuth.java:15:41:15:47 | ldapUrl : String | semmle.label | ldapUrl : String | +| InsecureLdapAuth.java:20:49:20:59 | environment | semmle.label | environment | +| InsecureLdapAuth.java:25:20:25:39 | ... + ... : String | semmle.label | ... + ... : String | +| InsecureLdapAuth.java:29:3:29:13 | environment : Hashtable | semmle.label | environment : Hashtable | +| InsecureLdapAuth.java:29:3:29:13 | environment [post update] : Hashtable [] : String | semmle.label | environment [post update] : Hashtable [] : String | +| InsecureLdapAuth.java:29:41:29:47 | ldapUrl : String | semmle.label | ldapUrl : String | +| InsecureLdapAuth.java:34:49:34:59 | environment | semmle.label | environment | +| InsecureLdapAuth.java:53:20:53:50 | "ldap://ad.your-server.com:636" : String | semmle.label | "ldap://ad.your-server.com:636" : String | +| InsecureLdapAuth.java:57:3:57:13 | environment : Hashtable | semmle.label | environment : Hashtable | +| InsecureLdapAuth.java:57:3:57:13 | environment [post update] : Hashtable [] : String | semmle.label | environment [post update] : Hashtable [] : String | +| InsecureLdapAuth.java:57:41:57:47 | ldapUrl : String | semmle.label | ldapUrl : String | +| InsecureLdapAuth.java:63:49:63:59 | environment | semmle.label | environment | +| InsecureLdapAuth.java:68:20:68:50 | "ldap://ad.your-server.com:389" : String | semmle.label | "ldap://ad.your-server.com:389" : String | +| InsecureLdapAuth.java:72:3:72:13 | environment : Hashtable | semmle.label | environment : Hashtable | +| InsecureLdapAuth.java:72:3:72:13 | environment [post update] : Hashtable [] : String | semmle.label | environment [post update] : Hashtable [] : String | +| InsecureLdapAuth.java:72:41:72:47 | ldapUrl : String | semmle.label | ldapUrl : String | +| InsecureLdapAuth.java:77:49:77:59 | environment | semmle.label | environment | +| InsecureLdapAuth.java:96:20:96:50 | "ldap://ad.your-server.com:389" : String | semmle.label | "ldap://ad.your-server.com:389" : String | +| InsecureLdapAuth.java:100:3:100:13 | environment : Hashtable | semmle.label | environment : Hashtable | +| InsecureLdapAuth.java:100:3:100:13 | environment [post update] : Hashtable [] : String | semmle.label | environment [post update] : Hashtable [] : String | +| InsecureLdapAuth.java:100:41:100:47 | ldapUrl : String | semmle.label | ldapUrl : String | +| InsecureLdapAuth.java:105:59:105:69 | environment | semmle.label | environment | +| InsecureLdapAuth.java:111:20:111:50 | "ldap://ad.your-server.com:389" : String | semmle.label | "ldap://ad.your-server.com:389" : String | +| InsecureLdapAuth.java:115:3:115:13 | environment : Hashtable | semmle.label | environment : Hashtable | +| InsecureLdapAuth.java:115:3:115:13 | environment [post update] : Hashtable [] : String | semmle.label | environment [post update] : Hashtable [] : String | +| InsecureLdapAuth.java:115:47:115:53 | ldapUrl : String | semmle.label | ldapUrl : String | +| InsecureLdapAuth.java:120:49:120:59 | environment | semmle.label | environment | +| InsecureLdapAuth.java:135:20:135:39 | ... + ... : String | semmle.label | ... + ... : String | +| InsecureLdapAuth.java:140:3:140:13 | environment : Hashtable | semmle.label | environment : Hashtable | +| InsecureLdapAuth.java:140:3:140:13 | environment [post update] : Hashtable [] : String | semmle.label | environment [post update] : Hashtable [] : String | +| InsecureLdapAuth.java:140:41:140:47 | ldapUrl : String | semmle.label | ldapUrl : String | +| InsecureLdapAuth.java:142:50:142:60 | environment | semmle.label | environment | +| InsecureLdapAuth.java:147:20:147:39 | ... + ... : String | semmle.label | ... + ... : String | +| InsecureLdapAuth.java:151:3:151:13 | environment : Hashtable | semmle.label | environment : Hashtable | +| InsecureLdapAuth.java:151:3:151:13 | environment [post update] : Hashtable [] : String | semmle.label | environment [post update] : Hashtable [] : String | +| InsecureLdapAuth.java:151:41:151:47 | ldapUrl : String | semmle.label | ldapUrl : String | +| InsecureLdapAuth.java:153:50:153:60 | environment | semmle.label | environment | +subpaths diff --git a/java/ql/test/query-tests/security/CWE-522/InsecureLdapAuth/InsecureLdapAuthTest.qlref b/java/ql/test/query-tests/security/CWE-522/InsecureLdapAuth/InsecureLdapAuthTest.qlref new file mode 100644 index 00000000000..0ef38324337 --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-522/InsecureLdapAuth/InsecureLdapAuthTest.qlref @@ -0,0 +1,4 @@ +query: Security/CWE/CWE-522/InsecureLdapAuth.ql +postprocess: + - utils/test/PrettyPrintModels.ql + - utils/test/InlineExpectationsTestQuery.ql diff --git a/java/ql/test/query-tests/security/CWE-522/InsecureLdapAuth/options b/java/ql/test/query-tests/security/CWE-522/InsecureLdapAuth/options new file mode 100644 index 00000000000..7eaf4cb235f --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-522/InsecureLdapAuth/options @@ -0,0 +1 @@ +// semmle-extractor-options: --javac-args -cp ${testdir}/../../../../stubs/apache-http-4.4.13 diff --git a/java/ql/test/query-tests/security/CWE-522/InsecureLdapAuthTest.expected b/java/ql/test/query-tests/security/CWE-522/InsecureLdapAuthTest.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/java/ql/test/query-tests/security/CWE-522/InsecureLdapAuthTest.ql b/java/ql/test/query-tests/security/CWE-522/InsecureLdapAuthTest.ql deleted file mode 100644 index 7c75f5192ed..00000000000 --- a/java/ql/test/query-tests/security/CWE-522/InsecureLdapAuthTest.ql +++ /dev/null @@ -1,20 +0,0 @@ -import java -import semmle.code.java.security.InsecureLdapAuthQuery -import utils.test.InlineExpectationsTest - -module InsecureLdapAuthenticationTest implements TestSig { - string getARelevantTag() { result = "hasInsecureLdapAuth" } - - predicate hasActualResult(Location location, string element, string tag, string value) { - tag = "hasInsecureLdapAuth" and - exists(DataFlow::Node sink | InsecureLdapUrlFlow::flowTo(sink) | - BasicAuthFlow::flowTo(sink) and - not RequiresSslFlow::flowTo(sink) and - sink.getLocation() = location and - element = sink.toString() and - value = "" - ) - } -} - -import MakeTest diff --git a/java/ql/test/query-tests/security/CWE-552/UrlForwardTest.expected b/java/ql/test/query-tests/security/CWE-552/UrlForwardTest.expected index e69de29bb2d..8beed804aca 100644 --- a/java/ql/test/query-tests/security/CWE-552/UrlForwardTest.expected +++ b/java/ql/test/query-tests/security/CWE-552/UrlForwardTest.expected @@ -0,0 +1,127 @@ +#select +| UrlForwardTest.java:29:27:29:29 | url | UrlForwardTest.java:28:27:28:36 | url : String | UrlForwardTest.java:29:27:29:29 | url | Untrusted URL forward depends on a $@. | UrlForwardTest.java:28:27:28:36 | url | user-provided value | +| UrlForwardTest.java:35:28:35:30 | url | UrlForwardTest.java:33:27:33:36 | url : String | UrlForwardTest.java:35:28:35:30 | url | Untrusted URL forward depends on a $@. | UrlForwardTest.java:33:27:33:36 | url | user-provided value | +| UrlForwardTest.java:42:23:42:25 | url | UrlForwardTest.java:41:21:41:30 | url : String | UrlForwardTest.java:42:23:42:25 | url | Untrusted URL forward depends on a $@. | UrlForwardTest.java:41:21:41:30 | url | user-provided value | +| UrlForwardTest.java:47:48:47:63 | ... + ... | UrlForwardTest.java:46:27:46:36 | url : String | UrlForwardTest.java:47:48:47:63 | ... + ... | Untrusted URL forward depends on a $@. | UrlForwardTest.java:46:27:46:36 | url | user-provided value | +| UrlForwardTest.java:47:61:47:63 | url | UrlForwardTest.java:46:27:46:36 | url : String | UrlForwardTest.java:47:61:47:63 | url | Untrusted URL forward depends on a $@. | UrlForwardTest.java:46:27:46:36 | url | user-provided value | +| UrlForwardTest.java:63:33:63:35 | url | UrlForwardTest.java:61:19:61:28 | url : String | UrlForwardTest.java:63:33:63:35 | url | Untrusted URL forward depends on a $@. | UrlForwardTest.java:61:19:61:28 | url | user-provided value | +| UrlForwardTest.java:74:33:74:62 | ... + ... | UrlForwardTest.java:72:19:72:28 | url : String | UrlForwardTest.java:74:33:74:62 | ... + ... | Untrusted URL forward depends on a $@. | UrlForwardTest.java:72:19:72:28 | url | user-provided value | +| UrlForwardTest.java:85:33:85:62 | ... + ... | UrlForwardTest.java:83:19:83:28 | url : String | UrlForwardTest.java:85:33:85:62 | ... + ... | Untrusted URL forward depends on a $@. | UrlForwardTest.java:83:19:83:28 | url | user-provided value | +| UrlForwardTest.java:109:33:109:35 | url | UrlForwardTest.java:106:19:106:32 | urlPath : String | UrlForwardTest.java:109:33:109:35 | url | Untrusted URL forward depends on a $@. | UrlForwardTest.java:106:19:106:32 | urlPath | user-provided value | +| UrlForwardTest.java:148:33:148:36 | path | UrlForwardTest.java:145:17:145:63 | getServletPath(...) : String | UrlForwardTest.java:148:33:148:36 | path | Untrusted URL forward depends on a $@. | UrlForwardTest.java:145:17:145:63 | getServletPath(...) | user-provided value | +| UrlForwardTest.java:161:33:161:36 | path | UrlForwardTest.java:158:17:158:63 | getServletPath(...) : String | UrlForwardTest.java:161:33:161:36 | path | Untrusted URL forward depends on a $@. | UrlForwardTest.java:158:17:158:63 | getServletPath(...) | user-provided value | +| UrlForwardTest.java:193:51:193:59 | returnURL | UrlForwardTest.java:184:22:184:54 | getParameter(...) : String | UrlForwardTest.java:193:51:193:59 | returnURL | Untrusted URL forward depends on a $@. | UrlForwardTest.java:184:22:184:54 | getParameter(...) | user-provided value | +| UrlForwardTest.java:209:56:209:64 | returnURL | UrlForwardTest.java:203:22:203:54 | getParameter(...) : String | UrlForwardTest.java:209:56:209:64 | returnURL | Untrusted URL forward depends on a $@. | UrlForwardTest.java:203:22:203:54 | getParameter(...) | user-provided value | +| UrlForwardTest.java:236:53:236:56 | path | UrlForwardTest.java:232:17:232:44 | getParameter(...) : String | UrlForwardTest.java:236:53:236:56 | path | Untrusted URL forward depends on a $@. | UrlForwardTest.java:232:17:232:44 | getParameter(...) | user-provided value | +| UrlForwardTest.java:247:53:247:56 | path | UrlForwardTest.java:244:17:244:44 | getParameter(...) : String | UrlForwardTest.java:247:53:247:56 | path | Untrusted URL forward depends on a $@. | UrlForwardTest.java:244:17:244:44 | getParameter(...) | user-provided value | +| UrlForwardTest.java:261:53:261:76 | toString(...) | UrlForwardTest.java:255:17:255:44 | getParameter(...) : String | UrlForwardTest.java:261:53:261:76 | toString(...) | Untrusted URL forward depends on a $@. | UrlForwardTest.java:255:17:255:44 | getParameter(...) | user-provided value | +| UrlForwardTest.java:273:53:273:76 | toString(...) | UrlForwardTest.java:268:17:268:44 | getParameter(...) : String | UrlForwardTest.java:273:53:273:76 | toString(...) | Untrusted URL forward depends on a $@. | UrlForwardTest.java:268:17:268:44 | getParameter(...) | user-provided value | +| UrlForwardTest.java:284:53:284:56 | path | UrlForwardTest.java:280:17:280:44 | getParameter(...) : String | UrlForwardTest.java:284:53:284:56 | path | Untrusted URL forward depends on a $@. | UrlForwardTest.java:280:17:280:44 | getParameter(...) | user-provided value | +| UrlForwardTest.java:322:54:322:57 | path | UrlForwardTest.java:319:17:319:44 | getParameter(...) : String | UrlForwardTest.java:322:54:322:57 | path | Untrusted URL forward depends on a $@. | UrlForwardTest.java:319:17:319:44 | getParameter(...) | user-provided value | +| UrlForwardTest.java:365:53:365:56 | path | UrlForwardTest.java:355:17:355:44 | getParameter(...) : String | UrlForwardTest.java:365:53:365:56 | path | Untrusted URL forward depends on a $@. | UrlForwardTest.java:355:17:355:44 | getParameter(...) | user-provided value | +| UrlForwardTest.java:372:20:372:22 | url | UrlForwardTest.java:371:16:371:41 | getParameter(...) : String | UrlForwardTest.java:372:20:372:22 | url | Untrusted URL forward depends on a $@. | UrlForwardTest.java:371:16:371:41 | getParameter(...) | user-provided value | +| UrlForwardTest.java:384:27:384:56 | getParameter(...) | UrlForwardTest.java:384:27:384:56 | getParameter(...) | UrlForwardTest.java:384:27:384:56 | getParameter(...) | Untrusted URL forward depends on a $@. | UrlForwardTest.java:384:27:384:56 | getParameter(...) | user-provided value | +edges +| UrlForwardTest.java:28:27:28:36 | url : String | UrlForwardTest.java:29:27:29:29 | url | provenance | Sink:MaD:4 | +| UrlForwardTest.java:33:27:33:36 | url : String | UrlForwardTest.java:35:28:35:30 | url | provenance | Sink:MaD:5 | +| UrlForwardTest.java:41:21:41:30 | url : String | UrlForwardTest.java:42:23:42:25 | url | provenance | | +| UrlForwardTest.java:46:27:46:36 | url : String | UrlForwardTest.java:47:48:47:63 | ... + ... | provenance | Sink:MaD:4 | +| UrlForwardTest.java:46:27:46:36 | url : String | UrlForwardTest.java:47:61:47:63 | url | provenance | | +| UrlForwardTest.java:61:19:61:28 | url : String | UrlForwardTest.java:63:33:63:35 | url | provenance | Sink:MaD:2 | +| UrlForwardTest.java:72:19:72:28 | url : String | UrlForwardTest.java:74:33:74:62 | ... + ... | provenance | Sink:MaD:2 | +| UrlForwardTest.java:83:19:83:28 | url : String | UrlForwardTest.java:85:33:85:62 | ... + ... | provenance | Sink:MaD:2 | +| UrlForwardTest.java:106:19:106:32 | urlPath : String | UrlForwardTest.java:109:33:109:35 | url | provenance | Sink:MaD:2 | +| UrlForwardTest.java:145:17:145:63 | getServletPath(...) : String | UrlForwardTest.java:148:33:148:36 | path | provenance | Src:MaD:6 Sink:MaD:2 | +| UrlForwardTest.java:158:17:158:63 | getServletPath(...) : String | UrlForwardTest.java:161:33:161:36 | path | provenance | Src:MaD:6 Sink:MaD:2 | +| UrlForwardTest.java:184:22:184:54 | getParameter(...) : String | UrlForwardTest.java:193:51:193:59 | returnURL | provenance | Src:MaD:7 Sink:MaD:1 | +| UrlForwardTest.java:203:22:203:54 | getParameter(...) : String | UrlForwardTest.java:209:56:209:64 | returnURL | provenance | Src:MaD:7 Sink:MaD:2 | +| UrlForwardTest.java:232:17:232:44 | getParameter(...) : String | UrlForwardTest.java:236:53:236:56 | path | provenance | Src:MaD:7 Sink:MaD:1 | +| UrlForwardTest.java:244:17:244:44 | getParameter(...) : String | UrlForwardTest.java:247:53:247:56 | path | provenance | Src:MaD:7 Sink:MaD:1 | +| UrlForwardTest.java:255:17:255:44 | getParameter(...) : String | UrlForwardTest.java:258:53:258:56 | path : String | provenance | Src:MaD:7 | +| UrlForwardTest.java:258:24:258:57 | resolve(...) : Path | UrlForwardTest.java:258:24:258:69 | normalize(...) : Path | provenance | MaD:9 | +| UrlForwardTest.java:258:24:258:69 | normalize(...) : Path | UrlForwardTest.java:261:53:261:65 | requestedPath : Path | provenance | | +| UrlForwardTest.java:258:53:258:56 | path : String | UrlForwardTest.java:258:24:258:57 | resolve(...) : Path | provenance | MaD:10 | +| UrlForwardTest.java:261:53:261:65 | requestedPath : Path | UrlForwardTest.java:261:53:261:76 | toString(...) | provenance | MaD:11 Sink:MaD:1 | +| UrlForwardTest.java:268:17:268:44 | getParameter(...) : String | UrlForwardTest.java:270:53:270:56 | path : String | provenance | Src:MaD:7 | +| UrlForwardTest.java:270:24:270:57 | resolve(...) : Path | UrlForwardTest.java:270:24:270:69 | normalize(...) : Path | provenance | MaD:9 | +| UrlForwardTest.java:270:24:270:69 | normalize(...) : Path | UrlForwardTest.java:273:53:273:65 | requestedPath : Path | provenance | | +| UrlForwardTest.java:270:53:270:56 | path : String | UrlForwardTest.java:270:24:270:57 | resolve(...) : Path | provenance | MaD:10 | +| UrlForwardTest.java:273:53:273:65 | requestedPath : Path | UrlForwardTest.java:273:53:273:76 | toString(...) | provenance | MaD:11 Sink:MaD:1 | +| UrlForwardTest.java:280:17:280:44 | getParameter(...) : String | UrlForwardTest.java:281:28:281:31 | path : String | provenance | Src:MaD:7 | +| UrlForwardTest.java:281:10:281:41 | decode(...) : String | UrlForwardTest.java:284:53:284:56 | path | provenance | Sink:MaD:1 | +| UrlForwardTest.java:281:28:281:31 | path : String | UrlForwardTest.java:281:10:281:41 | decode(...) : String | provenance | MaD:8 | +| UrlForwardTest.java:319:17:319:44 | getParameter(...) : String | UrlForwardTest.java:322:54:322:57 | path | provenance | Src:MaD:7 Sink:MaD:1 | +| UrlForwardTest.java:355:17:355:44 | getParameter(...) : String | UrlForwardTest.java:360:29:360:32 | path : String | provenance | Src:MaD:7 | +| UrlForwardTest.java:355:17:355:44 | getParameter(...) : String | UrlForwardTest.java:365:53:365:56 | path | provenance | Src:MaD:7 Sink:MaD:1 | +| UrlForwardTest.java:360:11:360:42 | decode(...) : String | UrlForwardTest.java:360:29:360:32 | path : String | provenance | | +| UrlForwardTest.java:360:11:360:42 | decode(...) : String | UrlForwardTest.java:365:53:365:56 | path | provenance | Sink:MaD:1 | +| UrlForwardTest.java:360:29:360:32 | path : String | UrlForwardTest.java:360:11:360:42 | decode(...) : String | provenance | MaD:8 | +| UrlForwardTest.java:371:16:371:41 | getParameter(...) : String | UrlForwardTest.java:372:20:372:22 | url | provenance | Src:MaD:7 Sink:MaD:3 | +models +| 1 | Sink: javax.servlet; ServletContext; true; getRequestDispatcher; (String); ; Argument[0]; url-forward; manual | +| 2 | Sink: javax.servlet; ServletRequest; true; getRequestDispatcher; (String); ; Argument[0]; url-forward; manual | +| 3 | Sink: org.kohsuke.stapler; StaplerResponse; true; forward; (Object,String,StaplerRequest); ; Argument[1]; url-forward; manual | +| 4 | Sink: org.springframework.web.servlet; ModelAndView; false; ModelAndView; ; ; Argument[0]; url-forward; manual | +| 5 | Sink: org.springframework.web.servlet; ModelAndView; false; setViewName; ; ; Argument[0]; url-forward; manual | +| 6 | Source: javax.servlet.http; HttpServletRequest; false; getServletPath; (); ; ReturnValue; remote; manual | +| 7 | Source: javax.servlet; ServletRequest; false; getParameter; (String); ; ReturnValue; remote; manual | +| 8 | Summary: java.net; URLDecoder; false; decode; ; ; Argument[0]; ReturnValue; taint; manual | +| 9 | Summary: java.nio.file; Path; true; normalize; ; ; Argument[this]; ReturnValue; taint; manual | +| 10 | Summary: java.nio.file; Path; true; resolve; ; ; Argument[0]; ReturnValue; taint; manual | +| 11 | Summary: java.nio.file; Path; true; toString; ; ; Argument[this]; ReturnValue; taint; manual | +nodes +| UrlForwardTest.java:28:27:28:36 | url : String | semmle.label | url : String | +| UrlForwardTest.java:29:27:29:29 | url | semmle.label | url | +| UrlForwardTest.java:33:27:33:36 | url : String | semmle.label | url : String | +| UrlForwardTest.java:35:28:35:30 | url | semmle.label | url | +| UrlForwardTest.java:41:21:41:30 | url : String | semmle.label | url : String | +| UrlForwardTest.java:42:23:42:25 | url | semmle.label | url | +| UrlForwardTest.java:46:27:46:36 | url : String | semmle.label | url : String | +| UrlForwardTest.java:47:48:47:63 | ... + ... | semmle.label | ... + ... | +| UrlForwardTest.java:47:61:47:63 | url | semmle.label | url | +| UrlForwardTest.java:61:19:61:28 | url : String | semmle.label | url : String | +| UrlForwardTest.java:63:33:63:35 | url | semmle.label | url | +| UrlForwardTest.java:72:19:72:28 | url : String | semmle.label | url : String | +| UrlForwardTest.java:74:33:74:62 | ... + ... | semmle.label | ... + ... | +| UrlForwardTest.java:83:19:83:28 | url : String | semmle.label | url : String | +| UrlForwardTest.java:85:33:85:62 | ... + ... | semmle.label | ... + ... | +| UrlForwardTest.java:106:19:106:32 | urlPath : String | semmle.label | urlPath : String | +| UrlForwardTest.java:109:33:109:35 | url | semmle.label | url | +| UrlForwardTest.java:145:17:145:63 | getServletPath(...) : String | semmle.label | getServletPath(...) : String | +| UrlForwardTest.java:148:33:148:36 | path | semmle.label | path | +| UrlForwardTest.java:158:17:158:63 | getServletPath(...) : String | semmle.label | getServletPath(...) : String | +| UrlForwardTest.java:161:33:161:36 | path | semmle.label | path | +| UrlForwardTest.java:184:22:184:54 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| UrlForwardTest.java:193:51:193:59 | returnURL | semmle.label | returnURL | +| UrlForwardTest.java:203:22:203:54 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| UrlForwardTest.java:209:56:209:64 | returnURL | semmle.label | returnURL | +| UrlForwardTest.java:232:17:232:44 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| UrlForwardTest.java:236:53:236:56 | path | semmle.label | path | +| UrlForwardTest.java:244:17:244:44 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| UrlForwardTest.java:247:53:247:56 | path | semmle.label | path | +| UrlForwardTest.java:255:17:255:44 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| UrlForwardTest.java:258:24:258:57 | resolve(...) : Path | semmle.label | resolve(...) : Path | +| UrlForwardTest.java:258:24:258:69 | normalize(...) : Path | semmle.label | normalize(...) : Path | +| UrlForwardTest.java:258:53:258:56 | path : String | semmle.label | path : String | +| UrlForwardTest.java:261:53:261:65 | requestedPath : Path | semmle.label | requestedPath : Path | +| UrlForwardTest.java:261:53:261:76 | toString(...) | semmle.label | toString(...) | +| UrlForwardTest.java:268:17:268:44 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| UrlForwardTest.java:270:24:270:57 | resolve(...) : Path | semmle.label | resolve(...) : Path | +| UrlForwardTest.java:270:24:270:69 | normalize(...) : Path | semmle.label | normalize(...) : Path | +| UrlForwardTest.java:270:53:270:56 | path : String | semmle.label | path : String | +| UrlForwardTest.java:273:53:273:65 | requestedPath : Path | semmle.label | requestedPath : Path | +| UrlForwardTest.java:273:53:273:76 | toString(...) | semmle.label | toString(...) | +| UrlForwardTest.java:280:17:280:44 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| UrlForwardTest.java:281:10:281:41 | decode(...) : String | semmle.label | decode(...) : String | +| UrlForwardTest.java:281:28:281:31 | path : String | semmle.label | path : String | +| UrlForwardTest.java:284:53:284:56 | path | semmle.label | path | +| UrlForwardTest.java:319:17:319:44 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| UrlForwardTest.java:322:54:322:57 | path | semmle.label | path | +| UrlForwardTest.java:355:17:355:44 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| UrlForwardTest.java:360:11:360:42 | decode(...) : String | semmle.label | decode(...) : String | +| UrlForwardTest.java:360:29:360:32 | path : String | semmle.label | path : String | +| UrlForwardTest.java:365:53:365:56 | path | semmle.label | path | +| UrlForwardTest.java:371:16:371:41 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| UrlForwardTest.java:372:20:372:22 | url | semmle.label | url | +| UrlForwardTest.java:384:27:384:56 | getParameter(...) | semmle.label | getParameter(...) | +subpaths diff --git a/java/ql/test/query-tests/security/CWE-552/UrlForwardTest.java b/java/ql/test/query-tests/security/CWE-552/UrlForwardTest.java index a1437a692a2..72ccf2c3b54 100644 --- a/java/ql/test/query-tests/security/CWE-552/UrlForwardTest.java +++ b/java/ql/test/query-tests/security/CWE-552/UrlForwardTest.java @@ -25,26 +25,26 @@ public class UrlForwardTest extends HttpServlet implements Filter { // Spring `ModelAndView` test cases @GetMapping("/bad1") - public ModelAndView bad1(String url) { - return new ModelAndView(url); // $ hasTaintFlow + public ModelAndView bad1(String url) { // $ Source + return new ModelAndView(url); // $ Alert } @GetMapping("/bad2") - public ModelAndView bad2(String url) { + public ModelAndView bad2(String url) { // $ Source ModelAndView modelAndView = new ModelAndView(); - modelAndView.setViewName(url); // $ hasTaintFlow + modelAndView.setViewName(url); // $ Alert return modelAndView; } // Spring `"forward:"` prefix test cases @GetMapping("/bad3") - public String bad3(String url) { - return "forward:" + url + "/swagger-ui/index.html"; // $ hasTaintFlow + public String bad3(String url) { // $ Source + return "forward:" + url + "/swagger-ui/index.html"; // $ Alert } @GetMapping("/bad4") - public ModelAndView bad4(String url) { - ModelAndView modelAndView = new ModelAndView("forward:" + url); // $ hasTaintFlow + public ModelAndView bad4(String url) { // $ Source + ModelAndView modelAndView = new ModelAndView("forward:" + url); // $ Alert return modelAndView; } @@ -58,9 +58,9 @@ public class UrlForwardTest extends HttpServlet implements Filter { // `RequestDispatcher` test cases from a Spring `GetMapping` entry point @GetMapping("/bad5") - public void bad5(String url, HttpServletRequest request, HttpServletResponse response) { + public void bad5(String url, HttpServletRequest request, HttpServletResponse response) { // $ Source try { - request.getRequestDispatcher(url).include(request, response); // $ hasTaintFlow + request.getRequestDispatcher(url).include(request, response); // $ Alert } catch (ServletException e) { e.printStackTrace(); } catch (IOException e) { @@ -69,9 +69,9 @@ public class UrlForwardTest extends HttpServlet implements Filter { } @GetMapping("/bad6") - public void bad6(String url, HttpServletRequest request, HttpServletResponse response) { + public void bad6(String url, HttpServletRequest request, HttpServletResponse response) { // $ Source try { - request.getRequestDispatcher("/WEB-INF/jsp/" + url + ".jsp").include(request, response); // $ hasTaintFlow + request.getRequestDispatcher("/WEB-INF/jsp/" + url + ".jsp").include(request, response); // $ Alert } catch (ServletException e) { e.printStackTrace(); } catch (IOException e) { @@ -80,9 +80,9 @@ public class UrlForwardTest extends HttpServlet implements Filter { } @GetMapping("/bad7") - public void bad7(String url, HttpServletRequest request, HttpServletResponse response) { + public void bad7(String url, HttpServletRequest request, HttpServletResponse response) { // $ Source try { - request.getRequestDispatcher("/WEB-INF/jsp/" + url + ".jsp").forward(request, response); // $ hasTaintFlow + request.getRequestDispatcher("/WEB-INF/jsp/" + url + ".jsp").forward(request, response); // $ Alert } catch (ServletException e) { e.printStackTrace(); } catch (IOException e) { @@ -103,10 +103,10 @@ public class UrlForwardTest extends HttpServlet implements Filter { // BAD: appended to a prefix without path sanitization @GetMapping("/bad8") - public void bad8(String urlPath, HttpServletRequest request, HttpServletResponse response) { + public void bad8(String urlPath, HttpServletRequest request, HttpServletResponse response) { // $ Source try { String url = "/pages" + urlPath; - request.getRequestDispatcher(url).forward(request, response); // $ hasTaintFlow + request.getRequestDispatcher(url).forward(request, response); // $ Alert } catch (ServletException e) { e.printStackTrace(); } catch (IOException e) { @@ -142,10 +142,10 @@ public class UrlForwardTest extends HttpServlet implements Filter { // BAD: Request dispatcher from servlet path without check public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { - String path = ((HttpServletRequest) request).getServletPath(); + String path = ((HttpServletRequest) request).getServletPath(); // $ Source // A sample payload "/%57EB-INF/web.xml" can bypass this `startsWith` check if (path != null && !path.startsWith("/WEB-INF")) { - request.getRequestDispatcher(path).forward(request, response); // $ hasTaintFlow + request.getRequestDispatcher(path).forward(request, response); // $ Alert } else { chain.doFilter(request, response); } @@ -155,10 +155,10 @@ public class UrlForwardTest extends HttpServlet implements Filter { // the user-supplied path; could bypass check with ".." encoded as "%2e%2e". public void doFilter2(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { - String path = ((HttpServletRequest) request).getServletPath(); + String path = ((HttpServletRequest) request).getServletPath(); // $ Source if (path.startsWith(BASE_PATH) && !path.contains("..")) { - request.getRequestDispatcher(path).forward(request, response); // $ hasTaintFlow + request.getRequestDispatcher(path).forward(request, response); // $ Alert } else { chain.doFilter(request, response); } @@ -181,7 +181,7 @@ public class UrlForwardTest extends HttpServlet implements Filter { protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String action = request.getParameter("action"); - String returnURL = request.getParameter("returnURL"); + String returnURL = request.getParameter("returnURL"); // $ Source ServletConfig cfg = getServletConfig(); if (action.equals("Login")) { @@ -190,7 +190,7 @@ public class UrlForwardTest extends HttpServlet implements Filter { rd.forward(request, response); } else { ServletContext sc = cfg.getServletContext(); - RequestDispatcher rd = sc.getRequestDispatcher(returnURL); // $ hasTaintFlow + RequestDispatcher rd = sc.getRequestDispatcher(returnURL); // $ Alert rd.forward(request, response); } } @@ -200,13 +200,13 @@ public class UrlForwardTest extends HttpServlet implements Filter { protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String action = request.getParameter("action"); - String returnURL = request.getParameter("returnURL"); + String returnURL = request.getParameter("returnURL"); // $ Source if (action.equals("Login")) { RequestDispatcher rd = request.getRequestDispatcher("/Login.jsp"); rd.forward(request, response); } else { - RequestDispatcher rd = request.getRequestDispatcher(returnURL); // $ hasTaintFlow + RequestDispatcher rd = request.getRequestDispatcher(returnURL); // $ Alert rd.forward(request, response); } } @@ -229,11 +229,11 @@ public class UrlForwardTest extends HttpServlet implements Filter { // BAD: Request dispatcher without path traversal check protected void doHead1(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - String path = request.getParameter("path"); + String path = request.getParameter("path"); // $ Source // A sample payload "/pages/welcome.jsp/../WEB-INF/web.xml" can bypass the `startsWith` check if (path.startsWith(BASE_PATH)) { - request.getServletContext().getRequestDispatcher(path).include(request, response); // $ hasTaintFlow + request.getServletContext().getRequestDispatcher(path).include(request, response); // $ Alert } } @@ -241,10 +241,10 @@ public class UrlForwardTest extends HttpServlet implements Filter { // the user-supplied path; could bypass check with ".." encoded as "%2e%2e". protected void doHead2(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - String path = request.getParameter("path"); + String path = request.getParameter("path"); // $ Source if (path.startsWith(BASE_PATH) && !path.contains("..")) { - request.getServletContext().getRequestDispatcher(path).include(request, response); // $ hasTaintFlow + request.getServletContext().getRequestDispatcher(path).include(request, response); // $ Alert } } @@ -252,36 +252,36 @@ public class UrlForwardTest extends HttpServlet implements Filter { // does not decode before normalization. protected void doHead3(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - String path = request.getParameter("path"); + String path = request.getParameter("path"); // $ Source // Since not decoded before normalization, "%2e%2e" can remain in the path Path requestedPath = Paths.get(BASE_PATH).resolve(path).normalize(); if (requestedPath.startsWith(BASE_PATH)) { - request.getServletContext().getRequestDispatcher(requestedPath.toString()).forward(request, response); // $ hasTaintFlow + request.getServletContext().getRequestDispatcher(requestedPath.toString()).forward(request, response); // $ Alert } } // BAD: Request dispatcher with negation check and path normalization, but without URL decoding. protected void doHead4(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - String path = request.getParameter("path"); + String path = request.getParameter("path"); // $ Source // Since not decoded before normalization, "/%57EB-INF" can remain in the path and pass the `startsWith` check. Path requestedPath = Paths.get(BASE_PATH).resolve(path).normalize(); if (!requestedPath.startsWith("/WEB-INF") && !requestedPath.startsWith("/META-INF")) { - request.getServletContext().getRequestDispatcher(requestedPath.toString()).forward(request, response); // $ hasTaintFlow + request.getServletContext().getRequestDispatcher(requestedPath.toString()).forward(request, response); // $ Alert } } // BAD: Request dispatcher with path traversal check and single URL decoding; may be vulnerable to double-encoding protected void doHead5(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - String path = request.getParameter("path"); + String path = request.getParameter("path"); // $ Source path = URLDecoder.decode(path, "UTF-8"); if (!path.startsWith("/WEB-INF/") && !path.contains("..")) { - request.getServletContext().getRequestDispatcher(path).include(request, response); // $ hasTaintFlow + request.getServletContext().getRequestDispatcher(path).include(request, response); // $ Alert } } @@ -316,10 +316,10 @@ public class UrlForwardTest extends HttpServlet implements Filter { // BAD: Request dispatcher without URL decoding before WEB-INF and path traversal checks protected void doHead8(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - String path = request.getParameter("path"); + String path = request.getParameter("path"); // $ Source if (path.contains("%")){ // incorrect check if (!path.startsWith("/WEB-INF/") && !path.contains("..")) { - request.getServletContext().getRequestDispatcher(path).include(request, response); // $ hasTaintFlow + request.getServletContext().getRequestDispatcher(path).include(request, response); // $ Alert } } } @@ -352,7 +352,7 @@ public class UrlForwardTest extends HttpServlet implements Filter { // GOOD: Request dispatcher with path traversal check and URL decoding in a loop to avoid double-encoding bypass protected void doHead11(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - String path = request.getParameter("path"); + String path = request.getParameter("path"); // $ Source // FP: we don't currently handle the scenario where the // `path.contains("%")` check is stored in a variable. boolean hasEncoding = path.contains("%"); @@ -362,14 +362,14 @@ public class UrlForwardTest extends HttpServlet implements Filter { } if (!path.startsWith("/WEB-INF/") && !path.contains("..")) { - request.getServletContext().getRequestDispatcher(path).include(request, response); // $ SPURIOUS: hasTaintFlow + request.getServletContext().getRequestDispatcher(path).include(request, response); // $ SPURIOUS: Alert } } // BAD: `StaplerResponse.forward` without any checks public void generateResponse(StaplerRequest req, StaplerResponse rsp, Object obj) throws IOException, ServletException { - String url = req.getParameter("target"); - rsp.forward(obj, url, req); // $ hasTaintFlow + String url = req.getParameter("target"); // $ Source + rsp.forward(obj, url, req); // $ Alert } // QHelp example @@ -381,7 +381,7 @@ public class UrlForwardTest extends HttpServlet implements Filter { ServletContext sc = cfg.getServletContext(); // BAD: a request parameter is incorporated without validation into a URL forward - sc.getRequestDispatcher(request.getParameter("target")).forward(request, response); // $ hasTaintFlow + sc.getRequestDispatcher(request.getParameter("target")).forward(request, response); // $ Alert // GOOD: the request parameter is validated against a known fixed string if (VALID_FORWARD.equals(request.getParameter("target"))) { diff --git a/java/ql/test/query-tests/security/CWE-552/UrlForwardTest.ql b/java/ql/test/query-tests/security/CWE-552/UrlForwardTest.ql deleted file mode 100644 index f7240bf0c30..00000000000 --- a/java/ql/test/query-tests/security/CWE-552/UrlForwardTest.ql +++ /dev/null @@ -1,4 +0,0 @@ -import java -import utils.test.InlineFlowTest -import semmle.code.java.security.UrlForwardQuery -import TaintFlowTest diff --git a/java/ql/test/query-tests/security/CWE-552/UrlForwardTest.qlref b/java/ql/test/query-tests/security/CWE-552/UrlForwardTest.qlref new file mode 100644 index 00000000000..1e8912766b2 --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-552/UrlForwardTest.qlref @@ -0,0 +1,4 @@ +query: Security/CWE/CWE-552/UrlForward.ql +postprocess: + - utils/test/PrettyPrintModels.ql + - utils/test/InlineExpectationsTestQuery.ql diff --git a/java/ql/test/query-tests/security/CWE-611/CdaUtilTests.java b/java/ql/test/query-tests/security/CWE-611/CdaUtilTests.java index 6c19a842472..ca74ae93521 100644 --- a/java/ql/test/query-tests/security/CWE-611/CdaUtilTests.java +++ b/java/ql/test/query-tests/security/CWE-611/CdaUtilTests.java @@ -7,17 +7,17 @@ import org.xml.sax.InputSource; public class CdaUtilTests { public void test(Socket sock) throws Exception { - InputStream is = sock.getInputStream(); + InputStream is = sock.getInputStream(); // $ Source InputSource iSrc = new InputSource(new InputStreamReader(is)); - CDAUtil.load(is); // $ hasTaintFlow - CDAUtil.load(iSrc); // $ hasTaintFlow - CDAUtil.load(is, (CDAUtil.ValidationHandler) null); // $ hasTaintFlow - CDAUtil.load(is, (CDAUtil.LoadHandler) null); // $ hasTaintFlow - CDAUtil.load(null, null, is, null); // $ hasTaintFlow - CDAUtil.load(iSrc, (CDAUtil.ValidationHandler) null); // $ hasTaintFlow - CDAUtil.load(iSrc, (CDAUtil.LoadHandler) null); // $ hasTaintFlow - CDAUtil.load(null, null, iSrc, null); // $ hasTaintFlow - CDAUtil.loadAs(is, null); // $ hasTaintFlow - CDAUtil.loadAs(is, null, null); // $ hasTaintFlow + CDAUtil.load(is); // $ Alert + CDAUtil.load(iSrc); // $ Alert + CDAUtil.load(is, (CDAUtil.ValidationHandler) null); // $ Alert + CDAUtil.load(is, (CDAUtil.LoadHandler) null); // $ Alert + CDAUtil.load(null, null, is, null); // $ Alert + CDAUtil.load(iSrc, (CDAUtil.ValidationHandler) null); // $ Alert + CDAUtil.load(iSrc, (CDAUtil.LoadHandler) null); // $ Alert + CDAUtil.load(null, null, iSrc, null); // $ Alert + CDAUtil.loadAs(is, null); // $ Alert + CDAUtil.loadAs(is, null, null); // $ Alert } } diff --git a/java/ql/test/query-tests/security/CWE-611/DigesterTests.java b/java/ql/test/query-tests/security/CWE-611/DigesterTests.java index bace07a9b30..fbb3afbdd04 100644 --- a/java/ql/test/query-tests/security/CWE-611/DigesterTests.java +++ b/java/ql/test/query-tests/security/CWE-611/DigesterTests.java @@ -11,9 +11,9 @@ public class DigesterTests { @PostMapping(value = "bad") public void bad1(HttpServletRequest request, HttpServletResponse response) throws Exception { - ServletInputStream servletInputStream = request.getInputStream(); + ServletInputStream servletInputStream = request.getInputStream(); // $ Source Digester digester = new Digester(); - digester.parse(servletInputStream); // $ hasTaintFlow + digester.parse(servletInputStream); // $ Alert } @PostMapping(value = "good") diff --git a/java/ql/test/query-tests/security/CWE-611/DocumentBuilderTests.java b/java/ql/test/query-tests/security/CWE-611/DocumentBuilderTests.java index 98d95686301..f6a8f94cbb0 100644 --- a/java/ql/test/query-tests/security/CWE-611/DocumentBuilderTests.java +++ b/java/ql/test/query-tests/security/CWE-611/DocumentBuilderTests.java @@ -11,7 +11,7 @@ class DocumentBuilderTests { public void unconfiguredParse(Socket sock) throws Exception { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = factory.newDocumentBuilder(); - builder.parse(sock.getInputStream()); // $ hasTaintFlow + builder.parse(sock.getInputStream()); // $ Alert } public void disableDTD(Socket sock) throws Exception { @@ -25,7 +25,7 @@ class DocumentBuilderTests { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true); DocumentBuilder builder = factory.newDocumentBuilder(); - builder.parse(sock.getInputStream()); // $ hasTaintFlow -- secure-processing by itself is + builder.parse(sock.getInputStream()); // $ Alert -- secure-processing by itself is // insufficient } @@ -33,7 +33,7 @@ class DocumentBuilderTests { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); factory.setFeature("http://javax.xml.XMLConstants/feature/secure-processing", true); DocumentBuilder builder = factory.newDocumentBuilder(); - builder.parse(sock.getInputStream()); // $ hasTaintFlow -- secure-processing by itself is + builder.parse(sock.getInputStream()); // $ Alert -- secure-processing by itself is // insufficient } @@ -41,14 +41,14 @@ class DocumentBuilderTests { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); factory.setFeature("http://apache.org/xml/features/disallow-doctype-decl", false); DocumentBuilder builder = factory.newDocumentBuilder(); - builder.parse(sock.getInputStream()); // $ hasTaintFlow + builder.parse(sock.getInputStream()); // $ Alert } public void disableSecurityFeature(Socket sock) throws Exception { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); factory.setFeature("http://javax.xml.XMLConstants/feature/secure-processing", false); DocumentBuilder builder = factory.newDocumentBuilder(); - builder.parse(sock.getInputStream()); // $ hasTaintFlow + builder.parse(sock.getInputStream()); // $ Alert } public void disableExternalEntities(Socket sock) throws Exception { @@ -63,14 +63,14 @@ class DocumentBuilderTests { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); factory.setFeature("http://xml.org/sax/features/external-parameter-entities", false); DocumentBuilder builder = factory.newDocumentBuilder(); - builder.parse(sock.getInputStream()); // $ hasTaintFlow + builder.parse(sock.getInputStream()); // $ Alert } public void partialDisableExternalEntities2(Socket sock) throws Exception { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); factory.setFeature("http://xml.org/sax/features/external-general-entities", false); DocumentBuilder builder = factory.newDocumentBuilder(); - builder.parse(sock.getInputStream()); // $ hasTaintFlow + builder.parse(sock.getInputStream()); // $ Alert } public void misConfigureExternalEntities1(Socket sock) throws Exception { @@ -78,7 +78,7 @@ class DocumentBuilderTests { factory.setFeature("http://xml.org/sax/features/external-parameter-entities", true); factory.setFeature("http://xml.org/sax/features/external-general-entities", false); DocumentBuilder builder = factory.newDocumentBuilder(); - builder.parse(sock.getInputStream()); // $ hasTaintFlow + builder.parse(sock.getInputStream()); // $ Alert } public void misConfigureExternalEntities2(Socket sock) throws Exception { @@ -86,22 +86,22 @@ class DocumentBuilderTests { factory.setFeature("http://xml.org/sax/features/external-parameter-entities", false); factory.setFeature("http://xml.org/sax/features/external-general-entities", true); DocumentBuilder builder = factory.newDocumentBuilder(); - builder.parse(sock.getInputStream()); // $ hasTaintFlow + builder.parse(sock.getInputStream()); // $ Alert } public void taintedSAXInputSource1(Socket sock) throws Exception { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = factory.newDocumentBuilder(); - SAXSource source = new SAXSource(new InputSource(sock.getInputStream())); - builder.parse(source.getInputSource()); // $ hasTaintFlow + SAXSource source = new SAXSource(new InputSource(sock.getInputStream())); // $ Source + builder.parse(source.getInputSource()); // $ Alert } public void taintedSAXInputSource2(Socket sock) throws Exception { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = factory.newDocumentBuilder(); - StreamSource source = new StreamSource(sock.getInputStream()); - builder.parse(SAXSource.sourceToInputSource(source)); // $ hasTaintFlow - builder.parse(source.getInputStream()); // $ hasTaintFlow + StreamSource source = new StreamSource(sock.getInputStream()); // $ Source + builder.parse(SAXSource.sourceToInputSource(source)); // $ Alert + builder.parse(source.getInputStream()); // $ Alert } private static DocumentBuilderFactory getDocumentBuilderFactory() throws Exception { diff --git a/java/ql/test/query-tests/security/CWE-611/ParserHelperTests.java b/java/ql/test/query-tests/security/CWE-611/ParserHelperTests.java index 6b43c224d94..94aef644106 100644 --- a/java/ql/test/query-tests/security/CWE-611/ParserHelperTests.java +++ b/java/ql/test/query-tests/security/CWE-611/ParserHelperTests.java @@ -9,6 +9,6 @@ public class ParserHelperTests { @PostMapping(value = "bad4") public void bad4(HttpServletRequest request) throws Exception { - Document document = ParserHelper.loadDocument(request.getInputStream()); // $ hasTaintFlow + Document document = ParserHelper.loadDocument(request.getInputStream()); // $ Alert } } diff --git a/java/ql/test/query-tests/security/CWE-611/SAXBuilderTests.java b/java/ql/test/query-tests/security/CWE-611/SAXBuilderTests.java index 2b25540b85b..8458d7a5bc2 100644 --- a/java/ql/test/query-tests/security/CWE-611/SAXBuilderTests.java +++ b/java/ql/test/query-tests/security/CWE-611/SAXBuilderTests.java @@ -5,7 +5,7 @@ public class SAXBuilderTests { public void unconfiguredSAXBuilder(Socket sock) throws Exception { SAXBuilder builder = new SAXBuilder(); - builder.build(sock.getInputStream()); // $ hasTaintFlow + builder.build(sock.getInputStream()); // $ Alert } public void safeBuilder(Socket sock) throws Exception { @@ -17,6 +17,6 @@ public class SAXBuilderTests { public void misConfiguredBuilder(Socket sock) throws Exception { SAXBuilder builder = new SAXBuilder(); builder.setFeature("http://apache.org/xml/features/disallow-doctype-decl", false); - builder.build(sock.getInputStream()); // $ hasTaintFlow + builder.build(sock.getInputStream()); // $ Alert } } diff --git a/java/ql/test/query-tests/security/CWE-611/SAXParserTests.java b/java/ql/test/query-tests/security/CWE-611/SAXParserTests.java index a6de7709aed..f726fa36701 100644 --- a/java/ql/test/query-tests/security/CWE-611/SAXParserTests.java +++ b/java/ql/test/query-tests/security/CWE-611/SAXParserTests.java @@ -10,7 +10,7 @@ public class SAXParserTests { public void unconfiguredParser(Socket sock) throws Exception { SAXParserFactory factory = SAXParserFactory.newInstance(); SAXParser parser = factory.newSAXParser(); - parser.parse(sock.getInputStream(), new DefaultHandler()); // $ hasTaintFlow + parser.parse(sock.getInputStream(), new DefaultHandler()); // $ Alert } public void safeParser(Socket sock) throws Exception { @@ -27,7 +27,7 @@ public class SAXParserTests { factory.setFeature("http://xml.org/sax/features/external-general-entities", false); factory.setFeature("http://xml.org/sax/features/external-parameter-entities", false); SAXParser parser = factory.newSAXParser(); - parser.parse(sock.getInputStream(), new DefaultHandler()); // $ hasTaintFlow + parser.parse(sock.getInputStream(), new DefaultHandler()); // $ Alert } public void partialConfiguredParser2(Socket sock) throws Exception { @@ -35,7 +35,7 @@ public class SAXParserTests { factory.setFeature("http://xml.org/sax/features/external-parameter-entities", false); factory.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false); SAXParser parser = factory.newSAXParser(); - parser.parse(sock.getInputStream(), new DefaultHandler()); // $ hasTaintFlow + parser.parse(sock.getInputStream(), new DefaultHandler()); // $ Alert } public void partialConfiguredParser3(Socket sock) throws Exception { @@ -43,7 +43,7 @@ public class SAXParserTests { factory.setFeature("http://xml.org/sax/features/external-general-entities", false); factory.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false); SAXParser parser = factory.newSAXParser(); - parser.parse(sock.getInputStream(), new DefaultHandler()); // $ hasTaintFlow + parser.parse(sock.getInputStream(), new DefaultHandler()); // $ Alert } public void misConfiguredParser1(Socket sock) throws Exception { @@ -52,7 +52,7 @@ public class SAXParserTests { factory.setFeature("http://xml.org/sax/features/external-parameter-entities", false); factory.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false); SAXParser parser = factory.newSAXParser(); - parser.parse(sock.getInputStream(), new DefaultHandler()); // $ hasTaintFlow + parser.parse(sock.getInputStream(), new DefaultHandler()); // $ Alert } public void misConfiguredParser2(Socket sock) throws Exception { @@ -61,7 +61,7 @@ public class SAXParserTests { factory.setFeature("http://xml.org/sax/features/external-parameter-entities", true); factory.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false); SAXParser parser = factory.newSAXParser(); - parser.parse(sock.getInputStream(), new DefaultHandler()); // $ hasTaintFlow + parser.parse(sock.getInputStream(), new DefaultHandler()); // $ Alert } public void misConfiguredParser3(Socket sock) throws Exception { @@ -70,7 +70,7 @@ public class SAXParserTests { factory.setFeature("http://xml.org/sax/features/external-parameter-entities", false); factory.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", true); SAXParser parser = factory.newSAXParser(); - parser.parse(sock.getInputStream(), new DefaultHandler()); // $ hasTaintFlow + parser.parse(sock.getInputStream(), new DefaultHandler()); // $ Alert } public void safeParser2(Socket sock) throws Exception { diff --git a/java/ql/test/query-tests/security/CWE-611/SAXReaderTests.java b/java/ql/test/query-tests/security/CWE-611/SAXReaderTests.java index f436074f65f..c30a68c896e 100644 --- a/java/ql/test/query-tests/security/CWE-611/SAXReaderTests.java +++ b/java/ql/test/query-tests/security/CWE-611/SAXReaderTests.java @@ -5,7 +5,7 @@ public class SAXReaderTests { public void unconfiguredReader(Socket sock) throws Exception { SAXReader reader = new SAXReader(); - reader.read(sock.getInputStream()); // $ hasTaintFlow + reader.read(sock.getInputStream()); // $ Alert } public void safeReader(Socket sock) throws Exception { @@ -20,21 +20,21 @@ public class SAXReaderTests { SAXReader reader = new SAXReader(); reader.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true); reader.setFeature("http://xml.org/sax/features/external-general-entities", false); - reader.read(sock.getInputStream()); // $ hasTaintFlow + reader.read(sock.getInputStream()); // $ Alert } public void partialConfiguredReader2(Socket sock) throws Exception { SAXReader reader = new SAXReader(); reader.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true); reader.setFeature("http://xml.org/sax/features/external-parameter-entities", false); - reader.read(sock.getInputStream()); // $ hasTaintFlow + reader.read(sock.getInputStream()); // $ Alert } public void partialConfiguredReader3(Socket sock) throws Exception { SAXReader reader = new SAXReader(); reader.setFeature("http://xml.org/sax/features/external-general-entities", false); reader.setFeature("http://xml.org/sax/features/external-parameter-entities", false); - reader.read(sock.getInputStream()); // $ hasTaintFlow + reader.read(sock.getInputStream()); // $ Alert } public void misConfiguredReader1(Socket sock) throws Exception { @@ -42,7 +42,7 @@ public class SAXReaderTests { reader.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true); reader.setFeature("http://xml.org/sax/features/external-general-entities", true); reader.setFeature("http://xml.org/sax/features/external-parameter-entities", false); - reader.read(sock.getInputStream()); // $ hasTaintFlow + reader.read(sock.getInputStream()); // $ Alert } public void misConfiguredReader2(Socket sock) throws Exception { @@ -50,7 +50,7 @@ public class SAXReaderTests { reader.setFeature("http://apache.org/xml/features/disallow-doctype-decl", false); reader.setFeature("http://xml.org/sax/features/external-general-entities", false); reader.setFeature("http://xml.org/sax/features/external-parameter-entities", false); - reader.read(sock.getInputStream()); // $ hasTaintFlow + reader.read(sock.getInputStream()); // $ Alert } public void misConfiguredReader3(Socket sock) throws Exception { @@ -58,6 +58,6 @@ public class SAXReaderTests { reader.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true); reader.setFeature("http://xml.org/sax/features/external-general-entities", false); reader.setFeature("http://xml.org/sax/features/external-parameter-entities", true); - reader.read(sock.getInputStream()); // $ hasTaintFlow + reader.read(sock.getInputStream()); // $ Alert } } diff --git a/java/ql/test/query-tests/security/CWE-611/SAXSourceTests.java b/java/ql/test/query-tests/security/CWE-611/SAXSourceTests.java index 721f596457d..1bb67b310c7 100644 --- a/java/ql/test/query-tests/security/CWE-611/SAXSourceTests.java +++ b/java/ql/test/query-tests/security/CWE-611/SAXSourceTests.java @@ -14,10 +14,10 @@ public class SAXSourceTests { public void unsafeSource(Socket sock) throws Exception { XMLReader reader = XMLReaderFactory.createXMLReader(); - SAXSource source = new SAXSource(reader, new InputSource(sock.getInputStream())); + SAXSource source = new SAXSource(reader, new InputSource(sock.getInputStream())); // $ Source JAXBContext jc = JAXBContext.newInstance(Object.class); Unmarshaller um = jc.createUnmarshaller(); - um.unmarshal(source); // $ hasTaintFlow + um.unmarshal(source); // $ Alert } public void explicitlySafeSource1(Socket sock) throws Exception { diff --git a/java/ql/test/query-tests/security/CWE-611/SchemaTests.java b/java/ql/test/query-tests/security/CWE-611/SchemaTests.java index d98aeb4a3ba..9ed25136393 100644 --- a/java/ql/test/query-tests/security/CWE-611/SchemaTests.java +++ b/java/ql/test/query-tests/security/CWE-611/SchemaTests.java @@ -9,7 +9,7 @@ public class SchemaTests { public void unconfiguredSchemaFactory(Socket sock) throws Exception { SchemaFactory factory = SchemaFactory.newInstance("http://www.w3.org/2001/XMLSchema"); - Schema schema = factory.newSchema(new StreamSource(sock.getInputStream())); // $ hasTaintFlow + Schema schema = factory.newSchema(new StreamSource(sock.getInputStream())); // $ Alert } public void safeSchemaFactory(Socket sock) throws Exception { @@ -22,26 +22,26 @@ public class SchemaTests { public void partialConfiguredSchemaFactory1(Socket sock) throws Exception { SchemaFactory factory = SchemaFactory.newInstance("http://www.w3.org/2001/XMLSchema"); factory.setProperty(XMLConstants.ACCESS_EXTERNAL_DTD, ""); - Schema schema = factory.newSchema(new StreamSource(sock.getInputStream())); // $ hasTaintFlow + Schema schema = factory.newSchema(new StreamSource(sock.getInputStream())); // $ Alert } public void partialConfiguredSchemaFactory2(Socket sock) throws Exception { SchemaFactory factory = SchemaFactory.newInstance("http://www.w3.org/2001/XMLSchema"); factory.setProperty(XMLConstants.ACCESS_EXTERNAL_SCHEMA, ""); - Schema schema = factory.newSchema(new StreamSource(sock.getInputStream())); // $ hasTaintFlow + Schema schema = factory.newSchema(new StreamSource(sock.getInputStream())); // $ Alert } public void misConfiguredSchemaFactory1(Socket sock) throws Exception { SchemaFactory factory = SchemaFactory.newInstance("http://www.w3.org/2001/XMLSchema"); factory.setProperty(XMLConstants.ACCESS_EXTERNAL_DTD, ""); factory.setProperty(XMLConstants.ACCESS_EXTERNAL_SCHEMA, "ab"); - Schema schema = factory.newSchema(new StreamSource(sock.getInputStream())); // $ hasTaintFlow + Schema schema = factory.newSchema(new StreamSource(sock.getInputStream())); // $ Alert } public void misConfiguredSchemaFactory2(Socket sock) throws Exception { SchemaFactory factory = SchemaFactory.newInstance("http://www.w3.org/2001/XMLSchema"); factory.setProperty(XMLConstants.ACCESS_EXTERNAL_DTD, "cd"); factory.setProperty(XMLConstants.ACCESS_EXTERNAL_SCHEMA, ""); - Schema schema = factory.newSchema(new StreamSource(sock.getInputStream())); // $ hasTaintFlow + Schema schema = factory.newSchema(new StreamSource(sock.getInputStream())); // $ Alert } } diff --git a/java/ql/test/query-tests/security/CWE-611/SimpleXMLTests.java b/java/ql/test/query-tests/security/CWE-611/SimpleXMLTests.java index 65c759acbf4..d28ec2ca66d 100644 --- a/java/ql/test/query-tests/security/CWE-611/SimpleXMLTests.java +++ b/java/ql/test/query-tests/security/CWE-611/SimpleXMLTests.java @@ -11,145 +11,145 @@ public class SimpleXMLTests { public void persisterValidate1(Socket sock) throws Exception { Persister persister = new Persister(); - persister.validate(this.getClass(), sock.getInputStream()); // $ hasTaintFlow + persister.validate(this.getClass(), sock.getInputStream()); // $ Alert } public void persisterValidate2(Socket sock) throws Exception { Persister persister = new Persister(); - persister.validate(this.getClass(), sock.getInputStream(), true); // $ hasTaintFlow + persister.validate(this.getClass(), sock.getInputStream(), true); // $ Alert } public void persisterValidate3(Socket sock) throws Exception { Persister persister = new Persister(); - persister.validate(this.getClass(), new InputStreamReader(sock.getInputStream())); // $ hasTaintFlow + persister.validate(this.getClass(), new InputStreamReader(sock.getInputStream())); // $ Alert } public void persisterValidate4(Socket sock) throws Exception { Persister persister = new Persister(); byte[] b = new byte[] {}; - sock.getInputStream().read(b); - persister.validate(this.getClass(), new String(b)); // $ hasTaintFlow + sock.getInputStream().read(b); // $ Source + persister.validate(this.getClass(), new String(b)); // $ Alert } public void persisterValidate5(Socket sock) throws Exception { Persister persister = new Persister(); byte[] b = new byte[] {}; - sock.getInputStream().read(b); - persister.validate(this.getClass(), new String(b), true); // $ hasTaintFlow + sock.getInputStream().read(b); // $ Source + persister.validate(this.getClass(), new String(b), true); // $ Alert } public void persisterValidate6(Socket sock) throws Exception { Persister persister = new Persister(); - persister.validate(this.getClass(), new InputStreamReader(sock.getInputStream()), true); // $ hasTaintFlow + persister.validate(this.getClass(), new InputStreamReader(sock.getInputStream()), true); // $ Alert } public void persisterRead1(Socket sock) throws Exception { Persister persister = new Persister(); - persister.read(this.getClass(), sock.getInputStream()); // $ hasTaintFlow + persister.read(this.getClass(), sock.getInputStream()); // $ Alert } public void persisterRead2(Socket sock) throws Exception { Persister persister = new Persister(); - persister.read(this.getClass(), sock.getInputStream(), true); // $ hasTaintFlow + persister.read(this.getClass(), sock.getInputStream(), true); // $ Alert } public void persisterRead3(Socket sock) throws Exception { Persister persister = new Persister(); - persister.read(this, sock.getInputStream()); // $ hasTaintFlow + persister.read(this, sock.getInputStream()); // $ Alert } public void persisterRead4(Socket sock) throws Exception { Persister persister = new Persister(); - persister.read(this, sock.getInputStream(), true); // $ hasTaintFlow + persister.read(this, sock.getInputStream(), true); // $ Alert } public void persisterRead5(Socket sock) throws Exception { Persister persister = new Persister(); - persister.read(this.getClass(), new InputStreamReader(sock.getInputStream())); // $ hasTaintFlow + persister.read(this.getClass(), new InputStreamReader(sock.getInputStream())); // $ Alert } public void persisterRead6(Socket sock) throws Exception { Persister persister = new Persister(); - persister.read(this.getClass(), new InputStreamReader(sock.getInputStream()), true); // $ hasTaintFlow + persister.read(this.getClass(), new InputStreamReader(sock.getInputStream()), true); // $ Alert } public void persisterRead7(Socket sock) throws Exception { Persister persister = new Persister(); - persister.read(this, new InputStreamReader(sock.getInputStream())); // $ hasTaintFlow + persister.read(this, new InputStreamReader(sock.getInputStream())); // $ Alert } public void persisterRead8(Socket sock) throws Exception { Persister persister = new Persister(); - persister.read(this, new InputStreamReader(sock.getInputStream()), true); // $ hasTaintFlow + persister.read(this, new InputStreamReader(sock.getInputStream()), true); // $ Alert } public void persisterRead9(Socket sock) throws Exception { Persister persister = new Persister(); byte[] b = new byte[] {}; - sock.getInputStream().read(b); - persister.read(this.getClass(), new String(b)); // $ hasTaintFlow + sock.getInputStream().read(b); // $ Source + persister.read(this.getClass(), new String(b)); // $ Alert } public void persisterRead10(Socket sock) throws Exception { Persister persister = new Persister(); byte[] b = new byte[] {}; - sock.getInputStream().read(b); - persister.read(this.getClass(), new String(b), true); // $ hasTaintFlow + sock.getInputStream().read(b); // $ Source + persister.read(this.getClass(), new String(b), true); // $ Alert } public void persisterRead11(Socket sock) throws Exception { Persister persister = new Persister(); byte[] b = new byte[] {}; - sock.getInputStream().read(b); - persister.read(this, new String(b)); // $ hasTaintFlow + sock.getInputStream().read(b); // $ Source + persister.read(this, new String(b)); // $ Alert } public void persisterRead12(Socket sock) throws Exception { Persister persister = new Persister(); byte[] b = new byte[] {}; - sock.getInputStream().read(b); - persister.read(this, new String(b), true); // $ hasTaintFlow + sock.getInputStream().read(b); // $ Source + persister.read(this, new String(b), true); // $ Alert } public void nodeBuilderRead1(Socket sock) throws Exception { - NodeBuilder.read(sock.getInputStream()); // $ hasTaintFlow + NodeBuilder.read(sock.getInputStream()); // $ Alert } public void nodeBuilderRead2(Socket sock) throws Exception { - NodeBuilder.read(new InputStreamReader(sock.getInputStream())); // $ hasTaintFlow + NodeBuilder.read(new InputStreamReader(sock.getInputStream())); // $ Alert } public void documentProviderProvide1(Socket sock) throws Exception { DocumentProvider provider = new DocumentProvider(); - provider.provide(sock.getInputStream()); // $ hasTaintFlow + provider.provide(sock.getInputStream()); // $ Alert } public void documentProviderProvide2(Socket sock) throws Exception { DocumentProvider provider = new DocumentProvider(); - provider.provide(new InputStreamReader(sock.getInputStream())); // $ hasTaintFlow + provider.provide(new InputStreamReader(sock.getInputStream())); // $ Alert } public void streamProviderProvide1(Socket sock) throws Exception { StreamProvider provider = new StreamProvider(); - provider.provide(sock.getInputStream()); // $ hasTaintFlow + provider.provide(sock.getInputStream()); // $ Alert } public void streamProviderProvide2(Socket sock) throws Exception { StreamProvider provider = new StreamProvider(); - provider.provide(new InputStreamReader(sock.getInputStream())); // $ hasTaintFlow + provider.provide(new InputStreamReader(sock.getInputStream())); // $ Alert } public void formatterFormat1(Socket sock) throws Exception { Formatter formatter = new Formatter(); byte[] b = new byte[] {}; - sock.getInputStream().read(b); - formatter.format(new String(b), null); // $ hasTaintFlow + sock.getInputStream().read(b); // $ Source + formatter.format(new String(b), null); // $ Alert } public void formatterFormat2(Socket sock) throws Exception { Formatter formatter = new Formatter(); byte[] b = new byte[] {}; - sock.getInputStream().read(b); - formatter.format(new String(b)); // $ hasTaintFlow + sock.getInputStream().read(b); // $ Source + formatter.format(new String(b)); // $ Alert } } diff --git a/java/ql/test/query-tests/security/CWE-611/TransformerTests.java b/java/ql/test/query-tests/security/CWE-611/TransformerTests.java index afba1790f0c..2ad0a29b358 100644 --- a/java/ql/test/query-tests/security/CWE-611/TransformerTests.java +++ b/java/ql/test/query-tests/security/CWE-611/TransformerTests.java @@ -17,8 +17,8 @@ public class TransformerTests { public void unconfiguredTransformerFactory(Socket sock) throws Exception { TransformerFactory tf = TransformerFactory.newInstance(); Transformer transformer = tf.newTransformer(); - transformer.transform(new StreamSource(sock.getInputStream()), null); // $ hasTaintFlow - tf.newTransformer(new StreamSource(sock.getInputStream())); // $ hasTaintFlow + transformer.transform(new StreamSource(sock.getInputStream()), null); // $ Alert + tf.newTransformer(new StreamSource(sock.getInputStream())); // $ Alert } public void safeTransformerFactory1(Socket sock) throws Exception { @@ -68,16 +68,16 @@ public class TransformerTests { TransformerFactory tf = TransformerFactory.newInstance(); tf.setAttribute(XMLConstants.ACCESS_EXTERNAL_DTD, ""); Transformer transformer = tf.newTransformer(); - transformer.transform(new StreamSource(sock.getInputStream()), null); // $ hasTaintFlow - tf.newTransformer(new StreamSource(sock.getInputStream())); // $ hasTaintFlow + transformer.transform(new StreamSource(sock.getInputStream()), null); // $ Alert + tf.newTransformer(new StreamSource(sock.getInputStream())); // $ Alert } public void partialConfiguredTransformerFactory2(Socket sock) throws Exception { TransformerFactory tf = TransformerFactory.newInstance(); tf.setAttribute(XMLConstants.ACCESS_EXTERNAL_STYLESHEET, ""); Transformer transformer = tf.newTransformer(); - transformer.transform(new StreamSource(sock.getInputStream()), null); // $ hasTaintFlow - tf.newTransformer(new StreamSource(sock.getInputStream())); // $ hasTaintFlow + transformer.transform(new StreamSource(sock.getInputStream()), null); // $ Alert + tf.newTransformer(new StreamSource(sock.getInputStream())); // $ Alert } public void misConfiguredTransformerFactory1(Socket sock) throws Exception { @@ -85,8 +85,8 @@ public class TransformerTests { Transformer transformer = tf.newTransformer(); tf.setAttribute(XMLConstants.ACCESS_EXTERNAL_DTD, "ab"); tf.setAttribute(XMLConstants.ACCESS_EXTERNAL_STYLESHEET, ""); - transformer.transform(new StreamSource(sock.getInputStream()), null); // $ hasTaintFlow - tf.newTransformer(new StreamSource(sock.getInputStream())); // $ hasTaintFlow + transformer.transform(new StreamSource(sock.getInputStream()), null); // $ Alert + tf.newTransformer(new StreamSource(sock.getInputStream())); // $ Alert } public void misConfiguredTransformerFactory2(Socket sock) throws Exception { @@ -94,13 +94,13 @@ public class TransformerTests { Transformer transformer = tf.newTransformer(); tf.setAttribute(XMLConstants.ACCESS_EXTERNAL_DTD, ""); tf.setAttribute(XMLConstants.ACCESS_EXTERNAL_STYLESHEET, "cd"); - transformer.transform(new StreamSource(sock.getInputStream()), null); // $ hasTaintFlow - tf.newTransformer(new StreamSource(sock.getInputStream())); // $ hasTaintFlow + transformer.transform(new StreamSource(sock.getInputStream()), null); // $ Alert + tf.newTransformer(new StreamSource(sock.getInputStream())); // $ Alert } public void unconfiguredSAXTransformerFactory(Socket sock) throws Exception { SAXTransformerFactory sf = (SAXTransformerFactory) SAXTransformerFactory.newInstance(); - sf.newXMLFilter(new StreamSource(sock.getInputStream())); // $ hasTaintFlow + sf.newXMLFilter(new StreamSource(sock.getInputStream())); // $ Alert } public void safeSAXTransformerFactory(Socket sock) throws Exception { @@ -113,31 +113,31 @@ public class TransformerTests { public void partialConfiguredSAXTransformerFactory1(Socket sock) throws Exception { SAXTransformerFactory sf = (SAXTransformerFactory) SAXTransformerFactory.newInstance(); sf.setAttribute(XMLConstants.ACCESS_EXTERNAL_DTD, ""); - sf.newXMLFilter(new StreamSource(sock.getInputStream())); // $ hasTaintFlow + sf.newXMLFilter(new StreamSource(sock.getInputStream())); // $ Alert } public void partialConfiguredSAXTransformerFactory2(Socket sock) throws Exception { SAXTransformerFactory sf = (SAXTransformerFactory) SAXTransformerFactory.newInstance(); sf.setAttribute(XMLConstants.ACCESS_EXTERNAL_STYLESHEET, ""); - sf.newXMLFilter(new StreamSource(sock.getInputStream())); // $ hasTaintFlow + sf.newXMLFilter(new StreamSource(sock.getInputStream())); // $ Alert } public void misConfiguredSAXTransformerFactory1(Socket sock) throws Exception { SAXTransformerFactory sf = (SAXTransformerFactory) SAXTransformerFactory.newInstance(); sf.setAttribute(XMLConstants.ACCESS_EXTERNAL_DTD, "ab"); sf.setAttribute(XMLConstants.ACCESS_EXTERNAL_STYLESHEET, ""); - sf.newXMLFilter(new StreamSource(sock.getInputStream())); // $ hasTaintFlow + sf.newXMLFilter(new StreamSource(sock.getInputStream())); // $ Alert } public void misConfiguredSAXTransformerFactory2(Socket sock) throws Exception { SAXTransformerFactory sf = (SAXTransformerFactory) SAXTransformerFactory.newInstance(); sf.setAttribute(XMLConstants.ACCESS_EXTERNAL_DTD, ""); sf.setAttribute(XMLConstants.ACCESS_EXTERNAL_STYLESHEET, "cd"); - sf.newXMLFilter(new StreamSource(sock.getInputStream())); // $ hasTaintFlow + sf.newXMLFilter(new StreamSource(sock.getInputStream())); // $ Alert } public void taintedSAXSource(Socket sock) throws Exception { SAXTransformerFactory sf = (SAXTransformerFactory) SAXTransformerFactory.newInstance(); - sf.newXMLFilter(new SAXSource(new InputSource(sock.getInputStream()))); // $ hasTaintFlow + sf.newXMLFilter(new SAXSource(new InputSource(sock.getInputStream()))); // $ Alert } } diff --git a/java/ql/test/query-tests/security/CWE-611/UnmarshallerTests.java b/java/ql/test/query-tests/security/CWE-611/UnmarshallerTests.java index 54efa567aa3..7516c08c7d3 100644 --- a/java/ql/test/query-tests/security/CWE-611/UnmarshallerTests.java +++ b/java/ql/test/query-tests/security/CWE-611/UnmarshallerTests.java @@ -26,6 +26,6 @@ public class UnmarshallerTests { SAXParserFactory spf = SAXParserFactory.newInstance(); JAXBContext jc = JAXBContext.newInstance(Object.class); Unmarshaller um = jc.createUnmarshaller(); - um.unmarshal(sock.getInputStream()); // $ hasTaintFlow + um.unmarshal(sock.getInputStream()); // $ Alert } } diff --git a/java/ql/test/query-tests/security/CWE-611/ValidatorTests.java b/java/ql/test/query-tests/security/CWE-611/ValidatorTests.java index 091be21676a..1464b9c5fc6 100644 --- a/java/ql/test/query-tests/security/CWE-611/ValidatorTests.java +++ b/java/ql/test/query-tests/security/CWE-611/ValidatorTests.java @@ -14,12 +14,12 @@ public class ValidatorTests { @PostMapping(value = "bad") public void bad2(HttpServletRequest request) throws Exception { - ServletInputStream servletInputStream = request.getInputStream(); + ServletInputStream servletInputStream = request.getInputStream(); // $ Source SchemaFactory factory = SchemaFactory.newInstance("http://www.w3.org/2001/XMLSchema"); Schema schema = factory.newSchema(); Validator validator = schema.newValidator(); StreamSource source = new StreamSource(servletInputStream); - validator.validate(source); // $ hasTaintFlow + validator.validate(source); // $ Alert } @PostMapping(value = "good") diff --git a/java/ql/test/query-tests/security/CWE-611/XMLDecoderTests.java b/java/ql/test/query-tests/security/CWE-611/XMLDecoderTests.java index 8e75ebc1401..a9ced49512e 100644 --- a/java/ql/test/query-tests/security/CWE-611/XMLDecoderTests.java +++ b/java/ql/test/query-tests/security/CWE-611/XMLDecoderTests.java @@ -13,9 +13,9 @@ public class XMLDecoderTests { @PostMapping(value = "bad") public void bad3(HttpServletRequest request) throws Exception { - ServletInputStream servletInputStream = request.getInputStream(); + ServletInputStream servletInputStream = request.getInputStream(); // $ Source XMLDecoder xmlDecoder = new XMLDecoder(servletInputStream); - xmlDecoder.readObject(); // $ hasTaintFlow + xmlDecoder.readObject(); // $ Alert } @PostMapping(value = "good") diff --git a/java/ql/test/query-tests/security/CWE-611/XMLReaderTests.java b/java/ql/test/query-tests/security/CWE-611/XMLReaderTests.java index 15536b766b7..7cc09df7763 100644 --- a/java/ql/test/query-tests/security/CWE-611/XMLReaderTests.java +++ b/java/ql/test/query-tests/security/CWE-611/XMLReaderTests.java @@ -13,7 +13,7 @@ public class XMLReaderTests { public void unconfiguredReader(Socket sock) throws Exception { XMLReader reader = XMLReaderFactory.createXMLReader(); - reader.parse(new InputSource(sock.getInputStream())); // $ hasTaintFlow + reader.parse(new InputSource(sock.getInputStream())); // $ Alert } public void safeReaderFromConfig1(Socket sock) throws Exception { @@ -53,21 +53,21 @@ public class XMLReaderTests { XMLReader reader = XMLReaderFactory.createXMLReader(); reader.setFeature("http://xml.org/sax/features/external-general-entities", false); reader.setFeature("http://xml.org/sax/features/external-parameter-entities", false); - reader.parse(new InputSource(sock.getInputStream())); // $ hasTaintFlow + reader.parse(new InputSource(sock.getInputStream())); // $ Alert } public void partialConfiguredXMLReader2(Socket sock) throws Exception { XMLReader reader = XMLReaderFactory.createXMLReader(); reader.setFeature("http://xml.org/sax/features/external-general-entities", false); reader.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false); - reader.parse(new InputSource(sock.getInputStream())); // $ hasTaintFlow + reader.parse(new InputSource(sock.getInputStream())); // $ Alert } public void partilaConfiguredXMLReader3(Socket sock) throws Exception { XMLReader reader = XMLReaderFactory.createXMLReader(); reader.setFeature("http://xml.org/sax/features/external-parameter-entities", false); reader.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false); - reader.parse(new InputSource(sock.getInputStream())); // $ hasTaintFlow + reader.parse(new InputSource(sock.getInputStream())); // $ Alert } public void misConfiguredXMLReader1(Socket sock) throws Exception { @@ -75,7 +75,7 @@ public class XMLReaderTests { reader.setFeature("http://xml.org/sax/features/external-general-entities", true); reader.setFeature("http://xml.org/sax/features/external-parameter-entities", false); reader.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false); - reader.parse(new InputSource(sock.getInputStream())); // $ hasTaintFlow + reader.parse(new InputSource(sock.getInputStream())); // $ Alert } public void misConfiguredXMLReader2(Socket sock) throws Exception { @@ -83,7 +83,7 @@ public class XMLReaderTests { reader.setFeature("http://xml.org/sax/features/external-general-entities", false); reader.setFeature("http://xml.org/sax/features/external-parameter-entities", true); reader.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false); - reader.parse(new InputSource(sock.getInputStream())); // $ hasTaintFlow + reader.parse(new InputSource(sock.getInputStream())); // $ Alert } public void misConfiguredXMLReader3(Socket sock) throws Exception { @@ -91,12 +91,12 @@ public class XMLReaderTests { reader.setFeature("http://xml.org/sax/features/external-general-entities", false); reader.setFeature("http://xml.org/sax/features/external-parameter-entities", false); reader.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", true); - reader.parse(new InputSource(sock.getInputStream())); // $ hasTaintFlow + reader.parse(new InputSource(sock.getInputStream())); // $ Alert } public void misConfiguredXMLReader4(Socket sock) throws Exception { XMLReader reader = XMLReaderFactory.createXMLReader(); reader.setFeature("http://apache.org/xml/features/disallow-doctype-decl", false); - reader.parse(new InputSource(sock.getInputStream())); // $ hasTaintFlow + reader.parse(new InputSource(sock.getInputStream())); // $ Alert } } diff --git a/java/ql/test/query-tests/security/CWE-611/XPathExpressionTests.java b/java/ql/test/query-tests/security/CWE-611/XPathExpressionTests.java index 088fdb9afd6..646222545d7 100644 --- a/java/ql/test/query-tests/security/CWE-611/XPathExpressionTests.java +++ b/java/ql/test/query-tests/security/CWE-611/XPathExpressionTests.java @@ -24,7 +24,7 @@ public class XPathExpressionTests { XPathFactory xFactory = XPathFactory.newInstance(); XPath path = xFactory.newXPath(); XPathExpression expr = path.compile(""); - expr.evaluate(new InputSource(sock.getInputStream())); // $ hasTaintFlow + expr.evaluate(new InputSource(sock.getInputStream())); // $ Alert } public void safeXPathEvaluateTest(Socket sock) throws Exception { @@ -39,6 +39,6 @@ public class XPathExpressionTests { public void unsafeXPathEvaluateTest(Socket sock) throws Exception { XPathFactory xFactory = XPathFactory.newInstance(); XPath path = xFactory.newXPath(); - path.evaluate("", new InputSource(sock.getInputStream())); // $ hasTaintFlow + path.evaluate("", new InputSource(sock.getInputStream())); // $ Alert } } diff --git a/java/ql/test/query-tests/security/CWE-611/XXE.expected b/java/ql/test/query-tests/security/CWE-611/XXE.expected index e69de29bb2d..463ea4ec872 100644 --- a/java/ql/test/query-tests/security/CWE-611/XXE.expected +++ b/java/ql/test/query-tests/security/CWE-611/XXE.expected @@ -0,0 +1,428 @@ +#select +| CdaUtilTests.java:12:22:12:23 | is | CdaUtilTests.java:10:26:10:46 | getInputStream(...) : InputStream | CdaUtilTests.java:12:22:12:23 | is | XML parsing depends on a $@ without guarding against external entity expansion. | CdaUtilTests.java:10:26:10:46 | getInputStream(...) | user-provided value | +| CdaUtilTests.java:13:22:13:25 | iSrc | CdaUtilTests.java:10:26:10:46 | getInputStream(...) : InputStream | CdaUtilTests.java:13:22:13:25 | iSrc | XML parsing depends on a $@ without guarding against external entity expansion. | CdaUtilTests.java:10:26:10:46 | getInputStream(...) | user-provided value | +| CdaUtilTests.java:14:22:14:23 | is | CdaUtilTests.java:10:26:10:46 | getInputStream(...) : InputStream | CdaUtilTests.java:14:22:14:23 | is | XML parsing depends on a $@ without guarding against external entity expansion. | CdaUtilTests.java:10:26:10:46 | getInputStream(...) | user-provided value | +| CdaUtilTests.java:15:22:15:23 | is | CdaUtilTests.java:10:26:10:46 | getInputStream(...) : InputStream | CdaUtilTests.java:15:22:15:23 | is | XML parsing depends on a $@ without guarding against external entity expansion. | CdaUtilTests.java:10:26:10:46 | getInputStream(...) | user-provided value | +| CdaUtilTests.java:16:34:16:35 | is | CdaUtilTests.java:10:26:10:46 | getInputStream(...) : InputStream | CdaUtilTests.java:16:34:16:35 | is | XML parsing depends on a $@ without guarding against external entity expansion. | CdaUtilTests.java:10:26:10:46 | getInputStream(...) | user-provided value | +| CdaUtilTests.java:17:22:17:25 | iSrc | CdaUtilTests.java:10:26:10:46 | getInputStream(...) : InputStream | CdaUtilTests.java:17:22:17:25 | iSrc | XML parsing depends on a $@ without guarding against external entity expansion. | CdaUtilTests.java:10:26:10:46 | getInputStream(...) | user-provided value | +| CdaUtilTests.java:18:22:18:25 | iSrc | CdaUtilTests.java:10:26:10:46 | getInputStream(...) : InputStream | CdaUtilTests.java:18:22:18:25 | iSrc | XML parsing depends on a $@ without guarding against external entity expansion. | CdaUtilTests.java:10:26:10:46 | getInputStream(...) | user-provided value | +| CdaUtilTests.java:19:34:19:37 | iSrc | CdaUtilTests.java:10:26:10:46 | getInputStream(...) : InputStream | CdaUtilTests.java:19:34:19:37 | iSrc | XML parsing depends on a $@ without guarding against external entity expansion. | CdaUtilTests.java:10:26:10:46 | getInputStream(...) | user-provided value | +| CdaUtilTests.java:20:24:20:25 | is | CdaUtilTests.java:10:26:10:46 | getInputStream(...) : InputStream | CdaUtilTests.java:20:24:20:25 | is | XML parsing depends on a $@ without guarding against external entity expansion. | CdaUtilTests.java:10:26:10:46 | getInputStream(...) | user-provided value | +| CdaUtilTests.java:21:24:21:25 | is | CdaUtilTests.java:10:26:10:46 | getInputStream(...) : InputStream | CdaUtilTests.java:21:24:21:25 | is | XML parsing depends on a $@ without guarding against external entity expansion. | CdaUtilTests.java:10:26:10:46 | getInputStream(...) | user-provided value | +| DigesterTests.java:16:24:16:41 | servletInputStream | DigesterTests.java:14:49:14:72 | getInputStream(...) : ServletInputStream | DigesterTests.java:16:24:16:41 | servletInputStream | XML parsing depends on a $@ without guarding against external entity expansion. | DigesterTests.java:14:49:14:72 | getInputStream(...) | user-provided value | +| DocumentBuilderTests.java:14:19:14:39 | getInputStream(...) | DocumentBuilderTests.java:14:19:14:39 | getInputStream(...) | DocumentBuilderTests.java:14:19:14:39 | getInputStream(...) | XML parsing depends on a $@ without guarding against external entity expansion. | DocumentBuilderTests.java:14:19:14:39 | getInputStream(...) | user-provided value | +| DocumentBuilderTests.java:28:19:28:39 | getInputStream(...) | DocumentBuilderTests.java:28:19:28:39 | getInputStream(...) | DocumentBuilderTests.java:28:19:28:39 | getInputStream(...) | XML parsing depends on a $@ without guarding against external entity expansion. | DocumentBuilderTests.java:28:19:28:39 | getInputStream(...) | user-provided value | +| DocumentBuilderTests.java:36:19:36:39 | getInputStream(...) | DocumentBuilderTests.java:36:19:36:39 | getInputStream(...) | DocumentBuilderTests.java:36:19:36:39 | getInputStream(...) | XML parsing depends on a $@ without guarding against external entity expansion. | DocumentBuilderTests.java:36:19:36:39 | getInputStream(...) | user-provided value | +| DocumentBuilderTests.java:44:19:44:39 | getInputStream(...) | DocumentBuilderTests.java:44:19:44:39 | getInputStream(...) | DocumentBuilderTests.java:44:19:44:39 | getInputStream(...) | XML parsing depends on a $@ without guarding against external entity expansion. | DocumentBuilderTests.java:44:19:44:39 | getInputStream(...) | user-provided value | +| DocumentBuilderTests.java:51:19:51:39 | getInputStream(...) | DocumentBuilderTests.java:51:19:51:39 | getInputStream(...) | DocumentBuilderTests.java:51:19:51:39 | getInputStream(...) | XML parsing depends on a $@ without guarding against external entity expansion. | DocumentBuilderTests.java:51:19:51:39 | getInputStream(...) | user-provided value | +| DocumentBuilderTests.java:66:19:66:39 | getInputStream(...) | DocumentBuilderTests.java:66:19:66:39 | getInputStream(...) | DocumentBuilderTests.java:66:19:66:39 | getInputStream(...) | XML parsing depends on a $@ without guarding against external entity expansion. | DocumentBuilderTests.java:66:19:66:39 | getInputStream(...) | user-provided value | +| DocumentBuilderTests.java:73:19:73:39 | getInputStream(...) | DocumentBuilderTests.java:73:19:73:39 | getInputStream(...) | DocumentBuilderTests.java:73:19:73:39 | getInputStream(...) | XML parsing depends on a $@ without guarding against external entity expansion. | DocumentBuilderTests.java:73:19:73:39 | getInputStream(...) | user-provided value | +| DocumentBuilderTests.java:81:19:81:39 | getInputStream(...) | DocumentBuilderTests.java:81:19:81:39 | getInputStream(...) | DocumentBuilderTests.java:81:19:81:39 | getInputStream(...) | XML parsing depends on a $@ without guarding against external entity expansion. | DocumentBuilderTests.java:81:19:81:39 | getInputStream(...) | user-provided value | +| DocumentBuilderTests.java:89:19:89:39 | getInputStream(...) | DocumentBuilderTests.java:89:19:89:39 | getInputStream(...) | DocumentBuilderTests.java:89:19:89:39 | getInputStream(...) | XML parsing depends on a $@ without guarding against external entity expansion. | DocumentBuilderTests.java:89:19:89:39 | getInputStream(...) | user-provided value | +| DocumentBuilderTests.java:96:19:96:41 | getInputSource(...) | DocumentBuilderTests.java:95:54:95:74 | getInputStream(...) : InputStream | DocumentBuilderTests.java:96:19:96:41 | getInputSource(...) | XML parsing depends on a $@ without guarding against external entity expansion. | DocumentBuilderTests.java:95:54:95:74 | getInputStream(...) | user-provided value | +| DocumentBuilderTests.java:103:19:103:55 | sourceToInputSource(...) | DocumentBuilderTests.java:102:44:102:64 | getInputStream(...) : InputStream | DocumentBuilderTests.java:103:19:103:55 | sourceToInputSource(...) | XML parsing depends on a $@ without guarding against external entity expansion. | DocumentBuilderTests.java:102:44:102:64 | getInputStream(...) | user-provided value | +| DocumentBuilderTests.java:104:19:104:41 | getInputStream(...) | DocumentBuilderTests.java:102:44:102:64 | getInputStream(...) : InputStream | DocumentBuilderTests.java:104:19:104:41 | getInputStream(...) | XML parsing depends on a $@ without guarding against external entity expansion. | DocumentBuilderTests.java:102:44:102:64 | getInputStream(...) | user-provided value | +| ParserHelperTests.java:12:55:12:78 | getInputStream(...) | ParserHelperTests.java:12:55:12:78 | getInputStream(...) | ParserHelperTests.java:12:55:12:78 | getInputStream(...) | XML parsing depends on a $@ without guarding against external entity expansion. | ParserHelperTests.java:12:55:12:78 | getInputStream(...) | user-provided value | +| SAXBuilderTests.java:8:19:8:39 | getInputStream(...) | SAXBuilderTests.java:8:19:8:39 | getInputStream(...) | SAXBuilderTests.java:8:19:8:39 | getInputStream(...) | XML parsing depends on a $@ without guarding against external entity expansion. | SAXBuilderTests.java:8:19:8:39 | getInputStream(...) | user-provided value | +| SAXBuilderTests.java:20:19:20:39 | getInputStream(...) | SAXBuilderTests.java:20:19:20:39 | getInputStream(...) | SAXBuilderTests.java:20:19:20:39 | getInputStream(...) | XML parsing depends on a $@ without guarding against external entity expansion. | SAXBuilderTests.java:20:19:20:39 | getInputStream(...) | user-provided value | +| SAXParserTests.java:13:18:13:38 | getInputStream(...) | SAXParserTests.java:13:18:13:38 | getInputStream(...) | SAXParserTests.java:13:18:13:38 | getInputStream(...) | XML parsing depends on a $@ without guarding against external entity expansion. | SAXParserTests.java:13:18:13:38 | getInputStream(...) | user-provided value | +| SAXParserTests.java:30:18:30:38 | getInputStream(...) | SAXParserTests.java:30:18:30:38 | getInputStream(...) | SAXParserTests.java:30:18:30:38 | getInputStream(...) | XML parsing depends on a $@ without guarding against external entity expansion. | SAXParserTests.java:30:18:30:38 | getInputStream(...) | user-provided value | +| SAXParserTests.java:38:18:38:38 | getInputStream(...) | SAXParserTests.java:38:18:38:38 | getInputStream(...) | SAXParserTests.java:38:18:38:38 | getInputStream(...) | XML parsing depends on a $@ without guarding against external entity expansion. | SAXParserTests.java:38:18:38:38 | getInputStream(...) | user-provided value | +| SAXParserTests.java:46:18:46:38 | getInputStream(...) | SAXParserTests.java:46:18:46:38 | getInputStream(...) | SAXParserTests.java:46:18:46:38 | getInputStream(...) | XML parsing depends on a $@ without guarding against external entity expansion. | SAXParserTests.java:46:18:46:38 | getInputStream(...) | user-provided value | +| SAXParserTests.java:55:18:55:38 | getInputStream(...) | SAXParserTests.java:55:18:55:38 | getInputStream(...) | SAXParserTests.java:55:18:55:38 | getInputStream(...) | XML parsing depends on a $@ without guarding against external entity expansion. | SAXParserTests.java:55:18:55:38 | getInputStream(...) | user-provided value | +| SAXParserTests.java:64:18:64:38 | getInputStream(...) | SAXParserTests.java:64:18:64:38 | getInputStream(...) | SAXParserTests.java:64:18:64:38 | getInputStream(...) | XML parsing depends on a $@ without guarding against external entity expansion. | SAXParserTests.java:64:18:64:38 | getInputStream(...) | user-provided value | +| SAXParserTests.java:73:18:73:38 | getInputStream(...) | SAXParserTests.java:73:18:73:38 | getInputStream(...) | SAXParserTests.java:73:18:73:38 | getInputStream(...) | XML parsing depends on a $@ without guarding against external entity expansion. | SAXParserTests.java:73:18:73:38 | getInputStream(...) | user-provided value | +| SAXReaderTests.java:8:17:8:37 | getInputStream(...) | SAXReaderTests.java:8:17:8:37 | getInputStream(...) | SAXReaderTests.java:8:17:8:37 | getInputStream(...) | XML parsing depends on a $@ without guarding against external entity expansion. | SAXReaderTests.java:8:17:8:37 | getInputStream(...) | user-provided value | +| SAXReaderTests.java:23:17:23:37 | getInputStream(...) | SAXReaderTests.java:23:17:23:37 | getInputStream(...) | SAXReaderTests.java:23:17:23:37 | getInputStream(...) | XML parsing depends on a $@ without guarding against external entity expansion. | SAXReaderTests.java:23:17:23:37 | getInputStream(...) | user-provided value | +| SAXReaderTests.java:30:17:30:37 | getInputStream(...) | SAXReaderTests.java:30:17:30:37 | getInputStream(...) | SAXReaderTests.java:30:17:30:37 | getInputStream(...) | XML parsing depends on a $@ without guarding against external entity expansion. | SAXReaderTests.java:30:17:30:37 | getInputStream(...) | user-provided value | +| SAXReaderTests.java:37:17:37:37 | getInputStream(...) | SAXReaderTests.java:37:17:37:37 | getInputStream(...) | SAXReaderTests.java:37:17:37:37 | getInputStream(...) | XML parsing depends on a $@ without guarding against external entity expansion. | SAXReaderTests.java:37:17:37:37 | getInputStream(...) | user-provided value | +| SAXReaderTests.java:45:17:45:37 | getInputStream(...) | SAXReaderTests.java:45:17:45:37 | getInputStream(...) | SAXReaderTests.java:45:17:45:37 | getInputStream(...) | XML parsing depends on a $@ without guarding against external entity expansion. | SAXReaderTests.java:45:17:45:37 | getInputStream(...) | user-provided value | +| SAXReaderTests.java:53:17:53:37 | getInputStream(...) | SAXReaderTests.java:53:17:53:37 | getInputStream(...) | SAXReaderTests.java:53:17:53:37 | getInputStream(...) | XML parsing depends on a $@ without guarding against external entity expansion. | SAXReaderTests.java:53:17:53:37 | getInputStream(...) | user-provided value | +| SAXReaderTests.java:61:17:61:37 | getInputStream(...) | SAXReaderTests.java:61:17:61:37 | getInputStream(...) | SAXReaderTests.java:61:17:61:37 | getInputStream(...) | XML parsing depends on a $@ without guarding against external entity expansion. | SAXReaderTests.java:61:17:61:37 | getInputStream(...) | user-provided value | +| SAXSourceTests.java:20:18:20:23 | source | SAXSourceTests.java:17:62:17:82 | getInputStream(...) : InputStream | SAXSourceTests.java:20:18:20:23 | source | XML parsing depends on a $@ without guarding against external entity expansion. | SAXSourceTests.java:17:62:17:82 | getInputStream(...) | user-provided value | +| SchemaTests.java:12:39:12:77 | new StreamSource(...) | SchemaTests.java:12:56:12:76 | getInputStream(...) : InputStream | SchemaTests.java:12:39:12:77 | new StreamSource(...) | XML parsing depends on a $@ without guarding against external entity expansion. | SchemaTests.java:12:56:12:76 | getInputStream(...) | user-provided value | +| SchemaTests.java:25:39:25:77 | new StreamSource(...) | SchemaTests.java:25:56:25:76 | getInputStream(...) : InputStream | SchemaTests.java:25:39:25:77 | new StreamSource(...) | XML parsing depends on a $@ without guarding against external entity expansion. | SchemaTests.java:25:56:25:76 | getInputStream(...) | user-provided value | +| SchemaTests.java:31:39:31:77 | new StreamSource(...) | SchemaTests.java:31:56:31:76 | getInputStream(...) : InputStream | SchemaTests.java:31:39:31:77 | new StreamSource(...) | XML parsing depends on a $@ without guarding against external entity expansion. | SchemaTests.java:31:56:31:76 | getInputStream(...) | user-provided value | +| SchemaTests.java:38:39:38:77 | new StreamSource(...) | SchemaTests.java:38:56:38:76 | getInputStream(...) : InputStream | SchemaTests.java:38:39:38:77 | new StreamSource(...) | XML parsing depends on a $@ without guarding against external entity expansion. | SchemaTests.java:38:56:38:76 | getInputStream(...) | user-provided value | +| SchemaTests.java:45:39:45:77 | new StreamSource(...) | SchemaTests.java:45:56:45:76 | getInputStream(...) : InputStream | SchemaTests.java:45:39:45:77 | new StreamSource(...) | XML parsing depends on a $@ without guarding against external entity expansion. | SchemaTests.java:45:56:45:76 | getInputStream(...) | user-provided value | +| SimpleXMLTests.java:14:41:14:61 | getInputStream(...) | SimpleXMLTests.java:14:41:14:61 | getInputStream(...) | SimpleXMLTests.java:14:41:14:61 | getInputStream(...) | XML parsing depends on a $@ without guarding against external entity expansion. | SimpleXMLTests.java:14:41:14:61 | getInputStream(...) | user-provided value | +| SimpleXMLTests.java:19:41:19:61 | getInputStream(...) | SimpleXMLTests.java:19:41:19:61 | getInputStream(...) | SimpleXMLTests.java:19:41:19:61 | getInputStream(...) | XML parsing depends on a $@ without guarding against external entity expansion. | SimpleXMLTests.java:19:41:19:61 | getInputStream(...) | user-provided value | +| SimpleXMLTests.java:24:41:24:84 | new InputStreamReader(...) | SimpleXMLTests.java:24:63:24:83 | getInputStream(...) : InputStream | SimpleXMLTests.java:24:41:24:84 | new InputStreamReader(...) | XML parsing depends on a $@ without guarding against external entity expansion. | SimpleXMLTests.java:24:63:24:83 | getInputStream(...) | user-provided value | +| SimpleXMLTests.java:31:41:31:53 | new String(...) | SimpleXMLTests.java:30:5:30:25 | getInputStream(...) : InputStream | SimpleXMLTests.java:31:41:31:53 | new String(...) | XML parsing depends on a $@ without guarding against external entity expansion. | SimpleXMLTests.java:30:5:30:25 | getInputStream(...) | user-provided value | +| SimpleXMLTests.java:38:41:38:53 | new String(...) | SimpleXMLTests.java:37:5:37:25 | getInputStream(...) : InputStream | SimpleXMLTests.java:38:41:38:53 | new String(...) | XML parsing depends on a $@ without guarding against external entity expansion. | SimpleXMLTests.java:37:5:37:25 | getInputStream(...) | user-provided value | +| SimpleXMLTests.java:43:41:43:84 | new InputStreamReader(...) | SimpleXMLTests.java:43:63:43:83 | getInputStream(...) : InputStream | SimpleXMLTests.java:43:41:43:84 | new InputStreamReader(...) | XML parsing depends on a $@ without guarding against external entity expansion. | SimpleXMLTests.java:43:63:43:83 | getInputStream(...) | user-provided value | +| SimpleXMLTests.java:48:37:48:57 | getInputStream(...) | SimpleXMLTests.java:48:37:48:57 | getInputStream(...) | SimpleXMLTests.java:48:37:48:57 | getInputStream(...) | XML parsing depends on a $@ without guarding against external entity expansion. | SimpleXMLTests.java:48:37:48:57 | getInputStream(...) | user-provided value | +| SimpleXMLTests.java:53:37:53:57 | getInputStream(...) | SimpleXMLTests.java:53:37:53:57 | getInputStream(...) | SimpleXMLTests.java:53:37:53:57 | getInputStream(...) | XML parsing depends on a $@ without guarding against external entity expansion. | SimpleXMLTests.java:53:37:53:57 | getInputStream(...) | user-provided value | +| SimpleXMLTests.java:58:26:58:46 | getInputStream(...) | SimpleXMLTests.java:58:26:58:46 | getInputStream(...) | SimpleXMLTests.java:58:26:58:46 | getInputStream(...) | XML parsing depends on a $@ without guarding against external entity expansion. | SimpleXMLTests.java:58:26:58:46 | getInputStream(...) | user-provided value | +| SimpleXMLTests.java:63:26:63:46 | getInputStream(...) | SimpleXMLTests.java:63:26:63:46 | getInputStream(...) | SimpleXMLTests.java:63:26:63:46 | getInputStream(...) | XML parsing depends on a $@ without guarding against external entity expansion. | SimpleXMLTests.java:63:26:63:46 | getInputStream(...) | user-provided value | +| SimpleXMLTests.java:68:37:68:80 | new InputStreamReader(...) | SimpleXMLTests.java:68:59:68:79 | getInputStream(...) : InputStream | SimpleXMLTests.java:68:37:68:80 | new InputStreamReader(...) | XML parsing depends on a $@ without guarding against external entity expansion. | SimpleXMLTests.java:68:59:68:79 | getInputStream(...) | user-provided value | +| SimpleXMLTests.java:73:37:73:80 | new InputStreamReader(...) | SimpleXMLTests.java:73:59:73:79 | getInputStream(...) : InputStream | SimpleXMLTests.java:73:37:73:80 | new InputStreamReader(...) | XML parsing depends on a $@ without guarding against external entity expansion. | SimpleXMLTests.java:73:59:73:79 | getInputStream(...) | user-provided value | +| SimpleXMLTests.java:78:26:78:69 | new InputStreamReader(...) | SimpleXMLTests.java:78:48:78:68 | getInputStream(...) : InputStream | SimpleXMLTests.java:78:26:78:69 | new InputStreamReader(...) | XML parsing depends on a $@ without guarding against external entity expansion. | SimpleXMLTests.java:78:48:78:68 | getInputStream(...) | user-provided value | +| SimpleXMLTests.java:83:26:83:69 | new InputStreamReader(...) | SimpleXMLTests.java:83:48:83:68 | getInputStream(...) : InputStream | SimpleXMLTests.java:83:26:83:69 | new InputStreamReader(...) | XML parsing depends on a $@ without guarding against external entity expansion. | SimpleXMLTests.java:83:48:83:68 | getInputStream(...) | user-provided value | +| SimpleXMLTests.java:90:37:90:49 | new String(...) | SimpleXMLTests.java:89:5:89:25 | getInputStream(...) : InputStream | SimpleXMLTests.java:90:37:90:49 | new String(...) | XML parsing depends on a $@ without guarding against external entity expansion. | SimpleXMLTests.java:89:5:89:25 | getInputStream(...) | user-provided value | +| SimpleXMLTests.java:97:37:97:49 | new String(...) | SimpleXMLTests.java:96:5:96:25 | getInputStream(...) : InputStream | SimpleXMLTests.java:97:37:97:49 | new String(...) | XML parsing depends on a $@ without guarding against external entity expansion. | SimpleXMLTests.java:96:5:96:25 | getInputStream(...) | user-provided value | +| SimpleXMLTests.java:104:26:104:38 | new String(...) | SimpleXMLTests.java:103:5:103:25 | getInputStream(...) : InputStream | SimpleXMLTests.java:104:26:104:38 | new String(...) | XML parsing depends on a $@ without guarding against external entity expansion. | SimpleXMLTests.java:103:5:103:25 | getInputStream(...) | user-provided value | +| SimpleXMLTests.java:111:26:111:38 | new String(...) | SimpleXMLTests.java:110:5:110:25 | getInputStream(...) : InputStream | SimpleXMLTests.java:111:26:111:38 | new String(...) | XML parsing depends on a $@ without guarding against external entity expansion. | SimpleXMLTests.java:110:5:110:25 | getInputStream(...) | user-provided value | +| SimpleXMLTests.java:115:22:115:42 | getInputStream(...) | SimpleXMLTests.java:115:22:115:42 | getInputStream(...) | SimpleXMLTests.java:115:22:115:42 | getInputStream(...) | XML parsing depends on a $@ without guarding against external entity expansion. | SimpleXMLTests.java:115:22:115:42 | getInputStream(...) | user-provided value | +| SimpleXMLTests.java:119:22:119:65 | new InputStreamReader(...) | SimpleXMLTests.java:119:44:119:64 | getInputStream(...) : InputStream | SimpleXMLTests.java:119:22:119:65 | new InputStreamReader(...) | XML parsing depends on a $@ without guarding against external entity expansion. | SimpleXMLTests.java:119:44:119:64 | getInputStream(...) | user-provided value | +| SimpleXMLTests.java:124:22:124:42 | getInputStream(...) | SimpleXMLTests.java:124:22:124:42 | getInputStream(...) | SimpleXMLTests.java:124:22:124:42 | getInputStream(...) | XML parsing depends on a $@ without guarding against external entity expansion. | SimpleXMLTests.java:124:22:124:42 | getInputStream(...) | user-provided value | +| SimpleXMLTests.java:129:22:129:65 | new InputStreamReader(...) | SimpleXMLTests.java:129:44:129:64 | getInputStream(...) : InputStream | SimpleXMLTests.java:129:22:129:65 | new InputStreamReader(...) | XML parsing depends on a $@ without guarding against external entity expansion. | SimpleXMLTests.java:129:44:129:64 | getInputStream(...) | user-provided value | +| SimpleXMLTests.java:134:22:134:42 | getInputStream(...) | SimpleXMLTests.java:134:22:134:42 | getInputStream(...) | SimpleXMLTests.java:134:22:134:42 | getInputStream(...) | XML parsing depends on a $@ without guarding against external entity expansion. | SimpleXMLTests.java:134:22:134:42 | getInputStream(...) | user-provided value | +| SimpleXMLTests.java:139:22:139:65 | new InputStreamReader(...) | SimpleXMLTests.java:139:44:139:64 | getInputStream(...) : InputStream | SimpleXMLTests.java:139:22:139:65 | new InputStreamReader(...) | XML parsing depends on a $@ without guarding against external entity expansion. | SimpleXMLTests.java:139:44:139:64 | getInputStream(...) | user-provided value | +| SimpleXMLTests.java:146:22:146:34 | new String(...) | SimpleXMLTests.java:145:5:145:25 | getInputStream(...) : InputStream | SimpleXMLTests.java:146:22:146:34 | new String(...) | XML parsing depends on a $@ without guarding against external entity expansion. | SimpleXMLTests.java:145:5:145:25 | getInputStream(...) | user-provided value | +| SimpleXMLTests.java:153:22:153:34 | new String(...) | SimpleXMLTests.java:152:5:152:25 | getInputStream(...) : InputStream | SimpleXMLTests.java:153:22:153:34 | new String(...) | XML parsing depends on a $@ without guarding against external entity expansion. | SimpleXMLTests.java:152:5:152:25 | getInputStream(...) | user-provided value | +| TransformerTests.java:20:27:20:65 | new StreamSource(...) | TransformerTests.java:20:44:20:64 | getInputStream(...) : InputStream | TransformerTests.java:20:27:20:65 | new StreamSource(...) | XML parsing depends on a $@ without guarding against external entity expansion. | TransformerTests.java:20:44:20:64 | getInputStream(...) | user-provided value | +| TransformerTests.java:21:23:21:61 | new StreamSource(...) | TransformerTests.java:21:40:21:60 | getInputStream(...) : InputStream | TransformerTests.java:21:23:21:61 | new StreamSource(...) | XML parsing depends on a $@ without guarding against external entity expansion. | TransformerTests.java:21:40:21:60 | getInputStream(...) | user-provided value | +| TransformerTests.java:71:27:71:65 | new StreamSource(...) | TransformerTests.java:71:44:71:64 | getInputStream(...) : InputStream | TransformerTests.java:71:27:71:65 | new StreamSource(...) | XML parsing depends on a $@ without guarding against external entity expansion. | TransformerTests.java:71:44:71:64 | getInputStream(...) | user-provided value | +| TransformerTests.java:72:23:72:61 | new StreamSource(...) | TransformerTests.java:72:40:72:60 | getInputStream(...) : InputStream | TransformerTests.java:72:23:72:61 | new StreamSource(...) | XML parsing depends on a $@ without guarding against external entity expansion. | TransformerTests.java:72:40:72:60 | getInputStream(...) | user-provided value | +| TransformerTests.java:79:27:79:65 | new StreamSource(...) | TransformerTests.java:79:44:79:64 | getInputStream(...) : InputStream | TransformerTests.java:79:27:79:65 | new StreamSource(...) | XML parsing depends on a $@ without guarding against external entity expansion. | TransformerTests.java:79:44:79:64 | getInputStream(...) | user-provided value | +| TransformerTests.java:80:23:80:61 | new StreamSource(...) | TransformerTests.java:80:40:80:60 | getInputStream(...) : InputStream | TransformerTests.java:80:23:80:61 | new StreamSource(...) | XML parsing depends on a $@ without guarding against external entity expansion. | TransformerTests.java:80:40:80:60 | getInputStream(...) | user-provided value | +| TransformerTests.java:88:27:88:65 | new StreamSource(...) | TransformerTests.java:88:44:88:64 | getInputStream(...) : InputStream | TransformerTests.java:88:27:88:65 | new StreamSource(...) | XML parsing depends on a $@ without guarding against external entity expansion. | TransformerTests.java:88:44:88:64 | getInputStream(...) | user-provided value | +| TransformerTests.java:89:23:89:61 | new StreamSource(...) | TransformerTests.java:89:40:89:60 | getInputStream(...) : InputStream | TransformerTests.java:89:23:89:61 | new StreamSource(...) | XML parsing depends on a $@ without guarding against external entity expansion. | TransformerTests.java:89:40:89:60 | getInputStream(...) | user-provided value | +| TransformerTests.java:97:27:97:65 | new StreamSource(...) | TransformerTests.java:97:44:97:64 | getInputStream(...) : InputStream | TransformerTests.java:97:27:97:65 | new StreamSource(...) | XML parsing depends on a $@ without guarding against external entity expansion. | TransformerTests.java:97:44:97:64 | getInputStream(...) | user-provided value | +| TransformerTests.java:98:23:98:61 | new StreamSource(...) | TransformerTests.java:98:40:98:60 | getInputStream(...) : InputStream | TransformerTests.java:98:23:98:61 | new StreamSource(...) | XML parsing depends on a $@ without guarding against external entity expansion. | TransformerTests.java:98:40:98:60 | getInputStream(...) | user-provided value | +| TransformerTests.java:103:21:103:59 | new StreamSource(...) | TransformerTests.java:103:38:103:58 | getInputStream(...) : InputStream | TransformerTests.java:103:21:103:59 | new StreamSource(...) | XML parsing depends on a $@ without guarding against external entity expansion. | TransformerTests.java:103:38:103:58 | getInputStream(...) | user-provided value | +| TransformerTests.java:116:21:116:59 | new StreamSource(...) | TransformerTests.java:116:38:116:58 | getInputStream(...) : InputStream | TransformerTests.java:116:21:116:59 | new StreamSource(...) | XML parsing depends on a $@ without guarding against external entity expansion. | TransformerTests.java:116:38:116:58 | getInputStream(...) | user-provided value | +| TransformerTests.java:122:21:122:59 | new StreamSource(...) | TransformerTests.java:122:38:122:58 | getInputStream(...) : InputStream | TransformerTests.java:122:21:122:59 | new StreamSource(...) | XML parsing depends on a $@ without guarding against external entity expansion. | TransformerTests.java:122:38:122:58 | getInputStream(...) | user-provided value | +| TransformerTests.java:129:21:129:59 | new StreamSource(...) | TransformerTests.java:129:38:129:58 | getInputStream(...) : InputStream | TransformerTests.java:129:21:129:59 | new StreamSource(...) | XML parsing depends on a $@ without guarding against external entity expansion. | TransformerTests.java:129:38:129:58 | getInputStream(...) | user-provided value | +| TransformerTests.java:136:21:136:59 | new StreamSource(...) | TransformerTests.java:136:38:136:58 | getInputStream(...) : InputStream | TransformerTests.java:136:21:136:59 | new StreamSource(...) | XML parsing depends on a $@ without guarding against external entity expansion. | TransformerTests.java:136:38:136:58 | getInputStream(...) | user-provided value | +| TransformerTests.java:141:21:141:73 | new SAXSource(...) | TransformerTests.java:141:51:141:71 | getInputStream(...) : InputStream | TransformerTests.java:141:21:141:73 | new SAXSource(...) | XML parsing depends on a $@ without guarding against external entity expansion. | TransformerTests.java:141:51:141:71 | getInputStream(...) | user-provided value | +| UnmarshallerTests.java:29:18:29:38 | getInputStream(...) | UnmarshallerTests.java:29:18:29:38 | getInputStream(...) | UnmarshallerTests.java:29:18:29:38 | getInputStream(...) | XML parsing depends on a $@ without guarding against external entity expansion. | UnmarshallerTests.java:29:18:29:38 | getInputStream(...) | user-provided value | +| ValidatorTests.java:22:28:22:33 | source | ValidatorTests.java:17:49:17:72 | getInputStream(...) : ServletInputStream | ValidatorTests.java:22:28:22:33 | source | XML parsing depends on a $@ without guarding against external entity expansion. | ValidatorTests.java:17:49:17:72 | getInputStream(...) | user-provided value | +| XMLDecoderTests.java:18:9:18:18 | xmlDecoder | XMLDecoderTests.java:16:49:16:72 | getInputStream(...) : ServletInputStream | XMLDecoderTests.java:18:9:18:18 | xmlDecoder | XML parsing depends on a $@ without guarding against external entity expansion. | XMLDecoderTests.java:16:49:16:72 | getInputStream(...) | user-provided value | +| XMLReaderTests.java:16:18:16:55 | new InputSource(...) | XMLReaderTests.java:16:34:16:54 | getInputStream(...) : InputStream | XMLReaderTests.java:16:18:16:55 | new InputSource(...) | XML parsing depends on a $@ without guarding against external entity expansion. | XMLReaderTests.java:16:34:16:54 | getInputStream(...) | user-provided value | +| XMLReaderTests.java:56:18:56:55 | new InputSource(...) | XMLReaderTests.java:56:34:56:54 | getInputStream(...) : InputStream | XMLReaderTests.java:56:18:56:55 | new InputSource(...) | XML parsing depends on a $@ without guarding against external entity expansion. | XMLReaderTests.java:56:34:56:54 | getInputStream(...) | user-provided value | +| XMLReaderTests.java:63:18:63:55 | new InputSource(...) | XMLReaderTests.java:63:34:63:54 | getInputStream(...) : InputStream | XMLReaderTests.java:63:18:63:55 | new InputSource(...) | XML parsing depends on a $@ without guarding against external entity expansion. | XMLReaderTests.java:63:34:63:54 | getInputStream(...) | user-provided value | +| XMLReaderTests.java:70:18:70:55 | new InputSource(...) | XMLReaderTests.java:70:34:70:54 | getInputStream(...) : InputStream | XMLReaderTests.java:70:18:70:55 | new InputSource(...) | XML parsing depends on a $@ without guarding against external entity expansion. | XMLReaderTests.java:70:34:70:54 | getInputStream(...) | user-provided value | +| XMLReaderTests.java:78:18:78:55 | new InputSource(...) | XMLReaderTests.java:78:34:78:54 | getInputStream(...) : InputStream | XMLReaderTests.java:78:18:78:55 | new InputSource(...) | XML parsing depends on a $@ without guarding against external entity expansion. | XMLReaderTests.java:78:34:78:54 | getInputStream(...) | user-provided value | +| XMLReaderTests.java:86:18:86:55 | new InputSource(...) | XMLReaderTests.java:86:34:86:54 | getInputStream(...) : InputStream | XMLReaderTests.java:86:18:86:55 | new InputSource(...) | XML parsing depends on a $@ without guarding against external entity expansion. | XMLReaderTests.java:86:34:86:54 | getInputStream(...) | user-provided value | +| XMLReaderTests.java:94:18:94:55 | new InputSource(...) | XMLReaderTests.java:94:34:94:54 | getInputStream(...) : InputStream | XMLReaderTests.java:94:18:94:55 | new InputSource(...) | XML parsing depends on a $@ without guarding against external entity expansion. | XMLReaderTests.java:94:34:94:54 | getInputStream(...) | user-provided value | +| XMLReaderTests.java:100:18:100:55 | new InputSource(...) | XMLReaderTests.java:100:34:100:54 | getInputStream(...) : InputStream | XMLReaderTests.java:100:18:100:55 | new InputSource(...) | XML parsing depends on a $@ without guarding against external entity expansion. | XMLReaderTests.java:100:34:100:54 | getInputStream(...) | user-provided value | +| XPathExpressionTests.java:27:19:27:56 | new InputSource(...) | XPathExpressionTests.java:27:35:27:55 | getInputStream(...) : InputStream | XPathExpressionTests.java:27:19:27:56 | new InputSource(...) | XML parsing depends on a $@ without guarding against external entity expansion. | XPathExpressionTests.java:27:35:27:55 | getInputStream(...) | user-provided value | +| XPathExpressionTests.java:42:23:42:60 | new InputSource(...) | XPathExpressionTests.java:42:39:42:59 | getInputStream(...) : InputStream | XPathExpressionTests.java:42:23:42:60 | new InputSource(...) | XML parsing depends on a $@ without guarding against external entity expansion. | XPathExpressionTests.java:42:39:42:59 | getInputStream(...) | user-provided value | +| XmlInputFactoryTests.java:9:35:9:55 | getInputStream(...) | XmlInputFactoryTests.java:9:35:9:55 | getInputStream(...) | XmlInputFactoryTests.java:9:35:9:55 | getInputStream(...) | XML parsing depends on a $@ without guarding against external entity expansion. | XmlInputFactoryTests.java:9:35:9:55 | getInputStream(...) | user-provided value | +| XmlInputFactoryTests.java:10:34:10:54 | getInputStream(...) | XmlInputFactoryTests.java:10:34:10:54 | getInputStream(...) | XmlInputFactoryTests.java:10:34:10:54 | getInputStream(...) | XML parsing depends on a $@ without guarding against external entity expansion. | XmlInputFactoryTests.java:10:34:10:54 | getInputStream(...) | user-provided value | +| XmlInputFactoryTests.java:24:35:24:55 | getInputStream(...) | XmlInputFactoryTests.java:24:35:24:55 | getInputStream(...) | XmlInputFactoryTests.java:24:35:24:55 | getInputStream(...) | XML parsing depends on a $@ without guarding against external entity expansion. | XmlInputFactoryTests.java:24:35:24:55 | getInputStream(...) | user-provided value | +| XmlInputFactoryTests.java:25:34:25:54 | getInputStream(...) | XmlInputFactoryTests.java:25:34:25:54 | getInputStream(...) | XmlInputFactoryTests.java:25:34:25:54 | getInputStream(...) | XML parsing depends on a $@ without guarding against external entity expansion. | XmlInputFactoryTests.java:25:34:25:54 | getInputStream(...) | user-provided value | +| XmlInputFactoryTests.java:31:35:31:55 | getInputStream(...) | XmlInputFactoryTests.java:31:35:31:55 | getInputStream(...) | XmlInputFactoryTests.java:31:35:31:55 | getInputStream(...) | XML parsing depends on a $@ without guarding against external entity expansion. | XmlInputFactoryTests.java:31:35:31:55 | getInputStream(...) | user-provided value | +| XmlInputFactoryTests.java:32:34:32:54 | getInputStream(...) | XmlInputFactoryTests.java:32:34:32:54 | getInputStream(...) | XmlInputFactoryTests.java:32:34:32:54 | getInputStream(...) | XML parsing depends on a $@ without guarding against external entity expansion. | XmlInputFactoryTests.java:32:34:32:54 | getInputStream(...) | user-provided value | +| XmlInputFactoryTests.java:39:35:39:55 | getInputStream(...) | XmlInputFactoryTests.java:39:35:39:55 | getInputStream(...) | XmlInputFactoryTests.java:39:35:39:55 | getInputStream(...) | XML parsing depends on a $@ without guarding against external entity expansion. | XmlInputFactoryTests.java:39:35:39:55 | getInputStream(...) | user-provided value | +| XmlInputFactoryTests.java:40:34:40:54 | getInputStream(...) | XmlInputFactoryTests.java:40:34:40:54 | getInputStream(...) | XmlInputFactoryTests.java:40:34:40:54 | getInputStream(...) | XML parsing depends on a $@ without guarding against external entity expansion. | XmlInputFactoryTests.java:40:34:40:54 | getInputStream(...) | user-provided value | +| XmlInputFactoryTests.java:47:35:47:55 | getInputStream(...) | XmlInputFactoryTests.java:47:35:47:55 | getInputStream(...) | XmlInputFactoryTests.java:47:35:47:55 | getInputStream(...) | XML parsing depends on a $@ without guarding against external entity expansion. | XmlInputFactoryTests.java:47:35:47:55 | getInputStream(...) | user-provided value | +| XmlInputFactoryTests.java:48:34:48:54 | getInputStream(...) | XmlInputFactoryTests.java:48:34:48:54 | getInputStream(...) | XmlInputFactoryTests.java:48:34:48:54 | getInputStream(...) | XML parsing depends on a $@ without guarding against external entity expansion. | XmlInputFactoryTests.java:48:34:48:54 | getInputStream(...) | user-provided value | +| XmlInputFactoryTests.java:55:35:55:55 | getInputStream(...) | XmlInputFactoryTests.java:55:35:55:55 | getInputStream(...) | XmlInputFactoryTests.java:55:35:55:55 | getInputStream(...) | XML parsing depends on a $@ without guarding against external entity expansion. | XmlInputFactoryTests.java:55:35:55:55 | getInputStream(...) | user-provided value | +| XmlInputFactoryTests.java:56:34:56:54 | getInputStream(...) | XmlInputFactoryTests.java:56:34:56:54 | getInputStream(...) | XmlInputFactoryTests.java:56:34:56:54 | getInputStream(...) | XML parsing depends on a $@ without guarding against external entity expansion. | XmlInputFactoryTests.java:56:34:56:54 | getInputStream(...) | user-provided value | +edges +| CdaUtilTests.java:10:26:10:46 | getInputStream(...) : InputStream | CdaUtilTests.java:11:66:11:67 | is : InputStream | provenance | Src:MaD:1 | +| CdaUtilTests.java:10:26:10:46 | getInputStream(...) : InputStream | CdaUtilTests.java:12:22:12:23 | is | provenance | Src:MaD:1 | +| CdaUtilTests.java:10:26:10:46 | getInputStream(...) : InputStream | CdaUtilTests.java:14:22:14:23 | is | provenance | Src:MaD:1 | +| CdaUtilTests.java:10:26:10:46 | getInputStream(...) : InputStream | CdaUtilTests.java:15:22:15:23 | is | provenance | Src:MaD:1 | +| CdaUtilTests.java:10:26:10:46 | getInputStream(...) : InputStream | CdaUtilTests.java:16:34:16:35 | is | provenance | Src:MaD:1 | +| CdaUtilTests.java:10:26:10:46 | getInputStream(...) : InputStream | CdaUtilTests.java:20:24:20:25 | is | provenance | Src:MaD:1 | +| CdaUtilTests.java:10:26:10:46 | getInputStream(...) : InputStream | CdaUtilTests.java:21:24:21:25 | is | provenance | Src:MaD:1 | +| CdaUtilTests.java:11:28:11:69 | new InputSource(...) : InputSource | CdaUtilTests.java:13:22:13:25 | iSrc | provenance | | +| CdaUtilTests.java:11:28:11:69 | new InputSource(...) : InputSource | CdaUtilTests.java:17:22:17:25 | iSrc | provenance | | +| CdaUtilTests.java:11:28:11:69 | new InputSource(...) : InputSource | CdaUtilTests.java:18:22:18:25 | iSrc | provenance | | +| CdaUtilTests.java:11:28:11:69 | new InputSource(...) : InputSource | CdaUtilTests.java:19:34:19:37 | iSrc | provenance | | +| CdaUtilTests.java:11:44:11:68 | new InputStreamReader(...) : InputStreamReader | CdaUtilTests.java:11:28:11:69 | new InputSource(...) : InputSource | provenance | MaD:13 | +| CdaUtilTests.java:11:66:11:67 | is : InputStream | CdaUtilTests.java:11:44:11:68 | new InputStreamReader(...) : InputStreamReader | provenance | MaD:5 | +| DigesterTests.java:14:49:14:72 | getInputStream(...) : ServletInputStream | DigesterTests.java:16:24:16:41 | servletInputStream | provenance | Src:MaD:2 | +| DocumentBuilderTests.java:95:24:95:76 | new SAXSource(...) : SAXSource | DocumentBuilderTests.java:96:19:96:24 | source : SAXSource | provenance | | +| DocumentBuilderTests.java:95:38:95:75 | new InputSource(...) : InputSource | DocumentBuilderTests.java:95:24:95:76 | new SAXSource(...) : SAXSource | provenance | MaD:7 | +| DocumentBuilderTests.java:95:54:95:74 | getInputStream(...) : InputStream | DocumentBuilderTests.java:95:38:95:75 | new InputSource(...) : InputSource | provenance | Src:MaD:1 MaD:13 | +| DocumentBuilderTests.java:96:19:96:24 | source : SAXSource | DocumentBuilderTests.java:96:19:96:41 | getInputSource(...) | provenance | MaD:9 | +| DocumentBuilderTests.java:102:27:102:65 | new StreamSource(...) : StreamSource | DocumentBuilderTests.java:103:49:103:54 | source : StreamSource | provenance | | +| DocumentBuilderTests.java:102:27:102:65 | new StreamSource(...) : StreamSource | DocumentBuilderTests.java:104:19:104:24 | source : StreamSource | provenance | | +| DocumentBuilderTests.java:102:44:102:64 | getInputStream(...) : InputStream | DocumentBuilderTests.java:102:27:102:65 | new StreamSource(...) : StreamSource | provenance | Src:MaD:1 MaD:11 | +| DocumentBuilderTests.java:103:49:103:54 | source : StreamSource | DocumentBuilderTests.java:103:19:103:55 | sourceToInputSource(...) | provenance | MaD:10 | +| DocumentBuilderTests.java:104:19:104:24 | source : StreamSource | DocumentBuilderTests.java:104:19:104:41 | getInputStream(...) | provenance | MaD:12 | +| SAXSourceTests.java:17:24:17:84 | new SAXSource(...) : SAXSource | SAXSourceTests.java:20:18:20:23 | source | provenance | | +| SAXSourceTests.java:17:46:17:83 | new InputSource(...) : InputSource | SAXSourceTests.java:17:24:17:84 | new SAXSource(...) : SAXSource | provenance | MaD:8 | +| SAXSourceTests.java:17:62:17:82 | getInputStream(...) : InputStream | SAXSourceTests.java:17:46:17:83 | new InputSource(...) : InputSource | provenance | Src:MaD:1 MaD:13 | +| SchemaTests.java:12:56:12:76 | getInputStream(...) : InputStream | SchemaTests.java:12:39:12:77 | new StreamSource(...) | provenance | Src:MaD:1 MaD:11 | +| SchemaTests.java:25:56:25:76 | getInputStream(...) : InputStream | SchemaTests.java:25:39:25:77 | new StreamSource(...) | provenance | Src:MaD:1 MaD:11 | +| SchemaTests.java:31:56:31:76 | getInputStream(...) : InputStream | SchemaTests.java:31:39:31:77 | new StreamSource(...) | provenance | Src:MaD:1 MaD:11 | +| SchemaTests.java:38:56:38:76 | getInputStream(...) : InputStream | SchemaTests.java:38:39:38:77 | new StreamSource(...) | provenance | Src:MaD:1 MaD:11 | +| SchemaTests.java:45:56:45:76 | getInputStream(...) : InputStream | SchemaTests.java:45:39:45:77 | new StreamSource(...) | provenance | Src:MaD:1 MaD:11 | +| SimpleXMLTests.java:24:63:24:83 | getInputStream(...) : InputStream | SimpleXMLTests.java:24:41:24:84 | new InputStreamReader(...) | provenance | Src:MaD:1 MaD:5 | +| SimpleXMLTests.java:30:5:30:25 | getInputStream(...) : InputStream | SimpleXMLTests.java:30:32:30:32 | b [post update] : byte[] | provenance | Src:MaD:1 MaD:4 | +| SimpleXMLTests.java:30:32:30:32 | b [post update] : byte[] | SimpleXMLTests.java:31:52:31:52 | b : byte[] | provenance | | +| SimpleXMLTests.java:31:52:31:52 | b : byte[] | SimpleXMLTests.java:31:41:31:53 | new String(...) | provenance | MaD:6 | +| SimpleXMLTests.java:37:5:37:25 | getInputStream(...) : InputStream | SimpleXMLTests.java:37:32:37:32 | b [post update] : byte[] | provenance | Src:MaD:1 MaD:4 | +| SimpleXMLTests.java:37:32:37:32 | b [post update] : byte[] | SimpleXMLTests.java:38:52:38:52 | b : byte[] | provenance | | +| SimpleXMLTests.java:38:52:38:52 | b : byte[] | SimpleXMLTests.java:38:41:38:53 | new String(...) | provenance | MaD:6 | +| SimpleXMLTests.java:43:63:43:83 | getInputStream(...) : InputStream | SimpleXMLTests.java:43:41:43:84 | new InputStreamReader(...) | provenance | Src:MaD:1 MaD:5 | +| SimpleXMLTests.java:68:59:68:79 | getInputStream(...) : InputStream | SimpleXMLTests.java:68:37:68:80 | new InputStreamReader(...) | provenance | Src:MaD:1 MaD:5 | +| SimpleXMLTests.java:73:59:73:79 | getInputStream(...) : InputStream | SimpleXMLTests.java:73:37:73:80 | new InputStreamReader(...) | provenance | Src:MaD:1 MaD:5 | +| SimpleXMLTests.java:78:48:78:68 | getInputStream(...) : InputStream | SimpleXMLTests.java:78:26:78:69 | new InputStreamReader(...) | provenance | Src:MaD:1 MaD:5 | +| SimpleXMLTests.java:83:48:83:68 | getInputStream(...) : InputStream | SimpleXMLTests.java:83:26:83:69 | new InputStreamReader(...) | provenance | Src:MaD:1 MaD:5 | +| SimpleXMLTests.java:89:5:89:25 | getInputStream(...) : InputStream | SimpleXMLTests.java:89:32:89:32 | b [post update] : byte[] | provenance | Src:MaD:1 MaD:4 | +| SimpleXMLTests.java:89:32:89:32 | b [post update] : byte[] | SimpleXMLTests.java:90:48:90:48 | b : byte[] | provenance | | +| SimpleXMLTests.java:90:48:90:48 | b : byte[] | SimpleXMLTests.java:90:37:90:49 | new String(...) | provenance | MaD:6 | +| SimpleXMLTests.java:96:5:96:25 | getInputStream(...) : InputStream | SimpleXMLTests.java:96:32:96:32 | b [post update] : byte[] | provenance | Src:MaD:1 MaD:4 | +| SimpleXMLTests.java:96:32:96:32 | b [post update] : byte[] | SimpleXMLTests.java:97:48:97:48 | b : byte[] | provenance | | +| SimpleXMLTests.java:97:48:97:48 | b : byte[] | SimpleXMLTests.java:97:37:97:49 | new String(...) | provenance | MaD:6 | +| SimpleXMLTests.java:103:5:103:25 | getInputStream(...) : InputStream | SimpleXMLTests.java:103:32:103:32 | b [post update] : byte[] | provenance | Src:MaD:1 MaD:4 | +| SimpleXMLTests.java:103:32:103:32 | b [post update] : byte[] | SimpleXMLTests.java:104:37:104:37 | b : byte[] | provenance | | +| SimpleXMLTests.java:104:37:104:37 | b : byte[] | SimpleXMLTests.java:104:26:104:38 | new String(...) | provenance | MaD:6 | +| SimpleXMLTests.java:110:5:110:25 | getInputStream(...) : InputStream | SimpleXMLTests.java:110:32:110:32 | b [post update] : byte[] | provenance | Src:MaD:1 MaD:4 | +| SimpleXMLTests.java:110:32:110:32 | b [post update] : byte[] | SimpleXMLTests.java:111:37:111:37 | b : byte[] | provenance | | +| SimpleXMLTests.java:111:37:111:37 | b : byte[] | SimpleXMLTests.java:111:26:111:38 | new String(...) | provenance | MaD:6 | +| SimpleXMLTests.java:119:44:119:64 | getInputStream(...) : InputStream | SimpleXMLTests.java:119:22:119:65 | new InputStreamReader(...) | provenance | Src:MaD:1 MaD:5 | +| SimpleXMLTests.java:129:44:129:64 | getInputStream(...) : InputStream | SimpleXMLTests.java:129:22:129:65 | new InputStreamReader(...) | provenance | Src:MaD:1 MaD:5 | +| SimpleXMLTests.java:139:44:139:64 | getInputStream(...) : InputStream | SimpleXMLTests.java:139:22:139:65 | new InputStreamReader(...) | provenance | Src:MaD:1 MaD:5 | +| SimpleXMLTests.java:145:5:145:25 | getInputStream(...) : InputStream | SimpleXMLTests.java:145:32:145:32 | b [post update] : byte[] | provenance | Src:MaD:1 MaD:4 | +| SimpleXMLTests.java:145:32:145:32 | b [post update] : byte[] | SimpleXMLTests.java:146:33:146:33 | b : byte[] | provenance | | +| SimpleXMLTests.java:146:33:146:33 | b : byte[] | SimpleXMLTests.java:146:22:146:34 | new String(...) | provenance | MaD:6 | +| SimpleXMLTests.java:152:5:152:25 | getInputStream(...) : InputStream | SimpleXMLTests.java:152:32:152:32 | b [post update] : byte[] | provenance | Src:MaD:1 MaD:4 | +| SimpleXMLTests.java:152:32:152:32 | b [post update] : byte[] | SimpleXMLTests.java:153:33:153:33 | b : byte[] | provenance | | +| SimpleXMLTests.java:153:33:153:33 | b : byte[] | SimpleXMLTests.java:153:22:153:34 | new String(...) | provenance | MaD:6 | +| TransformerTests.java:20:44:20:64 | getInputStream(...) : InputStream | TransformerTests.java:20:27:20:65 | new StreamSource(...) | provenance | Src:MaD:1 MaD:11 | +| TransformerTests.java:21:40:21:60 | getInputStream(...) : InputStream | TransformerTests.java:21:23:21:61 | new StreamSource(...) | provenance | Src:MaD:1 MaD:11 | +| TransformerTests.java:71:44:71:64 | getInputStream(...) : InputStream | TransformerTests.java:71:27:71:65 | new StreamSource(...) | provenance | Src:MaD:1 MaD:11 | +| TransformerTests.java:72:40:72:60 | getInputStream(...) : InputStream | TransformerTests.java:72:23:72:61 | new StreamSource(...) | provenance | Src:MaD:1 MaD:11 | +| TransformerTests.java:79:44:79:64 | getInputStream(...) : InputStream | TransformerTests.java:79:27:79:65 | new StreamSource(...) | provenance | Src:MaD:1 MaD:11 | +| TransformerTests.java:80:40:80:60 | getInputStream(...) : InputStream | TransformerTests.java:80:23:80:61 | new StreamSource(...) | provenance | Src:MaD:1 MaD:11 | +| TransformerTests.java:88:44:88:64 | getInputStream(...) : InputStream | TransformerTests.java:88:27:88:65 | new StreamSource(...) | provenance | Src:MaD:1 MaD:11 | +| TransformerTests.java:89:40:89:60 | getInputStream(...) : InputStream | TransformerTests.java:89:23:89:61 | new StreamSource(...) | provenance | Src:MaD:1 MaD:11 | +| TransformerTests.java:97:44:97:64 | getInputStream(...) : InputStream | TransformerTests.java:97:27:97:65 | new StreamSource(...) | provenance | Src:MaD:1 MaD:11 | +| TransformerTests.java:98:40:98:60 | getInputStream(...) : InputStream | TransformerTests.java:98:23:98:61 | new StreamSource(...) | provenance | Src:MaD:1 MaD:11 | +| TransformerTests.java:103:38:103:58 | getInputStream(...) : InputStream | TransformerTests.java:103:21:103:59 | new StreamSource(...) | provenance | Src:MaD:1 MaD:11 | +| TransformerTests.java:116:38:116:58 | getInputStream(...) : InputStream | TransformerTests.java:116:21:116:59 | new StreamSource(...) | provenance | Src:MaD:1 MaD:11 | +| TransformerTests.java:122:38:122:58 | getInputStream(...) : InputStream | TransformerTests.java:122:21:122:59 | new StreamSource(...) | provenance | Src:MaD:1 MaD:11 | +| TransformerTests.java:129:38:129:58 | getInputStream(...) : InputStream | TransformerTests.java:129:21:129:59 | new StreamSource(...) | provenance | Src:MaD:1 MaD:11 | +| TransformerTests.java:136:38:136:58 | getInputStream(...) : InputStream | TransformerTests.java:136:21:136:59 | new StreamSource(...) | provenance | Src:MaD:1 MaD:11 | +| TransformerTests.java:141:35:141:72 | new InputSource(...) : InputSource | TransformerTests.java:141:21:141:73 | new SAXSource(...) | provenance | MaD:7 | +| TransformerTests.java:141:51:141:71 | getInputStream(...) : InputStream | TransformerTests.java:141:35:141:72 | new InputSource(...) : InputSource | provenance | Src:MaD:1 MaD:13 | +| ValidatorTests.java:17:49:17:72 | getInputStream(...) : ServletInputStream | ValidatorTests.java:21:48:21:65 | servletInputStream : ServletInputStream | provenance | Src:MaD:2 | +| ValidatorTests.java:21:31:21:66 | new StreamSource(...) : StreamSource | ValidatorTests.java:22:28:22:33 | source | provenance | | +| ValidatorTests.java:21:48:21:65 | servletInputStream : ServletInputStream | ValidatorTests.java:21:31:21:66 | new StreamSource(...) : StreamSource | provenance | MaD:11 | +| XMLDecoderTests.java:16:49:16:72 | getInputStream(...) : ServletInputStream | XMLDecoderTests.java:17:48:17:65 | servletInputStream : ServletInputStream | provenance | Src:MaD:2 | +| XMLDecoderTests.java:17:33:17:66 | new XMLDecoder(...) : XMLDecoder | XMLDecoderTests.java:18:9:18:18 | xmlDecoder | provenance | | +| XMLDecoderTests.java:17:48:17:65 | servletInputStream : ServletInputStream | XMLDecoderTests.java:17:33:17:66 | new XMLDecoder(...) : XMLDecoder | provenance | MaD:3 | +| XMLReaderTests.java:16:34:16:54 | getInputStream(...) : InputStream | XMLReaderTests.java:16:18:16:55 | new InputSource(...) | provenance | Src:MaD:1 MaD:13 | +| XMLReaderTests.java:56:34:56:54 | getInputStream(...) : InputStream | XMLReaderTests.java:56:18:56:55 | new InputSource(...) | provenance | Src:MaD:1 MaD:13 | +| XMLReaderTests.java:63:34:63:54 | getInputStream(...) : InputStream | XMLReaderTests.java:63:18:63:55 | new InputSource(...) | provenance | Src:MaD:1 MaD:13 | +| XMLReaderTests.java:70:34:70:54 | getInputStream(...) : InputStream | XMLReaderTests.java:70:18:70:55 | new InputSource(...) | provenance | Src:MaD:1 MaD:13 | +| XMLReaderTests.java:78:34:78:54 | getInputStream(...) : InputStream | XMLReaderTests.java:78:18:78:55 | new InputSource(...) | provenance | Src:MaD:1 MaD:13 | +| XMLReaderTests.java:86:34:86:54 | getInputStream(...) : InputStream | XMLReaderTests.java:86:18:86:55 | new InputSource(...) | provenance | Src:MaD:1 MaD:13 | +| XMLReaderTests.java:94:34:94:54 | getInputStream(...) : InputStream | XMLReaderTests.java:94:18:94:55 | new InputSource(...) | provenance | Src:MaD:1 MaD:13 | +| XMLReaderTests.java:100:34:100:54 | getInputStream(...) : InputStream | XMLReaderTests.java:100:18:100:55 | new InputSource(...) | provenance | Src:MaD:1 MaD:13 | +| XPathExpressionTests.java:27:35:27:55 | getInputStream(...) : InputStream | XPathExpressionTests.java:27:19:27:56 | new InputSource(...) | provenance | Src:MaD:1 MaD:13 | +| XPathExpressionTests.java:42:39:42:59 | getInputStream(...) : InputStream | XPathExpressionTests.java:42:23:42:60 | new InputSource(...) | provenance | Src:MaD:1 MaD:13 | +models +| 1 | Source: java.net; Socket; false; getInputStream; (); ; ReturnValue; remote; manual | +| 2 | Source: javax.servlet; ServletRequest; false; getInputStream; (); ; ReturnValue; remote; manual | +| 3 | Summary: java.beans; XMLDecoder; false; XMLDecoder; ; ; Argument[0]; Argument[this]; taint; manual | +| 4 | Summary: java.io; InputStream; true; read; (byte[]); ; Argument[this]; Argument[0]; taint; manual | +| 5 | Summary: java.io; InputStreamReader; false; InputStreamReader; ; ; Argument[0]; Argument[this]; taint; manual | +| 6 | Summary: java.lang; String; false; String; ; ; Argument[0]; Argument[this]; taint; manual | +| 7 | Summary: javax.xml.transform.sax; SAXSource; false; SAXSource; (InputSource); ; Argument[0]; Argument[this]; taint; manual | +| 8 | Summary: javax.xml.transform.sax; SAXSource; false; SAXSource; (XMLReader,InputSource); ; Argument[1]; Argument[this]; taint; manual | +| 9 | Summary: javax.xml.transform.sax; SAXSource; false; getInputSource; ; ; Argument[this]; ReturnValue; taint; manual | +| 10 | Summary: javax.xml.transform.sax; SAXSource; false; sourceToInputSource; ; ; Argument[0]; ReturnValue; taint; manual | +| 11 | Summary: javax.xml.transform.stream; StreamSource; false; StreamSource; ; ; Argument[0]; Argument[this]; taint; manual | +| 12 | Summary: javax.xml.transform.stream; StreamSource; false; getInputStream; ; ; Argument[this]; ReturnValue; taint; manual | +| 13 | Summary: org.xml.sax; InputSource; false; InputSource; ; ; Argument[0]; Argument[this]; taint; manual | +nodes +| CdaUtilTests.java:10:26:10:46 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| CdaUtilTests.java:11:28:11:69 | new InputSource(...) : InputSource | semmle.label | new InputSource(...) : InputSource | +| CdaUtilTests.java:11:44:11:68 | new InputStreamReader(...) : InputStreamReader | semmle.label | new InputStreamReader(...) : InputStreamReader | +| CdaUtilTests.java:11:66:11:67 | is : InputStream | semmle.label | is : InputStream | +| CdaUtilTests.java:12:22:12:23 | is | semmle.label | is | +| CdaUtilTests.java:13:22:13:25 | iSrc | semmle.label | iSrc | +| CdaUtilTests.java:14:22:14:23 | is | semmle.label | is | +| CdaUtilTests.java:15:22:15:23 | is | semmle.label | is | +| CdaUtilTests.java:16:34:16:35 | is | semmle.label | is | +| CdaUtilTests.java:17:22:17:25 | iSrc | semmle.label | iSrc | +| CdaUtilTests.java:18:22:18:25 | iSrc | semmle.label | iSrc | +| CdaUtilTests.java:19:34:19:37 | iSrc | semmle.label | iSrc | +| CdaUtilTests.java:20:24:20:25 | is | semmle.label | is | +| CdaUtilTests.java:21:24:21:25 | is | semmle.label | is | +| DigesterTests.java:14:49:14:72 | getInputStream(...) : ServletInputStream | semmle.label | getInputStream(...) : ServletInputStream | +| DigesterTests.java:16:24:16:41 | servletInputStream | semmle.label | servletInputStream | +| DocumentBuilderTests.java:14:19:14:39 | getInputStream(...) | semmle.label | getInputStream(...) | +| DocumentBuilderTests.java:28:19:28:39 | getInputStream(...) | semmle.label | getInputStream(...) | +| DocumentBuilderTests.java:36:19:36:39 | getInputStream(...) | semmle.label | getInputStream(...) | +| DocumentBuilderTests.java:44:19:44:39 | getInputStream(...) | semmle.label | getInputStream(...) | +| DocumentBuilderTests.java:51:19:51:39 | getInputStream(...) | semmle.label | getInputStream(...) | +| DocumentBuilderTests.java:66:19:66:39 | getInputStream(...) | semmle.label | getInputStream(...) | +| DocumentBuilderTests.java:73:19:73:39 | getInputStream(...) | semmle.label | getInputStream(...) | +| DocumentBuilderTests.java:81:19:81:39 | getInputStream(...) | semmle.label | getInputStream(...) | +| DocumentBuilderTests.java:89:19:89:39 | getInputStream(...) | semmle.label | getInputStream(...) | +| DocumentBuilderTests.java:95:24:95:76 | new SAXSource(...) : SAXSource | semmle.label | new SAXSource(...) : SAXSource | +| DocumentBuilderTests.java:95:38:95:75 | new InputSource(...) : InputSource | semmle.label | new InputSource(...) : InputSource | +| DocumentBuilderTests.java:95:54:95:74 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| DocumentBuilderTests.java:96:19:96:24 | source : SAXSource | semmle.label | source : SAXSource | +| DocumentBuilderTests.java:96:19:96:41 | getInputSource(...) | semmle.label | getInputSource(...) | +| DocumentBuilderTests.java:102:27:102:65 | new StreamSource(...) : StreamSource | semmle.label | new StreamSource(...) : StreamSource | +| DocumentBuilderTests.java:102:44:102:64 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| DocumentBuilderTests.java:103:19:103:55 | sourceToInputSource(...) | semmle.label | sourceToInputSource(...) | +| DocumentBuilderTests.java:103:49:103:54 | source : StreamSource | semmle.label | source : StreamSource | +| DocumentBuilderTests.java:104:19:104:24 | source : StreamSource | semmle.label | source : StreamSource | +| DocumentBuilderTests.java:104:19:104:41 | getInputStream(...) | semmle.label | getInputStream(...) | +| ParserHelperTests.java:12:55:12:78 | getInputStream(...) | semmle.label | getInputStream(...) | +| SAXBuilderTests.java:8:19:8:39 | getInputStream(...) | semmle.label | getInputStream(...) | +| SAXBuilderTests.java:20:19:20:39 | getInputStream(...) | semmle.label | getInputStream(...) | +| SAXParserTests.java:13:18:13:38 | getInputStream(...) | semmle.label | getInputStream(...) | +| SAXParserTests.java:30:18:30:38 | getInputStream(...) | semmle.label | getInputStream(...) | +| SAXParserTests.java:38:18:38:38 | getInputStream(...) | semmle.label | getInputStream(...) | +| SAXParserTests.java:46:18:46:38 | getInputStream(...) | semmle.label | getInputStream(...) | +| SAXParserTests.java:55:18:55:38 | getInputStream(...) | semmle.label | getInputStream(...) | +| SAXParserTests.java:64:18:64:38 | getInputStream(...) | semmle.label | getInputStream(...) | +| SAXParserTests.java:73:18:73:38 | getInputStream(...) | semmle.label | getInputStream(...) | +| SAXReaderTests.java:8:17:8:37 | getInputStream(...) | semmle.label | getInputStream(...) | +| SAXReaderTests.java:23:17:23:37 | getInputStream(...) | semmle.label | getInputStream(...) | +| SAXReaderTests.java:30:17:30:37 | getInputStream(...) | semmle.label | getInputStream(...) | +| SAXReaderTests.java:37:17:37:37 | getInputStream(...) | semmle.label | getInputStream(...) | +| SAXReaderTests.java:45:17:45:37 | getInputStream(...) | semmle.label | getInputStream(...) | +| SAXReaderTests.java:53:17:53:37 | getInputStream(...) | semmle.label | getInputStream(...) | +| SAXReaderTests.java:61:17:61:37 | getInputStream(...) | semmle.label | getInputStream(...) | +| SAXSourceTests.java:17:24:17:84 | new SAXSource(...) : SAXSource | semmle.label | new SAXSource(...) : SAXSource | +| SAXSourceTests.java:17:46:17:83 | new InputSource(...) : InputSource | semmle.label | new InputSource(...) : InputSource | +| SAXSourceTests.java:17:62:17:82 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| SAXSourceTests.java:20:18:20:23 | source | semmle.label | source | +| SchemaTests.java:12:39:12:77 | new StreamSource(...) | semmle.label | new StreamSource(...) | +| SchemaTests.java:12:56:12:76 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| SchemaTests.java:25:39:25:77 | new StreamSource(...) | semmle.label | new StreamSource(...) | +| SchemaTests.java:25:56:25:76 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| SchemaTests.java:31:39:31:77 | new StreamSource(...) | semmle.label | new StreamSource(...) | +| SchemaTests.java:31:56:31:76 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| SchemaTests.java:38:39:38:77 | new StreamSource(...) | semmle.label | new StreamSource(...) | +| SchemaTests.java:38:56:38:76 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| SchemaTests.java:45:39:45:77 | new StreamSource(...) | semmle.label | new StreamSource(...) | +| SchemaTests.java:45:56:45:76 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| SimpleXMLTests.java:14:41:14:61 | getInputStream(...) | semmle.label | getInputStream(...) | +| SimpleXMLTests.java:19:41:19:61 | getInputStream(...) | semmle.label | getInputStream(...) | +| SimpleXMLTests.java:24:41:24:84 | new InputStreamReader(...) | semmle.label | new InputStreamReader(...) | +| SimpleXMLTests.java:24:63:24:83 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| SimpleXMLTests.java:30:5:30:25 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| SimpleXMLTests.java:30:32:30:32 | b [post update] : byte[] | semmle.label | b [post update] : byte[] | +| SimpleXMLTests.java:31:41:31:53 | new String(...) | semmle.label | new String(...) | +| SimpleXMLTests.java:31:52:31:52 | b : byte[] | semmle.label | b : byte[] | +| SimpleXMLTests.java:37:5:37:25 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| SimpleXMLTests.java:37:32:37:32 | b [post update] : byte[] | semmle.label | b [post update] : byte[] | +| SimpleXMLTests.java:38:41:38:53 | new String(...) | semmle.label | new String(...) | +| SimpleXMLTests.java:38:52:38:52 | b : byte[] | semmle.label | b : byte[] | +| SimpleXMLTests.java:43:41:43:84 | new InputStreamReader(...) | semmle.label | new InputStreamReader(...) | +| SimpleXMLTests.java:43:63:43:83 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| SimpleXMLTests.java:48:37:48:57 | getInputStream(...) | semmle.label | getInputStream(...) | +| SimpleXMLTests.java:53:37:53:57 | getInputStream(...) | semmle.label | getInputStream(...) | +| SimpleXMLTests.java:58:26:58:46 | getInputStream(...) | semmle.label | getInputStream(...) | +| SimpleXMLTests.java:63:26:63:46 | getInputStream(...) | semmle.label | getInputStream(...) | +| SimpleXMLTests.java:68:37:68:80 | new InputStreamReader(...) | semmle.label | new InputStreamReader(...) | +| SimpleXMLTests.java:68:59:68:79 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| SimpleXMLTests.java:73:37:73:80 | new InputStreamReader(...) | semmle.label | new InputStreamReader(...) | +| SimpleXMLTests.java:73:59:73:79 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| SimpleXMLTests.java:78:26:78:69 | new InputStreamReader(...) | semmle.label | new InputStreamReader(...) | +| SimpleXMLTests.java:78:48:78:68 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| SimpleXMLTests.java:83:26:83:69 | new InputStreamReader(...) | semmle.label | new InputStreamReader(...) | +| SimpleXMLTests.java:83:48:83:68 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| SimpleXMLTests.java:89:5:89:25 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| SimpleXMLTests.java:89:32:89:32 | b [post update] : byte[] | semmle.label | b [post update] : byte[] | +| SimpleXMLTests.java:90:37:90:49 | new String(...) | semmle.label | new String(...) | +| SimpleXMLTests.java:90:48:90:48 | b : byte[] | semmle.label | b : byte[] | +| SimpleXMLTests.java:96:5:96:25 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| SimpleXMLTests.java:96:32:96:32 | b [post update] : byte[] | semmle.label | b [post update] : byte[] | +| SimpleXMLTests.java:97:37:97:49 | new String(...) | semmle.label | new String(...) | +| SimpleXMLTests.java:97:48:97:48 | b : byte[] | semmle.label | b : byte[] | +| SimpleXMLTests.java:103:5:103:25 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| SimpleXMLTests.java:103:32:103:32 | b [post update] : byte[] | semmle.label | b [post update] : byte[] | +| SimpleXMLTests.java:104:26:104:38 | new String(...) | semmle.label | new String(...) | +| SimpleXMLTests.java:104:37:104:37 | b : byte[] | semmle.label | b : byte[] | +| SimpleXMLTests.java:110:5:110:25 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| SimpleXMLTests.java:110:32:110:32 | b [post update] : byte[] | semmle.label | b [post update] : byte[] | +| SimpleXMLTests.java:111:26:111:38 | new String(...) | semmle.label | new String(...) | +| SimpleXMLTests.java:111:37:111:37 | b : byte[] | semmle.label | b : byte[] | +| SimpleXMLTests.java:115:22:115:42 | getInputStream(...) | semmle.label | getInputStream(...) | +| SimpleXMLTests.java:119:22:119:65 | new InputStreamReader(...) | semmle.label | new InputStreamReader(...) | +| SimpleXMLTests.java:119:44:119:64 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| SimpleXMLTests.java:124:22:124:42 | getInputStream(...) | semmle.label | getInputStream(...) | +| SimpleXMLTests.java:129:22:129:65 | new InputStreamReader(...) | semmle.label | new InputStreamReader(...) | +| SimpleXMLTests.java:129:44:129:64 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| SimpleXMLTests.java:134:22:134:42 | getInputStream(...) | semmle.label | getInputStream(...) | +| SimpleXMLTests.java:139:22:139:65 | new InputStreamReader(...) | semmle.label | new InputStreamReader(...) | +| SimpleXMLTests.java:139:44:139:64 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| SimpleXMLTests.java:145:5:145:25 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| SimpleXMLTests.java:145:32:145:32 | b [post update] : byte[] | semmle.label | b [post update] : byte[] | +| SimpleXMLTests.java:146:22:146:34 | new String(...) | semmle.label | new String(...) | +| SimpleXMLTests.java:146:33:146:33 | b : byte[] | semmle.label | b : byte[] | +| SimpleXMLTests.java:152:5:152:25 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| SimpleXMLTests.java:152:32:152:32 | b [post update] : byte[] | semmle.label | b [post update] : byte[] | +| SimpleXMLTests.java:153:22:153:34 | new String(...) | semmle.label | new String(...) | +| SimpleXMLTests.java:153:33:153:33 | b : byte[] | semmle.label | b : byte[] | +| TransformerTests.java:20:27:20:65 | new StreamSource(...) | semmle.label | new StreamSource(...) | +| TransformerTests.java:20:44:20:64 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| TransformerTests.java:21:23:21:61 | new StreamSource(...) | semmle.label | new StreamSource(...) | +| TransformerTests.java:21:40:21:60 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| TransformerTests.java:71:27:71:65 | new StreamSource(...) | semmle.label | new StreamSource(...) | +| TransformerTests.java:71:44:71:64 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| TransformerTests.java:72:23:72:61 | new StreamSource(...) | semmle.label | new StreamSource(...) | +| TransformerTests.java:72:40:72:60 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| TransformerTests.java:79:27:79:65 | new StreamSource(...) | semmle.label | new StreamSource(...) | +| TransformerTests.java:79:44:79:64 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| TransformerTests.java:80:23:80:61 | new StreamSource(...) | semmle.label | new StreamSource(...) | +| TransformerTests.java:80:40:80:60 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| TransformerTests.java:88:27:88:65 | new StreamSource(...) | semmle.label | new StreamSource(...) | +| TransformerTests.java:88:44:88:64 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| TransformerTests.java:89:23:89:61 | new StreamSource(...) | semmle.label | new StreamSource(...) | +| TransformerTests.java:89:40:89:60 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| TransformerTests.java:97:27:97:65 | new StreamSource(...) | semmle.label | new StreamSource(...) | +| TransformerTests.java:97:44:97:64 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| TransformerTests.java:98:23:98:61 | new StreamSource(...) | semmle.label | new StreamSource(...) | +| TransformerTests.java:98:40:98:60 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| TransformerTests.java:103:21:103:59 | new StreamSource(...) | semmle.label | new StreamSource(...) | +| TransformerTests.java:103:38:103:58 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| TransformerTests.java:116:21:116:59 | new StreamSource(...) | semmle.label | new StreamSource(...) | +| TransformerTests.java:116:38:116:58 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| TransformerTests.java:122:21:122:59 | new StreamSource(...) | semmle.label | new StreamSource(...) | +| TransformerTests.java:122:38:122:58 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| TransformerTests.java:129:21:129:59 | new StreamSource(...) | semmle.label | new StreamSource(...) | +| TransformerTests.java:129:38:129:58 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| TransformerTests.java:136:21:136:59 | new StreamSource(...) | semmle.label | new StreamSource(...) | +| TransformerTests.java:136:38:136:58 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| TransformerTests.java:141:21:141:73 | new SAXSource(...) | semmle.label | new SAXSource(...) | +| TransformerTests.java:141:35:141:72 | new InputSource(...) : InputSource | semmle.label | new InputSource(...) : InputSource | +| TransformerTests.java:141:51:141:71 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| UnmarshallerTests.java:29:18:29:38 | getInputStream(...) | semmle.label | getInputStream(...) | +| ValidatorTests.java:17:49:17:72 | getInputStream(...) : ServletInputStream | semmle.label | getInputStream(...) : ServletInputStream | +| ValidatorTests.java:21:31:21:66 | new StreamSource(...) : StreamSource | semmle.label | new StreamSource(...) : StreamSource | +| ValidatorTests.java:21:48:21:65 | servletInputStream : ServletInputStream | semmle.label | servletInputStream : ServletInputStream | +| ValidatorTests.java:22:28:22:33 | source | semmle.label | source | +| XMLDecoderTests.java:16:49:16:72 | getInputStream(...) : ServletInputStream | semmle.label | getInputStream(...) : ServletInputStream | +| XMLDecoderTests.java:17:33:17:66 | new XMLDecoder(...) : XMLDecoder | semmle.label | new XMLDecoder(...) : XMLDecoder | +| XMLDecoderTests.java:17:48:17:65 | servletInputStream : ServletInputStream | semmle.label | servletInputStream : ServletInputStream | +| XMLDecoderTests.java:18:9:18:18 | xmlDecoder | semmle.label | xmlDecoder | +| XMLReaderTests.java:16:18:16:55 | new InputSource(...) | semmle.label | new InputSource(...) | +| XMLReaderTests.java:16:34:16:54 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| XMLReaderTests.java:56:18:56:55 | new InputSource(...) | semmle.label | new InputSource(...) | +| XMLReaderTests.java:56:34:56:54 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| XMLReaderTests.java:63:18:63:55 | new InputSource(...) | semmle.label | new InputSource(...) | +| XMLReaderTests.java:63:34:63:54 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| XMLReaderTests.java:70:18:70:55 | new InputSource(...) | semmle.label | new InputSource(...) | +| XMLReaderTests.java:70:34:70:54 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| XMLReaderTests.java:78:18:78:55 | new InputSource(...) | semmle.label | new InputSource(...) | +| XMLReaderTests.java:78:34:78:54 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| XMLReaderTests.java:86:18:86:55 | new InputSource(...) | semmle.label | new InputSource(...) | +| XMLReaderTests.java:86:34:86:54 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| XMLReaderTests.java:94:18:94:55 | new InputSource(...) | semmle.label | new InputSource(...) | +| XMLReaderTests.java:94:34:94:54 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| XMLReaderTests.java:100:18:100:55 | new InputSource(...) | semmle.label | new InputSource(...) | +| XMLReaderTests.java:100:34:100:54 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| XPathExpressionTests.java:27:19:27:56 | new InputSource(...) | semmle.label | new InputSource(...) | +| XPathExpressionTests.java:27:35:27:55 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| XPathExpressionTests.java:42:23:42:60 | new InputSource(...) | semmle.label | new InputSource(...) | +| XPathExpressionTests.java:42:39:42:59 | getInputStream(...) : InputStream | semmle.label | getInputStream(...) : InputStream | +| XmlInputFactoryTests.java:9:35:9:55 | getInputStream(...) | semmle.label | getInputStream(...) | +| XmlInputFactoryTests.java:10:34:10:54 | getInputStream(...) | semmle.label | getInputStream(...) | +| XmlInputFactoryTests.java:24:35:24:55 | getInputStream(...) | semmle.label | getInputStream(...) | +| XmlInputFactoryTests.java:25:34:25:54 | getInputStream(...) | semmle.label | getInputStream(...) | +| XmlInputFactoryTests.java:31:35:31:55 | getInputStream(...) | semmle.label | getInputStream(...) | +| XmlInputFactoryTests.java:32:34:32:54 | getInputStream(...) | semmle.label | getInputStream(...) | +| XmlInputFactoryTests.java:39:35:39:55 | getInputStream(...) | semmle.label | getInputStream(...) | +| XmlInputFactoryTests.java:40:34:40:54 | getInputStream(...) | semmle.label | getInputStream(...) | +| XmlInputFactoryTests.java:47:35:47:55 | getInputStream(...) | semmle.label | getInputStream(...) | +| XmlInputFactoryTests.java:48:34:48:54 | getInputStream(...) | semmle.label | getInputStream(...) | +| XmlInputFactoryTests.java:55:35:55:55 | getInputStream(...) | semmle.label | getInputStream(...) | +| XmlInputFactoryTests.java:56:34:56:54 | getInputStream(...) | semmle.label | getInputStream(...) | +subpaths diff --git a/java/ql/test/query-tests/security/CWE-611/XXE.ql b/java/ql/test/query-tests/security/CWE-611/XXE.ql deleted file mode 100644 index 21483d8f658..00000000000 --- a/java/ql/test/query-tests/security/CWE-611/XXE.ql +++ /dev/null @@ -1,4 +0,0 @@ -import java -import utils.test.InlineFlowTest -import semmle.code.java.security.XxeRemoteQuery -import TaintFlowTest diff --git a/java/ql/test/query-tests/security/CWE-611/XXE.qlref b/java/ql/test/query-tests/security/CWE-611/XXE.qlref new file mode 100644 index 00000000000..29f544d9a45 --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-611/XXE.qlref @@ -0,0 +1,4 @@ +query: Security/CWE/CWE-611/XXE.ql +postprocess: + - utils/test/PrettyPrintModels.ql + - utils/test/InlineExpectationsTestQuery.ql diff --git a/java/ql/test/query-tests/security/CWE-611/XmlInputFactoryTests.java b/java/ql/test/query-tests/security/CWE-611/XmlInputFactoryTests.java index a75bcde8c1f..343b8ec3df0 100644 --- a/java/ql/test/query-tests/security/CWE-611/XmlInputFactoryTests.java +++ b/java/ql/test/query-tests/security/CWE-611/XmlInputFactoryTests.java @@ -6,8 +6,8 @@ public class XmlInputFactoryTests { public void unconfigureFactory(Socket sock) throws Exception { XMLInputFactory factory = XMLInputFactory.newFactory(); - factory.createXMLStreamReader(sock.getInputStream()); // $ hasTaintFlow - factory.createXMLEventReader(sock.getInputStream()); // $ hasTaintFlow + factory.createXMLStreamReader(sock.getInputStream()); // $ Alert + factory.createXMLEventReader(sock.getInputStream()); // $ Alert } public void safeFactory(Socket sock) throws Exception { @@ -21,38 +21,38 @@ public class XmlInputFactoryTests { public void misConfiguredFactory(Socket sock) throws Exception { XMLInputFactory factory = XMLInputFactory.newFactory(); factory.setProperty("javax.xml.stream.isSupportingExternalEntities", false); - factory.createXMLStreamReader(sock.getInputStream()); // $ hasTaintFlow - factory.createXMLEventReader(sock.getInputStream()); // $ hasTaintFlow + factory.createXMLStreamReader(sock.getInputStream()); // $ Alert + factory.createXMLEventReader(sock.getInputStream()); // $ Alert } public void misConfiguredFactory2(Socket sock) throws Exception { XMLInputFactory factory = XMLInputFactory.newFactory(); factory.setProperty(XMLInputFactory.SUPPORT_DTD, false); - factory.createXMLStreamReader(sock.getInputStream()); // $ hasTaintFlow - factory.createXMLEventReader(sock.getInputStream()); // $ hasTaintFlow + factory.createXMLStreamReader(sock.getInputStream()); // $ Alert + factory.createXMLEventReader(sock.getInputStream()); // $ Alert } public void misConfiguredFactory3(Socket sock) throws Exception { XMLInputFactory factory = XMLInputFactory.newFactory(); factory.setProperty("javax.xml.stream.isSupportingExternalEntities", true); factory.setProperty(XMLInputFactory.SUPPORT_DTD, true); - factory.createXMLStreamReader(sock.getInputStream()); // $ hasTaintFlow - factory.createXMLEventReader(sock.getInputStream()); // $ hasTaintFlow + factory.createXMLStreamReader(sock.getInputStream()); // $ Alert + factory.createXMLEventReader(sock.getInputStream()); // $ Alert } public void misConfiguredFactory4(Socket sock) throws Exception { XMLInputFactory factory = XMLInputFactory.newFactory(); factory.setProperty("javax.xml.stream.isSupportingExternalEntities", false); factory.setProperty(XMLInputFactory.SUPPORT_DTD, true); - factory.createXMLStreamReader(sock.getInputStream()); // $ hasTaintFlow - factory.createXMLEventReader(sock.getInputStream()); // $ hasTaintFlow + factory.createXMLStreamReader(sock.getInputStream()); // $ Alert + factory.createXMLEventReader(sock.getInputStream()); // $ Alert } public void misConfiguredFactory5(Socket sock) throws Exception { XMLInputFactory factory = XMLInputFactory.newFactory(); factory.setProperty("javax.xml.stream.isSupportingExternalEntities", true); factory.setProperty(XMLInputFactory.SUPPORT_DTD, false); - factory.createXMLStreamReader(sock.getInputStream()); // $ hasTaintFlow - factory.createXMLEventReader(sock.getInputStream()); // $ hasTaintFlow + factory.createXMLStreamReader(sock.getInputStream()); // $ Alert + factory.createXMLEventReader(sock.getInputStream()); // $ Alert } } diff --git a/java/ql/test/query-tests/security/CWE-643/XPathInjectionTest.expected b/java/ql/test/query-tests/security/CWE-643/XPathInjectionTest.expected index e69de29bb2d..5a460dbde52 100644 --- a/java/ql/test/query-tests/security/CWE-643/XPathInjectionTest.expected +++ b/java/ql/test/query-tests/security/CWE-643/XPathInjectionTest.expected @@ -0,0 +1,197 @@ +#select +| XPathInjectionTest.java:91:24:91:33 | expression | XPathInjectionTest.java:77:23:77:50 | getParameter(...) : String | XPathInjectionTest.java:91:24:91:33 | expression | XPath expression depends on a $@. | XPathInjectionTest.java:77:23:77:50 | getParameter(...) | user-provided value | +| XPathInjectionTest.java:91:24:91:33 | expression | XPathInjectionTest.java:78:23:78:50 | getParameter(...) : String | XPathInjectionTest.java:91:24:91:33 | expression | XPath expression depends on a $@. | XPathInjectionTest.java:78:23:78:50 | getParameter(...) | user-provided value | +| XPathInjectionTest.java:92:34:92:43 | expression | XPathInjectionTest.java:77:23:77:50 | getParameter(...) : String | XPathInjectionTest.java:92:34:92:43 | expression | XPath expression depends on a $@. | XPathInjectionTest.java:77:23:77:50 | getParameter(...) | user-provided value | +| XPathInjectionTest.java:92:34:92:43 | expression | XPathInjectionTest.java:78:23:78:50 | getParameter(...) : String | XPathInjectionTest.java:92:34:92:43 | expression | XPath expression depends on a $@. | XPathInjectionTest.java:78:23:78:50 | getParameter(...) | user-provided value | +| XPathInjectionTest.java:93:23:93:82 | ... + ... | XPathInjectionTest.java:77:23:77:50 | getParameter(...) : String | XPathInjectionTest.java:93:23:93:82 | ... + ... | XPath expression depends on a $@. | XPathInjectionTest.java:77:23:77:50 | getParameter(...) | user-provided value | +| XPathInjectionTest.java:93:23:93:82 | ... + ... | XPathInjectionTest.java:78:23:78:50 | getParameter(...) : String | XPathInjectionTest.java:93:23:93:82 | ... + ... | XPath expression depends on a $@. | XPathInjectionTest.java:78:23:78:50 | getParameter(...) | user-provided value | +| XPathInjectionTest.java:96:28:96:37 | expression | XPathInjectionTest.java:77:23:77:50 | getParameter(...) : String | XPathInjectionTest.java:96:28:96:37 | expression | XPath expression depends on a $@. | XPathInjectionTest.java:77:23:77:50 | getParameter(...) | user-provided value | +| XPathInjectionTest.java:96:28:96:37 | expression | XPathInjectionTest.java:78:23:78:50 | getParameter(...) : String | XPathInjectionTest.java:96:28:96:37 | expression | XPath expression depends on a $@. | XPathInjectionTest.java:78:23:78:50 | getParameter(...) | user-provided value | +| XPathInjectionTest.java:97:38:97:47 | expression | XPathInjectionTest.java:77:23:77:50 | getParameter(...) : String | XPathInjectionTest.java:97:38:97:47 | expression | XPath expression depends on a $@. | XPathInjectionTest.java:77:23:77:50 | getParameter(...) | user-provided value | +| XPathInjectionTest.java:97:38:97:47 | expression | XPathInjectionTest.java:78:23:78:50 | getParameter(...) : String | XPathInjectionTest.java:97:38:97:47 | expression | XPath expression depends on a $@. | XPathInjectionTest.java:78:23:78:50 | getParameter(...) | user-provided value | +| XPathInjectionTest.java:98:27:98:86 | ... + ... | XPathInjectionTest.java:77:23:77:50 | getParameter(...) : String | XPathInjectionTest.java:98:27:98:86 | ... + ... | XPath expression depends on a $@. | XPathInjectionTest.java:77:23:77:50 | getParameter(...) | user-provided value | +| XPathInjectionTest.java:98:27:98:86 | ... + ... | XPathInjectionTest.java:78:23:78:50 | getParameter(...) : String | XPathInjectionTest.java:98:27:98:86 | ... + ... | XPath expression depends on a $@. | XPathInjectionTest.java:78:23:78:50 | getParameter(...) | user-provided value | +| XPathInjectionTest.java:107:23:107:27 | query | XPathInjectionTest.java:77:23:77:50 | getParameter(...) : String | XPathInjectionTest.java:107:23:107:27 | query | XPath expression depends on a $@. | XPathInjectionTest.java:77:23:77:50 | getParameter(...) | user-provided value | +| XPathInjectionTest.java:107:23:107:27 | query | XPathInjectionTest.java:78:23:78:50 | getParameter(...) : String | XPathInjectionTest.java:107:23:107:27 | query | XPath expression depends on a $@. | XPathInjectionTest.java:78:23:78:50 | getParameter(...) | user-provided value | +| XPathInjectionTest.java:108:27:108:31 | query | XPathInjectionTest.java:77:23:77:50 | getParameter(...) : String | XPathInjectionTest.java:108:27:108:31 | query | XPath expression depends on a $@. | XPathInjectionTest.java:77:23:77:50 | getParameter(...) | user-provided value | +| XPathInjectionTest.java:108:27:108:31 | query | XPathInjectionTest.java:78:23:78:50 | getParameter(...) : String | XPathInjectionTest.java:108:27:108:31 | query | XPath expression depends on a $@. | XPathInjectionTest.java:78:23:78:50 | getParameter(...) | user-provided value | +| XPathInjectionTest.java:125:31:125:90 | ... + ... | XPathInjectionTest.java:77:23:77:50 | getParameter(...) : String | XPathInjectionTest.java:125:31:125:90 | ... + ... | XPath expression depends on a $@. | XPathInjectionTest.java:77:23:77:50 | getParameter(...) | user-provided value | +| XPathInjectionTest.java:125:31:125:90 | ... + ... | XPathInjectionTest.java:78:23:78:50 | getParameter(...) : String | XPathInjectionTest.java:125:31:125:90 | ... + ... | XPath expression depends on a $@. | XPathInjectionTest.java:78:23:78:50 | getParameter(...) | user-provided value | +| XPathInjectionTest.java:126:30:126:89 | ... + ... | XPathInjectionTest.java:77:23:77:50 | getParameter(...) : String | XPathInjectionTest.java:126:30:126:89 | ... + ... | XPath expression depends on a $@. | XPathInjectionTest.java:77:23:77:50 | getParameter(...) | user-provided value | +| XPathInjectionTest.java:126:30:126:89 | ... + ... | XPathInjectionTest.java:78:23:78:50 | getParameter(...) : String | XPathInjectionTest.java:126:30:126:89 | ... + ... | XPath expression depends on a $@. | XPathInjectionTest.java:78:23:78:50 | getParameter(...) | user-provided value | +| XPathInjectionTest.java:127:59:127:93 | ... + ... | XPathInjectionTest.java:78:23:78:50 | getParameter(...) : String | XPathInjectionTest.java:127:59:127:93 | ... + ... | XPath expression depends on a $@. | XPathInjectionTest.java:78:23:78:50 | getParameter(...) | user-provided value | +| XPathInjectionTest.java:128:35:128:94 | ... + ... | XPathInjectionTest.java:77:23:77:50 | getParameter(...) : String | XPathInjectionTest.java:128:35:128:94 | ... + ... | XPath expression depends on a $@. | XPathInjectionTest.java:77:23:77:50 | getParameter(...) | user-provided value | +| XPathInjectionTest.java:128:35:128:94 | ... + ... | XPathInjectionTest.java:78:23:78:50 | getParameter(...) : String | XPathInjectionTest.java:128:35:128:94 | ... + ... | XPath expression depends on a $@. | XPathInjectionTest.java:78:23:78:50 | getParameter(...) | user-provided value | +| XPathInjectionTest.java:129:26:129:85 | ... + ... | XPathInjectionTest.java:77:23:77:50 | getParameter(...) : String | XPathInjectionTest.java:129:26:129:85 | ... + ... | XPath expression depends on a $@. | XPathInjectionTest.java:77:23:77:50 | getParameter(...) | user-provided value | +| XPathInjectionTest.java:129:26:129:85 | ... + ... | XPathInjectionTest.java:78:23:78:50 | getParameter(...) : String | XPathInjectionTest.java:129:26:129:85 | ... + ... | XPath expression depends on a $@. | XPathInjectionTest.java:78:23:78:50 | getParameter(...) | user-provided value | +| XPathInjectionTest.java:130:32:130:91 | ... + ... | XPathInjectionTest.java:77:23:77:50 | getParameter(...) : String | XPathInjectionTest.java:130:32:130:91 | ... + ... | XPath expression depends on a $@. | XPathInjectionTest.java:77:23:77:50 | getParameter(...) | user-provided value | +| XPathInjectionTest.java:130:32:130:91 | ... + ... | XPathInjectionTest.java:78:23:78:50 | getParameter(...) : String | XPathInjectionTest.java:130:32:130:91 | ... + ... | XPath expression depends on a $@. | XPathInjectionTest.java:78:23:78:50 | getParameter(...) | user-provided value | +| XPathInjectionTest.java:131:26:131:85 | ... + ... | XPathInjectionTest.java:77:23:77:50 | getParameter(...) : String | XPathInjectionTest.java:131:26:131:85 | ... + ... | XPath expression depends on a $@. | XPathInjectionTest.java:77:23:77:50 | getParameter(...) | user-provided value | +| XPathInjectionTest.java:131:26:131:85 | ... + ... | XPathInjectionTest.java:78:23:78:50 | getParameter(...) : String | XPathInjectionTest.java:131:26:131:85 | ... + ... | XPath expression depends on a $@. | XPathInjectionTest.java:78:23:78:50 | getParameter(...) | user-provided value | +| XPathInjectionTest.java:132:30:132:89 | ... + ... | XPathInjectionTest.java:77:23:77:50 | getParameter(...) : String | XPathInjectionTest.java:132:30:132:89 | ... + ... | XPath expression depends on a $@. | XPathInjectionTest.java:77:23:77:50 | getParameter(...) | user-provided value | +| XPathInjectionTest.java:132:30:132:89 | ... + ... | XPathInjectionTest.java:78:23:78:50 | getParameter(...) : String | XPathInjectionTest.java:132:30:132:89 | ... + ... | XPath expression depends on a $@. | XPathInjectionTest.java:78:23:78:50 | getParameter(...) | user-provided value | +| XPathInjectionTest.java:134:26:134:85 | ... + ... | XPathInjectionTest.java:77:23:77:50 | getParameter(...) : String | XPathInjectionTest.java:134:26:134:85 | ... + ... | XPath expression depends on a $@. | XPathInjectionTest.java:77:23:77:50 | getParameter(...) | user-provided value | +| XPathInjectionTest.java:134:26:134:85 | ... + ... | XPathInjectionTest.java:78:23:78:50 | getParameter(...) : String | XPathInjectionTest.java:134:26:134:85 | ... + ... | XPath expression depends on a $@. | XPathInjectionTest.java:78:23:78:50 | getParameter(...) | user-provided value | +| XPathInjectionTest.java:135:26:135:85 | ... + ... | XPathInjectionTest.java:77:23:77:50 | getParameter(...) : String | XPathInjectionTest.java:135:26:135:85 | ... + ... | XPath expression depends on a $@. | XPathInjectionTest.java:77:23:77:50 | getParameter(...) | user-provided value | +| XPathInjectionTest.java:135:26:135:85 | ... + ... | XPathInjectionTest.java:78:23:78:50 | getParameter(...) : String | XPathInjectionTest.java:135:26:135:85 | ... + ... | XPath expression depends on a $@. | XPathInjectionTest.java:78:23:78:50 | getParameter(...) | user-provided value | +| XPathInjectionTest.java:139:34:139:93 | ... + ... | XPathInjectionTest.java:77:23:77:50 | getParameter(...) : String | XPathInjectionTest.java:139:34:139:93 | ... + ... | XPath expression depends on a $@. | XPathInjectionTest.java:77:23:77:50 | getParameter(...) | user-provided value | +| XPathInjectionTest.java:139:34:139:93 | ... + ... | XPathInjectionTest.java:78:23:78:50 | getParameter(...) : String | XPathInjectionTest.java:139:34:139:93 | ... + ... | XPath expression depends on a $@. | XPathInjectionTest.java:78:23:78:50 | getParameter(...) | user-provided value | +| XPathInjectionTest.java:140:32:140:91 | ... + ... | XPathInjectionTest.java:77:23:77:50 | getParameter(...) : String | XPathInjectionTest.java:140:32:140:91 | ... + ... | XPath expression depends on a $@. | XPathInjectionTest.java:77:23:77:50 | getParameter(...) | user-provided value | +| XPathInjectionTest.java:140:32:140:91 | ... + ... | XPathInjectionTest.java:78:23:78:50 | getParameter(...) : String | XPathInjectionTest.java:140:32:140:91 | ... + ... | XPath expression depends on a $@. | XPathInjectionTest.java:78:23:78:50 | getParameter(...) | user-provided value | +| XPathInjectionTest.java:141:38:141:97 | ... + ... | XPathInjectionTest.java:77:23:77:50 | getParameter(...) : String | XPathInjectionTest.java:141:38:141:97 | ... + ... | XPath expression depends on a $@. | XPathInjectionTest.java:77:23:77:50 | getParameter(...) | user-provided value | +| XPathInjectionTest.java:141:38:141:97 | ... + ... | XPathInjectionTest.java:78:23:78:50 | getParameter(...) : String | XPathInjectionTest.java:141:38:141:97 | ... + ... | XPath expression depends on a $@. | XPathInjectionTest.java:78:23:78:50 | getParameter(...) | user-provided value | +| XPathInjectionTest.java:143:38:143:97 | ... + ... | XPathInjectionTest.java:77:23:77:50 | getParameter(...) : String | XPathInjectionTest.java:143:38:143:97 | ... + ... | XPath expression depends on a $@. | XPathInjectionTest.java:77:23:77:50 | getParameter(...) | user-provided value | +| XPathInjectionTest.java:143:38:143:97 | ... + ... | XPathInjectionTest.java:78:23:78:50 | getParameter(...) : String | XPathInjectionTest.java:143:38:143:97 | ... + ... | XPath expression depends on a $@. | XPathInjectionTest.java:78:23:78:50 | getParameter(...) | user-provided value | +| XPathInjectionTest.java:144:36:144:95 | ... + ... | XPathInjectionTest.java:77:23:77:50 | getParameter(...) : String | XPathInjectionTest.java:144:36:144:95 | ... + ... | XPath expression depends on a $@. | XPathInjectionTest.java:77:23:77:50 | getParameter(...) | user-provided value | +| XPathInjectionTest.java:144:36:144:95 | ... + ... | XPathInjectionTest.java:78:23:78:50 | getParameter(...) : String | XPathInjectionTest.java:144:36:144:95 | ... + ... | XPath expression depends on a $@. | XPathInjectionTest.java:78:23:78:50 | getParameter(...) | user-provided value | +| XPathInjectionTest.java:145:42:145:101 | ... + ... | XPathInjectionTest.java:77:23:77:50 | getParameter(...) : String | XPathInjectionTest.java:145:42:145:101 | ... + ... | XPath expression depends on a $@. | XPathInjectionTest.java:77:23:77:50 | getParameter(...) | user-provided value | +| XPathInjectionTest.java:145:42:145:101 | ... + ... | XPathInjectionTest.java:78:23:78:50 | getParameter(...) : String | XPathInjectionTest.java:145:42:145:101 | ... + ... | XPath expression depends on a $@. | XPathInjectionTest.java:78:23:78:50 | getParameter(...) | user-provided value | +| XPathInjectionTest.java:146:36:146:95 | ... + ... | XPathInjectionTest.java:77:23:77:50 | getParameter(...) : String | XPathInjectionTest.java:146:36:146:95 | ... + ... | XPath expression depends on a $@. | XPathInjectionTest.java:77:23:77:50 | getParameter(...) | user-provided value | +| XPathInjectionTest.java:146:36:146:95 | ... + ... | XPathInjectionTest.java:78:23:78:50 | getParameter(...) : String | XPathInjectionTest.java:146:36:146:95 | ... + ... | XPath expression depends on a $@. | XPathInjectionTest.java:78:23:78:50 | getParameter(...) | user-provided value | +| XPathInjectionTest.java:147:52:147:111 | ... + ... | XPathInjectionTest.java:77:23:77:50 | getParameter(...) : String | XPathInjectionTest.java:147:52:147:111 | ... + ... | XPath expression depends on a $@. | XPathInjectionTest.java:77:23:77:50 | getParameter(...) | user-provided value | +| XPathInjectionTest.java:147:52:147:111 | ... + ... | XPathInjectionTest.java:78:23:78:50 | getParameter(...) : String | XPathInjectionTest.java:147:52:147:111 | ... + ... | XPath expression depends on a $@. | XPathInjectionTest.java:78:23:78:50 | getParameter(...) | user-provided value | +| XPathInjectionTest.java:150:39:150:98 | ... + ... | XPathInjectionTest.java:77:23:77:50 | getParameter(...) : String | XPathInjectionTest.java:150:39:150:98 | ... + ... | XPath expression depends on a $@. | XPathInjectionTest.java:77:23:77:50 | getParameter(...) | user-provided value | +| XPathInjectionTest.java:150:39:150:98 | ... + ... | XPathInjectionTest.java:78:23:78:50 | getParameter(...) : String | XPathInjectionTest.java:150:39:150:98 | ... + ... | XPath expression depends on a $@. | XPathInjectionTest.java:78:23:78:50 | getParameter(...) | user-provided value | +| XPathInjectionTest.java:151:37:151:96 | ... + ... | XPathInjectionTest.java:77:23:77:50 | getParameter(...) : String | XPathInjectionTest.java:151:37:151:96 | ... + ... | XPath expression depends on a $@. | XPathInjectionTest.java:77:23:77:50 | getParameter(...) | user-provided value | +| XPathInjectionTest.java:151:37:151:96 | ... + ... | XPathInjectionTest.java:78:23:78:50 | getParameter(...) : String | XPathInjectionTest.java:151:37:151:96 | ... + ... | XPath expression depends on a $@. | XPathInjectionTest.java:78:23:78:50 | getParameter(...) | user-provided value | +| XPathInjectionTest.java:152:43:152:102 | ... + ... | XPathInjectionTest.java:77:23:77:50 | getParameter(...) : String | XPathInjectionTest.java:152:43:152:102 | ... + ... | XPath expression depends on a $@. | XPathInjectionTest.java:77:23:77:50 | getParameter(...) | user-provided value | +| XPathInjectionTest.java:152:43:152:102 | ... + ... | XPathInjectionTest.java:78:23:78:50 | getParameter(...) : String | XPathInjectionTest.java:152:43:152:102 | ... + ... | XPath expression depends on a $@. | XPathInjectionTest.java:78:23:78:50 | getParameter(...) | user-provided value | +| XPathInjectionTest.java:155:33:155:92 | ... + ... | XPathInjectionTest.java:77:23:77:50 | getParameter(...) : String | XPathInjectionTest.java:155:33:155:92 | ... + ... | XPath expression depends on a $@. | XPathInjectionTest.java:77:23:77:50 | getParameter(...) | user-provided value | +| XPathInjectionTest.java:155:33:155:92 | ... + ... | XPathInjectionTest.java:78:23:78:50 | getParameter(...) : String | XPathInjectionTest.java:155:33:155:92 | ... + ... | XPath expression depends on a $@. | XPathInjectionTest.java:78:23:78:50 | getParameter(...) | user-provided value | +| XPathInjectionTest.java:156:37:156:96 | ... + ... | XPathInjectionTest.java:77:23:77:50 | getParameter(...) : String | XPathInjectionTest.java:156:37:156:96 | ... + ... | XPath expression depends on a $@. | XPathInjectionTest.java:77:23:77:50 | getParameter(...) | user-provided value | +| XPathInjectionTest.java:156:37:156:96 | ... + ... | XPathInjectionTest.java:78:23:78:50 | getParameter(...) : String | XPathInjectionTest.java:156:37:156:96 | ... + ... | XPath expression depends on a $@. | XPathInjectionTest.java:78:23:78:50 | getParameter(...) | user-provided value | +edges +| XPathInjectionTest.java:77:23:77:50 | getParameter(...) : String | XPathInjectionTest.java:91:24:91:33 | expression | provenance | Src:MaD:24 Sink:MaD:2 | +| XPathInjectionTest.java:77:23:77:50 | getParameter(...) : String | XPathInjectionTest.java:92:34:92:43 | expression | provenance | Src:MaD:24 Sink:MaD:3 | +| XPathInjectionTest.java:77:23:77:50 | getParameter(...) : String | XPathInjectionTest.java:93:23:93:82 | ... + ... | provenance | Src:MaD:24 Sink:MaD:1 | +| XPathInjectionTest.java:77:23:77:50 | getParameter(...) : String | XPathInjectionTest.java:96:28:96:37 | expression | provenance | Src:MaD:24 Sink:MaD:2 | +| XPathInjectionTest.java:77:23:77:50 | getParameter(...) : String | XPathInjectionTest.java:97:38:97:47 | expression | provenance | Src:MaD:24 Sink:MaD:3 | +| XPathInjectionTest.java:77:23:77:50 | getParameter(...) : String | XPathInjectionTest.java:98:27:98:86 | ... + ... | provenance | Src:MaD:24 Sink:MaD:1 | +| XPathInjectionTest.java:77:23:77:50 | getParameter(...) : String | XPathInjectionTest.java:101:19:101:22 | user : String | provenance | Src:MaD:24 | +| XPathInjectionTest.java:77:23:77:50 | getParameter(...) : String | XPathInjectionTest.java:125:31:125:90 | ... + ... | provenance | Src:MaD:24 Sink:MaD:21 | +| XPathInjectionTest.java:77:23:77:50 | getParameter(...) : String | XPathInjectionTest.java:126:30:126:89 | ... + ... | provenance | Src:MaD:24 Sink:MaD:20 | +| XPathInjectionTest.java:77:23:77:50 | getParameter(...) : String | XPathInjectionTest.java:128:35:128:94 | ... + ... | provenance | Src:MaD:24 Sink:MaD:22 | +| XPathInjectionTest.java:77:23:77:50 | getParameter(...) : String | XPathInjectionTest.java:129:26:129:85 | ... + ... | provenance | Src:MaD:24 Sink:MaD:23 | +| XPathInjectionTest.java:77:23:77:50 | getParameter(...) : String | XPathInjectionTest.java:130:32:130:91 | ... + ... | provenance | Src:MaD:24 Sink:MaD:19 | +| XPathInjectionTest.java:77:23:77:50 | getParameter(...) : String | XPathInjectionTest.java:131:26:131:85 | ... + ... | provenance | Src:MaD:24 Sink:MaD:18 | +| XPathInjectionTest.java:77:23:77:50 | getParameter(...) : String | XPathInjectionTest.java:132:30:132:89 | ... + ... | provenance | Src:MaD:24 Sink:MaD:17 | +| XPathInjectionTest.java:77:23:77:50 | getParameter(...) : String | XPathInjectionTest.java:134:26:134:85 | ... + ... | provenance | Src:MaD:24 | +| XPathInjectionTest.java:77:23:77:50 | getParameter(...) : String | XPathInjectionTest.java:135:26:135:85 | ... + ... | provenance | Src:MaD:24 | +| XPathInjectionTest.java:77:23:77:50 | getParameter(...) : String | XPathInjectionTest.java:139:34:139:93 | ... + ... | provenance | Src:MaD:24 Sink:MaD:9 | +| XPathInjectionTest.java:77:23:77:50 | getParameter(...) : String | XPathInjectionTest.java:140:32:140:91 | ... + ... | provenance | Src:MaD:24 Sink:MaD:10 | +| XPathInjectionTest.java:77:23:77:50 | getParameter(...) : String | XPathInjectionTest.java:141:38:141:97 | ... + ... | provenance | Src:MaD:24 Sink:MaD:11 | +| XPathInjectionTest.java:77:23:77:50 | getParameter(...) : String | XPathInjectionTest.java:143:38:143:97 | ... + ... | provenance | Src:MaD:24 Sink:MaD:12 | +| XPathInjectionTest.java:77:23:77:50 | getParameter(...) : String | XPathInjectionTest.java:144:36:144:95 | ... + ... | provenance | Src:MaD:24 Sink:MaD:13 | +| XPathInjectionTest.java:77:23:77:50 | getParameter(...) : String | XPathInjectionTest.java:145:42:145:101 | ... + ... | provenance | Src:MaD:24 Sink:MaD:14 | +| XPathInjectionTest.java:77:23:77:50 | getParameter(...) : String | XPathInjectionTest.java:146:36:146:95 | ... + ... | provenance | Src:MaD:24 Sink:MaD:15 | +| XPathInjectionTest.java:77:23:77:50 | getParameter(...) : String | XPathInjectionTest.java:147:52:147:111 | ... + ... | provenance | Src:MaD:24 Sink:MaD:16 | +| XPathInjectionTest.java:77:23:77:50 | getParameter(...) : String | XPathInjectionTest.java:150:39:150:98 | ... + ... | provenance | Src:MaD:24 Sink:MaD:6 | +| XPathInjectionTest.java:77:23:77:50 | getParameter(...) : String | XPathInjectionTest.java:151:37:151:96 | ... + ... | provenance | Src:MaD:24 Sink:MaD:7 | +| XPathInjectionTest.java:77:23:77:50 | getParameter(...) : String | XPathInjectionTest.java:152:43:152:102 | ... + ... | provenance | Src:MaD:24 Sink:MaD:8 | +| XPathInjectionTest.java:77:23:77:50 | getParameter(...) : String | XPathInjectionTest.java:155:33:155:92 | ... + ... | provenance | Src:MaD:24 Sink:MaD:4 | +| XPathInjectionTest.java:77:23:77:50 | getParameter(...) : String | XPathInjectionTest.java:156:37:156:96 | ... + ... | provenance | Src:MaD:24 Sink:MaD:5 | +| XPathInjectionTest.java:78:23:78:50 | getParameter(...) : String | XPathInjectionTest.java:91:24:91:33 | expression | provenance | Src:MaD:24 Sink:MaD:2 | +| XPathInjectionTest.java:78:23:78:50 | getParameter(...) : String | XPathInjectionTest.java:92:34:92:43 | expression | provenance | Src:MaD:24 Sink:MaD:3 | +| XPathInjectionTest.java:78:23:78:50 | getParameter(...) : String | XPathInjectionTest.java:93:23:93:82 | ... + ... | provenance | Src:MaD:24 Sink:MaD:1 | +| XPathInjectionTest.java:78:23:78:50 | getParameter(...) : String | XPathInjectionTest.java:96:28:96:37 | expression | provenance | Src:MaD:24 Sink:MaD:2 | +| XPathInjectionTest.java:78:23:78:50 | getParameter(...) : String | XPathInjectionTest.java:97:38:97:47 | expression | provenance | Src:MaD:24 Sink:MaD:3 | +| XPathInjectionTest.java:78:23:78:50 | getParameter(...) : String | XPathInjectionTest.java:98:27:98:86 | ... + ... | provenance | Src:MaD:24 Sink:MaD:1 | +| XPathInjectionTest.java:78:23:78:50 | getParameter(...) : String | XPathInjectionTest.java:103:19:103:22 | pass : String | provenance | Src:MaD:24 | +| XPathInjectionTest.java:78:23:78:50 | getParameter(...) : String | XPathInjectionTest.java:125:31:125:90 | ... + ... | provenance | Src:MaD:24 Sink:MaD:21 | +| XPathInjectionTest.java:78:23:78:50 | getParameter(...) : String | XPathInjectionTest.java:126:30:126:89 | ... + ... | provenance | Src:MaD:24 Sink:MaD:20 | +| XPathInjectionTest.java:78:23:78:50 | getParameter(...) : String | XPathInjectionTest.java:127:59:127:93 | ... + ... | provenance | Src:MaD:24 Sink:MaD:20 | +| XPathInjectionTest.java:78:23:78:50 | getParameter(...) : String | XPathInjectionTest.java:128:35:128:94 | ... + ... | provenance | Src:MaD:24 Sink:MaD:22 | +| XPathInjectionTest.java:78:23:78:50 | getParameter(...) : String | XPathInjectionTest.java:129:26:129:85 | ... + ... | provenance | Src:MaD:24 Sink:MaD:23 | +| XPathInjectionTest.java:78:23:78:50 | getParameter(...) : String | XPathInjectionTest.java:130:32:130:91 | ... + ... | provenance | Src:MaD:24 Sink:MaD:19 | +| XPathInjectionTest.java:78:23:78:50 | getParameter(...) : String | XPathInjectionTest.java:131:26:131:85 | ... + ... | provenance | Src:MaD:24 Sink:MaD:18 | +| XPathInjectionTest.java:78:23:78:50 | getParameter(...) : String | XPathInjectionTest.java:132:30:132:89 | ... + ... | provenance | Src:MaD:24 Sink:MaD:17 | +| XPathInjectionTest.java:78:23:78:50 | getParameter(...) : String | XPathInjectionTest.java:134:26:134:85 | ... + ... | provenance | Src:MaD:24 | +| XPathInjectionTest.java:78:23:78:50 | getParameter(...) : String | XPathInjectionTest.java:135:26:135:85 | ... + ... | provenance | Src:MaD:24 | +| XPathInjectionTest.java:78:23:78:50 | getParameter(...) : String | XPathInjectionTest.java:139:34:139:93 | ... + ... | provenance | Src:MaD:24 Sink:MaD:9 | +| XPathInjectionTest.java:78:23:78:50 | getParameter(...) : String | XPathInjectionTest.java:140:32:140:91 | ... + ... | provenance | Src:MaD:24 Sink:MaD:10 | +| XPathInjectionTest.java:78:23:78:50 | getParameter(...) : String | XPathInjectionTest.java:141:38:141:97 | ... + ... | provenance | Src:MaD:24 Sink:MaD:11 | +| XPathInjectionTest.java:78:23:78:50 | getParameter(...) : String | XPathInjectionTest.java:143:38:143:97 | ... + ... | provenance | Src:MaD:24 Sink:MaD:12 | +| XPathInjectionTest.java:78:23:78:50 | getParameter(...) : String | XPathInjectionTest.java:144:36:144:95 | ... + ... | provenance | Src:MaD:24 Sink:MaD:13 | +| XPathInjectionTest.java:78:23:78:50 | getParameter(...) : String | XPathInjectionTest.java:145:42:145:101 | ... + ... | provenance | Src:MaD:24 Sink:MaD:14 | +| XPathInjectionTest.java:78:23:78:50 | getParameter(...) : String | XPathInjectionTest.java:146:36:146:95 | ... + ... | provenance | Src:MaD:24 Sink:MaD:15 | +| XPathInjectionTest.java:78:23:78:50 | getParameter(...) : String | XPathInjectionTest.java:147:52:147:111 | ... + ... | provenance | Src:MaD:24 Sink:MaD:16 | +| XPathInjectionTest.java:78:23:78:50 | getParameter(...) : String | XPathInjectionTest.java:150:39:150:98 | ... + ... | provenance | Src:MaD:24 Sink:MaD:6 | +| XPathInjectionTest.java:78:23:78:50 | getParameter(...) : String | XPathInjectionTest.java:151:37:151:96 | ... + ... | provenance | Src:MaD:24 Sink:MaD:7 | +| XPathInjectionTest.java:78:23:78:50 | getParameter(...) : String | XPathInjectionTest.java:152:43:152:102 | ... + ... | provenance | Src:MaD:24 Sink:MaD:8 | +| XPathInjectionTest.java:78:23:78:50 | getParameter(...) : String | XPathInjectionTest.java:155:33:155:92 | ... + ... | provenance | Src:MaD:24 Sink:MaD:4 | +| XPathInjectionTest.java:78:23:78:50 | getParameter(...) : String | XPathInjectionTest.java:156:37:156:96 | ... + ... | provenance | Src:MaD:24 Sink:MaD:5 | +| XPathInjectionTest.java:101:9:101:10 | sb [post update] : StringBuffer | XPathInjectionTest.java:105:24:105:25 | sb : StringBuffer | provenance | | +| XPathInjectionTest.java:101:19:101:22 | user : String | XPathInjectionTest.java:101:9:101:10 | sb [post update] : StringBuffer | provenance | MaD:25 | +| XPathInjectionTest.java:103:9:103:10 | sb [post update] : StringBuffer | XPathInjectionTest.java:105:24:105:25 | sb : StringBuffer | provenance | | +| XPathInjectionTest.java:103:19:103:22 | pass : String | XPathInjectionTest.java:103:9:103:10 | sb [post update] : StringBuffer | provenance | MaD:25 | +| XPathInjectionTest.java:105:24:105:25 | sb : StringBuffer | XPathInjectionTest.java:105:24:105:36 | toString(...) : String | provenance | MaD:26 | +| XPathInjectionTest.java:105:24:105:36 | toString(...) : String | XPathInjectionTest.java:107:23:107:27 | query | provenance | Sink:MaD:1 | +| XPathInjectionTest.java:105:24:105:36 | toString(...) : String | XPathInjectionTest.java:108:27:108:31 | query | provenance | Sink:MaD:1 | +models +| 1 | Sink: javax.xml.xpath; XPath; true; compile; ; ; Argument[0]; xpath-injection; manual | +| 2 | Sink: javax.xml.xpath; XPath; true; evaluate; ; ; Argument[0]; xpath-injection; manual | +| 3 | Sink: javax.xml.xpath; XPath; true; evaluateExpression; ; ; Argument[0]; xpath-injection; manual | +| 4 | Sink: org.dom4j.tree; AbstractNode; true; createPattern; ; ; Argument[0]; xpath-injection; manual | +| 5 | Sink: org.dom4j.tree; AbstractNode; true; createXPathFilter; ; ; Argument[0]; xpath-injection; manual | +| 6 | Sink: org.dom4j.util; ProxyDocumentFactory; true; createPattern; ; ; Argument[0]; xpath-injection; manual | +| 7 | Sink: org.dom4j.util; ProxyDocumentFactory; true; createXPath; ; ; Argument[0]; xpath-injection; manual | +| 8 | Sink: org.dom4j.util; ProxyDocumentFactory; true; createXPathFilter; ; ; Argument[0]; xpath-injection; manual | +| 9 | Sink: org.dom4j; DocumentFactory; true; createPattern; ; ; Argument[0]; xpath-injection; manual | +| 10 | Sink: org.dom4j; DocumentFactory; true; createXPath; ; ; Argument[0]; xpath-injection; manual | +| 11 | Sink: org.dom4j; DocumentFactory; true; createXPathFilter; ; ; Argument[0]; xpath-injection; manual | +| 12 | Sink: org.dom4j; DocumentHelper; false; createPattern; ; ; Argument[0]; xpath-injection; manual | +| 13 | Sink: org.dom4j; DocumentHelper; false; createXPath; ; ; Argument[0]; xpath-injection; manual | +| 14 | Sink: org.dom4j; DocumentHelper; false; createXPathFilter; ; ; Argument[0]; xpath-injection; manual | +| 15 | Sink: org.dom4j; DocumentHelper; false; selectNodes; ; ; Argument[0]; xpath-injection; manual | +| 16 | Sink: org.dom4j; DocumentHelper; false; sort; ; ; Argument[1]; xpath-injection; manual | +| 17 | Sink: org.dom4j; Node; true; createXPath; ; ; Argument[0]; xpath-injection; manual | +| 18 | Sink: org.dom4j; Node; true; matches; ; ; Argument[0]; xpath-injection; manual | +| 19 | Sink: org.dom4j; Node; true; numberValueOf; ; ; Argument[0]; xpath-injection; manual | +| 20 | Sink: org.dom4j; Node; true; selectNodes; ; ; Argument[0..1]; xpath-injection; manual | +| 21 | Sink: org.dom4j; Node; true; selectObject; ; ; Argument[0]; xpath-injection; manual | +| 22 | Sink: org.dom4j; Node; true; selectSingleNode; ; ; Argument[0]; xpath-injection; manual | +| 23 | Sink: org.dom4j; Node; true; valueOf; ; ; Argument[0]; xpath-injection; manual | +| 24 | Source: javax.servlet; ServletRequest; false; getParameter; (String); ; ReturnValue; remote; manual | +| 25 | Summary: java.lang; AbstractStringBuilder; true; append; ; ; Argument[0]; Argument[this]; taint; manual | +| 26 | Summary: java.lang; CharSequence; true; toString; ; ; Argument[this]; ReturnValue; taint; manual | +nodes +| XPathInjectionTest.java:77:23:77:50 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| XPathInjectionTest.java:78:23:78:50 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| XPathInjectionTest.java:91:24:91:33 | expression | semmle.label | expression | +| XPathInjectionTest.java:92:34:92:43 | expression | semmle.label | expression | +| XPathInjectionTest.java:93:23:93:82 | ... + ... | semmle.label | ... + ... | +| XPathInjectionTest.java:96:28:96:37 | expression | semmle.label | expression | +| XPathInjectionTest.java:97:38:97:47 | expression | semmle.label | expression | +| XPathInjectionTest.java:98:27:98:86 | ... + ... | semmle.label | ... + ... | +| XPathInjectionTest.java:101:9:101:10 | sb [post update] : StringBuffer | semmle.label | sb [post update] : StringBuffer | +| XPathInjectionTest.java:101:19:101:22 | user : String | semmle.label | user : String | +| XPathInjectionTest.java:103:9:103:10 | sb [post update] : StringBuffer | semmle.label | sb [post update] : StringBuffer | +| XPathInjectionTest.java:103:19:103:22 | pass : String | semmle.label | pass : String | +| XPathInjectionTest.java:105:24:105:25 | sb : StringBuffer | semmle.label | sb : StringBuffer | +| XPathInjectionTest.java:105:24:105:36 | toString(...) : String | semmle.label | toString(...) : String | +| XPathInjectionTest.java:107:23:107:27 | query | semmle.label | query | +| XPathInjectionTest.java:108:27:108:31 | query | semmle.label | query | +| XPathInjectionTest.java:125:31:125:90 | ... + ... | semmle.label | ... + ... | +| XPathInjectionTest.java:126:30:126:89 | ... + ... | semmle.label | ... + ... | +| XPathInjectionTest.java:127:59:127:93 | ... + ... | semmle.label | ... + ... | +| XPathInjectionTest.java:128:35:128:94 | ... + ... | semmle.label | ... + ... | +| XPathInjectionTest.java:129:26:129:85 | ... + ... | semmle.label | ... + ... | +| XPathInjectionTest.java:130:32:130:91 | ... + ... | semmle.label | ... + ... | +| XPathInjectionTest.java:131:26:131:85 | ... + ... | semmle.label | ... + ... | +| XPathInjectionTest.java:132:30:132:89 | ... + ... | semmle.label | ... + ... | +| XPathInjectionTest.java:134:26:134:85 | ... + ... | semmle.label | ... + ... | +| XPathInjectionTest.java:135:26:135:85 | ... + ... | semmle.label | ... + ... | +| XPathInjectionTest.java:139:34:139:93 | ... + ... | semmle.label | ... + ... | +| XPathInjectionTest.java:140:32:140:91 | ... + ... | semmle.label | ... + ... | +| XPathInjectionTest.java:141:38:141:97 | ... + ... | semmle.label | ... + ... | +| XPathInjectionTest.java:143:38:143:97 | ... + ... | semmle.label | ... + ... | +| XPathInjectionTest.java:144:36:144:95 | ... + ... | semmle.label | ... + ... | +| XPathInjectionTest.java:145:42:145:101 | ... + ... | semmle.label | ... + ... | +| XPathInjectionTest.java:146:36:146:95 | ... + ... | semmle.label | ... + ... | +| XPathInjectionTest.java:147:52:147:111 | ... + ... | semmle.label | ... + ... | +| XPathInjectionTest.java:150:39:150:98 | ... + ... | semmle.label | ... + ... | +| XPathInjectionTest.java:151:37:151:96 | ... + ... | semmle.label | ... + ... | +| XPathInjectionTest.java:152:43:152:102 | ... + ... | semmle.label | ... + ... | +| XPathInjectionTest.java:155:33:155:92 | ... + ... | semmle.label | ... + ... | +| XPathInjectionTest.java:156:37:156:96 | ... + ... | semmle.label | ... + ... | +subpaths diff --git a/java/ql/test/query-tests/security/CWE-643/XPathInjectionTest.java b/java/ql/test/query-tests/security/CWE-643/XPathInjectionTest.java index 5631f3a4ae9..af5d2c11e5f 100644 --- a/java/ql/test/query-tests/security/CWE-643/XPathInjectionTest.java +++ b/java/ql/test/query-tests/security/CWE-643/XPathInjectionTest.java @@ -74,8 +74,8 @@ public class XPathInjectionTest { } public void handle(HttpServletRequest request) throws Exception { - String user = request.getParameter("user"); - String pass = request.getParameter("pass"); + String user = request.getParameter("user"); // $ Source + String pass = request.getParameter("pass"); // $ Source String expression = "/users/user[@name='" + user + "' and @pass='" + pass + "']"; final String xmlStr = "" + " " @@ -88,14 +88,14 @@ public class XPathInjectionTest { XPathFactory factory = XPathFactory.newInstance(); XPath xpath = factory.newXPath(); - xpath.evaluate(expression, doc, XPathConstants.BOOLEAN); // $hasXPathInjection - xpath.evaluateExpression(expression, xmlSource); // $hasXPathInjection - xpath.compile("/users/user[@name='" + user + "' and @pass='" + pass + "']"); // $hasXPathInjection + xpath.evaluate(expression, doc, XPathConstants.BOOLEAN); // $ Alert + xpath.evaluateExpression(expression, xmlSource); // $ Alert + xpath.compile("/users/user[@name='" + user + "' and @pass='" + pass + "']"); // $ Alert XPathImplStub xpathStub = XPathImplStub.getInstance(); - xpathStub.evaluate(expression, doc, XPathConstants.BOOLEAN); // $hasXPathInjection - xpathStub.evaluateExpression(expression, xmlSource); // $hasXPathInjection - xpathStub.compile("/users/user[@name='" + user + "' and @pass='" + pass + "']"); // $hasXPathInjection + xpathStub.evaluate(expression, doc, XPathConstants.BOOLEAN); // $ Alert + xpathStub.evaluateExpression(expression, xmlSource); // $ Alert + xpathStub.compile("/users/user[@name='" + user + "' and @pass='" + pass + "']"); // $ Alert StringBuffer sb = new StringBuffer("/users/user[@name="); sb.append(user); @@ -104,8 +104,8 @@ public class XPathInjectionTest { sb.append("']"); String query = sb.toString(); - xpath.compile(query); // $hasXPathInjection - xpathStub.compile(query); // $hasXPathInjection + xpath.compile(query); // $ Alert + xpathStub.compile(query); // $ Alert String expression4 = "/users/user[@name=$user and @pass=$pass]"; xpath.setXPathVariableResolver(v -> { @@ -122,38 +122,38 @@ public class XPathInjectionTest { SAXReader reader = new SAXReader(); org.dom4j.Document document = reader.read(new ByteArrayInputStream(xmlStr.getBytes())); - document.selectObject("/users/user[@name='" + user + "' and @pass='" + pass + "']"); // $hasXPathInjection - document.selectNodes("/users/user[@name='" + user + "' and @pass='" + pass + "']"); // $hasXPathInjection - document.selectNodes("/users/user[@name='test']", "/users/user[@pass='" + pass + "']"); // $hasXPathInjection - document.selectSingleNode("/users/user[@name='" + user + "' and @pass='" + pass + "']"); // $hasXPathInjection - document.valueOf("/users/user[@name='" + user + "' and @pass='" + pass + "']"); // $hasXPathInjection - document.numberValueOf("/users/user[@name='" + user + "' and @pass='" + pass + "']"); // $hasXPathInjection - document.matches("/users/user[@name='" + user + "' and @pass='" + pass + "']"); // $hasXPathInjection - document.createXPath("/users/user[@name='" + user + "' and @pass='" + pass + "']"); // $hasXPathInjection + document.selectObject("/users/user[@name='" + user + "' and @pass='" + pass + "']"); // $ Alert + document.selectNodes("/users/user[@name='" + user + "' and @pass='" + pass + "']"); // $ Alert + document.selectNodes("/users/user[@name='test']", "/users/user[@pass='" + pass + "']"); // $ Alert + document.selectSingleNode("/users/user[@name='" + user + "' and @pass='" + pass + "']"); // $ Alert + document.valueOf("/users/user[@name='" + user + "' and @pass='" + pass + "']"); // $ Alert + document.numberValueOf("/users/user[@name='" + user + "' and @pass='" + pass + "']"); // $ Alert + document.matches("/users/user[@name='" + user + "' and @pass='" + pass + "']"); // $ Alert + document.createXPath("/users/user[@name='" + user + "' and @pass='" + pass + "']"); // $ Alert - new DefaultXPath("/users/user[@name='" + user + "' and @pass='" + pass + "']"); // $hasXPathInjection - new XPathPattern("/users/user[@name='" + user + "' and @pass='" + pass + "']"); // $hasXPathInjection + new DefaultXPath("/users/user[@name='" + user + "' and @pass='" + pass + "']"); // $ Alert + new XPathPattern("/users/user[@name='" + user + "' and @pass='" + pass + "']"); // $ Alert new XPathPattern(new PatternStub(user)); // $ MISSING: hasXPathInjection // Jaxen is not modeled yet DocumentFactory docFactory = DocumentFactory.getInstance(); - docFactory.createPattern("/users/user[@name='" + user + "' and @pass='" + pass + "']"); // $hasXPathInjection - docFactory.createXPath("/users/user[@name='" + user + "' and @pass='" + pass + "']"); // $hasXPathInjection - docFactory.createXPathFilter("/users/user[@name='" + user + "' and @pass='" + pass + "']"); // $hasXPathInjection + docFactory.createPattern("/users/user[@name='" + user + "' and @pass='" + pass + "']"); // $ Alert + docFactory.createXPath("/users/user[@name='" + user + "' and @pass='" + pass + "']"); // $ Alert + docFactory.createXPathFilter("/users/user[@name='" + user + "' and @pass='" + pass + "']"); // $ Alert - DocumentHelper.createPattern("/users/user[@name='" + user + "' and @pass='" + pass + "']"); // $hasXPathInjection - DocumentHelper.createXPath("/users/user[@name='" + user + "' and @pass='" + pass + "']"); // $hasXPathInjection - DocumentHelper.createXPathFilter("/users/user[@name='" + user + "' and @pass='" + pass + "']"); // $hasXPathInjection - DocumentHelper.selectNodes("/users/user[@name='" + user + "' and @pass='" + pass + "']", new ArrayList()); // $hasXPathInjection - DocumentHelper.sort(new ArrayList(), "/users/user[@name='" + user + "' and @pass='" + pass + "']"); // $hasXPathInjection + DocumentHelper.createPattern("/users/user[@name='" + user + "' and @pass='" + pass + "']"); // $ Alert + DocumentHelper.createXPath("/users/user[@name='" + user + "' and @pass='" + pass + "']"); // $ Alert + DocumentHelper.createXPathFilter("/users/user[@name='" + user + "' and @pass='" + pass + "']"); // $ Alert + DocumentHelper.selectNodes("/users/user[@name='" + user + "' and @pass='" + pass + "']", new ArrayList()); // $ Alert + DocumentHelper.sort(new ArrayList(), "/users/user[@name='" + user + "' and @pass='" + pass + "']"); // $ Alert ProxyDocumentFactoryStub proxyDocFactory = new ProxyDocumentFactoryStub(); - proxyDocFactory.createPattern("/users/user[@name='" + user + "' and @pass='" + pass + "']"); // $hasXPathInjection - proxyDocFactory.createXPath("/users/user[@name='" + user + "' and @pass='" + pass + "']"); // $hasXPathInjection - proxyDocFactory.createXPathFilter("/users/user[@name='" + user + "' and @pass='" + pass + "']"); // $hasXPathInjection + proxyDocFactory.createPattern("/users/user[@name='" + user + "' and @pass='" + pass + "']"); // $ Alert + proxyDocFactory.createXPath("/users/user[@name='" + user + "' and @pass='" + pass + "']"); // $ Alert + proxyDocFactory.createXPathFilter("/users/user[@name='" + user + "' and @pass='" + pass + "']"); // $ Alert Namespace namespace = new Namespace("prefix", "http://some.uri.io"); - namespace.createPattern("/users/user[@name='" + user + "' and @pass='" + pass + "']"); // $hasXPathInjection - namespace.createXPathFilter("/users/user[@name='" + user + "' and @pass='" + pass + "']"); // $hasXPathInjection + namespace.createPattern("/users/user[@name='" + user + "' and @pass='" + pass + "']"); // $ Alert + namespace.createXPathFilter("/users/user[@name='" + user + "' and @pass='" + pass + "']"); // $ Alert org.jaxen.SimpleVariableContext svc = new org.jaxen.SimpleVariableContext(); svc.setVariableValue("user", user); diff --git a/java/ql/test/query-tests/security/CWE-643/XPathInjectionTest.ql b/java/ql/test/query-tests/security/CWE-643/XPathInjectionTest.ql deleted file mode 100644 index 3c7110d8011..00000000000 --- a/java/ql/test/query-tests/security/CWE-643/XPathInjectionTest.ql +++ /dev/null @@ -1,19 +0,0 @@ -import java -import semmle.code.java.dataflow.DataFlow -import semmle.code.java.security.XPathInjectionQuery -import utils.test.InlineExpectationsTest - -module HasXPathInjectionTest implements TestSig { - string getARelevantTag() { result = "hasXPathInjection" } - - predicate hasActualResult(Location location, string element, string tag, string value) { - tag = "hasXPathInjection" and - exists(DataFlow::Node sink | XPathInjectionFlow::flowTo(sink) | - sink.getLocation() = location and - element = sink.toString() and - value = "" - ) - } -} - -import MakeTest diff --git a/java/ql/test/query-tests/security/CWE-643/XPathInjectionTest.qlref b/java/ql/test/query-tests/security/CWE-643/XPathInjectionTest.qlref new file mode 100644 index 00000000000..0ea1a794f4c --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-643/XPathInjectionTest.qlref @@ -0,0 +1,4 @@ +query: Security/CWE/CWE-643/XPathInjection.ql +postprocess: + - utils/test/PrettyPrintModels.ql + - utils/test/InlineExpectationsTestQuery.ql diff --git a/java/ql/test/query-tests/security/CWE-730/ExpRedosTest.java b/java/ql/test/query-tests/security/CWE-730/ExpRedos/ExpRedosTest.java similarity index 100% rename from java/ql/test/query-tests/security/CWE-730/ExpRedosTest.java rename to java/ql/test/query-tests/security/CWE-730/ExpRedos/ExpRedosTest.java diff --git a/java/ql/test/query-tests/security/CWE-730/ReDoS.expected b/java/ql/test/query-tests/security/CWE-730/ExpRedos/ReDoS.expected similarity index 100% rename from java/ql/test/query-tests/security/CWE-730/ReDoS.expected rename to java/ql/test/query-tests/security/CWE-730/ExpRedos/ReDoS.expected diff --git a/java/ql/test/query-tests/security/CWE-730/ReDoS.ql b/java/ql/test/query-tests/security/CWE-730/ExpRedos/ReDoS.ql similarity index 100% rename from java/ql/test/query-tests/security/CWE-730/ReDoS.ql rename to java/ql/test/query-tests/security/CWE-730/ExpRedos/ReDoS.ql diff --git a/java/ql/test/query-tests/security/CWE-730/ExpRedos/options b/java/ql/test/query-tests/security/CWE-730/ExpRedos/options new file mode 100644 index 00000000000..591d7fd827b --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-730/ExpRedos/options @@ -0,0 +1 @@ +// semmle-extractor-options: --javac-args -cp ${testdir}/../../../../stubs/servlet-api-2.4:${testdir}/../../../../stubs/guava-30.0:${testdir}/../../../../stubs/servlet-api-2.4:${testdir}/../../../../stubs/apache-commons-lang3-3.7 diff --git a/java/ql/test/query-tests/security/CWE-730/PolyRedos/PolyRedosTest.java b/java/ql/test/query-tests/security/CWE-730/PolyRedos/PolyRedosTest.java new file mode 100644 index 00000000000..34e527456c5 --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-730/PolyRedos/PolyRedosTest.java @@ -0,0 +1,84 @@ +import java.util.regex.Pattern; +import java.util.function.Predicate; +import javax.servlet.http.HttpServletRequest; +import com.google.common.base.Splitter; + +class PolyRedosTest { + void test(HttpServletRequest request) { + String tainted = request.getParameter("inp"); // $ Source + String reg = "0\\.\\d+E?\\d+!"; + Predicate dummyPred = (s -> s.length() % 7 == 0); + + tainted.matches(reg); // $ Alert + tainted.split(reg); // $ Alert + tainted.split(reg, 7); // $ Alert + tainted.replaceAll(reg, "a"); // $ Alert + tainted.replaceFirst(reg, "a"); // $ Alert + Pattern.matches(reg, tainted); // $ Alert + Pattern.compile(reg).matcher(tainted).matches(); // $ Alert + Pattern.compile(reg).split(tainted); // $ Alert + Pattern.compile(reg, Pattern.DOTALL).split(tainted); // $ Alert + Pattern.compile(reg).split(tainted, 7); // $ Alert + Pattern.compile(reg).splitAsStream(tainted); // $ Alert + Pattern.compile(reg).asPredicate().test(tainted); // $ Alert + Pattern.compile(reg).asMatchPredicate().negate().and(dummyPred).or(dummyPred).test(tainted); // $ Alert + Predicate.not(dummyPred.and(dummyPred.or(Pattern.compile(reg).asPredicate()))).test(tainted); // $ Alert + + Splitter.on(Pattern.compile(reg)).split(tainted); // $ Alert + Splitter.on(reg).split(tainted); + Splitter.onPattern(reg).split(tainted); // $ Alert + Splitter.onPattern(reg).splitToList(tainted); // $ Alert + Splitter.onPattern(reg).limit(7).omitEmptyStrings().trimResults().split(tainted); // $ Alert + Splitter.onPattern(reg).withKeyValueSeparator(" => ").split(tainted); // $ Alert + Splitter.on(";").withKeyValueSeparator(reg).split(tainted); + Splitter.on(";").withKeyValueSeparator(Splitter.onPattern(reg)).split(tainted); // $ Alert + + } + + void test2(HttpServletRequest request) { + String tainted = request.getParameter("inp"); // $ Source + + Pattern p1 = Pattern.compile(".*a"); + Pattern p2 = Pattern.compile(".*b"); + + p1.matcher(tainted).matches(); + p2.matcher(tainted).find(); // $ Alert + } + + void test3(HttpServletRequest request) { + String tainted = request.getParameter("inp"); // $ Source + + Pattern p1 = Pattern.compile("ab*b*"); + Pattern p2 = Pattern.compile("cd*d*"); + + p1.matcher(tainted).matches(); // $ Alert + p2.matcher(tainted).find(); + } + + void test4(HttpServletRequest request) { + String tainted = request.getParameter("inp"); // $ Source + + tainted.matches(".*a"); + tainted.replaceAll(".*b", "c"); // $ Alert + } + + static Pattern p3 = Pattern.compile(".*a"); + static Pattern p4 = Pattern.compile(".*b"); + + + void test5(HttpServletRequest request) { + String tainted = request.getParameter("inp"); // $ Source + + p3.asMatchPredicate().test(tainted); + p4.asPredicate().test(tainted); // $ Alert + } + + void test6(HttpServletRequest request) { + Pattern p = Pattern.compile("^a*a*$"); + + p.matcher(request.getParameter("inp")).matches(); // $ Alert + p.matcher(request.getHeader("If-None-Match")).matches(); + p.matcher(request.getRequestURI()).matches(); + p.matcher(request.getCookies()[0].getName()).matches(); + } +} diff --git a/java/ql/test/query-tests/security/CWE-730/PolyRedos/PolynomialReDoS.expected b/java/ql/test/query-tests/security/CWE-730/PolyRedos/PolynomialReDoS.expected new file mode 100644 index 00000000000..baac0e0596a --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-730/PolyRedos/PolynomialReDoS.expected @@ -0,0 +1,85 @@ +#select +| PolyRedosTest.java:12:9:12:15 | tainted | PolyRedosTest.java:8:26:8:52 | getParameter(...) : String | PolyRedosTest.java:12:9:12:15 | tainted | This $@ that depends on a $@ may run slow on strings starting with '0.9' and with many repetitions of '99'. | PolyRedosTest.java:9:33:9:36 | \\d+ | regular expression | PolyRedosTest.java:8:26:8:52 | getParameter(...) | user-provided value | +| PolyRedosTest.java:13:9:13:15 | tainted | PolyRedosTest.java:8:26:8:52 | getParameter(...) : String | PolyRedosTest.java:13:9:13:15 | tainted | This $@ that depends on a $@ may run slow on strings starting with '0.9' and with many repetitions of '99'. | PolyRedosTest.java:9:33:9:36 | \\d+ | regular expression | PolyRedosTest.java:8:26:8:52 | getParameter(...) | user-provided value | +| PolyRedosTest.java:14:9:14:15 | tainted | PolyRedosTest.java:8:26:8:52 | getParameter(...) : String | PolyRedosTest.java:14:9:14:15 | tainted | This $@ that depends on a $@ may run slow on strings starting with '0.9' and with many repetitions of '99'. | PolyRedosTest.java:9:33:9:36 | \\d+ | regular expression | PolyRedosTest.java:8:26:8:52 | getParameter(...) | user-provided value | +| PolyRedosTest.java:15:9:15:15 | tainted | PolyRedosTest.java:8:26:8:52 | getParameter(...) : String | PolyRedosTest.java:15:9:15:15 | tainted | This $@ that depends on a $@ may run slow on strings starting with '0.9' and with many repetitions of '99'. | PolyRedosTest.java:9:33:9:36 | \\d+ | regular expression | PolyRedosTest.java:8:26:8:52 | getParameter(...) | user-provided value | +| PolyRedosTest.java:16:9:16:15 | tainted | PolyRedosTest.java:8:26:8:52 | getParameter(...) : String | PolyRedosTest.java:16:9:16:15 | tainted | This $@ that depends on a $@ may run slow on strings starting with '0.9' and with many repetitions of '99'. | PolyRedosTest.java:9:33:9:36 | \\d+ | regular expression | PolyRedosTest.java:8:26:8:52 | getParameter(...) | user-provided value | +| PolyRedosTest.java:17:30:17:36 | tainted | PolyRedosTest.java:8:26:8:52 | getParameter(...) : String | PolyRedosTest.java:17:30:17:36 | tainted | This $@ that depends on a $@ may run slow on strings starting with '0.9' and with many repetitions of '99'. | PolyRedosTest.java:9:33:9:36 | \\d+ | regular expression | PolyRedosTest.java:8:26:8:52 | getParameter(...) | user-provided value | +| PolyRedosTest.java:18:38:18:44 | tainted | PolyRedosTest.java:8:26:8:52 | getParameter(...) : String | PolyRedosTest.java:18:38:18:44 | tainted | This $@ that depends on a $@ may run slow on strings starting with '0.9' and with many repetitions of '99'. | PolyRedosTest.java:9:33:9:36 | \\d+ | regular expression | PolyRedosTest.java:8:26:8:52 | getParameter(...) | user-provided value | +| PolyRedosTest.java:19:36:19:42 | tainted | PolyRedosTest.java:8:26:8:52 | getParameter(...) : String | PolyRedosTest.java:19:36:19:42 | tainted | This $@ that depends on a $@ may run slow on strings starting with '0.9' and with many repetitions of '99'. | PolyRedosTest.java:9:33:9:36 | \\d+ | regular expression | PolyRedosTest.java:8:26:8:52 | getParameter(...) | user-provided value | +| PolyRedosTest.java:20:52:20:58 | tainted | PolyRedosTest.java:8:26:8:52 | getParameter(...) : String | PolyRedosTest.java:20:52:20:58 | tainted | This $@ that depends on a $@ may run slow on strings starting with '0.9' and with many repetitions of '99'. | PolyRedosTest.java:9:33:9:36 | \\d+ | regular expression | PolyRedosTest.java:8:26:8:52 | getParameter(...) | user-provided value | +| PolyRedosTest.java:21:36:21:42 | tainted | PolyRedosTest.java:8:26:8:52 | getParameter(...) : String | PolyRedosTest.java:21:36:21:42 | tainted | This $@ that depends on a $@ may run slow on strings starting with '0.9' and with many repetitions of '99'. | PolyRedosTest.java:9:33:9:36 | \\d+ | regular expression | PolyRedosTest.java:8:26:8:52 | getParameter(...) | user-provided value | +| PolyRedosTest.java:22:44:22:50 | tainted | PolyRedosTest.java:8:26:8:52 | getParameter(...) : String | PolyRedosTest.java:22:44:22:50 | tainted | This $@ that depends on a $@ may run slow on strings starting with '0.9' and with many repetitions of '99'. | PolyRedosTest.java:9:33:9:36 | \\d+ | regular expression | PolyRedosTest.java:8:26:8:52 | getParameter(...) | user-provided value | +| PolyRedosTest.java:23:49:23:55 | tainted | PolyRedosTest.java:8:26:8:52 | getParameter(...) : String | PolyRedosTest.java:23:49:23:55 | tainted | This $@ that depends on a $@ may run slow on strings starting with '0.9' and with many repetitions of '99'. | PolyRedosTest.java:9:33:9:36 | \\d+ | regular expression | PolyRedosTest.java:8:26:8:52 | getParameter(...) | user-provided value | +| PolyRedosTest.java:24:92:24:98 | tainted | PolyRedosTest.java:8:26:8:52 | getParameter(...) : String | PolyRedosTest.java:24:92:24:98 | tainted | This $@ that depends on a $@ may run slow on strings starting with '0.9' and with many repetitions of '99'. | PolyRedosTest.java:9:33:9:36 | \\d+ | regular expression | PolyRedosTest.java:8:26:8:52 | getParameter(...) | user-provided value | +| PolyRedosTest.java:25:93:25:99 | tainted | PolyRedosTest.java:8:26:8:52 | getParameter(...) : String | PolyRedosTest.java:25:93:25:99 | tainted | This $@ that depends on a $@ may run slow on strings starting with '0.9' and with many repetitions of '99'. | PolyRedosTest.java:9:33:9:36 | \\d+ | regular expression | PolyRedosTest.java:8:26:8:52 | getParameter(...) | user-provided value | +| PolyRedosTest.java:27:49:27:55 | tainted | PolyRedosTest.java:8:26:8:52 | getParameter(...) : String | PolyRedosTest.java:27:49:27:55 | tainted | This $@ that depends on a $@ may run slow on strings starting with '0.9' and with many repetitions of '99'. | PolyRedosTest.java:9:33:9:36 | \\d+ | regular expression | PolyRedosTest.java:8:26:8:52 | getParameter(...) | user-provided value | +| PolyRedosTest.java:29:39:29:45 | tainted | PolyRedosTest.java:8:26:8:52 | getParameter(...) : String | PolyRedosTest.java:29:39:29:45 | tainted | This $@ that depends on a $@ may run slow on strings starting with '0.9' and with many repetitions of '99'. | PolyRedosTest.java:9:33:9:36 | \\d+ | regular expression | PolyRedosTest.java:8:26:8:52 | getParameter(...) | user-provided value | +| PolyRedosTest.java:30:45:30:51 | tainted | PolyRedosTest.java:8:26:8:52 | getParameter(...) : String | PolyRedosTest.java:30:45:30:51 | tainted | This $@ that depends on a $@ may run slow on strings starting with '0.9' and with many repetitions of '99'. | PolyRedosTest.java:9:33:9:36 | \\d+ | regular expression | PolyRedosTest.java:8:26:8:52 | getParameter(...) | user-provided value | +| PolyRedosTest.java:31:81:31:87 | tainted | PolyRedosTest.java:8:26:8:52 | getParameter(...) : String | PolyRedosTest.java:31:81:31:87 | tainted | This $@ that depends on a $@ may run slow on strings starting with '0.9' and with many repetitions of '99'. | PolyRedosTest.java:9:33:9:36 | \\d+ | regular expression | PolyRedosTest.java:8:26:8:52 | getParameter(...) | user-provided value | +| PolyRedosTest.java:32:69:32:75 | tainted | PolyRedosTest.java:8:26:8:52 | getParameter(...) : String | PolyRedosTest.java:32:69:32:75 | tainted | This $@ that depends on a $@ may run slow on strings starting with '0.9' and with many repetitions of '99'. | PolyRedosTest.java:9:33:9:36 | \\d+ | regular expression | PolyRedosTest.java:8:26:8:52 | getParameter(...) | user-provided value | +| PolyRedosTest.java:34:79:34:85 | tainted | PolyRedosTest.java:8:26:8:52 | getParameter(...) : String | PolyRedosTest.java:34:79:34:85 | tainted | This $@ that depends on a $@ may run slow on strings starting with '0.9' and with many repetitions of '99'. | PolyRedosTest.java:9:33:9:36 | \\d+ | regular expression | PolyRedosTest.java:8:26:8:52 | getParameter(...) | user-provided value | +| PolyRedosTest.java:45:20:45:26 | tainted | PolyRedosTest.java:39:26:39:52 | getParameter(...) : String | PolyRedosTest.java:45:20:45:26 | tainted | This $@ that depends on a $@ may run slow on strings with many repetitions of 'a'. | PolyRedosTest.java:42:39:42:40 | .* | regular expression | PolyRedosTest.java:39:26:39:52 | getParameter(...) | user-provided value | +| PolyRedosTest.java:54:20:54:26 | tainted | PolyRedosTest.java:49:26:49:52 | getParameter(...) : String | PolyRedosTest.java:54:20:54:26 | tainted | This $@ that depends on a $@ may run slow on strings starting with 'a' and with many repetitions of 'b'. | PolyRedosTest.java:51:42:51:43 | b* | regular expression | PolyRedosTest.java:49:26:49:52 | getParameter(...) | user-provided value | +| PolyRedosTest.java:62:9:62:15 | tainted | PolyRedosTest.java:59:26:59:52 | getParameter(...) : String | PolyRedosTest.java:62:9:62:15 | tainted | This $@ that depends on a $@ may run slow on strings with many repetitions of 'a'. | PolyRedosTest.java:62:29:62:30 | .* | regular expression | PolyRedosTest.java:59:26:59:52 | getParameter(...) | user-provided value | +| PolyRedosTest.java:73:31:73:37 | tainted | PolyRedosTest.java:70:26:70:52 | getParameter(...) : String | PolyRedosTest.java:73:31:73:37 | tainted | This $@ that depends on a $@ may run slow on strings with many repetitions of 'a'. | PolyRedosTest.java:66:42:66:43 | .* | regular expression | PolyRedosTest.java:70:26:70:52 | getParameter(...) | user-provided value | +| PolyRedosTest.java:79:19:79:45 | getParameter(...) | PolyRedosTest.java:79:19:79:45 | getParameter(...) | PolyRedosTest.java:79:19:79:45 | getParameter(...) | This $@ that depends on a $@ may run slow on strings with many repetitions of 'a'. | PolyRedosTest.java:77:41:77:42 | a* | regular expression | PolyRedosTest.java:79:19:79:45 | getParameter(...) | user-provided value | +edges +| PolyRedosTest.java:8:26:8:52 | getParameter(...) : String | PolyRedosTest.java:12:9:12:15 | tainted | provenance | Src:MaD:1 | +| PolyRedosTest.java:8:26:8:52 | getParameter(...) : String | PolyRedosTest.java:13:9:13:15 | tainted | provenance | Src:MaD:1 | +| PolyRedosTest.java:8:26:8:52 | getParameter(...) : String | PolyRedosTest.java:14:9:14:15 | tainted | provenance | Src:MaD:1 | +| PolyRedosTest.java:8:26:8:52 | getParameter(...) : String | PolyRedosTest.java:15:9:15:15 | tainted | provenance | Src:MaD:1 | +| PolyRedosTest.java:8:26:8:52 | getParameter(...) : String | PolyRedosTest.java:16:9:16:15 | tainted | provenance | Src:MaD:1 | +| PolyRedosTest.java:8:26:8:52 | getParameter(...) : String | PolyRedosTest.java:17:30:17:36 | tainted | provenance | Src:MaD:1 | +| PolyRedosTest.java:8:26:8:52 | getParameter(...) : String | PolyRedosTest.java:18:38:18:44 | tainted | provenance | Src:MaD:1 | +| PolyRedosTest.java:8:26:8:52 | getParameter(...) : String | PolyRedosTest.java:19:36:19:42 | tainted | provenance | Src:MaD:1 | +| PolyRedosTest.java:8:26:8:52 | getParameter(...) : String | PolyRedosTest.java:20:52:20:58 | tainted | provenance | Src:MaD:1 | +| PolyRedosTest.java:8:26:8:52 | getParameter(...) : String | PolyRedosTest.java:21:36:21:42 | tainted | provenance | Src:MaD:1 | +| PolyRedosTest.java:8:26:8:52 | getParameter(...) : String | PolyRedosTest.java:22:44:22:50 | tainted | provenance | Src:MaD:1 | +| PolyRedosTest.java:8:26:8:52 | getParameter(...) : String | PolyRedosTest.java:23:49:23:55 | tainted | provenance | Src:MaD:1 | +| PolyRedosTest.java:8:26:8:52 | getParameter(...) : String | PolyRedosTest.java:24:92:24:98 | tainted | provenance | Src:MaD:1 | +| PolyRedosTest.java:8:26:8:52 | getParameter(...) : String | PolyRedosTest.java:25:93:25:99 | tainted | provenance | Src:MaD:1 | +| PolyRedosTest.java:8:26:8:52 | getParameter(...) : String | PolyRedosTest.java:27:49:27:55 | tainted | provenance | Src:MaD:1 | +| PolyRedosTest.java:8:26:8:52 | getParameter(...) : String | PolyRedosTest.java:29:39:29:45 | tainted | provenance | Src:MaD:1 | +| PolyRedosTest.java:8:26:8:52 | getParameter(...) : String | PolyRedosTest.java:30:45:30:51 | tainted | provenance | Src:MaD:1 | +| PolyRedosTest.java:8:26:8:52 | getParameter(...) : String | PolyRedosTest.java:31:81:31:87 | tainted | provenance | Src:MaD:1 | +| PolyRedosTest.java:8:26:8:52 | getParameter(...) : String | PolyRedosTest.java:32:69:32:75 | tainted | provenance | Src:MaD:1 | +| PolyRedosTest.java:8:26:8:52 | getParameter(...) : String | PolyRedosTest.java:34:79:34:85 | tainted | provenance | Src:MaD:1 | +| PolyRedosTest.java:39:26:39:52 | getParameter(...) : String | PolyRedosTest.java:45:20:45:26 | tainted | provenance | Src:MaD:1 | +| PolyRedosTest.java:49:26:49:52 | getParameter(...) : String | PolyRedosTest.java:54:20:54:26 | tainted | provenance | Src:MaD:1 | +| PolyRedosTest.java:59:26:59:52 | getParameter(...) : String | PolyRedosTest.java:62:9:62:15 | tainted | provenance | Src:MaD:1 | +| PolyRedosTest.java:70:26:70:52 | getParameter(...) : String | PolyRedosTest.java:73:31:73:37 | tainted | provenance | Src:MaD:1 | +models +| 1 | Source: javax.servlet; ServletRequest; false; getParameter; (String); ; ReturnValue; remote; manual | +nodes +| PolyRedosTest.java:8:26:8:52 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| PolyRedosTest.java:12:9:12:15 | tainted | semmle.label | tainted | +| PolyRedosTest.java:13:9:13:15 | tainted | semmle.label | tainted | +| PolyRedosTest.java:14:9:14:15 | tainted | semmle.label | tainted | +| PolyRedosTest.java:15:9:15:15 | tainted | semmle.label | tainted | +| PolyRedosTest.java:16:9:16:15 | tainted | semmle.label | tainted | +| PolyRedosTest.java:17:30:17:36 | tainted | semmle.label | tainted | +| PolyRedosTest.java:18:38:18:44 | tainted | semmle.label | tainted | +| PolyRedosTest.java:19:36:19:42 | tainted | semmle.label | tainted | +| PolyRedosTest.java:20:52:20:58 | tainted | semmle.label | tainted | +| PolyRedosTest.java:21:36:21:42 | tainted | semmle.label | tainted | +| PolyRedosTest.java:22:44:22:50 | tainted | semmle.label | tainted | +| PolyRedosTest.java:23:49:23:55 | tainted | semmle.label | tainted | +| PolyRedosTest.java:24:92:24:98 | tainted | semmle.label | tainted | +| PolyRedosTest.java:25:93:25:99 | tainted | semmle.label | tainted | +| PolyRedosTest.java:27:49:27:55 | tainted | semmle.label | tainted | +| PolyRedosTest.java:29:39:29:45 | tainted | semmle.label | tainted | +| PolyRedosTest.java:30:45:30:51 | tainted | semmle.label | tainted | +| PolyRedosTest.java:31:81:31:87 | tainted | semmle.label | tainted | +| PolyRedosTest.java:32:69:32:75 | tainted | semmle.label | tainted | +| PolyRedosTest.java:34:79:34:85 | tainted | semmle.label | tainted | +| PolyRedosTest.java:39:26:39:52 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| PolyRedosTest.java:45:20:45:26 | tainted | semmle.label | tainted | +| PolyRedosTest.java:49:26:49:52 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| PolyRedosTest.java:54:20:54:26 | tainted | semmle.label | tainted | +| PolyRedosTest.java:59:26:59:52 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| PolyRedosTest.java:62:9:62:15 | tainted | semmle.label | tainted | +| PolyRedosTest.java:70:26:70:52 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| PolyRedosTest.java:73:31:73:37 | tainted | semmle.label | tainted | +| PolyRedosTest.java:79:19:79:45 | getParameter(...) | semmle.label | getParameter(...) | +subpaths diff --git a/java/ql/test/query-tests/security/CWE-730/PolyRedos/PolynomialReDoS.qlref b/java/ql/test/query-tests/security/CWE-730/PolyRedos/PolynomialReDoS.qlref new file mode 100644 index 00000000000..f5dd1d5ca3a --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-730/PolyRedos/PolynomialReDoS.qlref @@ -0,0 +1,4 @@ +query: Security/CWE/CWE-730/PolynomialReDoS.ql +postprocess: + - utils/test/PrettyPrintModels.ql + - utils/test/InlineExpectationsTestQuery.ql diff --git a/java/ql/test/query-tests/security/CWE-730/PolyRedos/options b/java/ql/test/query-tests/security/CWE-730/PolyRedos/options new file mode 100644 index 00000000000..591d7fd827b --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-730/PolyRedos/options @@ -0,0 +1 @@ +// semmle-extractor-options: --javac-args -cp ${testdir}/../../../../stubs/servlet-api-2.4:${testdir}/../../../../stubs/guava-30.0:${testdir}/../../../../stubs/servlet-api-2.4:${testdir}/../../../../stubs/apache-commons-lang3-3.7 diff --git a/java/ql/test/query-tests/security/CWE-730/PolyRedosTest.java b/java/ql/test/query-tests/security/CWE-730/PolyRedosTest.java deleted file mode 100644 index 44931190460..00000000000 --- a/java/ql/test/query-tests/security/CWE-730/PolyRedosTest.java +++ /dev/null @@ -1,84 +0,0 @@ -import java.util.regex.Pattern; -import java.util.function.Predicate; -import javax.servlet.http.HttpServletRequest; -import com.google.common.base.Splitter; - -class PolyRedosTest { - void test(HttpServletRequest request) { - String tainted = request.getParameter("inp"); - String reg = "0\\.\\d+E?\\d+!"; - Predicate dummyPred = (s -> s.length() % 7 == 0); - - tainted.matches(reg); // $ hasPolyRedos - tainted.split(reg); // $ hasPolyRedos - tainted.split(reg, 7); // $ hasPolyRedos - tainted.replaceAll(reg, "a"); // $ hasPolyRedos - tainted.replaceFirst(reg, "a"); // $ hasPolyRedos - Pattern.matches(reg, tainted); // $ hasPolyRedos - Pattern.compile(reg).matcher(tainted).matches(); // $ hasPolyRedos - Pattern.compile(reg).split(tainted); // $ hasPolyRedos - Pattern.compile(reg, Pattern.DOTALL).split(tainted); // $ hasPolyRedos - Pattern.compile(reg).split(tainted, 7); // $ hasPolyRedos - Pattern.compile(reg).splitAsStream(tainted); // $ hasPolyRedos - Pattern.compile(reg).asPredicate().test(tainted); // $ hasPolyRedos - Pattern.compile(reg).asMatchPredicate().negate().and(dummyPred).or(dummyPred).test(tainted); // $ hasPolyRedos - Predicate.not(dummyPred.and(dummyPred.or(Pattern.compile(reg).asPredicate()))).test(tainted); // $ hasPolyRedos - - Splitter.on(Pattern.compile(reg)).split(tainted); // $ hasPolyRedos - Splitter.on(reg).split(tainted); - Splitter.onPattern(reg).split(tainted); // $ hasPolyRedos - Splitter.onPattern(reg).splitToList(tainted); // $ hasPolyRedos - Splitter.onPattern(reg).limit(7).omitEmptyStrings().trimResults().split(tainted); // $ hasPolyRedos - Splitter.onPattern(reg).withKeyValueSeparator(" => ").split(tainted); // $ hasPolyRedos - Splitter.on(";").withKeyValueSeparator(reg).split(tainted); - Splitter.on(";").withKeyValueSeparator(Splitter.onPattern(reg)).split(tainted); // $ hasPolyRedos - - } - - void test2(HttpServletRequest request) { - String tainted = request.getParameter("inp"); - - Pattern p1 = Pattern.compile(".*a"); - Pattern p2 = Pattern.compile(".*b"); - - p1.matcher(tainted).matches(); - p2.matcher(tainted).find(); // $ hasPolyRedos - } - - void test3(HttpServletRequest request) { - String tainted = request.getParameter("inp"); - - Pattern p1 = Pattern.compile("ab*b*"); - Pattern p2 = Pattern.compile("cd*d*"); - - p1.matcher(tainted).matches(); // $ hasPolyRedos - p2.matcher(tainted).find(); - } - - void test4(HttpServletRequest request) { - String tainted = request.getParameter("inp"); - - tainted.matches(".*a"); - tainted.replaceAll(".*b", "c"); // $ hasPolyRedos - } - - static Pattern p3 = Pattern.compile(".*a"); - static Pattern p4 = Pattern.compile(".*b"); - - - void test5(HttpServletRequest request) { - String tainted = request.getParameter("inp"); - - p3.asMatchPredicate().test(tainted); - p4.asPredicate().test(tainted); // $ hasPolyRedos - } - - void test6(HttpServletRequest request) { - Pattern p = Pattern.compile("^a*a*$"); - - p.matcher(request.getParameter("inp")).matches(); // $ hasPolyRedos - p.matcher(request.getHeader("If-None-Match")).matches(); - p.matcher(request.getRequestURI()).matches(); - p.matcher(request.getCookies()[0].getName()).matches(); - } -} \ No newline at end of file diff --git a/java/ql/test/query-tests/security/CWE-730/PolynomialReDoS.expected b/java/ql/test/query-tests/security/CWE-730/PolynomialReDoS.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/java/ql/test/query-tests/security/CWE-730/PolynomialReDoS.ql b/java/ql/test/query-tests/security/CWE-730/PolynomialReDoS.ql deleted file mode 100644 index d8c1a790e70..00000000000 --- a/java/ql/test/query-tests/security/CWE-730/PolynomialReDoS.ql +++ /dev/null @@ -1,18 +0,0 @@ -import utils.test.InlineExpectationsTest -import semmle.code.java.security.regexp.PolynomialReDoSQuery - -module HasPolyRedos implements TestSig { - string getARelevantTag() { result = "hasPolyRedos" } - - predicate hasActualResult(Location location, string element, string tag, string value) { - tag = "hasPolyRedos" and - exists(DataFlow::Node sink | - PolynomialRedosFlow::flowTo(sink) and - location = sink.getLocation() and - element = sink.toString() and - value = "" - ) - } -} - -import MakeTest diff --git a/java/ql/test/query-tests/security/CWE-730/RegexInjection/RegexInjectionTest.expected b/java/ql/test/query-tests/security/CWE-730/RegexInjection/RegexInjectionTest.expected new file mode 100644 index 00000000000..9d0c7ec5c8b --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-730/RegexInjection/RegexInjectionTest.expected @@ -0,0 +1,102 @@ +#select +| RegexInjectionTest.java:17:26:17:47 | ... + ... | RegexInjectionTest.java:14:22:14:52 | getParameter(...) : String | RegexInjectionTest.java:17:26:17:47 | ... + ... | This regular expression is constructed from a $@. | RegexInjectionTest.java:14:22:14:52 | getParameter(...) | user-provided value | +| RegexInjectionTest.java:24:24:24:30 | pattern | RegexInjectionTest.java:21:22:21:52 | getParameter(...) : String | RegexInjectionTest.java:24:24:24:30 | pattern | This regular expression is constructed from a $@. | RegexInjectionTest.java:21:22:21:52 | getParameter(...) | user-provided value | +| RegexInjectionTest.java:31:24:31:30 | pattern | RegexInjectionTest.java:28:22:28:52 | getParameter(...) : String | RegexInjectionTest.java:31:24:31:30 | pattern | This regular expression is constructed from a $@. | RegexInjectionTest.java:28:22:28:52 | getParameter(...) | user-provided value | +| RegexInjectionTest.java:38:31:38:37 | pattern | RegexInjectionTest.java:35:22:35:52 | getParameter(...) : String | RegexInjectionTest.java:38:31:38:37 | pattern | This regular expression is constructed from a $@. | RegexInjectionTest.java:35:22:35:52 | getParameter(...) | user-provided value | +| RegexInjectionTest.java:45:29:45:35 | pattern | RegexInjectionTest.java:42:22:42:52 | getParameter(...) : String | RegexInjectionTest.java:45:29:45:35 | pattern | This regular expression is constructed from a $@. | RegexInjectionTest.java:42:22:42:52 | getParameter(...) | user-provided value | +| RegexInjectionTest.java:52:34:52:40 | pattern | RegexInjectionTest.java:49:22:49:52 | getParameter(...) : String | RegexInjectionTest.java:52:34:52:40 | pattern | This regular expression is constructed from a $@. | RegexInjectionTest.java:49:22:49:52 | getParameter(...) | user-provided value | +| RegexInjectionTest.java:62:28:62:34 | pattern | RegexInjectionTest.java:59:22:59:52 | getParameter(...) : String | RegexInjectionTest.java:62:28:62:34 | pattern | This regular expression is constructed from a $@. | RegexInjectionTest.java:59:22:59:52 | getParameter(...) | user-provided value | +| RegexInjectionTest.java:69:28:69:34 | pattern | RegexInjectionTest.java:66:22:66:52 | getParameter(...) : String | RegexInjectionTest.java:69:28:69:34 | pattern | This regular expression is constructed from a $@. | RegexInjectionTest.java:66:22:66:52 | getParameter(...) | user-provided value | +| RegexInjectionTest.java:76:28:76:34 | pattern | RegexInjectionTest.java:73:22:73:52 | getParameter(...) : String | RegexInjectionTest.java:76:28:76:34 | pattern | This regular expression is constructed from a $@. | RegexInjectionTest.java:73:22:73:52 | getParameter(...) | user-provided value | +| RegexInjectionTest.java:83:26:83:52 | ... + ... | RegexInjectionTest.java:80:22:80:52 | getParameter(...) : String | RegexInjectionTest.java:83:26:83:52 | ... + ... | This regular expression is constructed from a $@. | RegexInjectionTest.java:80:22:80:52 | getParameter(...) | user-provided value | +| RegexInjectionTest.java:94:40:94:46 | pattern | RegexInjectionTest.java:91:22:91:52 | getParameter(...) : String | RegexInjectionTest.java:94:40:94:46 | pattern | This regular expression is constructed from a $@. | RegexInjectionTest.java:91:22:91:52 | getParameter(...) | user-provided value | +| RegexInjectionTest.java:101:42:101:48 | pattern | RegexInjectionTest.java:98:22:98:52 | getParameter(...) : String | RegexInjectionTest.java:101:42:101:48 | pattern | This regular expression is constructed from a $@. | RegexInjectionTest.java:98:22:98:52 | getParameter(...) | user-provided value | +| RegexInjectionTest.java:108:44:108:50 | pattern | RegexInjectionTest.java:105:22:105:52 | getParameter(...) : String | RegexInjectionTest.java:108:44:108:50 | pattern | This regular expression is constructed from a $@. | RegexInjectionTest.java:105:22:105:52 | getParameter(...) | user-provided value | +| RegexInjectionTest.java:115:41:115:47 | pattern | RegexInjectionTest.java:112:22:112:52 | getParameter(...) : String | RegexInjectionTest.java:115:41:115:47 | pattern | This regular expression is constructed from a $@. | RegexInjectionTest.java:112:22:112:52 | getParameter(...) | user-provided value | +| RegexInjectionTest.java:122:43:122:49 | pattern | RegexInjectionTest.java:119:22:119:52 | getParameter(...) : String | RegexInjectionTest.java:122:43:122:49 | pattern | This regular expression is constructed from a $@. | RegexInjectionTest.java:119:22:119:52 | getParameter(...) | user-provided value | +| RegexInjectionTest.java:137:45:137:51 | pattern | RegexInjectionTest.java:134:22:134:52 | getParameter(...) : String | RegexInjectionTest.java:137:45:137:51 | pattern | This regular expression is constructed from a $@. | RegexInjectionTest.java:134:22:134:52 | getParameter(...) | user-provided value | +| RegexInjectionTest.java:158:31:158:37 | pattern | RegexInjectionTest.java:157:22:157:52 | getParameter(...) : String | RegexInjectionTest.java:158:31:158:37 | pattern | This regular expression is constructed from a $@. | RegexInjectionTest.java:157:22:157:52 | getParameter(...) | user-provided value | +| RegexInjectionTest.java:164:41:164:47 | pattern | RegexInjectionTest.java:162:22:162:52 | getParameter(...) : String | RegexInjectionTest.java:164:41:164:47 | pattern | This regular expression is constructed from a $@. | RegexInjectionTest.java:162:22:162:52 | getParameter(...) | user-provided value | +edges +| RegexInjectionTest.java:14:22:14:52 | getParameter(...) : String | RegexInjectionTest.java:17:26:17:47 | ... + ... | provenance | Src:MaD:16 Sink:MaD:2 | +| RegexInjectionTest.java:21:22:21:52 | getParameter(...) : String | RegexInjectionTest.java:24:24:24:30 | pattern | provenance | Src:MaD:16 Sink:MaD:5 | +| RegexInjectionTest.java:28:22:28:52 | getParameter(...) : String | RegexInjectionTest.java:31:24:31:30 | pattern | provenance | Src:MaD:16 Sink:MaD:6 | +| RegexInjectionTest.java:35:22:35:52 | getParameter(...) : String | RegexInjectionTest.java:38:31:38:37 | pattern | provenance | Src:MaD:16 Sink:MaD:4 | +| RegexInjectionTest.java:42:22:42:52 | getParameter(...) : String | RegexInjectionTest.java:45:29:45:35 | pattern | provenance | Src:MaD:16 Sink:MaD:3 | +| RegexInjectionTest.java:49:22:49:52 | getParameter(...) : String | RegexInjectionTest.java:52:34:52:40 | pattern | provenance | Src:MaD:16 Sink:MaD:7 | +| RegexInjectionTest.java:59:22:59:52 | getParameter(...) : String | RegexInjectionTest.java:62:28:62:34 | pattern | provenance | Src:MaD:16 Sink:MaD:7 | +| RegexInjectionTest.java:66:22:66:52 | getParameter(...) : String | RegexInjectionTest.java:69:28:69:34 | pattern | provenance | Src:MaD:16 Sink:MaD:8 | +| RegexInjectionTest.java:73:22:73:52 | getParameter(...) : String | RegexInjectionTest.java:76:28:76:34 | pattern | provenance | Src:MaD:16 Sink:MaD:9 | +| RegexInjectionTest.java:80:22:80:52 | getParameter(...) : String | RegexInjectionTest.java:83:36:83:42 | pattern : String | provenance | Src:MaD:16 | +| RegexInjectionTest.java:83:32:83:43 | foo(...) : String | RegexInjectionTest.java:83:26:83:52 | ... + ... | provenance | Sink:MaD:2 | +| RegexInjectionTest.java:83:36:83:42 | pattern : String | RegexInjectionTest.java:83:32:83:43 | foo(...) : String | provenance | | +| RegexInjectionTest.java:83:36:83:42 | pattern : String | RegexInjectionTest.java:86:14:86:23 | str : String | provenance | | +| RegexInjectionTest.java:86:14:86:23 | str : String | RegexInjectionTest.java:87:12:87:14 | str : String | provenance | | +| RegexInjectionTest.java:91:22:91:52 | getParameter(...) : String | RegexInjectionTest.java:94:40:94:46 | pattern | provenance | Src:MaD:16 Sink:MaD:10 | +| RegexInjectionTest.java:98:22:98:52 | getParameter(...) : String | RegexInjectionTest.java:101:42:101:48 | pattern | provenance | Src:MaD:16 Sink:MaD:11 | +| RegexInjectionTest.java:105:22:105:52 | getParameter(...) : String | RegexInjectionTest.java:108:44:108:50 | pattern | provenance | Src:MaD:16 Sink:MaD:12 | +| RegexInjectionTest.java:112:22:112:52 | getParameter(...) : String | RegexInjectionTest.java:115:41:115:47 | pattern | provenance | Src:MaD:16 Sink:MaD:13 | +| RegexInjectionTest.java:119:22:119:52 | getParameter(...) : String | RegexInjectionTest.java:122:43:122:49 | pattern | provenance | Src:MaD:16 Sink:MaD:14 | +| RegexInjectionTest.java:134:22:134:52 | getParameter(...) : String | RegexInjectionTest.java:137:45:137:51 | pattern | provenance | Src:MaD:16 Sink:MaD:15 | +| RegexInjectionTest.java:157:22:157:52 | getParameter(...) : String | RegexInjectionTest.java:158:31:158:37 | pattern | provenance | Src:MaD:16 Sink:MaD:1 | +| RegexInjectionTest.java:162:22:162:52 | getParameter(...) : String | RegexInjectionTest.java:164:41:164:47 | pattern | provenance | Src:MaD:16 Sink:MaD:7 | +models +| 1 | Sink: com.google.common.base; Splitter; false; onPattern; (String); ; Argument[0]; regex-use[]; manual | +| 2 | Sink: java.lang; String; false; matches; (String); ; Argument[0]; regex-use[f-1]; manual | +| 3 | Sink: java.lang; String; false; replaceAll; (String,String); ; Argument[0]; regex-use[-1]; manual | +| 4 | Sink: java.lang; String; false; replaceFirst; (String,String); ; Argument[0]; regex-use[-1]; manual | +| 5 | Sink: java.lang; String; false; split; (String); ; Argument[0]; regex-use[-1]; manual | +| 6 | Sink: java.lang; String; false; split; (String,int); ; Argument[0]; regex-use[-1]; manual | +| 7 | Sink: java.util.regex; Pattern; false; compile; (String); ; Argument[0]; regex-use[]; manual | +| 8 | Sink: java.util.regex; Pattern; false; compile; (String,int); ; Argument[0]; regex-use[]; manual | +| 9 | Sink: java.util.regex; Pattern; false; matches; (String,CharSequence); ; Argument[0]; regex-use[f1]; manual | +| 10 | Sink: org.apache.commons.lang3; RegExUtils; false; removeAll; (String,String); ; Argument[1]; regex-use; manual | +| 11 | Sink: org.apache.commons.lang3; RegExUtils; false; removeFirst; (String,String); ; Argument[1]; regex-use; manual | +| 12 | Sink: org.apache.commons.lang3; RegExUtils; false; removePattern; (String,String); ; Argument[1]; regex-use; manual | +| 13 | Sink: org.apache.commons.lang3; RegExUtils; false; replaceAll; (String,String,String); ; Argument[1]; regex-use; manual | +| 14 | Sink: org.apache.commons.lang3; RegExUtils; false; replaceFirst; (String,String,String); ; Argument[1]; regex-use; manual | +| 15 | Sink: org.apache.commons.lang3; RegExUtils; false; replacePattern; (String,String,String); ; Argument[1]; regex-use; manual | +| 16 | Source: javax.servlet; ServletRequest; false; getParameter; (String); ; ReturnValue; remote; manual | +nodes +| RegexInjectionTest.java:14:22:14:52 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| RegexInjectionTest.java:17:26:17:47 | ... + ... | semmle.label | ... + ... | +| RegexInjectionTest.java:21:22:21:52 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| RegexInjectionTest.java:24:24:24:30 | pattern | semmle.label | pattern | +| RegexInjectionTest.java:28:22:28:52 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| RegexInjectionTest.java:31:24:31:30 | pattern | semmle.label | pattern | +| RegexInjectionTest.java:35:22:35:52 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| RegexInjectionTest.java:38:31:38:37 | pattern | semmle.label | pattern | +| RegexInjectionTest.java:42:22:42:52 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| RegexInjectionTest.java:45:29:45:35 | pattern | semmle.label | pattern | +| RegexInjectionTest.java:49:22:49:52 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| RegexInjectionTest.java:52:34:52:40 | pattern | semmle.label | pattern | +| RegexInjectionTest.java:59:22:59:52 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| RegexInjectionTest.java:62:28:62:34 | pattern | semmle.label | pattern | +| RegexInjectionTest.java:66:22:66:52 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| RegexInjectionTest.java:69:28:69:34 | pattern | semmle.label | pattern | +| RegexInjectionTest.java:73:22:73:52 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| RegexInjectionTest.java:76:28:76:34 | pattern | semmle.label | pattern | +| RegexInjectionTest.java:80:22:80:52 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| RegexInjectionTest.java:83:26:83:52 | ... + ... | semmle.label | ... + ... | +| RegexInjectionTest.java:83:32:83:43 | foo(...) : String | semmle.label | foo(...) : String | +| RegexInjectionTest.java:83:36:83:42 | pattern : String | semmle.label | pattern : String | +| RegexInjectionTest.java:86:14:86:23 | str : String | semmle.label | str : String | +| RegexInjectionTest.java:87:12:87:14 | str : String | semmle.label | str : String | +| RegexInjectionTest.java:91:22:91:52 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| RegexInjectionTest.java:94:40:94:46 | pattern | semmle.label | pattern | +| RegexInjectionTest.java:98:22:98:52 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| RegexInjectionTest.java:101:42:101:48 | pattern | semmle.label | pattern | +| RegexInjectionTest.java:105:22:105:52 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| RegexInjectionTest.java:108:44:108:50 | pattern | semmle.label | pattern | +| RegexInjectionTest.java:112:22:112:52 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| RegexInjectionTest.java:115:41:115:47 | pattern | semmle.label | pattern | +| RegexInjectionTest.java:119:22:119:52 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| RegexInjectionTest.java:122:43:122:49 | pattern | semmle.label | pattern | +| RegexInjectionTest.java:134:22:134:52 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| RegexInjectionTest.java:137:45:137:51 | pattern | semmle.label | pattern | +| RegexInjectionTest.java:157:22:157:52 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| RegexInjectionTest.java:158:31:158:37 | pattern | semmle.label | pattern | +| RegexInjectionTest.java:162:22:162:52 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| RegexInjectionTest.java:164:41:164:47 | pattern | semmle.label | pattern | +subpaths +| RegexInjectionTest.java:83:36:83:42 | pattern : String | RegexInjectionTest.java:86:14:86:23 | str : String | RegexInjectionTest.java:87:12:87:14 | str : String | RegexInjectionTest.java:83:32:83:43 | foo(...) : String | diff --git a/java/ql/test/query-tests/security/CWE-730/RegexInjectionTest.java b/java/ql/test/query-tests/security/CWE-730/RegexInjection/RegexInjectionTest.java similarity index 68% rename from java/ql/test/query-tests/security/CWE-730/RegexInjectionTest.java rename to java/ql/test/query-tests/security/CWE-730/RegexInjection/RegexInjectionTest.java index 5c7a3ca0574..c4643de9a77 100644 --- a/java/ql/test/query-tests/security/CWE-730/RegexInjectionTest.java +++ b/java/ql/test/query-tests/security/CWE-730/RegexInjection/RegexInjectionTest.java @@ -11,76 +11,76 @@ import com.google.common.base.Splitter; public class RegexInjectionTest extends HttpServlet { public boolean string1(javax.servlet.http.HttpServletRequest request) { - String pattern = request.getParameter("pattern"); + String pattern = request.getParameter("pattern"); // $ Source String input = request.getParameter("input"); - return input.matches("^" + pattern + "=.*$"); // $ hasRegexInjection + return input.matches("^" + pattern + "=.*$"); // $ Alert } public boolean string2(javax.servlet.http.HttpServletRequest request) { - String pattern = request.getParameter("pattern"); + String pattern = request.getParameter("pattern"); // $ Source String input = request.getParameter("input"); - return input.split(pattern).length > 0; // $ hasRegexInjection + return input.split(pattern).length > 0; // $ Alert } public boolean string3(javax.servlet.http.HttpServletRequest request) { - String pattern = request.getParameter("pattern"); + String pattern = request.getParameter("pattern"); // $ Source String input = request.getParameter("input"); - return input.split(pattern, 0).length > 0; // $ hasRegexInjection + return input.split(pattern, 0).length > 0; // $ Alert } public boolean string4(javax.servlet.http.HttpServletRequest request) { - String pattern = request.getParameter("pattern"); + String pattern = request.getParameter("pattern"); // $ Source String input = request.getParameter("input"); - return input.replaceFirst(pattern, "").length() > 0; // $ hasRegexInjection + return input.replaceFirst(pattern, "").length() > 0; // $ Alert } public boolean string5(javax.servlet.http.HttpServletRequest request) { - String pattern = request.getParameter("pattern"); + String pattern = request.getParameter("pattern"); // $ Source String input = request.getParameter("input"); - return input.replaceAll(pattern, "").length() > 0; // $ hasRegexInjection + return input.replaceAll(pattern, "").length() > 0; // $ Alert } public boolean pattern1(javax.servlet.http.HttpServletRequest request) { - String pattern = request.getParameter("pattern"); + String pattern = request.getParameter("pattern"); // $ Source String input = request.getParameter("input"); - Pattern pt = Pattern.compile(pattern); // $ hasRegexInjection + Pattern pt = Pattern.compile(pattern); // $ Alert Matcher matcher = pt.matcher(input); return matcher.find(); } public boolean pattern2(javax.servlet.http.HttpServletRequest request) { - String pattern = request.getParameter("pattern"); + String pattern = request.getParameter("pattern"); // $ Source String input = request.getParameter("input"); - return Pattern.compile(pattern).matcher(input).matches(); // $ hasRegexInjection + return Pattern.compile(pattern).matcher(input).matches(); // $ Alert } public boolean pattern3(javax.servlet.http.HttpServletRequest request) { - String pattern = request.getParameter("pattern"); + String pattern = request.getParameter("pattern"); // $ Source String input = request.getParameter("input"); - return Pattern.compile(pattern, 0).matcher(input).matches(); // $ hasRegexInjection + return Pattern.compile(pattern, 0).matcher(input).matches(); // $ Alert } public boolean pattern4(javax.servlet.http.HttpServletRequest request) { - String pattern = request.getParameter("pattern"); + String pattern = request.getParameter("pattern"); // $ Source String input = request.getParameter("input"); - return Pattern.matches(pattern, input); // $ hasRegexInjection + return Pattern.matches(pattern, input); // $ Alert } public boolean pattern5(javax.servlet.http.HttpServletRequest request) { - String pattern = request.getParameter("pattern"); + String pattern = request.getParameter("pattern"); // $ Source String input = request.getParameter("input"); - return input.matches("^" + foo(pattern) + "=.*$"); // $ hasRegexInjection + return input.matches("^" + foo(pattern) + "=.*$"); // $ Alert } String foo(String str) { @@ -88,38 +88,38 @@ public class RegexInjectionTest extends HttpServlet { } public boolean apache1(javax.servlet.http.HttpServletRequest request) { - String pattern = request.getParameter("pattern"); + String pattern = request.getParameter("pattern"); // $ Source String input = request.getParameter("input"); - return RegExUtils.removeAll(input, pattern).length() > 0; // $ hasRegexInjection + return RegExUtils.removeAll(input, pattern).length() > 0; // $ Alert } public boolean apache2(javax.servlet.http.HttpServletRequest request) { - String pattern = request.getParameter("pattern"); + String pattern = request.getParameter("pattern"); // $ Source String input = request.getParameter("input"); - return RegExUtils.removeFirst(input, pattern).length() > 0; // $ hasRegexInjection + return RegExUtils.removeFirst(input, pattern).length() > 0; // $ Alert } public boolean apache3(javax.servlet.http.HttpServletRequest request) { - String pattern = request.getParameter("pattern"); + String pattern = request.getParameter("pattern"); // $ Source String input = request.getParameter("input"); - return RegExUtils.removePattern(input, pattern).length() > 0; // $ hasRegexInjection + return RegExUtils.removePattern(input, pattern).length() > 0; // $ Alert } public boolean apache4(javax.servlet.http.HttpServletRequest request) { - String pattern = request.getParameter("pattern"); + String pattern = request.getParameter("pattern"); // $ Source String input = request.getParameter("input"); - return RegExUtils.replaceAll(input, pattern, "").length() > 0; // $ hasRegexInjection + return RegExUtils.replaceAll(input, pattern, "").length() > 0; // $ Alert } public boolean apache5(javax.servlet.http.HttpServletRequest request) { - String pattern = request.getParameter("pattern"); + String pattern = request.getParameter("pattern"); // $ Source String input = request.getParameter("input"); - return RegExUtils.replaceFirst(input, pattern, "").length() > 0; // $ hasRegexInjection + return RegExUtils.replaceFirst(input, pattern, "").length() > 0; // $ Alert } public boolean apache6(javax.servlet.http.HttpServletRequest request) { @@ -131,10 +131,10 @@ public class RegexInjectionTest extends HttpServlet { } public boolean apache7(javax.servlet.http.HttpServletRequest request) { - String pattern = request.getParameter("pattern"); + String pattern = request.getParameter("pattern"); // $ Source String input = request.getParameter("input"); - return RegExUtils.replacePattern(input, pattern, "").length() > 0; // $ hasRegexInjection + return RegExUtils.replacePattern(input, pattern, "").length() > 0; // $ Alert } // test `Pattern.quote` sanitizer @@ -154,13 +154,13 @@ public class RegexInjectionTest extends HttpServlet { } public Splitter guava1(javax.servlet.http.HttpServletRequest request) { - String pattern = request.getParameter("pattern"); - return Splitter.onPattern(pattern); // $ hasRegexInjection + String pattern = request.getParameter("pattern"); // $ Source + return Splitter.onPattern(pattern); // $ Alert } public Splitter guava2(javax.servlet.http.HttpServletRequest request) { - String pattern = request.getParameter("pattern"); + String pattern = request.getParameter("pattern"); // $ Source // sink is `Pattern.compile` - return Splitter.on(Pattern.compile(pattern)); // $ hasRegexInjection + return Splitter.on(Pattern.compile(pattern)); // $ Alert } } diff --git a/java/ql/test/query-tests/security/CWE-730/RegexInjection/RegexInjectionTest.qlref b/java/ql/test/query-tests/security/CWE-730/RegexInjection/RegexInjectionTest.qlref new file mode 100644 index 00000000000..613229f956b --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-730/RegexInjection/RegexInjectionTest.qlref @@ -0,0 +1,4 @@ +query: Security/CWE/CWE-730/RegexInjection.ql +postprocess: + - utils/test/PrettyPrintModels.ql + - utils/test/InlineExpectationsTestQuery.ql diff --git a/java/ql/test/query-tests/security/CWE-730/RegexInjection/options b/java/ql/test/query-tests/security/CWE-730/RegexInjection/options new file mode 100644 index 00000000000..591d7fd827b --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-730/RegexInjection/options @@ -0,0 +1 @@ +// semmle-extractor-options: --javac-args -cp ${testdir}/../../../../stubs/servlet-api-2.4:${testdir}/../../../../stubs/guava-30.0:${testdir}/../../../../stubs/servlet-api-2.4:${testdir}/../../../../stubs/apache-commons-lang3-3.7 diff --git a/java/ql/test/query-tests/security/CWE-730/RegexInjectionTest.expected b/java/ql/test/query-tests/security/CWE-730/RegexInjectionTest.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/java/ql/test/query-tests/security/CWE-730/RegexInjectionTest.ql b/java/ql/test/query-tests/security/CWE-730/RegexInjectionTest.ql deleted file mode 100644 index cba14c212e9..00000000000 --- a/java/ql/test/query-tests/security/CWE-730/RegexInjectionTest.ql +++ /dev/null @@ -1,18 +0,0 @@ -import java -import utils.test.InlineExpectationsTest -import semmle.code.java.security.regexp.RegexInjectionQuery - -module RegexInjectionTest implements TestSig { - string getARelevantTag() { result = "hasRegexInjection" } - - predicate hasActualResult(Location location, string element, string tag, string value) { - tag = "hasRegexInjection" and - exists(RegexInjectionFlow::PathNode sink | RegexInjectionFlow::flowPath(_, sink) | - location = sink.getNode().getLocation() and - element = sink.getNode().toString() and - value = "" - ) - } -} - -import MakeTest diff --git a/java/ql/test/query-tests/security/CWE-730/options b/java/ql/test/query-tests/security/CWE-730/options deleted file mode 100644 index 884cb21114c..00000000000 --- a/java/ql/test/query-tests/security/CWE-730/options +++ /dev/null @@ -1 +0,0 @@ -// semmle-extractor-options: --javac-args -cp ${testdir}/../../../stubs/servlet-api-2.4:${testdir}/../../../stubs/guava-30.0:${testdir}/../../../stubs/servlet-api-2.4:${testdir}/../../../stubs/apache-commons-lang3-3.7 diff --git a/java/ql/test/query-tests/security/CWE-780/RsaWithoutOaepTest.expected b/java/ql/test/query-tests/security/CWE-780/RsaWithoutOaepTest.expected index e69de29bb2d..3509f576dfa 100644 --- a/java/ql/test/query-tests/security/CWE-780/RsaWithoutOaepTest.expected +++ b/java/ql/test/query-tests/security/CWE-780/RsaWithoutOaepTest.expected @@ -0,0 +1,12 @@ +#select +| RsaWithoutOaepTest.java:5:44:5:62 | "RSA/ECB/NoPadding" | RsaWithoutOaepTest.java:5:44:5:62 | "RSA/ECB/NoPadding" | RsaWithoutOaepTest.java:5:44:5:62 | "RSA/ECB/NoPadding" | This specification is used to $@ without OAEP padding. | RsaWithoutOaepTest.java:5:44:5:62 | "RSA/ECB/NoPadding" | initialize an RSA cipher | +| RsaWithoutOaepTest.java:15:32:15:50 | "RSA/ECB/NoPadding" : String | RsaWithoutOaepTest.java:15:32:15:50 | "RSA/ECB/NoPadding" : String | RsaWithoutOaepTest.java:11:35:11:38 | spec | This specification is used to $@ without OAEP padding. | RsaWithoutOaepTest.java:11:35:11:38 | spec | initialize an RSA cipher | +edges +| RsaWithoutOaepTest.java:10:29:10:39 | spec : String | RsaWithoutOaepTest.java:11:35:11:38 | spec | provenance | | +| RsaWithoutOaepTest.java:15:32:15:50 | "RSA/ECB/NoPadding" : String | RsaWithoutOaepTest.java:10:29:10:39 | spec : String | provenance | | +nodes +| RsaWithoutOaepTest.java:5:44:5:62 | "RSA/ECB/NoPadding" | semmle.label | "RSA/ECB/NoPadding" | +| RsaWithoutOaepTest.java:10:29:10:39 | spec : String | semmle.label | spec : String | +| RsaWithoutOaepTest.java:11:35:11:38 | spec | semmle.label | spec | +| RsaWithoutOaepTest.java:15:32:15:50 | "RSA/ECB/NoPadding" : String | semmle.label | "RSA/ECB/NoPadding" : String | +subpaths diff --git a/java/ql/test/query-tests/security/CWE-780/RsaWithoutOaepTest.java b/java/ql/test/query-tests/security/CWE-780/RsaWithoutOaepTest.java index b8a1c73110c..d953522d76b 100644 --- a/java/ql/test/query-tests/security/CWE-780/RsaWithoutOaepTest.java +++ b/java/ql/test/query-tests/security/CWE-780/RsaWithoutOaepTest.java @@ -2,16 +2,16 @@ import javax.crypto.Cipher; class RsaWithoutOaep { public void test() throws Exception { - Cipher rsaBad = Cipher.getInstance("RSA/ECB/NoPadding"); // $hasTaintFlow + Cipher rsaBad = Cipher.getInstance("RSA/ECB/NoPadding"); // $ Alert - Cipher rsaGood = Cipher.getInstance("RSA/ECB/OAEPWithSHA-1AndMGF1Padding"); + Cipher rsaGood = Cipher.getInstance("RSA/ECB/OAEPWithSHA-1AndMGF1Padding"); } public Cipher getCipher(String spec) throws Exception { - return Cipher.getInstance(spec); // $hasTaintFlow + return Cipher.getInstance(spec); // $ Sink } public void test2() throws Exception { - Cipher rsa = getCipher("RSA/ECB/NoPadding"); + Cipher rsa = getCipher("RSA/ECB/NoPadding"); // $ Alert } -} \ No newline at end of file +} diff --git a/java/ql/test/query-tests/security/CWE-780/RsaWithoutOaepTest.ql b/java/ql/test/query-tests/security/CWE-780/RsaWithoutOaepTest.ql deleted file mode 100644 index b91765e6b7c..00000000000 --- a/java/ql/test/query-tests/security/CWE-780/RsaWithoutOaepTest.ql +++ /dev/null @@ -1,4 +0,0 @@ -import java -import utils.test.InlineFlowTest -import semmle.code.java.security.RsaWithoutOaepQuery -import TaintFlowTest diff --git a/java/ql/test/query-tests/security/CWE-780/RsaWithoutOaepTest.qlref b/java/ql/test/query-tests/security/CWE-780/RsaWithoutOaepTest.qlref new file mode 100644 index 00000000000..72ada3ecfc2 --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-780/RsaWithoutOaepTest.qlref @@ -0,0 +1,4 @@ +query: Security/CWE/CWE-780/RsaWithoutOaep.ql +postprocess: + - utils/test/PrettyPrintModels.ql + - utils/test/InlineExpectationsTestQuery.ql diff --git a/java/ql/test/query-tests/security/CWE-917/OgnlInjection.java b/java/ql/test/query-tests/security/CWE-917/OgnlInjection.java index 777bbcb06aa..99f641f11d4 100644 --- a/java/ql/test/query-tests/security/CWE-917/OgnlInjection.java +++ b/java/ql/test/query-tests/security/CWE-917/OgnlInjection.java @@ -13,61 +13,61 @@ import org.springframework.web.bind.annotation.RequestMapping; @Controller public class OgnlInjection { @RequestMapping - public void testOgnlParseExpression(@RequestParam String expr) throws Exception { + public void testOgnlParseExpression(@RequestParam String expr) throws Exception { // $ Source Object tree = Ognl.parseExpression(expr); - Ognl.getValue(tree, new HashMap<>(), new Object()); // $hasOgnlInjection - Ognl.setValue(tree, new HashMap<>(), new Object()); // $hasOgnlInjection + Ognl.getValue(tree, new HashMap<>(), new Object()); // $ Alert + Ognl.setValue(tree, new HashMap<>(), new Object()); // $ Alert Node node = (Node) tree; - node.getValue(null, new Object()); // $hasOgnlInjection - node.setValue(null, new Object(), new Object()); // $hasOgnlInjection + node.getValue(null, new Object()); // $ Alert + node.setValue(null, new Object(), new Object()); // $ Alert } @RequestMapping - public void testOgnlCompileExpression(@RequestParam String expr) throws Exception { + public void testOgnlCompileExpression(@RequestParam String expr) throws Exception { // $ Source Node tree = Ognl.compileExpression(null, new Object(), expr); - Ognl.getValue(tree, new HashMap<>(), new Object()); // $hasOgnlInjection - Ognl.setValue(tree, new HashMap<>(), new Object()); // $hasOgnlInjection + Ognl.getValue(tree, new HashMap<>(), new Object()); // $ Alert + Ognl.setValue(tree, new HashMap<>(), new Object()); // $ Alert - tree.getValue(null, new Object()); // $hasOgnlInjection - tree.setValue(null, new Object(), new Object()); // $hasOgnlInjection + tree.getValue(null, new Object()); // $ Alert + tree.setValue(null, new Object(), new Object()); // $ Alert } @RequestMapping - public void testOgnlDirectlyToGetSet(@RequestParam String expr) throws Exception { - Ognl.getValue(expr, new Object()); // $hasOgnlInjection - Ognl.setValue(expr, new Object(), new Object()); // $hasOgnlInjection + public void testOgnlDirectlyToGetSet(@RequestParam String expr) throws Exception { // $ Source + Ognl.getValue(expr, new Object()); // $ Alert + Ognl.setValue(expr, new Object(), new Object()); // $ Alert } @RequestMapping - public void testStruts(@RequestParam String expr) throws Exception { + public void testStruts(@RequestParam String expr) throws Exception { // $ Source OgnlUtil ognl = new OgnlUtil(); - ognl.getValue(expr, new HashMap<>(), new Object()); // $hasOgnlInjection - ognl.setValue(expr, new HashMap<>(), new Object(), new Object()); // $hasOgnlInjection - new OgnlUtil().callMethod(expr, new HashMap<>(), new Object()); // $hasOgnlInjection + ognl.getValue(expr, new HashMap<>(), new Object()); // $ Alert + ognl.setValue(expr, new HashMap<>(), new Object(), new Object()); // $ Alert + new OgnlUtil().callMethod(expr, new HashMap<>(), new Object()); // $ Alert } @RequestMapping - public void testExpressionAccessor(@RequestParam String expr) throws Exception { + public void testExpressionAccessor(@RequestParam String expr) throws Exception { // $ Source Node tree = Ognl.compileExpression(null, new Object(), expr); ExpressionAccessor accessor = tree.getAccessor(); - accessor.get(null, new Object()); // $hasOgnlInjection - accessor.set(null, new Object(), new Object()); // $hasOgnlInjection + accessor.get(null, new Object()); // $ Alert + accessor.set(null, new Object(), new Object()); // $ Alert - Ognl.getValue(accessor, null, new Object()); // $hasOgnlInjection - Ognl.setValue(accessor, null, new Object()); // $hasOgnlInjection + Ognl.getValue(accessor, null, new Object()); // $ Alert + Ognl.setValue(accessor, null, new Object()); // $ Alert } @RequestMapping - public void testExpressionAccessorSetExpression(@RequestParam String expr) throws Exception { + public void testExpressionAccessorSetExpression(@RequestParam String expr) throws Exception { // $ Source Node tree = Ognl.compileExpression(null, new Object(), "\"some safe expression\".toString()"); ExpressionAccessor accessor = tree.getAccessor(); Node taintedTree = Ognl.compileExpression(null, new Object(), expr); accessor.setExpression(taintedTree); - accessor.get(null, new Object()); // $hasOgnlInjection - accessor.set(null, new Object(), new Object()); // $hasOgnlInjection + accessor.get(null, new Object()); // $ Alert + accessor.set(null, new Object(), new Object()); // $ Alert - Ognl.getValue(accessor, null, new Object()); // $hasOgnlInjection - Ognl.setValue(accessor, null, new Object()); // $hasOgnlInjection + Ognl.getValue(accessor, null, new Object()); // $ Alert + Ognl.setValue(accessor, null, new Object()); // $ Alert } } diff --git a/java/ql/test/query-tests/security/CWE-917/OgnlInjectionTest.expected b/java/ql/test/query-tests/security/CWE-917/OgnlInjectionTest.expected index e69de29bb2d..bcdf14e0c2b 100644 --- a/java/ql/test/query-tests/security/CWE-917/OgnlInjectionTest.expected +++ b/java/ql/test/query-tests/security/CWE-917/OgnlInjectionTest.expected @@ -0,0 +1,109 @@ +#select +| OgnlInjection.java:18:19:18:22 | tree | OgnlInjection.java:16:39:16:63 | expr : String | OgnlInjection.java:18:19:18:22 | tree | OGNL Expression Language statement depends on a $@. | OgnlInjection.java:16:39:16:63 | expr | user-provided value | +| OgnlInjection.java:19:19:19:22 | tree | OgnlInjection.java:16:39:16:63 | expr : String | OgnlInjection.java:19:19:19:22 | tree | OGNL Expression Language statement depends on a $@. | OgnlInjection.java:16:39:16:63 | expr | user-provided value | +| OgnlInjection.java:22:5:22:8 | node | OgnlInjection.java:16:39:16:63 | expr : String | OgnlInjection.java:22:5:22:8 | node | OGNL Expression Language statement depends on a $@. | OgnlInjection.java:16:39:16:63 | expr | user-provided value | +| OgnlInjection.java:23:5:23:8 | node | OgnlInjection.java:16:39:16:63 | expr : String | OgnlInjection.java:23:5:23:8 | node | OGNL Expression Language statement depends on a $@. | OgnlInjection.java:16:39:16:63 | expr | user-provided value | +| OgnlInjection.java:29:19:29:22 | tree | OgnlInjection.java:27:41:27:65 | expr : String | OgnlInjection.java:29:19:29:22 | tree | OGNL Expression Language statement depends on a $@. | OgnlInjection.java:27:41:27:65 | expr | user-provided value | +| OgnlInjection.java:30:19:30:22 | tree | OgnlInjection.java:27:41:27:65 | expr : String | OgnlInjection.java:30:19:30:22 | tree | OGNL Expression Language statement depends on a $@. | OgnlInjection.java:27:41:27:65 | expr | user-provided value | +| OgnlInjection.java:32:5:32:8 | tree | OgnlInjection.java:27:41:27:65 | expr : String | OgnlInjection.java:32:5:32:8 | tree | OGNL Expression Language statement depends on a $@. | OgnlInjection.java:27:41:27:65 | expr | user-provided value | +| OgnlInjection.java:33:5:33:8 | tree | OgnlInjection.java:27:41:27:65 | expr : String | OgnlInjection.java:33:5:33:8 | tree | OGNL Expression Language statement depends on a $@. | OgnlInjection.java:27:41:27:65 | expr | user-provided value | +| OgnlInjection.java:38:19:38:22 | expr | OgnlInjection.java:37:40:37:64 | expr : String | OgnlInjection.java:38:19:38:22 | expr | OGNL Expression Language statement depends on a $@. | OgnlInjection.java:37:40:37:64 | expr | user-provided value | +| OgnlInjection.java:39:19:39:22 | expr | OgnlInjection.java:37:40:37:64 | expr : String | OgnlInjection.java:39:19:39:22 | expr | OGNL Expression Language statement depends on a $@. | OgnlInjection.java:37:40:37:64 | expr | user-provided value | +| OgnlInjection.java:45:19:45:22 | expr | OgnlInjection.java:43:26:43:50 | expr : String | OgnlInjection.java:45:19:45:22 | expr | OGNL Expression Language statement depends on a $@. | OgnlInjection.java:43:26:43:50 | expr | user-provided value | +| OgnlInjection.java:46:19:46:22 | expr | OgnlInjection.java:43:26:43:50 | expr : String | OgnlInjection.java:46:19:46:22 | expr | OGNL Expression Language statement depends on a $@. | OgnlInjection.java:43:26:43:50 | expr | user-provided value | +| OgnlInjection.java:47:31:47:34 | expr | OgnlInjection.java:43:26:43:50 | expr : String | OgnlInjection.java:47:31:47:34 | expr | OGNL Expression Language statement depends on a $@. | OgnlInjection.java:43:26:43:50 | expr | user-provided value | +| OgnlInjection.java:54:5:54:12 | accessor | OgnlInjection.java:51:38:51:62 | expr : String | OgnlInjection.java:54:5:54:12 | accessor | OGNL Expression Language statement depends on a $@. | OgnlInjection.java:51:38:51:62 | expr | user-provided value | +| OgnlInjection.java:55:5:55:12 | accessor | OgnlInjection.java:51:38:51:62 | expr : String | OgnlInjection.java:55:5:55:12 | accessor | OGNL Expression Language statement depends on a $@. | OgnlInjection.java:51:38:51:62 | expr | user-provided value | +| OgnlInjection.java:57:19:57:26 | accessor | OgnlInjection.java:51:38:51:62 | expr : String | OgnlInjection.java:57:19:57:26 | accessor | OGNL Expression Language statement depends on a $@. | OgnlInjection.java:51:38:51:62 | expr | user-provided value | +| OgnlInjection.java:58:19:58:26 | accessor | OgnlInjection.java:51:38:51:62 | expr : String | OgnlInjection.java:58:19:58:26 | accessor | OGNL Expression Language statement depends on a $@. | OgnlInjection.java:51:38:51:62 | expr | user-provided value | +| OgnlInjection.java:67:5:67:12 | accessor | OgnlInjection.java:62:51:62:75 | expr : String | OgnlInjection.java:67:5:67:12 | accessor | OGNL Expression Language statement depends on a $@. | OgnlInjection.java:62:51:62:75 | expr | user-provided value | +| OgnlInjection.java:68:5:68:12 | accessor | OgnlInjection.java:62:51:62:75 | expr : String | OgnlInjection.java:68:5:68:12 | accessor | OGNL Expression Language statement depends on a $@. | OgnlInjection.java:62:51:62:75 | expr | user-provided value | +| OgnlInjection.java:70:19:70:26 | accessor | OgnlInjection.java:62:51:62:75 | expr : String | OgnlInjection.java:70:19:70:26 | accessor | OGNL Expression Language statement depends on a $@. | OgnlInjection.java:62:51:62:75 | expr | user-provided value | +| OgnlInjection.java:71:19:71:26 | accessor | OgnlInjection.java:62:51:62:75 | expr : String | OgnlInjection.java:71:19:71:26 | accessor | OGNL Expression Language statement depends on a $@. | OgnlInjection.java:62:51:62:75 | expr | user-provided value | +edges +| OgnlInjection.java:16:39:16:63 | expr : String | OgnlInjection.java:17:40:17:43 | expr : String | provenance | | +| OgnlInjection.java:17:19:17:44 | parseExpression(...) : Object | OgnlInjection.java:18:19:18:22 | tree | provenance | Sink:MaD:8 | +| OgnlInjection.java:17:19:17:44 | parseExpression(...) : Object | OgnlInjection.java:19:19:19:22 | tree | provenance | Sink:MaD:9 | +| OgnlInjection.java:17:19:17:44 | parseExpression(...) : Object | OgnlInjection.java:21:17:21:27 | (...)... : Object | provenance | | +| OgnlInjection.java:17:40:17:43 | expr : String | OgnlInjection.java:17:19:17:44 | parseExpression(...) : Object | provenance | Config | +| OgnlInjection.java:21:17:21:27 | (...)... : Object | OgnlInjection.java:22:5:22:8 | node | provenance | Sink:MaD:6 | +| OgnlInjection.java:21:17:21:27 | (...)... : Object | OgnlInjection.java:23:5:23:8 | node | provenance | Sink:MaD:7 | +| OgnlInjection.java:27:41:27:65 | expr : String | OgnlInjection.java:28:60:28:63 | expr : String | provenance | | +| OgnlInjection.java:28:17:28:64 | compileExpression(...) : Node | OgnlInjection.java:29:19:29:22 | tree | provenance | Sink:MaD:8 | +| OgnlInjection.java:28:17:28:64 | compileExpression(...) : Node | OgnlInjection.java:30:19:30:22 | tree | provenance | Sink:MaD:9 | +| OgnlInjection.java:28:17:28:64 | compileExpression(...) : Node | OgnlInjection.java:32:5:32:8 | tree | provenance | Sink:MaD:6 | +| OgnlInjection.java:28:17:28:64 | compileExpression(...) : Node | OgnlInjection.java:33:5:33:8 | tree | provenance | Sink:MaD:7 | +| OgnlInjection.java:28:60:28:63 | expr : String | OgnlInjection.java:28:17:28:64 | compileExpression(...) : Node | provenance | Config | +| OgnlInjection.java:37:40:37:64 | expr : String | OgnlInjection.java:38:19:38:22 | expr | provenance | Sink:MaD:8 | +| OgnlInjection.java:37:40:37:64 | expr : String | OgnlInjection.java:39:19:39:22 | expr | provenance | Sink:MaD:9 | +| OgnlInjection.java:43:26:43:50 | expr : String | OgnlInjection.java:45:19:45:22 | expr | provenance | Sink:MaD:2 | +| OgnlInjection.java:43:26:43:50 | expr : String | OgnlInjection.java:46:19:46:22 | expr | provenance | Sink:MaD:3 | +| OgnlInjection.java:43:26:43:50 | expr : String | OgnlInjection.java:47:31:47:34 | expr | provenance | Sink:MaD:1 | +| OgnlInjection.java:51:38:51:62 | expr : String | OgnlInjection.java:52:60:52:63 | expr : String | provenance | | +| OgnlInjection.java:52:17:52:64 | compileExpression(...) : Node | OgnlInjection.java:53:35:53:38 | tree : Node | provenance | | +| OgnlInjection.java:52:60:52:63 | expr : String | OgnlInjection.java:52:17:52:64 | compileExpression(...) : Node | provenance | Config | +| OgnlInjection.java:53:35:53:38 | tree : Node | OgnlInjection.java:53:35:53:52 | getAccessor(...) : ExpressionAccessor | provenance | Config | +| OgnlInjection.java:53:35:53:52 | getAccessor(...) : ExpressionAccessor | OgnlInjection.java:54:5:54:12 | accessor | provenance | Sink:MaD:4 | +| OgnlInjection.java:53:35:53:52 | getAccessor(...) : ExpressionAccessor | OgnlInjection.java:55:5:55:12 | accessor | provenance | Sink:MaD:5 | +| OgnlInjection.java:53:35:53:52 | getAccessor(...) : ExpressionAccessor | OgnlInjection.java:57:19:57:26 | accessor | provenance | Sink:MaD:8 | +| OgnlInjection.java:53:35:53:52 | getAccessor(...) : ExpressionAccessor | OgnlInjection.java:58:19:58:26 | accessor | provenance | Sink:MaD:9 | +| OgnlInjection.java:62:51:62:75 | expr : String | OgnlInjection.java:65:67:65:70 | expr : String | provenance | | +| OgnlInjection.java:65:24:65:71 | compileExpression(...) : Node | OgnlInjection.java:66:28:66:38 | taintedTree : Node | provenance | | +| OgnlInjection.java:65:67:65:70 | expr : String | OgnlInjection.java:65:24:65:71 | compileExpression(...) : Node | provenance | Config | +| OgnlInjection.java:66:5:66:12 | accessor [post update] : ExpressionAccessor | OgnlInjection.java:67:5:67:12 | accessor | provenance | Sink:MaD:4 | +| OgnlInjection.java:66:5:66:12 | accessor [post update] : ExpressionAccessor | OgnlInjection.java:68:5:68:12 | accessor | provenance | Sink:MaD:5 | +| OgnlInjection.java:66:5:66:12 | accessor [post update] : ExpressionAccessor | OgnlInjection.java:70:19:70:26 | accessor | provenance | Sink:MaD:8 | +| OgnlInjection.java:66:5:66:12 | accessor [post update] : ExpressionAccessor | OgnlInjection.java:71:19:71:26 | accessor | provenance | Sink:MaD:9 | +| OgnlInjection.java:66:28:66:38 | taintedTree : Node | OgnlInjection.java:66:5:66:12 | accessor [post update] : ExpressionAccessor | provenance | Config | +models +| 1 | Sink: com.opensymphony.xwork2.ognl; OgnlUtil; false; callMethod; ; ; Argument[0]; ognl-injection; manual | +| 2 | Sink: com.opensymphony.xwork2.ognl; OgnlUtil; false; getValue; ; ; Argument[0]; ognl-injection; manual | +| 3 | Sink: com.opensymphony.xwork2.ognl; OgnlUtil; false; setValue; ; ; Argument[0]; ognl-injection; manual | +| 4 | Sink: ognl.enhance; ExpressionAccessor; true; get; ; ; Argument[this]; ognl-injection; manual | +| 5 | Sink: ognl.enhance; ExpressionAccessor; true; set; ; ; Argument[this]; ognl-injection; manual | +| 6 | Sink: ognl; Node; false; getValue; ; ; Argument[this]; ognl-injection; manual | +| 7 | Sink: ognl; Node; false; setValue; ; ; Argument[this]; ognl-injection; manual | +| 8 | Sink: ognl; Ognl; false; getValue; ; ; Argument[0]; ognl-injection; manual | +| 9 | Sink: ognl; Ognl; false; setValue; ; ; Argument[0]; ognl-injection; manual | +nodes +| OgnlInjection.java:16:39:16:63 | expr : String | semmle.label | expr : String | +| OgnlInjection.java:17:19:17:44 | parseExpression(...) : Object | semmle.label | parseExpression(...) : Object | +| OgnlInjection.java:17:40:17:43 | expr : String | semmle.label | expr : String | +| OgnlInjection.java:18:19:18:22 | tree | semmle.label | tree | +| OgnlInjection.java:19:19:19:22 | tree | semmle.label | tree | +| OgnlInjection.java:21:17:21:27 | (...)... : Object | semmle.label | (...)... : Object | +| OgnlInjection.java:22:5:22:8 | node | semmle.label | node | +| OgnlInjection.java:23:5:23:8 | node | semmle.label | node | +| OgnlInjection.java:27:41:27:65 | expr : String | semmle.label | expr : String | +| OgnlInjection.java:28:17:28:64 | compileExpression(...) : Node | semmle.label | compileExpression(...) : Node | +| OgnlInjection.java:28:60:28:63 | expr : String | semmle.label | expr : String | +| OgnlInjection.java:29:19:29:22 | tree | semmle.label | tree | +| OgnlInjection.java:30:19:30:22 | tree | semmle.label | tree | +| OgnlInjection.java:32:5:32:8 | tree | semmle.label | tree | +| OgnlInjection.java:33:5:33:8 | tree | semmle.label | tree | +| OgnlInjection.java:37:40:37:64 | expr : String | semmle.label | expr : String | +| OgnlInjection.java:38:19:38:22 | expr | semmle.label | expr | +| OgnlInjection.java:39:19:39:22 | expr | semmle.label | expr | +| OgnlInjection.java:43:26:43:50 | expr : String | semmle.label | expr : String | +| OgnlInjection.java:45:19:45:22 | expr | semmle.label | expr | +| OgnlInjection.java:46:19:46:22 | expr | semmle.label | expr | +| OgnlInjection.java:47:31:47:34 | expr | semmle.label | expr | +| OgnlInjection.java:51:38:51:62 | expr : String | semmle.label | expr : String | +| OgnlInjection.java:52:17:52:64 | compileExpression(...) : Node | semmle.label | compileExpression(...) : Node | +| OgnlInjection.java:52:60:52:63 | expr : String | semmle.label | expr : String | +| OgnlInjection.java:53:35:53:38 | tree : Node | semmle.label | tree : Node | +| OgnlInjection.java:53:35:53:52 | getAccessor(...) : ExpressionAccessor | semmle.label | getAccessor(...) : ExpressionAccessor | +| OgnlInjection.java:54:5:54:12 | accessor | semmle.label | accessor | +| OgnlInjection.java:55:5:55:12 | accessor | semmle.label | accessor | +| OgnlInjection.java:57:19:57:26 | accessor | semmle.label | accessor | +| OgnlInjection.java:58:19:58:26 | accessor | semmle.label | accessor | +| OgnlInjection.java:62:51:62:75 | expr : String | semmle.label | expr : String | +| OgnlInjection.java:65:24:65:71 | compileExpression(...) : Node | semmle.label | compileExpression(...) : Node | +| OgnlInjection.java:65:67:65:70 | expr : String | semmle.label | expr : String | +| OgnlInjection.java:66:5:66:12 | accessor [post update] : ExpressionAccessor | semmle.label | accessor [post update] : ExpressionAccessor | +| OgnlInjection.java:66:28:66:38 | taintedTree : Node | semmle.label | taintedTree : Node | +| OgnlInjection.java:67:5:67:12 | accessor | semmle.label | accessor | +| OgnlInjection.java:68:5:68:12 | accessor | semmle.label | accessor | +| OgnlInjection.java:70:19:70:26 | accessor | semmle.label | accessor | +| OgnlInjection.java:71:19:71:26 | accessor | semmle.label | accessor | +subpaths diff --git a/java/ql/test/query-tests/security/CWE-917/OgnlInjectionTest.ql b/java/ql/test/query-tests/security/CWE-917/OgnlInjectionTest.ql deleted file mode 100644 index 5957bdf5fa2..00000000000 --- a/java/ql/test/query-tests/security/CWE-917/OgnlInjectionTest.ql +++ /dev/null @@ -1,18 +0,0 @@ -import java -import semmle.code.java.security.OgnlInjectionQuery -import utils.test.InlineExpectationsTest - -module OgnlInjectionTest implements TestSig { - string getARelevantTag() { result = "hasOgnlInjection" } - - predicate hasActualResult(Location location, string element, string tag, string value) { - tag = "hasOgnlInjection" and - exists(DataFlow::Node sink | OgnlInjectionFlow::flowTo(sink) | - sink.getLocation() = location and - element = sink.toString() and - value = "" - ) - } -} - -import MakeTest diff --git a/java/ql/test/query-tests/security/CWE-917/OgnlInjectionTest.qlref b/java/ql/test/query-tests/security/CWE-917/OgnlInjectionTest.qlref new file mode 100644 index 00000000000..f27fdc29657 --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-917/OgnlInjectionTest.qlref @@ -0,0 +1,4 @@ +query: Security/CWE/CWE-917/OgnlInjection.ql +postprocess: + - utils/test/PrettyPrintModels.ql + - utils/test/InlineExpectationsTestQuery.ql diff --git a/java/ql/test/query-tests/security/CWE-918/ApacheHttpSSRF.java b/java/ql/test/query-tests/security/CWE-918/ApacheHttpSSRF.java index a3f476ccfec..0fcb3c12975 100644 --- a/java/ql/test/query-tests/security/CWE-918/ApacheHttpSSRF.java +++ b/java/ql/test/query-tests/security/CWE-918/ApacheHttpSSRF.java @@ -24,38 +24,38 @@ public class ApacheHttpSSRF extends HttpServlet { throws ServletException, IOException { try { - String sink = request.getParameter("uri"); + String sink = request.getParameter("uri"); // $ Source URI uri = new URI(sink); - HttpGet httpGet = new HttpGet(uri); // $ SSRF + HttpGet httpGet = new HttpGet(uri); // $ Alert HttpGet httpGet2 = new HttpGet(); - httpGet2.setURI(uri); // $ SSRF + httpGet2.setURI(uri); // $ Alert - new HttpHead(uri); // $ SSRF - new HttpPost(uri); // $ SSRF - new HttpPut(uri); // $ SSRF - new HttpDelete(uri); // $ SSRF - new HttpOptions(uri); // $ SSRF - new HttpTrace(uri); // $ SSRF - new HttpPatch(uri); // $ SSRF + new HttpHead(uri); // $ Alert + new HttpPost(uri); // $ Alert + new HttpPut(uri); // $ Alert + new HttpDelete(uri); // $ Alert + new HttpOptions(uri); // $ Alert + new HttpTrace(uri); // $ Alert + new HttpPatch(uri); // $ Alert - new BasicHttpRequest(new BasicRequestLine("GET", uri.toString(), null)); // $ SSRF - new BasicHttpRequest("GET", uri.toString()); // $ SSRF - new BasicHttpRequest("GET", uri.toString(), null); // $ SSRF + new BasicHttpRequest(new BasicRequestLine("GET", uri.toString(), null)); // $ Alert + new BasicHttpRequest("GET", uri.toString()); // $ Alert + new BasicHttpRequest("GET", uri.toString(), null); // $ Alert - new BasicHttpEntityEnclosingRequest(new BasicRequestLine("GET", uri.toString(), null)); // $ SSRF - new BasicHttpEntityEnclosingRequest("GET", uri.toString()); // $ SSRF - new BasicHttpEntityEnclosingRequest("GET", uri.toString(), null); // $ SSRF + new BasicHttpEntityEnclosingRequest(new BasicRequestLine("GET", uri.toString(), null)); // $ Alert + new BasicHttpEntityEnclosingRequest("GET", uri.toString()); // $ Alert + new BasicHttpEntityEnclosingRequest("GET", uri.toString(), null); // $ Alert - RequestBuilder.get(uri); // $ SSRF - RequestBuilder.post(uri); // $ SSRF - RequestBuilder.put(uri); // $ SSRF - RequestBuilder.delete(uri); // $ SSRF - RequestBuilder.options(uri); // $ SSRF - RequestBuilder.head(uri); // $ SSRF - RequestBuilder.trace(uri); // $ SSRF - RequestBuilder.patch(uri); // $ SSRF - RequestBuilder.get("").setUri(uri); // $ SSRF + RequestBuilder.get(uri); // $ Alert + RequestBuilder.post(uri); // $ Alert + RequestBuilder.put(uri); // $ Alert + RequestBuilder.delete(uri); // $ Alert + RequestBuilder.options(uri); // $ Alert + RequestBuilder.head(uri); // $ Alert + RequestBuilder.trace(uri); // $ Alert + RequestBuilder.patch(uri); // $ Alert + RequestBuilder.get("").setUri(uri); // $ Alert } catch (Exception e) { // TODO: handle exception diff --git a/java/ql/test/query-tests/security/CWE-918/ApacheHttpSSRFVersion5.java b/java/ql/test/query-tests/security/CWE-918/ApacheHttpSSRFVersion5.java index de22dd02fac..ad9bf4546a9 100644 --- a/java/ql/test/query-tests/security/CWE-918/ApacheHttpSSRFVersion5.java +++ b/java/ql/test/query-tests/security/CWE-918/ApacheHttpSSRFVersion5.java @@ -38,134 +38,134 @@ public class ApacheHttpSSRFVersion5 extends HttpServlet { throws ServletException, IOException { try { - String uriSink = request.getParameter("uri"); + String uriSink = request.getParameter("uri"); // $ Source URI uri = new URI(uriSink); - String hostSink = request.getParameter("host"); + String hostSink = request.getParameter("host"); // $ Source HttpHost host = new HttpHost(hostSink); // org.apache.hc.client5.http.async.methods.BasicHttpRequests - BasicHttpRequests.create(Method.CONNECT, host, "path"); // $ SSRF - BasicHttpRequests.create(Method.CONNECT, uri.toString()); // $ SSRF - BasicHttpRequests.create(Method.CONNECT, uri); // $ SSRF - BasicHttpRequests.create("method", uri.toString()); // $ SSRF - BasicHttpRequests.create("method", uri); // $ SSRF + BasicHttpRequests.create(Method.CONNECT, host, "path"); // $ Alert + BasicHttpRequests.create(Method.CONNECT, uri.toString()); // $ Alert + BasicHttpRequests.create(Method.CONNECT, uri); // $ Alert + BasicHttpRequests.create("method", uri.toString()); // $ Alert + BasicHttpRequests.create("method", uri); // $ Alert - BasicHttpRequests.delete(host, "path"); // $ SSRF - BasicHttpRequests.delete(uri.toString()); // $ SSRF - BasicHttpRequests.delete(uri); // $ SSRF + BasicHttpRequests.delete(host, "path"); // $ Alert + BasicHttpRequests.delete(uri.toString()); // $ Alert + BasicHttpRequests.delete(uri); // $ Alert - BasicHttpRequests.get(host, "path"); // $ SSRF - BasicHttpRequests.get(uri.toString()); // $ SSRF - BasicHttpRequests.get(uri); // $ SSRF + BasicHttpRequests.get(host, "path"); // $ Alert + BasicHttpRequests.get(uri.toString()); // $ Alert + BasicHttpRequests.get(uri); // $ Alert - BasicHttpRequests.head(host, "path"); // $ SSRF - BasicHttpRequests.head(uri.toString()); // $ SSRF - BasicHttpRequests.head(uri); // $ SSRF + BasicHttpRequests.head(host, "path"); // $ Alert + BasicHttpRequests.head(uri.toString()); // $ Alert + BasicHttpRequests.head(uri); // $ Alert - BasicHttpRequests.options(host, "path"); // $ SSRF - BasicHttpRequests.options(uri.toString()); // $ SSRF - BasicHttpRequests.options(uri); // $ SSRF + BasicHttpRequests.options(host, "path"); // $ Alert + BasicHttpRequests.options(uri.toString()); // $ Alert + BasicHttpRequests.options(uri); // $ Alert - BasicHttpRequests.patch(host, "path"); // $ SSRF - BasicHttpRequests.patch(uri.toString()); // $ SSRF - BasicHttpRequests.patch(uri); // $ SSRF + BasicHttpRequests.patch(host, "path"); // $ Alert + BasicHttpRequests.patch(uri.toString()); // $ Alert + BasicHttpRequests.patch(uri); // $ Alert - BasicHttpRequests.post(host, "path"); // $ SSRF - BasicHttpRequests.post(uri.toString()); // $ SSRF - BasicHttpRequests.post(uri); // $ SSRF + BasicHttpRequests.post(host, "path"); // $ Alert + BasicHttpRequests.post(uri.toString()); // $ Alert + BasicHttpRequests.post(uri); // $ Alert - BasicHttpRequests.put(host, "path"); // $ SSRF - BasicHttpRequests.put(uri.toString()); // $ SSRF - BasicHttpRequests.put(uri); // $ SSRF + BasicHttpRequests.put(host, "path"); // $ Alert + BasicHttpRequests.put(uri.toString()); // $ Alert + BasicHttpRequests.put(uri); // $ Alert - BasicHttpRequests.trace(host, "path"); // $ SSRF - BasicHttpRequests.trace(uri.toString()); // $ SSRF - BasicHttpRequests.trace(uri); // $ SSRF + BasicHttpRequests.trace(host, "path"); // $ Alert + BasicHttpRequests.trace(uri.toString()); // $ Alert + BasicHttpRequests.trace(uri); // $ Alert // org.apache.hc.client5.http.async.methods.ConfigurableHttpRequest - new ConfigurableHttpRequest("method", host, "path"); // $ SSRF - new ConfigurableHttpRequest("method", uri); // $ SSRF + new ConfigurableHttpRequest("method", host, "path"); // $ Alert + new ConfigurableHttpRequest("method", uri); // $ Alert // org.apache.hc.client5.http.async.methods.SimpleHttpRequest - new SimpleHttpRequest(Method.CONNECT, host, "path"); // $ SSRF - new SimpleHttpRequest(Method.CONNECT, uri); // $ SSRF - new SimpleHttpRequest("method", host, "path"); // $ SSRF - new SimpleHttpRequest("method", uri); // $ SSRF + new SimpleHttpRequest(Method.CONNECT, host, "path"); // $ Alert + new SimpleHttpRequest(Method.CONNECT, uri); // $ Alert + new SimpleHttpRequest("method", host, "path"); // $ Alert + new SimpleHttpRequest("method", uri); // $ Alert - SimpleHttpRequest.create(Method.CONNECT, host, "path"); // $ SSRF - SimpleHttpRequest.create(Method.CONNECT, uri); // $ SSRF - SimpleHttpRequest.create("method", uri.toString()); // $ SSRF - SimpleHttpRequest.create("method", uri); // $ SSRF + SimpleHttpRequest.create(Method.CONNECT, host, "path"); // $ Alert + SimpleHttpRequest.create(Method.CONNECT, uri); // $ Alert + SimpleHttpRequest.create("method", uri.toString()); // $ Alert + SimpleHttpRequest.create("method", uri); // $ Alert // org.apache.hc.client5.http.async.methods.SimpleHttpRequests - SimpleHttpRequests.create(Method.CONNECT, host, "path"); // $ SSRF - SimpleHttpRequests.create(Method.CONNECT, uri.toString()); // $ SSRF - SimpleHttpRequests.create(Method.CONNECT, uri); // $ SSRF - SimpleHttpRequests.create("method", uri.toString()); // $ SSRF - SimpleHttpRequests.create("method", uri); // $ SSRF + SimpleHttpRequests.create(Method.CONNECT, host, "path"); // $ Alert + SimpleHttpRequests.create(Method.CONNECT, uri.toString()); // $ Alert + SimpleHttpRequests.create(Method.CONNECT, uri); // $ Alert + SimpleHttpRequests.create("method", uri.toString()); // $ Alert + SimpleHttpRequests.create("method", uri); // $ Alert - SimpleHttpRequests.delete(host, "path"); // $ SSRF - SimpleHttpRequests.delete(uri.toString()); // $ SSRF - SimpleHttpRequests.delete(uri); // $ SSRF + SimpleHttpRequests.delete(host, "path"); // $ Alert + SimpleHttpRequests.delete(uri.toString()); // $ Alert + SimpleHttpRequests.delete(uri); // $ Alert - SimpleHttpRequests.get(host, "path"); // $ SSRF - SimpleHttpRequests.get(uri.toString()); // $ SSRF - SimpleHttpRequests.get(uri); // $ SSRF + SimpleHttpRequests.get(host, "path"); // $ Alert + SimpleHttpRequests.get(uri.toString()); // $ Alert + SimpleHttpRequests.get(uri); // $ Alert - SimpleHttpRequests.head(host, "path"); // $ SSRF - SimpleHttpRequests.head(uri.toString()); // $ SSRF - SimpleHttpRequests.head(uri); // $ SSRF + SimpleHttpRequests.head(host, "path"); // $ Alert + SimpleHttpRequests.head(uri.toString()); // $ Alert + SimpleHttpRequests.head(uri); // $ Alert - SimpleHttpRequests.options(host, "path"); // $ SSRF - SimpleHttpRequests.options(uri.toString()); // $ SSRF - SimpleHttpRequests.options(uri); // $ SSRF + SimpleHttpRequests.options(host, "path"); // $ Alert + SimpleHttpRequests.options(uri.toString()); // $ Alert + SimpleHttpRequests.options(uri); // $ Alert - SimpleHttpRequests.patch(host, "path"); // $ SSRF - SimpleHttpRequests.patch(uri.toString()); // $ SSRF - SimpleHttpRequests.patch(uri); // $ SSRF + SimpleHttpRequests.patch(host, "path"); // $ Alert + SimpleHttpRequests.patch(uri.toString()); // $ Alert + SimpleHttpRequests.patch(uri); // $ Alert - SimpleHttpRequests.post(host, "path"); // $ SSRF - SimpleHttpRequests.post(uri.toString()); // $ SSRF - SimpleHttpRequests.post(uri); // $ SSRF + SimpleHttpRequests.post(host, "path"); // $ Alert + SimpleHttpRequests.post(uri.toString()); // $ Alert + SimpleHttpRequests.post(uri); // $ Alert - SimpleHttpRequests.put(host, "path"); // $ SSRF - SimpleHttpRequests.put(uri.toString()); // $ SSRF - SimpleHttpRequests.put(uri); // $ SSRF + SimpleHttpRequests.put(host, "path"); // $ Alert + SimpleHttpRequests.put(uri.toString()); // $ Alert + SimpleHttpRequests.put(uri); // $ Alert - SimpleHttpRequests.trace(host, "path"); // $ SSRF - SimpleHttpRequests.trace(uri.toString()); // $ SSRF - SimpleHttpRequests.trace(uri); // $ SSRF + SimpleHttpRequests.trace(host, "path"); // $ Alert + SimpleHttpRequests.trace(uri.toString()); // $ Alert + SimpleHttpRequests.trace(uri); // $ Alert // org.apache.hc.client5.http.async.methods.SimpleRequestBuilder - SimpleRequestBuilder.delete(uri.toString()); // $ SSRF - SimpleRequestBuilder.delete(uri); // $ SSRF + SimpleRequestBuilder.delete(uri.toString()); // $ Alert + SimpleRequestBuilder.delete(uri); // $ Alert - SimpleRequestBuilder.get(uri.toString()); // $ SSRF - SimpleRequestBuilder.get(uri); // $ SSRF + SimpleRequestBuilder.get(uri.toString()); // $ Alert + SimpleRequestBuilder.get(uri); // $ Alert - SimpleRequestBuilder.head(uri.toString()); // $ SSRF - SimpleRequestBuilder.head(uri); // $ SSRF + SimpleRequestBuilder.head(uri.toString()); // $ Alert + SimpleRequestBuilder.head(uri); // $ Alert - SimpleRequestBuilder.options(uri.toString()); // $ SSRF - SimpleRequestBuilder.options(uri); // $ SSRF + SimpleRequestBuilder.options(uri.toString()); // $ Alert + SimpleRequestBuilder.options(uri); // $ Alert - SimpleRequestBuilder.patch(uri.toString()); // $ SSRF - SimpleRequestBuilder.patch(uri); // $ SSRF + SimpleRequestBuilder.patch(uri.toString()); // $ Alert + SimpleRequestBuilder.patch(uri); // $ Alert - SimpleRequestBuilder.post(uri.toString()); // $ SSRF - SimpleRequestBuilder.post(uri); // $ SSRF + SimpleRequestBuilder.post(uri.toString()); // $ Alert + SimpleRequestBuilder.post(uri); // $ Alert - SimpleRequestBuilder.put(uri.toString()); // $ SSRF - SimpleRequestBuilder.put(uri); // $ SSRF + SimpleRequestBuilder.put(uri.toString()); // $ Alert + SimpleRequestBuilder.put(uri); // $ Alert - SimpleRequestBuilder.get().setHttpHost(host); // $ SSRF + SimpleRequestBuilder.get().setHttpHost(host); // $ Alert - SimpleRequestBuilder.get().setUri(uri.toString()); // $ SSRF - SimpleRequestBuilder.get().setUri(uri); // $ SSRF + SimpleRequestBuilder.get().setUri(uri.toString()); // $ Alert + SimpleRequestBuilder.get().setUri(uri); // $ Alert - SimpleRequestBuilder.trace(uri.toString()); // $ SSRF - SimpleRequestBuilder.trace(uri); // $ SSRF + SimpleRequestBuilder.trace(uri.toString()); // $ Alert + SimpleRequestBuilder.trace(uri); // $ Alert } catch (Exception e) { // TODO: handle exception @@ -177,66 +177,66 @@ public class ApacheHttpSSRFVersion5 extends HttpServlet { throws ServletException, IOException { try { - String uriSink = request.getParameter("uri"); + String uriSink = request.getParameter("uri"); // $ Source URI uri = new URI(uriSink); // org.apache.hc.client5.http.classic.methods.ClassicHttpRequests - ClassicHttpRequests.create(Method.CONNECT, uri.toString()); // $ SSRF - ClassicHttpRequests.create(Method.CONNECT, uri); // $ SSRF - ClassicHttpRequests.create("method", uri.toString()); // $ SSRF - ClassicHttpRequests.create("method", uri); // $ SSRF + ClassicHttpRequests.create(Method.CONNECT, uri.toString()); // $ Alert + ClassicHttpRequests.create(Method.CONNECT, uri); // $ Alert + ClassicHttpRequests.create("method", uri.toString()); // $ Alert + ClassicHttpRequests.create("method", uri); // $ Alert - ClassicHttpRequests.delete(uri.toString()); // $ SSRF - ClassicHttpRequests.delete(uri); // $ SSRF + ClassicHttpRequests.delete(uri.toString()); // $ Alert + ClassicHttpRequests.delete(uri); // $ Alert - ClassicHttpRequests.get(uri.toString()); // $ SSRF - ClassicHttpRequests.get(uri); // $ SSRF + ClassicHttpRequests.get(uri.toString()); // $ Alert + ClassicHttpRequests.get(uri); // $ Alert - ClassicHttpRequests.head(uri.toString()); // $ SSRF - ClassicHttpRequests.head(uri); // $ SSRF + ClassicHttpRequests.head(uri.toString()); // $ Alert + ClassicHttpRequests.head(uri); // $ Alert - ClassicHttpRequests.options(uri.toString()); // $ SSRF - ClassicHttpRequests.options(uri); // $ SSRF + ClassicHttpRequests.options(uri.toString()); // $ Alert + ClassicHttpRequests.options(uri); // $ Alert - ClassicHttpRequests.patch(uri.toString()); // $ SSRF - ClassicHttpRequests.patch(uri); // $ SSRF + ClassicHttpRequests.patch(uri.toString()); // $ Alert + ClassicHttpRequests.patch(uri); // $ Alert - ClassicHttpRequests.post(uri.toString()); // $ SSRF - ClassicHttpRequests.post(uri); // $ SSRF + ClassicHttpRequests.post(uri.toString()); // $ Alert + ClassicHttpRequests.post(uri); // $ Alert - ClassicHttpRequests.put(uri.toString()); // $ SSRF - ClassicHttpRequests.put(uri); // $ SSRF + ClassicHttpRequests.put(uri.toString()); // $ Alert + ClassicHttpRequests.put(uri); // $ Alert - ClassicHttpRequests.trace(uri.toString()); // $ SSRF - ClassicHttpRequests.trace(uri); // $ SSRF + ClassicHttpRequests.trace(uri.toString()); // $ Alert + ClassicHttpRequests.trace(uri); // $ Alert // org.apache.hc.client5.http.classic.methods.HttpDelete through HttpTrace - new HttpDelete(uri.toString()); // $ SSRF - new HttpDelete(uri); // $ SSRF + new HttpDelete(uri.toString()); // $ Alert + new HttpDelete(uri); // $ Alert - new HttpGet(uri.toString()); // $ SSRF - new HttpGet(uri); // $ SSRF + new HttpGet(uri.toString()); // $ Alert + new HttpGet(uri); // $ Alert - new HttpHead(uri.toString()); // $ SSRF - new HttpHead(uri); // $ SSRF + new HttpHead(uri.toString()); // $ Alert + new HttpHead(uri); // $ Alert - new HttpOptions(uri.toString()); // $ SSRF - new HttpOptions(uri); // $ SSRF + new HttpOptions(uri.toString()); // $ Alert + new HttpOptions(uri); // $ Alert - new HttpPatch(uri.toString()); // $ SSRF - new HttpPatch(uri); // $ SSRF + new HttpPatch(uri.toString()); // $ Alert + new HttpPatch(uri); // $ Alert - new HttpPost(uri.toString()); // $ SSRF - new HttpPost(uri); // $ SSRF + new HttpPost(uri.toString()); // $ Alert + new HttpPost(uri); // $ Alert - new HttpPut(uri.toString()); // $ SSRF - new HttpPut(uri); // $ SSRF + new HttpPut(uri.toString()); // $ Alert + new HttpPut(uri); // $ Alert - new HttpTrace(uri.toString()); // $ SSRF - new HttpTrace(uri); // $ SSRF + new HttpTrace(uri.toString()); // $ Alert + new HttpTrace(uri); // $ Alert // org.apache.hc.client5.http.classic.methods.HttpUriRequestBase - new HttpUriRequestBase("method", uri); // $ SSRF + new HttpUriRequestBase("method", uri); // $ Alert } catch (Exception e) { // TODO: handle exception @@ -248,37 +248,37 @@ public class ApacheHttpSSRFVersion5 extends HttpServlet { throws ServletException, IOException { try { - String uriSink = request.getParameter("uri"); + String uriSink = request.getParameter("uri"); // $ Source URI uri = new URI(uriSink); // org.apache.hc.client5.http.fluent.Request - Request.create(Method.CONNECT, uri); // $ SSRF - Request.create("method", uri.toString()); // $ SSRF - Request.create("method", uri); // $ SSRF + Request.create(Method.CONNECT, uri); // $ Alert + Request.create("method", uri.toString()); // $ Alert + Request.create("method", uri); // $ Alert - Request.delete(uri.toString()); // $ SSRF - Request.delete(uri); // $ SSRF + Request.delete(uri.toString()); // $ Alert + Request.delete(uri); // $ Alert - Request.get(uri.toString()); // $ SSRF - Request.get(uri); // $ SSRF + Request.get(uri.toString()); // $ Alert + Request.get(uri); // $ Alert - Request.head(uri.toString()); // $ SSRF - Request.head(uri); // $ SSRF + Request.head(uri.toString()); // $ Alert + Request.head(uri); // $ Alert - Request.options(uri.toString()); // $ SSRF - Request.options(uri); // $ SSRF + Request.options(uri.toString()); // $ Alert + Request.options(uri); // $ Alert - Request.patch(uri.toString()); // $ SSRF - Request.patch(uri); // $ SSRF + Request.patch(uri.toString()); // $ Alert + Request.patch(uri); // $ Alert - Request.post(uri.toString()); // $ SSRF - Request.post(uri); // $ SSRF + Request.post(uri.toString()); // $ Alert + Request.post(uri); // $ Alert - Request.put(uri.toString()); // $ SSRF - Request.put(uri); // $ SSRF + Request.put(uri.toString()); // $ Alert + Request.put(uri); // $ Alert - Request.trace(uri.toString()); // $ SSRF - Request.trace(uri); // $ SSRF + Request.trace(uri.toString()); // $ Alert + Request.trace(uri); // $ Alert } catch (Exception e) { // TODO: handle exception @@ -292,26 +292,26 @@ public class ApacheHttpSSRFVersion5 extends HttpServlet { throws ServletException, IOException { try { - String uriSink = request.getParameter("uri"); + String uriSink = request.getParameter("uri"); // $ Source URI uri = new URI(uriSink); - String hostSink = request.getParameter("host"); + String hostSink = request.getParameter("host"); // $ Source HttpHost host = new HttpHost(hostSink); // org.apache.hc.core5.http.impl.bootstrap HttpAsyncRequester httpAsyncReq = new HttpAsyncRequester(null, null, null, null, null, null); - httpAsyncReq.connect(host, null); // $ SSRF - httpAsyncReq.connect(host, null, null, null); // $ SSRF + httpAsyncReq.connect(host, null); // $ Alert + httpAsyncReq.connect(host, null, null, null); // $ Alert // org.apache.hc.core5.http.impl.io DefaultClassicHttpRequestFactory defClassicHttpReqFact = new DefaultClassicHttpRequestFactory(); - defClassicHttpReqFact.newHttpRequest("method", uri.toString()); // $ SSRF - defClassicHttpReqFact.newHttpRequest("method", uri); // $ SSRF + defClassicHttpReqFact.newHttpRequest("method", uri.toString()); // $ Alert + defClassicHttpReqFact.newHttpRequest("method", uri); // $ Alert // org.apache.hc.core5.http.impl.nio DefaultHttpRequestFactory defHttpReqFact = new DefaultHttpRequestFactory(); - defHttpReqFact.newHttpRequest("method", uri.toString()); // $ SSRF - defHttpReqFact.newHttpRequest("method", uri); // $ SSRF + defHttpReqFact.newHttpRequest("method", uri.toString()); // $ Alert + defHttpReqFact.newHttpRequest("method", uri); // $ Alert } catch (Exception e) { // TODO: handle exception @@ -323,41 +323,41 @@ public class ApacheHttpSSRFVersion5 extends HttpServlet { throws ServletException, IOException { try { - String uriSink = request.getParameter("uri"); + String uriSink = request.getParameter("uri"); // $ Source URI uri = new URI(uriSink); - String hostSink = request.getParameter("host"); + String hostSink = request.getParameter("host"); // $ Source HttpHost host = new HttpHost(hostSink); // org.apache.hc.core5.http.io.support.ClassicRequestBuilder - ClassicRequestBuilder.delete(uri.toString()); // $ SSRF - ClassicRequestBuilder.delete(uri); // $ SSRF + ClassicRequestBuilder.delete(uri.toString()); // $ Alert + ClassicRequestBuilder.delete(uri); // $ Alert - ClassicRequestBuilder.get(uri.toString()); // $ SSRF - ClassicRequestBuilder.get(uri); // $ SSRF + ClassicRequestBuilder.get(uri.toString()); // $ Alert + ClassicRequestBuilder.get(uri); // $ Alert - ClassicRequestBuilder.head(uri.toString()); // $ SSRF - ClassicRequestBuilder.head(uri); // $ SSRF + ClassicRequestBuilder.head(uri.toString()); // $ Alert + ClassicRequestBuilder.head(uri); // $ Alert - ClassicRequestBuilder.options(uri.toString()); // $ SSRF - ClassicRequestBuilder.options(uri); // $ SSRF + ClassicRequestBuilder.options(uri.toString()); // $ Alert + ClassicRequestBuilder.options(uri); // $ Alert - ClassicRequestBuilder.patch(uri.toString()); // $ SSRF - ClassicRequestBuilder.patch(uri); // $ SSRF + ClassicRequestBuilder.patch(uri.toString()); // $ Alert + ClassicRequestBuilder.patch(uri); // $ Alert - ClassicRequestBuilder.post(uri.toString()); // $ SSRF - ClassicRequestBuilder.post(uri); // $ SSRF + ClassicRequestBuilder.post(uri.toString()); // $ Alert + ClassicRequestBuilder.post(uri); // $ Alert - ClassicRequestBuilder.put(uri.toString()); // $ SSRF - ClassicRequestBuilder.put(uri); // $ SSRF + ClassicRequestBuilder.put(uri.toString()); // $ Alert + ClassicRequestBuilder.put(uri); // $ Alert - ClassicRequestBuilder.get().setHttpHost(host); // $ SSRF + ClassicRequestBuilder.get().setHttpHost(host); // $ Alert - ClassicRequestBuilder.get().setUri(uri.toString()); // $ SSRF - ClassicRequestBuilder.get().setUri(uri); // $ SSRF + ClassicRequestBuilder.get().setUri(uri.toString()); // $ Alert + ClassicRequestBuilder.get().setUri(uri); // $ Alert - ClassicRequestBuilder.trace(uri.toString()); // $ SSRF - ClassicRequestBuilder.trace(uri); // $ SSRF + ClassicRequestBuilder.trace(uri.toString()); // $ Alert + ClassicRequestBuilder.trace(uri); // $ Alert } catch (Exception e) { // TODO: handle exception @@ -369,29 +369,29 @@ public class ApacheHttpSSRFVersion5 extends HttpServlet { throws ServletException, IOException { try { - String uriSink = request.getParameter("uri"); + String uriSink = request.getParameter("uri"); // $ Source URI uri = new URI(uriSink); - String hostSink = request.getParameter("host"); + String hostSink = request.getParameter("host"); // $ Source HttpHost host = new HttpHost(hostSink); // BasicClassicHttpRequest - new BasicClassicHttpRequest(Method.CONNECT, host, "path"); // $ SSRF - new BasicClassicHttpRequest(Method.CONNECT, uri); // $ SSRF - new BasicClassicHttpRequest("method", host, "path"); // $ SSRF - new BasicClassicHttpRequest("method", uri); // $ SSRF + new BasicClassicHttpRequest(Method.CONNECT, host, "path"); // $ Alert + new BasicClassicHttpRequest(Method.CONNECT, uri); // $ Alert + new BasicClassicHttpRequest("method", host, "path"); // $ Alert + new BasicClassicHttpRequest("method", uri); // $ Alert // BasicHttpRequest - new BasicHttpRequest(Method.CONNECT, host, "path"); // $ SSRF - new BasicHttpRequest(Method.CONNECT, uri); // $ SSRF - new BasicHttpRequest("method", host, "path"); // $ SSRF - new BasicHttpRequest("method", uri); // $ SSRF + new BasicHttpRequest(Method.CONNECT, host, "path"); // $ Alert + new BasicHttpRequest(Method.CONNECT, uri); // $ Alert + new BasicHttpRequest("method", host, "path"); // $ Alert + new BasicHttpRequest("method", uri); // $ Alert BasicHttpRequest bhr = new BasicHttpRequest("method", "path"); - bhr.setUri(uri); // $ SSRF + bhr.setUri(uri); // $ Alert // HttpRequestWrapper HttpRequestWrapper hrw = new HttpRequestWrapper(null); - hrw.setUri(uri); // $ SSRF + hrw.setUri(uri); // $ Alert } catch (Exception e) { // TODO: handle exception diff --git a/java/ql/test/query-tests/security/CWE-918/JakartaWsSSRF.java b/java/ql/test/query-tests/security/CWE-918/JakartaWsSSRF.java index ced25365211..37bf91d81fd 100644 --- a/java/ql/test/query-tests/security/CWE-918/JakartaWsSSRF.java +++ b/java/ql/test/query-tests/security/CWE-918/JakartaWsSSRF.java @@ -11,8 +11,8 @@ public class JakartaWsSSRF extends HttpServlet { protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { Client client = ClientBuilder.newClient(); - String url = request.getParameter("url"); - client.target(url); // $ SSRF + String url = request.getParameter("url"); // $ Source + client.target(url); // $ Alert } } diff --git a/java/ql/test/query-tests/security/CWE-918/JavaNetHttpSSRF.java b/java/ql/test/query-tests/security/CWE-918/JavaNetHttpSSRF.java index 7cc5578ebf3..7181d426ffb 100644 --- a/java/ql/test/query-tests/security/CWE-918/JavaNetHttpSSRF.java +++ b/java/ql/test/query-tests/security/CWE-918/JavaNetHttpSSRF.java @@ -22,21 +22,21 @@ public class JavaNetHttpSSRF extends HttpServlet { throws ServletException, IOException { try { - String sink = request.getParameter("uri"); + String sink = request.getParameter("uri"); // $ Source URI uri = new URI(sink); URI uri2 = new URI("http", sink, "fragement"); URL url1 = new URL(sink); - URLConnection c1 = url1.openConnection(); // $ SSRF + URLConnection c1 = url1.openConnection(); // $ Alert SocketAddress sa = new SocketAddress() { }; - URLConnection c2 = url1.openConnection(new Proxy(Type.HTTP, sa)); // $ SSRF - InputStream c3 = url1.openStream(); // $ SSRF + URLConnection c2 = url1.openConnection(new Proxy(Type.HTTP, sa)); // $ Alert + InputStream c3 = url1.openStream(); // $ Alert // java.net.http HttpClient client = HttpClient.newHttpClient(); - HttpRequest request2 = HttpRequest.newBuilder().uri(uri2).build(); // $ SSRF - HttpRequest request3 = HttpRequest.newBuilder(uri).build(); // $ SSRF + HttpRequest request2 = HttpRequest.newBuilder().uri(uri2).build(); // $ Alert + HttpRequest request3 = HttpRequest.newBuilder(uri).build(); // $ Alert } catch (Exception e) { // TODO: handle exception diff --git a/java/ql/test/query-tests/security/CWE-918/JaxWsSSRF.java b/java/ql/test/query-tests/security/CWE-918/JaxWsSSRF.java index da650e2de6c..97602b29b55 100644 --- a/java/ql/test/query-tests/security/CWE-918/JaxWsSSRF.java +++ b/java/ql/test/query-tests/security/CWE-918/JaxWsSSRF.java @@ -11,8 +11,8 @@ public class JaxWsSSRF extends HttpServlet { protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { Client client = ClientBuilder.newClient(); - String url = request.getParameter("url"); - client.target(url); // $ SSRF + String url = request.getParameter("url"); // $ Source + client.target(url); // $ Alert } } diff --git a/java/ql/test/query-tests/security/CWE-918/JdbcUrlSSRF.java b/java/ql/test/query-tests/security/CWE-918/JdbcUrlSSRF.java index 94704c3d862..859b998c9ea 100644 --- a/java/ql/test/query-tests/security/CWE-918/JdbcUrlSSRF.java +++ b/java/ql/test/query-tests/security/CWE-918/JdbcUrlSSRF.java @@ -17,75 +17,75 @@ public class JdbcUrlSSRF extends HttpServlet { protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - - String jdbcUrl = request.getParameter("jdbcUrl"); + + String jdbcUrl = request.getParameter("jdbcUrl"); // $ Source Driver driver = new org.postgresql.Driver(); DataSourceBuilder dsBuilder = DataSourceBuilder.create(); - + try { - driver.connect(jdbcUrl, null); // $ SSRF + driver.connect(jdbcUrl, null); // $ Alert - DriverManager.getConnection(jdbcUrl); // $ SSRF - DriverManager.getConnection(jdbcUrl, "user", "password"); // $ SSRF - DriverManager.getConnection(jdbcUrl, null); // $ SSRF + DriverManager.getConnection(jdbcUrl); // $ Alert + DriverManager.getConnection(jdbcUrl, "user", "password"); // $ Alert + DriverManager.getConnection(jdbcUrl, null); // $ Alert - dsBuilder.url(jdbcUrl); // $ SSRF + dsBuilder.url(jdbcUrl); // $ Alert } catch(SQLException e) {} } protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - - String jdbcUrl = request.getParameter("jdbcUrl"); + + String jdbcUrl = request.getParameter("jdbcUrl"); // $ Source HikariConfig config = new HikariConfig(); - config.setJdbcUrl(jdbcUrl); // $ SSRF + config.setJdbcUrl(jdbcUrl); // $ Alert config.setUsername("database_username"); config.setPassword("database_password"); HikariDataSource ds = new HikariDataSource(); - ds.setJdbcUrl(jdbcUrl); // $ SSRF + ds.setJdbcUrl(jdbcUrl); // $ Alert Properties props = new Properties(); props.setProperty("driverClassName", "org.postgresql.Driver"); props.setProperty("jdbcUrl", jdbcUrl); - HikariConfig config2 = new HikariConfig(props); // $ SSRF + HikariConfig config2 = new HikariConfig(props); // $ Alert } protected void doPut(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - String jdbcUrl = request.getParameter("jdbcUrl"); - - DriverManagerDataSource dataSource = new DriverManagerDataSource(); - - dataSource.setDriverClassName("org.postgresql.Driver"); - dataSource.setUrl(jdbcUrl); // $ SSRF + String jdbcUrl = request.getParameter("jdbcUrl"); // $ Source - DriverManagerDataSource dataSource2 = new DriverManagerDataSource(jdbcUrl); // $ SSRF + DriverManagerDataSource dataSource = new DriverManagerDataSource(); + + dataSource.setDriverClassName("org.postgresql.Driver"); + dataSource.setUrl(jdbcUrl); // $ Alert + + DriverManagerDataSource dataSource2 = new DriverManagerDataSource(jdbcUrl); // $ Alert dataSource2.setDriverClassName("org.postgresql.Driver"); - DriverManagerDataSource dataSource3 = new DriverManagerDataSource(jdbcUrl, "user", "pass"); // $ SSRF + DriverManagerDataSource dataSource3 = new DriverManagerDataSource(jdbcUrl, "user", "pass"); // $ Alert dataSource3.setDriverClassName("org.postgresql.Driver"); - DriverManagerDataSource dataSource4 = new DriverManagerDataSource(jdbcUrl, null); // $ SSRF + DriverManagerDataSource dataSource4 = new DriverManagerDataSource(jdbcUrl, null); // $ Alert dataSource4.setDriverClassName("org.postgresql.Driver"); } protected void doDelete(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - String jdbcUrl = request.getParameter("jdbcUrl"); + String jdbcUrl = request.getParameter("jdbcUrl"); // $ Source - Jdbi.create(jdbcUrl); // $ SSRF - Jdbi.create(jdbcUrl, null); // $ SSRF - Jdbi.create(jdbcUrl, "user", "pass"); // $ SSRF + Jdbi.create(jdbcUrl); // $ Alert + Jdbi.create(jdbcUrl, null); // $ Alert + Jdbi.create(jdbcUrl, "user", "pass"); // $ Alert - Jdbi.open(jdbcUrl); // $ SSRF - Jdbi.open(jdbcUrl, null); // $ SSRF - Jdbi.open(jdbcUrl, "user", "pass"); // $ SSRF + Jdbi.open(jdbcUrl); // $ Alert + Jdbi.open(jdbcUrl, null); // $ Alert + Jdbi.open(jdbcUrl, "user", "pass"); // $ Alert } - -} \ No newline at end of file + +} diff --git a/java/ql/test/query-tests/security/CWE-918/ReactiveWebClientSSRF.java b/java/ql/test/query-tests/security/CWE-918/ReactiveWebClientSSRF.java index 00d707f71e4..e7e350b054a 100644 --- a/java/ql/test/query-tests/security/CWE-918/ReactiveWebClientSSRF.java +++ b/java/ql/test/query-tests/security/CWE-918/ReactiveWebClientSSRF.java @@ -12,8 +12,8 @@ public class ReactiveWebClientSSRF extends HttpServlet { protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { try { - String url = request.getParameter("uri"); - WebClient webClient = WebClient.create(url); // $ SSRF + String url = request.getParameter("uri"); // $ Source + WebClient webClient = WebClient.create(url); // $ Alert Mono result = webClient.get() .uri("/") @@ -29,10 +29,10 @@ public class ReactiveWebClientSSRF extends HttpServlet { protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { try { - String url = request.getParameter("uri"); + String url = request.getParameter("uri"); // $ Source WebClient webClient = WebClient.builder() .defaultHeader("User-Agent", "Java") - .baseUrl(url) // $ SSRF + .baseUrl(url) // $ Alert .build(); @@ -46,4 +46,4 @@ public class ReactiveWebClientSSRF extends HttpServlet { // Ignore } } -} \ No newline at end of file +} diff --git a/java/ql/test/query-tests/security/CWE-918/RequestForgery.expected b/java/ql/test/query-tests/security/CWE-918/RequestForgery.expected index e69de29bb2d..b08273da0ca 100644 --- a/java/ql/test/query-tests/security/CWE-918/RequestForgery.expected +++ b/java/ql/test/query-tests/security/CWE-918/RequestForgery.expected @@ -0,0 +1,1825 @@ +#select +| ApacheHttpSSRF.java:30:43:30:45 | uri | ApacheHttpSSRF.java:27:27:27:53 | getParameter(...) : String | ApacheHttpSSRF.java:30:43:30:45 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRF.java:27:27:27:53 | getParameter(...) | user-provided value | +| ApacheHttpSSRF.java:32:29:32:31 | uri | ApacheHttpSSRF.java:27:27:27:53 | getParameter(...) : String | ApacheHttpSSRF.java:32:29:32:31 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRF.java:27:27:27:53 | getParameter(...) | user-provided value | +| ApacheHttpSSRF.java:34:26:34:28 | uri | ApacheHttpSSRF.java:27:27:27:53 | getParameter(...) : String | ApacheHttpSSRF.java:34:26:34:28 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRF.java:27:27:27:53 | getParameter(...) | user-provided value | +| ApacheHttpSSRF.java:35:26:35:28 | uri | ApacheHttpSSRF.java:27:27:27:53 | getParameter(...) : String | ApacheHttpSSRF.java:35:26:35:28 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRF.java:27:27:27:53 | getParameter(...) | user-provided value | +| ApacheHttpSSRF.java:36:25:36:27 | uri | ApacheHttpSSRF.java:27:27:27:53 | getParameter(...) : String | ApacheHttpSSRF.java:36:25:36:27 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRF.java:27:27:27:53 | getParameter(...) | user-provided value | +| ApacheHttpSSRF.java:37:28:37:30 | uri | ApacheHttpSSRF.java:27:27:27:53 | getParameter(...) : String | ApacheHttpSSRF.java:37:28:37:30 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRF.java:27:27:27:53 | getParameter(...) | user-provided value | +| ApacheHttpSSRF.java:38:29:38:31 | uri | ApacheHttpSSRF.java:27:27:27:53 | getParameter(...) : String | ApacheHttpSSRF.java:38:29:38:31 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRF.java:27:27:27:53 | getParameter(...) | user-provided value | +| ApacheHttpSSRF.java:39:27:39:29 | uri | ApacheHttpSSRF.java:27:27:27:53 | getParameter(...) : String | ApacheHttpSSRF.java:39:27:39:29 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRF.java:27:27:27:53 | getParameter(...) | user-provided value | +| ApacheHttpSSRF.java:40:27:40:29 | uri | ApacheHttpSSRF.java:27:27:27:53 | getParameter(...) : String | ApacheHttpSSRF.java:40:27:40:29 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRF.java:27:27:27:53 | getParameter(...) | user-provided value | +| ApacheHttpSSRF.java:42:34:42:82 | new BasicRequestLine(...) | ApacheHttpSSRF.java:27:27:27:53 | getParameter(...) : String | ApacheHttpSSRF.java:42:34:42:82 | new BasicRequestLine(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRF.java:27:27:27:53 | getParameter(...) | user-provided value | +| ApacheHttpSSRF.java:43:41:43:54 | toString(...) | ApacheHttpSSRF.java:27:27:27:53 | getParameter(...) : String | ApacheHttpSSRF.java:43:41:43:54 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRF.java:27:27:27:53 | getParameter(...) | user-provided value | +| ApacheHttpSSRF.java:44:41:44:54 | toString(...) | ApacheHttpSSRF.java:27:27:27:53 | getParameter(...) : String | ApacheHttpSSRF.java:44:41:44:54 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRF.java:27:27:27:53 | getParameter(...) | user-provided value | +| ApacheHttpSSRF.java:46:49:46:97 | new BasicRequestLine(...) | ApacheHttpSSRF.java:27:27:27:53 | getParameter(...) : String | ApacheHttpSSRF.java:46:49:46:97 | new BasicRequestLine(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRF.java:27:27:27:53 | getParameter(...) | user-provided value | +| ApacheHttpSSRF.java:47:56:47:69 | toString(...) | ApacheHttpSSRF.java:27:27:27:53 | getParameter(...) : String | ApacheHttpSSRF.java:47:56:47:69 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRF.java:27:27:27:53 | getParameter(...) | user-provided value | +| ApacheHttpSSRF.java:48:56:48:69 | toString(...) | ApacheHttpSSRF.java:27:27:27:53 | getParameter(...) : String | ApacheHttpSSRF.java:48:56:48:69 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRF.java:27:27:27:53 | getParameter(...) | user-provided value | +| ApacheHttpSSRF.java:50:32:50:34 | uri | ApacheHttpSSRF.java:27:27:27:53 | getParameter(...) : String | ApacheHttpSSRF.java:50:32:50:34 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRF.java:27:27:27:53 | getParameter(...) | user-provided value | +| ApacheHttpSSRF.java:51:33:51:35 | uri | ApacheHttpSSRF.java:27:27:27:53 | getParameter(...) : String | ApacheHttpSSRF.java:51:33:51:35 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRF.java:27:27:27:53 | getParameter(...) | user-provided value | +| ApacheHttpSSRF.java:52:32:52:34 | uri | ApacheHttpSSRF.java:27:27:27:53 | getParameter(...) : String | ApacheHttpSSRF.java:52:32:52:34 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRF.java:27:27:27:53 | getParameter(...) | user-provided value | +| ApacheHttpSSRF.java:53:35:53:37 | uri | ApacheHttpSSRF.java:27:27:27:53 | getParameter(...) : String | ApacheHttpSSRF.java:53:35:53:37 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRF.java:27:27:27:53 | getParameter(...) | user-provided value | +| ApacheHttpSSRF.java:54:36:54:38 | uri | ApacheHttpSSRF.java:27:27:27:53 | getParameter(...) : String | ApacheHttpSSRF.java:54:36:54:38 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRF.java:27:27:27:53 | getParameter(...) | user-provided value | +| ApacheHttpSSRF.java:55:33:55:35 | uri | ApacheHttpSSRF.java:27:27:27:53 | getParameter(...) : String | ApacheHttpSSRF.java:55:33:55:35 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRF.java:27:27:27:53 | getParameter(...) | user-provided value | +| ApacheHttpSSRF.java:56:34:56:36 | uri | ApacheHttpSSRF.java:27:27:27:53 | getParameter(...) : String | ApacheHttpSSRF.java:56:34:56:36 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRF.java:27:27:27:53 | getParameter(...) | user-provided value | +| ApacheHttpSSRF.java:57:34:57:36 | uri | ApacheHttpSSRF.java:27:27:27:53 | getParameter(...) : String | ApacheHttpSSRF.java:57:34:57:36 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRF.java:27:27:27:53 | getParameter(...) | user-provided value | +| ApacheHttpSSRF.java:58:43:58:45 | uri | ApacheHttpSSRF.java:27:27:27:53 | getParameter(...) : String | ApacheHttpSSRF.java:58:43:58:45 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRF.java:27:27:27:53 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:48:54:48:57 | host | ApacheHttpSSRFVersion5.java:44:31:44:58 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:48:54:48:57 | host | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:44:31:44:58 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:49:54:49:67 | toString(...) | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:49:54:49:67 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:50:54:50:56 | uri | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:50:54:50:56 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:51:48:51:61 | toString(...) | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:51:48:51:61 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:52:48:52:50 | uri | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:52:48:52:50 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:54:38:54:41 | host | ApacheHttpSSRFVersion5.java:44:31:44:58 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:54:38:54:41 | host | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:44:31:44:58 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:55:38:55:51 | toString(...) | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:55:38:55:51 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:56:38:56:40 | uri | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:56:38:56:40 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:58:35:58:38 | host | ApacheHttpSSRFVersion5.java:44:31:44:58 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:58:35:58:38 | host | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:44:31:44:58 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:59:35:59:48 | toString(...) | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:59:35:59:48 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:60:35:60:37 | uri | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:60:35:60:37 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:62:36:62:39 | host | ApacheHttpSSRFVersion5.java:44:31:44:58 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:62:36:62:39 | host | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:44:31:44:58 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:63:36:63:49 | toString(...) | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:63:36:63:49 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:64:36:64:38 | uri | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:64:36:64:38 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:66:39:66:42 | host | ApacheHttpSSRFVersion5.java:44:31:44:58 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:66:39:66:42 | host | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:44:31:44:58 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:67:39:67:52 | toString(...) | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:67:39:67:52 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:68:39:68:41 | uri | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:68:39:68:41 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:70:37:70:40 | host | ApacheHttpSSRFVersion5.java:44:31:44:58 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:70:37:70:40 | host | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:44:31:44:58 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:71:37:71:50 | toString(...) | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:71:37:71:50 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:72:37:72:39 | uri | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:72:37:72:39 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:74:36:74:39 | host | ApacheHttpSSRFVersion5.java:44:31:44:58 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:74:36:74:39 | host | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:44:31:44:58 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:75:36:75:49 | toString(...) | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:75:36:75:49 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:76:36:76:38 | uri | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:76:36:76:38 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:78:35:78:38 | host | ApacheHttpSSRFVersion5.java:44:31:44:58 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:78:35:78:38 | host | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:44:31:44:58 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:79:35:79:48 | toString(...) | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:79:35:79:48 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:80:35:80:37 | uri | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:80:35:80:37 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:82:37:82:40 | host | ApacheHttpSSRFVersion5.java:44:31:44:58 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:82:37:82:40 | host | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:44:31:44:58 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:83:37:83:50 | toString(...) | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:83:37:83:50 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:84:37:84:39 | uri | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:84:37:84:39 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:87:51:87:54 | host | ApacheHttpSSRFVersion5.java:44:31:44:58 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:87:51:87:54 | host | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:44:31:44:58 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:88:51:88:53 | uri | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:88:51:88:53 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:91:51:91:54 | host | ApacheHttpSSRFVersion5.java:44:31:44:58 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:91:51:91:54 | host | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:44:31:44:58 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:92:51:92:53 | uri | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:92:51:92:53 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:93:45:93:48 | host | ApacheHttpSSRFVersion5.java:44:31:44:58 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:93:45:93:48 | host | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:44:31:44:58 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:94:45:94:47 | uri | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:94:45:94:47 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:96:54:96:57 | host | ApacheHttpSSRFVersion5.java:44:31:44:58 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:96:54:96:57 | host | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:44:31:44:58 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:97:54:97:56 | uri | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:97:54:97:56 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:98:48:98:61 | toString(...) | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:98:48:98:61 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:99:48:99:50 | uri | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:99:48:99:50 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:102:55:102:58 | host | ApacheHttpSSRFVersion5.java:44:31:44:58 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:102:55:102:58 | host | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:44:31:44:58 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:103:55:103:68 | toString(...) | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:103:55:103:68 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:104:55:104:57 | uri | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:104:55:104:57 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:105:49:105:62 | toString(...) | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:105:49:105:62 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:106:49:106:51 | uri | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:106:49:106:51 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:108:39:108:42 | host | ApacheHttpSSRFVersion5.java:44:31:44:58 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:108:39:108:42 | host | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:44:31:44:58 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:109:39:109:52 | toString(...) | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:109:39:109:52 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:110:39:110:41 | uri | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:110:39:110:41 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:112:36:112:39 | host | ApacheHttpSSRFVersion5.java:44:31:44:58 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:112:36:112:39 | host | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:44:31:44:58 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:113:36:113:49 | toString(...) | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:113:36:113:49 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:114:36:114:38 | uri | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:114:36:114:38 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:116:37:116:40 | host | ApacheHttpSSRFVersion5.java:44:31:44:58 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:116:37:116:40 | host | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:44:31:44:58 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:117:37:117:50 | toString(...) | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:117:37:117:50 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:118:37:118:39 | uri | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:118:37:118:39 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:120:40:120:43 | host | ApacheHttpSSRFVersion5.java:44:31:44:58 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:120:40:120:43 | host | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:44:31:44:58 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:121:40:121:53 | toString(...) | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:121:40:121:53 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:122:40:122:42 | uri | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:122:40:122:42 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:124:38:124:41 | host | ApacheHttpSSRFVersion5.java:44:31:44:58 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:124:38:124:41 | host | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:44:31:44:58 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:125:38:125:51 | toString(...) | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:125:38:125:51 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:126:38:126:40 | uri | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:126:38:126:40 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:128:37:128:40 | host | ApacheHttpSSRFVersion5.java:44:31:44:58 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:128:37:128:40 | host | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:44:31:44:58 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:129:37:129:50 | toString(...) | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:129:37:129:50 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:130:37:130:39 | uri | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:130:37:130:39 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:132:36:132:39 | host | ApacheHttpSSRFVersion5.java:44:31:44:58 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:132:36:132:39 | host | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:44:31:44:58 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:133:36:133:49 | toString(...) | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:133:36:133:49 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:134:36:134:38 | uri | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:134:36:134:38 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:136:38:136:41 | host | ApacheHttpSSRFVersion5.java:44:31:44:58 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:136:38:136:41 | host | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:44:31:44:58 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:137:38:137:51 | toString(...) | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:137:38:137:51 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:138:38:138:40 | uri | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:138:38:138:40 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:141:41:141:54 | toString(...) | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:141:41:141:54 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:142:41:142:43 | uri | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:142:41:142:43 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:144:38:144:51 | toString(...) | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:144:38:144:51 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:145:38:145:40 | uri | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:145:38:145:40 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:147:39:147:52 | toString(...) | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:147:39:147:52 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:148:39:148:41 | uri | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:148:39:148:41 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:150:42:150:55 | toString(...) | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:150:42:150:55 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:151:42:151:44 | uri | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:151:42:151:44 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:153:40:153:53 | toString(...) | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:153:40:153:53 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:154:40:154:42 | uri | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:154:40:154:42 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:156:39:156:52 | toString(...) | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:156:39:156:52 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:157:39:157:41 | uri | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:157:39:157:41 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:159:38:159:51 | toString(...) | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:159:38:159:51 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:160:38:160:40 | uri | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:160:38:160:40 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:162:52:162:55 | host | ApacheHttpSSRFVersion5.java:44:31:44:58 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:162:52:162:55 | host | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:44:31:44:58 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:164:47:164:60 | toString(...) | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:164:47:164:60 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:165:47:165:49 | uri | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:165:47:165:49 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:167:40:167:53 | toString(...) | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:167:40:167:53 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:168:40:168:42 | uri | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:168:40:168:42 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:184:56:184:69 | toString(...) | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:184:56:184:69 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:185:56:185:58 | uri | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:185:56:185:58 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:186:50:186:63 | toString(...) | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:186:50:186:63 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:187:50:187:52 | uri | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:187:50:187:52 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:189:40:189:53 | toString(...) | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:189:40:189:53 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:190:40:190:42 | uri | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:190:40:190:42 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:192:37:192:50 | toString(...) | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:192:37:192:50 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:193:37:193:39 | uri | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:193:37:193:39 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:195:38:195:51 | toString(...) | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:195:38:195:51 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:196:38:196:40 | uri | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:196:38:196:40 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:198:41:198:54 | toString(...) | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:198:41:198:54 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:199:41:199:43 | uri | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:199:41:199:43 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:201:39:201:52 | toString(...) | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:201:39:201:52 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:202:39:202:41 | uri | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:202:39:202:41 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:204:38:204:51 | toString(...) | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:204:38:204:51 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:205:38:205:40 | uri | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:205:38:205:40 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:207:37:207:50 | toString(...) | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:207:37:207:50 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:208:37:208:39 | uri | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:208:37:208:39 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:210:39:210:52 | toString(...) | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:210:39:210:52 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:211:39:211:41 | uri | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:211:39:211:41 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:214:28:214:41 | toString(...) | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:214:28:214:41 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:215:28:215:30 | uri | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:215:28:215:30 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:217:25:217:38 | toString(...) | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:217:25:217:38 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:218:25:218:27 | uri | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:218:25:218:27 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:220:26:220:39 | toString(...) | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:220:26:220:39 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:221:26:221:28 | uri | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:221:26:221:28 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:223:29:223:42 | toString(...) | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:223:29:223:42 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:224:29:224:31 | uri | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:224:29:224:31 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:226:27:226:40 | toString(...) | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:226:27:226:40 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:227:27:227:29 | uri | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:227:27:227:29 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:229:26:229:39 | toString(...) | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:229:26:229:39 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:230:26:230:28 | uri | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:230:26:230:28 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:232:25:232:38 | toString(...) | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:232:25:232:38 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:233:25:233:27 | uri | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:233:25:233:27 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:235:27:235:40 | toString(...) | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:235:27:235:40 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:236:27:236:29 | uri | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:236:27:236:29 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:239:46:239:48 | uri | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:239:46:239:48 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:255:44:255:46 | uri | ApacheHttpSSRFVersion5.java:251:30:251:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:255:44:255:46 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:251:30:251:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:256:38:256:51 | toString(...) | ApacheHttpSSRFVersion5.java:251:30:251:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:256:38:256:51 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:251:30:251:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:257:38:257:40 | uri | ApacheHttpSSRFVersion5.java:251:30:251:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:257:38:257:40 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:251:30:251:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:259:28:259:41 | toString(...) | ApacheHttpSSRFVersion5.java:251:30:251:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:259:28:259:41 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:251:30:251:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:260:28:260:30 | uri | ApacheHttpSSRFVersion5.java:251:30:251:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:260:28:260:30 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:251:30:251:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:262:25:262:38 | toString(...) | ApacheHttpSSRFVersion5.java:251:30:251:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:262:25:262:38 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:251:30:251:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:263:25:263:27 | uri | ApacheHttpSSRFVersion5.java:251:30:251:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:263:25:263:27 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:251:30:251:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:265:26:265:39 | toString(...) | ApacheHttpSSRFVersion5.java:251:30:251:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:265:26:265:39 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:251:30:251:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:266:26:266:28 | uri | ApacheHttpSSRFVersion5.java:251:30:251:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:266:26:266:28 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:251:30:251:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:268:29:268:42 | toString(...) | ApacheHttpSSRFVersion5.java:251:30:251:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:268:29:268:42 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:251:30:251:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:269:29:269:31 | uri | ApacheHttpSSRFVersion5.java:251:30:251:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:269:29:269:31 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:251:30:251:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:271:27:271:40 | toString(...) | ApacheHttpSSRFVersion5.java:251:30:251:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:271:27:271:40 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:251:30:251:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:272:27:272:29 | uri | ApacheHttpSSRFVersion5.java:251:30:251:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:272:27:272:29 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:251:30:251:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:274:26:274:39 | toString(...) | ApacheHttpSSRFVersion5.java:251:30:251:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:274:26:274:39 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:251:30:251:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:275:26:275:28 | uri | ApacheHttpSSRFVersion5.java:251:30:251:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:275:26:275:28 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:251:30:251:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:277:25:277:38 | toString(...) | ApacheHttpSSRFVersion5.java:251:30:251:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:277:25:277:38 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:251:30:251:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:278:25:278:27 | uri | ApacheHttpSSRFVersion5.java:251:30:251:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:278:25:278:27 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:251:30:251:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:280:27:280:40 | toString(...) | ApacheHttpSSRFVersion5.java:251:30:251:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:280:27:280:40 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:251:30:251:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:281:27:281:29 | uri | ApacheHttpSSRFVersion5.java:251:30:251:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:281:27:281:29 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:251:30:251:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:303:34:303:37 | host | ApacheHttpSSRFVersion5.java:298:31:298:58 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:303:34:303:37 | host | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:298:31:298:58 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:304:34:304:37 | host | ApacheHttpSSRFVersion5.java:298:31:298:58 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:304:34:304:37 | host | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:298:31:298:58 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:308:60:308:73 | toString(...) | ApacheHttpSSRFVersion5.java:295:30:295:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:308:60:308:73 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:295:30:295:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:309:60:309:62 | uri | ApacheHttpSSRFVersion5.java:295:30:295:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:309:60:309:62 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:295:30:295:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:313:53:313:66 | toString(...) | ApacheHttpSSRFVersion5.java:295:30:295:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:313:53:313:66 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:295:30:295:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:314:53:314:55 | uri | ApacheHttpSSRFVersion5.java:295:30:295:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:314:53:314:55 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:295:30:295:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:333:42:333:55 | toString(...) | ApacheHttpSSRFVersion5.java:326:30:326:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:333:42:333:55 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:326:30:326:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:334:42:334:44 | uri | ApacheHttpSSRFVersion5.java:326:30:326:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:334:42:334:44 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:326:30:326:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:336:39:336:52 | toString(...) | ApacheHttpSSRFVersion5.java:326:30:326:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:336:39:336:52 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:326:30:326:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:337:39:337:41 | uri | ApacheHttpSSRFVersion5.java:326:30:326:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:337:39:337:41 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:326:30:326:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:339:40:339:53 | toString(...) | ApacheHttpSSRFVersion5.java:326:30:326:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:339:40:339:53 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:326:30:326:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:340:40:340:42 | uri | ApacheHttpSSRFVersion5.java:326:30:326:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:340:40:340:42 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:326:30:326:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:342:43:342:56 | toString(...) | ApacheHttpSSRFVersion5.java:326:30:326:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:342:43:342:56 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:326:30:326:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:343:43:343:45 | uri | ApacheHttpSSRFVersion5.java:326:30:326:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:343:43:343:45 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:326:30:326:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:345:41:345:54 | toString(...) | ApacheHttpSSRFVersion5.java:326:30:326:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:345:41:345:54 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:326:30:326:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:346:41:346:43 | uri | ApacheHttpSSRFVersion5.java:326:30:326:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:346:41:346:43 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:326:30:326:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:348:40:348:53 | toString(...) | ApacheHttpSSRFVersion5.java:326:30:326:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:348:40:348:53 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:326:30:326:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:349:40:349:42 | uri | ApacheHttpSSRFVersion5.java:326:30:326:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:349:40:349:42 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:326:30:326:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:351:39:351:52 | toString(...) | ApacheHttpSSRFVersion5.java:326:30:326:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:351:39:351:52 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:326:30:326:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:352:39:352:41 | uri | ApacheHttpSSRFVersion5.java:326:30:326:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:352:39:352:41 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:326:30:326:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:354:53:354:56 | host | ApacheHttpSSRFVersion5.java:329:31:329:58 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:354:53:354:56 | host | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:329:31:329:58 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:356:48:356:61 | toString(...) | ApacheHttpSSRFVersion5.java:326:30:326:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:356:48:356:61 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:326:30:326:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:357:48:357:50 | uri | ApacheHttpSSRFVersion5.java:326:30:326:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:357:48:357:50 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:326:30:326:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:359:41:359:54 | toString(...) | ApacheHttpSSRFVersion5.java:326:30:326:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:359:41:359:54 | toString(...) | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:326:30:326:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:360:41:360:43 | uri | ApacheHttpSSRFVersion5.java:326:30:326:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:360:41:360:43 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:326:30:326:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:379:57:379:60 | host | ApacheHttpSSRFVersion5.java:375:31:375:58 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:379:57:379:60 | host | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:375:31:375:58 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:380:57:380:59 | uri | ApacheHttpSSRFVersion5.java:372:30:372:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:380:57:380:59 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:372:30:372:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:381:51:381:54 | host | ApacheHttpSSRFVersion5.java:375:31:375:58 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:381:51:381:54 | host | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:375:31:375:58 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:382:51:382:53 | uri | ApacheHttpSSRFVersion5.java:372:30:372:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:382:51:382:53 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:372:30:372:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:385:50:385:53 | host | ApacheHttpSSRFVersion5.java:375:31:375:58 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:385:50:385:53 | host | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:375:31:375:58 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:386:50:386:52 | uri | ApacheHttpSSRFVersion5.java:372:30:372:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:386:50:386:52 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:372:30:372:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:387:44:387:47 | host | ApacheHttpSSRFVersion5.java:375:31:375:58 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:387:44:387:47 | host | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:375:31:375:58 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:388:44:388:46 | uri | ApacheHttpSSRFVersion5.java:372:30:372:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:388:44:388:46 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:372:30:372:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:390:24:390:26 | uri | ApacheHttpSSRFVersion5.java:372:30:372:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:390:24:390:26 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:372:30:372:56 | getParameter(...) | user-provided value | +| ApacheHttpSSRFVersion5.java:394:24:394:26 | uri | ApacheHttpSSRFVersion5.java:372:30:372:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:394:24:394:26 | uri | Potential server-side request forgery due to a $@. | ApacheHttpSSRFVersion5.java:372:30:372:56 | getParameter(...) | user-provided value | +| JakartaWsSSRF.java:15:23:15:25 | url | JakartaWsSSRF.java:14:22:14:48 | getParameter(...) : String | JakartaWsSSRF.java:15:23:15:25 | url | Potential server-side request forgery due to a $@. | JakartaWsSSRF.java:14:22:14:48 | getParameter(...) | user-provided value | +| JavaNetHttpSSRF.java:30:32:30:35 | url1 | JavaNetHttpSSRF.java:25:27:25:53 | getParameter(...) : String | JavaNetHttpSSRF.java:30:32:30:35 | url1 | Potential server-side request forgery due to a $@. | JavaNetHttpSSRF.java:25:27:25:53 | getParameter(...) | user-provided value | +| JavaNetHttpSSRF.java:33:32:33:35 | url1 | JavaNetHttpSSRF.java:25:27:25:53 | getParameter(...) : String | JavaNetHttpSSRF.java:33:32:33:35 | url1 | Potential server-side request forgery due to a $@. | JavaNetHttpSSRF.java:25:27:25:53 | getParameter(...) | user-provided value | +| JavaNetHttpSSRF.java:34:30:34:33 | url1 | JavaNetHttpSSRF.java:25:27:25:53 | getParameter(...) : String | JavaNetHttpSSRF.java:34:30:34:33 | url1 | Potential server-side request forgery due to a $@. | JavaNetHttpSSRF.java:25:27:25:53 | getParameter(...) | user-provided value | +| JavaNetHttpSSRF.java:38:65:38:68 | uri2 | JavaNetHttpSSRF.java:25:27:25:53 | getParameter(...) : String | JavaNetHttpSSRF.java:38:65:38:68 | uri2 | Potential server-side request forgery due to a $@. | JavaNetHttpSSRF.java:25:27:25:53 | getParameter(...) | user-provided value | +| JavaNetHttpSSRF.java:39:59:39:61 | uri | JavaNetHttpSSRF.java:25:27:25:53 | getParameter(...) : String | JavaNetHttpSSRF.java:39:59:39:61 | uri | Potential server-side request forgery due to a $@. | JavaNetHttpSSRF.java:25:27:25:53 | getParameter(...) | user-provided value | +| JaxWsSSRF.java:15:23:15:25 | url | JaxWsSSRF.java:14:22:14:48 | getParameter(...) : String | JaxWsSSRF.java:15:23:15:25 | url | Potential server-side request forgery due to a $@. | JaxWsSSRF.java:14:22:14:48 | getParameter(...) | user-provided value | +| JdbcUrlSSRF.java:26:28:26:34 | jdbcUrl | JdbcUrlSSRF.java:21:26:21:56 | getParameter(...) : String | JdbcUrlSSRF.java:26:28:26:34 | jdbcUrl | Potential server-side request forgery due to a $@. | JdbcUrlSSRF.java:21:26:21:56 | getParameter(...) | user-provided value | +| JdbcUrlSSRF.java:28:41:28:47 | jdbcUrl | JdbcUrlSSRF.java:21:26:21:56 | getParameter(...) : String | JdbcUrlSSRF.java:28:41:28:47 | jdbcUrl | Potential server-side request forgery due to a $@. | JdbcUrlSSRF.java:21:26:21:56 | getParameter(...) | user-provided value | +| JdbcUrlSSRF.java:29:41:29:47 | jdbcUrl | JdbcUrlSSRF.java:21:26:21:56 | getParameter(...) : String | JdbcUrlSSRF.java:29:41:29:47 | jdbcUrl | Potential server-side request forgery due to a $@. | JdbcUrlSSRF.java:21:26:21:56 | getParameter(...) | user-provided value | +| JdbcUrlSSRF.java:30:41:30:47 | jdbcUrl | JdbcUrlSSRF.java:21:26:21:56 | getParameter(...) : String | JdbcUrlSSRF.java:30:41:30:47 | jdbcUrl | Potential server-side request forgery due to a $@. | JdbcUrlSSRF.java:21:26:21:56 | getParameter(...) | user-provided value | +| JdbcUrlSSRF.java:32:27:32:33 | jdbcUrl | JdbcUrlSSRF.java:21:26:21:56 | getParameter(...) : String | JdbcUrlSSRF.java:32:27:32:33 | jdbcUrl | Potential server-side request forgery due to a $@. | JdbcUrlSSRF.java:21:26:21:56 | getParameter(...) | user-provided value | +| JdbcUrlSSRF.java:43:27:43:33 | jdbcUrl | JdbcUrlSSRF.java:40:26:40:56 | getParameter(...) : String | JdbcUrlSSRF.java:43:27:43:33 | jdbcUrl | Potential server-side request forgery due to a $@. | JdbcUrlSSRF.java:40:26:40:56 | getParameter(...) | user-provided value | +| JdbcUrlSSRF.java:48:23:48:29 | jdbcUrl | JdbcUrlSSRF.java:40:26:40:56 | getParameter(...) : String | JdbcUrlSSRF.java:48:23:48:29 | jdbcUrl | Potential server-side request forgery due to a $@. | JdbcUrlSSRF.java:40:26:40:56 | getParameter(...) | user-provided value | +| JdbcUrlSSRF.java:54:49:54:53 | props | JdbcUrlSSRF.java:40:26:40:56 | getParameter(...) : String | JdbcUrlSSRF.java:54:49:54:53 | props | Potential server-side request forgery due to a $@. | JdbcUrlSSRF.java:40:26:40:56 | getParameter(...) | user-provided value | +| JdbcUrlSSRF.java:65:27:65:33 | jdbcUrl | JdbcUrlSSRF.java:60:26:60:56 | getParameter(...) : String | JdbcUrlSSRF.java:65:27:65:33 | jdbcUrl | Potential server-side request forgery due to a $@. | JdbcUrlSSRF.java:60:26:60:56 | getParameter(...) | user-provided value | +| JdbcUrlSSRF.java:67:75:67:81 | jdbcUrl | JdbcUrlSSRF.java:60:26:60:56 | getParameter(...) : String | JdbcUrlSSRF.java:67:75:67:81 | jdbcUrl | Potential server-side request forgery due to a $@. | JdbcUrlSSRF.java:60:26:60:56 | getParameter(...) | user-provided value | +| JdbcUrlSSRF.java:70:75:70:81 | jdbcUrl | JdbcUrlSSRF.java:60:26:60:56 | getParameter(...) : String | JdbcUrlSSRF.java:70:75:70:81 | jdbcUrl | Potential server-side request forgery due to a $@. | JdbcUrlSSRF.java:60:26:60:56 | getParameter(...) | user-provided value | +| JdbcUrlSSRF.java:73:75:73:81 | jdbcUrl | JdbcUrlSSRF.java:60:26:60:56 | getParameter(...) : String | JdbcUrlSSRF.java:73:75:73:81 | jdbcUrl | Potential server-side request forgery due to a $@. | JdbcUrlSSRF.java:60:26:60:56 | getParameter(...) | user-provided value | +| JdbcUrlSSRF.java:82:21:82:27 | jdbcUrl | JdbcUrlSSRF.java:80:26:80:56 | getParameter(...) : String | JdbcUrlSSRF.java:82:21:82:27 | jdbcUrl | Potential server-side request forgery due to a $@. | JdbcUrlSSRF.java:80:26:80:56 | getParameter(...) | user-provided value | +| JdbcUrlSSRF.java:83:21:83:27 | jdbcUrl | JdbcUrlSSRF.java:80:26:80:56 | getParameter(...) : String | JdbcUrlSSRF.java:83:21:83:27 | jdbcUrl | Potential server-side request forgery due to a $@. | JdbcUrlSSRF.java:80:26:80:56 | getParameter(...) | user-provided value | +| JdbcUrlSSRF.java:84:21:84:27 | jdbcUrl | JdbcUrlSSRF.java:80:26:80:56 | getParameter(...) : String | JdbcUrlSSRF.java:84:21:84:27 | jdbcUrl | Potential server-side request forgery due to a $@. | JdbcUrlSSRF.java:80:26:80:56 | getParameter(...) | user-provided value | +| JdbcUrlSSRF.java:86:19:86:25 | jdbcUrl | JdbcUrlSSRF.java:80:26:80:56 | getParameter(...) : String | JdbcUrlSSRF.java:86:19:86:25 | jdbcUrl | Potential server-side request forgery due to a $@. | JdbcUrlSSRF.java:80:26:80:56 | getParameter(...) | user-provided value | +| JdbcUrlSSRF.java:87:19:87:25 | jdbcUrl | JdbcUrlSSRF.java:80:26:80:56 | getParameter(...) : String | JdbcUrlSSRF.java:87:19:87:25 | jdbcUrl | Potential server-side request forgery due to a $@. | JdbcUrlSSRF.java:80:26:80:56 | getParameter(...) | user-provided value | +| JdbcUrlSSRF.java:88:19:88:25 | jdbcUrl | JdbcUrlSSRF.java:80:26:80:56 | getParameter(...) : String | JdbcUrlSSRF.java:88:19:88:25 | jdbcUrl | Potential server-side request forgery due to a $@. | JdbcUrlSSRF.java:80:26:80:56 | getParameter(...) | user-provided value | +| ReactiveWebClientSSRF.java:16:52:16:54 | url | ReactiveWebClientSSRF.java:15:26:15:52 | getParameter(...) : String | ReactiveWebClientSSRF.java:16:52:16:54 | url | Potential server-side request forgery due to a $@. | ReactiveWebClientSSRF.java:15:26:15:52 | getParameter(...) | user-provided value | +| ReactiveWebClientSSRF.java:35:30:35:32 | url | ReactiveWebClientSSRF.java:32:26:32:52 | getParameter(...) : String | ReactiveWebClientSSRF.java:35:30:35:32 | url | Potential server-side request forgery due to a $@. | ReactiveWebClientSSRF.java:32:26:32:52 | getParameter(...) | user-provided value | +| SanitizationTests.java:22:52:22:54 | uri | SanitizationTests.java:19:31:19:57 | getParameter(...) : String | SanitizationTests.java:22:52:22:54 | uri | Potential server-side request forgery due to a $@. | SanitizationTests.java:19:31:19:57 | getParameter(...) | user-provided value | +| SanitizationTests.java:23:25:23:25 | r | SanitizationTests.java:19:31:19:57 | getParameter(...) : String | SanitizationTests.java:23:25:23:25 | r | Potential server-side request forgery due to a $@. | SanitizationTests.java:19:31:19:57 | getParameter(...) | user-provided value | +| SanitizationTests.java:76:59:76:77 | new URI(...) | SanitizationTests.java:75:33:75:63 | getParameter(...) : String | SanitizationTests.java:76:59:76:77 | new URI(...) | Potential server-side request forgery due to a $@. | SanitizationTests.java:75:33:75:63 | getParameter(...) | user-provided value | +| SanitizationTests.java:77:25:77:32 | unsafer3 | SanitizationTests.java:75:33:75:63 | getParameter(...) : String | SanitizationTests.java:77:25:77:32 | unsafer3 | Potential server-side request forgery due to a $@. | SanitizationTests.java:75:33:75:63 | getParameter(...) | user-provided value | +| SanitizationTests.java:80:59:80:77 | new URI(...) | SanitizationTests.java:79:49:79:79 | getParameter(...) : String | SanitizationTests.java:80:59:80:77 | new URI(...) | Potential server-side request forgery due to a $@. | SanitizationTests.java:79:49:79:79 | getParameter(...) | user-provided value | +| SanitizationTests.java:81:25:81:32 | unsafer4 | SanitizationTests.java:79:49:79:79 | getParameter(...) : String | SanitizationTests.java:81:25:81:32 | unsafer4 | Potential server-side request forgery due to a $@. | SanitizationTests.java:79:49:79:79 | getParameter(...) | user-provided value | +| SanitizationTests.java:85:59:85:88 | new URI(...) | SanitizationTests.java:84:31:84:61 | getParameter(...) : String | SanitizationTests.java:85:59:85:88 | new URI(...) | Potential server-side request forgery due to a $@. | SanitizationTests.java:84:31:84:61 | getParameter(...) | user-provided value | +| SanitizationTests.java:86:25:86:32 | unsafer5 | SanitizationTests.java:84:31:84:61 | getParameter(...) : String | SanitizationTests.java:86:25:86:32 | unsafer5 | Potential server-side request forgery due to a $@. | SanitizationTests.java:84:31:84:61 | getParameter(...) | user-provided value | +| SanitizationTests.java:90:60:90:89 | new URI(...) | SanitizationTests.java:88:58:88:86 | getParameter(...) : String | SanitizationTests.java:90:60:90:89 | new URI(...) | Potential server-side request forgery due to a $@. | SanitizationTests.java:88:58:88:86 | getParameter(...) | user-provided value | +| SanitizationTests.java:91:25:91:33 | unsafer5a | SanitizationTests.java:88:58:88:86 | getParameter(...) : String | SanitizationTests.java:91:25:91:33 | unsafer5a | Potential server-side request forgery due to a $@. | SanitizationTests.java:88:58:88:86 | getParameter(...) | user-provided value | +| SanitizationTests.java:95:60:95:90 | new URI(...) | SanitizationTests.java:93:60:93:88 | getParameter(...) : String | SanitizationTests.java:95:60:95:90 | new URI(...) | Potential server-side request forgery due to a $@. | SanitizationTests.java:93:60:93:88 | getParameter(...) | user-provided value | +| SanitizationTests.java:96:25:96:33 | unsafer5b | SanitizationTests.java:93:60:93:88 | getParameter(...) : String | SanitizationTests.java:96:25:96:33 | unsafer5b | Potential server-side request forgery due to a $@. | SanitizationTests.java:93:60:93:88 | getParameter(...) | user-provided value | +| SanitizationTests.java:100:60:100:90 | new URI(...) | SanitizationTests.java:98:77:98:105 | getParameter(...) : String | SanitizationTests.java:100:60:100:90 | new URI(...) | Potential server-side request forgery due to a $@. | SanitizationTests.java:98:77:98:105 | getParameter(...) | user-provided value | +| SanitizationTests.java:101:25:101:33 | unsafer5c | SanitizationTests.java:98:77:98:105 | getParameter(...) : String | SanitizationTests.java:101:25:101:33 | unsafer5c | Potential server-side request forgery due to a $@. | SanitizationTests.java:98:77:98:105 | getParameter(...) | user-provided value | +| SanitizationTests.java:104:59:104:77 | new URI(...) | SanitizationTests.java:103:73:103:103 | getParameter(...) : String | SanitizationTests.java:104:59:104:77 | new URI(...) | Potential server-side request forgery due to a $@. | SanitizationTests.java:103:73:103:103 | getParameter(...) | user-provided value | +| SanitizationTests.java:105:25:105:32 | unsafer6 | SanitizationTests.java:103:73:103:103 | getParameter(...) : String | SanitizationTests.java:105:25:105:32 | unsafer6 | Potential server-side request forgery due to a $@. | SanitizationTests.java:103:73:103:103 | getParameter(...) | user-provided value | +| SanitizationTests.java:108:59:108:77 | new URI(...) | SanitizationTests.java:107:56:107:86 | getParameter(...) : String | SanitizationTests.java:108:59:108:77 | new URI(...) | Potential server-side request forgery due to a $@. | SanitizationTests.java:107:56:107:86 | getParameter(...) | user-provided value | +| SanitizationTests.java:109:25:109:32 | unsafer7 | SanitizationTests.java:107:56:107:86 | getParameter(...) : String | SanitizationTests.java:109:25:109:32 | unsafer7 | Potential server-side request forgery due to a $@. | SanitizationTests.java:107:56:107:86 | getParameter(...) | user-provided value | +| SanitizationTests.java:112:59:112:77 | new URI(...) | SanitizationTests.java:111:55:111:85 | getParameter(...) : String | SanitizationTests.java:112:59:112:77 | new URI(...) | Potential server-side request forgery due to a $@. | SanitizationTests.java:111:55:111:85 | getParameter(...) | user-provided value | +| SanitizationTests.java:113:25:113:32 | unsafer8 | SanitizationTests.java:111:55:111:85 | getParameter(...) : String | SanitizationTests.java:113:25:113:32 | unsafer8 | Potential server-side request forgery due to a $@. | SanitizationTests.java:111:55:111:85 | getParameter(...) | user-provided value | +| SanitizationTests.java:116:59:116:77 | new URI(...) | SanitizationTests.java:115:33:115:63 | getParameter(...) : String | SanitizationTests.java:116:59:116:77 | new URI(...) | Potential server-side request forgery due to a $@. | SanitizationTests.java:115:33:115:63 | getParameter(...) | user-provided value | +| SanitizationTests.java:117:25:117:32 | unsafer9 | SanitizationTests.java:115:33:115:63 | getParameter(...) : String | SanitizationTests.java:117:25:117:32 | unsafer9 | Potential server-side request forgery due to a $@. | SanitizationTests.java:115:33:115:63 | getParameter(...) | user-provided value | +| SanitizationTests.java:120:60:120:79 | new URI(...) | SanitizationTests.java:119:94:119:125 | getParameter(...) : String | SanitizationTests.java:120:60:120:79 | new URI(...) | Potential server-side request forgery due to a $@. | SanitizationTests.java:119:94:119:125 | getParameter(...) | user-provided value | +| SanitizationTests.java:121:25:121:33 | unsafer10 | SanitizationTests.java:119:94:119:125 | getParameter(...) : String | SanitizationTests.java:121:25:121:33 | unsafer10 | Potential server-side request forgery due to a $@. | SanitizationTests.java:119:94:119:125 | getParameter(...) | user-provided value | +| SpringSSRF.java:32:39:32:59 | ... + ... | SpringSSRF.java:28:33:28:60 | getParameter(...) : String | SpringSSRF.java:32:39:32:59 | ... + ... | Potential server-side request forgery due to a $@. | SpringSSRF.java:28:33:28:60 | getParameter(...) | user-provided value | +| SpringSSRF.java:33:35:33:48 | fooResourceUrl | SpringSSRF.java:28:33:28:60 | getParameter(...) : String | SpringSSRF.java:33:35:33:48 | fooResourceUrl | Potential server-side request forgery due to a $@. | SpringSSRF.java:28:33:28:60 | getParameter(...) | user-provided value | +| SpringSSRF.java:34:34:34:47 | fooResourceUrl | SpringSSRF.java:28:33:28:60 | getParameter(...) : String | SpringSSRF.java:34:34:34:47 | fooResourceUrl | Potential server-side request forgery due to a $@. | SpringSSRF.java:28:33:28:60 | getParameter(...) | user-provided value | +| SpringSSRF.java:35:39:35:52 | fooResourceUrl | SpringSSRF.java:28:33:28:60 | getParameter(...) : String | SpringSSRF.java:35:39:35:52 | fooResourceUrl | Potential server-side request forgery due to a $@. | SpringSSRF.java:28:33:28:60 | getParameter(...) | user-provided value | +| SpringSSRF.java:36:69:36:82 | fooResourceUrl | SpringSSRF.java:28:33:28:60 | getParameter(...) : String | SpringSSRF.java:36:69:36:82 | fooResourceUrl | Potential server-side request forgery due to a $@. | SpringSSRF.java:28:33:28:60 | getParameter(...) | user-provided value | +| SpringSSRF.java:37:73:37:86 | fooResourceUrl | SpringSSRF.java:28:33:28:60 | getParameter(...) : String | SpringSSRF.java:37:73:37:86 | fooResourceUrl | Potential server-side request forgery due to a $@. | SpringSSRF.java:28:33:28:60 | getParameter(...) | user-provided value | +| SpringSSRF.java:40:69:40:97 | of(...) | SpringSSRF.java:28:33:28:60 | getParameter(...) : String | SpringSSRF.java:40:69:40:97 | of(...) | Potential server-side request forgery due to a $@. | SpringSSRF.java:28:33:28:60 | getParameter(...) | user-provided value | +| SpringSSRF.java:42:69:42:119 | of(...) | SpringSSRF.java:28:33:28:60 | getParameter(...) : String | SpringSSRF.java:42:69:42:119 | of(...) | Potential server-side request forgery due to a $@. | SpringSSRF.java:28:33:28:60 | getParameter(...) | user-provided value | +| SpringSSRF.java:44:41:44:54 | fooResourceUrl | SpringSSRF.java:28:33:28:60 | getParameter(...) : String | SpringSSRF.java:44:41:44:54 | fooResourceUrl | Potential server-side request forgery due to a $@. | SpringSSRF.java:28:33:28:60 | getParameter(...) | user-provided value | +| SpringSSRF.java:45:40:45:62 | new URI(...) | SpringSSRF.java:28:33:28:60 | getParameter(...) : String | SpringSSRF.java:45:40:45:62 | new URI(...) | Potential server-side request forgery due to a $@. | SpringSSRF.java:28:33:28:60 | getParameter(...) | user-provided value | +| SpringSSRF.java:46:42:46:55 | fooResourceUrl | SpringSSRF.java:28:33:28:60 | getParameter(...) : String | SpringSSRF.java:46:42:46:55 | fooResourceUrl | Potential server-side request forgery due to a $@. | SpringSSRF.java:28:33:28:60 | getParameter(...) | user-provided value | +| SpringSSRF.java:47:40:47:53 | fooResourceUrl | SpringSSRF.java:28:33:28:60 | getParameter(...) : String | SpringSSRF.java:47:40:47:53 | fooResourceUrl | Potential server-side request forgery due to a $@. | SpringSSRF.java:28:33:28:60 | getParameter(...) | user-provided value | +| SpringSSRF.java:48:30:48:43 | fooResourceUrl | SpringSSRF.java:28:33:28:60 | getParameter(...) : String | SpringSSRF.java:48:30:48:43 | fooResourceUrl | Potential server-side request forgery due to a $@. | SpringSSRF.java:28:33:28:60 | getParameter(...) | user-provided value | +| SpringSSRF.java:49:33:49:46 | fooResourceUrl | SpringSSRF.java:28:33:28:60 | getParameter(...) : String | SpringSSRF.java:49:33:49:46 | fooResourceUrl | Potential server-side request forgery due to a $@. | SpringSSRF.java:28:33:28:60 | getParameter(...) | user-provided value | +| SpringSSRF.java:50:41:50:54 | fooResourceUrl | SpringSSRF.java:28:33:28:60 | getParameter(...) : String | SpringSSRF.java:50:41:50:54 | fooResourceUrl | Potential server-side request forgery due to a $@. | SpringSSRF.java:28:33:28:60 | getParameter(...) | user-provided value | +| SpringSSRF.java:51:42:51:55 | fooResourceUrl | SpringSSRF.java:28:33:28:60 | getParameter(...) : String | SpringSSRF.java:51:42:51:55 | fooResourceUrl | Potential server-side request forgery due to a $@. | SpringSSRF.java:28:33:28:60 | getParameter(...) | user-provided value | +| SpringSSRF.java:56:44:56:46 | uri | SpringSSRF.java:28:33:28:60 | getParameter(...) : String | SpringSSRF.java:56:44:56:46 | uri | Potential server-side request forgery due to a $@. | SpringSSRF.java:28:33:28:60 | getParameter(...) | user-provided value | +| SpringSSRF.java:58:35:58:37 | uri | SpringSSRF.java:28:33:28:60 | getParameter(...) : String | SpringSSRF.java:58:35:58:37 | uri | Potential server-side request forgery due to a $@. | SpringSSRF.java:28:33:28:60 | getParameter(...) | user-provided value | +| SpringSSRF.java:59:35:59:37 | uri | SpringSSRF.java:28:33:28:60 | getParameter(...) : String | SpringSSRF.java:59:35:59:37 | uri | Potential server-side request forgery due to a $@. | SpringSSRF.java:28:33:28:60 | getParameter(...) | user-provided value | +| SpringSSRF.java:60:38:60:40 | uri | SpringSSRF.java:28:33:28:60 | getParameter(...) : String | SpringSSRF.java:60:38:60:40 | uri | Potential server-side request forgery due to a $@. | SpringSSRF.java:28:33:28:60 | getParameter(...) | user-provided value | +| SpringSSRF.java:61:39:61:41 | uri | SpringSSRF.java:28:33:28:60 | getParameter(...) : String | SpringSSRF.java:61:39:61:41 | uri | Potential server-side request forgery due to a $@. | SpringSSRF.java:28:33:28:60 | getParameter(...) | user-provided value | +| SpringSSRF.java:62:37:62:39 | uri | SpringSSRF.java:28:33:28:60 | getParameter(...) : String | SpringSSRF.java:62:37:62:39 | uri | Potential server-side request forgery due to a $@. | SpringSSRF.java:28:33:28:60 | getParameter(...) | user-provided value | +| SpringSSRF.java:63:36:63:38 | uri | SpringSSRF.java:28:33:28:60 | getParameter(...) : String | SpringSSRF.java:63:36:63:38 | uri | Potential server-side request forgery due to a $@. | SpringSSRF.java:28:33:28:60 | getParameter(...) | user-provided value | +| SpringSSRF.java:64:44:64:46 | uri | SpringSSRF.java:28:33:28:60 | getParameter(...) : String | SpringSSRF.java:64:44:64:46 | uri | Potential server-side request forgery due to a $@. | SpringSSRF.java:28:33:28:60 | getParameter(...) | user-provided value | +| SpringSSRF.java:70:49:70:51 | uri | SpringSSRF.java:28:33:28:60 | getParameter(...) : String | SpringSSRF.java:70:49:70:51 | uri | Potential server-side request forgery due to a $@. | SpringSSRF.java:28:33:28:60 | getParameter(...) | user-provided value | +| SpringSSRF.java:71:58:71:60 | uri | SpringSSRF.java:28:33:28:60 | getParameter(...) : String | SpringSSRF.java:71:58:71:60 | uri | Potential server-side request forgery due to a $@. | SpringSSRF.java:28:33:28:60 | getParameter(...) | user-provided value | +| SpringSSRF.java:72:57:72:59 | uri | SpringSSRF.java:28:33:28:60 | getParameter(...) : String | SpringSSRF.java:72:57:72:59 | uri | Potential server-side request forgery due to a $@. | SpringSSRF.java:28:33:28:60 | getParameter(...) | user-provided value | +| SpringSSRF.java:73:66:73:68 | uri | SpringSSRF.java:28:33:28:60 | getParameter(...) : String | SpringSSRF.java:73:66:73:68 | uri | Potential server-side request forgery due to a $@. | SpringSSRF.java:28:33:28:60 | getParameter(...) | user-provided value | +| SpringSSRF.java:74:57:74:59 | uri | SpringSSRF.java:28:33:28:60 | getParameter(...) : String | SpringSSRF.java:74:57:74:59 | uri | Potential server-side request forgery due to a $@. | SpringSSRF.java:28:33:28:60 | getParameter(...) | user-provided value | +| SpringSSRF.java:75:66:75:68 | uri | SpringSSRF.java:28:33:28:60 | getParameter(...) : String | SpringSSRF.java:75:66:75:68 | uri | Potential server-side request forgery due to a $@. | SpringSSRF.java:28:33:28:60 | getParameter(...) | user-provided value | +| URLClassLoaderSSRF.java:18:64:18:85 | new URL[] | URLClassLoaderSSRF.java:16:26:16:52 | getParameter(...) : String | URLClassLoaderSSRF.java:18:64:18:85 | new URL[] | Potential server-side request forgery due to a $@. | URLClassLoaderSSRF.java:16:26:16:52 | getParameter(...) | user-provided value | +| URLClassLoaderSSRF.java:30:64:30:85 | new URL[] | URLClassLoaderSSRF.java:28:26:28:52 | getParameter(...) : String | URLClassLoaderSSRF.java:30:64:30:85 | new URL[] | Potential server-side request forgery due to a $@. | URLClassLoaderSSRF.java:28:26:28:52 | getParameter(...) | user-provided value | +| URLClassLoaderSSRF.java:44:64:44:85 | new URL[] | URLClassLoaderSSRF.java:40:26:40:52 | getParameter(...) : String | URLClassLoaderSSRF.java:44:64:44:85 | new URL[] | Potential server-side request forgery due to a $@. | URLClassLoaderSSRF.java:40:26:40:52 | getParameter(...) | user-provided value | +| URLClassLoaderSSRF.java:56:72:56:93 | new URL[] | URLClassLoaderSSRF.java:54:26:54:52 | getParameter(...) : String | URLClassLoaderSSRF.java:56:72:56:93 | new URL[] | Potential server-side request forgery due to a $@. | URLClassLoaderSSRF.java:54:26:54:52 | getParameter(...) | user-provided value | +| URLClassLoaderSSRF.java:70:21:70:42 | new URL[] | URLClassLoaderSSRF.java:66:26:66:52 | getParameter(...) : String | URLClassLoaderSSRF.java:70:21:70:42 | new URL[] | Potential server-side request forgery due to a $@. | URLClassLoaderSSRF.java:66:26:66:52 | getParameter(...) | user-provided value | +| URLClassLoaderSSRF.java:89:21:89:42 | new URL[] | URLClassLoaderSSRF.java:83:26:83:52 | getParameter(...) : String | URLClassLoaderSSRF.java:89:21:89:42 | new URL[] | Potential server-side request forgery due to a $@. | URLClassLoaderSSRF.java:83:26:83:52 | getParameter(...) | user-provided value | +| mad/Test.java:31:24:31:47 | (...)... | mad/Test.java:26:16:26:41 | getParameter(...) : String | mad/Test.java:31:24:31:47 | (...)... | Potential server-side request forgery due to a $@. | mad/Test.java:26:16:26:41 | getParameter(...) | user-provided value | +| mad/Test.java:36:10:36:23 | (...)... | mad/Test.java:26:16:26:41 | getParameter(...) : String | mad/Test.java:36:10:36:23 | (...)... | Potential server-side request forgery due to a $@. | mad/Test.java:26:16:26:41 | getParameter(...) | user-provided value | +| mad/Test.java:38:28:38:43 | (...)... | mad/Test.java:26:16:26:41 | getParameter(...) : String | mad/Test.java:38:28:38:43 | (...)... | Potential server-side request forgery due to a $@. | mad/Test.java:26:16:26:41 | getParameter(...) | user-provided value | +| mad/Test.java:40:10:40:23 | (...)... | mad/Test.java:26:16:26:41 | getParameter(...) : String | mad/Test.java:40:10:40:23 | (...)... | Potential server-side request forgery due to a $@. | mad/Test.java:26:16:26:41 | getParameter(...) | user-provided value | +| mad/Test.java:45:32:45:47 | (...)... | mad/Test.java:26:16:26:41 | getParameter(...) : String | mad/Test.java:45:32:45:47 | (...)... | Potential server-side request forgery due to a $@. | mad/Test.java:26:16:26:41 | getParameter(...) | user-provided value | +| mad/Test.java:47:32:47:47 | (...)... | mad/Test.java:26:16:26:41 | getParameter(...) : String | mad/Test.java:47:32:47:47 | (...)... | Potential server-side request forgery due to a $@. | mad/Test.java:26:16:26:41 | getParameter(...) | user-provided value | +| mad/Test.java:49:28:49:43 | (...)... | mad/Test.java:26:16:26:41 | getParameter(...) : String | mad/Test.java:49:28:49:43 | (...)... | Potential server-side request forgery due to a $@. | mad/Test.java:26:16:26:41 | getParameter(...) | user-provided value | +| mad/Test.java:51:28:51:43 | (...)... | mad/Test.java:26:16:26:41 | getParameter(...) : String | mad/Test.java:51:28:51:43 | (...)... | Potential server-side request forgery due to a $@. | mad/Test.java:26:16:26:41 | getParameter(...) | user-provided value | +| mad/Test.java:53:28:53:43 | (...)... | mad/Test.java:26:16:26:41 | getParameter(...) : String | mad/Test.java:53:28:53:43 | (...)... | Potential server-side request forgery due to a $@. | mad/Test.java:26:16:26:41 | getParameter(...) | user-provided value | +| mad/Test.java:55:36:55:51 | (...)... | mad/Test.java:26:16:26:41 | getParameter(...) : String | mad/Test.java:55:36:55:51 | (...)... | Potential server-side request forgery due to a $@. | mad/Test.java:26:16:26:41 | getParameter(...) | user-provided value | +| mad/Test.java:57:32:57:45 | (...)... | mad/Test.java:26:16:26:41 | getParameter(...) : String | mad/Test.java:57:32:57:45 | (...)... | Potential server-side request forgery due to a $@. | mad/Test.java:26:16:26:41 | getParameter(...) | user-provided value | +| mad/Test.java:59:38:59:51 | (...)... | mad/Test.java:26:16:26:41 | getParameter(...) : String | mad/Test.java:59:38:59:51 | (...)... | Potential server-side request forgery due to a $@. | mad/Test.java:26:16:26:41 | getParameter(...) | user-provided value | +| mad/Test.java:61:47:61:60 | (...)... | mad/Test.java:26:16:26:41 | getParameter(...) : String | mad/Test.java:61:47:61:60 | (...)... | Potential server-side request forgery due to a $@. | mad/Test.java:26:16:26:41 | getParameter(...) | user-provided value | +| mad/Test.java:63:26:63:39 | (...)... | mad/Test.java:26:16:26:41 | getParameter(...) : String | mad/Test.java:63:26:63:39 | (...)... | Potential server-side request forgery due to a $@. | mad/Test.java:26:16:26:41 | getParameter(...) | user-provided value | +| mad/Test.java:65:38:65:51 | (...)... | mad/Test.java:26:16:26:41 | getParameter(...) : String | mad/Test.java:65:38:65:51 | (...)... | Potential server-side request forgery due to a $@. | mad/Test.java:26:16:26:41 | getParameter(...) | user-provided value | +| mad/Test.java:67:26:67:39 | (...)... | mad/Test.java:26:16:26:41 | getParameter(...) : String | mad/Test.java:67:26:67:39 | (...)... | Potential server-side request forgery due to a $@. | mad/Test.java:26:16:26:41 | getParameter(...) | user-provided value | +| mad/Test.java:69:27:69:40 | (...)... | mad/Test.java:26:16:26:41 | getParameter(...) : String | mad/Test.java:69:27:69:40 | (...)... | Potential server-side request forgery due to a $@. | mad/Test.java:26:16:26:41 | getParameter(...) | user-provided value | +| mad/Test.java:71:47:71:60 | (...)... | mad/Test.java:26:16:26:41 | getParameter(...) : String | mad/Test.java:71:47:71:60 | (...)... | Potential server-side request forgery due to a $@. | mad/Test.java:26:16:26:41 | getParameter(...) | user-provided value | +| mad/Test.java:74:50:74:65 | (...)... | mad/Test.java:26:16:26:41 | getParameter(...) : String | mad/Test.java:74:50:74:65 | (...)... | Potential server-side request forgery due to a $@. | mad/Test.java:26:16:26:41 | getParameter(...) | user-provided value | +| mad/Test.java:76:50:76:69 | (...)... | mad/Test.java:26:16:26:41 | getParameter(...) : String | mad/Test.java:76:50:76:69 | (...)... | Potential server-side request forgery due to a $@. | mad/Test.java:26:16:26:41 | getParameter(...) | user-provided value | +| mad/Test.java:78:43:78:59 | (...)... | mad/Test.java:26:16:26:41 | getParameter(...) : String | mad/Test.java:78:43:78:59 | (...)... | Potential server-side request forgery due to a $@. | mad/Test.java:26:16:26:41 | getParameter(...) | user-provided value | +| mad/Test.java:80:25:80:41 | (...)... | mad/Test.java:26:16:26:41 | getParameter(...) : String | mad/Test.java:80:25:80:41 | (...)... | Potential server-side request forgery due to a $@. | mad/Test.java:26:16:26:41 | getParameter(...) | user-provided value | +| mad/Test.java:82:31:82:47 | (...)... | mad/Test.java:26:16:26:41 | getParameter(...) : String | mad/Test.java:82:31:82:47 | (...)... | Potential server-side request forgery due to a $@. | mad/Test.java:26:16:26:41 | getParameter(...) | user-provided value | +| mad/Test.java:84:31:84:47 | (...)... | mad/Test.java:26:16:26:41 | getParameter(...) : String | mad/Test.java:84:31:84:47 | (...)... | Potential server-side request forgery due to a $@. | mad/Test.java:26:16:26:41 | getParameter(...) | user-provided value | +| mad/Test.java:86:41:86:57 | (...)... | mad/Test.java:26:16:26:41 | getParameter(...) : String | mad/Test.java:86:41:86:57 | (...)... | Potential server-side request forgery due to a $@. | mad/Test.java:26:16:26:41 | getParameter(...) | user-provided value | +| mad/Test.java:92:24:92:40 | (...)... | mad/Test.java:26:16:26:41 | getParameter(...) : String | mad/Test.java:92:24:92:40 | (...)... | Potential server-side request forgery due to a $@. | mad/Test.java:26:16:26:41 | getParameter(...) | user-provided value | +| mad/Test.java:97:29:97:42 | (...)... | mad/Test.java:26:16:26:41 | getParameter(...) : String | mad/Test.java:97:29:97:42 | (...)... | Potential server-side request forgery due to a $@. | mad/Test.java:26:16:26:41 | getParameter(...) | user-provided value | +| mad/Test.java:102:26:102:39 | (...)... | mad/Test.java:26:16:26:41 | getParameter(...) : String | mad/Test.java:102:26:102:39 | (...)... | Potential server-side request forgery due to a $@. | mad/Test.java:26:16:26:41 | getParameter(...) | user-provided value | +| mad/Test.java:107:15:107:31 | (...)... | mad/Test.java:26:16:26:41 | getParameter(...) : String | mad/Test.java:107:15:107:31 | (...)... | Potential server-side request forgery due to a $@. | mad/Test.java:26:16:26:41 | getParameter(...) | user-provided value | +| mad/Test.java:112:15:112:31 | (...)... | mad/Test.java:26:16:26:41 | getParameter(...) : String | mad/Test.java:112:15:112:31 | (...)... | Potential server-side request forgery due to a $@. | mad/Test.java:26:16:26:41 | getParameter(...) | user-provided value | +edges +| ApacheHttpSSRF.java:27:27:27:53 | getParameter(...) : String | ApacheHttpSSRF.java:28:31:28:34 | sink : String | provenance | Src:MaD:277 | +| ApacheHttpSSRF.java:28:23:28:35 | new URI(...) : URI | ApacheHttpSSRF.java:30:43:30:45 | uri | provenance | Sink:MaD:211 | +| ApacheHttpSSRF.java:28:23:28:35 | new URI(...) : URI | ApacheHttpSSRF.java:32:29:32:31 | uri | provenance | Sink:MaD:217 | +| ApacheHttpSSRF.java:28:23:28:35 | new URI(...) : URI | ApacheHttpSSRF.java:34:26:34:28 | uri | provenance | Sink:MaD:212 | +| ApacheHttpSSRF.java:28:23:28:35 | new URI(...) : URI | ApacheHttpSSRF.java:35:26:35:28 | uri | provenance | Sink:MaD:215 | +| ApacheHttpSSRF.java:28:23:28:35 | new URI(...) : URI | ApacheHttpSSRF.java:36:25:36:27 | uri | provenance | Sink:MaD:216 | +| ApacheHttpSSRF.java:28:23:28:35 | new URI(...) : URI | ApacheHttpSSRF.java:37:28:37:30 | uri | provenance | Sink:MaD:210 | +| ApacheHttpSSRF.java:28:23:28:35 | new URI(...) : URI | ApacheHttpSSRF.java:38:29:38:31 | uri | provenance | Sink:MaD:213 | +| ApacheHttpSSRF.java:28:23:28:35 | new URI(...) : URI | ApacheHttpSSRF.java:39:27:39:29 | uri | provenance | Sink:MaD:218 | +| ApacheHttpSSRF.java:28:23:28:35 | new URI(...) : URI | ApacheHttpSSRF.java:40:27:40:29 | uri | provenance | Sink:MaD:214 | +| ApacheHttpSSRF.java:28:23:28:35 | new URI(...) : URI | ApacheHttpSSRF.java:42:62:42:64 | uri : URI | provenance | | +| ApacheHttpSSRF.java:28:23:28:35 | new URI(...) : URI | ApacheHttpSSRF.java:43:41:43:43 | uri : URI | provenance | | +| ApacheHttpSSRF.java:28:23:28:35 | new URI(...) : URI | ApacheHttpSSRF.java:44:41:44:43 | uri : URI | provenance | | +| ApacheHttpSSRF.java:28:23:28:35 | new URI(...) : URI | ApacheHttpSSRF.java:46:77:46:79 | uri : URI | provenance | | +| ApacheHttpSSRF.java:28:23:28:35 | new URI(...) : URI | ApacheHttpSSRF.java:47:56:47:58 | uri : URI | provenance | | +| ApacheHttpSSRF.java:28:23:28:35 | new URI(...) : URI | ApacheHttpSSRF.java:48:56:48:58 | uri : URI | provenance | | +| ApacheHttpSSRF.java:28:23:28:35 | new URI(...) : URI | ApacheHttpSSRF.java:50:32:50:34 | uri | provenance | Sink:MaD:220 | +| ApacheHttpSSRF.java:28:23:28:35 | new URI(...) : URI | ApacheHttpSSRF.java:51:33:51:35 | uri | provenance | Sink:MaD:224 | +| ApacheHttpSSRF.java:28:23:28:35 | new URI(...) : URI | ApacheHttpSSRF.java:52:32:52:34 | uri | provenance | Sink:MaD:225 | +| ApacheHttpSSRF.java:28:23:28:35 | new URI(...) : URI | ApacheHttpSSRF.java:53:35:53:37 | uri | provenance | Sink:MaD:219 | +| ApacheHttpSSRF.java:28:23:28:35 | new URI(...) : URI | ApacheHttpSSRF.java:54:36:54:38 | uri | provenance | Sink:MaD:222 | +| ApacheHttpSSRF.java:28:23:28:35 | new URI(...) : URI | ApacheHttpSSRF.java:55:33:55:35 | uri | provenance | Sink:MaD:221 | +| ApacheHttpSSRF.java:28:23:28:35 | new URI(...) : URI | ApacheHttpSSRF.java:56:34:56:36 | uri | provenance | Sink:MaD:227 | +| ApacheHttpSSRF.java:28:23:28:35 | new URI(...) : URI | ApacheHttpSSRF.java:57:34:57:36 | uri | provenance | Sink:MaD:223 | +| ApacheHttpSSRF.java:28:23:28:35 | new URI(...) : URI | ApacheHttpSSRF.java:58:43:58:45 | uri | provenance | Sink:MaD:226 | +| ApacheHttpSSRF.java:28:31:28:34 | sink : String | ApacheHttpSSRF.java:28:23:28:35 | new URI(...) : URI | provenance | Config | +| ApacheHttpSSRF.java:28:31:28:34 | sink : String | ApacheHttpSSRF.java:28:23:28:35 | new URI(...) : URI | provenance | MaD:285 | +| ApacheHttpSSRF.java:42:62:42:64 | uri : URI | ApacheHttpSSRF.java:42:62:42:75 | toString(...) : String | provenance | MaD:286 | +| ApacheHttpSSRF.java:42:62:42:75 | toString(...) : String | ApacheHttpSSRF.java:42:34:42:82 | new BasicRequestLine(...) | provenance | MaD:293 Sink:MaD:231 | +| ApacheHttpSSRF.java:43:41:43:43 | uri : URI | ApacheHttpSSRF.java:43:41:43:54 | toString(...) | provenance | MaD:286 Sink:MaD:232 | +| ApacheHttpSSRF.java:44:41:44:43 | uri : URI | ApacheHttpSSRF.java:44:41:44:54 | toString(...) | provenance | MaD:286 Sink:MaD:233 | +| ApacheHttpSSRF.java:46:77:46:79 | uri : URI | ApacheHttpSSRF.java:46:77:46:90 | toString(...) : String | provenance | MaD:286 | +| ApacheHttpSSRF.java:46:77:46:90 | toString(...) : String | ApacheHttpSSRF.java:46:49:46:97 | new BasicRequestLine(...) | provenance | MaD:293 Sink:MaD:228 | +| ApacheHttpSSRF.java:47:56:47:58 | uri : URI | ApacheHttpSSRF.java:47:56:47:69 | toString(...) | provenance | MaD:286 Sink:MaD:229 | +| ApacheHttpSSRF.java:48:56:48:58 | uri : URI | ApacheHttpSSRF.java:48:56:48:69 | toString(...) | provenance | MaD:286 Sink:MaD:230 | +| ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:42:31:42:37 | uriSink : String | provenance | Src:MaD:277 | +| ApacheHttpSSRFVersion5.java:42:23:42:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:49:54:49:56 | uri : URI | provenance | | +| ApacheHttpSSRFVersion5.java:42:23:42:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:50:54:50:56 | uri | provenance | Sink:MaD:40 | +| ApacheHttpSSRFVersion5.java:42:23:42:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:51:48:51:50 | uri : URI | provenance | | +| ApacheHttpSSRFVersion5.java:42:23:42:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:52:48:52:50 | uri | provenance | Sink:MaD:42 | +| ApacheHttpSSRFVersion5.java:42:23:42:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:55:38:55:40 | uri : URI | provenance | | +| ApacheHttpSSRFVersion5.java:42:23:42:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:56:38:56:40 | uri | provenance | Sink:MaD:45 | +| ApacheHttpSSRFVersion5.java:42:23:42:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:59:35:59:37 | uri : URI | provenance | | +| ApacheHttpSSRFVersion5.java:42:23:42:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:60:35:60:37 | uri | provenance | Sink:MaD:48 | +| ApacheHttpSSRFVersion5.java:42:23:42:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:63:36:63:38 | uri : URI | provenance | | +| ApacheHttpSSRFVersion5.java:42:23:42:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:64:36:64:38 | uri | provenance | Sink:MaD:51 | +| ApacheHttpSSRFVersion5.java:42:23:42:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:67:39:67:41 | uri : URI | provenance | | +| ApacheHttpSSRFVersion5.java:42:23:42:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:68:39:68:41 | uri | provenance | Sink:MaD:54 | +| ApacheHttpSSRFVersion5.java:42:23:42:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:71:37:71:39 | uri : URI | provenance | | +| ApacheHttpSSRFVersion5.java:42:23:42:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:72:37:72:39 | uri | provenance | Sink:MaD:57 | +| ApacheHttpSSRFVersion5.java:42:23:42:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:75:36:75:38 | uri : URI | provenance | | +| ApacheHttpSSRFVersion5.java:42:23:42:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:76:36:76:38 | uri | provenance | Sink:MaD:60 | +| ApacheHttpSSRFVersion5.java:42:23:42:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:79:35:79:37 | uri : URI | provenance | | +| ApacheHttpSSRFVersion5.java:42:23:42:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:80:35:80:37 | uri | provenance | Sink:MaD:63 | +| ApacheHttpSSRFVersion5.java:42:23:42:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:83:37:83:39 | uri : URI | provenance | | +| ApacheHttpSSRFVersion5.java:42:23:42:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:84:37:84:39 | uri | provenance | Sink:MaD:66 | +| ApacheHttpSSRFVersion5.java:42:23:42:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:88:51:88:53 | uri | provenance | Sink:MaD:68 | +| ApacheHttpSSRFVersion5.java:42:23:42:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:92:51:92:53 | uri | provenance | Sink:MaD:70 | +| ApacheHttpSSRFVersion5.java:42:23:42:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:94:45:94:47 | uri | provenance | Sink:MaD:72 | +| ApacheHttpSSRFVersion5.java:42:23:42:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:97:54:97:56 | uri | provenance | Sink:MaD:74 | +| ApacheHttpSSRFVersion5.java:42:23:42:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:98:48:98:50 | uri : URI | provenance | | +| ApacheHttpSSRFVersion5.java:42:23:42:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:99:48:99:50 | uri | provenance | Sink:MaD:76 | +| ApacheHttpSSRFVersion5.java:42:23:42:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:103:55:103:57 | uri : URI | provenance | | +| ApacheHttpSSRFVersion5.java:42:23:42:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:104:55:104:57 | uri | provenance | Sink:MaD:79 | +| ApacheHttpSSRFVersion5.java:42:23:42:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:105:49:105:51 | uri : URI | provenance | | +| ApacheHttpSSRFVersion5.java:42:23:42:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:106:49:106:51 | uri | provenance | Sink:MaD:81 | +| ApacheHttpSSRFVersion5.java:42:23:42:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:109:39:109:41 | uri : URI | provenance | | +| ApacheHttpSSRFVersion5.java:42:23:42:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:110:39:110:41 | uri | provenance | Sink:MaD:84 | +| ApacheHttpSSRFVersion5.java:42:23:42:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:113:36:113:38 | uri : URI | provenance | | +| ApacheHttpSSRFVersion5.java:42:23:42:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:114:36:114:38 | uri | provenance | Sink:MaD:87 | +| ApacheHttpSSRFVersion5.java:42:23:42:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:117:37:117:39 | uri : URI | provenance | | +| ApacheHttpSSRFVersion5.java:42:23:42:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:118:37:118:39 | uri | provenance | Sink:MaD:90 | +| ApacheHttpSSRFVersion5.java:42:23:42:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:121:40:121:42 | uri : URI | provenance | | +| ApacheHttpSSRFVersion5.java:42:23:42:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:122:40:122:42 | uri | provenance | Sink:MaD:93 | +| ApacheHttpSSRFVersion5.java:42:23:42:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:125:38:125:40 | uri : URI | provenance | | +| ApacheHttpSSRFVersion5.java:42:23:42:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:126:38:126:40 | uri | provenance | Sink:MaD:96 | +| ApacheHttpSSRFVersion5.java:42:23:42:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:129:37:129:39 | uri : URI | provenance | | +| ApacheHttpSSRFVersion5.java:42:23:42:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:130:37:130:39 | uri | provenance | Sink:MaD:99 | +| ApacheHttpSSRFVersion5.java:42:23:42:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:133:36:133:38 | uri : URI | provenance | | +| ApacheHttpSSRFVersion5.java:42:23:42:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:134:36:134:38 | uri | provenance | Sink:MaD:102 | +| ApacheHttpSSRFVersion5.java:42:23:42:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:137:38:137:40 | uri : URI | provenance | | +| ApacheHttpSSRFVersion5.java:42:23:42:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:138:38:138:40 | uri | provenance | Sink:MaD:105 | +| ApacheHttpSSRFVersion5.java:42:23:42:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:141:41:141:43 | uri : URI | provenance | | +| ApacheHttpSSRFVersion5.java:42:23:42:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:142:41:142:43 | uri | provenance | Sink:MaD:107 | +| ApacheHttpSSRFVersion5.java:42:23:42:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:144:38:144:40 | uri : URI | provenance | | +| ApacheHttpSSRFVersion5.java:42:23:42:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:145:38:145:40 | uri | provenance | Sink:MaD:109 | +| ApacheHttpSSRFVersion5.java:42:23:42:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:147:39:147:41 | uri : URI | provenance | | +| ApacheHttpSSRFVersion5.java:42:23:42:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:148:39:148:41 | uri | provenance | Sink:MaD:111 | +| ApacheHttpSSRFVersion5.java:42:23:42:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:150:42:150:44 | uri : URI | provenance | | +| ApacheHttpSSRFVersion5.java:42:23:42:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:151:42:151:44 | uri | provenance | Sink:MaD:113 | +| ApacheHttpSSRFVersion5.java:42:23:42:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:153:40:153:42 | uri : URI | provenance | | +| ApacheHttpSSRFVersion5.java:42:23:42:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:154:40:154:42 | uri | provenance | Sink:MaD:115 | +| ApacheHttpSSRFVersion5.java:42:23:42:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:156:39:156:41 | uri : URI | provenance | | +| ApacheHttpSSRFVersion5.java:42:23:42:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:157:39:157:41 | uri | provenance | Sink:MaD:117 | +| ApacheHttpSSRFVersion5.java:42:23:42:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:159:38:159:40 | uri : URI | provenance | | +| ApacheHttpSSRFVersion5.java:42:23:42:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:160:38:160:40 | uri | provenance | Sink:MaD:119 | +| ApacheHttpSSRFVersion5.java:42:23:42:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:164:47:164:49 | uri : URI | provenance | | +| ApacheHttpSSRFVersion5.java:42:23:42:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:165:47:165:49 | uri | provenance | Sink:MaD:206 | +| ApacheHttpSSRFVersion5.java:42:23:42:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:167:40:167:42 | uri : URI | provenance | | +| ApacheHttpSSRFVersion5.java:42:23:42:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:168:40:168:42 | uri | provenance | Sink:MaD:121 | +| ApacheHttpSSRFVersion5.java:42:31:42:37 | uriSink : String | ApacheHttpSSRFVersion5.java:42:23:42:38 | new URI(...) : URI | provenance | Config | +| ApacheHttpSSRFVersion5.java:42:31:42:37 | uriSink : String | ApacheHttpSSRFVersion5.java:42:23:42:38 | new URI(...) : URI | provenance | MaD:285 | +| ApacheHttpSSRFVersion5.java:44:31:44:58 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:45:42:45:49 | hostSink : String | provenance | Src:MaD:277 | +| ApacheHttpSSRFVersion5.java:45:29:45:50 | new HttpHost(...) : HttpHost | ApacheHttpSSRFVersion5.java:48:54:48:57 | host | provenance | Sink:MaD:38 | +| ApacheHttpSSRFVersion5.java:45:29:45:50 | new HttpHost(...) : HttpHost | ApacheHttpSSRFVersion5.java:54:38:54:41 | host | provenance | Sink:MaD:43 | +| ApacheHttpSSRFVersion5.java:45:29:45:50 | new HttpHost(...) : HttpHost | ApacheHttpSSRFVersion5.java:58:35:58:38 | host | provenance | Sink:MaD:46 | +| ApacheHttpSSRFVersion5.java:45:29:45:50 | new HttpHost(...) : HttpHost | ApacheHttpSSRFVersion5.java:62:36:62:39 | host | provenance | Sink:MaD:49 | +| ApacheHttpSSRFVersion5.java:45:29:45:50 | new HttpHost(...) : HttpHost | ApacheHttpSSRFVersion5.java:66:39:66:42 | host | provenance | Sink:MaD:52 | +| ApacheHttpSSRFVersion5.java:45:29:45:50 | new HttpHost(...) : HttpHost | ApacheHttpSSRFVersion5.java:70:37:70:40 | host | provenance | Sink:MaD:55 | +| ApacheHttpSSRFVersion5.java:45:29:45:50 | new HttpHost(...) : HttpHost | ApacheHttpSSRFVersion5.java:74:36:74:39 | host | provenance | Sink:MaD:58 | +| ApacheHttpSSRFVersion5.java:45:29:45:50 | new HttpHost(...) : HttpHost | ApacheHttpSSRFVersion5.java:78:35:78:38 | host | provenance | Sink:MaD:61 | +| ApacheHttpSSRFVersion5.java:45:29:45:50 | new HttpHost(...) : HttpHost | ApacheHttpSSRFVersion5.java:82:37:82:40 | host | provenance | Sink:MaD:64 | +| ApacheHttpSSRFVersion5.java:45:29:45:50 | new HttpHost(...) : HttpHost | ApacheHttpSSRFVersion5.java:87:51:87:54 | host | provenance | Sink:MaD:67 | +| ApacheHttpSSRFVersion5.java:45:29:45:50 | new HttpHost(...) : HttpHost | ApacheHttpSSRFVersion5.java:91:51:91:54 | host | provenance | Sink:MaD:69 | +| ApacheHttpSSRFVersion5.java:45:29:45:50 | new HttpHost(...) : HttpHost | ApacheHttpSSRFVersion5.java:93:45:93:48 | host | provenance | Sink:MaD:71 | +| ApacheHttpSSRFVersion5.java:45:29:45:50 | new HttpHost(...) : HttpHost | ApacheHttpSSRFVersion5.java:96:54:96:57 | host | provenance | Sink:MaD:73 | +| ApacheHttpSSRFVersion5.java:45:29:45:50 | new HttpHost(...) : HttpHost | ApacheHttpSSRFVersion5.java:102:55:102:58 | host | provenance | Sink:MaD:77 | +| ApacheHttpSSRFVersion5.java:45:29:45:50 | new HttpHost(...) : HttpHost | ApacheHttpSSRFVersion5.java:108:39:108:42 | host | provenance | Sink:MaD:82 | +| ApacheHttpSSRFVersion5.java:45:29:45:50 | new HttpHost(...) : HttpHost | ApacheHttpSSRFVersion5.java:112:36:112:39 | host | provenance | Sink:MaD:85 | +| ApacheHttpSSRFVersion5.java:45:29:45:50 | new HttpHost(...) : HttpHost | ApacheHttpSSRFVersion5.java:116:37:116:40 | host | provenance | Sink:MaD:88 | +| ApacheHttpSSRFVersion5.java:45:29:45:50 | new HttpHost(...) : HttpHost | ApacheHttpSSRFVersion5.java:120:40:120:43 | host | provenance | Sink:MaD:91 | +| ApacheHttpSSRFVersion5.java:45:29:45:50 | new HttpHost(...) : HttpHost | ApacheHttpSSRFVersion5.java:124:38:124:41 | host | provenance | Sink:MaD:94 | +| ApacheHttpSSRFVersion5.java:45:29:45:50 | new HttpHost(...) : HttpHost | ApacheHttpSSRFVersion5.java:128:37:128:40 | host | provenance | Sink:MaD:97 | +| ApacheHttpSSRFVersion5.java:45:29:45:50 | new HttpHost(...) : HttpHost | ApacheHttpSSRFVersion5.java:132:36:132:39 | host | provenance | Sink:MaD:100 | +| ApacheHttpSSRFVersion5.java:45:29:45:50 | new HttpHost(...) : HttpHost | ApacheHttpSSRFVersion5.java:136:38:136:41 | host | provenance | Sink:MaD:103 | +| ApacheHttpSSRFVersion5.java:45:29:45:50 | new HttpHost(...) : HttpHost | ApacheHttpSSRFVersion5.java:162:52:162:55 | host | provenance | Sink:MaD:204 | +| ApacheHttpSSRFVersion5.java:45:42:45:49 | hostSink : String | ApacheHttpSSRFVersion5.java:45:29:45:50 | new HttpHost(...) : HttpHost | provenance | MaD:292 | +| ApacheHttpSSRFVersion5.java:49:54:49:56 | uri : URI | ApacheHttpSSRFVersion5.java:49:54:49:67 | toString(...) | provenance | MaD:286 Sink:MaD:39 | +| ApacheHttpSSRFVersion5.java:51:48:51:50 | uri : URI | ApacheHttpSSRFVersion5.java:51:48:51:61 | toString(...) | provenance | MaD:286 Sink:MaD:41 | +| ApacheHttpSSRFVersion5.java:55:38:55:40 | uri : URI | ApacheHttpSSRFVersion5.java:55:38:55:51 | toString(...) | provenance | MaD:286 Sink:MaD:44 | +| ApacheHttpSSRFVersion5.java:59:35:59:37 | uri : URI | ApacheHttpSSRFVersion5.java:59:35:59:48 | toString(...) | provenance | MaD:286 Sink:MaD:47 | +| ApacheHttpSSRFVersion5.java:63:36:63:38 | uri : URI | ApacheHttpSSRFVersion5.java:63:36:63:49 | toString(...) | provenance | MaD:286 Sink:MaD:50 | +| ApacheHttpSSRFVersion5.java:67:39:67:41 | uri : URI | ApacheHttpSSRFVersion5.java:67:39:67:52 | toString(...) | provenance | MaD:286 Sink:MaD:53 | +| ApacheHttpSSRFVersion5.java:71:37:71:39 | uri : URI | ApacheHttpSSRFVersion5.java:71:37:71:50 | toString(...) | provenance | MaD:286 Sink:MaD:56 | +| ApacheHttpSSRFVersion5.java:75:36:75:38 | uri : URI | ApacheHttpSSRFVersion5.java:75:36:75:49 | toString(...) | provenance | MaD:286 Sink:MaD:59 | +| ApacheHttpSSRFVersion5.java:79:35:79:37 | uri : URI | ApacheHttpSSRFVersion5.java:79:35:79:48 | toString(...) | provenance | MaD:286 Sink:MaD:62 | +| ApacheHttpSSRFVersion5.java:83:37:83:39 | uri : URI | ApacheHttpSSRFVersion5.java:83:37:83:50 | toString(...) | provenance | MaD:286 Sink:MaD:65 | +| ApacheHttpSSRFVersion5.java:98:48:98:50 | uri : URI | ApacheHttpSSRFVersion5.java:98:48:98:61 | toString(...) | provenance | MaD:286 Sink:MaD:75 | +| ApacheHttpSSRFVersion5.java:103:55:103:57 | uri : URI | ApacheHttpSSRFVersion5.java:103:55:103:68 | toString(...) | provenance | MaD:286 Sink:MaD:78 | +| ApacheHttpSSRFVersion5.java:105:49:105:51 | uri : URI | ApacheHttpSSRFVersion5.java:105:49:105:62 | toString(...) | provenance | MaD:286 Sink:MaD:80 | +| ApacheHttpSSRFVersion5.java:109:39:109:41 | uri : URI | ApacheHttpSSRFVersion5.java:109:39:109:52 | toString(...) | provenance | MaD:286 Sink:MaD:83 | +| ApacheHttpSSRFVersion5.java:113:36:113:38 | uri : URI | ApacheHttpSSRFVersion5.java:113:36:113:49 | toString(...) | provenance | MaD:286 Sink:MaD:86 | +| ApacheHttpSSRFVersion5.java:117:37:117:39 | uri : URI | ApacheHttpSSRFVersion5.java:117:37:117:50 | toString(...) | provenance | MaD:286 Sink:MaD:89 | +| ApacheHttpSSRFVersion5.java:121:40:121:42 | uri : URI | ApacheHttpSSRFVersion5.java:121:40:121:53 | toString(...) | provenance | MaD:286 Sink:MaD:92 | +| ApacheHttpSSRFVersion5.java:125:38:125:40 | uri : URI | ApacheHttpSSRFVersion5.java:125:38:125:51 | toString(...) | provenance | MaD:286 Sink:MaD:95 | +| ApacheHttpSSRFVersion5.java:129:37:129:39 | uri : URI | ApacheHttpSSRFVersion5.java:129:37:129:50 | toString(...) | provenance | MaD:286 Sink:MaD:98 | +| ApacheHttpSSRFVersion5.java:133:36:133:38 | uri : URI | ApacheHttpSSRFVersion5.java:133:36:133:49 | toString(...) | provenance | MaD:286 Sink:MaD:101 | +| ApacheHttpSSRFVersion5.java:137:38:137:40 | uri : URI | ApacheHttpSSRFVersion5.java:137:38:137:51 | toString(...) | provenance | MaD:286 Sink:MaD:104 | +| ApacheHttpSSRFVersion5.java:141:41:141:43 | uri : URI | ApacheHttpSSRFVersion5.java:141:41:141:54 | toString(...) | provenance | MaD:286 Sink:MaD:106 | +| ApacheHttpSSRFVersion5.java:144:38:144:40 | uri : URI | ApacheHttpSSRFVersion5.java:144:38:144:51 | toString(...) | provenance | MaD:286 Sink:MaD:108 | +| ApacheHttpSSRFVersion5.java:147:39:147:41 | uri : URI | ApacheHttpSSRFVersion5.java:147:39:147:52 | toString(...) | provenance | MaD:286 Sink:MaD:110 | +| ApacheHttpSSRFVersion5.java:150:42:150:44 | uri : URI | ApacheHttpSSRFVersion5.java:150:42:150:55 | toString(...) | provenance | MaD:286 Sink:MaD:112 | +| ApacheHttpSSRFVersion5.java:153:40:153:42 | uri : URI | ApacheHttpSSRFVersion5.java:153:40:153:53 | toString(...) | provenance | MaD:286 Sink:MaD:114 | +| ApacheHttpSSRFVersion5.java:156:39:156:41 | uri : URI | ApacheHttpSSRFVersion5.java:156:39:156:52 | toString(...) | provenance | MaD:286 Sink:MaD:116 | +| ApacheHttpSSRFVersion5.java:159:38:159:40 | uri : URI | ApacheHttpSSRFVersion5.java:159:38:159:51 | toString(...) | provenance | MaD:286 Sink:MaD:118 | +| ApacheHttpSSRFVersion5.java:164:47:164:49 | uri : URI | ApacheHttpSSRFVersion5.java:164:47:164:60 | toString(...) | provenance | MaD:286 Sink:MaD:205 | +| ApacheHttpSSRFVersion5.java:167:40:167:42 | uri : URI | ApacheHttpSSRFVersion5.java:167:40:167:53 | toString(...) | provenance | MaD:286 Sink:MaD:120 | +| ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:181:31:181:37 | uriSink : String | provenance | Src:MaD:277 | +| ApacheHttpSSRFVersion5.java:181:23:181:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:184:56:184:58 | uri : URI | provenance | | +| ApacheHttpSSRFVersion5.java:181:23:181:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:185:56:185:58 | uri | provenance | Sink:MaD:123 | +| ApacheHttpSSRFVersion5.java:181:23:181:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:186:50:186:52 | uri : URI | provenance | | +| ApacheHttpSSRFVersion5.java:181:23:181:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:187:50:187:52 | uri | provenance | Sink:MaD:125 | +| ApacheHttpSSRFVersion5.java:181:23:181:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:189:40:189:42 | uri : URI | provenance | | +| ApacheHttpSSRFVersion5.java:181:23:181:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:190:40:190:42 | uri | provenance | Sink:MaD:127 | +| ApacheHttpSSRFVersion5.java:181:23:181:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:192:37:192:39 | uri : URI | provenance | | +| ApacheHttpSSRFVersion5.java:181:23:181:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:193:37:193:39 | uri | provenance | Sink:MaD:129 | +| ApacheHttpSSRFVersion5.java:181:23:181:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:195:38:195:40 | uri : URI | provenance | | +| ApacheHttpSSRFVersion5.java:181:23:181:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:196:38:196:40 | uri | provenance | Sink:MaD:131 | +| ApacheHttpSSRFVersion5.java:181:23:181:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:198:41:198:43 | uri : URI | provenance | | +| ApacheHttpSSRFVersion5.java:181:23:181:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:199:41:199:43 | uri | provenance | Sink:MaD:133 | +| ApacheHttpSSRFVersion5.java:181:23:181:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:201:39:201:41 | uri : URI | provenance | | +| ApacheHttpSSRFVersion5.java:181:23:181:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:202:39:202:41 | uri | provenance | Sink:MaD:135 | +| ApacheHttpSSRFVersion5.java:181:23:181:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:204:38:204:40 | uri : URI | provenance | | +| ApacheHttpSSRFVersion5.java:181:23:181:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:205:38:205:40 | uri | provenance | Sink:MaD:137 | +| ApacheHttpSSRFVersion5.java:181:23:181:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:207:37:207:39 | uri : URI | provenance | | +| ApacheHttpSSRFVersion5.java:181:23:181:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:208:37:208:39 | uri | provenance | Sink:MaD:139 | +| ApacheHttpSSRFVersion5.java:181:23:181:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:210:39:210:41 | uri : URI | provenance | | +| ApacheHttpSSRFVersion5.java:181:23:181:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:211:39:211:41 | uri | provenance | Sink:MaD:141 | +| ApacheHttpSSRFVersion5.java:181:23:181:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:214:28:214:30 | uri : URI | provenance | | +| ApacheHttpSSRFVersion5.java:181:23:181:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:215:28:215:30 | uri | provenance | Sink:MaD:143 | +| ApacheHttpSSRFVersion5.java:181:23:181:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:217:25:217:27 | uri : URI | provenance | | +| ApacheHttpSSRFVersion5.java:181:23:181:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:218:25:218:27 | uri | provenance | Sink:MaD:145 | +| ApacheHttpSSRFVersion5.java:181:23:181:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:220:26:220:28 | uri : URI | provenance | | +| ApacheHttpSSRFVersion5.java:181:23:181:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:221:26:221:28 | uri | provenance | Sink:MaD:147 | +| ApacheHttpSSRFVersion5.java:181:23:181:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:223:29:223:31 | uri : URI | provenance | | +| ApacheHttpSSRFVersion5.java:181:23:181:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:224:29:224:31 | uri | provenance | Sink:MaD:149 | +| ApacheHttpSSRFVersion5.java:181:23:181:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:226:27:226:29 | uri : URI | provenance | | +| ApacheHttpSSRFVersion5.java:181:23:181:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:227:27:227:29 | uri | provenance | Sink:MaD:151 | +| ApacheHttpSSRFVersion5.java:181:23:181:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:229:26:229:28 | uri : URI | provenance | | +| ApacheHttpSSRFVersion5.java:181:23:181:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:230:26:230:28 | uri | provenance | Sink:MaD:153 | +| ApacheHttpSSRFVersion5.java:181:23:181:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:232:25:232:27 | uri : URI | provenance | | +| ApacheHttpSSRFVersion5.java:181:23:181:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:233:25:233:27 | uri | provenance | Sink:MaD:155 | +| ApacheHttpSSRFVersion5.java:181:23:181:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:235:27:235:29 | uri : URI | provenance | | +| ApacheHttpSSRFVersion5.java:181:23:181:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:236:27:236:29 | uri | provenance | Sink:MaD:157 | +| ApacheHttpSSRFVersion5.java:181:23:181:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:239:46:239:48 | uri | provenance | Sink:MaD:158 | +| ApacheHttpSSRFVersion5.java:181:31:181:37 | uriSink : String | ApacheHttpSSRFVersion5.java:181:23:181:38 | new URI(...) : URI | provenance | Config | +| ApacheHttpSSRFVersion5.java:181:31:181:37 | uriSink : String | ApacheHttpSSRFVersion5.java:181:23:181:38 | new URI(...) : URI | provenance | MaD:285 | +| ApacheHttpSSRFVersion5.java:184:56:184:58 | uri : URI | ApacheHttpSSRFVersion5.java:184:56:184:69 | toString(...) | provenance | MaD:286 Sink:MaD:122 | +| ApacheHttpSSRFVersion5.java:186:50:186:52 | uri : URI | ApacheHttpSSRFVersion5.java:186:50:186:63 | toString(...) | provenance | MaD:286 Sink:MaD:124 | +| ApacheHttpSSRFVersion5.java:189:40:189:42 | uri : URI | ApacheHttpSSRFVersion5.java:189:40:189:53 | toString(...) | provenance | MaD:286 Sink:MaD:126 | +| ApacheHttpSSRFVersion5.java:192:37:192:39 | uri : URI | ApacheHttpSSRFVersion5.java:192:37:192:50 | toString(...) | provenance | MaD:286 Sink:MaD:128 | +| ApacheHttpSSRFVersion5.java:195:38:195:40 | uri : URI | ApacheHttpSSRFVersion5.java:195:38:195:51 | toString(...) | provenance | MaD:286 Sink:MaD:130 | +| ApacheHttpSSRFVersion5.java:198:41:198:43 | uri : URI | ApacheHttpSSRFVersion5.java:198:41:198:54 | toString(...) | provenance | MaD:286 Sink:MaD:132 | +| ApacheHttpSSRFVersion5.java:201:39:201:41 | uri : URI | ApacheHttpSSRFVersion5.java:201:39:201:52 | toString(...) | provenance | MaD:286 Sink:MaD:134 | +| ApacheHttpSSRFVersion5.java:204:38:204:40 | uri : URI | ApacheHttpSSRFVersion5.java:204:38:204:51 | toString(...) | provenance | MaD:286 Sink:MaD:136 | +| ApacheHttpSSRFVersion5.java:207:37:207:39 | uri : URI | ApacheHttpSSRFVersion5.java:207:37:207:50 | toString(...) | provenance | MaD:286 Sink:MaD:138 | +| ApacheHttpSSRFVersion5.java:210:39:210:41 | uri : URI | ApacheHttpSSRFVersion5.java:210:39:210:52 | toString(...) | provenance | MaD:286 Sink:MaD:140 | +| ApacheHttpSSRFVersion5.java:214:28:214:30 | uri : URI | ApacheHttpSSRFVersion5.java:214:28:214:41 | toString(...) | provenance | MaD:286 Sink:MaD:142 | +| ApacheHttpSSRFVersion5.java:217:25:217:27 | uri : URI | ApacheHttpSSRFVersion5.java:217:25:217:38 | toString(...) | provenance | MaD:286 Sink:MaD:144 | +| ApacheHttpSSRFVersion5.java:220:26:220:28 | uri : URI | ApacheHttpSSRFVersion5.java:220:26:220:39 | toString(...) | provenance | MaD:286 Sink:MaD:146 | +| ApacheHttpSSRFVersion5.java:223:29:223:31 | uri : URI | ApacheHttpSSRFVersion5.java:223:29:223:42 | toString(...) | provenance | MaD:286 Sink:MaD:148 | +| ApacheHttpSSRFVersion5.java:226:27:226:29 | uri : URI | ApacheHttpSSRFVersion5.java:226:27:226:40 | toString(...) | provenance | MaD:286 Sink:MaD:150 | +| ApacheHttpSSRFVersion5.java:229:26:229:28 | uri : URI | ApacheHttpSSRFVersion5.java:229:26:229:39 | toString(...) | provenance | MaD:286 Sink:MaD:152 | +| ApacheHttpSSRFVersion5.java:232:25:232:27 | uri : URI | ApacheHttpSSRFVersion5.java:232:25:232:38 | toString(...) | provenance | MaD:286 Sink:MaD:154 | +| ApacheHttpSSRFVersion5.java:235:27:235:29 | uri : URI | ApacheHttpSSRFVersion5.java:235:27:235:40 | toString(...) | provenance | MaD:286 Sink:MaD:156 | +| ApacheHttpSSRFVersion5.java:251:30:251:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:252:31:252:37 | uriSink : String | provenance | Src:MaD:277 | +| ApacheHttpSSRFVersion5.java:252:23:252:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:255:44:255:46 | uri | provenance | Sink:MaD:159 | +| ApacheHttpSSRFVersion5.java:252:23:252:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:256:38:256:40 | uri : URI | provenance | | +| ApacheHttpSSRFVersion5.java:252:23:252:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:257:38:257:40 | uri | provenance | Sink:MaD:161 | +| ApacheHttpSSRFVersion5.java:252:23:252:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:259:28:259:30 | uri : URI | provenance | | +| ApacheHttpSSRFVersion5.java:252:23:252:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:260:28:260:30 | uri | provenance | Sink:MaD:163 | +| ApacheHttpSSRFVersion5.java:252:23:252:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:262:25:262:27 | uri : URI | provenance | | +| ApacheHttpSSRFVersion5.java:252:23:252:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:263:25:263:27 | uri | provenance | Sink:MaD:165 | +| ApacheHttpSSRFVersion5.java:252:23:252:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:265:26:265:28 | uri : URI | provenance | | +| ApacheHttpSSRFVersion5.java:252:23:252:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:266:26:266:28 | uri | provenance | Sink:MaD:167 | +| ApacheHttpSSRFVersion5.java:252:23:252:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:268:29:268:31 | uri : URI | provenance | | +| ApacheHttpSSRFVersion5.java:252:23:252:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:269:29:269:31 | uri | provenance | Sink:MaD:169 | +| ApacheHttpSSRFVersion5.java:252:23:252:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:271:27:271:29 | uri : URI | provenance | | +| ApacheHttpSSRFVersion5.java:252:23:252:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:272:27:272:29 | uri | provenance | Sink:MaD:171 | +| ApacheHttpSSRFVersion5.java:252:23:252:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:274:26:274:28 | uri : URI | provenance | | +| ApacheHttpSSRFVersion5.java:252:23:252:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:275:26:275:28 | uri | provenance | Sink:MaD:173 | +| ApacheHttpSSRFVersion5.java:252:23:252:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:277:25:277:27 | uri : URI | provenance | | +| ApacheHttpSSRFVersion5.java:252:23:252:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:278:25:278:27 | uri | provenance | Sink:MaD:175 | +| ApacheHttpSSRFVersion5.java:252:23:252:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:280:27:280:29 | uri : URI | provenance | | +| ApacheHttpSSRFVersion5.java:252:23:252:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:281:27:281:29 | uri | provenance | Sink:MaD:177 | +| ApacheHttpSSRFVersion5.java:252:31:252:37 | uriSink : String | ApacheHttpSSRFVersion5.java:252:23:252:38 | new URI(...) : URI | provenance | Config | +| ApacheHttpSSRFVersion5.java:252:31:252:37 | uriSink : String | ApacheHttpSSRFVersion5.java:252:23:252:38 | new URI(...) : URI | provenance | MaD:285 | +| ApacheHttpSSRFVersion5.java:256:38:256:40 | uri : URI | ApacheHttpSSRFVersion5.java:256:38:256:51 | toString(...) | provenance | MaD:286 Sink:MaD:160 | +| ApacheHttpSSRFVersion5.java:259:28:259:30 | uri : URI | ApacheHttpSSRFVersion5.java:259:28:259:41 | toString(...) | provenance | MaD:286 Sink:MaD:162 | +| ApacheHttpSSRFVersion5.java:262:25:262:27 | uri : URI | ApacheHttpSSRFVersion5.java:262:25:262:38 | toString(...) | provenance | MaD:286 Sink:MaD:164 | +| ApacheHttpSSRFVersion5.java:265:26:265:28 | uri : URI | ApacheHttpSSRFVersion5.java:265:26:265:39 | toString(...) | provenance | MaD:286 Sink:MaD:166 | +| ApacheHttpSSRFVersion5.java:268:29:268:31 | uri : URI | ApacheHttpSSRFVersion5.java:268:29:268:42 | toString(...) | provenance | MaD:286 Sink:MaD:168 | +| ApacheHttpSSRFVersion5.java:271:27:271:29 | uri : URI | ApacheHttpSSRFVersion5.java:271:27:271:40 | toString(...) | provenance | MaD:286 Sink:MaD:170 | +| ApacheHttpSSRFVersion5.java:274:26:274:28 | uri : URI | ApacheHttpSSRFVersion5.java:274:26:274:39 | toString(...) | provenance | MaD:286 Sink:MaD:172 | +| ApacheHttpSSRFVersion5.java:277:25:277:27 | uri : URI | ApacheHttpSSRFVersion5.java:277:25:277:38 | toString(...) | provenance | MaD:286 Sink:MaD:174 | +| ApacheHttpSSRFVersion5.java:280:27:280:29 | uri : URI | ApacheHttpSSRFVersion5.java:280:27:280:40 | toString(...) | provenance | MaD:286 Sink:MaD:176 | +| ApacheHttpSSRFVersion5.java:295:30:295:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:296:31:296:37 | uriSink : String | provenance | Src:MaD:277 | +| ApacheHttpSSRFVersion5.java:296:23:296:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:308:60:308:62 | uri : URI | provenance | | +| ApacheHttpSSRFVersion5.java:296:23:296:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:309:60:309:62 | uri | provenance | Sink:MaD:209 | +| ApacheHttpSSRFVersion5.java:296:23:296:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:313:53:313:55 | uri : URI | provenance | | +| ApacheHttpSSRFVersion5.java:296:23:296:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:314:53:314:55 | uri | provenance | Sink:MaD:209 | +| ApacheHttpSSRFVersion5.java:296:31:296:37 | uriSink : String | ApacheHttpSSRFVersion5.java:296:23:296:38 | new URI(...) : URI | provenance | Config | +| ApacheHttpSSRFVersion5.java:296:31:296:37 | uriSink : String | ApacheHttpSSRFVersion5.java:296:23:296:38 | new URI(...) : URI | provenance | MaD:285 | +| ApacheHttpSSRFVersion5.java:298:31:298:58 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:299:42:299:49 | hostSink : String | provenance | Src:MaD:277 | +| ApacheHttpSSRFVersion5.java:299:29:299:50 | new HttpHost(...) : HttpHost | ApacheHttpSSRFVersion5.java:303:34:303:37 | host | provenance | Sink:MaD:178 | +| ApacheHttpSSRFVersion5.java:299:29:299:50 | new HttpHost(...) : HttpHost | ApacheHttpSSRFVersion5.java:304:34:304:37 | host | provenance | Sink:MaD:179 | +| ApacheHttpSSRFVersion5.java:299:42:299:49 | hostSink : String | ApacheHttpSSRFVersion5.java:299:29:299:50 | new HttpHost(...) : HttpHost | provenance | MaD:292 | +| ApacheHttpSSRFVersion5.java:308:60:308:62 | uri : URI | ApacheHttpSSRFVersion5.java:308:60:308:73 | toString(...) | provenance | MaD:286 Sink:MaD:208 | +| ApacheHttpSSRFVersion5.java:313:53:313:55 | uri : URI | ApacheHttpSSRFVersion5.java:313:53:313:66 | toString(...) | provenance | MaD:286 Sink:MaD:208 | +| ApacheHttpSSRFVersion5.java:326:30:326:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:327:31:327:37 | uriSink : String | provenance | Src:MaD:277 | +| ApacheHttpSSRFVersion5.java:327:23:327:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:333:42:333:44 | uri : URI | provenance | | +| ApacheHttpSSRFVersion5.java:327:23:327:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:334:42:334:44 | uri | provenance | Sink:MaD:181 | +| ApacheHttpSSRFVersion5.java:327:23:327:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:336:39:336:41 | uri : URI | provenance | | +| ApacheHttpSSRFVersion5.java:327:23:327:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:337:39:337:41 | uri | provenance | Sink:MaD:183 | +| ApacheHttpSSRFVersion5.java:327:23:327:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:339:40:339:42 | uri : URI | provenance | | +| ApacheHttpSSRFVersion5.java:327:23:327:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:340:40:340:42 | uri | provenance | Sink:MaD:185 | +| ApacheHttpSSRFVersion5.java:327:23:327:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:342:43:342:45 | uri : URI | provenance | | +| ApacheHttpSSRFVersion5.java:327:23:327:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:343:43:343:45 | uri | provenance | Sink:MaD:187 | +| ApacheHttpSSRFVersion5.java:327:23:327:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:345:41:345:43 | uri : URI | provenance | | +| ApacheHttpSSRFVersion5.java:327:23:327:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:346:41:346:43 | uri | provenance | Sink:MaD:189 | +| ApacheHttpSSRFVersion5.java:327:23:327:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:348:40:348:42 | uri : URI | provenance | | +| ApacheHttpSSRFVersion5.java:327:23:327:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:349:40:349:42 | uri | provenance | Sink:MaD:191 | +| ApacheHttpSSRFVersion5.java:327:23:327:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:351:39:351:41 | uri : URI | provenance | | +| ApacheHttpSSRFVersion5.java:327:23:327:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:352:39:352:41 | uri | provenance | Sink:MaD:193 | +| ApacheHttpSSRFVersion5.java:327:23:327:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:356:48:356:50 | uri : URI | provenance | | +| ApacheHttpSSRFVersion5.java:327:23:327:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:357:48:357:50 | uri | provenance | Sink:MaD:206 | +| ApacheHttpSSRFVersion5.java:327:23:327:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:359:41:359:43 | uri : URI | provenance | | +| ApacheHttpSSRFVersion5.java:327:23:327:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:360:41:360:43 | uri | provenance | Sink:MaD:195 | +| ApacheHttpSSRFVersion5.java:327:31:327:37 | uriSink : String | ApacheHttpSSRFVersion5.java:327:23:327:38 | new URI(...) : URI | provenance | Config | +| ApacheHttpSSRFVersion5.java:327:31:327:37 | uriSink : String | ApacheHttpSSRFVersion5.java:327:23:327:38 | new URI(...) : URI | provenance | MaD:285 | +| ApacheHttpSSRFVersion5.java:329:31:329:58 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:330:42:330:49 | hostSink : String | provenance | Src:MaD:277 | +| ApacheHttpSSRFVersion5.java:330:29:330:50 | new HttpHost(...) : HttpHost | ApacheHttpSSRFVersion5.java:354:53:354:56 | host | provenance | Sink:MaD:204 | +| ApacheHttpSSRFVersion5.java:330:42:330:49 | hostSink : String | ApacheHttpSSRFVersion5.java:330:29:330:50 | new HttpHost(...) : HttpHost | provenance | MaD:292 | +| ApacheHttpSSRFVersion5.java:333:42:333:44 | uri : URI | ApacheHttpSSRFVersion5.java:333:42:333:55 | toString(...) | provenance | MaD:286 Sink:MaD:180 | +| ApacheHttpSSRFVersion5.java:336:39:336:41 | uri : URI | ApacheHttpSSRFVersion5.java:336:39:336:52 | toString(...) | provenance | MaD:286 Sink:MaD:182 | +| ApacheHttpSSRFVersion5.java:339:40:339:42 | uri : URI | ApacheHttpSSRFVersion5.java:339:40:339:53 | toString(...) | provenance | MaD:286 Sink:MaD:184 | +| ApacheHttpSSRFVersion5.java:342:43:342:45 | uri : URI | ApacheHttpSSRFVersion5.java:342:43:342:56 | toString(...) | provenance | MaD:286 Sink:MaD:186 | +| ApacheHttpSSRFVersion5.java:345:41:345:43 | uri : URI | ApacheHttpSSRFVersion5.java:345:41:345:54 | toString(...) | provenance | MaD:286 Sink:MaD:188 | +| ApacheHttpSSRFVersion5.java:348:40:348:42 | uri : URI | ApacheHttpSSRFVersion5.java:348:40:348:53 | toString(...) | provenance | MaD:286 Sink:MaD:190 | +| ApacheHttpSSRFVersion5.java:351:39:351:41 | uri : URI | ApacheHttpSSRFVersion5.java:351:39:351:52 | toString(...) | provenance | MaD:286 Sink:MaD:192 | +| ApacheHttpSSRFVersion5.java:356:48:356:50 | uri : URI | ApacheHttpSSRFVersion5.java:356:48:356:61 | toString(...) | provenance | MaD:286 Sink:MaD:205 | +| ApacheHttpSSRFVersion5.java:359:41:359:43 | uri : URI | ApacheHttpSSRFVersion5.java:359:41:359:54 | toString(...) | provenance | MaD:286 Sink:MaD:194 | +| ApacheHttpSSRFVersion5.java:372:30:372:56 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:373:31:373:37 | uriSink : String | provenance | Src:MaD:277 | +| ApacheHttpSSRFVersion5.java:373:23:373:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:380:57:380:59 | uri | provenance | Sink:MaD:197 | +| ApacheHttpSSRFVersion5.java:373:23:373:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:382:51:382:53 | uri | provenance | Sink:MaD:199 | +| ApacheHttpSSRFVersion5.java:373:23:373:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:386:50:386:52 | uri | provenance | Sink:MaD:201 | +| ApacheHttpSSRFVersion5.java:373:23:373:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:388:44:388:46 | uri | provenance | Sink:MaD:203 | +| ApacheHttpSSRFVersion5.java:373:23:373:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:390:24:390:26 | uri | provenance | Sink:MaD:207 | +| ApacheHttpSSRFVersion5.java:373:23:373:38 | new URI(...) : URI | ApacheHttpSSRFVersion5.java:394:24:394:26 | uri | provenance | Sink:MaD:207 | +| ApacheHttpSSRFVersion5.java:373:31:373:37 | uriSink : String | ApacheHttpSSRFVersion5.java:373:23:373:38 | new URI(...) : URI | provenance | Config | +| ApacheHttpSSRFVersion5.java:373:31:373:37 | uriSink : String | ApacheHttpSSRFVersion5.java:373:23:373:38 | new URI(...) : URI | provenance | MaD:285 | +| ApacheHttpSSRFVersion5.java:375:31:375:58 | getParameter(...) : String | ApacheHttpSSRFVersion5.java:376:42:376:49 | hostSink : String | provenance | Src:MaD:277 | +| ApacheHttpSSRFVersion5.java:376:29:376:50 | new HttpHost(...) : HttpHost | ApacheHttpSSRFVersion5.java:379:57:379:60 | host | provenance | Sink:MaD:196 | +| ApacheHttpSSRFVersion5.java:376:29:376:50 | new HttpHost(...) : HttpHost | ApacheHttpSSRFVersion5.java:381:51:381:54 | host | provenance | Sink:MaD:198 | +| ApacheHttpSSRFVersion5.java:376:29:376:50 | new HttpHost(...) : HttpHost | ApacheHttpSSRFVersion5.java:385:50:385:53 | host | provenance | Sink:MaD:200 | +| ApacheHttpSSRFVersion5.java:376:29:376:50 | new HttpHost(...) : HttpHost | ApacheHttpSSRFVersion5.java:387:44:387:47 | host | provenance | Sink:MaD:202 | +| ApacheHttpSSRFVersion5.java:376:42:376:49 | hostSink : String | ApacheHttpSSRFVersion5.java:376:29:376:50 | new HttpHost(...) : HttpHost | provenance | MaD:292 | +| JakartaWsSSRF.java:14:22:14:48 | getParameter(...) : String | JakartaWsSSRF.java:15:23:15:25 | url | provenance | Src:MaD:277 Sink:MaD:3 | +| JavaNetHttpSSRF.java:25:27:25:53 | getParameter(...) : String | JavaNetHttpSSRF.java:26:31:26:34 | sink : String | provenance | Src:MaD:277 | +| JavaNetHttpSSRF.java:26:23:26:35 | new URI(...) : URI | JavaNetHttpSSRF.java:39:59:39:61 | uri | provenance | Sink:MaD:6 | +| JavaNetHttpSSRF.java:26:31:26:34 | sink : String | JavaNetHttpSSRF.java:26:23:26:35 | new URI(...) : URI | provenance | Config | +| JavaNetHttpSSRF.java:26:31:26:34 | sink : String | JavaNetHttpSSRF.java:26:23:26:35 | new URI(...) : URI | provenance | MaD:285 | +| JavaNetHttpSSRF.java:26:31:26:34 | sink : String | JavaNetHttpSSRF.java:27:40:27:43 | sink : String | provenance | | +| JavaNetHttpSSRF.java:27:24:27:57 | new URI(...) : URI | JavaNetHttpSSRF.java:38:65:38:68 | uri2 | provenance | Sink:MaD:5 | +| JavaNetHttpSSRF.java:27:40:27:43 | sink : String | JavaNetHttpSSRF.java:27:24:27:57 | new URI(...) : URI | provenance | Config | +| JavaNetHttpSSRF.java:27:40:27:43 | sink : String | JavaNetHttpSSRF.java:28:32:28:35 | sink : String | provenance | | +| JavaNetHttpSSRF.java:28:24:28:36 | new URL(...) : URL | JavaNetHttpSSRF.java:30:32:30:35 | url1 | provenance | Sink:MaD:9 | +| JavaNetHttpSSRF.java:28:24:28:36 | new URL(...) : URL | JavaNetHttpSSRF.java:33:32:33:35 | url1 | provenance | Sink:MaD:9 | +| JavaNetHttpSSRF.java:28:24:28:36 | new URL(...) : URL | JavaNetHttpSSRF.java:34:30:34:33 | url1 | provenance | Sink:MaD:10 | +| JavaNetHttpSSRF.java:28:32:28:35 | sink : String | JavaNetHttpSSRF.java:28:24:28:36 | new URL(...) : URL | provenance | Config | +| JavaNetHttpSSRF.java:28:32:28:35 | sink : String | JavaNetHttpSSRF.java:28:24:28:36 | new URL(...) : URL | provenance | MaD:288 | +| JaxWsSSRF.java:14:22:14:48 | getParameter(...) : String | JaxWsSSRF.java:15:23:15:25 | url | provenance | Src:MaD:277 Sink:MaD:23 | +| JdbcUrlSSRF.java:21:26:21:56 | getParameter(...) : String | JdbcUrlSSRF.java:26:28:26:34 | jdbcUrl | provenance | Src:MaD:277 Sink:MaD:17 | +| JdbcUrlSSRF.java:21:26:21:56 | getParameter(...) : String | JdbcUrlSSRF.java:28:41:28:47 | jdbcUrl | provenance | Src:MaD:277 Sink:MaD:18 | +| JdbcUrlSSRF.java:21:26:21:56 | getParameter(...) : String | JdbcUrlSSRF.java:29:41:29:47 | jdbcUrl | provenance | Src:MaD:277 Sink:MaD:20 | +| JdbcUrlSSRF.java:21:26:21:56 | getParameter(...) : String | JdbcUrlSSRF.java:30:41:30:47 | jdbcUrl | provenance | Src:MaD:277 Sink:MaD:19 | +| JdbcUrlSSRF.java:21:26:21:56 | getParameter(...) : String | JdbcUrlSSRF.java:32:27:32:33 | jdbcUrl | provenance | Src:MaD:277 Sink:MaD:242 | +| JdbcUrlSSRF.java:40:26:40:56 | getParameter(...) : String | JdbcUrlSSRF.java:43:27:43:33 | jdbcUrl | provenance | Src:MaD:277 Sink:MaD:2 | +| JdbcUrlSSRF.java:40:26:40:56 | getParameter(...) : String | JdbcUrlSSRF.java:48:23:48:29 | jdbcUrl | provenance | Src:MaD:277 Sink:MaD:2 | +| JdbcUrlSSRF.java:40:26:40:56 | getParameter(...) : String | JdbcUrlSSRF.java:52:38:52:44 | jdbcUrl : String | provenance | Src:MaD:277 | +| JdbcUrlSSRF.java:52:9:52:13 | props : Properties | JdbcUrlSSRF.java:54:49:54:53 | props | provenance | Sink:MaD:1 | +| JdbcUrlSSRF.java:52:9:52:13 | props [post update] : Properties [] : String | JdbcUrlSSRF.java:54:49:54:53 | props | provenance | Sink:MaD:1 | +| JdbcUrlSSRF.java:52:38:52:44 | jdbcUrl : String | JdbcUrlSSRF.java:52:9:52:13 | props : Properties | provenance | Config | +| JdbcUrlSSRF.java:52:38:52:44 | jdbcUrl : String | JdbcUrlSSRF.java:52:9:52:13 | props [post update] : Properties [] : String | provenance | MaD:291 | +| JdbcUrlSSRF.java:60:26:60:56 | getParameter(...) : String | JdbcUrlSSRF.java:65:27:65:33 | jdbcUrl | provenance | Src:MaD:277 Sink:MaD:257 | +| JdbcUrlSSRF.java:60:26:60:56 | getParameter(...) : String | JdbcUrlSSRF.java:67:75:67:81 | jdbcUrl | provenance | Src:MaD:277 Sink:MaD:258 | +| JdbcUrlSSRF.java:60:26:60:56 | getParameter(...) : String | JdbcUrlSSRF.java:70:75:70:81 | jdbcUrl | provenance | Src:MaD:277 Sink:MaD:260 | +| JdbcUrlSSRF.java:60:26:60:56 | getParameter(...) : String | JdbcUrlSSRF.java:73:75:73:81 | jdbcUrl | provenance | Src:MaD:277 Sink:MaD:259 | +| JdbcUrlSSRF.java:80:26:80:56 | getParameter(...) : String | JdbcUrlSSRF.java:82:21:82:27 | jdbcUrl | provenance | Src:MaD:277 Sink:MaD:235 | +| JdbcUrlSSRF.java:80:26:80:56 | getParameter(...) : String | JdbcUrlSSRF.java:83:21:83:27 | jdbcUrl | provenance | Src:MaD:277 Sink:MaD:236 | +| JdbcUrlSSRF.java:80:26:80:56 | getParameter(...) : String | JdbcUrlSSRF.java:84:21:84:27 | jdbcUrl | provenance | Src:MaD:277 Sink:MaD:237 | +| JdbcUrlSSRF.java:80:26:80:56 | getParameter(...) : String | JdbcUrlSSRF.java:86:19:86:25 | jdbcUrl | provenance | Src:MaD:277 Sink:MaD:238 | +| JdbcUrlSSRF.java:80:26:80:56 | getParameter(...) : String | JdbcUrlSSRF.java:87:19:87:25 | jdbcUrl | provenance | Src:MaD:277 Sink:MaD:239 | +| JdbcUrlSSRF.java:80:26:80:56 | getParameter(...) : String | JdbcUrlSSRF.java:88:19:88:25 | jdbcUrl | provenance | Src:MaD:277 Sink:MaD:240 | +| ReactiveWebClientSSRF.java:15:26:15:52 | getParameter(...) : String | ReactiveWebClientSSRF.java:16:52:16:54 | url | provenance | Src:MaD:277 Sink:MaD:274 | +| ReactiveWebClientSSRF.java:32:26:32:52 | getParameter(...) : String | ReactiveWebClientSSRF.java:35:30:35:32 | url | provenance | Src:MaD:277 Sink:MaD:273 | +| SanitizationTests.java:19:23:19:58 | new URI(...) : URI | SanitizationTests.java:22:52:22:54 | uri | provenance | Sink:MaD:6 | +| SanitizationTests.java:19:23:19:58 | new URI(...) : URI | SanitizationTests.java:22:52:22:54 | uri : URI | provenance | | +| SanitizationTests.java:19:31:19:57 | getParameter(...) : String | SanitizationTests.java:19:23:19:58 | new URI(...) : URI | provenance | Src:MaD:277 Config | +| SanitizationTests.java:19:31:19:57 | getParameter(...) : String | SanitizationTests.java:19:23:19:58 | new URI(...) : URI | provenance | Src:MaD:277 MaD:285 | +| SanitizationTests.java:22:29:22:55 | newBuilder(...) : Builder | SanitizationTests.java:22:29:22:63 | build(...) : HttpRequest | provenance | MaD:283 | +| SanitizationTests.java:22:29:22:63 | build(...) : HttpRequest | SanitizationTests.java:23:25:23:25 | r | provenance | Sink:MaD:4 | +| SanitizationTests.java:22:52:22:54 | uri : URI | SanitizationTests.java:22:29:22:55 | newBuilder(...) : Builder | provenance | MaD:284 | +| SanitizationTests.java:75:33:75:63 | getParameter(...) : String | SanitizationTests.java:76:67:76:76 | unsafeUri3 : String | provenance | Src:MaD:277 | +| SanitizationTests.java:76:36:76:78 | newBuilder(...) : Builder | SanitizationTests.java:76:36:76:86 | build(...) : HttpRequest | provenance | MaD:283 | +| SanitizationTests.java:76:36:76:86 | build(...) : HttpRequest | SanitizationTests.java:77:25:77:32 | unsafer3 | provenance | Sink:MaD:4 | +| SanitizationTests.java:76:59:76:77 | new URI(...) : URI | SanitizationTests.java:76:36:76:78 | newBuilder(...) : Builder | provenance | MaD:284 | +| SanitizationTests.java:76:67:76:76 | unsafeUri3 : String | SanitizationTests.java:76:59:76:77 | new URI(...) | provenance | Config Sink:MaD:6 | +| SanitizationTests.java:76:67:76:76 | unsafeUri3 : String | SanitizationTests.java:76:59:76:77 | new URI(...) | provenance | MaD:285 Sink:MaD:6 | +| SanitizationTests.java:76:67:76:76 | unsafeUri3 : String | SanitizationTests.java:76:59:76:77 | new URI(...) : URI | provenance | Config | +| SanitizationTests.java:76:67:76:76 | unsafeUri3 : String | SanitizationTests.java:76:59:76:77 | new URI(...) : URI | provenance | MaD:285 | +| SanitizationTests.java:79:49:79:79 | getParameter(...) : String | SanitizationTests.java:80:67:80:76 | unsafeUri4 : String | provenance | Src:MaD:277 | +| SanitizationTests.java:80:36:80:78 | newBuilder(...) : Builder | SanitizationTests.java:80:36:80:86 | build(...) : HttpRequest | provenance | MaD:283 | +| SanitizationTests.java:80:36:80:86 | build(...) : HttpRequest | SanitizationTests.java:81:25:81:32 | unsafer4 | provenance | Sink:MaD:4 | +| SanitizationTests.java:80:59:80:77 | new URI(...) : URI | SanitizationTests.java:80:36:80:78 | newBuilder(...) : Builder | provenance | MaD:284 | +| SanitizationTests.java:80:67:80:76 | unsafeUri4 : String | SanitizationTests.java:80:59:80:77 | new URI(...) | provenance | Config Sink:MaD:6 | +| SanitizationTests.java:80:67:80:76 | unsafeUri4 : String | SanitizationTests.java:80:59:80:77 | new URI(...) | provenance | MaD:285 Sink:MaD:6 | +| SanitizationTests.java:80:67:80:76 | unsafeUri4 : String | SanitizationTests.java:80:59:80:77 | new URI(...) : URI | provenance | Config | +| SanitizationTests.java:80:67:80:76 | unsafeUri4 : String | SanitizationTests.java:80:59:80:77 | new URI(...) : URI | provenance | MaD:285 | +| SanitizationTests.java:84:13:84:22 | unsafeUri5 [post update] : StringBuilder | SanitizationTests.java:85:67:85:76 | unsafeUri5 : StringBuilder | provenance | | +| SanitizationTests.java:84:31:84:61 | getParameter(...) : String | SanitizationTests.java:84:13:84:22 | unsafeUri5 [post update] : StringBuilder | provenance | Src:MaD:277 MaD:278 | +| SanitizationTests.java:85:36:85:89 | newBuilder(...) : Builder | SanitizationTests.java:85:36:85:97 | build(...) : HttpRequest | provenance | MaD:283 | +| SanitizationTests.java:85:36:85:97 | build(...) : HttpRequest | SanitizationTests.java:86:25:86:32 | unsafer5 | provenance | Sink:MaD:4 | +| SanitizationTests.java:85:59:85:88 | new URI(...) : URI | SanitizationTests.java:85:36:85:89 | newBuilder(...) : Builder | provenance | MaD:284 | +| SanitizationTests.java:85:67:85:76 | unsafeUri5 : StringBuilder | SanitizationTests.java:85:67:85:87 | toString(...) : String | provenance | MaD:280 | +| SanitizationTests.java:85:67:85:87 | toString(...) : String | SanitizationTests.java:85:59:85:88 | new URI(...) | provenance | Config Sink:MaD:6 | +| SanitizationTests.java:85:67:85:87 | toString(...) : String | SanitizationTests.java:85:59:85:88 | new URI(...) | provenance | MaD:285 Sink:MaD:6 | +| SanitizationTests.java:85:67:85:87 | toString(...) : String | SanitizationTests.java:85:59:85:88 | new URI(...) : URI | provenance | Config | +| SanitizationTests.java:85:67:85:87 | toString(...) : String | SanitizationTests.java:85:59:85:88 | new URI(...) : URI | provenance | MaD:285 | +| SanitizationTests.java:88:40:88:87 | new StringBuilder(...) : StringBuilder | SanitizationTests.java:90:68:90:77 | unafeUri5a : StringBuilder | provenance | | +| SanitizationTests.java:88:58:88:86 | getParameter(...) : String | SanitizationTests.java:88:40:88:87 | new StringBuilder(...) : StringBuilder | provenance | Src:MaD:277 MaD:282 | +| SanitizationTests.java:90:37:90:90 | newBuilder(...) : Builder | SanitizationTests.java:90:37:90:98 | build(...) : HttpRequest | provenance | MaD:283 | +| SanitizationTests.java:90:37:90:98 | build(...) : HttpRequest | SanitizationTests.java:91:25:91:33 | unsafer5a | provenance | Sink:MaD:4 | +| SanitizationTests.java:90:60:90:89 | new URI(...) : URI | SanitizationTests.java:90:37:90:90 | newBuilder(...) : Builder | provenance | MaD:284 | +| SanitizationTests.java:90:68:90:77 | unafeUri5a : StringBuilder | SanitizationTests.java:90:68:90:88 | toString(...) : String | provenance | MaD:280 | +| SanitizationTests.java:90:68:90:88 | toString(...) : String | SanitizationTests.java:90:60:90:89 | new URI(...) | provenance | Config Sink:MaD:6 | +| SanitizationTests.java:90:68:90:88 | toString(...) : String | SanitizationTests.java:90:60:90:89 | new URI(...) | provenance | MaD:285 Sink:MaD:6 | +| SanitizationTests.java:90:68:90:88 | toString(...) : String | SanitizationTests.java:90:60:90:89 | new URI(...) : URI | provenance | Config | +| SanitizationTests.java:90:68:90:88 | toString(...) : String | SanitizationTests.java:90:60:90:89 | new URI(...) : URI | provenance | MaD:285 | +| SanitizationTests.java:93:41:93:105 | append(...) : StringBuilder | SanitizationTests.java:95:68:95:78 | unsafeUri5b : StringBuilder | provenance | | +| SanitizationTests.java:93:42:93:89 | new StringBuilder(...) : StringBuilder | SanitizationTests.java:93:41:93:105 | append(...) : StringBuilder | provenance | MaD:279 | +| SanitizationTests.java:93:60:93:88 | getParameter(...) : String | SanitizationTests.java:93:42:93:89 | new StringBuilder(...) : StringBuilder | provenance | Src:MaD:277 MaD:282 | +| SanitizationTests.java:95:37:95:91 | newBuilder(...) : Builder | SanitizationTests.java:95:37:95:99 | build(...) : HttpRequest | provenance | MaD:283 | +| SanitizationTests.java:95:37:95:99 | build(...) : HttpRequest | SanitizationTests.java:96:25:96:33 | unsafer5b | provenance | Sink:MaD:4 | +| SanitizationTests.java:95:60:95:90 | new URI(...) : URI | SanitizationTests.java:95:37:95:91 | newBuilder(...) : Builder | provenance | MaD:284 | +| SanitizationTests.java:95:68:95:78 | unsafeUri5b : StringBuilder | SanitizationTests.java:95:68:95:89 | toString(...) : String | provenance | MaD:280 | +| SanitizationTests.java:95:68:95:89 | toString(...) : String | SanitizationTests.java:95:60:95:90 | new URI(...) | provenance | Config Sink:MaD:6 | +| SanitizationTests.java:95:68:95:89 | toString(...) : String | SanitizationTests.java:95:60:95:90 | new URI(...) | provenance | MaD:285 Sink:MaD:6 | +| SanitizationTests.java:95:68:95:89 | toString(...) : String | SanitizationTests.java:95:60:95:90 | new URI(...) : URI | provenance | Config | +| SanitizationTests.java:95:68:95:89 | toString(...) : String | SanitizationTests.java:95:60:95:90 | new URI(...) : URI | provenance | MaD:285 | +| SanitizationTests.java:98:41:98:106 | append(...) : StringBuilder | SanitizationTests.java:100:68:100:78 | unsafeUri5c : StringBuilder | provenance | | +| SanitizationTests.java:98:77:98:105 | getParameter(...) : String | SanitizationTests.java:98:41:98:106 | append(...) : StringBuilder | provenance | Src:MaD:277 MaD:278+MaD:279 | +| SanitizationTests.java:100:37:100:91 | newBuilder(...) : Builder | SanitizationTests.java:100:37:100:99 | build(...) : HttpRequest | provenance | MaD:283 | +| SanitizationTests.java:100:37:100:99 | build(...) : HttpRequest | SanitizationTests.java:101:25:101:33 | unsafer5c | provenance | Sink:MaD:4 | +| SanitizationTests.java:100:60:100:90 | new URI(...) : URI | SanitizationTests.java:100:37:100:91 | newBuilder(...) : Builder | provenance | MaD:284 | +| SanitizationTests.java:100:68:100:78 | unsafeUri5c : StringBuilder | SanitizationTests.java:100:68:100:89 | toString(...) : String | provenance | MaD:280 | +| SanitizationTests.java:100:68:100:89 | toString(...) : String | SanitizationTests.java:100:60:100:90 | new URI(...) | provenance | Config Sink:MaD:6 | +| SanitizationTests.java:100:68:100:89 | toString(...) : String | SanitizationTests.java:100:60:100:90 | new URI(...) | provenance | MaD:285 Sink:MaD:6 | +| SanitizationTests.java:100:68:100:89 | toString(...) : String | SanitizationTests.java:100:60:100:90 | new URI(...) : URI | provenance | Config | +| SanitizationTests.java:100:68:100:89 | toString(...) : String | SanitizationTests.java:100:60:100:90 | new URI(...) : URI | provenance | MaD:285 | +| SanitizationTests.java:103:33:103:104 | format(...) : String | SanitizationTests.java:104:67:104:76 | unsafeUri6 : String | provenance | | +| SanitizationTests.java:103:33:103:104 | new ..[] { .. } : Object[] [[]] : String | SanitizationTests.java:103:33:103:104 | format(...) : String | provenance | MaD:281 | +| SanitizationTests.java:103:73:103:103 | getParameter(...) : String | SanitizationTests.java:103:33:103:104 | new ..[] { .. } : Object[] [[]] : String | provenance | Src:MaD:277 | +| SanitizationTests.java:104:36:104:78 | newBuilder(...) : Builder | SanitizationTests.java:104:36:104:86 | build(...) : HttpRequest | provenance | MaD:283 | +| SanitizationTests.java:104:36:104:86 | build(...) : HttpRequest | SanitizationTests.java:105:25:105:32 | unsafer6 | provenance | Sink:MaD:4 | +| SanitizationTests.java:104:59:104:77 | new URI(...) : URI | SanitizationTests.java:104:36:104:78 | newBuilder(...) : Builder | provenance | MaD:284 | +| SanitizationTests.java:104:67:104:76 | unsafeUri6 : String | SanitizationTests.java:104:59:104:77 | new URI(...) | provenance | Config Sink:MaD:6 | +| SanitizationTests.java:104:67:104:76 | unsafeUri6 : String | SanitizationTests.java:104:59:104:77 | new URI(...) | provenance | MaD:285 Sink:MaD:6 | +| SanitizationTests.java:104:67:104:76 | unsafeUri6 : String | SanitizationTests.java:104:59:104:77 | new URI(...) : URI | provenance | Config | +| SanitizationTests.java:104:67:104:76 | unsafeUri6 : String | SanitizationTests.java:104:59:104:77 | new URI(...) : URI | provenance | MaD:285 | +| SanitizationTests.java:107:33:107:110 | format(...) : String | SanitizationTests.java:108:67:108:76 | unsafeUri7 : String | provenance | | +| SanitizationTests.java:107:33:107:110 | new ..[] { .. } : Object[] [[]] : String | SanitizationTests.java:107:33:107:110 | format(...) : String | provenance | MaD:281 | +| SanitizationTests.java:107:56:107:86 | getParameter(...) : String | SanitizationTests.java:107:33:107:110 | new ..[] { .. } : Object[] [[]] : String | provenance | Src:MaD:277 | +| SanitizationTests.java:108:36:108:78 | newBuilder(...) : Builder | SanitizationTests.java:108:36:108:86 | build(...) : HttpRequest | provenance | MaD:283 | +| SanitizationTests.java:108:36:108:86 | build(...) : HttpRequest | SanitizationTests.java:109:25:109:32 | unsafer7 | provenance | Sink:MaD:4 | +| SanitizationTests.java:108:59:108:77 | new URI(...) : URI | SanitizationTests.java:108:36:108:78 | newBuilder(...) : Builder | provenance | MaD:284 | +| SanitizationTests.java:108:67:108:76 | unsafeUri7 : String | SanitizationTests.java:108:59:108:77 | new URI(...) | provenance | Config Sink:MaD:6 | +| SanitizationTests.java:108:67:108:76 | unsafeUri7 : String | SanitizationTests.java:108:59:108:77 | new URI(...) | provenance | MaD:285 Sink:MaD:6 | +| SanitizationTests.java:108:67:108:76 | unsafeUri7 : String | SanitizationTests.java:108:59:108:77 | new URI(...) : URI | provenance | Config | +| SanitizationTests.java:108:67:108:76 | unsafeUri7 : String | SanitizationTests.java:108:59:108:77 | new URI(...) : URI | provenance | MaD:285 | +| SanitizationTests.java:111:33:111:110 | format(...) : String | SanitizationTests.java:112:67:112:76 | unsafeUri8 : String | provenance | | +| SanitizationTests.java:111:33:111:110 | new ..[] { .. } : Object[] [[]] : String | SanitizationTests.java:111:33:111:110 | format(...) : String | provenance | MaD:281 | +| SanitizationTests.java:111:55:111:85 | getParameter(...) : String | SanitizationTests.java:111:33:111:110 | new ..[] { .. } : Object[] [[]] : String | provenance | Src:MaD:277 | +| SanitizationTests.java:112:36:112:78 | newBuilder(...) : Builder | SanitizationTests.java:112:36:112:86 | build(...) : HttpRequest | provenance | MaD:283 | +| SanitizationTests.java:112:36:112:86 | build(...) : HttpRequest | SanitizationTests.java:113:25:113:32 | unsafer8 | provenance | Sink:MaD:4 | +| SanitizationTests.java:112:59:112:77 | new URI(...) : URI | SanitizationTests.java:112:36:112:78 | newBuilder(...) : Builder | provenance | MaD:284 | +| SanitizationTests.java:112:67:112:76 | unsafeUri8 : String | SanitizationTests.java:112:59:112:77 | new URI(...) | provenance | Config Sink:MaD:6 | +| SanitizationTests.java:112:67:112:76 | unsafeUri8 : String | SanitizationTests.java:112:59:112:77 | new URI(...) | provenance | MaD:285 Sink:MaD:6 | +| SanitizationTests.java:112:67:112:76 | unsafeUri8 : String | SanitizationTests.java:112:59:112:77 | new URI(...) : URI | provenance | Config | +| SanitizationTests.java:112:67:112:76 | unsafeUri8 : String | SanitizationTests.java:112:59:112:77 | new URI(...) : URI | provenance | MaD:285 | +| SanitizationTests.java:115:33:115:63 | getParameter(...) : String | SanitizationTests.java:116:67:116:76 | unsafeUri9 : String | provenance | Src:MaD:277 | +| SanitizationTests.java:116:36:116:78 | newBuilder(...) : Builder | SanitizationTests.java:116:36:116:86 | build(...) : HttpRequest | provenance | MaD:283 | +| SanitizationTests.java:116:36:116:86 | build(...) : HttpRequest | SanitizationTests.java:117:25:117:32 | unsafer9 | provenance | Sink:MaD:4 | +| SanitizationTests.java:116:59:116:77 | new URI(...) : URI | SanitizationTests.java:116:36:116:78 | newBuilder(...) : Builder | provenance | MaD:284 | +| SanitizationTests.java:116:67:116:76 | unsafeUri9 : String | SanitizationTests.java:116:59:116:77 | new URI(...) | provenance | Config Sink:MaD:6 | +| SanitizationTests.java:116:67:116:76 | unsafeUri9 : String | SanitizationTests.java:116:59:116:77 | new URI(...) | provenance | MaD:285 Sink:MaD:6 | +| SanitizationTests.java:116:67:116:76 | unsafeUri9 : String | SanitizationTests.java:116:59:116:77 | new URI(...) : URI | provenance | Config | +| SanitizationTests.java:116:67:116:76 | unsafeUri9 : String | SanitizationTests.java:116:59:116:77 | new URI(...) : URI | provenance | MaD:285 | +| SanitizationTests.java:119:34:119:126 | format(...) : String | SanitizationTests.java:120:68:120:78 | unsafeUri10 : String | provenance | | +| SanitizationTests.java:119:34:119:126 | new ..[] { .. } : Object[] [[]] : String | SanitizationTests.java:119:34:119:126 | format(...) : String | provenance | MaD:281 | +| SanitizationTests.java:119:94:119:125 | getParameter(...) : String | SanitizationTests.java:119:34:119:126 | new ..[] { .. } : Object[] [[]] : String | provenance | Src:MaD:277 | +| SanitizationTests.java:120:37:120:80 | newBuilder(...) : Builder | SanitizationTests.java:120:37:120:88 | build(...) : HttpRequest | provenance | MaD:283 | +| SanitizationTests.java:120:37:120:88 | build(...) : HttpRequest | SanitizationTests.java:121:25:121:33 | unsafer10 | provenance | Sink:MaD:4 | +| SanitizationTests.java:120:60:120:79 | new URI(...) : URI | SanitizationTests.java:120:37:120:80 | newBuilder(...) : Builder | provenance | MaD:284 | +| SanitizationTests.java:120:68:120:78 | unsafeUri10 : String | SanitizationTests.java:120:60:120:79 | new URI(...) | provenance | Config Sink:MaD:6 | +| SanitizationTests.java:120:68:120:78 | unsafeUri10 : String | SanitizationTests.java:120:60:120:79 | new URI(...) | provenance | MaD:285 Sink:MaD:6 | +| SanitizationTests.java:120:68:120:78 | unsafeUri10 : String | SanitizationTests.java:120:60:120:79 | new URI(...) : URI | provenance | Config | +| SanitizationTests.java:120:68:120:78 | unsafeUri10 : String | SanitizationTests.java:120:60:120:79 | new URI(...) : URI | provenance | MaD:285 | +| SpringSSRF.java:28:33:28:60 | getParameter(...) : String | SpringSSRF.java:32:39:32:59 | ... + ... | provenance | Src:MaD:277 Sink:MaD:264 | +| SpringSSRF.java:28:33:28:60 | getParameter(...) : String | SpringSSRF.java:33:35:33:48 | fooResourceUrl | provenance | Src:MaD:277 Sink:MaD:262 | +| SpringSSRF.java:28:33:28:60 | getParameter(...) : String | SpringSSRF.java:34:34:34:47 | fooResourceUrl | provenance | Src:MaD:277 Sink:MaD:263 | +| SpringSSRF.java:28:33:28:60 | getParameter(...) : String | SpringSSRF.java:35:39:35:52 | fooResourceUrl | provenance | Src:MaD:277 Sink:MaD:265 | +| SpringSSRF.java:28:33:28:60 | getParameter(...) : String | SpringSSRF.java:36:69:36:82 | fooResourceUrl | provenance | Src:MaD:277 | +| SpringSSRF.java:28:33:28:60 | getParameter(...) : String | SpringSSRF.java:37:73:37:86 | fooResourceUrl | provenance | Src:MaD:277 | +| SpringSSRF.java:28:33:28:60 | getParameter(...) : String | SpringSSRF.java:40:83:40:96 | fooResourceUrl : String | provenance | Src:MaD:277 | +| SpringSSRF.java:28:33:28:60 | getParameter(...) : String | SpringSSRF.java:42:105:42:118 | fooResourceUrl : String | provenance | Src:MaD:277 | +| SpringSSRF.java:28:33:28:60 | getParameter(...) : String | SpringSSRF.java:44:41:44:54 | fooResourceUrl | provenance | Src:MaD:277 Sink:MaD:268 | +| SpringSSRF.java:28:33:28:60 | getParameter(...) : String | SpringSSRF.java:45:48:45:61 | fooResourceUrl : String | provenance | Src:MaD:277 | +| SpringSSRF.java:40:83:40:96 | fooResourceUrl : String | SpringSSRF.java:40:69:40:97 | of(...) | provenance | MaD:289 | +| SpringSSRF.java:42:105:42:118 | fooResourceUrl : String | SpringSSRF.java:42:69:42:119 | of(...) | provenance | MaD:290 | +| SpringSSRF.java:45:48:45:61 | fooResourceUrl : String | SpringSSRF.java:45:40:45:62 | new URI(...) | provenance | Config Sink:MaD:269 | +| SpringSSRF.java:45:48:45:61 | fooResourceUrl : String | SpringSSRF.java:45:40:45:62 | new URI(...) | provenance | MaD:285 Sink:MaD:269 | +| SpringSSRF.java:45:48:45:61 | fooResourceUrl : String | SpringSSRF.java:46:42:46:55 | fooResourceUrl | provenance | Sink:MaD:270 | +| SpringSSRF.java:45:48:45:61 | fooResourceUrl : String | SpringSSRF.java:47:40:47:53 | fooResourceUrl | provenance | Sink:MaD:271 | +| SpringSSRF.java:45:48:45:61 | fooResourceUrl : String | SpringSSRF.java:48:30:48:43 | fooResourceUrl | provenance | Sink:MaD:272 | +| SpringSSRF.java:45:48:45:61 | fooResourceUrl : String | SpringSSRF.java:49:33:49:46 | fooResourceUrl | provenance | Sink:MaD:261 | +| SpringSSRF.java:45:48:45:61 | fooResourceUrl : String | SpringSSRF.java:50:41:50:54 | fooResourceUrl | provenance | Sink:MaD:266 | +| SpringSSRF.java:45:48:45:61 | fooResourceUrl : String | SpringSSRF.java:51:42:51:55 | fooResourceUrl | provenance | Sink:MaD:267 | +| SpringSSRF.java:45:48:45:61 | fooResourceUrl : String | SpringSSRF.java:54:35:54:48 | fooResourceUrl : String | provenance | | +| SpringSSRF.java:54:27:54:49 | new URI(...) : URI | SpringSSRF.java:56:44:56:46 | uri | provenance | Sink:MaD:255 | +| SpringSSRF.java:54:27:54:49 | new URI(...) : URI | SpringSSRF.java:58:35:58:37 | uri | provenance | Sink:MaD:250 | +| SpringSSRF.java:54:27:54:49 | new URI(...) : URI | SpringSSRF.java:59:35:59:37 | uri | provenance | Sink:MaD:256 | +| SpringSSRF.java:54:27:54:49 | new URI(...) : URI | SpringSSRF.java:60:38:60:40 | uri | provenance | Sink:MaD:249 | +| SpringSSRF.java:54:27:54:49 | new URI(...) : URI | SpringSSRF.java:61:39:61:41 | uri | provenance | Sink:MaD:253 | +| SpringSSRF.java:54:27:54:49 | new URI(...) : URI | SpringSSRF.java:62:37:62:39 | uri | provenance | Sink:MaD:254 | +| SpringSSRF.java:54:27:54:49 | new URI(...) : URI | SpringSSRF.java:63:36:63:38 | uri | provenance | Sink:MaD:251 | +| SpringSSRF.java:54:27:54:49 | new URI(...) : URI | SpringSSRF.java:64:44:64:46 | uri | provenance | Sink:MaD:252 | +| SpringSSRF.java:54:35:54:48 | fooResourceUrl : String | SpringSSRF.java:54:27:54:49 | new URI(...) : URI | provenance | Config | +| SpringSSRF.java:54:35:54:48 | fooResourceUrl : String | SpringSSRF.java:54:27:54:49 | new URI(...) : URI | provenance | MaD:285 | +| SpringSSRF.java:54:35:54:48 | fooResourceUrl : String | SpringSSRF.java:67:35:67:48 | fooResourceUrl : String | provenance | | +| SpringSSRF.java:67:27:67:49 | new URI(...) : URI | SpringSSRF.java:70:49:70:51 | uri | provenance | Sink:MaD:243 | +| SpringSSRF.java:67:27:67:49 | new URI(...) : URI | SpringSSRF.java:71:58:71:60 | uri | provenance | Sink:MaD:244 | +| SpringSSRF.java:67:27:67:49 | new URI(...) : URI | SpringSSRF.java:72:57:72:59 | uri | provenance | Sink:MaD:245 | +| SpringSSRF.java:67:27:67:49 | new URI(...) : URI | SpringSSRF.java:73:66:73:68 | uri | provenance | Sink:MaD:247 | +| SpringSSRF.java:67:27:67:49 | new URI(...) : URI | SpringSSRF.java:74:57:74:59 | uri | provenance | Sink:MaD:246 | +| SpringSSRF.java:67:27:67:49 | new URI(...) : URI | SpringSSRF.java:75:66:75:68 | uri | provenance | Sink:MaD:248 | +| SpringSSRF.java:67:35:67:48 | fooResourceUrl : String | SpringSSRF.java:67:27:67:49 | new URI(...) : URI | provenance | Config | +| SpringSSRF.java:67:35:67:48 | fooResourceUrl : String | SpringSSRF.java:67:27:67:49 | new URI(...) : URI | provenance | MaD:285 | +| URLClassLoaderSSRF.java:16:26:16:52 | getParameter(...) : String | URLClassLoaderSSRF.java:17:31:17:33 | url : String | provenance | Src:MaD:277 | +| URLClassLoaderSSRF.java:17:23:17:34 | new URI(...) : URI | URLClassLoaderSSRF.java:18:74:18:76 | uri : URI | provenance | | +| URLClassLoaderSSRF.java:17:31:17:33 | url : String | URLClassLoaderSSRF.java:17:23:17:34 | new URI(...) : URI | provenance | Config | +| URLClassLoaderSSRF.java:17:31:17:33 | url : String | URLClassLoaderSSRF.java:17:23:17:34 | new URI(...) : URI | provenance | MaD:285 | +| URLClassLoaderSSRF.java:18:64:18:85 | {...} : URL[] [[]] : URL | URLClassLoaderSSRF.java:18:64:18:85 | new URL[] | provenance | Sink:MaD:13 | +| URLClassLoaderSSRF.java:18:64:18:85 | {...} : URL[] [[]] : URL | URLClassLoaderSSRF.java:18:64:18:85 | new URL[] | provenance | Sink:MaD:13 | +| URLClassLoaderSSRF.java:18:74:18:76 | uri : URI | URLClassLoaderSSRF.java:18:74:18:84 | toURL(...) : URL | provenance | MaD:287 | +| URLClassLoaderSSRF.java:18:74:18:84 | toURL(...) : URL | URLClassLoaderSSRF.java:18:64:18:85 | {...} : URL[] [[]] : URL | provenance | | +| URLClassLoaderSSRF.java:28:26:28:52 | getParameter(...) : String | URLClassLoaderSSRF.java:29:31:29:33 | url : String | provenance | Src:MaD:277 | +| URLClassLoaderSSRF.java:29:23:29:34 | new URI(...) : URI | URLClassLoaderSSRF.java:30:74:30:76 | uri : URI | provenance | | +| URLClassLoaderSSRF.java:29:31:29:33 | url : String | URLClassLoaderSSRF.java:29:23:29:34 | new URI(...) : URI | provenance | Config | +| URLClassLoaderSSRF.java:29:31:29:33 | url : String | URLClassLoaderSSRF.java:29:23:29:34 | new URI(...) : URI | provenance | MaD:285 | +| URLClassLoaderSSRF.java:30:64:30:85 | {...} : URL[] [[]] : URL | URLClassLoaderSSRF.java:30:64:30:85 | new URL[] | provenance | Sink:MaD:14 | +| URLClassLoaderSSRF.java:30:64:30:85 | {...} : URL[] [[]] : URL | URLClassLoaderSSRF.java:30:64:30:85 | new URL[] | provenance | Sink:MaD:14 | +| URLClassLoaderSSRF.java:30:74:30:76 | uri : URI | URLClassLoaderSSRF.java:30:74:30:84 | toURL(...) : URL | provenance | MaD:287 | +| URLClassLoaderSSRF.java:30:74:30:84 | toURL(...) : URL | URLClassLoaderSSRF.java:30:64:30:85 | {...} : URL[] [[]] : URL | provenance | | +| URLClassLoaderSSRF.java:40:26:40:52 | getParameter(...) : String | URLClassLoaderSSRF.java:41:31:41:33 | url : String | provenance | Src:MaD:277 | +| URLClassLoaderSSRF.java:41:23:41:34 | new URI(...) : URI | URLClassLoaderSSRF.java:44:74:44:76 | uri : URI | provenance | | +| URLClassLoaderSSRF.java:41:31:41:33 | url : String | URLClassLoaderSSRF.java:41:23:41:34 | new URI(...) : URI | provenance | Config | +| URLClassLoaderSSRF.java:41:31:41:33 | url : String | URLClassLoaderSSRF.java:41:23:41:34 | new URI(...) : URI | provenance | MaD:285 | +| URLClassLoaderSSRF.java:44:64:44:85 | {...} : URL[] [[]] : URL | URLClassLoaderSSRF.java:44:64:44:85 | new URL[] | provenance | Sink:MaD:15 | +| URLClassLoaderSSRF.java:44:64:44:85 | {...} : URL[] [[]] : URL | URLClassLoaderSSRF.java:44:64:44:85 | new URL[] | provenance | Sink:MaD:15 | +| URLClassLoaderSSRF.java:44:74:44:76 | uri : URI | URLClassLoaderSSRF.java:44:74:44:84 | toURL(...) : URL | provenance | MaD:287 | +| URLClassLoaderSSRF.java:44:74:44:84 | toURL(...) : URL | URLClassLoaderSSRF.java:44:64:44:85 | {...} : URL[] [[]] : URL | provenance | | +| URLClassLoaderSSRF.java:54:26:54:52 | getParameter(...) : String | URLClassLoaderSSRF.java:55:31:55:33 | url : String | provenance | Src:MaD:277 | +| URLClassLoaderSSRF.java:55:23:55:34 | new URI(...) : URI | URLClassLoaderSSRF.java:56:82:56:84 | uri : URI | provenance | | +| URLClassLoaderSSRF.java:55:31:55:33 | url : String | URLClassLoaderSSRF.java:55:23:55:34 | new URI(...) : URI | provenance | Config | +| URLClassLoaderSSRF.java:55:31:55:33 | url : String | URLClassLoaderSSRF.java:55:23:55:34 | new URI(...) : URI | provenance | MaD:285 | +| URLClassLoaderSSRF.java:56:72:56:93 | {...} : URL[] [[]] : URL | URLClassLoaderSSRF.java:56:72:56:93 | new URL[] | provenance | Sink:MaD:16 | +| URLClassLoaderSSRF.java:56:82:56:84 | uri : URI | URLClassLoaderSSRF.java:56:82:56:92 | toURL(...) : URL | provenance | MaD:287 | +| URLClassLoaderSSRF.java:56:82:56:92 | toURL(...) : URL | URLClassLoaderSSRF.java:56:72:56:93 | {...} : URL[] [[]] : URL | provenance | | +| URLClassLoaderSSRF.java:66:26:66:52 | getParameter(...) : String | URLClassLoaderSSRF.java:67:31:67:33 | url : String | provenance | Src:MaD:277 | +| URLClassLoaderSSRF.java:67:23:67:34 | new URI(...) : URI | URLClassLoaderSSRF.java:70:31:70:33 | uri : URI | provenance | | +| URLClassLoaderSSRF.java:67:31:67:33 | url : String | URLClassLoaderSSRF.java:67:23:67:34 | new URI(...) : URI | provenance | Config | +| URLClassLoaderSSRF.java:67:31:67:33 | url : String | URLClassLoaderSSRF.java:67:23:67:34 | new URI(...) : URI | provenance | MaD:285 | +| URLClassLoaderSSRF.java:70:21:70:42 | {...} : URL[] [[]] : URL | URLClassLoaderSSRF.java:70:21:70:42 | new URL[] | provenance | Sink:MaD:11 | +| URLClassLoaderSSRF.java:70:21:70:42 | {...} : URL[] [[]] : URL | URLClassLoaderSSRF.java:70:21:70:42 | new URL[] | provenance | Sink:MaD:11 | +| URLClassLoaderSSRF.java:70:31:70:33 | uri : URI | URLClassLoaderSSRF.java:70:31:70:41 | toURL(...) : URL | provenance | MaD:287 | +| URLClassLoaderSSRF.java:70:31:70:41 | toURL(...) : URL | URLClassLoaderSSRF.java:70:21:70:42 | {...} : URL[] [[]] : URL | provenance | | +| URLClassLoaderSSRF.java:83:26:83:52 | getParameter(...) : String | URLClassLoaderSSRF.java:84:31:84:33 | url : String | provenance | Src:MaD:277 | +| URLClassLoaderSSRF.java:84:23:84:34 | new URI(...) : URI | URLClassLoaderSSRF.java:89:31:89:33 | uri : URI | provenance | | +| URLClassLoaderSSRF.java:84:31:84:33 | url : String | URLClassLoaderSSRF.java:84:23:84:34 | new URI(...) : URI | provenance | Config | +| URLClassLoaderSSRF.java:84:31:84:33 | url : String | URLClassLoaderSSRF.java:84:23:84:34 | new URI(...) : URI | provenance | MaD:285 | +| URLClassLoaderSSRF.java:89:21:89:42 | {...} : URL[] [[]] : URL | URLClassLoaderSSRF.java:89:21:89:42 | new URL[] | provenance | Sink:MaD:12 | +| URLClassLoaderSSRF.java:89:21:89:42 | {...} : URL[] [[]] : URL | URLClassLoaderSSRF.java:89:21:89:42 | new URL[] | provenance | Sink:MaD:12 | +| URLClassLoaderSSRF.java:89:31:89:33 | uri : URI | URLClassLoaderSSRF.java:89:31:89:41 | toURL(...) : URL | provenance | MaD:287 | +| URLClassLoaderSSRF.java:89:31:89:41 | toURL(...) : URL | URLClassLoaderSSRF.java:89:21:89:42 | {...} : URL[] [[]] : URL | provenance | | +| mad/Test.java:26:16:26:41 | getParameter(...) : String | mad/Test.java:31:40:31:47 | source(...) : String | provenance | Src:MaD:277 | +| mad/Test.java:26:16:26:41 | getParameter(...) : String | mad/Test.java:36:16:36:23 | source(...) : String | provenance | Src:MaD:277 | +| mad/Test.java:26:16:26:41 | getParameter(...) : String | mad/Test.java:38:36:38:43 | source(...) : String | provenance | Src:MaD:277 | +| mad/Test.java:26:16:26:41 | getParameter(...) : String | mad/Test.java:40:16:40:23 | source(...) : String | provenance | Src:MaD:277 | +| mad/Test.java:26:16:26:41 | getParameter(...) : String | mad/Test.java:45:40:45:47 | source(...) : String | provenance | Src:MaD:277 | +| mad/Test.java:26:16:26:41 | getParameter(...) : String | mad/Test.java:47:40:47:47 | source(...) : String | provenance | Src:MaD:277 | +| mad/Test.java:26:16:26:41 | getParameter(...) : String | mad/Test.java:49:36:49:43 | source(...) : String | provenance | Src:MaD:277 | +| mad/Test.java:26:16:26:41 | getParameter(...) : String | mad/Test.java:51:36:51:43 | source(...) : String | provenance | Src:MaD:277 | +| mad/Test.java:26:16:26:41 | getParameter(...) : String | mad/Test.java:53:36:53:43 | source(...) : String | provenance | Src:MaD:277 | +| mad/Test.java:26:16:26:41 | getParameter(...) : String | mad/Test.java:55:44:55:51 | source(...) : String | provenance | Src:MaD:277 | +| mad/Test.java:26:16:26:41 | getParameter(...) : String | mad/Test.java:57:38:57:45 | source(...) : String | provenance | Src:MaD:277 | +| mad/Test.java:26:16:26:41 | getParameter(...) : String | mad/Test.java:59:44:59:51 | source(...) : String | provenance | Src:MaD:277 | +| mad/Test.java:26:16:26:41 | getParameter(...) : String | mad/Test.java:61:53:61:60 | source(...) : String | provenance | Src:MaD:277 | +| mad/Test.java:26:16:26:41 | getParameter(...) : String | mad/Test.java:63:32:63:39 | source(...) : String | provenance | Src:MaD:277 | +| mad/Test.java:26:16:26:41 | getParameter(...) : String | mad/Test.java:65:44:65:51 | source(...) : String | provenance | Src:MaD:277 | +| mad/Test.java:26:16:26:41 | getParameter(...) : String | mad/Test.java:67:32:67:39 | source(...) : String | provenance | Src:MaD:277 | +| mad/Test.java:26:16:26:41 | getParameter(...) : String | mad/Test.java:69:33:69:40 | source(...) : String | provenance | Src:MaD:277 | +| mad/Test.java:26:16:26:41 | getParameter(...) : String | mad/Test.java:71:53:71:60 | source(...) : String | provenance | Src:MaD:277 | +| mad/Test.java:26:16:26:41 | getParameter(...) : String | mad/Test.java:74:58:74:65 | source(...) : String | provenance | Src:MaD:277 | +| mad/Test.java:26:16:26:41 | getParameter(...) : String | mad/Test.java:76:62:76:69 | source(...) : String | provenance | Src:MaD:277 | +| mad/Test.java:26:16:26:41 | getParameter(...) : String | mad/Test.java:78:52:78:59 | source(...) : String | provenance | Src:MaD:277 | +| mad/Test.java:26:16:26:41 | getParameter(...) : String | mad/Test.java:80:34:80:41 | source(...) : String | provenance | Src:MaD:277 | +| mad/Test.java:26:16:26:41 | getParameter(...) : String | mad/Test.java:82:40:82:47 | source(...) : String | provenance | Src:MaD:277 | +| mad/Test.java:26:16:26:41 | getParameter(...) : String | mad/Test.java:84:40:84:47 | source(...) : String | provenance | Src:MaD:277 | +| mad/Test.java:26:16:26:41 | getParameter(...) : String | mad/Test.java:86:50:86:57 | source(...) : String | provenance | Src:MaD:277 | +| mad/Test.java:26:16:26:41 | getParameter(...) : String | mad/Test.java:92:33:92:40 | source(...) : String | provenance | Src:MaD:277 | +| mad/Test.java:26:16:26:41 | getParameter(...) : String | mad/Test.java:97:35:97:42 | source(...) : String | provenance | Src:MaD:277 | +| mad/Test.java:26:16:26:41 | getParameter(...) : String | mad/Test.java:102:32:102:39 | source(...) : String | provenance | Src:MaD:277 | +| mad/Test.java:26:16:26:41 | getParameter(...) : String | mad/Test.java:107:24:107:31 | source(...) : String | provenance | Src:MaD:277 | +| mad/Test.java:26:16:26:41 | getParameter(...) : String | mad/Test.java:112:24:112:31 | source(...) : String | provenance | Src:MaD:277 | +| mad/Test.java:31:40:31:47 | source(...) : String | mad/Test.java:31:24:31:47 | (...)... | provenance | Sink:MaD:7 | +| mad/Test.java:36:16:36:23 | source(...) : String | mad/Test.java:36:10:36:23 | (...)... | provenance | Sink:MaD:9 | +| mad/Test.java:38:36:38:43 | source(...) : String | mad/Test.java:38:28:38:43 | (...)... | provenance | Sink:MaD:8 | +| mad/Test.java:40:16:40:23 | source(...) : String | mad/Test.java:40:10:40:23 | (...)... | provenance | Sink:MaD:10 | +| mad/Test.java:45:40:45:47 | source(...) : String | mad/Test.java:45:32:45:47 | (...)... | provenance | Sink:MaD:11 | +| mad/Test.java:45:40:45:47 | source(...) : String | mad/Test.java:45:32:45:47 | (...)... | provenance | Sink:MaD:11 | +| mad/Test.java:47:40:47:47 | source(...) : String | mad/Test.java:47:32:47:47 | (...)... | provenance | Sink:MaD:12 | +| mad/Test.java:47:40:47:47 | source(...) : String | mad/Test.java:47:32:47:47 | (...)... | provenance | Sink:MaD:12 | +| mad/Test.java:49:36:49:43 | source(...) : String | mad/Test.java:49:28:49:43 | (...)... | provenance | Sink:MaD:13 | +| mad/Test.java:49:36:49:43 | source(...) : String | mad/Test.java:49:28:49:43 | (...)... | provenance | Sink:MaD:13 | +| mad/Test.java:51:36:51:43 | source(...) : String | mad/Test.java:51:28:51:43 | (...)... | provenance | Sink:MaD:14 | +| mad/Test.java:51:36:51:43 | source(...) : String | mad/Test.java:51:28:51:43 | (...)... | provenance | Sink:MaD:14 | +| mad/Test.java:53:36:53:43 | source(...) : String | mad/Test.java:53:28:53:43 | (...)... | provenance | Sink:MaD:15 | +| mad/Test.java:53:36:53:43 | source(...) : String | mad/Test.java:53:28:53:43 | (...)... | provenance | Sink:MaD:15 | +| mad/Test.java:55:44:55:51 | source(...) : String | mad/Test.java:55:36:55:51 | (...)... | provenance | Sink:MaD:16 | +| mad/Test.java:57:38:57:45 | source(...) : String | mad/Test.java:57:32:57:45 | (...)... | provenance | Sink:MaD:25 | +| mad/Test.java:59:44:59:51 | source(...) : String | mad/Test.java:59:38:59:51 | (...)... | provenance | Sink:MaD:26 | +| mad/Test.java:61:53:61:60 | source(...) : String | mad/Test.java:61:47:61:60 | (...)... | provenance | Sink:MaD:24 | +| mad/Test.java:63:32:63:39 | source(...) : String | mad/Test.java:63:26:63:39 | (...)... | provenance | Sink:MaD:28 | +| mad/Test.java:65:44:65:51 | source(...) : String | mad/Test.java:65:38:65:51 | (...)... | provenance | Sink:MaD:29 | +| mad/Test.java:67:32:67:39 | source(...) : String | mad/Test.java:67:26:67:39 | (...)... | provenance | Sink:MaD:27 | +| mad/Test.java:69:33:69:40 | source(...) : String | mad/Test.java:69:27:69:40 | (...)... | provenance | Sink:MaD:22 | +| mad/Test.java:71:53:71:60 | source(...) : String | mad/Test.java:71:47:71:60 | (...)... | provenance | Sink:MaD:30 | +| mad/Test.java:74:58:74:65 | source(...) : String | mad/Test.java:74:50:74:65 | (...)... | provenance | Sink:MaD:32 | +| mad/Test.java:76:62:76:69 | source(...) : String | mad/Test.java:76:50:76:69 | (...)... | provenance | Sink:MaD:31 | +| mad/Test.java:78:52:78:59 | source(...) : String | mad/Test.java:78:43:78:59 | (...)... | provenance | Sink:MaD:33 | +| mad/Test.java:80:34:80:41 | source(...) : String | mad/Test.java:80:25:80:41 | (...)... | provenance | Sink:MaD:34 | +| mad/Test.java:82:40:82:47 | source(...) : String | mad/Test.java:82:31:82:47 | (...)... | provenance | Sink:MaD:35 | +| mad/Test.java:84:40:84:47 | source(...) : String | mad/Test.java:84:31:84:47 | (...)... | provenance | Sink:MaD:36 | +| mad/Test.java:86:50:86:57 | source(...) : String | mad/Test.java:86:41:86:57 | (...)... | provenance | Sink:MaD:37 | +| mad/Test.java:92:33:92:40 | source(...) : String | mad/Test.java:92:24:92:40 | (...)... | provenance | Sink:MaD:21 | +| mad/Test.java:97:35:97:42 | source(...) : String | mad/Test.java:97:29:97:42 | (...)... | provenance | Sink:MaD:234 | +| mad/Test.java:102:32:102:39 | source(...) : String | mad/Test.java:102:26:102:39 | (...)... | provenance | Sink:MaD:241 | +| mad/Test.java:107:24:107:31 | source(...) : String | mad/Test.java:107:15:107:31 | (...)... | provenance | Sink:MaD:276 | +| mad/Test.java:112:24:112:31 | source(...) : String | mad/Test.java:112:15:112:31 | (...)... | provenance | Sink:MaD:275 | +models +| 1 | Sink: com.zaxxer.hikari; HikariConfig; false; HikariConfig; (Properties); ; Argument[0]; request-forgery; manual | +| 2 | Sink: com.zaxxer.hikari; HikariConfig; false; setJdbcUrl; (String); ; Argument[0]; request-forgery; manual | +| 3 | Sink: jakarta.ws.rs.client; Client; true; target; ; ; Argument[0]; request-forgery; manual | +| 4 | Sink: java.net.http; HttpClient; true; send; (HttpRequest,HttpResponse$BodyHandler); ; Argument[0]; request-forgery; ai-manual | +| 5 | Sink: java.net.http; HttpRequest$Builder; false; uri; ; ; Argument[0]; request-forgery; manual | +| 6 | Sink: java.net.http; HttpRequest; false; newBuilder; ; ; Argument[0]; request-forgery; manual | +| 7 | Sink: java.net; DatagramSocket; true; connect; (SocketAddress); ; Argument[0]; request-forgery; ai-manual | +| 8 | Sink: java.net; URL; false; openConnection; (Proxy); ; Argument[0]; request-forgery; ai-manual | +| 9 | Sink: java.net; URL; false; openConnection; ; ; Argument[this]; request-forgery; manual | +| 10 | Sink: java.net; URL; false; openStream; ; ; Argument[this]; request-forgery; manual | +| 11 | Sink: java.net; URLClassLoader; false; URLClassLoader; (String,URL[],ClassLoader); ; Argument[1]; request-forgery; manual | +| 12 | Sink: java.net; URLClassLoader; false; URLClassLoader; (String,URL[],ClassLoader,URLStreamHandlerFactory); ; Argument[1]; request-forgery; manual | +| 13 | Sink: java.net; URLClassLoader; false; URLClassLoader; (URL[]); ; Argument[0]; request-forgery; manual | +| 14 | Sink: java.net; URLClassLoader; false; URLClassLoader; (URL[],ClassLoader); ; Argument[0]; request-forgery; manual | +| 15 | Sink: java.net; URLClassLoader; false; URLClassLoader; (URL[],ClassLoader,URLStreamHandlerFactory); ; Argument[0]; request-forgery; manual | +| 16 | Sink: java.net; URLClassLoader; false; newInstance; ; ; Argument[0]; request-forgery; manual | +| 17 | Sink: java.sql; Driver; false; connect; (String,Properties); ; Argument[0]; request-forgery; manual | +| 18 | Sink: java.sql; DriverManager; false; getConnection; (String); ; Argument[0]; request-forgery; manual | +| 19 | Sink: java.sql; DriverManager; false; getConnection; (String,Properties); ; Argument[0]; request-forgery; manual | +| 20 | Sink: java.sql; DriverManager; false; getConnection; (String,String,String); ; Argument[0]; request-forgery; manual | +| 21 | Sink: javafx.scene.web; WebEngine; false; load; (String); ; Argument[0]; request-forgery; ai-manual | +| 22 | Sink: javax.activation; URLDataSource; true; URLDataSource; ; ; Argument[0]; request-forgery; manual | +| 23 | Sink: javax.ws.rs.client; Client; true; target; ; ; Argument[0]; request-forgery; manual | +| 24 | Sink: org.apache.commons.jelly; JellyContext; true; JellyContext; (JellyContext,URL); ; Argument[1]; request-forgery; ai-manual | +| 25 | Sink: org.apache.commons.jelly; JellyContext; true; JellyContext; (JellyContext,URL,URL); ; Argument[1]; request-forgery; ai-manual | +| 26 | Sink: org.apache.commons.jelly; JellyContext; true; JellyContext; (JellyContext,URL,URL); ; Argument[2]; request-forgery; ai-manual | +| 27 | Sink: org.apache.commons.jelly; JellyContext; true; JellyContext; (URL); ; Argument[0]; request-forgery; ai-manual | +| 28 | Sink: org.apache.commons.jelly; JellyContext; true; JellyContext; (URL,URL); ; Argument[0]; request-forgery; ai-manual | +| 29 | Sink: org.apache.commons.jelly; JellyContext; true; JellyContext; (URL,URL); ; Argument[1]; request-forgery; ai-manual | +| 30 | Sink: org.apache.cxf.catalog; OASISCatalogManager; true; loadCatalog; (URL); ; Argument[0]; request-forgery; manual | +| 31 | Sink: org.apache.cxf.common.classloader; ClassLoaderUtils; true; getURLClassLoader; (List,ClassLoader); ; Argument[0]; request-forgery; manual | +| 32 | Sink: org.apache.cxf.common.classloader; ClassLoaderUtils; true; getURLClassLoader; (URL[],ClassLoader); ; Argument[0]; request-forgery; manual | +| 33 | Sink: org.apache.cxf.resource; ExtendedURIResolver; true; resolve; (String,String); ; Argument[0]; request-forgery; manual | +| 34 | Sink: org.apache.cxf.resource; URIResolver; true; URIResolver; (String); ; Argument[0]; request-forgery; manual | +| 35 | Sink: org.apache.cxf.resource; URIResolver; true; URIResolver; (String,String); ; Argument[1]; request-forgery; manual | +| 36 | Sink: org.apache.cxf.resource; URIResolver; true; URIResolver; (String,String,Class); ; Argument[1]; request-forgery; manual | +| 37 | Sink: org.apache.cxf.resource; URIResolver; true; resolve; (String,String,Class); ; Argument[1]; request-forgery; manual | +| 38 | Sink: org.apache.hc.client5.http.async.methods; BasicHttpRequests; true; create; (Method,HttpHost,String); ; Argument[1]; request-forgery; hq-manual | +| 39 | Sink: org.apache.hc.client5.http.async.methods; BasicHttpRequests; true; create; (Method,String); ; Argument[1]; request-forgery; hq-manual | +| 40 | Sink: org.apache.hc.client5.http.async.methods; BasicHttpRequests; true; create; (Method,URI); ; Argument[1]; request-forgery; hq-manual | +| 41 | Sink: org.apache.hc.client5.http.async.methods; BasicHttpRequests; true; create; (String,String); ; Argument[1]; request-forgery; hq-manual | +| 42 | Sink: org.apache.hc.client5.http.async.methods; BasicHttpRequests; true; create; (String,URI); ; Argument[1]; request-forgery; hq-manual | +| 43 | Sink: org.apache.hc.client5.http.async.methods; BasicHttpRequests; true; delete; (HttpHost,String); ; Argument[0]; request-forgery; hq-manual | +| 44 | Sink: org.apache.hc.client5.http.async.methods; BasicHttpRequests; true; delete; (String); ; Argument[0]; request-forgery; hq-manual | +| 45 | Sink: org.apache.hc.client5.http.async.methods; BasicHttpRequests; true; delete; (URI); ; Argument[0]; request-forgery; hq-manual | +| 46 | Sink: org.apache.hc.client5.http.async.methods; BasicHttpRequests; true; get; (HttpHost,String); ; Argument[0]; request-forgery; hq-manual | +| 47 | Sink: org.apache.hc.client5.http.async.methods; BasicHttpRequests; true; get; (String); ; Argument[0]; request-forgery; hq-manual | +| 48 | Sink: org.apache.hc.client5.http.async.methods; BasicHttpRequests; true; get; (URI); ; Argument[0]; request-forgery; hq-manual | +| 49 | Sink: org.apache.hc.client5.http.async.methods; BasicHttpRequests; true; head; (HttpHost,String); ; Argument[0]; request-forgery; hq-manual | +| 50 | Sink: org.apache.hc.client5.http.async.methods; BasicHttpRequests; true; head; (String); ; Argument[0]; request-forgery; hq-manual | +| 51 | Sink: org.apache.hc.client5.http.async.methods; BasicHttpRequests; true; head; (URI); ; Argument[0]; request-forgery; hq-manual | +| 52 | Sink: org.apache.hc.client5.http.async.methods; BasicHttpRequests; true; options; (HttpHost,String); ; Argument[0]; request-forgery; hq-manual | +| 53 | Sink: org.apache.hc.client5.http.async.methods; BasicHttpRequests; true; options; (String); ; Argument[0]; request-forgery; hq-manual | +| 54 | Sink: org.apache.hc.client5.http.async.methods; BasicHttpRequests; true; options; (URI); ; Argument[0]; request-forgery; hq-manual | +| 55 | Sink: org.apache.hc.client5.http.async.methods; BasicHttpRequests; true; patch; (HttpHost,String); ; Argument[0]; request-forgery; hq-manual | +| 56 | Sink: org.apache.hc.client5.http.async.methods; BasicHttpRequests; true; patch; (String); ; Argument[0]; request-forgery; hq-manual | +| 57 | Sink: org.apache.hc.client5.http.async.methods; BasicHttpRequests; true; patch; (URI); ; Argument[0]; request-forgery; hq-manual | +| 58 | Sink: org.apache.hc.client5.http.async.methods; BasicHttpRequests; true; post; (HttpHost,String); ; Argument[0]; request-forgery; hq-manual | +| 59 | Sink: org.apache.hc.client5.http.async.methods; BasicHttpRequests; true; post; (String); ; Argument[0]; request-forgery; hq-manual | +| 60 | Sink: org.apache.hc.client5.http.async.methods; BasicHttpRequests; true; post; (URI); ; Argument[0]; request-forgery; hq-manual | +| 61 | Sink: org.apache.hc.client5.http.async.methods; BasicHttpRequests; true; put; (HttpHost,String); ; Argument[0]; request-forgery; hq-manual | +| 62 | Sink: org.apache.hc.client5.http.async.methods; BasicHttpRequests; true; put; (String); ; Argument[0]; request-forgery; hq-manual | +| 63 | Sink: org.apache.hc.client5.http.async.methods; BasicHttpRequests; true; put; (URI); ; Argument[0]; request-forgery; hq-manual | +| 64 | Sink: org.apache.hc.client5.http.async.methods; BasicHttpRequests; true; trace; (HttpHost,String); ; Argument[0]; request-forgery; hq-manual | +| 65 | Sink: org.apache.hc.client5.http.async.methods; BasicHttpRequests; true; trace; (String); ; Argument[0]; request-forgery; hq-manual | +| 66 | Sink: org.apache.hc.client5.http.async.methods; BasicHttpRequests; true; trace; (URI); ; Argument[0]; request-forgery; hq-manual | +| 67 | Sink: org.apache.hc.client5.http.async.methods; ConfigurableHttpRequest; true; ConfigurableHttpRequest; (String,HttpHost,String); ; Argument[1]; request-forgery; hq-manual | +| 68 | Sink: org.apache.hc.client5.http.async.methods; ConfigurableHttpRequest; true; ConfigurableHttpRequest; (String,URI); ; Argument[1]; request-forgery; hq-manual | +| 69 | Sink: org.apache.hc.client5.http.async.methods; SimpleHttpRequest; true; SimpleHttpRequest; (Method,HttpHost,String); ; Argument[1]; request-forgery; hq-manual | +| 70 | Sink: org.apache.hc.client5.http.async.methods; SimpleHttpRequest; true; SimpleHttpRequest; (Method,URI); ; Argument[1]; request-forgery; hq-manual | +| 71 | Sink: org.apache.hc.client5.http.async.methods; SimpleHttpRequest; true; SimpleHttpRequest; (String,HttpHost,String); ; Argument[1]; request-forgery; hq-manual | +| 72 | Sink: org.apache.hc.client5.http.async.methods; SimpleHttpRequest; true; SimpleHttpRequest; (String,URI); ; Argument[1]; request-forgery; hq-manual | +| 73 | Sink: org.apache.hc.client5.http.async.methods; SimpleHttpRequest; true; create; (Method,HttpHost,String); ; Argument[1]; request-forgery; hq-manual | +| 74 | Sink: org.apache.hc.client5.http.async.methods; SimpleHttpRequest; true; create; (Method,URI); ; Argument[1]; request-forgery; hq-manual | +| 75 | Sink: org.apache.hc.client5.http.async.methods; SimpleHttpRequest; true; create; (String,String); ; Argument[1]; request-forgery; hq-manual | +| 76 | Sink: org.apache.hc.client5.http.async.methods; SimpleHttpRequest; true; create; (String,URI); ; Argument[1]; request-forgery; hq-manual | +| 77 | Sink: org.apache.hc.client5.http.async.methods; SimpleHttpRequests; true; create; (Method,HttpHost,String); ; Argument[1]; request-forgery; hq-manual | +| 78 | Sink: org.apache.hc.client5.http.async.methods; SimpleHttpRequests; true; create; (Method,String); ; Argument[1]; request-forgery; hq-manual | +| 79 | Sink: org.apache.hc.client5.http.async.methods; SimpleHttpRequests; true; create; (Method,URI); ; Argument[1]; request-forgery; hq-manual | +| 80 | Sink: org.apache.hc.client5.http.async.methods; SimpleHttpRequests; true; create; (String,String); ; Argument[1]; request-forgery; hq-manual | +| 81 | Sink: org.apache.hc.client5.http.async.methods; SimpleHttpRequests; true; create; (String,URI); ; Argument[1]; request-forgery; hq-manual | +| 82 | Sink: org.apache.hc.client5.http.async.methods; SimpleHttpRequests; true; delete; (HttpHost,String); ; Argument[0]; request-forgery; hq-manual | +| 83 | Sink: org.apache.hc.client5.http.async.methods; SimpleHttpRequests; true; delete; (String); ; Argument[0]; request-forgery; hq-manual | +| 84 | Sink: org.apache.hc.client5.http.async.methods; SimpleHttpRequests; true; delete; (URI); ; Argument[0]; request-forgery; hq-manual | +| 85 | Sink: org.apache.hc.client5.http.async.methods; SimpleHttpRequests; true; get; (HttpHost,String); ; Argument[0]; request-forgery; hq-manual | +| 86 | Sink: org.apache.hc.client5.http.async.methods; SimpleHttpRequests; true; get; (String); ; Argument[0]; request-forgery; hq-manual | +| 87 | Sink: org.apache.hc.client5.http.async.methods; SimpleHttpRequests; true; get; (URI); ; Argument[0]; request-forgery; hq-manual | +| 88 | Sink: org.apache.hc.client5.http.async.methods; SimpleHttpRequests; true; head; (HttpHost,String); ; Argument[0]; request-forgery; hq-manual | +| 89 | Sink: org.apache.hc.client5.http.async.methods; SimpleHttpRequests; true; head; (String); ; Argument[0]; request-forgery; hq-manual | +| 90 | Sink: org.apache.hc.client5.http.async.methods; SimpleHttpRequests; true; head; (URI); ; Argument[0]; request-forgery; hq-manual | +| 91 | Sink: org.apache.hc.client5.http.async.methods; SimpleHttpRequests; true; options; (HttpHost,String); ; Argument[0]; request-forgery; hq-manual | +| 92 | Sink: org.apache.hc.client5.http.async.methods; SimpleHttpRequests; true; options; (String); ; Argument[0]; request-forgery; hq-manual | +| 93 | Sink: org.apache.hc.client5.http.async.methods; SimpleHttpRequests; true; options; (URI); ; Argument[0]; request-forgery; hq-manual | +| 94 | Sink: org.apache.hc.client5.http.async.methods; SimpleHttpRequests; true; patch; (HttpHost,String); ; Argument[0]; request-forgery; hq-manual | +| 95 | Sink: org.apache.hc.client5.http.async.methods; SimpleHttpRequests; true; patch; (String); ; Argument[0]; request-forgery; hq-manual | +| 96 | Sink: org.apache.hc.client5.http.async.methods; SimpleHttpRequests; true; patch; (URI); ; Argument[0]; request-forgery; hq-manual | +| 97 | Sink: org.apache.hc.client5.http.async.methods; SimpleHttpRequests; true; post; (HttpHost,String); ; Argument[0]; request-forgery; hq-manual | +| 98 | Sink: org.apache.hc.client5.http.async.methods; SimpleHttpRequests; true; post; (String); ; Argument[0]; request-forgery; hq-manual | +| 99 | Sink: org.apache.hc.client5.http.async.methods; SimpleHttpRequests; true; post; (URI); ; Argument[0]; request-forgery; hq-manual | +| 100 | Sink: org.apache.hc.client5.http.async.methods; SimpleHttpRequests; true; put; (HttpHost,String); ; Argument[0]; request-forgery; hq-manual | +| 101 | Sink: org.apache.hc.client5.http.async.methods; SimpleHttpRequests; true; put; (String); ; Argument[0]; request-forgery; hq-manual | +| 102 | Sink: org.apache.hc.client5.http.async.methods; SimpleHttpRequests; true; put; (URI); ; Argument[0]; request-forgery; hq-manual | +| 103 | Sink: org.apache.hc.client5.http.async.methods; SimpleHttpRequests; true; trace; (HttpHost,String); ; Argument[0]; request-forgery; hq-manual | +| 104 | Sink: org.apache.hc.client5.http.async.methods; SimpleHttpRequests; true; trace; (String); ; Argument[0]; request-forgery; hq-manual | +| 105 | Sink: org.apache.hc.client5.http.async.methods; SimpleHttpRequests; true; trace; (URI); ; Argument[0]; request-forgery; hq-manual | +| 106 | Sink: org.apache.hc.client5.http.async.methods; SimpleRequestBuilder; true; delete; (String); ; Argument[0]; request-forgery; hq-manual | +| 107 | Sink: org.apache.hc.client5.http.async.methods; SimpleRequestBuilder; true; delete; (URI); ; Argument[0]; request-forgery; hq-manual | +| 108 | Sink: org.apache.hc.client5.http.async.methods; SimpleRequestBuilder; true; get; (String); ; Argument[0]; request-forgery; hq-manual | +| 109 | Sink: org.apache.hc.client5.http.async.methods; SimpleRequestBuilder; true; get; (URI); ; Argument[0]; request-forgery; hq-manual | +| 110 | Sink: org.apache.hc.client5.http.async.methods; SimpleRequestBuilder; true; head; (String); ; Argument[0]; request-forgery; hq-manual | +| 111 | Sink: org.apache.hc.client5.http.async.methods; SimpleRequestBuilder; true; head; (URI); ; Argument[0]; request-forgery; hq-manual | +| 112 | Sink: org.apache.hc.client5.http.async.methods; SimpleRequestBuilder; true; options; (String); ; Argument[0]; request-forgery; hq-manual | +| 113 | Sink: org.apache.hc.client5.http.async.methods; SimpleRequestBuilder; true; options; (URI); ; Argument[0]; request-forgery; hq-manual | +| 114 | Sink: org.apache.hc.client5.http.async.methods; SimpleRequestBuilder; true; patch; (String); ; Argument[0]; request-forgery; hq-manual | +| 115 | Sink: org.apache.hc.client5.http.async.methods; SimpleRequestBuilder; true; patch; (URI); ; Argument[0]; request-forgery; hq-manual | +| 116 | Sink: org.apache.hc.client5.http.async.methods; SimpleRequestBuilder; true; post; (String); ; Argument[0]; request-forgery; hq-manual | +| 117 | Sink: org.apache.hc.client5.http.async.methods; SimpleRequestBuilder; true; post; (URI); ; Argument[0]; request-forgery; hq-manual | +| 118 | Sink: org.apache.hc.client5.http.async.methods; SimpleRequestBuilder; true; put; (String); ; Argument[0]; request-forgery; hq-manual | +| 119 | Sink: org.apache.hc.client5.http.async.methods; SimpleRequestBuilder; true; put; (URI); ; Argument[0]; request-forgery; hq-manual | +| 120 | Sink: org.apache.hc.client5.http.async.methods; SimpleRequestBuilder; true; trace; (String); ; Argument[0]; request-forgery; hq-manual | +| 121 | Sink: org.apache.hc.client5.http.async.methods; SimpleRequestBuilder; true; trace; (URI); ; Argument[0]; request-forgery; hq-manual | +| 122 | Sink: org.apache.hc.client5.http.classic.methods; ClassicHttpRequests; true; create; (Method,String); ; Argument[1]; request-forgery; hq-manual | +| 123 | Sink: org.apache.hc.client5.http.classic.methods; ClassicHttpRequests; true; create; (Method,URI); ; Argument[1]; request-forgery; hq-manual | +| 124 | Sink: org.apache.hc.client5.http.classic.methods; ClassicHttpRequests; true; create; (String,String); ; Argument[1]; request-forgery; hq-manual | +| 125 | Sink: org.apache.hc.client5.http.classic.methods; ClassicHttpRequests; true; create; (String,URI); ; Argument[1]; request-forgery; hq-manual | +| 126 | Sink: org.apache.hc.client5.http.classic.methods; ClassicHttpRequests; true; delete; (String); ; Argument[0]; request-forgery; hq-manual | +| 127 | Sink: org.apache.hc.client5.http.classic.methods; ClassicHttpRequests; true; delete; (URI); ; Argument[0]; request-forgery; hq-manual | +| 128 | Sink: org.apache.hc.client5.http.classic.methods; ClassicHttpRequests; true; get; (String); ; Argument[0]; request-forgery; hq-manual | +| 129 | Sink: org.apache.hc.client5.http.classic.methods; ClassicHttpRequests; true; get; (URI); ; Argument[0]; request-forgery; hq-manual | +| 130 | Sink: org.apache.hc.client5.http.classic.methods; ClassicHttpRequests; true; head; (String); ; Argument[0]; request-forgery; hq-manual | +| 131 | Sink: org.apache.hc.client5.http.classic.methods; ClassicHttpRequests; true; head; (URI); ; Argument[0]; request-forgery; hq-manual | +| 132 | Sink: org.apache.hc.client5.http.classic.methods; ClassicHttpRequests; true; options; (String); ; Argument[0]; request-forgery; hq-manual | +| 133 | Sink: org.apache.hc.client5.http.classic.methods; ClassicHttpRequests; true; options; (URI); ; Argument[0]; request-forgery; hq-manual | +| 134 | Sink: org.apache.hc.client5.http.classic.methods; ClassicHttpRequests; true; patch; (String); ; Argument[0]; request-forgery; hq-manual | +| 135 | Sink: org.apache.hc.client5.http.classic.methods; ClassicHttpRequests; true; patch; (URI); ; Argument[0]; request-forgery; hq-manual | +| 136 | Sink: org.apache.hc.client5.http.classic.methods; ClassicHttpRequests; true; post; (String); ; Argument[0]; request-forgery; hq-manual | +| 137 | Sink: org.apache.hc.client5.http.classic.methods; ClassicHttpRequests; true; post; (URI); ; Argument[0]; request-forgery; hq-manual | +| 138 | Sink: org.apache.hc.client5.http.classic.methods; ClassicHttpRequests; true; put; (String); ; Argument[0]; request-forgery; hq-manual | +| 139 | Sink: org.apache.hc.client5.http.classic.methods; ClassicHttpRequests; true; put; (URI); ; Argument[0]; request-forgery; hq-manual | +| 140 | Sink: org.apache.hc.client5.http.classic.methods; ClassicHttpRequests; true; trace; (String); ; Argument[0]; request-forgery; hq-manual | +| 141 | Sink: org.apache.hc.client5.http.classic.methods; ClassicHttpRequests; true; trace; (URI); ; Argument[0]; request-forgery; hq-manual | +| 142 | Sink: org.apache.hc.client5.http.classic.methods; HttpDelete; true; HttpDelete; (String); ; Argument[0]; request-forgery; hq-manual | +| 143 | Sink: org.apache.hc.client5.http.classic.methods; HttpDelete; true; HttpDelete; (URI); ; Argument[0]; request-forgery; hq-manual | +| 144 | Sink: org.apache.hc.client5.http.classic.methods; HttpGet; true; HttpGet; (String); ; Argument[0]; request-forgery; hq-manual | +| 145 | Sink: org.apache.hc.client5.http.classic.methods; HttpGet; true; HttpGet; (URI); ; Argument[0]; request-forgery; hq-manual | +| 146 | Sink: org.apache.hc.client5.http.classic.methods; HttpHead; true; HttpHead; (String); ; Argument[0]; request-forgery; hq-manual | +| 147 | Sink: org.apache.hc.client5.http.classic.methods; HttpHead; true; HttpHead; (URI); ; Argument[0]; request-forgery; hq-manual | +| 148 | Sink: org.apache.hc.client5.http.classic.methods; HttpOptions; true; HttpOptions; (String); ; Argument[0]; request-forgery; hq-manual | +| 149 | Sink: org.apache.hc.client5.http.classic.methods; HttpOptions; true; HttpOptions; (URI); ; Argument[0]; request-forgery; hq-manual | +| 150 | Sink: org.apache.hc.client5.http.classic.methods; HttpPatch; true; HttpPatch; (String); ; Argument[0]; request-forgery; hq-manual | +| 151 | Sink: org.apache.hc.client5.http.classic.methods; HttpPatch; true; HttpPatch; (URI); ; Argument[0]; request-forgery; hq-manual | +| 152 | Sink: org.apache.hc.client5.http.classic.methods; HttpPost; true; HttpPost; (String); ; Argument[0]; request-forgery; hq-manual | +| 153 | Sink: org.apache.hc.client5.http.classic.methods; HttpPost; true; HttpPost; (URI); ; Argument[0]; request-forgery; hq-manual | +| 154 | Sink: org.apache.hc.client5.http.classic.methods; HttpPut; true; HttpPut; (String); ; Argument[0]; request-forgery; hq-manual | +| 155 | Sink: org.apache.hc.client5.http.classic.methods; HttpPut; true; HttpPut; (URI); ; Argument[0]; request-forgery; hq-manual | +| 156 | Sink: org.apache.hc.client5.http.classic.methods; HttpTrace; true; HttpTrace; (String); ; Argument[0]; request-forgery; hq-manual | +| 157 | Sink: org.apache.hc.client5.http.classic.methods; HttpTrace; true; HttpTrace; (URI); ; Argument[0]; request-forgery; hq-manual | +| 158 | Sink: org.apache.hc.client5.http.classic.methods; HttpUriRequestBase; true; HttpUriRequestBase; (String,URI); ; Argument[1]; request-forgery; hq-manual | +| 159 | Sink: org.apache.hc.client5.http.fluent; Request; true; create; (Method,URI); ; Argument[1]; request-forgery; hq-manual | +| 160 | Sink: org.apache.hc.client5.http.fluent; Request; true; create; (String,String); ; Argument[1]; request-forgery; hq-manual | +| 161 | Sink: org.apache.hc.client5.http.fluent; Request; true; create; (String,URI); ; Argument[1]; request-forgery; hq-manual | +| 162 | Sink: org.apache.hc.client5.http.fluent; Request; true; delete; (String); ; Argument[0]; request-forgery; hq-manual | +| 163 | Sink: org.apache.hc.client5.http.fluent; Request; true; delete; (URI); ; Argument[0]; request-forgery; hq-manual | +| 164 | Sink: org.apache.hc.client5.http.fluent; Request; true; get; (String); ; Argument[0]; request-forgery; hq-manual | +| 165 | Sink: org.apache.hc.client5.http.fluent; Request; true; get; (URI); ; Argument[0]; request-forgery; hq-manual | +| 166 | Sink: org.apache.hc.client5.http.fluent; Request; true; head; (String); ; Argument[0]; request-forgery; hq-manual | +| 167 | Sink: org.apache.hc.client5.http.fluent; Request; true; head; (URI); ; Argument[0]; request-forgery; hq-manual | +| 168 | Sink: org.apache.hc.client5.http.fluent; Request; true; options; (String); ; Argument[0]; request-forgery; hq-manual | +| 169 | Sink: org.apache.hc.client5.http.fluent; Request; true; options; (URI); ; Argument[0]; request-forgery; hq-manual | +| 170 | Sink: org.apache.hc.client5.http.fluent; Request; true; patch; (String); ; Argument[0]; request-forgery; hq-manual | +| 171 | Sink: org.apache.hc.client5.http.fluent; Request; true; patch; (URI); ; Argument[0]; request-forgery; hq-manual | +| 172 | Sink: org.apache.hc.client5.http.fluent; Request; true; post; (String); ; Argument[0]; request-forgery; hq-manual | +| 173 | Sink: org.apache.hc.client5.http.fluent; Request; true; post; (URI); ; Argument[0]; request-forgery; hq-manual | +| 174 | Sink: org.apache.hc.client5.http.fluent; Request; true; put; (String); ; Argument[0]; request-forgery; hq-manual | +| 175 | Sink: org.apache.hc.client5.http.fluent; Request; true; put; (URI); ; Argument[0]; request-forgery; hq-manual | +| 176 | Sink: org.apache.hc.client5.http.fluent; Request; true; trace; (String); ; Argument[0]; request-forgery; hq-manual | +| 177 | Sink: org.apache.hc.client5.http.fluent; Request; true; trace; (URI); ; Argument[0]; request-forgery; hq-manual | +| 178 | Sink: org.apache.hc.core5.http.impl.bootstrap; HttpAsyncRequester; true; connect; (HttpHost,Timeout); ; Argument[0]; request-forgery; hq-manual | +| 179 | Sink: org.apache.hc.core5.http.impl.bootstrap; HttpAsyncRequester; true; connect; (HttpHost,Timeout,Object,FutureCallback); ; Argument[0]; request-forgery; hq-manual | +| 180 | Sink: org.apache.hc.core5.http.io.support; ClassicRequestBuilder; true; delete; (String); ; Argument[0]; request-forgery; hq-manual | +| 181 | Sink: org.apache.hc.core5.http.io.support; ClassicRequestBuilder; true; delete; (URI); ; Argument[0]; request-forgery; hq-manual | +| 182 | Sink: org.apache.hc.core5.http.io.support; ClassicRequestBuilder; true; get; (String); ; Argument[0]; request-forgery; hq-manual | +| 183 | Sink: org.apache.hc.core5.http.io.support; ClassicRequestBuilder; true; get; (URI); ; Argument[0]; request-forgery; hq-manual | +| 184 | Sink: org.apache.hc.core5.http.io.support; ClassicRequestBuilder; true; head; (String); ; Argument[0]; request-forgery; hq-manual | +| 185 | Sink: org.apache.hc.core5.http.io.support; ClassicRequestBuilder; true; head; (URI); ; Argument[0]; request-forgery; hq-manual | +| 186 | Sink: org.apache.hc.core5.http.io.support; ClassicRequestBuilder; true; options; (String); ; Argument[0]; request-forgery; hq-manual | +| 187 | Sink: org.apache.hc.core5.http.io.support; ClassicRequestBuilder; true; options; (URI); ; Argument[0]; request-forgery; hq-manual | +| 188 | Sink: org.apache.hc.core5.http.io.support; ClassicRequestBuilder; true; patch; (String); ; Argument[0]; request-forgery; hq-manual | +| 189 | Sink: org.apache.hc.core5.http.io.support; ClassicRequestBuilder; true; patch; (URI); ; Argument[0]; request-forgery; hq-manual | +| 190 | Sink: org.apache.hc.core5.http.io.support; ClassicRequestBuilder; true; post; (String); ; Argument[0]; request-forgery; hq-manual | +| 191 | Sink: org.apache.hc.core5.http.io.support; ClassicRequestBuilder; true; post; (URI); ; Argument[0]; request-forgery; hq-manual | +| 192 | Sink: org.apache.hc.core5.http.io.support; ClassicRequestBuilder; true; put; (String); ; Argument[0]; request-forgery; hq-manual | +| 193 | Sink: org.apache.hc.core5.http.io.support; ClassicRequestBuilder; true; put; (URI); ; Argument[0]; request-forgery; hq-manual | +| 194 | Sink: org.apache.hc.core5.http.io.support; ClassicRequestBuilder; true; trace; (String); ; Argument[0]; request-forgery; hq-manual | +| 195 | Sink: org.apache.hc.core5.http.io.support; ClassicRequestBuilder; true; trace; (URI); ; Argument[0]; request-forgery; hq-manual | +| 196 | Sink: org.apache.hc.core5.http.message; BasicClassicHttpRequest; true; BasicClassicHttpRequest; (Method,HttpHost,String); ; Argument[1]; request-forgery; hq-manual | +| 197 | Sink: org.apache.hc.core5.http.message; BasicClassicHttpRequest; true; BasicClassicHttpRequest; (Method,URI); ; Argument[1]; request-forgery; hq-manual | +| 198 | Sink: org.apache.hc.core5.http.message; BasicClassicHttpRequest; true; BasicClassicHttpRequest; (String,HttpHost,String); ; Argument[1]; request-forgery; hq-manual | +| 199 | Sink: org.apache.hc.core5.http.message; BasicClassicHttpRequest; true; BasicClassicHttpRequest; (String,URI); ; Argument[1]; request-forgery; hq-manual | +| 200 | Sink: org.apache.hc.core5.http.message; BasicHttpRequest; true; BasicHttpRequest; (Method,HttpHost,String); ; Argument[1]; request-forgery; hq-manual | +| 201 | Sink: org.apache.hc.core5.http.message; BasicHttpRequest; true; BasicHttpRequest; (Method,URI); ; Argument[1]; request-forgery; hq-manual | +| 202 | Sink: org.apache.hc.core5.http.message; BasicHttpRequest; true; BasicHttpRequest; (String,HttpHost,String); ; Argument[1]; request-forgery; hq-manual | +| 203 | Sink: org.apache.hc.core5.http.message; BasicHttpRequest; true; BasicHttpRequest; (String,URI); ; Argument[1]; request-forgery; hq-manual | +| 204 | Sink: org.apache.hc.core5.http.support; AbstractRequestBuilder; true; setHttpHost; (HttpHost); ; Argument[0]; request-forgery; hq-manual | +| 205 | Sink: org.apache.hc.core5.http.support; AbstractRequestBuilder; true; setUri; (String); ; Argument[0]; request-forgery; hq-manual | +| 206 | Sink: org.apache.hc.core5.http.support; AbstractRequestBuilder; true; setUri; (URI); ; Argument[0]; request-forgery; hq-manual | +| 207 | Sink: org.apache.hc.core5.http; HttpRequest; true; setUri; (URI); ; Argument[0]; request-forgery; hq-manual | +| 208 | Sink: org.apache.hc.core5.http; HttpRequestFactory; true; newHttpRequest; (String,String); ; Argument[1]; request-forgery; hq-manual | +| 209 | Sink: org.apache.hc.core5.http; HttpRequestFactory; true; newHttpRequest; (String,URI); ; Argument[1]; request-forgery; hq-manual | +| 210 | Sink: org.apache.http.client.methods; HttpDelete; false; HttpDelete; ; ; Argument[0]; request-forgery; manual | +| 211 | Sink: org.apache.http.client.methods; HttpGet; false; HttpGet; ; ; Argument[0]; request-forgery; manual | +| 212 | Sink: org.apache.http.client.methods; HttpHead; false; HttpHead; ; ; Argument[0]; request-forgery; manual | +| 213 | Sink: org.apache.http.client.methods; HttpOptions; false; HttpOptions; ; ; Argument[0]; request-forgery; manual | +| 214 | Sink: org.apache.http.client.methods; HttpPatch; false; HttpPatch; ; ; Argument[0]; request-forgery; manual | +| 215 | Sink: org.apache.http.client.methods; HttpPost; false; HttpPost; ; ; Argument[0]; request-forgery; manual | +| 216 | Sink: org.apache.http.client.methods; HttpPut; false; HttpPut; ; ; Argument[0]; request-forgery; manual | +| 217 | Sink: org.apache.http.client.methods; HttpRequestBase; true; setURI; ; ; Argument[0]; request-forgery; manual | +| 218 | Sink: org.apache.http.client.methods; HttpTrace; false; HttpTrace; ; ; Argument[0]; request-forgery; manual | +| 219 | Sink: org.apache.http.client.methods; RequestBuilder; false; delete; ; ; Argument[0]; request-forgery; manual | +| 220 | Sink: org.apache.http.client.methods; RequestBuilder; false; get; ; ; Argument[0]; request-forgery; manual | +| 221 | Sink: org.apache.http.client.methods; RequestBuilder; false; head; ; ; Argument[0]; request-forgery; manual | +| 222 | Sink: org.apache.http.client.methods; RequestBuilder; false; options; ; ; Argument[0]; request-forgery; manual | +| 223 | Sink: org.apache.http.client.methods; RequestBuilder; false; patch; ; ; Argument[0]; request-forgery; manual | +| 224 | Sink: org.apache.http.client.methods; RequestBuilder; false; post; ; ; Argument[0]; request-forgery; manual | +| 225 | Sink: org.apache.http.client.methods; RequestBuilder; false; put; ; ; Argument[0]; request-forgery; manual | +| 226 | Sink: org.apache.http.client.methods; RequestBuilder; false; setUri; ; ; Argument[0]; request-forgery; manual | +| 227 | Sink: org.apache.http.client.methods; RequestBuilder; false; trace; ; ; Argument[0]; request-forgery; manual | +| 228 | Sink: org.apache.http.message; BasicHttpEntityEnclosingRequest; false; BasicHttpEntityEnclosingRequest; (RequestLine); ; Argument[0]; request-forgery; manual | +| 229 | Sink: org.apache.http.message; BasicHttpEntityEnclosingRequest; false; BasicHttpEntityEnclosingRequest; (String,String); ; Argument[1]; request-forgery; manual | +| 230 | Sink: org.apache.http.message; BasicHttpEntityEnclosingRequest; false; BasicHttpEntityEnclosingRequest; (String,String,ProtocolVersion); ; Argument[1]; request-forgery; manual | +| 231 | Sink: org.apache.http.message; BasicHttpRequest; false; BasicHttpRequest; (RequestLine); ; Argument[0]; request-forgery; manual | +| 232 | Sink: org.apache.http.message; BasicHttpRequest; false; BasicHttpRequest; (String,String); ; Argument[1]; request-forgery; manual | +| 233 | Sink: org.apache.http.message; BasicHttpRequest; false; BasicHttpRequest; (String,String,ProtocolVersion); ; Argument[1]; request-forgery; manual | +| 234 | Sink: org.codehaus.cargo.container.installer; ZipURLInstaller; true; ZipURLInstaller; (URL,String,String); ; Argument[0]; request-forgery; ai-manual | +| 235 | Sink: org.jdbi.v3.core; Jdbi; false; create; (String); ; Argument[0]; request-forgery; manual | +| 236 | Sink: org.jdbi.v3.core; Jdbi; false; create; (String,Properties); ; Argument[0]; request-forgery; manual | +| 237 | Sink: org.jdbi.v3.core; Jdbi; false; create; (String,String,String); ; Argument[0]; request-forgery; manual | +| 238 | Sink: org.jdbi.v3.core; Jdbi; false; open; (String); ; Argument[0]; request-forgery; manual | +| 239 | Sink: org.jdbi.v3.core; Jdbi; false; open; (String,Properties); ; Argument[0]; request-forgery; manual | +| 240 | Sink: org.jdbi.v3.core; Jdbi; false; open; (String,String,String); ; Argument[0]; request-forgery; manual | +| 241 | Sink: org.kohsuke.stapler; HttpResponses; true; staticResource; (URL); ; Argument[0]; request-forgery; ai-manual | +| 242 | Sink: org.springframework.boot.jdbc; DataSourceBuilder; false; url; (String); ; Argument[0]; request-forgery; manual | +| 243 | Sink: org.springframework.http; RequestEntity; false; RequestEntity; (HttpMethod,URI); ; Argument[1]; request-forgery; manual | +| 244 | Sink: org.springframework.http; RequestEntity; false; RequestEntity; (MultiValueMap,HttpMethod,URI); ; Argument[2]; request-forgery; manual | +| 245 | Sink: org.springframework.http; RequestEntity; false; RequestEntity; (Object,HttpMethod,URI); ; Argument[2]; request-forgery; manual | +| 246 | Sink: org.springframework.http; RequestEntity; false; RequestEntity; (Object,HttpMethod,URI,Type); ; Argument[2]; request-forgery; manual | +| 247 | Sink: org.springframework.http; RequestEntity; false; RequestEntity; (Object,MultiValueMap,HttpMethod,URI); ; Argument[3]; request-forgery; manual | +| 248 | Sink: org.springframework.http; RequestEntity; false; RequestEntity; (Object,MultiValueMap,HttpMethod,URI,Type); ; Argument[3]; request-forgery; manual | +| 249 | Sink: org.springframework.http; RequestEntity; false; delete; ; ; Argument[0]; request-forgery; manual | +| 250 | Sink: org.springframework.http; RequestEntity; false; get; ; ; Argument[0]; request-forgery; manual | +| 251 | Sink: org.springframework.http; RequestEntity; false; head; ; ; Argument[0]; request-forgery; manual | +| 252 | Sink: org.springframework.http; RequestEntity; false; method; ; ; Argument[1]; request-forgery; manual | +| 253 | Sink: org.springframework.http; RequestEntity; false; options; ; ; Argument[0]; request-forgery; manual | +| 254 | Sink: org.springframework.http; RequestEntity; false; patch; ; ; Argument[0]; request-forgery; manual | +| 255 | Sink: org.springframework.http; RequestEntity; false; post; ; ; Argument[0]; request-forgery; manual | +| 256 | Sink: org.springframework.http; RequestEntity; false; put; ; ; Argument[0]; request-forgery; manual | +| 257 | Sink: org.springframework.jdbc.datasource; AbstractDriverBasedDataSource; false; setUrl; (String); ; Argument[0]; request-forgery; manual | +| 258 | Sink: org.springframework.jdbc.datasource; DriverManagerDataSource; false; DriverManagerDataSource; (String); ; Argument[0]; request-forgery; manual | +| 259 | Sink: org.springframework.jdbc.datasource; DriverManagerDataSource; false; DriverManagerDataSource; (String,Properties); ; Argument[0]; request-forgery; manual | +| 260 | Sink: org.springframework.jdbc.datasource; DriverManagerDataSource; false; DriverManagerDataSource; (String,String,String); ; Argument[0]; request-forgery; manual | +| 261 | Sink: org.springframework.web.client; RestTemplate; false; delete; ; ; Argument[0]; request-forgery; manual | +| 262 | Sink: org.springframework.web.client; RestTemplate; false; exchange; ; ; Argument[0]; request-forgery; manual | +| 263 | Sink: org.springframework.web.client; RestTemplate; false; execute; ; ; Argument[0]; request-forgery; manual | +| 264 | Sink: org.springframework.web.client; RestTemplate; false; getForEntity; ; ; Argument[0]; request-forgery; manual | +| 265 | Sink: org.springframework.web.client; RestTemplate; false; getForObject; ; ; Argument[0]; request-forgery; manual | +| 266 | Sink: org.springframework.web.client; RestTemplate; false; headForHeaders; ; ; Argument[0]; request-forgery; manual | +| 267 | Sink: org.springframework.web.client; RestTemplate; false; optionsForAllow; ; ; Argument[0]; request-forgery; manual | +| 268 | Sink: org.springframework.web.client; RestTemplate; false; patchForObject; ; ; Argument[0]; request-forgery; manual | +| 269 | Sink: org.springframework.web.client; RestTemplate; false; postForEntity; ; ; Argument[0]; request-forgery; manual | +| 270 | Sink: org.springframework.web.client; RestTemplate; false; postForLocation; ; ; Argument[0]; request-forgery; manual | +| 271 | Sink: org.springframework.web.client; RestTemplate; false; postForObject; ; ; Argument[0]; request-forgery; manual | +| 272 | Sink: org.springframework.web.client; RestTemplate; false; put; ; ; Argument[0]; request-forgery; manual | +| 273 | Sink: org.springframework.web.reactive.function.client; WebClient$Builder; false; baseUrl; ; ; Argument[0]; request-forgery; manual | +| 274 | Sink: org.springframework.web.reactive.function.client; WebClient; false; create; ; ; Argument[0]; request-forgery; manual | +| 275 | Sink: play.libs.ws; StandaloneWSClient; true; url; ; ; Argument[0]; request-forgery; manual | +| 276 | Sink: play.libs.ws; WSClient; true; url; ; ; Argument[0]; request-forgery; manual | +| 277 | Source: javax.servlet; ServletRequest; false; getParameter; (String); ; ReturnValue; remote; manual | +| 278 | Summary: java.lang; AbstractStringBuilder; true; append; ; ; Argument[0]; Argument[this]; taint; manual | +| 279 | Summary: java.lang; AbstractStringBuilder; true; append; ; ; Argument[this]; ReturnValue; value; manual | +| 280 | Summary: java.lang; CharSequence; true; toString; ; ; Argument[this]; ReturnValue; taint; manual | +| 281 | Summary: java.lang; String; false; format; (String,Object[]); ; Argument[1].ArrayElement; ReturnValue; taint; manual | +| 282 | Summary: java.lang; StringBuilder; true; StringBuilder; ; ; Argument[0]; Argument[this]; taint; manual | +| 283 | Summary: java.net.http; HttpRequest$Builder; true; build; (); ; Argument[this]; ReturnValue; taint; df-generated | +| 284 | Summary: java.net.http; HttpRequest; true; newBuilder; (URI); ; Argument[0]; ReturnValue; taint; df-generated | +| 285 | Summary: java.net; URI; false; URI; (String); ; Argument[0]; Argument[this]; taint; manual | +| 286 | Summary: java.net; URI; false; toString; ; ; Argument[this]; ReturnValue; taint; manual | +| 287 | Summary: java.net; URI; false; toURL; ; ; Argument[this]; ReturnValue; taint; manual | +| 288 | Summary: java.net; URL; false; URL; (String); ; Argument[0]; Argument[this]; taint; manual | +| 289 | Summary: java.util; Map; false; of; ; ; Argument[1]; ReturnValue.MapValue; value; manual | +| 290 | Summary: java.util; Map; false; of; ; ; Argument[3]; ReturnValue.MapValue; value; manual | +| 291 | Summary: java.util; Properties; true; setProperty; (String,String); ; Argument[1]; Argument[this].MapValue; value; manual | +| 292 | Summary: org.apache.hc.core5.http; HttpHost; true; HttpHost; (String); ; Argument[0]; Argument[this]; taint; hq-manual | +| 293 | Summary: org.apache.http.message; BasicRequestLine; false; BasicRequestLine; ; ; Argument[1]; Argument[this]; taint; manual | +nodes +| ApacheHttpSSRF.java:27:27:27:53 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| ApacheHttpSSRF.java:28:23:28:35 | new URI(...) : URI | semmle.label | new URI(...) : URI | +| ApacheHttpSSRF.java:28:31:28:34 | sink : String | semmle.label | sink : String | +| ApacheHttpSSRF.java:30:43:30:45 | uri | semmle.label | uri | +| ApacheHttpSSRF.java:32:29:32:31 | uri | semmle.label | uri | +| ApacheHttpSSRF.java:34:26:34:28 | uri | semmle.label | uri | +| ApacheHttpSSRF.java:35:26:35:28 | uri | semmle.label | uri | +| ApacheHttpSSRF.java:36:25:36:27 | uri | semmle.label | uri | +| ApacheHttpSSRF.java:37:28:37:30 | uri | semmle.label | uri | +| ApacheHttpSSRF.java:38:29:38:31 | uri | semmle.label | uri | +| ApacheHttpSSRF.java:39:27:39:29 | uri | semmle.label | uri | +| ApacheHttpSSRF.java:40:27:40:29 | uri | semmle.label | uri | +| ApacheHttpSSRF.java:42:34:42:82 | new BasicRequestLine(...) | semmle.label | new BasicRequestLine(...) | +| ApacheHttpSSRF.java:42:62:42:64 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRF.java:42:62:42:75 | toString(...) : String | semmle.label | toString(...) : String | +| ApacheHttpSSRF.java:43:41:43:43 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRF.java:43:41:43:54 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRF.java:44:41:44:43 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRF.java:44:41:44:54 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRF.java:46:49:46:97 | new BasicRequestLine(...) | semmle.label | new BasicRequestLine(...) | +| ApacheHttpSSRF.java:46:77:46:79 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRF.java:46:77:46:90 | toString(...) : String | semmle.label | toString(...) : String | +| ApacheHttpSSRF.java:47:56:47:58 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRF.java:47:56:47:69 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRF.java:48:56:48:58 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRF.java:48:56:48:69 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRF.java:50:32:50:34 | uri | semmle.label | uri | +| ApacheHttpSSRF.java:51:33:51:35 | uri | semmle.label | uri | +| ApacheHttpSSRF.java:52:32:52:34 | uri | semmle.label | uri | +| ApacheHttpSSRF.java:53:35:53:37 | uri | semmle.label | uri | +| ApacheHttpSSRF.java:54:36:54:38 | uri | semmle.label | uri | +| ApacheHttpSSRF.java:55:33:55:35 | uri | semmle.label | uri | +| ApacheHttpSSRF.java:56:34:56:36 | uri | semmle.label | uri | +| ApacheHttpSSRF.java:57:34:57:36 | uri | semmle.label | uri | +| ApacheHttpSSRF.java:58:43:58:45 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:41:30:41:56 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| ApacheHttpSSRFVersion5.java:42:23:42:38 | new URI(...) : URI | semmle.label | new URI(...) : URI | +| ApacheHttpSSRFVersion5.java:42:31:42:37 | uriSink : String | semmle.label | uriSink : String | +| ApacheHttpSSRFVersion5.java:44:31:44:58 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| ApacheHttpSSRFVersion5.java:45:29:45:50 | new HttpHost(...) : HttpHost | semmle.label | new HttpHost(...) : HttpHost | +| ApacheHttpSSRFVersion5.java:45:42:45:49 | hostSink : String | semmle.label | hostSink : String | +| ApacheHttpSSRFVersion5.java:48:54:48:57 | host | semmle.label | host | +| ApacheHttpSSRFVersion5.java:49:54:49:56 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRFVersion5.java:49:54:49:67 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRFVersion5.java:50:54:50:56 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:51:48:51:50 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRFVersion5.java:51:48:51:61 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRFVersion5.java:52:48:52:50 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:54:38:54:41 | host | semmle.label | host | +| ApacheHttpSSRFVersion5.java:55:38:55:40 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRFVersion5.java:55:38:55:51 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRFVersion5.java:56:38:56:40 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:58:35:58:38 | host | semmle.label | host | +| ApacheHttpSSRFVersion5.java:59:35:59:37 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRFVersion5.java:59:35:59:48 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRFVersion5.java:60:35:60:37 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:62:36:62:39 | host | semmle.label | host | +| ApacheHttpSSRFVersion5.java:63:36:63:38 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRFVersion5.java:63:36:63:49 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRFVersion5.java:64:36:64:38 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:66:39:66:42 | host | semmle.label | host | +| ApacheHttpSSRFVersion5.java:67:39:67:41 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRFVersion5.java:67:39:67:52 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRFVersion5.java:68:39:68:41 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:70:37:70:40 | host | semmle.label | host | +| ApacheHttpSSRFVersion5.java:71:37:71:39 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRFVersion5.java:71:37:71:50 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRFVersion5.java:72:37:72:39 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:74:36:74:39 | host | semmle.label | host | +| ApacheHttpSSRFVersion5.java:75:36:75:38 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRFVersion5.java:75:36:75:49 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRFVersion5.java:76:36:76:38 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:78:35:78:38 | host | semmle.label | host | +| ApacheHttpSSRFVersion5.java:79:35:79:37 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRFVersion5.java:79:35:79:48 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRFVersion5.java:80:35:80:37 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:82:37:82:40 | host | semmle.label | host | +| ApacheHttpSSRFVersion5.java:83:37:83:39 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRFVersion5.java:83:37:83:50 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRFVersion5.java:84:37:84:39 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:87:51:87:54 | host | semmle.label | host | +| ApacheHttpSSRFVersion5.java:88:51:88:53 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:91:51:91:54 | host | semmle.label | host | +| ApacheHttpSSRFVersion5.java:92:51:92:53 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:93:45:93:48 | host | semmle.label | host | +| ApacheHttpSSRFVersion5.java:94:45:94:47 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:96:54:96:57 | host | semmle.label | host | +| ApacheHttpSSRFVersion5.java:97:54:97:56 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:98:48:98:50 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRFVersion5.java:98:48:98:61 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRFVersion5.java:99:48:99:50 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:102:55:102:58 | host | semmle.label | host | +| ApacheHttpSSRFVersion5.java:103:55:103:57 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRFVersion5.java:103:55:103:68 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRFVersion5.java:104:55:104:57 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:105:49:105:51 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRFVersion5.java:105:49:105:62 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRFVersion5.java:106:49:106:51 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:108:39:108:42 | host | semmle.label | host | +| ApacheHttpSSRFVersion5.java:109:39:109:41 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRFVersion5.java:109:39:109:52 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRFVersion5.java:110:39:110:41 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:112:36:112:39 | host | semmle.label | host | +| ApacheHttpSSRFVersion5.java:113:36:113:38 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRFVersion5.java:113:36:113:49 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRFVersion5.java:114:36:114:38 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:116:37:116:40 | host | semmle.label | host | +| ApacheHttpSSRFVersion5.java:117:37:117:39 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRFVersion5.java:117:37:117:50 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRFVersion5.java:118:37:118:39 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:120:40:120:43 | host | semmle.label | host | +| ApacheHttpSSRFVersion5.java:121:40:121:42 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRFVersion5.java:121:40:121:53 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRFVersion5.java:122:40:122:42 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:124:38:124:41 | host | semmle.label | host | +| ApacheHttpSSRFVersion5.java:125:38:125:40 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRFVersion5.java:125:38:125:51 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRFVersion5.java:126:38:126:40 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:128:37:128:40 | host | semmle.label | host | +| ApacheHttpSSRFVersion5.java:129:37:129:39 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRFVersion5.java:129:37:129:50 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRFVersion5.java:130:37:130:39 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:132:36:132:39 | host | semmle.label | host | +| ApacheHttpSSRFVersion5.java:133:36:133:38 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRFVersion5.java:133:36:133:49 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRFVersion5.java:134:36:134:38 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:136:38:136:41 | host | semmle.label | host | +| ApacheHttpSSRFVersion5.java:137:38:137:40 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRFVersion5.java:137:38:137:51 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRFVersion5.java:138:38:138:40 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:141:41:141:43 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRFVersion5.java:141:41:141:54 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRFVersion5.java:142:41:142:43 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:144:38:144:40 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRFVersion5.java:144:38:144:51 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRFVersion5.java:145:38:145:40 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:147:39:147:41 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRFVersion5.java:147:39:147:52 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRFVersion5.java:148:39:148:41 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:150:42:150:44 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRFVersion5.java:150:42:150:55 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRFVersion5.java:151:42:151:44 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:153:40:153:42 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRFVersion5.java:153:40:153:53 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRFVersion5.java:154:40:154:42 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:156:39:156:41 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRFVersion5.java:156:39:156:52 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRFVersion5.java:157:39:157:41 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:159:38:159:40 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRFVersion5.java:159:38:159:51 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRFVersion5.java:160:38:160:40 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:162:52:162:55 | host | semmle.label | host | +| ApacheHttpSSRFVersion5.java:164:47:164:49 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRFVersion5.java:164:47:164:60 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRFVersion5.java:165:47:165:49 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:167:40:167:42 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRFVersion5.java:167:40:167:53 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRFVersion5.java:168:40:168:42 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:180:30:180:56 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| ApacheHttpSSRFVersion5.java:181:23:181:38 | new URI(...) : URI | semmle.label | new URI(...) : URI | +| ApacheHttpSSRFVersion5.java:181:31:181:37 | uriSink : String | semmle.label | uriSink : String | +| ApacheHttpSSRFVersion5.java:184:56:184:58 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRFVersion5.java:184:56:184:69 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRFVersion5.java:185:56:185:58 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:186:50:186:52 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRFVersion5.java:186:50:186:63 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRFVersion5.java:187:50:187:52 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:189:40:189:42 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRFVersion5.java:189:40:189:53 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRFVersion5.java:190:40:190:42 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:192:37:192:39 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRFVersion5.java:192:37:192:50 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRFVersion5.java:193:37:193:39 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:195:38:195:40 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRFVersion5.java:195:38:195:51 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRFVersion5.java:196:38:196:40 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:198:41:198:43 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRFVersion5.java:198:41:198:54 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRFVersion5.java:199:41:199:43 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:201:39:201:41 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRFVersion5.java:201:39:201:52 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRFVersion5.java:202:39:202:41 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:204:38:204:40 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRFVersion5.java:204:38:204:51 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRFVersion5.java:205:38:205:40 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:207:37:207:39 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRFVersion5.java:207:37:207:50 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRFVersion5.java:208:37:208:39 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:210:39:210:41 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRFVersion5.java:210:39:210:52 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRFVersion5.java:211:39:211:41 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:214:28:214:30 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRFVersion5.java:214:28:214:41 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRFVersion5.java:215:28:215:30 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:217:25:217:27 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRFVersion5.java:217:25:217:38 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRFVersion5.java:218:25:218:27 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:220:26:220:28 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRFVersion5.java:220:26:220:39 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRFVersion5.java:221:26:221:28 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:223:29:223:31 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRFVersion5.java:223:29:223:42 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRFVersion5.java:224:29:224:31 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:226:27:226:29 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRFVersion5.java:226:27:226:40 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRFVersion5.java:227:27:227:29 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:229:26:229:28 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRFVersion5.java:229:26:229:39 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRFVersion5.java:230:26:230:28 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:232:25:232:27 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRFVersion5.java:232:25:232:38 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRFVersion5.java:233:25:233:27 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:235:27:235:29 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRFVersion5.java:235:27:235:40 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRFVersion5.java:236:27:236:29 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:239:46:239:48 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:251:30:251:56 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| ApacheHttpSSRFVersion5.java:252:23:252:38 | new URI(...) : URI | semmle.label | new URI(...) : URI | +| ApacheHttpSSRFVersion5.java:252:31:252:37 | uriSink : String | semmle.label | uriSink : String | +| ApacheHttpSSRFVersion5.java:255:44:255:46 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:256:38:256:40 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRFVersion5.java:256:38:256:51 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRFVersion5.java:257:38:257:40 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:259:28:259:30 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRFVersion5.java:259:28:259:41 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRFVersion5.java:260:28:260:30 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:262:25:262:27 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRFVersion5.java:262:25:262:38 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRFVersion5.java:263:25:263:27 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:265:26:265:28 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRFVersion5.java:265:26:265:39 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRFVersion5.java:266:26:266:28 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:268:29:268:31 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRFVersion5.java:268:29:268:42 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRFVersion5.java:269:29:269:31 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:271:27:271:29 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRFVersion5.java:271:27:271:40 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRFVersion5.java:272:27:272:29 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:274:26:274:28 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRFVersion5.java:274:26:274:39 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRFVersion5.java:275:26:275:28 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:277:25:277:27 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRFVersion5.java:277:25:277:38 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRFVersion5.java:278:25:278:27 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:280:27:280:29 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRFVersion5.java:280:27:280:40 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRFVersion5.java:281:27:281:29 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:295:30:295:56 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| ApacheHttpSSRFVersion5.java:296:23:296:38 | new URI(...) : URI | semmle.label | new URI(...) : URI | +| ApacheHttpSSRFVersion5.java:296:31:296:37 | uriSink : String | semmle.label | uriSink : String | +| ApacheHttpSSRFVersion5.java:298:31:298:58 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| ApacheHttpSSRFVersion5.java:299:29:299:50 | new HttpHost(...) : HttpHost | semmle.label | new HttpHost(...) : HttpHost | +| ApacheHttpSSRFVersion5.java:299:42:299:49 | hostSink : String | semmle.label | hostSink : String | +| ApacheHttpSSRFVersion5.java:303:34:303:37 | host | semmle.label | host | +| ApacheHttpSSRFVersion5.java:304:34:304:37 | host | semmle.label | host | +| ApacheHttpSSRFVersion5.java:308:60:308:62 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRFVersion5.java:308:60:308:73 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRFVersion5.java:309:60:309:62 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:313:53:313:55 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRFVersion5.java:313:53:313:66 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRFVersion5.java:314:53:314:55 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:326:30:326:56 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| ApacheHttpSSRFVersion5.java:327:23:327:38 | new URI(...) : URI | semmle.label | new URI(...) : URI | +| ApacheHttpSSRFVersion5.java:327:31:327:37 | uriSink : String | semmle.label | uriSink : String | +| ApacheHttpSSRFVersion5.java:329:31:329:58 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| ApacheHttpSSRFVersion5.java:330:29:330:50 | new HttpHost(...) : HttpHost | semmle.label | new HttpHost(...) : HttpHost | +| ApacheHttpSSRFVersion5.java:330:42:330:49 | hostSink : String | semmle.label | hostSink : String | +| ApacheHttpSSRFVersion5.java:333:42:333:44 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRFVersion5.java:333:42:333:55 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRFVersion5.java:334:42:334:44 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:336:39:336:41 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRFVersion5.java:336:39:336:52 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRFVersion5.java:337:39:337:41 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:339:40:339:42 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRFVersion5.java:339:40:339:53 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRFVersion5.java:340:40:340:42 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:342:43:342:45 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRFVersion5.java:342:43:342:56 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRFVersion5.java:343:43:343:45 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:345:41:345:43 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRFVersion5.java:345:41:345:54 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRFVersion5.java:346:41:346:43 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:348:40:348:42 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRFVersion5.java:348:40:348:53 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRFVersion5.java:349:40:349:42 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:351:39:351:41 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRFVersion5.java:351:39:351:52 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRFVersion5.java:352:39:352:41 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:354:53:354:56 | host | semmle.label | host | +| ApacheHttpSSRFVersion5.java:356:48:356:50 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRFVersion5.java:356:48:356:61 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRFVersion5.java:357:48:357:50 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:359:41:359:43 | uri : URI | semmle.label | uri : URI | +| ApacheHttpSSRFVersion5.java:359:41:359:54 | toString(...) | semmle.label | toString(...) | +| ApacheHttpSSRFVersion5.java:360:41:360:43 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:372:30:372:56 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| ApacheHttpSSRFVersion5.java:373:23:373:38 | new URI(...) : URI | semmle.label | new URI(...) : URI | +| ApacheHttpSSRFVersion5.java:373:31:373:37 | uriSink : String | semmle.label | uriSink : String | +| ApacheHttpSSRFVersion5.java:375:31:375:58 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| ApacheHttpSSRFVersion5.java:376:29:376:50 | new HttpHost(...) : HttpHost | semmle.label | new HttpHost(...) : HttpHost | +| ApacheHttpSSRFVersion5.java:376:42:376:49 | hostSink : String | semmle.label | hostSink : String | +| ApacheHttpSSRFVersion5.java:379:57:379:60 | host | semmle.label | host | +| ApacheHttpSSRFVersion5.java:380:57:380:59 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:381:51:381:54 | host | semmle.label | host | +| ApacheHttpSSRFVersion5.java:382:51:382:53 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:385:50:385:53 | host | semmle.label | host | +| ApacheHttpSSRFVersion5.java:386:50:386:52 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:387:44:387:47 | host | semmle.label | host | +| ApacheHttpSSRFVersion5.java:388:44:388:46 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:390:24:390:26 | uri | semmle.label | uri | +| ApacheHttpSSRFVersion5.java:394:24:394:26 | uri | semmle.label | uri | +| JakartaWsSSRF.java:14:22:14:48 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JakartaWsSSRF.java:15:23:15:25 | url | semmle.label | url | +| JavaNetHttpSSRF.java:25:27:25:53 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JavaNetHttpSSRF.java:26:23:26:35 | new URI(...) : URI | semmle.label | new URI(...) : URI | +| JavaNetHttpSSRF.java:26:31:26:34 | sink : String | semmle.label | sink : String | +| JavaNetHttpSSRF.java:27:24:27:57 | new URI(...) : URI | semmle.label | new URI(...) : URI | +| JavaNetHttpSSRF.java:27:40:27:43 | sink : String | semmle.label | sink : String | +| JavaNetHttpSSRF.java:28:24:28:36 | new URL(...) : URL | semmle.label | new URL(...) : URL | +| JavaNetHttpSSRF.java:28:32:28:35 | sink : String | semmle.label | sink : String | +| JavaNetHttpSSRF.java:30:32:30:35 | url1 | semmle.label | url1 | +| JavaNetHttpSSRF.java:33:32:33:35 | url1 | semmle.label | url1 | +| JavaNetHttpSSRF.java:34:30:34:33 | url1 | semmle.label | url1 | +| JavaNetHttpSSRF.java:38:65:38:68 | uri2 | semmle.label | uri2 | +| JavaNetHttpSSRF.java:39:59:39:61 | uri | semmle.label | uri | +| JaxWsSSRF.java:14:22:14:48 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JaxWsSSRF.java:15:23:15:25 | url | semmle.label | url | +| JdbcUrlSSRF.java:21:26:21:56 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JdbcUrlSSRF.java:26:28:26:34 | jdbcUrl | semmle.label | jdbcUrl | +| JdbcUrlSSRF.java:28:41:28:47 | jdbcUrl | semmle.label | jdbcUrl | +| JdbcUrlSSRF.java:29:41:29:47 | jdbcUrl | semmle.label | jdbcUrl | +| JdbcUrlSSRF.java:30:41:30:47 | jdbcUrl | semmle.label | jdbcUrl | +| JdbcUrlSSRF.java:32:27:32:33 | jdbcUrl | semmle.label | jdbcUrl | +| JdbcUrlSSRF.java:40:26:40:56 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JdbcUrlSSRF.java:43:27:43:33 | jdbcUrl | semmle.label | jdbcUrl | +| JdbcUrlSSRF.java:48:23:48:29 | jdbcUrl | semmle.label | jdbcUrl | +| JdbcUrlSSRF.java:52:9:52:13 | props : Properties | semmle.label | props : Properties | +| JdbcUrlSSRF.java:52:9:52:13 | props [post update] : Properties [] : String | semmle.label | props [post update] : Properties [] : String | +| JdbcUrlSSRF.java:52:38:52:44 | jdbcUrl : String | semmle.label | jdbcUrl : String | +| JdbcUrlSSRF.java:54:49:54:53 | props | semmle.label | props | +| JdbcUrlSSRF.java:60:26:60:56 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JdbcUrlSSRF.java:65:27:65:33 | jdbcUrl | semmle.label | jdbcUrl | +| JdbcUrlSSRF.java:67:75:67:81 | jdbcUrl | semmle.label | jdbcUrl | +| JdbcUrlSSRF.java:70:75:70:81 | jdbcUrl | semmle.label | jdbcUrl | +| JdbcUrlSSRF.java:73:75:73:81 | jdbcUrl | semmle.label | jdbcUrl | +| JdbcUrlSSRF.java:80:26:80:56 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| JdbcUrlSSRF.java:82:21:82:27 | jdbcUrl | semmle.label | jdbcUrl | +| JdbcUrlSSRF.java:83:21:83:27 | jdbcUrl | semmle.label | jdbcUrl | +| JdbcUrlSSRF.java:84:21:84:27 | jdbcUrl | semmle.label | jdbcUrl | +| JdbcUrlSSRF.java:86:19:86:25 | jdbcUrl | semmle.label | jdbcUrl | +| JdbcUrlSSRF.java:87:19:87:25 | jdbcUrl | semmle.label | jdbcUrl | +| JdbcUrlSSRF.java:88:19:88:25 | jdbcUrl | semmle.label | jdbcUrl | +| ReactiveWebClientSSRF.java:15:26:15:52 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| ReactiveWebClientSSRF.java:16:52:16:54 | url | semmle.label | url | +| ReactiveWebClientSSRF.java:32:26:32:52 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| ReactiveWebClientSSRF.java:35:30:35:32 | url | semmle.label | url | +| SanitizationTests.java:19:23:19:58 | new URI(...) : URI | semmle.label | new URI(...) : URI | +| SanitizationTests.java:19:31:19:57 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| SanitizationTests.java:22:29:22:55 | newBuilder(...) : Builder | semmle.label | newBuilder(...) : Builder | +| SanitizationTests.java:22:29:22:63 | build(...) : HttpRequest | semmle.label | build(...) : HttpRequest | +| SanitizationTests.java:22:52:22:54 | uri | semmle.label | uri | +| SanitizationTests.java:22:52:22:54 | uri : URI | semmle.label | uri : URI | +| SanitizationTests.java:23:25:23:25 | r | semmle.label | r | +| SanitizationTests.java:75:33:75:63 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| SanitizationTests.java:76:36:76:78 | newBuilder(...) : Builder | semmle.label | newBuilder(...) : Builder | +| SanitizationTests.java:76:36:76:86 | build(...) : HttpRequest | semmle.label | build(...) : HttpRequest | +| SanitizationTests.java:76:59:76:77 | new URI(...) | semmle.label | new URI(...) | +| SanitizationTests.java:76:59:76:77 | new URI(...) : URI | semmle.label | new URI(...) : URI | +| SanitizationTests.java:76:67:76:76 | unsafeUri3 : String | semmle.label | unsafeUri3 : String | +| SanitizationTests.java:77:25:77:32 | unsafer3 | semmle.label | unsafer3 | +| SanitizationTests.java:79:49:79:79 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| SanitizationTests.java:80:36:80:78 | newBuilder(...) : Builder | semmle.label | newBuilder(...) : Builder | +| SanitizationTests.java:80:36:80:86 | build(...) : HttpRequest | semmle.label | build(...) : HttpRequest | +| SanitizationTests.java:80:59:80:77 | new URI(...) | semmle.label | new URI(...) | +| SanitizationTests.java:80:59:80:77 | new URI(...) : URI | semmle.label | new URI(...) : URI | +| SanitizationTests.java:80:67:80:76 | unsafeUri4 : String | semmle.label | unsafeUri4 : String | +| SanitizationTests.java:81:25:81:32 | unsafer4 | semmle.label | unsafer4 | +| SanitizationTests.java:84:13:84:22 | unsafeUri5 [post update] : StringBuilder | semmle.label | unsafeUri5 [post update] : StringBuilder | +| SanitizationTests.java:84:31:84:61 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| SanitizationTests.java:85:36:85:89 | newBuilder(...) : Builder | semmle.label | newBuilder(...) : Builder | +| SanitizationTests.java:85:36:85:97 | build(...) : HttpRequest | semmle.label | build(...) : HttpRequest | +| SanitizationTests.java:85:59:85:88 | new URI(...) | semmle.label | new URI(...) | +| SanitizationTests.java:85:59:85:88 | new URI(...) : URI | semmle.label | new URI(...) : URI | +| SanitizationTests.java:85:67:85:76 | unsafeUri5 : StringBuilder | semmle.label | unsafeUri5 : StringBuilder | +| SanitizationTests.java:85:67:85:87 | toString(...) : String | semmle.label | toString(...) : String | +| SanitizationTests.java:86:25:86:32 | unsafer5 | semmle.label | unsafer5 | +| SanitizationTests.java:88:40:88:87 | new StringBuilder(...) : StringBuilder | semmle.label | new StringBuilder(...) : StringBuilder | +| SanitizationTests.java:88:58:88:86 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| SanitizationTests.java:90:37:90:90 | newBuilder(...) : Builder | semmle.label | newBuilder(...) : Builder | +| SanitizationTests.java:90:37:90:98 | build(...) : HttpRequest | semmle.label | build(...) : HttpRequest | +| SanitizationTests.java:90:60:90:89 | new URI(...) | semmle.label | new URI(...) | +| SanitizationTests.java:90:60:90:89 | new URI(...) : URI | semmle.label | new URI(...) : URI | +| SanitizationTests.java:90:68:90:77 | unafeUri5a : StringBuilder | semmle.label | unafeUri5a : StringBuilder | +| SanitizationTests.java:90:68:90:88 | toString(...) : String | semmle.label | toString(...) : String | +| SanitizationTests.java:91:25:91:33 | unsafer5a | semmle.label | unsafer5a | +| SanitizationTests.java:93:41:93:105 | append(...) : StringBuilder | semmle.label | append(...) : StringBuilder | +| SanitizationTests.java:93:42:93:89 | new StringBuilder(...) : StringBuilder | semmle.label | new StringBuilder(...) : StringBuilder | +| SanitizationTests.java:93:60:93:88 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| SanitizationTests.java:95:37:95:91 | newBuilder(...) : Builder | semmle.label | newBuilder(...) : Builder | +| SanitizationTests.java:95:37:95:99 | build(...) : HttpRequest | semmle.label | build(...) : HttpRequest | +| SanitizationTests.java:95:60:95:90 | new URI(...) | semmle.label | new URI(...) | +| SanitizationTests.java:95:60:95:90 | new URI(...) : URI | semmle.label | new URI(...) : URI | +| SanitizationTests.java:95:68:95:78 | unsafeUri5b : StringBuilder | semmle.label | unsafeUri5b : StringBuilder | +| SanitizationTests.java:95:68:95:89 | toString(...) : String | semmle.label | toString(...) : String | +| SanitizationTests.java:96:25:96:33 | unsafer5b | semmle.label | unsafer5b | +| SanitizationTests.java:98:41:98:106 | append(...) : StringBuilder | semmle.label | append(...) : StringBuilder | +| SanitizationTests.java:98:77:98:105 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| SanitizationTests.java:100:37:100:91 | newBuilder(...) : Builder | semmle.label | newBuilder(...) : Builder | +| SanitizationTests.java:100:37:100:99 | build(...) : HttpRequest | semmle.label | build(...) : HttpRequest | +| SanitizationTests.java:100:60:100:90 | new URI(...) | semmle.label | new URI(...) | +| SanitizationTests.java:100:60:100:90 | new URI(...) : URI | semmle.label | new URI(...) : URI | +| SanitizationTests.java:100:68:100:78 | unsafeUri5c : StringBuilder | semmle.label | unsafeUri5c : StringBuilder | +| SanitizationTests.java:100:68:100:89 | toString(...) : String | semmle.label | toString(...) : String | +| SanitizationTests.java:101:25:101:33 | unsafer5c | semmle.label | unsafer5c | +| SanitizationTests.java:103:33:103:104 | format(...) : String | semmle.label | format(...) : String | +| SanitizationTests.java:103:33:103:104 | new ..[] { .. } : Object[] [[]] : String | semmle.label | new ..[] { .. } : Object[] [[]] : String | +| SanitizationTests.java:103:73:103:103 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| SanitizationTests.java:104:36:104:78 | newBuilder(...) : Builder | semmle.label | newBuilder(...) : Builder | +| SanitizationTests.java:104:36:104:86 | build(...) : HttpRequest | semmle.label | build(...) : HttpRequest | +| SanitizationTests.java:104:59:104:77 | new URI(...) | semmle.label | new URI(...) | +| SanitizationTests.java:104:59:104:77 | new URI(...) : URI | semmle.label | new URI(...) : URI | +| SanitizationTests.java:104:67:104:76 | unsafeUri6 : String | semmle.label | unsafeUri6 : String | +| SanitizationTests.java:105:25:105:32 | unsafer6 | semmle.label | unsafer6 | +| SanitizationTests.java:107:33:107:110 | format(...) : String | semmle.label | format(...) : String | +| SanitizationTests.java:107:33:107:110 | new ..[] { .. } : Object[] [[]] : String | semmle.label | new ..[] { .. } : Object[] [[]] : String | +| SanitizationTests.java:107:56:107:86 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| SanitizationTests.java:108:36:108:78 | newBuilder(...) : Builder | semmle.label | newBuilder(...) : Builder | +| SanitizationTests.java:108:36:108:86 | build(...) : HttpRequest | semmle.label | build(...) : HttpRequest | +| SanitizationTests.java:108:59:108:77 | new URI(...) | semmle.label | new URI(...) | +| SanitizationTests.java:108:59:108:77 | new URI(...) : URI | semmle.label | new URI(...) : URI | +| SanitizationTests.java:108:67:108:76 | unsafeUri7 : String | semmle.label | unsafeUri7 : String | +| SanitizationTests.java:109:25:109:32 | unsafer7 | semmle.label | unsafer7 | +| SanitizationTests.java:111:33:111:110 | format(...) : String | semmle.label | format(...) : String | +| SanitizationTests.java:111:33:111:110 | new ..[] { .. } : Object[] [[]] : String | semmle.label | new ..[] { .. } : Object[] [[]] : String | +| SanitizationTests.java:111:55:111:85 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| SanitizationTests.java:112:36:112:78 | newBuilder(...) : Builder | semmle.label | newBuilder(...) : Builder | +| SanitizationTests.java:112:36:112:86 | build(...) : HttpRequest | semmle.label | build(...) : HttpRequest | +| SanitizationTests.java:112:59:112:77 | new URI(...) | semmle.label | new URI(...) | +| SanitizationTests.java:112:59:112:77 | new URI(...) : URI | semmle.label | new URI(...) : URI | +| SanitizationTests.java:112:67:112:76 | unsafeUri8 : String | semmle.label | unsafeUri8 : String | +| SanitizationTests.java:113:25:113:32 | unsafer8 | semmle.label | unsafer8 | +| SanitizationTests.java:115:33:115:63 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| SanitizationTests.java:116:36:116:78 | newBuilder(...) : Builder | semmle.label | newBuilder(...) : Builder | +| SanitizationTests.java:116:36:116:86 | build(...) : HttpRequest | semmle.label | build(...) : HttpRequest | +| SanitizationTests.java:116:59:116:77 | new URI(...) | semmle.label | new URI(...) | +| SanitizationTests.java:116:59:116:77 | new URI(...) : URI | semmle.label | new URI(...) : URI | +| SanitizationTests.java:116:67:116:76 | unsafeUri9 : String | semmle.label | unsafeUri9 : String | +| SanitizationTests.java:117:25:117:32 | unsafer9 | semmle.label | unsafer9 | +| SanitizationTests.java:119:34:119:126 | format(...) : String | semmle.label | format(...) : String | +| SanitizationTests.java:119:34:119:126 | new ..[] { .. } : Object[] [[]] : String | semmle.label | new ..[] { .. } : Object[] [[]] : String | +| SanitizationTests.java:119:94:119:125 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| SanitizationTests.java:120:37:120:80 | newBuilder(...) : Builder | semmle.label | newBuilder(...) : Builder | +| SanitizationTests.java:120:37:120:88 | build(...) : HttpRequest | semmle.label | build(...) : HttpRequest | +| SanitizationTests.java:120:60:120:79 | new URI(...) | semmle.label | new URI(...) | +| SanitizationTests.java:120:60:120:79 | new URI(...) : URI | semmle.label | new URI(...) : URI | +| SanitizationTests.java:120:68:120:78 | unsafeUri10 : String | semmle.label | unsafeUri10 : String | +| SanitizationTests.java:121:25:121:33 | unsafer10 | semmle.label | unsafer10 | +| SpringSSRF.java:28:33:28:60 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| SpringSSRF.java:32:39:32:59 | ... + ... | semmle.label | ... + ... | +| SpringSSRF.java:33:35:33:48 | fooResourceUrl | semmle.label | fooResourceUrl | +| SpringSSRF.java:34:34:34:47 | fooResourceUrl | semmle.label | fooResourceUrl | +| SpringSSRF.java:35:39:35:52 | fooResourceUrl | semmle.label | fooResourceUrl | +| SpringSSRF.java:36:69:36:82 | fooResourceUrl | semmle.label | fooResourceUrl | +| SpringSSRF.java:37:73:37:86 | fooResourceUrl | semmle.label | fooResourceUrl | +| SpringSSRF.java:40:69:40:97 | of(...) | semmle.label | of(...) | +| SpringSSRF.java:40:83:40:96 | fooResourceUrl : String | semmle.label | fooResourceUrl : String | +| SpringSSRF.java:42:69:42:119 | of(...) | semmle.label | of(...) | +| SpringSSRF.java:42:105:42:118 | fooResourceUrl : String | semmle.label | fooResourceUrl : String | +| SpringSSRF.java:44:41:44:54 | fooResourceUrl | semmle.label | fooResourceUrl | +| SpringSSRF.java:45:40:45:62 | new URI(...) | semmle.label | new URI(...) | +| SpringSSRF.java:45:48:45:61 | fooResourceUrl : String | semmle.label | fooResourceUrl : String | +| SpringSSRF.java:46:42:46:55 | fooResourceUrl | semmle.label | fooResourceUrl | +| SpringSSRF.java:47:40:47:53 | fooResourceUrl | semmle.label | fooResourceUrl | +| SpringSSRF.java:48:30:48:43 | fooResourceUrl | semmle.label | fooResourceUrl | +| SpringSSRF.java:49:33:49:46 | fooResourceUrl | semmle.label | fooResourceUrl | +| SpringSSRF.java:50:41:50:54 | fooResourceUrl | semmle.label | fooResourceUrl | +| SpringSSRF.java:51:42:51:55 | fooResourceUrl | semmle.label | fooResourceUrl | +| SpringSSRF.java:54:27:54:49 | new URI(...) : URI | semmle.label | new URI(...) : URI | +| SpringSSRF.java:54:35:54:48 | fooResourceUrl : String | semmle.label | fooResourceUrl : String | +| SpringSSRF.java:56:44:56:46 | uri | semmle.label | uri | +| SpringSSRF.java:58:35:58:37 | uri | semmle.label | uri | +| SpringSSRF.java:59:35:59:37 | uri | semmle.label | uri | +| SpringSSRF.java:60:38:60:40 | uri | semmle.label | uri | +| SpringSSRF.java:61:39:61:41 | uri | semmle.label | uri | +| SpringSSRF.java:62:37:62:39 | uri | semmle.label | uri | +| SpringSSRF.java:63:36:63:38 | uri | semmle.label | uri | +| SpringSSRF.java:64:44:64:46 | uri | semmle.label | uri | +| SpringSSRF.java:67:27:67:49 | new URI(...) : URI | semmle.label | new URI(...) : URI | +| SpringSSRF.java:67:35:67:48 | fooResourceUrl : String | semmle.label | fooResourceUrl : String | +| SpringSSRF.java:70:49:70:51 | uri | semmle.label | uri | +| SpringSSRF.java:71:58:71:60 | uri | semmle.label | uri | +| SpringSSRF.java:72:57:72:59 | uri | semmle.label | uri | +| SpringSSRF.java:73:66:73:68 | uri | semmle.label | uri | +| SpringSSRF.java:74:57:74:59 | uri | semmle.label | uri | +| SpringSSRF.java:75:66:75:68 | uri | semmle.label | uri | +| URLClassLoaderSSRF.java:16:26:16:52 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| URLClassLoaderSSRF.java:17:23:17:34 | new URI(...) : URI | semmle.label | new URI(...) : URI | +| URLClassLoaderSSRF.java:17:31:17:33 | url : String | semmle.label | url : String | +| URLClassLoaderSSRF.java:18:64:18:85 | new URL[] | semmle.label | new URL[] | +| URLClassLoaderSSRF.java:18:64:18:85 | {...} : URL[] [[]] : URL | semmle.label | {...} : URL[] [[]] : URL | +| URLClassLoaderSSRF.java:18:74:18:76 | uri : URI | semmle.label | uri : URI | +| URLClassLoaderSSRF.java:18:74:18:84 | toURL(...) : URL | semmle.label | toURL(...) : URL | +| URLClassLoaderSSRF.java:28:26:28:52 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| URLClassLoaderSSRF.java:29:23:29:34 | new URI(...) : URI | semmle.label | new URI(...) : URI | +| URLClassLoaderSSRF.java:29:31:29:33 | url : String | semmle.label | url : String | +| URLClassLoaderSSRF.java:30:64:30:85 | new URL[] | semmle.label | new URL[] | +| URLClassLoaderSSRF.java:30:64:30:85 | {...} : URL[] [[]] : URL | semmle.label | {...} : URL[] [[]] : URL | +| URLClassLoaderSSRF.java:30:74:30:76 | uri : URI | semmle.label | uri : URI | +| URLClassLoaderSSRF.java:30:74:30:84 | toURL(...) : URL | semmle.label | toURL(...) : URL | +| URLClassLoaderSSRF.java:40:26:40:52 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| URLClassLoaderSSRF.java:41:23:41:34 | new URI(...) : URI | semmle.label | new URI(...) : URI | +| URLClassLoaderSSRF.java:41:31:41:33 | url : String | semmle.label | url : String | +| URLClassLoaderSSRF.java:44:64:44:85 | new URL[] | semmle.label | new URL[] | +| URLClassLoaderSSRF.java:44:64:44:85 | {...} : URL[] [[]] : URL | semmle.label | {...} : URL[] [[]] : URL | +| URLClassLoaderSSRF.java:44:74:44:76 | uri : URI | semmle.label | uri : URI | +| URLClassLoaderSSRF.java:44:74:44:84 | toURL(...) : URL | semmle.label | toURL(...) : URL | +| URLClassLoaderSSRF.java:54:26:54:52 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| URLClassLoaderSSRF.java:55:23:55:34 | new URI(...) : URI | semmle.label | new URI(...) : URI | +| URLClassLoaderSSRF.java:55:31:55:33 | url : String | semmle.label | url : String | +| URLClassLoaderSSRF.java:56:72:56:93 | new URL[] | semmle.label | new URL[] | +| URLClassLoaderSSRF.java:56:72:56:93 | {...} : URL[] [[]] : URL | semmle.label | {...} : URL[] [[]] : URL | +| URLClassLoaderSSRF.java:56:82:56:84 | uri : URI | semmle.label | uri : URI | +| URLClassLoaderSSRF.java:56:82:56:92 | toURL(...) : URL | semmle.label | toURL(...) : URL | +| URLClassLoaderSSRF.java:66:26:66:52 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| URLClassLoaderSSRF.java:67:23:67:34 | new URI(...) : URI | semmle.label | new URI(...) : URI | +| URLClassLoaderSSRF.java:67:31:67:33 | url : String | semmle.label | url : String | +| URLClassLoaderSSRF.java:70:21:70:42 | new URL[] | semmle.label | new URL[] | +| URLClassLoaderSSRF.java:70:21:70:42 | {...} : URL[] [[]] : URL | semmle.label | {...} : URL[] [[]] : URL | +| URLClassLoaderSSRF.java:70:31:70:33 | uri : URI | semmle.label | uri : URI | +| URLClassLoaderSSRF.java:70:31:70:41 | toURL(...) : URL | semmle.label | toURL(...) : URL | +| URLClassLoaderSSRF.java:83:26:83:52 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| URLClassLoaderSSRF.java:84:23:84:34 | new URI(...) : URI | semmle.label | new URI(...) : URI | +| URLClassLoaderSSRF.java:84:31:84:33 | url : String | semmle.label | url : String | +| URLClassLoaderSSRF.java:89:21:89:42 | new URL[] | semmle.label | new URL[] | +| URLClassLoaderSSRF.java:89:21:89:42 | {...} : URL[] [[]] : URL | semmle.label | {...} : URL[] [[]] : URL | +| URLClassLoaderSSRF.java:89:31:89:33 | uri : URI | semmle.label | uri : URI | +| URLClassLoaderSSRF.java:89:31:89:41 | toURL(...) : URL | semmle.label | toURL(...) : URL | +| mad/Test.java:26:16:26:41 | getParameter(...) : String | semmle.label | getParameter(...) : String | +| mad/Test.java:31:24:31:47 | (...)... | semmle.label | (...)... | +| mad/Test.java:31:40:31:47 | source(...) : String | semmle.label | source(...) : String | +| mad/Test.java:36:10:36:23 | (...)... | semmle.label | (...)... | +| mad/Test.java:36:16:36:23 | source(...) : String | semmle.label | source(...) : String | +| mad/Test.java:38:28:38:43 | (...)... | semmle.label | (...)... | +| mad/Test.java:38:36:38:43 | source(...) : String | semmle.label | source(...) : String | +| mad/Test.java:40:10:40:23 | (...)... | semmle.label | (...)... | +| mad/Test.java:40:16:40:23 | source(...) : String | semmle.label | source(...) : String | +| mad/Test.java:45:32:45:47 | (...)... | semmle.label | (...)... | +| mad/Test.java:45:40:45:47 | source(...) : String | semmle.label | source(...) : String | +| mad/Test.java:47:32:47:47 | (...)... | semmle.label | (...)... | +| mad/Test.java:47:40:47:47 | source(...) : String | semmle.label | source(...) : String | +| mad/Test.java:49:28:49:43 | (...)... | semmle.label | (...)... | +| mad/Test.java:49:36:49:43 | source(...) : String | semmle.label | source(...) : String | +| mad/Test.java:51:28:51:43 | (...)... | semmle.label | (...)... | +| mad/Test.java:51:36:51:43 | source(...) : String | semmle.label | source(...) : String | +| mad/Test.java:53:28:53:43 | (...)... | semmle.label | (...)... | +| mad/Test.java:53:36:53:43 | source(...) : String | semmle.label | source(...) : String | +| mad/Test.java:55:36:55:51 | (...)... | semmle.label | (...)... | +| mad/Test.java:55:44:55:51 | source(...) : String | semmle.label | source(...) : String | +| mad/Test.java:57:32:57:45 | (...)... | semmle.label | (...)... | +| mad/Test.java:57:38:57:45 | source(...) : String | semmle.label | source(...) : String | +| mad/Test.java:59:38:59:51 | (...)... | semmle.label | (...)... | +| mad/Test.java:59:44:59:51 | source(...) : String | semmle.label | source(...) : String | +| mad/Test.java:61:47:61:60 | (...)... | semmle.label | (...)... | +| mad/Test.java:61:53:61:60 | source(...) : String | semmle.label | source(...) : String | +| mad/Test.java:63:26:63:39 | (...)... | semmle.label | (...)... | +| mad/Test.java:63:32:63:39 | source(...) : String | semmle.label | source(...) : String | +| mad/Test.java:65:38:65:51 | (...)... | semmle.label | (...)... | +| mad/Test.java:65:44:65:51 | source(...) : String | semmle.label | source(...) : String | +| mad/Test.java:67:26:67:39 | (...)... | semmle.label | (...)... | +| mad/Test.java:67:32:67:39 | source(...) : String | semmle.label | source(...) : String | +| mad/Test.java:69:27:69:40 | (...)... | semmle.label | (...)... | +| mad/Test.java:69:33:69:40 | source(...) : String | semmle.label | source(...) : String | +| mad/Test.java:71:47:71:60 | (...)... | semmle.label | (...)... | +| mad/Test.java:71:53:71:60 | source(...) : String | semmle.label | source(...) : String | +| mad/Test.java:74:50:74:65 | (...)... | semmle.label | (...)... | +| mad/Test.java:74:58:74:65 | source(...) : String | semmle.label | source(...) : String | +| mad/Test.java:76:50:76:69 | (...)... | semmle.label | (...)... | +| mad/Test.java:76:62:76:69 | source(...) : String | semmle.label | source(...) : String | +| mad/Test.java:78:43:78:59 | (...)... | semmle.label | (...)... | +| mad/Test.java:78:52:78:59 | source(...) : String | semmle.label | source(...) : String | +| mad/Test.java:80:25:80:41 | (...)... | semmle.label | (...)... | +| mad/Test.java:80:34:80:41 | source(...) : String | semmle.label | source(...) : String | +| mad/Test.java:82:31:82:47 | (...)... | semmle.label | (...)... | +| mad/Test.java:82:40:82:47 | source(...) : String | semmle.label | source(...) : String | +| mad/Test.java:84:31:84:47 | (...)... | semmle.label | (...)... | +| mad/Test.java:84:40:84:47 | source(...) : String | semmle.label | source(...) : String | +| mad/Test.java:86:41:86:57 | (...)... | semmle.label | (...)... | +| mad/Test.java:86:50:86:57 | source(...) : String | semmle.label | source(...) : String | +| mad/Test.java:92:24:92:40 | (...)... | semmle.label | (...)... | +| mad/Test.java:92:33:92:40 | source(...) : String | semmle.label | source(...) : String | +| mad/Test.java:97:29:97:42 | (...)... | semmle.label | (...)... | +| mad/Test.java:97:35:97:42 | source(...) : String | semmle.label | source(...) : String | +| mad/Test.java:102:26:102:39 | (...)... | semmle.label | (...)... | +| mad/Test.java:102:32:102:39 | source(...) : String | semmle.label | source(...) : String | +| mad/Test.java:107:15:107:31 | (...)... | semmle.label | (...)... | +| mad/Test.java:107:24:107:31 | source(...) : String | semmle.label | source(...) : String | +| mad/Test.java:112:15:112:31 | (...)... | semmle.label | (...)... | +| mad/Test.java:112:24:112:31 | source(...) : String | semmle.label | source(...) : String | +subpaths diff --git a/java/ql/test/query-tests/security/CWE-918/RequestForgery.ql b/java/ql/test/query-tests/security/CWE-918/RequestForgery.ql deleted file mode 100644 index 971a9532bd6..00000000000 --- a/java/ql/test/query-tests/security/CWE-918/RequestForgery.ql +++ /dev/null @@ -1,19 +0,0 @@ -import java -import semmle.code.java.security.RequestForgeryConfig -import utils.test.InlineExpectationsTest - -module HasFlowTest implements TestSig { - string getARelevantTag() { result = "SSRF" } - - predicate hasActualResult(Location location, string element, string tag, string value) { - tag = "SSRF" and - exists(DataFlow::Node sink | - RequestForgeryFlow::flowTo(sink) and - sink.getLocation() = location and - element = sink.toString() and - value = "" - ) - } -} - -import MakeTest diff --git a/java/ql/test/query-tests/security/CWE-918/RequestForgery.qlref b/java/ql/test/query-tests/security/CWE-918/RequestForgery.qlref new file mode 100644 index 00000000000..be2312049e7 --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-918/RequestForgery.qlref @@ -0,0 +1,4 @@ +query: Security/CWE/CWE-918/RequestForgery.ql +postprocess: + - utils/test/PrettyPrintModels.ql + - utils/test/InlineExpectationsTestQuery.ql diff --git a/java/ql/test/query-tests/security/CWE-918/SanitizationTests.java b/java/ql/test/query-tests/security/CWE-918/SanitizationTests.java index 33df1a58630..03a61cfcf97 100644 --- a/java/ql/test/query-tests/security/CWE-918/SanitizationTests.java +++ b/java/ql/test/query-tests/security/CWE-918/SanitizationTests.java @@ -16,11 +16,11 @@ public class SanitizationTests extends HttpServlet { throws ServletException, IOException { try { - URI uri = new URI(request.getParameter("uri")); + URI uri = new URI(request.getParameter("uri")); // $ Source // BAD: a request parameter is incorporated without validation into a Http // request - HttpRequest r = HttpRequest.newBuilder(uri).build(); // $ SSRF - client.send(r, null); // $ SSRF + HttpRequest r = HttpRequest.newBuilder(uri).build(); // $ Alert + client.send(r, null); // $ Alert // GOOD: sanitisation by concatenation with a prefix that prevents targeting an arbitrary host. // We test a few different ways of sanitisation: via string conctentation (perhaps nested), @@ -72,55 +72,55 @@ public class SanitizationTests extends HttpServlet { // BAD: cases where a string that would sanitise is used, but occurs in the wrong // place to sanitise user input: - String unsafeUri3 = request.getParameter("baduri3") + "https://example.com/"; - HttpRequest unsafer3 = HttpRequest.newBuilder(new URI(unsafeUri3)).build(); // $ SSRF - client.send(unsafer3, null); // $ SSRF + String unsafeUri3 = request.getParameter("baduri3") + "https://example.com/"; // $ Source + HttpRequest unsafer3 = HttpRequest.newBuilder(new URI(unsafeUri3)).build(); // $ Alert + client.send(unsafer3, null); // $ Alert - String unsafeUri4 = ("someprefix" + request.getParameter("baduri4")) + "https://example.com/"; - HttpRequest unsafer4 = HttpRequest.newBuilder(new URI(unsafeUri4)).build(); // $ SSRF - client.send(unsafer4, null); // $ SSRF + String unsafeUri4 = ("someprefix" + request.getParameter("baduri4")) + "https://example.com/"; // $ Source + HttpRequest unsafer4 = HttpRequest.newBuilder(new URI(unsafeUri4)).build(); // $ Alert + client.send(unsafer4, null); // $ Alert StringBuilder unsafeUri5 = new StringBuilder(); - unsafeUri5.append(request.getParameter("baduri5")).append("https://example.com/"); - HttpRequest unsafer5 = HttpRequest.newBuilder(new URI(unsafeUri5.toString())).build(); // $ SSRF - client.send(unsafer5, null); // $ SSRF + unsafeUri5.append(request.getParameter("baduri5")).append("https://example.com/"); // $ Source + HttpRequest unsafer5 = HttpRequest.newBuilder(new URI(unsafeUri5.toString())).build(); // $ Alert + client.send(unsafer5, null); // $ Alert - StringBuilder unafeUri5a = new StringBuilder(request.getParameter("uri5a")); + StringBuilder unafeUri5a = new StringBuilder(request.getParameter("uri5a")); // $ Source unafeUri5a.append("https://example.com/"); - HttpRequest unsafer5a = HttpRequest.newBuilder(new URI(unafeUri5a.toString())).build(); // $ SSRF - client.send(unsafer5a, null); // $ SSRF + HttpRequest unsafer5a = HttpRequest.newBuilder(new URI(unafeUri5a.toString())).build(); // $ Alert + client.send(unsafer5a, null); // $ Alert - StringBuilder unsafeUri5b = (new StringBuilder(request.getParameter("uri5b"))).append("dir/"); + StringBuilder unsafeUri5b = (new StringBuilder(request.getParameter("uri5b"))).append("dir/"); // $ Source unsafeUri5b.append("https://example.com/"); - HttpRequest unsafer5b = HttpRequest.newBuilder(new URI(unsafeUri5b.toString())).build(); // $ SSRF - client.send(unsafer5b, null); // $ SSRF + HttpRequest unsafer5b = HttpRequest.newBuilder(new URI(unsafeUri5b.toString())).build(); // $ Alert + client.send(unsafer5b, null); // $ Alert - StringBuilder unsafeUri5c = (new StringBuilder("https")).append(request.getParameter("uri5c")); + StringBuilder unsafeUri5c = (new StringBuilder("https")).append(request.getParameter("uri5c")); // $ Source unsafeUri5c.append("://example.com/dir/"); - HttpRequest unsafer5c = HttpRequest.newBuilder(new URI(unsafeUri5c.toString())).build(); // $ SSRF - client.send(unsafer5c, null); // $ SSRF + HttpRequest unsafer5c = HttpRequest.newBuilder(new URI(unsafeUri5c.toString())).build(); // $ Alert + client.send(unsafer5c, null); // $ Alert - String unsafeUri6 = String.format("%shttps://example.com/", request.getParameter("baduri6")); - HttpRequest unsafer6 = HttpRequest.newBuilder(new URI(unsafeUri6)).build(); // $ SSRF - client.send(unsafer6, null); // $ SSRF + String unsafeUri6 = String.format("%shttps://example.com/", request.getParameter("baduri6")); // $ Source + HttpRequest unsafer6 = HttpRequest.newBuilder(new URI(unsafeUri6)).build(); // $ Alert + client.send(unsafer6, null); // $ Alert - String unsafeUri7 = String.format("%s/%s", request.getParameter("baduri7"), "https://example.com"); - HttpRequest unsafer7 = HttpRequest.newBuilder(new URI(unsafeUri7)).build(); // $ SSRF - client.send(unsafer7, null); // $ SSRF + String unsafeUri7 = String.format("%s/%s", request.getParameter("baduri7"), "https://example.com"); // $ Source + HttpRequest unsafer7 = HttpRequest.newBuilder(new URI(unsafeUri7)).build(); // $ Alert + client.send(unsafer7, null); // $ Alert - String unsafeUri8 = String.format("%s%s", request.getParameter("baduri8"), "https://example.com/"); - HttpRequest unsafer8 = HttpRequest.newBuilder(new URI(unsafeUri8)).build(); // $ SSRF - client.send(unsafer8, null); // $ SSRF + String unsafeUri8 = String.format("%s%s", request.getParameter("baduri8"), "https://example.com/"); // $ Source + HttpRequest unsafer8 = HttpRequest.newBuilder(new URI(unsafeUri8)).build(); // $ Alert + client.send(unsafer8, null); // $ Alert - String unsafeUri9 = request.getParameter("baduri9") + "/" + String.format("http://%s", "myserver.com"); - HttpRequest unsafer9 = HttpRequest.newBuilder(new URI(unsafeUri9)).build(); // $ SSRF - client.send(unsafer9, null); // $ SSRF + String unsafeUri9 = request.getParameter("baduri9") + "/" + String.format("http://%s", "myserver.com"); // $ Source + HttpRequest unsafer9 = HttpRequest.newBuilder(new URI(unsafeUri9)).build(); // $ Alert + client.send(unsafer9, null); // $ Alert - String unsafeUri10 = String.format("%s://%s:%s%s", "http", "myserver.com", "80", request.getParameter("baduri10")); - HttpRequest unsafer10 = HttpRequest.newBuilder(new URI(unsafeUri10)).build(); // $ SSRF - client.send(unsafer10, null); // $ SSRF + String unsafeUri10 = String.format("%s://%s:%s%s", "http", "myserver.com", "80", request.getParameter("baduri10")); // $ Source + HttpRequest unsafer10 = HttpRequest.newBuilder(new URI(unsafeUri10)).build(); // $ Alert + client.send(unsafer10, null); // $ Alert } catch (Exception e) { // TODO: handle exception } } -} \ No newline at end of file +} diff --git a/java/ql/test/query-tests/security/CWE-918/SpringSSRF.java b/java/ql/test/query-tests/security/CWE-918/SpringSSRF.java index 895c68eda69..446e774214d 100644 --- a/java/ql/test/query-tests/security/CWE-918/SpringSSRF.java +++ b/java/ql/test/query-tests/security/CWE-918/SpringSSRF.java @@ -25,54 +25,54 @@ public class SpringSSRF extends HttpServlet { protected void doGet(HttpServletRequest request2, HttpServletResponse response2) throws ServletException, IOException { - String fooResourceUrl = request2.getParameter("uri");; + String fooResourceUrl = request2.getParameter("uri"); // $ Source RestTemplate restTemplate = new RestTemplate(); HttpEntity request = new HttpEntity<>(new String("bar")); try { - restTemplate.getForEntity(fooResourceUrl + "/1", String.class); // $ SSRF - restTemplate.exchange(fooResourceUrl, HttpMethod.POST, request, String.class); // $ SSRF - restTemplate.execute(fooResourceUrl, HttpMethod.POST, null, null, "test"); // $ SSRF - restTemplate.getForObject(fooResourceUrl, String.class, "test"); // $ SSRF - restTemplate.getForObject("http://{foo}", String.class, fooResourceUrl); // $ SSRF - restTemplate.getForObject("http://{foo}/a/b", String.class, fooResourceUrl); // $ SSRF + restTemplate.getForEntity(fooResourceUrl + "/1", String.class); // $ Alert + restTemplate.exchange(fooResourceUrl, HttpMethod.POST, request, String.class); // $ Alert + restTemplate.execute(fooResourceUrl, HttpMethod.POST, null, null, "test"); // $ Alert + restTemplate.getForObject(fooResourceUrl, String.class, "test"); // $ Alert + restTemplate.getForObject("http://{foo}", String.class, fooResourceUrl); // $ Alert + restTemplate.getForObject("http://{foo}/a/b", String.class, fooResourceUrl); // $ Alert restTemplate.getForObject("http://safe.com/{foo}", String.class, fooResourceUrl); // not bad - the tainted value does not affect the host restTemplate.getForObject("http://{foo}", String.class, "safe.com", fooResourceUrl); // not bad - the tainted value is unused - restTemplate.getForObject("http://{foo}", String.class, Map.of("foo", fooResourceUrl)); // $ SSRF + restTemplate.getForObject("http://{foo}", String.class, Map.of("foo", fooResourceUrl)); // $ Alert restTemplate.getForObject("http://safe.com/{foo}", String.class, Map.of("foo", fooResourceUrl)); // not bad - the tainted value does not affect the host - restTemplate.getForObject("http://{foo}", String.class, Map.of("foo", "safe.com", "unused", fooResourceUrl)); // $ SPURIOUS: SSRF // not bad - the key for the tainted value is unused + restTemplate.getForObject("http://{foo}", String.class, Map.of("foo", "safe.com", "unused", fooResourceUrl)); // $ SPURIOUS: Alert // not bad - the key for the tainted value is unused restTemplate.getForObject("http://{foo}", String.class, Map.of("foo", "safe.com", fooResourceUrl, "unused")); // not bad - the tainted value is in a map key - restTemplate.patchForObject(fooResourceUrl, new String("object"), String.class, "hi"); // $ SSRF - restTemplate.postForEntity(new URI(fooResourceUrl), new String("object"), String.class); // $ SSRF - restTemplate.postForLocation(fooResourceUrl, new String("object")); // $ SSRF - restTemplate.postForObject(fooResourceUrl, new String("object"), String.class); // $ SSRF - restTemplate.put(fooResourceUrl, new String("object")); // $ SSRF - restTemplate.delete(fooResourceUrl); // $ SSRF - restTemplate.headForHeaders(fooResourceUrl); // $ SSRF - restTemplate.optionsForAllow(fooResourceUrl); // $ SSRF + restTemplate.patchForObject(fooResourceUrl, new String("object"), String.class, "hi"); // $ Alert + restTemplate.postForEntity(new URI(fooResourceUrl), new String("object"), String.class); // $ Alert + restTemplate.postForLocation(fooResourceUrl, new String("object")); // $ Alert + restTemplate.postForObject(fooResourceUrl, new String("object"), String.class); // $ Alert + restTemplate.put(fooResourceUrl, new String("object")); // $ Alert + restTemplate.delete(fooResourceUrl); // $ Alert + restTemplate.headForHeaders(fooResourceUrl); // $ Alert + restTemplate.optionsForAllow(fooResourceUrl); // $ Alert { String body = new String("body"); URI uri = new URI(fooResourceUrl); RequestEntity requestEntity = - RequestEntity.post(uri).body(body); // $ SSRF + RequestEntity.post(uri).body(body); // $ Alert ResponseEntity response = restTemplate.exchange(requestEntity, String.class); - RequestEntity.get(uri); // $ SSRF - RequestEntity.put(uri); // $ SSRF - RequestEntity.delete(uri); // $ SSRF - RequestEntity.options(uri); // $ SSRF - RequestEntity.patch(uri); // $ SSRF - RequestEntity.head(uri); // $ SSRF - RequestEntity.method(null, uri); // $ SSRF + RequestEntity.get(uri); // $ Alert + RequestEntity.put(uri); // $ Alert + RequestEntity.delete(uri); // $ Alert + RequestEntity.options(uri); // $ Alert + RequestEntity.patch(uri); // $ Alert + RequestEntity.head(uri); // $ Alert + RequestEntity.method(null, uri); // $ Alert } { URI uri = new URI(fooResourceUrl); MultiValueMap headers = null; java.lang.reflect.Type type = null; - new RequestEntity(null, uri); // $ SSRF - new RequestEntity(headers, null, uri); // $ SSRF - new RequestEntity("body", null, uri); // $ SSRF - new RequestEntity("body", headers, null, uri); // $ SSRF - new RequestEntity("body", null, uri, type); // $ SSRF - new RequestEntity("body", headers, null, uri, type); // $ SSRF + new RequestEntity(null, uri); // $ Alert + new RequestEntity(headers, null, uri); // $ Alert + new RequestEntity("body", null, uri); // $ Alert + new RequestEntity("body", headers, null, uri); // $ Alert + new RequestEntity("body", null, uri, type); // $ Alert + new RequestEntity("body", headers, null, uri, type); // $ Alert } } catch (org.springframework.web.client.RestClientException | java.net.URISyntaxException e) {} } diff --git a/java/ql/test/query-tests/security/CWE-918/URLClassLoaderSSRF.java b/java/ql/test/query-tests/security/CWE-918/URLClassLoaderSSRF.java index 84d53f797be..64070c76598 100644 --- a/java/ql/test/query-tests/security/CWE-918/URLClassLoaderSSRF.java +++ b/java/ql/test/query-tests/security/CWE-918/URLClassLoaderSSRF.java @@ -13,9 +13,9 @@ public class URLClassLoaderSSRF extends HttpServlet { protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { try { - String url = request.getParameter("uri"); + String url = request.getParameter("uri"); // $ Source URI uri = new URI(url); - URLClassLoader urlClassLoader = new URLClassLoader(new URL[]{uri.toURL()}); // $ SSRF + URLClassLoader urlClassLoader = new URLClassLoader(new URL[]{uri.toURL()}); // $ Alert Class test = urlClassLoader.loadClass("test"); } catch (Exception e) { // Ignore @@ -25,9 +25,9 @@ public class URLClassLoaderSSRF extends HttpServlet { protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { try { - String url = request.getParameter("uri"); + String url = request.getParameter("uri"); // $ Source URI uri = new URI(url); - URLClassLoader urlClassLoader = new URLClassLoader(new URL[]{uri.toURL()}, URLClassLoaderSSRF.class.getClassLoader()); // $ SSRF + URLClassLoader urlClassLoader = new URLClassLoader(new URL[]{uri.toURL()}, URLClassLoaderSSRF.class.getClassLoader()); // $ Alert Class test = urlClassLoader.loadClass("test"); } catch (Exception e) { // Ignore @@ -37,11 +37,11 @@ public class URLClassLoaderSSRF extends HttpServlet { protected void doPut(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { try { - String url = request.getParameter("uri"); + String url = request.getParameter("uri"); // $ Source URI uri = new URI(url); URLStreamHandlerFactory urlStreamHandlerFactory = null; - URLClassLoader urlClassLoader = new URLClassLoader(new URL[]{uri.toURL()}, URLClassLoaderSSRF.class.getClassLoader(), urlStreamHandlerFactory); // $ SSRF + URLClassLoader urlClassLoader = new URLClassLoader(new URL[]{uri.toURL()}, URLClassLoaderSSRF.class.getClassLoader(), urlStreamHandlerFactory); // $ Alert urlClassLoader.findResource("test"); } catch (Exception e) { // Ignore @@ -51,9 +51,9 @@ public class URLClassLoaderSSRF extends HttpServlet { protected void doDelete(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { try { - String url = request.getParameter("uri"); + String url = request.getParameter("uri"); // $ Source URI uri = new URI(url); - URLClassLoader urlClassLoader = URLClassLoader.newInstance(new URL[]{uri.toURL()}); // $ SSRF + URLClassLoader urlClassLoader = URLClassLoader.newInstance(new URL[]{uri.toURL()}); // $ Alert urlClassLoader.getResourceAsStream("test"); } catch (Exception e) { // Ignore @@ -63,11 +63,11 @@ public class URLClassLoaderSSRF extends HttpServlet { protected void doOptions(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { try { - String url = request.getParameter("uri"); + String url = request.getParameter("uri"); // $ Source URI uri = new URI(url); URLClassLoader urlClassLoader = new URLClassLoader("testClassLoader", - new URL[]{uri.toURL()}, // $ SSRF + new URL[]{uri.toURL()}, // $ Alert URLClassLoaderSSRF.class.getClassLoader() ); @@ -80,13 +80,13 @@ public class URLClassLoaderSSRF extends HttpServlet { protected void doTrace(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { try { - String url = request.getParameter("uri"); + String url = request.getParameter("uri"); // $ Source URI uri = new URI(url); URLStreamHandlerFactory urlStreamHandlerFactory = null; URLClassLoader urlClassLoader = new URLClassLoader("testClassLoader", - new URL[]{uri.toURL()}, // $ SSRF + new URL[]{uri.toURL()}, // $ Alert URLClassLoaderSSRF.class.getClassLoader(), urlStreamHandlerFactory ); @@ -96,4 +96,4 @@ public class URLClassLoaderSSRF extends HttpServlet { // Ignore } } -} \ No newline at end of file +} diff --git a/java/ql/test/query-tests/security/CWE-918/mad/Test.java b/java/ql/test/query-tests/security/CWE-918/mad/Test.java index 5bf070bbe50..c1bc4e12e08 100644 --- a/java/ql/test/query-tests/security/CWE-918/mad/Test.java +++ b/java/ql/test/query-tests/security/CWE-918/mad/Test.java @@ -23,93 +23,93 @@ public class Test { private static HttpServletRequest request; public static Object source() { - return request.getParameter(null); + return request.getParameter(null); // $ Source } public void test(DatagramSocket socket) throws Exception { // "java.net;DatagramSocket;true;connect;(SocketAddress);;Argument[0];open-url;ai-generated" - socket.connect((SocketAddress) source()); // $ SSRF + socket.connect((SocketAddress) source()); // $ Alert } public void test(URL url) throws Exception { // "java.net;URL;false;openConnection;(Proxy);:Argument[this]:open-url;manual" - ((URL) source()).openConnection(); // $ SSRF + ((URL) source()).openConnection(); // $ Alert // "java.net;URL;false;openConnection;(Proxy);:Argument[0]:open-url;ai-generated" - url.openConnection((Proxy) source()); // $ SSRF + url.openConnection((Proxy) source()); // $ Alert // "java.net;URL;false;openStream;;:Argument[this]:open-url;manual" - ((URL) source()).openStream(); // $ SSRF + ((URL) source()).openStream(); // $ Alert } public void test() throws Exception { // "java.net;URLClassLoader;false;URLClassLoader;(String,URL[],ClassLoader);;Argument[1];open-url;manual" - new URLClassLoader("", (URL[]) source(), null); // $ SSRF + new URLClassLoader("", (URL[]) source(), null); // $ Alert // "java.net;URLClassLoader;false;URLClassLoader;(String,URL[],ClassLoader,URLStreamHandlerFactory);;Argument[1];open-url;manual" - new URLClassLoader("", (URL[]) source(), null, null); // $ SSRF + new URLClassLoader("", (URL[]) source(), null, null); // $ Alert // "java.net;URLClassLoader;false;URLClassLoader;(URL[]);;Argument[0];open-url;manual" - new URLClassLoader((URL[]) source()); // $ SSRF + new URLClassLoader((URL[]) source()); // $ Alert // "java.net;URLClassLoader;false;URLClassLoader;(URL[],ClassLoader);;Argument[0];open-url;manual" - new URLClassLoader((URL[]) source(), null); // $ SSRF + new URLClassLoader((URL[]) source(), null); // $ Alert // "java.net;URLClassLoader;false;URLClassLoader;(URL[],ClassLoader,URLStreamHandlerFactory);;Argument[0];open-url;manual" - new URLClassLoader((URL[]) source(), null, null); // $ SSRF + new URLClassLoader((URL[]) source(), null, null); // $ Alert // "java.net;URLClassLoader;false;newInstance;;;Argument[0];open-url;manual" - URLClassLoader.newInstance((URL[]) source()); // $ SSRF + URLClassLoader.newInstance((URL[]) source()); // $ Alert // "org.apache.commons.jelly;JellyContext;true;JellyContext;(JellyContext,URL,URL);;Argument[1];open-url;ai-generated" - new JellyContext(null, (URL) source(), null); // $ SSRF + new JellyContext(null, (URL) source(), null); // $ Alert // "org.apache.commons.jelly;JellyContext;true;JellyContext;(JellyContext,URL,URL);;Argument[2];open-url;ai-generated" - new JellyContext(null, null, (URL) source()); // $ SSRF + new JellyContext(null, null, (URL) source()); // $ Alert // "org.apache.commons.jelly;JellyContext;true;JellyContext;(JellyContext,URL);;Argument[1];open-url;ai-generated" - new JellyContext((JellyContext) null, (URL) source()); // $ SSRF + new JellyContext((JellyContext) null, (URL) source()); // $ Alert // "org.apache.commons.jelly;JellyContext;true;JellyContext;(URL,URL);;Argument[0];open-url;ai-generated" - new JellyContext((URL) source(), null); // $ SSRF + new JellyContext((URL) source(), null); // $ Alert // "org.apache.commons.jelly;JellyContext;true;JellyContext;(URL,URL);;Argument[1];open-url;ai-generated" - new JellyContext((URL) null, (URL) source()); // $ SSRF + new JellyContext((URL) null, (URL) source()); // $ Alert // "org.apache.commons.jelly;JellyContext;true;JellyContext;(URL);;Argument[0];open-url;ai-generated" - new JellyContext((URL) source()); // $ SSRF + new JellyContext((URL) source()); // $ Alert // "javax.activation;URLDataSource;true;URLDataSource;(URL);;Argument[0];request-forgery;manual" - new URLDataSource((URL) source()); // $ SSRF + new URLDataSource((URL) source()); // $ Alert // "org.apache.cxf.catalog;OASISCatalogManager;true;loadCatalog;(URL);;Argument[0];request-forgery;manual" - new OASISCatalogManager().loadCatalog((URL) source()); // $ SSRF + new OASISCatalogManager().loadCatalog((URL) source()); // $ Alert // @formatter:off // "org.apache.cxf.common.classloader;ClassLoaderUtils;true;getURLClassLoader;(URL[],ClassLoader);;Argument[0];request-forgery;manual" - new ClassLoaderUtils().getURLClassLoader((URL[]) source(), null); // $ SSRF + new ClassLoaderUtils().getURLClassLoader((URL[]) source(), null); // $ Alert // "org.apache.cxf.common.classloader;ClassLoaderUtils;true;getURLClassLoader;(List,ClassLoader);;Argument[0];request-forgery;manual" - new ClassLoaderUtils().getURLClassLoader((List) source(), null); // $ SSRF + new ClassLoaderUtils().getURLClassLoader((List) source(), null); // $ Alert // "org.apache.cxf.resource;ExtendedURIResolver;true;resolve;(String,String);;Argument[0];request-forgery;manual"] - new ExtendedURIResolver().resolve((String) source(), null); // $ SSRF + new ExtendedURIResolver().resolve((String) source(), null); // $ Alert // "org.apache.cxf.resource;URIResolver;true;URIResolver;(String);;Argument[0];request-forgery;manual"] - new URIResolver((String) source()); // $ SSRF + new URIResolver((String) source()); // $ Alert // "org.apache.cxf.resource;URIResolver;true;URIResolver;(String,String);;Argument[1];request-forgery;manual"] - new URIResolver(null, (String) source()); // $ SSRF + new URIResolver(null, (String) source()); // $ Alert // "org.apache.cxf.resource;URIResolver;true;URIResolver;(String,String,Class);;Argument[1];request-forgery;manual"] - new URIResolver(null, (String) source(), null); // $ SSRF + new URIResolver(null, (String) source(), null); // $ Alert // "org.apache.cxf.resource;URIResolver;true;resolve;(String,String,Class);;Argument[1];request-forgery;manual" - new URIResolver().resolve(null, (String) source(), null); // $ SSRF + new URIResolver().resolve(null, (String) source(), null); // $ Alert // @formatter:on } public void test(WebEngine webEngine) { // "javafx.scene.web;WebEngine;false;load;(String);;Argument[0];open-url;ai-generated" - webEngine.load((String) source()); // $ SSRF + webEngine.load((String) source()); // $ Alert } public void test(ZipURLInstaller zui) { // "org.codehaus.cargo.container.installer;ZipURLInstaller;true;ZipURLInstaller;(URL,String,String);;Argument[0];open-url:ai-generated" - new ZipURLInstaller((URL) source(), "", ""); // $ SSRF + new ZipURLInstaller((URL) source(), "", ""); // $ Alert } public void test(HttpResponses r) { // "org.kohsuke.stapler;HttpResponses;true;staticResource;(URL);;Argument[0];open-url;ai-generated" - r.staticResource((URL) source()); // $ SSRF + r.staticResource((URL) source()); // $ Alert } public void test(WSClient c) { // "play.libs.ws;WSClient;true;url;;;Argument[0];open-url;manual" - c.url((String) source()); // $ SSRF + c.url((String) source()); // $ Alert } public void test(StandaloneWSClient c) { // "play.libs.ws;StandaloneWSClient;true;url;;;Argument[0];open-url;manual" - c.url((String) source()); // $ SSRF + c.url((String) source()); // $ Alert } } diff --git a/java/ql/test/query-tests/security/CWE-925/BootReceiverXml.java b/java/ql/test/query-tests/security/CWE-925/BootReceiverXml.java index 3a9f8498396..af9ca5926d7 100644 --- a/java/ql/test/query-tests/security/CWE-925/BootReceiverXml.java +++ b/java/ql/test/query-tests/security/CWE-925/BootReceiverXml.java @@ -6,8 +6,8 @@ import android.content.BroadcastReceiver; class BootReceiverXml extends BroadcastReceiver { void doStuff(Intent intent) {} - @Override - public void onReceive(Context ctx, Intent intent) { // $hasResult + @Override + public void onReceive(Context ctx, Intent intent) { // $ Alert doStuff(intent); } -} \ No newline at end of file +} diff --git a/java/ql/test/query-tests/security/CWE-925/ImproperIntentVerification.expected b/java/ql/test/query-tests/security/CWE-925/ImproperIntentVerification.expected index e69de29bb2d..862b9a73692 100644 --- a/java/ql/test/query-tests/security/CWE-925/ImproperIntentVerification.expected +++ b/java/ql/test/query-tests/security/CWE-925/ImproperIntentVerification.expected @@ -0,0 +1 @@ +| BootReceiverXml.java:10:17:10:25 | onReceive | This reciever doesn't verify intents it receives, and $@ to receive $@. | AndroidManifest.xml:3:9:7:20 | receiver | it is registered | AndroidManifest.xml:5:17:5:79 | action | the system action action | diff --git a/java/ql/test/query-tests/security/CWE-925/ImproperIntentVerification.ql b/java/ql/test/query-tests/security/CWE-925/ImproperIntentVerification.ql deleted file mode 100644 index 67da4ee9b29..00000000000 --- a/java/ql/test/query-tests/security/CWE-925/ImproperIntentVerification.ql +++ /dev/null @@ -1,18 +0,0 @@ -import java -import semmle.code.java.security.ImproperIntentVerificationQuery -import utils.test.InlineExpectationsTest - -module HasFlowTest implements TestSig { - string getARelevantTag() { result = "hasResult" } - - predicate hasActualResult(Location location, string element, string tag, string value) { - tag = "hasResult" and - exists(Method orm | unverifiedSystemReceiver(_, orm, _) | - orm.getLocation() = location and - element = orm.toString() and - value = "" - ) - } -} - -import MakeTest diff --git a/java/ql/test/query-tests/security/CWE-925/ImproperIntentVerification.qlref b/java/ql/test/query-tests/security/CWE-925/ImproperIntentVerification.qlref new file mode 100644 index 00000000000..1402eeee2a1 --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-925/ImproperIntentVerification.qlref @@ -0,0 +1,4 @@ +query: Security/CWE/CWE-925/ImproperIntentVerification.ql +postprocess: + - utils/test/PrettyPrintModels.ql + - utils/test/InlineExpectationsTestQuery.ql diff --git a/java/ql/test/query-tests/security/CWE-927/ImplicitPendingIntents/ImplicitPendingIntentsTest.expected b/java/ql/test/query-tests/security/CWE-927/ImplicitPendingIntents/ImplicitPendingIntentsTest.expected new file mode 100644 index 00000000000..c1c694c5fbd --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-927/ImplicitPendingIntents/ImplicitPendingIntentsTest.expected @@ -0,0 +1,341 @@ +#select +| ImplicitPendingIntentsTest.java:36:31:36:39 | fwdIntent | ImplicitPendingIntentsTest.java:31:33:31:44 | new Intent(...) : Intent | ImplicitPendingIntentsTest.java:36:31:36:39 | fwdIntent | $@ and sent to an unspecified third party through a PendingIntent. | ImplicitPendingIntentsTest.java:31:33:31:44 | new Intent(...) | An implicit Intent is created | +| ImplicitPendingIntentsTest.java:38:31:38:39 | fwdIntent | ImplicitPendingIntentsTest.java:31:33:31:44 | new Intent(...) : Intent | ImplicitPendingIntentsTest.java:38:31:38:39 | fwdIntent | $@ and sent to an unspecified third party through a PendingIntent. | ImplicitPendingIntentsTest.java:31:33:31:44 | new Intent(...) | An implicit Intent is created | +| ImplicitPendingIntentsTest.java:41:31:41:39 | fwdIntent | ImplicitPendingIntentsTest.java:31:33:31:44 | new Intent(...) : Intent | ImplicitPendingIntentsTest.java:41:31:41:39 | fwdIntent | $@ and sent to an unspecified third party through a PendingIntent. | ImplicitPendingIntentsTest.java:31:33:31:44 | new Intent(...) | An implicit Intent is created | +| ImplicitPendingIntentsTest.java:52:31:52:39 | fwdIntent | ImplicitPendingIntentsTest.java:48:33:48:44 | new Intent(...) : Intent | ImplicitPendingIntentsTest.java:52:31:52:39 | fwdIntent | $@ and sent to an unspecified third party through a PendingIntent. | ImplicitPendingIntentsTest.java:48:33:48:44 | new Intent(...) | An implicit Intent is created | +| ImplicitPendingIntentsTest.java:60:31:60:39 | fwdIntent | ImplicitPendingIntentsTest.java:56:33:56:44 | new Intent(...) : Intent | ImplicitPendingIntentsTest.java:60:31:60:39 | fwdIntent | $@ and sent to an unspecified third party through a PendingIntent. | ImplicitPendingIntentsTest.java:56:33:56:44 | new Intent(...) | An implicit Intent is created | +| ImplicitPendingIntentsTest.java:69:31:69:39 | fwdIntent | ImplicitPendingIntentsTest.java:64:33:64:44 | new Intent(...) : Intent | ImplicitPendingIntentsTest.java:69:31:69:39 | fwdIntent | $@ and sent to an unspecified third party through a PendingIntent. | ImplicitPendingIntentsTest.java:64:33:64:44 | new Intent(...) | An implicit Intent is created | +| ImplicitPendingIntentsTest.java:77:31:77:39 | fwdIntent | ImplicitPendingIntentsTest.java:73:33:73:44 | new Intent(...) : Intent | ImplicitPendingIntentsTest.java:77:31:77:39 | fwdIntent | $@ and sent to an unspecified third party through a PendingIntent. | ImplicitPendingIntentsTest.java:73:33:73:44 | new Intent(...) | An implicit Intent is created | +| ImplicitPendingIntentsTest.java:85:31:85:39 | fwdIntent | ImplicitPendingIntentsTest.java:81:33:81:44 | new Intent(...) : Intent | ImplicitPendingIntentsTest.java:85:31:85:39 | fwdIntent | $@ and sent to an unspecified third party through a PendingIntent. | ImplicitPendingIntentsTest.java:81:33:81:44 | new Intent(...) | An implicit Intent is created | +| ImplicitPendingIntentsTest.java:93:31:93:39 | fwdIntent | ImplicitPendingIntentsTest.java:89:33:89:44 | new Intent(...) : Intent | ImplicitPendingIntentsTest.java:93:31:93:39 | fwdIntent | $@ and sent to an unspecified third party through a PendingIntent. | ImplicitPendingIntentsTest.java:89:33:89:44 | new Intent(...) | An implicit Intent is created | +| ImplicitPendingIntentsTest.java:101:31:101:39 | fwdIntent | ImplicitPendingIntentsTest.java:97:33:97:44 | new Intent(...) : Intent | ImplicitPendingIntentsTest.java:101:31:101:39 | fwdIntent | $@ and sent to an unspecified third party through a PendingIntent. | ImplicitPendingIntentsTest.java:97:33:97:44 | new Intent(...) | An implicit Intent is created | +| ImplicitPendingIntentsTest.java:170:32:170:40 | fwdIntent | ImplicitPendingIntentsTest.java:166:33:166:44 | new Intent(...) : Intent | ImplicitPendingIntentsTest.java:170:32:170:40 | fwdIntent | $@ and sent to an unspecified third party through a PendingIntent. | ImplicitPendingIntentsTest.java:166:33:166:44 | new Intent(...) | An implicit Intent is created | +| ImplicitPendingIntentsTest.java:171:32:171:40 | fwdIntent | ImplicitPendingIntentsTest.java:166:33:166:44 | new Intent(...) : Intent | ImplicitPendingIntentsTest.java:171:32:171:40 | fwdIntent | $@ and sent to an unspecified third party through a PendingIntent. | ImplicitPendingIntentsTest.java:166:33:166:44 | new Intent(...) | An implicit Intent is created | +| ImplicitPendingIntentsTest.java:172:32:172:40 | fwdIntent | ImplicitPendingIntentsTest.java:166:33:166:44 | new Intent(...) : Intent | ImplicitPendingIntentsTest.java:172:32:172:40 | fwdIntent | $@ and sent to an unspecified third party through a PendingIntent. | ImplicitPendingIntentsTest.java:166:33:166:44 | new Intent(...) | An implicit Intent is created | +| ImplicitPendingIntentsTest.java:173:32:173:40 | fwdIntent | ImplicitPendingIntentsTest.java:166:33:166:44 | new Intent(...) : Intent | ImplicitPendingIntentsTest.java:173:32:173:40 | fwdIntent | $@ and sent to an unspecified third party through a PendingIntent. | ImplicitPendingIntentsTest.java:166:33:166:44 | new Intent(...) | An implicit Intent is created | +| ImplicitPendingIntentsTest.java:188:65:188:76 | notification | ImplicitPendingIntentsTest.java:181:33:181:44 | new Intent(...) : Intent | ImplicitPendingIntentsTest.java:188:65:188:76 | notification | $@ and sent to an unspecified third party through a PendingIntent. | ImplicitPendingIntentsTest.java:181:33:181:44 | new Intent(...) | An implicit Intent is created | +| ImplicitPendingIntentsTest.java:189:32:189:43 | notification | ImplicitPendingIntentsTest.java:181:33:181:44 | new Intent(...) : Intent | ImplicitPendingIntentsTest.java:189:32:189:43 | notification | $@ and sent to an unspecified third party through a PendingIntent. | ImplicitPendingIntentsTest.java:181:33:181:44 | new Intent(...) | An implicit Intent is created | +| ImplicitPendingIntentsTest.java:190:42:190:53 | notification | ImplicitPendingIntentsTest.java:181:33:181:44 | new Intent(...) : Intent | ImplicitPendingIntentsTest.java:190:42:190:53 | notification | $@ and sent to an unspecified third party through a PendingIntent. | ImplicitPendingIntentsTest.java:181:33:181:44 | new Intent(...) | An implicit Intent is created | +| ImplicitPendingIntentsTest.java:229:32:229:43 | notification | ImplicitPendingIntentsTest.java:222:33:222:44 | new Intent(...) : Intent | ImplicitPendingIntentsTest.java:229:32:229:43 | notification | $@ and sent to an unspecified third party through a PendingIntent. | ImplicitPendingIntentsTest.java:222:33:222:44 | new Intent(...) | An implicit Intent is created | +| ImplicitPendingIntentsTest.java:230:36:230:47 | notification | ImplicitPendingIntentsTest.java:222:33:222:44 | new Intent(...) : Intent | ImplicitPendingIntentsTest.java:230:36:230:47 | notification | $@ and sent to an unspecified third party through a PendingIntent. | ImplicitPendingIntentsTest.java:222:33:222:44 | new Intent(...) | An implicit Intent is created | +| ImplicitPendingIntentsTest.java:239:32:239:33 | pi | ImplicitPendingIntentsTest.java:237:33:237:44 | new Intent(...) : Intent | ImplicitPendingIntentsTest.java:239:32:239:33 | pi | $@ and sent to an unspecified third party through a PendingIntent. | ImplicitPendingIntentsTest.java:237:33:237:44 | new Intent(...) | An implicit Intent is created | +| ImplicitPendingIntentsTest.java:240:42:240:43 | pi | ImplicitPendingIntentsTest.java:237:33:237:44 | new Intent(...) : Intent | ImplicitPendingIntentsTest.java:240:42:240:43 | pi | $@ and sent to an unspecified third party through a PendingIntent. | ImplicitPendingIntentsTest.java:237:33:237:44 | new Intent(...) | An implicit Intent is created | +| ImplicitPendingIntentsTest.java:241:49:241:50 | pi | ImplicitPendingIntentsTest.java:237:33:237:44 | new Intent(...) : Intent | ImplicitPendingIntentsTest.java:241:49:241:50 | pi | $@ and sent to an unspecified third party through a PendingIntent. | ImplicitPendingIntentsTest.java:237:33:237:44 | new Intent(...) | An implicit Intent is created | +| ImplicitPendingIntentsTest.java:242:37:242:38 | pi | ImplicitPendingIntentsTest.java:237:33:237:44 | new Intent(...) : Intent | ImplicitPendingIntentsTest.java:242:37:242:38 | pi | $@ and sent to an unspecified third party through a PendingIntent. | ImplicitPendingIntentsTest.java:237:33:237:44 | new Intent(...) | An implicit Intent is created | +| ImplicitPendingIntentsTest.java:243:54:243:55 | pi | ImplicitPendingIntentsTest.java:237:33:237:44 | new Intent(...) : Intent | ImplicitPendingIntentsTest.java:243:54:243:55 | pi | $@ and sent to an unspecified third party through a PendingIntent. | ImplicitPendingIntentsTest.java:237:33:237:44 | new Intent(...) | An implicit Intent is created | +| ImplicitPendingIntentsTest.java:244:51:244:52 | pi | ImplicitPendingIntentsTest.java:237:33:237:44 | new Intent(...) : Intent | ImplicitPendingIntentsTest.java:244:51:244:52 | pi | $@ and sent to an unspecified third party through a PendingIntent. | ImplicitPendingIntentsTest.java:237:33:237:44 | new Intent(...) | An implicit Intent is created | +| ImplicitPendingIntentsTest.java:245:44:245:45 | pi | ImplicitPendingIntentsTest.java:237:33:237:44 | new Intent(...) : Intent | ImplicitPendingIntentsTest.java:245:44:245:45 | pi | $@ and sent to an unspecified third party through a PendingIntent. | ImplicitPendingIntentsTest.java:237:33:237:44 | new Intent(...) | An implicit Intent is created | +| ImplicitPendingIntentsTest.java:246:41:246:42 | pi | ImplicitPendingIntentsTest.java:237:33:237:44 | new Intent(...) : Intent | ImplicitPendingIntentsTest.java:246:41:246:42 | pi | $@ and sent to an unspecified third party through a PendingIntent. | ImplicitPendingIntentsTest.java:237:33:237:44 | new Intent(...) | An implicit Intent is created | +| ImplicitPendingIntentsTest.java:258:59:258:60 | pi | ImplicitPendingIntentsTest.java:256:33:256:44 | new Intent(...) : Intent | ImplicitPendingIntentsTest.java:258:59:258:60 | pi | $@ and sent to an unspecified third party through a PendingIntent. | ImplicitPendingIntentsTest.java:256:33:256:44 | new Intent(...) | An implicit Intent is created | +| ImplicitPendingIntentsTest.java:259:65:259:66 | pi | ImplicitPendingIntentsTest.java:256:33:256:44 | new Intent(...) : Intent | ImplicitPendingIntentsTest.java:259:65:259:66 | pi | $@ and sent to an unspecified third party through a PendingIntent. | ImplicitPendingIntentsTest.java:256:33:256:44 | new Intent(...) | An implicit Intent is created | +| ImplicitPendingIntentsTest.java:260:69:260:70 | pi | ImplicitPendingIntentsTest.java:256:33:256:44 | new Intent(...) : Intent | ImplicitPendingIntentsTest.java:260:69:260:70 | pi | $@ and sent to an unspecified third party through a PendingIntent. | ImplicitPendingIntentsTest.java:256:33:256:44 | new Intent(...) | An implicit Intent is created | +| ImplicitPendingIntentsTest.java:261:57:261:58 | pi | ImplicitPendingIntentsTest.java:256:33:256:44 | new Intent(...) : Intent | ImplicitPendingIntentsTest.java:261:57:261:58 | pi | $@ and sent to an unspecified third party through a PendingIntent. | ImplicitPendingIntentsTest.java:256:33:256:44 | new Intent(...) | An implicit Intent is created | +| ImplicitPendingIntentsTest.java:262:74:262:75 | pi | ImplicitPendingIntentsTest.java:256:33:256:44 | new Intent(...) : Intent | ImplicitPendingIntentsTest.java:262:74:262:75 | pi | $@ and sent to an unspecified third party through a PendingIntent. | ImplicitPendingIntentsTest.java:256:33:256:44 | new Intent(...) | An implicit Intent is created | +| ImplicitPendingIntentsTest.java:273:26:273:34 | fwdIntent | ImplicitPendingIntentsTest.java:269:33:269:44 | new Intent(...) : Intent | ImplicitPendingIntentsTest.java:273:26:273:34 | fwdIntent | $@ and sent to an unspecified third party through a PendingIntent. | ImplicitPendingIntentsTest.java:269:33:269:44 | new Intent(...) | An implicit Intent is created | +| ImplicitPendingIntentsTest.java:290:24:290:42 | build(...) | ImplicitPendingIntentsTest.java:284:37:284:48 | new Intent(...) : Intent | ImplicitPendingIntentsTest.java:290:24:290:42 | build(...) | $@ and sent to an unspecified third party through a PendingIntent. | ImplicitPendingIntentsTest.java:284:37:284:48 | new Intent(...) | An implicit Intent is created | +| ImplicitPendingIntentsTest.java:317:24:317:42 | build(...) | ImplicitPendingIntentsTest.java:339:33:339:44 | new Intent(...) : Intent | ImplicitPendingIntentsTest.java:317:24:317:42 | build(...) | $@ and sent to an unspecified third party through a PendingIntent. | ImplicitPendingIntentsTest.java:339:33:339:44 | new Intent(...) | An implicit Intent is created | +| ImplicitPendingIntentsTest.java:326:24:326:25 | pi | ImplicitPendingIntentsTest.java:324:37:324:48 | new Intent(...) : Intent | ImplicitPendingIntentsTest.java:326:24:326:25 | pi | $@ and sent to an unspecified third party through a PendingIntent. | ImplicitPendingIntentsTest.java:324:37:324:48 | new Intent(...) | An implicit Intent is created | +edges +| ImplicitPendingIntentsTest.java:31:33:31:44 | new Intent(...) : Intent | ImplicitPendingIntentsTest.java:32:66:32:75 | baseIntent : Intent | provenance | | +| ImplicitPendingIntentsTest.java:32:32:32:79 | getActivity(...) : PendingIntent | ImplicitPendingIntentsTest.java:34:45:34:46 | pi : PendingIntent | provenance | | +| ImplicitPendingIntentsTest.java:32:66:32:75 | baseIntent : Intent | ImplicitPendingIntentsTest.java:32:32:32:79 | getActivity(...) : PendingIntent | provenance | Config | +| ImplicitPendingIntentsTest.java:34:13:34:21 | fwdIntent [post update] : Intent [android.content.Intent.extras, ] : PendingIntent | ImplicitPendingIntentsTest.java:36:31:36:39 | fwdIntent | provenance | Sink:MaD:18 Sink:MaD:18 | +| ImplicitPendingIntentsTest.java:34:13:34:21 | fwdIntent [post update] : Intent [android.content.Intent.extras, ] : PendingIntent | ImplicitPendingIntentsTest.java:38:31:38:39 | fwdIntent | provenance | Sink:MaD:17 Sink:MaD:17 | +| ImplicitPendingIntentsTest.java:34:13:34:21 | fwdIntent [post update] : Intent [android.content.Intent.extras, ] : PendingIntent | ImplicitPendingIntentsTest.java:41:31:41:39 | fwdIntent | provenance | Sink:MaD:18 Sink:MaD:18 | +| ImplicitPendingIntentsTest.java:34:45:34:46 | pi : PendingIntent | ImplicitPendingIntentsTest.java:34:13:34:21 | fwdIntent [post update] : Intent [android.content.Intent.extras, ] : PendingIntent | provenance | MaD:32 | +| ImplicitPendingIntentsTest.java:48:33:48:44 | new Intent(...) : Intent | ImplicitPendingIntentsTest.java:49:72:49:81 | baseIntent : Intent | provenance | | +| ImplicitPendingIntentsTest.java:49:32:49:97 | getActivityAsUser(...) : PendingIntent | ImplicitPendingIntentsTest.java:51:45:51:46 | pi : PendingIntent | provenance | | +| ImplicitPendingIntentsTest.java:49:72:49:81 | baseIntent : Intent | ImplicitPendingIntentsTest.java:49:32:49:97 | getActivityAsUser(...) : PendingIntent | provenance | Config | +| ImplicitPendingIntentsTest.java:51:13:51:21 | fwdIntent [post update] : Intent [android.content.Intent.extras, ] : PendingIntent | ImplicitPendingIntentsTest.java:52:31:52:39 | fwdIntent | provenance | Sink:MaD:18 Sink:MaD:18 | +| ImplicitPendingIntentsTest.java:51:45:51:46 | pi : PendingIntent | ImplicitPendingIntentsTest.java:51:13:51:21 | fwdIntent [post update] : Intent [android.content.Intent.extras, ] : PendingIntent | provenance | MaD:32 | +| ImplicitPendingIntentsTest.java:56:33:56:44 | new Intent(...) : Intent | ImplicitPendingIntentsTest.java:57:82:57:91 | baseIntent : Intent | provenance | | +| ImplicitPendingIntentsTest.java:57:32:57:96 | getActivities(...) : PendingIntent | ImplicitPendingIntentsTest.java:59:45:59:46 | pi : PendingIntent | provenance | | +| ImplicitPendingIntentsTest.java:57:68:57:92 | new Intent[] : Intent[] [[]] : Intent | ImplicitPendingIntentsTest.java:57:32:57:96 | getActivities(...) : PendingIntent | provenance | Config | +| ImplicitPendingIntentsTest.java:57:68:57:92 | {...} : Intent[] [[]] : Intent | ImplicitPendingIntentsTest.java:57:68:57:92 | new Intent[] : Intent[] [[]] : Intent | provenance | | +| ImplicitPendingIntentsTest.java:57:82:57:91 | baseIntent : Intent | ImplicitPendingIntentsTest.java:57:68:57:92 | {...} : Intent[] [[]] : Intent | provenance | | +| ImplicitPendingIntentsTest.java:59:13:59:21 | fwdIntent [post update] : Intent [android.content.Intent.extras, ] : PendingIntent | ImplicitPendingIntentsTest.java:60:31:60:39 | fwdIntent | provenance | Sink:MaD:18 Sink:MaD:18 | +| ImplicitPendingIntentsTest.java:59:45:59:46 | pi : PendingIntent | ImplicitPendingIntentsTest.java:59:13:59:21 | fwdIntent [post update] : Intent [android.content.Intent.extras, ] : PendingIntent | provenance | MaD:32 | +| ImplicitPendingIntentsTest.java:64:33:64:44 | new Intent(...) : Intent | ImplicitPendingIntentsTest.java:65:88:65:97 | baseIntent : Intent | provenance | | +| ImplicitPendingIntentsTest.java:65:32:66:34 | getActivitiesAsUser(...) : PendingIntent | ImplicitPendingIntentsTest.java:68:45:68:46 | pi : PendingIntent | provenance | | +| ImplicitPendingIntentsTest.java:65:74:65:98 | new Intent[] : Intent[] [[]] : Intent | ImplicitPendingIntentsTest.java:65:32:66:34 | getActivitiesAsUser(...) : PendingIntent | provenance | Config | +| ImplicitPendingIntentsTest.java:65:74:65:98 | {...} : Intent[] [[]] : Intent | ImplicitPendingIntentsTest.java:65:74:65:98 | new Intent[] : Intent[] [[]] : Intent | provenance | | +| ImplicitPendingIntentsTest.java:65:88:65:97 | baseIntent : Intent | ImplicitPendingIntentsTest.java:65:74:65:98 | {...} : Intent[] [[]] : Intent | provenance | | +| ImplicitPendingIntentsTest.java:68:13:68:21 | fwdIntent [post update] : Intent [android.content.Intent.extras, ] : PendingIntent | ImplicitPendingIntentsTest.java:69:31:69:39 | fwdIntent | provenance | Sink:MaD:18 Sink:MaD:18 | +| ImplicitPendingIntentsTest.java:68:45:68:46 | pi : PendingIntent | ImplicitPendingIntentsTest.java:68:13:68:21 | fwdIntent [post update] : Intent [android.content.Intent.extras, ] : PendingIntent | provenance | MaD:32 | +| ImplicitPendingIntentsTest.java:73:33:73:44 | new Intent(...) : Intent | ImplicitPendingIntentsTest.java:74:67:74:76 | baseIntent : Intent | provenance | | +| ImplicitPendingIntentsTest.java:74:32:74:80 | getBroadcast(...) : PendingIntent | ImplicitPendingIntentsTest.java:76:45:76:46 | pi : PendingIntent | provenance | | +| ImplicitPendingIntentsTest.java:74:67:74:76 | baseIntent : Intent | ImplicitPendingIntentsTest.java:74:32:74:80 | getBroadcast(...) : PendingIntent | provenance | Config | +| ImplicitPendingIntentsTest.java:76:13:76:21 | fwdIntent [post update] : Intent [android.content.Intent.extras, ] : PendingIntent | ImplicitPendingIntentsTest.java:77:31:77:39 | fwdIntent | provenance | Sink:MaD:17 Sink:MaD:17 | +| ImplicitPendingIntentsTest.java:76:45:76:46 | pi : PendingIntent | ImplicitPendingIntentsTest.java:76:13:76:21 | fwdIntent [post update] : Intent [android.content.Intent.extras, ] : PendingIntent | provenance | MaD:32 | +| ImplicitPendingIntentsTest.java:81:33:81:44 | new Intent(...) : Intent | ImplicitPendingIntentsTest.java:82:73:82:82 | baseIntent : Intent | provenance | | +| ImplicitPendingIntentsTest.java:82:32:82:92 | getBroadcastAsUser(...) : PendingIntent | ImplicitPendingIntentsTest.java:84:45:84:46 | pi : PendingIntent | provenance | | +| ImplicitPendingIntentsTest.java:82:73:82:82 | baseIntent : Intent | ImplicitPendingIntentsTest.java:82:32:82:92 | getBroadcastAsUser(...) : PendingIntent | provenance | Config | +| ImplicitPendingIntentsTest.java:84:13:84:21 | fwdIntent [post update] : Intent [android.content.Intent.extras, ] : PendingIntent | ImplicitPendingIntentsTest.java:85:31:85:39 | fwdIntent | provenance | Sink:MaD:17 Sink:MaD:17 | +| ImplicitPendingIntentsTest.java:84:45:84:46 | pi : PendingIntent | ImplicitPendingIntentsTest.java:84:13:84:21 | fwdIntent [post update] : Intent [android.content.Intent.extras, ] : PendingIntent | provenance | MaD:32 | +| ImplicitPendingIntentsTest.java:89:33:89:44 | new Intent(...) : Intent | ImplicitPendingIntentsTest.java:90:65:90:74 | baseIntent : Intent | provenance | | +| ImplicitPendingIntentsTest.java:90:32:90:78 | getService(...) : PendingIntent | ImplicitPendingIntentsTest.java:92:45:92:46 | pi : PendingIntent | provenance | | +| ImplicitPendingIntentsTest.java:90:65:90:74 | baseIntent : Intent | ImplicitPendingIntentsTest.java:90:32:90:78 | getService(...) : PendingIntent | provenance | Config | +| ImplicitPendingIntentsTest.java:92:13:92:21 | fwdIntent [post update] : Intent [android.content.Intent.extras, ] : PendingIntent | ImplicitPendingIntentsTest.java:93:31:93:39 | fwdIntent | provenance | Sink:MaD:18 Sink:MaD:18 | +| ImplicitPendingIntentsTest.java:92:45:92:46 | pi : PendingIntent | ImplicitPendingIntentsTest.java:92:13:92:21 | fwdIntent [post update] : Intent [android.content.Intent.extras, ] : PendingIntent | provenance | MaD:32 | +| ImplicitPendingIntentsTest.java:97:33:97:44 | new Intent(...) : Intent | ImplicitPendingIntentsTest.java:98:75:98:84 | baseIntent : Intent | provenance | | +| ImplicitPendingIntentsTest.java:98:32:98:88 | getForegroundService(...) : PendingIntent | ImplicitPendingIntentsTest.java:100:45:100:46 | pi : PendingIntent | provenance | | +| ImplicitPendingIntentsTest.java:98:75:98:84 | baseIntent : Intent | ImplicitPendingIntentsTest.java:98:32:98:88 | getForegroundService(...) : PendingIntent | provenance | Config | +| ImplicitPendingIntentsTest.java:100:13:100:21 | fwdIntent [post update] : Intent [android.content.Intent.extras, ] : PendingIntent | ImplicitPendingIntentsTest.java:101:31:101:39 | fwdIntent | provenance | Sink:MaD:18 Sink:MaD:18 | +| ImplicitPendingIntentsTest.java:100:45:100:46 | pi : PendingIntent | ImplicitPendingIntentsTest.java:100:13:100:21 | fwdIntent [post update] : Intent [android.content.Intent.extras, ] : PendingIntent | provenance | MaD:32 | +| ImplicitPendingIntentsTest.java:166:33:166:44 | new Intent(...) : Intent | ImplicitPendingIntentsTest.java:167:66:167:75 | baseIntent : Intent | provenance | | +| ImplicitPendingIntentsTest.java:167:32:167:79 | getActivity(...) : PendingIntent | ImplicitPendingIntentsTest.java:169:45:169:46 | pi : PendingIntent | provenance | | +| ImplicitPendingIntentsTest.java:167:66:167:75 | baseIntent : Intent | ImplicitPendingIntentsTest.java:167:32:167:79 | getActivity(...) : PendingIntent | provenance | Config | +| ImplicitPendingIntentsTest.java:169:13:169:21 | fwdIntent [post update] : Intent [android.content.Intent.extras, ] : PendingIntent | ImplicitPendingIntentsTest.java:170:32:170:40 | fwdIntent | provenance | Sink:MaD:13 Sink:MaD:13 | +| ImplicitPendingIntentsTest.java:169:13:169:21 | fwdIntent [post update] : Intent [android.content.Intent.extras, ] : PendingIntent | ImplicitPendingIntentsTest.java:171:32:171:40 | fwdIntent | provenance | Sink:MaD:14 Sink:MaD:14 | +| ImplicitPendingIntentsTest.java:169:13:169:21 | fwdIntent [post update] : Intent [android.content.Intent.extras, ] : PendingIntent | ImplicitPendingIntentsTest.java:172:32:172:40 | fwdIntent | provenance | Sink:MaD:15 Sink:MaD:15 | +| ImplicitPendingIntentsTest.java:169:13:169:21 | fwdIntent [post update] : Intent [android.content.Intent.extras, ] : PendingIntent | ImplicitPendingIntentsTest.java:173:32:173:40 | fwdIntent | provenance | Sink:MaD:16 Sink:MaD:16 | +| ImplicitPendingIntentsTest.java:169:45:169:46 | pi : PendingIntent | ImplicitPendingIntentsTest.java:169:13:169:21 | fwdIntent [post update] : Intent [android.content.Intent.extras, ] : PendingIntent | provenance | MaD:32 | +| ImplicitPendingIntentsTest.java:181:33:181:44 | new Intent(...) : Intent | ImplicitPendingIntentsTest.java:182:66:182:75 | baseIntent : Intent | provenance | | +| ImplicitPendingIntentsTest.java:182:32:182:79 | getActivity(...) : PendingIntent | ImplicitPendingIntentsTest.java:183:91:183:92 | pi : PendingIntent | provenance | | +| ImplicitPendingIntentsTest.java:182:66:182:75 | baseIntent : Intent | ImplicitPendingIntentsTest.java:182:32:182:79 | getActivity(...) : PendingIntent | provenance | Config | +| ImplicitPendingIntentsTest.java:183:52:183:93 | new Builder(...) : Builder | ImplicitPendingIntentsTest.java:185:61:185:68 | aBuilder : Builder | provenance | | +| ImplicitPendingIntentsTest.java:183:91:183:92 | pi : PendingIntent | ImplicitPendingIntentsTest.java:183:52:183:93 | new Builder(...) : Builder | provenance | MaD:27 | +| ImplicitPendingIntentsTest.java:185:21:185:77 | addAction(...) : Builder | ImplicitPendingIntentsTest.java:186:41:186:48 | nBuilder : Builder | provenance | | +| ImplicitPendingIntentsTest.java:185:61:185:68 | aBuilder : Builder | ImplicitPendingIntentsTest.java:185:61:185:76 | build(...) : Action | provenance | MaD:28 | +| ImplicitPendingIntentsTest.java:185:61:185:76 | build(...) : Action | ImplicitPendingIntentsTest.java:185:21:185:77 | addAction(...) : Builder | provenance | MaD:29+MaD:30 | +| ImplicitPendingIntentsTest.java:186:41:186:48 | nBuilder : Builder | ImplicitPendingIntentsTest.java:186:41:186:56 | build(...) : Notification | provenance | MaD:31 | +| ImplicitPendingIntentsTest.java:186:41:186:56 | build(...) : Notification | ImplicitPendingIntentsTest.java:188:65:188:76 | notification | provenance | Sink:MaD:11 | +| ImplicitPendingIntentsTest.java:186:41:186:56 | build(...) : Notification | ImplicitPendingIntentsTest.java:189:32:189:43 | notification | provenance | Sink:MaD:10 | +| ImplicitPendingIntentsTest.java:186:41:186:56 | build(...) : Notification | ImplicitPendingIntentsTest.java:190:42:190:53 | notification | provenance | Sink:MaD:12 | +| ImplicitPendingIntentsTest.java:222:33:222:44 | new Intent(...) : Intent | ImplicitPendingIntentsTest.java:223:66:223:75 | baseIntent : Intent | provenance | | +| ImplicitPendingIntentsTest.java:223:32:223:79 | getActivity(...) : PendingIntent | ImplicitPendingIntentsTest.java:224:91:224:92 | pi : PendingIntent | provenance | | +| ImplicitPendingIntentsTest.java:223:66:223:75 | baseIntent : Intent | ImplicitPendingIntentsTest.java:223:32:223:79 | getActivity(...) : PendingIntent | provenance | Config | +| ImplicitPendingIntentsTest.java:224:52:224:93 | new Builder(...) : Builder | ImplicitPendingIntentsTest.java:226:61:226:68 | aBuilder : Builder | provenance | | +| ImplicitPendingIntentsTest.java:224:91:224:92 | pi : PendingIntent | ImplicitPendingIntentsTest.java:224:52:224:93 | new Builder(...) : Builder | provenance | MaD:27 | +| ImplicitPendingIntentsTest.java:226:21:226:77 | addAction(...) : Builder | ImplicitPendingIntentsTest.java:227:41:227:48 | nBuilder : Builder | provenance | | +| ImplicitPendingIntentsTest.java:226:61:226:68 | aBuilder : Builder | ImplicitPendingIntentsTest.java:226:61:226:76 | build(...) : Action | provenance | MaD:28 | +| ImplicitPendingIntentsTest.java:226:61:226:76 | build(...) : Action | ImplicitPendingIntentsTest.java:226:21:226:77 | addAction(...) : Builder | provenance | MaD:29+MaD:30 | +| ImplicitPendingIntentsTest.java:227:41:227:48 | nBuilder : Builder | ImplicitPendingIntentsTest.java:227:41:227:56 | build(...) : Notification | provenance | MaD:31 | +| ImplicitPendingIntentsTest.java:227:41:227:56 | build(...) : Notification | ImplicitPendingIntentsTest.java:229:32:229:43 | notification | provenance | Sink:MaD:24 | +| ImplicitPendingIntentsTest.java:227:41:227:56 | build(...) : Notification | ImplicitPendingIntentsTest.java:230:36:230:47 | notification | provenance | Sink:MaD:23 | +| ImplicitPendingIntentsTest.java:237:33:237:44 | new Intent(...) : Intent | ImplicitPendingIntentsTest.java:238:66:238:75 | baseIntent : Intent | provenance | | +| ImplicitPendingIntentsTest.java:238:32:238:79 | getActivity(...) : PendingIntent | ImplicitPendingIntentsTest.java:239:32:239:33 | pi | provenance | Sink:MaD:2 | +| ImplicitPendingIntentsTest.java:238:32:238:79 | getActivity(...) : PendingIntent | ImplicitPendingIntentsTest.java:240:42:240:43 | pi | provenance | Sink:MaD:3 | +| ImplicitPendingIntentsTest.java:238:32:238:79 | getActivity(...) : PendingIntent | ImplicitPendingIntentsTest.java:241:49:241:50 | pi | provenance | Sink:MaD:4 | +| ImplicitPendingIntentsTest.java:238:32:238:79 | getActivity(...) : PendingIntent | ImplicitPendingIntentsTest.java:242:37:242:38 | pi | provenance | Sink:MaD:5 | +| ImplicitPendingIntentsTest.java:238:32:238:79 | getActivity(...) : PendingIntent | ImplicitPendingIntentsTest.java:243:54:243:55 | pi | provenance | Sink:MaD:6 | +| ImplicitPendingIntentsTest.java:238:32:238:79 | getActivity(...) : PendingIntent | ImplicitPendingIntentsTest.java:244:51:244:52 | pi | provenance | Sink:MaD:7 | +| ImplicitPendingIntentsTest.java:238:32:238:79 | getActivity(...) : PendingIntent | ImplicitPendingIntentsTest.java:245:44:245:45 | pi | provenance | Sink:MaD:8 | +| ImplicitPendingIntentsTest.java:238:32:238:79 | getActivity(...) : PendingIntent | ImplicitPendingIntentsTest.java:246:41:246:42 | pi | provenance | Sink:MaD:9 | +| ImplicitPendingIntentsTest.java:238:66:238:75 | baseIntent : Intent | ImplicitPendingIntentsTest.java:238:32:238:79 | getActivity(...) : PendingIntent | provenance | Config | +| ImplicitPendingIntentsTest.java:256:33:256:44 | new Intent(...) : Intent | ImplicitPendingIntentsTest.java:257:66:257:75 | baseIntent : Intent | provenance | | +| ImplicitPendingIntentsTest.java:257:32:257:79 | getActivity(...) : PendingIntent | ImplicitPendingIntentsTest.java:258:59:258:60 | pi | provenance | Sink:MaD:19 | +| ImplicitPendingIntentsTest.java:257:32:257:79 | getActivity(...) : PendingIntent | ImplicitPendingIntentsTest.java:259:65:259:66 | pi | provenance | Sink:MaD:19 | +| ImplicitPendingIntentsTest.java:257:32:257:79 | getActivity(...) : PendingIntent | ImplicitPendingIntentsTest.java:260:69:260:70 | pi | provenance | Sink:MaD:20 | +| ImplicitPendingIntentsTest.java:257:32:257:79 | getActivity(...) : PendingIntent | ImplicitPendingIntentsTest.java:261:57:261:58 | pi | provenance | Sink:MaD:21 | +| ImplicitPendingIntentsTest.java:257:32:257:79 | getActivity(...) : PendingIntent | ImplicitPendingIntentsTest.java:262:74:262:75 | pi | provenance | Sink:MaD:22 | +| ImplicitPendingIntentsTest.java:257:66:257:75 | baseIntent : Intent | ImplicitPendingIntentsTest.java:257:32:257:79 | getActivity(...) : PendingIntent | provenance | Config | +| ImplicitPendingIntentsTest.java:269:33:269:44 | new Intent(...) : Intent | ImplicitPendingIntentsTest.java:270:67:270:76 | baseIntent : Intent | provenance | | +| ImplicitPendingIntentsTest.java:270:32:270:80 | getActivity(...) : PendingIntent | ImplicitPendingIntentsTest.java:272:45:272:46 | pi : PendingIntent | provenance | | +| ImplicitPendingIntentsTest.java:270:67:270:76 | baseIntent : Intent | ImplicitPendingIntentsTest.java:270:32:270:80 | getActivity(...) : PendingIntent | provenance | Config | +| ImplicitPendingIntentsTest.java:272:13:272:21 | fwdIntent [post update] : Intent [android.content.Intent.extras, ] : PendingIntent | ImplicitPendingIntentsTest.java:273:26:273:34 | fwdIntent | provenance | Sink:MaD:1 Sink:MaD:1 | +| ImplicitPendingIntentsTest.java:272:45:272:46 | pi : PendingIntent | ImplicitPendingIntentsTest.java:272:13:272:21 | fwdIntent [post update] : Intent [android.content.Intent.extras, ] : PendingIntent | provenance | MaD:32 | +| ImplicitPendingIntentsTest.java:282:22:282:32 | parameter this : TestSliceProvider [mPendingIntent] : PendingIntent | ImplicitPendingIntentsTest.java:314:65:314:78 | this <.field> : TestSliceProvider [mPendingIntent] : PendingIntent | provenance | | +| ImplicitPendingIntentsTest.java:284:37:284:48 | new Intent(...) : Intent | ImplicitPendingIntentsTest.java:285:79:285:88 | baseIntent : Intent | provenance | | +| ImplicitPendingIntentsTest.java:285:36:285:92 | getActivity(...) : PendingIntent | ImplicitPendingIntentsTest.java:286:73:286:74 | pi : PendingIntent | provenance | | +| ImplicitPendingIntentsTest.java:285:79:285:88 | baseIntent : Intent | ImplicitPendingIntentsTest.java:285:36:285:92 | getActivity(...) : PendingIntent | provenance | Config | +| ImplicitPendingIntentsTest.java:286:46:286:92 | createDeeplink(...) : SliceAction [androidx.slice.Slice.action] : Object | ImplicitPendingIntentsTest.java:289:43:289:56 | activityAction : SliceAction [androidx.slice.Slice.action] : Object | provenance | | +| ImplicitPendingIntentsTest.java:286:73:286:74 | pi : PendingIntent | ImplicitPendingIntentsTest.java:286:46:286:92 | createDeeplink(...) : SliceAction [androidx.slice.Slice.action] : Object | provenance | MaD:37 | +| ImplicitPendingIntentsTest.java:288:17:288:27 | listBuilder [post update] : ListBuilder [androidx.slice.Slice.action] : Object | ImplicitPendingIntentsTest.java:290:24:290:34 | listBuilder : ListBuilder [androidx.slice.Slice.action] : Object | provenance | | +| ImplicitPendingIntentsTest.java:288:36:289:57 | setPrimaryAction(...) : RowBuilder [androidx.slice.Slice.action] : Object | ImplicitPendingIntentsTest.java:288:17:288:27 | listBuilder [post update] : ListBuilder [androidx.slice.Slice.action] : Object | provenance | MaD:35 | +| ImplicitPendingIntentsTest.java:289:43:289:56 | activityAction : SliceAction [androidx.slice.Slice.action] : Object | ImplicitPendingIntentsTest.java:288:36:289:57 | setPrimaryAction(...) : RowBuilder [androidx.slice.Slice.action] : Object | provenance | MaD:33+MaD:34 | +| ImplicitPendingIntentsTest.java:290:24:290:34 | listBuilder : ListBuilder [androidx.slice.Slice.action] : Object | ImplicitPendingIntentsTest.java:290:24:290:42 | build(...) | provenance | MaD:36 Sink:MaD:25 | +| ImplicitPendingIntentsTest.java:314:38:314:92 | createDeeplink(...) : SliceAction [androidx.slice.Slice.action] : Object | ImplicitPendingIntentsTest.java:316:90:316:95 | action : SliceAction [androidx.slice.Slice.action] : Object | provenance | | +| ImplicitPendingIntentsTest.java:314:65:314:78 | mPendingIntent : PendingIntent | ImplicitPendingIntentsTest.java:314:38:314:92 | createDeeplink(...) : SliceAction [androidx.slice.Slice.action] : Object | provenance | MaD:37 | +| ImplicitPendingIntentsTest.java:314:65:314:78 | this <.field> : TestSliceProvider [mPendingIntent] : PendingIntent | ImplicitPendingIntentsTest.java:314:65:314:78 | mPendingIntent : PendingIntent | provenance | | +| ImplicitPendingIntentsTest.java:316:17:316:27 | listBuilder [post update] : ListBuilder [androidx.slice.Slice.action] : Object | ImplicitPendingIntentsTest.java:317:24:317:34 | listBuilder : ListBuilder [androidx.slice.Slice.action] : Object | provenance | | +| ImplicitPendingIntentsTest.java:316:36:316:96 | setPrimaryAction(...) : RowBuilder [androidx.slice.Slice.action] : Object | ImplicitPendingIntentsTest.java:316:17:316:27 | listBuilder [post update] : ListBuilder [androidx.slice.Slice.action] : Object | provenance | MaD:35 | +| ImplicitPendingIntentsTest.java:316:90:316:95 | action : SliceAction [androidx.slice.Slice.action] : Object | ImplicitPendingIntentsTest.java:316:36:316:96 | setPrimaryAction(...) : RowBuilder [androidx.slice.Slice.action] : Object | provenance | MaD:33+MaD:34 | +| ImplicitPendingIntentsTest.java:317:24:317:34 | listBuilder : ListBuilder [androidx.slice.Slice.action] : Object | ImplicitPendingIntentsTest.java:317:24:317:42 | build(...) | provenance | MaD:36 Sink:MaD:25 | +| ImplicitPendingIntentsTest.java:324:37:324:48 | new Intent(...) : Intent | ImplicitPendingIntentsTest.java:325:79:325:88 | baseIntent : Intent | provenance | | +| ImplicitPendingIntentsTest.java:325:36:325:92 | getActivity(...) : PendingIntent | ImplicitPendingIntentsTest.java:326:24:326:25 | pi | provenance | Sink:MaD:26 | +| ImplicitPendingIntentsTest.java:325:79:325:88 | baseIntent : Intent | ImplicitPendingIntentsTest.java:325:36:325:92 | getActivity(...) : PendingIntent | provenance | Config | +| ImplicitPendingIntentsTest.java:339:33:339:44 | new Intent(...) : Intent | ImplicitPendingIntentsTest.java:340:73:340:82 | baseIntent : Intent | provenance | | +| ImplicitPendingIntentsTest.java:340:13:340:26 | this <.field> [post update] : TestSliceProvider [mPendingIntent] : PendingIntent | ImplicitPendingIntentsTest.java:282:22:282:32 | parameter this : TestSliceProvider [mPendingIntent] : PendingIntent | provenance | | +| ImplicitPendingIntentsTest.java:340:30:340:86 | getActivity(...) : PendingIntent | ImplicitPendingIntentsTest.java:340:13:340:26 | this <.field> [post update] : TestSliceProvider [mPendingIntent] : PendingIntent | provenance | | +| ImplicitPendingIntentsTest.java:340:73:340:82 | baseIntent : Intent | ImplicitPendingIntentsTest.java:340:30:340:86 | getActivity(...) : PendingIntent | provenance | Config | +models +| 1 | Sink: android.app; Activity; true; setResult; (int,Intent); ; Argument[1]; pending-intents; manual | +| 2 | Sink: android.app; AlarmManager; true; set; (int,long,PendingIntent); ; Argument[2]; pending-intents; manual | +| 3 | Sink: android.app; AlarmManager; true; setAlarmClock; ; ; Argument[1]; pending-intents; manual | +| 4 | Sink: android.app; AlarmManager; true; setAndAllowWhileIdle; ; ; Argument[2]; pending-intents; manual | +| 5 | Sink: android.app; AlarmManager; true; setExact; (int,long,PendingIntent); ; Argument[2]; pending-intents; manual | +| 6 | Sink: android.app; AlarmManager; true; setExactAndAllowWhileIdle; ; ; Argument[2]; pending-intents; manual | +| 7 | Sink: android.app; AlarmManager; true; setInexactRepeating; ; ; Argument[3]; pending-intents; manual | +| 8 | Sink: android.app; AlarmManager; true; setRepeating; ; ; Argument[3]; pending-intents; manual | +| 9 | Sink: android.app; AlarmManager; true; setWindow; (int,long,long,PendingIntent); ; Argument[3]; pending-intents; manual | +| 10 | Sink: android.app; NotificationManager; true; notify; (int,Notification); ; Argument[1]; pending-intents; manual | +| 11 | Sink: android.app; NotificationManager; true; notifyAsPackage; (String,String,int,Notification); ; Argument[3]; pending-intents; manual | +| 12 | Sink: android.app; NotificationManager; true; notifyAsUser; (String,int,Notification,UserHandle); ; Argument[2]; pending-intents; manual | +| 13 | Sink: android.app; PendingIntent; false; send; (Context,int,Intent); ; Argument[2]; pending-intents; manual | +| 14 | Sink: android.app; PendingIntent; false; send; (Context,int,Intent,PendingIntent$OnFinished,Handler); ; Argument[2]; pending-intents; manual | +| 15 | Sink: android.app; PendingIntent; false; send; (Context,int,Intent,PendingIntent$OnFinished,Handler,String); ; Argument[2]; pending-intents; manual | +| 16 | Sink: android.app; PendingIntent; false; send; (Context,int,Intent,PendingIntent$OnFinished,Handler,String,Bundle); ; Argument[2]; pending-intents; manual | +| 17 | Sink: android.content; Context; true; sendBroadcast; ; ; Argument[0]; intent-redirection; manual | +| 18 | Sink: android.content; Context; true; startActivity; ; ; Argument[0]; intent-redirection; manual | +| 19 | Sink: androidx.core.app; AlarmManagerCompat; true; setAlarmClock; ; ; Argument[2..3]; pending-intents; manual | +| 20 | Sink: androidx.core.app; AlarmManagerCompat; true; setAndAllowWhileIdle; ; ; Argument[3]; pending-intents; manual | +| 21 | Sink: androidx.core.app; AlarmManagerCompat; true; setExact; ; ; Argument[3]; pending-intents; manual | +| 22 | Sink: androidx.core.app; AlarmManagerCompat; true; setExactAndAllowWhileIdle; ; ; Argument[3]; pending-intents; manual | +| 23 | Sink: androidx.core.app; NotificationManagerCompat; true; notify; (String,int,Notification); ; Argument[2]; pending-intents; manual | +| 24 | Sink: androidx.core.app; NotificationManagerCompat; true; notify; (int,Notification); ; Argument[1]; pending-intents; manual | +| 25 | Sink: androidx.slice; SliceProvider; true; onBindSlice; ; ; ReturnValue; pending-intents; manual | +| 26 | Sink: androidx.slice; SliceProvider; true; onCreatePermissionRequest; ; ; ReturnValue; pending-intents; manual | +| 27 | Summary: android.app; Notification$Action$Builder; true; Builder; (int,CharSequence,PendingIntent); ; Argument[2]; Argument[this]; taint; manual | +| 28 | Summary: android.app; Notification$Action$Builder; true; build; ; ; Argument[this]; ReturnValue; taint; manual | +| 29 | Summary: android.app; Notification$Builder; true; addAction; (Notification$Action); ; Argument[0]; Argument[this]; taint; manual | +| 30 | Summary: android.app; Notification$Builder; true; addAction; ; ; Argument[this]; ReturnValue; value; manual | +| 31 | Summary: android.app; Notification$Builder; true; build; ; ; Argument[this]; ReturnValue; taint; manual | +| 32 | Summary: android.content; Intent; true; putExtra; ; ; Argument[1]; Argument[this].SyntheticField[android.content.Intent.extras].MapValue; value; manual | +| 33 | Summary: androidx.slice.builders; ListBuilder$RowBuilder; true; setPrimaryAction; ; ; Argument[0].SyntheticField[androidx.slice.Slice.action]; Argument[this].SyntheticField[androidx.slice.Slice.action]; taint; manual | +| 34 | Summary: androidx.slice.builders; ListBuilder$RowBuilder; true; setPrimaryAction; ; ; Argument[this]; ReturnValue; value; manual | +| 35 | Summary: androidx.slice.builders; ListBuilder; true; addRow; ; ; Argument[0].SyntheticField[androidx.slice.Slice.action]; Argument[this].SyntheticField[androidx.slice.Slice.action]; taint; manual | +| 36 | Summary: androidx.slice.builders; ListBuilder; true; build; ; ; Argument[this].SyntheticField[androidx.slice.Slice.action]; ReturnValue; taint; manual | +| 37 | Summary: androidx.slice.builders; SliceAction; true; createDeeplink; (PendingIntent,IconCompat,int,CharSequence); ; Argument[0]; ReturnValue.SyntheticField[androidx.slice.Slice.action]; taint; manual | +nodes +| ImplicitPendingIntentsTest.java:31:33:31:44 | new Intent(...) : Intent | semmle.label | new Intent(...) : Intent | +| ImplicitPendingIntentsTest.java:32:32:32:79 | getActivity(...) : PendingIntent | semmle.label | getActivity(...) : PendingIntent | +| ImplicitPendingIntentsTest.java:32:66:32:75 | baseIntent : Intent | semmle.label | baseIntent : Intent | +| ImplicitPendingIntentsTest.java:34:13:34:21 | fwdIntent [post update] : Intent [android.content.Intent.extras, ] : PendingIntent | semmle.label | fwdIntent [post update] : Intent [android.content.Intent.extras, ] : PendingIntent | +| ImplicitPendingIntentsTest.java:34:45:34:46 | pi : PendingIntent | semmle.label | pi : PendingIntent | +| ImplicitPendingIntentsTest.java:36:31:36:39 | fwdIntent | semmle.label | fwdIntent | +| ImplicitPendingIntentsTest.java:38:31:38:39 | fwdIntent | semmle.label | fwdIntent | +| ImplicitPendingIntentsTest.java:41:31:41:39 | fwdIntent | semmle.label | fwdIntent | +| ImplicitPendingIntentsTest.java:48:33:48:44 | new Intent(...) : Intent | semmle.label | new Intent(...) : Intent | +| ImplicitPendingIntentsTest.java:49:32:49:97 | getActivityAsUser(...) : PendingIntent | semmle.label | getActivityAsUser(...) : PendingIntent | +| ImplicitPendingIntentsTest.java:49:72:49:81 | baseIntent : Intent | semmle.label | baseIntent : Intent | +| ImplicitPendingIntentsTest.java:51:13:51:21 | fwdIntent [post update] : Intent [android.content.Intent.extras, ] : PendingIntent | semmle.label | fwdIntent [post update] : Intent [android.content.Intent.extras, ] : PendingIntent | +| ImplicitPendingIntentsTest.java:51:45:51:46 | pi : PendingIntent | semmle.label | pi : PendingIntent | +| ImplicitPendingIntentsTest.java:52:31:52:39 | fwdIntent | semmle.label | fwdIntent | +| ImplicitPendingIntentsTest.java:56:33:56:44 | new Intent(...) : Intent | semmle.label | new Intent(...) : Intent | +| ImplicitPendingIntentsTest.java:57:32:57:96 | getActivities(...) : PendingIntent | semmle.label | getActivities(...) : PendingIntent | +| ImplicitPendingIntentsTest.java:57:68:57:92 | new Intent[] : Intent[] [[]] : Intent | semmle.label | new Intent[] : Intent[] [[]] : Intent | +| ImplicitPendingIntentsTest.java:57:68:57:92 | {...} : Intent[] [[]] : Intent | semmle.label | {...} : Intent[] [[]] : Intent | +| ImplicitPendingIntentsTest.java:57:82:57:91 | baseIntent : Intent | semmle.label | baseIntent : Intent | +| ImplicitPendingIntentsTest.java:59:13:59:21 | fwdIntent [post update] : Intent [android.content.Intent.extras, ] : PendingIntent | semmle.label | fwdIntent [post update] : Intent [android.content.Intent.extras, ] : PendingIntent | +| ImplicitPendingIntentsTest.java:59:45:59:46 | pi : PendingIntent | semmle.label | pi : PendingIntent | +| ImplicitPendingIntentsTest.java:60:31:60:39 | fwdIntent | semmle.label | fwdIntent | +| ImplicitPendingIntentsTest.java:64:33:64:44 | new Intent(...) : Intent | semmle.label | new Intent(...) : Intent | +| ImplicitPendingIntentsTest.java:65:32:66:34 | getActivitiesAsUser(...) : PendingIntent | semmle.label | getActivitiesAsUser(...) : PendingIntent | +| ImplicitPendingIntentsTest.java:65:74:65:98 | new Intent[] : Intent[] [[]] : Intent | semmle.label | new Intent[] : Intent[] [[]] : Intent | +| ImplicitPendingIntentsTest.java:65:74:65:98 | {...} : Intent[] [[]] : Intent | semmle.label | {...} : Intent[] [[]] : Intent | +| ImplicitPendingIntentsTest.java:65:88:65:97 | baseIntent : Intent | semmle.label | baseIntent : Intent | +| ImplicitPendingIntentsTest.java:68:13:68:21 | fwdIntent [post update] : Intent [android.content.Intent.extras, ] : PendingIntent | semmle.label | fwdIntent [post update] : Intent [android.content.Intent.extras, ] : PendingIntent | +| ImplicitPendingIntentsTest.java:68:45:68:46 | pi : PendingIntent | semmle.label | pi : PendingIntent | +| ImplicitPendingIntentsTest.java:69:31:69:39 | fwdIntent | semmle.label | fwdIntent | +| ImplicitPendingIntentsTest.java:73:33:73:44 | new Intent(...) : Intent | semmle.label | new Intent(...) : Intent | +| ImplicitPendingIntentsTest.java:74:32:74:80 | getBroadcast(...) : PendingIntent | semmle.label | getBroadcast(...) : PendingIntent | +| ImplicitPendingIntentsTest.java:74:67:74:76 | baseIntent : Intent | semmle.label | baseIntent : Intent | +| ImplicitPendingIntentsTest.java:76:13:76:21 | fwdIntent [post update] : Intent [android.content.Intent.extras, ] : PendingIntent | semmle.label | fwdIntent [post update] : Intent [android.content.Intent.extras, ] : PendingIntent | +| ImplicitPendingIntentsTest.java:76:45:76:46 | pi : PendingIntent | semmle.label | pi : PendingIntent | +| ImplicitPendingIntentsTest.java:77:31:77:39 | fwdIntent | semmle.label | fwdIntent | +| ImplicitPendingIntentsTest.java:81:33:81:44 | new Intent(...) : Intent | semmle.label | new Intent(...) : Intent | +| ImplicitPendingIntentsTest.java:82:32:82:92 | getBroadcastAsUser(...) : PendingIntent | semmle.label | getBroadcastAsUser(...) : PendingIntent | +| ImplicitPendingIntentsTest.java:82:73:82:82 | baseIntent : Intent | semmle.label | baseIntent : Intent | +| ImplicitPendingIntentsTest.java:84:13:84:21 | fwdIntent [post update] : Intent [android.content.Intent.extras, ] : PendingIntent | semmle.label | fwdIntent [post update] : Intent [android.content.Intent.extras, ] : PendingIntent | +| ImplicitPendingIntentsTest.java:84:45:84:46 | pi : PendingIntent | semmle.label | pi : PendingIntent | +| ImplicitPendingIntentsTest.java:85:31:85:39 | fwdIntent | semmle.label | fwdIntent | +| ImplicitPendingIntentsTest.java:89:33:89:44 | new Intent(...) : Intent | semmle.label | new Intent(...) : Intent | +| ImplicitPendingIntentsTest.java:90:32:90:78 | getService(...) : PendingIntent | semmle.label | getService(...) : PendingIntent | +| ImplicitPendingIntentsTest.java:90:65:90:74 | baseIntent : Intent | semmle.label | baseIntent : Intent | +| ImplicitPendingIntentsTest.java:92:13:92:21 | fwdIntent [post update] : Intent [android.content.Intent.extras, ] : PendingIntent | semmle.label | fwdIntent [post update] : Intent [android.content.Intent.extras, ] : PendingIntent | +| ImplicitPendingIntentsTest.java:92:45:92:46 | pi : PendingIntent | semmle.label | pi : PendingIntent | +| ImplicitPendingIntentsTest.java:93:31:93:39 | fwdIntent | semmle.label | fwdIntent | +| ImplicitPendingIntentsTest.java:97:33:97:44 | new Intent(...) : Intent | semmle.label | new Intent(...) : Intent | +| ImplicitPendingIntentsTest.java:98:32:98:88 | getForegroundService(...) : PendingIntent | semmle.label | getForegroundService(...) : PendingIntent | +| ImplicitPendingIntentsTest.java:98:75:98:84 | baseIntent : Intent | semmle.label | baseIntent : Intent | +| ImplicitPendingIntentsTest.java:100:13:100:21 | fwdIntent [post update] : Intent [android.content.Intent.extras, ] : PendingIntent | semmle.label | fwdIntent [post update] : Intent [android.content.Intent.extras, ] : PendingIntent | +| ImplicitPendingIntentsTest.java:100:45:100:46 | pi : PendingIntent | semmle.label | pi : PendingIntent | +| ImplicitPendingIntentsTest.java:101:31:101:39 | fwdIntent | semmle.label | fwdIntent | +| ImplicitPendingIntentsTest.java:166:33:166:44 | new Intent(...) : Intent | semmle.label | new Intent(...) : Intent | +| ImplicitPendingIntentsTest.java:167:32:167:79 | getActivity(...) : PendingIntent | semmle.label | getActivity(...) : PendingIntent | +| ImplicitPendingIntentsTest.java:167:66:167:75 | baseIntent : Intent | semmle.label | baseIntent : Intent | +| ImplicitPendingIntentsTest.java:169:13:169:21 | fwdIntent [post update] : Intent [android.content.Intent.extras, ] : PendingIntent | semmle.label | fwdIntent [post update] : Intent [android.content.Intent.extras, ] : PendingIntent | +| ImplicitPendingIntentsTest.java:169:45:169:46 | pi : PendingIntent | semmle.label | pi : PendingIntent | +| ImplicitPendingIntentsTest.java:170:32:170:40 | fwdIntent | semmle.label | fwdIntent | +| ImplicitPendingIntentsTest.java:171:32:171:40 | fwdIntent | semmle.label | fwdIntent | +| ImplicitPendingIntentsTest.java:172:32:172:40 | fwdIntent | semmle.label | fwdIntent | +| ImplicitPendingIntentsTest.java:173:32:173:40 | fwdIntent | semmle.label | fwdIntent | +| ImplicitPendingIntentsTest.java:181:33:181:44 | new Intent(...) : Intent | semmle.label | new Intent(...) : Intent | +| ImplicitPendingIntentsTest.java:182:32:182:79 | getActivity(...) : PendingIntent | semmle.label | getActivity(...) : PendingIntent | +| ImplicitPendingIntentsTest.java:182:66:182:75 | baseIntent : Intent | semmle.label | baseIntent : Intent | +| ImplicitPendingIntentsTest.java:183:52:183:93 | new Builder(...) : Builder | semmle.label | new Builder(...) : Builder | +| ImplicitPendingIntentsTest.java:183:91:183:92 | pi : PendingIntent | semmle.label | pi : PendingIntent | +| ImplicitPendingIntentsTest.java:185:21:185:77 | addAction(...) : Builder | semmle.label | addAction(...) : Builder | +| ImplicitPendingIntentsTest.java:185:61:185:68 | aBuilder : Builder | semmle.label | aBuilder : Builder | +| ImplicitPendingIntentsTest.java:185:61:185:76 | build(...) : Action | semmle.label | build(...) : Action | +| ImplicitPendingIntentsTest.java:186:41:186:48 | nBuilder : Builder | semmle.label | nBuilder : Builder | +| ImplicitPendingIntentsTest.java:186:41:186:56 | build(...) : Notification | semmle.label | build(...) : Notification | +| ImplicitPendingIntentsTest.java:188:65:188:76 | notification | semmle.label | notification | +| ImplicitPendingIntentsTest.java:189:32:189:43 | notification | semmle.label | notification | +| ImplicitPendingIntentsTest.java:190:42:190:53 | notification | semmle.label | notification | +| ImplicitPendingIntentsTest.java:222:33:222:44 | new Intent(...) : Intent | semmle.label | new Intent(...) : Intent | +| ImplicitPendingIntentsTest.java:223:32:223:79 | getActivity(...) : PendingIntent | semmle.label | getActivity(...) : PendingIntent | +| ImplicitPendingIntentsTest.java:223:66:223:75 | baseIntent : Intent | semmle.label | baseIntent : Intent | +| ImplicitPendingIntentsTest.java:224:52:224:93 | new Builder(...) : Builder | semmle.label | new Builder(...) : Builder | +| ImplicitPendingIntentsTest.java:224:91:224:92 | pi : PendingIntent | semmle.label | pi : PendingIntent | +| ImplicitPendingIntentsTest.java:226:21:226:77 | addAction(...) : Builder | semmle.label | addAction(...) : Builder | +| ImplicitPendingIntentsTest.java:226:61:226:68 | aBuilder : Builder | semmle.label | aBuilder : Builder | +| ImplicitPendingIntentsTest.java:226:61:226:76 | build(...) : Action | semmle.label | build(...) : Action | +| ImplicitPendingIntentsTest.java:227:41:227:48 | nBuilder : Builder | semmle.label | nBuilder : Builder | +| ImplicitPendingIntentsTest.java:227:41:227:56 | build(...) : Notification | semmle.label | build(...) : Notification | +| ImplicitPendingIntentsTest.java:229:32:229:43 | notification | semmle.label | notification | +| ImplicitPendingIntentsTest.java:230:36:230:47 | notification | semmle.label | notification | +| ImplicitPendingIntentsTest.java:237:33:237:44 | new Intent(...) : Intent | semmle.label | new Intent(...) : Intent | +| ImplicitPendingIntentsTest.java:238:32:238:79 | getActivity(...) : PendingIntent | semmle.label | getActivity(...) : PendingIntent | +| ImplicitPendingIntentsTest.java:238:66:238:75 | baseIntent : Intent | semmle.label | baseIntent : Intent | +| ImplicitPendingIntentsTest.java:239:32:239:33 | pi | semmle.label | pi | +| ImplicitPendingIntentsTest.java:240:42:240:43 | pi | semmle.label | pi | +| ImplicitPendingIntentsTest.java:241:49:241:50 | pi | semmle.label | pi | +| ImplicitPendingIntentsTest.java:242:37:242:38 | pi | semmle.label | pi | +| ImplicitPendingIntentsTest.java:243:54:243:55 | pi | semmle.label | pi | +| ImplicitPendingIntentsTest.java:244:51:244:52 | pi | semmle.label | pi | +| ImplicitPendingIntentsTest.java:245:44:245:45 | pi | semmle.label | pi | +| ImplicitPendingIntentsTest.java:246:41:246:42 | pi | semmle.label | pi | +| ImplicitPendingIntentsTest.java:256:33:256:44 | new Intent(...) : Intent | semmle.label | new Intent(...) : Intent | +| ImplicitPendingIntentsTest.java:257:32:257:79 | getActivity(...) : PendingIntent | semmle.label | getActivity(...) : PendingIntent | +| ImplicitPendingIntentsTest.java:257:66:257:75 | baseIntent : Intent | semmle.label | baseIntent : Intent | +| ImplicitPendingIntentsTest.java:258:59:258:60 | pi | semmle.label | pi | +| ImplicitPendingIntentsTest.java:259:65:259:66 | pi | semmle.label | pi | +| ImplicitPendingIntentsTest.java:260:69:260:70 | pi | semmle.label | pi | +| ImplicitPendingIntentsTest.java:261:57:261:58 | pi | semmle.label | pi | +| ImplicitPendingIntentsTest.java:262:74:262:75 | pi | semmle.label | pi | +| ImplicitPendingIntentsTest.java:269:33:269:44 | new Intent(...) : Intent | semmle.label | new Intent(...) : Intent | +| ImplicitPendingIntentsTest.java:270:32:270:80 | getActivity(...) : PendingIntent | semmle.label | getActivity(...) : PendingIntent | +| ImplicitPendingIntentsTest.java:270:67:270:76 | baseIntent : Intent | semmle.label | baseIntent : Intent | +| ImplicitPendingIntentsTest.java:272:13:272:21 | fwdIntent [post update] : Intent [android.content.Intent.extras, ] : PendingIntent | semmle.label | fwdIntent [post update] : Intent [android.content.Intent.extras, ] : PendingIntent | +| ImplicitPendingIntentsTest.java:272:45:272:46 | pi : PendingIntent | semmle.label | pi : PendingIntent | +| ImplicitPendingIntentsTest.java:273:26:273:34 | fwdIntent | semmle.label | fwdIntent | +| ImplicitPendingIntentsTest.java:282:22:282:32 | parameter this : TestSliceProvider [mPendingIntent] : PendingIntent | semmle.label | parameter this : TestSliceProvider [mPendingIntent] : PendingIntent | +| ImplicitPendingIntentsTest.java:284:37:284:48 | new Intent(...) : Intent | semmle.label | new Intent(...) : Intent | +| ImplicitPendingIntentsTest.java:285:36:285:92 | getActivity(...) : PendingIntent | semmle.label | getActivity(...) : PendingIntent | +| ImplicitPendingIntentsTest.java:285:79:285:88 | baseIntent : Intent | semmle.label | baseIntent : Intent | +| ImplicitPendingIntentsTest.java:286:46:286:92 | createDeeplink(...) : SliceAction [androidx.slice.Slice.action] : Object | semmle.label | createDeeplink(...) : SliceAction [androidx.slice.Slice.action] : Object | +| ImplicitPendingIntentsTest.java:286:73:286:74 | pi : PendingIntent | semmle.label | pi : PendingIntent | +| ImplicitPendingIntentsTest.java:288:17:288:27 | listBuilder [post update] : ListBuilder [androidx.slice.Slice.action] : Object | semmle.label | listBuilder [post update] : ListBuilder [androidx.slice.Slice.action] : Object | +| ImplicitPendingIntentsTest.java:288:36:289:57 | setPrimaryAction(...) : RowBuilder [androidx.slice.Slice.action] : Object | semmle.label | setPrimaryAction(...) : RowBuilder [androidx.slice.Slice.action] : Object | +| ImplicitPendingIntentsTest.java:289:43:289:56 | activityAction : SliceAction [androidx.slice.Slice.action] : Object | semmle.label | activityAction : SliceAction [androidx.slice.Slice.action] : Object | +| ImplicitPendingIntentsTest.java:290:24:290:34 | listBuilder : ListBuilder [androidx.slice.Slice.action] : Object | semmle.label | listBuilder : ListBuilder [androidx.slice.Slice.action] : Object | +| ImplicitPendingIntentsTest.java:290:24:290:42 | build(...) | semmle.label | build(...) | +| ImplicitPendingIntentsTest.java:314:38:314:92 | createDeeplink(...) : SliceAction [androidx.slice.Slice.action] : Object | semmle.label | createDeeplink(...) : SliceAction [androidx.slice.Slice.action] : Object | +| ImplicitPendingIntentsTest.java:314:65:314:78 | mPendingIntent : PendingIntent | semmle.label | mPendingIntent : PendingIntent | +| ImplicitPendingIntentsTest.java:314:65:314:78 | this <.field> : TestSliceProvider [mPendingIntent] : PendingIntent | semmle.label | this <.field> : TestSliceProvider [mPendingIntent] : PendingIntent | +| ImplicitPendingIntentsTest.java:316:17:316:27 | listBuilder [post update] : ListBuilder [androidx.slice.Slice.action] : Object | semmle.label | listBuilder [post update] : ListBuilder [androidx.slice.Slice.action] : Object | +| ImplicitPendingIntentsTest.java:316:36:316:96 | setPrimaryAction(...) : RowBuilder [androidx.slice.Slice.action] : Object | semmle.label | setPrimaryAction(...) : RowBuilder [androidx.slice.Slice.action] : Object | +| ImplicitPendingIntentsTest.java:316:90:316:95 | action : SliceAction [androidx.slice.Slice.action] : Object | semmle.label | action : SliceAction [androidx.slice.Slice.action] : Object | +| ImplicitPendingIntentsTest.java:317:24:317:34 | listBuilder : ListBuilder [androidx.slice.Slice.action] : Object | semmle.label | listBuilder : ListBuilder [androidx.slice.Slice.action] : Object | +| ImplicitPendingIntentsTest.java:317:24:317:42 | build(...) | semmle.label | build(...) | +| ImplicitPendingIntentsTest.java:324:37:324:48 | new Intent(...) : Intent | semmle.label | new Intent(...) : Intent | +| ImplicitPendingIntentsTest.java:325:36:325:92 | getActivity(...) : PendingIntent | semmle.label | getActivity(...) : PendingIntent | +| ImplicitPendingIntentsTest.java:325:79:325:88 | baseIntent : Intent | semmle.label | baseIntent : Intent | +| ImplicitPendingIntentsTest.java:326:24:326:25 | pi | semmle.label | pi | +| ImplicitPendingIntentsTest.java:339:33:339:44 | new Intent(...) : Intent | semmle.label | new Intent(...) : Intent | +| ImplicitPendingIntentsTest.java:340:13:340:26 | this <.field> [post update] : TestSliceProvider [mPendingIntent] : PendingIntent | semmle.label | this <.field> [post update] : TestSliceProvider [mPendingIntent] : PendingIntent | +| ImplicitPendingIntentsTest.java:340:30:340:86 | getActivity(...) : PendingIntent | semmle.label | getActivity(...) : PendingIntent | +| ImplicitPendingIntentsTest.java:340:73:340:82 | baseIntent : Intent | semmle.label | baseIntent : Intent | +subpaths diff --git a/java/ql/test/query-tests/security/CWE-927/ImplicitPendingIntentsTest.java b/java/ql/test/query-tests/security/CWE-927/ImplicitPendingIntents/ImplicitPendingIntentsTest.java similarity index 80% rename from java/ql/test/query-tests/security/CWE-927/ImplicitPendingIntentsTest.java rename to java/ql/test/query-tests/security/CWE-927/ImplicitPendingIntents/ImplicitPendingIntentsTest.java index 80f66149221..5bada3e7736 100644 --- a/java/ql/test/query-tests/security/CWE-927/ImplicitPendingIntentsTest.java +++ b/java/ql/test/query-tests/security/CWE-927/ImplicitPendingIntents/ImplicitPendingIntentsTest.java @@ -28,77 +28,77 @@ public class ImplicitPendingIntentsTest { public static void testPendingIntentAsAnExtra(Context ctx) throws PendingIntent.CanceledException { { - Intent baseIntent = new Intent(); + Intent baseIntent = new Intent(); // $ Source PendingIntent pi = PendingIntent.getActivity(ctx, 0, baseIntent, 0); Intent fwdIntent = new Intent(); fwdIntent.putExtra("fwdIntent", pi); - ctx.startActivities(new Intent[] {fwdIntent}); // $ MISSING: hasImplicitPendingIntent - ctx.startActivity(fwdIntent); // $hasImplicitPendingIntent + ctx.startActivities(new Intent[] {fwdIntent}); // $ MISSING: Alert + ctx.startActivity(fwdIntent); // $ Alert ctx.startService(fwdIntent); // Safe - ctx.sendBroadcast(fwdIntent); // $hasImplicitPendingIntent + ctx.sendBroadcast(fwdIntent); // $ Alert fwdIntent.setComponent(null); // Not a sanitizer - ctx.startActivity(fwdIntent); // $hasImplicitPendingIntent + ctx.startActivity(fwdIntent); // $ Alert fwdIntent.setPackage("a.safe.package"); // Sanitizer ctx.startActivity(fwdIntent); // Safe } { - Intent baseIntent = new Intent(); + Intent baseIntent = new Intent(); // $ Source PendingIntent pi = PendingIntent.getActivityAsUser(ctx, 0, baseIntent, 0, null, null); Intent fwdIntent = new Intent(); fwdIntent.putExtra("fwdIntent", pi); - ctx.startActivity(fwdIntent); // $hasImplicitPendingIntent + ctx.startActivity(fwdIntent); // $ Alert } { - Intent baseIntent = new Intent(); + Intent baseIntent = new Intent(); // $ Source PendingIntent pi = PendingIntent.getActivities(ctx, 0, new Intent[] {baseIntent}, 0); Intent fwdIntent = new Intent(); fwdIntent.putExtra("fwdIntent", pi); - ctx.startActivity(fwdIntent); // $hasImplicitPendingIntent + ctx.startActivity(fwdIntent); // $ Alert } { - Intent baseIntent = new Intent(); + Intent baseIntent = new Intent(); // $ Source PendingIntent pi = PendingIntent.getActivitiesAsUser(ctx, 0, new Intent[] {baseIntent}, 0, null, null); Intent fwdIntent = new Intent(); fwdIntent.putExtra("fwdIntent", pi); - ctx.startActivity(fwdIntent); // $hasImplicitPendingIntent + ctx.startActivity(fwdIntent); // $ Alert } { - Intent baseIntent = new Intent(); + Intent baseIntent = new Intent(); // $ Source PendingIntent pi = PendingIntent.getBroadcast(ctx, 0, baseIntent, 0); Intent fwdIntent = new Intent(); fwdIntent.putExtra("fwdIntent", pi); - ctx.sendBroadcast(fwdIntent); // $hasImplicitPendingIntent + ctx.sendBroadcast(fwdIntent); // $ Alert } { - Intent baseIntent = new Intent(); + Intent baseIntent = new Intent(); // $ Source PendingIntent pi = PendingIntent.getBroadcastAsUser(ctx, 0, baseIntent, 0, null); Intent fwdIntent = new Intent(); fwdIntent.putExtra("fwdIntent", pi); - ctx.sendBroadcast(fwdIntent); // $hasImplicitPendingIntent + ctx.sendBroadcast(fwdIntent); // $ Alert } { - Intent baseIntent = new Intent(); + Intent baseIntent = new Intent(); // $ Source PendingIntent pi = PendingIntent.getService(ctx, 0, baseIntent, 0); Intent fwdIntent = new Intent(); fwdIntent.putExtra("fwdIntent", pi); - ctx.startActivity(fwdIntent); // $hasImplicitPendingIntent + ctx.startActivity(fwdIntent); // $ Alert } { - Intent baseIntent = new Intent(); + Intent baseIntent = new Intent(); // $ Source PendingIntent pi = PendingIntent.getForegroundService(ctx, 0, baseIntent, 0); Intent fwdIntent = new Intent(); fwdIntent.putExtra("fwdIntent", pi); - ctx.startActivity(fwdIntent); // $hasImplicitPendingIntent + ctx.startActivity(fwdIntent); // $ Alert } { @@ -163,14 +163,14 @@ public class ImplicitPendingIntentsTest { public static void testPendingIntentWrappedInAnotherPendingIntent(Context ctx, PendingIntent other) throws PendingIntent.CanceledException { { - Intent baseIntent = new Intent(); + Intent baseIntent = new Intent(); // $ Source PendingIntent pi = PendingIntent.getActivity(ctx, 0, baseIntent, 0); Intent fwdIntent = new Intent(); fwdIntent.putExtra("fwdIntent", pi); - other.send(ctx, 0, fwdIntent); // $hasImplicitPendingIntent - other.send(ctx, 0, fwdIntent, null, null); // $hasImplicitPendingIntent - other.send(ctx, 0, fwdIntent, null, null, null); // $hasImplicitPendingIntent - other.send(ctx, 0, fwdIntent, null, null, null, null); // $hasImplicitPendingIntent + other.send(ctx, 0, fwdIntent); // $ Alert + other.send(ctx, 0, fwdIntent, null, null); // $ Alert + other.send(ctx, 0, fwdIntent, null, null, null); // $ Alert + other.send(ctx, 0, fwdIntent, null, null, null, null); // $ Alert } } @@ -178,16 +178,16 @@ public class ImplicitPendingIntentsTest { throws PendingIntent.CanceledException { { - Intent baseIntent = new Intent(); + Intent baseIntent = new Intent(); // $ Source PendingIntent pi = PendingIntent.getActivity(ctx, 0, baseIntent, 0); Notification.Action.Builder aBuilder = new Notification.Action.Builder(0, "", pi); Notification.Builder nBuilder = new Notification.Builder(ctx).addAction(aBuilder.build()); Notification notification = nBuilder.build(); NotificationManager nManager = null; - nManager.notifyAsPackage("targetPackage", "tag", 0, notification); // $hasImplicitPendingIntent - nManager.notify(0, notification); // $hasImplicitPendingIntent - nManager.notifyAsUser("", 0, notification, null); // $hasImplicitPendingIntent + nManager.notifyAsPackage("targetPackage", "tag", 0, notification); // $ Alert + nManager.notify(0, notification); // $ Alert + nManager.notifyAsUser("", 0, notification, null); // $ Alert } { Intent baseIntent = new Intent(); @@ -219,31 +219,31 @@ public class ImplicitPendingIntentsTest { } // Compat sinks { - Intent baseIntent = new Intent(); + Intent baseIntent = new Intent(); // $ Source PendingIntent pi = PendingIntent.getActivity(ctx, 0, baseIntent, 0); Notification.Action.Builder aBuilder = new Notification.Action.Builder(0, "", pi); Notification.Builder nBuilder = new Notification.Builder(ctx).addAction(aBuilder.build()); Notification notification = nBuilder.build(); NotificationManagerCompat nManager = null; - nManager.notify(0, notification); // $hasImplicitPendingIntent - nManager.notify("", 0, notification); // $hasImplicitPendingIntent + nManager.notify(0, notification); // $ Alert + nManager.notify("", 0, notification); // $ Alert } } public static void testPendingIntentInAnAlarm(Context ctx) { AlarmManager aManager = (AlarmManager) ctx.getSystemService(Context.ALARM_SERVICE); { - Intent baseIntent = new Intent(); + Intent baseIntent = new Intent(); // $ Source PendingIntent pi = PendingIntent.getActivity(ctx, 0, baseIntent, 0); - aManager.set(0, 0, pi); // $hasImplicitPendingIntent - aManager.setAlarmClock(null, pi); // $hasImplicitPendingIntent - aManager.setAndAllowWhileIdle(0, 0, pi); // $hasImplicitPendingIntent - aManager.setExact(0, 0, pi); // $hasImplicitPendingIntent - aManager.setExactAndAllowWhileIdle(0, 0, pi); // $hasImplicitPendingIntent - aManager.setInexactRepeating(0, 0, 0, pi); // $hasImplicitPendingIntent - aManager.setRepeating(0, 0, 0, pi); // $hasImplicitPendingIntent - aManager.setWindow(0, 0, 0, pi); // $hasImplicitPendingIntent + aManager.set(0, 0, pi); // $ Alert + aManager.setAlarmClock(null, pi); // $ Alert + aManager.setAndAllowWhileIdle(0, 0, pi); // $ Alert + aManager.setExact(0, 0, pi); // $ Alert + aManager.setExactAndAllowWhileIdle(0, 0, pi); // $ Alert + aManager.setInexactRepeating(0, 0, 0, pi); // $ Alert + aManager.setRepeating(0, 0, 0, pi); // $ Alert + aManager.setWindow(0, 0, 0, pi); // $ Alert } { Intent baseIntent = new Intent(); @@ -253,24 +253,24 @@ public class ImplicitPendingIntentsTest { } // Compat sinks { - Intent baseIntent = new Intent(); + Intent baseIntent = new Intent(); // $ Source PendingIntent pi = PendingIntent.getActivity(ctx, 0, baseIntent, 0); - AlarmManagerCompat.setAlarmClock(aManager, 0, pi, null); // $hasImplicitPendingIntent - AlarmManagerCompat.setAlarmClock(aManager, 0, null, pi); // $hasImplicitPendingIntent - AlarmManagerCompat.setAndAllowWhileIdle(aManager, 0, 0, pi); // $hasImplicitPendingIntent - AlarmManagerCompat.setExact(aManager, 0, 0, pi); // $hasImplicitPendingIntent - AlarmManagerCompat.setExactAndAllowWhileIdle(aManager, 0, 0, pi); // $hasImplicitPendingIntent + AlarmManagerCompat.setAlarmClock(aManager, 0, pi, null); // $ Alert + AlarmManagerCompat.setAlarmClock(aManager, 0, null, pi); // $ Alert + AlarmManagerCompat.setAndAllowWhileIdle(aManager, 0, 0, pi); // $ Alert + AlarmManagerCompat.setExact(aManager, 0, 0, pi); // $ Alert + AlarmManagerCompat.setExactAndAllowWhileIdle(aManager, 0, 0, pi); // $ Alert } } static class TestActivity extends Activity { @Override public void onCreate(Bundle bundle) { - Intent baseIntent = new Intent(); + Intent baseIntent = new Intent(); // $ Source PendingIntent pi = PendingIntent.getActivity(null, 0, baseIntent, 0); Intent fwdIntent = new Intent(); fwdIntent.putExtra("fwdIntent", pi); - setResult(0, fwdIntent); // $hasImplicitPendingIntent + setResult(0, fwdIntent); // $ Alert } } @@ -281,13 +281,13 @@ public class ImplicitPendingIntentsTest { @Override public Slice onBindSlice(Uri sliceUri) { if (sliceUri.getAuthority().equals("1")) { - Intent baseIntent = new Intent(); + Intent baseIntent = new Intent(); // $ Source PendingIntent pi = PendingIntent.getActivity(getContext(), 0, baseIntent, 0); SliceAction activityAction = SliceAction.createDeeplink(pi, null, 0, "Test"); ListBuilder listBuilder = new ListBuilder(getContext(), sliceUri, null); listBuilder.addRow(new ListBuilder.RowBuilder().setTitle("Title") .setPrimaryAction(activityAction)); - return listBuilder.build(); // $hasImplicitPendingIntent + return listBuilder.build(); // $ Alert } else if (sliceUri.getAuthority().equals("2")) { Intent baseIntent = new Intent(getContext(), Activity.class); // Sanitizer @@ -314,16 +314,16 @@ public class ImplicitPendingIntentsTest { SliceAction action = SliceAction.createDeeplink(mPendingIntent, null, 0, ""); ListBuilder listBuilder = new ListBuilder(getContext(), sliceUri, 0); listBuilder.addRow(new ListBuilder.RowBuilder(sliceUri).setPrimaryAction(action)); - return listBuilder.build(); // $hasImplicitPendingIntent + return listBuilder.build(); // $ Alert } } @Override public PendingIntent onCreatePermissionRequest(Uri sliceUri, String callingPackage) { if (sliceUri.getAuthority().equals("1")) { - Intent baseIntent = new Intent(); + Intent baseIntent = new Intent(); // $ Source PendingIntent pi = PendingIntent.getActivity(getContext(), 0, baseIntent, 0); - return pi; // $hasImplicitPendingIntent + return pi; // $ Alert } else { Intent baseIntent = new Intent(); PendingIntent pi = PendingIntent.getActivity(getContext(), 0, baseIntent, @@ -336,7 +336,7 @@ public class ImplicitPendingIntentsTest { public boolean onCreateSliceProvider() { // Testing implicit field read flows: // mPendingIntent is used in onBindSlice - Intent baseIntent = new Intent(); + Intent baseIntent = new Intent(); // $ Source mPendingIntent = PendingIntent.getActivity(getContext(), 0, baseIntent, 0); return true; } diff --git a/java/ql/test/query-tests/security/CWE-927/ImplicitPendingIntents/ImplicitPendingIntentsTest.qlref b/java/ql/test/query-tests/security/CWE-927/ImplicitPendingIntents/ImplicitPendingIntentsTest.qlref new file mode 100644 index 00000000000..beeff5417fc --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-927/ImplicitPendingIntents/ImplicitPendingIntentsTest.qlref @@ -0,0 +1,4 @@ +query: Security/CWE/CWE-927/ImplicitPendingIntents.ql +postprocess: + - utils/test/PrettyPrintModels.ql + - utils/test/InlineExpectationsTestQuery.ql diff --git a/java/ql/test/query-tests/security/CWE-927/ImplicitPendingIntents/options b/java/ql/test/query-tests/security/CWE-927/ImplicitPendingIntents/options new file mode 100644 index 00000000000..43e25f608b6 --- /dev/null +++ b/java/ql/test/query-tests/security/CWE-927/ImplicitPendingIntents/options @@ -0,0 +1 @@ +// semmle-extractor-options: --javac-args -cp ${testdir}/../../../../stubs/google-android-9.0.0 diff --git a/java/ql/test/query-tests/security/CWE-927/ImplicitPendingIntentsTest.expected b/java/ql/test/query-tests/security/CWE-927/ImplicitPendingIntentsTest.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/java/ql/test/query-tests/security/CWE-927/ImplicitPendingIntentsTest.ql b/java/ql/test/query-tests/security/CWE-927/ImplicitPendingIntentsTest.ql deleted file mode 100644 index b474a32b52c..00000000000 --- a/java/ql/test/query-tests/security/CWE-927/ImplicitPendingIntentsTest.ql +++ /dev/null @@ -1,18 +0,0 @@ -import java -import semmle.code.java.security.ImplicitPendingIntentsQuery -import utils.test.InlineExpectationsTest - -module ImplicitPendingIntentsTest implements TestSig { - string getARelevantTag() { result = "hasImplicitPendingIntent" } - - predicate hasActualResult(Location location, string element, string tag, string value) { - tag = "hasImplicitPendingIntent" and - exists(DataFlow::Node sink | ImplicitPendingIntentStartFlow::flowTo(sink) | - sink.getLocation() = location and - element = sink.toString() and - value = "" - ) - } -} - -import MakeTest diff --git a/javascript/ql/integration-tests/query-suite/javascript-code-scanning.qls.expected b/javascript/ql/integration-tests/query-suite/javascript-code-scanning.qls.expected index 1cf124ce3cf..652ac0ebc1b 100644 --- a/javascript/ql/integration-tests/query-suite/javascript-code-scanning.qls.expected +++ b/javascript/ql/integration-tests/query-suite/javascript-code-scanning.qls.expected @@ -31,7 +31,6 @@ ql/javascript/ql/src/Security/CWE-079/Xss.ql ql/javascript/ql/src/Security/CWE-079/XssThroughDom.ql ql/javascript/ql/src/Security/CWE-089/SqlInjection.ql ql/javascript/ql/src/Security/CWE-094/CodeInjection.ql -ql/javascript/ql/src/Security/CWE-094/ExpressionInjection.ql ql/javascript/ql/src/Security/CWE-094/ImproperCodeSanitization.ql ql/javascript/ql/src/Security/CWE-094/UnsafeDynamicMethodAccess.ql ql/javascript/ql/src/Security/CWE-1004/ClientExposedCookie.ql @@ -48,7 +47,6 @@ ql/javascript/ql/src/Security/CWE-201/PostMessageStar.ql ql/javascript/ql/src/Security/CWE-209/StackTraceExposure.ql ql/javascript/ql/src/Security/CWE-295/DisablingCertificateValidation.ql ql/javascript/ql/src/Security/CWE-300/InsecureDependencyResolution.ql -ql/javascript/ql/src/Security/CWE-312/ActionsArtifactLeak.ql ql/javascript/ql/src/Security/CWE-312/BuildArtifactLeak.ql ql/javascript/ql/src/Security/CWE-312/CleartextLogging.ql ql/javascript/ql/src/Security/CWE-312/CleartextStorage.ql diff --git a/javascript/ql/integration-tests/query-suite/javascript-security-and-quality.qls.expected b/javascript/ql/integration-tests/query-suite/javascript-security-and-quality.qls.expected index eb4acd38e39..dd587768308 100644 --- a/javascript/ql/integration-tests/query-suite/javascript-security-and-quality.qls.expected +++ b/javascript/ql/integration-tests/query-suite/javascript-security-and-quality.qls.expected @@ -119,7 +119,6 @@ ql/javascript/ql/src/Security/CWE-079/Xss.ql ql/javascript/ql/src/Security/CWE-079/XssThroughDom.ql ql/javascript/ql/src/Security/CWE-089/SqlInjection.ql ql/javascript/ql/src/Security/CWE-094/CodeInjection.ql -ql/javascript/ql/src/Security/CWE-094/ExpressionInjection.ql ql/javascript/ql/src/Security/CWE-094/ImproperCodeSanitization.ql ql/javascript/ql/src/Security/CWE-094/UnsafeCodeConstruction.ql ql/javascript/ql/src/Security/CWE-094/UnsafeDynamicMethodAccess.ql @@ -140,7 +139,6 @@ ql/javascript/ql/src/Security/CWE-201/PostMessageStar.ql ql/javascript/ql/src/Security/CWE-209/StackTraceExposure.ql ql/javascript/ql/src/Security/CWE-295/DisablingCertificateValidation.ql ql/javascript/ql/src/Security/CWE-300/InsecureDependencyResolution.ql -ql/javascript/ql/src/Security/CWE-312/ActionsArtifactLeak.ql ql/javascript/ql/src/Security/CWE-312/BuildArtifactLeak.ql ql/javascript/ql/src/Security/CWE-312/CleartextLogging.ql ql/javascript/ql/src/Security/CWE-312/CleartextStorage.ql diff --git a/javascript/ql/integration-tests/query-suite/javascript-security-extended.qls.expected b/javascript/ql/integration-tests/query-suite/javascript-security-extended.qls.expected index a5b5cfefdbc..9b7cfd22ed6 100644 --- a/javascript/ql/integration-tests/query-suite/javascript-security-extended.qls.expected +++ b/javascript/ql/integration-tests/query-suite/javascript-security-extended.qls.expected @@ -34,7 +34,6 @@ ql/javascript/ql/src/Security/CWE-079/Xss.ql ql/javascript/ql/src/Security/CWE-079/XssThroughDom.ql ql/javascript/ql/src/Security/CWE-089/SqlInjection.ql ql/javascript/ql/src/Security/CWE-094/CodeInjection.ql -ql/javascript/ql/src/Security/CWE-094/ExpressionInjection.ql ql/javascript/ql/src/Security/CWE-094/ImproperCodeSanitization.ql ql/javascript/ql/src/Security/CWE-094/UnsafeCodeConstruction.ql ql/javascript/ql/src/Security/CWE-094/UnsafeDynamicMethodAccess.ql @@ -55,7 +54,6 @@ ql/javascript/ql/src/Security/CWE-201/PostMessageStar.ql ql/javascript/ql/src/Security/CWE-209/StackTraceExposure.ql ql/javascript/ql/src/Security/CWE-295/DisablingCertificateValidation.ql ql/javascript/ql/src/Security/CWE-300/InsecureDependencyResolution.ql -ql/javascript/ql/src/Security/CWE-312/ActionsArtifactLeak.ql ql/javascript/ql/src/Security/CWE-312/BuildArtifactLeak.ql ql/javascript/ql/src/Security/CWE-312/CleartextLogging.ql ql/javascript/ql/src/Security/CWE-312/CleartextStorage.ql diff --git a/javascript/ql/integration-tests/query-suite/not_included_in_qls.expected b/javascript/ql/integration-tests/query-suite/not_included_in_qls.expected index c80c3fc76da..9d67dfc2cc7 100644 --- a/javascript/ql/integration-tests/query-suite/not_included_in_qls.expected +++ b/javascript/ql/integration-tests/query-suite/not_included_in_qls.expected @@ -67,7 +67,6 @@ ql/javascript/ql/src/Summary/TaintSinks.ql ql/javascript/ql/src/Summary/TaintSources.ql ql/javascript/ql/src/definitions.ql ql/javascript/ql/src/experimental/Security/CWE-094-dataURL/CodeInjection.ql -ql/javascript/ql/src/experimental/Security/CWE-094/UntrustedCheckout.ql ql/javascript/ql/src/experimental/Security/CWE-099/EnvValueAndKeyInjection.ql ql/javascript/ql/src/experimental/Security/CWE-099/EnvValueInjection.ql ql/javascript/ql/src/experimental/Security/CWE-340/TokenBuiltFromUUID.ql diff --git a/javascript/ql/lib/CHANGELOG.md b/javascript/ql/lib/CHANGELOG.md index 0068a86fb4c..e2d82cba835 100644 --- a/javascript/ql/lib/CHANGELOG.md +++ b/javascript/ql/lib/CHANGELOG.md @@ -1,3 +1,15 @@ +## 2.6.6 + +### Minor Analysis Improvements + +* Calls to `sinon.match()` are no longer incorrectly identified as regular expression operations. +* Improved data flow tracking through middleware to handle default value and similar patterns. +* Added `req._parsedUrl` as a remote input source. +* Improved taint tracking through calls to `serialize-javascript`. +* Removed `encodeURI` and `escape` functions from the sanitizer list for request forgery. +* The JavaScript extractor now skips generated JavaScript files if the original TypeScript files are already present. It also skips any files in the output directory specified in the `compilerOptions` part of the `tsconfig.json` file. +* Added support for Axios instances in the `axios` module. + ## 2.6.5 ### Minor Analysis Improvements diff --git a/javascript/ql/lib/change-notes/2025-06-05-skip-obviously-generated-files.md b/javascript/ql/lib/change-notes/2025-06-05-skip-obviously-generated-files.md deleted file mode 100644 index 16d81cb4cc3..00000000000 --- a/javascript/ql/lib/change-notes/2025-06-05-skip-obviously-generated-files.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -category: minorAnalysis ---- -* The JavaScript extractor now skips generated JavaScript files if the original TypeScript files are already present. It also skips any files in the output directory specified in the `compilerOptions` part of the `tsconfig.json` file. diff --git a/javascript/ql/lib/change-notes/2025-06-13-remove-encodeuri.md b/javascript/ql/lib/change-notes/2025-06-13-remove-encodeuri.md deleted file mode 100644 index ab91e9905af..00000000000 --- a/javascript/ql/lib/change-notes/2025-06-13-remove-encodeuri.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -category: minorAnalysis ---- -* Removed `encodeURI` and `escape` functions from the sanitizer list for request forgery. diff --git a/javascript/ql/lib/change-notes/2025-06-16-middleware-express.md b/javascript/ql/lib/change-notes/2025-06-16-middleware-express.md deleted file mode 100644 index 600aad8bafc..00000000000 --- a/javascript/ql/lib/change-notes/2025-06-16-middleware-express.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -category: minorAnalysis ---- -* Improved data flow tracking through middleware to handle default value and similar patterns. -* Added `req._parsedUrl` as a remote input source. diff --git a/javascript/ql/lib/change-notes/2025-06-16-serialize-js.md b/javascript/ql/lib/change-notes/2025-06-16-serialize-js.md deleted file mode 100644 index a89e0e19b6f..00000000000 --- a/javascript/ql/lib/change-notes/2025-06-16-serialize-js.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -category: minorAnalysis ---- -* Improved taint tracking through calls to `serialize-javascript`. diff --git a/javascript/ql/lib/change-notes/2025-06-20-execa.md b/javascript/ql/lib/change-notes/2025-06-20-execa.md new file mode 100644 index 00000000000..b22afe593f8 --- /dev/null +++ b/javascript/ql/lib/change-notes/2025-06-20-execa.md @@ -0,0 +1,4 @@ +--- +category: minorAnalysis +--- +* Enhanced modeling for the `execa` library, adding support for command execution methods `execaCommand`, `execaCommandSync`, `$`, and `$.sync`, as well as file system operations through `inputFile`, `pipeStdout`, `pipeAll`, and `pipeStderr`. diff --git a/javascript/ql/lib/change-notes/2025-06-20-sinon.md b/javascript/ql/lib/change-notes/2025-06-20-sinon.md deleted file mode 100644 index fd8b8e0ad07..00000000000 --- a/javascript/ql/lib/change-notes/2025-06-20-sinon.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -category: minorAnalysis ---- -* Calls to `sinon.match()` are no longer incorrectly identified as regular expression operations. diff --git a/javascript/ql/lib/change-notes/released/2.6.6.md b/javascript/ql/lib/change-notes/released/2.6.6.md new file mode 100644 index 00000000000..f11e9d42d99 --- /dev/null +++ b/javascript/ql/lib/change-notes/released/2.6.6.md @@ -0,0 +1,11 @@ +## 2.6.6 + +### Minor Analysis Improvements + +* Calls to `sinon.match()` are no longer incorrectly identified as regular expression operations. +* Improved data flow tracking through middleware to handle default value and similar patterns. +* Added `req._parsedUrl` as a remote input source. +* Improved taint tracking through calls to `serialize-javascript`. +* Removed `encodeURI` and `escape` functions from the sanitizer list for request forgery. +* The JavaScript extractor now skips generated JavaScript files if the original TypeScript files are already present. It also skips any files in the output directory specified in the `compilerOptions` part of the `tsconfig.json` file. +* Added support for Axios instances in the `axios` module. diff --git a/javascript/ql/lib/codeql-pack.release.yml b/javascript/ql/lib/codeql-pack.release.yml index b29c290895c..305ff8cbbf2 100644 --- a/javascript/ql/lib/codeql-pack.release.yml +++ b/javascript/ql/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 2.6.5 +lastReleaseVersion: 2.6.6 diff --git a/javascript/ql/lib/ext/react.model.yml b/javascript/ql/lib/ext/react.model.yml new file mode 100644 index 00000000000..51b6aaefc46 --- /dev/null +++ b/javascript/ql/lib/ext/react.model.yml @@ -0,0 +1,6 @@ +extensions: + - addsTo: + pack: codeql/javascript-all + extensible: summaryModel + data: + - ["react", "Member[use]", "Argument[0].Awaited", "ReturnValue", "value"] diff --git a/javascript/ql/lib/javascript.qll b/javascript/ql/lib/javascript.qll index d75eed29b8e..7accf28be07 100644 --- a/javascript/ql/lib/javascript.qll +++ b/javascript/ql/lib/javascript.qll @@ -92,6 +92,7 @@ import semmle.javascript.frameworks.DigitalOcean import semmle.javascript.frameworks.DomEvents import semmle.javascript.frameworks.Electron import semmle.javascript.frameworks.EventEmitter +import semmle.javascript.frameworks.Execa import semmle.javascript.frameworks.Files import semmle.javascript.frameworks.Firebase import semmle.javascript.frameworks.FormParsers diff --git a/javascript/ql/lib/qlpack.yml b/javascript/ql/lib/qlpack.yml index b367ab88549..ea90eead838 100644 --- a/javascript/ql/lib/qlpack.yml +++ b/javascript/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/javascript-all -version: 2.6.6-dev +version: 2.6.7-dev groups: javascript dbscheme: semmlecode.javascript.dbscheme extractor: javascript diff --git a/javascript/ql/lib/semmle/javascript/Actions.qll b/javascript/ql/lib/semmle/javascript/Actions.qll index 8854eb11a55..a3dd7542ec1 100644 --- a/javascript/ql/lib/semmle/javascript/Actions.qll +++ b/javascript/ql/lib/semmle/javascript/Actions.qll @@ -1,4 +1,6 @@ /** + * PENDING DEPRECATION. Models for GitHub Actions workflow files are part of the actions qlpack now. + * * Libraries for modeling GitHub Actions workflow files written in YAML. * See https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions. */ diff --git a/javascript/ql/lib/semmle/javascript/frameworks/ClientRequests.qll b/javascript/ql/lib/semmle/javascript/frameworks/ClientRequests.qll index 673bdf2de33..22db9f24b99 100644 --- a/javascript/ql/lib/semmle/javascript/frameworks/ClientRequests.qll +++ b/javascript/ql/lib/semmle/javascript/frameworks/ClientRequests.qll @@ -254,7 +254,7 @@ module ClientRequest { method = "request" and result = this.getOptionArgument(0, "data") or - method = ["post", "put"] and + method = ["post", "put", "patch"] and result = [this.getArgument(1), this.getOptionArgument(2, "data")] or method = ["postForm", "putForm", "patchForm"] and result = this.getArgument(1) @@ -289,6 +289,69 @@ module ClientRequest { } } + /** + * A model of a `axios` instance request. + */ + class AxiosInstanceRequest extends ClientRequest::Range, API::CallNode { + string method; + API::CallNode instance; + + // Instances of axios, e.g. `axios.create({ ... })` + AxiosInstanceRequest() { + instance = axios().getMember(["create", "createInstance"]).getACall() and + method = [httpMethodName(), "request", "postForm", "putForm", "patchForm", "getUri"] and + this = instance.getReturn().getMember(method).getACall() + } + + private int getOptionsArgIndex() { + (method = "get" or method = "delete" or method = "head") and + result = 0 + or + (method = "post" or method = "put" or method = "patch") and + result = 1 + } + + private DataFlow::Node getOptionArgument(string name) { + result = this.getOptionArgument(this.getOptionsArgIndex(), name) + } + + override DataFlow::Node getUrl() { + result = this.getArgument(0) or + result = this.getOptionArgument(urlPropertyName()) + } + + override DataFlow::Node getHost() { result = instance.getOptionArgument(0, "baseURL") } + + override DataFlow::Node getADataNode() { + method = ["post", "put", "patch"] and + result = [this.getArgument(1), this.getOptionArgument(2, "data")] + or + method = ["postForm", "putForm", "patchForm"] and result = this.getArgument(1) + or + result = this.getOptionArgument([0 .. 2], ["headers", "params"]) + } + + /** Gets the response type from the options passed in. */ + string getResponseType() { + exists(DataFlow::Node option | option = instance.getOptionArgument(0, "responseType") | + option.mayHaveStringValue(result) + ) + or + not exists(this.getOptionArgument("responseType")) and + result = "json" + } + + override DataFlow::Node getAResponseDataNode(string responseType, boolean promise) { + responseType = this.getResponseType() and + promise = true and + result = this + or + responseType = this.getResponseType() and + promise = false and + result = this.getReturn().getPromisedError().getMember("response").asSource() + } + } + /** An expression that is used as a credential in a request. */ private class AuthorizationHeader extends CredentialsNode { AuthorizationHeader() { diff --git a/javascript/ql/src/experimental/semmle/javascript/Execa.qll b/javascript/ql/lib/semmle/javascript/frameworks/Execa.qll similarity index 73% rename from javascript/ql/src/experimental/semmle/javascript/Execa.qll rename to javascript/ql/lib/semmle/javascript/frameworks/Execa.qll index 624b21c5dac..2ef2fcde386 100644 --- a/javascript/ql/src/experimental/semmle/javascript/Execa.qll +++ b/javascript/ql/lib/semmle/javascript/frameworks/Execa.qll @@ -58,6 +58,9 @@ module Execa { or this = API::moduleImport("execa").getMember("execaSync").getACall() and isSync = true + or + this = API::moduleImport("execa").getACall() and + isSync = false } } @@ -208,4 +211,86 @@ module Execa { private predicate isExecaShellEnable(API::Node n) { n.getMember("shell").asSink().asExpr().(BooleanLiteral).getValue() = "true" } + + /** + * A call to `execa.node` + */ + class ExecaNodeCall extends SystemCommandExecution, API::CallNode { + ExecaNodeCall() { this = API::moduleImport("execa").getMember("node").getACall() } + + override DataFlow::Node getACommandArgument() { result = this.getArgument(0) } + + override predicate isShellInterpreted(DataFlow::Node arg) { none() } + + override DataFlow::Node getArgumentList() { + result = this.getArgument(1) and + not result.asExpr() instanceof ObjectExpr + } + + override predicate isSync() { none() } + + override DataFlow::Node getOptionsArg() { + result = this.getLastArgument() and + result.asExpr() instanceof ObjectExpr + } + } + + /** + * A call to `execa.stdout`, `execa.stderr`, or `execa.sync` + */ + class ExecaStreamCall extends SystemCommandExecution, API::CallNode { + string methodName; + + ExecaStreamCall() { + methodName in ["stdout", "stderr", "sync"] and + this = API::moduleImport("execa").getMember(methodName).getACall() + } + + override DataFlow::Node getACommandArgument() { result = this.getArgument(0) } + + override predicate isShellInterpreted(DataFlow::Node arg) { + arg = this.getArgument(0) and + isExecaShellEnable(this.getParameter([1, 2])) + } + + override DataFlow::Node getArgumentList() { + result = this.getArgument(1) and + not result.asExpr() instanceof ObjectExpr + } + + override predicate isSync() { methodName = "sync" } + + override DataFlow::Node getOptionsArg() { + result = this.getLastArgument() and + result.asExpr() instanceof ObjectExpr + } + } + + /** + * A call to `execa.shell` or `execa.shellSync` + */ + class ExecaShellCall extends SystemCommandExecution, API::CallNode { + boolean sync; + + ExecaShellCall() { + this = API::moduleImport("execa").getMember("shell").getACall() and + sync = false + or + this = API::moduleImport("execa").getMember("shellSync").getACall() and + sync = true + } + + override DataFlow::Node getACommandArgument() { result = this.getArgument(0) } + + override predicate isShellInterpreted(DataFlow::Node arg) { arg = this.getACommandArgument() } + + override DataFlow::Node getArgumentList() { none() } + + override predicate isSync() { sync = true } + + override DataFlow::Node getOptionsArg() { + result = this.getArgument(1) and + result.asExpr() instanceof ObjectExpr + } + } } diff --git a/javascript/ql/lib/semmle/javascript/frameworks/React.qll b/javascript/ql/lib/semmle/javascript/frameworks/React.qll index 4d126b88829..3a361e70594 100644 --- a/javascript/ql/lib/semmle/javascript/frameworks/React.qll +++ b/javascript/ql/lib/semmle/javascript/frameworks/React.qll @@ -875,3 +875,22 @@ private class ReactPropAsViewComponentInput extends ViewComponentInput { override string getSourceType() { result = "React props" } } + +private predicate isServerFunction(DataFlow::FunctionNode func) { + exists(Directive::UseServerDirective useServer | + useServer.getContainer() = func.getFunction() + or + useServer.getContainer().(Module).getAnExportedValue(_).getAFunctionValue() = func + ) +} + +private class ServerFunctionRemoteFlowSource extends RemoteFlowSource { + ServerFunctionRemoteFlowSource() { + exists(DataFlow::FunctionNode func | + isServerFunction(func) and + this = func.getAParameter() + ) + } + + override string getSourceType() { result = "React server function parameter" } +} diff --git a/javascript/ql/lib/semmle/javascript/frameworks/SystemCommandExecutors.qll b/javascript/ql/lib/semmle/javascript/frameworks/SystemCommandExecutors.qll index 98ee244f769..20baafa0475 100644 --- a/javascript/ql/lib/semmle/javascript/frameworks/SystemCommandExecutors.qll +++ b/javascript/ql/lib/semmle/javascript/frameworks/SystemCommandExecutors.qll @@ -16,17 +16,6 @@ private predicate execApi( cmdArg = 0 and shell = false and optionsArg = -1 - or - mod = "execa" and - optionsArg = -1 and - ( - shell = false and - fn = ["node", "stdout", "stderr", "sync"] - or - shell = true and - fn = ["command", "commandSync", "shell", "shellSync"] - ) and - cmdArg = 0 ) } @@ -38,8 +27,6 @@ private predicate execApi(string mod, int cmdArg, int optionsArg, boolean shell) mod = "cross-spawn-async" and cmdArg = 0 and optionsArg = -1 or mod = "exec-async" and cmdArg = 0 and optionsArg = -1 - or - mod = "execa" and cmdArg = 0 and optionsArg = -1 ) or shell = true and diff --git a/javascript/ql/src/CHANGELOG.md b/javascript/ql/src/CHANGELOG.md index b6939ad5ec4..11615030c50 100644 --- a/javascript/ql/src/CHANGELOG.md +++ b/javascript/ql/src/CHANGELOG.md @@ -1,3 +1,18 @@ +## 1.7.0 + +### Query Metadata Changes + +* The `quality` tag has been added to multiple JavaScript quality queries, with tags for `reliability` or `maintainability` categories and their sub-categories. See [Query file metadata and alert message style guide](https://github.com/github/codeql/blob/main/docs/query-metadata-style-guide.md#quality-query-sub-category-tags) for more information about these categories. +* Added `reliability` tag to the `js/suspicious-method-name-declaration` query. +* Added `reliability` and `language-features` tags to the `js/template-syntax-in-string-literal` query. + +### Minor Analysis Improvements + +* The `js/loop-iteration-skipped-due-to-shifting` query now has the `reliability` tag. +* Fixed false positives in the `js/loop-iteration-skipped-due-to-shifting` query when the return value of `splice` is used to decide whether to adjust the loop counter. +* Fixed false positives in the `js/template-syntax-in-string-literal` query where template syntax in string concatenation and "manual string interpolation" patterns were incorrectly flagged. +* The `js/useless-expression` query now correctly flags only the innermost expressions with no effect, avoiding duplicate alerts on compound expressions. + ## 1.6.2 No user-facing changes. diff --git a/javascript/ql/src/Security/CWE-094/ExpressionInjection.qhelp b/javascript/ql/src/Security/CWE-094/ExpressionInjection.qhelp deleted file mode 100644 index df9d97e4e6b..00000000000 --- a/javascript/ql/src/Security/CWE-094/ExpressionInjection.qhelp +++ /dev/null @@ -1,56 +0,0 @@ - - - -

- Using user-controlled input in GitHub Actions may lead to - code injection in contexts like run: or script:. -

-

- Code injection in GitHub Actions may allow an attacker to - exfiltrate any secrets used in the workflow and - the temporary GitHub repository authorization token. - The token might have write access to the repository, allowing an attacker - to use the token to make changes to the repository. -

-
- - -

- The best practice to avoid code injection vulnerabilities - in GitHub workflows is to set the untrusted input value of the expression - to an intermediate environment variable and then use the environment variable - using the native syntax of the shell/script interpreter (that is, not ${{ env.VAR }}). -

-

- It is also recommended to limit the permissions of any tokens used - by a workflow such as the GITHUB_TOKEN. -

-
- - -

- The following example lets a user inject an arbitrary shell command: -

- - -

- The following example uses an environment variable, but - still allows the injection because of the use of expression syntax: -

- - -

- The following example uses shell syntax to read - the environment variable and will prevent the attack: -

- -
- - -
  • GitHub Security Lab Research: Keeping your GitHub Actions and workflows secure: Untrusted input.
  • -
  • GitHub Docs: Security hardening for GitHub Actions.
  • -
  • GitHub Docs: Permissions for the GITHUB_TOKEN.
  • -
    -
    diff --git a/javascript/ql/src/Security/CWE-094/ExpressionInjection.ql b/javascript/ql/src/Security/CWE-094/ExpressionInjection.ql deleted file mode 100644 index 6c01edb330f..00000000000 --- a/javascript/ql/src/Security/CWE-094/ExpressionInjection.ql +++ /dev/null @@ -1,270 +0,0 @@ -/** - * @name Expression injection in Actions - * @description Using user-controlled GitHub Actions contexts like `run:` or `script:` may allow a malicious - * user to inject code into the GitHub action. - * @kind problem - * @problem.severity warning - * @security-severity 9.3 - * @precision high - * @id js/actions/command-injection - * @tags actions - * security - * external/cwe/cwe-094 - */ - -import javascript -import semmle.javascript.Actions - -/** - * A `script:` field within an Actions `with:` specific to `actions/github-script` action. - * - * For example: - * ``` - * uses: actions/github-script@v3 - * with: - * script: console.log('${{ github.event.pull_request.head.sha }}') - * ``` - */ -class GitHubScript extends YamlNode, YamlString { - GitHubScriptWith with; - - GitHubScript() { with.lookup("script") = this } - - /** Gets the `with` field this field belongs to. */ - GitHubScriptWith getWith() { result = with } -} - -/** - * A step that uses `actions/github-script` action. - */ -class GitHubScriptStep extends Actions::Step { - GitHubScriptStep() { this.getUses().getGitHubRepository() = "actions/github-script" } -} - -/** - * A `with:` field sibling to `uses: actions/github-script`. - */ -class GitHubScriptWith extends YamlNode, YamlMapping { - GitHubScriptStep step; - - GitHubScriptWith() { step.lookup("with") = this } - - /** Gets the step this field belongs to. */ - GitHubScriptStep getStep() { result = step } -} - -bindingset[context] -private predicate isExternalUserControlledIssue(string context) { - context.regexpMatch("\\bgithub\\s*\\.\\s*event\\s*\\.\\s*issue\\s*\\.\\s*title\\b") or - context.regexpMatch("\\bgithub\\s*\\.\\s*event\\s*\\.\\s*issue\\s*\\.\\s*body\\b") -} - -bindingset[context] -private predicate isExternalUserControlledPullRequest(string context) { - exists(string reg | - reg = - [ - "\\bgithub\\s*\\.\\s*event\\s*\\.\\s*pull_request\\s*\\.\\s*title\\b", - "\\bgithub\\s*\\.\\s*event\\s*\\.\\s*pull_request\\s*\\.\\s*body\\b", - "\\bgithub\\s*\\.\\s*event\\s*\\.\\s*pull_request\\s*\\.\\s*head\\s*\\.\\s*label\\b", - "\\bgithub\\s*\\.\\s*event\\s*\\.\\s*pull_request\\s*\\.\\s*head\\s*\\.\\s*repo\\s*\\.\\s*default_branch\\b", - "\\bgithub\\s*\\.\\s*event\\s*\\.\\s*pull_request\\s*\\.\\s*head\\s*\\.\\s*repo\\s*\\.\\s*description\\b", - "\\bgithub\\s*\\.\\s*event\\s*\\.\\s*pull_request\\s*\\.\\s*head\\s*\\.\\s*repo\\s*\\.\\s*homepage\\b", - "\\bgithub\\s*\\.\\s*event\\s*\\.\\s*pull_request\\s*\\.\\s*head\\s*\\.\\s*ref\\b", - "\\bgithub\\s*\\.\\s*head_ref\\b" - ] - | - context.regexpMatch(reg) - ) -} - -bindingset[context] -private predicate isExternalUserControlledReview(string context) { - context.regexpMatch("\\bgithub\\s*\\.\\s*event\\s*\\.\\s*review\\s*\\.\\s*body\\b") -} - -bindingset[context] -private predicate isExternalUserControlledComment(string context) { - context.regexpMatch("\\bgithub\\s*\\.\\s*event\\s*\\.\\s*comment\\s*\\.\\s*body\\b") -} - -bindingset[context] -private predicate isExternalUserControlledGollum(string context) { - context - .regexpMatch("\\bgithub\\s*\\.\\s*event\\s*\\.\\s*pages\\[[0-9]+\\]\\s*\\.\\s*page_name\\b") or - context.regexpMatch("\\bgithub\\s*\\.\\s*event\\s*\\.\\s*pages\\[[0-9]+\\]\\s*\\.\\s*title\\b") -} - -bindingset[context] -private predicate isExternalUserControlledCommit(string context) { - exists(string reg | - reg = - [ - "\\bgithub\\s*\\.\\s*event\\s*\\.\\s*commits\\[[0-9]+\\]\\s*\\.\\s*message\\b", - "\\bgithub\\s*\\.\\s*event\\s*\\.\\s*head_commit\\s*\\.\\s*message\\b", - "\\bgithub\\s*\\.\\s*event\\s*\\.\\s*head_commit\\s*\\.\\s*author\\s*\\.\\s*email\\b", - "\\bgithub\\s*\\.\\s*event\\s*\\.\\s*head_commit\\s*\\.\\s*author\\s*\\.\\s*name\\b", - "\\bgithub\\s*\\.\\s*event\\s*\\.\\s*head_commit\\s*\\.\\s*committer\\s*\\.\\s*email\\b", - "\\bgithub\\s*\\.\\s*event\\s*\\.\\s*head_commit\\s*\\.\\s*committer\\s*\\.\\s*name\\b", - "\\bgithub\\s*\\.\\s*event\\s*\\.\\s*commits\\[[0-9]+\\]\\s*\\.\\s*author\\s*\\.\\s*email\\b", - "\\bgithub\\s*\\.\\s*event\\s*\\.\\s*commits\\[[0-9]+\\]\\s*\\.\\s*author\\s*\\.\\s*name\\b", - "\\bgithub\\s*\\.\\s*event\\s*\\.\\s*commits\\[[0-9]+\\]\\s*\\.\\s*committer\\s*\\.\\s*email\\b", - "\\bgithub\\s*\\.\\s*event\\s*\\.\\s*commits\\[[0-9]+\\]\\s*\\.\\s*committer\\s*\\.\\s*name\\b", - ] - | - context.regexpMatch(reg) - ) -} - -bindingset[context] -private predicate isExternalUserControlledDiscussion(string context) { - context.regexpMatch("\\bgithub\\s*\\.\\s*event\\s*\\.\\s*discussion\\s*\\.\\s*title\\b") or - context.regexpMatch("\\bgithub\\s*\\.\\s*event\\s*\\.\\s*discussion\\s*\\.\\s*body\\b") -} - -bindingset[context] -private predicate isExternalUserControlledWorkflowRun(string context) { - exists(string reg | - reg = - [ - "\\bgithub\\s*\\.\\s*event\\s*\\.\\s*workflow_run\\s*\\.\\s*head_branch\\b", - "\\bgithub\\s*\\.\\s*event\\s*\\.\\s*workflow_run\\s*\\.\\s*display_title\\b", - "\\bgithub\\s*\\.\\s*event\\s*\\.\\s*workflow_run\\s*\\.\\s*head_repository\\b\\s*\\.\\s*description\\b", - "\\bgithub\\s*\\.\\s*event\\s*\\.\\s*workflow_run\\s*\\.\\s*head_commit\\b\\s*\\.\\s*message\\b", - "\\bgithub\\s*\\.\\s*event\\s*\\.\\s*workflow_run\\s*\\.\\s*head_commit\\b\\s*\\.\\s*author\\b\\s*\\.\\s*email\\b", - "\\bgithub\\s*\\.\\s*event\\s*\\.\\s*workflow_run\\s*\\.\\s*head_commit\\b\\s*\\.\\s*author\\b\\s*\\.\\s*name\\b", - "\\bgithub\\s*\\.\\s*event\\s*\\.\\s*workflow_run\\s*\\.\\s*head_commit\\b\\s*\\.\\s*committer\\b\\s*\\.\\s*email\\b", - "\\bgithub\\s*\\.\\s*event\\s*\\.\\s*workflow_run\\s*\\.\\s*head_commit\\b\\s*\\.\\s*committer\\b\\s*\\.\\s*name\\b", - ] - | - context.regexpMatch(reg) - ) -} - -/** - * Holds if environment name in the `injection` (in a form of `env.name`) - * is tainted by the `context` (in a form of `github.event.xxx.xxx`). - */ -bindingset[injection] -predicate isEnvInterpolationTainted(string injection, string context) { - exists(Actions::Env env, string envName, YamlString envValue | - envValue = env.lookup(envName) and - Actions::getEnvName(injection) = envName and - Actions::getASimpleReferenceExpression(envValue) = context - ) -} - -/** - * Holds if the `run` contains any expression interpolation `${{ e }}`. - * Sets `context` to the initial untrusted value assignment in case of `${{ env... }}` interpolation - */ -predicate isRunInjectable(Actions::Run run, string injection, string context) { - Actions::getASimpleReferenceExpression(run) = injection and - ( - injection = context - or - isEnvInterpolationTainted(injection, context) - ) -} - -/** - * Holds if the `actions/github-script` contains any expression interpolation `${{ e }}`. - * Sets `context` to the initial untrusted value assignment in case of `${{ env... }}` interpolation - */ -predicate isScriptInjectable(GitHubScript script, string injection, string context) { - Actions::getASimpleReferenceExpression(script) = injection and - ( - injection = context - or - isEnvInterpolationTainted(injection, context) - ) -} - -/** - * Holds if the composite action contains untrusted expression interpolation `${{ e }}`. - */ -YamlNode getInjectableCompositeActionNode(Actions::Runs runs, string injection, string context) { - exists(Actions::Run run | - isRunInjectable(run, injection, context) and - result = run and - run.getStep().getRuns() = runs - ) - or - exists(GitHubScript script | - isScriptInjectable(script, injection, context) and - result = script and - script.getWith().getStep().getRuns() = runs - ) -} - -/** - * Holds if the workflow contains untrusted expression interpolation `${{ e }}`. - */ -YamlNode getInjectableWorkflowNode(Actions::On on, string injection, string context) { - exists(Actions::Run run | - isRunInjectable(run, injection, context) and - result = run and - run.getStep().getJob().getWorkflow().getOn() = on - ) - or - exists(GitHubScript script | - isScriptInjectable(script, injection, context) and - result = script and - script.getWith().getStep().getJob().getWorkflow().getOn() = on - ) -} - -from YamlNode node, string injection, string context -where - exists(Actions::CompositeAction action, Actions::Runs runs | - action.getRuns() = runs and - node = getInjectableCompositeActionNode(runs, injection, context) and - ( - isExternalUserControlledIssue(context) or - isExternalUserControlledPullRequest(context) or - isExternalUserControlledReview(context) or - isExternalUserControlledComment(context) or - isExternalUserControlledGollum(context) or - isExternalUserControlledCommit(context) or - isExternalUserControlledDiscussion(context) or - isExternalUserControlledWorkflowRun(context) - ) - ) - or - exists(Actions::On on | - node = getInjectableWorkflowNode(on, injection, context) and - ( - exists(on.getNode("issues")) and - isExternalUserControlledIssue(context) - or - exists(on.getNode("pull_request_target")) and - isExternalUserControlledPullRequest(context) - or - exists(on.getNode("pull_request_review")) and - (isExternalUserControlledReview(context) or isExternalUserControlledPullRequest(context)) - or - exists(on.getNode("pull_request_review_comment")) and - (isExternalUserControlledComment(context) or isExternalUserControlledPullRequest(context)) - or - exists(on.getNode("issue_comment")) and - (isExternalUserControlledComment(context) or isExternalUserControlledIssue(context)) - or - exists(on.getNode("gollum")) and - isExternalUserControlledGollum(context) - or - exists(on.getNode("push")) and - isExternalUserControlledCommit(context) - or - exists(on.getNode("discussion")) and - isExternalUserControlledDiscussion(context) - or - exists(on.getNode("discussion_comment")) and - (isExternalUserControlledDiscussion(context) or isExternalUserControlledComment(context)) - or - exists(on.getNode("workflow_run")) and - isExternalUserControlledWorkflowRun(context) - ) - ) -select node, - "Potential injection from the ${{ " + injection + - " }}, which may be controlled by an external user." diff --git a/javascript/ql/src/Security/CWE-094/examples/comment_issue_bad.yml b/javascript/ql/src/Security/CWE-094/examples/comment_issue_bad.yml deleted file mode 100644 index 1a25d44693b..00000000000 --- a/javascript/ql/src/Security/CWE-094/examples/comment_issue_bad.yml +++ /dev/null @@ -1,8 +0,0 @@ -on: issue_comment - -jobs: - echo-body: - runs-on: ubuntu-latest - steps: - - run: | - echo '${{ github.event.comment.body }}' \ No newline at end of file diff --git a/javascript/ql/src/Security/CWE-094/examples/comment_issue_bad_env.yml b/javascript/ql/src/Security/CWE-094/examples/comment_issue_bad_env.yml deleted file mode 100644 index b7698938de7..00000000000 --- a/javascript/ql/src/Security/CWE-094/examples/comment_issue_bad_env.yml +++ /dev/null @@ -1,10 +0,0 @@ -on: issue_comment - -jobs: - echo-body: - runs-on: ubuntu-latest - steps: - - env: - BODY: ${{ github.event.issue.body }} - run: | - echo '${{ env.BODY }}' \ No newline at end of file diff --git a/javascript/ql/src/Security/CWE-094/examples/comment_issue_good.yml b/javascript/ql/src/Security/CWE-094/examples/comment_issue_good.yml deleted file mode 100644 index 07254a8b204..00000000000 --- a/javascript/ql/src/Security/CWE-094/examples/comment_issue_good.yml +++ /dev/null @@ -1,10 +0,0 @@ -on: issue_comment - -jobs: - echo-body: - runs-on: ubuntu-latest - steps: - - env: - BODY: ${{ github.event.issue.body }} - run: | - echo "$BODY" diff --git a/javascript/ql/src/Security/CWE-312/ActionsArtifactLeak.qhelp b/javascript/ql/src/Security/CWE-312/ActionsArtifactLeak.qhelp deleted file mode 100644 index 7ec9c1fe777..00000000000 --- a/javascript/ql/src/Security/CWE-312/ActionsArtifactLeak.qhelp +++ /dev/null @@ -1,30 +0,0 @@ - - - -

    - Sensitive information included in a GitHub Actions artifact can allow an attacker to access - the sensitive information if the artifact is published. -

    -
    - - -

    - Only store information that is meant to be publicly available in a GitHub Actions artifact. -

    -
    - - -

    - The following example uses actions/checkout to checkout code which stores the GITHUB_TOKEN in the `.git/config` file - and then stores the contents of the `.git` repository into the artifact: -

    - -

    - The issue has been fixed below, where the actions/upload-artifact uses a version (v4+) which does not include hidden files or - directories into the artifact. -

    - -
    -
    diff --git a/javascript/ql/src/Security/CWE-312/ActionsArtifactLeak.ql b/javascript/ql/src/Security/CWE-312/ActionsArtifactLeak.ql deleted file mode 100644 index 3f001c5e456..00000000000 --- a/javascript/ql/src/Security/CWE-312/ActionsArtifactLeak.ql +++ /dev/null @@ -1,112 +0,0 @@ -/** - * @name Storage of sensitive information in GitHub Actions artifact - * @description Including sensitive information in a GitHub Actions artifact can - * expose it to an attacker. - * @kind problem - * @problem.severity error - * @security-severity 7.5 - * @precision high - * @id js/actions/actions-artifact-leak - * @tags actions - * security - * external/cwe/cwe-312 - * external/cwe/cwe-315 - * external/cwe/cwe-359 - */ - -import javascript -import semmle.javascript.Actions - -/** - * A step that uses `actions/checkout` action. - */ -class ActionsCheckoutStep extends Actions::Step { - ActionsCheckoutStep() { this.getUses().getGitHubRepository() = "actions/checkout" } -} - -/** - * A `with:`/`persist-credentials` field sibling to `uses: actions/checkout`. - */ -class ActionsCheckoutWithPersistCredentials extends YamlNode, YamlScalar { - ActionsCheckoutStep step; - - ActionsCheckoutWithPersistCredentials() { - step.lookup("with").(YamlMapping).lookup("persist-credentials") = this - } - - /** Gets the step this field belongs to. */ - ActionsCheckoutStep getStep() { result = step } -} - -/** - * A `with:`/`path` field sibling to `uses: actions/checkout`. - */ -class ActionsCheckoutWithPath extends YamlNode, YamlString { - ActionsCheckoutStep step; - - ActionsCheckoutWithPath() { step.lookup("with").(YamlMapping).lookup("path") = this } - - /** Gets the step this field belongs to. */ - ActionsCheckoutStep getStep() { result = step } -} - -/** - * A step that uses `actions/upload-artifact` action. - */ -class ActionsUploadArtifactStep extends Actions::Step { - ActionsUploadArtifactStep() { this.getUses().getGitHubRepository() = "actions/upload-artifact" } -} - -/** - * A `with:`/`path` field sibling to `uses: actions/upload-artifact`. - */ -class ActionsUploadArtifactWithPath extends YamlNode, YamlString { - ActionsUploadArtifactStep step; - - ActionsUploadArtifactWithPath() { step.lookup("with").(YamlMapping).lookup("path") = this } - - /** Gets the step this field belongs to. */ - ActionsUploadArtifactStep getStep() { result = step } -} - -from ActionsCheckoutStep checkout, ActionsUploadArtifactStep upload, Actions::Job job, int i, int j -where - checkout.getJob() = job and - upload.getJob() = job and - job.getStep(i) = checkout and - job.getStep(j) = upload and - j = i + 1 and - upload.getUses().getVersion() = - [ - "v4.3.6", "834a144ee995460fba8ed112a2fc961b36a5ec5a", // - "v4.3.5", "89ef406dd8d7e03cfd12d9e0a4a378f454709029", // - "v4.3.4", "0b2256b8c012f0828dc542b3febcab082c67f72b", // - "v4.3.3", "65462800fd760344b1a7b4382951275a0abb4808", // - "v4.3.2", "1746f4ab65b179e0ea60a494b83293b640dd5bba", // - "v4.3.1", "5d5d22a31266ced268874388b861e4b58bb5c2f3", // - "v4.3.0", "26f96dfa697d77e81fd5907df203aa23a56210a8", // - "v4.2.0", "694cdabd8bdb0f10b2cea11669e1bf5453eed0a6", // - "v4.1.0", "1eb3cb2b3e0f29609092a73eb033bb759a334595", // - "v4.0.0", "c7d193f32edcb7bfad88892161225aeda64e9392", // - ] and - ( - not exists(ActionsCheckoutWithPersistCredentials persist | persist.getStep() = checkout) - or - exists(ActionsCheckoutWithPersistCredentials persist | - persist.getStep() = checkout and - persist.getValue() = "true" - ) - ) and - ( - not exists(ActionsCheckoutWithPath path | path.getStep() = checkout) and - exists(ActionsUploadArtifactWithPath path | - path.getStep() = upload and path.getValue() = [".", "*"] - ) - or - exists(ActionsCheckoutWithPath checkout_path, ActionsUploadArtifactWithPath upload_path | - checkout_path.getValue() + ["", "/*"] = upload_path.getValue() and - checkout_path.getStep() = checkout and - upload_path.getStep() = upload - ) - ) -select upload, "A secret may be exposed in an artifact." diff --git a/javascript/ql/src/Security/CWE-312/examples/actions-artifact-leak-fixed.yml b/javascript/ql/src/Security/CWE-312/examples/actions-artifact-leak-fixed.yml deleted file mode 100644 index 9f716584a9b..00000000000 --- a/javascript/ql/src/Security/CWE-312/examples/actions-artifact-leak-fixed.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: secrets-in-artifacts -on: - pull_request: -jobs: - a-job: # NOT VULNERABLE - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: "Upload artifact" - uses: actions/upload-artifact@v4 - with: - name: file - path: . - diff --git a/javascript/ql/src/Security/CWE-312/examples/actions-artifact-leak.yml b/javascript/ql/src/Security/CWE-312/examples/actions-artifact-leak.yml deleted file mode 100644 index 9006855e997..00000000000 --- a/javascript/ql/src/Security/CWE-312/examples/actions-artifact-leak.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: secrets-in-artifacts -on: - pull_request: -jobs: - a-job: # VULNERABLE - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: "Upload artifact" - uses: actions/upload-artifact@1746f4ab65b179e0ea60a494b83293b640dd5bba # v4.3.2 - with: - name: file - path: . diff --git a/javascript/ql/src/change-notes/2025-05-30-dom-property-access.md b/javascript/ql/src/change-notes/2025-05-30-dom-property-access.md deleted file mode 100644 index 2dcb16a8327..00000000000 --- a/javascript/ql/src/change-notes/2025-05-30-dom-property-access.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -category: minorAnalysis ---- -* The `js/useless-expression` query now correctly flags only the innermost expressions with no effect, avoiding duplicate alerts on compound expressions. diff --git a/javascript/ql/src/change-notes/2025-06-12-loop-iteration-fix.md b/javascript/ql/src/change-notes/2025-06-12-loop-iteration-fix.md deleted file mode 100644 index 2716069fb71..00000000000 --- a/javascript/ql/src/change-notes/2025-06-12-loop-iteration-fix.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -category: minorAnalysis ---- -* Fixed false positives in the `js/loop-iteration-skipped-due-to-shifting` query when the return value of `splice` is used to decide whether to adjust the loop counter. diff --git a/javascript/ql/src/change-notes/2025-06-12-loop-iteration.md b/javascript/ql/src/change-notes/2025-06-12-loop-iteration.md deleted file mode 100644 index 13b9fcf592a..00000000000 --- a/javascript/ql/src/change-notes/2025-06-12-loop-iteration.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -category: minorAnalysis ---- -* The `js/loop-iteration-skipped-due-to-shifting` query now has the `reliability` tag. diff --git a/javascript/ql/src/change-notes/2025-06-12-string-interpolation.md b/javascript/ql/src/change-notes/2025-06-12-string-interpolation.md deleted file mode 100644 index 446ecf0fcb2..00000000000 --- a/javascript/ql/src/change-notes/2025-06-12-string-interpolation.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -category: minorAnalysis ---- -* Fixed false positives in the `js/template-syntax-in-string-literal` query where template syntax in string concatenation and "manual string interpolation" patterns were incorrectly flagged. diff --git a/javascript/ql/src/change-notes/2025-06-12-suspicious-method-name.md b/javascript/ql/src/change-notes/2025-06-12-suspicious-method-name.md deleted file mode 100644 index dfee27ffdd3..00000000000 --- a/javascript/ql/src/change-notes/2025-06-12-suspicious-method-name.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -category: queryMetadata ---- -* Added `reliability` tag to the `js/suspicious-method-name-declaration` query. diff --git a/javascript/ql/src/change-notes/2025-06-12-template-syntax-metadata.md b/javascript/ql/src/change-notes/2025-06-12-template-syntax-metadata.md deleted file mode 100644 index f29f602095d..00000000000 --- a/javascript/ql/src/change-notes/2025-06-12-template-syntax-metadata.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -category: queryMetadata ---- -* Added `reliability` and `language-features` tags to the `js/template-syntax-in-string-literal` query. diff --git a/javascript/ql/src/change-notes/2025-06-16-mass-promotion.md b/javascript/ql/src/change-notes/2025-06-16-mass-promotion.md deleted file mode 100644 index dedaba09d1d..00000000000 --- a/javascript/ql/src/change-notes/2025-06-16-mass-promotion.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -category: queryMetadata ---- -* The `quality` tag has been added to multiple JavaScript quality queries, with tags for `reliability` or `maintainability` categories and their sub-categories. See [Query file metadata and alert message style guide](https://github.com/github/codeql/blob/main/docs/query-metadata-style-guide.md#quality-query-sub-category-tags) for more information about these categories. diff --git a/javascript/ql/src/change-notes/2025-06-23-react-use-server.md b/javascript/ql/src/change-notes/2025-06-23-react-use-server.md new file mode 100644 index 00000000000..b3d3088b640 --- /dev/null +++ b/javascript/ql/src/change-notes/2025-06-23-react-use-server.md @@ -0,0 +1,5 @@ +--- +category: majorAnalysis +--- +* Taint is now tracked through the React `use` function. +* Parameters of React server functions, marked with the `"use server"` directive, are now seen as taint sources. diff --git a/javascript/ql/src/change-notes/2025-06-23-remove-legacy-actions-queries.md b/javascript/ql/src/change-notes/2025-06-23-remove-legacy-actions-queries.md new file mode 100644 index 00000000000..628ad8b083b --- /dev/null +++ b/javascript/ql/src/change-notes/2025-06-23-remove-legacy-actions-queries.md @@ -0,0 +1,7 @@ +--- +category: minorAnalysis +--- +* Removed three queries from the JS qlpack, which have been superseded by newer queries that are part of the Actions qlpack: + * `js/actions/pull-request-target` has been superseded by `actions/untrusted-checkout/{medium,high,critical}` + * `js/actions/actions-artifact-leak` has been superseded by `actions/secrets-in-artifacts` + * `js/actions/command-injection` has been superseded by `actions/command-injection/{medium,critical}` diff --git a/javascript/ql/src/change-notes/released/1.7.0.md b/javascript/ql/src/change-notes/released/1.7.0.md new file mode 100644 index 00000000000..682a8b5d0c6 --- /dev/null +++ b/javascript/ql/src/change-notes/released/1.7.0.md @@ -0,0 +1,14 @@ +## 1.7.0 + +### Query Metadata Changes + +* The `quality` tag has been added to multiple JavaScript quality queries, with tags for `reliability` or `maintainability` categories and their sub-categories. See [Query file metadata and alert message style guide](https://github.com/github/codeql/blob/main/docs/query-metadata-style-guide.md#quality-query-sub-category-tags) for more information about these categories. +* Added `reliability` tag to the `js/suspicious-method-name-declaration` query. +* Added `reliability` and `language-features` tags to the `js/template-syntax-in-string-literal` query. + +### Minor Analysis Improvements + +* The `js/loop-iteration-skipped-due-to-shifting` query now has the `reliability` tag. +* Fixed false positives in the `js/loop-iteration-skipped-due-to-shifting` query when the return value of `splice` is used to decide whether to adjust the loop counter. +* Fixed false positives in the `js/template-syntax-in-string-literal` query where template syntax in string concatenation and "manual string interpolation" patterns were incorrectly flagged. +* The `js/useless-expression` query now correctly flags only the innermost expressions with no effect, avoiding duplicate alerts on compound expressions. diff --git a/javascript/ql/src/codeql-pack.release.yml b/javascript/ql/src/codeql-pack.release.yml index 5f5beb68311..d1184cc6750 100644 --- a/javascript/ql/src/codeql-pack.release.yml +++ b/javascript/ql/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.6.2 +lastReleaseVersion: 1.7.0 diff --git a/javascript/ql/src/experimental/Security/CWE-094/UntrustedCheckout.qhelp b/javascript/ql/src/experimental/Security/CWE-094/UntrustedCheckout.qhelp deleted file mode 100644 index 4833b50d8e2..00000000000 --- a/javascript/ql/src/experimental/Security/CWE-094/UntrustedCheckout.qhelp +++ /dev/null @@ -1,64 +0,0 @@ - - - - - -

    - - Combining pull_request_target workflow trigger with an explicit checkout - of an untrusted pull request is a dangerous practice - that may lead to repository compromise. - -

    - -
    - - - -

    - - The best practice is to handle the potentially untrusted pull request - via the pull_request trigger so that it is isolated in - an unprivileged environment. The workflow processing the pull request - should then store any results like code coverage or failed/passed tests - in artifacts and exit. The following workflow then starts on workflow_run - where it is granted write permission to the target repository and access to - repository secrets, so that it can download the artifacts and make - any necessary modifications to the repository or interact with third party services - that require repository secrets (e.g. API tokens). - -

    - -
    - - - -

    - - The following example allows unauthorized repository modification - and secrets exfiltration: - -

    - - - -

    - - The following example uses two workflows to handle potentially untrusted - pull request in a secure manner. The receive_pr.yml is triggered first: - -

    - - -

    The comment_pr.yml is triggered after receive_pr.yml completes:

    - - -
    - - -
  • GitHub Security Lab Research: Keeping your GitHub Actions and workflows secure: Preventing pwn requests.
  • -
    - -
    diff --git a/javascript/ql/src/experimental/Security/CWE-094/UntrustedCheckout.ql b/javascript/ql/src/experimental/Security/CWE-094/UntrustedCheckout.ql deleted file mode 100644 index 3f08f297c6a..00000000000 --- a/javascript/ql/src/experimental/Security/CWE-094/UntrustedCheckout.ql +++ /dev/null @@ -1,81 +0,0 @@ -/** - * @name Checkout of untrusted code in trusted context - * @description Workflows triggered on `pull_request_target` have read/write access to the base repository and access to secrets. - * By explicitly checking out and running the build script from a fork the untrusted code is running in an environment - * that is able to push to the base repository and to access secrets. - * @kind problem - * @problem.severity warning - * @precision low - * @id js/actions/pull-request-target - * @tags actions - * security - * experimental - * external/cwe/cwe-094 - */ - -import javascript -import semmle.javascript.Actions - -/** - * An action step that doesn't contain `actor` check in `if:` or - * the check requires manual analysis. - */ -class ProbableStep extends Actions::Step { - // some simplistic checks to eleminate likely false positives: - ProbableStep() { - // no if at all - not exists(this.getIf().getValue()) - or - // needs manual analysis if there is OR - this.getIf().getValue().matches("%||%") - or - // actor check means only the user is able to run it - not exists(this.getIf().getValue().regexpFind("\\bgithub\\s*\\.\\s*actor\\s*==", _, _)) - } -} - -/** - * An action job that doesn't contain `actor` check in `if:` or - * the check requires manual analysis. - */ -class ProbableJob extends Actions::Job { - // some simplistic checks to eleminate likely false positives: - ProbableJob() { - // no if at all - not exists(this.getIf().getValue()) - or - // needs manual analysis if there is OR - this.getIf().getValue().matches("%||%") - or - // actor check means only the user is able to run it - not exists(this.getIf().getValue().regexpFind("\\bgithub\\s*\\.\\s*actor\\s*==", _, _)) - } -} - -/** - * The `on: pull_request_target`. - */ -class ProbablePullRequestTarget extends Actions::On, YamlMappingLikeNode { - ProbablePullRequestTarget() { - // The `on:` is triggered on `pull_request_target` - exists(this.getNode("pull_request_target")) - } -} - -from - Actions::Ref ref, Actions::Uses uses, Actions::Step step, Actions::Job job, - ProbablePullRequestTarget pullRequestTarget -where - pullRequestTarget.getWorkflow() = job.getWorkflow() and - uses.getStep() = step and - ref.getWith().getStep() = step and - step.getJob() = job and - uses.getGitHubRepository() = "actions/checkout" and - ref.getValue() - .matches([ - "%github.event.pull_request.head.ref%", "%github.event.pull_request.head.sha%", - "%github.event.pull_request.number%", "%github.event.number%", "%github.head_ref%" - ]) and - step instanceof ProbableStep and - job instanceof ProbableJob -select step, "Potential unsafe checkout of untrusted pull request on 'pull_request_target'." diff --git a/javascript/ql/src/experimental/Security/CWE-094/examples/comment_pr.yml b/javascript/ql/src/experimental/Security/CWE-094/examples/comment_pr.yml deleted file mode 100644 index e496b1449a0..00000000000 --- a/javascript/ql/src/experimental/Security/CWE-094/examples/comment_pr.yml +++ /dev/null @@ -1,52 +0,0 @@ -name: Comment on the pull request - -# read-write repo token -# access to secrets -on: - workflow_run: - workflows: ["Receive PR"] - types: - - completed - -jobs: - upload: - runs-on: ubuntu-latest - if: > - ${{ github.event.workflow_run.event == 'pull_request' && - github.event.workflow_run.conclusion == 'success' }} - steps: - - name: 'Download artifact' - uses: actions/github-script@v3.1.0 - with: - script: | - var artifacts = await github.actions.listWorkflowRunArtifacts({ - owner: context.repo.owner, - repo: context.repo.repo, - run_id: ${{github.event.workflow_run.id }}, - }); - var matchArtifact = artifacts.data.artifacts.filter((artifact) => { - return artifact.name == "pr" - })[0]; - var download = await github.actions.downloadArtifact({ - owner: context.repo.owner, - repo: context.repo.repo, - artifact_id: matchArtifact.id, - archive_format: 'zip', - }); - var fs = require('fs'); - fs.writeFileSync('${{github.workspace}}/pr.zip', Buffer.from(download.data)); - - run: unzip pr.zip - - - name: 'Comment on PR' - uses: actions/github-script@v3 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - script: | - var fs = require('fs'); - var issue_number = Number(fs.readFileSync('./NR')); - await github.issues.createComment({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: issue_number, - body: 'Everything is OK. Thank you for the PR!' - }); \ No newline at end of file diff --git a/javascript/ql/src/experimental/Security/CWE-094/examples/pull_request_target_bad.yml b/javascript/ql/src/experimental/Security/CWE-094/examples/pull_request_target_bad.yml deleted file mode 100644 index fb9f0699a42..00000000000 --- a/javascript/ql/src/experimental/Security/CWE-094/examples/pull_request_target_bad.yml +++ /dev/null @@ -1,25 +0,0 @@ -on: - pull_request_target - -jobs: - build: - name: Build and test - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - ref: ${{ github.event.pull_request.head.sha }} - - - uses: actions/setup-node@v1 - - run: | - npm install - npm build - - - uses: completely/fakeaction@v2 - with: - arg1: ${{ secrets.supersecret }} - - - uses: fakerepo/comment-on-pr@v1 - with: - message: | - Thank you! \ No newline at end of file diff --git a/javascript/ql/src/experimental/Security/CWE-094/examples/receive_pr.yml b/javascript/ql/src/experimental/Security/CWE-094/examples/receive_pr.yml deleted file mode 100644 index 7104bce8bf3..00000000000 --- a/javascript/ql/src/experimental/Security/CWE-094/examples/receive_pr.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: Receive PR - -# read-only repo token -# no access to secrets -on: - pull_request: - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - # imitation of a build process - - name: Build - run: /bin/bash ./build.sh - - - name: Save PR number - run: | - mkdir -p ./pr - echo ${{ github.event.number }} > ./pr/NR - - uses: actions/upload-artifact@v2 - with: - name: pr - path: pr/ \ No newline at end of file diff --git a/javascript/ql/src/qlpack.yml b/javascript/ql/src/qlpack.yml index 0bfacd0c21e..59f83e85aef 100644 --- a/javascript/ql/src/qlpack.yml +++ b/javascript/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/javascript-queries -version: 1.6.3-dev +version: 1.7.1-dev groups: - javascript - queries diff --git a/javascript/ql/test/experimental/Execa/CommandInjection/tests.expected b/javascript/ql/test/experimental/Execa/CommandInjection/tests.expected deleted file mode 100644 index 931d1de923f..00000000000 --- a/javascript/ql/test/experimental/Execa/CommandInjection/tests.expected +++ /dev/null @@ -1,22 +0,0 @@ -passingPositiveTests -| PASSED | CommandInjection | tests.js:11:46:11:70 | // test ... jection | -| PASSED | CommandInjection | tests.js:12:43:12:67 | // test ... jection | -| PASSED | CommandInjection | tests.js:13:63:13:87 | // test ... jection | -| PASSED | CommandInjection | tests.js:14:62:14:86 | // test ... jection | -| PASSED | CommandInjection | tests.js:15:60:15:84 | // test ... jection | -| PASSED | CommandInjection | tests.js:17:45:17:69 | // test ... jection | -| PASSED | CommandInjection | tests.js:18:42:18:66 | // test ... jection | -| PASSED | CommandInjection | tests.js:19:62:19:86 | // test ... jection | -| PASSED | CommandInjection | tests.js:20:63:20:87 | // test ... jection | -| PASSED | CommandInjection | tests.js:21:60:21:84 | // test ... jection | -| PASSED | CommandInjection | tests.js:23:43:23:67 | // test ... jection | -| PASSED | CommandInjection | tests.js:24:40:24:64 | // test ... jection | -| PASSED | CommandInjection | tests.js:25:40:25:64 | // test ... jection | -| PASSED | CommandInjection | tests.js:26:60:26:84 | // test ... jection | -| PASSED | CommandInjection | tests.js:28:41:28:65 | // test ... jection | -| PASSED | CommandInjection | tests.js:29:58:29:82 | // test ... jection | -| PASSED | CommandInjection | tests.js:31:51:31:75 | // test ... jection | -| PASSED | CommandInjection | tests.js:32:68:32:92 | // test ... jection | -| PASSED | CommandInjection | tests.js:34:49:34:73 | // test ... jection | -| PASSED | CommandInjection | tests.js:35:66:35:90 | // test ... jection | -failingPositiveTests diff --git a/javascript/ql/test/experimental/Execa/CommandInjection/tests.js b/javascript/ql/test/experimental/Execa/CommandInjection/tests.js deleted file mode 100644 index eb35be96b61..00000000000 --- a/javascript/ql/test/experimental/Execa/CommandInjection/tests.js +++ /dev/null @@ -1,36 +0,0 @@ -import { execa, execaSync, execaCommand, execaCommandSync, $ } from 'execa'; -import http from 'node:http' -import url from 'url' - -http.createServer(async function (req, res) { - let cmd = url.parse(req.url, true).query["cmd"][0]; - let arg1 = url.parse(req.url, true).query["arg1"]; - let arg2 = url.parse(req.url, true).query["arg2"]; - let arg3 = url.parse(req.url, true).query["arg3"]; - - await $`${cmd} ${arg1} ${arg2} ${arg3}`; // test: CommandInjection - await $`ssh ${arg1} ${arg2} ${arg3}`; // test: CommandInjection - $({ shell: false }).sync`${cmd} ${arg1} ${arg2} ${arg3}`; // test: CommandInjection - $({ shell: true }).sync`${cmd} ${arg1} ${arg2} ${arg3}`; // test: CommandInjection - $({ shell: false }).sync`ssh ${arg1} ${arg2} ${arg3}`; // test: CommandInjection - - $.sync`${cmd} ${arg1} ${arg2} ${arg3}`; // test: CommandInjection - $.sync`ssh ${arg1} ${arg2} ${arg3}`; // test: CommandInjection - await $({ shell: true })`${cmd} ${arg1} ${arg2} ${arg3}` // test: CommandInjection - await $({ shell: false })`${cmd} ${arg1} ${arg2} ${arg3}` // test: CommandInjection - await $({ shell: false })`ssh ${arg1} ${arg2} ${arg3}` // test: CommandInjection - - await execa(cmd, [arg1, arg2, arg3]); // test: CommandInjection - await execa(cmd, { shell: true }); // test: CommandInjection - await execa(cmd, { shell: true }); // test: CommandInjection - await execa(cmd, [arg1, arg2, arg3], { shell: true }); // test: CommandInjection - - execaSync(cmd, [arg1, arg2, arg3]); // test: CommandInjection - execaSync(cmd, [arg1, arg2, arg3], { shell: true }); // test: CommandInjection - - await execaCommand(cmd + arg1 + arg2 + arg3); // test: CommandInjection - await execaCommand(cmd + arg1 + arg2 + arg3, { shell: true }); // test: CommandInjection - - execaCommandSync(cmd + arg1 + arg2 + arg3); // test: CommandInjection - execaCommandSync(cmd + arg1 + arg2 + arg3, { shell: true }); // test: CommandInjection -}); \ No newline at end of file diff --git a/javascript/ql/test/experimental/Execa/CommandInjection/tests.ql b/javascript/ql/test/experimental/Execa/CommandInjection/tests.ql deleted file mode 100644 index a8ab812f821..00000000000 --- a/javascript/ql/test/experimental/Execa/CommandInjection/tests.ql +++ /dev/null @@ -1,38 +0,0 @@ -import javascript - -class InlineTest extends LineComment { - string tests; - - InlineTest() { tests = this.getText().regexpCapture("\\s*test:(.*)", 1) } - - string getPositiveTest() { - result = tests.trim().splitAt(",").trim() and not result.matches("!%") - } - - predicate hasPositiveTest(string test) { test = this.getPositiveTest() } - - predicate inNode(DataFlow::Node n) { - this.getLocation().getFile() = n.getFile() and - this.getLocation().getStartLine() = n.getStartLine() - } -} - -import experimental.semmle.javascript.Execa - -query predicate passingPositiveTests(string res, string expectation, InlineTest t) { - res = "PASSED" and - t.hasPositiveTest(expectation) and - expectation = "CommandInjection" and - exists(SystemCommandExecution n | - t.inNode(n.getArgumentList()) or t.inNode(n.getACommandArgument()) - ) -} - -query predicate failingPositiveTests(string res, string expectation, InlineTest t) { - res = "FAILED" and - t.hasPositiveTest(expectation) and - expectation = "CommandInjection" and - not exists(SystemCommandExecution n | - t.inNode(n.getArgumentList()) or t.inNode(n.getACommandArgument()) - ) -} diff --git a/javascript/ql/test/experimental/Execa/PathInjection/tests.expected b/javascript/ql/test/experimental/Execa/PathInjection/tests.expected deleted file mode 100644 index 3149ae1c022..00000000000 --- a/javascript/ql/test/experimental/Execa/PathInjection/tests.expected +++ /dev/null @@ -1,6 +0,0 @@ -passingPositiveTests -| PASSED | PathInjection | tests.js:9:43:9:64 | // test ... jection | -| PASSED | PathInjection | tests.js:12:50:12:71 | // test ... jection | -| PASSED | PathInjection | tests.js:15:61:15:82 | // test ... jection | -| PASSED | PathInjection | tests.js:18:73:18:94 | // test ... jection | -failingPositiveTests diff --git a/javascript/ql/test/experimental/Execa/PathInjection/tests.ql b/javascript/ql/test/experimental/Execa/PathInjection/tests.ql deleted file mode 100644 index 08b5435e01f..00000000000 --- a/javascript/ql/test/experimental/Execa/PathInjection/tests.ql +++ /dev/null @@ -1,34 +0,0 @@ -import javascript - -class InlineTest extends LineComment { - string tests; - - InlineTest() { tests = this.getText().regexpCapture("\\s*test:(.*)", 1) } - - string getPositiveTest() { - result = tests.trim().splitAt(",").trim() and not result.matches("!%") - } - - predicate hasPositiveTest(string test) { test = this.getPositiveTest() } - - predicate inNode(DataFlow::Node n) { - this.getLocation().getFile() = n.getFile() and - this.getLocation().getStartLine() = n.getStartLine() - } -} - -import experimental.semmle.javascript.Execa - -query predicate passingPositiveTests(string res, string expectation, InlineTest t) { - res = "PASSED" and - t.hasPositiveTest(expectation) and - expectation = "PathInjection" and - exists(FileSystemReadAccess n | t.inNode(n.getAPathArgument())) -} - -query predicate failingPositiveTests(string res, string expectation, InlineTest t) { - res = "FAILED" and - t.hasPositiveTest(expectation) and - expectation = "PathInjection" and - not exists(FileSystemReadAccess n | t.inNode(n.getAPathArgument())) -} diff --git a/javascript/ql/test/experimental/Security/CWE-094/.github/workflows/pull_request_target_if_job.yml b/javascript/ql/test/experimental/Security/CWE-094/.github/workflows/pull_request_target_if_job.yml deleted file mode 100644 index cf713f5473d..00000000000 --- a/javascript/ql/test/experimental/Security/CWE-094/.github/workflows/pull_request_target_if_job.yml +++ /dev/null @@ -1,38 +0,0 @@ -on: - pull_request_target: - -jobs: - job1: - if: contains(github.event.issue.labels.*.name, 'ok') - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - ref: ${{ github.event.pull_request.head.ref }} - job2: - if: github.event.label.name == 'ok' - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - ref: ${{ github.event.pull_request.head.ref }} - job3: - if: github.actor == 'ok' - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - ref: ${{ github.event.pull_request.head.ref }} - job4: - if: github.actor == 'ok' || true - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - ref: ${{ github.event.pull_request.head.ref }} - job5: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - ref: ${{ github.event.pull_request.head.ref }} \ No newline at end of file diff --git a/javascript/ql/test/experimental/Security/CWE-094/.github/workflows/pull_request_target_if_step.yml b/javascript/ql/test/experimental/Security/CWE-094/.github/workflows/pull_request_target_if_step.yml deleted file mode 100644 index 08a3757392b..00000000000 --- a/javascript/ql/test/experimental/Security/CWE-094/.github/workflows/pull_request_target_if_step.yml +++ /dev/null @@ -1,31 +0,0 @@ -on: - pull_request_target: - -jobs: - job1: - runs-on: ubuntu-latest - steps: - - - uses: actions/checkout@v2 - if: contains(github.event.issue.labels.*.name, 'ok') - with: - ref: ${{ github.event.pull_request.head.ref }} - - - uses: actions/checkout@v2 - if: github.event.label.name == 'ok' - with: - ref: ${{ github.event.pull_request.head.ref }} - - - uses: actions/checkout@v2 - if: github.actor == 'ok' - with: - ref: ${{ github.event.pull_request.head.ref }} - - - uses: actions/checkout@v2 - if: github.actor == 'ok' || true - with: - ref: ${{ github.event.pull_request.head.ref }} - - - uses: actions/checkout@v2 - with: - ref: ${{ github.event.pull_request.head.ref }} \ No newline at end of file diff --git a/javascript/ql/test/experimental/Security/CWE-094/.github/workflows/pull_request_target_label_only.yml b/javascript/ql/test/experimental/Security/CWE-094/.github/workflows/pull_request_target_label_only.yml deleted file mode 100644 index 1b87798b89c..00000000000 --- a/javascript/ql/test/experimental/Security/CWE-094/.github/workflows/pull_request_target_label_only.yml +++ /dev/null @@ -1,12 +0,0 @@ -on: - pull_request_target: - types: [labeled] - push: - -jobs: - echo-chamber: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - ref: ${{ github.event.pull_request.head.ref }} \ No newline at end of file diff --git a/javascript/ql/test/experimental/Security/CWE-094/.github/workflows/pull_request_target_label_only_mapping.yml b/javascript/ql/test/experimental/Security/CWE-094/.github/workflows/pull_request_target_label_only_mapping.yml deleted file mode 100644 index 076d827a9b9..00000000000 --- a/javascript/ql/test/experimental/Security/CWE-094/.github/workflows/pull_request_target_label_only_mapping.yml +++ /dev/null @@ -1,13 +0,0 @@ -on: - pull_request_target: - types: - labeled: - push: - -jobs: - echo-chamber: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - ref: ${{ github.event.pull_request.head.ref }} \ No newline at end of file diff --git a/javascript/ql/test/experimental/Security/CWE-094/.github/workflows/pull_request_target_labels_mapping.yml b/javascript/ql/test/experimental/Security/CWE-094/.github/workflows/pull_request_target_labels_mapping.yml deleted file mode 100644 index 5b2b594890b..00000000000 --- a/javascript/ql/test/experimental/Security/CWE-094/.github/workflows/pull_request_target_labels_mapping.yml +++ /dev/null @@ -1,15 +0,0 @@ -on: - pull_request_target: - types: - labeled: - opened: - closed: - push: - -jobs: - echo-chamber: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - ref: ${{ github.event.pull_request.head.ref }} \ No newline at end of file diff --git a/javascript/ql/test/experimental/Security/CWE-094/.github/workflows/pull_request_target_labels_sequence.yml b/javascript/ql/test/experimental/Security/CWE-094/.github/workflows/pull_request_target_labels_sequence.yml deleted file mode 100644 index 9677bd35360..00000000000 --- a/javascript/ql/test/experimental/Security/CWE-094/.github/workflows/pull_request_target_labels_sequence.yml +++ /dev/null @@ -1,12 +0,0 @@ -on: - pull_request_target: - types: [labeled, opened] - push: - -jobs: - echo-chamber: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - ref: ${{ github.event.pull_request.head.ref }} \ No newline at end of file diff --git a/javascript/ql/test/experimental/Security/CWE-094/.github/workflows/pull_request_target_mapping.yml b/javascript/ql/test/experimental/Security/CWE-094/.github/workflows/pull_request_target_mapping.yml deleted file mode 100644 index c3875fde7cd..00000000000 --- a/javascript/ql/test/experimental/Security/CWE-094/.github/workflows/pull_request_target_mapping.yml +++ /dev/null @@ -1,10 +0,0 @@ -on: - pull_request_target: - -jobs: - echo-chamber: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - ref: ${{ github.event.pull_request.head.ref }} \ No newline at end of file diff --git a/javascript/ql/test/experimental/Security/CWE-094/.github/workflows/pull_request_target_master.yml b/javascript/ql/test/experimental/Security/CWE-094/.github/workflows/pull_request_target_master.yml deleted file mode 100644 index feeec7bf1f3..00000000000 --- a/javascript/ql/test/experimental/Security/CWE-094/.github/workflows/pull_request_target_master.yml +++ /dev/null @@ -1,10 +0,0 @@ -on: - pull_request_target: - -jobs: - echo-chamber: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - ref: master \ No newline at end of file diff --git a/javascript/ql/test/experimental/Security/CWE-094/.github/workflows/pull_request_target_run.yml b/javascript/ql/test/experimental/Security/CWE-094/.github/workflows/pull_request_target_run.yml deleted file mode 100644 index 33bb9ba889b..00000000000 --- a/javascript/ql/test/experimental/Security/CWE-094/.github/workflows/pull_request_target_run.yml +++ /dev/null @@ -1,11 +0,0 @@ -on: pull_request_target - -jobs: - echo-chamber: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - ref: ${{ github.event.pull_request.head.ref }} - - - run: make \ No newline at end of file diff --git a/javascript/ql/test/experimental/Security/CWE-094/.github/workflows/pull_request_target_sequence.yml b/javascript/ql/test/experimental/Security/CWE-094/.github/workflows/pull_request_target_sequence.yml deleted file mode 100644 index 5e0d2a8ee27..00000000000 --- a/javascript/ql/test/experimental/Security/CWE-094/.github/workflows/pull_request_target_sequence.yml +++ /dev/null @@ -1,9 +0,0 @@ -on: [pull_request_target, push] - -jobs: - echo-chamber: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - ref: ${{ github.event.pull_request.head.ref }} \ No newline at end of file diff --git a/javascript/ql/test/experimental/Security/CWE-094/UntrustedCheckout.expected b/javascript/ql/test/experimental/Security/CWE-094/UntrustedCheckout.expected deleted file mode 100644 index 127ced2bb97..00000000000 --- a/javascript/ql/test/experimental/Security/CWE-094/UntrustedCheckout.expected +++ /dev/null @@ -1,15 +0,0 @@ -| .github/workflows/pull_request_target_if_job.yml:9:7:12:2 | uses: a ... kout@v2 | Potential unsafe checkout of untrusted pull request on 'pull_request_target'. | -| .github/workflows/pull_request_target_if_job.yml:16:7:19:2 | uses: a ... kout@v2 | Potential unsafe checkout of untrusted pull request on 'pull_request_target'. | -| .github/workflows/pull_request_target_if_job.yml:30:7:33:2 | uses: a ... kout@v2 | Potential unsafe checkout of untrusted pull request on 'pull_request_target'. | -| .github/workflows/pull_request_target_if_job.yml:36:7:38:54 | uses: a ... kout@v2 | Potential unsafe checkout of untrusted pull request on 'pull_request_target'. | -| .github/workflows/pull_request_target_if_step.yml:9:7:14:4 | uses: a ... kout@v2 | Potential unsafe checkout of untrusted pull request on 'pull_request_target'. | -| .github/workflows/pull_request_target_if_step.yml:14:7:19:4 | uses: a ... kout@v2 | Potential unsafe checkout of untrusted pull request on 'pull_request_target'. | -| .github/workflows/pull_request_target_if_step.yml:24:7:29:4 | uses: a ... kout@v2 | Potential unsafe checkout of untrusted pull request on 'pull_request_target'. | -| .github/workflows/pull_request_target_if_step.yml:29:7:31:54 | uses: a ... kout@v2 | Potential unsafe checkout of untrusted pull request on 'pull_request_target'. | -| .github/workflows/pull_request_target_label_only.yml:10:7:12:54 | uses: a ... kout@v2 | Potential unsafe checkout of untrusted pull request on 'pull_request_target'. | -| .github/workflows/pull_request_target_label_only_mapping.yml:11:7:13:54 | uses: a ... kout@v2 | Potential unsafe checkout of untrusted pull request on 'pull_request_target'. | -| .github/workflows/pull_request_target_labels_mapping.yml:13:7:15:54 | uses: a ... kout@v2 | Potential unsafe checkout of untrusted pull request on 'pull_request_target'. | -| .github/workflows/pull_request_target_labels_sequence.yml:10:7:12:54 | uses: a ... kout@v2 | Potential unsafe checkout of untrusted pull request on 'pull_request_target'. | -| .github/workflows/pull_request_target_mapping.yml:8:7:10:54 | uses: a ... kout@v2 | Potential unsafe checkout of untrusted pull request on 'pull_request_target'. | -| .github/workflows/pull_request_target_run.yml:7:7:11:4 | uses: a ... kout@v2 | Potential unsafe checkout of untrusted pull request on 'pull_request_target'. | -| .github/workflows/pull_request_target_sequence.yml:7:7:9:54 | uses: a ... kout@v2 | Potential unsafe checkout of untrusted pull request on 'pull_request_target'. | diff --git a/javascript/ql/test/experimental/Security/CWE-094/UntrustedCheckout.qlref b/javascript/ql/test/experimental/Security/CWE-094/UntrustedCheckout.qlref deleted file mode 100644 index bdf753c1f4a..00000000000 --- a/javascript/ql/test/experimental/Security/CWE-094/UntrustedCheckout.qlref +++ /dev/null @@ -1 +0,0 @@ -experimental/Security/CWE-094/UntrustedCheckout.ql diff --git a/javascript/ql/test/library-tests/TripleDot/react-use.js b/javascript/ql/test/library-tests/TripleDot/react-use.js new file mode 100644 index 00000000000..1691a7fbea4 --- /dev/null +++ b/javascript/ql/test/library-tests/TripleDot/react-use.js @@ -0,0 +1,12 @@ +import { use } from "react"; + +async function fetchData() { + return new Promise((resolve) => { + resolve(source("fetchedData")); + }); +} + +function Component() { + const data = use(fetchData()); + sink(data); // $ hasValueFlow=fetchedData +} diff --git a/javascript/ql/test/library-tests/frameworks/ClientRequests/ClientRequests.expected b/javascript/ql/test/library-tests/frameworks/ClientRequests/ClientRequests.expected index f787a7e6060..fbbc8832d72 100644 --- a/javascript/ql/test/library-tests/frameworks/ClientRequests/ClientRequests.expected +++ b/javascript/ql/test/library-tests/frameworks/ClientRequests/ClientRequests.expected @@ -5,6 +5,8 @@ test_ClientRequest | apollo.js:17:1:17:34 | new Pre ... yurl"}) | | apollo.js:20:1:20:77 | createN ... phql'}) | | apollo.js:23:1:23:31 | new Web ... wsUri}) | +| axios.ts:14:32:14:65 | api.get ... repo}`) | +| axios.ts:25:32:25:73 | api.pat ... , data) | | axiosTest.js:4:5:7:6 | axios({ ... \\n }) | | axiosTest.js:12:5:17:6 | axios({ ... \\n }) | | puppeteer.ts:6:11:6:42 | page.go ... e.com') | @@ -111,6 +113,7 @@ test_ClientRequest | tst.js:349:5:349:30 | axios.g ... url }) | | tst.js:352:5:352:66 | axiosIn ... text"}) | test_getADataNode +| axios.ts:25:32:25:73 | api.pat ... , data) | axios.ts:25:69:25:72 | data | | axiosTest.js:12:5:17:6 | axios({ ... \\n }) | axiosTest.js:15:18:15:55 | { 'Cont ... json' } | | axiosTest.js:12:5:17:6 | axios({ ... \\n }) | axiosTest.js:16:15:16:35 | {x: 'te ... 'test'} | | superagent.js:6:5:6:32 | superag ... st(url) | superagent.js:6:39:6:42 | data | @@ -159,6 +162,8 @@ test_getADataNode | tst.js:347:5:347:30 | axios.p ... , data) | tst.js:347:26:347:29 | data | | tst.js:348:5:348:38 | axios.p ... config) | tst.js:348:26:348:29 | data | test_getHost +| axios.ts:14:32:14:65 | api.get ... repo}`) | axios.ts:4:14:4:37 | "https: ... ub.com" | +| axios.ts:25:32:25:73 | api.pat ... , data) | axios.ts:4:14:4:37 | "https: ... ub.com" | | tst.js:87:5:87:39 | http.ge ... host}) | tst.js:87:34:87:37 | host | | tst.js:89:5:89:23 | axios({host: host}) | tst.js:89:18:89:21 | host | | tst.js:91:5:91:34 | got(rel ... host}) | tst.js:91:29:91:32 | host | @@ -173,6 +178,8 @@ test_getUrl | apollo.js:17:1:17:34 | new Pre ... yurl"}) | apollo.js:17:26:17:32 | "myurl" | | apollo.js:20:1:20:77 | createN ... phql'}) | apollo.js:20:30:20:75 | 'https: ... raphql' | | apollo.js:23:1:23:31 | new Web ... wsUri}) | apollo.js:23:25:23:29 | wsUri | +| axios.ts:14:32:14:65 | api.get ... repo}`) | axios.ts:14:40:14:64 | `/repos ... {repo}` | +| axios.ts:25:32:25:73 | api.pat ... , data) | axios.ts:25:42:25:66 | `/repos ... {repo}` | | axiosTest.js:4:5:7:6 | axios({ ... \\n }) | axiosTest.js:4:11:7:5 | {\\n ... ,\\n } | | axiosTest.js:4:5:7:6 | axios({ ... \\n }) | axiosTest.js:6:14:6:16 | url | | axiosTest.js:12:5:17:6 | axios({ ... \\n }) | axiosTest.js:12:11:17:5 | {\\n ... }\\n } | @@ -289,6 +296,8 @@ test_getUrl | tst.js:352:5:352:66 | axiosIn ... text"}) | tst.js:352:19:352:65 | {method ... "text"} | | tst.js:352:5:352:66 | axiosIn ... text"}) | tst.js:352:40:352:42 | url | test_getAResponseDataNode +| axios.ts:14:32:14:65 | api.get ... repo}`) | axios.ts:14:32:14:65 | api.get ... repo}`) | json | true | +| axios.ts:25:32:25:73 | api.pat ... , data) | axios.ts:25:32:25:73 | api.pat ... , data) | json | true | | axiosTest.js:4:5:7:6 | axios({ ... \\n }) | axiosTest.js:4:5:7:6 | axios({ ... \\n }) | json | true | | axiosTest.js:12:5:17:6 | axios({ ... \\n }) | axiosTest.js:12:5:17:6 | axios({ ... \\n }) | json | true | | superagent.js:4:5:4:26 | superag ... ', url) | superagent.js:4:5:4:26 | superag ... ', url) | stream | true | diff --git a/javascript/ql/test/library-tests/frameworks/ClientRequests/axios.ts b/javascript/ql/test/library-tests/frameworks/ClientRequests/axios.ts new file mode 100644 index 00000000000..7099e3889b9 --- /dev/null +++ b/javascript/ql/test/library-tests/frameworks/ClientRequests/axios.ts @@ -0,0 +1,32 @@ +import axios from "axios"; + +let api = axios.create({ + baseURL: "https://api.github.com", + timeout: 1000, + responseType: "json", + headers: { "X-Custom-Header": "foobar" } +}); + +export default api; + +export async function getRepo(owner: string, repo: string) { + try { + const response = await api.get(`/repos/${owner}/${repo}`); + console.log("Repository data:", response.data); + return response.data; + } catch (error) { + console.error("Error fetching repo:", error); + throw error; + } +} + +export async function updateUser(owner: string, repo: string, data: any) { + try { + const response = await api.patch(`/repos/${owner}/${repo}`, data); + console.log("User updated:", response.data); + return response.data; + } catch (error) { + console.error("Error updating user:", error); + throw error; + } +} diff --git a/javascript/ql/test/library-tests/frameworks/ReactJS/ReactComponent.qll b/javascript/ql/test/library-tests/frameworks/ReactJS/ReactComponent.qll deleted file mode 100644 index a48c6b8f1c9..00000000000 --- a/javascript/ql/test/library-tests/frameworks/ReactJS/ReactComponent.qll +++ /dev/null @@ -1,3 +0,0 @@ -import semmle.javascript.frameworks.React - -query predicate test_ReactComponent(ReactComponent c) { any() } diff --git a/javascript/ql/test/library-tests/frameworks/ReactJS/ReactComponent_getACandidatePropsValue.qll b/javascript/ql/test/library-tests/frameworks/ReactJS/ReactComponent_getACandidatePropsValue.qll deleted file mode 100644 index a551aa457ec..00000000000 --- a/javascript/ql/test/library-tests/frameworks/ReactJS/ReactComponent_getACandidatePropsValue.qll +++ /dev/null @@ -1,5 +0,0 @@ -import javascript - -query predicate test_ReactComponent_getACandidatePropsValue(DataFlow::Node res) { - exists(ReactComponent c | res = c.getACandidatePropsValue(_)) -} diff --git a/javascript/ql/test/library-tests/frameworks/ReactJS/ReactComponent_getACandidateStateSource.qll b/javascript/ql/test/library-tests/frameworks/ReactJS/ReactComponent_getACandidateStateSource.qll deleted file mode 100644 index af6597ab96c..00000000000 --- a/javascript/ql/test/library-tests/frameworks/ReactJS/ReactComponent_getACandidateStateSource.qll +++ /dev/null @@ -1,7 +0,0 @@ -import semmle.javascript.frameworks.React - -query predicate test_ReactComponent_getACandidateStateSource( - ReactComponent c, DataFlow::SourceNode res -) { - res = c.getACandidateStateSource() -} diff --git a/javascript/ql/test/library-tests/frameworks/ReactJS/ReactComponent_getADirectPropsSource.qll b/javascript/ql/test/library-tests/frameworks/ReactJS/ReactComponent_getADirectPropsSource.qll deleted file mode 100644 index 9f9ebd89f8d..00000000000 --- a/javascript/ql/test/library-tests/frameworks/ReactJS/ReactComponent_getADirectPropsSource.qll +++ /dev/null @@ -1,5 +0,0 @@ -import semmle.javascript.frameworks.React - -query predicate test_ReactComponent_getADirectPropsSource(ReactComponent c, DataFlow::SourceNode res) { - res = c.getADirectPropsAccess() -} diff --git a/javascript/ql/test/library-tests/frameworks/ReactJS/ReactComponent_getAPreviousStateSource.qll b/javascript/ql/test/library-tests/frameworks/ReactJS/ReactComponent_getAPreviousStateSource.qll deleted file mode 100644 index b1bfe312dae..00000000000 --- a/javascript/ql/test/library-tests/frameworks/ReactJS/ReactComponent_getAPreviousStateSource.qll +++ /dev/null @@ -1,7 +0,0 @@ -import semmle.javascript.frameworks.React - -query predicate test_ReactComponent_getAPreviousStateSource( - ReactComponent c, DataFlow::SourceNode res -) { - res = c.getAPreviousStateSource() -} diff --git a/javascript/ql/test/library-tests/frameworks/ReactJS/ReactComponent_getAPropRead.qll b/javascript/ql/test/library-tests/frameworks/ReactJS/ReactComponent_getAPropRead.qll deleted file mode 100644 index 0ff2a588a02..00000000000 --- a/javascript/ql/test/library-tests/frameworks/ReactJS/ReactComponent_getAPropRead.qll +++ /dev/null @@ -1,5 +0,0 @@ -import semmle.javascript.frameworks.React - -query predicate test_ReactComponent_getAPropRead(ReactComponent c, string n, DataFlow::PropRead res) { - res = c.getAPropRead(n) -} diff --git a/javascript/ql/test/library-tests/frameworks/ReactJS/ReactComponent_getInstanceMethod.qll b/javascript/ql/test/library-tests/frameworks/ReactJS/ReactComponent_getInstanceMethod.qll deleted file mode 100644 index b813e19539b..00000000000 --- a/javascript/ql/test/library-tests/frameworks/ReactJS/ReactComponent_getInstanceMethod.qll +++ /dev/null @@ -1,5 +0,0 @@ -import semmle.javascript.frameworks.React - -query predicate test_ReactComponent_getInstanceMethod(ReactComponent c, string n, Function res) { - res = c.getInstanceMethod(n) -} diff --git a/javascript/ql/test/library-tests/frameworks/ReactJS/ReactComponent_ref.qll b/javascript/ql/test/library-tests/frameworks/ReactJS/ReactComponent_ref.qll deleted file mode 100644 index a017a0715fe..00000000000 --- a/javascript/ql/test/library-tests/frameworks/ReactJS/ReactComponent_ref.qll +++ /dev/null @@ -1,3 +0,0 @@ -import semmle.javascript.frameworks.React - -query predicate test_ReactComponent_ref(ReactComponent c, DataFlow::Node res) { res = c.ref() } diff --git a/javascript/ql/test/library-tests/frameworks/ReactJS/ReactName.qll b/javascript/ql/test/library-tests/frameworks/ReactJS/ReactName.qll deleted file mode 100644 index 885f1f38a57..00000000000 --- a/javascript/ql/test/library-tests/frameworks/ReactJS/ReactName.qll +++ /dev/null @@ -1,17 +0,0 @@ -import semmle.javascript.frameworks.React - -query predicate test_JSXname(JsxElement element, JsxName jsxname, string name, string type) { - name = jsxname.getValue() and - ( - jsxname instanceof Identifier and type = "Identifier" - or - jsxname instanceof ThisExpr and type = "thisExpr" - or - jsxname.(DotExpr).getBase() instanceof JsxName and type = "dot" - or - jsxname instanceof JsxQualifiedName and type = "qualifiedName" - ) and - element.getNameExpr() = jsxname -} - -query ThisExpr test_JsxName_this(JsxElement element) { result.getParentExpr+() = element } diff --git a/javascript/ql/test/library-tests/frameworks/ReactJS/es5.js b/javascript/ql/test/library-tests/frameworks/ReactJS/es5.js index abef8d7d8bb..8d1eb47b55f 100644 --- a/javascript/ql/test/library-tests/frameworks/ReactJS/es5.js +++ b/javascript/ql/test/library-tests/frameworks/ReactJS/es5.js @@ -1,14 +1,14 @@ var Hello = React.createClass({ displayName: 'Hello', render: function() { - return
    Hello {this.props.name}
    ; + return
    Hello {this.props.name}
    ; // $ threatModelSource=view-component-input }, getDefaultProps: function() { return { - name: 'world' + name: 'world' // $ getACandidatePropsValue }; } -}); +}); // $ reactComponent Hello.info = function() { return "Nothing to see here."; @@ -17,6 +17,6 @@ Hello.info = function() { var createReactClass = require('create-react-class'); var Greeting = createReactClass({ render: function() { - return

    Hello, {this.props.name}

    ; + return

    Hello, {this.props.name}

    ; // $ threatModelSource=view-component-input } -}); +}); // $ reactComponent diff --git a/javascript/ql/test/library-tests/frameworks/ReactJS/es6.js b/javascript/ql/test/library-tests/frameworks/ReactJS/es6.js index 2991888354c..333ac1a943f 100644 --- a/javascript/ql/test/library-tests/frameworks/ReactJS/es6.js +++ b/javascript/ql/test/library-tests/frameworks/ReactJS/es6.js @@ -1,11 +1,11 @@ -class Hello extends React.Component { +class Hello extends React.Component { // $ threatModelSource=view-component-input render() { - return
    Hello {this.props.name}
    ; + return
    Hello {this.props.name}
    ; // $ threatModelSource=view-component-input } static info() { return "Nothing to see here."; } -} +} // $ reactComponent Hello.displayName = 'Hello'; Hello.defaultProps = { name: 'world' @@ -17,4 +17,4 @@ class Hello2 extends React.Component { this.state.bar.foo = 42; this.state = { baz: 42}; } -} +} // $ reactComponent diff --git a/javascript/ql/test/library-tests/frameworks/ReactJS/exportedComponent.jsx b/javascript/ql/test/library-tests/frameworks/ReactJS/exportedComponent.jsx index 4335b4bc308..9e2d5580228 100644 --- a/javascript/ql/test/library-tests/frameworks/ReactJS/exportedComponent.jsx +++ b/javascript/ql/test/library-tests/frameworks/ReactJS/exportedComponent.jsx @@ -1,3 +1,3 @@ -export function MyComponent(props) { +export function MyComponent(props) { // $ threatModelSource=view-component-input return
    -} +} // $ reactComponent diff --git a/javascript/ql/test/library-tests/frameworks/ReactJS/getADirectStateAccess.qll b/javascript/ql/test/library-tests/frameworks/ReactJS/getADirectStateAccess.qll deleted file mode 100644 index b43f3e487d7..00000000000 --- a/javascript/ql/test/library-tests/frameworks/ReactJS/getADirectStateAccess.qll +++ /dev/null @@ -1,5 +0,0 @@ -import semmle.javascript.frameworks.React - -query predicate test_getADirectStateAccess(ReactComponent c, DataFlow::SourceNode res) { - res = c.getADirectStateAccess() -} diff --git a/javascript/ql/test/library-tests/frameworks/ReactJS/importedComponent.jsx b/javascript/ql/test/library-tests/frameworks/ReactJS/importedComponent.jsx index d94acf59abe..ed04d4bec88 100644 --- a/javascript/ql/test/library-tests/frameworks/ReactJS/importedComponent.jsx +++ b/javascript/ql/test/library-tests/frameworks/ReactJS/importedComponent.jsx @@ -1,5 +1,5 @@ import { MyComponent } from "./exportedComponent"; -export function render({color, location}) { - return -} +export function render({color, location}) { // $ threatModelSource=view-component-input locationSource threatModelSource=remote + return // $ getACandidatePropsValue +} // $ reactComponent diff --git a/javascript/ql/test/library-tests/frameworks/ReactJS/namedImport.js b/javascript/ql/test/library-tests/frameworks/ReactJS/namedImport.js index 3c5a7182d65..c29160c8ed5 100644 --- a/javascript/ql/test/library-tests/frameworks/ReactJS/namedImport.js +++ b/javascript/ql/test/library-tests/frameworks/ReactJS/namedImport.js @@ -1,5 +1,5 @@ import { Component } from "react"; -class C extends Component {} +class C extends Component {} // $ threatModelSource=view-component-input reactComponent -class D extends C {} +class D extends C {} // $ threatModelSource=view-component-input reactComponent diff --git a/javascript/ql/test/library-tests/frameworks/ReactJS/plainfn.js b/javascript/ql/test/library-tests/frameworks/ReactJS/plainfn.js index 7f5995b9fdb..c5d029a44d1 100644 --- a/javascript/ql/test/library-tests/frameworks/ReactJS/plainfn.js +++ b/javascript/ql/test/library-tests/frameworks/ReactJS/plainfn.js @@ -1,15 +1,15 @@ -function Hello(props) { +function Hello(props) { // $ threatModelSource=view-component-input return
    Hello {props.name}
    ; -} +} // $ reactComponent -function Hello2(props) { +function Hello2(props) { // $ threatModelSource=view-component-input return React.createElement("div"); -} +} // $ reactComponent -function Hello3(props) { +function Hello3(props) { // $ threatModelSource=view-component-input var x = React.createElement("div"); return x; -} +} // $ reactComponent function NotAComponent(props) { if (y) @@ -17,8 +17,8 @@ function NotAComponent(props) { return g(); } -function SpuriousComponent(props) { +function SpuriousComponent(props) { // $ threatModelSource=view-component-input if (y) return React.createElement("div"); return 42; -} +} // $ reactComponent diff --git a/javascript/ql/test/library-tests/frameworks/ReactJS/preact.js b/javascript/ql/test/library-tests/frameworks/ReactJS/preact.js index 787064397f0..ced8ae6be30 100644 --- a/javascript/ql/test/library-tests/frameworks/ReactJS/preact.js +++ b/javascript/ql/test/library-tests/frameworks/ReactJS/preact.js @@ -1,11 +1,11 @@ -class Hello extends Preact.Component { - render(props, state) { +class Hello extends Preact.Component { // $ threatModelSource=view-component-input + render(props, state) { // $ threatModelSource=view-component-input props.name; state.name; return
    ; } -} +} // $ reactComponent -class Hello extends preact.Component { +class Hello extends preact.Component { // $ threatModelSource=view-component-input -} +} // $ reactComponent diff --git a/javascript/ql/test/library-tests/frameworks/ReactJS/probably-a-component.js b/javascript/ql/test/library-tests/frameworks/ReactJS/probably-a-component.js index a8205039b8e..c82188beb02 100644 --- a/javascript/ql/test/library-tests/frameworks/ReactJS/probably-a-component.js +++ b/javascript/ql/test/library-tests/frameworks/ReactJS/probably-a-component.js @@ -1,6 +1,6 @@ -class Hello extends Component { +class Hello extends Component { // $ threatModelSource=view-component-input render() { - this.props.name; + this.props.name; // $ threatModelSource=view-component-input return
    ; } -} +} // $ reactComponent diff --git a/javascript/ql/test/library-tests/frameworks/ReactJS/props.js b/javascript/ql/test/library-tests/frameworks/ReactJS/props.js index c1cce38a040..153ee147342 100644 --- a/javascript/ql/test/library-tests/frameworks/ReactJS/props.js +++ b/javascript/ql/test/library-tests/frameworks/ReactJS/props.js @@ -1,36 +1,36 @@ function ES2015() { - class C extends React.Component { - } + class C extends React.Component { // $ threatModelSource=view-component-input + } // $ reactComponent - C.defaultProps = { propFromDefaultProps: "propFromDefaultProps" }; + C.defaultProps = { propFromDefaultProps: "propFromDefaultProps" }; // $ getACandidatePropsValue - (); + (); // $ getACandidatePropsValue - new C({propFromConstructor: "propFromConstructor"}); + new C({propFromConstructor: "propFromConstructor"}); // $ getACandidatePropsValue } function ES5() { var C = React.createClass({ getDefaultProps() { - return { propFromDefaultProps: "propFromDefaultProps" }; + return { propFromDefaultProps: "propFromDefaultProps" }; // $ getACandidatePropsValue } - }); + }); // $ reactComponent - (); + (); // $ getACandidatePropsValue - C({propFromConstructor: "propFromConstructor"}); + C({propFromConstructor: "propFromConstructor"}); // $ getACandidatePropsValue } function Functional() { - function C(props) { + function C(props) { // $ threatModelSource=view-component-input return
    ; - } + } // $ reactComponent - C.defaultProps = { propFromDefaultProps: "propFromDefaultProps" }; + C.defaultProps = { propFromDefaultProps: "propFromDefaultProps" }; // $ getACandidatePropsValue - (); + (); // $ getACandidatePropsValue - new C({propFromConstructor: "propFromConstructor"}); + new C({propFromConstructor: "propFromConstructor"}); // $ getACandidatePropsValue } diff --git a/javascript/ql/test/library-tests/frameworks/ReactJS/rare-lifecycle-methods.js b/javascript/ql/test/library-tests/frameworks/ReactJS/rare-lifecycle-methods.js index c3f7c13b162..b4943ea66c3 100644 --- a/javascript/ql/test/library-tests/frameworks/ReactJS/rare-lifecycle-methods.js +++ b/javascript/ql/test/library-tests/frameworks/ReactJS/rare-lifecycle-methods.js @@ -1,4 +1,4 @@ -class C extends React.Component { +class C extends React.Component { // $ threatModelSource=view-component-input static getDerivedStateFromProps(props, state) { return {}; } @@ -8,4 +8,4 @@ class C extends React.Component { getSnapshotBeforeUpdate(prevProps, prevState) { return {}; } -} +} // $ reactComponent diff --git a/javascript/ql/test/library-tests/frameworks/ReactJS/react.qll b/javascript/ql/test/library-tests/frameworks/ReactJS/react.qll deleted file mode 100644 index a5f254b7970..00000000000 --- a/javascript/ql/test/library-tests/frameworks/ReactJS/react.qll +++ /dev/null @@ -1,3 +0,0 @@ -import javascript - -query predicate test_react(DataFlow::ValueNode nd) { react().flowsTo(nd) } diff --git a/javascript/ql/test/library-tests/frameworks/ReactJS/statePropertyReads.js b/javascript/ql/test/library-tests/frameworks/ReactJS/statePropertyReads.js index 697bc35c150..93a120937d7 100644 --- a/javascript/ql/test/library-tests/frameworks/ReactJS/statePropertyReads.js +++ b/javascript/ql/test/library-tests/frameworks/ReactJS/statePropertyReads.js @@ -10,4 +10,4 @@ class Reads extends React.Component { componentDidUpdate(prevProps, prevState) { prevState.p4; } -} +} // $ reactComponent diff --git a/javascript/ql/test/library-tests/frameworks/ReactJS/statePropertyWrites.js b/javascript/ql/test/library-tests/frameworks/ReactJS/statePropertyWrites.js index 692400c7381..27e02bc6f66 100644 --- a/javascript/ql/test/library-tests/frameworks/ReactJS/statePropertyWrites.js +++ b/javascript/ql/test/library-tests/frameworks/ReactJS/statePropertyWrites.js @@ -31,15 +31,15 @@ class Writes extends React.Component { state = { p7: 42 }; -} +} // $ reactComponent React.createClass({ render: function() { - return
    Hello {this.props.name}
    ; + return
    Hello {this.props.name}
    ; // $ threatModelSource=view-component-input }, getInitialState: function() { return { p8: 42 }; } -}); +}); // $ reactComponent diff --git a/javascript/ql/test/library-tests/frameworks/ReactJS/tests.expected b/javascript/ql/test/library-tests/frameworks/ReactJS/tests.expected index 9a5c38ddbf9..9b453989bb8 100644 --- a/javascript/ql/test/library-tests/frameworks/ReactJS/tests.expected +++ b/javascript/ql/test/library-tests/frameworks/ReactJS/tests.expected @@ -1,42 +1,112 @@ -test_react -| es5.js:1:13:1:17 | React | -| es6.js:1:21:1:25 | React | -| es6.js:14:22:14:26 | React | -| globalReactRefs.js:1:1:1:5 | React | -| globalReactRefs.js:4:5:4:9 | React | -| globalReactRefs.js:7:1:7:5 | React | -| importedReactRefs.js:1:8:1:12 | React | -| importedReactRefs.js:3:1:3:5 | React | -| importedReactRefs.js:6:5:6:9 | React | -| importedReactRefs.js:9:1:9:5 | React | -| plainfn.js:6:12:6:16 | React | -| plainfn.js:10:13:10:17 | React | -| plainfn.js:16:16:16:20 | React | -| plainfn.js:22:16:22:20 | React | -| props.js:2:21:2:25 | React | -| props.js:13:13:13:17 | React | -| rare-lifecycle-methods.js:1:17:1:21 | React | -| requiredReactRefs.js:1:13:1:28 | require("react") | -| requiredReactRefs.js:3:1:3:5 | React | -| requiredReactRefs.js:6:5:6:9 | React | -| requiredReactRefs.js:9:1:9:5 | React | -| requiredReactRefs.js:12:17:12:32 | require("react") | -| requiredReactRefs.js:14:5:14:9 | React | -| requiredReactRefs.js:17:9:17:13 | React | -| requiredReactRefs.js:20:5:20:9 | React | -| statePropertyReads.js:1:21:1:25 | React | -| statePropertyWrites.js:1:22:1:26 | React | -| statePropertyWrites.js:36:1:36:5 | React | -| thisAccesses.js:1:17:1:21 | React | -| thisAccesses.js:18:1:18:5 | React | -| thisAccesses.js:38:1:38:5 | React | -| thisAccesses.js:40:9:40:13 | React | -| thisAccesses.js:47:18:47:22 | React | -| thisAccesses.js:54:18:54:22 | React | -| thisAccesses_importedMappers.js:1:8:1:12 | React | -| thisAccesses_importedMappers.js:4:1:4:5 | React | -| thisAccesses_importedMappers.js:6:9:6:13 | React | -test_JSXname +getACandidatePropsValue +| es5.js:8:13:8:19 | 'world' | +| importedComponent.jsx:4:32:4:36 | color | +| props.js:5:46:5:67 | "propFr ... tProps" | +| props.js:7:22:7:34 | "propFromJSX" | +| props.js:9:33:9:53 | "propFr ... ructor" | +| props.js:15:44:15:65 | "propFr ... tProps" | +| props.js:19:22:19:34 | "propFromJSX" | +| props.js:21:29:21:49 | "propFr ... ructor" | +| props.js:30:46:30:67 | "propFr ... tProps" | +| props.js:32:22:32:34 | "propFromJSX" | +| props.js:34:33:34:53 | "propFr ... ructor" | +| useHigherOrderComponent.jsx:5:33:5:37 | "red" | +| useHigherOrderComponent.jsx:11:39:11:44 | "lazy" | +| useHigherOrderComponent.jsx:17:40:17:46 | "lazy2" | +getACandidateStateSource +| es6.js:14:1:20:1 | class H ... }\\n} | es6.js:18:22:18:31 | { baz: 42} | +| rare-lifecycle-methods.js:1:1:11:1 | class C ... }\\n} | rare-lifecycle-methods.js:3:16:3:17 | {} | +| rare-lifecycle-methods.js:1:1:11:1 | class C ... }\\n} | rare-lifecycle-methods.js:5:38:5:46 | nextState | +| statePropertyReads.js:1:1:13:1 | class R ... }\\n} | statePropertyReads.js:7:45:7:56 | prevState.p3 | +| statePropertyWrites.js:1:1:34:1 | class W ... };\\n} | statePropertyWrites.js:8:18:8:19 | {} | +| statePropertyWrites.js:1:1:34:1 | class W ... };\\n} | statePropertyWrites.js:12:18:12:19 | {} | +| statePropertyWrites.js:1:1:34:1 | class W ... };\\n} | statePropertyWrites.js:16:18:16:19 | {} | +| statePropertyWrites.js:1:1:34:1 | class W ... };\\n} | statePropertyWrites.js:20:18:20:19 | {} | +| statePropertyWrites.js:1:1:34:1 | class W ... };\\n} | statePropertyWrites.js:31:13:33:5 | {\\n ... 2\\n } | +| statePropertyWrites.js:36:19:45:1 | {\\n ren ... ;\\n }\\n} | statePropertyWrites.js:41:12:43:5 | {\\n p8: 42\\n } | +| thisAccesses.js:47:1:52:1 | class C ... }\\n} | thisAccesses.js:48:18:48:18 | y | +| thisAccesses.js:47:1:52:1 | class C ... }\\n} | thisAccesses.js:49:22:49:22 | x | +getADirectPropsSource +| es5.js:1:31:11:1 | {\\n dis ... ;\\n }\\n} | es5.js:4:24:4:33 | this.props | +| es5.js:18:33:22:1 | {\\n ren ... t\\n }\\n} | es5.js:20:24:20:33 | this.props | +| es6.js:1:1:8:1 | class H ... ;\\n }\\n} | es6.js:1:37:1:36 | args | +| es6.js:1:1:8:1 | class H ... ;\\n }\\n} | es6.js:3:24:3:33 | this.props | +| exportedComponent.jsx:1:8:3:1 | functio ... r}}/>\\n} | exportedComponent.jsx:1:29:1:33 | props | +| importedComponent.jsx:3:8:5:1 | functio ... Value\\n} | importedComponent.jsx:3:24:3:40 | {color, location} | +| namedImport.js:3:1:3:28 | class C ... nent {} | namedImport.js:3:27:3:26 | args | +| namedImport.js:5:1:5:20 | class D extends C {} | namedImport.js:5:19:5:18 | args | +| plainfn.js:1:1:3:1 | functio ... div>;\\n} | plainfn.js:1:16:1:20 | props | +| plainfn.js:5:1:7:1 | functio ... iv");\\n} | plainfn.js:5:17:5:21 | props | +| plainfn.js:9:1:12:1 | functio ... rn x;\\n} | plainfn.js:9:17:9:21 | props | +| plainfn.js:20:1:24:1 | functio ... n 42;\\n} | plainfn.js:20:28:20:32 | props | +| preact.js:1:1:7:1 | class H ... }\\n} | preact.js:1:38:1:37 | args | +| preact.js:1:1:7:1 | class H ... }\\n} | preact.js:2:12:2:16 | props | +| preact.js:9:1:11:1 | class H ... nput\\n\\n} | preact.js:9:38:9:37 | args | +| probably-a-component.js:1:1:6:1 | class H ... }\\n} | probably-a-component.js:1:31:1:30 | args | +| probably-a-component.js:1:1:6:1 | class H ... }\\n} | probably-a-component.js:3:9:3:18 | this.props | +| props.js:2:5:3:5 | class C ... t\\n } | props.js:2:37:2:36 | args | +| props.js:26:5:28:5 | functio ... ;\\n } | props.js:26:16:26:20 | props | +| rare-lifecycle-methods.js:1:1:11:1 | class C ... }\\n} | rare-lifecycle-methods.js:1:33:1:32 | args | +| statePropertyWrites.js:36:19:45:1 | {\\n ren ... ;\\n }\\n} | statePropertyWrites.js:38:24:38:33 | this.props | +| thisAccesses.js:31:2:36:1 | functio ... iv/>;\\n} | thisAccesses.js:31:12:31:16 | props | +| thisAccesses.js:47:1:52:1 | class C ... }\\n} | thisAccesses.js:48:18:48:18 | y | +getADirectStateAccess +| es6.js:14:1:20:1 | class H ... }\\n} | es6.js:16:9:16:18 | this.state | +| es6.js:14:1:20:1 | class H ... }\\n} | es6.js:17:9:17:18 | this.state | +| es6.js:14:1:20:1 | class H ... }\\n} | es6.js:18:9:18:18 | this.state | +| preact.js:1:1:7:1 | class H ... }\\n} | preact.js:2:19:2:23 | state | +| statePropertyReads.js:1:1:13:1 | class R ... }\\n} | statePropertyReads.js:3:9:3:18 | this.state | +| statePropertyReads.js:1:1:13:1 | class R ... }\\n} | statePropertyReads.js:5:9:5:18 | this.state | +| statePropertyWrites.js:1:1:34:1 | class W ... };\\n} | statePropertyWrites.js:4:9:4:17 | cmp.state | +| statePropertyWrites.js:1:1:34:1 | class W ... };\\n} | statePropertyWrites.js:6:9:6:17 | cmp.state | +| statePropertyWrites.js:1:1:34:1 | class W ... };\\n} | statePropertyWrites.js:10:9:10:17 | cmp.state | +| thisAccesses.js:47:1:52:1 | class C ... }\\n} | thisAccesses.js:49:9:49:18 | this.state | +| thisAccesses.js:47:1:52:1 | class C ... }\\n} | thisAccesses.js:50:9:50:18 | this.state | +getAPreviousStateSource +| rare-lifecycle-methods.js:1:1:11:1 | class C ... }\\n} | rare-lifecycle-methods.js:2:44:2:48 | state | +| rare-lifecycle-methods.js:1:1:11:1 | class C ... }\\n} | rare-lifecycle-methods.js:8:40:8:48 | prevState | +| statePropertyReads.js:1:1:13:1 | class R ... }\\n} | statePropertyReads.js:7:24:7:32 | prevState | +| statePropertyReads.js:1:1:13:1 | class R ... }\\n} | statePropertyReads.js:10:35:10:43 | prevState | +getAPropRead +| es5.js:1:31:11:1 | {\\n dis ... ;\\n }\\n} | name | es5.js:4:24:4:38 | this.props.name | +| es5.js:18:33:22:1 | {\\n ren ... t\\n }\\n} | name | es5.js:20:24:20:38 | this.props.name | +| es6.js:1:1:8:1 | class H ... ;\\n }\\n} | name | es6.js:3:24:3:38 | this.props.name | +| exportedComponent.jsx:1:8:3:1 | functio ... r}}/>\\n} | color | exportedComponent.jsx:2:32:2:42 | props.color | +| importedComponent.jsx:3:8:5:1 | functio ... Value\\n} | color | importedComponent.jsx:3:25:3:29 | color | +| importedComponent.jsx:3:8:5:1 | functio ... Value\\n} | location | importedComponent.jsx:3:32:3:39 | location | +| plainfn.js:1:1:3:1 | functio ... div>;\\n} | name | plainfn.js:2:22:2:31 | props.name | +| preact.js:1:1:7:1 | class H ... }\\n} | name | preact.js:3:9:3:18 | props.name | +| probably-a-component.js:1:1:6:1 | class H ... }\\n} | name | probably-a-component.js:3:9:3:23 | this.props.name | +| statePropertyWrites.js:36:19:45:1 | {\\n ren ... ;\\n }\\n} | name | statePropertyWrites.js:38:24:38:38 | this.props.name | +getInstanceMethod +| es5.js:1:31:11:1 | {\\n dis ... ;\\n }\\n} | getDefaultProps | es5.js:6:20:10:3 | functio ... };\\n } | +| es5.js:1:31:11:1 | {\\n dis ... ;\\n }\\n} | render | es5.js:3:11:5:3 | functio ... put\\n } | +| es5.js:18:33:22:1 | {\\n ren ... t\\n }\\n} | render | es5.js:19:11:21:3 | functio ... put\\n } | +| es6.js:1:1:8:1 | class H ... ;\\n }\\n} | render | es6.js:2:9:4:3 | () {\\n ... put\\n } | +| exportedComponent.jsx:1:8:3:1 | functio ... r}}/>\\n} | render | exportedComponent.jsx:1:8:3:1 | functio ... r}}/>\\n} | +| importedComponent.jsx:3:8:5:1 | functio ... Value\\n} | render | importedComponent.jsx:3:8:5:1 | functio ... Value\\n} | +| plainfn.js:1:1:3:1 | functio ... div>;\\n} | render | plainfn.js:1:1:3:1 | functio ... div>;\\n} | +| plainfn.js:5:1:7:1 | functio ... iv");\\n} | render | plainfn.js:5:1:7:1 | functio ... iv");\\n} | +| plainfn.js:9:1:12:1 | functio ... rn x;\\n} | render | plainfn.js:9:1:12:1 | functio ... rn x;\\n} | +| plainfn.js:20:1:24:1 | functio ... n 42;\\n} | render | plainfn.js:20:1:24:1 | functio ... n 42;\\n} | +| preact.js:1:1:7:1 | class H ... }\\n} | render | preact.js:2:11:6:5 | (props, ... ;\\n } | +| probably-a-component.js:1:1:6:1 | class H ... }\\n} | render | probably-a-component.js:2:11:5:5 | () {\\n ... ;\\n } | +| props.js:13:31:17:5 | {\\n ... }\\n } | getDefaultProps | props.js:14:24:16:9 | () {\\n ... } | +| props.js:26:5:28:5 | functio ... ;\\n } | render | props.js:26:5:28:5 | functio ... ;\\n } | +| rare-lifecycle-methods.js:1:1:11:1 | class C ... }\\n} | getSnapshotBeforeUpdate | rare-lifecycle-methods.js:8:28:10:5 | (prevPr ... ;\\n } | +| rare-lifecycle-methods.js:1:1:11:1 | class C ... }\\n} | shouldComponentUpdate | rare-lifecycle-methods.js:5:26:7:5 | (nextPr ... ;\\n } | +| statePropertyReads.js:1:1:13:1 | class R ... }\\n} | componentDidUpdate | statePropertyReads.js:10:23:12:5 | (prevPr ... ;\\n } | +| statePropertyWrites.js:1:1:34:1 | class W ... };\\n} | getInitialState | statePropertyWrites.js:25:20:29:5 | () { // ... ;\\n } | +| statePropertyWrites.js:36:19:45:1 | {\\n ren ... ;\\n }\\n} | getInitialState | statePropertyWrites.js:40:20:44:3 | functio ... };\\n } | +| statePropertyWrites.js:36:19:45:1 | {\\n ren ... ;\\n }\\n} | render | statePropertyWrites.js:37:11:39:3 | functio ... put\\n } | +| thisAccesses.js:1:1:16:1 | class C ... }\\n} | someInstanceMethod | thisAccesses.js:13:23:15:5 | () {\\n ... ;\\n } | +| thisAccesses.js:18:19:29:1 | {\\n r ... }\\n} | render | thisAccesses.js:19:13:24:5 | functio ... ;\\n } | +| thisAccesses.js:18:19:29:1 | {\\n r ... }\\n} | someInstanceMethod | thisAccesses.js:26:25:28:5 | functio ... ;\\n } | +| thisAccesses.js:31:2:36:1 | functio ... iv/>;\\n} | render | thisAccesses.js:31:2:36:1 | functio ... iv/>;\\n} | +| thisAccesses.js:38:19:45:1 | {\\n r ... },\\n} | render | thisAccesses.js:39:13:44:5 | functio ... ;\\n } | +| thisAccesses.js:54:1:63:1 | class C ... }\\n} | render | thisAccesses.js:59:11:62:5 | () {\\n ... ;\\n } | +| thisAccesses_importedMappers.js:4:19:15:1 | {\\n r ... },\\n} | render | thisAccesses_importedMappers.js:5:13:14:5 | functio ... ;\\n } | +jsxName | es5.js:4:12:4:45 |
    He ... }
    | es5.js:4:13:4:15 | div | div | Identifier | | es5.js:20:12:20:44 |

    Hel ... e}

    | es5.js:20:13:20:14 | h1 | h1 | Identifier | | es6.js:3:12:3:45 |
    He ... }
    | es6.js:3:13:3:15 | div | div | Identifier | @@ -62,13 +132,22 @@ test_JSXname | useHigherOrderComponent.jsx:5:12:5:39 | | useHigherOrderComponent.jsx:5:13:5:25 | SomeComponent | SomeComponent | Identifier | | useHigherOrderComponent.jsx:11:12:11:46 | | useHigherOrderComponent.jsx:11:13:11:31 | LazyLoadedComponent | LazyLoadedComponent | Identifier | | useHigherOrderComponent.jsx:17:12:17:48 | | useHigherOrderComponent.jsx:17:13:17:32 | LazyLoadedComponent2 | LazyLoadedComponent2 | Identifier | -test_ReactComponent +jsxNameThis +| es5.js:4:12:4:45 |
    He ... }
    | es5.js:4:24:4:27 | this | +| es5.js:20:12:20:44 |

    Hel ... e}

    | es5.js:20:24:20:27 | this | +| es6.js:3:12:3:45 |
    He ... }
    | es6.js:3:24:3:27 | this | +| statePropertyWrites.js:38:12:38:45 |
    He ... }
    | statePropertyWrites.js:38:24:38:27 | this | +| thisAccesses.js:60:19:60:41 | | thisAccesses.js:60:20:60:23 | this | +| thisAccesses.js:61:19:61:41 | | thisAccesses.js:61:20:61:23 | this | +locationSource +| importedComponent.jsx:3:32:3:39 | location | +reactComponent | es5.js:1:31:11:1 | {\\n dis ... ;\\n }\\n} | -| es5.js:18:33:22:1 | {\\n ren ... ;\\n }\\n} | +| es5.js:18:33:22:1 | {\\n ren ... t\\n }\\n} | | es6.js:1:1:8:1 | class H ... ;\\n }\\n} | | es6.js:14:1:20:1 | class H ... }\\n} | | exportedComponent.jsx:1:8:3:1 | functio ... r}}/>\\n} | -| importedComponent.jsx:3:8:5:1 | functio ... or}/>\\n} | +| importedComponent.jsx:3:8:5:1 | functio ... Value\\n} | | namedImport.js:3:1:3:28 | class C ... nent {} | | namedImport.js:5:1:5:20 | class D extends C {} | | plainfn.js:1:1:3:1 | functio ... div>;\\n} | @@ -76,9 +155,9 @@ test_ReactComponent | plainfn.js:9:1:12:1 | functio ... rn x;\\n} | | plainfn.js:20:1:24:1 | functio ... n 42;\\n} | | preact.js:1:1:7:1 | class H ... }\\n} | -| preact.js:9:1:11:1 | class H ... nt {\\n\\n} | +| preact.js:9:1:11:1 | class H ... nput\\n\\n} | | probably-a-component.js:1:1:6:1 | class H ... }\\n} | -| props.js:2:5:3:5 | class C ... {\\n } | +| props.js:2:5:3:5 | class C ... t\\n } | | props.js:13:31:17:5 | {\\n ... }\\n } | | props.js:26:5:28:5 | functio ... ;\\n } | | rare-lifecycle-methods.js:1:1:11:1 | class C ... }\\n} | @@ -92,14 +171,14 @@ test_ReactComponent | thisAccesses.js:47:1:52:1 | class C ... }\\n} | | thisAccesses.js:54:1:63:1 | class C ... }\\n} | | thisAccesses_importedMappers.js:4:19:15:1 | {\\n r ... },\\n} | -test_ReactComponent_ref +reactComponentRef | es5.js:1:31:11:1 | {\\n dis ... ;\\n }\\n} | es5.js:1:31:11:1 | {\\n dis ... ;\\n }\\n} | | es5.js:1:31:11:1 | {\\n dis ... ;\\n }\\n} | es5.js:3:11:3:10 | this | | es5.js:1:31:11:1 | {\\n dis ... ;\\n }\\n} | es5.js:4:24:4:27 | this | | es5.js:1:31:11:1 | {\\n dis ... ;\\n }\\n} | es5.js:6:20:6:19 | this | -| es5.js:18:33:22:1 | {\\n ren ... ;\\n }\\n} | es5.js:18:33:22:1 | {\\n ren ... ;\\n }\\n} | -| es5.js:18:33:22:1 | {\\n ren ... ;\\n }\\n} | es5.js:19:11:19:10 | this | -| es5.js:18:33:22:1 | {\\n ren ... ;\\n }\\n} | es5.js:20:24:20:27 | this | +| es5.js:18:33:22:1 | {\\n ren ... t\\n }\\n} | es5.js:18:33:22:1 | {\\n ren ... t\\n }\\n} | +| es5.js:18:33:22:1 | {\\n ren ... t\\n }\\n} | es5.js:19:11:19:10 | this | +| es5.js:18:33:22:1 | {\\n ren ... t\\n }\\n} | es5.js:20:24:20:27 | this | | es6.js:1:1:8:1 | class H ... ;\\n }\\n} | es6.js:1:37:1:36 | implicit 'this' | | es6.js:1:1:8:1 | class H ... ;\\n }\\n} | es6.js:1:37:1:36 | this | | es6.js:1:1:8:1 | class H ... ;\\n }\\n} | es6.js:2:9:2:8 | this | @@ -110,7 +189,7 @@ test_ReactComponent_ref | es6.js:14:1:20:1 | class H ... }\\n} | es6.js:17:9:17:12 | this | | es6.js:14:1:20:1 | class H ... }\\n} | es6.js:18:9:18:12 | this | | exportedComponent.jsx:1:8:3:1 | functio ... r}}/>\\n} | exportedComponent.jsx:1:8:1:7 | this | -| importedComponent.jsx:3:8:5:1 | functio ... or}/>\\n} | importedComponent.jsx:3:8:3:7 | this | +| importedComponent.jsx:3:8:5:1 | functio ... Value\\n} | importedComponent.jsx:3:8:3:7 | this | | namedImport.js:3:1:3:28 | class C ... nent {} | namedImport.js:3:27:3:26 | implicit 'this' | | namedImport.js:3:1:3:28 | class C ... nent {} | namedImport.js:3:27:3:26 | this | | namedImport.js:5:1:5:20 | class D extends C {} | namedImport.js:5:19:5:18 | implicit 'this' | @@ -122,15 +201,15 @@ test_ReactComponent_ref | preact.js:1:1:7:1 | class H ... }\\n} | preact.js:1:38:1:37 | implicit 'this' | | preact.js:1:1:7:1 | class H ... }\\n} | preact.js:1:38:1:37 | this | | preact.js:1:1:7:1 | class H ... }\\n} | preact.js:2:11:2:10 | this | -| preact.js:9:1:11:1 | class H ... nt {\\n\\n} | preact.js:9:38:9:37 | implicit 'this' | -| preact.js:9:1:11:1 | class H ... nt {\\n\\n} | preact.js:9:38:9:37 | this | +| preact.js:9:1:11:1 | class H ... nput\\n\\n} | preact.js:9:38:9:37 | implicit 'this' | +| preact.js:9:1:11:1 | class H ... nput\\n\\n} | preact.js:9:38:9:37 | this | | probably-a-component.js:1:1:6:1 | class H ... }\\n} | probably-a-component.js:1:31:1:30 | implicit 'this' | | probably-a-component.js:1:1:6:1 | class H ... }\\n} | probably-a-component.js:1:31:1:30 | this | | probably-a-component.js:1:1:6:1 | class H ... }\\n} | probably-a-component.js:2:11:2:10 | this | | probably-a-component.js:1:1:6:1 | class H ... }\\n} | probably-a-component.js:3:9:3:12 | this | -| props.js:2:5:3:5 | class C ... {\\n } | props.js:2:37:2:36 | implicit 'this' | -| props.js:2:5:3:5 | class C ... {\\n } | props.js:2:37:2:36 | this | -| props.js:2:5:3:5 | class C ... {\\n } | props.js:9:5:9:55 | new C({ ... ctor"}) | +| props.js:2:5:3:5 | class C ... t\\n } | props.js:2:37:2:36 | implicit 'this' | +| props.js:2:5:3:5 | class C ... t\\n } | props.js:2:37:2:36 | this | +| props.js:2:5:3:5 | class C ... t\\n } | props.js:9:5:9:55 | new C({ ... ctor"}) | | props.js:13:31:17:5 | {\\n ... }\\n } | props.js:13:31:17:5 | {\\n ... }\\n } | | props.js:13:31:17:5 | {\\n ... }\\n } | props.js:14:24:14:23 | this | | props.js:26:5:28:5 | functio ... ;\\n } | props.js:26:5:26:4 | this | @@ -201,123 +280,6 @@ test_ReactComponent_ref | thisAccesses_importedMappers.js:4:19:15:1 | {\\n r ... },\\n} | thisAccesses_importedMappers.js:9:25:9:24 | this | | thisAccesses_importedMappers.js:4:19:15:1 | {\\n r ... },\\n} | thisAccesses_importedMappers.js:10:13:10:16 | this | | thisAccesses_importedMappers.js:4:19:15:1 | {\\n r ... },\\n} | thisAccesses_importedMappers.js:11:12:11:15 | this | -test_getADirectStateAccess -| es6.js:14:1:20:1 | class H ... }\\n} | es6.js:16:9:16:18 | this.state | -| es6.js:14:1:20:1 | class H ... }\\n} | es6.js:17:9:17:18 | this.state | -| es6.js:14:1:20:1 | class H ... }\\n} | es6.js:18:9:18:18 | this.state | -| preact.js:1:1:7:1 | class H ... }\\n} | preact.js:2:19:2:23 | state | -| statePropertyReads.js:1:1:13:1 | class R ... }\\n} | statePropertyReads.js:3:9:3:18 | this.state | -| statePropertyReads.js:1:1:13:1 | class R ... }\\n} | statePropertyReads.js:5:9:5:18 | this.state | -| statePropertyWrites.js:1:1:34:1 | class W ... };\\n} | statePropertyWrites.js:4:9:4:17 | cmp.state | -| statePropertyWrites.js:1:1:34:1 | class W ... };\\n} | statePropertyWrites.js:6:9:6:17 | cmp.state | -| statePropertyWrites.js:1:1:34:1 | class W ... };\\n} | statePropertyWrites.js:10:9:10:17 | cmp.state | -| thisAccesses.js:47:1:52:1 | class C ... }\\n} | thisAccesses.js:49:9:49:18 | this.state | -| thisAccesses.js:47:1:52:1 | class C ... }\\n} | thisAccesses.js:50:9:50:18 | this.state | -test_ReactComponent_getAPropRead -| es5.js:1:31:11:1 | {\\n dis ... ;\\n }\\n} | name | es5.js:4:24:4:38 | this.props.name | -| es5.js:18:33:22:1 | {\\n ren ... ;\\n }\\n} | name | es5.js:20:24:20:38 | this.props.name | -| es6.js:1:1:8:1 | class H ... ;\\n }\\n} | name | es6.js:3:24:3:38 | this.props.name | -| exportedComponent.jsx:1:8:3:1 | functio ... r}}/>\\n} | color | exportedComponent.jsx:2:32:2:42 | props.color | -| importedComponent.jsx:3:8:5:1 | functio ... or}/>\\n} | color | importedComponent.jsx:3:25:3:29 | color | -| importedComponent.jsx:3:8:5:1 | functio ... or}/>\\n} | location | importedComponent.jsx:3:32:3:39 | location | -| plainfn.js:1:1:3:1 | functio ... div>;\\n} | name | plainfn.js:2:22:2:31 | props.name | -| preact.js:1:1:7:1 | class H ... }\\n} | name | preact.js:3:9:3:18 | props.name | -| probably-a-component.js:1:1:6:1 | class H ... }\\n} | name | probably-a-component.js:3:9:3:23 | this.props.name | -| statePropertyWrites.js:36:19:45:1 | {\\n ren ... ;\\n }\\n} | name | statePropertyWrites.js:38:24:38:38 | this.props.name | -test_ReactComponent_getInstanceMethod -| es5.js:1:31:11:1 | {\\n dis ... ;\\n }\\n} | getDefaultProps | es5.js:6:20:10:3 | functio ... };\\n } | -| es5.js:1:31:11:1 | {\\n dis ... ;\\n }\\n} | render | es5.js:3:11:5:3 | functio ... v>;\\n } | -| es5.js:18:33:22:1 | {\\n ren ... ;\\n }\\n} | render | es5.js:19:11:21:3 | functio ... 1>;\\n } | -| es6.js:1:1:8:1 | class H ... ;\\n }\\n} | render | es6.js:2:9:4:3 | () {\\n ... v>;\\n } | -| exportedComponent.jsx:1:8:3:1 | functio ... r}}/>\\n} | render | exportedComponent.jsx:1:8:3:1 | functio ... r}}/>\\n} | -| importedComponent.jsx:3:8:5:1 | functio ... or}/>\\n} | render | importedComponent.jsx:3:8:5:1 | functio ... or}/>\\n} | -| plainfn.js:1:1:3:1 | functio ... div>;\\n} | render | plainfn.js:1:1:3:1 | functio ... div>;\\n} | -| plainfn.js:5:1:7:1 | functio ... iv");\\n} | render | plainfn.js:5:1:7:1 | functio ... iv");\\n} | -| plainfn.js:9:1:12:1 | functio ... rn x;\\n} | render | plainfn.js:9:1:12:1 | functio ... rn x;\\n} | -| plainfn.js:20:1:24:1 | functio ... n 42;\\n} | render | plainfn.js:20:1:24:1 | functio ... n 42;\\n} | -| preact.js:1:1:7:1 | class H ... }\\n} | render | preact.js:2:11:6:5 | (props, ... ;\\n } | -| probably-a-component.js:1:1:6:1 | class H ... }\\n} | render | probably-a-component.js:2:11:5:5 | () {\\n ... ;\\n } | -| props.js:13:31:17:5 | {\\n ... }\\n } | getDefaultProps | props.js:14:24:16:9 | () {\\n ... } | -| props.js:26:5:28:5 | functio ... ;\\n } | render | props.js:26:5:28:5 | functio ... ;\\n } | -| rare-lifecycle-methods.js:1:1:11:1 | class C ... }\\n} | getSnapshotBeforeUpdate | rare-lifecycle-methods.js:8:28:10:5 | (prevPr ... ;\\n } | -| rare-lifecycle-methods.js:1:1:11:1 | class C ... }\\n} | shouldComponentUpdate | rare-lifecycle-methods.js:5:26:7:5 | (nextPr ... ;\\n } | -| statePropertyReads.js:1:1:13:1 | class R ... }\\n} | componentDidUpdate | statePropertyReads.js:10:23:12:5 | (prevPr ... ;\\n } | -| statePropertyWrites.js:1:1:34:1 | class W ... };\\n} | getInitialState | statePropertyWrites.js:25:20:29:5 | () { // ... ;\\n } | -| statePropertyWrites.js:36:19:45:1 | {\\n ren ... ;\\n }\\n} | getInitialState | statePropertyWrites.js:40:20:44:3 | functio ... };\\n } | -| statePropertyWrites.js:36:19:45:1 | {\\n ren ... ;\\n }\\n} | render | statePropertyWrites.js:37:11:39:3 | functio ... v>;\\n } | -| thisAccesses.js:1:1:16:1 | class C ... }\\n} | someInstanceMethod | thisAccesses.js:13:23:15:5 | () {\\n ... ;\\n } | -| thisAccesses.js:18:19:29:1 | {\\n r ... }\\n} | render | thisAccesses.js:19:13:24:5 | functio ... ;\\n } | -| thisAccesses.js:18:19:29:1 | {\\n r ... }\\n} | someInstanceMethod | thisAccesses.js:26:25:28:5 | functio ... ;\\n } | -| thisAccesses.js:31:2:36:1 | functio ... iv/>;\\n} | render | thisAccesses.js:31:2:36:1 | functio ... iv/>;\\n} | -| thisAccesses.js:38:19:45:1 | {\\n r ... },\\n} | render | thisAccesses.js:39:13:44:5 | functio ... ;\\n } | -| thisAccesses.js:54:1:63:1 | class C ... }\\n} | render | thisAccesses.js:59:11:62:5 | () {\\n ... ;\\n } | -| thisAccesses_importedMappers.js:4:19:15:1 | {\\n r ... },\\n} | render | thisAccesses_importedMappers.js:5:13:14:5 | functio ... ;\\n } | -test_ReactComponent_getADirectPropsSource -| es5.js:1:31:11:1 | {\\n dis ... ;\\n }\\n} | es5.js:4:24:4:33 | this.props | -| es5.js:18:33:22:1 | {\\n ren ... ;\\n }\\n} | es5.js:20:24:20:33 | this.props | -| es6.js:1:1:8:1 | class H ... ;\\n }\\n} | es6.js:1:37:1:36 | args | -| es6.js:1:1:8:1 | class H ... ;\\n }\\n} | es6.js:3:24:3:33 | this.props | -| exportedComponent.jsx:1:8:3:1 | functio ... r}}/>\\n} | exportedComponent.jsx:1:29:1:33 | props | -| importedComponent.jsx:3:8:5:1 | functio ... or}/>\\n} | importedComponent.jsx:3:24:3:40 | {color, location} | -| namedImport.js:3:1:3:28 | class C ... nent {} | namedImport.js:3:27:3:26 | args | -| namedImport.js:5:1:5:20 | class D extends C {} | namedImport.js:5:19:5:18 | args | -| plainfn.js:1:1:3:1 | functio ... div>;\\n} | plainfn.js:1:16:1:20 | props | -| plainfn.js:5:1:7:1 | functio ... iv");\\n} | plainfn.js:5:17:5:21 | props | -| plainfn.js:9:1:12:1 | functio ... rn x;\\n} | plainfn.js:9:17:9:21 | props | -| plainfn.js:20:1:24:1 | functio ... n 42;\\n} | plainfn.js:20:28:20:32 | props | -| preact.js:1:1:7:1 | class H ... }\\n} | preact.js:1:38:1:37 | args | -| preact.js:1:1:7:1 | class H ... }\\n} | preact.js:2:12:2:16 | props | -| preact.js:9:1:11:1 | class H ... nt {\\n\\n} | preact.js:9:38:9:37 | args | -| probably-a-component.js:1:1:6:1 | class H ... }\\n} | probably-a-component.js:1:31:1:30 | args | -| probably-a-component.js:1:1:6:1 | class H ... }\\n} | probably-a-component.js:3:9:3:18 | this.props | -| props.js:2:5:3:5 | class C ... {\\n } | props.js:2:37:2:36 | args | -| props.js:26:5:28:5 | functio ... ;\\n } | props.js:26:16:26:20 | props | -| rare-lifecycle-methods.js:1:1:11:1 | class C ... }\\n} | rare-lifecycle-methods.js:1:33:1:32 | args | -| statePropertyWrites.js:36:19:45:1 | {\\n ren ... ;\\n }\\n} | statePropertyWrites.js:38:24:38:33 | this.props | -| thisAccesses.js:31:2:36:1 | functio ... iv/>;\\n} | thisAccesses.js:31:12:31:16 | props | -| thisAccesses.js:47:1:52:1 | class C ... }\\n} | thisAccesses.js:48:18:48:18 | y | -test_ReactComponent_getACandidatePropsValue -| es5.js:8:13:8:19 | 'world' | -| importedComponent.jsx:4:32:4:36 | color | -| props.js:5:46:5:67 | "propFr ... tProps" | -| props.js:7:22:7:34 | "propFromJSX" | -| props.js:9:33:9:53 | "propFr ... ructor" | -| props.js:15:44:15:65 | "propFr ... tProps" | -| props.js:19:22:19:34 | "propFromJSX" | -| props.js:21:29:21:49 | "propFr ... ructor" | -| props.js:30:46:30:67 | "propFr ... tProps" | -| props.js:32:22:32:34 | "propFromJSX" | -| props.js:34:33:34:53 | "propFr ... ructor" | -| useHigherOrderComponent.jsx:5:33:5:37 | "red" | -| useHigherOrderComponent.jsx:11:39:11:44 | "lazy" | -| useHigherOrderComponent.jsx:17:40:17:46 | "lazy2" | -test_ReactComponent_getAPreviousStateSource -| rare-lifecycle-methods.js:1:1:11:1 | class C ... }\\n} | rare-lifecycle-methods.js:2:44:2:48 | state | -| rare-lifecycle-methods.js:1:1:11:1 | class C ... }\\n} | rare-lifecycle-methods.js:8:40:8:48 | prevState | -| statePropertyReads.js:1:1:13:1 | class R ... }\\n} | statePropertyReads.js:7:24:7:32 | prevState | -| statePropertyReads.js:1:1:13:1 | class R ... }\\n} | statePropertyReads.js:10:35:10:43 | prevState | -test_ReactComponent_getACandidateStateSource -| es6.js:14:1:20:1 | class H ... }\\n} | es6.js:18:22:18:31 | { baz: 42} | -| rare-lifecycle-methods.js:1:1:11:1 | class C ... }\\n} | rare-lifecycle-methods.js:3:16:3:17 | {} | -| rare-lifecycle-methods.js:1:1:11:1 | class C ... }\\n} | rare-lifecycle-methods.js:5:38:5:46 | nextState | -| statePropertyReads.js:1:1:13:1 | class R ... }\\n} | statePropertyReads.js:7:45:7:56 | prevState.p3 | -| statePropertyWrites.js:1:1:34:1 | class W ... };\\n} | statePropertyWrites.js:8:18:8:19 | {} | -| statePropertyWrites.js:1:1:34:1 | class W ... };\\n} | statePropertyWrites.js:12:18:12:19 | {} | -| statePropertyWrites.js:1:1:34:1 | class W ... };\\n} | statePropertyWrites.js:16:18:16:19 | {} | -| statePropertyWrites.js:1:1:34:1 | class W ... };\\n} | statePropertyWrites.js:20:18:20:19 | {} | -| statePropertyWrites.js:1:1:34:1 | class W ... };\\n} | statePropertyWrites.js:31:13:33:5 | {\\n ... 2\\n } | -| statePropertyWrites.js:36:19:45:1 | {\\n ren ... ;\\n }\\n} | statePropertyWrites.js:41:12:43:5 | {\\n p8: 42\\n } | -| thisAccesses.js:47:1:52:1 | class C ... }\\n} | thisAccesses.js:48:18:48:18 | y | -| thisAccesses.js:47:1:52:1 | class C ... }\\n} | thisAccesses.js:49:22:49:22 | x | -test_JsxName_this -| es5.js:4:12:4:45 |
    He ... }
    | es5.js:4:24:4:27 | this | -| es5.js:20:12:20:44 |

    Hel ... e}

    | es5.js:20:24:20:27 | this | -| es6.js:3:12:3:45 |
    He ... }
    | es6.js:3:24:3:27 | this | -| statePropertyWrites.js:38:12:38:45 |
    He ... }
    | statePropertyWrites.js:38:24:38:27 | this | -| thisAccesses.js:60:19:60:41 | | thisAccesses.js:60:20:60:23 | this | -| thisAccesses.js:61:19:61:41 | | thisAccesses.js:61:20:61:23 | this | -locationSource -| importedComponent.jsx:3:32:3:39 | location | threatModelSource | es5.js:4:24:4:33 | this.props | view-component-input | | es5.js:20:24:20:33 | this.props | view-component-input | @@ -343,3 +305,7 @@ threatModelSource | statePropertyWrites.js:38:24:38:33 | this.props | view-component-input | | thisAccesses.js:31:12:31:16 | props | view-component-input | | thisAccesses.js:48:18:48:18 | y | view-component-input | +| use-server1.js:2:5:2:5 | x | remote | +| use-server1.js:3:5:3:5 | y | remote | +| use-server2.js:4:5:4:5 | x | remote | +| use-server2.js:5:5:5:5 | y | remote | diff --git a/javascript/ql/test/library-tests/frameworks/ReactJS/tests.ql b/javascript/ql/test/library-tests/frameworks/ReactJS/tests.ql index 4d20306d4ed..6de8091b010 100644 --- a/javascript/ql/test/library-tests/frameworks/ReactJS/tests.ql +++ b/javascript/ql/test/library-tests/frameworks/ReactJS/tests.ql @@ -1,14 +1,53 @@ -import getADirectStateAccess -import ReactComponent_getInstanceMethod -import react -import ReactComponent_getAPreviousStateSource -import ReactComponent_ref -import ReactComponent_getACandidateStateSource -import ReactComponent_getADirectPropsSource -import ReactComponent_getACandidatePropsValue -import ReactComponent -import ReactComponent_getAPropRead -import ReactName +import javascript +import semmle.javascript.frameworks.React + +query predicate getADirectStateAccess(ReactComponent c, DataFlow::SourceNode res) { + res = c.getADirectStateAccess() +} + +query predicate getInstanceMethod(ReactComponent c, string n, Function res) { + res = c.getInstanceMethod(n) +} + +query predicate getAPreviousStateSource(ReactComponent c, DataFlow::SourceNode res) { + res = c.getAPreviousStateSource() +} + +query predicate reactComponentRef(ReactComponent c, DataFlow::Node res) { res = c.ref() } + +query predicate getACandidateStateSource(ReactComponent c, DataFlow::SourceNode res) { + res = c.getACandidateStateSource() +} + +query predicate getADirectPropsSource(ReactComponent c, DataFlow::SourceNode res) { + res = c.getADirectPropsAccess() +} + +query predicate getACandidatePropsValue(DataFlow::Node res) { + exists(ReactComponent c | res = c.getACandidatePropsValue(_)) +} + +query predicate reactComponent(ReactComponent c) { any() } + +query predicate getAPropRead(ReactComponent c, string n, DataFlow::PropRead res) { + res = c.getAPropRead(n) +} + +query predicate jsxName(JsxElement element, JsxName jsxname, string name, string type) { + name = jsxname.getValue() and + ( + jsxname instanceof Identifier and type = "Identifier" + or + jsxname instanceof ThisExpr and type = "thisExpr" + or + jsxname.(DotExpr).getBase() instanceof JsxName and type = "dot" + or + jsxname instanceof JsxQualifiedName and type = "qualifiedName" + ) and + element.getNameExpr() = jsxname +} + +query ThisExpr jsxNameThis(JsxElement element) { result.getParentExpr+() = element } query DataFlow::SourceNode locationSource() { result = DOM::locationSource() } diff --git a/javascript/ql/test/library-tests/frameworks/ReactJS/tests.qlref b/javascript/ql/test/library-tests/frameworks/ReactJS/tests.qlref new file mode 100644 index 00000000000..8581a3f8b74 --- /dev/null +++ b/javascript/ql/test/library-tests/frameworks/ReactJS/tests.qlref @@ -0,0 +1,2 @@ +query: tests.ql +postprocess: utils/test/InlineExpectationsTestQuery.ql diff --git a/javascript/ql/test/library-tests/frameworks/ReactJS/thisAccesses.js b/javascript/ql/test/library-tests/frameworks/ReactJS/thisAccesses.js index b662b7ca53b..c30509974d4 100644 --- a/javascript/ql/test/library-tests/frameworks/ReactJS/thisAccesses.js +++ b/javascript/ql/test/library-tests/frameworks/ReactJS/thisAccesses.js @@ -13,7 +13,7 @@ class C extends React.Component { someInstanceMethod() { this; } -} +} // $ reactComponent React.createClass({ render: function() { @@ -26,14 +26,14 @@ React.createClass({ someInstanceMethod: function() { this; } -}); +}); // $ reactComponent -(function (props) { +(function (props) { // $ threatModelSource=view-component-input (function () { this; props; }).bind(this); return
    ; -}) +}) // $ reactComponent React.createClass({ render: function() { @@ -42,14 +42,14 @@ React.createClass({ }, this) return
    ; }, -}); +}); // $ reactComponent class C2 extends React.Component { - constructor (y) { + constructor (y) { // $ threatModelSource=view-component-input this.state = x; this.state = y; } -} +} // $ reactComponent class C3 extends React.Component { constructor() { @@ -60,4 +60,4 @@ class C3 extends React.Component { var foo = ; var bar = ; } -} +} // $ reactComponent diff --git a/javascript/ql/test/library-tests/frameworks/ReactJS/thisAccesses_importedMappers.js b/javascript/ql/test/library-tests/frameworks/ReactJS/thisAccesses_importedMappers.js index 06e5e1149fd..abbbdd844ed 100644 --- a/javascript/ql/test/library-tests/frameworks/ReactJS/thisAccesses_importedMappers.js +++ b/javascript/ql/test/library-tests/frameworks/ReactJS/thisAccesses_importedMappers.js @@ -12,4 +12,4 @@ React.createClass({ return
    ; }, -}); +}); // $ reactComponent diff --git a/javascript/ql/test/library-tests/frameworks/ReactJS/use-server1.js b/javascript/ql/test/library-tests/frameworks/ReactJS/use-server1.js new file mode 100644 index 00000000000..1625ff23d1c --- /dev/null +++ b/javascript/ql/test/library-tests/frameworks/ReactJS/use-server1.js @@ -0,0 +1,10 @@ +async function getData( + x, // $ threatModelSource=remote + y) { // $ threatModelSource=remote + "use server"; +} + +async function getData2( + x, // should not be remote flow sources (because the function does not have "use server") + y) { +} diff --git a/javascript/ql/test/library-tests/frameworks/ReactJS/use-server2.js b/javascript/ql/test/library-tests/frameworks/ReactJS/use-server2.js new file mode 100644 index 00000000000..fa0bbab0552 --- /dev/null +++ b/javascript/ql/test/library-tests/frameworks/ReactJS/use-server2.js @@ -0,0 +1,11 @@ +"use server"; + +export async function getData( + x, // $ threatModelSource=remote + y) { // $ threatModelSource=remote +} + +async function getData2( + x, // should not be remote flow sources (because the function is not exported) + y) { +} diff --git a/javascript/ql/test/library-tests/frameworks/ReactJS/useHigherOrderComponent.jsx b/javascript/ql/test/library-tests/frameworks/ReactJS/useHigherOrderComponent.jsx index a57c5aa70ba..dba28fd1c6c 100644 --- a/javascript/ql/test/library-tests/frameworks/ReactJS/useHigherOrderComponent.jsx +++ b/javascript/ql/test/library-tests/frameworks/ReactJS/useHigherOrderComponent.jsx @@ -2,17 +2,17 @@ import SomeComponent from './higherOrderComponent'; import { lazy } from 'react'; function foo() { - return + return // $ getACandidatePropsValue } const LazyLoadedComponent = lazy(() => import('./higherOrderComponent')); function bar() { - return + return // $ getACandidatePropsValue } const LazyLoadedComponent2 = lazy(() => import('./exportedComponent').then(m => m.MyComponent)); function barz() { - return + return // $ getACandidatePropsValue } diff --git a/javascript/ql/test/query-tests/Security/CWE-022/TaintedPath/TaintedPath.expected b/javascript/ql/test/query-tests/Security/CWE-022/TaintedPath/TaintedPath.expected index 08bf15800da..2a3e4c18884 100644 --- a/javascript/ql/test/query-tests/Security/CWE-022/TaintedPath/TaintedPath.expected +++ b/javascript/ql/test/query-tests/Security/CWE-022/TaintedPath/TaintedPath.expected @@ -48,6 +48,10 @@ | TaintedPath.js:214:29:214:42 | improperEscape | TaintedPath.js:212:24:212:30 | req.url | TaintedPath.js:214:29:214:42 | improperEscape | This path depends on a $@. | TaintedPath.js:212:24:212:30 | req.url | user-provided value | | TaintedPath.js:216:29:216:43 | improperEscape2 | TaintedPath.js:212:24:212:30 | req.url | TaintedPath.js:216:29:216:43 | improperEscape2 | This path depends on a $@. | TaintedPath.js:212:24:212:30 | req.url | user-provided value | | examples/TaintedPath.js:10:29:10:43 | ROOT + filePath | examples/TaintedPath.js:8:28:8:34 | req.url | examples/TaintedPath.js:10:29:10:43 | ROOT + filePath | This path depends on a $@. | examples/TaintedPath.js:8:28:8:34 | req.url | user-provided value | +| execa.js:9:26:9:33 | filePath | execa.js:6:30:6:36 | req.url | execa.js:9:26:9:33 | filePath | This path depends on a $@. | execa.js:6:30:6:36 | req.url | user-provided value | +| execa.js:12:37:12:44 | filePath | execa.js:6:30:6:36 | req.url | execa.js:12:37:12:44 | filePath | This path depends on a $@. | execa.js:6:30:6:36 | req.url | user-provided value | +| execa.js:15:50:15:57 | filePath | execa.js:6:30:6:36 | req.url | execa.js:15:50:15:57 | filePath | This path depends on a $@. | execa.js:6:30:6:36 | req.url | user-provided value | +| execa.js:18:62:18:69 | filePath | execa.js:6:30:6:36 | req.url | execa.js:18:62:18:69 | filePath | This path depends on a $@. | execa.js:6:30:6:36 | req.url | user-provided value | | express.js:8:20:8:32 | req.query.bar | express.js:8:20:8:32 | req.query.bar | express.js:8:20:8:32 | req.query.bar | This path depends on a $@. | express.js:8:20:8:32 | req.query.bar | user-provided value | | handlebars.js:11:32:11:39 | filePath | handlebars.js:29:46:29:60 | req.params.path | handlebars.js:11:32:11:39 | filePath | This path depends on a $@. | handlebars.js:29:46:29:60 | req.params.path | user-provided value | | handlebars.js:15:25:15:32 | filePath | handlebars.js:43:15:43:29 | req.params.path | handlebars.js:15:25:15:32 | filePath | This path depends on a $@. | handlebars.js:43:15:43:29 | req.params.path | user-provided value | @@ -399,6 +403,15 @@ edges | examples/TaintedPath.js:8:18:8:52 | url.par ... ry.path | examples/TaintedPath.js:8:7:8:52 | filePath | provenance | | | examples/TaintedPath.js:8:28:8:34 | req.url | examples/TaintedPath.js:8:18:8:41 | url.par ... , true) | provenance | Config | | examples/TaintedPath.js:10:36:10:43 | filePath | examples/TaintedPath.js:10:29:10:43 | ROOT + filePath | provenance | Config | +| execa.js:6:9:6:64 | filePath | execa.js:9:26:9:33 | filePath | provenance | | +| execa.js:6:9:6:64 | filePath | execa.js:12:37:12:44 | filePath | provenance | | +| execa.js:6:9:6:64 | filePath | execa.js:15:50:15:57 | filePath | provenance | | +| execa.js:6:9:6:64 | filePath | execa.js:18:62:18:69 | filePath | provenance | | +| execa.js:6:20:6:43 | url.par ... , true) | execa.js:6:20:6:49 | url.par ... ).query | provenance | Config | +| execa.js:6:20:6:49 | url.par ... ).query | execa.js:6:20:6:61 | url.par ... ePath"] | provenance | Config | +| execa.js:6:20:6:61 | url.par ... ePath"] | execa.js:6:20:6:64 | url.par ... th"][0] | provenance | Config | +| execa.js:6:20:6:64 | url.par ... th"][0] | execa.js:6:9:6:64 | filePath | provenance | | +| execa.js:6:30:6:36 | req.url | execa.js:6:20:6:43 | url.par ... , true) | provenance | Config | | handlebars.js:10:51:10:58 | filePath | handlebars.js:11:32:11:39 | filePath | provenance | | | handlebars.js:13:73:13:80 | filePath | handlebars.js:15:25:15:32 | filePath | provenance | | | handlebars.js:29:46:29:60 | req.params.path | handlebars.js:10:51:10:58 | filePath | provenance | | @@ -944,6 +957,16 @@ nodes | examples/TaintedPath.js:8:28:8:34 | req.url | semmle.label | req.url | | examples/TaintedPath.js:10:29:10:43 | ROOT + filePath | semmle.label | ROOT + filePath | | examples/TaintedPath.js:10:36:10:43 | filePath | semmle.label | filePath | +| execa.js:6:9:6:64 | filePath | semmle.label | filePath | +| execa.js:6:20:6:43 | url.par ... , true) | semmle.label | url.par ... , true) | +| execa.js:6:20:6:49 | url.par ... ).query | semmle.label | url.par ... ).query | +| execa.js:6:20:6:61 | url.par ... ePath"] | semmle.label | url.par ... ePath"] | +| execa.js:6:20:6:64 | url.par ... th"][0] | semmle.label | url.par ... th"][0] | +| execa.js:6:30:6:36 | req.url | semmle.label | req.url | +| execa.js:9:26:9:33 | filePath | semmle.label | filePath | +| execa.js:12:37:12:44 | filePath | semmle.label | filePath | +| execa.js:15:50:15:57 | filePath | semmle.label | filePath | +| execa.js:18:62:18:69 | filePath | semmle.label | filePath | | express.js:8:20:8:32 | req.query.bar | semmle.label | req.query.bar | | handlebars.js:10:51:10:58 | filePath | semmle.label | filePath | | handlebars.js:11:32:11:39 | filePath | semmle.label | filePath | diff --git a/javascript/ql/test/experimental/Execa/PathInjection/tests.js b/javascript/ql/test/query-tests/Security/CWE-022/TaintedPath/execa.js similarity index 61% rename from javascript/ql/test/experimental/Execa/PathInjection/tests.js rename to javascript/ql/test/query-tests/Security/CWE-022/TaintedPath/execa.js index 4665b8c8950..8fcfdd42c67 100644 --- a/javascript/ql/test/experimental/Execa/PathInjection/tests.js +++ b/javascript/ql/test/query-tests/Security/CWE-022/TaintedPath/execa.js @@ -3,17 +3,17 @@ import http from 'node:http' import url from 'url' http.createServer(async function (req, res) { - let filePath = url.parse(req.url, true).query["filePath"][0]; + let filePath = url.parse(req.url, true).query["filePath"][0]; // $Source // Piping to stdin from a file - await $({ inputFile: filePath })`cat` // test: PathInjection + await $({ inputFile: filePath })`cat` // $Alert // Piping to stdin from a file - await execa('cat', { inputFile: filePath }); // test: PathInjection + await execa('cat', { inputFile: filePath }); // $Alert // Piping Stdout to file - await execa('echo', ['example3']).pipeStdout(filePath); // test: PathInjection + await execa('echo', ['example3']).pipeStdout(filePath); // $Alert // Piping all of command output to file - await execa('echo', ['example4'], { all: true }).pipeAll(filePath); // test: PathInjection -}); \ No newline at end of file + await execa('echo', ['example4'], { all: true }).pipeAll(filePath); // $Alert +}); diff --git a/javascript/ql/test/query-tests/Security/CWE-078/CommandInjection/CommandInjection.expected b/javascript/ql/test/query-tests/Security/CWE-078/CommandInjection/CommandInjection.expected index b68d40a540d..22394ec4cb8 100644 --- a/javascript/ql/test/query-tests/Security/CWE-078/CommandInjection/CommandInjection.expected +++ b/javascript/ql/test/query-tests/Security/CWE-078/CommandInjection/CommandInjection.expected @@ -24,6 +24,33 @@ | exec-sh2.js:10:12:10:57 | cp.spaw ... ptions) | exec-sh2.js:14:25:14:31 | req.url | exec-sh2.js:10:40:10:46 | command | This command line depends on a $@. | exec-sh2.js:14:25:14:31 | req.url | user-provided value | | exec-sh.js:15:12:15:61 | cp.spaw ... ptions) | exec-sh.js:19:25:19:31 | req.url | exec-sh.js:15:44:15:50 | command | This command line depends on a $@. | exec-sh.js:19:25:19:31 | req.url | user-provided value | | execSeries.js:14:41:14:47 | command | execSeries.js:18:34:18:40 | req.url | execSeries.js:14:41:14:47 | command | This command line depends on a $@. | execSeries.js:18:34:18:40 | req.url | user-provided value | +| execa.js:11:15:11:17 | cmd | execa.js:6:25:6:31 | req.url | execa.js:11:15:11:17 | cmd | This command line depends on a $@. | execa.js:6:25:6:31 | req.url | user-provided value | +| execa.js:13:32:13:34 | cmd | execa.js:6:25:6:31 | req.url | execa.js:13:32:13:34 | cmd | This command line depends on a $@. | execa.js:6:25:6:31 | req.url | user-provided value | +| execa.js:14:31:14:33 | cmd | execa.js:6:25:6:31 | req.url | execa.js:14:31:14:33 | cmd | This command line depends on a $@. | execa.js:6:25:6:31 | req.url | user-provided value | +| execa.js:17:14:17:16 | cmd | execa.js:6:25:6:31 | req.url | execa.js:17:14:17:16 | cmd | This command line depends on a $@. | execa.js:6:25:6:31 | req.url | user-provided value | +| execa.js:19:32:19:34 | cmd | execa.js:6:25:6:31 | req.url | execa.js:19:32:19:34 | cmd | This command line depends on a $@. | execa.js:6:25:6:31 | req.url | user-provided value | +| execa.js:20:33:20:35 | cmd | execa.js:6:25:6:31 | req.url | execa.js:20:33:20:35 | cmd | This command line depends on a $@. | execa.js:6:25:6:31 | req.url | user-provided value | +| execa.js:23:17:23:19 | cmd | execa.js:6:25:6:31 | req.url | execa.js:23:17:23:19 | cmd | This command line depends on a $@. | execa.js:6:25:6:31 | req.url | user-provided value | +| execa.js:24:17:24:19 | cmd | execa.js:6:25:6:31 | req.url | execa.js:24:17:24:19 | cmd | This command line depends on a $@. | execa.js:6:25:6:31 | req.url | user-provided value | +| execa.js:25:17:25:19 | cmd | execa.js:6:25:6:31 | req.url | execa.js:25:17:25:19 | cmd | This command line depends on a $@. | execa.js:6:25:6:31 | req.url | user-provided value | +| execa.js:27:15:27:17 | cmd | execa.js:6:25:6:31 | req.url | execa.js:27:15:27:17 | cmd | This command line depends on a $@. | execa.js:6:25:6:31 | req.url | user-provided value | +| execa.js:28:15:28:17 | cmd | execa.js:6:25:6:31 | req.url | execa.js:28:15:28:17 | cmd | This command line depends on a $@. | execa.js:6:25:6:31 | req.url | user-provided value | +| execa.js:30:24:30:47 | cmd + a ... + arg3 | execa.js:6:25:6:31 | req.url | execa.js:30:24:30:47 | cmd + a ... + arg3 | This command line depends on a $@. | execa.js:6:25:6:31 | req.url | user-provided value | +| execa.js:30:24:30:47 | cmd + a ... + arg3 | execa.js:7:26:7:32 | req.url | execa.js:30:24:30:47 | cmd + a ... + arg3 | This command line depends on a $@. | execa.js:7:26:7:32 | req.url | user-provided value | +| execa.js:30:24:30:47 | cmd + a ... + arg3 | execa.js:8:26:8:32 | req.url | execa.js:30:24:30:47 | cmd + a ... + arg3 | This command line depends on a $@. | execa.js:8:26:8:32 | req.url | user-provided value | +| execa.js:30:24:30:47 | cmd + a ... + arg3 | execa.js:9:26:9:32 | req.url | execa.js:30:24:30:47 | cmd + a ... + arg3 | This command line depends on a $@. | execa.js:9:26:9:32 | req.url | user-provided value | +| execa.js:31:24:31:47 | cmd + a ... + arg3 | execa.js:6:25:6:31 | req.url | execa.js:31:24:31:47 | cmd + a ... + arg3 | This command line depends on a $@. | execa.js:6:25:6:31 | req.url | user-provided value | +| execa.js:31:24:31:47 | cmd + a ... + arg3 | execa.js:7:26:7:32 | req.url | execa.js:31:24:31:47 | cmd + a ... + arg3 | This command line depends on a $@. | execa.js:7:26:7:32 | req.url | user-provided value | +| execa.js:31:24:31:47 | cmd + a ... + arg3 | execa.js:8:26:8:32 | req.url | execa.js:31:24:31:47 | cmd + a ... + arg3 | This command line depends on a $@. | execa.js:8:26:8:32 | req.url | user-provided value | +| execa.js:31:24:31:47 | cmd + a ... + arg3 | execa.js:9:26:9:32 | req.url | execa.js:31:24:31:47 | cmd + a ... + arg3 | This command line depends on a $@. | execa.js:9:26:9:32 | req.url | user-provided value | +| execa.js:33:22:33:45 | cmd + a ... + arg3 | execa.js:6:25:6:31 | req.url | execa.js:33:22:33:45 | cmd + a ... + arg3 | This command line depends on a $@. | execa.js:6:25:6:31 | req.url | user-provided value | +| execa.js:33:22:33:45 | cmd + a ... + arg3 | execa.js:7:26:7:32 | req.url | execa.js:33:22:33:45 | cmd + a ... + arg3 | This command line depends on a $@. | execa.js:7:26:7:32 | req.url | user-provided value | +| execa.js:33:22:33:45 | cmd + a ... + arg3 | execa.js:8:26:8:32 | req.url | execa.js:33:22:33:45 | cmd + a ... + arg3 | This command line depends on a $@. | execa.js:8:26:8:32 | req.url | user-provided value | +| execa.js:33:22:33:45 | cmd + a ... + arg3 | execa.js:9:26:9:32 | req.url | execa.js:33:22:33:45 | cmd + a ... + arg3 | This command line depends on a $@. | execa.js:9:26:9:32 | req.url | user-provided value | +| execa.js:34:22:34:45 | cmd + a ... + arg3 | execa.js:6:25:6:31 | req.url | execa.js:34:22:34:45 | cmd + a ... + arg3 | This command line depends on a $@. | execa.js:6:25:6:31 | req.url | user-provided value | +| execa.js:34:22:34:45 | cmd + a ... + arg3 | execa.js:7:26:7:32 | req.url | execa.js:34:22:34:45 | cmd + a ... + arg3 | This command line depends on a $@. | execa.js:7:26:7:32 | req.url | user-provided value | +| execa.js:34:22:34:45 | cmd + a ... + arg3 | execa.js:8:26:8:32 | req.url | execa.js:34:22:34:45 | cmd + a ... + arg3 | This command line depends on a $@. | execa.js:8:26:8:32 | req.url | user-provided value | +| execa.js:34:22:34:45 | cmd + a ... + arg3 | execa.js:9:26:9:32 | req.url | execa.js:34:22:34:45 | cmd + a ... + arg3 | This command line depends on a $@. | execa.js:9:26:9:32 | req.url | user-provided value | | form-parsers.js:9:8:9:39 | "touch ... nalname | form-parsers.js:9:19:9:26 | req.file | form-parsers.js:9:8:9:39 | "touch ... nalname | This command line depends on a $@. | form-parsers.js:9:19:9:26 | req.file | user-provided value | | form-parsers.js:14:10:14:37 | "touch ... nalname | form-parsers.js:13:3:13:11 | req.files | form-parsers.js:14:10:14:37 | "touch ... nalname | This command line depends on a $@. | form-parsers.js:13:3:13:11 | req.files | user-provided value | | form-parsers.js:25:10:25:28 | "touch " + filename | form-parsers.js:24:48:24:55 | filename | form-parsers.js:25:10:25:28 | "touch " + filename | This command line depends on a $@. | form-parsers.js:24:48:24:55 | filename | user-provided value | @@ -112,6 +139,57 @@ edges | execSeries.js:18:34:18:40 | req.url | execSeries.js:18:13:18:47 | require ... , true) | provenance | | | execSeries.js:19:12:19:16 | [cmd] [0] | execSeries.js:13:19:13:26 | commands [0] | provenance | | | execSeries.js:19:13:19:15 | cmd | execSeries.js:19:12:19:16 | [cmd] [0] | provenance | | +| execa.js:6:9:6:54 | cmd | execa.js:11:15:11:17 | cmd | provenance | | +| execa.js:6:9:6:54 | cmd | execa.js:13:32:13:34 | cmd | provenance | | +| execa.js:6:9:6:54 | cmd | execa.js:14:31:14:33 | cmd | provenance | | +| execa.js:6:9:6:54 | cmd | execa.js:17:14:17:16 | cmd | provenance | | +| execa.js:6:9:6:54 | cmd | execa.js:19:32:19:34 | cmd | provenance | | +| execa.js:6:9:6:54 | cmd | execa.js:20:33:20:35 | cmd | provenance | | +| execa.js:6:9:6:54 | cmd | execa.js:23:17:23:19 | cmd | provenance | | +| execa.js:6:9:6:54 | cmd | execa.js:24:17:24:19 | cmd | provenance | | +| execa.js:6:9:6:54 | cmd | execa.js:25:17:25:19 | cmd | provenance | | +| execa.js:6:9:6:54 | cmd | execa.js:27:15:27:17 | cmd | provenance | | +| execa.js:6:9:6:54 | cmd | execa.js:28:15:28:17 | cmd | provenance | | +| execa.js:6:9:6:54 | cmd | execa.js:30:24:30:26 | cmd | provenance | | +| execa.js:6:9:6:54 | cmd | execa.js:31:24:31:26 | cmd | provenance | | +| execa.js:6:9:6:54 | cmd | execa.js:33:22:33:24 | cmd | provenance | | +| execa.js:6:9:6:54 | cmd | execa.js:34:22:34:24 | cmd | provenance | | +| execa.js:6:15:6:38 | url.par ... , true) | execa.js:6:9:6:54 | cmd | provenance | | +| execa.js:6:25:6:31 | req.url | execa.js:6:15:6:38 | url.par ... , true) | provenance | | +| execa.js:7:9:7:53 | arg1 | execa.js:30:30:30:33 | arg1 | provenance | | +| execa.js:7:9:7:53 | arg1 | execa.js:31:30:31:33 | arg1 | provenance | | +| execa.js:7:9:7:53 | arg1 | execa.js:33:28:33:31 | arg1 | provenance | | +| execa.js:7:9:7:53 | arg1 | execa.js:34:28:34:31 | arg1 | provenance | | +| execa.js:7:16:7:39 | url.par ... , true) | execa.js:7:9:7:53 | arg1 | provenance | | +| execa.js:7:26:7:32 | req.url | execa.js:7:16:7:39 | url.par ... , true) | provenance | | +| execa.js:8:9:8:53 | arg2 | execa.js:30:37:30:40 | arg2 | provenance | | +| execa.js:8:9:8:53 | arg2 | execa.js:31:37:31:40 | arg2 | provenance | | +| execa.js:8:9:8:53 | arg2 | execa.js:33:35:33:38 | arg2 | provenance | | +| execa.js:8:9:8:53 | arg2 | execa.js:34:35:34:38 | arg2 | provenance | | +| execa.js:8:16:8:39 | url.par ... , true) | execa.js:8:9:8:53 | arg2 | provenance | | +| execa.js:8:26:8:32 | req.url | execa.js:8:16:8:39 | url.par ... , true) | provenance | | +| execa.js:9:9:9:53 | arg3 | execa.js:30:44:30:47 | arg3 | provenance | | +| execa.js:9:9:9:53 | arg3 | execa.js:31:44:31:47 | arg3 | provenance | | +| execa.js:9:9:9:53 | arg3 | execa.js:33:42:33:45 | arg3 | provenance | | +| execa.js:9:9:9:53 | arg3 | execa.js:34:42:34:45 | arg3 | provenance | | +| execa.js:9:16:9:39 | url.par ... , true) | execa.js:9:9:9:53 | arg3 | provenance | | +| execa.js:9:26:9:32 | req.url | execa.js:9:16:9:39 | url.par ... , true) | provenance | | +| execa.js:30:24:30:26 | cmd | execa.js:30:24:30:47 | cmd + a ... + arg3 | provenance | | +| execa.js:30:30:30:33 | arg1 | execa.js:30:24:30:47 | cmd + a ... + arg3 | provenance | | +| execa.js:30:37:30:40 | arg2 | execa.js:30:24:30:47 | cmd + a ... + arg3 | provenance | | +| execa.js:30:44:30:47 | arg3 | execa.js:30:24:30:47 | cmd + a ... + arg3 | provenance | | +| execa.js:31:24:31:26 | cmd | execa.js:31:24:31:47 | cmd + a ... + arg3 | provenance | | +| execa.js:31:30:31:33 | arg1 | execa.js:31:24:31:47 | cmd + a ... + arg3 | provenance | | +| execa.js:31:37:31:40 | arg2 | execa.js:31:24:31:47 | cmd + a ... + arg3 | provenance | | +| execa.js:31:44:31:47 | arg3 | execa.js:31:24:31:47 | cmd + a ... + arg3 | provenance | | +| execa.js:33:22:33:24 | cmd | execa.js:33:22:33:45 | cmd + a ... + arg3 | provenance | | +| execa.js:33:28:33:31 | arg1 | execa.js:33:22:33:45 | cmd + a ... + arg3 | provenance | | +| execa.js:33:35:33:38 | arg2 | execa.js:33:22:33:45 | cmd + a ... + arg3 | provenance | | +| execa.js:33:42:33:45 | arg3 | execa.js:33:22:33:45 | cmd + a ... + arg3 | provenance | | +| execa.js:34:22:34:24 | cmd | execa.js:34:22:34:45 | cmd + a ... + arg3 | provenance | | +| execa.js:34:28:34:31 | arg1 | execa.js:34:22:34:45 | cmd + a ... + arg3 | provenance | | +| execa.js:34:35:34:38 | arg2 | execa.js:34:22:34:45 | cmd + a ... + arg3 | provenance | | +| execa.js:34:42:34:45 | arg3 | execa.js:34:22:34:45 | cmd + a ... + arg3 | provenance | | | form-parsers.js:9:19:9:26 | req.file | form-parsers.js:9:8:9:39 | "touch ... nalname | provenance | | | form-parsers.js:13:3:13:11 | req.files | form-parsers.js:13:21:13:24 | file | provenance | | | form-parsers.js:13:21:13:24 | file | form-parsers.js:14:21:14:24 | file | provenance | | @@ -216,6 +294,49 @@ nodes | execSeries.js:18:34:18:40 | req.url | semmle.label | req.url | | execSeries.js:19:12:19:16 | [cmd] [0] | semmle.label | [cmd] [0] | | execSeries.js:19:13:19:15 | cmd | semmle.label | cmd | +| execa.js:6:9:6:54 | cmd | semmle.label | cmd | +| execa.js:6:15:6:38 | url.par ... , true) | semmle.label | url.par ... , true) | +| execa.js:6:25:6:31 | req.url | semmle.label | req.url | +| execa.js:7:9:7:53 | arg1 | semmle.label | arg1 | +| execa.js:7:16:7:39 | url.par ... , true) | semmle.label | url.par ... , true) | +| execa.js:7:26:7:32 | req.url | semmle.label | req.url | +| execa.js:8:9:8:53 | arg2 | semmle.label | arg2 | +| execa.js:8:16:8:39 | url.par ... , true) | semmle.label | url.par ... , true) | +| execa.js:8:26:8:32 | req.url | semmle.label | req.url | +| execa.js:9:9:9:53 | arg3 | semmle.label | arg3 | +| execa.js:9:16:9:39 | url.par ... , true) | semmle.label | url.par ... , true) | +| execa.js:9:26:9:32 | req.url | semmle.label | req.url | +| execa.js:11:15:11:17 | cmd | semmle.label | cmd | +| execa.js:13:32:13:34 | cmd | semmle.label | cmd | +| execa.js:14:31:14:33 | cmd | semmle.label | cmd | +| execa.js:17:14:17:16 | cmd | semmle.label | cmd | +| execa.js:19:32:19:34 | cmd | semmle.label | cmd | +| execa.js:20:33:20:35 | cmd | semmle.label | cmd | +| execa.js:23:17:23:19 | cmd | semmle.label | cmd | +| execa.js:24:17:24:19 | cmd | semmle.label | cmd | +| execa.js:25:17:25:19 | cmd | semmle.label | cmd | +| execa.js:27:15:27:17 | cmd | semmle.label | cmd | +| execa.js:28:15:28:17 | cmd | semmle.label | cmd | +| execa.js:30:24:30:26 | cmd | semmle.label | cmd | +| execa.js:30:24:30:47 | cmd + a ... + arg3 | semmle.label | cmd + a ... + arg3 | +| execa.js:30:30:30:33 | arg1 | semmle.label | arg1 | +| execa.js:30:37:30:40 | arg2 | semmle.label | arg2 | +| execa.js:30:44:30:47 | arg3 | semmle.label | arg3 | +| execa.js:31:24:31:26 | cmd | semmle.label | cmd | +| execa.js:31:24:31:47 | cmd + a ... + arg3 | semmle.label | cmd + a ... + arg3 | +| execa.js:31:30:31:33 | arg1 | semmle.label | arg1 | +| execa.js:31:37:31:40 | arg2 | semmle.label | arg2 | +| execa.js:31:44:31:47 | arg3 | semmle.label | arg3 | +| execa.js:33:22:33:24 | cmd | semmle.label | cmd | +| execa.js:33:22:33:45 | cmd + a ... + arg3 | semmle.label | cmd + a ... + arg3 | +| execa.js:33:28:33:31 | arg1 | semmle.label | arg1 | +| execa.js:33:35:33:38 | arg2 | semmle.label | arg2 | +| execa.js:33:42:33:45 | arg3 | semmle.label | arg3 | +| execa.js:34:22:34:24 | cmd | semmle.label | cmd | +| execa.js:34:22:34:45 | cmd + a ... + arg3 | semmle.label | cmd + a ... + arg3 | +| execa.js:34:28:34:31 | arg1 | semmle.label | arg1 | +| execa.js:34:35:34:38 | arg2 | semmle.label | arg2 | +| execa.js:34:42:34:45 | arg3 | semmle.label | arg3 | | form-parsers.js:9:8:9:39 | "touch ... nalname | semmle.label | "touch ... nalname | | form-parsers.js:9:19:9:26 | req.file | semmle.label | req.file | | form-parsers.js:13:3:13:11 | req.files | semmle.label | req.files | diff --git a/javascript/ql/test/query-tests/Security/CWE-078/CommandInjection/execa.js b/javascript/ql/test/query-tests/Security/CWE-078/CommandInjection/execa.js new file mode 100644 index 00000000000..ed7f8832f9c --- /dev/null +++ b/javascript/ql/test/query-tests/Security/CWE-078/CommandInjection/execa.js @@ -0,0 +1,35 @@ +import { execa, execaSync, execaCommand, execaCommandSync, $ } from 'execa'; +import http from 'node:http' +import url from 'url' + +http.createServer(async function (req, res) { + let cmd = url.parse(req.url, true).query["cmd"][0]; // $Source + let arg1 = url.parse(req.url, true).query["arg1"]; // $Source + let arg2 = url.parse(req.url, true).query["arg2"]; // $Source + let arg3 = url.parse(req.url, true).query["arg3"]; // $Source + + await $`${cmd} ${arg1} ${arg2} ${arg3}`; // $Alert + await $`ssh ${arg1} ${arg2} ${arg3}`; // safely escapes variables, preventing shell injection. + $({ shell: false }).sync`${cmd} ${arg1} ${arg2} ${arg3}`; // $Alert + $({ shell: true }).sync`${cmd} ${arg1} ${arg2} ${arg3}`; // $Alert + $({ shell: false }).sync`ssh ${arg1} ${arg2} ${arg3}`; // safely escapes variables, preventing shell injection. + + $.sync`${cmd} ${arg1} ${arg2} ${arg3}`; // $Alert + $.sync`ssh ${arg1} ${arg2} ${arg3}`; // safely escapes variables, preventing shell injection. + await $({ shell: true })`${cmd} ${arg1} ${arg2} ${arg3}`; // $Alert + await $({ shell: false })`${cmd} ${arg1} ${arg2} ${arg3}`; // $Alert + await $({ shell: false })`ssh ${arg1} ${arg2} ${arg3}`; // safely escapes variables, preventing shell injection. + + await execa(cmd, [arg1, arg2, arg3]); // $Alert + await execa(cmd, { shell: true }); // $Alert + await execa(cmd, [arg1, arg2, arg3], { shell: true }); // $Alert + + execaSync(cmd, [arg1, arg2, arg3]); // $Alert + execaSync(cmd, [arg1, arg2, arg3], { shell: true }); // $Alert + + await execaCommand(cmd + arg1 + arg2 + arg3); // $Alert + await execaCommand(cmd + arg1 + arg2 + arg3, { shell: true }); // $Alert + + execaCommandSync(cmd + arg1 + arg2 + arg3); // $Alert + execaCommandSync(cmd + arg1 + arg2 + arg3, { shell: true }); // $Alert +}); diff --git a/javascript/ql/test/query-tests/Security/CWE-094/CodeInjection/CodeInjection.expected b/javascript/ql/test/query-tests/Security/CWE-094/CodeInjection/CodeInjection.expected index 4d54adb2724..412f0a5c5fa 100644 --- a/javascript/ql/test/query-tests/Security/CWE-094/CodeInjection/CodeInjection.expected +++ b/javascript/ql/test/query-tests/Security/CWE-094/CodeInjection/CodeInjection.expected @@ -65,7 +65,8 @@ | module.js:11:17:11:30 | req.query.code | module.js:11:17:11:30 | req.query.code | module.js:11:17:11:30 | req.query.code | This code execution depends on a $@. | module.js:11:17:11:30 | req.query.code | user-provided value | | react-native.js:8:32:8:38 | tainted | react-native.js:7:17:7:33 | req.param("code") | react-native.js:8:32:8:38 | tainted | This code execution depends on a $@. | react-native.js:7:17:7:33 | req.param("code") | user-provided value | | react-native.js:10:23:10:29 | tainted | react-native.js:7:17:7:33 | req.param("code") | react-native.js:10:23:10:29 | tainted | This code execution depends on a $@. | react-native.js:7:17:7:33 | req.param("code") | user-provided value | -| react.js:10:56:10:77 | documen ... on.hash | react.js:10:56:10:77 | documen ... on.hash | react.js:10:56:10:77 | documen ... on.hash | This code execution depends on a $@. | react.js:10:56:10:77 | documen ... on.hash | user-provided value | +| react.js:11:56:11:77 | documen ... on.hash | react.js:11:56:11:77 | documen ... on.hash | react.js:11:56:11:77 | documen ... on.hash | This code execution depends on a $@. | react.js:11:56:11:77 | documen ... on.hash | user-provided value | +| react.js:25:8:25:11 | data | react-server-function.js:3:35:3:35 | x | react.js:25:8:25:11 | data | This code execution depends on a $@. | react-server-function.js:3:35:3:35 | x | user-provided value | | template-sinks.js:20:17:20:23 | tainted | template-sinks.js:18:19:18:31 | req.query.foo | template-sinks.js:20:17:20:23 | tainted | Template, which may contain code, depends on a $@. | template-sinks.js:18:19:18:31 | req.query.foo | user-provided value | | template-sinks.js:21:16:21:22 | tainted | template-sinks.js:18:19:18:31 | req.query.foo | template-sinks.js:21:16:21:22 | tainted | Template, which may contain code, depends on a $@. | template-sinks.js:18:19:18:31 | req.query.foo | user-provided value | | template-sinks.js:22:18:22:24 | tainted | template-sinks.js:18:19:18:31 | req.query.foo | template-sinks.js:22:18:22:24 | tainted | Template, which may contain code, depends on a $@. | template-sinks.js:18:19:18:31 | req.query.foo | user-provided value | @@ -156,6 +157,12 @@ edges | react-native.js:7:7:7:33 | tainted | react-native.js:8:32:8:38 | tainted | provenance | | | react-native.js:7:7:7:33 | tainted | react-native.js:10:23:10:29 | tainted | provenance | | | react-native.js:7:17:7:33 | req.param("code") | react-native.js:7:7:7:33 | tainted | provenance | | +| react-server-function.js:3:35:3:35 | x | react-server-function.js:4:12:4:12 | x | provenance | | +| react-server-function.js:4:12:4:12 | x | react-server-function.js:4:12:4:29 | x + " from server" | provenance | | +| react-server-function.js:4:12:4:29 | x + " from server" | react.js:24:20:24:44 | echoSer ... value") [PromiseValue] | provenance | | +| react.js:24:9:24:45 | data | react.js:25:8:25:11 | data | provenance | | +| react.js:24:16:24:45 | use(ech ... alue")) | react.js:24:9:24:45 | data | provenance | | +| react.js:24:20:24:44 | echoSer ... value") [PromiseValue] | react.js:24:16:24:45 | use(ech ... alue")) | provenance | | | template-sinks.js:18:9:18:31 | tainted | template-sinks.js:20:17:20:23 | tainted | provenance | | | template-sinks.js:18:9:18:31 | tainted | template-sinks.js:21:16:21:22 | tainted | provenance | | | template-sinks.js:18:9:18:31 | tainted | template-sinks.js:22:18:22:24 | tainted | provenance | | @@ -287,7 +294,14 @@ nodes | react-native.js:7:17:7:33 | req.param("code") | semmle.label | req.param("code") | | react-native.js:8:32:8:38 | tainted | semmle.label | tainted | | react-native.js:10:23:10:29 | tainted | semmle.label | tainted | -| react.js:10:56:10:77 | documen ... on.hash | semmle.label | documen ... on.hash | +| react-server-function.js:3:35:3:35 | x | semmle.label | x | +| react-server-function.js:4:12:4:12 | x | semmle.label | x | +| react-server-function.js:4:12:4:29 | x + " from server" | semmle.label | x + " from server" | +| react.js:11:56:11:77 | documen ... on.hash | semmle.label | documen ... on.hash | +| react.js:24:9:24:45 | data | semmle.label | data | +| react.js:24:16:24:45 | use(ech ... alue")) | semmle.label | use(ech ... alue")) | +| react.js:24:20:24:44 | echoSer ... value") [PromiseValue] | semmle.label | echoSer ... value") [PromiseValue] | +| react.js:25:8:25:11 | data | semmle.label | data | | template-sinks.js:18:9:18:31 | tainted | semmle.label | tainted | | template-sinks.js:18:19:18:31 | req.query.foo | semmle.label | req.query.foo | | template-sinks.js:20:17:20:23 | tainted | semmle.label | tainted | diff --git a/javascript/ql/test/query-tests/Security/CWE-094/CodeInjection/HeuristicSourceCodeInjection.expected b/javascript/ql/test/query-tests/Security/CWE-094/CodeInjection/HeuristicSourceCodeInjection.expected index a1c8354ecf7..5a249b086b9 100644 --- a/javascript/ql/test/query-tests/Security/CWE-094/CodeInjection/HeuristicSourceCodeInjection.expected +++ b/javascript/ql/test/query-tests/Security/CWE-094/CodeInjection/HeuristicSourceCodeInjection.expected @@ -58,6 +58,12 @@ edges | react-native.js:7:7:7:33 | tainted | react-native.js:8:32:8:38 | tainted | provenance | | | react-native.js:7:7:7:33 | tainted | react-native.js:10:23:10:29 | tainted | provenance | | | react-native.js:7:17:7:33 | req.param("code") | react-native.js:7:7:7:33 | tainted | provenance | | +| react-server-function.js:3:35:3:35 | x | react-server-function.js:4:12:4:12 | x | provenance | | +| react-server-function.js:4:12:4:12 | x | react-server-function.js:4:12:4:29 | x + " from server" | provenance | | +| react-server-function.js:4:12:4:29 | x + " from server" | react.js:24:20:24:44 | echoSer ... value") [PromiseValue] | provenance | | +| react.js:24:9:24:45 | data | react.js:25:8:25:11 | data | provenance | | +| react.js:24:16:24:45 | use(ech ... alue")) | react.js:24:9:24:45 | data | provenance | | +| react.js:24:20:24:44 | echoSer ... value") [PromiseValue] | react.js:24:16:24:45 | use(ech ... alue")) | provenance | | | template-sinks.js:18:9:18:31 | tainted | template-sinks.js:20:17:20:23 | tainted | provenance | | | template-sinks.js:18:9:18:31 | tainted | template-sinks.js:21:16:21:22 | tainted | provenance | | | template-sinks.js:18:9:18:31 | tainted | template-sinks.js:22:18:22:24 | tainted | provenance | | @@ -191,7 +197,14 @@ nodes | react-native.js:7:17:7:33 | req.param("code") | semmle.label | req.param("code") | | react-native.js:8:32:8:38 | tainted | semmle.label | tainted | | react-native.js:10:23:10:29 | tainted | semmle.label | tainted | -| react.js:10:56:10:77 | documen ... on.hash | semmle.label | documen ... on.hash | +| react-server-function.js:3:35:3:35 | x | semmle.label | x | +| react-server-function.js:4:12:4:12 | x | semmle.label | x | +| react-server-function.js:4:12:4:29 | x + " from server" | semmle.label | x + " from server" | +| react.js:11:56:11:77 | documen ... on.hash | semmle.label | documen ... on.hash | +| react.js:24:9:24:45 | data | semmle.label | data | +| react.js:24:16:24:45 | use(ech ... alue")) | semmle.label | use(ech ... alue")) | +| react.js:24:20:24:44 | echoSer ... value") [PromiseValue] | semmle.label | echoSer ... value") [PromiseValue] | +| react.js:25:8:25:11 | data | semmle.label | data | | template-sinks.js:18:9:18:31 | tainted | semmle.label | tainted | | template-sinks.js:18:19:18:31 | req.query.foo | semmle.label | req.query.foo | | template-sinks.js:20:17:20:23 | tainted | semmle.label | tainted | diff --git a/javascript/ql/test/query-tests/Security/CWE-094/CodeInjection/react-server-function.js b/javascript/ql/test/query-tests/Security/CWE-094/CodeInjection/react-server-function.js new file mode 100644 index 00000000000..9c6bf514201 --- /dev/null +++ b/javascript/ql/test/query-tests/Security/CWE-094/CodeInjection/react-server-function.js @@ -0,0 +1,5 @@ +"use server"; + +export async function echoService(x) { // $ Source[js/code-injection] + return x + " from server"; +} diff --git a/javascript/ql/test/query-tests/Security/CWE-094/CodeInjection/react.js b/javascript/ql/test/query-tests/Security/CWE-094/CodeInjection/react.js index 32db7a3f621..ab6ff096af4 100644 --- a/javascript/ql/test/query-tests/Security/CWE-094/CodeInjection/react.js +++ b/javascript/ql/test/query-tests/Security/CWE-094/CodeInjection/react.js @@ -1,6 +1,7 @@ -import React from "react"; +import React, { use } from "react"; import {Helmet} from "react-helmet"; - +import { echoService } from "./react-server-function"; + class Application extends React.Component { render () { return ( @@ -14,4 +15,12 @@ class Application extends React.Component { } }; -export default Application \ No newline at end of file +export default Application + +export function Component() { + // We currently get false-positive flow through server functions in cases where a safe value + // is passed as the argument, which flows to the return value. In this case, the tainted parameter + // flows out of the return value regardless. + const data = use(echoService("safe value")); + eval(data); // $ SPURIOUS: Alert[js/code-injection] +} diff --git a/javascript/ql/test/query-tests/Security/CWE-094/ExpressionInjection/.github/workflows/comment_issue.yml b/javascript/ql/test/query-tests/Security/CWE-094/ExpressionInjection/.github/workflows/comment_issue.yml deleted file mode 100644 index 17ead9fdd20..00000000000 --- a/javascript/ql/test/query-tests/Security/CWE-094/ExpressionInjection/.github/workflows/comment_issue.yml +++ /dev/null @@ -1,28 +0,0 @@ -on: issue_comment - -jobs: - echo-chamber: - runs-on: ubuntu-latest - steps: - - run: | - echo '${{ github.event.comment.body }}' - - echo-chamber2: - runs-on: ubuntu-latest - steps: - - run: echo '${{ github.event.comment.body }}' - - run: echo '${{ github.event.issue.body }}' - - run: echo '${{ github.event.issue.title }}' - - echo-chamber3: - runs-on: ubuntu-latest - steps: - - uses: actions/github-script@v3 - with: - script: console.log('${{ github.event.comment.body }}') - - uses: actions/github-script@v3 - with: - script: console.log('${{ github.event.issue.body }}') - - uses: actions/github-script@v3 - with: - script: console.log('${{ github.event.issue.title }}') \ No newline at end of file diff --git a/javascript/ql/test/query-tests/Security/CWE-094/ExpressionInjection/.github/workflows/comment_issue_newline.yml b/javascript/ql/test/query-tests/Security/CWE-094/ExpressionInjection/.github/workflows/comment_issue_newline.yml deleted file mode 100644 index 0a64e47f6cb..00000000000 --- a/javascript/ql/test/query-tests/Security/CWE-094/ExpressionInjection/.github/workflows/comment_issue_newline.yml +++ /dev/null @@ -1,10 +0,0 @@ -on: issue_comment - -# same as comment_issue but this file ends with a line break - -jobs: - echo-chamber: - runs-on: ubuntu-latest - steps: - - run: | - echo '${{ github.event.comment.body }}' diff --git a/javascript/ql/test/query-tests/Security/CWE-094/ExpressionInjection/.github/workflows/discussion.yml b/javascript/ql/test/query-tests/Security/CWE-094/ExpressionInjection/.github/workflows/discussion.yml deleted file mode 100644 index fdb140ec380..00000000000 --- a/javascript/ql/test/query-tests/Security/CWE-094/ExpressionInjection/.github/workflows/discussion.yml +++ /dev/null @@ -1,8 +0,0 @@ -on: discussion - -jobs: - echo-chamber: - runs-on: ubuntu-latest - steps: - - run: echo '${{ github.event.discussion.title }}' - - run: echo '${{ github.event.discussion.body }}' \ No newline at end of file diff --git a/javascript/ql/test/query-tests/Security/CWE-094/ExpressionInjection/.github/workflows/discussion_comment.yml b/javascript/ql/test/query-tests/Security/CWE-094/ExpressionInjection/.github/workflows/discussion_comment.yml deleted file mode 100644 index 649d3a6e131..00000000000 --- a/javascript/ql/test/query-tests/Security/CWE-094/ExpressionInjection/.github/workflows/discussion_comment.yml +++ /dev/null @@ -1,9 +0,0 @@ -on: discussion_comment - -jobs: - echo-chamber: - runs-on: ubuntu-latest - steps: - - run: echo '${{ github.event.discussion.title }}' - - run: echo '${{ github.event.discussion.body }}' - - run: echo '${{ github.event.comment.body }}' \ No newline at end of file diff --git a/javascript/ql/test/query-tests/Security/CWE-094/ExpressionInjection/.github/workflows/gollum.yml b/javascript/ql/test/query-tests/Security/CWE-094/ExpressionInjection/.github/workflows/gollum.yml deleted file mode 100644 index a952c8c1ab8..00000000000 --- a/javascript/ql/test/query-tests/Security/CWE-094/ExpressionInjection/.github/workflows/gollum.yml +++ /dev/null @@ -1,11 +0,0 @@ -on: gollum - -jobs: - echo-chamber: - runs-on: ubuntu-latest - steps: - - run: echo '${{ github.event.pages[1].title }}' - - run: echo '${{ github.event.pages[11].title }}' - - run: echo '${{ github.event.pages[0].page_name }}' - - run: echo '${{ github.event.pages[2222].page_name }}' - - run: echo '${{ toJSON(github.event.pages.*.title) }}' # safe \ No newline at end of file diff --git a/javascript/ql/test/query-tests/Security/CWE-094/ExpressionInjection/.github/workflows/issues.yaml b/javascript/ql/test/query-tests/Security/CWE-094/ExpressionInjection/.github/workflows/issues.yaml deleted file mode 100644 index 5e767ce0239..00000000000 --- a/javascript/ql/test/query-tests/Security/CWE-094/ExpressionInjection/.github/workflows/issues.yaml +++ /dev/null @@ -1,20 +0,0 @@ -on: issues - -env: - global_env: ${{ github.event.issue.title }} - test: test - -jobs: - echo-chamber: - env: - job_env: ${{ github.event.issue.title }} - runs-on: ubuntu-latest - steps: - - run: echo '${{ github.event.issue.title }}' - - run: echo '${{ github.event.issue.body }}' - - run: echo '${{ env.global_env }}' - - run: echo '${{ env.test }}' - - run: echo '${{ env.job_env }}' - - run: echo '${{ env.step_env }}' - env: - step_env: ${{ github.event.issue.title }} diff --git a/javascript/ql/test/query-tests/Security/CWE-094/ExpressionInjection/.github/workflows/pull_request_review.yml b/javascript/ql/test/query-tests/Security/CWE-094/ExpressionInjection/.github/workflows/pull_request_review.yml deleted file mode 100644 index d4ce7885669..00000000000 --- a/javascript/ql/test/query-tests/Security/CWE-094/ExpressionInjection/.github/workflows/pull_request_review.yml +++ /dev/null @@ -1,14 +0,0 @@ -on: pull_request_review - -jobs: - echo-chamber: - runs-on: ubuntu-latest - steps: - - run: echo '${{ github.event.pull_request.title }}' - - run: echo '${{ github.event.pull_request.body }}' - - run: echo '${{ github.event.pull_request.head.label }}' - - run: echo '${{ github.event.pull_request.head.repo.default_branch }}' - - run: echo '${{ github.event.pull_request.head.repo.description }}' - - run: echo '${{ github.event.pull_request.head.repo.homepage }}' - - run: echo '${{ github.event.pull_request.head.ref }}' - - run: echo '${{ github.event.review.body }}' diff --git a/javascript/ql/test/query-tests/Security/CWE-094/ExpressionInjection/.github/workflows/pull_request_review_comment.yml b/javascript/ql/test/query-tests/Security/CWE-094/ExpressionInjection/.github/workflows/pull_request_review_comment.yml deleted file mode 100644 index 5d288caad85..00000000000 --- a/javascript/ql/test/query-tests/Security/CWE-094/ExpressionInjection/.github/workflows/pull_request_review_comment.yml +++ /dev/null @@ -1,14 +0,0 @@ -on: pull_request_review_comment - -jobs: - echo-chamber: - runs-on: ubuntu-latest - steps: - - run: echo '${{ github.event.pull_request.title }}' - - run: echo '${{ github.event.pull_request.body }}' - - run: echo '${{ github.event.pull_request.head.label }}' - - run: echo '${{ github.event.pull_request.head.repo.default_branch }}' - - run: echo '${{ github.event.pull_request.head.repo.description }}' - - run: echo '${{ github.event.pull_request.head.repo.homepage }}' - - run: echo '${{ github.event.pull_request.head.ref }}' - - run: echo '${{ github.event.comment.body }}' diff --git a/javascript/ql/test/query-tests/Security/CWE-094/ExpressionInjection/.github/workflows/pull_request_target.yml b/javascript/ql/test/query-tests/Security/CWE-094/ExpressionInjection/.github/workflows/pull_request_target.yml deleted file mode 100644 index 215b3252885..00000000000 --- a/javascript/ql/test/query-tests/Security/CWE-094/ExpressionInjection/.github/workflows/pull_request_target.yml +++ /dev/null @@ -1,16 +0,0 @@ -on: pull_request_target - -jobs: - echo-chamber: - runs-on: ubuntu-latest - steps: - - run: echo '${{ github.event.issue.title }}' # not defined - - run: echo '${{ github.event.issue.body }}' # not defined - - run: echo '${{ github.event.pull_request.title }}' - - run: echo '${{ github.event.pull_request.body }}' - - run: echo '${{ github.event.pull_request.head.label }}' - - run: echo '${{ github.event.pull_request.head.repo.default_branch }}' - - run: echo '${{ github.event.pull_request.head.repo.description }}' - - run: echo '${{ github.event.pull_request.head.repo.homepage }}' - - run: echo '${{ github.event.pull_request.head.ref }}' - - run: echo '${{ github.head_ref }}' diff --git a/javascript/ql/test/query-tests/Security/CWE-094/ExpressionInjection/.github/workflows/push.yml b/javascript/ql/test/query-tests/Security/CWE-094/ExpressionInjection/.github/workflows/push.yml deleted file mode 100644 index 2006a7999da..00000000000 --- a/javascript/ql/test/query-tests/Security/CWE-094/ExpressionInjection/.github/workflows/push.yml +++ /dev/null @@ -1,16 +0,0 @@ -on: push - -jobs: - echo-chamber: - runs-on: ubuntu-latest - steps: - - run: echo '${{ github.event.commits[11].message }}' - - run: echo '${{ github.event.commits[11].author.email }}' - - run: echo '${{ github.event.commits[11].author.name }}' - - run: echo '${{ github.event.head_commit.message }}' - - run: echo '${{ github.event.head_commit.author.email }}' - - run: echo '${{ github.event.head_commit.author.name }}' - - run: echo '${{ github.event.head_commit.committer.email }}' - - run: echo '${{ github.event.head_commit.committer.name }}' - - run: echo '${{ github.event.commits[11].committer.email }}' - - run: echo '${{ github.event.commits[11].committer.name }}' \ No newline at end of file diff --git a/javascript/ql/test/query-tests/Security/CWE-094/ExpressionInjection/.github/workflows/workflow_run.yml b/javascript/ql/test/query-tests/Security/CWE-094/ExpressionInjection/.github/workflows/workflow_run.yml deleted file mode 100644 index 60e7645f60f..00000000000 --- a/javascript/ql/test/query-tests/Security/CWE-094/ExpressionInjection/.github/workflows/workflow_run.yml +++ /dev/null @@ -1,16 +0,0 @@ -on: - workflow_run: - workflows: [test] - -jobs: - echo-chamber: - runs-on: ubuntu-latest - steps: - - run: echo '${{ github.event.workflow_run.display_title }}' - - run: echo '${{ github.event.workflow_run.head_commit.message }}' - - run: echo '${{ github.event.workflow_run.head_commit.author.email }}' - - run: echo '${{ github.event.workflow_run.head_commit.author.name }}' - - run: echo '${{ github.event.workflow_run.head_commit.committer.email }}' - - run: echo '${{ github.event.workflow_run.head_commit.committer.name }}' - - run: echo '${{ github.event.workflow_run.head_branch }}' - - run: echo '${{ github.event.workflow_run.head_repository.description }}' diff --git a/javascript/ql/test/query-tests/Security/CWE-094/ExpressionInjection/ExpressionInjection.expected b/javascript/ql/test/query-tests/Security/CWE-094/ExpressionInjection/ExpressionInjection.expected deleted file mode 100644 index 414b9b9ae40..00000000000 --- a/javascript/ql/test/query-tests/Security/CWE-094/ExpressionInjection/ExpressionInjection.expected +++ /dev/null @@ -1,65 +0,0 @@ -| .github/workflows/comment_issue.yml:7:12:8:48 | \| | Potential injection from the ${{ github.event.comment.body }}, which may be controlled by an external user. | -| .github/workflows/comment_issue.yml:13:12:13:50 | echo '$ ... ody }}' | Potential injection from the ${{ github.event.comment.body }}, which may be controlled by an external user. | -| .github/workflows/comment_issue.yml:14:12:14:48 | echo '$ ... ody }}' | Potential injection from the ${{ github.event.issue.body }}, which may be controlled by an external user. | -| .github/workflows/comment_issue.yml:15:12:15:49 | echo '$ ... tle }}' | Potential injection from the ${{ github.event.issue.title }}, which may be controlled by an external user. | -| .github/workflows/comment_issue.yml:22:17:22:63 | console ... dy }}') | Potential injection from the ${{ github.event.comment.body }}, which may be controlled by an external user. | -| .github/workflows/comment_issue.yml:25:17:25:61 | console ... dy }}') | Potential injection from the ${{ github.event.issue.body }}, which may be controlled by an external user. | -| .github/workflows/comment_issue.yml:28:17:28:62 | console ... le }}') | Potential injection from the ${{ github.event.issue.title }}, which may be controlled by an external user. | -| .github/workflows/comment_issue_newline.yml:9:14:10:50 | \| | Potential injection from the ${{ github.event.comment.body }}, which may be controlled by an external user. | -| .github/workflows/discussion.yml:7:12:7:54 | echo '$ ... tle }}' | Potential injection from the ${{ github.event.discussion.title }}, which may be controlled by an external user. | -| .github/workflows/discussion.yml:8:12:8:53 | echo '$ ... ody }}' | Potential injection from the ${{ github.event.discussion.body }}, which may be controlled by an external user. | -| .github/workflows/discussion_comment.yml:7:12:7:54 | echo '$ ... tle }}' | Potential injection from the ${{ github.event.discussion.title }}, which may be controlled by an external user. | -| .github/workflows/discussion_comment.yml:8:12:8:53 | echo '$ ... ody }}' | Potential injection from the ${{ github.event.discussion.body }}, which may be controlled by an external user. | -| .github/workflows/discussion_comment.yml:9:12:9:50 | echo '$ ... ody }}' | Potential injection from the ${{ github.event.comment.body }}, which may be controlled by an external user. | -| .github/workflows/gollum.yml:7:12:7:52 | echo '$ ... tle }}' | Potential injection from the ${{ github.event.pages[1].title }}, which may be controlled by an external user. | -| .github/workflows/gollum.yml:8:12:8:53 | echo '$ ... tle }}' | Potential injection from the ${{ github.event.pages[11].title }}, which may be controlled by an external user. | -| .github/workflows/gollum.yml:9:12:9:56 | echo '$ ... ame }}' | Potential injection from the ${{ github.event.pages[0].page_name }}, which may be controlled by an external user. | -| .github/workflows/gollum.yml:10:12:10:59 | echo '$ ... ame }}' | Potential injection from the ${{ github.event.pages[2222].page_name }}, which may be controlled by an external user. | -| .github/workflows/issues.yaml:13:12:13:49 | echo '$ ... tle }}' | Potential injection from the ${{ github.event.issue.title }}, which may be controlled by an external user. | -| .github/workflows/issues.yaml:14:12:14:48 | echo '$ ... ody }}' | Potential injection from the ${{ github.event.issue.body }}, which may be controlled by an external user. | -| .github/workflows/issues.yaml:15:12:15:39 | echo '$ ... env }}' | Potential injection from the ${{ env.global_env }}, which may be controlled by an external user. | -| .github/workflows/issues.yaml:17:12:17:36 | echo '$ ... env }}' | Potential injection from the ${{ env.job_env }}, which may be controlled by an external user. | -| .github/workflows/issues.yaml:18:12:18:37 | echo '$ ... env }}' | Potential injection from the ${{ env.step_env }}, which may be controlled by an external user. | -| .github/workflows/pull_request_review.yml:7:12:7:56 | echo '$ ... tle }}' | Potential injection from the ${{ github.event.pull_request.title }}, which may be controlled by an external user. | -| .github/workflows/pull_request_review.yml:8:12:8:55 | echo '$ ... ody }}' | Potential injection from the ${{ github.event.pull_request.body }}, which may be controlled by an external user. | -| .github/workflows/pull_request_review.yml:9:12:9:61 | echo '$ ... bel }}' | Potential injection from the ${{ github.event.pull_request.head.label }}, which may be controlled by an external user. | -| .github/workflows/pull_request_review.yml:10:12:10:75 | echo '$ ... nch }}' | Potential injection from the ${{ github.event.pull_request.head.repo.default_branch }}, which may be controlled by an external user. | -| .github/workflows/pull_request_review.yml:11:12:11:72 | echo '$ ... ion }}' | Potential injection from the ${{ github.event.pull_request.head.repo.description }}, which may be controlled by an external user. | -| .github/workflows/pull_request_review.yml:12:12:12:69 | echo '$ ... age }}' | Potential injection from the ${{ github.event.pull_request.head.repo.homepage }}, which may be controlled by an external user. | -| .github/workflows/pull_request_review.yml:13:12:13:59 | echo '$ ... ref }}' | Potential injection from the ${{ github.event.pull_request.head.ref }}, which may be controlled by an external user. | -| .github/workflows/pull_request_review.yml:14:12:14:49 | echo '$ ... ody }}' | Potential injection from the ${{ github.event.review.body }}, which may be controlled by an external user. | -| .github/workflows/pull_request_review_comment.yml:7:12:7:56 | echo '$ ... tle }}' | Potential injection from the ${{ github.event.pull_request.title }}, which may be controlled by an external user. | -| .github/workflows/pull_request_review_comment.yml:8:12:8:55 | echo '$ ... ody }}' | Potential injection from the ${{ github.event.pull_request.body }}, which may be controlled by an external user. | -| .github/workflows/pull_request_review_comment.yml:9:12:9:61 | echo '$ ... bel }}' | Potential injection from the ${{ github.event.pull_request.head.label }}, which may be controlled by an external user. | -| .github/workflows/pull_request_review_comment.yml:10:12:10:75 | echo '$ ... nch }}' | Potential injection from the ${{ github.event.pull_request.head.repo.default_branch }}, which may be controlled by an external user. | -| .github/workflows/pull_request_review_comment.yml:11:12:11:72 | echo '$ ... ion }}' | Potential injection from the ${{ github.event.pull_request.head.repo.description }}, which may be controlled by an external user. | -| .github/workflows/pull_request_review_comment.yml:12:12:12:69 | echo '$ ... age }}' | Potential injection from the ${{ github.event.pull_request.head.repo.homepage }}, which may be controlled by an external user. | -| .github/workflows/pull_request_review_comment.yml:13:12:13:59 | echo '$ ... ref }}' | Potential injection from the ${{ github.event.pull_request.head.ref }}, which may be controlled by an external user. | -| .github/workflows/pull_request_review_comment.yml:14:12:14:50 | echo '$ ... ody }}' | Potential injection from the ${{ github.event.comment.body }}, which may be controlled by an external user. | -| .github/workflows/pull_request_target.yml:9:12:9:56 | echo '$ ... tle }}' | Potential injection from the ${{ github.event.pull_request.title }}, which may be controlled by an external user. | -| .github/workflows/pull_request_target.yml:10:12:10:55 | echo '$ ... ody }}' | Potential injection from the ${{ github.event.pull_request.body }}, which may be controlled by an external user. | -| .github/workflows/pull_request_target.yml:11:12:11:61 | echo '$ ... bel }}' | Potential injection from the ${{ github.event.pull_request.head.label }}, which may be controlled by an external user. | -| .github/workflows/pull_request_target.yml:12:12:12:75 | echo '$ ... nch }}' | Potential injection from the ${{ github.event.pull_request.head.repo.default_branch }}, which may be controlled by an external user. | -| .github/workflows/pull_request_target.yml:13:12:13:72 | echo '$ ... ion }}' | Potential injection from the ${{ github.event.pull_request.head.repo.description }}, which may be controlled by an external user. | -| .github/workflows/pull_request_target.yml:14:12:14:69 | echo '$ ... age }}' | Potential injection from the ${{ github.event.pull_request.head.repo.homepage }}, which may be controlled by an external user. | -| .github/workflows/pull_request_target.yml:15:12:15:59 | echo '$ ... ref }}' | Potential injection from the ${{ github.event.pull_request.head.ref }}, which may be controlled by an external user. | -| .github/workflows/pull_request_target.yml:16:12:16:40 | echo '$ ... ref }}' | Potential injection from the ${{ github.head_ref }}, which may be controlled by an external user. | -| .github/workflows/push.yml:7:12:7:57 | echo '$ ... age }}' | Potential injection from the ${{ github.event.commits[11].message }}, which may be controlled by an external user. | -| .github/workflows/push.yml:8:12:8:62 | echo '$ ... ail }}' | Potential injection from the ${{ github.event.commits[11].author.email }}, which may be controlled by an external user. | -| .github/workflows/push.yml:9:12:9:61 | echo '$ ... ame }}' | Potential injection from the ${{ github.event.commits[11].author.name }}, which may be controlled by an external user. | -| .github/workflows/push.yml:10:12:10:57 | echo '$ ... age }}' | Potential injection from the ${{ github.event.head_commit.message }}, which may be controlled by an external user. | -| .github/workflows/push.yml:11:12:11:62 | echo '$ ... ail }}' | Potential injection from the ${{ github.event.head_commit.author.email }}, which may be controlled by an external user. | -| .github/workflows/push.yml:12:12:12:61 | echo '$ ... ame }}' | Potential injection from the ${{ github.event.head_commit.author.name }}, which may be controlled by an external user. | -| .github/workflows/push.yml:13:12:13:65 | echo '$ ... ail }}' | Potential injection from the ${{ github.event.head_commit.committer.email }}, which may be controlled by an external user. | -| .github/workflows/push.yml:14:12:14:64 | echo '$ ... ame }}' | Potential injection from the ${{ github.event.head_commit.committer.name }}, which may be controlled by an external user. | -| .github/workflows/push.yml:15:12:15:65 | echo '$ ... ail }}' | Potential injection from the ${{ github.event.commits[11].committer.email }}, which may be controlled by an external user. | -| .github/workflows/push.yml:16:12:16:64 | echo '$ ... ame }}' | Potential injection from the ${{ github.event.commits[11].committer.name }}, which may be controlled by an external user. | -| .github/workflows/workflow_run.yml:9:12:9:64 | echo '$ ... tle }}' | Potential injection from the ${{ github.event.workflow_run.display_title }}, which may be controlled by an external user. | -| .github/workflows/workflow_run.yml:10:12:10:70 | echo '$ ... age }}' | Potential injection from the ${{ github.event.workflow_run.head_commit.message }}, which may be controlled by an external user. | -| .github/workflows/workflow_run.yml:11:12:11:75 | echo '$ ... ail }}' | Potential injection from the ${{ github.event.workflow_run.head_commit.author.email }}, which may be controlled by an external user. | -| .github/workflows/workflow_run.yml:12:12:12:74 | echo '$ ... ame }}' | Potential injection from the ${{ github.event.workflow_run.head_commit.author.name }}, which may be controlled by an external user. | -| .github/workflows/workflow_run.yml:13:12:13:78 | echo '$ ... ail }}' | Potential injection from the ${{ github.event.workflow_run.head_commit.committer.email }}, which may be controlled by an external user. | -| .github/workflows/workflow_run.yml:14:12:14:77 | echo '$ ... ame }}' | Potential injection from the ${{ github.event.workflow_run.head_commit.committer.name }}, which may be controlled by an external user. | -| .github/workflows/workflow_run.yml:15:12:15:62 | echo '$ ... nch }}' | Potential injection from the ${{ github.event.workflow_run.head_branch }}, which may be controlled by an external user. | -| .github/workflows/workflow_run.yml:16:12:16:78 | echo '$ ... ion }}' | Potential injection from the ${{ github.event.workflow_run.head_repository.description }}, which may be controlled by an external user. | -| action1/action.yml:14:12:14:50 | echo '$ ... ody }}' | Potential injection from the ${{ github.event.comment.body }}, which may be controlled by an external user. | diff --git a/javascript/ql/test/query-tests/Security/CWE-094/ExpressionInjection/ExpressionInjection.qlref b/javascript/ql/test/query-tests/Security/CWE-094/ExpressionInjection/ExpressionInjection.qlref deleted file mode 100644 index dd00277b79b..00000000000 --- a/javascript/ql/test/query-tests/Security/CWE-094/ExpressionInjection/ExpressionInjection.qlref +++ /dev/null @@ -1 +0,0 @@ -query: Security/CWE-094/ExpressionInjection.ql diff --git a/javascript/ql/test/query-tests/Security/CWE-094/ExpressionInjection/action1/action.yml b/javascript/ql/test/query-tests/Security/CWE-094/ExpressionInjection/action1/action.yml deleted file mode 100644 index e9a178cf3db..00000000000 --- a/javascript/ql/test/query-tests/Security/CWE-094/ExpressionInjection/action1/action.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: 'test' -description: 'test' -branding: - icon: 'test' - color: 'test' -inputs: - test: - description: test - required: false - default: 'test' -runs: - using: "composite" - steps: - - run: echo '${{ github.event.comment.body }}' \ No newline at end of file diff --git a/javascript/ql/test/query-tests/Security/CWE-094/ExpressionInjection/action2/action.yml b/javascript/ql/test/query-tests/Security/CWE-094/ExpressionInjection/action2/action.yml deleted file mode 100644 index 40fe0b31e6a..00000000000 --- a/javascript/ql/test/query-tests/Security/CWE-094/ExpressionInjection/action2/action.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: 'Hello World' -description: 'Greet someone and record the time' -inputs: - who-to-greet: # id of input - description: 'Who to greet' - required: true - default: 'World' -outputs: - time: # id of output - description: 'The time we greeted you' -runs: - using: 'docker' - steps: # this is actually invalid, used to test we correctly identify composite actions - - run: echo '${{ github.event.comment.body }}' - image: 'Dockerfile' - args: - - ${{ inputs.who-to-greet }} \ No newline at end of file diff --git a/javascript/ql/test/query-tests/Security/CWE-312/.github/workflows/test.yml b/javascript/ql/test/query-tests/Security/CWE-312/.github/workflows/test.yml deleted file mode 100644 index 473d5998695..00000000000 --- a/javascript/ql/test/query-tests/Security/CWE-312/.github/workflows/test.yml +++ /dev/null @@ -1,87 +0,0 @@ -name: secrets-in-artifacts -on: - pull_request: -jobs: - test1: # VULNERABLE - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: "Upload artifact" - uses: actions/upload-artifact@1746f4ab65b179e0ea60a494b83293b640dd5bba # v4.3.2 - with: - name: file - path: . - test2: # NOT VULNERABLE - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: "Upload artifact" - uses: actions/upload-artifact@v4 - with: - name: file - path: . - test3: # VULNERABLE - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: "Upload artifact" - uses: actions/upload-artifact@1746f4ab65b179e0ea60a494b83293b640dd5bba # v4.3.2 - with: - name: file - path: "*" - test4: # VULNERABLE - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - path: foo - - name: "Upload artifact" - uses: actions/upload-artifact@1746f4ab65b179e0ea60a494b83293b640dd5bba # v4.3.2 - with: - name: file - path: foo - test5: # VULNERABLE - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - path: foo - - name: "Upload artifact" - uses: actions/upload-artifact@1746f4ab65b179e0ea60a494b83293b640dd5bba # v4.3.2 - with: - name: file - path: foo/* - test6: # NOT VULNERABLE - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - path: pr - - name: "Upload artifact" - uses: actions/upload-artifact@1746f4ab65b179e0ea60a494b83293b640dd5bba # v4.3.2 - with: - name: file - path: foo - test7: # NOT VULNERABLE - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - persist-credentials: false - - name: "Upload artifact" - uses: actions/upload-artifact@1746f4ab65b179e0ea60a494b83293b640dd5bba # v4.3.2 - with: - name: file - path: . - test8: # VULNERABLE - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - persist-credentials: true - - name: "Upload artifact" - uses: actions/upload-artifact@1746f4ab65b179e0ea60a494b83293b640dd5bba # v4.3.2 - with: - name: file - path: . - diff --git a/javascript/ql/test/query-tests/Security/CWE-312/ActionsArtifactLeak.expected b/javascript/ql/test/query-tests/Security/CWE-312/ActionsArtifactLeak.expected deleted file mode 100644 index 575ddda89a4..00000000000 --- a/javascript/ql/test/query-tests/Security/CWE-312/ActionsArtifactLeak.expected +++ /dev/null @@ -1,5 +0,0 @@ -| .github/workflows/test.yml:9:9:14:2 | name: " ... tifact" | A secret may be exposed in an artifact. | -| .github/workflows/test.yml:27:9:32:2 | name: " ... tifact" | A secret may be exposed in an artifact. | -| .github/workflows/test.yml:38:9:43:2 | name: " ... tifact" | A secret may be exposed in an artifact. | -| .github/workflows/test.yml:49:9:54:2 | name: " ... tifact" | A secret may be exposed in an artifact. | -| .github/workflows/test.yml:82:9:86:18 | name: " ... tifact" | A secret may be exposed in an artifact. | diff --git a/javascript/ql/test/query-tests/Security/CWE-312/ActionsArtifactLeak.qlref b/javascript/ql/test/query-tests/Security/CWE-312/ActionsArtifactLeak.qlref deleted file mode 100644 index 79d8f4aea27..00000000000 --- a/javascript/ql/test/query-tests/Security/CWE-312/ActionsArtifactLeak.qlref +++ /dev/null @@ -1 +0,0 @@ -query: Security/CWE-312/ActionsArtifactLeak.ql diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/defs.bzl b/misc/bazel/3rdparty/tree_sitter_extractors_deps/defs.bzl index 440382b51c8..7f5a2035841 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/defs.bzl +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/defs.bzl @@ -300,6 +300,7 @@ _NORMAL_DEPENDENCIES = { "lazy_static": Label("@vendor_ts__lazy_static-1.5.0//:lazy_static"), "rayon": Label("@vendor_ts__rayon-1.10.0//:rayon"), "regex": Label("@vendor_ts__regex-1.11.1//:regex"), + "serde_json": Label("@vendor_ts__serde_json-1.0.140//:serde_json"), "tracing": Label("@vendor_ts__tracing-0.1.41//:tracing"), "tracing-subscriber": Label("@vendor_ts__tracing-subscriber-0.3.19//:tracing_subscriber"), "tree-sitter": Label("@vendor_ts__tree-sitter-0.24.6//:tree_sitter"), diff --git a/misc/codegen/generators/qlgen.py b/misc/codegen/generators/qlgen.py index 991c21990d4..271046404b1 100755 --- a/misc/codegen/generators/qlgen.py +++ b/misc/codegen/generators/qlgen.py @@ -361,10 +361,6 @@ def _get_all_properties_to_be_tested( type=p.type if not p.is_predicate else None, is_indexed=p.is_indexed, ) - if p.is_repeated and not p.is_optional: - yield ql.PropertyForTest(f"getNumberOf{p.plural}", type="int") - elif p.is_optional and not p.is_repeated: - yield ql.PropertyForTest(f"has{p.singular}") def _partition_iter(x, pred): @@ -372,11 +368,6 @@ def _partition_iter(x, pred): return filter(pred, x1), itertools.filterfalse(pred, x2) -def _partition(l, pred): - """partitions a list according to boolean predicate""" - return map(list, _partition_iter(l, pred)) - - def _is_in_qltest_collapsed_hierarchy( cls: schema.Class, lookup: typing.Dict[str, schema.Class] ): @@ -625,29 +616,18 @@ def generate(opts, renderer): test_dir / missing_test_source_filename, ) continue - total_props, partial_props = _partition( - _get_all_properties_to_be_tested(c, data.classes), - lambda p: p.is_total, - ) renderer.render( ql.ClassTester( class_name=c.name, - properties=total_props, + properties=list( + _get_all_properties_to_be_tested(c, data.classes) + ), elements_module=elements_module, # in case of collapsed hierarchies we want to see the actual QL class in results show_ql_class="qltest_collapse_hierarchy" in c.pragmas, ), test_dir / f"{c.name}.ql", ) - for p in partial_props: - renderer.render( - ql.PropertyTester( - class_name=c.name, - elements_module=elements_module, - property=p, - ), - test_dir / f"{c.name}_{p.getter}.ql", - ) final_synth_types = [] non_final_synth_types = [] diff --git a/misc/codegen/lib/ql.py b/misc/codegen/lib/ql.py index 7537aac995c..034cf452fb7 100644 --- a/misc/codegen/lib/ql.py +++ b/misc/codegen/lib/ql.py @@ -245,13 +245,6 @@ class ClassTester(TesterBase): show_ql_class: bool = False -@dataclass -class PropertyTester(TesterBase): - template: ClassVar = "ql_test_property" - - property: PropertyForTest - - @dataclass class MissingTestInstructions: template: ClassVar = "ql_test_missing" diff --git a/misc/codegen/templates/ql_test_class.mustache b/misc/codegen/templates/ql_test_class.mustache index 63c5e24050c..f63933e5ca6 100644 --- a/misc/codegen/templates/ql_test_class.mustache +++ b/misc/codegen/templates/ql_test_class.mustache @@ -3,14 +3,28 @@ import {{elements_module}} import TestUtils -from {{class_name}} x{{#properties}}, {{#type}}{{.}}{{/type}}{{^type}}string{{/type}} {{getter}}{{/properties}} -where toBeTested(x) and not x.isUnknown() +query predicate instances({{class_name}} x{{#show_ql_class}}, string primaryQlClasses{{/show_ql_class}}{{#properties}}{{#is_total}}, string {{getter}}__label, {{#type}}{{.}}{{/type}}{{^type}}string{{/type}} {{getter}}{{/is_total}}{{/properties}}) { + toBeTested(x) and not x.isUnknown() + {{#show_ql_class}} + and primaryQlClasses = x.getPrimaryQlClasses() + {{/show_ql_class}} + {{#properties}} + {{#is_total}} + and {{getter}}__label = "{{getter}}:" + {{#type}} + and {{getter}} = x.{{getter}}() + {{/type}} + {{^type}} + and if x.{{getter}}() then {{getter}} = "yes" else {{getter}} = "no" + {{/type}} + {{/is_total}} + {{/properties}} +} + {{#properties}} -{{#type}} -and {{getter}} = x.{{getter}}() -{{/type}} -{{^type}} -and if x.{{getter}}() then {{getter}} = "yes" else {{getter}} = "no" -{{/type}} +{{^is_total}} +query predicate {{getter}}({{class_name}} x{{#is_indexed}}, int index{{/is_indexed}}, {{type}} {{getter}}) { + toBeTested(x) and not x.isUnknown() and {{getter}} = x.{{getter}}({{#is_indexed}}index{{/is_indexed}}) +} +{{/is_total}} {{/properties}} -select x{{#show_ql_class}}, x.getPrimaryQlClasses(){{/show_ql_class}}{{#properties}}, "{{getter}}:", {{getter}}{{/properties}} diff --git a/misc/codegen/templates/ql_test_property.mustache b/misc/codegen/templates/ql_test_property.mustache deleted file mode 100644 index 2c293d7bcab..00000000000 --- a/misc/codegen/templates/ql_test_property.mustache +++ /dev/null @@ -1,10 +0,0 @@ -// generated by {{generator}}, do not edit - -import {{elements_module}} -import TestUtils - -{{#property}} -from {{class_name}} x{{#is_indexed}}, int index{{/is_indexed}} -where toBeTested(x) and not x.isUnknown() -select x, {{#is_indexed}}index, {{/is_indexed}}x.{{getter}}({{#is_indexed}}index{{/is_indexed}}) -{{/property}} diff --git a/misc/codegen/test/test_qlgen.py b/misc/codegen/test/test_qlgen.py index 43617d5f9e4..71fba74bee6 100644 --- a/misc/codegen/test/test_qlgen.py +++ b/misc/codegen/test/test_qlgen.py @@ -960,10 +960,6 @@ def a_ql_class_tester(**kwargs): return ql.ClassTester(**kwargs, elements_module=stub_import) -def a_ql_property_tester(**kwargs): - return ql.PropertyTester(**kwargs, elements_module=stub_import) - - def test_test_source_present(opts, generate_tests): write(opts.ql_test_output / "A" / "test.swift") assert generate_tests( @@ -1041,31 +1037,16 @@ def test_test_partial_properties(opts, generate_tests): "B/B.ql": a_ql_class_tester( class_name="B", properties=[ - ql.PropertyForTest(getter="hasX"), - ql.PropertyForTest(getter="getNumberOfYs", type="int"), - ql.PropertyForTest(getter="getNumberOfWs", type="int"), + ql.PropertyForTest(getter="getX", is_total=False, type="string"), + ql.PropertyForTest( + getter="getY", is_total=False, is_indexed=True, type="bool" + ), + ql.PropertyForTest( + getter="getZ", is_total=False, is_indexed=True, type="int" + ), + ql.PropertyForTest(getter="getAW", is_total=False, type="string"), ], ), - "B/B_getX.ql": a_ql_property_tester( - class_name="B", - property=ql.PropertyForTest(getter="getX", is_total=False, type="string"), - ), - "B/B_getY.ql": a_ql_property_tester( - class_name="B", - property=ql.PropertyForTest( - getter="getY", is_total=False, is_indexed=True, type="bool" - ), - ), - "B/B_getZ.ql": a_ql_property_tester( - class_name="B", - property=ql.PropertyForTest( - getter="getZ", is_total=False, is_indexed=True, type="int" - ), - ), - "B/B_getAW.ql": a_ql_property_tester( - class_name="B", - property=ql.PropertyForTest(getter="getAW", is_total=False, type="string"), - ), } @@ -1090,15 +1071,11 @@ def test_test_properties_deduplicated(opts, generate_tests): class_name="Final", properties=[ ql.PropertyForTest(getter="getX", type="string"), - ql.PropertyForTest(getter="getNumberOfYs", type="int"), + ql.PropertyForTest( + getter="getY", is_total=False, is_indexed=True, type="bool" + ), ], ), - "Final/Final_getY.ql": a_ql_property_tester( - class_name="Final", - property=ql.PropertyForTest( - getter="getY", is_total=False, is_indexed=True, type="bool" - ), - ), } diff --git a/misc/suite-helpers/CHANGELOG.md b/misc/suite-helpers/CHANGELOG.md index 534af566852..c7c1d20c642 100644 --- a/misc/suite-helpers/CHANGELOG.md +++ b/misc/suite-helpers/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.26 + +No user-facing changes. + ## 1.0.25 No user-facing changes. diff --git a/misc/suite-helpers/change-notes/released/1.0.26.md b/misc/suite-helpers/change-notes/released/1.0.26.md new file mode 100644 index 00000000000..4920e2b2435 --- /dev/null +++ b/misc/suite-helpers/change-notes/released/1.0.26.md @@ -0,0 +1,3 @@ +## 1.0.26 + +No user-facing changes. diff --git a/misc/suite-helpers/codeql-pack.release.yml b/misc/suite-helpers/codeql-pack.release.yml index a5a44030e85..125d169e44f 100644 --- a/misc/suite-helpers/codeql-pack.release.yml +++ b/misc/suite-helpers/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.25 +lastReleaseVersion: 1.0.26 diff --git a/misc/suite-helpers/qlpack.yml b/misc/suite-helpers/qlpack.yml index 848e808db34..77f627a1900 100644 --- a/misc/suite-helpers/qlpack.yml +++ b/misc/suite-helpers/qlpack.yml @@ -1,4 +1,4 @@ name: codeql/suite-helpers -version: 1.0.26-dev +version: 1.0.27-dev groups: shared warnOnImplicitThis: true diff --git a/python/ql/lib/CHANGELOG.md b/python/ql/lib/CHANGELOG.md index 09dc9d983a8..9f915e24edc 100644 --- a/python/ql/lib/CHANGELOG.md +++ b/python/ql/lib/CHANGELOG.md @@ -1,3 +1,7 @@ +## 4.0.10 + +No user-facing changes. + ## 4.0.9 No user-facing changes. diff --git a/python/ql/lib/change-notes/released/4.0.10.md b/python/ql/lib/change-notes/released/4.0.10.md new file mode 100644 index 00000000000..5dd008b9fa1 --- /dev/null +++ b/python/ql/lib/change-notes/released/4.0.10.md @@ -0,0 +1,3 @@ +## 4.0.10 + +No user-facing changes. diff --git a/python/ql/lib/codeql-pack.release.yml b/python/ql/lib/codeql-pack.release.yml index 25b75788f99..df9695089ca 100644 --- a/python/ql/lib/codeql-pack.release.yml +++ b/python/ql/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 4.0.9 +lastReleaseVersion: 4.0.10 diff --git a/python/ql/lib/qlpack.yml b/python/ql/lib/qlpack.yml index ffd394c2544..87101c60e09 100644 --- a/python/ql/lib/qlpack.yml +++ b/python/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/python-all -version: 4.0.10-dev +version: 4.0.11-dev groups: python dbscheme: semmlecode.python.dbscheme extractor: python diff --git a/python/ql/src/CHANGELOG.md b/python/ql/src/CHANGELOG.md index 292fda17c90..4a77f1a1d6d 100644 --- a/python/ql/src/CHANGELOG.md +++ b/python/ql/src/CHANGELOG.md @@ -1,3 +1,13 @@ +## 1.6.0 + +### Query Metadata Changes + +* The tag `quality` has been added to multiple Python quality queries for consistency. They have all been given a tag for one of the two top-level categories `reliability` or `maintainability`, and a tag for a sub-category. See [Query file metadata and alert message style guide](https://github.com/github/codeql/blob/main/docs/query-metadata-style-guide.md#quality-query-sub-category-tags) for more information about these categories. + +### Minor Analysis Improvements + +* The `py/iter-returns-non-self` query has been modernized, and no longer alerts for certain cases where an equivalent iterator is returned. + ## 1.5.2 ### Minor Analysis Improvements diff --git a/python/ql/src/change-notes/2025-05-23-iter-not-return-self.md b/python/ql/src/change-notes/2025-05-23-iter-not-return-self.md deleted file mode 100644 index 80b8313a72b..00000000000 --- a/python/ql/src/change-notes/2025-05-23-iter-not-return-self.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -category: minorAnalysis ---- -* The `py/iter-returns-non-self` query has been modernized, and no longer alerts for certain cases where an equivalent iterator is returned. \ No newline at end of file diff --git a/python/ql/src/change-notes/2025-06-18-quality-query-metadata.md b/python/ql/src/change-notes/released/1.6.0.md similarity index 59% rename from python/ql/src/change-notes/2025-06-18-quality-query-metadata.md rename to python/ql/src/change-notes/released/1.6.0.md index 92533f7df75..72dd1bf2002 100644 --- a/python/ql/src/change-notes/2025-06-18-quality-query-metadata.md +++ b/python/ql/src/change-notes/released/1.6.0.md @@ -1,5 +1,9 @@ +## 1.6.0 ---- -category: queryMetadata ---- -* The tag `quality` has been added to multiple Python quality queries for consistency. They have all been given a tag for one of the two top-level categories `reliability` or `maintainability`, and a tag for a sub-category. See [Query file metadata and alert message style guide](https://github.com/github/codeql/blob/main/docs/query-metadata-style-guide.md#quality-query-sub-category-tags) for more information about these categories. \ No newline at end of file +### Query Metadata Changes + +* The tag `quality` has been added to multiple Python quality queries for consistency. They have all been given a tag for one of the two top-level categories `reliability` or `maintainability`, and a tag for a sub-category. See [Query file metadata and alert message style guide](https://github.com/github/codeql/blob/main/docs/query-metadata-style-guide.md#quality-query-sub-category-tags) for more information about these categories. + +### Minor Analysis Improvements + +* The `py/iter-returns-non-self` query has been modernized, and no longer alerts for certain cases where an equivalent iterator is returned. diff --git a/python/ql/src/codeql-pack.release.yml b/python/ql/src/codeql-pack.release.yml index 7eb901bae56..c4f0b07d533 100644 --- a/python/ql/src/codeql-pack.release.yml +++ b/python/ql/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.5.2 +lastReleaseVersion: 1.6.0 diff --git a/python/ql/src/qlpack.yml b/python/ql/src/qlpack.yml index 2fa2d2204b9..ff38476458f 100644 --- a/python/ql/src/qlpack.yml +++ b/python/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/python-queries -version: 1.5.3-dev +version: 1.6.1-dev groups: - python - queries diff --git a/ql/extractor/src/generator.rs b/ql/extractor/src/generator.rs index 1dca6969f34..ea663896e64 100644 --- a/ql/extractor/src/generator.rs +++ b/ql/extractor/src/generator.rs @@ -36,5 +36,5 @@ pub fn run(options: Options) -> std::io::Result<()> { }, ]; - generate(languages, options.dbscheme, options.library) + generate(languages, options.dbscheme, options.library, false) } diff --git a/ql/ql/src/codeql_ql/ast/Ast.qll b/ql/ql/src/codeql_ql/ast/Ast.qll index 1e3ac4e8c82..89bdf14d4b2 100644 --- a/ql/ql/src/codeql_ql/ast/Ast.qll +++ b/ql/ql/src/codeql_ql/ast/Ast.qll @@ -2542,6 +2542,10 @@ private class CallerArg extends AnnotationArg { CallerArg() { this.getValue() = "caller" } } +private class CallerQArg extends AnnotationArg { + CallerQArg() { this.getValue() = "caller?" } +} + private class LocalArg extends AnnotationArg { LocalArg() { this.getValue() = "local" } } @@ -2616,6 +2620,13 @@ class OverlayCaller extends Annotation { override string toString() { result = "overlay[caller]" } } +/** An `overlay[caller?]` annotation. */ +class OverlayCallerQ extends Annotation { + OverlayCallerQ() { this.getName() = "overlay" and this.getArgs(0) instanceof CallerQArg } + + override string toString() { result = "overlay[caller?]" } +} + /** An `overlay[local]` annotation. */ class OverlayLocal extends Annotation { OverlayLocal() { this.getName() = "overlay" and this.getArgs(0) instanceof LocalArg } diff --git a/ql/ql/src/queries/overlay/InlineOverlayCaller.ql b/ql/ql/src/queries/overlay/InlineOverlayCaller.ql index d27a0ade9bb..0853dfde830 100644 --- a/ql/ql/src/queries/overlay/InlineOverlayCaller.ql +++ b/ql/ql/src/queries/overlay/InlineOverlayCaller.ql @@ -31,11 +31,12 @@ where mayBeLocal(p) and p.getAnAnnotation() instanceof Inline and not p.getAnAnnotation() instanceof OverlayCaller and + not p.getAnAnnotation() instanceof OverlayCallerQ and not p.isPrivate() select p, "This possibly local non-private inline predicate will not " + "be inlined across the overlay frontier. This may negatively " + "affect evaluation performance. Consider adding an " + - "`overlay[caller]` annotation to allow inlining across the " + - "overlay frontier. Note that adding an `overlay[caller]` " + + "`overlay[caller]` or `overlay[caller?]` annotation to allow inlining across the " + + "overlay frontier. Note that adding an `overlay[caller]` or `overlay[caller?]` " + "annotation affects semantics under overlay evaluation." diff --git a/ql/ql/test/queries/overlay/InlineOverlayCaller/InlineOverlayCaller.expected b/ql/ql/test/queries/overlay/InlineOverlayCaller/InlineOverlayCaller.expected index d89f1dcb8ef..5075797c0dd 100644 --- a/ql/ql/test/queries/overlay/InlineOverlayCaller/InlineOverlayCaller.expected +++ b/ql/ql/test/queries/overlay/InlineOverlayCaller/InlineOverlayCaller.expected @@ -1 +1 @@ -| Test.qll:7:11:7:13 | ClasslessPredicate foo | This possibly local non-private inline predicate will not be inlined across the overlay frontier. This may negatively affect evaluation performance. Consider adding an `overlay[caller]` annotation to allow inlining across the overlay frontier. Note that adding an `overlay[caller]` annotation affects semantics under overlay evaluation. | +| Test.qll:7:11:7:13 | ClasslessPredicate foo | This possibly local non-private inline predicate will not be inlined across the overlay frontier. This may negatively affect evaluation performance. Consider adding an `overlay[caller]` or `overlay[caller?]` annotation to allow inlining across the overlay frontier. Note that adding an `overlay[caller]` or `overlay[caller?]` annotation affects semantics under overlay evaluation. | diff --git a/ql/ql/test/queries/overlay/InlineOverlayCaller/Test.qll b/ql/ql/test/queries/overlay/InlineOverlayCaller/Test.qll index 3e72490ebb0..e25577d91a1 100644 --- a/ql/ql/test/queries/overlay/InlineOverlayCaller/Test.qll +++ b/ql/ql/test/queries/overlay/InlineOverlayCaller/Test.qll @@ -12,3 +12,7 @@ predicate bar(int x) { x = 43 } pragma[inline] private predicate baz(int x) { x = 44 } + +overlay[caller?] +pragma[inline] +predicate baw(int x) { x = 45 } diff --git a/ruby/codeql-extractor.yml b/ruby/codeql-extractor.yml index abb50db2a29..a832b0c1065 100644 --- a/ruby/codeql-extractor.yml +++ b/ruby/codeql-extractor.yml @@ -3,6 +3,7 @@ display_name: "Ruby" version: 0.1.0 column_kind: "utf8" legacy_qltest_extraction: true +overlay_support_version: 20250108 build_modes: - none github_api_languages: diff --git a/ruby/downgrades/dc51d416301df12df5b70fbc4338de6cc1f82bfd/old.dbscheme b/ruby/downgrades/dc51d416301df12df5b70fbc4338de6cc1f82bfd/old.dbscheme new file mode 100644 index 00000000000..dc51d416301 --- /dev/null +++ b/ruby/downgrades/dc51d416301df12df5b70fbc4338de6cc1f82bfd/old.dbscheme @@ -0,0 +1,1532 @@ +// CodeQL database schema for Ruby +// Automatically generated from the tree-sitter grammar; do not edit + +/*- Files and folders -*/ + +/** + * The location of an element. + * The location spans column `startcolumn` of line `startline` to + * column `endcolumn` of line `endline` in file `file`. + * For more information, see + * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/). + */ +locations_default( + unique int id: @location_default, + int file: @file ref, + int beginLine: int ref, + int beginColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +files( + unique int id: @file, + string name: string ref +); + +folders( + unique int id: @folder, + string name: string ref +); + +@container = @file | @folder + +containerparent( + int parent: @container ref, + unique int child: @container ref +); + +/*- Empty location -*/ + +empty_location( + int location: @location_default ref +); + +/*- Source location prefix -*/ + +/** + * The source location of the snapshot. + */ +sourceLocationPrefix(string prefix : string ref); + +/*- Diagnostic messages -*/ + +diagnostics( + unique int id: @diagnostic, + int severity: int ref, + string error_tag: string ref, + string error_message: string ref, + string full_error_message: string ref, + int location: @location_default ref +); + +/*- Diagnostic messages: severity -*/ + +case @diagnostic.severity of + 10 = @diagnostic_debug +| 20 = @diagnostic_info +| 30 = @diagnostic_warning +| 40 = @diagnostic_error +; + +/*- YAML -*/ + +#keyset[parent, idx] +yaml (unique int id: @yaml_node, + int kind: int ref, + int parent: @yaml_node_parent ref, + int idx: int ref, + string tag: string ref, + string tostring: string ref); + +case @yaml_node.kind of + 0 = @yaml_scalar_node +| 1 = @yaml_mapping_node +| 2 = @yaml_sequence_node +| 3 = @yaml_alias_node +; + +@yaml_collection_node = @yaml_mapping_node | @yaml_sequence_node; + +@yaml_node_parent = @yaml_collection_node | @file; + +yaml_anchors (unique int node: @yaml_node ref, + string anchor: string ref); + +yaml_aliases (unique int alias: @yaml_alias_node ref, + string target: string ref); + +yaml_scalars (unique int scalar: @yaml_scalar_node ref, + int style: int ref, + string value: string ref); + +yaml_errors (unique int id: @yaml_error, + string message: string ref); + +yaml_locations(unique int locatable: @yaml_locatable ref, + int location: @location_default ref); + +@yaml_locatable = @yaml_node | @yaml_error; + +/*- Database metadata -*/ +databaseMetadata( + string metadataKey: string ref, + string value: string ref +); + +/*- Ruby dbscheme -*/ +@ruby_underscore_arg = @ruby_assignment | @ruby_binary | @ruby_conditional | @ruby_operator_assignment | @ruby_range | @ruby_unary | @ruby_underscore_primary + +@ruby_underscore_call_operator = @ruby_reserved_word + +@ruby_underscore_expression = @ruby_assignment | @ruby_binary | @ruby_break | @ruby_call | @ruby_match_pattern | @ruby_next | @ruby_operator_assignment | @ruby_return | @ruby_test_pattern | @ruby_unary | @ruby_underscore_arg | @ruby_yield + +@ruby_underscore_lhs = @ruby_call | @ruby_element_reference | @ruby_scope_resolution | @ruby_token_false | @ruby_token_nil | @ruby_token_true | @ruby_underscore_variable + +@ruby_underscore_method_name = @ruby_delimited_symbol | @ruby_setter | @ruby_token_constant | @ruby_token_identifier | @ruby_token_operator | @ruby_token_simple_symbol | @ruby_underscore_nonlocal_variable + +@ruby_underscore_nonlocal_variable = @ruby_token_class_variable | @ruby_token_global_variable | @ruby_token_instance_variable + +@ruby_underscore_pattern_constant = @ruby_scope_resolution | @ruby_token_constant + +@ruby_underscore_pattern_expr = @ruby_alternative_pattern | @ruby_as_pattern | @ruby_underscore_pattern_expr_basic + +@ruby_underscore_pattern_expr_basic = @ruby_array_pattern | @ruby_expression_reference_pattern | @ruby_find_pattern | @ruby_hash_pattern | @ruby_parenthesized_pattern | @ruby_range | @ruby_token_identifier | @ruby_underscore_pattern_constant | @ruby_underscore_pattern_primitive | @ruby_variable_reference_pattern + +@ruby_underscore_pattern_primitive = @ruby_delimited_symbol | @ruby_lambda | @ruby_regex | @ruby_string__ | @ruby_string_array | @ruby_subshell | @ruby_symbol_array | @ruby_token_encoding | @ruby_token_false | @ruby_token_file | @ruby_token_heredoc_beginning | @ruby_token_line | @ruby_token_nil | @ruby_token_self | @ruby_token_simple_symbol | @ruby_token_true | @ruby_unary | @ruby_underscore_simple_numeric + +@ruby_underscore_pattern_top_expr_body = @ruby_array_pattern | @ruby_find_pattern | @ruby_hash_pattern | @ruby_underscore_pattern_expr + +@ruby_underscore_primary = @ruby_array | @ruby_begin | @ruby_break | @ruby_call | @ruby_case__ | @ruby_case_match | @ruby_chained_string | @ruby_class | @ruby_delimited_symbol | @ruby_for | @ruby_hash | @ruby_if | @ruby_lambda | @ruby_method | @ruby_module | @ruby_next | @ruby_parenthesized_statements | @ruby_redo | @ruby_regex | @ruby_retry | @ruby_return | @ruby_singleton_class | @ruby_singleton_method | @ruby_string__ | @ruby_string_array | @ruby_subshell | @ruby_symbol_array | @ruby_token_character | @ruby_token_heredoc_beginning | @ruby_token_simple_symbol | @ruby_unary | @ruby_underscore_lhs | @ruby_underscore_simple_numeric | @ruby_unless | @ruby_until | @ruby_while | @ruby_yield + +@ruby_underscore_simple_numeric = @ruby_complex | @ruby_rational | @ruby_token_float | @ruby_token_integer + +@ruby_underscore_statement = @ruby_alias | @ruby_begin_block | @ruby_end_block | @ruby_if_modifier | @ruby_rescue_modifier | @ruby_undef | @ruby_underscore_expression | @ruby_unless_modifier | @ruby_until_modifier | @ruby_while_modifier + +@ruby_underscore_variable = @ruby_token_constant | @ruby_token_identifier | @ruby_token_self | @ruby_token_super | @ruby_underscore_nonlocal_variable + +ruby_alias_def( + unique int id: @ruby_alias, + int alias: @ruby_underscore_method_name ref, + int name: @ruby_underscore_method_name ref +); + +#keyset[ruby_alternative_pattern, index] +ruby_alternative_pattern_alternatives( + int ruby_alternative_pattern: @ruby_alternative_pattern ref, + int index: int ref, + unique int alternatives: @ruby_underscore_pattern_expr_basic ref +); + +ruby_alternative_pattern_def( + unique int id: @ruby_alternative_pattern +); + +@ruby_argument_list_child_type = @ruby_block_argument | @ruby_hash_splat_argument | @ruby_pair | @ruby_splat_argument | @ruby_token_forward_argument | @ruby_underscore_expression + +#keyset[ruby_argument_list, index] +ruby_argument_list_child( + int ruby_argument_list: @ruby_argument_list ref, + int index: int ref, + unique int child: @ruby_argument_list_child_type ref +); + +ruby_argument_list_def( + unique int id: @ruby_argument_list +); + +@ruby_array_child_type = @ruby_block_argument | @ruby_hash_splat_argument | @ruby_pair | @ruby_splat_argument | @ruby_token_forward_argument | @ruby_underscore_expression + +#keyset[ruby_array, index] +ruby_array_child( + int ruby_array: @ruby_array ref, + int index: int ref, + unique int child: @ruby_array_child_type ref +); + +ruby_array_def( + unique int id: @ruby_array +); + +ruby_array_pattern_class( + unique int ruby_array_pattern: @ruby_array_pattern ref, + unique int class: @ruby_underscore_pattern_constant ref +); + +@ruby_array_pattern_child_type = @ruby_splat_parameter | @ruby_underscore_pattern_expr + +#keyset[ruby_array_pattern, index] +ruby_array_pattern_child( + int ruby_array_pattern: @ruby_array_pattern ref, + int index: int ref, + unique int child: @ruby_array_pattern_child_type ref +); + +ruby_array_pattern_def( + unique int id: @ruby_array_pattern +); + +ruby_as_pattern_def( + unique int id: @ruby_as_pattern, + int name: @ruby_token_identifier ref, + int value: @ruby_underscore_pattern_expr ref +); + +@ruby_assignment_left_type = @ruby_left_assignment_list | @ruby_underscore_lhs + +@ruby_assignment_right_type = @ruby_rescue_modifier | @ruby_right_assignment_list | @ruby_splat_argument | @ruby_underscore_expression + +ruby_assignment_def( + unique int id: @ruby_assignment, + int left: @ruby_assignment_left_type ref, + int right: @ruby_assignment_right_type ref +); + +@ruby_bare_string_child_type = @ruby_interpolation | @ruby_token_escape_sequence | @ruby_token_string_content + +#keyset[ruby_bare_string, index] +ruby_bare_string_child( + int ruby_bare_string: @ruby_bare_string ref, + int index: int ref, + unique int child: @ruby_bare_string_child_type ref +); + +ruby_bare_string_def( + unique int id: @ruby_bare_string +); + +@ruby_bare_symbol_child_type = @ruby_interpolation | @ruby_token_escape_sequence | @ruby_token_string_content + +#keyset[ruby_bare_symbol, index] +ruby_bare_symbol_child( + int ruby_bare_symbol: @ruby_bare_symbol ref, + int index: int ref, + unique int child: @ruby_bare_symbol_child_type ref +); + +ruby_bare_symbol_def( + unique int id: @ruby_bare_symbol +); + +@ruby_begin_child_type = @ruby_else | @ruby_ensure | @ruby_rescue | @ruby_token_empty_statement | @ruby_underscore_statement + +#keyset[ruby_begin, index] +ruby_begin_child( + int ruby_begin: @ruby_begin ref, + int index: int ref, + unique int child: @ruby_begin_child_type ref +); + +ruby_begin_def( + unique int id: @ruby_begin +); + +@ruby_begin_block_child_type = @ruby_token_empty_statement | @ruby_underscore_statement + +#keyset[ruby_begin_block, index] +ruby_begin_block_child( + int ruby_begin_block: @ruby_begin_block ref, + int index: int ref, + unique int child: @ruby_begin_block_child_type ref +); + +ruby_begin_block_def( + unique int id: @ruby_begin_block +); + +@ruby_binary_left_type = @ruby_underscore_expression | @ruby_underscore_simple_numeric + +case @ruby_binary.operator of + 0 = @ruby_binary_bangequal +| 1 = @ruby_binary_bangtilde +| 2 = @ruby_binary_percent +| 3 = @ruby_binary_ampersand +| 4 = @ruby_binary_ampersandampersand +| 5 = @ruby_binary_star +| 6 = @ruby_binary_starstar +| 7 = @ruby_binary_plus +| 8 = @ruby_binary_minus +| 9 = @ruby_binary_slash +| 10 = @ruby_binary_langle +| 11 = @ruby_binary_langlelangle +| 12 = @ruby_binary_langleequal +| 13 = @ruby_binary_langleequalrangle +| 14 = @ruby_binary_equalequal +| 15 = @ruby_binary_equalequalequal +| 16 = @ruby_binary_equaltilde +| 17 = @ruby_binary_rangle +| 18 = @ruby_binary_rangleequal +| 19 = @ruby_binary_ranglerangle +| 20 = @ruby_binary_caret +| 21 = @ruby_binary_and +| 22 = @ruby_binary_or +| 23 = @ruby_binary_pipe +| 24 = @ruby_binary_pipepipe +; + + +ruby_binary_def( + unique int id: @ruby_binary, + int left: @ruby_binary_left_type ref, + int operator: int ref, + int right: @ruby_underscore_expression ref +); + +ruby_block_body( + unique int ruby_block: @ruby_block ref, + unique int body: @ruby_block_body ref +); + +ruby_block_parameters( + unique int ruby_block: @ruby_block ref, + unique int parameters: @ruby_block_parameters ref +); + +ruby_block_def( + unique int id: @ruby_block +); + +ruby_block_argument_child( + unique int ruby_block_argument: @ruby_block_argument ref, + unique int child: @ruby_underscore_arg ref +); + +ruby_block_argument_def( + unique int id: @ruby_block_argument +); + +@ruby_block_body_child_type = @ruby_token_empty_statement | @ruby_underscore_statement + +#keyset[ruby_block_body, index] +ruby_block_body_child( + int ruby_block_body: @ruby_block_body ref, + int index: int ref, + unique int child: @ruby_block_body_child_type ref +); + +ruby_block_body_def( + unique int id: @ruby_block_body +); + +ruby_block_parameter_name( + unique int ruby_block_parameter: @ruby_block_parameter ref, + unique int name: @ruby_token_identifier ref +); + +ruby_block_parameter_def( + unique int id: @ruby_block_parameter +); + +#keyset[ruby_block_parameters, index] +ruby_block_parameters_locals( + int ruby_block_parameters: @ruby_block_parameters ref, + int index: int ref, + unique int locals: @ruby_token_identifier ref +); + +@ruby_block_parameters_child_type = @ruby_block_parameter | @ruby_destructured_parameter | @ruby_hash_splat_parameter | @ruby_keyword_parameter | @ruby_optional_parameter | @ruby_splat_parameter | @ruby_token_forward_parameter | @ruby_token_hash_splat_nil | @ruby_token_identifier + +#keyset[ruby_block_parameters, index] +ruby_block_parameters_child( + int ruby_block_parameters: @ruby_block_parameters ref, + int index: int ref, + unique int child: @ruby_block_parameters_child_type ref +); + +ruby_block_parameters_def( + unique int id: @ruby_block_parameters +); + +@ruby_body_statement_child_type = @ruby_else | @ruby_ensure | @ruby_rescue | @ruby_token_empty_statement | @ruby_underscore_statement + +#keyset[ruby_body_statement, index] +ruby_body_statement_child( + int ruby_body_statement: @ruby_body_statement ref, + int index: int ref, + unique int child: @ruby_body_statement_child_type ref +); + +ruby_body_statement_def( + unique int id: @ruby_body_statement +); + +ruby_break_child( + unique int ruby_break: @ruby_break ref, + unique int child: @ruby_argument_list ref +); + +ruby_break_def( + unique int id: @ruby_break +); + +ruby_call_arguments( + unique int ruby_call: @ruby_call ref, + unique int arguments: @ruby_argument_list ref +); + +@ruby_call_block_type = @ruby_block | @ruby_do_block + +ruby_call_block( + unique int ruby_call: @ruby_call ref, + unique int block: @ruby_call_block_type ref +); + +@ruby_call_method_type = @ruby_token_operator | @ruby_underscore_variable + +ruby_call_method( + unique int ruby_call: @ruby_call ref, + unique int method: @ruby_call_method_type ref +); + +ruby_call_operator( + unique int ruby_call: @ruby_call ref, + unique int operator: @ruby_underscore_call_operator ref +); + +ruby_call_receiver( + unique int ruby_call: @ruby_call ref, + unique int receiver: @ruby_underscore_primary ref +); + +ruby_call_def( + unique int id: @ruby_call +); + +ruby_case_value( + unique int ruby_case__: @ruby_case__ ref, + unique int value: @ruby_underscore_statement ref +); + +@ruby_case_child_type = @ruby_else | @ruby_when + +#keyset[ruby_case__, index] +ruby_case_child( + int ruby_case__: @ruby_case__ ref, + int index: int ref, + unique int child: @ruby_case_child_type ref +); + +ruby_case_def( + unique int id: @ruby_case__ +); + +#keyset[ruby_case_match, index] +ruby_case_match_clauses( + int ruby_case_match: @ruby_case_match ref, + int index: int ref, + unique int clauses: @ruby_in_clause ref +); + +ruby_case_match_else( + unique int ruby_case_match: @ruby_case_match ref, + unique int else: @ruby_else ref +); + +ruby_case_match_def( + unique int id: @ruby_case_match, + int value: @ruby_underscore_statement ref +); + +#keyset[ruby_chained_string, index] +ruby_chained_string_child( + int ruby_chained_string: @ruby_chained_string ref, + int index: int ref, + unique int child: @ruby_string__ ref +); + +ruby_chained_string_def( + unique int id: @ruby_chained_string +); + +ruby_class_body( + unique int ruby_class: @ruby_class ref, + unique int body: @ruby_body_statement ref +); + +@ruby_class_name_type = @ruby_scope_resolution | @ruby_token_constant + +ruby_class_superclass( + unique int ruby_class: @ruby_class ref, + unique int superclass: @ruby_superclass ref +); + +ruby_class_def( + unique int id: @ruby_class, + int name: @ruby_class_name_type ref +); + +@ruby_complex_child_type = @ruby_rational | @ruby_token_float | @ruby_token_integer + +ruby_complex_def( + unique int id: @ruby_complex, + int child: @ruby_complex_child_type ref +); + +ruby_conditional_def( + unique int id: @ruby_conditional, + int alternative: @ruby_underscore_arg ref, + int condition: @ruby_underscore_arg ref, + int consequence: @ruby_underscore_arg ref +); + +@ruby_delimited_symbol_child_type = @ruby_interpolation | @ruby_token_escape_sequence | @ruby_token_string_content + +#keyset[ruby_delimited_symbol, index] +ruby_delimited_symbol_child( + int ruby_delimited_symbol: @ruby_delimited_symbol ref, + int index: int ref, + unique int child: @ruby_delimited_symbol_child_type ref +); + +ruby_delimited_symbol_def( + unique int id: @ruby_delimited_symbol +); + +@ruby_destructured_left_assignment_child_type = @ruby_destructured_left_assignment | @ruby_rest_assignment | @ruby_underscore_lhs + +#keyset[ruby_destructured_left_assignment, index] +ruby_destructured_left_assignment_child( + int ruby_destructured_left_assignment: @ruby_destructured_left_assignment ref, + int index: int ref, + unique int child: @ruby_destructured_left_assignment_child_type ref +); + +ruby_destructured_left_assignment_def( + unique int id: @ruby_destructured_left_assignment +); + +@ruby_destructured_parameter_child_type = @ruby_block_parameter | @ruby_destructured_parameter | @ruby_hash_splat_parameter | @ruby_keyword_parameter | @ruby_optional_parameter | @ruby_splat_parameter | @ruby_token_forward_parameter | @ruby_token_hash_splat_nil | @ruby_token_identifier + +#keyset[ruby_destructured_parameter, index] +ruby_destructured_parameter_child( + int ruby_destructured_parameter: @ruby_destructured_parameter ref, + int index: int ref, + unique int child: @ruby_destructured_parameter_child_type ref +); + +ruby_destructured_parameter_def( + unique int id: @ruby_destructured_parameter +); + +@ruby_do_child_type = @ruby_token_empty_statement | @ruby_underscore_statement + +#keyset[ruby_do, index] +ruby_do_child( + int ruby_do: @ruby_do ref, + int index: int ref, + unique int child: @ruby_do_child_type ref +); + +ruby_do_def( + unique int id: @ruby_do +); + +ruby_do_block_body( + unique int ruby_do_block: @ruby_do_block ref, + unique int body: @ruby_body_statement ref +); + +ruby_do_block_parameters( + unique int ruby_do_block: @ruby_do_block ref, + unique int parameters: @ruby_block_parameters ref +); + +ruby_do_block_def( + unique int id: @ruby_do_block +); + +@ruby_element_reference_block_type = @ruby_block | @ruby_do_block + +ruby_element_reference_block( + unique int ruby_element_reference: @ruby_element_reference ref, + unique int block: @ruby_element_reference_block_type ref +); + +@ruby_element_reference_child_type = @ruby_block_argument | @ruby_hash_splat_argument | @ruby_pair | @ruby_splat_argument | @ruby_token_forward_argument | @ruby_underscore_expression + +#keyset[ruby_element_reference, index] +ruby_element_reference_child( + int ruby_element_reference: @ruby_element_reference ref, + int index: int ref, + unique int child: @ruby_element_reference_child_type ref +); + +ruby_element_reference_def( + unique int id: @ruby_element_reference, + int object: @ruby_underscore_primary ref +); + +@ruby_else_child_type = @ruby_token_empty_statement | @ruby_underscore_statement + +#keyset[ruby_else, index] +ruby_else_child( + int ruby_else: @ruby_else ref, + int index: int ref, + unique int child: @ruby_else_child_type ref +); + +ruby_else_def( + unique int id: @ruby_else +); + +@ruby_elsif_alternative_type = @ruby_else | @ruby_elsif + +ruby_elsif_alternative( + unique int ruby_elsif: @ruby_elsif ref, + unique int alternative: @ruby_elsif_alternative_type ref +); + +ruby_elsif_consequence( + unique int ruby_elsif: @ruby_elsif ref, + unique int consequence: @ruby_then ref +); + +ruby_elsif_def( + unique int id: @ruby_elsif, + int condition: @ruby_underscore_statement ref +); + +@ruby_end_block_child_type = @ruby_token_empty_statement | @ruby_underscore_statement + +#keyset[ruby_end_block, index] +ruby_end_block_child( + int ruby_end_block: @ruby_end_block ref, + int index: int ref, + unique int child: @ruby_end_block_child_type ref +); + +ruby_end_block_def( + unique int id: @ruby_end_block +); + +@ruby_ensure_child_type = @ruby_token_empty_statement | @ruby_underscore_statement + +#keyset[ruby_ensure, index] +ruby_ensure_child( + int ruby_ensure: @ruby_ensure ref, + int index: int ref, + unique int child: @ruby_ensure_child_type ref +); + +ruby_ensure_def( + unique int id: @ruby_ensure +); + +ruby_exception_variable_def( + unique int id: @ruby_exception_variable, + int child: @ruby_underscore_lhs ref +); + +@ruby_exceptions_child_type = @ruby_splat_argument | @ruby_underscore_arg + +#keyset[ruby_exceptions, index] +ruby_exceptions_child( + int ruby_exceptions: @ruby_exceptions ref, + int index: int ref, + unique int child: @ruby_exceptions_child_type ref +); + +ruby_exceptions_def( + unique int id: @ruby_exceptions +); + +ruby_expression_reference_pattern_def( + unique int id: @ruby_expression_reference_pattern, + int value: @ruby_underscore_expression ref +); + +ruby_find_pattern_class( + unique int ruby_find_pattern: @ruby_find_pattern ref, + unique int class: @ruby_underscore_pattern_constant ref +); + +@ruby_find_pattern_child_type = @ruby_splat_parameter | @ruby_underscore_pattern_expr + +#keyset[ruby_find_pattern, index] +ruby_find_pattern_child( + int ruby_find_pattern: @ruby_find_pattern ref, + int index: int ref, + unique int child: @ruby_find_pattern_child_type ref +); + +ruby_find_pattern_def( + unique int id: @ruby_find_pattern +); + +@ruby_for_pattern_type = @ruby_left_assignment_list | @ruby_underscore_lhs + +ruby_for_def( + unique int id: @ruby_for, + int body: @ruby_do ref, + int pattern: @ruby_for_pattern_type ref, + int value: @ruby_in ref +); + +@ruby_hash_child_type = @ruby_hash_splat_argument | @ruby_pair + +#keyset[ruby_hash, index] +ruby_hash_child( + int ruby_hash: @ruby_hash ref, + int index: int ref, + unique int child: @ruby_hash_child_type ref +); + +ruby_hash_def( + unique int id: @ruby_hash +); + +ruby_hash_pattern_class( + unique int ruby_hash_pattern: @ruby_hash_pattern ref, + unique int class: @ruby_underscore_pattern_constant ref +); + +@ruby_hash_pattern_child_type = @ruby_hash_splat_parameter | @ruby_keyword_pattern | @ruby_token_hash_splat_nil + +#keyset[ruby_hash_pattern, index] +ruby_hash_pattern_child( + int ruby_hash_pattern: @ruby_hash_pattern ref, + int index: int ref, + unique int child: @ruby_hash_pattern_child_type ref +); + +ruby_hash_pattern_def( + unique int id: @ruby_hash_pattern +); + +ruby_hash_splat_argument_child( + unique int ruby_hash_splat_argument: @ruby_hash_splat_argument ref, + unique int child: @ruby_underscore_arg ref +); + +ruby_hash_splat_argument_def( + unique int id: @ruby_hash_splat_argument +); + +ruby_hash_splat_parameter_name( + unique int ruby_hash_splat_parameter: @ruby_hash_splat_parameter ref, + unique int name: @ruby_token_identifier ref +); + +ruby_hash_splat_parameter_def( + unique int id: @ruby_hash_splat_parameter +); + +@ruby_heredoc_body_child_type = @ruby_interpolation | @ruby_token_escape_sequence | @ruby_token_heredoc_content | @ruby_token_heredoc_end + +#keyset[ruby_heredoc_body, index] +ruby_heredoc_body_child( + int ruby_heredoc_body: @ruby_heredoc_body ref, + int index: int ref, + unique int child: @ruby_heredoc_body_child_type ref +); + +ruby_heredoc_body_def( + unique int id: @ruby_heredoc_body +); + +@ruby_if_alternative_type = @ruby_else | @ruby_elsif + +ruby_if_alternative( + unique int ruby_if: @ruby_if ref, + unique int alternative: @ruby_if_alternative_type ref +); + +ruby_if_consequence( + unique int ruby_if: @ruby_if ref, + unique int consequence: @ruby_then ref +); + +ruby_if_def( + unique int id: @ruby_if, + int condition: @ruby_underscore_statement ref +); + +ruby_if_guard_def( + unique int id: @ruby_if_guard, + int condition: @ruby_underscore_expression ref +); + +ruby_if_modifier_def( + unique int id: @ruby_if_modifier, + int body: @ruby_underscore_statement ref, + int condition: @ruby_underscore_expression ref +); + +ruby_in_def( + unique int id: @ruby_in, + int child: @ruby_underscore_arg ref +); + +ruby_in_clause_body( + unique int ruby_in_clause: @ruby_in_clause ref, + unique int body: @ruby_then ref +); + +@ruby_in_clause_guard_type = @ruby_if_guard | @ruby_unless_guard + +ruby_in_clause_guard( + unique int ruby_in_clause: @ruby_in_clause ref, + unique int guard: @ruby_in_clause_guard_type ref +); + +ruby_in_clause_def( + unique int id: @ruby_in_clause, + int pattern: @ruby_underscore_pattern_top_expr_body ref +); + +@ruby_interpolation_child_type = @ruby_token_empty_statement | @ruby_underscore_nonlocal_variable | @ruby_underscore_statement + +#keyset[ruby_interpolation, index] +ruby_interpolation_child( + int ruby_interpolation: @ruby_interpolation ref, + int index: int ref, + unique int child: @ruby_interpolation_child_type ref +); + +ruby_interpolation_def( + unique int id: @ruby_interpolation +); + +ruby_keyword_parameter_value( + unique int ruby_keyword_parameter: @ruby_keyword_parameter ref, + unique int value: @ruby_underscore_arg ref +); + +ruby_keyword_parameter_def( + unique int id: @ruby_keyword_parameter, + int name: @ruby_token_identifier ref +); + +@ruby_keyword_pattern_key_type = @ruby_string__ | @ruby_token_hash_key_symbol + +ruby_keyword_pattern_value( + unique int ruby_keyword_pattern: @ruby_keyword_pattern ref, + unique int value: @ruby_underscore_pattern_expr ref +); + +ruby_keyword_pattern_def( + unique int id: @ruby_keyword_pattern, + int key__: @ruby_keyword_pattern_key_type ref +); + +@ruby_lambda_body_type = @ruby_block | @ruby_do_block + +ruby_lambda_parameters( + unique int ruby_lambda: @ruby_lambda ref, + unique int parameters: @ruby_lambda_parameters ref +); + +ruby_lambda_def( + unique int id: @ruby_lambda, + int body: @ruby_lambda_body_type ref +); + +@ruby_lambda_parameters_child_type = @ruby_block_parameter | @ruby_destructured_parameter | @ruby_hash_splat_parameter | @ruby_keyword_parameter | @ruby_optional_parameter | @ruby_splat_parameter | @ruby_token_forward_parameter | @ruby_token_hash_splat_nil | @ruby_token_identifier + +#keyset[ruby_lambda_parameters, index] +ruby_lambda_parameters_child( + int ruby_lambda_parameters: @ruby_lambda_parameters ref, + int index: int ref, + unique int child: @ruby_lambda_parameters_child_type ref +); + +ruby_lambda_parameters_def( + unique int id: @ruby_lambda_parameters +); + +@ruby_left_assignment_list_child_type = @ruby_destructured_left_assignment | @ruby_rest_assignment | @ruby_underscore_lhs + +#keyset[ruby_left_assignment_list, index] +ruby_left_assignment_list_child( + int ruby_left_assignment_list: @ruby_left_assignment_list ref, + int index: int ref, + unique int child: @ruby_left_assignment_list_child_type ref +); + +ruby_left_assignment_list_def( + unique int id: @ruby_left_assignment_list +); + +ruby_match_pattern_def( + unique int id: @ruby_match_pattern, + int pattern: @ruby_underscore_pattern_top_expr_body ref, + int value: @ruby_underscore_arg ref +); + +@ruby_method_body_type = @ruby_body_statement | @ruby_rescue_modifier | @ruby_underscore_arg + +ruby_method_body( + unique int ruby_method: @ruby_method ref, + unique int body: @ruby_method_body_type ref +); + +ruby_method_parameters( + unique int ruby_method: @ruby_method ref, + unique int parameters: @ruby_method_parameters ref +); + +ruby_method_def( + unique int id: @ruby_method, + int name: @ruby_underscore_method_name ref +); + +@ruby_method_parameters_child_type = @ruby_block_parameter | @ruby_destructured_parameter | @ruby_hash_splat_parameter | @ruby_keyword_parameter | @ruby_optional_parameter | @ruby_splat_parameter | @ruby_token_forward_parameter | @ruby_token_hash_splat_nil | @ruby_token_identifier + +#keyset[ruby_method_parameters, index] +ruby_method_parameters_child( + int ruby_method_parameters: @ruby_method_parameters ref, + int index: int ref, + unique int child: @ruby_method_parameters_child_type ref +); + +ruby_method_parameters_def( + unique int id: @ruby_method_parameters +); + +ruby_module_body( + unique int ruby_module: @ruby_module ref, + unique int body: @ruby_body_statement ref +); + +@ruby_module_name_type = @ruby_scope_resolution | @ruby_token_constant + +ruby_module_def( + unique int id: @ruby_module, + int name: @ruby_module_name_type ref +); + +ruby_next_child( + unique int ruby_next: @ruby_next ref, + unique int child: @ruby_argument_list ref +); + +ruby_next_def( + unique int id: @ruby_next +); + +case @ruby_operator_assignment.operator of + 0 = @ruby_operator_assignment_percentequal +| 1 = @ruby_operator_assignment_ampersandampersandequal +| 2 = @ruby_operator_assignment_ampersandequal +| 3 = @ruby_operator_assignment_starstarequal +| 4 = @ruby_operator_assignment_starequal +| 5 = @ruby_operator_assignment_plusequal +| 6 = @ruby_operator_assignment_minusequal +| 7 = @ruby_operator_assignment_slashequal +| 8 = @ruby_operator_assignment_langlelangleequal +| 9 = @ruby_operator_assignment_ranglerangleequal +| 10 = @ruby_operator_assignment_caretequal +| 11 = @ruby_operator_assignment_pipeequal +| 12 = @ruby_operator_assignment_pipepipeequal +; + + +@ruby_operator_assignment_right_type = @ruby_rescue_modifier | @ruby_underscore_expression + +ruby_operator_assignment_def( + unique int id: @ruby_operator_assignment, + int left: @ruby_underscore_lhs ref, + int operator: int ref, + int right: @ruby_operator_assignment_right_type ref +); + +ruby_optional_parameter_def( + unique int id: @ruby_optional_parameter, + int name: @ruby_token_identifier ref, + int value: @ruby_underscore_arg ref +); + +@ruby_pair_key_type = @ruby_string__ | @ruby_token_hash_key_symbol | @ruby_underscore_arg + +ruby_pair_value( + unique int ruby_pair: @ruby_pair ref, + unique int value: @ruby_underscore_arg ref +); + +ruby_pair_def( + unique int id: @ruby_pair, + int key__: @ruby_pair_key_type ref +); + +ruby_parenthesized_pattern_def( + unique int id: @ruby_parenthesized_pattern, + int child: @ruby_underscore_pattern_expr ref +); + +@ruby_parenthesized_statements_child_type = @ruby_token_empty_statement | @ruby_underscore_statement + +#keyset[ruby_parenthesized_statements, index] +ruby_parenthesized_statements_child( + int ruby_parenthesized_statements: @ruby_parenthesized_statements ref, + int index: int ref, + unique int child: @ruby_parenthesized_statements_child_type ref +); + +ruby_parenthesized_statements_def( + unique int id: @ruby_parenthesized_statements +); + +@ruby_pattern_child_type = @ruby_splat_argument | @ruby_underscore_arg + +ruby_pattern_def( + unique int id: @ruby_pattern, + int child: @ruby_pattern_child_type ref +); + +@ruby_program_child_type = @ruby_token_empty_statement | @ruby_token_uninterpreted | @ruby_underscore_statement + +#keyset[ruby_program, index] +ruby_program_child( + int ruby_program: @ruby_program ref, + int index: int ref, + unique int child: @ruby_program_child_type ref +); + +ruby_program_def( + unique int id: @ruby_program +); + +@ruby_range_begin_type = @ruby_underscore_arg | @ruby_underscore_pattern_primitive + +ruby_range_begin( + unique int ruby_range: @ruby_range ref, + unique int begin: @ruby_range_begin_type ref +); + +@ruby_range_end_type = @ruby_underscore_arg | @ruby_underscore_pattern_primitive + +ruby_range_end( + unique int ruby_range: @ruby_range ref, + unique int end: @ruby_range_end_type ref +); + +case @ruby_range.operator of + 0 = @ruby_range_dotdot +| 1 = @ruby_range_dotdotdot +; + + +ruby_range_def( + unique int id: @ruby_range, + int operator: int ref +); + +@ruby_rational_child_type = @ruby_token_float | @ruby_token_integer + +ruby_rational_def( + unique int id: @ruby_rational, + int child: @ruby_rational_child_type ref +); + +ruby_redo_child( + unique int ruby_redo: @ruby_redo ref, + unique int child: @ruby_argument_list ref +); + +ruby_redo_def( + unique int id: @ruby_redo +); + +@ruby_regex_child_type = @ruby_interpolation | @ruby_token_escape_sequence | @ruby_token_string_content + +#keyset[ruby_regex, index] +ruby_regex_child( + int ruby_regex: @ruby_regex ref, + int index: int ref, + unique int child: @ruby_regex_child_type ref +); + +ruby_regex_def( + unique int id: @ruby_regex +); + +ruby_rescue_body( + unique int ruby_rescue: @ruby_rescue ref, + unique int body: @ruby_then ref +); + +ruby_rescue_exceptions( + unique int ruby_rescue: @ruby_rescue ref, + unique int exceptions: @ruby_exceptions ref +); + +ruby_rescue_variable( + unique int ruby_rescue: @ruby_rescue ref, + unique int variable: @ruby_exception_variable ref +); + +ruby_rescue_def( + unique int id: @ruby_rescue +); + +@ruby_rescue_modifier_body_type = @ruby_underscore_arg | @ruby_underscore_statement + +ruby_rescue_modifier_def( + unique int id: @ruby_rescue_modifier, + int body: @ruby_rescue_modifier_body_type ref, + int handler: @ruby_underscore_expression ref +); + +ruby_rest_assignment_child( + unique int ruby_rest_assignment: @ruby_rest_assignment ref, + unique int child: @ruby_underscore_lhs ref +); + +ruby_rest_assignment_def( + unique int id: @ruby_rest_assignment +); + +ruby_retry_child( + unique int ruby_retry: @ruby_retry ref, + unique int child: @ruby_argument_list ref +); + +ruby_retry_def( + unique int id: @ruby_retry +); + +ruby_return_child( + unique int ruby_return: @ruby_return ref, + unique int child: @ruby_argument_list ref +); + +ruby_return_def( + unique int id: @ruby_return +); + +@ruby_right_assignment_list_child_type = @ruby_splat_argument | @ruby_underscore_arg + +#keyset[ruby_right_assignment_list, index] +ruby_right_assignment_list_child( + int ruby_right_assignment_list: @ruby_right_assignment_list ref, + int index: int ref, + unique int child: @ruby_right_assignment_list_child_type ref +); + +ruby_right_assignment_list_def( + unique int id: @ruby_right_assignment_list +); + +@ruby_scope_resolution_scope_type = @ruby_underscore_pattern_constant | @ruby_underscore_primary + +ruby_scope_resolution_scope( + unique int ruby_scope_resolution: @ruby_scope_resolution ref, + unique int scope: @ruby_scope_resolution_scope_type ref +); + +ruby_scope_resolution_def( + unique int id: @ruby_scope_resolution, + int name: @ruby_token_constant ref +); + +ruby_setter_def( + unique int id: @ruby_setter, + int name: @ruby_token_identifier ref +); + +ruby_singleton_class_body( + unique int ruby_singleton_class: @ruby_singleton_class ref, + unique int body: @ruby_body_statement ref +); + +ruby_singleton_class_def( + unique int id: @ruby_singleton_class, + int value: @ruby_underscore_arg ref +); + +@ruby_singleton_method_body_type = @ruby_body_statement | @ruby_rescue_modifier | @ruby_underscore_arg + +ruby_singleton_method_body( + unique int ruby_singleton_method: @ruby_singleton_method ref, + unique int body: @ruby_singleton_method_body_type ref +); + +@ruby_singleton_method_object_type = @ruby_underscore_arg | @ruby_underscore_variable + +ruby_singleton_method_parameters( + unique int ruby_singleton_method: @ruby_singleton_method ref, + unique int parameters: @ruby_method_parameters ref +); + +ruby_singleton_method_def( + unique int id: @ruby_singleton_method, + int name: @ruby_underscore_method_name ref, + int object: @ruby_singleton_method_object_type ref +); + +ruby_splat_argument_child( + unique int ruby_splat_argument: @ruby_splat_argument ref, + unique int child: @ruby_underscore_arg ref +); + +ruby_splat_argument_def( + unique int id: @ruby_splat_argument +); + +ruby_splat_parameter_name( + unique int ruby_splat_parameter: @ruby_splat_parameter ref, + unique int name: @ruby_token_identifier ref +); + +ruby_splat_parameter_def( + unique int id: @ruby_splat_parameter +); + +@ruby_string_child_type = @ruby_interpolation | @ruby_token_escape_sequence | @ruby_token_string_content + +#keyset[ruby_string__, index] +ruby_string_child( + int ruby_string__: @ruby_string__ ref, + int index: int ref, + unique int child: @ruby_string_child_type ref +); + +ruby_string_def( + unique int id: @ruby_string__ +); + +#keyset[ruby_string_array, index] +ruby_string_array_child( + int ruby_string_array: @ruby_string_array ref, + int index: int ref, + unique int child: @ruby_bare_string ref +); + +ruby_string_array_def( + unique int id: @ruby_string_array +); + +@ruby_subshell_child_type = @ruby_interpolation | @ruby_token_escape_sequence | @ruby_token_string_content + +#keyset[ruby_subshell, index] +ruby_subshell_child( + int ruby_subshell: @ruby_subshell ref, + int index: int ref, + unique int child: @ruby_subshell_child_type ref +); + +ruby_subshell_def( + unique int id: @ruby_subshell +); + +ruby_superclass_def( + unique int id: @ruby_superclass, + int child: @ruby_underscore_expression ref +); + +#keyset[ruby_symbol_array, index] +ruby_symbol_array_child( + int ruby_symbol_array: @ruby_symbol_array ref, + int index: int ref, + unique int child: @ruby_bare_symbol ref +); + +ruby_symbol_array_def( + unique int id: @ruby_symbol_array +); + +ruby_test_pattern_def( + unique int id: @ruby_test_pattern, + int pattern: @ruby_underscore_pattern_top_expr_body ref, + int value: @ruby_underscore_arg ref +); + +@ruby_then_child_type = @ruby_token_empty_statement | @ruby_underscore_statement + +#keyset[ruby_then, index] +ruby_then_child( + int ruby_then: @ruby_then ref, + int index: int ref, + unique int child: @ruby_then_child_type ref +); + +ruby_then_def( + unique int id: @ruby_then +); + +@ruby_unary_operand_type = @ruby_parenthesized_statements | @ruby_underscore_expression | @ruby_underscore_simple_numeric + +case @ruby_unary.operator of + 0 = @ruby_unary_bang +| 1 = @ruby_unary_plus +| 2 = @ruby_unary_minus +| 3 = @ruby_unary_definedquestion +| 4 = @ruby_unary_not +| 5 = @ruby_unary_tilde +; + + +ruby_unary_def( + unique int id: @ruby_unary, + int operand: @ruby_unary_operand_type ref, + int operator: int ref +); + +#keyset[ruby_undef, index] +ruby_undef_child( + int ruby_undef: @ruby_undef ref, + int index: int ref, + unique int child: @ruby_underscore_method_name ref +); + +ruby_undef_def( + unique int id: @ruby_undef +); + +@ruby_unless_alternative_type = @ruby_else | @ruby_elsif + +ruby_unless_alternative( + unique int ruby_unless: @ruby_unless ref, + unique int alternative: @ruby_unless_alternative_type ref +); + +ruby_unless_consequence( + unique int ruby_unless: @ruby_unless ref, + unique int consequence: @ruby_then ref +); + +ruby_unless_def( + unique int id: @ruby_unless, + int condition: @ruby_underscore_statement ref +); + +ruby_unless_guard_def( + unique int id: @ruby_unless_guard, + int condition: @ruby_underscore_expression ref +); + +ruby_unless_modifier_def( + unique int id: @ruby_unless_modifier, + int body: @ruby_underscore_statement ref, + int condition: @ruby_underscore_expression ref +); + +ruby_until_def( + unique int id: @ruby_until, + int body: @ruby_do ref, + int condition: @ruby_underscore_statement ref +); + +ruby_until_modifier_def( + unique int id: @ruby_until_modifier, + int body: @ruby_underscore_statement ref, + int condition: @ruby_underscore_expression ref +); + +@ruby_variable_reference_pattern_name_type = @ruby_token_identifier | @ruby_underscore_nonlocal_variable + +ruby_variable_reference_pattern_def( + unique int id: @ruby_variable_reference_pattern, + int name: @ruby_variable_reference_pattern_name_type ref +); + +ruby_when_body( + unique int ruby_when: @ruby_when ref, + unique int body: @ruby_then ref +); + +#keyset[ruby_when, index] +ruby_when_pattern( + int ruby_when: @ruby_when ref, + int index: int ref, + unique int pattern: @ruby_pattern ref +); + +ruby_when_def( + unique int id: @ruby_when +); + +ruby_while_def( + unique int id: @ruby_while, + int body: @ruby_do ref, + int condition: @ruby_underscore_statement ref +); + +ruby_while_modifier_def( + unique int id: @ruby_while_modifier, + int body: @ruby_underscore_statement ref, + int condition: @ruby_underscore_expression ref +); + +ruby_yield_child( + unique int ruby_yield: @ruby_yield ref, + unique int child: @ruby_argument_list ref +); + +ruby_yield_def( + unique int id: @ruby_yield +); + +ruby_tokeninfo( + unique int id: @ruby_token, + int kind: int ref, + string value: string ref +); + +case @ruby_token.kind of + 0 = @ruby_reserved_word +| 1 = @ruby_token_character +| 2 = @ruby_token_class_variable +| 3 = @ruby_token_comment +| 4 = @ruby_token_constant +| 5 = @ruby_token_empty_statement +| 6 = @ruby_token_encoding +| 7 = @ruby_token_escape_sequence +| 8 = @ruby_token_false +| 9 = @ruby_token_file +| 10 = @ruby_token_float +| 11 = @ruby_token_forward_argument +| 12 = @ruby_token_forward_parameter +| 13 = @ruby_token_global_variable +| 14 = @ruby_token_hash_key_symbol +| 15 = @ruby_token_hash_splat_nil +| 16 = @ruby_token_heredoc_beginning +| 17 = @ruby_token_heredoc_content +| 18 = @ruby_token_heredoc_end +| 19 = @ruby_token_identifier +| 20 = @ruby_token_instance_variable +| 21 = @ruby_token_integer +| 22 = @ruby_token_line +| 23 = @ruby_token_nil +| 24 = @ruby_token_operator +| 25 = @ruby_token_self +| 26 = @ruby_token_simple_symbol +| 27 = @ruby_token_string_content +| 28 = @ruby_token_super +| 29 = @ruby_token_true +| 30 = @ruby_token_uninterpreted +; + + +@ruby_ast_node = @ruby_alias | @ruby_alternative_pattern | @ruby_argument_list | @ruby_array | @ruby_array_pattern | @ruby_as_pattern | @ruby_assignment | @ruby_bare_string | @ruby_bare_symbol | @ruby_begin | @ruby_begin_block | @ruby_binary | @ruby_block | @ruby_block_argument | @ruby_block_body | @ruby_block_parameter | @ruby_block_parameters | @ruby_body_statement | @ruby_break | @ruby_call | @ruby_case__ | @ruby_case_match | @ruby_chained_string | @ruby_class | @ruby_complex | @ruby_conditional | @ruby_delimited_symbol | @ruby_destructured_left_assignment | @ruby_destructured_parameter | @ruby_do | @ruby_do_block | @ruby_element_reference | @ruby_else | @ruby_elsif | @ruby_end_block | @ruby_ensure | @ruby_exception_variable | @ruby_exceptions | @ruby_expression_reference_pattern | @ruby_find_pattern | @ruby_for | @ruby_hash | @ruby_hash_pattern | @ruby_hash_splat_argument | @ruby_hash_splat_parameter | @ruby_heredoc_body | @ruby_if | @ruby_if_guard | @ruby_if_modifier | @ruby_in | @ruby_in_clause | @ruby_interpolation | @ruby_keyword_parameter | @ruby_keyword_pattern | @ruby_lambda | @ruby_lambda_parameters | @ruby_left_assignment_list | @ruby_match_pattern | @ruby_method | @ruby_method_parameters | @ruby_module | @ruby_next | @ruby_operator_assignment | @ruby_optional_parameter | @ruby_pair | @ruby_parenthesized_pattern | @ruby_parenthesized_statements | @ruby_pattern | @ruby_program | @ruby_range | @ruby_rational | @ruby_redo | @ruby_regex | @ruby_rescue | @ruby_rescue_modifier | @ruby_rest_assignment | @ruby_retry | @ruby_return | @ruby_right_assignment_list | @ruby_scope_resolution | @ruby_setter | @ruby_singleton_class | @ruby_singleton_method | @ruby_splat_argument | @ruby_splat_parameter | @ruby_string__ | @ruby_string_array | @ruby_subshell | @ruby_superclass | @ruby_symbol_array | @ruby_test_pattern | @ruby_then | @ruby_token | @ruby_unary | @ruby_undef | @ruby_unless | @ruby_unless_guard | @ruby_unless_modifier | @ruby_until | @ruby_until_modifier | @ruby_variable_reference_pattern | @ruby_when | @ruby_while | @ruby_while_modifier | @ruby_yield + +ruby_ast_node_location( + unique int node: @ruby_ast_node ref, + int loc: @location_default ref +); + +#keyset[parent, parent_index] +ruby_ast_node_parent( + unique int node: @ruby_ast_node ref, + int parent: @ruby_ast_node ref, + int parent_index: int ref +); + +/*- Erb dbscheme -*/ +erb_comment_directive_child( + unique int erb_comment_directive: @erb_comment_directive ref, + unique int child: @erb_token_comment ref +); + +erb_comment_directive_def( + unique int id: @erb_comment_directive +); + +erb_directive_child( + unique int erb_directive: @erb_directive ref, + unique int child: @erb_token_code ref +); + +erb_directive_def( + unique int id: @erb_directive +); + +erb_graphql_directive_child( + unique int erb_graphql_directive: @erb_graphql_directive ref, + unique int child: @erb_token_code ref +); + +erb_graphql_directive_def( + unique int id: @erb_graphql_directive +); + +erb_output_directive_child( + unique int erb_output_directive: @erb_output_directive ref, + unique int child: @erb_token_code ref +); + +erb_output_directive_def( + unique int id: @erb_output_directive +); + +@erb_template_child_type = @erb_comment_directive | @erb_directive | @erb_graphql_directive | @erb_output_directive | @erb_token_content + +#keyset[erb_template, index] +erb_template_child( + int erb_template: @erb_template ref, + int index: int ref, + unique int child: @erb_template_child_type ref +); + +erb_template_def( + unique int id: @erb_template +); + +erb_tokeninfo( + unique int id: @erb_token, + int kind: int ref, + string value: string ref +); + +case @erb_token.kind of + 0 = @erb_reserved_word +| 1 = @erb_token_code +| 2 = @erb_token_comment +| 3 = @erb_token_content +; + + +@erb_ast_node = @erb_comment_directive | @erb_directive | @erb_graphql_directive | @erb_output_directive | @erb_template | @erb_token + +erb_ast_node_location( + unique int node: @erb_ast_node ref, + int loc: @location_default ref +); + +#keyset[parent, parent_index] +erb_ast_node_parent( + unique int node: @erb_ast_node ref, + int parent: @erb_ast_node ref, + int parent_index: int ref +); + diff --git a/ruby/downgrades/dc51d416301df12df5b70fbc4338de6cc1f82bfd/ruby.dbscheme b/ruby/downgrades/dc51d416301df12df5b70fbc4338de6cc1f82bfd/ruby.dbscheme new file mode 100644 index 00000000000..40a6b0a5e81 --- /dev/null +++ b/ruby/downgrades/dc51d416301df12df5b70fbc4338de6cc1f82bfd/ruby.dbscheme @@ -0,0 +1,1526 @@ +// CodeQL database schema for Ruby +// Automatically generated from the tree-sitter grammar; do not edit + +/*- Files and folders -*/ + +/** + * The location of an element. + * The location spans column `startcolumn` of line `startline` to + * column `endcolumn` of line `endline` in file `file`. + * For more information, see + * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/). + */ +locations_default( + unique int id: @location_default, + int file: @file ref, + int beginLine: int ref, + int beginColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +files( + unique int id: @file, + string name: string ref +); + +folders( + unique int id: @folder, + string name: string ref +); + +@container = @file | @folder + +containerparent( + int parent: @container ref, + unique int child: @container ref +); + +/*- Empty location -*/ + +empty_location( + int location: @location_default ref +); + +/*- Source location prefix -*/ + +/** + * The source location of the snapshot. + */ +sourceLocationPrefix(string prefix : string ref); + +/*- Diagnostic messages -*/ + +diagnostics( + unique int id: @diagnostic, + int severity: int ref, + string error_tag: string ref, + string error_message: string ref, + string full_error_message: string ref, + int location: @location_default ref +); + +/*- Diagnostic messages: severity -*/ + +case @diagnostic.severity of + 10 = @diagnostic_debug +| 20 = @diagnostic_info +| 30 = @diagnostic_warning +| 40 = @diagnostic_error +; + +/*- YAML -*/ + +#keyset[parent, idx] +yaml (unique int id: @yaml_node, + int kind: int ref, + int parent: @yaml_node_parent ref, + int idx: int ref, + string tag: string ref, + string tostring: string ref); + +case @yaml_node.kind of + 0 = @yaml_scalar_node +| 1 = @yaml_mapping_node +| 2 = @yaml_sequence_node +| 3 = @yaml_alias_node +; + +@yaml_collection_node = @yaml_mapping_node | @yaml_sequence_node; + +@yaml_node_parent = @yaml_collection_node | @file; + +yaml_anchors (unique int node: @yaml_node ref, + string anchor: string ref); + +yaml_aliases (unique int alias: @yaml_alias_node ref, + string target: string ref); + +yaml_scalars (unique int scalar: @yaml_scalar_node ref, + int style: int ref, + string value: string ref); + +yaml_errors (unique int id: @yaml_error, + string message: string ref); + +yaml_locations(unique int locatable: @yaml_locatable ref, + int location: @location_default ref); + +@yaml_locatable = @yaml_node | @yaml_error; + +/*- Ruby dbscheme -*/ +@ruby_underscore_arg = @ruby_assignment | @ruby_binary | @ruby_conditional | @ruby_operator_assignment | @ruby_range | @ruby_unary | @ruby_underscore_primary + +@ruby_underscore_call_operator = @ruby_reserved_word + +@ruby_underscore_expression = @ruby_assignment | @ruby_binary | @ruby_break | @ruby_call | @ruby_match_pattern | @ruby_next | @ruby_operator_assignment | @ruby_return | @ruby_test_pattern | @ruby_unary | @ruby_underscore_arg | @ruby_yield + +@ruby_underscore_lhs = @ruby_call | @ruby_element_reference | @ruby_scope_resolution | @ruby_token_false | @ruby_token_nil | @ruby_token_true | @ruby_underscore_variable + +@ruby_underscore_method_name = @ruby_delimited_symbol | @ruby_setter | @ruby_token_constant | @ruby_token_identifier | @ruby_token_operator | @ruby_token_simple_symbol | @ruby_underscore_nonlocal_variable + +@ruby_underscore_nonlocal_variable = @ruby_token_class_variable | @ruby_token_global_variable | @ruby_token_instance_variable + +@ruby_underscore_pattern_constant = @ruby_scope_resolution | @ruby_token_constant + +@ruby_underscore_pattern_expr = @ruby_alternative_pattern | @ruby_as_pattern | @ruby_underscore_pattern_expr_basic + +@ruby_underscore_pattern_expr_basic = @ruby_array_pattern | @ruby_expression_reference_pattern | @ruby_find_pattern | @ruby_hash_pattern | @ruby_parenthesized_pattern | @ruby_range | @ruby_token_identifier | @ruby_underscore_pattern_constant | @ruby_underscore_pattern_primitive | @ruby_variable_reference_pattern + +@ruby_underscore_pattern_primitive = @ruby_delimited_symbol | @ruby_lambda | @ruby_regex | @ruby_string__ | @ruby_string_array | @ruby_subshell | @ruby_symbol_array | @ruby_token_encoding | @ruby_token_false | @ruby_token_file | @ruby_token_heredoc_beginning | @ruby_token_line | @ruby_token_nil | @ruby_token_self | @ruby_token_simple_symbol | @ruby_token_true | @ruby_unary | @ruby_underscore_simple_numeric + +@ruby_underscore_pattern_top_expr_body = @ruby_array_pattern | @ruby_find_pattern | @ruby_hash_pattern | @ruby_underscore_pattern_expr + +@ruby_underscore_primary = @ruby_array | @ruby_begin | @ruby_break | @ruby_call | @ruby_case__ | @ruby_case_match | @ruby_chained_string | @ruby_class | @ruby_delimited_symbol | @ruby_for | @ruby_hash | @ruby_if | @ruby_lambda | @ruby_method | @ruby_module | @ruby_next | @ruby_parenthesized_statements | @ruby_redo | @ruby_regex | @ruby_retry | @ruby_return | @ruby_singleton_class | @ruby_singleton_method | @ruby_string__ | @ruby_string_array | @ruby_subshell | @ruby_symbol_array | @ruby_token_character | @ruby_token_heredoc_beginning | @ruby_token_simple_symbol | @ruby_unary | @ruby_underscore_lhs | @ruby_underscore_simple_numeric | @ruby_unless | @ruby_until | @ruby_while | @ruby_yield + +@ruby_underscore_simple_numeric = @ruby_complex | @ruby_rational | @ruby_token_float | @ruby_token_integer + +@ruby_underscore_statement = @ruby_alias | @ruby_begin_block | @ruby_end_block | @ruby_if_modifier | @ruby_rescue_modifier | @ruby_undef | @ruby_underscore_expression | @ruby_unless_modifier | @ruby_until_modifier | @ruby_while_modifier + +@ruby_underscore_variable = @ruby_token_constant | @ruby_token_identifier | @ruby_token_self | @ruby_token_super | @ruby_underscore_nonlocal_variable + +ruby_alias_def( + unique int id: @ruby_alias, + int alias: @ruby_underscore_method_name ref, + int name: @ruby_underscore_method_name ref +); + +#keyset[ruby_alternative_pattern, index] +ruby_alternative_pattern_alternatives( + int ruby_alternative_pattern: @ruby_alternative_pattern ref, + int index: int ref, + unique int alternatives: @ruby_underscore_pattern_expr_basic ref +); + +ruby_alternative_pattern_def( + unique int id: @ruby_alternative_pattern +); + +@ruby_argument_list_child_type = @ruby_block_argument | @ruby_hash_splat_argument | @ruby_pair | @ruby_splat_argument | @ruby_token_forward_argument | @ruby_underscore_expression + +#keyset[ruby_argument_list, index] +ruby_argument_list_child( + int ruby_argument_list: @ruby_argument_list ref, + int index: int ref, + unique int child: @ruby_argument_list_child_type ref +); + +ruby_argument_list_def( + unique int id: @ruby_argument_list +); + +@ruby_array_child_type = @ruby_block_argument | @ruby_hash_splat_argument | @ruby_pair | @ruby_splat_argument | @ruby_token_forward_argument | @ruby_underscore_expression + +#keyset[ruby_array, index] +ruby_array_child( + int ruby_array: @ruby_array ref, + int index: int ref, + unique int child: @ruby_array_child_type ref +); + +ruby_array_def( + unique int id: @ruby_array +); + +ruby_array_pattern_class( + unique int ruby_array_pattern: @ruby_array_pattern ref, + unique int class: @ruby_underscore_pattern_constant ref +); + +@ruby_array_pattern_child_type = @ruby_splat_parameter | @ruby_underscore_pattern_expr + +#keyset[ruby_array_pattern, index] +ruby_array_pattern_child( + int ruby_array_pattern: @ruby_array_pattern ref, + int index: int ref, + unique int child: @ruby_array_pattern_child_type ref +); + +ruby_array_pattern_def( + unique int id: @ruby_array_pattern +); + +ruby_as_pattern_def( + unique int id: @ruby_as_pattern, + int name: @ruby_token_identifier ref, + int value: @ruby_underscore_pattern_expr ref +); + +@ruby_assignment_left_type = @ruby_left_assignment_list | @ruby_underscore_lhs + +@ruby_assignment_right_type = @ruby_rescue_modifier | @ruby_right_assignment_list | @ruby_splat_argument | @ruby_underscore_expression + +ruby_assignment_def( + unique int id: @ruby_assignment, + int left: @ruby_assignment_left_type ref, + int right: @ruby_assignment_right_type ref +); + +@ruby_bare_string_child_type = @ruby_interpolation | @ruby_token_escape_sequence | @ruby_token_string_content + +#keyset[ruby_bare_string, index] +ruby_bare_string_child( + int ruby_bare_string: @ruby_bare_string ref, + int index: int ref, + unique int child: @ruby_bare_string_child_type ref +); + +ruby_bare_string_def( + unique int id: @ruby_bare_string +); + +@ruby_bare_symbol_child_type = @ruby_interpolation | @ruby_token_escape_sequence | @ruby_token_string_content + +#keyset[ruby_bare_symbol, index] +ruby_bare_symbol_child( + int ruby_bare_symbol: @ruby_bare_symbol ref, + int index: int ref, + unique int child: @ruby_bare_symbol_child_type ref +); + +ruby_bare_symbol_def( + unique int id: @ruby_bare_symbol +); + +@ruby_begin_child_type = @ruby_else | @ruby_ensure | @ruby_rescue | @ruby_token_empty_statement | @ruby_underscore_statement + +#keyset[ruby_begin, index] +ruby_begin_child( + int ruby_begin: @ruby_begin ref, + int index: int ref, + unique int child: @ruby_begin_child_type ref +); + +ruby_begin_def( + unique int id: @ruby_begin +); + +@ruby_begin_block_child_type = @ruby_token_empty_statement | @ruby_underscore_statement + +#keyset[ruby_begin_block, index] +ruby_begin_block_child( + int ruby_begin_block: @ruby_begin_block ref, + int index: int ref, + unique int child: @ruby_begin_block_child_type ref +); + +ruby_begin_block_def( + unique int id: @ruby_begin_block +); + +@ruby_binary_left_type = @ruby_underscore_expression | @ruby_underscore_simple_numeric + +case @ruby_binary.operator of + 0 = @ruby_binary_bangequal +| 1 = @ruby_binary_bangtilde +| 2 = @ruby_binary_percent +| 3 = @ruby_binary_ampersand +| 4 = @ruby_binary_ampersandampersand +| 5 = @ruby_binary_star +| 6 = @ruby_binary_starstar +| 7 = @ruby_binary_plus +| 8 = @ruby_binary_minus +| 9 = @ruby_binary_slash +| 10 = @ruby_binary_langle +| 11 = @ruby_binary_langlelangle +| 12 = @ruby_binary_langleequal +| 13 = @ruby_binary_langleequalrangle +| 14 = @ruby_binary_equalequal +| 15 = @ruby_binary_equalequalequal +| 16 = @ruby_binary_equaltilde +| 17 = @ruby_binary_rangle +| 18 = @ruby_binary_rangleequal +| 19 = @ruby_binary_ranglerangle +| 20 = @ruby_binary_caret +| 21 = @ruby_binary_and +| 22 = @ruby_binary_or +| 23 = @ruby_binary_pipe +| 24 = @ruby_binary_pipepipe +; + + +ruby_binary_def( + unique int id: @ruby_binary, + int left: @ruby_binary_left_type ref, + int operator: int ref, + int right: @ruby_underscore_expression ref +); + +ruby_block_body( + unique int ruby_block: @ruby_block ref, + unique int body: @ruby_block_body ref +); + +ruby_block_parameters( + unique int ruby_block: @ruby_block ref, + unique int parameters: @ruby_block_parameters ref +); + +ruby_block_def( + unique int id: @ruby_block +); + +ruby_block_argument_child( + unique int ruby_block_argument: @ruby_block_argument ref, + unique int child: @ruby_underscore_arg ref +); + +ruby_block_argument_def( + unique int id: @ruby_block_argument +); + +@ruby_block_body_child_type = @ruby_token_empty_statement | @ruby_underscore_statement + +#keyset[ruby_block_body, index] +ruby_block_body_child( + int ruby_block_body: @ruby_block_body ref, + int index: int ref, + unique int child: @ruby_block_body_child_type ref +); + +ruby_block_body_def( + unique int id: @ruby_block_body +); + +ruby_block_parameter_name( + unique int ruby_block_parameter: @ruby_block_parameter ref, + unique int name: @ruby_token_identifier ref +); + +ruby_block_parameter_def( + unique int id: @ruby_block_parameter +); + +#keyset[ruby_block_parameters, index] +ruby_block_parameters_locals( + int ruby_block_parameters: @ruby_block_parameters ref, + int index: int ref, + unique int locals: @ruby_token_identifier ref +); + +@ruby_block_parameters_child_type = @ruby_block_parameter | @ruby_destructured_parameter | @ruby_hash_splat_parameter | @ruby_keyword_parameter | @ruby_optional_parameter | @ruby_splat_parameter | @ruby_token_forward_parameter | @ruby_token_hash_splat_nil | @ruby_token_identifier + +#keyset[ruby_block_parameters, index] +ruby_block_parameters_child( + int ruby_block_parameters: @ruby_block_parameters ref, + int index: int ref, + unique int child: @ruby_block_parameters_child_type ref +); + +ruby_block_parameters_def( + unique int id: @ruby_block_parameters +); + +@ruby_body_statement_child_type = @ruby_else | @ruby_ensure | @ruby_rescue | @ruby_token_empty_statement | @ruby_underscore_statement + +#keyset[ruby_body_statement, index] +ruby_body_statement_child( + int ruby_body_statement: @ruby_body_statement ref, + int index: int ref, + unique int child: @ruby_body_statement_child_type ref +); + +ruby_body_statement_def( + unique int id: @ruby_body_statement +); + +ruby_break_child( + unique int ruby_break: @ruby_break ref, + unique int child: @ruby_argument_list ref +); + +ruby_break_def( + unique int id: @ruby_break +); + +ruby_call_arguments( + unique int ruby_call: @ruby_call ref, + unique int arguments: @ruby_argument_list ref +); + +@ruby_call_block_type = @ruby_block | @ruby_do_block + +ruby_call_block( + unique int ruby_call: @ruby_call ref, + unique int block: @ruby_call_block_type ref +); + +@ruby_call_method_type = @ruby_token_operator | @ruby_underscore_variable + +ruby_call_method( + unique int ruby_call: @ruby_call ref, + unique int method: @ruby_call_method_type ref +); + +ruby_call_operator( + unique int ruby_call: @ruby_call ref, + unique int operator: @ruby_underscore_call_operator ref +); + +ruby_call_receiver( + unique int ruby_call: @ruby_call ref, + unique int receiver: @ruby_underscore_primary ref +); + +ruby_call_def( + unique int id: @ruby_call +); + +ruby_case_value( + unique int ruby_case__: @ruby_case__ ref, + unique int value: @ruby_underscore_statement ref +); + +@ruby_case_child_type = @ruby_else | @ruby_when + +#keyset[ruby_case__, index] +ruby_case_child( + int ruby_case__: @ruby_case__ ref, + int index: int ref, + unique int child: @ruby_case_child_type ref +); + +ruby_case_def( + unique int id: @ruby_case__ +); + +#keyset[ruby_case_match, index] +ruby_case_match_clauses( + int ruby_case_match: @ruby_case_match ref, + int index: int ref, + unique int clauses: @ruby_in_clause ref +); + +ruby_case_match_else( + unique int ruby_case_match: @ruby_case_match ref, + unique int else: @ruby_else ref +); + +ruby_case_match_def( + unique int id: @ruby_case_match, + int value: @ruby_underscore_statement ref +); + +#keyset[ruby_chained_string, index] +ruby_chained_string_child( + int ruby_chained_string: @ruby_chained_string ref, + int index: int ref, + unique int child: @ruby_string__ ref +); + +ruby_chained_string_def( + unique int id: @ruby_chained_string +); + +ruby_class_body( + unique int ruby_class: @ruby_class ref, + unique int body: @ruby_body_statement ref +); + +@ruby_class_name_type = @ruby_scope_resolution | @ruby_token_constant + +ruby_class_superclass( + unique int ruby_class: @ruby_class ref, + unique int superclass: @ruby_superclass ref +); + +ruby_class_def( + unique int id: @ruby_class, + int name: @ruby_class_name_type ref +); + +@ruby_complex_child_type = @ruby_rational | @ruby_token_float | @ruby_token_integer + +ruby_complex_def( + unique int id: @ruby_complex, + int child: @ruby_complex_child_type ref +); + +ruby_conditional_def( + unique int id: @ruby_conditional, + int alternative: @ruby_underscore_arg ref, + int condition: @ruby_underscore_arg ref, + int consequence: @ruby_underscore_arg ref +); + +@ruby_delimited_symbol_child_type = @ruby_interpolation | @ruby_token_escape_sequence | @ruby_token_string_content + +#keyset[ruby_delimited_symbol, index] +ruby_delimited_symbol_child( + int ruby_delimited_symbol: @ruby_delimited_symbol ref, + int index: int ref, + unique int child: @ruby_delimited_symbol_child_type ref +); + +ruby_delimited_symbol_def( + unique int id: @ruby_delimited_symbol +); + +@ruby_destructured_left_assignment_child_type = @ruby_destructured_left_assignment | @ruby_rest_assignment | @ruby_underscore_lhs + +#keyset[ruby_destructured_left_assignment, index] +ruby_destructured_left_assignment_child( + int ruby_destructured_left_assignment: @ruby_destructured_left_assignment ref, + int index: int ref, + unique int child: @ruby_destructured_left_assignment_child_type ref +); + +ruby_destructured_left_assignment_def( + unique int id: @ruby_destructured_left_assignment +); + +@ruby_destructured_parameter_child_type = @ruby_block_parameter | @ruby_destructured_parameter | @ruby_hash_splat_parameter | @ruby_keyword_parameter | @ruby_optional_parameter | @ruby_splat_parameter | @ruby_token_forward_parameter | @ruby_token_hash_splat_nil | @ruby_token_identifier + +#keyset[ruby_destructured_parameter, index] +ruby_destructured_parameter_child( + int ruby_destructured_parameter: @ruby_destructured_parameter ref, + int index: int ref, + unique int child: @ruby_destructured_parameter_child_type ref +); + +ruby_destructured_parameter_def( + unique int id: @ruby_destructured_parameter +); + +@ruby_do_child_type = @ruby_token_empty_statement | @ruby_underscore_statement + +#keyset[ruby_do, index] +ruby_do_child( + int ruby_do: @ruby_do ref, + int index: int ref, + unique int child: @ruby_do_child_type ref +); + +ruby_do_def( + unique int id: @ruby_do +); + +ruby_do_block_body( + unique int ruby_do_block: @ruby_do_block ref, + unique int body: @ruby_body_statement ref +); + +ruby_do_block_parameters( + unique int ruby_do_block: @ruby_do_block ref, + unique int parameters: @ruby_block_parameters ref +); + +ruby_do_block_def( + unique int id: @ruby_do_block +); + +@ruby_element_reference_block_type = @ruby_block | @ruby_do_block + +ruby_element_reference_block( + unique int ruby_element_reference: @ruby_element_reference ref, + unique int block: @ruby_element_reference_block_type ref +); + +@ruby_element_reference_child_type = @ruby_block_argument | @ruby_hash_splat_argument | @ruby_pair | @ruby_splat_argument | @ruby_token_forward_argument | @ruby_underscore_expression + +#keyset[ruby_element_reference, index] +ruby_element_reference_child( + int ruby_element_reference: @ruby_element_reference ref, + int index: int ref, + unique int child: @ruby_element_reference_child_type ref +); + +ruby_element_reference_def( + unique int id: @ruby_element_reference, + int object: @ruby_underscore_primary ref +); + +@ruby_else_child_type = @ruby_token_empty_statement | @ruby_underscore_statement + +#keyset[ruby_else, index] +ruby_else_child( + int ruby_else: @ruby_else ref, + int index: int ref, + unique int child: @ruby_else_child_type ref +); + +ruby_else_def( + unique int id: @ruby_else +); + +@ruby_elsif_alternative_type = @ruby_else | @ruby_elsif + +ruby_elsif_alternative( + unique int ruby_elsif: @ruby_elsif ref, + unique int alternative: @ruby_elsif_alternative_type ref +); + +ruby_elsif_consequence( + unique int ruby_elsif: @ruby_elsif ref, + unique int consequence: @ruby_then ref +); + +ruby_elsif_def( + unique int id: @ruby_elsif, + int condition: @ruby_underscore_statement ref +); + +@ruby_end_block_child_type = @ruby_token_empty_statement | @ruby_underscore_statement + +#keyset[ruby_end_block, index] +ruby_end_block_child( + int ruby_end_block: @ruby_end_block ref, + int index: int ref, + unique int child: @ruby_end_block_child_type ref +); + +ruby_end_block_def( + unique int id: @ruby_end_block +); + +@ruby_ensure_child_type = @ruby_token_empty_statement | @ruby_underscore_statement + +#keyset[ruby_ensure, index] +ruby_ensure_child( + int ruby_ensure: @ruby_ensure ref, + int index: int ref, + unique int child: @ruby_ensure_child_type ref +); + +ruby_ensure_def( + unique int id: @ruby_ensure +); + +ruby_exception_variable_def( + unique int id: @ruby_exception_variable, + int child: @ruby_underscore_lhs ref +); + +@ruby_exceptions_child_type = @ruby_splat_argument | @ruby_underscore_arg + +#keyset[ruby_exceptions, index] +ruby_exceptions_child( + int ruby_exceptions: @ruby_exceptions ref, + int index: int ref, + unique int child: @ruby_exceptions_child_type ref +); + +ruby_exceptions_def( + unique int id: @ruby_exceptions +); + +ruby_expression_reference_pattern_def( + unique int id: @ruby_expression_reference_pattern, + int value: @ruby_underscore_expression ref +); + +ruby_find_pattern_class( + unique int ruby_find_pattern: @ruby_find_pattern ref, + unique int class: @ruby_underscore_pattern_constant ref +); + +@ruby_find_pattern_child_type = @ruby_splat_parameter | @ruby_underscore_pattern_expr + +#keyset[ruby_find_pattern, index] +ruby_find_pattern_child( + int ruby_find_pattern: @ruby_find_pattern ref, + int index: int ref, + unique int child: @ruby_find_pattern_child_type ref +); + +ruby_find_pattern_def( + unique int id: @ruby_find_pattern +); + +@ruby_for_pattern_type = @ruby_left_assignment_list | @ruby_underscore_lhs + +ruby_for_def( + unique int id: @ruby_for, + int body: @ruby_do ref, + int pattern: @ruby_for_pattern_type ref, + int value: @ruby_in ref +); + +@ruby_hash_child_type = @ruby_hash_splat_argument | @ruby_pair + +#keyset[ruby_hash, index] +ruby_hash_child( + int ruby_hash: @ruby_hash ref, + int index: int ref, + unique int child: @ruby_hash_child_type ref +); + +ruby_hash_def( + unique int id: @ruby_hash +); + +ruby_hash_pattern_class( + unique int ruby_hash_pattern: @ruby_hash_pattern ref, + unique int class: @ruby_underscore_pattern_constant ref +); + +@ruby_hash_pattern_child_type = @ruby_hash_splat_parameter | @ruby_keyword_pattern | @ruby_token_hash_splat_nil + +#keyset[ruby_hash_pattern, index] +ruby_hash_pattern_child( + int ruby_hash_pattern: @ruby_hash_pattern ref, + int index: int ref, + unique int child: @ruby_hash_pattern_child_type ref +); + +ruby_hash_pattern_def( + unique int id: @ruby_hash_pattern +); + +ruby_hash_splat_argument_child( + unique int ruby_hash_splat_argument: @ruby_hash_splat_argument ref, + unique int child: @ruby_underscore_arg ref +); + +ruby_hash_splat_argument_def( + unique int id: @ruby_hash_splat_argument +); + +ruby_hash_splat_parameter_name( + unique int ruby_hash_splat_parameter: @ruby_hash_splat_parameter ref, + unique int name: @ruby_token_identifier ref +); + +ruby_hash_splat_parameter_def( + unique int id: @ruby_hash_splat_parameter +); + +@ruby_heredoc_body_child_type = @ruby_interpolation | @ruby_token_escape_sequence | @ruby_token_heredoc_content | @ruby_token_heredoc_end + +#keyset[ruby_heredoc_body, index] +ruby_heredoc_body_child( + int ruby_heredoc_body: @ruby_heredoc_body ref, + int index: int ref, + unique int child: @ruby_heredoc_body_child_type ref +); + +ruby_heredoc_body_def( + unique int id: @ruby_heredoc_body +); + +@ruby_if_alternative_type = @ruby_else | @ruby_elsif + +ruby_if_alternative( + unique int ruby_if: @ruby_if ref, + unique int alternative: @ruby_if_alternative_type ref +); + +ruby_if_consequence( + unique int ruby_if: @ruby_if ref, + unique int consequence: @ruby_then ref +); + +ruby_if_def( + unique int id: @ruby_if, + int condition: @ruby_underscore_statement ref +); + +ruby_if_guard_def( + unique int id: @ruby_if_guard, + int condition: @ruby_underscore_expression ref +); + +ruby_if_modifier_def( + unique int id: @ruby_if_modifier, + int body: @ruby_underscore_statement ref, + int condition: @ruby_underscore_expression ref +); + +ruby_in_def( + unique int id: @ruby_in, + int child: @ruby_underscore_arg ref +); + +ruby_in_clause_body( + unique int ruby_in_clause: @ruby_in_clause ref, + unique int body: @ruby_then ref +); + +@ruby_in_clause_guard_type = @ruby_if_guard | @ruby_unless_guard + +ruby_in_clause_guard( + unique int ruby_in_clause: @ruby_in_clause ref, + unique int guard: @ruby_in_clause_guard_type ref +); + +ruby_in_clause_def( + unique int id: @ruby_in_clause, + int pattern: @ruby_underscore_pattern_top_expr_body ref +); + +@ruby_interpolation_child_type = @ruby_token_empty_statement | @ruby_underscore_nonlocal_variable | @ruby_underscore_statement + +#keyset[ruby_interpolation, index] +ruby_interpolation_child( + int ruby_interpolation: @ruby_interpolation ref, + int index: int ref, + unique int child: @ruby_interpolation_child_type ref +); + +ruby_interpolation_def( + unique int id: @ruby_interpolation +); + +ruby_keyword_parameter_value( + unique int ruby_keyword_parameter: @ruby_keyword_parameter ref, + unique int value: @ruby_underscore_arg ref +); + +ruby_keyword_parameter_def( + unique int id: @ruby_keyword_parameter, + int name: @ruby_token_identifier ref +); + +@ruby_keyword_pattern_key_type = @ruby_string__ | @ruby_token_hash_key_symbol + +ruby_keyword_pattern_value( + unique int ruby_keyword_pattern: @ruby_keyword_pattern ref, + unique int value: @ruby_underscore_pattern_expr ref +); + +ruby_keyword_pattern_def( + unique int id: @ruby_keyword_pattern, + int key__: @ruby_keyword_pattern_key_type ref +); + +@ruby_lambda_body_type = @ruby_block | @ruby_do_block + +ruby_lambda_parameters( + unique int ruby_lambda: @ruby_lambda ref, + unique int parameters: @ruby_lambda_parameters ref +); + +ruby_lambda_def( + unique int id: @ruby_lambda, + int body: @ruby_lambda_body_type ref +); + +@ruby_lambda_parameters_child_type = @ruby_block_parameter | @ruby_destructured_parameter | @ruby_hash_splat_parameter | @ruby_keyword_parameter | @ruby_optional_parameter | @ruby_splat_parameter | @ruby_token_forward_parameter | @ruby_token_hash_splat_nil | @ruby_token_identifier + +#keyset[ruby_lambda_parameters, index] +ruby_lambda_parameters_child( + int ruby_lambda_parameters: @ruby_lambda_parameters ref, + int index: int ref, + unique int child: @ruby_lambda_parameters_child_type ref +); + +ruby_lambda_parameters_def( + unique int id: @ruby_lambda_parameters +); + +@ruby_left_assignment_list_child_type = @ruby_destructured_left_assignment | @ruby_rest_assignment | @ruby_underscore_lhs + +#keyset[ruby_left_assignment_list, index] +ruby_left_assignment_list_child( + int ruby_left_assignment_list: @ruby_left_assignment_list ref, + int index: int ref, + unique int child: @ruby_left_assignment_list_child_type ref +); + +ruby_left_assignment_list_def( + unique int id: @ruby_left_assignment_list +); + +ruby_match_pattern_def( + unique int id: @ruby_match_pattern, + int pattern: @ruby_underscore_pattern_top_expr_body ref, + int value: @ruby_underscore_arg ref +); + +@ruby_method_body_type = @ruby_body_statement | @ruby_rescue_modifier | @ruby_underscore_arg + +ruby_method_body( + unique int ruby_method: @ruby_method ref, + unique int body: @ruby_method_body_type ref +); + +ruby_method_parameters( + unique int ruby_method: @ruby_method ref, + unique int parameters: @ruby_method_parameters ref +); + +ruby_method_def( + unique int id: @ruby_method, + int name: @ruby_underscore_method_name ref +); + +@ruby_method_parameters_child_type = @ruby_block_parameter | @ruby_destructured_parameter | @ruby_hash_splat_parameter | @ruby_keyword_parameter | @ruby_optional_parameter | @ruby_splat_parameter | @ruby_token_forward_parameter | @ruby_token_hash_splat_nil | @ruby_token_identifier + +#keyset[ruby_method_parameters, index] +ruby_method_parameters_child( + int ruby_method_parameters: @ruby_method_parameters ref, + int index: int ref, + unique int child: @ruby_method_parameters_child_type ref +); + +ruby_method_parameters_def( + unique int id: @ruby_method_parameters +); + +ruby_module_body( + unique int ruby_module: @ruby_module ref, + unique int body: @ruby_body_statement ref +); + +@ruby_module_name_type = @ruby_scope_resolution | @ruby_token_constant + +ruby_module_def( + unique int id: @ruby_module, + int name: @ruby_module_name_type ref +); + +ruby_next_child( + unique int ruby_next: @ruby_next ref, + unique int child: @ruby_argument_list ref +); + +ruby_next_def( + unique int id: @ruby_next +); + +case @ruby_operator_assignment.operator of + 0 = @ruby_operator_assignment_percentequal +| 1 = @ruby_operator_assignment_ampersandampersandequal +| 2 = @ruby_operator_assignment_ampersandequal +| 3 = @ruby_operator_assignment_starstarequal +| 4 = @ruby_operator_assignment_starequal +| 5 = @ruby_operator_assignment_plusequal +| 6 = @ruby_operator_assignment_minusequal +| 7 = @ruby_operator_assignment_slashequal +| 8 = @ruby_operator_assignment_langlelangleequal +| 9 = @ruby_operator_assignment_ranglerangleequal +| 10 = @ruby_operator_assignment_caretequal +| 11 = @ruby_operator_assignment_pipeequal +| 12 = @ruby_operator_assignment_pipepipeequal +; + + +@ruby_operator_assignment_right_type = @ruby_rescue_modifier | @ruby_underscore_expression + +ruby_operator_assignment_def( + unique int id: @ruby_operator_assignment, + int left: @ruby_underscore_lhs ref, + int operator: int ref, + int right: @ruby_operator_assignment_right_type ref +); + +ruby_optional_parameter_def( + unique int id: @ruby_optional_parameter, + int name: @ruby_token_identifier ref, + int value: @ruby_underscore_arg ref +); + +@ruby_pair_key_type = @ruby_string__ | @ruby_token_hash_key_symbol | @ruby_underscore_arg + +ruby_pair_value( + unique int ruby_pair: @ruby_pair ref, + unique int value: @ruby_underscore_arg ref +); + +ruby_pair_def( + unique int id: @ruby_pair, + int key__: @ruby_pair_key_type ref +); + +ruby_parenthesized_pattern_def( + unique int id: @ruby_parenthesized_pattern, + int child: @ruby_underscore_pattern_expr ref +); + +@ruby_parenthesized_statements_child_type = @ruby_token_empty_statement | @ruby_underscore_statement + +#keyset[ruby_parenthesized_statements, index] +ruby_parenthesized_statements_child( + int ruby_parenthesized_statements: @ruby_parenthesized_statements ref, + int index: int ref, + unique int child: @ruby_parenthesized_statements_child_type ref +); + +ruby_parenthesized_statements_def( + unique int id: @ruby_parenthesized_statements +); + +@ruby_pattern_child_type = @ruby_splat_argument | @ruby_underscore_arg + +ruby_pattern_def( + unique int id: @ruby_pattern, + int child: @ruby_pattern_child_type ref +); + +@ruby_program_child_type = @ruby_token_empty_statement | @ruby_token_uninterpreted | @ruby_underscore_statement + +#keyset[ruby_program, index] +ruby_program_child( + int ruby_program: @ruby_program ref, + int index: int ref, + unique int child: @ruby_program_child_type ref +); + +ruby_program_def( + unique int id: @ruby_program +); + +@ruby_range_begin_type = @ruby_underscore_arg | @ruby_underscore_pattern_primitive + +ruby_range_begin( + unique int ruby_range: @ruby_range ref, + unique int begin: @ruby_range_begin_type ref +); + +@ruby_range_end_type = @ruby_underscore_arg | @ruby_underscore_pattern_primitive + +ruby_range_end( + unique int ruby_range: @ruby_range ref, + unique int end: @ruby_range_end_type ref +); + +case @ruby_range.operator of + 0 = @ruby_range_dotdot +| 1 = @ruby_range_dotdotdot +; + + +ruby_range_def( + unique int id: @ruby_range, + int operator: int ref +); + +@ruby_rational_child_type = @ruby_token_float | @ruby_token_integer + +ruby_rational_def( + unique int id: @ruby_rational, + int child: @ruby_rational_child_type ref +); + +ruby_redo_child( + unique int ruby_redo: @ruby_redo ref, + unique int child: @ruby_argument_list ref +); + +ruby_redo_def( + unique int id: @ruby_redo +); + +@ruby_regex_child_type = @ruby_interpolation | @ruby_token_escape_sequence | @ruby_token_string_content + +#keyset[ruby_regex, index] +ruby_regex_child( + int ruby_regex: @ruby_regex ref, + int index: int ref, + unique int child: @ruby_regex_child_type ref +); + +ruby_regex_def( + unique int id: @ruby_regex +); + +ruby_rescue_body( + unique int ruby_rescue: @ruby_rescue ref, + unique int body: @ruby_then ref +); + +ruby_rescue_exceptions( + unique int ruby_rescue: @ruby_rescue ref, + unique int exceptions: @ruby_exceptions ref +); + +ruby_rescue_variable( + unique int ruby_rescue: @ruby_rescue ref, + unique int variable: @ruby_exception_variable ref +); + +ruby_rescue_def( + unique int id: @ruby_rescue +); + +@ruby_rescue_modifier_body_type = @ruby_underscore_arg | @ruby_underscore_statement + +ruby_rescue_modifier_def( + unique int id: @ruby_rescue_modifier, + int body: @ruby_rescue_modifier_body_type ref, + int handler: @ruby_underscore_expression ref +); + +ruby_rest_assignment_child( + unique int ruby_rest_assignment: @ruby_rest_assignment ref, + unique int child: @ruby_underscore_lhs ref +); + +ruby_rest_assignment_def( + unique int id: @ruby_rest_assignment +); + +ruby_retry_child( + unique int ruby_retry: @ruby_retry ref, + unique int child: @ruby_argument_list ref +); + +ruby_retry_def( + unique int id: @ruby_retry +); + +ruby_return_child( + unique int ruby_return: @ruby_return ref, + unique int child: @ruby_argument_list ref +); + +ruby_return_def( + unique int id: @ruby_return +); + +@ruby_right_assignment_list_child_type = @ruby_splat_argument | @ruby_underscore_arg + +#keyset[ruby_right_assignment_list, index] +ruby_right_assignment_list_child( + int ruby_right_assignment_list: @ruby_right_assignment_list ref, + int index: int ref, + unique int child: @ruby_right_assignment_list_child_type ref +); + +ruby_right_assignment_list_def( + unique int id: @ruby_right_assignment_list +); + +@ruby_scope_resolution_scope_type = @ruby_underscore_pattern_constant | @ruby_underscore_primary + +ruby_scope_resolution_scope( + unique int ruby_scope_resolution: @ruby_scope_resolution ref, + unique int scope: @ruby_scope_resolution_scope_type ref +); + +ruby_scope_resolution_def( + unique int id: @ruby_scope_resolution, + int name: @ruby_token_constant ref +); + +ruby_setter_def( + unique int id: @ruby_setter, + int name: @ruby_token_identifier ref +); + +ruby_singleton_class_body( + unique int ruby_singleton_class: @ruby_singleton_class ref, + unique int body: @ruby_body_statement ref +); + +ruby_singleton_class_def( + unique int id: @ruby_singleton_class, + int value: @ruby_underscore_arg ref +); + +@ruby_singleton_method_body_type = @ruby_body_statement | @ruby_rescue_modifier | @ruby_underscore_arg + +ruby_singleton_method_body( + unique int ruby_singleton_method: @ruby_singleton_method ref, + unique int body: @ruby_singleton_method_body_type ref +); + +@ruby_singleton_method_object_type = @ruby_underscore_arg | @ruby_underscore_variable + +ruby_singleton_method_parameters( + unique int ruby_singleton_method: @ruby_singleton_method ref, + unique int parameters: @ruby_method_parameters ref +); + +ruby_singleton_method_def( + unique int id: @ruby_singleton_method, + int name: @ruby_underscore_method_name ref, + int object: @ruby_singleton_method_object_type ref +); + +ruby_splat_argument_child( + unique int ruby_splat_argument: @ruby_splat_argument ref, + unique int child: @ruby_underscore_arg ref +); + +ruby_splat_argument_def( + unique int id: @ruby_splat_argument +); + +ruby_splat_parameter_name( + unique int ruby_splat_parameter: @ruby_splat_parameter ref, + unique int name: @ruby_token_identifier ref +); + +ruby_splat_parameter_def( + unique int id: @ruby_splat_parameter +); + +@ruby_string_child_type = @ruby_interpolation | @ruby_token_escape_sequence | @ruby_token_string_content + +#keyset[ruby_string__, index] +ruby_string_child( + int ruby_string__: @ruby_string__ ref, + int index: int ref, + unique int child: @ruby_string_child_type ref +); + +ruby_string_def( + unique int id: @ruby_string__ +); + +#keyset[ruby_string_array, index] +ruby_string_array_child( + int ruby_string_array: @ruby_string_array ref, + int index: int ref, + unique int child: @ruby_bare_string ref +); + +ruby_string_array_def( + unique int id: @ruby_string_array +); + +@ruby_subshell_child_type = @ruby_interpolation | @ruby_token_escape_sequence | @ruby_token_string_content + +#keyset[ruby_subshell, index] +ruby_subshell_child( + int ruby_subshell: @ruby_subshell ref, + int index: int ref, + unique int child: @ruby_subshell_child_type ref +); + +ruby_subshell_def( + unique int id: @ruby_subshell +); + +ruby_superclass_def( + unique int id: @ruby_superclass, + int child: @ruby_underscore_expression ref +); + +#keyset[ruby_symbol_array, index] +ruby_symbol_array_child( + int ruby_symbol_array: @ruby_symbol_array ref, + int index: int ref, + unique int child: @ruby_bare_symbol ref +); + +ruby_symbol_array_def( + unique int id: @ruby_symbol_array +); + +ruby_test_pattern_def( + unique int id: @ruby_test_pattern, + int pattern: @ruby_underscore_pattern_top_expr_body ref, + int value: @ruby_underscore_arg ref +); + +@ruby_then_child_type = @ruby_token_empty_statement | @ruby_underscore_statement + +#keyset[ruby_then, index] +ruby_then_child( + int ruby_then: @ruby_then ref, + int index: int ref, + unique int child: @ruby_then_child_type ref +); + +ruby_then_def( + unique int id: @ruby_then +); + +@ruby_unary_operand_type = @ruby_parenthesized_statements | @ruby_underscore_expression | @ruby_underscore_simple_numeric + +case @ruby_unary.operator of + 0 = @ruby_unary_bang +| 1 = @ruby_unary_plus +| 2 = @ruby_unary_minus +| 3 = @ruby_unary_definedquestion +| 4 = @ruby_unary_not +| 5 = @ruby_unary_tilde +; + + +ruby_unary_def( + unique int id: @ruby_unary, + int operand: @ruby_unary_operand_type ref, + int operator: int ref +); + +#keyset[ruby_undef, index] +ruby_undef_child( + int ruby_undef: @ruby_undef ref, + int index: int ref, + unique int child: @ruby_underscore_method_name ref +); + +ruby_undef_def( + unique int id: @ruby_undef +); + +@ruby_unless_alternative_type = @ruby_else | @ruby_elsif + +ruby_unless_alternative( + unique int ruby_unless: @ruby_unless ref, + unique int alternative: @ruby_unless_alternative_type ref +); + +ruby_unless_consequence( + unique int ruby_unless: @ruby_unless ref, + unique int consequence: @ruby_then ref +); + +ruby_unless_def( + unique int id: @ruby_unless, + int condition: @ruby_underscore_statement ref +); + +ruby_unless_guard_def( + unique int id: @ruby_unless_guard, + int condition: @ruby_underscore_expression ref +); + +ruby_unless_modifier_def( + unique int id: @ruby_unless_modifier, + int body: @ruby_underscore_statement ref, + int condition: @ruby_underscore_expression ref +); + +ruby_until_def( + unique int id: @ruby_until, + int body: @ruby_do ref, + int condition: @ruby_underscore_statement ref +); + +ruby_until_modifier_def( + unique int id: @ruby_until_modifier, + int body: @ruby_underscore_statement ref, + int condition: @ruby_underscore_expression ref +); + +@ruby_variable_reference_pattern_name_type = @ruby_token_identifier | @ruby_underscore_nonlocal_variable + +ruby_variable_reference_pattern_def( + unique int id: @ruby_variable_reference_pattern, + int name: @ruby_variable_reference_pattern_name_type ref +); + +ruby_when_body( + unique int ruby_when: @ruby_when ref, + unique int body: @ruby_then ref +); + +#keyset[ruby_when, index] +ruby_when_pattern( + int ruby_when: @ruby_when ref, + int index: int ref, + unique int pattern: @ruby_pattern ref +); + +ruby_when_def( + unique int id: @ruby_when +); + +ruby_while_def( + unique int id: @ruby_while, + int body: @ruby_do ref, + int condition: @ruby_underscore_statement ref +); + +ruby_while_modifier_def( + unique int id: @ruby_while_modifier, + int body: @ruby_underscore_statement ref, + int condition: @ruby_underscore_expression ref +); + +ruby_yield_child( + unique int ruby_yield: @ruby_yield ref, + unique int child: @ruby_argument_list ref +); + +ruby_yield_def( + unique int id: @ruby_yield +); + +ruby_tokeninfo( + unique int id: @ruby_token, + int kind: int ref, + string value: string ref +); + +case @ruby_token.kind of + 0 = @ruby_reserved_word +| 1 = @ruby_token_character +| 2 = @ruby_token_class_variable +| 3 = @ruby_token_comment +| 4 = @ruby_token_constant +| 5 = @ruby_token_empty_statement +| 6 = @ruby_token_encoding +| 7 = @ruby_token_escape_sequence +| 8 = @ruby_token_false +| 9 = @ruby_token_file +| 10 = @ruby_token_float +| 11 = @ruby_token_forward_argument +| 12 = @ruby_token_forward_parameter +| 13 = @ruby_token_global_variable +| 14 = @ruby_token_hash_key_symbol +| 15 = @ruby_token_hash_splat_nil +| 16 = @ruby_token_heredoc_beginning +| 17 = @ruby_token_heredoc_content +| 18 = @ruby_token_heredoc_end +| 19 = @ruby_token_identifier +| 20 = @ruby_token_instance_variable +| 21 = @ruby_token_integer +| 22 = @ruby_token_line +| 23 = @ruby_token_nil +| 24 = @ruby_token_operator +| 25 = @ruby_token_self +| 26 = @ruby_token_simple_symbol +| 27 = @ruby_token_string_content +| 28 = @ruby_token_super +| 29 = @ruby_token_true +| 30 = @ruby_token_uninterpreted +; + + +@ruby_ast_node = @ruby_alias | @ruby_alternative_pattern | @ruby_argument_list | @ruby_array | @ruby_array_pattern | @ruby_as_pattern | @ruby_assignment | @ruby_bare_string | @ruby_bare_symbol | @ruby_begin | @ruby_begin_block | @ruby_binary | @ruby_block | @ruby_block_argument | @ruby_block_body | @ruby_block_parameter | @ruby_block_parameters | @ruby_body_statement | @ruby_break | @ruby_call | @ruby_case__ | @ruby_case_match | @ruby_chained_string | @ruby_class | @ruby_complex | @ruby_conditional | @ruby_delimited_symbol | @ruby_destructured_left_assignment | @ruby_destructured_parameter | @ruby_do | @ruby_do_block | @ruby_element_reference | @ruby_else | @ruby_elsif | @ruby_end_block | @ruby_ensure | @ruby_exception_variable | @ruby_exceptions | @ruby_expression_reference_pattern | @ruby_find_pattern | @ruby_for | @ruby_hash | @ruby_hash_pattern | @ruby_hash_splat_argument | @ruby_hash_splat_parameter | @ruby_heredoc_body | @ruby_if | @ruby_if_guard | @ruby_if_modifier | @ruby_in | @ruby_in_clause | @ruby_interpolation | @ruby_keyword_parameter | @ruby_keyword_pattern | @ruby_lambda | @ruby_lambda_parameters | @ruby_left_assignment_list | @ruby_match_pattern | @ruby_method | @ruby_method_parameters | @ruby_module | @ruby_next | @ruby_operator_assignment | @ruby_optional_parameter | @ruby_pair | @ruby_parenthesized_pattern | @ruby_parenthesized_statements | @ruby_pattern | @ruby_program | @ruby_range | @ruby_rational | @ruby_redo | @ruby_regex | @ruby_rescue | @ruby_rescue_modifier | @ruby_rest_assignment | @ruby_retry | @ruby_return | @ruby_right_assignment_list | @ruby_scope_resolution | @ruby_setter | @ruby_singleton_class | @ruby_singleton_method | @ruby_splat_argument | @ruby_splat_parameter | @ruby_string__ | @ruby_string_array | @ruby_subshell | @ruby_superclass | @ruby_symbol_array | @ruby_test_pattern | @ruby_then | @ruby_token | @ruby_unary | @ruby_undef | @ruby_unless | @ruby_unless_guard | @ruby_unless_modifier | @ruby_until | @ruby_until_modifier | @ruby_variable_reference_pattern | @ruby_when | @ruby_while | @ruby_while_modifier | @ruby_yield + +ruby_ast_node_location( + unique int node: @ruby_ast_node ref, + int loc: @location_default ref +); + +#keyset[parent, parent_index] +ruby_ast_node_parent( + unique int node: @ruby_ast_node ref, + int parent: @ruby_ast_node ref, + int parent_index: int ref +); + +/*- Erb dbscheme -*/ +erb_comment_directive_child( + unique int erb_comment_directive: @erb_comment_directive ref, + unique int child: @erb_token_comment ref +); + +erb_comment_directive_def( + unique int id: @erb_comment_directive +); + +erb_directive_child( + unique int erb_directive: @erb_directive ref, + unique int child: @erb_token_code ref +); + +erb_directive_def( + unique int id: @erb_directive +); + +erb_graphql_directive_child( + unique int erb_graphql_directive: @erb_graphql_directive ref, + unique int child: @erb_token_code ref +); + +erb_graphql_directive_def( + unique int id: @erb_graphql_directive +); + +erb_output_directive_child( + unique int erb_output_directive: @erb_output_directive ref, + unique int child: @erb_token_code ref +); + +erb_output_directive_def( + unique int id: @erb_output_directive +); + +@erb_template_child_type = @erb_comment_directive | @erb_directive | @erb_graphql_directive | @erb_output_directive | @erb_token_content + +#keyset[erb_template, index] +erb_template_child( + int erb_template: @erb_template ref, + int index: int ref, + unique int child: @erb_template_child_type ref +); + +erb_template_def( + unique int id: @erb_template +); + +erb_tokeninfo( + unique int id: @erb_token, + int kind: int ref, + string value: string ref +); + +case @erb_token.kind of + 0 = @erb_reserved_word +| 1 = @erb_token_code +| 2 = @erb_token_comment +| 3 = @erb_token_content +; + + +@erb_ast_node = @erb_comment_directive | @erb_directive | @erb_graphql_directive | @erb_output_directive | @erb_template | @erb_token + +erb_ast_node_location( + unique int node: @erb_ast_node ref, + int loc: @location_default ref +); + +#keyset[parent, parent_index] +erb_ast_node_parent( + unique int node: @erb_ast_node ref, + int parent: @erb_ast_node ref, + int parent_index: int ref +); + diff --git a/ruby/downgrades/dc51d416301df12df5b70fbc4338de6cc1f82bfd/upgrade.properties b/ruby/downgrades/dc51d416301df12df5b70fbc4338de6cc1f82bfd/upgrade.properties new file mode 100644 index 00000000000..1d437ec8ac6 --- /dev/null +++ b/ruby/downgrades/dc51d416301df12df5b70fbc4338de6cc1f82bfd/upgrade.properties @@ -0,0 +1,3 @@ +description: Add databaseMetadata relation +compatibility: full +databaseMetadata.rel: delete diff --git a/ruby/extractor/Cargo.toml b/ruby/extractor/Cargo.toml index 8d3a94113fa..16cdcca246c 100644 --- a/ruby/extractor/Cargo.toml +++ b/ruby/extractor/Cargo.toml @@ -17,5 +17,6 @@ rayon = "1.10.0" regex = "1.11.1" encoding = "0.2" lazy_static = "1.5.0" +serde_json = "1.0.140" codeql-extractor = { path = "../../shared/tree-sitter-extractor" } diff --git a/ruby/extractor/src/extractor.rs b/ruby/extractor/src/extractor.rs index d4271312226..6807d09e9be 100644 --- a/ruby/extractor/src/extractor.rs +++ b/ruby/extractor/src/extractor.rs @@ -1,7 +1,9 @@ use clap::Args; +use codeql_extractor::file_paths::PathTransformer; use lazy_static::lazy_static; use rayon::prelude::*; use std::borrow::Cow; +use std::collections::HashSet; use std::fs; use std::io::BufRead; use std::path::{Path, PathBuf}; @@ -78,6 +80,9 @@ pub fn run(options: Options) -> std::io::Result<()> { let file_list = fs::File::open(file_paths::path_from_string(&options.file_list))?; + let overlay_changed_files: Option> = get_overlay_changed_files(); + let path_transformer = file_paths::load_path_transformer()?; + let language: Language = tree_sitter_ruby::LANGUAGE.into(); let erb: Language = tree_sitter_embedded_template::LANGUAGE.into(); // Look up tree-sitter kind ids now, to avoid string comparisons when scanning ERB files. @@ -94,7 +99,14 @@ pub fn run(options: Options) -> std::io::Result<()> { .try_for_each(|line| { let mut diagnostics_writer = diagnostics.logger(); let path = PathBuf::from(line).canonicalize()?; - let src_archive_file = file_paths::path_for(&src_archive_dir, &path, ""); + match &overlay_changed_files { + Some(changed_files) if !changed_files.contains(&path) => { + // We are extracting an overlay and this file is not in the list of changes files, so we should skip it. + return Result::Ok(()); + } + _ => {}, + } + let src_archive_file = file_paths::path_for(&src_archive_dir, &path, "", path_transformer.as_ref()); let mut source = std::fs::read(&path)?; let mut needs_conversion = false; let code_ranges; @@ -107,6 +119,7 @@ pub fn run(options: Options) -> std::io::Result<()> { &erb_schema, &mut diagnostics_writer, &mut trap_writer, + path_transformer.as_ref(), &path, &source, &[], @@ -151,7 +164,7 @@ pub fn run(options: Options) -> std::io::Result<()> { "character-decoding-error", "Character decoding error", ) - .file(&file_paths::normalize_path(&path)) + .file(&file_paths::normalize_and_transform_path(&path, path_transformer.as_ref())) .message( "Could not decode the file contents as {}: {}. The contents of the file must match the character encoding specified in the {} {}.", &[ @@ -171,7 +184,7 @@ pub fn run(options: Options) -> std::io::Result<()> { diagnostics_writer.write( diagnostics_writer .new_entry("unknown-character-encoding", "Could not process some files due to an unknown character encoding") - .file(&file_paths::normalize_path(&path)) + .file(&file_paths::normalize_and_transform_path(&path, path_transformer.as_ref())) .message( "Unknown character encoding {} in {} {}.", &[ @@ -194,6 +207,7 @@ pub fn run(options: Options) -> std::io::Result<()> { &schema, &mut diagnostics_writer, &mut trap_writer, + path_transformer.as_ref(), &path, &source, &code_ranges, @@ -204,14 +218,26 @@ pub fn run(options: Options) -> std::io::Result<()> { } else { std::fs::copy(&path, &src_archive_file)?; } - write_trap(&trap_dir, path, &trap_writer, trap_compression) + write_trap(&trap_dir, path, &trap_writer, trap_compression, path_transformer.as_ref()) }) .expect("failed to extract files"); let path = PathBuf::from("extras"); let mut trap_writer = trap::Writer::new(); extractor::populate_empty_location(&mut trap_writer); - let res = write_trap(&trap_dir, path, &trap_writer, trap_compression); + let res = write_trap( + &trap_dir, + path, + &trap_writer, + trap_compression, + path_transformer.as_ref(), + ); + if let Ok(output_path) = std::env::var("CODEQL_EXTRACTOR_RUBY_OVERLAY_BASE_METADATA_OUT") { + // We're extracting an overlay base. For now, we don't have any metadata we need to store + // that would get read when extracting the overlay, but the CLI expects us to write + // *something*. An empty file will do. + std::fs::write(output_path, b"")?; + } tracing::info!("Extraction complete"); res } @@ -237,8 +263,14 @@ fn write_trap( path: PathBuf, trap_writer: &trap::Writer, trap_compression: trap::Compression, + path_transformer: Option<&PathTransformer>, ) -> std::io::Result<()> { - let trap_file = file_paths::path_for(trap_dir, &path, trap_compression.extension()); + let trap_file = file_paths::path_for( + trap_dir, + &path, + trap_compression.extension(), + path_transformer, + ); std::fs::create_dir_all(trap_file.parent().unwrap())?; trap_writer.write_to_file(&trap_file, trap_compression) } @@ -302,6 +334,39 @@ fn skip_space(content: &[u8], index: usize) -> usize { } index } + +/** +* If the relevant environment variable has been set by the CLI, indicating that we are extracting +* an overlay, this function reads the JSON file at the path given by its value, and returns a set +* of canonicalized paths of source files that have changed and should therefore be extracted. +* +* If the environment variable is not set (i.e. we're not extracting an overlay), or if the file +* cannot be read, this function returns `None`. In that case, all files should be extracted. +*/ +fn get_overlay_changed_files() -> Option> { + let path = std::env::var("CODEQL_EXTRACTOR_RUBY_OVERLAY_CHANGES").ok()?; + let file_content = fs::read_to_string(path).ok()?; + let json_value: serde_json::Value = serde_json::from_str(&file_content).ok()?; + + // The JSON file is expected to have the following structure: + // { + // "changes": [ + // "relative/path/to/changed/file1.rb", + // "relative/path/to/changed/file2.rb", + // ... + // ] + // } + Some( + json_value + .get("changes")? + .as_array()? + .iter() + .filter_map(|change| change.as_str()) + .filter_map(|s| PathBuf::from(s).canonicalize().ok()) + .collect(), + ) +} + fn scan_coding_comment(content: &[u8]) -> std::option::Option> { let mut index = 0; // skip UTF-8 BOM marker if there is one diff --git a/ruby/extractor/src/generator.rs b/ruby/extractor/src/generator.rs index 00d878243ae..1601d2edda6 100644 --- a/ruby/extractor/src/generator.rs +++ b/ruby/extractor/src/generator.rs @@ -28,5 +28,5 @@ pub fn run(options: Options) -> std::io::Result<()> { }, ]; - generate(languages, options.dbscheme, options.library) + generate(languages, options.dbscheme, options.library, true) } diff --git a/ruby/ql/lib/CHANGELOG.md b/ruby/ql/lib/CHANGELOG.md index cdd84b3aeeb..2a4d6f21375 100644 --- a/ruby/ql/lib/CHANGELOG.md +++ b/ruby/ql/lib/CHANGELOG.md @@ -1,3 +1,7 @@ +## 4.1.9 + +No user-facing changes. + ## 4.1.8 No user-facing changes. diff --git a/ruby/ql/lib/change-notes/released/4.1.9.md b/ruby/ql/lib/change-notes/released/4.1.9.md new file mode 100644 index 00000000000..94eac40d6e3 --- /dev/null +++ b/ruby/ql/lib/change-notes/released/4.1.9.md @@ -0,0 +1,3 @@ +## 4.1.9 + +No user-facing changes. diff --git a/ruby/ql/lib/codeql-pack.release.yml b/ruby/ql/lib/codeql-pack.release.yml index 8636017292c..4a8b9706277 100644 --- a/ruby/ql/lib/codeql-pack.release.yml +++ b/ruby/ql/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 4.1.8 +lastReleaseVersion: 4.1.9 diff --git a/ruby/ql/lib/codeql/ruby/ast/internal/TreeSitter.qll b/ruby/ql/lib/codeql/ruby/ast/internal/TreeSitter.qll index e339b07d35b..3532a5d2a21 100644 --- a/ruby/ql/lib/codeql/ruby/ast/internal/TreeSitter.qll +++ b/ruby/ql/lib/codeql/ruby/ast/internal/TreeSitter.qll @@ -5,6 +5,10 @@ import codeql.Locations as L +/** Holds if the database is an overlay. */ +overlay[local] +private predicate isOverlay() { databaseMetadata("isOverlay", "true") } + module Ruby { /** The base class for all AST nodes */ class AstNode extends @ruby_ast_node { @@ -48,6 +52,30 @@ module Ruby { final override string getAPrimaryQlClass() { result = "ReservedWord" } } + /** Gets the file containing the given `node`. */ + overlay[local] + private @file getNodeFile(@ruby_ast_node node) { + exists(@location_default loc | ruby_ast_node_location(node, loc) | + locations_default(loc, result, _, _, _, _) + ) + } + + /** Holds if `file` was extracted as part of the overlay database. */ + overlay[local] + private predicate discardFile(@file file) { isOverlay() and file = getNodeFile(_) } + + /** Holds if `node` is in the `file` and is part of the overlay base database. */ + overlay[local] + private predicate discardableAstNode(@file file, @ruby_ast_node node) { + not isOverlay() and file = getNodeFile(node) + } + + /** Holds if `node` should be discarded, because it is part of the overlay base and is in a file that was also extracted as part of the overlay database. */ + overlay[discard_entity] + private predicate discardAstNode(@ruby_ast_node node) { + exists(@file file | discardableAstNode(file, node) and discardFile(file)) + } + class UnderscoreArg extends @ruby_underscore_arg, AstNode { } class UnderscoreCallOperator extends @ruby_underscore_call_operator, AstNode { } @@ -1970,6 +1998,30 @@ module Erb { final override string getAPrimaryQlClass() { result = "ReservedWord" } } + /** Gets the file containing the given `node`. */ + overlay[local] + private @file getNodeFile(@erb_ast_node node) { + exists(@location_default loc | erb_ast_node_location(node, loc) | + locations_default(loc, result, _, _, _, _) + ) + } + + /** Holds if `file` was extracted as part of the overlay database. */ + overlay[local] + private predicate discardFile(@file file) { isOverlay() and file = getNodeFile(_) } + + /** Holds if `node` is in the `file` and is part of the overlay base database. */ + overlay[local] + private predicate discardableAstNode(@file file, @erb_ast_node node) { + not isOverlay() and file = getNodeFile(node) + } + + /** Holds if `node` should be discarded, because it is part of the overlay base and is in a file that was also extracted as part of the overlay database. */ + overlay[discard_entity] + private predicate discardAstNode(@erb_ast_node node) { + exists(@file file | discardableAstNode(file, node) and discardFile(file)) + } + /** A class representing `code` tokens. */ class Code extends @erb_token_code, Token { /** Gets the name of the primary QL class for this element. */ diff --git a/ruby/ql/lib/qlpack.yml b/ruby/ql/lib/qlpack.yml index ab4215ced20..ef9f163cbd9 100644 --- a/ruby/ql/lib/qlpack.yml +++ b/ruby/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/ruby-all -version: 4.1.9-dev +version: 4.1.10-dev groups: ruby extractor: ruby dbscheme: ruby.dbscheme diff --git a/ruby/ql/lib/ruby.dbscheme b/ruby/ql/lib/ruby.dbscheme index 40a6b0a5e81..dc51d416301 100644 --- a/ruby/ql/lib/ruby.dbscheme +++ b/ruby/ql/lib/ruby.dbscheme @@ -108,6 +108,12 @@ yaml_locations(unique int locatable: @yaml_locatable ref, @yaml_locatable = @yaml_node | @yaml_error; +/*- Database metadata -*/ +databaseMetadata( + string metadataKey: string ref, + string value: string ref +); + /*- Ruby dbscheme -*/ @ruby_underscore_arg = @ruby_assignment | @ruby_binary | @ruby_conditional | @ruby_operator_assignment | @ruby_range | @ruby_unary | @ruby_underscore_primary diff --git a/ruby/ql/lib/ruby.dbscheme.stats b/ruby/ql/lib/ruby.dbscheme.stats index fd8850293b4..74a9e97f4bd 100644 --- a/ruby/ql/lib/ruby.dbscheme.stats +++ b/ruby/ql/lib/ruby.dbscheme.stats @@ -21521,6 +21521,42 @@ + + databaseMetadata + 1 + + + metadataKey + 1 + + + value + 1 + + + + + metadataKey + value + + + 12 + + + + + + value + metadataKey + + + 12 + + + + + + yaml_aliases 0 diff --git a/ruby/ql/lib/upgrades/40a6b0a5e81115bd870b3a12a1fe954b06362bb7/old.dbscheme b/ruby/ql/lib/upgrades/40a6b0a5e81115bd870b3a12a1fe954b06362bb7/old.dbscheme new file mode 100644 index 00000000000..40a6b0a5e81 --- /dev/null +++ b/ruby/ql/lib/upgrades/40a6b0a5e81115bd870b3a12a1fe954b06362bb7/old.dbscheme @@ -0,0 +1,1526 @@ +// CodeQL database schema for Ruby +// Automatically generated from the tree-sitter grammar; do not edit + +/*- Files and folders -*/ + +/** + * The location of an element. + * The location spans column `startcolumn` of line `startline` to + * column `endcolumn` of line `endline` in file `file`. + * For more information, see + * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/). + */ +locations_default( + unique int id: @location_default, + int file: @file ref, + int beginLine: int ref, + int beginColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +files( + unique int id: @file, + string name: string ref +); + +folders( + unique int id: @folder, + string name: string ref +); + +@container = @file | @folder + +containerparent( + int parent: @container ref, + unique int child: @container ref +); + +/*- Empty location -*/ + +empty_location( + int location: @location_default ref +); + +/*- Source location prefix -*/ + +/** + * The source location of the snapshot. + */ +sourceLocationPrefix(string prefix : string ref); + +/*- Diagnostic messages -*/ + +diagnostics( + unique int id: @diagnostic, + int severity: int ref, + string error_tag: string ref, + string error_message: string ref, + string full_error_message: string ref, + int location: @location_default ref +); + +/*- Diagnostic messages: severity -*/ + +case @diagnostic.severity of + 10 = @diagnostic_debug +| 20 = @diagnostic_info +| 30 = @diagnostic_warning +| 40 = @diagnostic_error +; + +/*- YAML -*/ + +#keyset[parent, idx] +yaml (unique int id: @yaml_node, + int kind: int ref, + int parent: @yaml_node_parent ref, + int idx: int ref, + string tag: string ref, + string tostring: string ref); + +case @yaml_node.kind of + 0 = @yaml_scalar_node +| 1 = @yaml_mapping_node +| 2 = @yaml_sequence_node +| 3 = @yaml_alias_node +; + +@yaml_collection_node = @yaml_mapping_node | @yaml_sequence_node; + +@yaml_node_parent = @yaml_collection_node | @file; + +yaml_anchors (unique int node: @yaml_node ref, + string anchor: string ref); + +yaml_aliases (unique int alias: @yaml_alias_node ref, + string target: string ref); + +yaml_scalars (unique int scalar: @yaml_scalar_node ref, + int style: int ref, + string value: string ref); + +yaml_errors (unique int id: @yaml_error, + string message: string ref); + +yaml_locations(unique int locatable: @yaml_locatable ref, + int location: @location_default ref); + +@yaml_locatable = @yaml_node | @yaml_error; + +/*- Ruby dbscheme -*/ +@ruby_underscore_arg = @ruby_assignment | @ruby_binary | @ruby_conditional | @ruby_operator_assignment | @ruby_range | @ruby_unary | @ruby_underscore_primary + +@ruby_underscore_call_operator = @ruby_reserved_word + +@ruby_underscore_expression = @ruby_assignment | @ruby_binary | @ruby_break | @ruby_call | @ruby_match_pattern | @ruby_next | @ruby_operator_assignment | @ruby_return | @ruby_test_pattern | @ruby_unary | @ruby_underscore_arg | @ruby_yield + +@ruby_underscore_lhs = @ruby_call | @ruby_element_reference | @ruby_scope_resolution | @ruby_token_false | @ruby_token_nil | @ruby_token_true | @ruby_underscore_variable + +@ruby_underscore_method_name = @ruby_delimited_symbol | @ruby_setter | @ruby_token_constant | @ruby_token_identifier | @ruby_token_operator | @ruby_token_simple_symbol | @ruby_underscore_nonlocal_variable + +@ruby_underscore_nonlocal_variable = @ruby_token_class_variable | @ruby_token_global_variable | @ruby_token_instance_variable + +@ruby_underscore_pattern_constant = @ruby_scope_resolution | @ruby_token_constant + +@ruby_underscore_pattern_expr = @ruby_alternative_pattern | @ruby_as_pattern | @ruby_underscore_pattern_expr_basic + +@ruby_underscore_pattern_expr_basic = @ruby_array_pattern | @ruby_expression_reference_pattern | @ruby_find_pattern | @ruby_hash_pattern | @ruby_parenthesized_pattern | @ruby_range | @ruby_token_identifier | @ruby_underscore_pattern_constant | @ruby_underscore_pattern_primitive | @ruby_variable_reference_pattern + +@ruby_underscore_pattern_primitive = @ruby_delimited_symbol | @ruby_lambda | @ruby_regex | @ruby_string__ | @ruby_string_array | @ruby_subshell | @ruby_symbol_array | @ruby_token_encoding | @ruby_token_false | @ruby_token_file | @ruby_token_heredoc_beginning | @ruby_token_line | @ruby_token_nil | @ruby_token_self | @ruby_token_simple_symbol | @ruby_token_true | @ruby_unary | @ruby_underscore_simple_numeric + +@ruby_underscore_pattern_top_expr_body = @ruby_array_pattern | @ruby_find_pattern | @ruby_hash_pattern | @ruby_underscore_pattern_expr + +@ruby_underscore_primary = @ruby_array | @ruby_begin | @ruby_break | @ruby_call | @ruby_case__ | @ruby_case_match | @ruby_chained_string | @ruby_class | @ruby_delimited_symbol | @ruby_for | @ruby_hash | @ruby_if | @ruby_lambda | @ruby_method | @ruby_module | @ruby_next | @ruby_parenthesized_statements | @ruby_redo | @ruby_regex | @ruby_retry | @ruby_return | @ruby_singleton_class | @ruby_singleton_method | @ruby_string__ | @ruby_string_array | @ruby_subshell | @ruby_symbol_array | @ruby_token_character | @ruby_token_heredoc_beginning | @ruby_token_simple_symbol | @ruby_unary | @ruby_underscore_lhs | @ruby_underscore_simple_numeric | @ruby_unless | @ruby_until | @ruby_while | @ruby_yield + +@ruby_underscore_simple_numeric = @ruby_complex | @ruby_rational | @ruby_token_float | @ruby_token_integer + +@ruby_underscore_statement = @ruby_alias | @ruby_begin_block | @ruby_end_block | @ruby_if_modifier | @ruby_rescue_modifier | @ruby_undef | @ruby_underscore_expression | @ruby_unless_modifier | @ruby_until_modifier | @ruby_while_modifier + +@ruby_underscore_variable = @ruby_token_constant | @ruby_token_identifier | @ruby_token_self | @ruby_token_super | @ruby_underscore_nonlocal_variable + +ruby_alias_def( + unique int id: @ruby_alias, + int alias: @ruby_underscore_method_name ref, + int name: @ruby_underscore_method_name ref +); + +#keyset[ruby_alternative_pattern, index] +ruby_alternative_pattern_alternatives( + int ruby_alternative_pattern: @ruby_alternative_pattern ref, + int index: int ref, + unique int alternatives: @ruby_underscore_pattern_expr_basic ref +); + +ruby_alternative_pattern_def( + unique int id: @ruby_alternative_pattern +); + +@ruby_argument_list_child_type = @ruby_block_argument | @ruby_hash_splat_argument | @ruby_pair | @ruby_splat_argument | @ruby_token_forward_argument | @ruby_underscore_expression + +#keyset[ruby_argument_list, index] +ruby_argument_list_child( + int ruby_argument_list: @ruby_argument_list ref, + int index: int ref, + unique int child: @ruby_argument_list_child_type ref +); + +ruby_argument_list_def( + unique int id: @ruby_argument_list +); + +@ruby_array_child_type = @ruby_block_argument | @ruby_hash_splat_argument | @ruby_pair | @ruby_splat_argument | @ruby_token_forward_argument | @ruby_underscore_expression + +#keyset[ruby_array, index] +ruby_array_child( + int ruby_array: @ruby_array ref, + int index: int ref, + unique int child: @ruby_array_child_type ref +); + +ruby_array_def( + unique int id: @ruby_array +); + +ruby_array_pattern_class( + unique int ruby_array_pattern: @ruby_array_pattern ref, + unique int class: @ruby_underscore_pattern_constant ref +); + +@ruby_array_pattern_child_type = @ruby_splat_parameter | @ruby_underscore_pattern_expr + +#keyset[ruby_array_pattern, index] +ruby_array_pattern_child( + int ruby_array_pattern: @ruby_array_pattern ref, + int index: int ref, + unique int child: @ruby_array_pattern_child_type ref +); + +ruby_array_pattern_def( + unique int id: @ruby_array_pattern +); + +ruby_as_pattern_def( + unique int id: @ruby_as_pattern, + int name: @ruby_token_identifier ref, + int value: @ruby_underscore_pattern_expr ref +); + +@ruby_assignment_left_type = @ruby_left_assignment_list | @ruby_underscore_lhs + +@ruby_assignment_right_type = @ruby_rescue_modifier | @ruby_right_assignment_list | @ruby_splat_argument | @ruby_underscore_expression + +ruby_assignment_def( + unique int id: @ruby_assignment, + int left: @ruby_assignment_left_type ref, + int right: @ruby_assignment_right_type ref +); + +@ruby_bare_string_child_type = @ruby_interpolation | @ruby_token_escape_sequence | @ruby_token_string_content + +#keyset[ruby_bare_string, index] +ruby_bare_string_child( + int ruby_bare_string: @ruby_bare_string ref, + int index: int ref, + unique int child: @ruby_bare_string_child_type ref +); + +ruby_bare_string_def( + unique int id: @ruby_bare_string +); + +@ruby_bare_symbol_child_type = @ruby_interpolation | @ruby_token_escape_sequence | @ruby_token_string_content + +#keyset[ruby_bare_symbol, index] +ruby_bare_symbol_child( + int ruby_bare_symbol: @ruby_bare_symbol ref, + int index: int ref, + unique int child: @ruby_bare_symbol_child_type ref +); + +ruby_bare_symbol_def( + unique int id: @ruby_bare_symbol +); + +@ruby_begin_child_type = @ruby_else | @ruby_ensure | @ruby_rescue | @ruby_token_empty_statement | @ruby_underscore_statement + +#keyset[ruby_begin, index] +ruby_begin_child( + int ruby_begin: @ruby_begin ref, + int index: int ref, + unique int child: @ruby_begin_child_type ref +); + +ruby_begin_def( + unique int id: @ruby_begin +); + +@ruby_begin_block_child_type = @ruby_token_empty_statement | @ruby_underscore_statement + +#keyset[ruby_begin_block, index] +ruby_begin_block_child( + int ruby_begin_block: @ruby_begin_block ref, + int index: int ref, + unique int child: @ruby_begin_block_child_type ref +); + +ruby_begin_block_def( + unique int id: @ruby_begin_block +); + +@ruby_binary_left_type = @ruby_underscore_expression | @ruby_underscore_simple_numeric + +case @ruby_binary.operator of + 0 = @ruby_binary_bangequal +| 1 = @ruby_binary_bangtilde +| 2 = @ruby_binary_percent +| 3 = @ruby_binary_ampersand +| 4 = @ruby_binary_ampersandampersand +| 5 = @ruby_binary_star +| 6 = @ruby_binary_starstar +| 7 = @ruby_binary_plus +| 8 = @ruby_binary_minus +| 9 = @ruby_binary_slash +| 10 = @ruby_binary_langle +| 11 = @ruby_binary_langlelangle +| 12 = @ruby_binary_langleequal +| 13 = @ruby_binary_langleequalrangle +| 14 = @ruby_binary_equalequal +| 15 = @ruby_binary_equalequalequal +| 16 = @ruby_binary_equaltilde +| 17 = @ruby_binary_rangle +| 18 = @ruby_binary_rangleequal +| 19 = @ruby_binary_ranglerangle +| 20 = @ruby_binary_caret +| 21 = @ruby_binary_and +| 22 = @ruby_binary_or +| 23 = @ruby_binary_pipe +| 24 = @ruby_binary_pipepipe +; + + +ruby_binary_def( + unique int id: @ruby_binary, + int left: @ruby_binary_left_type ref, + int operator: int ref, + int right: @ruby_underscore_expression ref +); + +ruby_block_body( + unique int ruby_block: @ruby_block ref, + unique int body: @ruby_block_body ref +); + +ruby_block_parameters( + unique int ruby_block: @ruby_block ref, + unique int parameters: @ruby_block_parameters ref +); + +ruby_block_def( + unique int id: @ruby_block +); + +ruby_block_argument_child( + unique int ruby_block_argument: @ruby_block_argument ref, + unique int child: @ruby_underscore_arg ref +); + +ruby_block_argument_def( + unique int id: @ruby_block_argument +); + +@ruby_block_body_child_type = @ruby_token_empty_statement | @ruby_underscore_statement + +#keyset[ruby_block_body, index] +ruby_block_body_child( + int ruby_block_body: @ruby_block_body ref, + int index: int ref, + unique int child: @ruby_block_body_child_type ref +); + +ruby_block_body_def( + unique int id: @ruby_block_body +); + +ruby_block_parameter_name( + unique int ruby_block_parameter: @ruby_block_parameter ref, + unique int name: @ruby_token_identifier ref +); + +ruby_block_parameter_def( + unique int id: @ruby_block_parameter +); + +#keyset[ruby_block_parameters, index] +ruby_block_parameters_locals( + int ruby_block_parameters: @ruby_block_parameters ref, + int index: int ref, + unique int locals: @ruby_token_identifier ref +); + +@ruby_block_parameters_child_type = @ruby_block_parameter | @ruby_destructured_parameter | @ruby_hash_splat_parameter | @ruby_keyword_parameter | @ruby_optional_parameter | @ruby_splat_parameter | @ruby_token_forward_parameter | @ruby_token_hash_splat_nil | @ruby_token_identifier + +#keyset[ruby_block_parameters, index] +ruby_block_parameters_child( + int ruby_block_parameters: @ruby_block_parameters ref, + int index: int ref, + unique int child: @ruby_block_parameters_child_type ref +); + +ruby_block_parameters_def( + unique int id: @ruby_block_parameters +); + +@ruby_body_statement_child_type = @ruby_else | @ruby_ensure | @ruby_rescue | @ruby_token_empty_statement | @ruby_underscore_statement + +#keyset[ruby_body_statement, index] +ruby_body_statement_child( + int ruby_body_statement: @ruby_body_statement ref, + int index: int ref, + unique int child: @ruby_body_statement_child_type ref +); + +ruby_body_statement_def( + unique int id: @ruby_body_statement +); + +ruby_break_child( + unique int ruby_break: @ruby_break ref, + unique int child: @ruby_argument_list ref +); + +ruby_break_def( + unique int id: @ruby_break +); + +ruby_call_arguments( + unique int ruby_call: @ruby_call ref, + unique int arguments: @ruby_argument_list ref +); + +@ruby_call_block_type = @ruby_block | @ruby_do_block + +ruby_call_block( + unique int ruby_call: @ruby_call ref, + unique int block: @ruby_call_block_type ref +); + +@ruby_call_method_type = @ruby_token_operator | @ruby_underscore_variable + +ruby_call_method( + unique int ruby_call: @ruby_call ref, + unique int method: @ruby_call_method_type ref +); + +ruby_call_operator( + unique int ruby_call: @ruby_call ref, + unique int operator: @ruby_underscore_call_operator ref +); + +ruby_call_receiver( + unique int ruby_call: @ruby_call ref, + unique int receiver: @ruby_underscore_primary ref +); + +ruby_call_def( + unique int id: @ruby_call +); + +ruby_case_value( + unique int ruby_case__: @ruby_case__ ref, + unique int value: @ruby_underscore_statement ref +); + +@ruby_case_child_type = @ruby_else | @ruby_when + +#keyset[ruby_case__, index] +ruby_case_child( + int ruby_case__: @ruby_case__ ref, + int index: int ref, + unique int child: @ruby_case_child_type ref +); + +ruby_case_def( + unique int id: @ruby_case__ +); + +#keyset[ruby_case_match, index] +ruby_case_match_clauses( + int ruby_case_match: @ruby_case_match ref, + int index: int ref, + unique int clauses: @ruby_in_clause ref +); + +ruby_case_match_else( + unique int ruby_case_match: @ruby_case_match ref, + unique int else: @ruby_else ref +); + +ruby_case_match_def( + unique int id: @ruby_case_match, + int value: @ruby_underscore_statement ref +); + +#keyset[ruby_chained_string, index] +ruby_chained_string_child( + int ruby_chained_string: @ruby_chained_string ref, + int index: int ref, + unique int child: @ruby_string__ ref +); + +ruby_chained_string_def( + unique int id: @ruby_chained_string +); + +ruby_class_body( + unique int ruby_class: @ruby_class ref, + unique int body: @ruby_body_statement ref +); + +@ruby_class_name_type = @ruby_scope_resolution | @ruby_token_constant + +ruby_class_superclass( + unique int ruby_class: @ruby_class ref, + unique int superclass: @ruby_superclass ref +); + +ruby_class_def( + unique int id: @ruby_class, + int name: @ruby_class_name_type ref +); + +@ruby_complex_child_type = @ruby_rational | @ruby_token_float | @ruby_token_integer + +ruby_complex_def( + unique int id: @ruby_complex, + int child: @ruby_complex_child_type ref +); + +ruby_conditional_def( + unique int id: @ruby_conditional, + int alternative: @ruby_underscore_arg ref, + int condition: @ruby_underscore_arg ref, + int consequence: @ruby_underscore_arg ref +); + +@ruby_delimited_symbol_child_type = @ruby_interpolation | @ruby_token_escape_sequence | @ruby_token_string_content + +#keyset[ruby_delimited_symbol, index] +ruby_delimited_symbol_child( + int ruby_delimited_symbol: @ruby_delimited_symbol ref, + int index: int ref, + unique int child: @ruby_delimited_symbol_child_type ref +); + +ruby_delimited_symbol_def( + unique int id: @ruby_delimited_symbol +); + +@ruby_destructured_left_assignment_child_type = @ruby_destructured_left_assignment | @ruby_rest_assignment | @ruby_underscore_lhs + +#keyset[ruby_destructured_left_assignment, index] +ruby_destructured_left_assignment_child( + int ruby_destructured_left_assignment: @ruby_destructured_left_assignment ref, + int index: int ref, + unique int child: @ruby_destructured_left_assignment_child_type ref +); + +ruby_destructured_left_assignment_def( + unique int id: @ruby_destructured_left_assignment +); + +@ruby_destructured_parameter_child_type = @ruby_block_parameter | @ruby_destructured_parameter | @ruby_hash_splat_parameter | @ruby_keyword_parameter | @ruby_optional_parameter | @ruby_splat_parameter | @ruby_token_forward_parameter | @ruby_token_hash_splat_nil | @ruby_token_identifier + +#keyset[ruby_destructured_parameter, index] +ruby_destructured_parameter_child( + int ruby_destructured_parameter: @ruby_destructured_parameter ref, + int index: int ref, + unique int child: @ruby_destructured_parameter_child_type ref +); + +ruby_destructured_parameter_def( + unique int id: @ruby_destructured_parameter +); + +@ruby_do_child_type = @ruby_token_empty_statement | @ruby_underscore_statement + +#keyset[ruby_do, index] +ruby_do_child( + int ruby_do: @ruby_do ref, + int index: int ref, + unique int child: @ruby_do_child_type ref +); + +ruby_do_def( + unique int id: @ruby_do +); + +ruby_do_block_body( + unique int ruby_do_block: @ruby_do_block ref, + unique int body: @ruby_body_statement ref +); + +ruby_do_block_parameters( + unique int ruby_do_block: @ruby_do_block ref, + unique int parameters: @ruby_block_parameters ref +); + +ruby_do_block_def( + unique int id: @ruby_do_block +); + +@ruby_element_reference_block_type = @ruby_block | @ruby_do_block + +ruby_element_reference_block( + unique int ruby_element_reference: @ruby_element_reference ref, + unique int block: @ruby_element_reference_block_type ref +); + +@ruby_element_reference_child_type = @ruby_block_argument | @ruby_hash_splat_argument | @ruby_pair | @ruby_splat_argument | @ruby_token_forward_argument | @ruby_underscore_expression + +#keyset[ruby_element_reference, index] +ruby_element_reference_child( + int ruby_element_reference: @ruby_element_reference ref, + int index: int ref, + unique int child: @ruby_element_reference_child_type ref +); + +ruby_element_reference_def( + unique int id: @ruby_element_reference, + int object: @ruby_underscore_primary ref +); + +@ruby_else_child_type = @ruby_token_empty_statement | @ruby_underscore_statement + +#keyset[ruby_else, index] +ruby_else_child( + int ruby_else: @ruby_else ref, + int index: int ref, + unique int child: @ruby_else_child_type ref +); + +ruby_else_def( + unique int id: @ruby_else +); + +@ruby_elsif_alternative_type = @ruby_else | @ruby_elsif + +ruby_elsif_alternative( + unique int ruby_elsif: @ruby_elsif ref, + unique int alternative: @ruby_elsif_alternative_type ref +); + +ruby_elsif_consequence( + unique int ruby_elsif: @ruby_elsif ref, + unique int consequence: @ruby_then ref +); + +ruby_elsif_def( + unique int id: @ruby_elsif, + int condition: @ruby_underscore_statement ref +); + +@ruby_end_block_child_type = @ruby_token_empty_statement | @ruby_underscore_statement + +#keyset[ruby_end_block, index] +ruby_end_block_child( + int ruby_end_block: @ruby_end_block ref, + int index: int ref, + unique int child: @ruby_end_block_child_type ref +); + +ruby_end_block_def( + unique int id: @ruby_end_block +); + +@ruby_ensure_child_type = @ruby_token_empty_statement | @ruby_underscore_statement + +#keyset[ruby_ensure, index] +ruby_ensure_child( + int ruby_ensure: @ruby_ensure ref, + int index: int ref, + unique int child: @ruby_ensure_child_type ref +); + +ruby_ensure_def( + unique int id: @ruby_ensure +); + +ruby_exception_variable_def( + unique int id: @ruby_exception_variable, + int child: @ruby_underscore_lhs ref +); + +@ruby_exceptions_child_type = @ruby_splat_argument | @ruby_underscore_arg + +#keyset[ruby_exceptions, index] +ruby_exceptions_child( + int ruby_exceptions: @ruby_exceptions ref, + int index: int ref, + unique int child: @ruby_exceptions_child_type ref +); + +ruby_exceptions_def( + unique int id: @ruby_exceptions +); + +ruby_expression_reference_pattern_def( + unique int id: @ruby_expression_reference_pattern, + int value: @ruby_underscore_expression ref +); + +ruby_find_pattern_class( + unique int ruby_find_pattern: @ruby_find_pattern ref, + unique int class: @ruby_underscore_pattern_constant ref +); + +@ruby_find_pattern_child_type = @ruby_splat_parameter | @ruby_underscore_pattern_expr + +#keyset[ruby_find_pattern, index] +ruby_find_pattern_child( + int ruby_find_pattern: @ruby_find_pattern ref, + int index: int ref, + unique int child: @ruby_find_pattern_child_type ref +); + +ruby_find_pattern_def( + unique int id: @ruby_find_pattern +); + +@ruby_for_pattern_type = @ruby_left_assignment_list | @ruby_underscore_lhs + +ruby_for_def( + unique int id: @ruby_for, + int body: @ruby_do ref, + int pattern: @ruby_for_pattern_type ref, + int value: @ruby_in ref +); + +@ruby_hash_child_type = @ruby_hash_splat_argument | @ruby_pair + +#keyset[ruby_hash, index] +ruby_hash_child( + int ruby_hash: @ruby_hash ref, + int index: int ref, + unique int child: @ruby_hash_child_type ref +); + +ruby_hash_def( + unique int id: @ruby_hash +); + +ruby_hash_pattern_class( + unique int ruby_hash_pattern: @ruby_hash_pattern ref, + unique int class: @ruby_underscore_pattern_constant ref +); + +@ruby_hash_pattern_child_type = @ruby_hash_splat_parameter | @ruby_keyword_pattern | @ruby_token_hash_splat_nil + +#keyset[ruby_hash_pattern, index] +ruby_hash_pattern_child( + int ruby_hash_pattern: @ruby_hash_pattern ref, + int index: int ref, + unique int child: @ruby_hash_pattern_child_type ref +); + +ruby_hash_pattern_def( + unique int id: @ruby_hash_pattern +); + +ruby_hash_splat_argument_child( + unique int ruby_hash_splat_argument: @ruby_hash_splat_argument ref, + unique int child: @ruby_underscore_arg ref +); + +ruby_hash_splat_argument_def( + unique int id: @ruby_hash_splat_argument +); + +ruby_hash_splat_parameter_name( + unique int ruby_hash_splat_parameter: @ruby_hash_splat_parameter ref, + unique int name: @ruby_token_identifier ref +); + +ruby_hash_splat_parameter_def( + unique int id: @ruby_hash_splat_parameter +); + +@ruby_heredoc_body_child_type = @ruby_interpolation | @ruby_token_escape_sequence | @ruby_token_heredoc_content | @ruby_token_heredoc_end + +#keyset[ruby_heredoc_body, index] +ruby_heredoc_body_child( + int ruby_heredoc_body: @ruby_heredoc_body ref, + int index: int ref, + unique int child: @ruby_heredoc_body_child_type ref +); + +ruby_heredoc_body_def( + unique int id: @ruby_heredoc_body +); + +@ruby_if_alternative_type = @ruby_else | @ruby_elsif + +ruby_if_alternative( + unique int ruby_if: @ruby_if ref, + unique int alternative: @ruby_if_alternative_type ref +); + +ruby_if_consequence( + unique int ruby_if: @ruby_if ref, + unique int consequence: @ruby_then ref +); + +ruby_if_def( + unique int id: @ruby_if, + int condition: @ruby_underscore_statement ref +); + +ruby_if_guard_def( + unique int id: @ruby_if_guard, + int condition: @ruby_underscore_expression ref +); + +ruby_if_modifier_def( + unique int id: @ruby_if_modifier, + int body: @ruby_underscore_statement ref, + int condition: @ruby_underscore_expression ref +); + +ruby_in_def( + unique int id: @ruby_in, + int child: @ruby_underscore_arg ref +); + +ruby_in_clause_body( + unique int ruby_in_clause: @ruby_in_clause ref, + unique int body: @ruby_then ref +); + +@ruby_in_clause_guard_type = @ruby_if_guard | @ruby_unless_guard + +ruby_in_clause_guard( + unique int ruby_in_clause: @ruby_in_clause ref, + unique int guard: @ruby_in_clause_guard_type ref +); + +ruby_in_clause_def( + unique int id: @ruby_in_clause, + int pattern: @ruby_underscore_pattern_top_expr_body ref +); + +@ruby_interpolation_child_type = @ruby_token_empty_statement | @ruby_underscore_nonlocal_variable | @ruby_underscore_statement + +#keyset[ruby_interpolation, index] +ruby_interpolation_child( + int ruby_interpolation: @ruby_interpolation ref, + int index: int ref, + unique int child: @ruby_interpolation_child_type ref +); + +ruby_interpolation_def( + unique int id: @ruby_interpolation +); + +ruby_keyword_parameter_value( + unique int ruby_keyword_parameter: @ruby_keyword_parameter ref, + unique int value: @ruby_underscore_arg ref +); + +ruby_keyword_parameter_def( + unique int id: @ruby_keyword_parameter, + int name: @ruby_token_identifier ref +); + +@ruby_keyword_pattern_key_type = @ruby_string__ | @ruby_token_hash_key_symbol + +ruby_keyword_pattern_value( + unique int ruby_keyword_pattern: @ruby_keyword_pattern ref, + unique int value: @ruby_underscore_pattern_expr ref +); + +ruby_keyword_pattern_def( + unique int id: @ruby_keyword_pattern, + int key__: @ruby_keyword_pattern_key_type ref +); + +@ruby_lambda_body_type = @ruby_block | @ruby_do_block + +ruby_lambda_parameters( + unique int ruby_lambda: @ruby_lambda ref, + unique int parameters: @ruby_lambda_parameters ref +); + +ruby_lambda_def( + unique int id: @ruby_lambda, + int body: @ruby_lambda_body_type ref +); + +@ruby_lambda_parameters_child_type = @ruby_block_parameter | @ruby_destructured_parameter | @ruby_hash_splat_parameter | @ruby_keyword_parameter | @ruby_optional_parameter | @ruby_splat_parameter | @ruby_token_forward_parameter | @ruby_token_hash_splat_nil | @ruby_token_identifier + +#keyset[ruby_lambda_parameters, index] +ruby_lambda_parameters_child( + int ruby_lambda_parameters: @ruby_lambda_parameters ref, + int index: int ref, + unique int child: @ruby_lambda_parameters_child_type ref +); + +ruby_lambda_parameters_def( + unique int id: @ruby_lambda_parameters +); + +@ruby_left_assignment_list_child_type = @ruby_destructured_left_assignment | @ruby_rest_assignment | @ruby_underscore_lhs + +#keyset[ruby_left_assignment_list, index] +ruby_left_assignment_list_child( + int ruby_left_assignment_list: @ruby_left_assignment_list ref, + int index: int ref, + unique int child: @ruby_left_assignment_list_child_type ref +); + +ruby_left_assignment_list_def( + unique int id: @ruby_left_assignment_list +); + +ruby_match_pattern_def( + unique int id: @ruby_match_pattern, + int pattern: @ruby_underscore_pattern_top_expr_body ref, + int value: @ruby_underscore_arg ref +); + +@ruby_method_body_type = @ruby_body_statement | @ruby_rescue_modifier | @ruby_underscore_arg + +ruby_method_body( + unique int ruby_method: @ruby_method ref, + unique int body: @ruby_method_body_type ref +); + +ruby_method_parameters( + unique int ruby_method: @ruby_method ref, + unique int parameters: @ruby_method_parameters ref +); + +ruby_method_def( + unique int id: @ruby_method, + int name: @ruby_underscore_method_name ref +); + +@ruby_method_parameters_child_type = @ruby_block_parameter | @ruby_destructured_parameter | @ruby_hash_splat_parameter | @ruby_keyword_parameter | @ruby_optional_parameter | @ruby_splat_parameter | @ruby_token_forward_parameter | @ruby_token_hash_splat_nil | @ruby_token_identifier + +#keyset[ruby_method_parameters, index] +ruby_method_parameters_child( + int ruby_method_parameters: @ruby_method_parameters ref, + int index: int ref, + unique int child: @ruby_method_parameters_child_type ref +); + +ruby_method_parameters_def( + unique int id: @ruby_method_parameters +); + +ruby_module_body( + unique int ruby_module: @ruby_module ref, + unique int body: @ruby_body_statement ref +); + +@ruby_module_name_type = @ruby_scope_resolution | @ruby_token_constant + +ruby_module_def( + unique int id: @ruby_module, + int name: @ruby_module_name_type ref +); + +ruby_next_child( + unique int ruby_next: @ruby_next ref, + unique int child: @ruby_argument_list ref +); + +ruby_next_def( + unique int id: @ruby_next +); + +case @ruby_operator_assignment.operator of + 0 = @ruby_operator_assignment_percentequal +| 1 = @ruby_operator_assignment_ampersandampersandequal +| 2 = @ruby_operator_assignment_ampersandequal +| 3 = @ruby_operator_assignment_starstarequal +| 4 = @ruby_operator_assignment_starequal +| 5 = @ruby_operator_assignment_plusequal +| 6 = @ruby_operator_assignment_minusequal +| 7 = @ruby_operator_assignment_slashequal +| 8 = @ruby_operator_assignment_langlelangleequal +| 9 = @ruby_operator_assignment_ranglerangleequal +| 10 = @ruby_operator_assignment_caretequal +| 11 = @ruby_operator_assignment_pipeequal +| 12 = @ruby_operator_assignment_pipepipeequal +; + + +@ruby_operator_assignment_right_type = @ruby_rescue_modifier | @ruby_underscore_expression + +ruby_operator_assignment_def( + unique int id: @ruby_operator_assignment, + int left: @ruby_underscore_lhs ref, + int operator: int ref, + int right: @ruby_operator_assignment_right_type ref +); + +ruby_optional_parameter_def( + unique int id: @ruby_optional_parameter, + int name: @ruby_token_identifier ref, + int value: @ruby_underscore_arg ref +); + +@ruby_pair_key_type = @ruby_string__ | @ruby_token_hash_key_symbol | @ruby_underscore_arg + +ruby_pair_value( + unique int ruby_pair: @ruby_pair ref, + unique int value: @ruby_underscore_arg ref +); + +ruby_pair_def( + unique int id: @ruby_pair, + int key__: @ruby_pair_key_type ref +); + +ruby_parenthesized_pattern_def( + unique int id: @ruby_parenthesized_pattern, + int child: @ruby_underscore_pattern_expr ref +); + +@ruby_parenthesized_statements_child_type = @ruby_token_empty_statement | @ruby_underscore_statement + +#keyset[ruby_parenthesized_statements, index] +ruby_parenthesized_statements_child( + int ruby_parenthesized_statements: @ruby_parenthesized_statements ref, + int index: int ref, + unique int child: @ruby_parenthesized_statements_child_type ref +); + +ruby_parenthesized_statements_def( + unique int id: @ruby_parenthesized_statements +); + +@ruby_pattern_child_type = @ruby_splat_argument | @ruby_underscore_arg + +ruby_pattern_def( + unique int id: @ruby_pattern, + int child: @ruby_pattern_child_type ref +); + +@ruby_program_child_type = @ruby_token_empty_statement | @ruby_token_uninterpreted | @ruby_underscore_statement + +#keyset[ruby_program, index] +ruby_program_child( + int ruby_program: @ruby_program ref, + int index: int ref, + unique int child: @ruby_program_child_type ref +); + +ruby_program_def( + unique int id: @ruby_program +); + +@ruby_range_begin_type = @ruby_underscore_arg | @ruby_underscore_pattern_primitive + +ruby_range_begin( + unique int ruby_range: @ruby_range ref, + unique int begin: @ruby_range_begin_type ref +); + +@ruby_range_end_type = @ruby_underscore_arg | @ruby_underscore_pattern_primitive + +ruby_range_end( + unique int ruby_range: @ruby_range ref, + unique int end: @ruby_range_end_type ref +); + +case @ruby_range.operator of + 0 = @ruby_range_dotdot +| 1 = @ruby_range_dotdotdot +; + + +ruby_range_def( + unique int id: @ruby_range, + int operator: int ref +); + +@ruby_rational_child_type = @ruby_token_float | @ruby_token_integer + +ruby_rational_def( + unique int id: @ruby_rational, + int child: @ruby_rational_child_type ref +); + +ruby_redo_child( + unique int ruby_redo: @ruby_redo ref, + unique int child: @ruby_argument_list ref +); + +ruby_redo_def( + unique int id: @ruby_redo +); + +@ruby_regex_child_type = @ruby_interpolation | @ruby_token_escape_sequence | @ruby_token_string_content + +#keyset[ruby_regex, index] +ruby_regex_child( + int ruby_regex: @ruby_regex ref, + int index: int ref, + unique int child: @ruby_regex_child_type ref +); + +ruby_regex_def( + unique int id: @ruby_regex +); + +ruby_rescue_body( + unique int ruby_rescue: @ruby_rescue ref, + unique int body: @ruby_then ref +); + +ruby_rescue_exceptions( + unique int ruby_rescue: @ruby_rescue ref, + unique int exceptions: @ruby_exceptions ref +); + +ruby_rescue_variable( + unique int ruby_rescue: @ruby_rescue ref, + unique int variable: @ruby_exception_variable ref +); + +ruby_rescue_def( + unique int id: @ruby_rescue +); + +@ruby_rescue_modifier_body_type = @ruby_underscore_arg | @ruby_underscore_statement + +ruby_rescue_modifier_def( + unique int id: @ruby_rescue_modifier, + int body: @ruby_rescue_modifier_body_type ref, + int handler: @ruby_underscore_expression ref +); + +ruby_rest_assignment_child( + unique int ruby_rest_assignment: @ruby_rest_assignment ref, + unique int child: @ruby_underscore_lhs ref +); + +ruby_rest_assignment_def( + unique int id: @ruby_rest_assignment +); + +ruby_retry_child( + unique int ruby_retry: @ruby_retry ref, + unique int child: @ruby_argument_list ref +); + +ruby_retry_def( + unique int id: @ruby_retry +); + +ruby_return_child( + unique int ruby_return: @ruby_return ref, + unique int child: @ruby_argument_list ref +); + +ruby_return_def( + unique int id: @ruby_return +); + +@ruby_right_assignment_list_child_type = @ruby_splat_argument | @ruby_underscore_arg + +#keyset[ruby_right_assignment_list, index] +ruby_right_assignment_list_child( + int ruby_right_assignment_list: @ruby_right_assignment_list ref, + int index: int ref, + unique int child: @ruby_right_assignment_list_child_type ref +); + +ruby_right_assignment_list_def( + unique int id: @ruby_right_assignment_list +); + +@ruby_scope_resolution_scope_type = @ruby_underscore_pattern_constant | @ruby_underscore_primary + +ruby_scope_resolution_scope( + unique int ruby_scope_resolution: @ruby_scope_resolution ref, + unique int scope: @ruby_scope_resolution_scope_type ref +); + +ruby_scope_resolution_def( + unique int id: @ruby_scope_resolution, + int name: @ruby_token_constant ref +); + +ruby_setter_def( + unique int id: @ruby_setter, + int name: @ruby_token_identifier ref +); + +ruby_singleton_class_body( + unique int ruby_singleton_class: @ruby_singleton_class ref, + unique int body: @ruby_body_statement ref +); + +ruby_singleton_class_def( + unique int id: @ruby_singleton_class, + int value: @ruby_underscore_arg ref +); + +@ruby_singleton_method_body_type = @ruby_body_statement | @ruby_rescue_modifier | @ruby_underscore_arg + +ruby_singleton_method_body( + unique int ruby_singleton_method: @ruby_singleton_method ref, + unique int body: @ruby_singleton_method_body_type ref +); + +@ruby_singleton_method_object_type = @ruby_underscore_arg | @ruby_underscore_variable + +ruby_singleton_method_parameters( + unique int ruby_singleton_method: @ruby_singleton_method ref, + unique int parameters: @ruby_method_parameters ref +); + +ruby_singleton_method_def( + unique int id: @ruby_singleton_method, + int name: @ruby_underscore_method_name ref, + int object: @ruby_singleton_method_object_type ref +); + +ruby_splat_argument_child( + unique int ruby_splat_argument: @ruby_splat_argument ref, + unique int child: @ruby_underscore_arg ref +); + +ruby_splat_argument_def( + unique int id: @ruby_splat_argument +); + +ruby_splat_parameter_name( + unique int ruby_splat_parameter: @ruby_splat_parameter ref, + unique int name: @ruby_token_identifier ref +); + +ruby_splat_parameter_def( + unique int id: @ruby_splat_parameter +); + +@ruby_string_child_type = @ruby_interpolation | @ruby_token_escape_sequence | @ruby_token_string_content + +#keyset[ruby_string__, index] +ruby_string_child( + int ruby_string__: @ruby_string__ ref, + int index: int ref, + unique int child: @ruby_string_child_type ref +); + +ruby_string_def( + unique int id: @ruby_string__ +); + +#keyset[ruby_string_array, index] +ruby_string_array_child( + int ruby_string_array: @ruby_string_array ref, + int index: int ref, + unique int child: @ruby_bare_string ref +); + +ruby_string_array_def( + unique int id: @ruby_string_array +); + +@ruby_subshell_child_type = @ruby_interpolation | @ruby_token_escape_sequence | @ruby_token_string_content + +#keyset[ruby_subshell, index] +ruby_subshell_child( + int ruby_subshell: @ruby_subshell ref, + int index: int ref, + unique int child: @ruby_subshell_child_type ref +); + +ruby_subshell_def( + unique int id: @ruby_subshell +); + +ruby_superclass_def( + unique int id: @ruby_superclass, + int child: @ruby_underscore_expression ref +); + +#keyset[ruby_symbol_array, index] +ruby_symbol_array_child( + int ruby_symbol_array: @ruby_symbol_array ref, + int index: int ref, + unique int child: @ruby_bare_symbol ref +); + +ruby_symbol_array_def( + unique int id: @ruby_symbol_array +); + +ruby_test_pattern_def( + unique int id: @ruby_test_pattern, + int pattern: @ruby_underscore_pattern_top_expr_body ref, + int value: @ruby_underscore_arg ref +); + +@ruby_then_child_type = @ruby_token_empty_statement | @ruby_underscore_statement + +#keyset[ruby_then, index] +ruby_then_child( + int ruby_then: @ruby_then ref, + int index: int ref, + unique int child: @ruby_then_child_type ref +); + +ruby_then_def( + unique int id: @ruby_then +); + +@ruby_unary_operand_type = @ruby_parenthesized_statements | @ruby_underscore_expression | @ruby_underscore_simple_numeric + +case @ruby_unary.operator of + 0 = @ruby_unary_bang +| 1 = @ruby_unary_plus +| 2 = @ruby_unary_minus +| 3 = @ruby_unary_definedquestion +| 4 = @ruby_unary_not +| 5 = @ruby_unary_tilde +; + + +ruby_unary_def( + unique int id: @ruby_unary, + int operand: @ruby_unary_operand_type ref, + int operator: int ref +); + +#keyset[ruby_undef, index] +ruby_undef_child( + int ruby_undef: @ruby_undef ref, + int index: int ref, + unique int child: @ruby_underscore_method_name ref +); + +ruby_undef_def( + unique int id: @ruby_undef +); + +@ruby_unless_alternative_type = @ruby_else | @ruby_elsif + +ruby_unless_alternative( + unique int ruby_unless: @ruby_unless ref, + unique int alternative: @ruby_unless_alternative_type ref +); + +ruby_unless_consequence( + unique int ruby_unless: @ruby_unless ref, + unique int consequence: @ruby_then ref +); + +ruby_unless_def( + unique int id: @ruby_unless, + int condition: @ruby_underscore_statement ref +); + +ruby_unless_guard_def( + unique int id: @ruby_unless_guard, + int condition: @ruby_underscore_expression ref +); + +ruby_unless_modifier_def( + unique int id: @ruby_unless_modifier, + int body: @ruby_underscore_statement ref, + int condition: @ruby_underscore_expression ref +); + +ruby_until_def( + unique int id: @ruby_until, + int body: @ruby_do ref, + int condition: @ruby_underscore_statement ref +); + +ruby_until_modifier_def( + unique int id: @ruby_until_modifier, + int body: @ruby_underscore_statement ref, + int condition: @ruby_underscore_expression ref +); + +@ruby_variable_reference_pattern_name_type = @ruby_token_identifier | @ruby_underscore_nonlocal_variable + +ruby_variable_reference_pattern_def( + unique int id: @ruby_variable_reference_pattern, + int name: @ruby_variable_reference_pattern_name_type ref +); + +ruby_when_body( + unique int ruby_when: @ruby_when ref, + unique int body: @ruby_then ref +); + +#keyset[ruby_when, index] +ruby_when_pattern( + int ruby_when: @ruby_when ref, + int index: int ref, + unique int pattern: @ruby_pattern ref +); + +ruby_when_def( + unique int id: @ruby_when +); + +ruby_while_def( + unique int id: @ruby_while, + int body: @ruby_do ref, + int condition: @ruby_underscore_statement ref +); + +ruby_while_modifier_def( + unique int id: @ruby_while_modifier, + int body: @ruby_underscore_statement ref, + int condition: @ruby_underscore_expression ref +); + +ruby_yield_child( + unique int ruby_yield: @ruby_yield ref, + unique int child: @ruby_argument_list ref +); + +ruby_yield_def( + unique int id: @ruby_yield +); + +ruby_tokeninfo( + unique int id: @ruby_token, + int kind: int ref, + string value: string ref +); + +case @ruby_token.kind of + 0 = @ruby_reserved_word +| 1 = @ruby_token_character +| 2 = @ruby_token_class_variable +| 3 = @ruby_token_comment +| 4 = @ruby_token_constant +| 5 = @ruby_token_empty_statement +| 6 = @ruby_token_encoding +| 7 = @ruby_token_escape_sequence +| 8 = @ruby_token_false +| 9 = @ruby_token_file +| 10 = @ruby_token_float +| 11 = @ruby_token_forward_argument +| 12 = @ruby_token_forward_parameter +| 13 = @ruby_token_global_variable +| 14 = @ruby_token_hash_key_symbol +| 15 = @ruby_token_hash_splat_nil +| 16 = @ruby_token_heredoc_beginning +| 17 = @ruby_token_heredoc_content +| 18 = @ruby_token_heredoc_end +| 19 = @ruby_token_identifier +| 20 = @ruby_token_instance_variable +| 21 = @ruby_token_integer +| 22 = @ruby_token_line +| 23 = @ruby_token_nil +| 24 = @ruby_token_operator +| 25 = @ruby_token_self +| 26 = @ruby_token_simple_symbol +| 27 = @ruby_token_string_content +| 28 = @ruby_token_super +| 29 = @ruby_token_true +| 30 = @ruby_token_uninterpreted +; + + +@ruby_ast_node = @ruby_alias | @ruby_alternative_pattern | @ruby_argument_list | @ruby_array | @ruby_array_pattern | @ruby_as_pattern | @ruby_assignment | @ruby_bare_string | @ruby_bare_symbol | @ruby_begin | @ruby_begin_block | @ruby_binary | @ruby_block | @ruby_block_argument | @ruby_block_body | @ruby_block_parameter | @ruby_block_parameters | @ruby_body_statement | @ruby_break | @ruby_call | @ruby_case__ | @ruby_case_match | @ruby_chained_string | @ruby_class | @ruby_complex | @ruby_conditional | @ruby_delimited_symbol | @ruby_destructured_left_assignment | @ruby_destructured_parameter | @ruby_do | @ruby_do_block | @ruby_element_reference | @ruby_else | @ruby_elsif | @ruby_end_block | @ruby_ensure | @ruby_exception_variable | @ruby_exceptions | @ruby_expression_reference_pattern | @ruby_find_pattern | @ruby_for | @ruby_hash | @ruby_hash_pattern | @ruby_hash_splat_argument | @ruby_hash_splat_parameter | @ruby_heredoc_body | @ruby_if | @ruby_if_guard | @ruby_if_modifier | @ruby_in | @ruby_in_clause | @ruby_interpolation | @ruby_keyword_parameter | @ruby_keyword_pattern | @ruby_lambda | @ruby_lambda_parameters | @ruby_left_assignment_list | @ruby_match_pattern | @ruby_method | @ruby_method_parameters | @ruby_module | @ruby_next | @ruby_operator_assignment | @ruby_optional_parameter | @ruby_pair | @ruby_parenthesized_pattern | @ruby_parenthesized_statements | @ruby_pattern | @ruby_program | @ruby_range | @ruby_rational | @ruby_redo | @ruby_regex | @ruby_rescue | @ruby_rescue_modifier | @ruby_rest_assignment | @ruby_retry | @ruby_return | @ruby_right_assignment_list | @ruby_scope_resolution | @ruby_setter | @ruby_singleton_class | @ruby_singleton_method | @ruby_splat_argument | @ruby_splat_parameter | @ruby_string__ | @ruby_string_array | @ruby_subshell | @ruby_superclass | @ruby_symbol_array | @ruby_test_pattern | @ruby_then | @ruby_token | @ruby_unary | @ruby_undef | @ruby_unless | @ruby_unless_guard | @ruby_unless_modifier | @ruby_until | @ruby_until_modifier | @ruby_variable_reference_pattern | @ruby_when | @ruby_while | @ruby_while_modifier | @ruby_yield + +ruby_ast_node_location( + unique int node: @ruby_ast_node ref, + int loc: @location_default ref +); + +#keyset[parent, parent_index] +ruby_ast_node_parent( + unique int node: @ruby_ast_node ref, + int parent: @ruby_ast_node ref, + int parent_index: int ref +); + +/*- Erb dbscheme -*/ +erb_comment_directive_child( + unique int erb_comment_directive: @erb_comment_directive ref, + unique int child: @erb_token_comment ref +); + +erb_comment_directive_def( + unique int id: @erb_comment_directive +); + +erb_directive_child( + unique int erb_directive: @erb_directive ref, + unique int child: @erb_token_code ref +); + +erb_directive_def( + unique int id: @erb_directive +); + +erb_graphql_directive_child( + unique int erb_graphql_directive: @erb_graphql_directive ref, + unique int child: @erb_token_code ref +); + +erb_graphql_directive_def( + unique int id: @erb_graphql_directive +); + +erb_output_directive_child( + unique int erb_output_directive: @erb_output_directive ref, + unique int child: @erb_token_code ref +); + +erb_output_directive_def( + unique int id: @erb_output_directive +); + +@erb_template_child_type = @erb_comment_directive | @erb_directive | @erb_graphql_directive | @erb_output_directive | @erb_token_content + +#keyset[erb_template, index] +erb_template_child( + int erb_template: @erb_template ref, + int index: int ref, + unique int child: @erb_template_child_type ref +); + +erb_template_def( + unique int id: @erb_template +); + +erb_tokeninfo( + unique int id: @erb_token, + int kind: int ref, + string value: string ref +); + +case @erb_token.kind of + 0 = @erb_reserved_word +| 1 = @erb_token_code +| 2 = @erb_token_comment +| 3 = @erb_token_content +; + + +@erb_ast_node = @erb_comment_directive | @erb_directive | @erb_graphql_directive | @erb_output_directive | @erb_template | @erb_token + +erb_ast_node_location( + unique int node: @erb_ast_node ref, + int loc: @location_default ref +); + +#keyset[parent, parent_index] +erb_ast_node_parent( + unique int node: @erb_ast_node ref, + int parent: @erb_ast_node ref, + int parent_index: int ref +); + diff --git a/ruby/ql/lib/upgrades/40a6b0a5e81115bd870b3a12a1fe954b06362bb7/ruby.dbscheme b/ruby/ql/lib/upgrades/40a6b0a5e81115bd870b3a12a1fe954b06362bb7/ruby.dbscheme new file mode 100644 index 00000000000..dc51d416301 --- /dev/null +++ b/ruby/ql/lib/upgrades/40a6b0a5e81115bd870b3a12a1fe954b06362bb7/ruby.dbscheme @@ -0,0 +1,1532 @@ +// CodeQL database schema for Ruby +// Automatically generated from the tree-sitter grammar; do not edit + +/*- Files and folders -*/ + +/** + * The location of an element. + * The location spans column `startcolumn` of line `startline` to + * column `endcolumn` of line `endline` in file `file`. + * For more information, see + * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/). + */ +locations_default( + unique int id: @location_default, + int file: @file ref, + int beginLine: int ref, + int beginColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +files( + unique int id: @file, + string name: string ref +); + +folders( + unique int id: @folder, + string name: string ref +); + +@container = @file | @folder + +containerparent( + int parent: @container ref, + unique int child: @container ref +); + +/*- Empty location -*/ + +empty_location( + int location: @location_default ref +); + +/*- Source location prefix -*/ + +/** + * The source location of the snapshot. + */ +sourceLocationPrefix(string prefix : string ref); + +/*- Diagnostic messages -*/ + +diagnostics( + unique int id: @diagnostic, + int severity: int ref, + string error_tag: string ref, + string error_message: string ref, + string full_error_message: string ref, + int location: @location_default ref +); + +/*- Diagnostic messages: severity -*/ + +case @diagnostic.severity of + 10 = @diagnostic_debug +| 20 = @diagnostic_info +| 30 = @diagnostic_warning +| 40 = @diagnostic_error +; + +/*- YAML -*/ + +#keyset[parent, idx] +yaml (unique int id: @yaml_node, + int kind: int ref, + int parent: @yaml_node_parent ref, + int idx: int ref, + string tag: string ref, + string tostring: string ref); + +case @yaml_node.kind of + 0 = @yaml_scalar_node +| 1 = @yaml_mapping_node +| 2 = @yaml_sequence_node +| 3 = @yaml_alias_node +; + +@yaml_collection_node = @yaml_mapping_node | @yaml_sequence_node; + +@yaml_node_parent = @yaml_collection_node | @file; + +yaml_anchors (unique int node: @yaml_node ref, + string anchor: string ref); + +yaml_aliases (unique int alias: @yaml_alias_node ref, + string target: string ref); + +yaml_scalars (unique int scalar: @yaml_scalar_node ref, + int style: int ref, + string value: string ref); + +yaml_errors (unique int id: @yaml_error, + string message: string ref); + +yaml_locations(unique int locatable: @yaml_locatable ref, + int location: @location_default ref); + +@yaml_locatable = @yaml_node | @yaml_error; + +/*- Database metadata -*/ +databaseMetadata( + string metadataKey: string ref, + string value: string ref +); + +/*- Ruby dbscheme -*/ +@ruby_underscore_arg = @ruby_assignment | @ruby_binary | @ruby_conditional | @ruby_operator_assignment | @ruby_range | @ruby_unary | @ruby_underscore_primary + +@ruby_underscore_call_operator = @ruby_reserved_word + +@ruby_underscore_expression = @ruby_assignment | @ruby_binary | @ruby_break | @ruby_call | @ruby_match_pattern | @ruby_next | @ruby_operator_assignment | @ruby_return | @ruby_test_pattern | @ruby_unary | @ruby_underscore_arg | @ruby_yield + +@ruby_underscore_lhs = @ruby_call | @ruby_element_reference | @ruby_scope_resolution | @ruby_token_false | @ruby_token_nil | @ruby_token_true | @ruby_underscore_variable + +@ruby_underscore_method_name = @ruby_delimited_symbol | @ruby_setter | @ruby_token_constant | @ruby_token_identifier | @ruby_token_operator | @ruby_token_simple_symbol | @ruby_underscore_nonlocal_variable + +@ruby_underscore_nonlocal_variable = @ruby_token_class_variable | @ruby_token_global_variable | @ruby_token_instance_variable + +@ruby_underscore_pattern_constant = @ruby_scope_resolution | @ruby_token_constant + +@ruby_underscore_pattern_expr = @ruby_alternative_pattern | @ruby_as_pattern | @ruby_underscore_pattern_expr_basic + +@ruby_underscore_pattern_expr_basic = @ruby_array_pattern | @ruby_expression_reference_pattern | @ruby_find_pattern | @ruby_hash_pattern | @ruby_parenthesized_pattern | @ruby_range | @ruby_token_identifier | @ruby_underscore_pattern_constant | @ruby_underscore_pattern_primitive | @ruby_variable_reference_pattern + +@ruby_underscore_pattern_primitive = @ruby_delimited_symbol | @ruby_lambda | @ruby_regex | @ruby_string__ | @ruby_string_array | @ruby_subshell | @ruby_symbol_array | @ruby_token_encoding | @ruby_token_false | @ruby_token_file | @ruby_token_heredoc_beginning | @ruby_token_line | @ruby_token_nil | @ruby_token_self | @ruby_token_simple_symbol | @ruby_token_true | @ruby_unary | @ruby_underscore_simple_numeric + +@ruby_underscore_pattern_top_expr_body = @ruby_array_pattern | @ruby_find_pattern | @ruby_hash_pattern | @ruby_underscore_pattern_expr + +@ruby_underscore_primary = @ruby_array | @ruby_begin | @ruby_break | @ruby_call | @ruby_case__ | @ruby_case_match | @ruby_chained_string | @ruby_class | @ruby_delimited_symbol | @ruby_for | @ruby_hash | @ruby_if | @ruby_lambda | @ruby_method | @ruby_module | @ruby_next | @ruby_parenthesized_statements | @ruby_redo | @ruby_regex | @ruby_retry | @ruby_return | @ruby_singleton_class | @ruby_singleton_method | @ruby_string__ | @ruby_string_array | @ruby_subshell | @ruby_symbol_array | @ruby_token_character | @ruby_token_heredoc_beginning | @ruby_token_simple_symbol | @ruby_unary | @ruby_underscore_lhs | @ruby_underscore_simple_numeric | @ruby_unless | @ruby_until | @ruby_while | @ruby_yield + +@ruby_underscore_simple_numeric = @ruby_complex | @ruby_rational | @ruby_token_float | @ruby_token_integer + +@ruby_underscore_statement = @ruby_alias | @ruby_begin_block | @ruby_end_block | @ruby_if_modifier | @ruby_rescue_modifier | @ruby_undef | @ruby_underscore_expression | @ruby_unless_modifier | @ruby_until_modifier | @ruby_while_modifier + +@ruby_underscore_variable = @ruby_token_constant | @ruby_token_identifier | @ruby_token_self | @ruby_token_super | @ruby_underscore_nonlocal_variable + +ruby_alias_def( + unique int id: @ruby_alias, + int alias: @ruby_underscore_method_name ref, + int name: @ruby_underscore_method_name ref +); + +#keyset[ruby_alternative_pattern, index] +ruby_alternative_pattern_alternatives( + int ruby_alternative_pattern: @ruby_alternative_pattern ref, + int index: int ref, + unique int alternatives: @ruby_underscore_pattern_expr_basic ref +); + +ruby_alternative_pattern_def( + unique int id: @ruby_alternative_pattern +); + +@ruby_argument_list_child_type = @ruby_block_argument | @ruby_hash_splat_argument | @ruby_pair | @ruby_splat_argument | @ruby_token_forward_argument | @ruby_underscore_expression + +#keyset[ruby_argument_list, index] +ruby_argument_list_child( + int ruby_argument_list: @ruby_argument_list ref, + int index: int ref, + unique int child: @ruby_argument_list_child_type ref +); + +ruby_argument_list_def( + unique int id: @ruby_argument_list +); + +@ruby_array_child_type = @ruby_block_argument | @ruby_hash_splat_argument | @ruby_pair | @ruby_splat_argument | @ruby_token_forward_argument | @ruby_underscore_expression + +#keyset[ruby_array, index] +ruby_array_child( + int ruby_array: @ruby_array ref, + int index: int ref, + unique int child: @ruby_array_child_type ref +); + +ruby_array_def( + unique int id: @ruby_array +); + +ruby_array_pattern_class( + unique int ruby_array_pattern: @ruby_array_pattern ref, + unique int class: @ruby_underscore_pattern_constant ref +); + +@ruby_array_pattern_child_type = @ruby_splat_parameter | @ruby_underscore_pattern_expr + +#keyset[ruby_array_pattern, index] +ruby_array_pattern_child( + int ruby_array_pattern: @ruby_array_pattern ref, + int index: int ref, + unique int child: @ruby_array_pattern_child_type ref +); + +ruby_array_pattern_def( + unique int id: @ruby_array_pattern +); + +ruby_as_pattern_def( + unique int id: @ruby_as_pattern, + int name: @ruby_token_identifier ref, + int value: @ruby_underscore_pattern_expr ref +); + +@ruby_assignment_left_type = @ruby_left_assignment_list | @ruby_underscore_lhs + +@ruby_assignment_right_type = @ruby_rescue_modifier | @ruby_right_assignment_list | @ruby_splat_argument | @ruby_underscore_expression + +ruby_assignment_def( + unique int id: @ruby_assignment, + int left: @ruby_assignment_left_type ref, + int right: @ruby_assignment_right_type ref +); + +@ruby_bare_string_child_type = @ruby_interpolation | @ruby_token_escape_sequence | @ruby_token_string_content + +#keyset[ruby_bare_string, index] +ruby_bare_string_child( + int ruby_bare_string: @ruby_bare_string ref, + int index: int ref, + unique int child: @ruby_bare_string_child_type ref +); + +ruby_bare_string_def( + unique int id: @ruby_bare_string +); + +@ruby_bare_symbol_child_type = @ruby_interpolation | @ruby_token_escape_sequence | @ruby_token_string_content + +#keyset[ruby_bare_symbol, index] +ruby_bare_symbol_child( + int ruby_bare_symbol: @ruby_bare_symbol ref, + int index: int ref, + unique int child: @ruby_bare_symbol_child_type ref +); + +ruby_bare_symbol_def( + unique int id: @ruby_bare_symbol +); + +@ruby_begin_child_type = @ruby_else | @ruby_ensure | @ruby_rescue | @ruby_token_empty_statement | @ruby_underscore_statement + +#keyset[ruby_begin, index] +ruby_begin_child( + int ruby_begin: @ruby_begin ref, + int index: int ref, + unique int child: @ruby_begin_child_type ref +); + +ruby_begin_def( + unique int id: @ruby_begin +); + +@ruby_begin_block_child_type = @ruby_token_empty_statement | @ruby_underscore_statement + +#keyset[ruby_begin_block, index] +ruby_begin_block_child( + int ruby_begin_block: @ruby_begin_block ref, + int index: int ref, + unique int child: @ruby_begin_block_child_type ref +); + +ruby_begin_block_def( + unique int id: @ruby_begin_block +); + +@ruby_binary_left_type = @ruby_underscore_expression | @ruby_underscore_simple_numeric + +case @ruby_binary.operator of + 0 = @ruby_binary_bangequal +| 1 = @ruby_binary_bangtilde +| 2 = @ruby_binary_percent +| 3 = @ruby_binary_ampersand +| 4 = @ruby_binary_ampersandampersand +| 5 = @ruby_binary_star +| 6 = @ruby_binary_starstar +| 7 = @ruby_binary_plus +| 8 = @ruby_binary_minus +| 9 = @ruby_binary_slash +| 10 = @ruby_binary_langle +| 11 = @ruby_binary_langlelangle +| 12 = @ruby_binary_langleequal +| 13 = @ruby_binary_langleequalrangle +| 14 = @ruby_binary_equalequal +| 15 = @ruby_binary_equalequalequal +| 16 = @ruby_binary_equaltilde +| 17 = @ruby_binary_rangle +| 18 = @ruby_binary_rangleequal +| 19 = @ruby_binary_ranglerangle +| 20 = @ruby_binary_caret +| 21 = @ruby_binary_and +| 22 = @ruby_binary_or +| 23 = @ruby_binary_pipe +| 24 = @ruby_binary_pipepipe +; + + +ruby_binary_def( + unique int id: @ruby_binary, + int left: @ruby_binary_left_type ref, + int operator: int ref, + int right: @ruby_underscore_expression ref +); + +ruby_block_body( + unique int ruby_block: @ruby_block ref, + unique int body: @ruby_block_body ref +); + +ruby_block_parameters( + unique int ruby_block: @ruby_block ref, + unique int parameters: @ruby_block_parameters ref +); + +ruby_block_def( + unique int id: @ruby_block +); + +ruby_block_argument_child( + unique int ruby_block_argument: @ruby_block_argument ref, + unique int child: @ruby_underscore_arg ref +); + +ruby_block_argument_def( + unique int id: @ruby_block_argument +); + +@ruby_block_body_child_type = @ruby_token_empty_statement | @ruby_underscore_statement + +#keyset[ruby_block_body, index] +ruby_block_body_child( + int ruby_block_body: @ruby_block_body ref, + int index: int ref, + unique int child: @ruby_block_body_child_type ref +); + +ruby_block_body_def( + unique int id: @ruby_block_body +); + +ruby_block_parameter_name( + unique int ruby_block_parameter: @ruby_block_parameter ref, + unique int name: @ruby_token_identifier ref +); + +ruby_block_parameter_def( + unique int id: @ruby_block_parameter +); + +#keyset[ruby_block_parameters, index] +ruby_block_parameters_locals( + int ruby_block_parameters: @ruby_block_parameters ref, + int index: int ref, + unique int locals: @ruby_token_identifier ref +); + +@ruby_block_parameters_child_type = @ruby_block_parameter | @ruby_destructured_parameter | @ruby_hash_splat_parameter | @ruby_keyword_parameter | @ruby_optional_parameter | @ruby_splat_parameter | @ruby_token_forward_parameter | @ruby_token_hash_splat_nil | @ruby_token_identifier + +#keyset[ruby_block_parameters, index] +ruby_block_parameters_child( + int ruby_block_parameters: @ruby_block_parameters ref, + int index: int ref, + unique int child: @ruby_block_parameters_child_type ref +); + +ruby_block_parameters_def( + unique int id: @ruby_block_parameters +); + +@ruby_body_statement_child_type = @ruby_else | @ruby_ensure | @ruby_rescue | @ruby_token_empty_statement | @ruby_underscore_statement + +#keyset[ruby_body_statement, index] +ruby_body_statement_child( + int ruby_body_statement: @ruby_body_statement ref, + int index: int ref, + unique int child: @ruby_body_statement_child_type ref +); + +ruby_body_statement_def( + unique int id: @ruby_body_statement +); + +ruby_break_child( + unique int ruby_break: @ruby_break ref, + unique int child: @ruby_argument_list ref +); + +ruby_break_def( + unique int id: @ruby_break +); + +ruby_call_arguments( + unique int ruby_call: @ruby_call ref, + unique int arguments: @ruby_argument_list ref +); + +@ruby_call_block_type = @ruby_block | @ruby_do_block + +ruby_call_block( + unique int ruby_call: @ruby_call ref, + unique int block: @ruby_call_block_type ref +); + +@ruby_call_method_type = @ruby_token_operator | @ruby_underscore_variable + +ruby_call_method( + unique int ruby_call: @ruby_call ref, + unique int method: @ruby_call_method_type ref +); + +ruby_call_operator( + unique int ruby_call: @ruby_call ref, + unique int operator: @ruby_underscore_call_operator ref +); + +ruby_call_receiver( + unique int ruby_call: @ruby_call ref, + unique int receiver: @ruby_underscore_primary ref +); + +ruby_call_def( + unique int id: @ruby_call +); + +ruby_case_value( + unique int ruby_case__: @ruby_case__ ref, + unique int value: @ruby_underscore_statement ref +); + +@ruby_case_child_type = @ruby_else | @ruby_when + +#keyset[ruby_case__, index] +ruby_case_child( + int ruby_case__: @ruby_case__ ref, + int index: int ref, + unique int child: @ruby_case_child_type ref +); + +ruby_case_def( + unique int id: @ruby_case__ +); + +#keyset[ruby_case_match, index] +ruby_case_match_clauses( + int ruby_case_match: @ruby_case_match ref, + int index: int ref, + unique int clauses: @ruby_in_clause ref +); + +ruby_case_match_else( + unique int ruby_case_match: @ruby_case_match ref, + unique int else: @ruby_else ref +); + +ruby_case_match_def( + unique int id: @ruby_case_match, + int value: @ruby_underscore_statement ref +); + +#keyset[ruby_chained_string, index] +ruby_chained_string_child( + int ruby_chained_string: @ruby_chained_string ref, + int index: int ref, + unique int child: @ruby_string__ ref +); + +ruby_chained_string_def( + unique int id: @ruby_chained_string +); + +ruby_class_body( + unique int ruby_class: @ruby_class ref, + unique int body: @ruby_body_statement ref +); + +@ruby_class_name_type = @ruby_scope_resolution | @ruby_token_constant + +ruby_class_superclass( + unique int ruby_class: @ruby_class ref, + unique int superclass: @ruby_superclass ref +); + +ruby_class_def( + unique int id: @ruby_class, + int name: @ruby_class_name_type ref +); + +@ruby_complex_child_type = @ruby_rational | @ruby_token_float | @ruby_token_integer + +ruby_complex_def( + unique int id: @ruby_complex, + int child: @ruby_complex_child_type ref +); + +ruby_conditional_def( + unique int id: @ruby_conditional, + int alternative: @ruby_underscore_arg ref, + int condition: @ruby_underscore_arg ref, + int consequence: @ruby_underscore_arg ref +); + +@ruby_delimited_symbol_child_type = @ruby_interpolation | @ruby_token_escape_sequence | @ruby_token_string_content + +#keyset[ruby_delimited_symbol, index] +ruby_delimited_symbol_child( + int ruby_delimited_symbol: @ruby_delimited_symbol ref, + int index: int ref, + unique int child: @ruby_delimited_symbol_child_type ref +); + +ruby_delimited_symbol_def( + unique int id: @ruby_delimited_symbol +); + +@ruby_destructured_left_assignment_child_type = @ruby_destructured_left_assignment | @ruby_rest_assignment | @ruby_underscore_lhs + +#keyset[ruby_destructured_left_assignment, index] +ruby_destructured_left_assignment_child( + int ruby_destructured_left_assignment: @ruby_destructured_left_assignment ref, + int index: int ref, + unique int child: @ruby_destructured_left_assignment_child_type ref +); + +ruby_destructured_left_assignment_def( + unique int id: @ruby_destructured_left_assignment +); + +@ruby_destructured_parameter_child_type = @ruby_block_parameter | @ruby_destructured_parameter | @ruby_hash_splat_parameter | @ruby_keyword_parameter | @ruby_optional_parameter | @ruby_splat_parameter | @ruby_token_forward_parameter | @ruby_token_hash_splat_nil | @ruby_token_identifier + +#keyset[ruby_destructured_parameter, index] +ruby_destructured_parameter_child( + int ruby_destructured_parameter: @ruby_destructured_parameter ref, + int index: int ref, + unique int child: @ruby_destructured_parameter_child_type ref +); + +ruby_destructured_parameter_def( + unique int id: @ruby_destructured_parameter +); + +@ruby_do_child_type = @ruby_token_empty_statement | @ruby_underscore_statement + +#keyset[ruby_do, index] +ruby_do_child( + int ruby_do: @ruby_do ref, + int index: int ref, + unique int child: @ruby_do_child_type ref +); + +ruby_do_def( + unique int id: @ruby_do +); + +ruby_do_block_body( + unique int ruby_do_block: @ruby_do_block ref, + unique int body: @ruby_body_statement ref +); + +ruby_do_block_parameters( + unique int ruby_do_block: @ruby_do_block ref, + unique int parameters: @ruby_block_parameters ref +); + +ruby_do_block_def( + unique int id: @ruby_do_block +); + +@ruby_element_reference_block_type = @ruby_block | @ruby_do_block + +ruby_element_reference_block( + unique int ruby_element_reference: @ruby_element_reference ref, + unique int block: @ruby_element_reference_block_type ref +); + +@ruby_element_reference_child_type = @ruby_block_argument | @ruby_hash_splat_argument | @ruby_pair | @ruby_splat_argument | @ruby_token_forward_argument | @ruby_underscore_expression + +#keyset[ruby_element_reference, index] +ruby_element_reference_child( + int ruby_element_reference: @ruby_element_reference ref, + int index: int ref, + unique int child: @ruby_element_reference_child_type ref +); + +ruby_element_reference_def( + unique int id: @ruby_element_reference, + int object: @ruby_underscore_primary ref +); + +@ruby_else_child_type = @ruby_token_empty_statement | @ruby_underscore_statement + +#keyset[ruby_else, index] +ruby_else_child( + int ruby_else: @ruby_else ref, + int index: int ref, + unique int child: @ruby_else_child_type ref +); + +ruby_else_def( + unique int id: @ruby_else +); + +@ruby_elsif_alternative_type = @ruby_else | @ruby_elsif + +ruby_elsif_alternative( + unique int ruby_elsif: @ruby_elsif ref, + unique int alternative: @ruby_elsif_alternative_type ref +); + +ruby_elsif_consequence( + unique int ruby_elsif: @ruby_elsif ref, + unique int consequence: @ruby_then ref +); + +ruby_elsif_def( + unique int id: @ruby_elsif, + int condition: @ruby_underscore_statement ref +); + +@ruby_end_block_child_type = @ruby_token_empty_statement | @ruby_underscore_statement + +#keyset[ruby_end_block, index] +ruby_end_block_child( + int ruby_end_block: @ruby_end_block ref, + int index: int ref, + unique int child: @ruby_end_block_child_type ref +); + +ruby_end_block_def( + unique int id: @ruby_end_block +); + +@ruby_ensure_child_type = @ruby_token_empty_statement | @ruby_underscore_statement + +#keyset[ruby_ensure, index] +ruby_ensure_child( + int ruby_ensure: @ruby_ensure ref, + int index: int ref, + unique int child: @ruby_ensure_child_type ref +); + +ruby_ensure_def( + unique int id: @ruby_ensure +); + +ruby_exception_variable_def( + unique int id: @ruby_exception_variable, + int child: @ruby_underscore_lhs ref +); + +@ruby_exceptions_child_type = @ruby_splat_argument | @ruby_underscore_arg + +#keyset[ruby_exceptions, index] +ruby_exceptions_child( + int ruby_exceptions: @ruby_exceptions ref, + int index: int ref, + unique int child: @ruby_exceptions_child_type ref +); + +ruby_exceptions_def( + unique int id: @ruby_exceptions +); + +ruby_expression_reference_pattern_def( + unique int id: @ruby_expression_reference_pattern, + int value: @ruby_underscore_expression ref +); + +ruby_find_pattern_class( + unique int ruby_find_pattern: @ruby_find_pattern ref, + unique int class: @ruby_underscore_pattern_constant ref +); + +@ruby_find_pattern_child_type = @ruby_splat_parameter | @ruby_underscore_pattern_expr + +#keyset[ruby_find_pattern, index] +ruby_find_pattern_child( + int ruby_find_pattern: @ruby_find_pattern ref, + int index: int ref, + unique int child: @ruby_find_pattern_child_type ref +); + +ruby_find_pattern_def( + unique int id: @ruby_find_pattern +); + +@ruby_for_pattern_type = @ruby_left_assignment_list | @ruby_underscore_lhs + +ruby_for_def( + unique int id: @ruby_for, + int body: @ruby_do ref, + int pattern: @ruby_for_pattern_type ref, + int value: @ruby_in ref +); + +@ruby_hash_child_type = @ruby_hash_splat_argument | @ruby_pair + +#keyset[ruby_hash, index] +ruby_hash_child( + int ruby_hash: @ruby_hash ref, + int index: int ref, + unique int child: @ruby_hash_child_type ref +); + +ruby_hash_def( + unique int id: @ruby_hash +); + +ruby_hash_pattern_class( + unique int ruby_hash_pattern: @ruby_hash_pattern ref, + unique int class: @ruby_underscore_pattern_constant ref +); + +@ruby_hash_pattern_child_type = @ruby_hash_splat_parameter | @ruby_keyword_pattern | @ruby_token_hash_splat_nil + +#keyset[ruby_hash_pattern, index] +ruby_hash_pattern_child( + int ruby_hash_pattern: @ruby_hash_pattern ref, + int index: int ref, + unique int child: @ruby_hash_pattern_child_type ref +); + +ruby_hash_pattern_def( + unique int id: @ruby_hash_pattern +); + +ruby_hash_splat_argument_child( + unique int ruby_hash_splat_argument: @ruby_hash_splat_argument ref, + unique int child: @ruby_underscore_arg ref +); + +ruby_hash_splat_argument_def( + unique int id: @ruby_hash_splat_argument +); + +ruby_hash_splat_parameter_name( + unique int ruby_hash_splat_parameter: @ruby_hash_splat_parameter ref, + unique int name: @ruby_token_identifier ref +); + +ruby_hash_splat_parameter_def( + unique int id: @ruby_hash_splat_parameter +); + +@ruby_heredoc_body_child_type = @ruby_interpolation | @ruby_token_escape_sequence | @ruby_token_heredoc_content | @ruby_token_heredoc_end + +#keyset[ruby_heredoc_body, index] +ruby_heredoc_body_child( + int ruby_heredoc_body: @ruby_heredoc_body ref, + int index: int ref, + unique int child: @ruby_heredoc_body_child_type ref +); + +ruby_heredoc_body_def( + unique int id: @ruby_heredoc_body +); + +@ruby_if_alternative_type = @ruby_else | @ruby_elsif + +ruby_if_alternative( + unique int ruby_if: @ruby_if ref, + unique int alternative: @ruby_if_alternative_type ref +); + +ruby_if_consequence( + unique int ruby_if: @ruby_if ref, + unique int consequence: @ruby_then ref +); + +ruby_if_def( + unique int id: @ruby_if, + int condition: @ruby_underscore_statement ref +); + +ruby_if_guard_def( + unique int id: @ruby_if_guard, + int condition: @ruby_underscore_expression ref +); + +ruby_if_modifier_def( + unique int id: @ruby_if_modifier, + int body: @ruby_underscore_statement ref, + int condition: @ruby_underscore_expression ref +); + +ruby_in_def( + unique int id: @ruby_in, + int child: @ruby_underscore_arg ref +); + +ruby_in_clause_body( + unique int ruby_in_clause: @ruby_in_clause ref, + unique int body: @ruby_then ref +); + +@ruby_in_clause_guard_type = @ruby_if_guard | @ruby_unless_guard + +ruby_in_clause_guard( + unique int ruby_in_clause: @ruby_in_clause ref, + unique int guard: @ruby_in_clause_guard_type ref +); + +ruby_in_clause_def( + unique int id: @ruby_in_clause, + int pattern: @ruby_underscore_pattern_top_expr_body ref +); + +@ruby_interpolation_child_type = @ruby_token_empty_statement | @ruby_underscore_nonlocal_variable | @ruby_underscore_statement + +#keyset[ruby_interpolation, index] +ruby_interpolation_child( + int ruby_interpolation: @ruby_interpolation ref, + int index: int ref, + unique int child: @ruby_interpolation_child_type ref +); + +ruby_interpolation_def( + unique int id: @ruby_interpolation +); + +ruby_keyword_parameter_value( + unique int ruby_keyword_parameter: @ruby_keyword_parameter ref, + unique int value: @ruby_underscore_arg ref +); + +ruby_keyword_parameter_def( + unique int id: @ruby_keyword_parameter, + int name: @ruby_token_identifier ref +); + +@ruby_keyword_pattern_key_type = @ruby_string__ | @ruby_token_hash_key_symbol + +ruby_keyword_pattern_value( + unique int ruby_keyword_pattern: @ruby_keyword_pattern ref, + unique int value: @ruby_underscore_pattern_expr ref +); + +ruby_keyword_pattern_def( + unique int id: @ruby_keyword_pattern, + int key__: @ruby_keyword_pattern_key_type ref +); + +@ruby_lambda_body_type = @ruby_block | @ruby_do_block + +ruby_lambda_parameters( + unique int ruby_lambda: @ruby_lambda ref, + unique int parameters: @ruby_lambda_parameters ref +); + +ruby_lambda_def( + unique int id: @ruby_lambda, + int body: @ruby_lambda_body_type ref +); + +@ruby_lambda_parameters_child_type = @ruby_block_parameter | @ruby_destructured_parameter | @ruby_hash_splat_parameter | @ruby_keyword_parameter | @ruby_optional_parameter | @ruby_splat_parameter | @ruby_token_forward_parameter | @ruby_token_hash_splat_nil | @ruby_token_identifier + +#keyset[ruby_lambda_parameters, index] +ruby_lambda_parameters_child( + int ruby_lambda_parameters: @ruby_lambda_parameters ref, + int index: int ref, + unique int child: @ruby_lambda_parameters_child_type ref +); + +ruby_lambda_parameters_def( + unique int id: @ruby_lambda_parameters +); + +@ruby_left_assignment_list_child_type = @ruby_destructured_left_assignment | @ruby_rest_assignment | @ruby_underscore_lhs + +#keyset[ruby_left_assignment_list, index] +ruby_left_assignment_list_child( + int ruby_left_assignment_list: @ruby_left_assignment_list ref, + int index: int ref, + unique int child: @ruby_left_assignment_list_child_type ref +); + +ruby_left_assignment_list_def( + unique int id: @ruby_left_assignment_list +); + +ruby_match_pattern_def( + unique int id: @ruby_match_pattern, + int pattern: @ruby_underscore_pattern_top_expr_body ref, + int value: @ruby_underscore_arg ref +); + +@ruby_method_body_type = @ruby_body_statement | @ruby_rescue_modifier | @ruby_underscore_arg + +ruby_method_body( + unique int ruby_method: @ruby_method ref, + unique int body: @ruby_method_body_type ref +); + +ruby_method_parameters( + unique int ruby_method: @ruby_method ref, + unique int parameters: @ruby_method_parameters ref +); + +ruby_method_def( + unique int id: @ruby_method, + int name: @ruby_underscore_method_name ref +); + +@ruby_method_parameters_child_type = @ruby_block_parameter | @ruby_destructured_parameter | @ruby_hash_splat_parameter | @ruby_keyword_parameter | @ruby_optional_parameter | @ruby_splat_parameter | @ruby_token_forward_parameter | @ruby_token_hash_splat_nil | @ruby_token_identifier + +#keyset[ruby_method_parameters, index] +ruby_method_parameters_child( + int ruby_method_parameters: @ruby_method_parameters ref, + int index: int ref, + unique int child: @ruby_method_parameters_child_type ref +); + +ruby_method_parameters_def( + unique int id: @ruby_method_parameters +); + +ruby_module_body( + unique int ruby_module: @ruby_module ref, + unique int body: @ruby_body_statement ref +); + +@ruby_module_name_type = @ruby_scope_resolution | @ruby_token_constant + +ruby_module_def( + unique int id: @ruby_module, + int name: @ruby_module_name_type ref +); + +ruby_next_child( + unique int ruby_next: @ruby_next ref, + unique int child: @ruby_argument_list ref +); + +ruby_next_def( + unique int id: @ruby_next +); + +case @ruby_operator_assignment.operator of + 0 = @ruby_operator_assignment_percentequal +| 1 = @ruby_operator_assignment_ampersandampersandequal +| 2 = @ruby_operator_assignment_ampersandequal +| 3 = @ruby_operator_assignment_starstarequal +| 4 = @ruby_operator_assignment_starequal +| 5 = @ruby_operator_assignment_plusequal +| 6 = @ruby_operator_assignment_minusequal +| 7 = @ruby_operator_assignment_slashequal +| 8 = @ruby_operator_assignment_langlelangleequal +| 9 = @ruby_operator_assignment_ranglerangleequal +| 10 = @ruby_operator_assignment_caretequal +| 11 = @ruby_operator_assignment_pipeequal +| 12 = @ruby_operator_assignment_pipepipeequal +; + + +@ruby_operator_assignment_right_type = @ruby_rescue_modifier | @ruby_underscore_expression + +ruby_operator_assignment_def( + unique int id: @ruby_operator_assignment, + int left: @ruby_underscore_lhs ref, + int operator: int ref, + int right: @ruby_operator_assignment_right_type ref +); + +ruby_optional_parameter_def( + unique int id: @ruby_optional_parameter, + int name: @ruby_token_identifier ref, + int value: @ruby_underscore_arg ref +); + +@ruby_pair_key_type = @ruby_string__ | @ruby_token_hash_key_symbol | @ruby_underscore_arg + +ruby_pair_value( + unique int ruby_pair: @ruby_pair ref, + unique int value: @ruby_underscore_arg ref +); + +ruby_pair_def( + unique int id: @ruby_pair, + int key__: @ruby_pair_key_type ref +); + +ruby_parenthesized_pattern_def( + unique int id: @ruby_parenthesized_pattern, + int child: @ruby_underscore_pattern_expr ref +); + +@ruby_parenthesized_statements_child_type = @ruby_token_empty_statement | @ruby_underscore_statement + +#keyset[ruby_parenthesized_statements, index] +ruby_parenthesized_statements_child( + int ruby_parenthesized_statements: @ruby_parenthesized_statements ref, + int index: int ref, + unique int child: @ruby_parenthesized_statements_child_type ref +); + +ruby_parenthesized_statements_def( + unique int id: @ruby_parenthesized_statements +); + +@ruby_pattern_child_type = @ruby_splat_argument | @ruby_underscore_arg + +ruby_pattern_def( + unique int id: @ruby_pattern, + int child: @ruby_pattern_child_type ref +); + +@ruby_program_child_type = @ruby_token_empty_statement | @ruby_token_uninterpreted | @ruby_underscore_statement + +#keyset[ruby_program, index] +ruby_program_child( + int ruby_program: @ruby_program ref, + int index: int ref, + unique int child: @ruby_program_child_type ref +); + +ruby_program_def( + unique int id: @ruby_program +); + +@ruby_range_begin_type = @ruby_underscore_arg | @ruby_underscore_pattern_primitive + +ruby_range_begin( + unique int ruby_range: @ruby_range ref, + unique int begin: @ruby_range_begin_type ref +); + +@ruby_range_end_type = @ruby_underscore_arg | @ruby_underscore_pattern_primitive + +ruby_range_end( + unique int ruby_range: @ruby_range ref, + unique int end: @ruby_range_end_type ref +); + +case @ruby_range.operator of + 0 = @ruby_range_dotdot +| 1 = @ruby_range_dotdotdot +; + + +ruby_range_def( + unique int id: @ruby_range, + int operator: int ref +); + +@ruby_rational_child_type = @ruby_token_float | @ruby_token_integer + +ruby_rational_def( + unique int id: @ruby_rational, + int child: @ruby_rational_child_type ref +); + +ruby_redo_child( + unique int ruby_redo: @ruby_redo ref, + unique int child: @ruby_argument_list ref +); + +ruby_redo_def( + unique int id: @ruby_redo +); + +@ruby_regex_child_type = @ruby_interpolation | @ruby_token_escape_sequence | @ruby_token_string_content + +#keyset[ruby_regex, index] +ruby_regex_child( + int ruby_regex: @ruby_regex ref, + int index: int ref, + unique int child: @ruby_regex_child_type ref +); + +ruby_regex_def( + unique int id: @ruby_regex +); + +ruby_rescue_body( + unique int ruby_rescue: @ruby_rescue ref, + unique int body: @ruby_then ref +); + +ruby_rescue_exceptions( + unique int ruby_rescue: @ruby_rescue ref, + unique int exceptions: @ruby_exceptions ref +); + +ruby_rescue_variable( + unique int ruby_rescue: @ruby_rescue ref, + unique int variable: @ruby_exception_variable ref +); + +ruby_rescue_def( + unique int id: @ruby_rescue +); + +@ruby_rescue_modifier_body_type = @ruby_underscore_arg | @ruby_underscore_statement + +ruby_rescue_modifier_def( + unique int id: @ruby_rescue_modifier, + int body: @ruby_rescue_modifier_body_type ref, + int handler: @ruby_underscore_expression ref +); + +ruby_rest_assignment_child( + unique int ruby_rest_assignment: @ruby_rest_assignment ref, + unique int child: @ruby_underscore_lhs ref +); + +ruby_rest_assignment_def( + unique int id: @ruby_rest_assignment +); + +ruby_retry_child( + unique int ruby_retry: @ruby_retry ref, + unique int child: @ruby_argument_list ref +); + +ruby_retry_def( + unique int id: @ruby_retry +); + +ruby_return_child( + unique int ruby_return: @ruby_return ref, + unique int child: @ruby_argument_list ref +); + +ruby_return_def( + unique int id: @ruby_return +); + +@ruby_right_assignment_list_child_type = @ruby_splat_argument | @ruby_underscore_arg + +#keyset[ruby_right_assignment_list, index] +ruby_right_assignment_list_child( + int ruby_right_assignment_list: @ruby_right_assignment_list ref, + int index: int ref, + unique int child: @ruby_right_assignment_list_child_type ref +); + +ruby_right_assignment_list_def( + unique int id: @ruby_right_assignment_list +); + +@ruby_scope_resolution_scope_type = @ruby_underscore_pattern_constant | @ruby_underscore_primary + +ruby_scope_resolution_scope( + unique int ruby_scope_resolution: @ruby_scope_resolution ref, + unique int scope: @ruby_scope_resolution_scope_type ref +); + +ruby_scope_resolution_def( + unique int id: @ruby_scope_resolution, + int name: @ruby_token_constant ref +); + +ruby_setter_def( + unique int id: @ruby_setter, + int name: @ruby_token_identifier ref +); + +ruby_singleton_class_body( + unique int ruby_singleton_class: @ruby_singleton_class ref, + unique int body: @ruby_body_statement ref +); + +ruby_singleton_class_def( + unique int id: @ruby_singleton_class, + int value: @ruby_underscore_arg ref +); + +@ruby_singleton_method_body_type = @ruby_body_statement | @ruby_rescue_modifier | @ruby_underscore_arg + +ruby_singleton_method_body( + unique int ruby_singleton_method: @ruby_singleton_method ref, + unique int body: @ruby_singleton_method_body_type ref +); + +@ruby_singleton_method_object_type = @ruby_underscore_arg | @ruby_underscore_variable + +ruby_singleton_method_parameters( + unique int ruby_singleton_method: @ruby_singleton_method ref, + unique int parameters: @ruby_method_parameters ref +); + +ruby_singleton_method_def( + unique int id: @ruby_singleton_method, + int name: @ruby_underscore_method_name ref, + int object: @ruby_singleton_method_object_type ref +); + +ruby_splat_argument_child( + unique int ruby_splat_argument: @ruby_splat_argument ref, + unique int child: @ruby_underscore_arg ref +); + +ruby_splat_argument_def( + unique int id: @ruby_splat_argument +); + +ruby_splat_parameter_name( + unique int ruby_splat_parameter: @ruby_splat_parameter ref, + unique int name: @ruby_token_identifier ref +); + +ruby_splat_parameter_def( + unique int id: @ruby_splat_parameter +); + +@ruby_string_child_type = @ruby_interpolation | @ruby_token_escape_sequence | @ruby_token_string_content + +#keyset[ruby_string__, index] +ruby_string_child( + int ruby_string__: @ruby_string__ ref, + int index: int ref, + unique int child: @ruby_string_child_type ref +); + +ruby_string_def( + unique int id: @ruby_string__ +); + +#keyset[ruby_string_array, index] +ruby_string_array_child( + int ruby_string_array: @ruby_string_array ref, + int index: int ref, + unique int child: @ruby_bare_string ref +); + +ruby_string_array_def( + unique int id: @ruby_string_array +); + +@ruby_subshell_child_type = @ruby_interpolation | @ruby_token_escape_sequence | @ruby_token_string_content + +#keyset[ruby_subshell, index] +ruby_subshell_child( + int ruby_subshell: @ruby_subshell ref, + int index: int ref, + unique int child: @ruby_subshell_child_type ref +); + +ruby_subshell_def( + unique int id: @ruby_subshell +); + +ruby_superclass_def( + unique int id: @ruby_superclass, + int child: @ruby_underscore_expression ref +); + +#keyset[ruby_symbol_array, index] +ruby_symbol_array_child( + int ruby_symbol_array: @ruby_symbol_array ref, + int index: int ref, + unique int child: @ruby_bare_symbol ref +); + +ruby_symbol_array_def( + unique int id: @ruby_symbol_array +); + +ruby_test_pattern_def( + unique int id: @ruby_test_pattern, + int pattern: @ruby_underscore_pattern_top_expr_body ref, + int value: @ruby_underscore_arg ref +); + +@ruby_then_child_type = @ruby_token_empty_statement | @ruby_underscore_statement + +#keyset[ruby_then, index] +ruby_then_child( + int ruby_then: @ruby_then ref, + int index: int ref, + unique int child: @ruby_then_child_type ref +); + +ruby_then_def( + unique int id: @ruby_then +); + +@ruby_unary_operand_type = @ruby_parenthesized_statements | @ruby_underscore_expression | @ruby_underscore_simple_numeric + +case @ruby_unary.operator of + 0 = @ruby_unary_bang +| 1 = @ruby_unary_plus +| 2 = @ruby_unary_minus +| 3 = @ruby_unary_definedquestion +| 4 = @ruby_unary_not +| 5 = @ruby_unary_tilde +; + + +ruby_unary_def( + unique int id: @ruby_unary, + int operand: @ruby_unary_operand_type ref, + int operator: int ref +); + +#keyset[ruby_undef, index] +ruby_undef_child( + int ruby_undef: @ruby_undef ref, + int index: int ref, + unique int child: @ruby_underscore_method_name ref +); + +ruby_undef_def( + unique int id: @ruby_undef +); + +@ruby_unless_alternative_type = @ruby_else | @ruby_elsif + +ruby_unless_alternative( + unique int ruby_unless: @ruby_unless ref, + unique int alternative: @ruby_unless_alternative_type ref +); + +ruby_unless_consequence( + unique int ruby_unless: @ruby_unless ref, + unique int consequence: @ruby_then ref +); + +ruby_unless_def( + unique int id: @ruby_unless, + int condition: @ruby_underscore_statement ref +); + +ruby_unless_guard_def( + unique int id: @ruby_unless_guard, + int condition: @ruby_underscore_expression ref +); + +ruby_unless_modifier_def( + unique int id: @ruby_unless_modifier, + int body: @ruby_underscore_statement ref, + int condition: @ruby_underscore_expression ref +); + +ruby_until_def( + unique int id: @ruby_until, + int body: @ruby_do ref, + int condition: @ruby_underscore_statement ref +); + +ruby_until_modifier_def( + unique int id: @ruby_until_modifier, + int body: @ruby_underscore_statement ref, + int condition: @ruby_underscore_expression ref +); + +@ruby_variable_reference_pattern_name_type = @ruby_token_identifier | @ruby_underscore_nonlocal_variable + +ruby_variable_reference_pattern_def( + unique int id: @ruby_variable_reference_pattern, + int name: @ruby_variable_reference_pattern_name_type ref +); + +ruby_when_body( + unique int ruby_when: @ruby_when ref, + unique int body: @ruby_then ref +); + +#keyset[ruby_when, index] +ruby_when_pattern( + int ruby_when: @ruby_when ref, + int index: int ref, + unique int pattern: @ruby_pattern ref +); + +ruby_when_def( + unique int id: @ruby_when +); + +ruby_while_def( + unique int id: @ruby_while, + int body: @ruby_do ref, + int condition: @ruby_underscore_statement ref +); + +ruby_while_modifier_def( + unique int id: @ruby_while_modifier, + int body: @ruby_underscore_statement ref, + int condition: @ruby_underscore_expression ref +); + +ruby_yield_child( + unique int ruby_yield: @ruby_yield ref, + unique int child: @ruby_argument_list ref +); + +ruby_yield_def( + unique int id: @ruby_yield +); + +ruby_tokeninfo( + unique int id: @ruby_token, + int kind: int ref, + string value: string ref +); + +case @ruby_token.kind of + 0 = @ruby_reserved_word +| 1 = @ruby_token_character +| 2 = @ruby_token_class_variable +| 3 = @ruby_token_comment +| 4 = @ruby_token_constant +| 5 = @ruby_token_empty_statement +| 6 = @ruby_token_encoding +| 7 = @ruby_token_escape_sequence +| 8 = @ruby_token_false +| 9 = @ruby_token_file +| 10 = @ruby_token_float +| 11 = @ruby_token_forward_argument +| 12 = @ruby_token_forward_parameter +| 13 = @ruby_token_global_variable +| 14 = @ruby_token_hash_key_symbol +| 15 = @ruby_token_hash_splat_nil +| 16 = @ruby_token_heredoc_beginning +| 17 = @ruby_token_heredoc_content +| 18 = @ruby_token_heredoc_end +| 19 = @ruby_token_identifier +| 20 = @ruby_token_instance_variable +| 21 = @ruby_token_integer +| 22 = @ruby_token_line +| 23 = @ruby_token_nil +| 24 = @ruby_token_operator +| 25 = @ruby_token_self +| 26 = @ruby_token_simple_symbol +| 27 = @ruby_token_string_content +| 28 = @ruby_token_super +| 29 = @ruby_token_true +| 30 = @ruby_token_uninterpreted +; + + +@ruby_ast_node = @ruby_alias | @ruby_alternative_pattern | @ruby_argument_list | @ruby_array | @ruby_array_pattern | @ruby_as_pattern | @ruby_assignment | @ruby_bare_string | @ruby_bare_symbol | @ruby_begin | @ruby_begin_block | @ruby_binary | @ruby_block | @ruby_block_argument | @ruby_block_body | @ruby_block_parameter | @ruby_block_parameters | @ruby_body_statement | @ruby_break | @ruby_call | @ruby_case__ | @ruby_case_match | @ruby_chained_string | @ruby_class | @ruby_complex | @ruby_conditional | @ruby_delimited_symbol | @ruby_destructured_left_assignment | @ruby_destructured_parameter | @ruby_do | @ruby_do_block | @ruby_element_reference | @ruby_else | @ruby_elsif | @ruby_end_block | @ruby_ensure | @ruby_exception_variable | @ruby_exceptions | @ruby_expression_reference_pattern | @ruby_find_pattern | @ruby_for | @ruby_hash | @ruby_hash_pattern | @ruby_hash_splat_argument | @ruby_hash_splat_parameter | @ruby_heredoc_body | @ruby_if | @ruby_if_guard | @ruby_if_modifier | @ruby_in | @ruby_in_clause | @ruby_interpolation | @ruby_keyword_parameter | @ruby_keyword_pattern | @ruby_lambda | @ruby_lambda_parameters | @ruby_left_assignment_list | @ruby_match_pattern | @ruby_method | @ruby_method_parameters | @ruby_module | @ruby_next | @ruby_operator_assignment | @ruby_optional_parameter | @ruby_pair | @ruby_parenthesized_pattern | @ruby_parenthesized_statements | @ruby_pattern | @ruby_program | @ruby_range | @ruby_rational | @ruby_redo | @ruby_regex | @ruby_rescue | @ruby_rescue_modifier | @ruby_rest_assignment | @ruby_retry | @ruby_return | @ruby_right_assignment_list | @ruby_scope_resolution | @ruby_setter | @ruby_singleton_class | @ruby_singleton_method | @ruby_splat_argument | @ruby_splat_parameter | @ruby_string__ | @ruby_string_array | @ruby_subshell | @ruby_superclass | @ruby_symbol_array | @ruby_test_pattern | @ruby_then | @ruby_token | @ruby_unary | @ruby_undef | @ruby_unless | @ruby_unless_guard | @ruby_unless_modifier | @ruby_until | @ruby_until_modifier | @ruby_variable_reference_pattern | @ruby_when | @ruby_while | @ruby_while_modifier | @ruby_yield + +ruby_ast_node_location( + unique int node: @ruby_ast_node ref, + int loc: @location_default ref +); + +#keyset[parent, parent_index] +ruby_ast_node_parent( + unique int node: @ruby_ast_node ref, + int parent: @ruby_ast_node ref, + int parent_index: int ref +); + +/*- Erb dbscheme -*/ +erb_comment_directive_child( + unique int erb_comment_directive: @erb_comment_directive ref, + unique int child: @erb_token_comment ref +); + +erb_comment_directive_def( + unique int id: @erb_comment_directive +); + +erb_directive_child( + unique int erb_directive: @erb_directive ref, + unique int child: @erb_token_code ref +); + +erb_directive_def( + unique int id: @erb_directive +); + +erb_graphql_directive_child( + unique int erb_graphql_directive: @erb_graphql_directive ref, + unique int child: @erb_token_code ref +); + +erb_graphql_directive_def( + unique int id: @erb_graphql_directive +); + +erb_output_directive_child( + unique int erb_output_directive: @erb_output_directive ref, + unique int child: @erb_token_code ref +); + +erb_output_directive_def( + unique int id: @erb_output_directive +); + +@erb_template_child_type = @erb_comment_directive | @erb_directive | @erb_graphql_directive | @erb_output_directive | @erb_token_content + +#keyset[erb_template, index] +erb_template_child( + int erb_template: @erb_template ref, + int index: int ref, + unique int child: @erb_template_child_type ref +); + +erb_template_def( + unique int id: @erb_template +); + +erb_tokeninfo( + unique int id: @erb_token, + int kind: int ref, + string value: string ref +); + +case @erb_token.kind of + 0 = @erb_reserved_word +| 1 = @erb_token_code +| 2 = @erb_token_comment +| 3 = @erb_token_content +; + + +@erb_ast_node = @erb_comment_directive | @erb_directive | @erb_graphql_directive | @erb_output_directive | @erb_template | @erb_token + +erb_ast_node_location( + unique int node: @erb_ast_node ref, + int loc: @location_default ref +); + +#keyset[parent, parent_index] +erb_ast_node_parent( + unique int node: @erb_ast_node ref, + int parent: @erb_ast_node ref, + int parent_index: int ref +); + diff --git a/ruby/ql/lib/upgrades/40a6b0a5e81115bd870b3a12a1fe954b06362bb7/upgrade.properties b/ruby/ql/lib/upgrades/40a6b0a5e81115bd870b3a12a1fe954b06362bb7/upgrade.properties new file mode 100644 index 00000000000..9b83871fb9b --- /dev/null +++ b/ruby/ql/lib/upgrades/40a6b0a5e81115bd870b3a12a1fe954b06362bb7/upgrade.properties @@ -0,0 +1,2 @@ +description: Add databaseMetadata relation +compatibility: full diff --git a/ruby/ql/lib/utils/test/PrettyPrintModels.ql b/ruby/ql/lib/utils/test/PrettyPrintModels.ql new file mode 100644 index 00000000000..115cc2c1287 --- /dev/null +++ b/ruby/ql/lib/utils/test/PrettyPrintModels.ql @@ -0,0 +1,6 @@ +/** + * @kind test-postprocess + */ + +import codeql.ruby.frameworks.data.internal.ApiGraphModels +import codeql.dataflow.test.ProvenancePathGraph::TestPostProcessing::TranslateProvenanceResults diff --git a/ruby/ql/src/CHANGELOG.md b/ruby/ql/src/CHANGELOG.md index fcee47275f5..ef903e8d144 100644 --- a/ruby/ql/src/CHANGELOG.md +++ b/ruby/ql/src/CHANGELOG.md @@ -1,3 +1,10 @@ +## 1.4.0 + +### Query Metadata Changes + +* Update query metadata tags for `rb/database-query-in-loop` and `rb/useless-assignment-to-local` to align with the established +[Query file metadata and alert message style guide](https://github.com/github/codeql/blob/main/docs/query-metadata-style-guide.md#quality-query-sub-category-tags). + ## 1.3.2 No user-facing changes. diff --git a/ruby/ql/src/change-notes/2025-06-17-tagging.md b/ruby/ql/src/change-notes/released/1.4.0.md similarity index 88% rename from ruby/ql/src/change-notes/2025-06-17-tagging.md rename to ruby/ql/src/change-notes/released/1.4.0.md index 757e1c55577..2c71d9748b4 100644 --- a/ruby/ql/src/change-notes/2025-06-17-tagging.md +++ b/ruby/ql/src/change-notes/released/1.4.0.md @@ -1,5 +1,6 @@ ---- -category: queryMetadata ---- +## 1.4.0 + +### Query Metadata Changes + * Update query metadata tags for `rb/database-query-in-loop` and `rb/useless-assignment-to-local` to align with the established [Query file metadata and alert message style guide](https://github.com/github/codeql/blob/main/docs/query-metadata-style-guide.md#quality-query-sub-category-tags). diff --git a/ruby/ql/src/codeql-pack.release.yml b/ruby/ql/src/codeql-pack.release.yml index 86a9cb32d86..b8b2e97d508 100644 --- a/ruby/ql/src/codeql-pack.release.yml +++ b/ruby/ql/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.3.2 +lastReleaseVersion: 1.4.0 diff --git a/ruby/ql/src/qlpack.yml b/ruby/ql/src/qlpack.yml index b6053c7a9ef..f5e2a6997b6 100644 --- a/ruby/ql/src/qlpack.yml +++ b/ruby/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/ruby-queries -version: 1.3.3-dev +version: 1.4.1-dev groups: - ruby - queries diff --git a/ruby/ql/test/query-tests/security/cwe-078/CommandInjection/CommandInjection.expected b/ruby/ql/test/query-tests/security/cwe-078/CommandInjection/CommandInjection.expected index 049edf75ace..2173fed576a 100644 --- a/ruby/ql/test/query-tests/security/cwe-078/CommandInjection/CommandInjection.expected +++ b/ruby/ql/test/query-tests/security/cwe-078/CommandInjection/CommandInjection.expected @@ -1,32 +1,49 @@ -models -| 1 | Sink: Terrapin::CommandLine!; Method[new].Argument[0]; command-injection | -| 2 | Sink: Terrapin::CommandLine!; Method[new].Argument[1]; command-injection | +#select +| CommandInjection.rb:7:10:7:15 | #{...} | CommandInjection.rb:6:15:6:20 | call to params | CommandInjection.rb:7:10:7:15 | #{...} | This command depends on a $@. | CommandInjection.rb:6:15:6:20 | call to params | user-provided value | +| CommandInjection.rb:8:16:8:18 | cmd | CommandInjection.rb:6:15:6:20 | call to params | CommandInjection.rb:8:16:8:18 | cmd | This command depends on a $@. | CommandInjection.rb:6:15:6:20 | call to params | user-provided value | +| CommandInjection.rb:10:14:10:16 | cmd | CommandInjection.rb:6:15:6:20 | call to params | CommandInjection.rb:10:14:10:16 | cmd | This command depends on a $@. | CommandInjection.rb:6:15:6:20 | call to params | user-provided value | +| CommandInjection.rb:11:17:11:22 | #{...} | CommandInjection.rb:6:15:6:20 | call to params | CommandInjection.rb:11:17:11:22 | #{...} | This command depends on a $@. | CommandInjection.rb:6:15:6:20 | call to params | user-provided value | +| CommandInjection.rb:13:9:13:14 | #{...} | CommandInjection.rb:6:15:6:20 | call to params | CommandInjection.rb:13:9:13:14 | #{...} | This command depends on a $@. | CommandInjection.rb:6:15:6:20 | call to params | user-provided value | +| CommandInjection.rb:30:19:30:24 | #{...} | CommandInjection.rb:6:15:6:20 | call to params | CommandInjection.rb:30:19:30:24 | #{...} | This command depends on a $@. | CommandInjection.rb:6:15:6:20 | call to params | user-provided value | +| CommandInjection.rb:34:24:34:36 | "echo #{...}" | CommandInjection.rb:6:15:6:20 | call to params | CommandInjection.rb:34:24:34:36 | "echo #{...}" | This command depends on a $@. | CommandInjection.rb:6:15:6:20 | call to params | user-provided value | +| CommandInjection.rb:35:39:35:51 | "grep #{...}" | CommandInjection.rb:6:15:6:20 | call to params | CommandInjection.rb:35:39:35:51 | "grep #{...}" | This command depends on a $@. | CommandInjection.rb:6:15:6:20 | call to params | user-provided value | +| CommandInjection.rb:51:24:51:36 | "echo #{...}" | CommandInjection.rb:47:15:47:20 | call to params | CommandInjection.rb:51:24:51:36 | "echo #{...}" | This command depends on a $@. | CommandInjection.rb:47:15:47:20 | call to params | user-provided value | +| CommandInjection.rb:60:14:60:16 | cmd | CommandInjection.rb:55:13:55:18 | call to params | CommandInjection.rb:60:14:60:16 | cmd | This command depends on a $@. | CommandInjection.rb:55:13:55:18 | call to params | user-provided value | +| CommandInjection.rb:75:14:75:29 | "echo #{...}" | CommandInjection.rb:74:18:74:23 | number | CommandInjection.rb:75:14:75:29 | "echo #{...}" | This command depends on a $@. | CommandInjection.rb:74:18:74:23 | number | user-provided value | +| CommandInjection.rb:83:14:83:34 | "echo #{...}" | CommandInjection.rb:82:23:82:33 | blah_number | CommandInjection.rb:83:14:83:34 | "echo #{...}" | This command depends on a $@. | CommandInjection.rb:82:23:82:33 | blah_number | user-provided value | +| CommandInjection.rb:92:14:92:39 | "echo #{...}" | CommandInjection.rb:92:22:92:37 | ...[...] | CommandInjection.rb:92:14:92:39 | "echo #{...}" | This command depends on a $@. | CommandInjection.rb:92:22:92:37 | ...[...] | user-provided value | +| CommandInjection.rb:105:16:105:28 | "cat #{...}" | CommandInjection.rb:104:16:104:21 | call to params | CommandInjection.rb:105:16:105:28 | "cat #{...}" | This command depends on a $@. | CommandInjection.rb:104:16:104:21 | call to params | user-provided value | +| CommandInjection.rb:112:33:112:44 | ...[...] | CommandInjection.rb:112:33:112:38 | call to params | CommandInjection.rb:112:33:112:44 | ...[...] | This command depends on a $@. | CommandInjection.rb:112:33:112:38 | call to params | user-provided value | +| CommandInjection.rb:114:41:114:56 | "#{...}" | CommandInjection.rb:114:44:114:49 | call to params | CommandInjection.rb:114:41:114:56 | "#{...}" | This command depends on a $@. | CommandInjection.rb:114:44:114:49 | call to params | user-provided value | edges | CommandInjection.rb:6:9:6:11 | cmd | CommandInjection.rb:7:10:7:15 | #{...} | provenance | | | CommandInjection.rb:6:9:6:11 | cmd | CommandInjection.rb:8:16:8:18 | cmd | provenance | | | CommandInjection.rb:6:9:6:11 | cmd | CommandInjection.rb:10:14:10:16 | cmd | provenance | | | CommandInjection.rb:6:9:6:11 | cmd | CommandInjection.rb:11:17:11:22 | #{...} | provenance | | | CommandInjection.rb:6:9:6:11 | cmd | CommandInjection.rb:13:9:13:14 | #{...} | provenance | | -| CommandInjection.rb:6:9:6:11 | cmd | CommandInjection.rb:29:19:29:24 | #{...} | provenance | | -| CommandInjection.rb:6:9:6:11 | cmd | CommandInjection.rb:33:24:33:36 | "echo #{...}" | provenance | AdditionalTaintStep | -| CommandInjection.rb:6:9:6:11 | cmd | CommandInjection.rb:34:39:34:51 | "grep #{...}" | provenance | AdditionalTaintStep | +| CommandInjection.rb:6:9:6:11 | cmd | CommandInjection.rb:30:19:30:24 | #{...} | provenance | | +| CommandInjection.rb:6:9:6:11 | cmd | CommandInjection.rb:34:24:34:36 | "echo #{...}" | provenance | AdditionalTaintStep | +| CommandInjection.rb:6:9:6:11 | cmd | CommandInjection.rb:35:39:35:51 | "grep #{...}" | provenance | AdditionalTaintStep | | CommandInjection.rb:6:15:6:20 | call to params | CommandInjection.rb:6:15:6:26 | ...[...] | provenance | | | CommandInjection.rb:6:15:6:26 | ...[...] | CommandInjection.rb:6:9:6:11 | cmd | provenance | | -| CommandInjection.rb:46:9:46:11 | cmd | CommandInjection.rb:50:24:50:36 | "echo #{...}" | provenance | AdditionalTaintStep | -| CommandInjection.rb:46:15:46:20 | call to params | CommandInjection.rb:46:15:46:26 | ...[...] | provenance | | -| CommandInjection.rb:46:15:46:26 | ...[...] | CommandInjection.rb:46:9:46:11 | cmd | provenance | | -| CommandInjection.rb:54:7:54:9 | cmd | CommandInjection.rb:59:14:59:16 | cmd | provenance | | -| CommandInjection.rb:54:13:54:18 | call to params | CommandInjection.rb:54:13:54:24 | ...[...] | provenance | | -| CommandInjection.rb:54:13:54:24 | ...[...] | CommandInjection.rb:54:7:54:9 | cmd | provenance | | -| CommandInjection.rb:73:18:73:23 | number | CommandInjection.rb:74:14:74:29 | "echo #{...}" | provenance | AdditionalTaintStep | -| CommandInjection.rb:81:23:81:33 | blah_number | CommandInjection.rb:82:14:82:34 | "echo #{...}" | provenance | AdditionalTaintStep | -| CommandInjection.rb:91:22:91:37 | ...[...] | CommandInjection.rb:91:14:91:39 | "echo #{...}" | provenance | AdditionalTaintStep | -| CommandInjection.rb:103:9:103:12 | file | CommandInjection.rb:104:16:104:28 | "cat #{...}" | provenance | AdditionalTaintStep | -| CommandInjection.rb:103:16:103:21 | call to params | CommandInjection.rb:103:16:103:28 | ...[...] | provenance | | -| CommandInjection.rb:103:16:103:28 | ...[...] | CommandInjection.rb:103:9:103:12 | file | provenance | | -| CommandInjection.rb:111:33:111:38 | call to params | CommandInjection.rb:111:33:111:44 | ...[...] | provenance | Sink:MaD:1 | -| CommandInjection.rb:113:44:113:49 | call to params | CommandInjection.rb:113:44:113:54 | ...[...] | provenance | | -| CommandInjection.rb:113:44:113:54 | ...[...] | CommandInjection.rb:113:41:113:56 | "#{...}" | provenance | AdditionalTaintStep Sink:MaD:2 | +| CommandInjection.rb:47:9:47:11 | cmd | CommandInjection.rb:51:24:51:36 | "echo #{...}" | provenance | AdditionalTaintStep | +| CommandInjection.rb:47:15:47:20 | call to params | CommandInjection.rb:47:15:47:26 | ...[...] | provenance | | +| CommandInjection.rb:47:15:47:26 | ...[...] | CommandInjection.rb:47:9:47:11 | cmd | provenance | | +| CommandInjection.rb:55:7:55:9 | cmd | CommandInjection.rb:60:14:60:16 | cmd | provenance | | +| CommandInjection.rb:55:13:55:18 | call to params | CommandInjection.rb:55:13:55:24 | ...[...] | provenance | | +| CommandInjection.rb:55:13:55:24 | ...[...] | CommandInjection.rb:55:7:55:9 | cmd | provenance | | +| CommandInjection.rb:74:18:74:23 | number | CommandInjection.rb:75:14:75:29 | "echo #{...}" | provenance | AdditionalTaintStep | +| CommandInjection.rb:82:23:82:33 | blah_number | CommandInjection.rb:83:14:83:34 | "echo #{...}" | provenance | AdditionalTaintStep | +| CommandInjection.rb:92:22:92:37 | ...[...] | CommandInjection.rb:92:14:92:39 | "echo #{...}" | provenance | AdditionalTaintStep | +| CommandInjection.rb:104:9:104:12 | file | CommandInjection.rb:105:16:105:28 | "cat #{...}" | provenance | AdditionalTaintStep | +| CommandInjection.rb:104:16:104:21 | call to params | CommandInjection.rb:104:16:104:28 | ...[...] | provenance | | +| CommandInjection.rb:104:16:104:28 | ...[...] | CommandInjection.rb:104:9:104:12 | file | provenance | | +| CommandInjection.rb:112:33:112:38 | call to params | CommandInjection.rb:112:33:112:44 | ...[...] | provenance | Sink:MaD:1 | +| CommandInjection.rb:114:44:114:49 | call to params | CommandInjection.rb:114:44:114:54 | ...[...] | provenance | | +| CommandInjection.rb:114:44:114:54 | ...[...] | CommandInjection.rb:114:41:114:56 | "#{...}" | provenance | AdditionalTaintStep Sink:MaD:2 | +models +| 1 | Sink: Terrapin::CommandLine!; Method[new].Argument[0]; command-injection | +| 2 | Sink: Terrapin::CommandLine!; Method[new].Argument[1]; command-injection | nodes | CommandInjection.rb:6:9:6:11 | cmd | semmle.label | cmd | | CommandInjection.rb:6:15:6:20 | call to params | semmle.label | call to params | @@ -36,47 +53,30 @@ nodes | CommandInjection.rb:10:14:10:16 | cmd | semmle.label | cmd | | CommandInjection.rb:11:17:11:22 | #{...} | semmle.label | #{...} | | CommandInjection.rb:13:9:13:14 | #{...} | semmle.label | #{...} | -| CommandInjection.rb:29:19:29:24 | #{...} | semmle.label | #{...} | -| CommandInjection.rb:33:24:33:36 | "echo #{...}" | semmle.label | "echo #{...}" | -| CommandInjection.rb:34:39:34:51 | "grep #{...}" | semmle.label | "grep #{...}" | -| CommandInjection.rb:46:9:46:11 | cmd | semmle.label | cmd | -| CommandInjection.rb:46:15:46:20 | call to params | semmle.label | call to params | -| CommandInjection.rb:46:15:46:26 | ...[...] | semmle.label | ...[...] | -| CommandInjection.rb:50:24:50:36 | "echo #{...}" | semmle.label | "echo #{...}" | -| CommandInjection.rb:54:7:54:9 | cmd | semmle.label | cmd | -| CommandInjection.rb:54:13:54:18 | call to params | semmle.label | call to params | -| CommandInjection.rb:54:13:54:24 | ...[...] | semmle.label | ...[...] | -| CommandInjection.rb:59:14:59:16 | cmd | semmle.label | cmd | -| CommandInjection.rb:73:18:73:23 | number | semmle.label | number | -| CommandInjection.rb:74:14:74:29 | "echo #{...}" | semmle.label | "echo #{...}" | -| CommandInjection.rb:81:23:81:33 | blah_number | semmle.label | blah_number | -| CommandInjection.rb:82:14:82:34 | "echo #{...}" | semmle.label | "echo #{...}" | -| CommandInjection.rb:91:14:91:39 | "echo #{...}" | semmle.label | "echo #{...}" | -| CommandInjection.rb:91:22:91:37 | ...[...] | semmle.label | ...[...] | -| CommandInjection.rb:103:9:103:12 | file | semmle.label | file | -| CommandInjection.rb:103:16:103:21 | call to params | semmle.label | call to params | -| CommandInjection.rb:103:16:103:28 | ...[...] | semmle.label | ...[...] | -| CommandInjection.rb:104:16:104:28 | "cat #{...}" | semmle.label | "cat #{...}" | -| CommandInjection.rb:111:33:111:38 | call to params | semmle.label | call to params | -| CommandInjection.rb:111:33:111:44 | ...[...] | semmle.label | ...[...] | -| CommandInjection.rb:113:41:113:56 | "#{...}" | semmle.label | "#{...}" | -| CommandInjection.rb:113:44:113:49 | call to params | semmle.label | call to params | -| CommandInjection.rb:113:44:113:54 | ...[...] | semmle.label | ...[...] | +| CommandInjection.rb:30:19:30:24 | #{...} | semmle.label | #{...} | +| CommandInjection.rb:34:24:34:36 | "echo #{...}" | semmle.label | "echo #{...}" | +| CommandInjection.rb:35:39:35:51 | "grep #{...}" | semmle.label | "grep #{...}" | +| CommandInjection.rb:47:9:47:11 | cmd | semmle.label | cmd | +| CommandInjection.rb:47:15:47:20 | call to params | semmle.label | call to params | +| CommandInjection.rb:47:15:47:26 | ...[...] | semmle.label | ...[...] | +| CommandInjection.rb:51:24:51:36 | "echo #{...}" | semmle.label | "echo #{...}" | +| CommandInjection.rb:55:7:55:9 | cmd | semmle.label | cmd | +| CommandInjection.rb:55:13:55:18 | call to params | semmle.label | call to params | +| CommandInjection.rb:55:13:55:24 | ...[...] | semmle.label | ...[...] | +| CommandInjection.rb:60:14:60:16 | cmd | semmle.label | cmd | +| CommandInjection.rb:74:18:74:23 | number | semmle.label | number | +| CommandInjection.rb:75:14:75:29 | "echo #{...}" | semmle.label | "echo #{...}" | +| CommandInjection.rb:82:23:82:33 | blah_number | semmle.label | blah_number | +| CommandInjection.rb:83:14:83:34 | "echo #{...}" | semmle.label | "echo #{...}" | +| CommandInjection.rb:92:14:92:39 | "echo #{...}" | semmle.label | "echo #{...}" | +| CommandInjection.rb:92:22:92:37 | ...[...] | semmle.label | ...[...] | +| CommandInjection.rb:104:9:104:12 | file | semmle.label | file | +| CommandInjection.rb:104:16:104:21 | call to params | semmle.label | call to params | +| CommandInjection.rb:104:16:104:28 | ...[...] | semmle.label | ...[...] | +| CommandInjection.rb:105:16:105:28 | "cat #{...}" | semmle.label | "cat #{...}" | +| CommandInjection.rb:112:33:112:38 | call to params | semmle.label | call to params | +| CommandInjection.rb:112:33:112:44 | ...[...] | semmle.label | ...[...] | +| CommandInjection.rb:114:41:114:56 | "#{...}" | semmle.label | "#{...}" | +| CommandInjection.rb:114:44:114:49 | call to params | semmle.label | call to params | +| CommandInjection.rb:114:44:114:54 | ...[...] | semmle.label | ...[...] | subpaths -#select -| CommandInjection.rb:7:10:7:15 | #{...} | CommandInjection.rb:6:15:6:20 | call to params | CommandInjection.rb:7:10:7:15 | #{...} | This command depends on a $@. | CommandInjection.rb:6:15:6:20 | call to params | user-provided value | -| CommandInjection.rb:8:16:8:18 | cmd | CommandInjection.rb:6:15:6:20 | call to params | CommandInjection.rb:8:16:8:18 | cmd | This command depends on a $@. | CommandInjection.rb:6:15:6:20 | call to params | user-provided value | -| CommandInjection.rb:10:14:10:16 | cmd | CommandInjection.rb:6:15:6:20 | call to params | CommandInjection.rb:10:14:10:16 | cmd | This command depends on a $@. | CommandInjection.rb:6:15:6:20 | call to params | user-provided value | -| CommandInjection.rb:11:17:11:22 | #{...} | CommandInjection.rb:6:15:6:20 | call to params | CommandInjection.rb:11:17:11:22 | #{...} | This command depends on a $@. | CommandInjection.rb:6:15:6:20 | call to params | user-provided value | -| CommandInjection.rb:13:9:13:14 | #{...} | CommandInjection.rb:6:15:6:20 | call to params | CommandInjection.rb:13:9:13:14 | #{...} | This command depends on a $@. | CommandInjection.rb:6:15:6:20 | call to params | user-provided value | -| CommandInjection.rb:29:19:29:24 | #{...} | CommandInjection.rb:6:15:6:20 | call to params | CommandInjection.rb:29:19:29:24 | #{...} | This command depends on a $@. | CommandInjection.rb:6:15:6:20 | call to params | user-provided value | -| CommandInjection.rb:33:24:33:36 | "echo #{...}" | CommandInjection.rb:6:15:6:20 | call to params | CommandInjection.rb:33:24:33:36 | "echo #{...}" | This command depends on a $@. | CommandInjection.rb:6:15:6:20 | call to params | user-provided value | -| CommandInjection.rb:34:39:34:51 | "grep #{...}" | CommandInjection.rb:6:15:6:20 | call to params | CommandInjection.rb:34:39:34:51 | "grep #{...}" | This command depends on a $@. | CommandInjection.rb:6:15:6:20 | call to params | user-provided value | -| CommandInjection.rb:50:24:50:36 | "echo #{...}" | CommandInjection.rb:46:15:46:20 | call to params | CommandInjection.rb:50:24:50:36 | "echo #{...}" | This command depends on a $@. | CommandInjection.rb:46:15:46:20 | call to params | user-provided value | -| CommandInjection.rb:59:14:59:16 | cmd | CommandInjection.rb:54:13:54:18 | call to params | CommandInjection.rb:59:14:59:16 | cmd | This command depends on a $@. | CommandInjection.rb:54:13:54:18 | call to params | user-provided value | -| CommandInjection.rb:74:14:74:29 | "echo #{...}" | CommandInjection.rb:73:18:73:23 | number | CommandInjection.rb:74:14:74:29 | "echo #{...}" | This command depends on a $@. | CommandInjection.rb:73:18:73:23 | number | user-provided value | -| CommandInjection.rb:82:14:82:34 | "echo #{...}" | CommandInjection.rb:81:23:81:33 | blah_number | CommandInjection.rb:82:14:82:34 | "echo #{...}" | This command depends on a $@. | CommandInjection.rb:81:23:81:33 | blah_number | user-provided value | -| CommandInjection.rb:91:14:91:39 | "echo #{...}" | CommandInjection.rb:91:22:91:37 | ...[...] | CommandInjection.rb:91:14:91:39 | "echo #{...}" | This command depends on a $@. | CommandInjection.rb:91:22:91:37 | ...[...] | user-provided value | -| CommandInjection.rb:104:16:104:28 | "cat #{...}" | CommandInjection.rb:103:16:103:21 | call to params | CommandInjection.rb:104:16:104:28 | "cat #{...}" | This command depends on a $@. | CommandInjection.rb:103:16:103:21 | call to params | user-provided value | -| CommandInjection.rb:111:33:111:44 | ...[...] | CommandInjection.rb:111:33:111:38 | call to params | CommandInjection.rb:111:33:111:44 | ...[...] | This command depends on a $@. | CommandInjection.rb:111:33:111:38 | call to params | user-provided value | -| CommandInjection.rb:113:41:113:56 | "#{...}" | CommandInjection.rb:113:44:113:49 | call to params | CommandInjection.rb:113:41:113:56 | "#{...}" | This command depends on a $@. | CommandInjection.rb:113:44:113:49 | call to params | user-provided value | diff --git a/ruby/ql/test/query-tests/security/cwe-078/CommandInjection/CommandInjection.ql b/ruby/ql/test/query-tests/security/cwe-078/CommandInjection/CommandInjection.ql deleted file mode 100644 index c0f54091eb4..00000000000 --- a/ruby/ql/test/query-tests/security/cwe-078/CommandInjection/CommandInjection.ql +++ /dev/null @@ -1,16 +0,0 @@ -/** - * @kind path-problem - */ - -import codeql.ruby.AST -import codeql.ruby.security.CommandInjectionQuery -import codeql.dataflow.test.ProvenancePathGraph -import codeql.ruby.frameworks.data.internal.ApiGraphModels -import ShowProvenance - -from CommandInjectionFlow::PathNode source, CommandInjectionFlow::PathNode sink, Source sourceNode -where - CommandInjectionFlow::flowPath(source, sink) and - sourceNode = source.getNode() -select sink.getNode(), source, sink, "This command depends on a $@.", sourceNode, - sourceNode.getSourceType() diff --git a/ruby/ql/test/query-tests/security/cwe-078/CommandInjection/CommandInjection.qlref b/ruby/ql/test/query-tests/security/cwe-078/CommandInjection/CommandInjection.qlref new file mode 100644 index 00000000000..1d0a8c019fb --- /dev/null +++ b/ruby/ql/test/query-tests/security/cwe-078/CommandInjection/CommandInjection.qlref @@ -0,0 +1,4 @@ +query: queries/security/cwe-078/CommandInjection.ql +postprocess: + - utils/test/PrettyPrintModels.ql + - utils/test/InlineExpectationsTestQuery.ql diff --git a/ruby/ql/test/query-tests/security/cwe-078/CommandInjection/CommandInjection.rb b/ruby/ql/test/query-tests/security/cwe-078/CommandInjection/CommandInjection.rb index 12c15a30b15..9fd7c6286a1 100644 --- a/ruby/ql/test/query-tests/security/cwe-078/CommandInjection/CommandInjection.rb +++ b/ruby/ql/test/query-tests/security/cwe-078/CommandInjection/CommandInjection.rb @@ -3,14 +3,15 @@ require "open3" class UsersController < ActionController::Base def create - cmd = params[:cmd] - `#{cmd}` - system(cmd) + cmd = params[:cmd] # $ Source + `#{cmd}` # $ Alert + system(cmd) # $ Alert system("echo", cmd) # OK, because cmd is not shell interpreted - exec(cmd) - %x(echo #{cmd}) + exec(cmd) # $ Alert + %x(echo #{cmd}) # $ Alert result = <<`EOF` - #{cmd} + #{cmd} #{# $ Alert + } EOF safe_cmd_1 = Shellwords.escape(cmd) @@ -26,12 +27,12 @@ EOF if %w(foo bar).include? cmd `echo #{cmd}` else - `echo #{cmd}` + `echo #{cmd}` # $ Alert end # Open3 methods - Open3.capture2("echo #{cmd}") - Open3.pipeline("cat foo.txt", "grep #{cmd}") + Open3.capture2("echo #{cmd}") # $ Alert + Open3.pipeline("cat foo.txt", "grep #{cmd}") # $ Alert Open3.pipeline(["echo", cmd], "tail") # OK, because cmd is not shell interpreted end @@ -43,20 +44,20 @@ EOF end def index - cmd = params[:key] + cmd = params[:key] # $ Source if %w(foo bar).include? cmd `echo #{cmd}` end - Open3.capture2("echo #{cmd}") + Open3.capture2("echo #{cmd}") # $ Alert end def update - cmd = params[:key] + cmd = params[:key] # $ Source case cmd when "foo" system(cmd) end - system(cmd) + system(cmd) # $ Alert end end @@ -70,16 +71,16 @@ module Types field :with_arg, String, null: false, description: "A field with an argument" do argument :number, Int, "A number", required: true end - def with_arg(number:) - system("echo #{number}") + def with_arg(number:) # $ Source + system("echo #{number}") # $ Alert number.to_s end field :with_method, String, null: false, description: "A field with a custom resolver method", resolver_method: :custom_method do argument :blah_number, Int, "A number", required: true end - def custom_method(blah_number:, number: nil) - system("echo #{blah_number}") + def custom_method(blah_number:, number: nil) # $ Source + system("echo #{blah_number}") # $ Alert system("echo #{number}") # OK, number: is not an `argument` for this field blah_number.to_s end @@ -88,7 +89,7 @@ module Types argument :something, Int, "A number", required: true end def with_splat(**args) - system("echo #{args[:something]}") + system("echo #{args[:something]}") # $ Alert args[:something].to_s end @@ -100,17 +101,17 @@ end class Foo < ActionController::Base def create - file = params[:file] - system("cat #{file}") + file = params[:file] # $ Source + system("cat #{file}") # $ Alert # .shellescape system("cat #{file.shellescape}") # OK, because file is shell escaped - + end def index - Terrapin::CommandLine.new(params[:foo], "bar") # BAD + Terrapin::CommandLine.new(params[:foo], "bar") # $ Alert - Terrapin::CommandLine.new("echo", "#{params[foo]}") # BAD + Terrapin::CommandLine.new("echo", "#{params[foo]}") # $ Alert cmd = Terrapin::CommandLine.new("echo", ":msg") cmd.run(msg: params[:foo]) # GOOD diff --git a/ruby/ql/test/query-tests/security/cwe-829/InsecureDownload.expected b/ruby/ql/test/query-tests/security/cwe-829/InsecureDownload.expected index 67e59fb08c1..b8951412c1f 100644 --- a/ruby/ql/test/query-tests/security/cwe-829/InsecureDownload.expected +++ b/ruby/ql/test/query-tests/security/cwe-829/InsecureDownload.expected @@ -1,4 +1,14 @@ -testFailures +#select +| insecure_download.rb:27:15:27:45 | "http://example.org/unsafe.APK" | insecure_download.rb:27:15:27:45 | "http://example.org/unsafe.APK" | insecure_download.rb:27:15:27:45 | "http://example.org/unsafe.APK" | $@ of sensitive file from $@. | insecure_download.rb:27:5:27:46 | call to get | Download | insecure_download.rb:27:15:27:45 | "http://example.org/unsafe.APK" | HTTP source | +| insecure_download.rb:27:15:27:45 | "http://example.org/unsafe.APK" | insecure_download.rb:27:15:27:45 | "http://example.org/unsafe.APK" | insecure_download.rb:27:15:27:45 | "http://example.org/unsafe.APK" | $@ of sensitive file from $@. | insecure_download.rb:27:5:27:46 | call to get | Download | insecure_download.rb:27:15:27:45 | "http://example.org/unsafe.APK" | HTTP source | +| insecure_download.rb:33:15:33:17 | url | insecure_download.rb:31:11:31:41 | "http://example.org/unsafe.APK" : String | insecure_download.rb:33:15:33:17 | url | $@ of sensitive file from $@. | insecure_download.rb:33:5:33:18 | call to get | Download | insecure_download.rb:31:11:31:41 | "http://example.org/unsafe.APK" | HTTP source | +| insecure_download.rb:33:15:33:17 | url | insecure_download.rb:31:11:31:41 | "http://example.org/unsafe.APK" : String | insecure_download.rb:33:15:33:17 | url | $@ of sensitive file from $@. | insecure_download.rb:33:5:33:18 | call to get | Download | insecure_download.rb:31:11:31:41 | "http://example.org/unsafe.APK" | HTTP source | +| insecure_download.rb:33:15:33:17 | url | insecure_download.rb:33:15:33:17 | url | insecure_download.rb:33:15:33:17 | url | $@ of sensitive file from $@. | insecure_download.rb:33:5:33:18 | call to get | Download | insecure_download.rb:33:15:33:17 | url | HTTP source | +| insecure_download.rb:33:15:33:17 | url | insecure_download.rb:33:15:33:17 | url | insecure_download.rb:33:15:33:17 | url | $@ of sensitive file from $@. | insecure_download.rb:33:5:33:18 | call to get | Download | insecure_download.rb:33:15:33:17 | url | HTTP source | +| insecure_download.rb:37:42:37:68 | "http://example.org/unsafe" | insecure_download.rb:37:42:37:68 | "http://example.org/unsafe" | insecure_download.rb:37:42:37:68 | "http://example.org/unsafe" | $@ of sensitive file from $@. | insecure_download.rb:37:32:37:69 | call to get | Download | insecure_download.rb:37:42:37:68 | "http://example.org/unsafe" | HTTP source | +| insecure_download.rb:41:37:41:63 | "http://example.org/unsafe" | insecure_download.rb:41:37:41:63 | "http://example.org/unsafe" | insecure_download.rb:41:37:41:63 | "http://example.org/unsafe" | $@ of sensitive file from $@. | insecure_download.rb:41:27:41:64 | call to get | Download | insecure_download.rb:41:37:41:63 | "http://example.org/unsafe" | HTTP source | +| insecure_download.rb:43:22:43:56 | "http://example.org/unsafe.unk..." | insecure_download.rb:43:22:43:56 | "http://example.org/unsafe.unk..." | insecure_download.rb:43:22:43:56 | "http://example.org/unsafe.unk..." | $@ of sensitive file from $@. | insecure_download.rb:43:12:43:57 | call to get | Download | insecure_download.rb:43:22:43:56 | "http://example.org/unsafe.unk..." | HTTP source | +| insecure_download.rb:53:65:53:78 | "/myscript.sh" | insecure_download.rb:53:65:53:78 | "/myscript.sh" | insecure_download.rb:53:65:53:78 | "/myscript.sh" | $@ of sensitive file from $@. | insecure_download.rb:53:14:53:79 | call to get | Download | insecure_download.rb:53:65:53:78 | "/myscript.sh" | HTTP source | edges | insecure_download.rb:31:5:31:7 | url : String | insecure_download.rb:33:15:33:17 | url | provenance | | | insecure_download.rb:31:5:31:7 | url : String | insecure_download.rb:33:15:33:17 | url | provenance | | @@ -18,14 +28,3 @@ nodes | insecure_download.rb:43:22:43:56 | "http://example.org/unsafe.unk..." | semmle.label | "http://example.org/unsafe.unk..." | | insecure_download.rb:53:65:53:78 | "/myscript.sh" | semmle.label | "/myscript.sh" | subpaths -#select -| insecure_download.rb:27:15:27:45 | "http://example.org/unsafe.APK" | insecure_download.rb:27:15:27:45 | "http://example.org/unsafe.APK" | insecure_download.rb:27:15:27:45 | "http://example.org/unsafe.APK" | $@ | insecure_download.rb:27:15:27:45 | "http://example.org/unsafe.APK" | "http://example.org/unsafe.APK" | -| insecure_download.rb:27:15:27:45 | "http://example.org/unsafe.APK" | insecure_download.rb:27:15:27:45 | "http://example.org/unsafe.APK" | insecure_download.rb:27:15:27:45 | "http://example.org/unsafe.APK" | $@ | insecure_download.rb:27:15:27:45 | "http://example.org/unsafe.APK" | "http://example.org/unsafe.APK" | -| insecure_download.rb:33:15:33:17 | url | insecure_download.rb:31:11:31:41 | "http://example.org/unsafe.APK" : String | insecure_download.rb:33:15:33:17 | url | $@ | insecure_download.rb:31:11:31:41 | "http://example.org/unsafe.APK" : String | "http://example.org/unsafe.APK" : String | -| insecure_download.rb:33:15:33:17 | url | insecure_download.rb:31:11:31:41 | "http://example.org/unsafe.APK" : String | insecure_download.rb:33:15:33:17 | url | $@ | insecure_download.rb:31:11:31:41 | "http://example.org/unsafe.APK" : String | "http://example.org/unsafe.APK" : String | -| insecure_download.rb:33:15:33:17 | url | insecure_download.rb:33:15:33:17 | url | insecure_download.rb:33:15:33:17 | url | $@ | insecure_download.rb:33:15:33:17 | url | url | -| insecure_download.rb:33:15:33:17 | url | insecure_download.rb:33:15:33:17 | url | insecure_download.rb:33:15:33:17 | url | $@ | insecure_download.rb:33:15:33:17 | url | url | -| insecure_download.rb:37:42:37:68 | "http://example.org/unsafe" | insecure_download.rb:37:42:37:68 | "http://example.org/unsafe" | insecure_download.rb:37:42:37:68 | "http://example.org/unsafe" | $@ | insecure_download.rb:37:42:37:68 | "http://example.org/unsafe" | "http://example.org/unsafe" | -| insecure_download.rb:41:37:41:63 | "http://example.org/unsafe" | insecure_download.rb:41:37:41:63 | "http://example.org/unsafe" | insecure_download.rb:41:37:41:63 | "http://example.org/unsafe" | $@ | insecure_download.rb:41:37:41:63 | "http://example.org/unsafe" | "http://example.org/unsafe" | -| insecure_download.rb:43:22:43:56 | "http://example.org/unsafe.unk..." | insecure_download.rb:43:22:43:56 | "http://example.org/unsafe.unk..." | insecure_download.rb:43:22:43:56 | "http://example.org/unsafe.unk..." | $@ | insecure_download.rb:43:22:43:56 | "http://example.org/unsafe.unk..." | "http://example.org/unsafe.unk..." | -| insecure_download.rb:53:65:53:78 | "/myscript.sh" | insecure_download.rb:53:65:53:78 | "/myscript.sh" | insecure_download.rb:53:65:53:78 | "/myscript.sh" | $@ | insecure_download.rb:53:65:53:78 | "/myscript.sh" | "/myscript.sh" | diff --git a/ruby/ql/test/query-tests/security/cwe-829/InsecureDownload.ql b/ruby/ql/test/query-tests/security/cwe-829/InsecureDownload.ql deleted file mode 100644 index a8480b23a2d..00000000000 --- a/ruby/ql/test/query-tests/security/cwe-829/InsecureDownload.ql +++ /dev/null @@ -1,23 +0,0 @@ -import codeql.ruby.security.InsecureDownloadQuery -import InsecureDownloadFlow::PathGraph -import utils.test.InlineExpectationsTest -import utils.test.InlineFlowTestUtil - -module FlowTest implements TestSig { - string getARelevantTag() { result = "BAD" } - - predicate hasActualResult(Location location, string element, string tag, string value) { - tag = "BAD" and - exists(DataFlow::Node src, DataFlow::Node sink | InsecureDownloadFlow::flow(src, sink) | - sink.getLocation() = location and - element = sink.toString() and - if exists(getSourceArgString(src)) then value = getSourceArgString(src) else value = "" - ) - } -} - -import MakeTest - -from InsecureDownloadFlow::PathNode source, InsecureDownloadFlow::PathNode sink -where InsecureDownloadFlow::flowPath(source, sink) -select sink, source, sink, "$@", source, source.toString() diff --git a/ruby/ql/test/query-tests/security/cwe-829/InsecureDownload.qlref b/ruby/ql/test/query-tests/security/cwe-829/InsecureDownload.qlref new file mode 100644 index 00000000000..e2048e1cee4 --- /dev/null +++ b/ruby/ql/test/query-tests/security/cwe-829/InsecureDownload.qlref @@ -0,0 +1,4 @@ +query: queries/security/cwe-829/InsecureDownload.ql +postprocess: + - utils/test/PrettyPrintModels.ql + - utils/test/InlineExpectationsTestQuery.ql diff --git a/ruby/ql/test/query-tests/security/cwe-829/insecure_download.rb b/ruby/ql/test/query-tests/security/cwe-829/insecure_download.rb index 062de2e4e8f..80b6c286aad 100644 --- a/ruby/ql/test/query-tests/security/cwe-829/insecure_download.rb +++ b/ruby/ql/test/query-tests/security/cwe-829/insecure_download.rb @@ -2,7 +2,7 @@ require "excon" def foo def download_tools(installer) - Excon.get(installer[:url]) # $ MISSING: BAD= (requires hash flow) + Excon.get(installer[:url]) # $ MISSING: Alert (requires hash flow) end constants = { @@ -24,23 +24,23 @@ def bar Excon.get("https://download.microsoft.com/download/5/f/7/5f7acaeb-8363-451f-9425-68a90f98b238/visualcppbuildtools_full.exe") # GOOD - Excon.get("http://example.org/unsafe.APK") # $BAD= + Excon.get("http://example.org/unsafe.APK") # $ Alert end def baz - url = "http://example.org/unsafe.APK" + url = "http://example.org/unsafe.APK" # $ Source - Excon.get(url) # $BAD= + Excon.get(url) # $ Alert end def test - File.open("foo.exe").write(Excon.get("http://example.org/unsafe").body) # $BAD= + File.open("foo.exe").write(Excon.get("http://example.org/unsafe").body) # $ Alert File.open("foo.safe").write(Excon.get("http://example.org/unsafe").body) # GOOD - File.write("foo.exe", Excon.get("http://example.org/unsafe").body) # $BAD= + File.write("foo.exe", Excon.get("http://example.org/unsafe").body) # $ Alert - resp = Excon.get("http://example.org/unsafe.unknown") # $BAD= + resp = Excon.get("http://example.org/unsafe.unknown") # $ Alert file = File.open("unsafe.exe", "w") file.write(resp.body) @@ -50,6 +50,6 @@ def test end def sh - script = Net::HTTP.new("http://mydownload.example.org").get("/myscript.sh").body # $BAD= + script = Net::HTTP.new("http://mydownload.example.org").get("/myscript.sh").body # $ Alert system(script) -end \ No newline at end of file +end diff --git a/rust/ast-generator/src/main.rs b/rust/ast-generator/src/main.rs index 5871326cbad..e6f39c4147d 100644 --- a/rust/ast-generator/src/main.rs +++ b/rust/ast-generator/src/main.rs @@ -52,6 +52,32 @@ fn property_name(type_name: &str, field_name: &str) -> String { name.to_owned() } +fn has_special_emission(type_name: &str) -> bool { + matches!( + type_name, + "Item" + | "AssocItem" + | "ExternItem" + | "Meta" + | "MacroCall" + | "Fn" + | "Struct" + | "Enum" + | "Union" + | "Trait" + | "Module" + | "Variant" + | "PathExpr" + | "RecordExpr" + | "PathPat" + | "RecordPat" + | "TupleStructPat" + | "MethodCallExpr" + | "PathSegment" + | "Const" + ) +} + fn to_lower_snake_case(s: &str) -> String { let mut buf = String::with_capacity(s.len()); let mut prev = false; @@ -355,6 +381,7 @@ struct ExtractorEnumInfo { snake_case_name: String, ast_name: String, variants: Vec, + has_special_emission: bool, } #[derive(Serialize, Default)] @@ -376,6 +403,7 @@ struct ExtractorNodeInfo { ast_name: String, fields: Vec, has_attrs: bool, + has_special_emission: bool, } #[derive(Serialize)] @@ -406,6 +434,7 @@ fn enum_to_extractor_info(node: &AstEnumSrc) -> Option { } }) .collect(), + has_special_emission: has_special_emission(&node.name), }) } @@ -460,6 +489,7 @@ fn node_to_extractor_info(node: &AstNodeSrc) -> ExtractorNodeInfo { ast_name: node.name.clone(), fields, has_attrs, + has_special_emission: has_special_emission(&node.name), } } diff --git a/rust/ast-generator/templates/extractor.mustache b/rust/ast-generator/templates/extractor.mustache index ab1fd4b0d37..03269c26ae3 100644 --- a/rust/ast-generator/templates/extractor.mustache +++ b/rust/ast-generator/templates/extractor.mustache @@ -1,8 +1,7 @@ //! Generated by `ast-generator`, do not edit by hand. use super::base::Translator; -use super::mappings::TextValue; -use crate::{pre_emit,post_emit}; +use super::mappings::{TextValue, HasTrapClass, Emission}; use crate::generated; use crate::trap::{Label, TrapId}; use ra_ap_syntax::ast::{ @@ -13,29 +12,23 @@ use ra_ap_syntax::ast::{ use ra_ap_syntax::{AstNode, ast}; impl Translator<'_> { - fn emit_else_branch(&mut self, node: &ast::ElseBranch) -> Option> { - match node { - ast::ElseBranch::IfExpr(inner) => self.emit_if_expr(inner).map(Into::into), - ast::ElseBranch::Block(inner) => self.emit_block_expr(inner).map(Into::into), - } - } {{#enums}} pub(crate) fn emit_{{snake_case_name}}(&mut self, node: &ast::{{ast_name}}) -> Option> { - pre_emit!({{name}}, self, node); + {{>pre_emission}} let label = match node { {{#variants}} ast::{{ast_name}}::{{variant_ast_name}}(inner) => self.emit_{{snake_case_name}}(inner).map(Into::into), {{/variants}} }?; - post_emit!({{name}}, self, node, label); + {{>post_emission}} Some(label) } {{/enums}} {{#nodes}} pub(crate) fn emit_{{snake_case_name}}(&mut self, node: &ast::{{ast_name}}) -> Option> { - pre_emit!({{name}}, self, node); + {{>pre_emission}} {{#has_attrs}} if self.should_be_excluded(node) { return None; } {{/has_attrs}} @@ -65,9 +58,15 @@ impl Translator<'_> { {{/fields}} }); self.emit_location(label, node); - post_emit!({{name}}, self, node, label); + {{>post_emission}} self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } {{/nodes}} } +{{#enums}} +{{>trap_class_mapping}} +{{/enums}} +{{#nodes}} +{{>trap_class_mapping}} +{{/nodes}} diff --git a/rust/ast-generator/templates/post_emission.mustache b/rust/ast-generator/templates/post_emission.mustache new file mode 100644 index 00000000000..fb57a7802a1 --- /dev/null +++ b/rust/ast-generator/templates/post_emission.mustache @@ -0,0 +1,3 @@ +{{#has_special_emission}} +self.post_emit(node, label); +{{/has_special_emission}} diff --git a/rust/ast-generator/templates/pre_emission.mustache b/rust/ast-generator/templates/pre_emission.mustache new file mode 100644 index 00000000000..150529c4129 --- /dev/null +++ b/rust/ast-generator/templates/pre_emission.mustache @@ -0,0 +1,5 @@ +{{#has_special_emission}} +if let Some(label) = self.pre_emit(node) { + return Some(label); +} +{{/has_special_emission}} diff --git a/rust/ast-generator/templates/trap_class_mapping.mustache b/rust/ast-generator/templates/trap_class_mapping.mustache new file mode 100644 index 00000000000..6d833c64067 --- /dev/null +++ b/rust/ast-generator/templates/trap_class_mapping.mustache @@ -0,0 +1,6 @@ +{{#has_special_emission}} + +impl HasTrapClass for ast::{{ast_name}} { + type TrapClass = generated::{{name}}; +} +{{/has_special_emission}} diff --git a/rust/extractor/BUILD.bazel b/rust/extractor/BUILD.bazel index fe5d8e50859..52b551f6335 100644 --- a/rust/extractor/BUILD.bazel +++ b/rust/extractor/BUILD.bazel @@ -7,7 +7,10 @@ codeql_rust_binary( name = "extractor", srcs = glob(["src/**/*.rs"]), aliases = aliases(), - compile_data = ["src/qltest_cargo.mustache"], + compile_data = [ + "src/qltest_cargo.mustache", + "src/nightly-toolchain/rust-toolchain.toml", + ], proc_macro_deps = all_crate_deps( proc_macro = True, ) + [ diff --git a/rust/extractor/src/archive.rs b/rust/extractor/src/archive.rs index ad27c483942..2cc3be22701 100644 --- a/rust/extractor/src/archive.rs +++ b/rust/extractor/src/archive.rs @@ -15,7 +15,7 @@ impl Archiver { } fn try_archive(&self, source: &Path) -> std::io::Result<()> { - let dest = file_paths::path_for(&self.root, source, ""); + let dest = file_paths::path_for(&self.root, source, "", None); if fs::metadata(&dest).is_ok() { return Ok(()); } diff --git a/rust/extractor/src/nightly-toolchain/rust-toolchain.toml b/rust/extractor/src/nightly-toolchain/rust-toolchain.toml new file mode 100644 index 00000000000..7ed21df9121 --- /dev/null +++ b/rust/extractor/src/nightly-toolchain/rust-toolchain.toml @@ -0,0 +1,3 @@ +[toolchain] +channel = "nightly-2025-06-01" +components = [ "rust-src" ] diff --git a/rust/extractor/src/qltest.rs b/rust/extractor/src/qltest.rs index f989ecf2eaa..92ed9d62505 100644 --- a/rust/extractor/src/qltest.rs +++ b/rust/extractor/src/qltest.rs @@ -9,7 +9,6 @@ use std::process::Command; use tracing::info; const EDITION: &str = "2021"; -const NIGHTLY: &str = "nightly-2025-06-01"; fn dump_lib() -> anyhow::Result<()> { let path_iterator = glob("*.rs").context("globbing test sources")?; @@ -76,7 +75,7 @@ fn dump_cargo_manifest(dependencies: &[String]) -> anyhow::Result<()> { fn dump_nightly_toolchain() -> anyhow::Result<()> { fs::write( "rust-toolchain.toml", - format!("[toolchain]\nchannel = \"{NIGHTLY}\"\n"), + include_str!("nightly-toolchain/rust-toolchain.toml"), ) .context("writing rust-toolchain.toml")?; Ok(()) diff --git a/rust/extractor/src/translate/base.rs b/rust/extractor/src/translate/base.rs index a71d9787e94..6c7a8ce7db1 100644 --- a/rust/extractor/src/translate/base.rs +++ b/rust/extractor/src/translate/base.rs @@ -1,4 +1,4 @@ -use super::mappings::{AddressableAst, AddressableHir, PathAst}; +use super::mappings::{AddressableAst, AddressableHir, Emission, PathAst}; use crate::generated::{self}; use crate::rust_analyzer::FileSemanticInformation; use crate::trap::{DiagnosticSeverity, TrapFile, TrapId}; @@ -22,121 +22,165 @@ use ra_ap_syntax::{ ast, }; -#[macro_export] -macro_rules! pre_emit { - (Item, $self:ident, $node:ident) => { - if let Some(label) = $self.prepare_item_expansion($node) { - return Some(label.into()); - } - }; - (AssocItem, $self:ident, $node:ident) => { - if let Some(label) = $self.prepare_item_expansion(&$node.clone().into()) { - return Some(label.into()); - } - }; - (ExternItem, $self:ident, $node:ident) => { - if let Some(label) = $self.prepare_item_expansion(&$node.clone().into()) { - return Some(label.into()); - } - }; - (Meta, $self:ident, $node:ident) => { - // rust-analyzer doesn't expand macros in this context - $self.macro_context_depth += 1; - }; - ($($_:tt)*) => {}; +impl Emission for Translator<'_> { + fn pre_emit(&mut self, node: &ast::Item) -> Option> { + self.prepare_item_expansion(node).map(Into::into) + } + + fn post_emit(&mut self, node: &ast::Item, label: Label) { + self.emit_item_expansion(node, label); + } } -// TODO: remove the mannually written Label conversions. These can be auto-generated by -// changing the base class of AssocItem from AstNode to Item -impl From> for crate::trap::Label { - fn from(value: crate::trap::Label) -> Self { +impl Emission for Translator<'_> { + fn pre_emit(&mut self, node: &ast::AssocItem) -> Option> { + self.prepare_item_expansion(&node.clone().into()) + .map(Into::into) + } + + fn post_emit(&mut self, node: &ast::AssocItem, label: Label) { + self.emit_item_expansion(&node.clone().into(), label.into()); + } +} + +impl Emission for Translator<'_> { + fn pre_emit(&mut self, node: &ast::ExternItem) -> Option> { + self.prepare_item_expansion(&node.clone().into()) + .map(Into::into) + } + + fn post_emit(&mut self, node: &ast::ExternItem, label: Label) { + self.emit_item_expansion(&node.clone().into(), label.into()); + } +} + +impl Emission for Translator<'_> { + fn pre_emit(&mut self, _node: &ast::Meta) -> Option> { + self.macro_context_depth += 1; + None + } + + fn post_emit(&mut self, _node: &ast::Meta, _label: Label) { + self.macro_context_depth -= 1; + } +} + +impl Emission for Translator<'_> { + fn post_emit(&mut self, node: &ast::Fn, label: Label) { + self.emit_function_has_implementation(node, label); + self.extract_canonical_origin(node, label.into()); + } +} + +impl Emission for Translator<'_> { + fn post_emit(&mut self, node: &ast::Struct, label: Label) { + self.emit_derive_expansion(node, label); + self.extract_canonical_origin(node, label.into()); + } +} + +impl Emission for Translator<'_> { + fn post_emit(&mut self, node: &ast::Enum, label: Label) { + self.emit_derive_expansion(node, label); + self.extract_canonical_origin(node, label.into()); + } +} + +impl Emission for Translator<'_> { + fn post_emit(&mut self, node: &ast::Union, label: Label) { + self.emit_derive_expansion(node, label); + self.extract_canonical_origin(node, label.into()); + } +} + +impl Emission for Translator<'_> { + fn post_emit(&mut self, node: &ast::Trait, label: Label) { + self.extract_canonical_origin(node, label.into()); + } +} + +impl Emission for Translator<'_> { + fn post_emit(&mut self, node: &ast::Module, label: Label) { + self.extract_canonical_origin(node, label.into()); + } +} + +impl Emission for Translator<'_> { + fn post_emit(&mut self, node: &ast::Variant, label: Label) { + self.extract_canonical_origin_of_enum_variant(node, label); + } +} + +impl Emission for Translator<'_> { + fn post_emit(&mut self, node: &ast::PathExpr, label: Label) { + self.extract_path_canonical_destination(node, label.into()); + } +} + +impl Emission for Translator<'_> { + fn post_emit(&mut self, node: &ast::RecordExpr, label: Label) { + self.extract_path_canonical_destination(node, label.into()); + } +} + +impl Emission for Translator<'_> { + fn post_emit(&mut self, node: &ast::PathPat, label: Label) { + self.extract_path_canonical_destination(node, label.into()); + } +} + +impl Emission for Translator<'_> { + fn post_emit(&mut self, node: &ast::RecordPat, label: Label) { + self.extract_path_canonical_destination(node, label.into()); + } +} + +impl Emission for Translator<'_> { + fn post_emit(&mut self, node: &ast::TupleStructPat, label: Label) { + self.extract_path_canonical_destination(node, label.into()); + } +} + +impl Emission for Translator<'_> { + fn post_emit(&mut self, node: &ast::MethodCallExpr, label: Label) { + self.extract_method_canonical_destination(node, label); + } +} + +impl Emission for Translator<'_> { + fn post_emit(&mut self, node: &ast::PathSegment, label: Label) { + self.extract_types_from_path_segment(node, label); + } +} + +impl Emission for Translator<'_> { + fn post_emit(&mut self, node: &ast::Const, label: Label) { + self.emit_const_has_implementation(node, label); + } +} + +impl Emission for Translator<'_> { + fn post_emit(&mut self, node: &ast::MacroCall, label: Label) { + self.extract_macro_call_expanded(node, label); + } +} +// TODO: remove the manually written Label conversions. These can be auto-generated by +// ch +// anging the base class of AssocItem from AstNode to Item +impl From> for Label { + fn from(value: Label) -> Self { // SAFETY: this is safe because every concrete instance of `@assoc_item` is also an instance of `@item` unsafe { Self::from_untyped(value.as_untyped()) } } } -// TODO: remove the mannually written Label conversions. These can be auto-generated by +// TODO: remove the manually written Label conversions. These can be auto-generated by // changing the base class of ExternItem from AstNode to Item -impl From> for crate::trap::Label { - fn from(value: crate::trap::Label) -> Self { +impl From> for Label { + fn from(value: Label) -> Self { // SAFETY: this is safe because every concrete instance of `@extern_item` is also an instance of `@item` unsafe { Self::from_untyped(value.as_untyped()) } } } -#[macro_export] -macro_rules! post_emit { - (Meta, $self:ident, $node:ident, $label:ident) => { - $self.macro_context_depth -= 1; - }; - (MacroCall, $self:ident, $node:ident, $label:ident) => { - $self.extract_macro_call_expanded($node, $label); - }; - (Function, $self:ident, $node:ident, $label:ident) => { - $self.emit_function_has_implementation($node, $label); - $self.extract_canonical_origin($node, $label.into()); - }; - (Trait, $self:ident, $node:ident, $label:ident) => { - $self.extract_canonical_origin($node, $label.into()); - }; - (Struct, $self:ident, $node:ident, $label:ident) => { - $self.emit_derive_expansion($node, $label); - $self.extract_canonical_origin($node, $label.into()); - }; - (Enum, $self:ident, $node:ident, $label:ident) => { - $self.emit_derive_expansion($node, $label); - $self.extract_canonical_origin($node, $label.into()); - }; - (Union, $self:ident, $node:ident, $label:ident) => { - $self.emit_derive_expansion($node, $label); - $self.extract_canonical_origin($node, $label.into()); - }; - (Module, $self:ident, $node:ident, $label:ident) => { - $self.extract_canonical_origin($node, $label.into()); - }; - (Variant, $self:ident, $node:ident, $label:ident) => { - $self.extract_canonical_origin_of_enum_variant($node, $label); - }; - (Item, $self:ident, $node:ident, $label:ident) => { - $self.emit_item_expansion($node, $label); - }; - (AssocItem, $self:ident, $node:ident, $label:ident) => { - $self.emit_item_expansion( - &$node.clone().into(), - From::>::from($label), - ); - }; - (ExternItem, $self:ident, $node:ident, $label:ident) => { - $self.emit_item_expansion( - &$node.clone().into(), - From::>::from($label), - ); - }; - // TODO canonical origin of other items - (PathExpr, $self:ident, $node:ident, $label:ident) => { - $self.extract_path_canonical_destination($node, $label.into()); - }; - (StructExpr, $self:ident, $node:ident, $label:ident) => { - $self.extract_path_canonical_destination($node, $label.into()); - }; - (PathPat, $self:ident, $node:ident, $label:ident) => { - $self.extract_path_canonical_destination($node, $label.into()); - }; - (StructPat, $self:ident, $node:ident, $label:ident) => { - $self.extract_path_canonical_destination($node, $label.into()); - }; - (TupleStructPat, $self:ident, $node:ident, $label:ident) => { - $self.extract_path_canonical_destination($node, $label.into()); - }; - (MethodCallExpr, $self:ident, $node:ident, $label:ident) => { - $self.extract_method_canonical_destination($node, $label); - }; - (PathSegment, $self:ident, $node:ident, $label:ident) => { - $self.extract_types_from_path_segment($node, $label.into()); - }; - (Const, $self:ident, $node:ident, $label:ident) => { - $self.emit_const_has_implementation($node, $label); - }; - ($($_:tt)*) => {}; -} // see https://github.com/tokio-rs/tracing/issues/2730 macro_rules! dispatch_to_tracing { @@ -497,6 +541,17 @@ impl<'a> Translator<'a> { ); } } + + pub(crate) fn emit_else_branch( + &mut self, + node: &ast::ElseBranch, + ) -> Option> { + match node { + ast::ElseBranch::IfExpr(inner) => self.emit_if_expr(inner).map(Into::into), + ast::ElseBranch::Block(inner) => self.emit_block_expr(inner).map(Into::into), + } + } + fn canonical_path_from_type(&self, ty: Type) -> Option { let sema = self.semantics.as_ref().unwrap(); // rust-analyzer doesn't provide a type enum directly diff --git a/rust/extractor/src/translate/generated.rs b/rust/extractor/src/translate/generated.rs index 39efe763a3b..787ce71bf2a 100644 --- a/rust/extractor/src/translate/generated.rs +++ b/rust/extractor/src/translate/generated.rs @@ -1,9 +1,8 @@ //! Generated by `ast-generator`, do not edit by hand. use super::base::Translator; -use super::mappings::TextValue; +use super::mappings::{Emission, HasTrapClass, TextValue}; use crate::generated; use crate::trap::{Label, TrapId}; -use crate::{post_emit, pre_emit}; use ra_ap_syntax::ast::{ HasArgList, HasAttrs, HasGenericArgs, HasGenericParams, HasLoopBody, HasModuleItem, HasName, HasTypeBounds, HasVisibility, RangeItem, @@ -11,17 +10,10 @@ use ra_ap_syntax::ast::{ #[rustfmt::skip] use ra_ap_syntax::{AstNode, ast}; impl Translator<'_> { - fn emit_else_branch(&mut self, node: &ast::ElseBranch) -> Option> { - match node { - ast::ElseBranch::IfExpr(inner) => self.emit_if_expr(inner).map(Into::into), - ast::ElseBranch::Block(inner) => self.emit_block_expr(inner).map(Into::into), - } - } pub(crate) fn emit_asm_operand( &mut self, node: &ast::AsmOperand, ) -> Option> { - pre_emit!(AsmOperand, self, node); let label = match node { ast::AsmOperand::AsmConst(inner) => self.emit_asm_const(inner).map(Into::into), ast::AsmOperand::AsmLabel(inner) => self.emit_asm_label(inner).map(Into::into), @@ -30,14 +22,12 @@ impl Translator<'_> { } ast::AsmOperand::AsmSym(inner) => self.emit_asm_sym(inner).map(Into::into), }?; - post_emit!(AsmOperand, self, node, label); Some(label) } pub(crate) fn emit_asm_piece( &mut self, node: &ast::AsmPiece, ) -> Option> { - pre_emit!(AsmPiece, self, node); let label = match node { ast::AsmPiece::AsmClobberAbi(inner) => self.emit_asm_clobber_abi(inner).map(Into::into), ast::AsmPiece::AsmOperandNamed(inner) => { @@ -45,25 +35,25 @@ impl Translator<'_> { } ast::AsmPiece::AsmOptions(inner) => self.emit_asm_options(inner).map(Into::into), }?; - post_emit!(AsmPiece, self, node, label); Some(label) } pub(crate) fn emit_assoc_item( &mut self, node: &ast::AssocItem, ) -> Option> { - pre_emit!(AssocItem, self, node); + if let Some(label) = self.pre_emit(node) { + return Some(label); + } let label = match node { ast::AssocItem::Const(inner) => self.emit_const(inner).map(Into::into), ast::AssocItem::Fn(inner) => self.emit_fn(inner).map(Into::into), ast::AssocItem::MacroCall(inner) => self.emit_macro_call(inner).map(Into::into), ast::AssocItem::TypeAlias(inner) => self.emit_type_alias(inner).map(Into::into), }?; - post_emit!(AssocItem, self, node, label); + self.post_emit(node, label); Some(label) } pub(crate) fn emit_expr(&mut self, node: &ast::Expr) -> Option> { - pre_emit!(Expr, self, node); let label = match node { ast::Expr::ArrayExpr(inner) => self.emit_array_expr(inner).map(Into::into), ast::Expr::AsmExpr(inner) => self.emit_asm_expr(inner).map(Into::into), @@ -102,28 +92,28 @@ impl Translator<'_> { ast::Expr::YeetExpr(inner) => self.emit_yeet_expr(inner).map(Into::into), ast::Expr::YieldExpr(inner) => self.emit_yield_expr(inner).map(Into::into), }?; - post_emit!(Expr, self, node, label); Some(label) } pub(crate) fn emit_extern_item( &mut self, node: &ast::ExternItem, ) -> Option> { - pre_emit!(ExternItem, self, node); + if let Some(label) = self.pre_emit(node) { + return Some(label); + } let label = match node { ast::ExternItem::Fn(inner) => self.emit_fn(inner).map(Into::into), ast::ExternItem::MacroCall(inner) => self.emit_macro_call(inner).map(Into::into), ast::ExternItem::Static(inner) => self.emit_static(inner).map(Into::into), ast::ExternItem::TypeAlias(inner) => self.emit_type_alias(inner).map(Into::into), }?; - post_emit!(ExternItem, self, node, label); + self.post_emit(node, label); Some(label) } pub(crate) fn emit_field_list( &mut self, node: &ast::FieldList, ) -> Option> { - pre_emit!(FieldList, self, node); let label = match node { ast::FieldList::RecordFieldList(inner) => { self.emit_record_field_list(inner).map(Into::into) @@ -132,28 +122,24 @@ impl Translator<'_> { self.emit_tuple_field_list(inner).map(Into::into) } }?; - post_emit!(FieldList, self, node, label); Some(label) } pub(crate) fn emit_generic_arg( &mut self, node: &ast::GenericArg, ) -> Option> { - pre_emit!(GenericArg, self, node); let label = match node { ast::GenericArg::AssocTypeArg(inner) => self.emit_assoc_type_arg(inner).map(Into::into), ast::GenericArg::ConstArg(inner) => self.emit_const_arg(inner).map(Into::into), ast::GenericArg::LifetimeArg(inner) => self.emit_lifetime_arg(inner).map(Into::into), ast::GenericArg::TypeArg(inner) => self.emit_type_arg(inner).map(Into::into), }?; - post_emit!(GenericArg, self, node, label); Some(label) } pub(crate) fn emit_generic_param( &mut self, node: &ast::GenericParam, ) -> Option> { - pre_emit!(GenericParam, self, node); let label = match node { ast::GenericParam::ConstParam(inner) => self.emit_const_param(inner).map(Into::into), ast::GenericParam::LifetimeParam(inner) => { @@ -161,11 +147,9 @@ impl Translator<'_> { } ast::GenericParam::TypeParam(inner) => self.emit_type_param(inner).map(Into::into), }?; - post_emit!(GenericParam, self, node, label); Some(label) } pub(crate) fn emit_pat(&mut self, node: &ast::Pat) -> Option> { - pre_emit!(Pat, self, node); let label = match node { ast::Pat::BoxPat(inner) => self.emit_box_pat(inner).map(Into::into), ast::Pat::ConstBlockPat(inner) => self.emit_const_block_pat(inner).map(Into::into), @@ -184,21 +168,17 @@ impl Translator<'_> { ast::Pat::TupleStructPat(inner) => self.emit_tuple_struct_pat(inner).map(Into::into), ast::Pat::WildcardPat(inner) => self.emit_wildcard_pat(inner).map(Into::into), }?; - post_emit!(Pat, self, node, label); Some(label) } pub(crate) fn emit_stmt(&mut self, node: &ast::Stmt) -> Option> { - pre_emit!(Stmt, self, node); let label = match node { ast::Stmt::ExprStmt(inner) => self.emit_expr_stmt(inner).map(Into::into), ast::Stmt::Item(inner) => self.emit_item(inner).map(Into::into), ast::Stmt::LetStmt(inner) => self.emit_let_stmt(inner).map(Into::into), }?; - post_emit!(Stmt, self, node, label); Some(label) } pub(crate) fn emit_type(&mut self, node: &ast::Type) -> Option> { - pre_emit!(TypeRepr, self, node); let label = match node { ast::Type::ArrayType(inner) => self.emit_array_type(inner).map(Into::into), ast::Type::DynTraitType(inner) => self.emit_dyn_trait_type(inner).map(Into::into), @@ -215,23 +195,22 @@ impl Translator<'_> { ast::Type::SliceType(inner) => self.emit_slice_type(inner).map(Into::into), ast::Type::TupleType(inner) => self.emit_tuple_type(inner).map(Into::into), }?; - post_emit!(TypeRepr, self, node, label); Some(label) } pub(crate) fn emit_use_bound_generic_arg( &mut self, node: &ast::UseBoundGenericArg, ) -> Option> { - pre_emit!(UseBoundGenericArg, self, node); let label = match node { ast::UseBoundGenericArg::Lifetime(inner) => self.emit_lifetime(inner).map(Into::into), ast::UseBoundGenericArg::NameRef(inner) => self.emit_name_ref(inner).map(Into::into), }?; - post_emit!(UseBoundGenericArg, self, node, label); Some(label) } pub(crate) fn emit_item(&mut self, node: &ast::Item) -> Option> { - pre_emit!(Item, self, node); + if let Some(label) = self.pre_emit(node) { + return Some(label); + } let label = match node { ast::Item::Const(inner) => self.emit_const(inner).map(Into::into), ast::Item::Enum(inner) => self.emit_enum(inner).map(Into::into), @@ -251,18 +230,16 @@ impl Translator<'_> { ast::Item::Union(inner) => self.emit_union(inner).map(Into::into), ast::Item::Use(inner) => self.emit_use(inner).map(Into::into), }?; - post_emit!(Item, self, node, label); + self.post_emit(node, label); Some(label) } pub(crate) fn emit_abi(&mut self, node: &ast::Abi) -> Option> { - pre_emit!(Abi, self, node); let abi_string = node.try_get_text(); let label = self.trap.emit(generated::Abi { id: TrapId::Star, abi_string, }); self.emit_location(label, node); - post_emit!(Abi, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -270,14 +247,12 @@ impl Translator<'_> { &mut self, node: &ast::ArgList, ) -> Option> { - pre_emit!(ArgList, self, node); let args = node.args().filter_map(|x| self.emit_expr(&x)).collect(); let label = self.trap.emit(generated::ArgList { id: TrapId::Star, args, }); self.emit_location(label, node); - post_emit!(ArgList, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -285,7 +260,6 @@ impl Translator<'_> { &mut self, node: &ast::ArrayExpr, ) -> Option> { - pre_emit!(ArrayExprInternal, self, node); if self.should_be_excluded(node) { return None; } @@ -299,7 +273,6 @@ impl Translator<'_> { is_semicolon, }); self.emit_location(label, node); - post_emit!(ArrayExprInternal, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -307,7 +280,6 @@ impl Translator<'_> { &mut self, node: &ast::ArrayType, ) -> Option> { - pre_emit!(ArrayTypeRepr, self, node); let const_arg = node.const_arg().and_then(|x| self.emit_const_arg(&x)); let element_type_repr = node.ty().and_then(|x| self.emit_type(&x)); let label = self.trap.emit(generated::ArrayTypeRepr { @@ -316,7 +288,6 @@ impl Translator<'_> { element_type_repr, }); self.emit_location(label, node); - post_emit!(ArrayTypeRepr, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -324,12 +295,10 @@ impl Translator<'_> { &mut self, node: &ast::AsmClobberAbi, ) -> Option> { - pre_emit!(AsmClobberAbi, self, node); let label = self .trap .emit(generated::AsmClobberAbi { id: TrapId::Star }); self.emit_location(label, node); - post_emit!(AsmClobberAbi, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -337,7 +306,6 @@ impl Translator<'_> { &mut self, node: &ast::AsmConst, ) -> Option> { - pre_emit!(AsmConst, self, node); let expr = node.expr().and_then(|x| self.emit_expr(&x)); let is_const = node.const_token().is_some(); let label = self.trap.emit(generated::AsmConst { @@ -346,7 +314,6 @@ impl Translator<'_> { is_const, }); self.emit_location(label, node); - post_emit!(AsmConst, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -354,10 +321,8 @@ impl Translator<'_> { &mut self, node: &ast::AsmDirSpec, ) -> Option> { - pre_emit!(AsmDirSpec, self, node); let label = self.trap.emit(generated::AsmDirSpec { id: TrapId::Star }); self.emit_location(label, node); - post_emit!(AsmDirSpec, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -365,7 +330,6 @@ impl Translator<'_> { &mut self, node: &ast::AsmExpr, ) -> Option> { - pre_emit!(AsmExpr, self, node); if self.should_be_excluded(node) { return None; } @@ -382,7 +346,6 @@ impl Translator<'_> { template, }); self.emit_location(label, node); - post_emit!(AsmExpr, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -390,14 +353,12 @@ impl Translator<'_> { &mut self, node: &ast::AsmLabel, ) -> Option> { - pre_emit!(AsmLabel, self, node); let block_expr = node.block_expr().and_then(|x| self.emit_block_expr(&x)); let label = self.trap.emit(generated::AsmLabel { id: TrapId::Star, block_expr, }); self.emit_location(label, node); - post_emit!(AsmLabel, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -405,7 +366,6 @@ impl Translator<'_> { &mut self, node: &ast::AsmOperandExpr, ) -> Option> { - pre_emit!(AsmOperandExpr, self, node); let in_expr = node.in_expr().and_then(|x| self.emit_expr(&x)); let out_expr = node.out_expr().and_then(|x| self.emit_expr(&x)); let label = self.trap.emit(generated::AsmOperandExpr { @@ -414,7 +374,6 @@ impl Translator<'_> { out_expr, }); self.emit_location(label, node); - post_emit!(AsmOperandExpr, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -422,7 +381,6 @@ impl Translator<'_> { &mut self, node: &ast::AsmOperandNamed, ) -> Option> { - pre_emit!(AsmOperandNamed, self, node); let asm_operand = node.asm_operand().and_then(|x| self.emit_asm_operand(&x)); let name = node.name().and_then(|x| self.emit_name(&x)); let label = self.trap.emit(generated::AsmOperandNamed { @@ -431,7 +389,6 @@ impl Translator<'_> { name, }); self.emit_location(label, node); - post_emit!(AsmOperandNamed, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -439,14 +396,12 @@ impl Translator<'_> { &mut self, node: &ast::AsmOption, ) -> Option> { - pre_emit!(AsmOption, self, node); let is_raw = node.raw_token().is_some(); let label = self.trap.emit(generated::AsmOption { id: TrapId::Star, is_raw, }); self.emit_location(label, node); - post_emit!(AsmOption, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -454,7 +409,6 @@ impl Translator<'_> { &mut self, node: &ast::AsmOptions, ) -> Option> { - pre_emit!(AsmOptionsList, self, node); let asm_options = node .asm_options() .filter_map(|x| self.emit_asm_option(&x)) @@ -464,7 +418,6 @@ impl Translator<'_> { asm_options, }); self.emit_location(label, node); - post_emit!(AsmOptionsList, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -472,7 +425,6 @@ impl Translator<'_> { &mut self, node: &ast::AsmRegOperand, ) -> Option> { - pre_emit!(AsmRegOperand, self, node); let asm_dir_spec = node.asm_dir_spec().and_then(|x| self.emit_asm_dir_spec(&x)); let asm_operand_expr = node .asm_operand_expr() @@ -485,7 +437,6 @@ impl Translator<'_> { asm_reg_spec, }); self.emit_location(label, node); - post_emit!(AsmRegOperand, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -493,26 +444,22 @@ impl Translator<'_> { &mut self, node: &ast::AsmRegSpec, ) -> Option> { - pre_emit!(AsmRegSpec, self, node); let identifier = node.name_ref().and_then(|x| self.emit_name_ref(&x)); let label = self.trap.emit(generated::AsmRegSpec { id: TrapId::Star, identifier, }); self.emit_location(label, node); - post_emit!(AsmRegSpec, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } pub(crate) fn emit_asm_sym(&mut self, node: &ast::AsmSym) -> Option> { - pre_emit!(AsmSym, self, node); let path = node.path().and_then(|x| self.emit_path(&x)); let label = self.trap.emit(generated::AsmSym { id: TrapId::Star, path, }); self.emit_location(label, node); - post_emit!(AsmSym, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -520,7 +467,6 @@ impl Translator<'_> { &mut self, node: &ast::AssocItemList, ) -> Option> { - pre_emit!(AssocItemList, self, node); if self.should_be_excluded(node) { return None; } @@ -535,7 +481,6 @@ impl Translator<'_> { attrs, }); self.emit_location(label, node); - post_emit!(AssocItemList, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -543,7 +488,6 @@ impl Translator<'_> { &mut self, node: &ast::AssocTypeArg, ) -> Option> { - pre_emit!(AssocTypeArg, self, node); let const_arg = node.const_arg().and_then(|x| self.emit_const_arg(&x)); let generic_arg_list = node .generic_arg_list() @@ -570,19 +514,16 @@ impl Translator<'_> { type_bound_list, }); self.emit_location(label, node); - post_emit!(AssocTypeArg, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } pub(crate) fn emit_attr(&mut self, node: &ast::Attr) -> Option> { - pre_emit!(Attr, self, node); let meta = node.meta().and_then(|x| self.emit_meta(&x)); let label = self.trap.emit(generated::Attr { id: TrapId::Star, meta, }); self.emit_location(label, node); - post_emit!(Attr, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -590,7 +531,6 @@ impl Translator<'_> { &mut self, node: &ast::AwaitExpr, ) -> Option> { - pre_emit!(AwaitExpr, self, node); if self.should_be_excluded(node) { return None; } @@ -602,7 +542,6 @@ impl Translator<'_> { expr, }); self.emit_location(label, node); - post_emit!(AwaitExpr, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -610,7 +549,6 @@ impl Translator<'_> { &mut self, node: &ast::BecomeExpr, ) -> Option> { - pre_emit!(BecomeExpr, self, node); if self.should_be_excluded(node) { return None; } @@ -622,7 +560,6 @@ impl Translator<'_> { expr, }); self.emit_location(label, node); - post_emit!(BecomeExpr, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -630,7 +567,6 @@ impl Translator<'_> { &mut self, node: &ast::BinExpr, ) -> Option> { - pre_emit!(BinaryExpr, self, node); if self.should_be_excluded(node) { return None; } @@ -646,7 +582,6 @@ impl Translator<'_> { rhs, }); self.emit_location(label, node); - post_emit!(BinaryExpr, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -654,7 +589,6 @@ impl Translator<'_> { &mut self, node: &ast::BlockExpr, ) -> Option> { - pre_emit!(BlockExpr, self, node); if self.should_be_excluded(node) { return None; } @@ -680,19 +614,16 @@ impl Translator<'_> { stmt_list, }); self.emit_location(label, node); - post_emit!(BlockExpr, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } pub(crate) fn emit_box_pat(&mut self, node: &ast::BoxPat) -> Option> { - pre_emit!(BoxPat, self, node); let pat = node.pat().and_then(|x| self.emit_pat(&x)); let label = self.trap.emit(generated::BoxPat { id: TrapId::Star, pat, }); self.emit_location(label, node); - post_emit!(BoxPat, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -700,7 +631,6 @@ impl Translator<'_> { &mut self, node: &ast::BreakExpr, ) -> Option> { - pre_emit!(BreakExpr, self, node); if self.should_be_excluded(node) { return None; } @@ -714,7 +644,6 @@ impl Translator<'_> { lifetime, }); self.emit_location(label, node); - post_emit!(BreakExpr, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -722,7 +651,6 @@ impl Translator<'_> { &mut self, node: &ast::CallExpr, ) -> Option> { - pre_emit!(CallExpr, self, node); if self.should_be_excluded(node) { return None; } @@ -736,7 +664,6 @@ impl Translator<'_> { function, }); self.emit_location(label, node); - post_emit!(CallExpr, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -744,7 +671,6 @@ impl Translator<'_> { &mut self, node: &ast::CastExpr, ) -> Option> { - pre_emit!(CastExpr, self, node); if self.should_be_excluded(node) { return None; } @@ -758,7 +684,6 @@ impl Translator<'_> { type_repr, }); self.emit_location(label, node); - post_emit!(CastExpr, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -766,7 +691,6 @@ impl Translator<'_> { &mut self, node: &ast::ClosureBinder, ) -> Option> { - pre_emit!(ClosureBinder, self, node); let generic_param_list = node .generic_param_list() .and_then(|x| self.emit_generic_param_list(&x)); @@ -775,7 +699,6 @@ impl Translator<'_> { generic_param_list, }); self.emit_location(label, node); - post_emit!(ClosureBinder, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -783,7 +706,6 @@ impl Translator<'_> { &mut self, node: &ast::ClosureExpr, ) -> Option> { - pre_emit!(ClosureExpr, self, node); if self.should_be_excluded(node) { return None; } @@ -813,12 +735,13 @@ impl Translator<'_> { ret_type, }); self.emit_location(label, node); - post_emit!(ClosureExpr, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } pub(crate) fn emit_const(&mut self, node: &ast::Const) -> Option> { - pre_emit!(Const, self, node); + if let Some(label) = self.pre_emit(node) { + return Some(label); + } if self.should_be_excluded(node) { return None; } @@ -850,7 +773,7 @@ impl Translator<'_> { where_clause, }); self.emit_location(label, node); - post_emit!(Const, self, node, label); + self.post_emit(node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -858,14 +781,12 @@ impl Translator<'_> { &mut self, node: &ast::ConstArg, ) -> Option> { - pre_emit!(ConstArg, self, node); let expr = node.expr().and_then(|x| self.emit_expr(&x)); let label = self.trap.emit(generated::ConstArg { id: TrapId::Star, expr, }); self.emit_location(label, node); - post_emit!(ConstArg, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -873,7 +794,6 @@ impl Translator<'_> { &mut self, node: &ast::ConstBlockPat, ) -> Option> { - pre_emit!(ConstBlockPat, self, node); let block_expr = node.block_expr().and_then(|x| self.emit_block_expr(&x)); let is_const = node.const_token().is_some(); let label = self.trap.emit(generated::ConstBlockPat { @@ -882,7 +802,6 @@ impl Translator<'_> { is_const, }); self.emit_location(label, node); - post_emit!(ConstBlockPat, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -890,7 +809,6 @@ impl Translator<'_> { &mut self, node: &ast::ConstParam, ) -> Option> { - pre_emit!(ConstParam, self, node); if self.should_be_excluded(node) { return None; } @@ -908,7 +826,6 @@ impl Translator<'_> { type_repr, }); self.emit_location(label, node); - post_emit!(ConstParam, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -916,7 +833,6 @@ impl Translator<'_> { &mut self, node: &ast::ContinueExpr, ) -> Option> { - pre_emit!(ContinueExpr, self, node); if self.should_be_excluded(node) { return None; } @@ -928,7 +844,6 @@ impl Translator<'_> { lifetime, }); self.emit_location(label, node); - post_emit!(ContinueExpr, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -936,7 +851,6 @@ impl Translator<'_> { &mut self, node: &ast::DynTraitType, ) -> Option> { - pre_emit!(DynTraitTypeRepr, self, node); let type_bound_list = node .type_bound_list() .and_then(|x| self.emit_type_bound_list(&x)); @@ -945,12 +859,13 @@ impl Translator<'_> { type_bound_list, }); self.emit_location(label, node); - post_emit!(DynTraitTypeRepr, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } pub(crate) fn emit_enum(&mut self, node: &ast::Enum) -> Option> { - pre_emit!(Enum, self, node); + if let Some(label) = self.pre_emit(node) { + return Some(label); + } if self.should_be_excluded(node) { return None; } @@ -972,7 +887,7 @@ impl Translator<'_> { where_clause, }); self.emit_location(label, node); - post_emit!(Enum, self, node, label); + self.post_emit(node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -980,14 +895,12 @@ impl Translator<'_> { &mut self, node: &ast::ExprStmt, ) -> Option> { - pre_emit!(ExprStmt, self, node); let expr = node.expr().and_then(|x| self.emit_expr(&x)); let label = self.trap.emit(generated::ExprStmt { id: TrapId::Star, expr, }); self.emit_location(label, node); - post_emit!(ExprStmt, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -995,7 +908,6 @@ impl Translator<'_> { &mut self, node: &ast::ExternBlock, ) -> Option> { - pre_emit!(ExternBlock, self, node); if self.should_be_excluded(node) { return None; } @@ -1013,7 +925,6 @@ impl Translator<'_> { is_unsafe, }); self.emit_location(label, node); - post_emit!(ExternBlock, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -1021,7 +932,6 @@ impl Translator<'_> { &mut self, node: &ast::ExternCrate, ) -> Option> { - pre_emit!(ExternCrate, self, node); if self.should_be_excluded(node) { return None; } @@ -1037,7 +947,6 @@ impl Translator<'_> { visibility, }); self.emit_location(label, node); - post_emit!(ExternCrate, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -1045,7 +954,6 @@ impl Translator<'_> { &mut self, node: &ast::ExternItemList, ) -> Option> { - pre_emit!(ExternItemList, self, node); if self.should_be_excluded(node) { return None; } @@ -1060,7 +968,6 @@ impl Translator<'_> { extern_items, }); self.emit_location(label, node); - post_emit!(ExternItemList, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -1068,7 +975,6 @@ impl Translator<'_> { &mut self, node: &ast::FieldExpr, ) -> Option> { - pre_emit!(FieldExpr, self, node); if self.should_be_excluded(node) { return None; } @@ -1082,12 +988,13 @@ impl Translator<'_> { identifier, }); self.emit_location(label, node); - post_emit!(FieldExpr, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } pub(crate) fn emit_fn(&mut self, node: &ast::Fn) -> Option> { - pre_emit!(Function, self, node); + if let Some(label) = self.pre_emit(node) { + return Some(label); + } if self.should_be_excluded(node) { return None; } @@ -1129,7 +1036,7 @@ impl Translator<'_> { where_clause, }); self.emit_location(label, node); - post_emit!(Function, self, node, label); + self.post_emit(node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -1137,7 +1044,6 @@ impl Translator<'_> { &mut self, node: &ast::FnPtrType, ) -> Option> { - pre_emit!(FnPtrTypeRepr, self, node); let abi = node.abi().and_then(|x| self.emit_abi(&x)); let is_async = node.async_token().is_some(); let is_const = node.const_token().is_some(); @@ -1154,7 +1060,6 @@ impl Translator<'_> { ret_type, }); self.emit_location(label, node); - post_emit!(FnPtrTypeRepr, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -1162,7 +1067,6 @@ impl Translator<'_> { &mut self, node: &ast::ForExpr, ) -> Option> { - pre_emit!(ForExpr, self, node); if self.should_be_excluded(node) { return None; } @@ -1180,7 +1084,6 @@ impl Translator<'_> { pat, }); self.emit_location(label, node); - post_emit!(ForExpr, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -1188,7 +1091,6 @@ impl Translator<'_> { &mut self, node: &ast::ForType, ) -> Option> { - pre_emit!(ForTypeRepr, self, node); let generic_param_list = node .generic_param_list() .and_then(|x| self.emit_generic_param_list(&x)); @@ -1199,7 +1101,6 @@ impl Translator<'_> { type_repr, }); self.emit_location(label, node); - post_emit!(ForTypeRepr, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -1207,7 +1108,6 @@ impl Translator<'_> { &mut self, node: &ast::FormatArgsArg, ) -> Option> { - pre_emit!(FormatArgsArg, self, node); let expr = node.expr().and_then(|x| self.emit_expr(&x)); let name = node.name().and_then(|x| self.emit_name(&x)); let label = self.trap.emit(generated::FormatArgsArg { @@ -1216,7 +1116,6 @@ impl Translator<'_> { name, }); self.emit_location(label, node); - post_emit!(FormatArgsArg, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -1224,7 +1123,6 @@ impl Translator<'_> { &mut self, node: &ast::FormatArgsExpr, ) -> Option> { - pre_emit!(FormatArgsExpr, self, node); if self.should_be_excluded(node) { return None; } @@ -1241,7 +1139,6 @@ impl Translator<'_> { template, }); self.emit_location(label, node); - post_emit!(FormatArgsExpr, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -1249,7 +1146,6 @@ impl Translator<'_> { &mut self, node: &ast::GenericArgList, ) -> Option> { - pre_emit!(GenericArgList, self, node); let generic_args = node .generic_args() .filter_map(|x| self.emit_generic_arg(&x)) @@ -1259,7 +1155,6 @@ impl Translator<'_> { generic_args, }); self.emit_location(label, node); - post_emit!(GenericArgList, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -1267,7 +1162,6 @@ impl Translator<'_> { &mut self, node: &ast::GenericParamList, ) -> Option> { - pre_emit!(GenericParamList, self, node); let generic_params = node .generic_params() .filter_map(|x| self.emit_generic_param(&x)) @@ -1277,7 +1171,6 @@ impl Translator<'_> { generic_params, }); self.emit_location(label, node); - post_emit!(GenericParamList, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -1285,7 +1178,6 @@ impl Translator<'_> { &mut self, node: &ast::IdentPat, ) -> Option> { - pre_emit!(IdentPat, self, node); if self.should_be_excluded(node) { return None; } @@ -1303,12 +1195,10 @@ impl Translator<'_> { pat, }); self.emit_location(label, node); - post_emit!(IdentPat, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } pub(crate) fn emit_if_expr(&mut self, node: &ast::IfExpr) -> Option> { - pre_emit!(IfExpr, self, node); if self.should_be_excluded(node) { return None; } @@ -1324,12 +1214,10 @@ impl Translator<'_> { then, }); self.emit_location(label, node); - post_emit!(IfExpr, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } pub(crate) fn emit_impl(&mut self, node: &ast::Impl) -> Option> { - pre_emit!(Impl, self, node); if self.should_be_excluded(node) { return None; } @@ -1361,7 +1249,6 @@ impl Translator<'_> { where_clause, }); self.emit_location(label, node); - post_emit!(Impl, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -1369,7 +1256,6 @@ impl Translator<'_> { &mut self, node: &ast::ImplTraitType, ) -> Option> { - pre_emit!(ImplTraitTypeRepr, self, node); let type_bound_list = node .type_bound_list() .and_then(|x| self.emit_type_bound_list(&x)); @@ -1378,7 +1264,6 @@ impl Translator<'_> { type_bound_list, }); self.emit_location(label, node); - post_emit!(ImplTraitTypeRepr, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -1386,7 +1271,6 @@ impl Translator<'_> { &mut self, node: &ast::IndexExpr, ) -> Option> { - pre_emit!(IndexExpr, self, node); if self.should_be_excluded(node) { return None; } @@ -1400,7 +1284,6 @@ impl Translator<'_> { index, }); self.emit_location(label, node); - post_emit!(IndexExpr, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -1408,12 +1291,10 @@ impl Translator<'_> { &mut self, node: &ast::InferType, ) -> Option> { - pre_emit!(InferTypeRepr, self, node); let label = self .trap .emit(generated::InferTypeRepr { id: TrapId::Star }); self.emit_location(label, node); - post_emit!(InferTypeRepr, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -1421,7 +1302,6 @@ impl Translator<'_> { &mut self, node: &ast::ItemList, ) -> Option> { - pre_emit!(ItemList, self, node); if self.should_be_excluded(node) { return None; } @@ -1433,19 +1313,16 @@ impl Translator<'_> { items, }); self.emit_location(label, node); - post_emit!(ItemList, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } pub(crate) fn emit_label(&mut self, node: &ast::Label) -> Option> { - pre_emit!(Label, self, node); let lifetime = node.lifetime().and_then(|x| self.emit_lifetime(&x)); let label = self.trap.emit(generated::Label { id: TrapId::Star, lifetime, }); self.emit_location(label, node); - post_emit!(Label, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -1453,14 +1330,12 @@ impl Translator<'_> { &mut self, node: &ast::LetElse, ) -> Option> { - pre_emit!(LetElse, self, node); let block_expr = node.block_expr().and_then(|x| self.emit_block_expr(&x)); let label = self.trap.emit(generated::LetElse { id: TrapId::Star, block_expr, }); self.emit_location(label, node); - post_emit!(LetElse, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -1468,7 +1343,6 @@ impl Translator<'_> { &mut self, node: &ast::LetExpr, ) -> Option> { - pre_emit!(LetExpr, self, node); if self.should_be_excluded(node) { return None; } @@ -1482,7 +1356,6 @@ impl Translator<'_> { pat, }); self.emit_location(label, node); - post_emit!(LetExpr, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -1490,7 +1363,6 @@ impl Translator<'_> { &mut self, node: &ast::LetStmt, ) -> Option> { - pre_emit!(LetStmt, self, node); if self.should_be_excluded(node) { return None; } @@ -1508,7 +1380,6 @@ impl Translator<'_> { type_repr, }); self.emit_location(label, node); - post_emit!(LetStmt, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -1516,14 +1387,12 @@ impl Translator<'_> { &mut self, node: &ast::Lifetime, ) -> Option> { - pre_emit!(Lifetime, self, node); let text = node.try_get_text(); let label = self.trap.emit(generated::Lifetime { id: TrapId::Star, text, }); self.emit_location(label, node); - post_emit!(Lifetime, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -1531,14 +1400,12 @@ impl Translator<'_> { &mut self, node: &ast::LifetimeArg, ) -> Option> { - pre_emit!(LifetimeArg, self, node); let lifetime = node.lifetime().and_then(|x| self.emit_lifetime(&x)); let label = self.trap.emit(generated::LifetimeArg { id: TrapId::Star, lifetime, }); self.emit_location(label, node); - post_emit!(LifetimeArg, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -1546,7 +1413,6 @@ impl Translator<'_> { &mut self, node: &ast::LifetimeParam, ) -> Option> { - pre_emit!(LifetimeParam, self, node); if self.should_be_excluded(node) { return None; } @@ -1562,7 +1428,6 @@ impl Translator<'_> { type_bound_list, }); self.emit_location(label, node); - post_emit!(LifetimeParam, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -1570,7 +1435,6 @@ impl Translator<'_> { &mut self, node: &ast::Literal, ) -> Option> { - pre_emit!(LiteralExpr, self, node); if self.should_be_excluded(node) { return None; } @@ -1582,7 +1446,6 @@ impl Translator<'_> { text_value, }); self.emit_location(label, node); - post_emit!(LiteralExpr, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -1590,14 +1453,12 @@ impl Translator<'_> { &mut self, node: &ast::LiteralPat, ) -> Option> { - pre_emit!(LiteralPat, self, node); let literal = node.literal().and_then(|x| self.emit_literal(&x)); let label = self.trap.emit(generated::LiteralPat { id: TrapId::Star, literal, }); self.emit_location(label, node); - post_emit!(LiteralPat, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -1605,7 +1466,6 @@ impl Translator<'_> { &mut self, node: &ast::LoopExpr, ) -> Option> { - pre_emit!(LoopExpr, self, node); if self.should_be_excluded(node) { return None; } @@ -1619,7 +1479,6 @@ impl Translator<'_> { loop_body, }); self.emit_location(label, node); - post_emit!(LoopExpr, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -1627,7 +1486,9 @@ impl Translator<'_> { &mut self, node: &ast::MacroCall, ) -> Option> { - pre_emit!(MacroCall, self, node); + if let Some(label) = self.pre_emit(node) { + return Some(label); + } if self.should_be_excluded(node) { return None; } @@ -1645,7 +1506,7 @@ impl Translator<'_> { token_tree, }); self.emit_location(label, node); - post_emit!(MacroCall, self, node, label); + self.post_emit(node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -1653,7 +1514,6 @@ impl Translator<'_> { &mut self, node: &ast::MacroDef, ) -> Option> { - pre_emit!(MacroDef, self, node); if self.should_be_excluded(node) { return None; } @@ -1679,7 +1539,6 @@ impl Translator<'_> { visibility, }); self.emit_location(label, node); - post_emit!(MacroDef, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -1687,14 +1546,12 @@ impl Translator<'_> { &mut self, node: &ast::MacroExpr, ) -> Option> { - pre_emit!(MacroExpr, self, node); let macro_call = node.macro_call().and_then(|x| self.emit_macro_call(&x)); let label = self.trap.emit(generated::MacroExpr { id: TrapId::Star, macro_call, }); self.emit_location(label, node); - post_emit!(MacroExpr, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -1702,14 +1559,12 @@ impl Translator<'_> { &mut self, node: &ast::MacroItems, ) -> Option> { - pre_emit!(MacroItems, self, node); let items = node.items().filter_map(|x| self.emit_item(&x)).collect(); let label = self.trap.emit(generated::MacroItems { id: TrapId::Star, items, }); self.emit_location(label, node); - post_emit!(MacroItems, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -1717,14 +1572,12 @@ impl Translator<'_> { &mut self, node: &ast::MacroPat, ) -> Option> { - pre_emit!(MacroPat, self, node); let macro_call = node.macro_call().and_then(|x| self.emit_macro_call(&x)); let label = self.trap.emit(generated::MacroPat { id: TrapId::Star, macro_call, }); self.emit_location(label, node); - post_emit!(MacroPat, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -1732,7 +1585,6 @@ impl Translator<'_> { &mut self, node: &ast::MacroRules, ) -> Option> { - pre_emit!(MacroRules, self, node); if self.should_be_excluded(node) { return None; } @@ -1748,7 +1600,6 @@ impl Translator<'_> { visibility, }); self.emit_location(label, node); - post_emit!(MacroRules, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -1756,7 +1607,6 @@ impl Translator<'_> { &mut self, node: &ast::MacroStmts, ) -> Option> { - pre_emit!(MacroBlockExpr, self, node); let tail_expr = node.expr().and_then(|x| self.emit_expr(&x)); let statements = node .statements() @@ -1768,7 +1618,6 @@ impl Translator<'_> { statements, }); self.emit_location(label, node); - post_emit!(MacroBlockExpr, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -1776,14 +1625,12 @@ impl Translator<'_> { &mut self, node: &ast::MacroType, ) -> Option> { - pre_emit!(MacroTypeRepr, self, node); let macro_call = node.macro_call().and_then(|x| self.emit_macro_call(&x)); let label = self.trap.emit(generated::MacroTypeRepr { id: TrapId::Star, macro_call, }); self.emit_location(label, node); - post_emit!(MacroTypeRepr, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -1791,7 +1638,6 @@ impl Translator<'_> { &mut self, node: &ast::MatchArm, ) -> Option> { - pre_emit!(MatchArm, self, node); if self.should_be_excluded(node) { return None; } @@ -1807,7 +1653,6 @@ impl Translator<'_> { pat, }); self.emit_location(label, node); - post_emit!(MatchArm, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -1815,7 +1660,6 @@ impl Translator<'_> { &mut self, node: &ast::MatchArmList, ) -> Option> { - pre_emit!(MatchArmList, self, node); if self.should_be_excluded(node) { return None; } @@ -1830,7 +1674,6 @@ impl Translator<'_> { attrs, }); self.emit_location(label, node); - post_emit!(MatchArmList, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -1838,7 +1681,6 @@ impl Translator<'_> { &mut self, node: &ast::MatchExpr, ) -> Option> { - pre_emit!(MatchExpr, self, node); if self.should_be_excluded(node) { return None; } @@ -1854,7 +1696,6 @@ impl Translator<'_> { match_arm_list, }); self.emit_location(label, node); - post_emit!(MatchExpr, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -1862,19 +1703,19 @@ impl Translator<'_> { &mut self, node: &ast::MatchGuard, ) -> Option> { - pre_emit!(MatchGuard, self, node); let condition = node.condition().and_then(|x| self.emit_expr(&x)); let label = self.trap.emit(generated::MatchGuard { id: TrapId::Star, condition, }); self.emit_location(label, node); - post_emit!(MatchGuard, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } pub(crate) fn emit_meta(&mut self, node: &ast::Meta) -> Option> { - pre_emit!(Meta, self, node); + if let Some(label) = self.pre_emit(node) { + return Some(label); + } let expr = node.expr().and_then(|x| self.emit_expr(&x)); let is_unsafe = node.unsafe_token().is_some(); let path = node.path().and_then(|x| self.emit_path(&x)); @@ -1887,7 +1728,7 @@ impl Translator<'_> { token_tree, }); self.emit_location(label, node); - post_emit!(Meta, self, node, label); + self.post_emit(node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -1895,7 +1736,9 @@ impl Translator<'_> { &mut self, node: &ast::MethodCallExpr, ) -> Option> { - pre_emit!(MethodCallExpr, self, node); + if let Some(label) = self.pre_emit(node) { + return Some(label); + } if self.should_be_excluded(node) { return None; } @@ -1915,12 +1758,14 @@ impl Translator<'_> { receiver, }); self.emit_location(label, node); - post_emit!(MethodCallExpr, self, node, label); + self.post_emit(node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } pub(crate) fn emit_module(&mut self, node: &ast::Module) -> Option> { - pre_emit!(Module, self, node); + if let Some(label) = self.pre_emit(node) { + return Some(label); + } if self.should_be_excluded(node) { return None; } @@ -1936,19 +1781,17 @@ impl Translator<'_> { visibility, }); self.emit_location(label, node); - post_emit!(Module, self, node, label); + self.post_emit(node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } pub(crate) fn emit_name(&mut self, node: &ast::Name) -> Option> { - pre_emit!(Name, self, node); let text = node.try_get_text(); let label = self.trap.emit(generated::Name { id: TrapId::Star, text, }); self.emit_location(label, node); - post_emit!(Name, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -1956,14 +1799,12 @@ impl Translator<'_> { &mut self, node: &ast::NameRef, ) -> Option> { - pre_emit!(NameRef, self, node); let text = node.try_get_text(); let label = self.trap.emit(generated::NameRef { id: TrapId::Star, text, }); self.emit_location(label, node); - post_emit!(NameRef, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -1971,12 +1812,10 @@ impl Translator<'_> { &mut self, node: &ast::NeverType, ) -> Option> { - pre_emit!(NeverTypeRepr, self, node); let label = self .trap .emit(generated::NeverTypeRepr { id: TrapId::Star }); self.emit_location(label, node); - post_emit!(NeverTypeRepr, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -1984,7 +1823,6 @@ impl Translator<'_> { &mut self, node: &ast::OffsetOfExpr, ) -> Option> { - pre_emit!(OffsetOfExpr, self, node); if self.should_be_excluded(node) { return None; } @@ -2001,24 +1839,20 @@ impl Translator<'_> { type_repr, }); self.emit_location(label, node); - post_emit!(OffsetOfExpr, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } pub(crate) fn emit_or_pat(&mut self, node: &ast::OrPat) -> Option> { - pre_emit!(OrPat, self, node); let pats = node.pats().filter_map(|x| self.emit_pat(&x)).collect(); let label = self.trap.emit(generated::OrPat { id: TrapId::Star, pats, }); self.emit_location(label, node); - post_emit!(OrPat, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } pub(crate) fn emit_param(&mut self, node: &ast::Param) -> Option> { - pre_emit!(Param, self, node); if self.should_be_excluded(node) { return None; } @@ -2036,7 +1870,6 @@ impl Translator<'_> { type_repr, }); self.emit_location(label, node); - post_emit!(Param, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -2044,7 +1877,6 @@ impl Translator<'_> { &mut self, node: &ast::ParamList, ) -> Option> { - pre_emit!(ParamList, self, node); let params = node.params().filter_map(|x| self.emit_param(&x)).collect(); let self_param = node.self_param().and_then(|x| self.emit_self_param(&x)); let label = self.trap.emit(generated::ParamList { @@ -2053,7 +1885,6 @@ impl Translator<'_> { self_param, }); self.emit_location(label, node); - post_emit!(ParamList, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -2061,7 +1892,6 @@ impl Translator<'_> { &mut self, node: &ast::ParenExpr, ) -> Option> { - pre_emit!(ParenExpr, self, node); if self.should_be_excluded(node) { return None; } @@ -2073,7 +1903,6 @@ impl Translator<'_> { expr, }); self.emit_location(label, node); - post_emit!(ParenExpr, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -2081,14 +1910,12 @@ impl Translator<'_> { &mut self, node: &ast::ParenPat, ) -> Option> { - pre_emit!(ParenPat, self, node); let pat = node.pat().and_then(|x| self.emit_pat(&x)); let label = self.trap.emit(generated::ParenPat { id: TrapId::Star, pat, }); self.emit_location(label, node); - post_emit!(ParenPat, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -2096,14 +1923,12 @@ impl Translator<'_> { &mut self, node: &ast::ParenType, ) -> Option> { - pre_emit!(ParenTypeRepr, self, node); let type_repr = node.ty().and_then(|x| self.emit_type(&x)); let label = self.trap.emit(generated::ParenTypeRepr { id: TrapId::Star, type_repr, }); self.emit_location(label, node); - post_emit!(ParenTypeRepr, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -2111,7 +1936,6 @@ impl Translator<'_> { &mut self, node: &ast::ParenthesizedArgList, ) -> Option> { - pre_emit!(ParenthesizedArgList, self, node); let type_args = node .type_args() .filter_map(|x| self.emit_type_arg(&x)) @@ -2121,12 +1945,10 @@ impl Translator<'_> { type_args, }); self.emit_location(label, node); - post_emit!(ParenthesizedArgList, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } pub(crate) fn emit_path(&mut self, node: &ast::Path) -> Option> { - pre_emit!(Path, self, node); let qualifier = node.qualifier().and_then(|x| self.emit_path(&x)); let segment = node.segment().and_then(|x| self.emit_path_segment(&x)); let label = self.trap.emit(generated::Path { @@ -2135,7 +1957,6 @@ impl Translator<'_> { segment, }); self.emit_location(label, node); - post_emit!(Path, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -2143,7 +1964,9 @@ impl Translator<'_> { &mut self, node: &ast::PathExpr, ) -> Option> { - pre_emit!(PathExpr, self, node); + if let Some(label) = self.pre_emit(node) { + return Some(label); + } if self.should_be_excluded(node) { return None; } @@ -2155,7 +1978,7 @@ impl Translator<'_> { path, }); self.emit_location(label, node); - post_emit!(PathExpr, self, node, label); + self.post_emit(node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -2163,14 +1986,16 @@ impl Translator<'_> { &mut self, node: &ast::PathPat, ) -> Option> { - pre_emit!(PathPat, self, node); + if let Some(label) = self.pre_emit(node) { + return Some(label); + } let path = node.path().and_then(|x| self.emit_path(&x)); let label = self.trap.emit(generated::PathPat { id: TrapId::Star, path, }); self.emit_location(label, node); - post_emit!(PathPat, self, node, label); + self.post_emit(node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -2178,7 +2003,9 @@ impl Translator<'_> { &mut self, node: &ast::PathSegment, ) -> Option> { - pre_emit!(PathSegment, self, node); + if let Some(label) = self.pre_emit(node) { + return Some(label); + } let generic_arg_list = node .generic_arg_list() .and_then(|x| self.emit_generic_arg_list(&x)); @@ -2199,7 +2026,7 @@ impl Translator<'_> { return_type_syntax, }); self.emit_location(label, node); - post_emit!(PathSegment, self, node, label); + self.post_emit(node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -2207,14 +2034,12 @@ impl Translator<'_> { &mut self, node: &ast::PathType, ) -> Option> { - pre_emit!(PathTypeRepr, self, node); let path = node.path().and_then(|x| self.emit_path(&x)); let label = self.trap.emit(generated::PathTypeRepr { id: TrapId::Star, path, }); self.emit_location(label, node); - post_emit!(PathTypeRepr, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -2222,7 +2047,6 @@ impl Translator<'_> { &mut self, node: &ast::PrefixExpr, ) -> Option> { - pre_emit!(PrefixExpr, self, node); if self.should_be_excluded(node) { return None; } @@ -2236,7 +2060,6 @@ impl Translator<'_> { operator_name, }); self.emit_location(label, node); - post_emit!(PrefixExpr, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -2244,7 +2067,6 @@ impl Translator<'_> { &mut self, node: &ast::PtrType, ) -> Option> { - pre_emit!(PtrTypeRepr, self, node); let is_const = node.const_token().is_some(); let is_mut = node.mut_token().is_some(); let type_repr = node.ty().and_then(|x| self.emit_type(&x)); @@ -2255,7 +2077,6 @@ impl Translator<'_> { type_repr, }); self.emit_location(label, node); - post_emit!(PtrTypeRepr, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -2263,7 +2084,6 @@ impl Translator<'_> { &mut self, node: &ast::RangeExpr, ) -> Option> { - pre_emit!(RangeExpr, self, node); if self.should_be_excluded(node) { return None; } @@ -2279,7 +2099,6 @@ impl Translator<'_> { start, }); self.emit_location(label, node); - post_emit!(RangeExpr, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -2287,7 +2106,6 @@ impl Translator<'_> { &mut self, node: &ast::RangePat, ) -> Option> { - pre_emit!(RangePat, self, node); let end = node.end().and_then(|x| self.emit_pat(&x)); let operator_name = node.try_get_text(); let start = node.start().and_then(|x| self.emit_pat(&x)); @@ -2298,7 +2116,6 @@ impl Translator<'_> { start, }); self.emit_location(label, node); - post_emit!(RangePat, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -2306,7 +2123,9 @@ impl Translator<'_> { &mut self, node: &ast::RecordExpr, ) -> Option> { - pre_emit!(StructExpr, self, node); + if let Some(label) = self.pre_emit(node) { + return Some(label); + } let path = node.path().and_then(|x| self.emit_path(&x)); let struct_expr_field_list = node .record_expr_field_list() @@ -2317,7 +2136,7 @@ impl Translator<'_> { struct_expr_field_list, }); self.emit_location(label, node); - post_emit!(StructExpr, self, node, label); + self.post_emit(node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -2325,7 +2144,6 @@ impl Translator<'_> { &mut self, node: &ast::RecordExprField, ) -> Option> { - pre_emit!(StructExprField, self, node); if self.should_be_excluded(node) { return None; } @@ -2339,7 +2157,6 @@ impl Translator<'_> { identifier, }); self.emit_location(label, node); - post_emit!(StructExprField, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -2347,7 +2164,6 @@ impl Translator<'_> { &mut self, node: &ast::RecordExprFieldList, ) -> Option> { - pre_emit!(StructExprFieldList, self, node); if self.should_be_excluded(node) { return None; } @@ -2364,7 +2180,6 @@ impl Translator<'_> { spread, }); self.emit_location(label, node); - post_emit!(StructExprFieldList, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -2372,7 +2187,6 @@ impl Translator<'_> { &mut self, node: &ast::RecordField, ) -> Option> { - pre_emit!(StructField, self, node); if self.should_be_excluded(node) { return None; } @@ -2392,7 +2206,6 @@ impl Translator<'_> { visibility, }); self.emit_location(label, node); - post_emit!(StructField, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -2400,7 +2213,6 @@ impl Translator<'_> { &mut self, node: &ast::RecordFieldList, ) -> Option> { - pre_emit!(StructFieldList, self, node); let fields = node .fields() .filter_map(|x| self.emit_record_field(&x)) @@ -2410,7 +2222,6 @@ impl Translator<'_> { fields, }); self.emit_location(label, node); - post_emit!(StructFieldList, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -2418,7 +2229,9 @@ impl Translator<'_> { &mut self, node: &ast::RecordPat, ) -> Option> { - pre_emit!(StructPat, self, node); + if let Some(label) = self.pre_emit(node) { + return Some(label); + } let path = node.path().and_then(|x| self.emit_path(&x)); let struct_pat_field_list = node .record_pat_field_list() @@ -2429,7 +2242,7 @@ impl Translator<'_> { struct_pat_field_list, }); self.emit_location(label, node); - post_emit!(StructPat, self, node, label); + self.post_emit(node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -2437,7 +2250,6 @@ impl Translator<'_> { &mut self, node: &ast::RecordPatField, ) -> Option> { - pre_emit!(StructPatField, self, node); if self.should_be_excluded(node) { return None; } @@ -2451,7 +2263,6 @@ impl Translator<'_> { pat, }); self.emit_location(label, node); - post_emit!(StructPatField, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -2459,7 +2270,6 @@ impl Translator<'_> { &mut self, node: &ast::RecordPatFieldList, ) -> Option> { - pre_emit!(StructPatFieldList, self, node); let fields = node .fields() .filter_map(|x| self.emit_record_pat_field(&x)) @@ -2471,7 +2281,6 @@ impl Translator<'_> { rest_pat, }); self.emit_location(label, node); - post_emit!(StructPatFieldList, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -2479,7 +2288,6 @@ impl Translator<'_> { &mut self, node: &ast::RefExpr, ) -> Option> { - pre_emit!(RefExpr, self, node); if self.should_be_excluded(node) { return None; } @@ -2497,12 +2305,10 @@ impl Translator<'_> { is_raw, }); self.emit_location(label, node); - post_emit!(RefExpr, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } pub(crate) fn emit_ref_pat(&mut self, node: &ast::RefPat) -> Option> { - pre_emit!(RefPat, self, node); let is_mut = node.mut_token().is_some(); let pat = node.pat().and_then(|x| self.emit_pat(&x)); let label = self.trap.emit(generated::RefPat { @@ -2511,7 +2317,6 @@ impl Translator<'_> { pat, }); self.emit_location(label, node); - post_emit!(RefPat, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -2519,7 +2324,6 @@ impl Translator<'_> { &mut self, node: &ast::RefType, ) -> Option> { - pre_emit!(RefTypeRepr, self, node); let is_mut = node.mut_token().is_some(); let lifetime = node.lifetime().and_then(|x| self.emit_lifetime(&x)); let type_repr = node.ty().and_then(|x| self.emit_type(&x)); @@ -2530,19 +2334,16 @@ impl Translator<'_> { type_repr, }); self.emit_location(label, node); - post_emit!(RefTypeRepr, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } pub(crate) fn emit_rename(&mut self, node: &ast::Rename) -> Option> { - pre_emit!(Rename, self, node); let name = node.name().and_then(|x| self.emit_name(&x)); let label = self.trap.emit(generated::Rename { id: TrapId::Star, name, }); self.emit_location(label, node); - post_emit!(Rename, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -2550,7 +2351,6 @@ impl Translator<'_> { &mut self, node: &ast::RestPat, ) -> Option> { - pre_emit!(RestPat, self, node); if self.should_be_excluded(node) { return None; } @@ -2560,7 +2360,6 @@ impl Translator<'_> { attrs, }); self.emit_location(label, node); - post_emit!(RestPat, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -2568,14 +2367,12 @@ impl Translator<'_> { &mut self, node: &ast::RetType, ) -> Option> { - pre_emit!(RetTypeRepr, self, node); let type_repr = node.ty().and_then(|x| self.emit_type(&x)); let label = self.trap.emit(generated::RetTypeRepr { id: TrapId::Star, type_repr, }); self.emit_location(label, node); - post_emit!(RetTypeRepr, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -2583,7 +2380,6 @@ impl Translator<'_> { &mut self, node: &ast::ReturnExpr, ) -> Option> { - pre_emit!(ReturnExpr, self, node); if self.should_be_excluded(node) { return None; } @@ -2595,7 +2391,6 @@ impl Translator<'_> { expr, }); self.emit_location(label, node); - post_emit!(ReturnExpr, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -2603,12 +2398,10 @@ impl Translator<'_> { &mut self, node: &ast::ReturnTypeSyntax, ) -> Option> { - pre_emit!(ReturnTypeSyntax, self, node); let label = self .trap .emit(generated::ReturnTypeSyntax { id: TrapId::Star }); self.emit_location(label, node); - post_emit!(ReturnTypeSyntax, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -2616,7 +2409,6 @@ impl Translator<'_> { &mut self, node: &ast::SelfParam, ) -> Option> { - pre_emit!(SelfParam, self, node); if self.should_be_excluded(node) { return None; } @@ -2636,7 +2428,6 @@ impl Translator<'_> { type_repr, }); self.emit_location(label, node); - post_emit!(SelfParam, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -2644,14 +2435,12 @@ impl Translator<'_> { &mut self, node: &ast::SlicePat, ) -> Option> { - pre_emit!(SlicePat, self, node); let pats = node.pats().filter_map(|x| self.emit_pat(&x)).collect(); let label = self.trap.emit(generated::SlicePat { id: TrapId::Star, pats, }); self.emit_location(label, node); - post_emit!(SlicePat, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -2659,14 +2448,12 @@ impl Translator<'_> { &mut self, node: &ast::SliceType, ) -> Option> { - pre_emit!(SliceTypeRepr, self, node); let type_repr = node.ty().and_then(|x| self.emit_type(&x)); let label = self.trap.emit(generated::SliceTypeRepr { id: TrapId::Star, type_repr, }); self.emit_location(label, node); - post_emit!(SliceTypeRepr, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -2674,7 +2461,6 @@ impl Translator<'_> { &mut self, node: &ast::SourceFile, ) -> Option> { - pre_emit!(SourceFile, self, node); if self.should_be_excluded(node) { return None; } @@ -2686,12 +2472,10 @@ impl Translator<'_> { items, }); self.emit_location(label, node); - post_emit!(SourceFile, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } pub(crate) fn emit_static(&mut self, node: &ast::Static) -> Option> { - pre_emit!(Static, self, node); if self.should_be_excluded(node) { return None; } @@ -2719,7 +2503,6 @@ impl Translator<'_> { visibility, }); self.emit_location(label, node); - post_emit!(Static, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -2727,7 +2510,6 @@ impl Translator<'_> { &mut self, node: &ast::StmtList, ) -> Option> { - pre_emit!(StmtList, self, node); if self.should_be_excluded(node) { return None; } @@ -2744,12 +2526,13 @@ impl Translator<'_> { tail_expr, }); self.emit_location(label, node); - post_emit!(StmtList, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } pub(crate) fn emit_struct(&mut self, node: &ast::Struct) -> Option> { - pre_emit!(Struct, self, node); + if let Some(label) = self.pre_emit(node) { + return Some(label); + } if self.should_be_excluded(node) { return None; } @@ -2771,7 +2554,7 @@ impl Translator<'_> { where_clause, }); self.emit_location(label, node); - post_emit!(Struct, self, node, label); + self.post_emit(node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -2779,15 +2562,15 @@ impl Translator<'_> { &mut self, node: &ast::TokenTree, ) -> Option> { - pre_emit!(TokenTree, self, node); let label = self.trap.emit(generated::TokenTree { id: TrapId::Star }); self.emit_location(label, node); - post_emit!(TokenTree, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } pub(crate) fn emit_trait(&mut self, node: &ast::Trait) -> Option> { - pre_emit!(Trait, self, node); + if let Some(label) = self.pre_emit(node) { + return Some(label); + } if self.should_be_excluded(node) { return None; } @@ -2819,7 +2602,7 @@ impl Translator<'_> { where_clause, }); self.emit_location(label, node); - post_emit!(Trait, self, node, label); + self.post_emit(node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -2827,7 +2610,6 @@ impl Translator<'_> { &mut self, node: &ast::TraitAlias, ) -> Option> { - pre_emit!(TraitAlias, self, node); if self.should_be_excluded(node) { return None; } @@ -2851,7 +2633,6 @@ impl Translator<'_> { where_clause, }); self.emit_location(label, node); - post_emit!(TraitAlias, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -2859,7 +2640,6 @@ impl Translator<'_> { &mut self, node: &ast::TryExpr, ) -> Option> { - pre_emit!(TryExpr, self, node); if self.should_be_excluded(node) { return None; } @@ -2871,7 +2651,6 @@ impl Translator<'_> { expr, }); self.emit_location(label, node); - post_emit!(TryExpr, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -2879,7 +2658,6 @@ impl Translator<'_> { &mut self, node: &ast::TupleExpr, ) -> Option> { - pre_emit!(TupleExpr, self, node); if self.should_be_excluded(node) { return None; } @@ -2891,7 +2669,6 @@ impl Translator<'_> { fields, }); self.emit_location(label, node); - post_emit!(TupleExpr, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -2899,7 +2676,6 @@ impl Translator<'_> { &mut self, node: &ast::TupleField, ) -> Option> { - pre_emit!(TupleField, self, node); if self.should_be_excluded(node) { return None; } @@ -2913,7 +2689,6 @@ impl Translator<'_> { visibility, }); self.emit_location(label, node); - post_emit!(TupleField, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -2921,7 +2696,6 @@ impl Translator<'_> { &mut self, node: &ast::TupleFieldList, ) -> Option> { - pre_emit!(TupleFieldList, self, node); let fields = node .fields() .filter_map(|x| self.emit_tuple_field(&x)) @@ -2931,7 +2705,6 @@ impl Translator<'_> { fields, }); self.emit_location(label, node); - post_emit!(TupleFieldList, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -2939,14 +2712,12 @@ impl Translator<'_> { &mut self, node: &ast::TuplePat, ) -> Option> { - pre_emit!(TuplePat, self, node); let fields = node.fields().filter_map(|x| self.emit_pat(&x)).collect(); let label = self.trap.emit(generated::TuplePat { id: TrapId::Star, fields, }); self.emit_location(label, node); - post_emit!(TuplePat, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -2954,7 +2725,9 @@ impl Translator<'_> { &mut self, node: &ast::TupleStructPat, ) -> Option> { - pre_emit!(TupleStructPat, self, node); + if let Some(label) = self.pre_emit(node) { + return Some(label); + } let fields = node.fields().filter_map(|x| self.emit_pat(&x)).collect(); let path = node.path().and_then(|x| self.emit_path(&x)); let label = self.trap.emit(generated::TupleStructPat { @@ -2963,7 +2736,7 @@ impl Translator<'_> { path, }); self.emit_location(label, node); - post_emit!(TupleStructPat, self, node, label); + self.post_emit(node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -2971,14 +2744,12 @@ impl Translator<'_> { &mut self, node: &ast::TupleType, ) -> Option> { - pre_emit!(TupleTypeRepr, self, node); let fields = node.fields().filter_map(|x| self.emit_type(&x)).collect(); let label = self.trap.emit(generated::TupleTypeRepr { id: TrapId::Star, fields, }); self.emit_location(label, node); - post_emit!(TupleTypeRepr, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -2986,7 +2757,6 @@ impl Translator<'_> { &mut self, node: &ast::TypeAlias, ) -> Option> { - pre_emit!(TypeAlias, self, node); if self.should_be_excluded(node) { return None; } @@ -3014,7 +2784,6 @@ impl Translator<'_> { where_clause, }); self.emit_location(label, node); - post_emit!(TypeAlias, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -3022,14 +2791,12 @@ impl Translator<'_> { &mut self, node: &ast::TypeArg, ) -> Option> { - pre_emit!(TypeArg, self, node); let type_repr = node.ty().and_then(|x| self.emit_type(&x)); let label = self.trap.emit(generated::TypeArg { id: TrapId::Star, type_repr, }); self.emit_location(label, node); - post_emit!(TypeArg, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -3037,7 +2804,6 @@ impl Translator<'_> { &mut self, node: &ast::TypeBound, ) -> Option> { - pre_emit!(TypeBound, self, node); let is_async = node.async_token().is_some(); let is_const = node.const_token().is_some(); let lifetime = node.lifetime().and_then(|x| self.emit_lifetime(&x)); @@ -3054,7 +2820,6 @@ impl Translator<'_> { use_bound_generic_args, }); self.emit_location(label, node); - post_emit!(TypeBound, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -3062,7 +2827,6 @@ impl Translator<'_> { &mut self, node: &ast::TypeBoundList, ) -> Option> { - pre_emit!(TypeBoundList, self, node); let bounds = node .bounds() .filter_map(|x| self.emit_type_bound(&x)) @@ -3072,7 +2836,6 @@ impl Translator<'_> { bounds, }); self.emit_location(label, node); - post_emit!(TypeBoundList, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -3080,7 +2843,6 @@ impl Translator<'_> { &mut self, node: &ast::TypeParam, ) -> Option> { - pre_emit!(TypeParam, self, node); if self.should_be_excluded(node) { return None; } @@ -3098,7 +2860,6 @@ impl Translator<'_> { type_bound_list, }); self.emit_location(label, node); - post_emit!(TypeParam, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -3106,7 +2867,6 @@ impl Translator<'_> { &mut self, node: &ast::UnderscoreExpr, ) -> Option> { - pre_emit!(UnderscoreExpr, self, node); if self.should_be_excluded(node) { return None; } @@ -3116,12 +2876,13 @@ impl Translator<'_> { attrs, }); self.emit_location(label, node); - post_emit!(UnderscoreExpr, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } pub(crate) fn emit_union(&mut self, node: &ast::Union) -> Option> { - pre_emit!(Union, self, node); + if let Some(label) = self.pre_emit(node) { + return Some(label); + } if self.should_be_excluded(node) { return None; } @@ -3145,12 +2906,11 @@ impl Translator<'_> { where_clause, }); self.emit_location(label, node); - post_emit!(Union, self, node, label); + self.post_emit(node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } pub(crate) fn emit_use(&mut self, node: &ast::Use) -> Option> { - pre_emit!(Use, self, node); if self.should_be_excluded(node) { return None; } @@ -3164,7 +2924,6 @@ impl Translator<'_> { visibility, }); self.emit_location(label, node); - post_emit!(Use, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -3172,7 +2931,6 @@ impl Translator<'_> { &mut self, node: &ast::UseBoundGenericArgs, ) -> Option> { - pre_emit!(UseBoundGenericArgs, self, node); let use_bound_generic_args = node .use_bound_generic_args() .filter_map(|x| self.emit_use_bound_generic_arg(&x)) @@ -3182,7 +2940,6 @@ impl Translator<'_> { use_bound_generic_args, }); self.emit_location(label, node); - post_emit!(UseBoundGenericArgs, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -3190,7 +2947,6 @@ impl Translator<'_> { &mut self, node: &ast::UseTree, ) -> Option> { - pre_emit!(UseTree, self, node); let is_glob = node.star_token().is_some(); let path = node.path().and_then(|x| self.emit_path(&x)); let rename = node.rename().and_then(|x| self.emit_rename(&x)); @@ -3205,7 +2961,6 @@ impl Translator<'_> { use_tree_list, }); self.emit_location(label, node); - post_emit!(UseTree, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -3213,7 +2968,6 @@ impl Translator<'_> { &mut self, node: &ast::UseTreeList, ) -> Option> { - pre_emit!(UseTreeList, self, node); let use_trees = node .use_trees() .filter_map(|x| self.emit_use_tree(&x)) @@ -3223,7 +2977,6 @@ impl Translator<'_> { use_trees, }); self.emit_location(label, node); - post_emit!(UseTreeList, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -3231,7 +2984,9 @@ impl Translator<'_> { &mut self, node: &ast::Variant, ) -> Option> { - pre_emit!(Variant, self, node); + if let Some(label) = self.pre_emit(node) { + return Some(label); + } if self.should_be_excluded(node) { return None; } @@ -3249,7 +3004,7 @@ impl Translator<'_> { visibility, }); self.emit_location(label, node); - post_emit!(Variant, self, node, label); + self.post_emit(node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -3257,7 +3012,6 @@ impl Translator<'_> { &mut self, node: &ast::VariantList, ) -> Option> { - pre_emit!(VariantList, self, node); let variants = node .variants() .filter_map(|x| self.emit_variant(&x)) @@ -3267,7 +3021,6 @@ impl Translator<'_> { variants, }); self.emit_location(label, node); - post_emit!(VariantList, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -3275,14 +3028,12 @@ impl Translator<'_> { &mut self, node: &ast::Visibility, ) -> Option> { - pre_emit!(Visibility, self, node); let path = node.path().and_then(|x| self.emit_path(&x)); let label = self.trap.emit(generated::Visibility { id: TrapId::Star, path, }); self.emit_location(label, node); - post_emit!(Visibility, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -3290,7 +3041,6 @@ impl Translator<'_> { &mut self, node: &ast::WhereClause, ) -> Option> { - pre_emit!(WhereClause, self, node); let predicates = node .predicates() .filter_map(|x| self.emit_where_pred(&x)) @@ -3300,7 +3050,6 @@ impl Translator<'_> { predicates, }); self.emit_location(label, node); - post_emit!(WhereClause, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -3308,7 +3057,6 @@ impl Translator<'_> { &mut self, node: &ast::WherePred, ) -> Option> { - pre_emit!(WherePred, self, node); let generic_param_list = node .generic_param_list() .and_then(|x| self.emit_generic_param_list(&x)); @@ -3325,7 +3073,6 @@ impl Translator<'_> { type_bound_list, }); self.emit_location(label, node); - post_emit!(WherePred, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -3333,7 +3080,6 @@ impl Translator<'_> { &mut self, node: &ast::WhileExpr, ) -> Option> { - pre_emit!(WhileExpr, self, node); if self.should_be_excluded(node) { return None; } @@ -3349,7 +3095,6 @@ impl Translator<'_> { loop_body, }); self.emit_location(label, node); - post_emit!(WhileExpr, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -3357,10 +3102,8 @@ impl Translator<'_> { &mut self, node: &ast::WildcardPat, ) -> Option> { - pre_emit!(WildcardPat, self, node); let label = self.trap.emit(generated::WildcardPat { id: TrapId::Star }); self.emit_location(label, node); - post_emit!(WildcardPat, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -3368,7 +3111,6 @@ impl Translator<'_> { &mut self, node: &ast::YeetExpr, ) -> Option> { - pre_emit!(YeetExpr, self, node); if self.should_be_excluded(node) { return None; } @@ -3380,7 +3122,6 @@ impl Translator<'_> { expr, }); self.emit_location(label, node); - post_emit!(YeetExpr, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } @@ -3388,7 +3129,6 @@ impl Translator<'_> { &mut self, node: &ast::YieldExpr, ) -> Option> { - pre_emit!(YieldExpr, self, node); if self.should_be_excluded(node) { return None; } @@ -3400,8 +3140,67 @@ impl Translator<'_> { expr, }); self.emit_location(label, node); - post_emit!(YieldExpr, self, node, label); self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } } +impl HasTrapClass for ast::AssocItem { + type TrapClass = generated::AssocItem; +} +impl HasTrapClass for ast::ExternItem { + type TrapClass = generated::ExternItem; +} +impl HasTrapClass for ast::Item { + type TrapClass = generated::Item; +} +impl HasTrapClass for ast::Const { + type TrapClass = generated::Const; +} +impl HasTrapClass for ast::Enum { + type TrapClass = generated::Enum; +} +impl HasTrapClass for ast::Fn { + type TrapClass = generated::Function; +} +impl HasTrapClass for ast::MacroCall { + type TrapClass = generated::MacroCall; +} +impl HasTrapClass for ast::Meta { + type TrapClass = generated::Meta; +} +impl HasTrapClass for ast::MethodCallExpr { + type TrapClass = generated::MethodCallExpr; +} +impl HasTrapClass for ast::Module { + type TrapClass = generated::Module; +} +impl HasTrapClass for ast::PathExpr { + type TrapClass = generated::PathExpr; +} +impl HasTrapClass for ast::PathPat { + type TrapClass = generated::PathPat; +} +impl HasTrapClass for ast::PathSegment { + type TrapClass = generated::PathSegment; +} +impl HasTrapClass for ast::RecordExpr { + type TrapClass = generated::StructExpr; +} +impl HasTrapClass for ast::RecordPat { + type TrapClass = generated::StructPat; +} +impl HasTrapClass for ast::Struct { + type TrapClass = generated::Struct; +} +impl HasTrapClass for ast::Trait { + type TrapClass = generated::Trait; +} +impl HasTrapClass for ast::TupleStructPat { + type TrapClass = generated::TupleStructPat; +} +impl HasTrapClass for ast::Union { + type TrapClass = generated::Union; +} +impl HasTrapClass for ast::Variant { + type TrapClass = generated::Variant; +} diff --git a/rust/extractor/src/translate/mappings.rs b/rust/extractor/src/translate/mappings.rs index 3068e5cea52..3e71c6deb14 100644 --- a/rust/extractor/src/translate/mappings.rs +++ b/rust/extractor/src/translate/mappings.rs @@ -1,7 +1,20 @@ +use crate::trap::{Label, TrapClass}; use ra_ap_hir::{Enum, Function, HasContainer, Module, Semantics, Struct, Trait, Union}; use ra_ap_ide_db::RootDatabase; use ra_ap_syntax::{AstNode, ast, ast::RangeItem}; +pub(crate) trait HasTrapClass: AstNode { + type TrapClass: TrapClass; +} + +pub(crate) trait Emission { + fn pre_emit(&mut self, _node: &T) -> Option> { + None + } + + fn post_emit(&mut self, _node: &T, _label: Label) {} +} + pub(crate) trait TextValue { fn try_get_text(&self) -> Option; } diff --git a/rust/extractor/src/trap.rs b/rust/extractor/src/trap.rs index 2206c4c067b..a7cb43a6432 100644 --- a/rust/extractor/src/trap.rs +++ b/rust/extractor/src/trap.rs @@ -212,7 +212,7 @@ impl TrapFile { ); } pub fn emit_file(&mut self, absolute_path: &Path) -> Label { - let untyped = extractor::populate_file(&mut self.writer, absolute_path); + let untyped = extractor::populate_file(&mut self.writer, absolute_path, None); // SAFETY: populate_file emits `@file` typed labels unsafe { Label::from_untyped(untyped) } } @@ -268,6 +268,7 @@ impl TrapFileProvider { &self.trap_dir.join(category), key.as_ref(), self.compression.extension(), + None, ); debug!("creating trap file {}", path.display()); let mut writer = trap::Writer::new(); diff --git a/rust/ql/.generated.list b/rust/ql/.generated.list index b53665e8af1..29ed698c64e 100644 --- a/rust/ql/.generated.list +++ b/rust/ql/.generated.list @@ -657,613 +657,163 @@ lib/codeql/rust/elements/internal/generated/WildcardPat.qll d74b70b57a0a66bfae01 lib/codeql/rust/elements/internal/generated/YeetExpr.qll cac328200872a35337b4bcb15c851afb4743f82c080f9738d295571eb01d7392 94af734eea08129b587fed849b643e7572800e8330c0b57d727d41abda47930b lib/codeql/rust/elements/internal/generated/YieldExpr.qll 37e5f0c1e373a22bbc53d8b7f2c0e1f476e5be5080b8437c5e964f4e83fad79a 4a9a68643401637bf48e5c2b2f74a6bf0ddcb4ff76f6bffb61d436b685621e85 lib/codeql/rust/elements.qll 6ebcf16ef214075bc43562c246c11f8b90c089ff1b5041ab1b39ab9f4a40e9b3 6ebcf16ef214075bc43562c246c11f8b90c089ff1b5041ab1b39ab9f4a40e9b3 -test/extractor-tests/generated/Abi/Abi.ql 7f6e7dc4af86eca3ebdc79b10373988cd0871bd78b51997d3cffd969105e5fdd 2f936b6ca005c6157c755121584410c03e4a3949c23bee302fbe05ee10ce118f -test/extractor-tests/generated/Abi/Abi_getAbiString.ql a496762fcec5a0887b87023bbf93e9b650f02e20113e25c44d6e4281ae8f5335 14109c7ce11ba25e3cd6e7f1b3fcb4cb00622f2a4eac91bfe43145c5f366bc52 -test/extractor-tests/generated/ArgList/ArgList.ql e412927756e72165d0e7c5c9bd3fca89d08197bbf760db8fb7683c64bb2229bc 043dba8506946fbb87753e22c387987d7eded6ddb963aa067f9e60ef9024d684 -test/extractor-tests/generated/ArgList/ArgList_getArg.ql c07c946218489a0ad5fe89e5fd4a7f0ad84a73dc2e650729f48a340cb133be84 ff2382c0693f47e5eb1290aca325290e60c19d877b25b1d7e2ee96009f5fe934 -test/extractor-tests/generated/ArrayListExpr/ArrayListExpr.ql e6f9fe0dd6af5a1223e1e59827346aa2975bd665aeda36e8844ffb3a79c5e532 38576b6f7257c119917442e4f54fc883480e4da86d2542a1ac16d723ebbba039 -test/extractor-tests/generated/ArrayListExpr/ArrayListExpr_getAttr.ql f1ca0521f641bed17581121c0f07c7f8737d9891acdde2c68de59a0684e86a34 496da6513cfee28a31274a2e72b5a58d843407ac5e4870296da0f0b8e7fc85c1 -test/extractor-tests/generated/ArrayListExpr/ArrayListExpr_getExpr.ql 6920b532623e8c919701a83a059d9b1aac9e8673e7fdbe26e0a8af5ad6a34b8a 601137c715ce947d79f39d5b131d7ab167a16d29477eacdb1380cd647c4ebac4 -test/extractor-tests/generated/ArrayRepeatExpr/ArrayRepeatExpr.ql 60a0df80fd34ca5c960b5e060c7090f8bbb8af83aba7099aa298a80e19a13346 c41f80601c7f50eee01c0ed7587e0198296d6a8a5b95c98dd8f865901d34ba5c -test/extractor-tests/generated/ArrayRepeatExpr/ArrayRepeatExpr_getAttr.ql fc6ca212aa633b73ee21f7564631c9ad345f15839656d88940dc686cf076a344 d580a367305adbe168996a294329b1adec36956a500ae9717a4af78cb2bef4e6 -test/extractor-tests/generated/ArrayRepeatExpr/ArrayRepeatExpr_getExpr.ql 6b00037350fc36cc46345a290bda4c4d4ff99050b970d23eb94294313046a884 0687638b46e43bba9dda35d78ff7b40f976e5e38271eec77e7a21c28349dc42c -test/extractor-tests/generated/ArrayTypeRepr/ArrayTypeRepr.ql cfb831ccbc04092250931e0bd38c7b965fe0fd868081cd5f49fb11cd0da9aa0d 51e05a537928d7fd0aedd800f4d99c1f52630d75efe78bf7b016f1ad2380583b -test/extractor-tests/generated/ArrayTypeRepr/ArrayTypeRepr_getConstArg.ql 38db5e08b7a78f52247b9894fe2f3dd80b89efd2a3ddce446b782f92f6e2efad 8a4d38deac59fff090617e928fb698fc3d57f3651f47b06d3f40dd4ba92b2c93 -test/extractor-tests/generated/ArrayTypeRepr/ArrayTypeRepr_getElementTypeRepr.ql f74222b11cc52d3ac79e16d2943c1281c574fee954298752a309abc683798dbb 9701ebe468d76f72b21a7772a9e9bb82d8fd0a4e317437341f31f8395780dc33 -test/extractor-tests/generated/AsmClobberAbi/AsmClobberAbi.ql f98889c27e64d193c61c595f0efbb6bbdae7cb214a0ce1c11dbb102979ca9714 5367f35345e665563161060a38dacebc9cf7bd3b48b2f0fd01bc8ef85ffa642c -test/extractor-tests/generated/AsmConst/AsmConst.ql 07f4d623883ad4ff0701d7dd50306c78493407295ae4ccef8c61eba2c58deb30 a66e9cbfea3c212b34628f0189a93ed493fcfd8baaa85338d746e69fe290deb0 -test/extractor-tests/generated/AsmConst/AsmConst_getExpr.ql 2ece012be6a62ea66737b2db8693f0e41bb23355d59784572d9193e056def5e4 59a4730da584dcf16e8d9e9f7d4fcd417fcf329933552e783375ad9715e46f4e -test/extractor-tests/generated/AsmDirSpec/AsmDirSpec.ql d66f9672522b71318764f9c2dbdbeeaf895d66320997c3ba6a68daa7ea7c5600 de7d4231db182f63ab3e65ea5f4b548b530a6af7a79d7663a2250501a22e9783 -test/extractor-tests/generated/AsmExpr/AsmExpr.ql 81db9651d3e3cb2041316f95484bfe2a7d84a93d03a25bd6bcb3db813557a6e0 96c40bdbeadb1e52c6291a4da648304070db435e13f5881ab795f5874ef5885c -test/extractor-tests/generated/AsmExpr/AsmExpr_getAsmPiece.ql 334f92d8b5ab4326d844c0e515c7cda84ba92dc598d5787dc88fe05beb04a7dd 845d6a740f5b8593a42cb00ef0212e8eae063dcd4b4e60af57e37bdfb61e4c0d -test/extractor-tests/generated/AsmExpr/AsmExpr_getAttr.ql 93e644147ddc4de00c882c32d17ff3c22822e116b67361d52217619153b7d4c4 4c0c3f72707f41e879426ff75c5631e9283dc0507316740bec22216c5feb04e9 -test/extractor-tests/generated/AsmExpr/AsmExpr_getTemplate.ql d2070ad3509e5f4cf77d1ebd7ed730368627abf9c99e34cbece822f921f0a2dc 602646dd1bfcb3f6e09c1c3aa7a9d0cde38c60a397443c26d464fda15b9d86f5 -test/extractor-tests/generated/AsmLabel/AsmLabel.ql 5fa35306f29af248328e480445812d249428e1ca1ad8fd9bf6aaa92e864b14e4 93690a78ecb8bbb2fea9d56ce052bb12783596bde9664a6014b992c1ed9054a3 -test/extractor-tests/generated/AsmLabel/AsmLabel_getBlockExpr.ql 2ca16a4c6cfa438393d7e805f7da3971929e18eb70014e7a9c715d043404d704 f9ea9dafa9b90cce5624e0f2f900eb2056a45a0dd4d53eb1f31267661f02d17a -test/extractor-tests/generated/AsmOperandExpr/AsmOperandExpr.ql 660b7d5a466a7d426dd212ab7e4d7e990710aedcfd9e82d94757c9d3404f6040 a0afa9d7158f285e3fa306d3189bd0babe26d53cbf53a574de8239ff1046a7a6 -test/extractor-tests/generated/AsmOperandExpr/AsmOperandExpr_getInExpr.ql 00c8ccb9d4694067810288022ee6d57007676f1b9d13071c2d3abc240421ed79 d0febfa9a18b9b34f747cdc23400ca6be63df187e2b37125a4da7460316ac0a9 -test/extractor-tests/generated/AsmOperandExpr/AsmOperandExpr_getOutExpr.ql 8a3890c5ae23ce0e20fb4ff1af574db1faffac3bdac75c1f13fb8bb3227d9335 f4ac325ffebfb1fc3cb68b4405b49a012a4cc1ad12c1f8dffb415232e2bb3ca2 -test/extractor-tests/generated/AsmOperandNamed/AsmOperandNamed.ql ab7d567a6647f5cb03586b914131897d52d66909f1c8f0178ec07975560bdd42 ef4302d3dddd4bce1420e64b870da600c4368ab8cf888dc6e260d50d9e78dc2a -test/extractor-tests/generated/AsmOperandNamed/AsmOperandNamed_getAsmOperand.ql 8836f5152483ef6897db1e6c761dfbf51df4addcd448b554ab9e397b72c8c10c 3751a2558255c721f959b9651040c0f6f7db77165492dab7555209eb36b97353 -test/extractor-tests/generated/AsmOperandNamed/AsmOperandNamed_getName.ql 8932726b3a76e3358a22499e4b5f6702c971d8ea6c0dad4d9edf7fd1a7e8e670 8aabd40dbdb0b46e48b875ad7fdf2dddc11d8520e94c2ef49c8fccf81f3936a1 -test/extractor-tests/generated/AsmOption/AsmOption.ql c3b734a8ed0c8cb7c2703243803244c70f6ab49cd5443808b51c69b542479cbb f33359108019bc7e489a3493a14cc8626393cf021b264e09c06f9997fb1f69ce -test/extractor-tests/generated/AsmOptionsList/AsmOptionsList.ql b2be14f72b828d69058cdfe06f2e974e34ca4f864b6a792e18927ba6bad2bed8 44a766a4588b30e974e22e87c1620531b754d3d68fe30159f1cd75e556759b33 -test/extractor-tests/generated/AsmOptionsList/AsmOptionsList_getAsmOption.ql 1a775bb242deba03dcbc55469812a11e7bce4506c9258c6cb18696c4b26d7fe4 6c609d289c8bac2074513f52dd5ed5021224de212968db495f51709c9fb31dc8 -test/extractor-tests/generated/AsmRegOperand/AsmRegOperand.ql 809114ab618f85ba8c4b87c6602ec0641445bdd1cd679b2abc9e3b0c0c790aeb ea18549186133865bf9eb62021d16ef702365c0c919dd8a2d00ca4a337eeb65c -test/extractor-tests/generated/AsmRegOperand/AsmRegOperand_getAsmDirSpec.ql 3074826db602b4f716a7504b019d3834cd2ef1a3f411621780ef40b97603cfe1 2fa32c795d7024f6a7370edac9f9d762f685981cb5bf5886e930316a2830095a -test/extractor-tests/generated/AsmRegOperand/AsmRegOperand_getAsmOperandExpr.ql 0fb1e458b477158439eaf222eeb7c16ccdb12584fd87941c0f8b058ee1e91946 6f3297fca9c90ca730e9e02eb83a54f4077e03d36f9c268515300482e5c82a0a -test/extractor-tests/generated/AsmRegOperand/AsmRegOperand_getAsmRegSpec.ql 138acb4234fd0607e1884304e712498f4d34cb0da52f55a3729b33ec69056b10 c4207e230d60405644bc6cc56d871901116900ccb6d33398fef7292229223969 -test/extractor-tests/generated/AsmRegSpec/AsmRegSpec.ql c80510ab2e3975cdec4a98df8d0d0153bc46f64c677c89c208e9ced5c78f500c daf705c0e8cace232fc4609e70f7bc2f8565f47f18d0decf7da580405609b0fd -test/extractor-tests/generated/AsmRegSpec/AsmRegSpec_getIdentifier.ql 6c02b392b2e602c7257cd5591ded2674c37a54709a84250642f56671ac993f6c e9ec9a6202f8a6774ea46686f0a2b4c6a4511fec129ff95c61159e7102a50c7b -test/extractor-tests/generated/AsmSym/AsmSym.ql aa631efd6d31f9003e8b4deaf5fd918f0a3cfe4e319ccde918b47e4a23c43eda af41534bd153d88903217230fcea58b75227bb1ebff851e288f1353250d402f5 -test/extractor-tests/generated/AsmSym/AsmSym_getPath.ql 84943b40c30a8f630e18b9807d600cad010d5b106c68efd2b8de24e72cc4a441 b186f89c722271d98cccbd7eaad8f2a49b46983ef5b6630ac9944d5025676da6 -test/extractor-tests/generated/AssocTypeArg/AssocTypeArg.ql e0bfc812d6bc06fcd820d67044831fbc7c6917e11f75565128c5a927c5706aa3 e4b765d91f1205ed818dc1143316aa642d968e7bcd65ed055579ab941c401637 -test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getConstArg.ql c81e25fd7885f13c0500e8f9b84195876e70f2b25ad604046f497818226c8542 62ac0e7c82da169c248e4f9e0e8f866d2f4e599b03a287c2bd407b95a5d9efc8 -test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getGenericArgList.ql 4d20375752c000aab8d2e4988fff1a5c95689d114c8d63f37b389b95000ee873 957e360a4eeefa2536958770a7d150fda610d1d45c09900dbe66e470e361e294 -test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getIdentifier.ql 1d6d4031ed10dbe09ba8597d9ba5417c6b890b5b745e91bca12401459fc3c4e2 7da625c3a6eaf93b0ebd5d9863aad5fad45b1baf5df27d93d7f9c5d1fb76db13 -test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getParamList.ql 586cb26683e522469a5094d359be4d8e5c6a3a74c1621a059bfcbbbedc0e34b4 84784b38c24313f3ffc88371421550922d9deb44d09ca7727ca77e892a672dc9 -test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getRetType.ql 3e18791a74c12d93ac8f786aa76bd836876052837bb9f0b25222cde47c55e419 b53bb52ff98c1ca0ba09ffce034a97ddd86e32828df7acb9bf34e20c4fb19664 -test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getReturnTypeSyntax.ql 37252b5cee5ae64c36612aea57a6766bd34254ae35b9774642a36a8222aecfe6 c1f587d52b39c8aa66b9e6e4f36f40bda17dfcd72714ff79a262af99f829f89d -test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getTypeBoundList.ql 7e006ac8e8574c66a312b1389c7a85a83561b946e060575cc7234ef523b1a3ba 6123b375796c014a0bc96d39877b3108c13eff34536aa68402bda85511da18da -test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getTypeRepr.ql 0e41d63d34076111cdd00ba08e93da36411491ea6eafa2e61e94ea6d05e6bfa6 7bf0e678fe310f9085199877ac2b0817109cd10d26a3179715493b54a2cea649 -test/extractor-tests/generated/Attr/Attr.ql 028ac0a387f674205c5ef903238872ab1b6b7e2201f58c31776cdf740daf437c cb56a22887e0737d28034b39d7c3fb37a3d6eb1f34ce3d112bcea2f0affb3b13 -test/extractor-tests/generated/Attr/Attr_getMeta.ql f1e2df2bc987c670e31b454ab51b3028efc1018fbed2298a8c97f554eb1862f0 a9115ced872c89edc398bda1cbd54068f9065debc14ea5ac887ba13ad8f4e3d8 -test/extractor-tests/generated/AwaitExpr/AwaitExpr.ql 8dcc94a553fbddf17dfc619fbac563a9dc4fc6029860e10703e9ae9765d9ab66 52e7f0c98e6ab5dcef04b2ab5283ecde76e61a2297aa2080d16998f93dc923b7 -test/extractor-tests/generated/AwaitExpr/AwaitExpr_getAttr.ql c5ee1fc6017c4432a59dfec7d10d32681bd23f98cac70bbe65bc2aec8a680f3a ce6cf93c6305e6585c9d452bcc23af9dc8cbe2c872d2af5238a54c85df2071ee -test/extractor-tests/generated/AwaitExpr/AwaitExpr_getExpr.ql 143158284c8b7cc40fd2fa47c0bcf3f137ecd080b830476faca0c950b97c797c 0c9f64ce70cccf90fff7e7e9602f8ffdf68535d113914aab24f6450505b61d10 -test/extractor-tests/generated/BecomeExpr/BecomeExpr.ql b095c87b128d667f76585cda671173808130df6d094ac7ebcf89fc345d7908f4 aa3f1caba1cc7a40a0903f91458807e9ac9e8e9f3f5688acea061cebc8a2ff07 -test/extractor-tests/generated/BecomeExpr/BecomeExpr_getAttr.ql 88c6342cfaa4d199a6c9f69612d3f783ad48c715c729f4909d563e032ee50be3 d90c139b22bf7350f9ae32b8b3ae6c19bf190fb2b4d5154b845f2252090fde32 -test/extractor-tests/generated/BecomeExpr/BecomeExpr_getExpr.ql c8942270a2ff2b1b5c9ee4319185f0a8f1f8acb39eb825029c02a2457a8cd641 fb4c910ab658404869506718e18a5c8097629ba56111329552abbf429df0a324 -test/extractor-tests/generated/BinaryExpr/BinaryExpr.ql 1c36f72c679d4c0e7d0653bf5f7b70e3019d68e9115645f6db61f6fccabfeaf4 890b64875e44a73eec0d7c905de3363fffec3468171de628652b5066a4306bed -test/extractor-tests/generated/BinaryExpr/BinaryExpr_getAttr.ql 26d985ac4b668d78d2fefc6b5a37f2dc334e4c5f8511dd14b89014e2ef5c3b07 4546dae1816b2618f8d881e0ca8eaa851c768fcd994f3edd3285a3880878177c -test/extractor-tests/generated/BinaryExpr/BinaryExpr_getLhs.ql c3f19d8a60066ad6b1810291a669473c75b659cd2f6ac3ab9ed3db2203d4145c c05c5e0226e30f923155669ffc79cfe63af1ca464e8dfc85888dda5f7049711b -test/extractor-tests/generated/BinaryExpr/BinaryExpr_getOperatorName.ql 33612159be1c111e3306009d0b04579450fc962a81119b6ea4e255d3c409b401 1a0995b298f50242217cfef81dca8ac978e19e06f90a5f4caadcb6f84460fec2 -test/extractor-tests/generated/BinaryExpr/BinaryExpr_getRhs.ql 3bcd36b678e87d5c29a43b69c54c80468a89aefa7e69481b48158ae794a53160 a629dc1472b3f6fd7c608ff760e83d8e1363db81dfe9a4b2968690c2ba4925ca -test/extractor-tests/generated/BlockExpr/BlockExpr.ql 19caa39aaa39356219dda740b7152f85e43a4f8d6295841e2c535c7e3bda7a5a bd668574ba41021e758e391d4790b871439badb2486ccf6a5aaf788ad6ae4142 -test/extractor-tests/generated/BlockExpr/BlockExpr_getAttr.ql 15d4d9853d3262ce6ec629c075c60a76eb112dcafe34b71df0e09b39282223cf 792c498bc7079bb5b93034b8a87db3b275a591d78954e844821aeacffe4258ea -test/extractor-tests/generated/BlockExpr/BlockExpr_getLabel.ql de3c28a2677ed71ebd95207aa43ce270765f7f556283f095f1f6296622b80cbc 414ebbb2bfbe4350f933fc3d3636b49a6bb8242e200180780caf95ab8523adb0 -test/extractor-tests/generated/BlockExpr/BlockExpr_getStmtList.ql 8c391dfeb69bd92c547a2417bf231cc960a8f34845802722214294728772316a f3e847fa594e9d9cf25d09a0396a10176aad1100c1977a24756ff6287a79e69e -test/extractor-tests/generated/BoxPat/BoxPat.ql 228052e5303f523797994232b1b762c26ce29bd1e38b49d496ccf04090b97c00 6501e816dcb8839b9b72c6ab231db449b8f7779e5faadf5a8c5be81f53eb001f -test/extractor-tests/generated/BoxPat/BoxPat_getPat.ql 7372e29737d968820108211612ed880f3e13084992419f5b52eaddf4bbfa874c dda2f412fcfba756604c03b766e9bbd17e6c2141b2d355fc0e33ec33573ffadb -test/extractor-tests/generated/BreakExpr/BreakExpr.ql cdde2855d98f658187c60b9edc2aa36b1853270f3c183a37b11801ff24d22a8b 687ec032ff86ee21952d2b95dde93fba026a09f6f39a284fbc6e9b42647d80e3 -test/extractor-tests/generated/BreakExpr/BreakExpr_getAttr.ql c7690a9aab1923bf3c2fb06f0a1d441d480b3c91ee1df3a868bbbd96c4042053 c592dd077fb6e22b2d6ddcaec37da2c5a26ba92d84f5d1ae4c78a615b9013765 -test/extractor-tests/generated/BreakExpr/BreakExpr_getExpr.ql 0358f4fe6a66da56177703cf0e991042729c5e34ae8b6dccbb827f95fe936c72 1cb2dd778c50e19fe04c5fdf3a08a502635ea8303e71ff38d03aa7dc53213986 -test/extractor-tests/generated/BreakExpr/BreakExpr_getLifetime.ql ad83cc0db3c0f959fef6bb7ce0938d241a877e8cf84d15fb63879be2fe47238c 240b2fe2156b763d3a82fc64159615872db65b65ffb9ba2f3fd5d1ebd6c60f34 -test/extractor-tests/generated/CallExpr/CallExpr.ql cd38ec018b1afe9ae32ef94feca62295ad37c770c38b48a47bfb09697e7ee531 f6b0f2128cd5e63715f630c581d07b83678c298f7a7c56e38815e0d2c49ee36e -test/extractor-tests/generated/CallExpr/CallExpr_getArg.ql 7d8d53ee4a0642f85d6bbfee6912fead699b5d117534d2b1803a670550894484 1782b33724b72afc9b7d99e3a52cacd4431ce1e12a7e43a7ac9872aad769b4ee -test/extractor-tests/generated/CallExpr/CallExpr_getArgList.ql b022e7b6b6db9932e787e37b7760c6a09c91140a0368940374a2c919688e0488 c20849c96b53c96f6f717efff5e8b4c0e900c0ef5d715cfbaf7101c7056ad8f4 -test/extractor-tests/generated/CallExpr/CallExpr_getAttr.ql 1ace458070875b9ff2c671c2ee18392ea7bf6e51b68ee98d412c8606e8eb8d33 4c35da8255d2975cef4adee15623662441bb8f2e1d73582e4c193d1bc11cc1b5 -test/extractor-tests/generated/CallExpr/CallExpr_getFunction.ql 060a6c8b5b85c839b14fe96f9e50291a7a0e5662a945f4f337070f782ec76715 e9a1e44433936146d87be939aa160848b9a7d7333c36da601fb7d1a66d71eb59 -test/extractor-tests/generated/CastExpr/CastExpr.ql f8d889de678f09c32b8e999a1667aaa38366a005d37a537883bce7ea576aad66 488f8285d6af8644968c19488ada65c8f4b7fd82f57271cb290b4896a675d2d7 -test/extractor-tests/generated/CastExpr/CastExpr_getAttr.ql 5d5d98172e495cdb8b5cea9d6588c4c245107b441464e3ffd6c27668af11ab4e 5820bf083aaa4c3275004a2cd9eeecc4b45ab96916cbc0655a1b42611c540715 -test/extractor-tests/generated/CastExpr/CastExpr_getExpr.ql c37186b8f3e3dab8ae28c0da7263ff7272c40501beb16736ec0fb8990d285e22 59d50d7349234afcf84986b7570db9dcd342e16812f7c46199d4736cdfa5462d -test/extractor-tests/generated/CastExpr/CastExpr_getTypeRepr.ql ab6b0a61adc404c89c0e2e1962236a8e703fdc5092512bb4a5d9995af8e13c7b 4e7f6b6f58a1ef34ed45e31e35154dd8dc59054ebedcaa87200c84cc727ef1dd -test/extractor-tests/generated/ClosureBinder/ClosureBinder.ql 42516df87ac28c814d65f6739b2ede6eaa41c505d64756a3b8c7e0ca79895230 8b840f92ec033a4ef5edbe52bed909d8be0fffddf6d3e4bfaf9a8bc174fa2f2c -test/extractor-tests/generated/ClosureBinder/ClosureBinder_getGenericParamList.ql 71010c43a78a7abe8e63c94353f4b7eb97aca011755d200e7087467c1e3b7a68 2c834328f783ec5032544a692f7e23975bac0228b52b9f8fde46ef46a5f22a5f -test/extractor-tests/generated/ClosureExpr/ClosureExpr.ql 4d5f40935d07b0b24d77b93f56e9cea47666c5a3de84744641f9a4cb5d8d1319 b9a235c0a2d6a254d15f1fd1d0c8fdb6a7af51487b3826f26d8ca7a3b6cbc9b2 -test/extractor-tests/generated/ClosureExpr/ClosureExpr_getAttr.ql f7f803afa4e2a5976c911fdf8a91ec607c2f998e22531b9c69a63d85579e34c3 1296acd0fb97e1484aa3f1d5ba09d18088001186f3ba5821eb3218a931ca0d54 -test/extractor-tests/generated/ClosureExpr/ClosureExpr_getBody.ql 22a973a61274e87620e38338b29beef395818b95a88e2261fff197f7a78a8f76 bd28ed426e4d07823044db869aa8022dc81e8599d156e3e0e7cd49be914a1f36 -test/extractor-tests/generated/ClosureExpr/ClosureExpr_getClosureBinder.ql cbfcf89b8efb5cb9b7bfbea26b5a78b3d4c7994cbf03d5ca60b61ee1b5cb4be5 621431277732ef79c585cb0b7199c49b14c597ee6b594a70d9e6966a09d40a9f -test/extractor-tests/generated/ClosureExpr/ClosureExpr_getParam.ql c87b61e80dd62e031e8b310d8a4b781a468ecf2e5e81662be400f18bf33c5862 22abbc976a0e6f33c32c0e93cd0dd567cead13d82d561b9214275ea01b4a0573 -test/extractor-tests/generated/ClosureExpr/ClosureExpr_getParamList.ql 68ce501516094512dd5bfed42a785474583a91312f704087cba801b02ba7b834 eacbf89d63159e7decfd84c2a1dc5c067dfce56a8157fbb52bc133e9702d266d -test/extractor-tests/generated/ClosureExpr/ClosureExpr_getRetType.ql c95bc7306b2d77aa05a6501b6321e6f1e7a48b7ad422ba082635ab20014288ae fe72d44c9819b42fff49b9092a9fb2bfafde6d3b9e4967547fb5298822f30bc3 -test/extractor-tests/generated/Comment/Comment.ql 5428b8417a737f88f0d55d87de45c4693d81f03686f03da11dc5369e163d977b 8948c1860cde198d49cff7c74741f554a9e89f8af97bb94de80f3c62e1e29244 -test/extractor-tests/generated/Const/Const.ql 8cae77fe63a0a64b2ff2f5e642711aa79ad29fb8705d877e195852ed148af67d 6178c888516d9d24aca14a8fdf1e94043e2a7f85332700c13f368b1e22f2bccb -test/extractor-tests/generated/Const/Const_getAttr.ql bd6296dab00065db39663db8d09fe62146838875206ff9d8595d06d6439f5043 34cb55ca6d1f44e27d82a8b624f16f9408bae2485c85da94cc76327eed168577 -test/extractor-tests/generated/Const/Const_getAttributeMacroExpansion.ql 82e86399d5cd72621dc8d9cd9f310d3dc7f2ecf208149dab0d202047ccbbd2f8 33df8c5b5044f49ec244e183c61c3b81fabd987f590ba6da4e18e08231343dc8 -test/extractor-tests/generated/Const/Const_getBody.ql f50f79b7f42bb1043b79ec96f999fa4740c8014e6969a25812d5d023d7a5a5d8 90e5060ba9757f1021429ed4ec4913bc78747f3fc415456ef7e7fc284b8a0026 -test/extractor-tests/generated/Const/Const_getCrateOrigin.ql f042bf15f9bde6c62d129601806c79951a2a131b6388e8df24b1dc5d17fe89f7 7c6decb624f087fda178f87f6609510907d2ed3877b0f36e605e2422b4b13f57 -test/extractor-tests/generated/Const/Const_getExtendedCanonicalPath.ql 3300b902e1d1f9928cfe918203b87043e13460cfa5348a8c93712d2e26d61ced 71e7b80d3290f17b1c235adaca2c48ae90eb8b2cb24d4c9e6dc66559daf3824c -test/extractor-tests/generated/Const/Const_getGenericParamList.ql 8bef3c83401a0a203d1e19a4dc652d2285870760cc2032a1b5745fae9fc3f29b 95b2f730daf19eb87b17a3f602ea3a71a1056c8f2a2328d7b46189cc82b29e4c -test/extractor-tests/generated/Const/Const_getName.ql b876a1964bbb857fbe8852fb05f589fba947a494f343e8c96a1171e791aa2b5e 83655b1fbc67a4a1704439726c1138bb6784553e35b6ac16250b807e6cd0f40c -test/extractor-tests/generated/Const/Const_getTypeRepr.ql 87c5deaa31014c40a035deaf149d76b3aca15c4560c93dd6f4b1ee5f76714baa f3e6b31e4877849792778d4535bd0389f3afd482a6a02f9ceb7e792e46fca83e -test/extractor-tests/generated/Const/Const_getVisibility.ql de6b2e9d887316e279b45fab7887980ca7d93fd32c2259f3a06de2b6e2957c12 2f135cdbbb84b43d282131edb7eb4df6caba61bf7421881a49d4679f0f44f661 -test/extractor-tests/generated/Const/Const_getWhereClause.ql 9458b25fd2567c92d1230afb844d81f1f9a9a7b4d164cbdf8b86455ef0d02251 8792f1a5cccaf77f6b1673dd5acd067acfb79f9a8a34a0769e0eb69ab89c9f16 -test/extractor-tests/generated/ConstArg/ConstArg.ql f1422b216eb45819ff41f0c19e0f88aa184ddd3fa2984ba22ec46df398147fc3 d2e4f367848c2bc4f6aef51c1dd8180035c39919430082c83f18a3f324228df3 -test/extractor-tests/generated/ConstArg/ConstArg_getExpr.ql 317fd83ad51acc3ff3dfab71ebb1385b67d49404c1d7b3804a8ca3c099b84e99 91ecf5ebbfc1aab286dce708680f0be97417f9755676db7479fa6836e50be845 -test/extractor-tests/generated/ConstBlockPat/ConstBlockPat.ql ee17b4deba9c503130e3ce565102bc8e181770efcb1309be9c822f0a7ba6fc17 638ed17b5c009e71b31f580c4060ba763bd4208c3984b6c032183ab46a4dd43d -test/extractor-tests/generated/ConstBlockPat/ConstBlockPat_getBlockExpr.ql cc06e762e1652e467c7cf02c34f17c621fb3a938f294ee527fa04ed78c8701ec f863f8f6bfc9d169b585ae56b4e4ac0fc1603fd14775450e950cca4d5ea28e8a -test/extractor-tests/generated/ConstParam/ConstParam.ql de4a92306dd3f65e0d308d34715f388815dc70955b819c627f5839cbd9d8b464 ff98827d3ab57bfc48356072de0172e8e1c2374dc6a086b1ad721b6d9e6038e6 -test/extractor-tests/generated/ConstParam/ConstParam_getAttr.ql af8949f1ea039a562a3b3561185a85f7f8a871bf27dba0580782f81c62b6508c 2874783b84fdce47b809f953e02c36473cad6a2d3dd1c0f1a9cb14a3e28b9c30 -test/extractor-tests/generated/ConstParam/ConstParam_getDefaultVal.ql 021630468422c30e7aa623bdf4e97f3076e68087991723c624922b1ee608d173 9fd78738cfd0455be2c655852f6c618e901af80c6b6791396d9683c118a44e91 -test/extractor-tests/generated/ConstParam/ConstParam_getName.ql e2e9b75dd7ce501793efce75079aabd3851b91aa4d437972693bacd7b04859d8 4d2326b39af870a2ef8b37448f78395cdb5c1e94df88f137ef71f8fd3548cd8e -test/extractor-tests/generated/ConstParam/ConstParam_getTypeRepr.ql f25a4695e06a6410264e979c7a4421253437cbab5837afafffbe69ecb384ce55 4b7ead1298ea0b5e12dfa2d75aa4732e1070c6880982a9cbaccc8d129956a232 -test/extractor-tests/generated/ContinueExpr/ContinueExpr.ql 971ccb238aec663855745fa2669d5f8973a4e6c76bacdf0deaf23522ec1cf80c 4e3ceb4c4cd833ad8311bb02e5cda18163082e341cd8a3def60734a53cca8929 -test/extractor-tests/generated/ContinueExpr/ContinueExpr_getAttr.ql acb261869d3b3c65e364e7b6fbd7afdf5305806d4417b05044beed9a81e66ea4 af35ce0aee87ddc7a0cd34be4a480c619940d036d5cecce0e4e1fcd75b7c553e -test/extractor-tests/generated/ContinueExpr/ContinueExpr_getLifetime.ql 39dae9872d92fa9b15343c93da545c2b0e15b4f27f2296c200fd4611b68858d5 52a209022e3b83260b4ef5513ffbcc1ca1f7c21bad2c721a0d3698793d2161d2 +test/extractor-tests/generated/Abi/Abi.ql 086ed104ab1a7e7fe5c1ed29e03f1719a797c7096c738868bf6ebe872ab8fdaa fe23fe67ab0d9201e1177ea3f844b18ed428e13e3ce77381bf2b6910adfa3a0e +test/extractor-tests/generated/ArgList/ArgList.ql da97b5b25418b2aa8cb8df793f48870c89fa00759cdade8ddba60d7f1f4bbc01 acfd5d2caf67282ad2d57b961068472100482d0f770a52a3c00214c647d18c75 +test/extractor-tests/generated/ArrayListExpr/ArrayListExpr.ql 42b365276aa43e2cad588338463542d3ce1dd0db3a428621554584b07a1431d5 08a66a8b69af35ee3bc64c35c453a19a6c9881cc6cc7e65275d1fff056121270 +test/extractor-tests/generated/ArrayRepeatExpr/ArrayRepeatExpr.ql 339629d69e2d7db153e2c738d70d2df33f395ae2377f07eb247132ede87b9899 07e0611667c09456241aabf80dc420fe1f5c13b1bce324da92e6b18d250c3896 +test/extractor-tests/generated/ArrayTypeRepr/ArrayTypeRepr.ql b262300235ab5bf4fe7712c0208390c7e876413a37a433340fbc078318233e83 68cfb18e8fb73b53cf8a8e73e8bf5e7ba11f32ca6b4695a64ebab51ac7d58d1b +test/extractor-tests/generated/AsmClobberAbi/AsmClobberAbi.ql adfcfcdc6ac2a9a4849ea592e37da4221b6279cf2ea1112d32b6c89fda33e85e 7438490536e27b7173dec731f6925531a0e3fa839639c97a53905ba72d7efbe5 +test/extractor-tests/generated/AsmConst/AsmConst.ql 82f322fc8a01f4ccc86b3ecca86a9515313120764c6a3ac00b968e4441625422 62831f204c5c2d0f155152c661f9b5d4a4b685df6e40693106fbef0379378981 +test/extractor-tests/generated/AsmDirSpec/AsmDirSpec.ql 518a739c91481f67b27bfd1989d9dcbada12de54901eb6d598c896cd72f1f5fe 4567661eecf475fb05e13749b9250bcec51056b6db5a6ae7df24b7ba5cfb88c2 +test/extractor-tests/generated/AsmExpr/AsmExpr.ql c6c0128b252a13d5acea9a07b3854625aa51ebcce9dd93c11b423c9929d441fb 7618977e43f202af5b7d21b67531c4795bb791abe3cb03ba4077913c430b31d5 +test/extractor-tests/generated/AsmLabel/AsmLabel.ql 130bf49dc1f5ae79e3588415b9a4c25dfdcbcac1884db9b2fb802a68e33180e5 c087e47d8953d312488fcc0b1bcbfca02521e3683e2063eaf380d76399bca037 +test/extractor-tests/generated/AsmOperandExpr/AsmOperandExpr.ql e866fd4715e78511352bb286c1120cbd52c4d960664d57dd99f0380eb1db7109 081d6a6267a3e251a123099b4c1e7d3c5a3b56e0efe9db7c7db24db1c08b7e0d +test/extractor-tests/generated/AsmOperandNamed/AsmOperandNamed.ql fb1eb1f275ad251ba2e0876cf1d097bb33f20d06b0e50f8c01f7c11c71057688 e308567ffd18671cf172853a5c594f0f211d492c7e2fb58be412703d1b342b41 +test/extractor-tests/generated/AsmOption/AsmOption.ql d613c40391f4985414cc3541f900b6e3f5f9ef157d2bfb96a773710af4b059ed 8450ef57a5a891db514e8340151d161e515b59ae7b963fd5eebf3bf862eaff08 +test/extractor-tests/generated/AsmOptionsList/AsmOptionsList.ql e0e76f1d6e454c60db632baabd29642f315c4bf9284bab9ff8368604df15e77a 8450851f062232e7ea92845f406287f945c16e1e1a69a3189773e6e86df8a64f +test/extractor-tests/generated/AsmRegOperand/AsmRegOperand.ql 4ad6aa224e980602aaa77a601bda1065b1814249d889b54eda4da99dfcb53a8c b2503095957c7e3cdd345e8ccc594aa0f7590954e64a831660aed9a515f74d80 +test/extractor-tests/generated/AsmRegSpec/AsmRegSpec.ql 3ae5068254b83bc4663230d2d21f16e189d213acbb4f25924819288b433d4a7c eea94d02b9bccb20d9ac9627667b84eeb486b5976b1b37fa0b94767c83c44a3e +test/extractor-tests/generated/AsmSym/AsmSym.ql b3dadbd288d92dad7517f7997aa3e5974f807a30793486d174bfa9cc67128fc3 4f82ca31ef7e5a7d9a86567516a257a212ecca911c02d9a67de792ae66960def +test/extractor-tests/generated/AssocTypeArg/AssocTypeArg.ql 553cf7850a60985438e85079d3b55ec821fff6912d2076c2847e19626e9443c0 6c1c52cc2d4823b450bf3f3c9b166514863155f842faeaeae4bac8587a63efc8 +test/extractor-tests/generated/Attr/Attr.ql 88f9a524b557e81006a5079ac6d703c42df03ee510b7bc10cd22b481275d1939 49580ff1d1c34fd2ff636b983a19a96af0e36da939b5ac556817a741bb3b0435 +test/extractor-tests/generated/AwaitExpr/AwaitExpr.ql 93ccb34e00b37deecd6d3019bb47948daffe55a2d5d031c60b4f6fa7a61412a4 5502459743efd8346ab943ff3334545407b21aaf0771bf422be58a5df5d27381 +test/extractor-tests/generated/BecomeExpr/BecomeExpr.ql 7076b3f965c680e8f03bccd9ecb4495d03d35a4f460ec43628c19314eae8b49e 961e6e656e467ba389bbc6db39f345d9a8afaae4584d357dfe47484c6afadb99 +test/extractor-tests/generated/BinaryExpr/BinaryExpr.ql 4e849e6eaae581f487aa74d09d1106e441c876b06474389687a04df446690a4d 6cd36dfdb0af25396d2219fe2789f898e2393cc3f10a25410b2ede5d216707cd +test/extractor-tests/generated/BlockExpr/BlockExpr.ql cd6ef66de9e56ebb74964e59617d47999fb8c9081e885acece17a3b747a35ae1 6766844c1b87e518688565f2469575af5ca4e0ff4eb0c0b620df73a451d86a0b +test/extractor-tests/generated/BoxPat/BoxPat.ql 854c9ba4e045dbe7ea1666866c1c443a92597df0ce02f4ca5993142925941c39 a22c17cce0bff7d1df51b817d2cb1a61045357f91be14465166971efa5f5daad +test/extractor-tests/generated/BreakExpr/BreakExpr.ql c2181211da3dfe983cfca93ead32d5d211e91181899b9477152c58124eaa846d 57e57b926e14db2efb2e88e04699608b2ba9797ee4f6c4f710135b6858982256 +test/extractor-tests/generated/CallExpr/CallExpr.ql 2a1cd4485ccd8d4eb24a75889e832612adef9bb7feae414c90572796380bc6d7 95060b92aa04d7ad1fc6603c5ec14a275a5788ecb5a19932732e28105607a3b7 +test/extractor-tests/generated/CastExpr/CastExpr.ql 3480ec51072399409b7553ab6139c832db6ed4ca991f3a7a2282a39afe07c6f2 614c8ea7a2fe30d57583dbf84ed7a12743c2aba49d8c6252d31af3ed10853a39 +test/extractor-tests/generated/ClosureBinder/ClosureBinder.ql b68285fec6224b156754f51ee75a9b7ed32edaa16527e6f657a73bf6dd97eba3 d02b1b6d66dea1da892447d7b309f9b6e4eda0dd02055d71706d52aa73b5b9c4 +test/extractor-tests/generated/ClosureExpr/ClosureExpr.ql 849c874de45781b8491cee428cc00fefc8cdc76f87de8a373a181b16ce930ab1 5e570193befae7bfe6c21ce91e20afd52bb94f234e2be89d0974bd6337221508 +test/extractor-tests/generated/Comment/Comment.ql 0e0454911d2cf2e7ef5c6d860b84c57b9d490090914ebcf4fa0e8a70f777f066 cbd1c195276ef163f8d3c122344738c884dc9fb70eb2f9b7067829d735d48c4c +test/extractor-tests/generated/Const/Const.ql 28a0f2debbf73ae867fc2d08d8e54d9e96fea69522b7180a48495c9b7fce9367 54d4a68a2b67db95ceb856535a8b27860ce2b502da17a7eeea3bb554d7fb5e43 +test/extractor-tests/generated/ConstArg/ConstArg.ql 21c7caf1939ff9fcc1bf0fe6dec5c6a6929f714cf1e17faf7a2f4a31c910194b 61eac00f4727f7269f926c53f53a62b5fae82ce7a02b42d23b9de6337b6f9d6e +test/extractor-tests/generated/ConstBlockPat/ConstBlockPat.ql e2198f9ef913f7ecb9e96a4e5e4849737b664dbdf1ef67428d372ea1c29bbb35 c49aaaafd65c4dfadd1fae42a2078dba90bbd3fa1bcb09b88501c5085ab22c49 +test/extractor-tests/generated/ConstParam/ConstParam.ql 6facb2402e1cbf23d836f619ef68e2d8496b3c0c438e71266de24d8690852468 211ed6f7384f86d849f559410b2ac09da3df278bdeea9e77c4d9c26a727a6990 +test/extractor-tests/generated/ContinueExpr/ContinueExpr.ql 58b5046a4da06a4cd2d942720603313126888b2249b218bef6f7c44ca469ccfa eeb84a04deb4c4496b7f9b38798cc7fdc179a486c8beaa0b33bf87e7f9482b1a test/extractor-tests/generated/Crate/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 -test/extractor-tests/generated/DynTraitTypeRepr/DynTraitTypeRepr.ql 513d64b564f359e1022ae6f3d6d4a8ad637f595f01f29a6c2a167d1c2e8f1f99 0c7a7af6ee1005126b9ab77b2a7732821f85f1d2d426312c98206cbbedc19bb2 -test/extractor-tests/generated/DynTraitTypeRepr/DynTraitTypeRepr_getTypeBoundList.ql b20720ff0b147d55cea6f2de44d5bf297e79991eaf103938ccd7ab9d129e9656 eb8c9db2581cea00c29d7772de0b0a125be02c37092217a419f1a2b6a9711a6c -test/extractor-tests/generated/Enum/Enum.ql 7c96c17f4adae679a7a8b097c5bfb26978263398b77dfa6e5b0e7f547d8bbd64 18375fad5a3d574c627b563529fa9c03f7d140e872ce7db81895fcb8da87f001 -test/extractor-tests/generated/Enum/Enum_getAttr.ql 8109ef2495f4a154e3bb408d549a16c6085e28de3aa9b40b51043af3d007afa7 868cf275a582266ffa8da556d99247bc8af0fdf3b43026c49e250cf0cac64687 -test/extractor-tests/generated/Enum/Enum_getAttributeMacroExpansion.ql 571ec6396fb7fc703b23aab651b3c6c05c9b5cd9d69a9ae8f5e36d69a18c89d3 c04025992f76bce7638728847f1ef835d3a48d3dc3368a4d3b73b778f1334618 -test/extractor-tests/generated/Enum/Enum_getCrateOrigin.ql 76d32838b7800ed8e5cab895c9dbea76129f96afab949598bebec2b0cb34b7ff 226d099377c9d499cc614b45aa7e26756124d82f07b797863ad2ac6a6b2f5acb -test/extractor-tests/generated/Enum/Enum_getDeriveMacroExpansion.ql c7d3c2f1661a0a39bacf7f4977bd484133d9ee3934956d33f77ae1c83145b027 f5e374a3b620d3ef69bcc23123598179bcb4f1167dd29c18c84ad05c94c7957b -test/extractor-tests/generated/Enum/Enum_getExtendedCanonicalPath.ql 001bb634adc4b20afb241bff41194bc91ba8544d1edd55958a01975e2ac428e1 c7c3fe3dc22a1887981a895a1e5262b1d0ad18f5052c67aa73094586de5212f6 -test/extractor-tests/generated/Enum/Enum_getGenericParamList.ql 2a858a07195a4b26b8c92e28519995bd6eba64889bddd126e161038f4a8d78e0 db188f238db915c67b084bc85aa0784c6a20b97b5a5f1966b3530c4c945b5527 -test/extractor-tests/generated/Enum/Enum_getName.ql 32a8638534f37bfd416a6906114a3bcaf985af118a165b78f2c8fffd9f1841b8 c9ca8030622932dd6ceab7d41e05f86b923f77067b457fb7ec196fe4f4155397 -test/extractor-tests/generated/Enum/Enum_getVariantList.ql eb30e972b93770be1b64eb387814b99b3901e8884dd74701c5478574242f5269 43e2f53c339f27e71954a96e218f6fc8a631b827457f718693eb2c79737b6cb0 -test/extractor-tests/generated/Enum/Enum_getVisibility.ql 7fdae1b147d3d2ed41e055415c557e1e3d5d4c5ec0da01089c0a8a978782f9cb d377397b4d9a3f34aed2a1790d1e826c9f77b60d65d3535b7738f21c41e1a095 -test/extractor-tests/generated/Enum/Enum_getWhereClause.ql 00be944242a2056cd760a59a04d7a4f95910c122fe8ea6eca3efe44be1386b0c 70107b11fb72ed722afa9464acc4a90916822410d6b8bf3b670f6388a193d27d -test/extractor-tests/generated/ExprStmt/ExprStmt.ql 811d3c75a93d081002ecf03f4e299c248f708e3c2708fca9e17b36708da620e5 a4477e67931ba90fd948a7ef778b18b50c8492bae32689356899e7104a6d6794 -test/extractor-tests/generated/ExprStmt/ExprStmt_getExpr.ql e269bb222317afe1470eee1be822d305fc37c65bca2999da8d24a86fa9337036 088369d6c5b072192290c34c1828b1068aeedaabdae131594ca529bbb1630548 -test/extractor-tests/generated/ExternBlock/ExternBlock.ql 237040dfe227530c23b77f4039d2a9ed5f247e1e8353dc99099b18d651428db2 49c8672faa8cc503cc12db6f694895ee90e9ab024a8597673fd4a620a39f28cf -test/extractor-tests/generated/ExternBlock/ExternBlock_getAbi.ql 9b7c7263fcbc84e07361f5b419026a525f781836ede051412b22fb4ddb5d0c6a c3755faa7ffb69ad7d3b4c5d6c7b4d378beca2fa349ea072e3bef4401e18ec99 -test/extractor-tests/generated/ExternBlock/ExternBlock_getAttr.ql 78ed6a2d31ccab67b02da4792e9d2c7c7084a9f20eb065d83f64cd1c0a603d1b e548d4fa8a3dc1ca4b7d7b893897537237a01242c187ac738493b9f5c4700521 -test/extractor-tests/generated/ExternBlock/ExternBlock_getAttributeMacroExpansion.ql 39b006e3acb71272cd0f211d37048949c41cc2cdf5bad1702ca95d7ff889f23f 2fceb9fa8375391cfe3d062f2d96160983d4cf94281e0098ab94c7f182cb008d -test/extractor-tests/generated/ExternBlock/ExternBlock_getCrateOrigin.ql 5a2e0b546e17a998156f48f62e711c8a7b920d352516de3518dfcd0dfedde82d 1d11b8a790c943ef215784907ff2e367b13737a5d1c24ad0d869794114deaa32 -test/extractor-tests/generated/ExternBlock/ExternBlock_getExtendedCanonicalPath.ql 40d6ee4bcb77c2669e07cf8070cc1aadfca22a638412c8fcf35ff892f5393b0c e9782a3b580e076800a1ad013c8f43cdda5c08fee30947599c0c38c2638820d6 -test/extractor-tests/generated/ExternBlock/ExternBlock_getExternItemList.ql 2c2b29bdfdc3b27173c068cbaab9946b42053aa14cf371236b4b60ff2e723370 dfc20fc8ef81cdce6f0badd664ef3914d6d49082eb942b1da3f45239b4351e2f -test/extractor-tests/generated/ExternCrate/ExternCrate.ql 25721ab97d58155c7eb434dc09f458a7cb7346a81d62fae762c84ae0795da06d d8315c4cf2950d87ecf12861cf9ca1e1a5f9312939dce9d01c265b00ba8103fd -test/extractor-tests/generated/ExternCrate/ExternCrate_getAttr.ql cbe8efdfdbe5d46b4cd28d0e9d3bffcf08f0f9a093acf12314c15b692a9e502e 67fe03af83e4460725f371920277186c13cf1ed35629bce4ed9e23dd3d986b95 -test/extractor-tests/generated/ExternCrate/ExternCrate_getAttributeMacroExpansion.ql 254a0be2f36e593f1473dfc4d4466a959683a4c09d8b8273f33b39f04bb41a7b a087003503a0b611de2cd02da4414bb0bbbc73ef60021376a4748e0e34a44119 -test/extractor-tests/generated/ExternCrate/ExternCrate_getCrateOrigin.ql c0bf9ba36beb93dc27cd1c688f18b606f961b687fd7a7afd4b3fc7328373dcfb 312da595252812bd311aecb356dd80f2f7dc5ecf77bc956e6478bbe96ec72fd9 -test/extractor-tests/generated/ExternCrate/ExternCrate_getExtendedCanonicalPath.ql 88e16e2bbef466cec43ace25716e354408b5289f9054eaafe38abafd9df327e3 83a69487e16d59492d44d8c02f0baf7898c88ed5fcf67c73ed89d80f00c69fe8 -test/extractor-tests/generated/ExternCrate/ExternCrate_getIdentifier.ql 6ce362fb4df37210ce491e2ef4e04c0899a67c7e15b746c37ef87a42b2b5d5f9 5209c8a64d5707e50771521850ff6deae20892d85a82803aad1328c2d6372d09 -test/extractor-tests/generated/ExternCrate/ExternCrate_getRename.ql 52007ef7745e7ceb394de73212c5566300eb7962d1de669136633aea0263afb2 da98779b9e82a1b985c1b1310f0d43c784e5e66716a791ac0f2a78a10702f34b -test/extractor-tests/generated/ExternCrate/ExternCrate_getVisibility.ql d2c13d0c19a5ef81ca776f03a7259e743adbfa66ef440f7d402cd97391ecdfc4 c678f6ac0a075c1e0adc3768a344dbeebcf0d13e30878546094777e3fcdf92bd -test/extractor-tests/generated/ExternItemList/ExternItemList.ql 7596986006fe1084815ad47b7e1cb77c4062a8c0432c2e6234c974b8632ead40 23c30ea01dba595e6e1bfa384f3570d32df4310ec2e8dbeb9a20afab9edbbfc0 -test/extractor-tests/generated/ExternItemList/ExternItemList_getAttr.ql f9560f441efc30b65ad88e3d3d323f40cbe3862c04a9c044fb2ca16edac4f3ca 18138daa285c73d40e5caa03791a6133b44429bff4e14cb1f223d487cf1648b4 -test/extractor-tests/generated/ExternItemList/ExternItemList_getExternItem.ql 2f20a6a4f41babb7340dd366a8145bb7cc9ceb75812af8a6316d076a4eac3428 4f613a73604dfe3f0d32343156e8ae30f4295186ac4ef2f733c772e96821ffc4 -test/extractor-tests/generated/FieldExpr/FieldExpr.ql bac5eb23ef2e6a69b3b898a486c2c498bd8a92233116224faaf9039225cf33bb 23a4a86b6235571b3af8a27ad88b4e163d9dc568a23b948d690662089c55e26b -test/extractor-tests/generated/FieldExpr/FieldExpr_getAttr.ql 609c4f1e275d963cf93a364b5ec750de8cb4790abdaa710cb533ff13ab750a4e 8c2aa84b1ea6ef40a7ee39a2168baf1b88323bfbc6b9f184e7b39631765a48dd -test/extractor-tests/generated/FieldExpr/FieldExpr_getContainer.ql 747b7de5f2bc23f526e96611401c897d063625912dc90544a4c57e2732c0766a 1528b998f6480bb1fd089c0115137c3a39fcfabc73d30917784a5d7ed5ef2990 -test/extractor-tests/generated/FieldExpr/FieldExpr_getIdentifier.ql 61fcbae168878f655bb35e8f1af8536c82acf02068bf782e5abdb7b780136ef9 5716c109cfbc996e884a7fbba8800cb770930060cc5c4d70c0bd434e37f2bbcb -test/extractor-tests/generated/FnPtrTypeRepr/FnPtrTypeRepr.ql 277dc617dd193f414c777e85db358f6dc5ebd7c029ac321d92fc6f1036da6abf 2c1a245975852e010552b0e0157b0daac7137cb25aa059fa5cc3adb43544a52a -test/extractor-tests/generated/FnPtrTypeRepr/FnPtrTypeRepr_getAbi.ql c4a7519f9ab86de609a0155d41a0fd6cdfab6bbd7ffc41f3d5ef49565bdb5825 a0404f9a702f007d78f24291e80e939ce3ed2b603e436998dd1337f978499137 -test/extractor-tests/generated/FnPtrTypeRepr/FnPtrTypeRepr_getParamList.ql e097544fa9a1c173a996f323a90aa2b82aa6f12f30cd602fbcf0d4bfaf136311 6b5f8a4e4bee41343d075561005442c89b2b16ba547226f54c060c206b0b9e26 -test/extractor-tests/generated/FnPtrTypeRepr/FnPtrTypeRepr_getRetType.ql acd208155569ff3e9f4560f274560f1fb08585f18bfde74f3a011b469a492096 fc624e3dbe69fbda31ffcf86398213423cfabc4da33ae5099caed1f3751dad25 -test/extractor-tests/generated/ForExpr/ForExpr.ql 1f8b7a9bbe7a8c077864be64dc51d91ec267c4f34f1cad80fc79902cc0af04ff ae999fb206b04ed81fa08bdd7617cbfe932c5e4109285e10108613cdebba8f7a -test/extractor-tests/generated/ForExpr/ForExpr_getAttr.ql d3399b7453e10ff48efc79ec38dd9b6e06bb472b9c39f559242d003e7f63b1d9 ba37e6bf129e1c2f9094e093bbfbf41864f2cb7725a64334f9443270dafdbfdc -test/extractor-tests/generated/ForExpr/ForExpr_getIterable.ql 90a6540f8a91cfe3ed1bdde1e680786ce5a00edbb797a8fe70bcc0507c438fcc 65c67ad5890aa502628ee73efd26bcbd4597a8bdfc9839233ede9e26393638f8 -test/extractor-tests/generated/ForExpr/ForExpr_getLabel.ql ce90da75e040f448d524187357f3ceededba72407a84c1dc8e1498ed9788044d 0e23d43e0b3412fe90c6a5a4331f8da85eebe19e05b8c7d9710056857280797b -test/extractor-tests/generated/ForExpr/ForExpr_getLoopBody.ql 21657e470752bd83e05e176c2ca9371ba0f7ca3d1f97f764a42dff3caeb46ff2 0cafad7adf79ce90f475465b4a144e6529c6345504282b1ba3c6a12ff2e99892 -test/extractor-tests/generated/ForExpr/ForExpr_getPat.ql 1e0205a9b3a58fd2ddba49ef1b13a82c812519604d4c5bc02f23cbb6ce960016 d00efc63d714b1c76e4b0a67195d4e605f43a1e49d469f4f18bfa18d12280b63 -test/extractor-tests/generated/ForTypeRepr/ForTypeRepr.ql 38fa18958dc8c1564abf0c38ebc7e76bc64904f9774a99e46504f903e9c19379 8384e007868981dcd8120f4ef52475ca99641a530a487cd9dc7eba98b9391060 -test/extractor-tests/generated/ForTypeRepr/ForTypeRepr_getGenericParamList.ql 33535c02c7000e89e4d4e4560499b9512455fae407e72e05615b38f9e950c6bf 35a6aa7de0f627fb96ca7f4f2134b060a820327a3de4970fa2790c8fbea28a2c -test/extractor-tests/generated/ForTypeRepr/ForTypeRepr_getTypeRepr.ql f24d02c57af9f4fb4f5c3058e236a8d9b4c4f6f2aff84e65497f693309bdf93e 1c93d6214ee0a89e2bd5d0e02800e29e8a14ebd7efdb6a62380edb97dc902def -test/extractor-tests/generated/FormatArgsExpr/Format.ql 6fa117eebe7ec99b71ffd10cf2cb2a21e67ab157f7c08feedabcc9bcc5390dce 9e7681c3bff55ed78d43ba6567f85bb98da6b166358951b1e972de1114750009 -test/extractor-tests/generated/FormatArgsExpr/FormatArgsArg.ql a521903c73f79e2616f7b8ef76790e11cbf432f8437825d52d117da232022b9e 4cb195d09ecb51e5bbd5c1c069ec1720f74fc074efc88b0f5c07cfc140167775 -test/extractor-tests/generated/FormatArgsExpr/FormatArgsArg_getExpr.ql 7e1a7f902fb661660760d2a2f3f4cb6818a0c9f5b5061ede6ae80223774e4e09 8a50f64cba6f56320631206c801160201e3c98e74367bb035d689baaa9b4e411 -test/extractor-tests/generated/FormatArgsExpr/FormatArgsArg_getName.ql 0e2f24388d516e14d195957163a2d5d97029c9e11a83ca71cf69e00ecc0bb2a8 dab2969f5ae6a15ec331c0152e7c116d1ee2c3d073b2d4da59ffbcb83404c65f -test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr.ql 7b6f09b23d0dffa19b8dddf7f5cfe53068f8a8e5279e235c6d54e60616bd0822 47db74f035770ce708a00355acbfd4ae99152b7eb29cf28001985806a4efe5aa -test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getArg.ql 8f692486be1546b914b17abdff4a989dfbaa889bfa1fc44597f4357806c1a1dd da9fd237e31e9c8dd0ef0c3c968157815b87d3e8dcdfd74674c988ce2ab6d270 -test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getAttr.ql 1f9bf1344f942e65c3a3591b6ae04d3f5a2a1a65459bce0d976698de7d8a5958 02acb861d8ab4d32cf144c589881a888c3da5e2ade27e8c85fec3ae45219bb3b -test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getFormat.ql 02d3fad540700966488b24c62dcf200548154a2f10f578ee2995d8c4ebe32287 cccfe779b9804c2bb968a2b1f54da8a72393805c2c8b31d7160e8538f2f335f2 -test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getTemplate.ql c912ac37275cbe7b3b29607bed1a3190c80779436422c14a475113e1bfd91a54 ef90f67a9b952a38ce557b1afbf0b5ce8551e83ddfaad8309a0c9523e40b5ea7 -test/extractor-tests/generated/FormatArgsExpr/FormatArgument.ql 7a7ee3a3322b4af8cb3b525cfed8cc9719d136ea80aa6b3fb30c7e16394dd93f 5aa8a77d7741b02f8ceb9e5991efa4c2c43c6f1624989218990e985108dae535 -test/extractor-tests/generated/FormatArgsExpr/FormatArgument_getVariable.ql 7bd4ec3dde2ef0463585794101e6cc426c368b0e4ab95fbb1f24f8f0a76cf471 e7b01e8b21df5b22c51643e2c909c6fc4ca96fda41b3290c907ba228abe8669b -test/extractor-tests/generated/FormatArgsExpr/FormatTemplateVariableAccess.ql 2793ba1ff52182dab992d82d3767a000928f6b2fbfdb621349cafc183f0d2480 c3777d03214f7feb9020de3ce45af6556129e39e9b30d083de605b70ab9a0a12 -test/extractor-tests/generated/FormatArgsExpr/Format_getArgumentRef.ql 634efdffaae4199aa9d95652cf081a8dc26e88224e24678845f8a67dc24ce090 d0302fee5c50403214771d5c6b896ba7c6e52be10c9bea59720ef2bb954e6f40 -test/extractor-tests/generated/FormatArgsExpr/Format_getPrecisionArgument.ql 0d2140f84d0220b0c72c48c6bd272f4cfe1863d1797eddd16a6e238552a61e4d f4fe9b29697041e30764fa3dea44f125546bfb648f32c3474a1e922a4255c534 -test/extractor-tests/generated/FormatArgsExpr/Format_getWidthArgument.ql 01ef27dd0bfab273e1ddc57ada0e079ece8a2bfd195ce413261006964b444093 acd0161f86010759417015c5b58044467a7f760f288ec4e8525458c54ae9a715 -test/extractor-tests/generated/Function/Function.ql 66e6a81a80cdf30652f00fae1b060e93b9d7c61b08cb3d3c1cac16cad445e769 97ace9f51b9ae933c79484b06b92355164ff3582cadfc6e3bac5c00072cdeff3 -test/extractor-tests/generated/Function/Function_getAbi.ql e5c9c97de036ddd51cae5d99d41847c35c6b2eabbbd145f4467cb501edc606d8 0b81511528bd0ef9e63b19edfc3cb638d8af43eb87d018fad69d6ef8f8221454 -test/extractor-tests/generated/Function/Function_getAttr.ql 44067ee11bdec8e91774ff10de0704a8c5c1b60816d587378e86bf3d82e1f660 b4bebf9441bda1f2d1e34e9261e07a7468cbabf53cf8047384f3c8b11869f04e -test/extractor-tests/generated/Function/Function_getAttributeMacroExpansion.ql 17a346a9e5d28af99522520d1af3852db4cae01fb3d290a65c5f84d8d039c345 36fb06b55370828d9bc379cf5fad7f383cdb6f6db6f7377660276943ab0e1ec8 -test/extractor-tests/generated/Function/Function_getBody.ql cf2716a751e309deba703ee4da70e607aae767c1961d3c0ac5b6728f7791f608 3beaf4032924720cb881ef6618a3dd22316f88635c86cbc1be60e3bdad173e21 -test/extractor-tests/generated/Function/Function_getCrateOrigin.ql acec761c56b386600443411cabb438d7a88f3a5e221942b31a2bf949e77c14b4 ff2387acb13eebfad614b808278f057a702ef4a844386680b8767f9bb4438461 -test/extractor-tests/generated/Function/Function_getExtendedCanonicalPath.ql 0bcdca25bb92424007cea950409d73ba681e3ffbea53e0508f1d630fccfa8bed ff28c3349f5fc007d5f144e549579bd04870973c0fabef4198edce0fba0ef421 -test/extractor-tests/generated/Function/Function_getGenericParamList.ql 0b255791c153b7cb03a64f1b9ab5beccc832984251f37516e1d06ce311e71c2b d200f90d4dd6f8dfd22ce49203423715d5bef27436c56ee553097c668e71c5a1 -test/extractor-tests/generated/Function/Function_getName.ql 3d9e0518075d161213485389efe0adf8a9e6352dd1c6233ef0403a9abbcc7ed1 841e644ecefff7e9a82f458bcf14d9976d6a6dbe9191755ead88374d7c086375 -test/extractor-tests/generated/Function/Function_getParam.ql ef0b46453512fef08fbcc2a15bc14ae319bbc4810a4e4ce03a5ca3b1e8859ca7 ce36d3974059c1cd63eb1d6b76111985087f40dd4fe0c716a00aa9a178c712c4 -test/extractor-tests/generated/Function/Function_getParamList.ql f888802ab00defb58de59cc39d1e0518e3884db7eaf845f39dfa55befdda58b2 ba0d1a07676f1c987b820a3d126a563ecf9a3d53ac1115b87a5af487a8a03c3e -test/extractor-tests/generated/Function/Function_getRetType.ql b3a1ab90c8ebf0543e5db6a415896e44a02f984321f49bc409aec2657298942b cdfa37772e5026febb19c9bcd0d325688b0fbf2f6e7bba424b73eca38b9b3e38 -test/extractor-tests/generated/Function/Function_getVisibility.ql 490b0a369c809a757d4835b97becf617b0399f16a63a2b06258c9a227d5cc415 25ceff15d3cd03821e1cb2c04cb8894bcd101eeca62b66b54d1751b628107818 -test/extractor-tests/generated/Function/Function_getWhereClause.ql 37a44ce54bfa7e54dda5db2e5662d0fd70ad6e2caa07ffdedd923a6492b4c6a3 2ced4e49d19cf717b9bf26859fa20f94713b6438e817c63c29ccaf34bb5f373c -test/extractor-tests/generated/GenericArgList/GenericArgList.ql 2d3e37da2c02a88ec8a1f99baebf352196f84c76c093c6f851d2c2d2ee941e9a 1cd884cfbaf59a2da080f50d966dc511243055fcfdd08a61bdfb10cc5701e1aa -test/extractor-tests/generated/GenericArgList/GenericArgList_getGenericArg.ql 7f92dc62d814c39bc50dfd46c359540261fe433fcad1752ea2fe139a05071183 9863976c97c1b7c07d5d18d8ffee798b1c1b0223784a61066ee2c9ffc46c4979 -test/extractor-tests/generated/GenericParamList/GenericParamList.ql 5d04af9be32c5f8bdf9ec679b0acbabd58ff01a20f5543a0c7d4fe5c5773ebba 7e86c4d3ed64b9ef2f928abd22b593d72131862321096722df5150b5202a4a28 -test/extractor-tests/generated/GenericParamList/GenericParamList_getGenericParam.ql 7866ed49ebfca1cc1fffeec797329a592f52b4431a5d259aeb7120a7f4961c44 16d89dd05d9db1b1997f801d9e5ba2dd9389d13a3031c730414f3daf5fb7b12f -test/extractor-tests/generated/IdentPat/IdentPat.ql 1e61edbdff611193bbb497eeba8c35043e1d1c6d3359903be58382b1c95e39e4 6f3a288cc12ee24a9ff21ca2fe544838d66f6481e60539cf7d4a473e628e3c3f -test/extractor-tests/generated/IdentPat/IdentPat_getAttr.ql 02607c8c616dc94152777390f912fc1e6bb420cc3ea687397e31392848942aa7 aeb10434577815d9a9f0f45a1a448656323f05d5321ff07d435ca4a449527d53 -test/extractor-tests/generated/IdentPat/IdentPat_getName.ql b96a3dbca1bade052cad294d95f95504665ad0b14c7f5f9f8083486d0ee64026 28c851703250c25b518024add1052d3204271db3f89eddf862d9a1e122ee6eb0 -test/extractor-tests/generated/IdentPat/IdentPat_getPat.ql fea604fee0db39f83a3dadb4583cb53123c63351282bc3387b84f90477be19cb ef2e620ade30e0225f6bf1c84982d1b8f949ee0c2ced5edbd00e5547e0a81a7c -test/extractor-tests/generated/IfExpr/IfExpr.ql 1401ba0ed88e27d24e5dc3911bfcc2aee3e0f3da30981866bfec2c71c238e6b9 2bd7abeb5ab28418eb4155206696356cc484ed83705a3a215e0d779b632a521c -test/extractor-tests/generated/IfExpr/IfExpr_getAttr.ql f5872cdbb21683bed689e753ebe1c49cded210188883a5f846ab79c0b2147e1b 6cb3a47778c3116ee95f7aeac0e2dd640bbf0c07f8b65236e9040e139f02e5fb -test/extractor-tests/generated/IfExpr/IfExpr_getCondition.ql 5bab301a1d53fe6ee599edfb17f9c7edb2410ec6ea7108b3f4a5f0a8d14316e3 355183b52cca9dc81591a09891dab799150370fff2034ddcbf7b1e4a7cb43482 -test/extractor-tests/generated/IfExpr/IfExpr_getElse.ql 8674cedf42fb7be513fdf6b9c3988308453ae3baf8051649832e7767b366c12f e064e5f0b8e394b080a05a7bccd57277a229c1f985aa4df37daea26aeade4603 -test/extractor-tests/generated/IfExpr/IfExpr_getThen.ql 0989ddab2c231c0ee122ae805ffa0d3f0697fb7b6d9e53ee6d32b9140d4b0421 81028f9cd6b417c63091d46a8b85c3b32b1c77eea885f3f93ae12c99685bfe0a -test/extractor-tests/generated/Impl/Impl.ql 3a82dc8738ad09d624be31cad86a5a387981ec927d21074ec6c9820c124dfd57 8fabe8e48396fb3ad5102539241e6b1d3d2455e4e5831a1fa2da39e4faf68a0e -test/extractor-tests/generated/Impl/Impl_getAssocItemList.ql cf875361c53c081ac967482fd3af8daf735b0bc22f21dcf0936fcf70500a001a 0ad723839fa26d30fa1cd2badd01f9453977eba81add7f0f0a0fcb3adb76b87e -test/extractor-tests/generated/Impl/Impl_getAttr.ql 018bdf6d9a9724d4f497d249de7cecd8bda0ac2340bde64b9b3d7c57482e715b cd065899d92aa35aca5d53ef64eadf7bb195d9a4e8ed632378a4e8c550b850cd -test/extractor-tests/generated/Impl/Impl_getAttributeMacroExpansion.ql 526d4651f2bc703ee107f72b9940a3062777645d2421a3522429bf1d3925f6a2 c08c3d7501552987e50b28ab12a34abd539f6a395b8636167b109d9a470f195e -test/extractor-tests/generated/Impl/Impl_getCrateOrigin.ql 494d5524ef7bac1286b8a465e833e98409c13f3f8155edab21d72424944f2ed9 b238ef992fce97699b14a5c45d386a2711287fd88fa44d43d18c0cdfd81ed72c -test/extractor-tests/generated/Impl/Impl_getExtendedCanonicalPath.ql 3ab82fd7831d22c7ec125908abf9238a9e8562087d783c1c12c108b449c31c83 320afd5dd1cea9017dbc25cc31ebe1588d242e273d27207a5ad2578eee638f7e -test/extractor-tests/generated/Impl/Impl_getGenericParamList.ql 88d5cd8fd03cb4cc2887393ee38b2e2315eeef8c4db40a9bd94cf86b95935bdd 9c72828669ccf8f7ca39851bc36a0c426325a91fc428b49681e4bb680d6547a9 -test/extractor-tests/generated/Impl/Impl_getSelfTy.ql 2962d540a174b38815d150cdd9053796251de4843b7276d051191c6a6c8ecad4 b7156cec08bd6231f7b8f621e823da0642a0eb036b05476222f259101d9d37c0 -test/extractor-tests/generated/Impl/Impl_getTrait.ql 3319d2649b4a7f3c501c8e16a1a3e5d74057c94c02772d33f19b4030daf934d2 3acca9d040c3f1d90ed26b159dac71625bea689221e180c856a75c2bab95d286 -test/extractor-tests/generated/Impl/Impl_getVisibility.ql 2497bb8c867297e4c398473ee7f0ec3693f7e894b84819f6336d69bebcd3af5f d8be2e9535b06471fa873af13b0223cc79d30d63a3f5e27a0f64874d60dbf07d -test/extractor-tests/generated/Impl/Impl_getWhereClause.ql 269d4b0639db28a7535b2d745b11cda0885da7369f9cf4c4973a6ccc20c9960b c4baf89f68a173c1415baf90ddd9195e29784997a5ce45a36171485f6bb44c03 -test/extractor-tests/generated/ImplTraitTypeRepr/ImplTraitTypeRepr.ql 309d5bed6a2bee9f728727338401c9c48841bd31d917dabb837bd88b78289ece 223060ef89358483a7aafed567a7b657d37eee023c49032aa55ad08a17c9e31d -test/extractor-tests/generated/ImplTraitTypeRepr/ImplTraitTypeRepr_getTypeBoundList.ql 5e3561412a8f990e7f32fb99d40b82690a9281c850226fd301b9f656f7b9ad2d 4e23068d2635056a74f40bdfa809878e31a8172086f115985ca027055e8317b8 -test/extractor-tests/generated/IndexExpr/IndexExpr.ql 0a93213b755faaab84b7eccb5b8f3d8f8ba87910ad661f194e06917722dbf6a8 46497b3e92523c6c015373fe122678846618b45412b903323ff3644e37f2c52d -test/extractor-tests/generated/IndexExpr/IndexExpr_getAttr.ql 360dbf8e7d69c691a1f4c9bb0aaa7860a6b0f09b21a1d1a6db908ec7a7d7561a e50b942f7592cb944f607bd64f8e4d4abac30bdc53f73b4dc851e689dce61be9 -test/extractor-tests/generated/IndexExpr/IndexExpr_getBase.ql 841cacda1a1cd976229f2bd18dcee4315506105c2cb3789c30a7539fd6d49d0c 37a92e9151f10cf971b24f5af6e2ca6dccf87b6e0e0b2237a0564f97719a0d66 -test/extractor-tests/generated/IndexExpr/IndexExpr_getIndex.ql 1aa934524dd44009297ef89a657d1ba99304f6590514a0b0b51b2769780f8c20 a42f25640f0331318bbc8f44af133095580b8947309628511bf0b3675149506a -test/extractor-tests/generated/InferTypeRepr/InferTypeRepr.ql a9c92ce8e20e427de3651fe59e6cbbe1b7efa8db9ef9d836da254cf07509e4ef 5ee2cb6ffcdc1fd2a7c190b1a98bb7369c114d837f7e232d425563255b71ce3c -test/extractor-tests/generated/ItemList/ItemList.ql 6c1c8ef6da0fce64b1a5edbec98fe18910b0ecc390d1219cc08124ab51b13bf6 e94e5c8d1639c1ed2ba543a521a57a026e15ea6b339b6c6d4409dd30ae67a51f -test/extractor-tests/generated/ItemList/ItemList_getAttr.ql 24d7a764d4f8997bb77e93c21e6e5ba7256ed11657bd6479bf42458b8e89b52f a6b4df0cc6bf79ab3f98c93eabbbd3aaf11ec2506a0e894fa1f51be90191d71c -test/extractor-tests/generated/ItemList/ItemList_getItem.ql 6e129499f77f7dba287b2b31b58fe6d834559e27214797807bb29b2a401f1f7d e406c07421dd6382ea73308d9124c30e971591c9e4c797b3115955f22c93589f -test/extractor-tests/generated/Label/Label.ql 6a92a27d615dd9c380cb9d889eecf827fc3a26f4bef65c2374e5ffbd6a7ce6b3 a344e26bc6ef835f2fa818413ba518c23f956750f9a2232acb1ad77aab9df446 -test/extractor-tests/generated/Label/Label_getLifetime.ql 3d6ddc3b44182e6432e938d5c1c95e0281575e320d517e431f6bad7748efb93e 56d07e485cb5e4263443eb5a0d62d7d4456bb0c2748331b371e519bfe14d3b81 -test/extractor-tests/generated/LetElse/LetElse.ql bdf2b17d5efe6b9cb5bb4fcfe854a5fcd72443d39ae1e7981d2a0459c481e394 a14a611d0783ae38d631600c2bde7409f4e739ba2f284314b90ec9a21c23ab3a -test/extractor-tests/generated/LetElse/LetElse_getBlockExpr.ql 32c21ad843884944738a735f01e272032a347d1860fa6d27d17652c549f941b0 2bfd8a5e3d42eb1c73eb679ada847dd29f2f0657a0ad8ef15da126e54fff5ef5 -test/extractor-tests/generated/LetExpr/LetExpr.ql c76a0c4aaa73f4064207dacc8d2c649d3a5f8046c0f6e1aae985d2402a342e73 c5abe3845d4975d05c98ee6496732da384cdaca60ed49235776338e6dbe80b3d -test/extractor-tests/generated/LetExpr/LetExpr_getAttr.ql 911b143afebaa0a487b13d533f089c5b0eaf336a44a4cab42147c284338484ba 625c91fb6d8c2e3a9f13e5679cc0cd29329c6c2b213d2e1191e23db2b65841dd -test/extractor-tests/generated/LetExpr/LetExpr_getPat.ql bc0363f77bc2ba583619ab7d309293ace0ed6a851bfb9b886f75729f96eb40a8 bc0cd9233b7904d8cc7f9021377120f5f4bcc5c7aa28b1b55f17bc738c434d78 -test/extractor-tests/generated/LetExpr/LetExpr_getScrutinee.ql ee33d3bbaf0ee7cdf9bd7b800e9684b5ac7ce8cf1939378cd460cb0c5ea11742 5d69e727b3e9d1ab4ce9eef702a7b1911515469625056bce87fac1d27ba863e6 -test/extractor-tests/generated/LetStmt/LetStmt.ql 9f8cf125eae91b190e6f534541b5fb0a0ee2391803266e9d02ef5d605bcfed81 e5cb251e9fd1a0d22553fb9180f95c697d780f51f93121d2fd654210477641df -test/extractor-tests/generated/LetStmt/LetStmt_getAttr.ql 68f69c4c054514140c0f0833a170e9f3facf950bd7af663ac9019f6c88ba0ea7 ca54d25cc052289458c7e34e40f0304bca2c412cecfb407f31279262bd74c15a -test/extractor-tests/generated/LetStmt/LetStmt_getInitializer.ql 6a5f0eed3ce3e8cbc57be6ec2b4eed732f00e084108d21a61d9ab28b65e494ca a48b426b97a6c347ad04fe2e592cd25b5c66b2a6a299cbf8c0da03e14304fd70 -test/extractor-tests/generated/LetStmt/LetStmt_getLetElse.ql 21f8f1cbf725399da80c24c4d3ca27072758b76cbdfd726a7f1e851ea12e58fc c01a4eda22088184357288910fa41692f52486d60fbf7c0bc3b5b01f8f67fe07 -test/extractor-tests/generated/LetStmt/LetStmt_getPat.ql 978e4f7861c7b03e6f2a3a2f7ae82e9b72bb5ef000f111127cb583a04ea6f971 3c92dbb765dfb01c290413e538290b0b2bee5a83bcfee383d081f56202a784fa -test/extractor-tests/generated/LetStmt/LetStmt_getTypeRepr.ql 8bf8a99450b27bc97db90a323b19ab13cb266c0b6c4e7d0ccda80952f8f7987c 70227445fb87ea1afae10ced988bdfeff4a1edd3d9d787367a17ee121d31db0a -test/extractor-tests/generated/Lifetime/Lifetime.ql 07b093285b08fddc149cbce3047700072874efb29d55e591c86d53e6432a10a7 29437b1b20f6321870837c12348d165729312e164ac4fac1029c1000e48d311a -test/extractor-tests/generated/Lifetime/Lifetime_getText.ql 7b06b940145c3d1a1bb3aff67e8e106f902a737edf61ed91577cf3ca94606936 c70d6186c500fdf6bc9d9d028cf3ec093914e20ba9547a391203ac8c5df1d727 -test/extractor-tests/generated/LifetimeArg/LifetimeArg.ql 4a0c2166d9ba79c99d6be430a28f79d3e7e971dcd96777e02c3fec56cec3ffeb 158bbf0f06ad36c81704d11f6318f80a0f7dd9c1a71409980ca60cac49dbe9c4 -test/extractor-tests/generated/LifetimeArg/LifetimeArg_getLifetime.ql 050015eb1130bab1ff6fe7df6915a634e66e27f2c90609026aadb4287fcc0c3f e4f63abbbb7668aa36de0caa2bb38fdbb4ff198aafa312ab12c9667eea67f04e -test/extractor-tests/generated/LifetimeParam/LifetimeParam.ql 4848a1c83b138e3842a7dbd0edb416b1ea2985b77b92d45b6d02b9f8bb997b1d 75fd2beafd2076121edb435996743e4d32ee58f6999205c9dadcb84a7fa80860 -test/extractor-tests/generated/LifetimeParam/LifetimeParam_getAttr.ql d1ff2d3cd34bfc0f363bcd7638d4b9fdcc604c6a9c74da22359df1877a0cb26d 57b7654249890266ecfc9a325c27da84b8b3cf21666a74f38e6439ed7a0596f9 -test/extractor-tests/generated/LifetimeParam/LifetimeParam_getLifetime.ql 893879293bed44e7a259c7e501f8301b92be0e00665c0049cddfc7d027790284 ee74064414e6ec1299180aa00851b5f323053bf4bbc2c5db6c0bedbcc1388411 -test/extractor-tests/generated/LifetimeParam/LifetimeParam_getTypeBoundList.ql b1fb7f8e9fff999f7b0508951c089b2d6588a0960f172b67e7e111e64d608d49 fdfdd3a159033fca0549d6db97d681114e83f630982e72abbbf7cf1b2d77b4e9 -test/extractor-tests/generated/LiteralExpr/LiteralExpr.ql a5644e5cf8b03121a1bdee793083cfe27286a7ac67d6ab5f1733b1fa81c5b38c 711d44afb1d0fba47f355563a040f4b21ca63a1c59a73d9b6510715133fee5b3 -test/extractor-tests/generated/LiteralExpr/LiteralExpr_getAttr.ql 6e76da2bb7858f493641f91216ea28f22dc5825931841327e34330f11d20c8b3 3f10a510944ea049b636ffc2c6223c0a15fd9b528ada7ffce54fb70637640768 -test/extractor-tests/generated/LiteralExpr/LiteralExpr_getTextValue.ql 7049fec0bbbf0e048af1ff318f42f43d0f8a7354a5638dc21174c4ea725b54ce 2edc94cc0a7f58ec9808b63ddb4d20a3907c88e50bd9ffb14f0281b433f5621b -test/extractor-tests/generated/LiteralPat/LiteralPat.ql 3d3db6cad0eb13f84b69efa24a9f9a32d35c62582274d2751cc3ac54dca3b538 7feb64af87546ea64c139c61ac20176a99ad40b9949b361742a424b164fe6d54 -test/extractor-tests/generated/LiteralPat/LiteralPat_getLiteral.ql 2cb03a22220e99237d4f3cd94d5090757cd6e57df708d32e80bca3964507651f 4dd9a6c1e23ad9851d9aa8c42c79535f7a2c7224bbaaff286eac7fd04b39c6f0 -test/extractor-tests/generated/LoopExpr/LoopExpr.ql 37b320acefa3734331f87414de270c98ab3309fe069d428550738197e3498a8c e744c25640b5c46aab53ce5114b789e13319572b0c99d0f2bc3c177849e61541 -test/extractor-tests/generated/LoopExpr/LoopExpr_getAttr.ql d557c1a34ae8762b32702d6b50e79c25bc506275c33a896b6b94bbbe73d04c49 34846c9eefa0219f4a16e28b518b2afa23f372d0aa03b08d042c5a35375e0cd6 -test/extractor-tests/generated/LoopExpr/LoopExpr_getLabel.ql 0b77b9d9fb5903d37bce5a2c0d6b276e6269da56fcb37b83cd931872fb88490f c7f09c526e59dcadec13ec9719980d68b8619d630caab2c26b8368b06c1f2cc0 -test/extractor-tests/generated/LoopExpr/LoopExpr_getLoopBody.ql 0267f54077640f3dfeb38524577e4a1229115eeb1c839398d0c5f460c1d65129 96ec876635b8c561f7add19e57574444f630eae3df9ab9bc33ac180e61f3a7b8 -test/extractor-tests/generated/MacroBlockExpr/MacroBlockExpr.ql 03144a5448de91801037f3c1e6d29a230e18f9c077c718e5c3801a31cf593977 9a035e3f119b0e0c88fc4c775a032220a01680fbea2cc7f8e98180205b9bb8da -test/extractor-tests/generated/MacroBlockExpr/MacroBlockExpr_getStatement.ql 415a762768df2c850d21742daab5e53cd248dc3dc9652414b99737f1d5c5824b bdd2ba6c004ada34f26dac3bbc7abcd5fe250c77a97faa7fd71fb54a0dd4743a -test/extractor-tests/generated/MacroBlockExpr/MacroBlockExpr_getTailExpr.ql 8f6604c09e85da1a19b0f87340cebeb1cdf4e94b208305c7393082d88cf0b032 5081d9db5b38454fad1daad2f8972661bd2fb4cce2c815a560a15f8a7b9cfcee -test/extractor-tests/generated/MacroCall/MacroCall.ql 992e338a9c1353030f4bb31cae6ae4a1b957052e28c8753bae5b6d33dbe03fe9 863fbfd712a4f9ed613abb64ecb814b0a72b9ab65c50aa0dc5279d319249ae6a -test/extractor-tests/generated/MacroCall/MacroCall_getAttr.ql c22a2a29d705e85b03a6586d1eda1a2f4f99f95f7dfeb4e6908ec3188b5ad0ad 9b8d9dcc2116a123c15c520a880efab73ade20e08197c64bc3ed0c50902c4672 -test/extractor-tests/generated/MacroCall/MacroCall_getAttributeMacroExpansion.ql 60cf2c12ec7fc3b25ed2a75bb7f3da5689469a65a418ba68db0ab26d0c227967 7f71c88c67834f82ef4bda93a678a084d41e9acb86808c3257b37dfc6c2908d2 -test/extractor-tests/generated/MacroCall/MacroCall_getCrateOrigin.ql 3030e87de6f773d510882ee4469146f6008898e23a4a4ccabcbaa7da1a4e765e a10fe67315eda1c59d726d538ead34f35ccffc3e121eeda74c286d49a4ce4f54 -test/extractor-tests/generated/MacroCall/MacroCall_getExtendedCanonicalPath.ql 553b810f611014ae04d76663d1393c93687df8b96bda325bd71e264e950a8be9 a0e80c3dac6a0e48c635e9f25926b6a97adabd4b3c0e3cfb6766ae160bcb4ee7 -test/extractor-tests/generated/MacroCall/MacroCall_getMacroCallExpansion.ql 1416adaedf6a11680c7261c912aa523db72d015fbfdad3a288999216050380a6 10b87d50f21ac5e1b7706fe3979cab72ecb95f51699540f2659ee161c9186138 -test/extractor-tests/generated/MacroCall/MacroCall_getPath.ql 160edc6a001a2d946da6049ffb21a84b9a3756e85f9a2fb0a4d85058124b399a 1e25dd600f19ef89a99f328f86603bce12190220168387c5a88bfb9926da56d9 -test/extractor-tests/generated/MacroCall/MacroCall_getTokenTree.ql 1cbf6b1ac7fa0910ff299b939743153fc00ad7e28a9a70c69a8297c6841e8238 570380c0dc4b20fe25c0499378569720a6da14bdb058e73d757e174bdd62d0c0 -test/extractor-tests/generated/MacroDef/MacroDef.ql 13ef4bdde6910b09cefe47f8753f092ed61db4d9f3cece0f67071b12af81991c a68091e30a38a9b42373497b79c9b4bde23ef0ab8e3a334ff73bfdde0c9895b2 -test/extractor-tests/generated/MacroDef/MacroDef_getArgs.ql 61f11d6ba6ea3bd42708c4dc172be4016277c015d3560025d776e8fef447270f 331541eff1d8a835a9ecc6306f3adf234cbff96ea74b0638e482e03f3e336fd1 -test/extractor-tests/generated/MacroDef/MacroDef_getAttr.ql 0a30875f7b02351a4facf454273fb124aa40c6ef8a47dfe5210072a226b03656 8e97307aef71bf93b28f787050bfaa50fe95edf6c3f5418acd07c1de64e62cc1 -test/extractor-tests/generated/MacroDef/MacroDef_getAttributeMacroExpansion.ql bd076cf1bab968a1502467652d73259d1ce0fe7f8af73bdf914e2ed1d903adf7 4673df049b36082be9a5b325f6afa7118b930bccdb5689e57ff7192b21d07345 -test/extractor-tests/generated/MacroDef/MacroDef_getBody.ql 7b350f48e6f208d9fa4725919efd439baf5e9ec4563ba9be261b7a17dacc451b 33f99a707bb89705c92195a5f86055d1f6019bcd33aafcc1942358a6ed413661 -test/extractor-tests/generated/MacroDef/MacroDef_getCrateOrigin.ql 6c46366798df82ed96b8fb1efeb46bd84c2660f226ff2359af0041d5cdf004ba 8ab22599ef784dcad778d86828318699c2230c8927ae98ab0c60ac4639d6d1b5 -test/extractor-tests/generated/MacroDef/MacroDef_getExtendedCanonicalPath.ql d09b262b8e5558078506ec370255a63c861ca0c41ab9af3eb4f987325dadd90c cd466062c59b6a8ea2a05ddac1bf5b6d04165755f4773867774215ec5e79afa3 -test/extractor-tests/generated/MacroDef/MacroDef_getName.ql 6bc8a17804f23782e98f7baf70a0a87256a639c11f92e3c80940021319868847 726f9d8249b2ca6789d37bb4248bf5dd044acc9add5c25ed62607502c8af65aa -test/extractor-tests/generated/MacroDef/MacroDef_getVisibility.ql d858ccaab381432c529bf4a621afc82ea5e4b810b463f2b1f551de79908e14e7 83a85c4f90417ab44570a862642d8f8fc9208e62ba20ca69b32d39a3190381aa -test/extractor-tests/generated/MacroExpr/MacroExpr.ql 69445cf24f5bec5c3f11f0ebf13604891bb2c0dffe715612628e5572587c7a6c 5434db79d94e437c86126d9cf20bf1e86e5537f462a57b9bf6b22a2caa95cc40 -test/extractor-tests/generated/MacroExpr/MacroExpr_getMacroCall.ql 8859743e23b987225a6a1933054a1ed8f5f1442b61a769599e2efd143f4feb9e d2d336135ff4d2ea65e79430dee8d0f69f9d7818a674f5446903d986f3948b92 -test/extractor-tests/generated/MacroItems/MacroItems.ql 876b5d2a4ce7dcb599e022083ff3f2d57300bcb0ea05f61069d59ad58353ca69 61ea54d4633ef871d3e634069e39fbb2545f7dc2796fa66f8edbacd4e0aa4ef5 -test/extractor-tests/generated/MacroItems/MacroItems_getItem.ql 53fc2db35a23b9aca6ee327d2a51202d23ddf482e6bdd92c5399b7f3a73959b1 63051c8b7a7bfbe9cc640f775e753c9a82f1eb8472989f7d3c8af94fdf26c7a0 -test/extractor-tests/generated/MacroPat/MacroPat.ql d9ec72d4d6a7342ee2d9aa7e90227faa31792ca5842fe948d7fdf22597a123b7 74b0f21ef2bb6c13aae74dba1eea97451755110909a083360e2c56cfbc76fd91 -test/extractor-tests/generated/MacroPat/MacroPat_getMacroCall.ql 398996f0d0f2aa6d3b58d80b26c7d1185b5094d455c6c5c7f075f6d414150aa6 b4662e57cac36ed0e692201f53ba46c3d0826bba99c5cc6dfcb302b44dd2154b -test/extractor-tests/generated/MacroRules/MacroRules.ql 3c88db0c2ba65a1871340a5e940b66d471477852a1e3edba59a86234b7a9c498 98778dd95d029e4801c42081238db84a39e3ed60b30932436ea0fb51eedfcda1 -test/extractor-tests/generated/MacroRules/MacroRules_getAttr.ql 7de501c724e3465520cdc870c357911e7e7fce147f6fb5ed30ad37f21cf7d932 0d7754b89bcad6c012a0b43ee4e48e64dd20b608b3a7aeb4042f95eec50bb6e6 -test/extractor-tests/generated/MacroRules/MacroRules_getAttributeMacroExpansion.ql 461651a72e5f860864ed4342973a666efa5b5749b7fcb00297808352a93f86e0 8b18a507753014f9faf716061d2366f7768dee0e8ea6c04e5276729306f26ce0 -test/extractor-tests/generated/MacroRules/MacroRules_getCrateOrigin.ql fccedeee10ef85be3c26f6360b867e81d4ebce3e7f9cf90ccb641c5a14e73e7d 28c38a03a7597a9f56032077102e7a19378b0f3f3a6804e6c234526d0a441997 -test/extractor-tests/generated/MacroRules/MacroRules_getExtendedCanonicalPath.ql a0098b1d945df46e546e748c2297444aaccd04a4d543ba3d94424e7f33be6d26 3bab748c7f5bbe486f30e1a1c422a421ab622f401f4f865afb003915ae47be83 -test/extractor-tests/generated/MacroRules/MacroRules_getName.ql 591606e3accae8b8fb49e1218c4867a42724ac209cf99786db0e5d7ea0bf55d5 d2936ef5aa4bbf024372516dde3de578990aafb2b8675bbbf0f72e8b54eb82a8 -test/extractor-tests/generated/MacroRules/MacroRules_getTokenTree.ql 7598d33c3d86f9ad8629219b90667b2b65e3a1e18c6b0887291df9455a319cab 69d90446743e78e851145683c17677497fe42ed02f61f2b2974e216dc6e05b01 -test/extractor-tests/generated/MacroRules/MacroRules_getVisibility.ql 5306cc85f470d21ebcbe6e98436334b0bf5ba819a0ae186569ba7e88c31636c6 fcbf5c54e5a904767a6f4d37d853072aa0040738e622c49c9a02dec8739d6587 -test/extractor-tests/generated/MacroTypeRepr/MacroTypeRepr.ql 49c0dbf587f84023025f90d73d54f5320993f4db7dcc90e21eda53fc0b4d1f57 0a0712171db935c549a9cfddb6721c2c188c584a67be85409ffc3facf6c9a935 -test/extractor-tests/generated/MacroTypeRepr/MacroTypeRepr_getMacroCall.ql cae14884e549c74be4b600a264eb236993d7b8ddd86589a9116ee2ba18f181e1 1d4ae2d8ed9ce0d7635a2ae447b41a328e59e97c6df7827ee7d5cf62343e86e1 -test/extractor-tests/generated/MatchArm/MatchArm.ql 512aa404c94ba40b859564f07e9dffe6a5e687fafb039556e9145f4f3742981c 529f96e38cede8a26054f8981d4ba1d189c17d14d0f92d622eb20acd8f3d7e5d -test/extractor-tests/generated/MatchArm/MatchArm_getAttr.ql 4faf7a542702d13283262be7cb2e1cc3c862bc2e1953a460fd2bb5e75a7e9b1e 1d43f4d2a580d0ac309dd18a45a9693ab92107cafd817ccdb26fd7998728edf3 -test/extractor-tests/generated/MatchArm/MatchArm_getExpr.ql 116f02bef8650d27784a8657208e9215b04af9139d19a54952c6ba2523770f4b e0677aed6d53148e120fd0b03f4bc4fa108c6dd090f605c87b2e3ba413fb0155 -test/extractor-tests/generated/MatchArm/MatchArm_getGuard.ql 54e2c2805d54b353c9e36258ed750189846cd422dfb476c6eb52301860d7ff13 8fd408a3e9c6e5c138860144ba0f69dc2099a7a062e3bdf7d324c09df7d132f3 -test/extractor-tests/generated/MatchArm/MatchArm_getPat.ql b346bca229226414b32acc3d8ab0ae26647563fd79e1c434d1ef8d14bda2d65b e72eb69bb243c39fa997d17bb7060e2f82f2bb33d11a58caaae48f8372996704 -test/extractor-tests/generated/MatchArmList/MatchArmList.ql 14b5e110d48e2b77c85b7a188262e6a98300e0d4d507bb7ed9179c5802251dd6 4d091f06b12fef0fffe1c80a10f74438d8068f2fa09c50d5e240b6d140e60d90 -test/extractor-tests/generated/MatchArmList/MatchArmList_getArm.ql 4781d002538a92b7f40fb0ec3d61aeedb6348341ddc354bbdd3ff61b74d59767 ae0da9497a30ce006e03bdb70e0ee24b685df529ac15a7d99a6869b5f7d7b371 -test/extractor-tests/generated/MatchArmList/MatchArmList_getAttr.ql 4d7e6d152d2dbeb4c9f594becabea27d3b25fecbde40d791a2907c69cc0c9631 4be9be658bb22e1b764c4ebc8d6b99bf50fd939f35ea44fbb869056c14632bd4 -test/extractor-tests/generated/MatchExpr/MatchExpr.ql 2966bf0507c0d45db1b933442ce8f1c4e0a9d4212c53a768791665cd2e0927f0 8af3b87528b6dd4cd3ff4fc6d2d389b1a743f979d9ccacd0aff134b5a4376118 -test/extractor-tests/generated/MatchExpr/MatchExpr_getAttr.ql cb8057372dcf24dfa02896ebf4e60a0b757dc4742b94011edc38f5b898ed4d25 6809695c2d3ac3b92c06049c9b920e8c0e99ee1998a11a7f181f2b0ceb47c197 -test/extractor-tests/generated/MatchExpr/MatchExpr_getMatchArmList.ql d97055bcb0431e8b258b5ecdd98aa07cb24ece06b0cd658b697cd71da4ede8fc 5e9c03b2665ef6b2af98897996abb2e0a9c18d54eb64588340b8efbcee9793bd -test/extractor-tests/generated/MatchExpr/MatchExpr_getScrutinee.ql 0bfeb8f903fb23356d50b7edd80377f4a67045010ffbed04c835191b5bd62820 7dc8e38730ad72b4cea91c1f023cdbe83057053e8dbd077ff925c59e92744498 -test/extractor-tests/generated/MatchGuard/MatchGuard.ql 23e47ec1b13e2d80e31b57894a46ec789d6ab5ed1eb66bdb6bba9bd5ae71d3ef 7302f4a93108a83228e0ebd5b4a1bc6bccc1f6f0f3272054866fa90378c0dcc4 -test/extractor-tests/generated/MatchGuard/MatchGuard_getCondition.ql 8a79dd46798f111f8d0d5a975380b5cebe5e337267752b77b3718b268ba2773d 6691d8fb483f64fc7e3ad3f46e3129e0a1184d7beb9f83a1000acdbb081c8b5e -test/extractor-tests/generated/Meta/Meta.ql 16f163f00ba2bbaa0a8c6f3f6710c860a8f61d02d43321c78e05a10a3606e39b ba982c6bb93ddb4fc2c44d24635bd487128a5b1d1f885214044c989a21f4d05a -test/extractor-tests/generated/Meta/Meta_getExpr.ql ec9ec61f5be7d65c32775fb5c068daea04f9db7d875293ed99cc1b2481db041f 77a0c52f1cb6ddc8fdb294d637f9eda1b7301ffa3067f0fca6272d894f57d3ee -test/extractor-tests/generated/Meta/Meta_getPath.ql aa9d4145a4e613c51b6e4637d57e3b7d0f66e0bb88f4ce959d598870814c06bb 2087e00686d502c0e2e89c88eae0fb354463576a9ae4101320981d3fd79b9078 -test/extractor-tests/generated/Meta/Meta_getTokenTree.ql 1051c27ffd0d9a20436d684fde529b9ff55abe30d50e1d575b0318951e75bd34 983975672d928fb907676628384c949731da9807bf0c781bb7ec749d25733d2d -test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.ql 85d3b8c794167f87840469e03d21aa00daf0998c28028f1c8848c7c4bd895db4 fa368ce4543c2544ecd2e636ade8d92849741226599290f59e0138a4a479357c -test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArg.ql 10a88c3bf63dfb26f43b9cd1ed7fceef0f436ce2eff4b5a816da369bf5b775d2 ee3b5043719591b4048ec32e21bb5fb3a9f83f0420ef18c338fc0ac28d0e3240 -test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArgList.ql 180e0b1715f5cd2be0de01bff3d3a45594b495b8250748d40ff7108d6c85923d bdadcdbecca5891287a47b6dd6b2fda62e07457718aef39212503ab63bc17783 -test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getAttr.ql 2ce876a04a159efce83b863dffc47fbb714b95daea2b91fa6fbb623d28eed9ec 7bca1cd0e8fbceec0e640afb6800e1780eff5b5b402e71b9b169c0ba26966f96 -test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getGenericArgList.ql 655db9a0501b1ef20d604cc4cd9d708371781291443e8dec97b70ec2914601d2 2fc7df0eca22dcef2f9f5c86d37ee43452d372a4c0f9f4da0194828c82ba93e0 -test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getIdentifier.ql 13c08e67eda07ea9ddc6f22ab4fc7773185c0b700ae11d57b62e0c78a4dea2e3 cb812e282a77fa29c838ba939d342a29c360c263c5afa5aac4ad422a8176869b -test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getReceiver.ql 77407ac956c897ff7234132de1a825f1af5cfd0b6c1fd3a30f64fe08813d56db d80719e02d19c45bd6534c89ec7255652655f5680199854a0a6552b7c7793249 -test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getResolvedCrateOrigin.ql c22504665900715e8a32dd47627111e8cef4ed2646f74a8886dead15fbc85bb5 d92462cf3cb40dcd383bcaffc67d9a43e840494df9d7491339cbd09a0a73427b -test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getResolvedPath.ql 9e7bbb7ed60db49b45c3bdf8e01ec58de751889fc394f59ac33f9d6e98200aa1 c055d877e2ff0edc78cce6dd79c78b2881e7940889729cbb5c12e7029ddeb5a3 -test/extractor-tests/generated/Module/Module.ql 9e75a0f22f1f71eb473ebe73e6ffc618cbb59ea9f22b6e8bc85d3fb00b771c52 3eb5201ef046259207cb64fb123a20b01f2e742b7e4dd38400bd24743e2db1ad -test/extractor-tests/generated/Module/Module_getAttr.ql b97ae3f5175a358bf02c47ec154f7c2a0bd7ca54d0561517008d59344736d5cd f199116633c183826afa9ab8e409c3bf118d8e626647dbc617ae0d40d42e5d25 -test/extractor-tests/generated/Module/Module_getAttributeMacroExpansion.ql 9f7c04c405d25448ed6d0e7bf1bb7fea851ea0e400db2246151dd705292ae3a8 f55d86901c7cf053cd68cb7ceb4d6b786834d2d35394079326ea992e7fbc9ce1 -test/extractor-tests/generated/Module/Module_getCrateOrigin.ql ff479546bf8fe8ef3da60c9c95b7e8e523c415be61839b2fff5f44c146c4e7df b14d3c0577bd6d6e3b6e5f4b93448cdccde424e21327a2e0213715b16c064a52 -test/extractor-tests/generated/Module/Module_getExtendedCanonicalPath.ql 55c5b633d05ddbe47d324535a337d5dfed5913ab23cdb826424ddd22009a2a53 ab9e11e334e99be0d4c8d2bd0580657211d05feeeb322fbb5400f07264219497 -test/extractor-tests/generated/Module/Module_getItemList.ql 59b49af9788e9d8b5bceaeffe3c3d203038abd987880a720669117ac3db35388 9550939a0e07b11892b38ca03a0ce305d0e924c28d27f25c9acc47a819088969 -test/extractor-tests/generated/Module/Module_getName.ql 7945dc007146c650cf4f5ac6e312bbd9c8b023246ff77f033a9410da29774ace 9de11a1806487d123376c6a267a332d72cd81e7d6e4baa48669e0bb28b7e352e -test/extractor-tests/generated/Module/Module_getVisibility.ql bdce43e97b99226f55c84547a84d99b44f5d1eac757d49bcc06d732e0fb0b5a8 a482c18851286fb14ec6f709dc7f3280a62de8c3d59c49ba29d07bd24cf416cd -test/extractor-tests/generated/Name/Name.ql 0a78cd5c0c703ff30f8e3253b38f9aac98a564b22c02329d525cf101d8ac3fda 2fd83327063e6ab57dcae2dc5103c2965d7a09f6a10d553ea336cf594d32032c -test/extractor-tests/generated/Name/Name_getText.ql 5d223baad356308abc45cdce9ca9201d674de1cc1e9fff7ef55dd96082d59d99 6488ccc102ed4f0a2e1c5cef3f8b1adbe00d52c961573f1a16eca66af31e2d14 -test/extractor-tests/generated/NameRef/NameRef.ql f73d49d5c176cd7589f6ca148b0d0cc3d1084e27686910058adfd5764ef5767d ebff67ed3b325b01277e25baa1ad588e633ef8ce63209a72305465a0dc8002d1 -test/extractor-tests/generated/NameRef/NameRef_getText.ql 5212dfc1b65c0f724a72f5bffd82268d1f8ae287d3d61797673c29fd70d7ebd6 75c343614925c55a18917c07ef62af08c97c9cc714f627d1a27b9f26158a0bde -test/extractor-tests/generated/NeverTypeRepr/NeverTypeRepr.ql 6db9820e62fe7a7395aafb6966043bd24d89833fe59c825ebbd4a2504d58bcc3 85dc1500ba751a4b3fa432fe5f5cb0c104a2179ac2e73620ed9ff08552cfbba1 -test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr.ql ba10ed5147469564e632f9444176fffeb1accdb14ad635a3dee76044e5782eca 3f894c494421d49d3f8f2593bccd261c9defa768bd252705d4a3671ca8e8255f -test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getAttr.ql a12e828c85577184a41b255f54b10d4a654b57703074a7ebcfde2d43a358955f bc2590e76b60a3ddda9cc10903c68d07c6af19a593c8426d108a2a6520304145 -test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getField.ql 6d729fb91deacb1f620df5cbc86473183664e81849958624195da883c410a707 f3374c3d7306699d1f9d1c6c5788ee7c5a17103345bf53847be9d94e5fb9f14d -test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getTypeRepr.ql 27f2d94699140805169a0c18068d78e10bddadb8db243bcb8957677c9d477935 4fb96f2f7a6e7217218adeb5069a7d4da548c6ac650683773bbff4fba32a99da -test/extractor-tests/generated/OrPat/OrPat.ql 49d881b384acaf68fa79de46da997cacab3e75467641f61150908f4112c47fa4 5d721da23be44e79d7b8a0dd475119836828d6a1edaff2c55decea8da83e65b8 -test/extractor-tests/generated/OrPat/OrPat_getPat.ql d56b78287cecebacb25249380647500387e0d9e28be20034b8a12406a999a7c4 cba7bb60afaaed4333ea5ff6d3850fb44a8b42edee67d86fd16df85938454269 -test/extractor-tests/generated/Param/Param.ql 0a2375e240422ced3e7e6f16da3f538501bc214d0713cf5415a91b8f9f4554f8 12b286e5622e693dfd0a614b96c5d4f0a7dad3dbd033f78ad7318d1bd85a5eaf -test/extractor-tests/generated/Param/Param_getAttr.ql e1dcf86540fd2971ced34a33b2959f001c3f654914d82e576caa4534b80fbfbf 987a826bf6dcd25c3426edb603a22f6caa030c82c1cb0e9e11062fdbfed23030 -test/extractor-tests/generated/Param/Param_getPat.ql 0c448e8ba8bf3432be08b5eb4a052aa19cccf0eb4596a3239481401dae9d2dc2 c943d4da36e1e734c1a012f092b2f597cb389a7ab33d5371ff8ee9c93e115ffc -test/extractor-tests/generated/Param/Param_getTypeRepr.ql 151a653a66722ec782af13980638b4156968a2bf1ee9221e983695712c39482e 597dd1b45078711d1ff2a5d3b0282d571b4d76d0d2e410c79a48ff9d5c8f80f6 -test/extractor-tests/generated/ParamList/ParamList.ql 4d879e6a6db24fb8d7f935c2dd332075ca4b2de41cc841aafec7e0b6b77f2cf3 b7e2357b77961f0f8315d3c9e8fde8578373ecfb9efba892416b31d7c168bb26 -test/extractor-tests/generated/ParamList/ParamList_getParam.ql dcaabf654941bf9afe50df3a5c61ef0eab50830a436eede98e30778bfd244a09 63cc7f529f96d5016804f50a385d8a736a534475a6340a8c2f51de99b54206a1 -test/extractor-tests/generated/ParamList/ParamList_getSelfParam.ql 310582a9921226a44e6fee2b386d48bf84388351204941dd12e3a2da395eefaf 6c2e0a6d5bc6db49430cf25501444da6540b7b2f9ac0052da93c8086e2af0c46 -test/extractor-tests/generated/ParenExpr/ParenExpr.ql a40c60a92be944f15f5cbcca52b0fde318bb1ad6864f9ab9302dbf5ce5f1058d a50e80b6b222fb43f9fec82677d0785c0b2696b9818887e2befafb7a6d399a7a -test/extractor-tests/generated/ParenExpr/ParenExpr_getAttr.ql e8b9016d2374d124472d135c8b9031124227cbb139362f6aa6d4d99cad631e30 4aaf95ee8a9ab1ead19eaa4dabc080f12aca49f50a150a287b93132de5c61df1 -test/extractor-tests/generated/ParenExpr/ParenExpr_getExpr.ql a75dc46dc78d3b4a4f629ba16f7129ecc0ab90f60b651259d00d241b2886bf7c 32164d75418df184618501f41fbc0a81dafe1ad2dcbc9ec87bea909aaf05ae40 -test/extractor-tests/generated/ParenPat/ParenPat.ql 565182ccd81a9b420911b488c083f540d339eec6a9c230424800bb505df13a66 876cdca008ed32f415c9ee99ce7e66b276769d0b51ad7eee716e1317484a34ce -test/extractor-tests/generated/ParenPat/ParenPat_getPat.ql 96f3db0ec4e71fd8706192a16729203448ccc7b0a12ba0abeb0c20757b64fba1 0c66ba801869dc6d48dc0b2bca146757b868e8a88ad9429ba340837750f3a902 -test/extractor-tests/generated/ParenTypeRepr/ParenTypeRepr.ql a96bb8b51d8c0c466afc1c076834fa16edf7e67fffe2f641799850dee43099a2 0e6c375e621b7a7756d39e8edd78b671e53d1aac757ac54a26747fe5259c5394 -test/extractor-tests/generated/ParenTypeRepr/ParenTypeRepr_getTypeRepr.ql 64fe4ea708bc489ba64ed845f63cfbcd57c1179c57d95be309db37eac2f5eb71 0f4cbbfdf39d89830b5249cabf26d834fc2310b8a9579c19383c90cb4333afb7 -test/extractor-tests/generated/ParenthesizedArgList/ParenthesizedArgList.ql 6d3496449d40e7ea083530de4e407731641c6a1ba23346c6a11b8b844b067995 9d21019a49d856728c8c8b73bcf982076794d8c8c9e2f30e75a9aa31348f5c60 -test/extractor-tests/generated/ParenthesizedArgList/ParenthesizedArgList_getTypeArg.ql 256164a0909def95501022cfbb786026c08c9ef50ff8da9e851a7ca8b1aaeb1f 8bfac08d3261f2c4b84fa3da46722f9c7ca866a6b964b5f1b8f78b81c97ae3f7 -test/extractor-tests/generated/Path/Path.ql 2b02325ab1739bf41bc5f50d56b1e9cc72fca4093b03f2bda193699121e64448 c4d44402696ce10175ad8286dbd78277fbb81e7e1b886c0c27d5b88a7509052e -test/extractor-tests/generated/Path/PathExpr.ql 5039fe730998a561f51813a0716e18c7c1d36b6da89936e4cfbdb4ef0e895560 cd3ddf8ab93cd573381807f59cded7fb3206f1dbdff582490be6f23bed2d6f29 -test/extractor-tests/generated/Path/PathExpr_getAttr.ql 2ccac48cd91d86670c1d2742de20344135d424e6f0e3dafcc059555046f92d92 9b7b5f5f9e3674fad9b3a5bcd3cabc0dff32a95640da0fce6f4d0eb931f1757d -test/extractor-tests/generated/Path/PathExpr_getPath.ql e7894071313a74166bdd31d7cd974037fcd5a7f0e92d5eec42833266196eb858 46a06e8a1207e7a0fa175cd4b61068e5fd6c43b5575b88986409f0ac2be64c51 -test/extractor-tests/generated/Path/PathExpr_getResolvedCrateOrigin.ql a68a1f0d865d10c955f7ab1fd7614b517e660553b65fabb9daa8f302adbc2602 c47480d6440ae63be27d8158a35536a8d9051817dec1521cdcab297ddb52e1ae -test/extractor-tests/generated/Path/PathExpr_getResolvedPath.ql dfa55fe480da0df37670660fc1c54b6c38d47365353bc9d4f662183b33d4e80f 1b18329a7b60805fc073df3149c48f39aa66924d7eefedecbca36a2b170a7fbe -test/extractor-tests/generated/Path/PathPat.ql 6b9d973009f1b4963c7c83b0f5051eda7a76c8fb4a789217b4a25cbab0cdb274 57f0621dd3657b6f4630d5406816effcc6bc1b03361aa12e118e807e28e9e71b -test/extractor-tests/generated/Path/PathPat_getPath.ql 6c0c71c80a6e631ea7775ec8660b470ff6b264bab14a399606cf113b1fb190fc 8e34cbb4d064db929e94652e1901ec4f26affa71e30e556b7acdff71dd622cbb -test/extractor-tests/generated/Path/PathPat_getResolvedCrateOrigin.ql f690fd9a8773e7c73b70f2d64ee919fef8eee243c5a315c4a6d2713d43ea0e43 f37817427c36cec14a2e07f99d3a32f37f3f27a8eafdf170749ec2780054729b -test/extractor-tests/generated/Path/PathPat_getResolvedPath.ql 55df4541a7b0e82198acfcedd7dc99eb564908270e4fb2b032bf05e40fba6fef a5932d884903da901263f88644c8585a45045190d7204f630506c5aece798288 -test/extractor-tests/generated/Path/PathSegment.ql 523ec635961b9aff465dd98a1e63f8e872e147943646ea7383af95c3fa5d8e42 29bd402ee76eaa080cd6fbf29ba9d9141cc9828f1d3ddf162da6534daed52c56 -test/extractor-tests/generated/Path/PathSegment_getGenericArgList.ql 8f6e67b3e316309f20e21d7e7944accf66b0256b76fa50ee9a714044c6ec8cea 15f10a701fc4d3f9fd6734da90790cdbc8a1ddd57bf52695740acedcb2e6e485 -test/extractor-tests/generated/Path/PathSegment_getIdentifier.ql 52fedfc7518d4646e5f90843806c70fcfde7e7af602846a4f1dd90c3a46c9229 a291e47676ee9d257ac76fd5e4088f5905ec5fefc77568038efa6c88d2116a85 -test/extractor-tests/generated/Path/PathSegment_getParenthesizedArgList.ql 0d5919b0a240678d84dc687de954ef6dc11fe4a20f54c56578c541c573bdf3f2 5d2094ad5c0b0b7f298260511c5072b129b121928394b27c49d39e69ba6a5870 -test/extractor-tests/generated/Path/PathSegment_getRetType.ql 36386a514bc925f5b17ad87afba9fef7986900c1b791732de061213c6e86743f f38bcee68c1da19e70bb1e1c4a4047c763a466f1b8ef2c4f65f8c724c0b58197 -test/extractor-tests/generated/Path/PathSegment_getReturnTypeSyntax.ql d1db51208a311c30af369ce2fdc3a3296e7d598b27bf4960b8b34622a9d9163b 561b1e38c6d8b301fdc016e1d012dd805fde1b42b0720c17d7b15535715047f2 -test/extractor-tests/generated/Path/PathSegment_getTraitTypeRepr.ql d7ea6ee3f6b7539786d8de92db1b5e3bb88f0da9096293107e39065a09aad20e 19e05a303472c25115a9e3cb60943109eaf4788d6ed1d37ac2114b58bb94ef04 -test/extractor-tests/generated/Path/PathSegment_getTypeRepr.ql d9d8ff43a55671616bd5b98ff2c03690ec2661817d19a61edcc4b37d23e312d0 b4dc0ae4d7f03c98c23312b358d214565b34c7a028ba8983826c6bf5c1177eeb -test/extractor-tests/generated/Path/PathTypeRepr.ql c2e069acc5111088a7287d98b4bd4bf44bd79c5a786b275f7448ebafc3613500 6e016750e5fef92a98bc5cc60bfd40d85fbb5eb2d251b4d69ffe600813f81df0 -test/extractor-tests/generated/Path/PathTypeRepr_getPath.ql 49e96ea2aa482e3b80cb0e2d944055f8298f7fc55b36cea7468586c94bacf686 29b3c2140ac1bc6e0e6160140e292e2b84e13145c1553480e2a582cd7f7bd3fd -test/extractor-tests/generated/Path/Path_getQualifier.ql 9af95e22cdf3a65da6a41d93136aef4523db5ce81d38f6ed4bc613f1c68784d0 3102d9241a417a92c97a53ac56a7a8683463f1adc7a593cda1382c0d25b3f261 -test/extractor-tests/generated/Path/Path_getSegment.ql 475f344ee24a14468745d50922fdfd63f5d817f14cc041a184c2f8ec144a01dd 4f663c5c2b1e0cb8b9a8a0b2d8b5d81f12a3bf333c71ecbb43d9258f7dfe4ec7 -test/extractor-tests/generated/PrefixExpr/PrefixExpr.ql 44fb7174365c6deecdc22c720d84617c6e060c05d49c41c90433451588f8aa6f 871fab471c82fede3c36edc003f9decee5bb7844c016951d28be78d0c91487e5 -test/extractor-tests/generated/PrefixExpr/PrefixExpr_getAttr.ql fdad6ad5199435ded1e4a9ea6b246e76b904cd73a36aaa4780e84eef91741c5b 75d63940046e62c1efa1151b0cac45b5ec0bab5e39aec2e11d43f6c385e37984 -test/extractor-tests/generated/PrefixExpr/PrefixExpr_getExpr.ql 2d1d97f6277794871fbb032ea87ac30b1aa902a74cd874720156162057ea202e b1b9880fce07d66df7ec87f12189c37adf9f233a1d0b38a1b09808d052a95642 -test/extractor-tests/generated/PrefixExpr/PrefixExpr_getOperatorName.ql d27602e77ddf491a278426de65041dda8568f427d1e0ff97c0f23069ae64670e 4e4766e948adf88a6b003ead7d9de1ad26174fe9e30c370f1d3e666aa944df52 -test/extractor-tests/generated/PtrTypeRepr/PtrTypeRepr.ql 33b38895b3a25f0cbec7040861143bd5bdc01f98beff3a6b44bb77e1e0953d4d 9ad76676a6dcdee8eceaedbd759a089eb74fcf9c51308837027cd10253f18bdd -test/extractor-tests/generated/PtrTypeRepr/PtrTypeRepr_getTypeRepr.ql a1901323348a86a47b3d3d2a3d30b4f5aebf46744e4ecbcea650b3360024050c 58eb93dd76a927bb0cab1b25d01162c3b163e8a72ee13b4dd334e6017bb67db3 -test/extractor-tests/generated/RangeExpr/RangeExpr.ql 707c08aab49cc0a22c80a734e663b13ecbbddf0db28b6a25fdbc030a1ce38d6f 1f78950b30485cdde9fe7d9e416ad1dfdac8c5b6bc328172e6e721821c076131 -test/extractor-tests/generated/RangeExpr/RangeExpr_getAttr.ql 8767e670f88c2115bc61b16195d2c9d02bc074adc4ca57d2aa537c1af9b4c530 4fa51652c60ca7d06bd9ad604107e002603ee2a7b4587636f6b46b8e8060e06c -test/extractor-tests/generated/RangeExpr/RangeExpr_getEnd.ql 0328c3d0597004f3facf3d553ed763566344f54e1b9c9e26f2f41b8146b6bdba 8e701b595631af117fd0a79154e298dfc64cb0874eb58018921f94076a0c7ebe -test/extractor-tests/generated/RangeExpr/RangeExpr_getOperatorName.ql 355a4d61bcb6ac37003c49e736e0e3d4c6d223343db4d79ecb43a78fbf6b4c94 a81c79a5d54dec5f3918ad486cb07ffcb0af067823f7597d8e86efaffdb70935 -test/extractor-tests/generated/RangeExpr/RangeExpr_getStart.ql e6e35c735b2bc56adf38f96f32ef59a004391cafbb23b9acc34d2177764588c7 478969212626b1d101c19115f726ca7616fdd4d8de82fa1e91c50a26515c2ee1 -test/extractor-tests/generated/RangePat/RangePat.ql 97314b9a5543a7471d722ae188a657fd325974eb38eafe0997a6cf1095d04d69 5dd655582157b3436722b4ba3118bdd29853b0bc170248ad2c4c1162c534afe6 -test/extractor-tests/generated/RangePat/RangePat_getEnd.ql 723eb5030ec52d3aa3650a3e2de6cc0195a0030630239b972235963320e0d808 2df3b1a6197c3abd43dc743fd09cbf55165e3191f2b49336777594541e5da96a -test/extractor-tests/generated/RangePat/RangePat_getOperatorName.ql 564216b2342f56dc8c1aed6306f57b6dafb33de9e3ba337a840a8c077ce95933 2a76ec7a59bada29733a1515bc1ea8bedd37429d1694ca63c7a8fbf94098a4c7 -test/extractor-tests/generated/RangePat/RangePat_getStart.ql ad2066efa32fced2dd107031f2a9b9635c3c892e874870a4320522bae9309aa4 b4a8c57a838074e186b823938d1a9372153c193da6c839b5f242ca25c679e83f -test/extractor-tests/generated/RefExpr/RefExpr.ql 27d5dceb9e50668e77143ff5c4aa07cbe15aeea9829de70f1ddfe18d83690106 b95058b7a0bad4bddb857794901d9b651b2f9e4dd3554e5349a70a52cbbfaff6 -test/extractor-tests/generated/RefExpr/RefExpr_getAttr.ql 477fb3fee61395fabf78f76360ea27656432cb9db62e6f1dab1e9f3c75c83d39 5210f2ac54c082b616d8dcb091659cdad08a5d4ae06bf61193c33f208237482f -test/extractor-tests/generated/RefExpr/RefExpr_getExpr.ql 180d6417fd7322cabf4143d0ddd7810f65506b172a5c82484b3ef398041636b2 a291f0bec1ec5b3fa6d088b3d1a658889b9a3521c39ff3bb7a5ab22a56b8b20a -test/extractor-tests/generated/RefPat/RefPat.ql ba0f0c0b12394ed80880bea7d80a58791492f1f96a26783c2b19085d11e2fd2b 22aa62c6d4b6e4354f20511f8e6d12e6da9d8b0f0b3509eefe7a0c50f7acfb49 -test/extractor-tests/generated/RefPat/RefPat_getPat.ql 60f5e010b90c2c62d26674323d209b7e46c1c2b968a69765e1b1cde028893111 fe9e7dc6a5459250355336eca0bdf2a0be575b1e34936280fd12a76a004f7b46 -test/extractor-tests/generated/RefTypeRepr/RefTypeRepr.ql 0e543a2e907bec0736a4e3821e94a49ad5127a69dab88f89a4a4bd6ff9e6a138 fe157d0a00264e2e5b7eee7248b052c960915aac14543e16a31ef659ce84978b -test/extractor-tests/generated/RefTypeRepr/RefTypeRepr_getLifetime.ql 0fc1babe97a3c12609f30af8d68a2a25a588061fd92fb5a0d6ddb2afd0f87296 c9fcd48451faf77a3d47c4085904439243744119648e10499bc1b1533c5e14be -test/extractor-tests/generated/RefTypeRepr/RefTypeRepr_getTypeRepr.ql 63130e9884b588a2e0f076a00b55e9c3106826ab78f5e7ff859d24d4f1b4d0d1 fabe9cc6967433def8ddba298d5cb4d903f8491bc4ccfa1b36e415995da9b804 -test/extractor-tests/generated/Rename/Rename.ql c8605e5d8ebb39be238ba26e46861df493d86c9caf9aa9a791ed5ff8d65a812a 7263c2c2565e41c652eda03d1e1ddd030fea79a8e3c967909df9945e30ecbe68 -test/extractor-tests/generated/Rename/Rename_getName.ql 1648191216ece0e3468823ed376292611bd3e5dbe9b3e215167d7051aa03385f 381683d4637a1a7322c9a0df2d90a30a153630965e7facbfaccd6cdb5c1de2cd -test/extractor-tests/generated/RestPat/RestPat.ql 0abc6a13ec82ebc923ce768344d468871a05a515690f0feaaf55b7967cf34a9e c2bc069de6927c6c04c89c54e694b50d6ca052230cc36668302907a7ed883e08 -test/extractor-tests/generated/RestPat/RestPat_getAttr.ql fb391ab265a454b10270136efd61c1ae9b29951cd28b0f585c6b6eea37c64745 6311e3ca49eb8a061684f8cebdfb11cc5ae09db6e145d1b2349a2ee80298cfe9 -test/extractor-tests/generated/RetTypeRepr/RetTypeRepr.ql 9183fb22ed8cab493719ab4c26e9129a033962330893c21a994ca9a98de86670 4031d0ba6f2ea3bd5116c594c053bd92f10f3dd2166e5ac7d6d6006fc6c1911a -test/extractor-tests/generated/RetTypeRepr/RetTypeRepr_getTypeRepr.ql 0cfb66dc354c6b58c695dace97c4d5ec2a730ba6076918be2beca4a4cedaae07 54a6299dfa05b7ef60feca77dbad3d0a444655df4d1d4c69a8efc3a425ca35af -test/extractor-tests/generated/ReturnExpr/ReturnExpr.ql 8e9eba0837a466255e8e249e62c69c613cb5a78193fe50e26a617cf9d21c995a f33f6cc874f74d1ce93a6975c88748bd5bca6dc10360f8fd59493d939be63658 -test/extractor-tests/generated/ReturnExpr/ReturnExpr_getAttr.ql 9fb7e1c79798e4f42e18785f3af17ea75f901a36abf9beb47a1eede69c613ba9 9cdb7cc4a4742865f6c92357973f84cee9229f55ff28081e5d17b6d57d6d275f -test/extractor-tests/generated/ReturnExpr/ReturnExpr_getExpr.ql 7d4562efb0d26d92d11f03a0ef80338eb7d5a0c073f1f09cbb8a826f0cef33de 523ebd51b97f957afaf497e5a4d27929eed18e1d276054e3d5a7c5cfe7285c6e -test/extractor-tests/generated/ReturnTypeSyntax/ReturnTypeSyntax.ql 976ce33fe3fd34aae2028a11b4accdee122b6d82d07722488c3239f0d2c14609 906bf8c8e7769a1052196bc78947b655158dd3b2903fef2802e2031cffbc1d78 -test/extractor-tests/generated/SelfParam/SelfParam.ql a5be8dc977d652c6fe8b27377a3dae3e34b4e034b76d2621d6c43ea9cf07128e 099fe28e1b17238c46c457593aed8d9fca6e6e6cf8f9c4ec5b14261035261c04 -test/extractor-tests/generated/SelfParam/SelfParam_getAttr.ql 00dd5409c07e9a7b5dc51c1444e24b35d2ac3cab11320396ef70f531a3b65dc0 effbed79ad530a835e85b931389a0c8609a10ee035cb694f2e39b8539f8e54ba -test/extractor-tests/generated/SelfParam/SelfParam_getLifetime.ql 0b7c243f609e005dd63fd1b3b9f0096fc13cb98fe113e6f3fefb0d5c414e9a5f f6e06de8bcddfc9bd978c058079e53174edbe7b39f18df3c0bd4e80486808eda -test/extractor-tests/generated/SelfParam/SelfParam_getName.ql 69207a57b415ba590e50003d506a64fd1780b27b8832b14f9bd3c909bddb5593 56fa28ba1222f45893237052fa5a9421d960e14fbf1396b2d1049b440c2e5abe -test/extractor-tests/generated/SelfParam/SelfParam_getTypeRepr.ql 406c04fbb5e0f4c57a2f73dfd69aff7da95fbbe552dc7391b3332d4e451b1ff4 025ef82cd0bf947333253141a5c3c4990db47a699c21a2381089428d0d133670 -test/extractor-tests/generated/SlicePat/SlicePat.ql c6ff3c926ebbea3d923ba8ed00bf9cc20eaaee4c6ae49ea797c0975d0535240e 1b27e0caeb793da3b82059268b83bd624e81f215de42acbb548c52bacba3ed9e -test/extractor-tests/generated/SlicePat/SlicePat_getPat.ql e2f892a3a4c623fe3f7e64e1438128126bc4d8b8c0f657ae53bb99d3209a3b13 af835d9ec840c63e13edc6a9230a4e34cb894f4379b85b463b8068de5a8bd717 -test/extractor-tests/generated/SliceTypeRepr/SliceTypeRepr.ql 59c4e943626b6d284fa30778437b0ac5b10243b2dd3081200ada18e5a5f75ebc a479a079c841290a42a86da71d0b951d6ff354a4818be72180e6fe24b3eecde4 -test/extractor-tests/generated/SliceTypeRepr/SliceTypeRepr_getTypeRepr.ql a6604fccd54cf86fb2b929ffda248a2da207e0841a46fd5e80fc18e2efccd9ca f10cc6446549214d8929521f8794a93cfacdbd71cd95e05e585bd178af414e52 -test/extractor-tests/generated/SourceFile/SourceFile.ql c30a3c2c82be3114f3857295615e2ec1e59c823f0b65ea3918be85e6b7adb921 6a5bbe96f81861c953eb89f77ea64d580f996dca5950f717dd257a0b795453e6 -test/extractor-tests/generated/SourceFile/SourceFile_getAttr.ql 450404306b3d991b23c60a7bb354631d37925e74dec7cc795452fe3263dc2358 07ffcc91523fd029bd599be28fe2fc909917e22f2b95c4257d3605f54f9d7551 -test/extractor-tests/generated/SourceFile/SourceFile_getItem.ql f17e44bc0c829b2aadcb6d4ab9c687c10dc8f1afbed4e5190404e574d6ab3107 1cf49a37cc32a67fdc00d16b520daf39143e1b27205c1a610e24d2fe1a464b95 -test/extractor-tests/generated/Static/Static.ql f5f71ff62984d3b337b2065b0a5bc13eed71a61bbf5869f1a1977c5e35dfdd50 630c4d30987e3ca873487f6f0cf7f498827ae0ace005005acdd573cf0e660f6e -test/extractor-tests/generated/Static/Static_getAttr.ql adb0bbf55fb962c0e9d317fd815c09c88793c04f2fb78dfd62c259420c70bc68 d317429171c69c4d5d926c26e97b47f5df87cf0552338f575cd3aeea0e57d2c2 -test/extractor-tests/generated/Static/Static_getAttributeMacroExpansion.ql 828ba050c964781dace382e4673c232f2aa80aa4e414d371fd421c3afc2b6902 018f8b75e1779829c87299d2d8f1ab5e7fa1aaa153599da789cf29b599d78477 -test/extractor-tests/generated/Static/Static_getBody.ql e735bbd421e22c67db792671f5cb78291c437621fdfd700e5ef13b5b76b3684d 9148dc9d1899cedf817258a30a274e4f2c34659140090ca2afeb1b6f2f21e52f -test/extractor-tests/generated/Static/Static_getCrateOrigin.ql f24ac3dac6a6e04d3cc58ae11b09749114a89816c28b96bf6be0e96b2e20d37f e4051426c5daa7e73c1a5a9023d6e50a2b46ebf194f45befbe3dd45e64831a55 -test/extractor-tests/generated/Static/Static_getExtendedCanonicalPath.ql 6ec02f7ec9cf4cb174a7cdf87921758a3e798c76171be85939614305d773b6a0 c51567dac069fc67ece0aa018ae6332187aa1145f33489093e4aee049d7cea52 -test/extractor-tests/generated/Static/Static_getName.ql c7537e166d994b6f961547e8b97ab4328b78cbd038a0eb9afaae42e35f6d9cb4 bb5ae24b85cd7a8340a4ce9e9d56ec3be31558051c82257ccb84289291f38a42 -test/extractor-tests/generated/Static/Static_getTypeRepr.ql 45efcf393a3c6d4eca92416d8d6c88e0d0e85a2bc017da097ae2bbbe8a271a32 374b551e2d58813203df6f475a1701c89508803693e2a4bec7afc86c2d58d60b -test/extractor-tests/generated/Static/Static_getVisibility.ql 0672b27f16955f7b0223a27c037884338dcf30759b7b8bb3da44e5d533228f90 0e4916f5683963041ef23c724ca8e16acfa370b583d90b76508c87131b9e1c73 -test/extractor-tests/generated/StmtList/StmtList.ql 0010df0d5e30f7bed3bd5d916faff7d101cc1edddceab7ddc12bb744f8e46cf7 aaff98988c68713b3577f3d4b4ed16b978eb11433ec7f3a32def82e96aac8c5b -test/extractor-tests/generated/StmtList/StmtList_getAttr.ql 78d4bf65273498f04238706330b03d0b61dd03b001531f05fcb2230f24ceab64 6e02cee05c0b9f104ddea72b20097034edb76e985188b3f10f079bb03163b830 -test/extractor-tests/generated/StmtList/StmtList_getStatement.ql abbc3bcf98aab395fc851d5cc58c9c8a13fe1bdd531723bec1bc1b8ddbec6614 e302a26079986fa055306a1f641533dfde36c9bc0dd7958d21e2518b59e808c2 -test/extractor-tests/generated/StmtList/StmtList_getTailExpr.ql 578d7c944ef42bdb822fc6ce52fe3d49a0012cf7854cfddbb3d5117133700587 64ea407455a3b4dfbb86202e71a72b5abbff885479367b2834c0dd16d1f9d0ee -test/extractor-tests/generated/Struct/Struct.ql ffaaa49314c26bd0a206b692d480254acc6e87233f679fbe936094c81c071de2 cae27f50c3bf787aead37077c9fe32e66c1a247a8a8c1f6f9b241493b1b793fc -test/extractor-tests/generated/Struct/Struct_getAttr.ql 028d90ddc5189b82cfc8de20f9e05d98e8a12cc185705481f91dd209f2cb1f87 760780a48c12be4581c1675c46aae054a6198196a55b6b989402cc29b7caf245 -test/extractor-tests/generated/Struct/Struct_getAttributeMacroExpansion.ql a17504527a307615d26c2c4b6c21fe9b508f5a77a741d68ca605d2e69668e385 f755d8965c10568a57ff44432a795a0a36b86007fc7470bc652d555946e19231 -test/extractor-tests/generated/Struct/Struct_getCrateOrigin.ql 289622244a1333277d3b1507c5cea7c7dd29a7905774f974d8c2100cea50b35f d32941a2d08d7830b42c263ee336bf54de5240bfc22082341b4420a20a1886c7 -test/extractor-tests/generated/Struct/Struct_getDeriveMacroExpansion.ql e4849a63be9f413426dd0f183d1229fa4dd1c521e87479622a80c52179e3bb03 5ae88d61ffa7b0a52a62fd16ba5cc5816c2b7b2c0db726e3125e525bbbc10a18 -test/extractor-tests/generated/Struct/Struct_getExtendedCanonicalPath.ql 866a5893bd0869224fb8aadd071fba35b5386183bb476f5de45c9de7ab88c583 267aedc228d69e31ca8e95dcab6bcb1aa30f9ebaea43896a55016b7d68e3c441 -test/extractor-tests/generated/Struct/Struct_getFieldList.ql f45d6d5d953741e52aca67129994b80f6904b2e6b43c519d6d42c29c7b663c42 77a7d07e8462fa608efc58af97ce8f17c5369f9573f9d200191136607cb0e600 -test/extractor-tests/generated/Struct/Struct_getGenericParamList.ql cd72452713004690b77086163541fa319f8ab5faf503bb4a6a20bcaf2f790d38 4d72e891c5fac6e491d9e18b87ecf680dc423787d6b419da8f700fe1a14bc26f -test/extractor-tests/generated/Struct/Struct_getName.ql 8f1d9da4013307b4d23a1ce5dc76466ecdd7f0010b5148ec2e7dd2883efe3427 411b326d15d56713c2a5e6d22909474c5d33062296518221e36c920927f859fe -test/extractor-tests/generated/Struct/Struct_getVisibility.ql 17139d3f91e02a0fc12ad8443fe166fe11003301fee0c303f13aa6d1138e82d5 07bdc1fbcc0ea40508364ea632fce899cbe734159f5c377ea2029bc41bc9a3b4 -test/extractor-tests/generated/Struct/Struct_getWhereClause.ql d0db2c9811ed4568359e84255f04f0c75ae65a80d40981a1545d6cddf53e9c09 1133a46bc502757aaab61a8ac94b4a256b590548c5e27ec6a239ffd5a4a81577 -test/extractor-tests/generated/StructExpr/StructExpr.ql 5bdc2163b7ddd0bc3eb938acc366105590742c417b09ed814b9c4d5d78b9b90a e59a4973aa882879f1940a955020df91fb588f004d7ea83866f52b0930e46763 -test/extractor-tests/generated/StructExpr/StructExpr_getPath.ql f6f2b26a93b24d19f74eab73518eaa688ec270f865764fb9b839ae7e029b10bd bd963650f78009ac44a2aa14f0e53f10e832a73cc69d5819ea89865874113040 -test/extractor-tests/generated/StructExpr/StructExpr_getResolvedCrateOrigin.ql c2794babda0823c62c2af6fe9e3b11d8e4b6baa8095bf8f01faee13b4894ff67 cba6a7576a572238c59142e46cc398c5f31cd91c8d1710381d579bb6bb0edb7c -test/extractor-tests/generated/StructExpr/StructExpr_getResolvedPath.ql 5152d15064daa1da4470cdc659a07281734d56ed958e67efc54701eb44d550dc a7a78db088b0dd7b7c148ad24c8faa014e2eab29146e056bdf35bef5ca2f8485 -test/extractor-tests/generated/StructExpr/StructExpr_getStructExprFieldList.ql 1c2401038fe14e660d5101951e7467dc3a56969698a8cc5b818d664902b269bc f6b7047112ade49b632d2e3f71531dd2dffe7c2cc848587908fa4b85dc06ee82 -test/extractor-tests/generated/StructExprField/StructExprField.ql f054440c074461bdb00506e775be346efc4faf8afd3e55d61f72c8776d1d4bd5 8bfacfa4864309157b6795de26e6c37676ad627e2e8771dfdc8abe57ff269c92 -test/extractor-tests/generated/StructExprField/StructExprField_getAttr.ql 660400f80824956422b95923519769df08514f089269c7a5ccc14036b90b233d f137716537f8780ad63bd6af0da06a96f0d00cb7a35402d3684e6866112b9d1a -test/extractor-tests/generated/StructExprField/StructExprField_getExpr.ql 00180d982057ee23297578d76bf1a337fde8341f0520ebfa5786c8564884ae5a c2b813c25df4ffc49486426365cc0cc0bbf07cf0c7d7adece7e6576fc8b776dc -test/extractor-tests/generated/StructExprField/StructExprField_getIdentifier.ql 9bacb8d6590d5cde340443c4d0963a8ef8ddf434f912a28b04f9dd9f76504f3b 1a2209ee1086873dd2b07979b089bbab849283bfb8f44ba3deb5ff480acc1cbd -test/extractor-tests/generated/StructExprFieldList/StructExprFieldList.ql 33dc3f6c1f737e0ca2015530467bfa123eac0eb8ab63f2937ad0064f2246fb2d b89d5817c6a249232540570ef93ecf880a8ef74aa409c7cd8ddbc83f6d589fea -test/extractor-tests/generated/StructExprFieldList/StructExprFieldList_getAttr.ql cd7f5236f6b660fc064f3a04f3a58d720ed4e81916cbd1a049c1fac7171108ed 61317928d0833f7bb55255a5045bedc0913db1266e963ede97d597ee43e3ddd9 -test/extractor-tests/generated/StructExprFieldList/StructExprFieldList_getField.ql 1292aec1141bdb75fd8e0993f683035f396a0e6c841b76ee86a0a1d3dce0dbc4 450eccbd07cc0aa81cef698f43d60aeb55f8952a573eaf84a389a6449c3d63a7 -test/extractor-tests/generated/StructExprFieldList/StructExprFieldList_getSpread.ql d0470b9846323d0408e0f26444cdc5322d78ce1ac203073ff4f556dac5343be7 280712a0b3714256aff4c2a4370fd43e70c418f526e383ed7100d61cdf790c36 -test/extractor-tests/generated/StructField/StructField.ql 5ec75ec3c1a18299259dfa041790e9b4a791ceb1706aadea3537d0a67e7e65bb cba580a8678547dc88a736bd639cc4d8e84ec32a9ad1095e50f7e03047c37f1c -test/extractor-tests/generated/StructField/StructField_getAttr.ql a01715bc688d5fa48c9dd4bfab21d0909169f851a290895c13a181f22c0e73a9 fa6ffcf007492d9e1b7f90d571b9747bd47b2dc29e558a8e1c3013c5949dcdb7 -test/extractor-tests/generated/StructField/StructField_getDefault.ql deccc63b81892cd1b293d8b328ad5b3efdf32892efc8b161dfcd89330ca6b5a2 9a9f306f63208ce30d26f91dd15b94867a7d9affd31a0f51a3d1d2ce50786abc -test/extractor-tests/generated/StructField/StructField_getName.ql 4c5a7e00b758a744a719bff63d493ee7d31ff8b3010e00c1d1449034d00130ec 9b284d848e5c86eac089f33deca7586441a89d927e7703cb4f98bb7c65a7238c -test/extractor-tests/generated/StructField/StructField_getTypeRepr.ql 3f36890b9ced576327d0fb6e3c80c6482c3a6d6f751fa769b24b2c14a46f8ee8 aed0681a3928b965f1448954d3a0369238a3cd715b97a0d988d15b971bf45356 -test/extractor-tests/generated/StructField/StructField_getVisibility.ql 335d097fabbc9720b065248cd1c295fe8dc040bf646ce491244b6840d9a847d3 9a9073eb52cd401b07beb4eb0aef7a15d5d398d0c76c35416ffcb059a360d654 -test/extractor-tests/generated/StructFieldList/StructFieldList.ql 02635fb8b0bccb4cb8be71a2b103c6854192dd0300669127ce74590566b0b163 62e4151cbc47ec7bd10cb9f711587454d8fcf64fb54f279b82eefcf20028c37f -test/extractor-tests/generated/StructFieldList/StructFieldList_getField.ql b70e569d48109f57a1a765fcab2329adce382a17258c4e93a57f540a408b1836 1d6a65b7ac1ed8fd0e966132ec9ecbb425fa7ca501a2cd1db7269f9534415f30 -test/extractor-tests/generated/StructPat/StructPat.ql 2fa9b13ad6752a1296908c76caf3778dfd7d31e1ffc581011366208dfc3288a4 5a61ae9056a153b526d07c451a55f3959ce90adf762fe6c31f434fae27086d5d -test/extractor-tests/generated/StructPat/StructPat_getPath.ql 03fb1254cc797239de302fbf1ad1b4e7e926e2ec4423221fbec06425e3647f63 9ab60ad1f16d4fb04d3de9f8f05d959fc90c42bb8f0dfc04ccc906897f5c1633 -test/extractor-tests/generated/StructPat/StructPat_getResolvedCrateOrigin.ql e3188ae0bb8835ad4aed5c775b52afb6cc7f9c520a8f62140d6cc590f2b8ce5d fd3e6eaf185e933e5ab1566cc49ef3497e50608070831879e01cf5a5ec23eae5 -test/extractor-tests/generated/StructPat/StructPat_getResolvedPath.ql 1f4be7d78b187997093d52729d985dceb4c9e918274e0b9f06585e3337e3044b 2533855f07fce230dd567b2192ee20168bca077dbf7f1e8489dec142fcd396b8 -test/extractor-tests/generated/StructPat/StructPat_getStructPatFieldList.ql f7b6dadd6ed0e40fb87e4be6eabe7fb96931b8c910c443588147202707655ced a43de755e0ca786a491afc97805e34d787c7bd03e7bca8df090e9386d4019688 -test/extractor-tests/generated/StructPatField/StructPatField.ql e6f468111706d4254b6c3e686c31e309c11b4246d8ed7eb288dd349ec0787c12 7ab1b5ead54fe09daf3d4cc6d8eb3e39fe253bede8822187de1a74a10cc59e01 -test/extractor-tests/generated/StructPatField/StructPatField_getAttr.ql 5e1df4f73291bbefda06437859aef73457fe58a22c134ceb9148cfcc19b696e7 69aea129500dca110023f03c6337e4b1a86627d6d51c43585534cf826db13d04 -test/extractor-tests/generated/StructPatField/StructPatField_getIdentifier.ql bf44755d6b82d69610de44cab2d49362b10621589948b68480d80412acec820a ec06b8f947cdaca913fd44685e5ce2bf52281306808cbb17e7e88118c897f877 -test/extractor-tests/generated/StructPatField/StructPatField_getPat.ql bb3e9ad8cdaac8723504fffbafa21acc95c5bce7843fc6f3641e98758d93573f 77e6f9946e66a25ac70622e65c164413e7001f4b8e9361a0850171fc0cead935 -test/extractor-tests/generated/StructPatFieldList/StructPatFieldList.ql fad84896295380e3576bfaef384ac88b2f96a73196d8df3ec39ecc6184ec053f 3dd63ce5d1ffd48c873397368c6229de8da37e8f694f395165af8257a4d2faf2 -test/extractor-tests/generated/StructPatFieldList/StructPatFieldList_getField.ql 4e6fa98e48d474f31585a644d6045b7d8427a76bb04810728ad121a43b59e8a2 e3b1d915aae3e3c3df752146e222df71667f73731d7337cc2eb391b13f097315 -test/extractor-tests/generated/StructPatFieldList/StructPatFieldList_getRestPat.ql 4be5b8afebc081602429d7cfb1fd87de629abc17f3739131c93f7e0b3adaec3d d5ced2366c5a278e820261239c4de183517dadf9bc8496f3e568758ab9570752 -test/extractor-tests/generated/TokenTree/TokenTree.ql ba2ef197e0566640b57503579f3bc811a16fec56f4817117395bf81da08922a6 2e7b105cb917a444171669eb06f5491a4b222b1f81fa79209a138ab97db85aff -test/extractor-tests/generated/Trait/AssocItemList.ql 0ea572b1350f87cc09ce4dc1794b392cc9ad292abb8439c106a7a1afe166868b 6e7493a3ace65c68b714e31234e149f3fc44941c3b4d125892531102b1060b2f -test/extractor-tests/generated/Trait/AssocItemList_getAssocItem.ql 8149d905f6fc6caeb51fa1ddec787d0d90f4642687461c7b1a9d4ab93a27d65d 8fb9caad7d88a89dd71e5cc8e17496afbdf33800e58179f424ef482b1b765bb1 -test/extractor-tests/generated/Trait/AssocItemList_getAttr.ql 06526c4a28fd4fdce04ca15fbadc2205b13dcc2d2de24177c370d812e02540e6 79c8ce6e1f8acc1aaca498531e2c1a0e7e2c0f2459d7fc9fe485fd82263c433f -test/extractor-tests/generated/Trait/Trait.ql 064785e9389bdf9abd6e0c8728a90a399af568a24c4b18b32cf1c2be2bcbf0b8 a77e89ac31d12c00d1849cb666ebb1eecc4a612934a0d82cd82ecd4c549c9e97 -test/extractor-tests/generated/Trait/Trait_getAssocItemList.ql 05e6896f60afabf931a244e42f75ee55e09c749954a751d8895846de3121f58f def1f07d9945e8d9b45a659a285b0eb72b37509d20624c88e0a2d34abf7f0c72 -test/extractor-tests/generated/Trait/Trait_getAttr.ql 9711125fa4fc0212b6357f06d1bc50df50b46168d139b649034296c64d732e21 901b6a9d04055b563f13d8742bd770c76ed1b2ccf9a7236a64de9d6d287fbd52 -test/extractor-tests/generated/Trait/Trait_getAttributeMacroExpansion.ql 7ea169336dca0fcaf961f61d811c81834ea28b17b2a01dc57a6e89f5bedc7594 d5a542f84149c0ccd32c7b4a7a19014a99aa63a493f40ea6fbebb83395b788a1 -test/extractor-tests/generated/Trait/Trait_getCrateOrigin.ql d8433d63bb2c4b3befaaedc9ce862d1d7edcdf8b83b3fb5529262fab93880d20 3779f2678b3e00aac87259ecfe60903bb564aa5dbbc39adc6c98ad70117d8510 -test/extractor-tests/generated/Trait/Trait_getExtendedCanonicalPath.ql a2bd16e84f057ed8cb6aae3e2a117453a6e312705302f544a1496dbdd6fcb3e6 b4d419045430aa7acbc45f8043acf6bdacd8aff7fdda8a96c70ae6c364c9f4d1 -test/extractor-tests/generated/Trait/Trait_getGenericParamList.ql b27ff28e3aff9ec3369bbbcbee40a07a4bd8af40928c8c1cb7dd1e407a88ffee 2b48e2049df18de61ae3026f8ab4c3e9e517f411605328b37a0b71b288826925 -test/extractor-tests/generated/Trait/Trait_getName.ql d4ff3374f9d6068633bd125ede188fcd3f842f739ede214327cd33c3ace37379 3dcf91c303531113b65ea5205e9b6936c5d8b45cd3ddb60cd89ca7e49f0f00c1 -test/extractor-tests/generated/Trait/Trait_getTypeBoundList.ql 8a4eb898424fe476db549207d67ba520999342f708cbb89ee0713e6bbf1c050d 69d01d97d161eef86f24dd0777e510530a4db5b0c31c760a9a3a54f70d6dc144 -test/extractor-tests/generated/Trait/Trait_getVisibility.ql 8f4641558effd13a96c45d902e5726ba5e78fc9f39d3a05b4c72069993c499f4 553cf299e7d60a242cf44f2a68b8349fd8666cc4ccecab5ce200ce44ad244ba9 -test/extractor-tests/generated/Trait/Trait_getWhereClause.ql b34562e7f9ad9003d2ae1f3a9be1b5c141944d3236eae3402a6c73f14652e8ad 509fa3815933737e8996ea2c1540f5d7f3f7de21947b02e10597006967efc9d1 -test/extractor-tests/generated/TraitAlias/TraitAlias.ql c2a36ea7bf5723b9ec1fc24050c99681d9443081386980987bcb5989230a6605 b511356fea3dee5b70fee15369855002775c016db3f292e08293d0bf4b5bd33d -test/extractor-tests/generated/TraitAlias/TraitAlias_getAttr.ql 128c24196bfa6204fffd4154ff6acebd2d1924bb366809cdb227f33d89e185c8 56e8329e652567f19ef7d4c4933ee670a27c0afb877a0fab060a0a2031d8133e -test/extractor-tests/generated/TraitAlias/TraitAlias_getAttributeMacroExpansion.ql 029d261d0bdd6fe5bc30011ac72481bce9e5a6029d52fde8bd00932455703276 cad506346840304954e365743c33efed22049f0cbcbb68e21d3a95f7c2e2b301 -test/extractor-tests/generated/TraitAlias/TraitAlias_getCrateOrigin.ql 303212122021da7f745050c5de76c756461e5c6e8f4b20e26c43aa63d821c2b6 fdbd024cbe13e34265505147c6faffd997e5c222386c3d9e719cd2a385bde51c -test/extractor-tests/generated/TraitAlias/TraitAlias_getExtendedCanonicalPath.ql 601b6b0e5e7e7f2926626866085d9a4a9e31dc575791e9bd0019befc0e397193 9bd325414edc35364dba570f6eecc48a8e18c4cbff37d32e920859773c586319 -test/extractor-tests/generated/TraitAlias/TraitAlias_getGenericParamList.ql 5a40c1760fcf5074dc9e9efa1a543fc6223f4e5d2984923355802f91edb307e4 9fd7ab65c1d6affe19f96b1037ec3fb9381e90f602dd4611bb958048710601fa -test/extractor-tests/generated/TraitAlias/TraitAlias_getName.ql e91fa621774b9467ae820f3c408191ac75ad33dd73bcd417d299006a84c1a069 113e0c5dd2e3ac2ddb1fd6b099b9b5c91d5cdd4a02e62d4eb8e575096f7f4c6a -test/extractor-tests/generated/TraitAlias/TraitAlias_getTypeBoundList.ql 9ab4c329b25ea5e1a899b8698093f404ee9c095f0b0e38011161ca6480cd10a7 95c3b93610cdc08a0e251ab1307523f8cfb5560460923c81aace8619e30746dd -test/extractor-tests/generated/TraitAlias/TraitAlias_getVisibility.ql 7e86140d2e9081d46063a15d82719be315406eb4d6e6738b3cb5ba7bcbef458f 8fb1ecf6a96b1f1d4a840425139c4ad47feb8b0ff14a319c08f82535e62e23c7 -test/extractor-tests/generated/TraitAlias/TraitAlias_getWhereClause.ql 129e1f10aa23f10d71f144caa4ccb923928ec1fd791b203cdba9989b079fc1e1 1fb112215bd3e39b7bc8ebc059f9cc362e5b2f04a242df053e150efa638cfea7 -test/extractor-tests/generated/TryExpr/TryExpr.ql 3beaa08f6d734e74eca32ae2e3fb6aa7694400a429cd6b3db97bfd3402b379b8 3f55bfc71e804e2ba6f02087c0808901a379b2cb30f58d5933c91becc10f3654 -test/extractor-tests/generated/TryExpr/TryExpr_getAttr.ql a2cef886bb959ff0f47fa555e7a89075f93ab013e1766270590951bf0b14a47b 24d12c96f1c7a1ae3d0d596551fb53ef2745c890eb602e0f99db3cb70cf1e474 -test/extractor-tests/generated/TryExpr/TryExpr_getExpr.ql 4ccd50eb4bdf01381eabb843b5ea3ebddec5d5852a04f10be9b9a4ef8a3005f1 0ec050d28c70322f6f280180fee998d1b6cd82db4e114db7e10758fcee2a2fca -test/extractor-tests/generated/TupleExpr/TupleExpr.ql d6caa8d9ff94f27f88d338b07cacc280289970931e101680c6574e32bc0c863e 70508104013003dcf98f22db6eb9b60d14552831714048f348f812807189e9b1 -test/extractor-tests/generated/TupleExpr/TupleExpr_getAttr.ql b1e93069613a8cd2b49af93a5cdd1571b343571e9c3d049d8bf19b25a461f9d3 be18008a00e3b0fb786f5dd36268201fd43bf8527d8a40119b147a3a8c973b3b -test/extractor-tests/generated/TupleExpr/TupleExpr_getField.ql 308cd14873afedc74e3ed61d283f72da50008ce7690510c57fe0934c92158d58 5e3e23a7221486ead6502debb5d4978fb67046c8b0a5c8a688e4e196cb1f28a1 -test/extractor-tests/generated/TupleField/TupleField.ql ec4f5a92fd702f8ff4540f5c681d79e197354244fdcc6df8a3c50f30f7c3c4c2 ad8c7f8316dc02238c40cc79d257fdfd8614b2db14a871eea849be6551e8f0f5 -test/extractor-tests/generated/TupleField/TupleField_getAttr.ql b6b6a5349fc6767b0081d737e818425f0c93be5bd8de47c29fd89b7812e3267d 23d82a649cb733bc8c1d1b09dde84dbfcc8f847ed35be986a9ca8717ea9e5081 -test/extractor-tests/generated/TupleField/TupleField_getTypeRepr.ql ce4b6f69779e9f3c5a8b5625137bac806fc929d1c637804edefbf804a66f88e3 a3b741a2f48cb1e275f978585d2a04a720e23a03ccc04d09eb229fec322f42e3 -test/extractor-tests/generated/TupleField/TupleField_getVisibility.ql c7af5373382394a686d12a23c4e688a7cc0dfe6b6cbee25c7e863b4713601ddb b174f30404e69eef112dedc8397ad444e968f12dde9befdccb051305d98a75d2 -test/extractor-tests/generated/TupleFieldList/TupleFieldList.ql 7dc88440222ff036eb6aeabf9311568ea34f31f7c1ad19c71dd69a2dc17a6ed9 0255890d1389da004f18e8a0fc0b72d22790c36ccfacc6f452b269667f030f22 -test/extractor-tests/generated/TupleFieldList/TupleFieldList_getField.ql ad552a9c0b9964d1770f14cabbb436db60ebedc3c569006542a8eae9ddb30f6d 3a8c49d629376a9b8326138836b05ee2366b1021ffd19f5be74ab023e70aa50d -test/extractor-tests/generated/TuplePat/TuplePat.ql 24ee56bc848537da65eb8ecef71e84cc351a2aedcc31d6fb53a5b7865f15f7c2 81db1076e2e4921ceb50933b96cd7b574caab1818de257c1e9038f3f97447d59 -test/extractor-tests/generated/TuplePat/TuplePat_getField.ql f000bed41af031bc56d0705ce312abe7ab3dc6745b2936798c9938781e51475e f464a84dbc36aa371d60d6db68d6251f6b275dc4ecebdc56f195637be390b067 -test/extractor-tests/generated/TupleStructPat/TupleStructPat.ql 967409c7bddd7fc8d0b9fdfab2f5e6c82e8b4ff57020822aa0cda177244dfbc5 eaf0b7e56c38db60fafb39f8de75b67ee1099ac540fa92b5dfe84b601d31781a -test/extractor-tests/generated/TupleStructPat/TupleStructPat_getField.ql f3f2e23cc2a32aa5abc1e0fda1300dab1693230632b9eaa75bb3b1e82ee9ea1a 24b87a39ec639a26ff8c1d04dc3429b72266b2a3b1650a06a7cd4387b6f0e615 -test/extractor-tests/generated/TupleStructPat/TupleStructPat_getPath.ql 13a06696bbf1fa8d5b73107e28cdba40e93da04b27f9c54381b78a52368d2ad1 5558c35ea9bb371ad90a5b374d7530dd1936f83e6ba656ebfbfd5bd63598e088 -test/extractor-tests/generated/TupleStructPat/TupleStructPat_getResolvedCrateOrigin.ql e409667233331a038e482de4b2669d9fac9d7eb0e3bd5580ea19828f0c4ed7ad 588e4628471f1004575900d7365490efcf9168b555ff26becfc3f27b9e657de3 -test/extractor-tests/generated/TupleStructPat/TupleStructPat_getResolvedPath.ql 150898b6e55cc74b9ddb947f136b5a7f538ee5598928c5724d80e3ddf93ae499 66e0bd7b32df8f5bbe229cc02be6a07cb9ec0fe8b444dad3f5b32282a90551ee -test/extractor-tests/generated/TupleTypeRepr/TupleTypeRepr.ql 2f99917a95a85a932f423cba5a619a51cada8e704b93c54b0a8cb5d7a1129fa1 759bd02347c898139ac7dabe207988eea125be24d3e4c2282b791ec810c16ea7 -test/extractor-tests/generated/TupleTypeRepr/TupleTypeRepr_getField.ql 615acfcbc475b5c2ffa8e46d023fc2e19d29ee879b4949644a7f0b25c33125e6 81b037af5dcb8a0489a7a81a0ad668ca781b71d4406c123c4f1c4f558722f13e -test/extractor-tests/generated/TypeAlias/TypeAlias.ql 5cbf0b82a25a492c153b4663e5a2c0bea4b15ff53fa22ba1217edaf3bb48c6af d28e6a9eafff3fb84a6f38e3c79ad0d54cb08c7609cd43c968efd3fbc4154957 -test/extractor-tests/generated/TypeAlias/TypeAlias_getAttr.ql ecf4b45ef4876e46252785d2e42b11207e65757cdb26e60decafd765e7b03b49 21bb4d635d3d38abd731b9ad1a2b871f8e0788f48a03e9572823abeea0ea9382 -test/extractor-tests/generated/TypeAlias/TypeAlias_getAttributeMacroExpansion.ql fa2f0867039866e6405a735f9251de182429d3f1fdf00a749c7cfc3e3d62a7bb 56083d34fffd07a43b5736479b4d3b191d138415759639e9dd60789fefe5cb6f -test/extractor-tests/generated/TypeAlias/TypeAlias_getCrateOrigin.ql cd66db5b43bcb46a6cf6db8c262fd524017ef67cdb67c010af61fab303e3bc65 2aebae618448530ec537709c5381359ea98399db83eeae3be88825ebefa1829d -test/extractor-tests/generated/TypeAlias/TypeAlias_getExtendedCanonicalPath.ql fe9c4132e65b54eb071b779e508e9ed0081d860df20f8d4748332b45b7215fd5 448c10c3f8f785c380ce430996af4040419d8dccfa86f75253b6af83d2c8f1c9 -test/extractor-tests/generated/TypeAlias/TypeAlias_getGenericParamList.ql e7e936458dce5a8c6675485a49e2769b6dbff29c112ed744c880e0fc7ae740ef e5fcf3a33d2416db6b0a73401a3cbc0cece22d0e06794e01a1645f2b3bca9306 -test/extractor-tests/generated/TypeAlias/TypeAlias_getName.ql 757deb3493764677de3eb1ff7cc119a469482b7277ed01eb8aa0c38b4a8797fb 5efed24a6968544b10ff44bfac7d0432a9621bde0e53b8477563d600d4847825 -test/extractor-tests/generated/TypeAlias/TypeAlias_getTypeBoundList.ql 309efaa32a840fb1fca7d34b7cdbbf51ab469707fa195b69a9f1a7d141db3a02 e12bf44d8858e930bdde80ecd7909b5405a51a1b00a6d2c8ee880e68dd622075 -test/extractor-tests/generated/TypeAlias/TypeAlias_getTypeRepr.ql 64acc817272d5ee0ff3659a6851635ec8436a8f7944c15d19c80fffa2ad29eb7 db1e91971ba1ae8ba95ba8ac1dfa91f2fe0381c1b520518d80b344878357dbf5 -test/extractor-tests/generated/TypeAlias/TypeAlias_getVisibility.ql a1851a78f31ad6e3e5e43537832701f4c420546c2c86449c8391d3cc366d5445 23c118f662dee5f0e286753d107165b1964ce703a1378765f974530929a32723 -test/extractor-tests/generated/TypeAlias/TypeAlias_getWhereClause.ql 0cd281b7b5d3a76e4ec1938d7dcebb41e24ed54e94f352dcf48cbcdb5d48b353 5898e71246d8ba7517dab1f8d726af02a7add79924c8e6b30ce2c760e1344e8f -test/extractor-tests/generated/TypeArg/TypeArg.ql 32366a6163dcb2fbe2e98d739cc049f410a6523a135310e79b98a4c760926c8a dd52b9c138197ab07b6abbb66236c37261b47cc3201b1e1ab6ccb425b2cc6f44 -test/extractor-tests/generated/TypeArg/TypeArg_getTypeRepr.ql de9102f7cb306503d1858cba40a48b8f40e192bd11b40104453a303db5c6e241 65105b7b2ee346a37a3d6ee61d4c12e34d0cd6ff4a3d79ee0634081a6f959ef6 -test/extractor-tests/generated/TypeBound/TypeBound.ql 9f688714d359bf02c39bfc1ad767df0c37465241672ecc2c7acbed76703b5b1b ce49ac6d48f96f73c1de1cc2b053c06d7ab5ced234cd005549ccb96ef7fc6584 -test/extractor-tests/generated/TypeBound/TypeBound_getLifetime.ql 615b0f5ccbffc425a3fa9480197bfae649c072717697f59d2e9b8112d2ff3fcf 1f969aca15be820eb27fe80317ad7fd4ce60f1a0fbcb4ae98b04828b0aeca632 -test/extractor-tests/generated/TypeBound/TypeBound_getTypeRepr.ql 5c77f9ba0ce7ccde5a512e1eb6887e1588789d2bfbaadefa42177a144ca56e37 122ab4c2eb6cf285a1ce8818c00f60a12a53765b6999879a1c3596fb48eda39e -test/extractor-tests/generated/TypeBound/TypeBound_getUseBoundGenericArgs.ql bdb0cf5cee3da296738224e6f44dcb348009f71e645498e72418e1b7d9b955e8 96168156dca7227f9d90dd8381bc04823dee8fae54c7eba427f99cdcae920d44 -test/extractor-tests/generated/TypeBoundList/TypeBoundList.ql 829c62ad88caa7707a4067c1a34f81971e936af1280a134b0b3532fbd4e4c887 10133eec05b902d5f0a6b3ed66156879914a83290014ba0ded26f1c3aaeb2b28 -test/extractor-tests/generated/TypeBoundList/TypeBoundList_getBound.ql a6f6ec3f8d329da3509a8040ee2383ec6d9c66fe7c5685d94e90ac989a9e61b0 c812280f09658c63beb2a2ec0ab86e007819da08b6637bb4299c6ed6c90a4c6f -test/extractor-tests/generated/TypeParam/TypeParam.ql bff624133257883477db43ae05cc17681ab20d5564c2025dc78758255a62eaf2 a25d4adbe6119f4f36fa57f08cf7ba52e0b54668047e685d811570e0126bcfaf -test/extractor-tests/generated/TypeParam/TypeParam_getAttr.ql c071639828faca21de4b65a26a712ce126f7e989118ad4a896342b8e7d2aa2d0 83050691345f58c73a47f9cfd011bdf65a0759ffb3ea957336dc0ff6d600d13a -test/extractor-tests/generated/TypeParam/TypeParam_getDefaultType.ql 705edd03cf04c030a244541de287d2acfd3842389bfc58a26cfd1577da475113 7f2680131d4bcf301e8207a4844305c459615744a83c81f2c3a245db8284df74 -test/extractor-tests/generated/TypeParam/TypeParam_getName.ql 9d5b6d6a9f2a5793e2fff8dfa69d470659cc36dc417fc8b463364892f70c9d13 91dc4396c2af6c5175c188691c84b768da0d779d5d82afee19baf31e92c7dd91 -test/extractor-tests/generated/TypeParam/TypeParam_getTypeBoundList.ql 080a6b370ad460bf128fdfd632aa443af2ad91c3483e192ad756eb234dbfa4d8 8b048d282963f670db357f1eef9b8339f83d03adf57489a22b441d5c782aff62 -test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr.ql 4ad6ed0c803fb4f58094a55b866940b947b16259756c674200172551ee6546e0 d3270bdcc4c026325159bd2a59848eb51d96298b2bf21402ea0a83ac1ea6d291 -test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr_getAttr.ql d8502be88bcd97465f387c410b5078a4709e32b2baa556a4918ea5e609c40dd7 b238dc37404254e3e7806d50a7b1453e17e71da122931331b16a55853d3a843f -test/extractor-tests/generated/Union/Union.ql 4974339feb10ab65bef60ba713058cb73ba7dcf5e451ddf6c919e94f96f56a80 f0f0025666940e4b0f72ef2e64b28e96b1a410f25f56c98cbebdd019ceece7b6 -test/extractor-tests/generated/Union/Union_getAttr.ql 42fa0878a6566208863b1d884baf7b68b46089827fdb1dbbfacbfccf5966a9a2 54aa94f0281ca80d1a4bdb0e2240f4384af2ab8d50f251875d1877d0964579fc -test/extractor-tests/generated/Union/Union_getAttributeMacroExpansion.ql ddd0133a497dc057a353b86acc8ed991fefeaefa335d8ad9fe95109a90e39e54 fcaed4287815226843157c007674b1f1405cae31856fed1113d569bab5608d9b -test/extractor-tests/generated/Union/Union_getCrateOrigin.ql c218308cf17b1490550229a725542d248617661b1a5fa14e9b0e18d29c5ecc00 e0489242c8ff7aa4dbfdebcd46a5e0d9bea0aa618eb0617e76b9b6f863a2907a -test/extractor-tests/generated/Union/Union_getDeriveMacroExpansion.ql 82ee99ea42d6de9a45289a4b8e750cba887ac9daa2f6387b8c2a9062224da45c 1f18cd80f93ca2e19d3ac8ce733f264522ba785078f541342c816e16194748d6 -test/extractor-tests/generated/Union/Union_getExtendedCanonicalPath.ql 6268ddb68c3e05906e3fc85e40635925b84e5c7290746ded9c6814d362033068 04473b3b9891012e95733463018db8da0e96659ea0b10458b33dc857c091d278 -test/extractor-tests/generated/Union/Union_getGenericParamList.ql c55156ae26b766e385be7d21e67f8c3c45c29274201c93d660077fcc47e1ceee 4c4d338e17c32876ef6e51fd19cff67d125dd89c10e939dfaadbac824bef6a68 -test/extractor-tests/generated/Union/Union_getName.ql 17247183e1a8c8bbb15e67120f65ca323630bddeb614fa8a48e1e74319f8ed37 e21c2a0205bc991ba86f3e508451ef31398bdf5441f6d2a3f72113aaae9e152b -test/extractor-tests/generated/Union/Union_getStructFieldList.ql ae42dec53a42bcb712ec5e94a3137a5c0b7743ea3b635e44e7af8a0d59e59182 61b34bb8d6e05d9eb34ce353eef7cc07c684179bf2e3fdf9f5541e04bef41425 -test/extractor-tests/generated/Union/Union_getVisibility.ql 86628736a677343d816e541ba76db02bdae3390f8367c09be3c1ff46d1ae8274 6514cdf4bfad8d9c968de290cc981be1063c0919051822cc6fdb03e8a891f123 -test/extractor-tests/generated/Union/Union_getWhereClause.ql 508e68ffa87f4eca2e2f9c894d215ea76070d628a294809dc267082b9e36a359 29da765d11794441a32a5745d4cf594495a9733e28189d898f64da864817894f -test/extractor-tests/generated/Use/Use.ql 1adafd3adcfbf907250ce3592599d96c64572e381937fa11d11ce6d4f35cfd7f 2671e34197df8002142b5facb5380604e807e87aa41e7f8e32dc6d1eefb695f1 -test/extractor-tests/generated/Use/Use_getAttr.ql 6d43c25401398108553508aabb32ca476b3072060bb73eb07b1b60823a01f964 84e6f6953b4aa9a7472082f0a4f2df26ab1d157529ab2c661f0031603c94bb1d -test/extractor-tests/generated/Use/Use_getAttributeMacroExpansion.ql d02562044449f6de2c70241e0964a8dedb7d1f722c2a98ee9c96638841fa1bc5 a1db982e16b35f1a0ab4091999437a471018afd9f4f01504723aa989d49e4034 -test/extractor-tests/generated/Use/Use_getCrateOrigin.ql 912ebc1089aa3390d4142a39ea73d5490eae525d1fb51654fdd05e9dd48a94b6 c59e36362016ae536421e6d517889cea0b2670818ea1f9e997796f51a9b381e2 -test/extractor-tests/generated/Use/Use_getExtendedCanonicalPath.ql ccfde95c861cf4199e688b6efeeee9dab58a27cfecd520e39cc20f89143c03c9 6ff93df4134667d7cb74ae7efe102fe2db3ad4c67b4b5a0f8955f21997806f16 -test/extractor-tests/generated/Use/Use_getUseTree.ql 1dfe6bb40b29fbf823d67fecfc36ba928b43f17c38227b8eedf19fa252edf3af aacdcc4cf418ef1eec267287d2af905fe73f5bcfb080ef5373d08da31c608720 -test/extractor-tests/generated/Use/Use_getVisibility.ql 587f80acdd780042c48aeb347004be5e9fd9df063d263e6e4f2b660c48c53a8f 0c2c04f95838bca93dfe93fa208e1df7677797efc62b4e8052a4f9c5d20831dd -test/extractor-tests/generated/UseBoundGenericArgs/UseBoundGenericArgs.ql ed7f240c960c888127298fac6b595477bc1481bdd1ed9a79124c6e6d8badc059 f30f69400600d52f10b1c54af0d00c0e617f5348cb0f5e235c93ef8e45c723a4 -test/extractor-tests/generated/UseBoundGenericArgs/UseBoundGenericArgs_getUseBoundGenericArg.ql 971d94960a8cfcadf209202bb8d95d32da9b048ad6df9c520af1bf8e23acd1dc f6d6836592652cc63292aeb75d2349f4bed640047b130b79470703b8d1cd563d -test/extractor-tests/generated/UseTree/UseTree.ql e305edd22df9e018a58f932774447354b7fcf0ba871b52b35f0ee9cd4f6dacdf 766a84116aa8ff3d90343c6730bcb161ff1d447bdb049cd21d6b2bbf3cb9032c -test/extractor-tests/generated/UseTree/UseTree_getPath.ql 80384a99674bdda85315a36681cb22ad2ad094005a5543b63d930fc7e030dd5b 2cd92b5de8b4214527f8a58d641430f6804d9bd40927e1da0c7efda2f86f6544 -test/extractor-tests/generated/UseTree/UseTree_getRename.ql ec3917501f3c89ac4974fab3f812d00b159ae6f2402dd20e5b4b3f8e8426391d db9ed981ce5f822aee349e5841d3126af7878d90e64140756ab4519552defe72 -test/extractor-tests/generated/UseTree/UseTree_getUseTreeList.ql c265a88347e813840969ae934dfd2904bc06f502de77709bc0b1c7255e46382a 52a239c8ea5fd8fbfbd606559d70ecadc769887437a9bcab6fb3e774208ad868 -test/extractor-tests/generated/UseTreeList/UseTreeList.ql cd943c15c86e66244caafeb95b960a5c3d351d5edbd506258744fb60a61af3b2 cfa584cd9d8aa08267fd1106745a66226b2c99fadd1da65059cc7ecf2f2e68cf -test/extractor-tests/generated/UseTreeList/UseTreeList_getUseTree.ql dd72966b1cb7b04f0267503013809063fcfb145e2b2d7d5250d9f24d2e405f9a 75b953aa11c51ca0fe95e67d50d6238962d8df4a4b9054999a2c6338e5a5613d -test/extractor-tests/generated/Variant/Variant.ql 861e349a2c11571eb027e740b4bf29c0ce98b0f1342e45b364bb5fcbaa487d91 5825b12837862765e23ed09c08c146cc292b2305aadc531ad826ad5bb36f9cdc -test/extractor-tests/generated/Variant/Variant_getAttr.ql dd38e48e1eb05ce280b880652a90010eb63f7de3be7232411ba6265691249420 f8980680104de1e5fd40f264d8d62346aacaf6403a5e051f6fd680e234c82c1f -test/extractor-tests/generated/Variant/Variant_getCrateOrigin.ql 99e79930f8ff87a25f256926e5c3ce1ee0847daf6fadc5445fb33c85328b4c61 2dd64a53813790654c83be25b5e175c9c5b388e758723c2138fff095353fdd7b -test/extractor-tests/generated/Variant/Variant_getDiscriminant.ql 2adba17d4acd790ea7ff738a23fc8d691e40bbc0e1770bc0f15a6a6f0f1b37f2 6e28a8aef3cde78ce8db50e4a48c663d1aacd7a4cc8c212e7c440160da7ae4c2 -test/extractor-tests/generated/Variant/Variant_getExtendedCanonicalPath.ql fe6a4bfd1440e7629d47283910de84c5e8c2f5645512780e710f53540b5bc886 b1e31b765cb1a5fe063abb8c1b2115e881ae28aa3ccd39e088ff8f2af20d6cf4 -test/extractor-tests/generated/Variant/Variant_getFieldList.ql 083c8cf61989663de33d99b72dec231c308ccc8bb6739921465c473a07e8ea03 d03bff6945853c940acdc053b813d53b008ddab9a8bd4307826433828d4763ce -test/extractor-tests/generated/Variant/Variant_getName.ql 0d7b47bec9f9031c67f7b684112a84a311ef9b2efeb260bd7cd6f424011ca0d8 73565e6f965dd7fd7bb9b3408c7d7b69120e1971b67ab307fed293eb663a59ae -test/extractor-tests/generated/Variant/Variant_getVisibility.ql 2c8f365d28d96af55589f4d71ac3fee718b319b4cbc784560c0591d1f605a119 13160d9cf39fe169410eff6c338f5d063e1948109e8f18dd33ea0064f1dd9283 -test/extractor-tests/generated/VariantList/VariantList.ql 9830a7910c10aab76af40b093f10250fc80b8e92c3e2d25c1e88f7866773119d 758d6a8499a4528468e77575ca8f436450a12d1244d17cd2ab1c375e30fea870 -test/extractor-tests/generated/VariantList/VariantList_getVariant.ql beaf322eb010ddfafc5957cd2795595bf2b331033de69842f05cc2b5f8c57da5 c57187b3105c8bcd43de018671c58d3d532cef1724cf2f82039a99061ecb8d27 -test/extractor-tests/generated/Visibility/Visibility.ql 417b501e0eef74006cdc41aef2ee7496871fac8479c93737147336d53a60b1fc f65527aeb6c888c18096efc8b3a68d02cc4e857c18ae5381d85d3e10c610812e -test/extractor-tests/generated/Visibility/Visibility_getPath.ql 53de9942208dff340d4665f602c519592c79b65dad5db217360fe23bb22b9318 6e4d2b191792d7a259f2edbbb2333df3f97c14600b04142fff4c86266dc61b75 -test/extractor-tests/generated/WhereClause/WhereClause.ql 89af4f9e3021560c67c49a3b7458449aeda469f586317d8855d00977a8969a95 59f9f9e7619fb0aa17124679c69723a31f03e7a7af24088b274234c034371e7c -test/extractor-tests/generated/WhereClause/WhereClause_getPredicate.ql cc9f83e30aa028d0130c7f27a1cb72a2c8e3100d65de4041f24670e8062192a4 a561ef1d71efc850b73f30a695777acda4835e2b9a34b1d054a57ebb2450d73c -test/extractor-tests/generated/WherePred/WherePred.ql 3a29d0eae524810ade32546b9170f25cc243f8542b68b5fe86b0fd2d766e92b3 ff5742ad1d36f2675089c2692418e3c8e73cca3ed1e8796d795aa6c681107099 -test/extractor-tests/generated/WherePred/WherePred_getGenericParamList.ql 21c3aaae697a7c8b4df82aa5c6eeef4963c9240fafb20cca3888e4361e208966 2f9ab4ed12984a4c82af2b8b805b28c2cb0c82d4e90927d9cf5be81e3bdc231a -test/extractor-tests/generated/WherePred/WherePred_getLifetime.ql e08d9d6cccf634746f42a6ee583bbb3e7e9a9edbb63242e73b2bff4463df55d8 139543750c18f88d9c1ad2cdbcf1699d597cf2264bbb6b02a7e5792444e277ef -test/extractor-tests/generated/WherePred/WherePred_getTypeBoundList.ql c78e31ff4d1822a6b76f403e5ccb8f5529b4f784e14e618833df0378adca55fc 8bb1c9b5a1cfca0f5e8335464f7439aa098063176fbd3edbaf3407169f1899e6 -test/extractor-tests/generated/WherePred/WherePred_getTypeRepr.ql e56e4989bb9b9ff1d8648641993732dac2f37c5e3b4bbf1c550735a4f1d84b3c 246cd2cfaf90115060412c9e4a15da9089f3b524f72a63ae42d17b062e7be52f -test/extractor-tests/generated/WhileExpr/WhileExpr.ql 61c49414f2ed786a68b79bd9a77093e4086457edb6c136cf8a94f2ac830c2f5b 7737f724a297d011c12143e009a63926812c63c08a1067b03e8677697ab00f83 -test/extractor-tests/generated/WhileExpr/WhileExpr_getAttr.ql f8527130eb2492743c0e629c97db291abcefe3d35302c840fee327ab0d8f10fd b41bedd429e5566fd68a50140ff1f50b51e2c7c351cbc8253fbc126527073f7e -test/extractor-tests/generated/WhileExpr/WhileExpr_getCondition.ql 84a021806423425b24eaeb9fb9967a6aadabe823c24e77a0dfefcb3509041597 147aa8bbe4dbf9b90be2467db8207dc96aed281e722eb6b9c998442a90911a6c -test/extractor-tests/generated/WhileExpr/WhileExpr_getLabel.ql 60ef4de57d85c7df23c0518b944b3839a9b2478044326829b5bf709a8c8d7240 3916e9ff50733c58afdc09837339b72a555a043f92f1c4e09e1652866029b017 -test/extractor-tests/generated/WhileExpr/WhileExpr_getLoopBody.ql cd62b7a464b5778ac925c3dbaf607e97d88ecd30f83f9106ace8e4e148d935b6 ab8027bddd6f138d3530ecd1aeb342b15015e886af1db80b75160c210a380086 -test/extractor-tests/generated/WildcardPat/WildcardPat.ql c6da9df739528763f423eac0fa537bfd524d3ea67794abdbc7f7c56193163273 42be2c5e296ad3afd05b5dcc208a4d2db2fda9323cda2df66054f921e37f6efe -test/extractor-tests/generated/YeetExpr/YeetExpr.ql 8a9f110486be12494256382374d6d5af8aa2210a84fd4452e99a3a3882b0eb59 510fa9eadeb062bd4f733ca6b6892e8908c2c6d58ec8478efc6942bd63a527f4 -test/extractor-tests/generated/YeetExpr/YeetExpr_getAttr.ql 84e44a1fbf1a9d18f255781a3a9aaa71583b6c05da228989471dbe03da4e817f 560332129d3341fbb1c0ea88c894033f0bde19d0adc081111f7bf8af55b61f88 -test/extractor-tests/generated/YeetExpr/YeetExpr_getExpr.ql d77b68b621e5b903231e2dfbc53a1e1421d59a0ad2e8c346c2abc1a2dfc11efd 642eb5791eb336ff05594d06eca08735e54bdac3aecf5d31a4de1267d10cf440 -test/extractor-tests/generated/YieldExpr/YieldExpr.ql 1700b4b2660724d8dbabde5f3441424b79690e2a43dcc599dd69af255a7fc8ff a11e48d9fab0cc358c5806c01753d61e48713b740739ffc87f933754e7f103cc -test/extractor-tests/generated/YieldExpr/YieldExpr_getAttr.ql d4c5e2710b4e41f6fcec51e74041a8af4c3e8116d42fd14fad6ae166a9c18031 cc6763b9f06a3fe6cafc672054cea8835f800f934af47c3c135b443486400394 -test/extractor-tests/generated/YieldExpr/YieldExpr_getExpr.ql 592f8938120a036d78d180eb59634341d72d5e76854d9df48ab1b9b69db99c35 efe2955a5b4acc24257f9d79a007d39951736ce8ca11970864d1e366c4e516e6 +test/extractor-tests/generated/DynTraitTypeRepr/DynTraitTypeRepr.ql ff54195d2e09424faaac4e145a40208bf0e57acc57dfa8247b3751862a317c4b 583d5b98aa31a9af6ad73df000ca529f57f67aa6daaa50ca5673a56eb57bf507 +test/extractor-tests/generated/Enum/Enum.ql 11b8b502f0e79e0447a3d014616798448130ec5d686b5b12e0db687786065f4f 5ea58a9b57ece63253a82599c096ebbbd0a3c4ad136ca20662f47a4bafd2df41 +test/extractor-tests/generated/ExprStmt/ExprStmt.ql 7c62a97f7f910ae6e0e9aff7fdd78b369d21257ccab52afe6307ddea2e15dad1 2d32a366c4acbea3136ff1f9f9dadf76b148f82ad1d7170f02efd977d8a07ae9 +test/extractor-tests/generated/ExternBlock/ExternBlock.ql ceb04a9596c73dc2e750ce1950cefcf0b5fffd1ab7dc3e723e4a6500b3ef3ab2 4f6ab037d307ff351a9e48c37b47b8f8f25de5f3d5ecb78cb8c39d7275751d29 +test/extractor-tests/generated/ExternCrate/ExternCrate.ql 7cd54aa65300453fc031e69fde24466d01cdfb8ba73e24e4d134fbd3847b15a8 6a6fdeaee88c74caf7345dc8b85f326032eb27e63aa63a6ed883256e4da86d3b +test/extractor-tests/generated/ExternItemList/ExternItemList.ql 7f4d538d8878a0166b1868f391abf34df1d5e986a7a2e9ceaddb36d95bc7f46c 37072596f5a1e28ad98cc87dbfed00afadd83fa007f03d5b17d4dee8922b100f +test/extractor-tests/generated/FieldExpr/FieldExpr.ql 2a04baaf57a22b65bd5b9e142e59cc2b7d3dd3174910ddc0c2510094f2dd32b1 d8e4fb4384aade1770c907d16795a4af9884051390a5a05935ad4b4df2e757a0 +test/extractor-tests/generated/FnPtrTypeRepr/FnPtrTypeRepr.ql 1501730f1e02e9d22b07b18bb42a5372e1d327bda62bdc81d75f9966946cb97d 28625f0b7ee4d7ab37fc13206585961e89a5e509a93215c16136d2382418b7af +test/extractor-tests/generated/ForExpr/ForExpr.ql 3bac38bf33e140ae9f88371ec90409f7de867e39cdea46f02b15519b236b57cb aade1baf6e6081b3b9bce5b7e95fe4b7ffe00ea9450fd6e1d6692ad97cf93fe9 +test/extractor-tests/generated/ForTypeRepr/ForTypeRepr.ql b74c0034bf5d1bb4a1a73ab822daca4572e80983a0c88620abe92bb794dd9cd8 a18f9a6d95b46b808c3a25e11fc54d2564ace67fb98d0c76632c5d5894b31030 +test/extractor-tests/generated/FormatArgsExpr/Format.ql 237ed2e01d9a75ee8521d6578333a7b1d566f09ef2102c4efcbb34ea58f2f9e8 09007ce4de701c0d1c0967f4f728ea9e627d9db19431bd9caebbf28ee51a1f36 +test/extractor-tests/generated/FormatArgsExpr/FormatArgsArg.ql 5abcb565dcd2822e2ea142d19b8c92194ee17c71c3db7595248690034559d174 1ffa743fc678701ffeefff6c14c1414bb9158e6756f32380dd590ff44b19ca5a +test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr.ql 243c2f9d830f1eae915749e81ac78d3c140280385b0002d10fcc4d2feaf14711 72b90a99a8b1c16baf1e254e1e3463c3ce5409624a2a90829122717d4e5a2b74 +test/extractor-tests/generated/FormatArgsExpr/FormatArgument.ql 0a345eb48dba8e535d12a00e88008e71b3ce692fbf8f9686c8885e158635dffe eab1f230fd572474a3f304f97d05bbf4a004c52773aaf2d34f999192244c0b80 +test/extractor-tests/generated/FormatArgsExpr/FormatTemplateVariableAccess.ql 24108cdc54feb77c24bb7894744e36e374f0c03d46d6e6c3fcb2012b1ad117f6 05a6b6f51029ee1a15039aa9d738bb1fd7145148f1aad790198fba832572c719 +test/extractor-tests/generated/Function/Function.ql 3fccfb248ffe18fb1df1c12feba1c07f1a41edac58c9d77087971a8f94a013d7 1500438db913c101747911fd570a2f2197e4282f0156d1acd9a0026aec3cceb8 +test/extractor-tests/generated/GenericArgList/GenericArgList.ql 9bd6873e56a381a693fed0f595d60d973d0073ba7afa303750d5c6a0b887a811 0b373079f65aa91cacabfc9729c91215082a915197eb657b66bcdb3b6d5e7e53 +test/extractor-tests/generated/GenericParamList/GenericParamList.ql 206f270690f5c142777d43cf87b65d6dda5ec9f3953c17ee943fe3d0e7b7761c 38a6e0bbca916778f85b106609df6d5929baed006d55811ec0d71c75fe137e92 +test/extractor-tests/generated/IdentPat/IdentPat.ql 23006eddf0ca1188e11ba5ee25ad62a83157b83e0b99119bf924c7f74fd8e70d 6e572f48f607f0ced309113304019ccc0a828f6ddd71e818369504dcf832a0b5 +test/extractor-tests/generated/IfExpr/IfExpr.ql 540b21838ad3e1ed879b66c1903eb8517d280f99babcbf3c5307c278db42f003 a6f84a7588ce7587936f24375518a365c571210844b99cb614596e14dd5e4dfd +test/extractor-tests/generated/Impl/Impl.ql 6db0831b8b6bbb0168a63b49aae27022546256c19cc9b36d7fdebbea6a51f2f3 4d2e6b46a9a9397e6da6a58fcea6e75c5b5df37360cdfb2d6d477140c3958fb7 +test/extractor-tests/generated/ImplTraitTypeRepr/ImplTraitTypeRepr.ql 311c6c1e18bd74fbcd367f940d2cf91777eaba6b3d6307149beb529216d086fb 16c7c81618d7f49da30b4f026dcacfb23ed130dbfcfa19b5cb44dc6e15101401 +test/extractor-tests/generated/IndexExpr/IndexExpr.ql ecfca80175a78b633bf41684a0f8f5eebe0b8a23f8de9ff27142936687711263 27d4832911f7272376a199550d57d8488e75e0eeeeb7abbfb3b135350a30d277 +test/extractor-tests/generated/InferTypeRepr/InferTypeRepr.ql 6ba01a9e229e7dfdb2878a0bdbeb6c0888c4a068984b820e7a48d4b84995daa2 7120cafd267e956dbb4af5e19d57237275d334ffe5ff0fb635d65d309381aa46 +test/extractor-tests/generated/ItemList/ItemList.ql e29302a9212b07fdaf93618852be30adfac64b292e9a0ddbf63addb803daaa98 7e69a78b0f58ef9344892113799092149024c1352b0965a6326d8a45cd44771a +test/extractor-tests/generated/Label/Label.ql da1f302da6cb31e6ccb73c722d9d5cfaad6a26d9869b3fa09fe50b03e26f3d9b 5fbfabfef6567ec6609be1af7859eba8ecb1f7f1878b8fac426e0d7098c17ba1 +test/extractor-tests/generated/LetElse/LetElse.ql ec8e7362ce9f903731ed6bfc190fc18a6f60abf150f5cee878a0fb9adaa20b94 2e019b6e246caabe4800ab940bc150bd8e466d59dde87bd614bf064adb703c8f +test/extractor-tests/generated/LetExpr/LetExpr.ql 59f70af49ba496559a7ccfe30e737597fb473794d677627d344a9285f85dad33 b59d1f665c600055666a422c4008878cecf17d9ff847cd02b6e0e82ca73073bc +test/extractor-tests/generated/LetStmt/LetStmt.ql d89291bb071484b1e79b009b2a310a5104a2ac0e85a8581ed73135e1351c27c8 45e20da515173e372c1d1d87392eae64d6d482eab0393f9753d1ebe792241d39 +test/extractor-tests/generated/Lifetime/Lifetime.ql 9ca2da890633be36338a60e41c19a32ed03a7397ffd5c2271de964ded59b380f 475925d5aaa3c7763f3fdc703b8510408b6f729a4855d9e7ed2cf642cb7e0f98 +test/extractor-tests/generated/LifetimeArg/LifetimeArg.ql ba052a01e76251c45960451fa183cd33e7435dd2906a8a085d99ce7bfba8ee05 bfa2de807b23f139342ef820d05f50e3b3573027427d0c77b710aea5a94fc839 +test/extractor-tests/generated/LifetimeParam/LifetimeParam.ql a96f586af332969878a4e9df8f9dfca99e5c98b6f60315dd1b3fea47c4cbace9 01d87c8d686466e15e19f85aa9b2536f7b8035181444d532ff11286c77b14dcb +test/extractor-tests/generated/LiteralExpr/LiteralExpr.ql 00570642966d233a10ec3106ae65e6ea865c29d0776fdbc452815f528301117c adb286ad3bd763f1b1b350cac91bc2615869dcb9b0faf29276ace9a99d31f0cc +test/extractor-tests/generated/LiteralPat/LiteralPat.ql 863d4902e7e22de3176398cbb908e6f5f487b3d22c0f9f7a5498a1ebc112c0fd 47e3f70c5c32f17050d3ca8c8b42d94ecd38e378627880d8100b7ca182cfa793 +test/extractor-tests/generated/LoopExpr/LoopExpr.ql a178e25f63b4d517482ec63e5dfb6903dd41dadd8db39be2dd2a831e8456811f f34165f78179960cc7e5876dac26a1d0f6f67933eff9a015b92ca0e2872b63e8 +test/extractor-tests/generated/MacroBlockExpr/MacroBlockExpr.ql 62859a25b88c93db1d47055f682f1b8ed97ef227c870bc14041af106cb9593fd 14c5831920249ef2e0799ddacca62805e2e2d8b8a6cbd244acb3a20c4542bf7b +test/extractor-tests/generated/MacroCall/MacroCall.ql f98017f6070e2a5e4b191d5380cc0491d7358c456e8459b313235e44eb368794 437129210d9b7f6850adf4d2c8ef7d0644193418645d631b8edf229656fc57ac +test/extractor-tests/generated/MacroDef/MacroDef.ql 9e3647a92713d32f87e876f37d703081855ea88a7a3104757f90bd94eb382fa9 b50e9797c1b8ea5491267ddb6778862f0541617ee60bd8e167cc23a499e36733 +test/extractor-tests/generated/MacroExpr/MacroExpr.ql 83fadb88fd8f913bb1b1cda26d21b173bdc94bb6682a74eaddce650ebf72aa41 1c502cde6a95ec637e43d348c613be3dec4092b69d2c8692abdc5a9377e37f5f +test/extractor-tests/generated/MacroItems/MacroItems.ql 0f8c1d134a28b80c70d5fff7c120f17350f6116689fdd7f67bdbfbaa0302c224 9f0594aa6d96c4f368d6c6521d0b58ab456611842afbfd040cb84f8858241677 +test/extractor-tests/generated/MacroPat/MacroPat.ql 71f65d80e670ec43db768693b8d44d627278a69e938517dc9068c76785ffd102 b1577dd669cafa9cf97aa998a7f30ac4a94aff129787a2d5a1cdac553fd56397 +test/extractor-tests/generated/MacroRules/MacroRules.ql d97daa29929a5bc4e25e65755c1929f9854beb1d2a183579a1ebec1d4b346dca 8b81026fa36152d870f91981a020ed0fa06cae0380d4e8d9496fea12a95b0326 +test/extractor-tests/generated/MacroTypeRepr/MacroTypeRepr.ql ebe8451a9256c9d7e77749beca88d0fd5ab73c76404bed4ff6e0c75f126159cc 72dd6d5ca4133e318fd51bb9007519b938e618cd4ef27bfe52b9c8c8cbd484ea +test/extractor-tests/generated/MatchArm/MatchArm.ql 704976bd48e56a0a2fce7c2d9454b6cd24b1bf924633702ebcd71d8521b9b171 7c2bb501002c997a680c69b6d0856da13868125913e726f1a12b97907f32064a +test/extractor-tests/generated/MatchArmList/MatchArmList.ql bbc679fe6d8dedf9131d0fa5faa7b44c138c5f56b9cf3cb209fd3ccd614b689c 916c53a2b68646b52f2d28eca2a19218ba9d12eb8edf7c6cc4140dace1bf4e0d +test/extractor-tests/generated/MatchExpr/MatchExpr.ql b75a5936401bb5ca38686f1413f5c8267ad685722560a2e9041dacf2f8d54abc 7da57118fe5b1f7f5cbe8d6b5f3ae70816fd4837b1c2e6401b98175b36ca233f +test/extractor-tests/generated/MatchGuard/MatchGuard.ql 91de18a0a18d120db568b2c329e5cb26f83e327cf22c5825c555ea17249d7d23 0bcdb25895362128517227c860b9dad76851215c2cdf9b2d0e5cc3534278f4ec +test/extractor-tests/generated/Meta/Meta.ql 43dd1cd669099b38396b316616992af6d84b0c1cee953b19235a00ab3d3bb43c 80b1885809aa074357e21707d1f8c6dca19f0b968ccff43229bb0d5c6fffb2b2 +test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.ql 617bc809816dc3cc1de1c0b49c494568164fe2a048472f4cce1b83f0a1f54a42 1b323e0b1812dbfdd78ee58798353e20326a3ca7529f52d5c984d1d92889a65f +test/extractor-tests/generated/Module/Module.ql 4e154af13f19ee06e88ce8ff85e143bf6ddde798b2ec6fecebf43b8015211087 78f91c2827883ea7ed1f546de80d0909f4ac57b06027439f07dcdc0a09d7888d +test/extractor-tests/generated/Name/Name.ql b2fe417f7c816f71d12622b4f84ece74eba3c128c806266a55b53f8120fa4fb3 8bc65bbf3f2909637485f5db7830d6fc110a94c9b12eefe12d7627f41eae2256 +test/extractor-tests/generated/NameRef/NameRef.ql 210a70e0957f3444195eed3a3dfbb5806e349238c0b390dc00597e6b8b05fcec d74fbce3c71aa7b08ae4cb646ccb114335767cb4fe000322f9dd371c1bb3784f +test/extractor-tests/generated/NeverTypeRepr/NeverTypeRepr.ql 4e73ec96fccb00fe241546ff12c47329a9c67b7ae40a58a5afa39ecb611b84d4 bb716f72db039e0a82de959e390259a82cf99ba4482070602b7b6b42511976e5 +test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr.ql 851d84073f4a14cef24ce945a099bc43b22381fc21672ba9ba424623d66d9e0e b3ca3309da0054501dc49f83b9e1b51c155966a14504521565ea980cf1600f55 +test/extractor-tests/generated/OrPat/OrPat.ql 8742e1708da0bcc172c8cc637082672c92a136aa50bb2f0ef928387337aefa3e 1901c223502e8cc046c233a10d923226373bad0837264e2b837fd549929020e3 +test/extractor-tests/generated/Param/Param.ql de90709cbd61e1852c857ffb6cedd17818464c93bb7bdc92c900ee04f4d2a27c a105ee30716345987989d48c4fa6194c34741fc48528515aeca673662b5259cb +test/extractor-tests/generated/ParamList/ParamList.ql 015cfeec048fc89698d75a04492a0e39303b1264f80e2b6977d178aba18a745d 349455ea6fe026a482bf9d63e9581ed2f368de3331bd2f0b9591ec20ee2a5f21 +test/extractor-tests/generated/ParenExpr/ParenExpr.ql 5ac9654a149f32638a663894db769152ce5a5abff7051e4d865bf0ac2485759a 3fa0afc9522c241d7530cc6d1e52b662d920f0459684bec82fcfda30d2ec9871 +test/extractor-tests/generated/ParenPat/ParenPat.ql 50f99c6a7e5e2f76dc5bbc10a6b2db5f5f40b85e80a992aa616e424744a7606d 5ae681b09e7b8793d2d8fa36e9e7d9b6c32fc94d6c26d43425407d05d351fcb3 +test/extractor-tests/generated/ParenTypeRepr/ParenTypeRepr.ql 86a45a9f9696a55562a7125f08297bcd50b368225a13cd31b6e9eb4071d04e13 53c0b8c4f453a748c9534220960c6ce8c52bd7501cf1d1f74e3928fc6512667c +test/extractor-tests/generated/ParenthesizedArgList/ParenthesizedArgList.ql 6d0e3f7cbcc835f2a5784ccb09b0d65c2bb063c1904edded2e7fc8c9fb57c4fa e41c898b8b0d61078e0d76c6e2e141251dca71f79ad5fa119c012220c54cc409 +test/extractor-tests/generated/Path/Path.ql 0f6b63c723da7f140411c8e9a4bb9fbe043a997a1748a4a491add4bd6e81fd6e 5081db5bd590b72780c3c8032532e65b5d453c327c8771da6b87c10e30071523 +test/extractor-tests/generated/Path/PathExpr.ql 2b032a00d8f5570b34f44bdb4209f199f821e093011472b5c686918a063442a5 9f10b1e38863da09365fc45f749578dde74bbb64d35972fa34b83e6814f0004a +test/extractor-tests/generated/Path/PathPat.ql 8d8053588dba1f35fff3bb89eb66f1534f637cf3b56338a6f3c19d748db7e1ca d7405ca5bf3bfa6960426964be3ea32562e1367c74b1f438c0827573eeaf773a +test/extractor-tests/generated/Path/PathSegment.ql 87774cc2e9d1be7aaf8748d418b151d7ec03fb20fda9430ebabd86ddaebf5538 699545d8eb2d6325bcd2c253d56339bd71170b34e80efe5155189fbbdde9fbbc +test/extractor-tests/generated/Path/PathTypeRepr.ql 32023340cb9aa1fbf52a1a3e330c6f3206e1c64c9dce2f795d9e434aa5a1533b f451de0d4941ab79014d2883b46291f9f05f79d479fcdcab387020ab3ed68703 +test/extractor-tests/generated/PrefixExpr/PrefixExpr.ql 63e9dbae0d0b46d5e9d60c313e408c4c7ee1a93c5a26fe4c01a632911de961d0 09fcc28bb22553356aebf9ea93811703e5404b88022be8dab61ac81d3b187b75 +test/extractor-tests/generated/PtrTypeRepr/PtrTypeRepr.ql d9289bfe1e72d9560b3878e4557f8cfda578ef7bce67eb29d7320921c0ba46a5 f3ea108aa25635bffa7673bb66b2581ce246d3aae86edf878c6f1abca2493c16 +test/extractor-tests/generated/RangeExpr/RangeExpr.ql c9776706d933606d1463bb08ed76457ac03a9558f6dac0218ef2012bc5e8e48f 77cafee86abc2680e1f9c925fbe664c05ba1b9a2533b1873242ef01dde1ce308 +test/extractor-tests/generated/RangePat/RangePat.ql 72b6a5e250fcec844f96623f265762462966775326ad0ad4df03203ff17f0066 04c375e98d6c7d336ebf7dee522f0fc716b7ec8141752534ed083c5d2550c679 +test/extractor-tests/generated/RefExpr/RefExpr.ql 4359b9e10727fc505213a896c4c8761258f355b572e11675a5081d811affb4ea 0c46fcbd866334d168e1c4c481b4ad419df048e4ba74488875b2799d316291a7 +test/extractor-tests/generated/RefPat/RefPat.ql c83d5e79a7d5977f658d64e8caea471b948400bcb90a3610283bdb5e9757b99e 26fa8a337e242ce660eb0dc25709148b837fff3229b259bfcd2987261c58c38b +test/extractor-tests/generated/RefTypeRepr/RefTypeRepr.ql c545689e4cee2035d79fdc3d9b720e7231232f57f35d16848b20d4659650a8c0 f248b342115cb0691f3ebe38ec9a65c8a36440cdf2f28b3ca7faed779a6d4164 +test/extractor-tests/generated/Rename/Rename.ql b65855515219a5fc1889f619d76e3fbb8fbe6a631f931e313608964640f68abe 7da9373ceb58054189036fcf5a262d9cb6897ea9d1008c963f8a18c34b99a60b +test/extractor-tests/generated/RestPat/RestPat.ql 59fbb7dc4bbad60a0a7ec91d8997ccf8a7036d4bb20c88332791906d88672c1f b104f06c2d350a9d703abdb28619672618d0082a0fbe7bcc67fa8df5526b266d +test/extractor-tests/generated/RetTypeRepr/RetTypeRepr.ql a6a8ad01a54f8f4384d3e1ab6352cca1e55c9041673705658b9feec3e3a1d3b4 d9ba5a13087e7731019d947219f20af547664965b2b304bd23155994ea1aa397 +test/extractor-tests/generated/ReturnExpr/ReturnExpr.ql b44ca36c30cd584c9f976e625a6bc09242792016d5e78057f9ec4174f3a0341f f61dcce549d282a9b7f0bbdcb612909799156231f22f2b5824ec6083630013ec +test/extractor-tests/generated/ReturnTypeSyntax/ReturnTypeSyntax.ql b08a4d4ad63ea6e62f8b9646fd838cac9d122a93f5716ee91ff7c62fa987a1d0 264d485a301f4220eaa580ae90964b05c1a2b19b898698e7cdcc86b624ba3aba +test/extractor-tests/generated/SelfParam/SelfParam.ql 7e57dd845ddc9142cce250c7e67e36044f2cc27b618a3b8876db7a6ac336d3e3 e546b5a690770e57bcfb07a662430f62128a3fed4eb46bd17c60c9e4595154ba +test/extractor-tests/generated/SlicePat/SlicePat.ql ec056b803471d22c8575313e0caca89a3d527d228719375e87cc6061c3da4ffe fb0af765ce9d04805cdd445e2222d6f956c6789285705bb1079e540935ae6cc5 +test/extractor-tests/generated/SliceTypeRepr/SliceTypeRepr.ql a009f2ba47f3b082db274b6bd7068d65c0205bd11b13d2c202e43a6b9b48e76b a3092ea5f2b7113235aec5136800205265f1607c5cfac9f5a3552bed5d98cdf2 +test/extractor-tests/generated/SourceFile/SourceFile.ql 19ae5570a88b9e2d82db66685a31b01cc8e0c86c622a4bfaabe8c5b397b27eea 60e2ba5eb82518d6408254fb4ec01277b6c6c0e4316d4f3cdc809da9c32c4a57 +test/extractor-tests/generated/Static/Static.ql 103276adfe23b609b5965439d024007d4ed6831562452f880ee89300aab3e3a6 0418668d83b2e570bddb6edbf4eb7927f4fa6933ccda86c0354463bb839f724f +test/extractor-tests/generated/StmtList/StmtList.ql 4c6b9d5d8fd7535f97d81b968d4f67fc50e10c5d0f980e7c2704bbf5cd07481e ad972adb8d9a7892e6f8a12d96649340441f947afc99e633ea438c4d5c795ce4 +test/extractor-tests/generated/Struct/Struct.ql 197de8de01ede52110d827c4a673fcedc9175b1245b736a211b8724b4345902b fdf5d848a3b5dde164f1a540d7212fd3a3f6b0228c4645ddca773190830e2eb4 +test/extractor-tests/generated/StructExpr/StructExpr.ql 1e577f7cc83aa86fc82e4ac467bfb8a0c239408d4217f92a0a689957ea4fe6fe 35568a6cb7f0aaa3026e11a3b0e750eb5e93d4c0b6f737171e27c84f5dc967ac +test/extractor-tests/generated/StructExprField/StructExprField.ql b65375963aa24f0d1dd4c10784e32ab8c337ad431462ea1d081a0e456fbb1362 7f5a49e8df03ed0890b51c2e941d636fbbf70445a53d3af2c0f34a04f26bc6ef +test/extractor-tests/generated/StructExprFieldList/StructExprFieldList.ql 01dc3ef66d79836a3d372464f05454015648ab093f9547c5d9c5d55271acb718 83625301c097fa38d4e6021ea28b8adc6338076c8c2aa88a86a22aac412839f6 +test/extractor-tests/generated/StructField/StructField.ql dbdb627202975a0ca07ed441449ecc95d9d0764084a49a18e7849164b2e65ce2 8e7f32f28d15104575eaa985e892c162ec775adf3481c227ef618b5668168de7 +test/extractor-tests/generated/StructFieldList/StructFieldList.ql 292170b20f3a55c0cd6a8d78ce99474ca68daf6fb380cffe00b2bd7074e1b73a 404bab780f290ae04d1d71d3c6d4e0092bb3d8c55e956168d2a445cbd6d1f06d +test/extractor-tests/generated/StructPat/StructPat.ql 73bd755ffb8d5ff3c77d7570c6d50eab7b51d8d4a44b638cf5904c37065f496e 9589dc8d8abd80d9f48d445af3dbdbd906a9c19dc75582688bf9c3abaa16861e +test/extractor-tests/generated/StructPatField/StructPatField.ql 92cb6a4b5234359c02d66085b10d41f37b77370491ed478ad6d4d9b12b943ecf 14bc2079763b53bc6ab11356f3bb21820ae9e4dd1b2a42a78665c32181c4ef92 +test/extractor-tests/generated/StructPatFieldList/StructPatFieldList.ql a3ba3e99d3c87d5e0ae0ad82cbea3600ac1745e9364d54d8d51224b51a5a09a5 5942ed2722c006bae99de9174249110bfc79594c5ef9a6dfc098ae2be269b8f3 +test/extractor-tests/generated/TokenTree/TokenTree.ql 55592f43a6fe99045d0b0b1e2323211d3a3fd64a8c7d2b083f2518d4c3e2e4b0 8eeef2060c80b0918857ba9b3a8543a4b866ca04be3d5ca18aae8a26cbdb836e +test/extractor-tests/generated/Trait/AssocItemList.ql 065c4903992500423d796800e7dc9a5835a07cbada595108f3af6efa72517782 aa797bf5ddefb800d5ca7f49c19c5124b1007e1658129b27c8c3de34427c7f08 +test/extractor-tests/generated/Trait/Trait.ql ba40c2de2e8f2225ea7876c36b2510079838c0f4a99232bf0f3a3ab56b7705c4 c34364d0425f597a645fbb8b6a3874588cc652044909f1db73b09f2b6deae072 +test/extractor-tests/generated/TraitAlias/TraitAlias.ql 434558e26e1cdc4054536dd7a3e5e636509cd0f8576ba1612224a9873882a383 c904109afa94cffeacd6749dd4ad8b9d2e2cb3b228c275898d88625615dbedfc +test/extractor-tests/generated/TryExpr/TryExpr.ql 4e3c224a7d5fb8f01654c7d3c79414daa575897cfa6f351fcd5b5832f53a151f d961a497c304c1c5aa1d94e04aed2bf17a2c422e315f05986e1a9027e69dbd2a +test/extractor-tests/generated/TupleExpr/TupleExpr.ql 4011d94438903e96fa321285558f5791bee7e1d1fb26be0381586511cf439d1b c6bc8d08a8d5d98d7a52b72d5c597b63754fe12cec653c520833e4b71a9dcea4 +test/extractor-tests/generated/TupleField/TupleField.ql ed681b7fee5e68d24db4999389727b2589e5af793d3c2ddc8b1e245713c0e1f8 4f867b29adf91b4bfa5052e16d392c16bf260e858aad11b60c42f1eddb476e61 +test/extractor-tests/generated/TupleFieldList/TupleFieldList.ql 3c3fcef21231550bbbf6804314b94d44cc18d445987c23cb6f2c88015570cc4a 8958e6748296bc6d0ad469e52852c38445fe462a8599a2e71867aa5d7066595e +test/extractor-tests/generated/TuplePat/TuplePat.ql 80609f1c525e90e13f34d55a81d47a83a03e064241f8d33232e2a79eaeea5159 d289b19dae4cbae0180cc58bb946f41646bb9dc008f5ce8a0e12eaddbc7e63e9 +test/extractor-tests/generated/TupleStructPat/TupleStructPat.ql d00b185013bb4e5f878a5ec261ab2cfbf1fe2f67d1ad2e05d062629211f677ec 24254631a28c24ca78b4fa1b89c53b0b002cb43fe585e274155fcca0c481056c +test/extractor-tests/generated/TupleTypeRepr/TupleTypeRepr.ql 2f1503734d272cd0616e5885cd344659cbd0ae7309a375c8351f57f2b86c3302 276a4fe91b8dc64cdca4467343e2bb2e240c66ec1e4e11bf8cba73819c6532cc +test/extractor-tests/generated/TypeAlias/TypeAlias.ql 2b120c7fe640b233540f6982153fddf50ddc089b8284dca321b4c48eecf93dfd 6d40a0d8c927dd499fd92fd95638c50eeca8f956aa1706c17913dbf83f0f500c +test/extractor-tests/generated/TypeArg/TypeArg.ql e1ca286c03bd2d44054f5dd75aac250382037f243046c49ec752ad8d65e4c0ba f316d5fa84a721427c0aadf6bfa0ed4cfd86e4d318cfb0fe82efc52e65c4733b +test/extractor-tests/generated/TypeBound/TypeBound.ql 4f5a2a49075c01c982988e66759f61c5285343d78cda94e228e17593d16fee6e 7aae320e881d6ea969e31b1e8fe586feb07b1db43c65da684cbac66157354851 +test/extractor-tests/generated/TypeBoundList/TypeBoundList.ql 6827529eca62f5e7be87538af6231099f5932f39d8694f7a76369273b93f28ea 539dac4ccda7e51b7ae1a9e05d8a56a98176d9de25d5ed4347ebe2fbea8adeb1 +test/extractor-tests/generated/TypeParam/TypeParam.ql c5f8f62f2877c719c3cf069f9d0ca83cebc14f7611c6c2dce86c85114ea2635c 751c630986f35a8d0d32fbeb61ca6ff801c96cd1829dbccc874fbf5f5158e98d +test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr.ql a7b7a93104fff28515154cf8e79045d3eea2494b5c46f1caf36639c53b1c64a7 070ee2e1664e3291646ea56681b5c93331f94dcc519deb28622beca3e26e16f3 +test/extractor-tests/generated/Union/Union.ql ef31f8b10ced5ed3a441f8ad0640e2fb46e566c859856e84f5a7fd6c85424b2c 1066561577ab19bf028ea29622750adc17de5b4d5dd0a8f77a8a50c8a15062b6 +test/extractor-tests/generated/Use/Use.ql a12b9867cc71a681cd4602c4045e75288a7cca502d48e20ccf17e155be130b3b 2b9dcac18670b062461193a6b40fcf569f19605b14daff82239fb39fd7fa3408 +test/extractor-tests/generated/UseBoundGenericArgs/UseBoundGenericArgs.ql 46ff2cf0fc8b561b21f8dff3230550f2feafbe52a7ea8b28bf183abef94ff241 92646f3bd15a8cf4c23ee9de4d857ac5c147e570ef0eb223423a109b4b79aedf +test/extractor-tests/generated/UseTree/UseTree.ql 3c2bc924b54b9af5c95784023d4098924571ba464c5982124acea712c3ce0e93 8d9f963b61a9a8a83efd93438ce8b43d4aa763493338ad9afd2a3dc7a440892d +test/extractor-tests/generated/UseTreeList/UseTreeList.ql faff7bfc060d5b0a922f38b37bf586596566186f704c9921651785580e86d684 81e5b90edeef0d3883547844a030e72b555d714de1ed8dded1c22a3772b4449a +test/extractor-tests/generated/Variant/Variant.ql 9405704e9192cac4838dcba8625261d5c1f839bb8c26dac44c2d517d172a06da 7236de83eb542cb4024e07d2cb5a899c851116a3a66b3896270ecf663439c6fe +test/extractor-tests/generated/VariantList/VariantList.ql 1c1d82ce3ecfa7daaae1920662510e81892ed899a3c2f785e2ff3670245a03cd 29d4c5ab2b737a92c7525789e10a4aa9848f1a327e34f4e9543018021106b303 +test/extractor-tests/generated/Visibility/Visibility.ql 725d47d7444332133df603f9b06592dc40b0f83bf5e21ad4781c5658e001a3aa 2d65a30702a8bb5bc91caf6ae2d0e4c769b3eeb0d72ffbd9cdb81048be4061ad +test/extractor-tests/generated/WhereClause/WhereClause.ql a6f0e69ffa6b997cac04d4da442eb8bde517a576840c953abcc40863b9099ba1 7ce888fffc3038d5b18f8c94d3b045815cd45500e1bb3849c05fc874edbeb695 +test/extractor-tests/generated/WherePred/WherePred.ql 504d00a40e418542c3e0ff30d43c4d2d0e7218b2a31fcf32c9310d705d97b9fe 61c53dde539a9e1e3d6bf13ca1d0dab8af6ea6b54ab698a0a5a5f49bf627934b +test/extractor-tests/generated/WhileExpr/WhileExpr.ql dcfe1ed375514a7b7513272767ed195cdbf339b56e00e62d207ca1eee080f164 f067283510655f0cf810cae834ac29ad2c6007ba312d027ebcdf695a23ec33e4 +test/extractor-tests/generated/WildcardPat/WildcardPat.ql d36f52a1d00d338b43894b6f8e198ad0c409542f436e3e57d527205c3dfee38c 4e1321e714cedb606e0d84f10ed37c72da61b3a1616754b967f721ff0bc0e4ee +test/extractor-tests/generated/YeetExpr/YeetExpr.ql 5c552b490ccf5b123f7a2fa3e73d03d008e4df5928ffa0bd503dc6bd7736462c 09a4f413ae045051abe392f29949d6feab1a808d666c6b8dac0901f84a8a4740 +test/extractor-tests/generated/YieldExpr/YieldExpr.ql 1d948eaa69ccffb12a2f832b84918d36becfd356d1c6d7cfa9315df03e77ca95 c31281830aee6866b0d4757a427183df4d2f06245345db61f69e9bfa5cd09a63 diff --git a/rust/ql/.gitattributes b/rust/ql/.gitattributes index 03d6e465cf0..ec352682e9f 100644 --- a/rust/ql/.gitattributes +++ b/rust/ql/.gitattributes @@ -660,612 +660,162 @@ /lib/codeql/rust/elements/internal/generated/YieldExpr.qll linguist-generated /lib/codeql/rust/elements.qll linguist-generated /test/extractor-tests/generated/Abi/Abi.ql linguist-generated -/test/extractor-tests/generated/Abi/Abi_getAbiString.ql linguist-generated /test/extractor-tests/generated/ArgList/ArgList.ql linguist-generated -/test/extractor-tests/generated/ArgList/ArgList_getArg.ql linguist-generated /test/extractor-tests/generated/ArrayListExpr/ArrayListExpr.ql linguist-generated -/test/extractor-tests/generated/ArrayListExpr/ArrayListExpr_getAttr.ql linguist-generated -/test/extractor-tests/generated/ArrayListExpr/ArrayListExpr_getExpr.ql linguist-generated /test/extractor-tests/generated/ArrayRepeatExpr/ArrayRepeatExpr.ql linguist-generated -/test/extractor-tests/generated/ArrayRepeatExpr/ArrayRepeatExpr_getAttr.ql linguist-generated -/test/extractor-tests/generated/ArrayRepeatExpr/ArrayRepeatExpr_getExpr.ql linguist-generated /test/extractor-tests/generated/ArrayTypeRepr/ArrayTypeRepr.ql linguist-generated -/test/extractor-tests/generated/ArrayTypeRepr/ArrayTypeRepr_getConstArg.ql linguist-generated -/test/extractor-tests/generated/ArrayTypeRepr/ArrayTypeRepr_getElementTypeRepr.ql linguist-generated /test/extractor-tests/generated/AsmClobberAbi/AsmClobberAbi.ql linguist-generated /test/extractor-tests/generated/AsmConst/AsmConst.ql linguist-generated -/test/extractor-tests/generated/AsmConst/AsmConst_getExpr.ql linguist-generated /test/extractor-tests/generated/AsmDirSpec/AsmDirSpec.ql linguist-generated /test/extractor-tests/generated/AsmExpr/AsmExpr.ql linguist-generated -/test/extractor-tests/generated/AsmExpr/AsmExpr_getAsmPiece.ql linguist-generated -/test/extractor-tests/generated/AsmExpr/AsmExpr_getAttr.ql linguist-generated -/test/extractor-tests/generated/AsmExpr/AsmExpr_getTemplate.ql linguist-generated /test/extractor-tests/generated/AsmLabel/AsmLabel.ql linguist-generated -/test/extractor-tests/generated/AsmLabel/AsmLabel_getBlockExpr.ql linguist-generated /test/extractor-tests/generated/AsmOperandExpr/AsmOperandExpr.ql linguist-generated -/test/extractor-tests/generated/AsmOperandExpr/AsmOperandExpr_getInExpr.ql linguist-generated -/test/extractor-tests/generated/AsmOperandExpr/AsmOperandExpr_getOutExpr.ql linguist-generated /test/extractor-tests/generated/AsmOperandNamed/AsmOperandNamed.ql linguist-generated -/test/extractor-tests/generated/AsmOperandNamed/AsmOperandNamed_getAsmOperand.ql linguist-generated -/test/extractor-tests/generated/AsmOperandNamed/AsmOperandNamed_getName.ql linguist-generated /test/extractor-tests/generated/AsmOption/AsmOption.ql linguist-generated /test/extractor-tests/generated/AsmOptionsList/AsmOptionsList.ql linguist-generated -/test/extractor-tests/generated/AsmOptionsList/AsmOptionsList_getAsmOption.ql linguist-generated /test/extractor-tests/generated/AsmRegOperand/AsmRegOperand.ql linguist-generated -/test/extractor-tests/generated/AsmRegOperand/AsmRegOperand_getAsmDirSpec.ql linguist-generated -/test/extractor-tests/generated/AsmRegOperand/AsmRegOperand_getAsmOperandExpr.ql linguist-generated -/test/extractor-tests/generated/AsmRegOperand/AsmRegOperand_getAsmRegSpec.ql linguist-generated /test/extractor-tests/generated/AsmRegSpec/AsmRegSpec.ql linguist-generated -/test/extractor-tests/generated/AsmRegSpec/AsmRegSpec_getIdentifier.ql linguist-generated /test/extractor-tests/generated/AsmSym/AsmSym.ql linguist-generated -/test/extractor-tests/generated/AsmSym/AsmSym_getPath.ql linguist-generated /test/extractor-tests/generated/AssocTypeArg/AssocTypeArg.ql linguist-generated -/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getConstArg.ql linguist-generated -/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getGenericArgList.ql linguist-generated -/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getIdentifier.ql linguist-generated -/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getParamList.ql linguist-generated -/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getRetType.ql linguist-generated -/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getReturnTypeSyntax.ql linguist-generated -/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getTypeBoundList.ql linguist-generated -/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getTypeRepr.ql linguist-generated /test/extractor-tests/generated/Attr/Attr.ql linguist-generated -/test/extractor-tests/generated/Attr/Attr_getMeta.ql linguist-generated /test/extractor-tests/generated/AwaitExpr/AwaitExpr.ql linguist-generated -/test/extractor-tests/generated/AwaitExpr/AwaitExpr_getAttr.ql linguist-generated -/test/extractor-tests/generated/AwaitExpr/AwaitExpr_getExpr.ql linguist-generated /test/extractor-tests/generated/BecomeExpr/BecomeExpr.ql linguist-generated -/test/extractor-tests/generated/BecomeExpr/BecomeExpr_getAttr.ql linguist-generated -/test/extractor-tests/generated/BecomeExpr/BecomeExpr_getExpr.ql linguist-generated /test/extractor-tests/generated/BinaryExpr/BinaryExpr.ql linguist-generated -/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getAttr.ql linguist-generated -/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getLhs.ql linguist-generated -/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getOperatorName.ql linguist-generated -/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getRhs.ql linguist-generated /test/extractor-tests/generated/BlockExpr/BlockExpr.ql linguist-generated -/test/extractor-tests/generated/BlockExpr/BlockExpr_getAttr.ql linguist-generated -/test/extractor-tests/generated/BlockExpr/BlockExpr_getLabel.ql linguist-generated -/test/extractor-tests/generated/BlockExpr/BlockExpr_getStmtList.ql linguist-generated /test/extractor-tests/generated/BoxPat/BoxPat.ql linguist-generated -/test/extractor-tests/generated/BoxPat/BoxPat_getPat.ql linguist-generated /test/extractor-tests/generated/BreakExpr/BreakExpr.ql linguist-generated -/test/extractor-tests/generated/BreakExpr/BreakExpr_getAttr.ql linguist-generated -/test/extractor-tests/generated/BreakExpr/BreakExpr_getExpr.ql linguist-generated -/test/extractor-tests/generated/BreakExpr/BreakExpr_getLifetime.ql linguist-generated /test/extractor-tests/generated/CallExpr/CallExpr.ql linguist-generated -/test/extractor-tests/generated/CallExpr/CallExpr_getArg.ql linguist-generated -/test/extractor-tests/generated/CallExpr/CallExpr_getArgList.ql linguist-generated -/test/extractor-tests/generated/CallExpr/CallExpr_getAttr.ql linguist-generated -/test/extractor-tests/generated/CallExpr/CallExpr_getFunction.ql linguist-generated /test/extractor-tests/generated/CastExpr/CastExpr.ql linguist-generated -/test/extractor-tests/generated/CastExpr/CastExpr_getAttr.ql linguist-generated -/test/extractor-tests/generated/CastExpr/CastExpr_getExpr.ql linguist-generated -/test/extractor-tests/generated/CastExpr/CastExpr_getTypeRepr.ql linguist-generated /test/extractor-tests/generated/ClosureBinder/ClosureBinder.ql linguist-generated -/test/extractor-tests/generated/ClosureBinder/ClosureBinder_getGenericParamList.ql linguist-generated /test/extractor-tests/generated/ClosureExpr/ClosureExpr.ql linguist-generated -/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getAttr.ql linguist-generated -/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getBody.ql linguist-generated -/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getClosureBinder.ql linguist-generated -/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getParam.ql linguist-generated -/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getParamList.ql linguist-generated -/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getRetType.ql linguist-generated /test/extractor-tests/generated/Comment/Comment.ql linguist-generated /test/extractor-tests/generated/Const/Const.ql linguist-generated -/test/extractor-tests/generated/Const/Const_getAttr.ql linguist-generated -/test/extractor-tests/generated/Const/Const_getAttributeMacroExpansion.ql linguist-generated -/test/extractor-tests/generated/Const/Const_getBody.ql linguist-generated -/test/extractor-tests/generated/Const/Const_getCrateOrigin.ql linguist-generated -/test/extractor-tests/generated/Const/Const_getExtendedCanonicalPath.ql linguist-generated -/test/extractor-tests/generated/Const/Const_getGenericParamList.ql linguist-generated -/test/extractor-tests/generated/Const/Const_getName.ql linguist-generated -/test/extractor-tests/generated/Const/Const_getTypeRepr.ql linguist-generated -/test/extractor-tests/generated/Const/Const_getVisibility.ql linguist-generated -/test/extractor-tests/generated/Const/Const_getWhereClause.ql linguist-generated /test/extractor-tests/generated/ConstArg/ConstArg.ql linguist-generated -/test/extractor-tests/generated/ConstArg/ConstArg_getExpr.ql linguist-generated /test/extractor-tests/generated/ConstBlockPat/ConstBlockPat.ql linguist-generated -/test/extractor-tests/generated/ConstBlockPat/ConstBlockPat_getBlockExpr.ql linguist-generated /test/extractor-tests/generated/ConstParam/ConstParam.ql linguist-generated -/test/extractor-tests/generated/ConstParam/ConstParam_getAttr.ql linguist-generated -/test/extractor-tests/generated/ConstParam/ConstParam_getDefaultVal.ql linguist-generated -/test/extractor-tests/generated/ConstParam/ConstParam_getName.ql linguist-generated -/test/extractor-tests/generated/ConstParam/ConstParam_getTypeRepr.ql linguist-generated /test/extractor-tests/generated/ContinueExpr/ContinueExpr.ql linguist-generated -/test/extractor-tests/generated/ContinueExpr/ContinueExpr_getAttr.ql linguist-generated -/test/extractor-tests/generated/ContinueExpr/ContinueExpr_getLifetime.ql linguist-generated /test/extractor-tests/generated/Crate/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/DynTraitTypeRepr/DynTraitTypeRepr.ql linguist-generated -/test/extractor-tests/generated/DynTraitTypeRepr/DynTraitTypeRepr_getTypeBoundList.ql linguist-generated /test/extractor-tests/generated/Enum/Enum.ql linguist-generated -/test/extractor-tests/generated/Enum/Enum_getAttr.ql linguist-generated -/test/extractor-tests/generated/Enum/Enum_getAttributeMacroExpansion.ql linguist-generated -/test/extractor-tests/generated/Enum/Enum_getCrateOrigin.ql linguist-generated -/test/extractor-tests/generated/Enum/Enum_getDeriveMacroExpansion.ql linguist-generated -/test/extractor-tests/generated/Enum/Enum_getExtendedCanonicalPath.ql linguist-generated -/test/extractor-tests/generated/Enum/Enum_getGenericParamList.ql linguist-generated -/test/extractor-tests/generated/Enum/Enum_getName.ql linguist-generated -/test/extractor-tests/generated/Enum/Enum_getVariantList.ql linguist-generated -/test/extractor-tests/generated/Enum/Enum_getVisibility.ql linguist-generated -/test/extractor-tests/generated/Enum/Enum_getWhereClause.ql linguist-generated /test/extractor-tests/generated/ExprStmt/ExprStmt.ql linguist-generated -/test/extractor-tests/generated/ExprStmt/ExprStmt_getExpr.ql linguist-generated /test/extractor-tests/generated/ExternBlock/ExternBlock.ql linguist-generated -/test/extractor-tests/generated/ExternBlock/ExternBlock_getAbi.ql linguist-generated -/test/extractor-tests/generated/ExternBlock/ExternBlock_getAttr.ql linguist-generated -/test/extractor-tests/generated/ExternBlock/ExternBlock_getAttributeMacroExpansion.ql linguist-generated -/test/extractor-tests/generated/ExternBlock/ExternBlock_getCrateOrigin.ql linguist-generated -/test/extractor-tests/generated/ExternBlock/ExternBlock_getExtendedCanonicalPath.ql linguist-generated -/test/extractor-tests/generated/ExternBlock/ExternBlock_getExternItemList.ql linguist-generated /test/extractor-tests/generated/ExternCrate/ExternCrate.ql linguist-generated -/test/extractor-tests/generated/ExternCrate/ExternCrate_getAttr.ql linguist-generated -/test/extractor-tests/generated/ExternCrate/ExternCrate_getAttributeMacroExpansion.ql linguist-generated -/test/extractor-tests/generated/ExternCrate/ExternCrate_getCrateOrigin.ql linguist-generated -/test/extractor-tests/generated/ExternCrate/ExternCrate_getExtendedCanonicalPath.ql linguist-generated -/test/extractor-tests/generated/ExternCrate/ExternCrate_getIdentifier.ql linguist-generated -/test/extractor-tests/generated/ExternCrate/ExternCrate_getRename.ql linguist-generated -/test/extractor-tests/generated/ExternCrate/ExternCrate_getVisibility.ql linguist-generated /test/extractor-tests/generated/ExternItemList/ExternItemList.ql linguist-generated -/test/extractor-tests/generated/ExternItemList/ExternItemList_getAttr.ql linguist-generated -/test/extractor-tests/generated/ExternItemList/ExternItemList_getExternItem.ql linguist-generated /test/extractor-tests/generated/FieldExpr/FieldExpr.ql linguist-generated -/test/extractor-tests/generated/FieldExpr/FieldExpr_getAttr.ql linguist-generated -/test/extractor-tests/generated/FieldExpr/FieldExpr_getContainer.ql linguist-generated -/test/extractor-tests/generated/FieldExpr/FieldExpr_getIdentifier.ql linguist-generated /test/extractor-tests/generated/FnPtrTypeRepr/FnPtrTypeRepr.ql linguist-generated -/test/extractor-tests/generated/FnPtrTypeRepr/FnPtrTypeRepr_getAbi.ql linguist-generated -/test/extractor-tests/generated/FnPtrTypeRepr/FnPtrTypeRepr_getParamList.ql linguist-generated -/test/extractor-tests/generated/FnPtrTypeRepr/FnPtrTypeRepr_getRetType.ql linguist-generated /test/extractor-tests/generated/ForExpr/ForExpr.ql linguist-generated -/test/extractor-tests/generated/ForExpr/ForExpr_getAttr.ql linguist-generated -/test/extractor-tests/generated/ForExpr/ForExpr_getIterable.ql linguist-generated -/test/extractor-tests/generated/ForExpr/ForExpr_getLabel.ql linguist-generated -/test/extractor-tests/generated/ForExpr/ForExpr_getLoopBody.ql linguist-generated -/test/extractor-tests/generated/ForExpr/ForExpr_getPat.ql linguist-generated /test/extractor-tests/generated/ForTypeRepr/ForTypeRepr.ql linguist-generated -/test/extractor-tests/generated/ForTypeRepr/ForTypeRepr_getGenericParamList.ql linguist-generated -/test/extractor-tests/generated/ForTypeRepr/ForTypeRepr_getTypeRepr.ql linguist-generated /test/extractor-tests/generated/FormatArgsExpr/Format.ql linguist-generated /test/extractor-tests/generated/FormatArgsExpr/FormatArgsArg.ql linguist-generated -/test/extractor-tests/generated/FormatArgsExpr/FormatArgsArg_getExpr.ql linguist-generated -/test/extractor-tests/generated/FormatArgsExpr/FormatArgsArg_getName.ql linguist-generated /test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr.ql linguist-generated -/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getArg.ql linguist-generated -/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getAttr.ql linguist-generated -/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getFormat.ql linguist-generated -/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getTemplate.ql linguist-generated /test/extractor-tests/generated/FormatArgsExpr/FormatArgument.ql linguist-generated -/test/extractor-tests/generated/FormatArgsExpr/FormatArgument_getVariable.ql linguist-generated /test/extractor-tests/generated/FormatArgsExpr/FormatTemplateVariableAccess.ql linguist-generated -/test/extractor-tests/generated/FormatArgsExpr/Format_getArgumentRef.ql linguist-generated -/test/extractor-tests/generated/FormatArgsExpr/Format_getPrecisionArgument.ql linguist-generated -/test/extractor-tests/generated/FormatArgsExpr/Format_getWidthArgument.ql linguist-generated /test/extractor-tests/generated/Function/Function.ql linguist-generated -/test/extractor-tests/generated/Function/Function_getAbi.ql linguist-generated -/test/extractor-tests/generated/Function/Function_getAttr.ql linguist-generated -/test/extractor-tests/generated/Function/Function_getAttributeMacroExpansion.ql linguist-generated -/test/extractor-tests/generated/Function/Function_getBody.ql linguist-generated -/test/extractor-tests/generated/Function/Function_getCrateOrigin.ql linguist-generated -/test/extractor-tests/generated/Function/Function_getExtendedCanonicalPath.ql linguist-generated -/test/extractor-tests/generated/Function/Function_getGenericParamList.ql linguist-generated -/test/extractor-tests/generated/Function/Function_getName.ql linguist-generated -/test/extractor-tests/generated/Function/Function_getParam.ql linguist-generated -/test/extractor-tests/generated/Function/Function_getParamList.ql linguist-generated -/test/extractor-tests/generated/Function/Function_getRetType.ql linguist-generated -/test/extractor-tests/generated/Function/Function_getVisibility.ql linguist-generated -/test/extractor-tests/generated/Function/Function_getWhereClause.ql linguist-generated /test/extractor-tests/generated/GenericArgList/GenericArgList.ql linguist-generated -/test/extractor-tests/generated/GenericArgList/GenericArgList_getGenericArg.ql linguist-generated /test/extractor-tests/generated/GenericParamList/GenericParamList.ql linguist-generated -/test/extractor-tests/generated/GenericParamList/GenericParamList_getGenericParam.ql linguist-generated /test/extractor-tests/generated/IdentPat/IdentPat.ql linguist-generated -/test/extractor-tests/generated/IdentPat/IdentPat_getAttr.ql linguist-generated -/test/extractor-tests/generated/IdentPat/IdentPat_getName.ql linguist-generated -/test/extractor-tests/generated/IdentPat/IdentPat_getPat.ql linguist-generated /test/extractor-tests/generated/IfExpr/IfExpr.ql linguist-generated -/test/extractor-tests/generated/IfExpr/IfExpr_getAttr.ql linguist-generated -/test/extractor-tests/generated/IfExpr/IfExpr_getCondition.ql linguist-generated -/test/extractor-tests/generated/IfExpr/IfExpr_getElse.ql linguist-generated -/test/extractor-tests/generated/IfExpr/IfExpr_getThen.ql linguist-generated /test/extractor-tests/generated/Impl/Impl.ql linguist-generated -/test/extractor-tests/generated/Impl/Impl_getAssocItemList.ql linguist-generated -/test/extractor-tests/generated/Impl/Impl_getAttr.ql linguist-generated -/test/extractor-tests/generated/Impl/Impl_getAttributeMacroExpansion.ql linguist-generated -/test/extractor-tests/generated/Impl/Impl_getCrateOrigin.ql linguist-generated -/test/extractor-tests/generated/Impl/Impl_getExtendedCanonicalPath.ql linguist-generated -/test/extractor-tests/generated/Impl/Impl_getGenericParamList.ql linguist-generated -/test/extractor-tests/generated/Impl/Impl_getSelfTy.ql linguist-generated -/test/extractor-tests/generated/Impl/Impl_getTrait.ql linguist-generated -/test/extractor-tests/generated/Impl/Impl_getVisibility.ql linguist-generated -/test/extractor-tests/generated/Impl/Impl_getWhereClause.ql linguist-generated /test/extractor-tests/generated/ImplTraitTypeRepr/ImplTraitTypeRepr.ql linguist-generated -/test/extractor-tests/generated/ImplTraitTypeRepr/ImplTraitTypeRepr_getTypeBoundList.ql linguist-generated /test/extractor-tests/generated/IndexExpr/IndexExpr.ql linguist-generated -/test/extractor-tests/generated/IndexExpr/IndexExpr_getAttr.ql linguist-generated -/test/extractor-tests/generated/IndexExpr/IndexExpr_getBase.ql linguist-generated -/test/extractor-tests/generated/IndexExpr/IndexExpr_getIndex.ql linguist-generated /test/extractor-tests/generated/InferTypeRepr/InferTypeRepr.ql linguist-generated /test/extractor-tests/generated/ItemList/ItemList.ql linguist-generated -/test/extractor-tests/generated/ItemList/ItemList_getAttr.ql linguist-generated -/test/extractor-tests/generated/ItemList/ItemList_getItem.ql linguist-generated /test/extractor-tests/generated/Label/Label.ql linguist-generated -/test/extractor-tests/generated/Label/Label_getLifetime.ql linguist-generated /test/extractor-tests/generated/LetElse/LetElse.ql linguist-generated -/test/extractor-tests/generated/LetElse/LetElse_getBlockExpr.ql linguist-generated /test/extractor-tests/generated/LetExpr/LetExpr.ql linguist-generated -/test/extractor-tests/generated/LetExpr/LetExpr_getAttr.ql linguist-generated -/test/extractor-tests/generated/LetExpr/LetExpr_getPat.ql linguist-generated -/test/extractor-tests/generated/LetExpr/LetExpr_getScrutinee.ql linguist-generated /test/extractor-tests/generated/LetStmt/LetStmt.ql linguist-generated -/test/extractor-tests/generated/LetStmt/LetStmt_getAttr.ql linguist-generated -/test/extractor-tests/generated/LetStmt/LetStmt_getInitializer.ql linguist-generated -/test/extractor-tests/generated/LetStmt/LetStmt_getLetElse.ql linguist-generated -/test/extractor-tests/generated/LetStmt/LetStmt_getPat.ql linguist-generated -/test/extractor-tests/generated/LetStmt/LetStmt_getTypeRepr.ql linguist-generated /test/extractor-tests/generated/Lifetime/Lifetime.ql linguist-generated -/test/extractor-tests/generated/Lifetime/Lifetime_getText.ql linguist-generated /test/extractor-tests/generated/LifetimeArg/LifetimeArg.ql linguist-generated -/test/extractor-tests/generated/LifetimeArg/LifetimeArg_getLifetime.ql linguist-generated /test/extractor-tests/generated/LifetimeParam/LifetimeParam.ql linguist-generated -/test/extractor-tests/generated/LifetimeParam/LifetimeParam_getAttr.ql linguist-generated -/test/extractor-tests/generated/LifetimeParam/LifetimeParam_getLifetime.ql linguist-generated -/test/extractor-tests/generated/LifetimeParam/LifetimeParam_getTypeBoundList.ql linguist-generated /test/extractor-tests/generated/LiteralExpr/LiteralExpr.ql linguist-generated -/test/extractor-tests/generated/LiteralExpr/LiteralExpr_getAttr.ql linguist-generated -/test/extractor-tests/generated/LiteralExpr/LiteralExpr_getTextValue.ql linguist-generated /test/extractor-tests/generated/LiteralPat/LiteralPat.ql linguist-generated -/test/extractor-tests/generated/LiteralPat/LiteralPat_getLiteral.ql linguist-generated /test/extractor-tests/generated/LoopExpr/LoopExpr.ql linguist-generated -/test/extractor-tests/generated/LoopExpr/LoopExpr_getAttr.ql linguist-generated -/test/extractor-tests/generated/LoopExpr/LoopExpr_getLabel.ql linguist-generated -/test/extractor-tests/generated/LoopExpr/LoopExpr_getLoopBody.ql linguist-generated /test/extractor-tests/generated/MacroBlockExpr/MacroBlockExpr.ql linguist-generated -/test/extractor-tests/generated/MacroBlockExpr/MacroBlockExpr_getStatement.ql linguist-generated -/test/extractor-tests/generated/MacroBlockExpr/MacroBlockExpr_getTailExpr.ql linguist-generated /test/extractor-tests/generated/MacroCall/MacroCall.ql linguist-generated -/test/extractor-tests/generated/MacroCall/MacroCall_getAttr.ql linguist-generated -/test/extractor-tests/generated/MacroCall/MacroCall_getAttributeMacroExpansion.ql linguist-generated -/test/extractor-tests/generated/MacroCall/MacroCall_getCrateOrigin.ql linguist-generated -/test/extractor-tests/generated/MacroCall/MacroCall_getExtendedCanonicalPath.ql linguist-generated -/test/extractor-tests/generated/MacroCall/MacroCall_getMacroCallExpansion.ql linguist-generated -/test/extractor-tests/generated/MacroCall/MacroCall_getPath.ql linguist-generated -/test/extractor-tests/generated/MacroCall/MacroCall_getTokenTree.ql linguist-generated /test/extractor-tests/generated/MacroDef/MacroDef.ql linguist-generated -/test/extractor-tests/generated/MacroDef/MacroDef_getArgs.ql linguist-generated -/test/extractor-tests/generated/MacroDef/MacroDef_getAttr.ql linguist-generated -/test/extractor-tests/generated/MacroDef/MacroDef_getAttributeMacroExpansion.ql linguist-generated -/test/extractor-tests/generated/MacroDef/MacroDef_getBody.ql linguist-generated -/test/extractor-tests/generated/MacroDef/MacroDef_getCrateOrigin.ql linguist-generated -/test/extractor-tests/generated/MacroDef/MacroDef_getExtendedCanonicalPath.ql linguist-generated -/test/extractor-tests/generated/MacroDef/MacroDef_getName.ql linguist-generated -/test/extractor-tests/generated/MacroDef/MacroDef_getVisibility.ql linguist-generated /test/extractor-tests/generated/MacroExpr/MacroExpr.ql linguist-generated -/test/extractor-tests/generated/MacroExpr/MacroExpr_getMacroCall.ql linguist-generated /test/extractor-tests/generated/MacroItems/MacroItems.ql linguist-generated -/test/extractor-tests/generated/MacroItems/MacroItems_getItem.ql linguist-generated /test/extractor-tests/generated/MacroPat/MacroPat.ql linguist-generated -/test/extractor-tests/generated/MacroPat/MacroPat_getMacroCall.ql linguist-generated /test/extractor-tests/generated/MacroRules/MacroRules.ql linguist-generated -/test/extractor-tests/generated/MacroRules/MacroRules_getAttr.ql linguist-generated -/test/extractor-tests/generated/MacroRules/MacroRules_getAttributeMacroExpansion.ql linguist-generated -/test/extractor-tests/generated/MacroRules/MacroRules_getCrateOrigin.ql linguist-generated -/test/extractor-tests/generated/MacroRules/MacroRules_getExtendedCanonicalPath.ql linguist-generated -/test/extractor-tests/generated/MacroRules/MacroRules_getName.ql linguist-generated -/test/extractor-tests/generated/MacroRules/MacroRules_getTokenTree.ql linguist-generated -/test/extractor-tests/generated/MacroRules/MacroRules_getVisibility.ql linguist-generated /test/extractor-tests/generated/MacroTypeRepr/MacroTypeRepr.ql linguist-generated -/test/extractor-tests/generated/MacroTypeRepr/MacroTypeRepr_getMacroCall.ql linguist-generated /test/extractor-tests/generated/MatchArm/MatchArm.ql linguist-generated -/test/extractor-tests/generated/MatchArm/MatchArm_getAttr.ql linguist-generated -/test/extractor-tests/generated/MatchArm/MatchArm_getExpr.ql linguist-generated -/test/extractor-tests/generated/MatchArm/MatchArm_getGuard.ql linguist-generated -/test/extractor-tests/generated/MatchArm/MatchArm_getPat.ql linguist-generated /test/extractor-tests/generated/MatchArmList/MatchArmList.ql linguist-generated -/test/extractor-tests/generated/MatchArmList/MatchArmList_getArm.ql linguist-generated -/test/extractor-tests/generated/MatchArmList/MatchArmList_getAttr.ql linguist-generated /test/extractor-tests/generated/MatchExpr/MatchExpr.ql linguist-generated -/test/extractor-tests/generated/MatchExpr/MatchExpr_getAttr.ql linguist-generated -/test/extractor-tests/generated/MatchExpr/MatchExpr_getMatchArmList.ql linguist-generated -/test/extractor-tests/generated/MatchExpr/MatchExpr_getScrutinee.ql linguist-generated /test/extractor-tests/generated/MatchGuard/MatchGuard.ql linguist-generated -/test/extractor-tests/generated/MatchGuard/MatchGuard_getCondition.ql linguist-generated /test/extractor-tests/generated/Meta/Meta.ql linguist-generated -/test/extractor-tests/generated/Meta/Meta_getExpr.ql linguist-generated -/test/extractor-tests/generated/Meta/Meta_getPath.ql linguist-generated -/test/extractor-tests/generated/Meta/Meta_getTokenTree.ql linguist-generated /test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.ql linguist-generated -/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArg.ql linguist-generated -/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArgList.ql linguist-generated -/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getAttr.ql linguist-generated -/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getGenericArgList.ql linguist-generated -/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getIdentifier.ql linguist-generated -/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getReceiver.ql linguist-generated -/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getResolvedCrateOrigin.ql linguist-generated -/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getResolvedPath.ql linguist-generated /test/extractor-tests/generated/Module/Module.ql linguist-generated -/test/extractor-tests/generated/Module/Module_getAttr.ql linguist-generated -/test/extractor-tests/generated/Module/Module_getAttributeMacroExpansion.ql linguist-generated -/test/extractor-tests/generated/Module/Module_getCrateOrigin.ql linguist-generated -/test/extractor-tests/generated/Module/Module_getExtendedCanonicalPath.ql linguist-generated -/test/extractor-tests/generated/Module/Module_getItemList.ql linguist-generated -/test/extractor-tests/generated/Module/Module_getName.ql linguist-generated -/test/extractor-tests/generated/Module/Module_getVisibility.ql linguist-generated /test/extractor-tests/generated/Name/Name.ql linguist-generated -/test/extractor-tests/generated/Name/Name_getText.ql linguist-generated /test/extractor-tests/generated/NameRef/NameRef.ql linguist-generated -/test/extractor-tests/generated/NameRef/NameRef_getText.ql linguist-generated /test/extractor-tests/generated/NeverTypeRepr/NeverTypeRepr.ql linguist-generated /test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr.ql linguist-generated -/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getAttr.ql linguist-generated -/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getField.ql linguist-generated -/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getTypeRepr.ql linguist-generated /test/extractor-tests/generated/OrPat/OrPat.ql linguist-generated -/test/extractor-tests/generated/OrPat/OrPat_getPat.ql linguist-generated /test/extractor-tests/generated/Param/Param.ql linguist-generated -/test/extractor-tests/generated/Param/Param_getAttr.ql linguist-generated -/test/extractor-tests/generated/Param/Param_getPat.ql linguist-generated -/test/extractor-tests/generated/Param/Param_getTypeRepr.ql linguist-generated /test/extractor-tests/generated/ParamList/ParamList.ql linguist-generated -/test/extractor-tests/generated/ParamList/ParamList_getParam.ql linguist-generated -/test/extractor-tests/generated/ParamList/ParamList_getSelfParam.ql linguist-generated /test/extractor-tests/generated/ParenExpr/ParenExpr.ql linguist-generated -/test/extractor-tests/generated/ParenExpr/ParenExpr_getAttr.ql linguist-generated -/test/extractor-tests/generated/ParenExpr/ParenExpr_getExpr.ql linguist-generated /test/extractor-tests/generated/ParenPat/ParenPat.ql linguist-generated -/test/extractor-tests/generated/ParenPat/ParenPat_getPat.ql linguist-generated /test/extractor-tests/generated/ParenTypeRepr/ParenTypeRepr.ql linguist-generated -/test/extractor-tests/generated/ParenTypeRepr/ParenTypeRepr_getTypeRepr.ql linguist-generated /test/extractor-tests/generated/ParenthesizedArgList/ParenthesizedArgList.ql linguist-generated -/test/extractor-tests/generated/ParenthesizedArgList/ParenthesizedArgList_getTypeArg.ql linguist-generated /test/extractor-tests/generated/Path/Path.ql linguist-generated /test/extractor-tests/generated/Path/PathExpr.ql linguist-generated -/test/extractor-tests/generated/Path/PathExpr_getAttr.ql linguist-generated -/test/extractor-tests/generated/Path/PathExpr_getPath.ql linguist-generated -/test/extractor-tests/generated/Path/PathExpr_getResolvedCrateOrigin.ql linguist-generated -/test/extractor-tests/generated/Path/PathExpr_getResolvedPath.ql linguist-generated /test/extractor-tests/generated/Path/PathPat.ql linguist-generated -/test/extractor-tests/generated/Path/PathPat_getPath.ql linguist-generated -/test/extractor-tests/generated/Path/PathPat_getResolvedCrateOrigin.ql linguist-generated -/test/extractor-tests/generated/Path/PathPat_getResolvedPath.ql linguist-generated /test/extractor-tests/generated/Path/PathSegment.ql linguist-generated -/test/extractor-tests/generated/Path/PathSegment_getGenericArgList.ql linguist-generated -/test/extractor-tests/generated/Path/PathSegment_getIdentifier.ql linguist-generated -/test/extractor-tests/generated/Path/PathSegment_getParenthesizedArgList.ql linguist-generated -/test/extractor-tests/generated/Path/PathSegment_getRetType.ql linguist-generated -/test/extractor-tests/generated/Path/PathSegment_getReturnTypeSyntax.ql linguist-generated -/test/extractor-tests/generated/Path/PathSegment_getTraitTypeRepr.ql linguist-generated -/test/extractor-tests/generated/Path/PathSegment_getTypeRepr.ql linguist-generated /test/extractor-tests/generated/Path/PathTypeRepr.ql linguist-generated -/test/extractor-tests/generated/Path/PathTypeRepr_getPath.ql linguist-generated -/test/extractor-tests/generated/Path/Path_getQualifier.ql linguist-generated -/test/extractor-tests/generated/Path/Path_getSegment.ql linguist-generated /test/extractor-tests/generated/PrefixExpr/PrefixExpr.ql linguist-generated -/test/extractor-tests/generated/PrefixExpr/PrefixExpr_getAttr.ql linguist-generated -/test/extractor-tests/generated/PrefixExpr/PrefixExpr_getExpr.ql linguist-generated -/test/extractor-tests/generated/PrefixExpr/PrefixExpr_getOperatorName.ql linguist-generated /test/extractor-tests/generated/PtrTypeRepr/PtrTypeRepr.ql linguist-generated -/test/extractor-tests/generated/PtrTypeRepr/PtrTypeRepr_getTypeRepr.ql linguist-generated /test/extractor-tests/generated/RangeExpr/RangeExpr.ql linguist-generated -/test/extractor-tests/generated/RangeExpr/RangeExpr_getAttr.ql linguist-generated -/test/extractor-tests/generated/RangeExpr/RangeExpr_getEnd.ql linguist-generated -/test/extractor-tests/generated/RangeExpr/RangeExpr_getOperatorName.ql linguist-generated -/test/extractor-tests/generated/RangeExpr/RangeExpr_getStart.ql linguist-generated /test/extractor-tests/generated/RangePat/RangePat.ql linguist-generated -/test/extractor-tests/generated/RangePat/RangePat_getEnd.ql linguist-generated -/test/extractor-tests/generated/RangePat/RangePat_getOperatorName.ql linguist-generated -/test/extractor-tests/generated/RangePat/RangePat_getStart.ql linguist-generated /test/extractor-tests/generated/RefExpr/RefExpr.ql linguist-generated -/test/extractor-tests/generated/RefExpr/RefExpr_getAttr.ql linguist-generated -/test/extractor-tests/generated/RefExpr/RefExpr_getExpr.ql linguist-generated /test/extractor-tests/generated/RefPat/RefPat.ql linguist-generated -/test/extractor-tests/generated/RefPat/RefPat_getPat.ql linguist-generated /test/extractor-tests/generated/RefTypeRepr/RefTypeRepr.ql linguist-generated -/test/extractor-tests/generated/RefTypeRepr/RefTypeRepr_getLifetime.ql linguist-generated -/test/extractor-tests/generated/RefTypeRepr/RefTypeRepr_getTypeRepr.ql linguist-generated /test/extractor-tests/generated/Rename/Rename.ql linguist-generated -/test/extractor-tests/generated/Rename/Rename_getName.ql linguist-generated /test/extractor-tests/generated/RestPat/RestPat.ql linguist-generated -/test/extractor-tests/generated/RestPat/RestPat_getAttr.ql linguist-generated /test/extractor-tests/generated/RetTypeRepr/RetTypeRepr.ql linguist-generated -/test/extractor-tests/generated/RetTypeRepr/RetTypeRepr_getTypeRepr.ql linguist-generated /test/extractor-tests/generated/ReturnExpr/ReturnExpr.ql linguist-generated -/test/extractor-tests/generated/ReturnExpr/ReturnExpr_getAttr.ql linguist-generated -/test/extractor-tests/generated/ReturnExpr/ReturnExpr_getExpr.ql linguist-generated /test/extractor-tests/generated/ReturnTypeSyntax/ReturnTypeSyntax.ql linguist-generated /test/extractor-tests/generated/SelfParam/SelfParam.ql linguist-generated -/test/extractor-tests/generated/SelfParam/SelfParam_getAttr.ql linguist-generated -/test/extractor-tests/generated/SelfParam/SelfParam_getLifetime.ql linguist-generated -/test/extractor-tests/generated/SelfParam/SelfParam_getName.ql linguist-generated -/test/extractor-tests/generated/SelfParam/SelfParam_getTypeRepr.ql linguist-generated /test/extractor-tests/generated/SlicePat/SlicePat.ql linguist-generated -/test/extractor-tests/generated/SlicePat/SlicePat_getPat.ql linguist-generated /test/extractor-tests/generated/SliceTypeRepr/SliceTypeRepr.ql linguist-generated -/test/extractor-tests/generated/SliceTypeRepr/SliceTypeRepr_getTypeRepr.ql linguist-generated /test/extractor-tests/generated/SourceFile/SourceFile.ql linguist-generated -/test/extractor-tests/generated/SourceFile/SourceFile_getAttr.ql linguist-generated -/test/extractor-tests/generated/SourceFile/SourceFile_getItem.ql linguist-generated /test/extractor-tests/generated/Static/Static.ql linguist-generated -/test/extractor-tests/generated/Static/Static_getAttr.ql linguist-generated -/test/extractor-tests/generated/Static/Static_getAttributeMacroExpansion.ql linguist-generated -/test/extractor-tests/generated/Static/Static_getBody.ql linguist-generated -/test/extractor-tests/generated/Static/Static_getCrateOrigin.ql linguist-generated -/test/extractor-tests/generated/Static/Static_getExtendedCanonicalPath.ql linguist-generated -/test/extractor-tests/generated/Static/Static_getName.ql linguist-generated -/test/extractor-tests/generated/Static/Static_getTypeRepr.ql linguist-generated -/test/extractor-tests/generated/Static/Static_getVisibility.ql linguist-generated /test/extractor-tests/generated/StmtList/StmtList.ql linguist-generated -/test/extractor-tests/generated/StmtList/StmtList_getAttr.ql linguist-generated -/test/extractor-tests/generated/StmtList/StmtList_getStatement.ql linguist-generated -/test/extractor-tests/generated/StmtList/StmtList_getTailExpr.ql linguist-generated /test/extractor-tests/generated/Struct/Struct.ql linguist-generated -/test/extractor-tests/generated/Struct/Struct_getAttr.ql linguist-generated -/test/extractor-tests/generated/Struct/Struct_getAttributeMacroExpansion.ql linguist-generated -/test/extractor-tests/generated/Struct/Struct_getCrateOrigin.ql linguist-generated -/test/extractor-tests/generated/Struct/Struct_getDeriveMacroExpansion.ql linguist-generated -/test/extractor-tests/generated/Struct/Struct_getExtendedCanonicalPath.ql linguist-generated -/test/extractor-tests/generated/Struct/Struct_getFieldList.ql linguist-generated -/test/extractor-tests/generated/Struct/Struct_getGenericParamList.ql linguist-generated -/test/extractor-tests/generated/Struct/Struct_getName.ql linguist-generated -/test/extractor-tests/generated/Struct/Struct_getVisibility.ql linguist-generated -/test/extractor-tests/generated/Struct/Struct_getWhereClause.ql linguist-generated /test/extractor-tests/generated/StructExpr/StructExpr.ql linguist-generated -/test/extractor-tests/generated/StructExpr/StructExpr_getPath.ql linguist-generated -/test/extractor-tests/generated/StructExpr/StructExpr_getResolvedCrateOrigin.ql linguist-generated -/test/extractor-tests/generated/StructExpr/StructExpr_getResolvedPath.ql linguist-generated -/test/extractor-tests/generated/StructExpr/StructExpr_getStructExprFieldList.ql linguist-generated /test/extractor-tests/generated/StructExprField/StructExprField.ql linguist-generated -/test/extractor-tests/generated/StructExprField/StructExprField_getAttr.ql linguist-generated -/test/extractor-tests/generated/StructExprField/StructExprField_getExpr.ql linguist-generated -/test/extractor-tests/generated/StructExprField/StructExprField_getIdentifier.ql linguist-generated /test/extractor-tests/generated/StructExprFieldList/StructExprFieldList.ql linguist-generated -/test/extractor-tests/generated/StructExprFieldList/StructExprFieldList_getAttr.ql linguist-generated -/test/extractor-tests/generated/StructExprFieldList/StructExprFieldList_getField.ql linguist-generated -/test/extractor-tests/generated/StructExprFieldList/StructExprFieldList_getSpread.ql linguist-generated /test/extractor-tests/generated/StructField/StructField.ql linguist-generated -/test/extractor-tests/generated/StructField/StructField_getAttr.ql linguist-generated -/test/extractor-tests/generated/StructField/StructField_getDefault.ql linguist-generated -/test/extractor-tests/generated/StructField/StructField_getName.ql linguist-generated -/test/extractor-tests/generated/StructField/StructField_getTypeRepr.ql linguist-generated -/test/extractor-tests/generated/StructField/StructField_getVisibility.ql linguist-generated /test/extractor-tests/generated/StructFieldList/StructFieldList.ql linguist-generated -/test/extractor-tests/generated/StructFieldList/StructFieldList_getField.ql linguist-generated /test/extractor-tests/generated/StructPat/StructPat.ql linguist-generated -/test/extractor-tests/generated/StructPat/StructPat_getPath.ql linguist-generated -/test/extractor-tests/generated/StructPat/StructPat_getResolvedCrateOrigin.ql linguist-generated -/test/extractor-tests/generated/StructPat/StructPat_getResolvedPath.ql linguist-generated -/test/extractor-tests/generated/StructPat/StructPat_getStructPatFieldList.ql linguist-generated /test/extractor-tests/generated/StructPatField/StructPatField.ql linguist-generated -/test/extractor-tests/generated/StructPatField/StructPatField_getAttr.ql linguist-generated -/test/extractor-tests/generated/StructPatField/StructPatField_getIdentifier.ql linguist-generated -/test/extractor-tests/generated/StructPatField/StructPatField_getPat.ql linguist-generated /test/extractor-tests/generated/StructPatFieldList/StructPatFieldList.ql linguist-generated -/test/extractor-tests/generated/StructPatFieldList/StructPatFieldList_getField.ql linguist-generated -/test/extractor-tests/generated/StructPatFieldList/StructPatFieldList_getRestPat.ql linguist-generated /test/extractor-tests/generated/TokenTree/TokenTree.ql linguist-generated /test/extractor-tests/generated/Trait/AssocItemList.ql linguist-generated -/test/extractor-tests/generated/Trait/AssocItemList_getAssocItem.ql linguist-generated -/test/extractor-tests/generated/Trait/AssocItemList_getAttr.ql linguist-generated /test/extractor-tests/generated/Trait/Trait.ql linguist-generated -/test/extractor-tests/generated/Trait/Trait_getAssocItemList.ql linguist-generated -/test/extractor-tests/generated/Trait/Trait_getAttr.ql linguist-generated -/test/extractor-tests/generated/Trait/Trait_getAttributeMacroExpansion.ql linguist-generated -/test/extractor-tests/generated/Trait/Trait_getCrateOrigin.ql linguist-generated -/test/extractor-tests/generated/Trait/Trait_getExtendedCanonicalPath.ql linguist-generated -/test/extractor-tests/generated/Trait/Trait_getGenericParamList.ql linguist-generated -/test/extractor-tests/generated/Trait/Trait_getName.ql linguist-generated -/test/extractor-tests/generated/Trait/Trait_getTypeBoundList.ql linguist-generated -/test/extractor-tests/generated/Trait/Trait_getVisibility.ql linguist-generated -/test/extractor-tests/generated/Trait/Trait_getWhereClause.ql linguist-generated /test/extractor-tests/generated/TraitAlias/TraitAlias.ql linguist-generated -/test/extractor-tests/generated/TraitAlias/TraitAlias_getAttr.ql linguist-generated -/test/extractor-tests/generated/TraitAlias/TraitAlias_getAttributeMacroExpansion.ql linguist-generated -/test/extractor-tests/generated/TraitAlias/TraitAlias_getCrateOrigin.ql linguist-generated -/test/extractor-tests/generated/TraitAlias/TraitAlias_getExtendedCanonicalPath.ql linguist-generated -/test/extractor-tests/generated/TraitAlias/TraitAlias_getGenericParamList.ql linguist-generated -/test/extractor-tests/generated/TraitAlias/TraitAlias_getName.ql linguist-generated -/test/extractor-tests/generated/TraitAlias/TraitAlias_getTypeBoundList.ql linguist-generated -/test/extractor-tests/generated/TraitAlias/TraitAlias_getVisibility.ql linguist-generated -/test/extractor-tests/generated/TraitAlias/TraitAlias_getWhereClause.ql linguist-generated /test/extractor-tests/generated/TryExpr/TryExpr.ql linguist-generated -/test/extractor-tests/generated/TryExpr/TryExpr_getAttr.ql linguist-generated -/test/extractor-tests/generated/TryExpr/TryExpr_getExpr.ql linguist-generated /test/extractor-tests/generated/TupleExpr/TupleExpr.ql linguist-generated -/test/extractor-tests/generated/TupleExpr/TupleExpr_getAttr.ql linguist-generated -/test/extractor-tests/generated/TupleExpr/TupleExpr_getField.ql linguist-generated /test/extractor-tests/generated/TupleField/TupleField.ql linguist-generated -/test/extractor-tests/generated/TupleField/TupleField_getAttr.ql linguist-generated -/test/extractor-tests/generated/TupleField/TupleField_getTypeRepr.ql linguist-generated -/test/extractor-tests/generated/TupleField/TupleField_getVisibility.ql linguist-generated /test/extractor-tests/generated/TupleFieldList/TupleFieldList.ql linguist-generated -/test/extractor-tests/generated/TupleFieldList/TupleFieldList_getField.ql linguist-generated /test/extractor-tests/generated/TuplePat/TuplePat.ql linguist-generated -/test/extractor-tests/generated/TuplePat/TuplePat_getField.ql linguist-generated /test/extractor-tests/generated/TupleStructPat/TupleStructPat.ql linguist-generated -/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getField.ql linguist-generated -/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getPath.ql linguist-generated -/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getResolvedCrateOrigin.ql linguist-generated -/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getResolvedPath.ql linguist-generated /test/extractor-tests/generated/TupleTypeRepr/TupleTypeRepr.ql linguist-generated -/test/extractor-tests/generated/TupleTypeRepr/TupleTypeRepr_getField.ql linguist-generated /test/extractor-tests/generated/TypeAlias/TypeAlias.ql linguist-generated -/test/extractor-tests/generated/TypeAlias/TypeAlias_getAttr.ql linguist-generated -/test/extractor-tests/generated/TypeAlias/TypeAlias_getAttributeMacroExpansion.ql linguist-generated -/test/extractor-tests/generated/TypeAlias/TypeAlias_getCrateOrigin.ql linguist-generated -/test/extractor-tests/generated/TypeAlias/TypeAlias_getExtendedCanonicalPath.ql linguist-generated -/test/extractor-tests/generated/TypeAlias/TypeAlias_getGenericParamList.ql linguist-generated -/test/extractor-tests/generated/TypeAlias/TypeAlias_getName.ql linguist-generated -/test/extractor-tests/generated/TypeAlias/TypeAlias_getTypeBoundList.ql linguist-generated -/test/extractor-tests/generated/TypeAlias/TypeAlias_getTypeRepr.ql linguist-generated -/test/extractor-tests/generated/TypeAlias/TypeAlias_getVisibility.ql linguist-generated -/test/extractor-tests/generated/TypeAlias/TypeAlias_getWhereClause.ql linguist-generated /test/extractor-tests/generated/TypeArg/TypeArg.ql linguist-generated -/test/extractor-tests/generated/TypeArg/TypeArg_getTypeRepr.ql linguist-generated /test/extractor-tests/generated/TypeBound/TypeBound.ql linguist-generated -/test/extractor-tests/generated/TypeBound/TypeBound_getLifetime.ql linguist-generated -/test/extractor-tests/generated/TypeBound/TypeBound_getTypeRepr.ql linguist-generated -/test/extractor-tests/generated/TypeBound/TypeBound_getUseBoundGenericArgs.ql linguist-generated /test/extractor-tests/generated/TypeBoundList/TypeBoundList.ql linguist-generated -/test/extractor-tests/generated/TypeBoundList/TypeBoundList_getBound.ql linguist-generated /test/extractor-tests/generated/TypeParam/TypeParam.ql linguist-generated -/test/extractor-tests/generated/TypeParam/TypeParam_getAttr.ql linguist-generated -/test/extractor-tests/generated/TypeParam/TypeParam_getDefaultType.ql linguist-generated -/test/extractor-tests/generated/TypeParam/TypeParam_getName.ql linguist-generated -/test/extractor-tests/generated/TypeParam/TypeParam_getTypeBoundList.ql linguist-generated /test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr.ql linguist-generated -/test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr_getAttr.ql linguist-generated /test/extractor-tests/generated/Union/Union.ql linguist-generated -/test/extractor-tests/generated/Union/Union_getAttr.ql linguist-generated -/test/extractor-tests/generated/Union/Union_getAttributeMacroExpansion.ql linguist-generated -/test/extractor-tests/generated/Union/Union_getCrateOrigin.ql linguist-generated -/test/extractor-tests/generated/Union/Union_getDeriveMacroExpansion.ql linguist-generated -/test/extractor-tests/generated/Union/Union_getExtendedCanonicalPath.ql linguist-generated -/test/extractor-tests/generated/Union/Union_getGenericParamList.ql linguist-generated -/test/extractor-tests/generated/Union/Union_getName.ql linguist-generated -/test/extractor-tests/generated/Union/Union_getStructFieldList.ql linguist-generated -/test/extractor-tests/generated/Union/Union_getVisibility.ql linguist-generated -/test/extractor-tests/generated/Union/Union_getWhereClause.ql linguist-generated /test/extractor-tests/generated/Use/Use.ql linguist-generated -/test/extractor-tests/generated/Use/Use_getAttr.ql linguist-generated -/test/extractor-tests/generated/Use/Use_getAttributeMacroExpansion.ql linguist-generated -/test/extractor-tests/generated/Use/Use_getCrateOrigin.ql linguist-generated -/test/extractor-tests/generated/Use/Use_getExtendedCanonicalPath.ql linguist-generated -/test/extractor-tests/generated/Use/Use_getUseTree.ql linguist-generated -/test/extractor-tests/generated/Use/Use_getVisibility.ql linguist-generated /test/extractor-tests/generated/UseBoundGenericArgs/UseBoundGenericArgs.ql linguist-generated -/test/extractor-tests/generated/UseBoundGenericArgs/UseBoundGenericArgs_getUseBoundGenericArg.ql linguist-generated /test/extractor-tests/generated/UseTree/UseTree.ql linguist-generated -/test/extractor-tests/generated/UseTree/UseTree_getPath.ql linguist-generated -/test/extractor-tests/generated/UseTree/UseTree_getRename.ql linguist-generated -/test/extractor-tests/generated/UseTree/UseTree_getUseTreeList.ql linguist-generated /test/extractor-tests/generated/UseTreeList/UseTreeList.ql linguist-generated -/test/extractor-tests/generated/UseTreeList/UseTreeList_getUseTree.ql linguist-generated /test/extractor-tests/generated/Variant/Variant.ql linguist-generated -/test/extractor-tests/generated/Variant/Variant_getAttr.ql linguist-generated -/test/extractor-tests/generated/Variant/Variant_getCrateOrigin.ql linguist-generated -/test/extractor-tests/generated/Variant/Variant_getDiscriminant.ql linguist-generated -/test/extractor-tests/generated/Variant/Variant_getExtendedCanonicalPath.ql linguist-generated -/test/extractor-tests/generated/Variant/Variant_getFieldList.ql linguist-generated -/test/extractor-tests/generated/Variant/Variant_getName.ql linguist-generated -/test/extractor-tests/generated/Variant/Variant_getVisibility.ql linguist-generated /test/extractor-tests/generated/VariantList/VariantList.ql linguist-generated -/test/extractor-tests/generated/VariantList/VariantList_getVariant.ql linguist-generated /test/extractor-tests/generated/Visibility/Visibility.ql linguist-generated -/test/extractor-tests/generated/Visibility/Visibility_getPath.ql linguist-generated /test/extractor-tests/generated/WhereClause/WhereClause.ql linguist-generated -/test/extractor-tests/generated/WhereClause/WhereClause_getPredicate.ql linguist-generated /test/extractor-tests/generated/WherePred/WherePred.ql linguist-generated -/test/extractor-tests/generated/WherePred/WherePred_getGenericParamList.ql linguist-generated -/test/extractor-tests/generated/WherePred/WherePred_getLifetime.ql linguist-generated -/test/extractor-tests/generated/WherePred/WherePred_getTypeBoundList.ql linguist-generated -/test/extractor-tests/generated/WherePred/WherePred_getTypeRepr.ql linguist-generated /test/extractor-tests/generated/WhileExpr/WhileExpr.ql linguist-generated -/test/extractor-tests/generated/WhileExpr/WhileExpr_getAttr.ql linguist-generated -/test/extractor-tests/generated/WhileExpr/WhileExpr_getCondition.ql linguist-generated -/test/extractor-tests/generated/WhileExpr/WhileExpr_getLabel.ql linguist-generated -/test/extractor-tests/generated/WhileExpr/WhileExpr_getLoopBody.ql linguist-generated /test/extractor-tests/generated/WildcardPat/WildcardPat.ql linguist-generated /test/extractor-tests/generated/YeetExpr/YeetExpr.ql linguist-generated -/test/extractor-tests/generated/YeetExpr/YeetExpr_getAttr.ql linguist-generated -/test/extractor-tests/generated/YeetExpr/YeetExpr_getExpr.ql linguist-generated /test/extractor-tests/generated/YieldExpr/YieldExpr.ql linguist-generated -/test/extractor-tests/generated/YieldExpr/YieldExpr_getAttr.ql linguist-generated -/test/extractor-tests/generated/YieldExpr/YieldExpr_getExpr.ql linguist-generated diff --git a/rust/ql/lib/CHANGELOG.md b/rust/ql/lib/CHANGELOG.md index 85c29db05c1..aaaa73ae07e 100644 --- a/rust/ql/lib/CHANGELOG.md +++ b/rust/ql/lib/CHANGELOG.md @@ -1,3 +1,9 @@ +## 0.1.11 + +### New Features + +* Initial public preview release. + ## 0.1.10 No user-facing changes. diff --git a/rust/ql/lib/change-notes/2025-06-24-type-inference.md b/rust/ql/lib/change-notes/2025-06-24-type-inference.md new file mode 100644 index 00000000000..5e3fd6fc53d --- /dev/null +++ b/rust/ql/lib/change-notes/2025-06-24-type-inference.md @@ -0,0 +1,4 @@ +--- +category: minorAnalysis +--- +* Added type inference for `for` loops and array expressions. diff --git a/rust/ql/src/change-notes/2025-06-13-public-preview.md b/rust/ql/lib/change-notes/released/0.1.11.md similarity index 53% rename from rust/ql/src/change-notes/2025-06-13-public-preview.md rename to rust/ql/lib/change-notes/released/0.1.11.md index ab2250e3b58..58740d0b024 100644 --- a/rust/ql/src/change-notes/2025-06-13-public-preview.md +++ b/rust/ql/lib/change-notes/released/0.1.11.md @@ -1,4 +1,5 @@ ---- -category: newQuery ---- +## 0.1.11 + +### New Features + * Initial public preview release. diff --git a/rust/ql/lib/codeql-pack.release.yml b/rust/ql/lib/codeql-pack.release.yml index 30f5ca88be0..1d1688e8d61 100644 --- a/rust/ql/lib/codeql-pack.release.yml +++ b/rust/ql/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 0.1.10 +lastReleaseVersion: 0.1.11 diff --git a/rust/ql/lib/codeql/rust/dataflow/internal/DataFlowImpl.qll b/rust/ql/lib/codeql/rust/dataflow/internal/DataFlowImpl.qll index 59ff2fc24c2..fb3a46d7866 100644 --- a/rust/ql/lib/codeql/rust/dataflow/internal/DataFlowImpl.qll +++ b/rust/ql/lib/codeql/rust/dataflow/internal/DataFlowImpl.qll @@ -145,9 +145,13 @@ final class ArgumentPosition extends ParameterPosition { * as the synthetic `ReceiverNode` is the argument for the `self` parameter. */ predicate isArgumentForCall(ExprCfgNode arg, CallCfgNode call, ParameterPosition pos) { - call.getPositionalArgument(pos.getPosition()) = arg - or - call.getReceiver() = arg and pos.isSelf() and not call.getCall().receiverImplicitlyBorrowed() + // TODO: Handle index expressions as calls in data flow. + not call.getCall() instanceof IndexExpr and + ( + call.getPositionalArgument(pos.getPosition()) = arg + or + call.getReceiver() = arg and pos.isSelf() and not call.getCall().receiverImplicitlyBorrowed() + ) } /** Provides logic related to SSA. */ @@ -959,7 +963,11 @@ private module Cached { cached newtype TDataFlowCall = - TCall(CallCfgNode c) { Stages::DataFlowStage::ref() } or + TCall(CallCfgNode c) { + Stages::DataFlowStage::ref() and + // TODO: Handle index expressions as calls in data flow. + not c.getCall() instanceof IndexExpr + } or TSummaryCall( FlowSummaryImpl::Public::SummarizedCallable c, FlowSummaryImpl::Private::SummaryNode receiver ) { diff --git a/rust/ql/lib/codeql/rust/dataflow/internal/Node.qll b/rust/ql/lib/codeql/rust/dataflow/internal/Node.qll index 51343c1eb40..b18ccbacbd6 100644 --- a/rust/ql/lib/codeql/rust/dataflow/internal/Node.qll +++ b/rust/ql/lib/codeql/rust/dataflow/internal/Node.qll @@ -472,7 +472,11 @@ newtype TNode = getPostUpdateReverseStep(any(PostUpdateNode n).getPreUpdateNode().asExpr(), _) ] } or - TReceiverNode(CallCfgNode mc, Boolean isPost) { mc.getCall().receiverImplicitlyBorrowed() } or + TReceiverNode(CallCfgNode mc, Boolean isPost) { + mc.getCall().receiverImplicitlyBorrowed() and + // TODO: Handle index expressions as calls in data flow. + not mc.getCall() instanceof IndexExpr + } or TSsaNode(SsaImpl::DataFlowIntegration::SsaNode node) or TFlowSummaryNode(FlowSummaryImpl::Private::SummaryNode sn) or TClosureSelfReferenceNode(CfgScope c) { lambdaCreationExpr(c, _) } or diff --git a/rust/ql/lib/codeql/rust/elements/internal/CallImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/CallImpl.qll index f350e88efad..9cd45ca7670 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/CallImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/CallImpl.qll @@ -160,4 +160,20 @@ module Impl { pos.asPosition() = 0 and result = super.getOperand(1) } } + + private class IndexCall extends Call instanceof IndexExpr { + override string getMethodName() { result = "index" } + + override Trait getTrait() { result.getCanonicalPath() = "core::ops::index::Index" } + + override predicate implicitBorrowAt(ArgumentPosition pos, boolean certain) { + pos.isSelf() and certain = true + } + + override Expr getArgument(ArgumentPosition pos) { + pos.isSelf() and result = super.getBase() + or + pos.asPosition() = 0 and result = super.getIndex() + } + } } diff --git a/rust/ql/lib/codeql/rust/internal/TypeInference.qll b/rust/ql/lib/codeql/rust/internal/TypeInference.qll index bddd8a0d99d..a7bba5a1b2b 100644 --- a/rust/ql/lib/codeql/rust/internal/TypeInference.qll +++ b/rust/ql/lib/codeql/rust/internal/TypeInference.qll @@ -285,6 +285,16 @@ private predicate typeEquality(AstNode n1, TypePath prefix1, AstNode n2, TypePat prefix2.isEmpty() ) ) + or + // an array list expression (`[1, 2, 3]`) has the type of the first (any) element + n1.(ArrayListExpr).getExpr(_) = n2 and + prefix1 = TypePath::singleton(TArrayTypeParameter()) and + prefix2.isEmpty() + or + // an array repeat expression (`[1; 3]`) has the type of the repeat operand + n1.(ArrayRepeatExpr).getRepeatOperand() = n2 and + prefix1 = TypePath::singleton(TArrayTypeParameter()) and + prefix2.isEmpty() } pragma[nomagic] @@ -772,45 +782,48 @@ private Type inferCallExprBaseType(AstNode n, TypePath path) { n = a.getNodeAt(apos) and result = CallExprBaseMatching::inferAccessType(a, apos, path0) | - ( + if apos.isBorrowed(true) or - // The desugaring of the unary `*e` is `*Deref::deref(&e)`. To handle the - // deref expression after the call we must strip a `&` from the type at - // the return position. - apos.isReturn() and a instanceof DerefExpr - ) and - path0.isCons(TRefTypeParameter(), path) - or - apos.isBorrowed(false) and - exists(Type argType | argType = inferType(n) | - if argType = TRefType() + // The desugaring of the unary `*e` is `*Deref::deref(&e)` and the + // desugaring of `a[b]` is `*Index::index(&a, b)`. To handle the deref + // expression after the call we must strip a `&` from the type at the + // return position. + apos.isReturn() and + (a instanceof DerefExpr or a instanceof IndexExpr) + then path0.isCons(TRefTypeParameter(), path) + else + if apos.isBorrowed(false) then - path = path0 and - path0.isCons(TRefTypeParameter(), _) - or - // adjust for implicit deref - not path0.isCons(TRefTypeParameter(), _) and - not (path0.isEmpty() and result = TRefType()) and - path = TypePath::cons(TRefTypeParameter(), path0) - else ( - not ( - argType.(StructType).asItemNode() instanceof StringStruct and - result.(StructType).asItemNode() instanceof Builtins::Str - ) and - ( - not path0.isCons(TRefTypeParameter(), _) and - not (path0.isEmpty() and result = TRefType()) and - path = path0 - or - // adjust for implicit borrow - path0.isCons(TRefTypeParameter(), path) + exists(Type argType | argType = inferType(n) | + if argType = TRefType() + then + path = path0 and + path0.isCons(TRefTypeParameter(), _) + or + // adjust for implicit deref + not path0.isCons(TRefTypeParameter(), _) and + not (path0.isEmpty() and result = TRefType()) and + path = TypePath::cons(TRefTypeParameter(), path0) + else ( + not ( + argType.(StructType).asItemNode() instanceof StringStruct and + result.(StructType).asItemNode() instanceof Builtins::Str + ) and + ( + not path0.isCons(TRefTypeParameter(), _) and + not (path0.isEmpty() and result = TRefType()) and + path = path0 + or + // adjust for implicit borrow + path0.isCons(TRefTypeParameter(), path) + ) + ) ) + else ( + not apos.isBorrowed(_) and + path = path0 ) - ) - or - not apos.isBorrowed(_) and - path = path0 ) } @@ -1034,6 +1047,12 @@ private class Vec extends Struct { } } +/** + * Gets the root type of the array expression `ae`. + */ +pragma[nomagic] +private Type inferArrayExprType(ArrayExpr ae) { exists(ae) and result = TArrayType() } + /** * According to [the Rust reference][1]: _"array and slice-typed expressions * can be indexed with a `usize` index ... For other types an index expression @@ -1046,8 +1065,8 @@ private class Vec extends Struct { */ pragma[nomagic] private Type inferIndexExprType(IndexExpr ie, TypePath path) { - // TODO: Should be implemented as method resolution, using the special - // `std::ops::Index` trait. + // TODO: Method resolution to the `std::ops::Index` trait can handle the + // `Index` instances for slices and arrays. exists(TypePath exprPath, Builtins::BuiltinType t | TStruct(t) = inferType(ie.getIndex()) and ( @@ -1070,6 +1089,26 @@ private Type inferIndexExprType(IndexExpr ie, TypePath path) { ) } +pragma[nomagic] +private Type inferForLoopExprType(AstNode n, TypePath path) { + // type of iterable -> type of pattern (loop variable) + exists(ForExpr fe, Type iterableType, TypePath iterablePath | + n = fe.getPat() and + iterableType = inferType(fe.getIterable(), iterablePath) and + result = iterableType and + ( + iterablePath.isCons(any(Vec v).getElementTypeParameter(), path) + or + iterablePath.isCons(any(ArrayTypeParameter tp), path) + or + iterablePath + .stripPrefix(TypePath::cons(TRefTypeParameter(), + TypePath::singleton(any(SliceTypeParameter tp)))) = path + // TODO: iterables (general case for containers, ranges etc) + ) + ) +} + final class MethodCall extends Call { MethodCall() { exists(this.getReceiver()) and @@ -1515,7 +1554,12 @@ private module Cached { or result = inferAwaitExprType(n, path) or + result = inferArrayExprType(n) and + path.isEmpty() + or result = inferIndexExprType(n, path) + or + result = inferForLoopExprType(n, path) } } diff --git a/rust/ql/lib/qlpack.yml b/rust/ql/lib/qlpack.yml index e20992cbb0b..f2a10f4c4f7 100644 --- a/rust/ql/lib/qlpack.yml +++ b/rust/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/rust-all -version: 0.1.11-dev +version: 0.1.12-dev groups: rust extractor: rust dbscheme: rust.dbscheme diff --git a/rust/ql/src/CHANGELOG.md b/rust/ql/src/CHANGELOG.md index 1459910b5ee..ad73b7174f9 100644 --- a/rust/ql/src/CHANGELOG.md +++ b/rust/ql/src/CHANGELOG.md @@ -1,3 +1,9 @@ +## 0.1.11 + +### New Queries + +* Initial public preview release. + ## 0.1.10 No user-facing changes. diff --git a/rust/ql/lib/change-notes/2025-06-13-public-preview.md b/rust/ql/src/change-notes/released/0.1.11.md similarity index 54% rename from rust/ql/lib/change-notes/2025-06-13-public-preview.md rename to rust/ql/src/change-notes/released/0.1.11.md index d60dc3315b8..04115f54f4c 100644 --- a/rust/ql/lib/change-notes/2025-06-13-public-preview.md +++ b/rust/ql/src/change-notes/released/0.1.11.md @@ -1,4 +1,5 @@ ---- -category: feature ---- +## 0.1.11 + +### New Queries + * Initial public preview release. diff --git a/rust/ql/src/codeql-pack.release.yml b/rust/ql/src/codeql-pack.release.yml index 30f5ca88be0..1d1688e8d61 100644 --- a/rust/ql/src/codeql-pack.release.yml +++ b/rust/ql/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 0.1.10 +lastReleaseVersion: 0.1.11 diff --git a/rust/ql/src/qlpack.yml b/rust/ql/src/qlpack.yml index 9f1b7148e38..478c7139d5a 100644 --- a/rust/ql/src/qlpack.yml +++ b/rust/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/rust-queries -version: 0.1.11-dev +version: 0.1.12-dev groups: - rust - queries diff --git a/rust/ql/test/extractor-tests/generated/Abi/Abi.expected b/rust/ql/test/extractor-tests/generated/Abi/Abi.expected index 1184fc0e374..158233ee757 100644 --- a/rust/ql/test/extractor-tests/generated/Abi/Abi.expected +++ b/rust/ql/test/extractor-tests/generated/Abi/Abi.expected @@ -1 +1,4 @@ -| gen_abi.rs:7:5:7:14 | Abi | hasAbiString: | yes | +instances +| gen_abi.rs:7:5:7:14 | Abi | +getAbiString +| gen_abi.rs:7:5:7:14 | Abi | "C" | diff --git a/rust/ql/test/extractor-tests/generated/Abi/Abi.ql b/rust/ql/test/extractor-tests/generated/Abi/Abi.ql index 3c0fd40eaeb..bbf211911a4 100644 --- a/rust/ql/test/extractor-tests/generated/Abi/Abi.ql +++ b/rust/ql/test/extractor-tests/generated/Abi/Abi.ql @@ -2,9 +2,8 @@ import codeql.rust.elements import TestUtils -from Abi x, string hasAbiString -where - toBeTested(x) and - not x.isUnknown() and - if x.hasAbiString() then hasAbiString = "yes" else hasAbiString = "no" -select x, "hasAbiString:", hasAbiString +query predicate instances(Abi x) { toBeTested(x) and not x.isUnknown() } + +query predicate getAbiString(Abi x, string getAbiString) { + toBeTested(x) and not x.isUnknown() and getAbiString = x.getAbiString() +} diff --git a/rust/ql/test/extractor-tests/generated/Abi/Abi_getAbiString.expected b/rust/ql/test/extractor-tests/generated/Abi/Abi_getAbiString.expected deleted file mode 100644 index 278aa2d8325..00000000000 --- a/rust/ql/test/extractor-tests/generated/Abi/Abi_getAbiString.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_abi.rs:7:5:7:14 | Abi | "C" | diff --git a/rust/ql/test/extractor-tests/generated/Abi/Abi_getAbiString.ql b/rust/ql/test/extractor-tests/generated/Abi/Abi_getAbiString.ql deleted file mode 100644 index 77104019b32..00000000000 --- a/rust/ql/test/extractor-tests/generated/Abi/Abi_getAbiString.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Abi x -where toBeTested(x) and not x.isUnknown() -select x, x.getAbiString() diff --git a/rust/ql/test/extractor-tests/generated/Abi/Cargo.lock b/rust/ql/test/extractor-tests/generated/Abi/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Abi/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/ArgList/ArgList.expected b/rust/ql/test/extractor-tests/generated/ArgList/ArgList.expected index 86eca9460ef..cf6f3a3a058 100644 --- a/rust/ql/test/extractor-tests/generated/ArgList/ArgList.expected +++ b/rust/ql/test/extractor-tests/generated/ArgList/ArgList.expected @@ -1 +1,6 @@ -| gen_arg_list.rs:7:8:7:16 | ArgList | getNumberOfArgs: | 3 | +instances +| gen_arg_list.rs:7:8:7:16 | ArgList | +getArg +| gen_arg_list.rs:7:8:7:16 | ArgList | 0 | gen_arg_list.rs:7:9:7:9 | 1 | +| gen_arg_list.rs:7:8:7:16 | ArgList | 1 | gen_arg_list.rs:7:12:7:12 | 2 | +| gen_arg_list.rs:7:8:7:16 | ArgList | 2 | gen_arg_list.rs:7:15:7:15 | 3 | diff --git a/rust/ql/test/extractor-tests/generated/ArgList/ArgList.ql b/rust/ql/test/extractor-tests/generated/ArgList/ArgList.ql index 0e8c23922b5..91bbcef10e6 100644 --- a/rust/ql/test/extractor-tests/generated/ArgList/ArgList.ql +++ b/rust/ql/test/extractor-tests/generated/ArgList/ArgList.ql @@ -2,9 +2,8 @@ import codeql.rust.elements import TestUtils -from ArgList x, int getNumberOfArgs -where - toBeTested(x) and - not x.isUnknown() and - getNumberOfArgs = x.getNumberOfArgs() -select x, "getNumberOfArgs:", getNumberOfArgs +query predicate instances(ArgList x) { toBeTested(x) and not x.isUnknown() } + +query predicate getArg(ArgList x, int index, Expr getArg) { + toBeTested(x) and not x.isUnknown() and getArg = x.getArg(index) +} diff --git a/rust/ql/test/extractor-tests/generated/ArgList/ArgList_getArg.expected b/rust/ql/test/extractor-tests/generated/ArgList/ArgList_getArg.expected deleted file mode 100644 index 2cfb771d6cb..00000000000 --- a/rust/ql/test/extractor-tests/generated/ArgList/ArgList_getArg.expected +++ /dev/null @@ -1,3 +0,0 @@ -| gen_arg_list.rs:7:8:7:16 | ArgList | 0 | gen_arg_list.rs:7:9:7:9 | 1 | -| gen_arg_list.rs:7:8:7:16 | ArgList | 1 | gen_arg_list.rs:7:12:7:12 | 2 | -| gen_arg_list.rs:7:8:7:16 | ArgList | 2 | gen_arg_list.rs:7:15:7:15 | 3 | diff --git a/rust/ql/test/extractor-tests/generated/ArgList/ArgList_getArg.ql b/rust/ql/test/extractor-tests/generated/ArgList/ArgList_getArg.ql deleted file mode 100644 index 253d13f2b56..00000000000 --- a/rust/ql/test/extractor-tests/generated/ArgList/ArgList_getArg.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from ArgList x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getArg(index) diff --git a/rust/ql/test/extractor-tests/generated/ArgList/Cargo.lock b/rust/ql/test/extractor-tests/generated/ArgList/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ArgList/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/ArrayListExpr/ArrayListExpr.expected b/rust/ql/test/extractor-tests/generated/ArrayListExpr/ArrayListExpr.expected index 31fd8036aad..fbe635d579d 100644 --- a/rust/ql/test/extractor-tests/generated/ArrayListExpr/ArrayListExpr.expected +++ b/rust/ql/test/extractor-tests/generated/ArrayListExpr/ArrayListExpr.expected @@ -1 +1,7 @@ -| gen_array_list_expr.rs:5:5:5:13 | [...] | getNumberOfExprs: | 3 | getNumberOfAttrs: | 0 | +instances +| gen_array_list_expr.rs:5:5:5:13 | [...] | +getExpr +| gen_array_list_expr.rs:5:5:5:13 | [...] | 0 | gen_array_list_expr.rs:5:6:5:6 | 1 | +| gen_array_list_expr.rs:5:5:5:13 | [...] | 1 | gen_array_list_expr.rs:5:9:5:9 | 2 | +| gen_array_list_expr.rs:5:5:5:13 | [...] | 2 | gen_array_list_expr.rs:5:12:5:12 | 3 | +getAttr diff --git a/rust/ql/test/extractor-tests/generated/ArrayListExpr/ArrayListExpr.ql b/rust/ql/test/extractor-tests/generated/ArrayListExpr/ArrayListExpr.ql index 72f74d5ce34..36f7bb41db9 100644 --- a/rust/ql/test/extractor-tests/generated/ArrayListExpr/ArrayListExpr.ql +++ b/rust/ql/test/extractor-tests/generated/ArrayListExpr/ArrayListExpr.ql @@ -2,10 +2,12 @@ import codeql.rust.elements import TestUtils -from ArrayListExpr x, int getNumberOfExprs, int getNumberOfAttrs -where - toBeTested(x) and - not x.isUnknown() and - getNumberOfExprs = x.getNumberOfExprs() and - getNumberOfAttrs = x.getNumberOfAttrs() -select x, "getNumberOfExprs:", getNumberOfExprs, "getNumberOfAttrs:", getNumberOfAttrs +query predicate instances(ArrayListExpr x) { toBeTested(x) and not x.isUnknown() } + +query predicate getExpr(ArrayListExpr x, int index, Expr getExpr) { + toBeTested(x) and not x.isUnknown() and getExpr = x.getExpr(index) +} + +query predicate getAttr(ArrayListExpr x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} diff --git a/rust/ql/test/extractor-tests/generated/ArrayListExpr/ArrayListExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/ArrayListExpr/ArrayListExpr_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/ArrayListExpr/ArrayListExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/ArrayListExpr/ArrayListExpr_getAttr.ql deleted file mode 100644 index 10a9b3d52b3..00000000000 --- a/rust/ql/test/extractor-tests/generated/ArrayListExpr/ArrayListExpr_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from ArrayListExpr x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/ArrayListExpr/ArrayListExpr_getExpr.expected b/rust/ql/test/extractor-tests/generated/ArrayListExpr/ArrayListExpr_getExpr.expected deleted file mode 100644 index ac836b145bd..00000000000 --- a/rust/ql/test/extractor-tests/generated/ArrayListExpr/ArrayListExpr_getExpr.expected +++ /dev/null @@ -1,3 +0,0 @@ -| gen_array_list_expr.rs:5:5:5:13 | [...] | 0 | gen_array_list_expr.rs:5:6:5:6 | 1 | -| gen_array_list_expr.rs:5:5:5:13 | [...] | 1 | gen_array_list_expr.rs:5:9:5:9 | 2 | -| gen_array_list_expr.rs:5:5:5:13 | [...] | 2 | gen_array_list_expr.rs:5:12:5:12 | 3 | diff --git a/rust/ql/test/extractor-tests/generated/ArrayListExpr/ArrayListExpr_getExpr.ql b/rust/ql/test/extractor-tests/generated/ArrayListExpr/ArrayListExpr_getExpr.ql deleted file mode 100644 index 96d635c3c17..00000000000 --- a/rust/ql/test/extractor-tests/generated/ArrayListExpr/ArrayListExpr_getExpr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from ArrayListExpr x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getExpr(index) diff --git a/rust/ql/test/extractor-tests/generated/ArrayListExpr/Cargo.lock b/rust/ql/test/extractor-tests/generated/ArrayListExpr/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ArrayListExpr/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/ArrayRepeatExpr/ArrayRepeatExpr.expected b/rust/ql/test/extractor-tests/generated/ArrayRepeatExpr/ArrayRepeatExpr.expected index e19394137d9..39bb2b685be 100644 --- a/rust/ql/test/extractor-tests/generated/ArrayRepeatExpr/ArrayRepeatExpr.expected +++ b/rust/ql/test/extractor-tests/generated/ArrayRepeatExpr/ArrayRepeatExpr.expected @@ -1 +1,6 @@ -| gen_array_repeat_expr.rs:5:5:5:11 | [1; 10] | getNumberOfExprs: | 2 | getNumberOfAttrs: | 0 | getRepeatOperand: | gen_array_repeat_expr.rs:5:6:5:6 | 1 | getRepeatLength: | gen_array_repeat_expr.rs:5:9:5:10 | 10 | +instances +| gen_array_repeat_expr.rs:5:5:5:11 | [1; 10] | getRepeatOperand: | gen_array_repeat_expr.rs:5:6:5:6 | 1 | getRepeatLength: | gen_array_repeat_expr.rs:5:9:5:10 | 10 | +getExpr +| gen_array_repeat_expr.rs:5:5:5:11 | [1; 10] | 0 | gen_array_repeat_expr.rs:5:6:5:6 | 1 | +| gen_array_repeat_expr.rs:5:5:5:11 | [1; 10] | 1 | gen_array_repeat_expr.rs:5:9:5:10 | 10 | +getAttr diff --git a/rust/ql/test/extractor-tests/generated/ArrayRepeatExpr/ArrayRepeatExpr.ql b/rust/ql/test/extractor-tests/generated/ArrayRepeatExpr/ArrayRepeatExpr.ql index cda59a0d638..7f337fc87b5 100644 --- a/rust/ql/test/extractor-tests/generated/ArrayRepeatExpr/ArrayRepeatExpr.ql +++ b/rust/ql/test/extractor-tests/generated/ArrayRepeatExpr/ArrayRepeatExpr.ql @@ -2,15 +2,22 @@ import codeql.rust.elements import TestUtils -from - ArrayRepeatExpr x, int getNumberOfExprs, int getNumberOfAttrs, Expr getRepeatOperand, - Expr getRepeatLength -where +query predicate instances( + ArrayRepeatExpr x, string getRepeatOperand__label, Expr getRepeatOperand, + string getRepeatLength__label, Expr getRepeatLength +) { toBeTested(x) and not x.isUnknown() and - getNumberOfExprs = x.getNumberOfExprs() and - getNumberOfAttrs = x.getNumberOfAttrs() and + getRepeatOperand__label = "getRepeatOperand:" and getRepeatOperand = x.getRepeatOperand() and + getRepeatLength__label = "getRepeatLength:" and getRepeatLength = x.getRepeatLength() -select x, "getNumberOfExprs:", getNumberOfExprs, "getNumberOfAttrs:", getNumberOfAttrs, - "getRepeatOperand:", getRepeatOperand, "getRepeatLength:", getRepeatLength +} + +query predicate getExpr(ArrayRepeatExpr x, int index, Expr getExpr) { + toBeTested(x) and not x.isUnknown() and getExpr = x.getExpr(index) +} + +query predicate getAttr(ArrayRepeatExpr x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} diff --git a/rust/ql/test/extractor-tests/generated/ArrayRepeatExpr/ArrayRepeatExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/ArrayRepeatExpr/ArrayRepeatExpr_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/ArrayRepeatExpr/ArrayRepeatExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/ArrayRepeatExpr/ArrayRepeatExpr_getAttr.ql deleted file mode 100644 index 30c64104eee..00000000000 --- a/rust/ql/test/extractor-tests/generated/ArrayRepeatExpr/ArrayRepeatExpr_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from ArrayRepeatExpr x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/ArrayRepeatExpr/ArrayRepeatExpr_getExpr.expected b/rust/ql/test/extractor-tests/generated/ArrayRepeatExpr/ArrayRepeatExpr_getExpr.expected deleted file mode 100644 index ccf6290172e..00000000000 --- a/rust/ql/test/extractor-tests/generated/ArrayRepeatExpr/ArrayRepeatExpr_getExpr.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_array_repeat_expr.rs:5:5:5:11 | [1; 10] | 0 | gen_array_repeat_expr.rs:5:6:5:6 | 1 | -| gen_array_repeat_expr.rs:5:5:5:11 | [1; 10] | 1 | gen_array_repeat_expr.rs:5:9:5:10 | 10 | diff --git a/rust/ql/test/extractor-tests/generated/ArrayRepeatExpr/ArrayRepeatExpr_getExpr.ql b/rust/ql/test/extractor-tests/generated/ArrayRepeatExpr/ArrayRepeatExpr_getExpr.ql deleted file mode 100644 index 63352ff7776..00000000000 --- a/rust/ql/test/extractor-tests/generated/ArrayRepeatExpr/ArrayRepeatExpr_getExpr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from ArrayRepeatExpr x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getExpr(index) diff --git a/rust/ql/test/extractor-tests/generated/ArrayRepeatExpr/Cargo.lock b/rust/ql/test/extractor-tests/generated/ArrayRepeatExpr/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ArrayRepeatExpr/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/ArrayTypeRepr/ArrayTypeRepr.expected b/rust/ql/test/extractor-tests/generated/ArrayTypeRepr/ArrayTypeRepr.expected index b19154aca0b..98da7c6b5a9 100644 --- a/rust/ql/test/extractor-tests/generated/ArrayTypeRepr/ArrayTypeRepr.expected +++ b/rust/ql/test/extractor-tests/generated/ArrayTypeRepr/ArrayTypeRepr.expected @@ -1 +1,6 @@ -| gen_array_type_repr.rs:7:14:7:21 | ArrayTypeRepr | hasConstArg: | yes | hasElementTypeRepr: | yes | +instances +| gen_array_type_repr.rs:7:14:7:21 | ArrayTypeRepr | +getConstArg +| gen_array_type_repr.rs:7:14:7:21 | ArrayTypeRepr | gen_array_type_repr.rs:7:20:7:20 | ConstArg | +getElementTypeRepr +| gen_array_type_repr.rs:7:14:7:21 | ArrayTypeRepr | gen_array_type_repr.rs:7:15:7:17 | i32 | diff --git a/rust/ql/test/extractor-tests/generated/ArrayTypeRepr/ArrayTypeRepr.ql b/rust/ql/test/extractor-tests/generated/ArrayTypeRepr/ArrayTypeRepr.ql index 5ec3d499add..e12f81b7b71 100644 --- a/rust/ql/test/extractor-tests/generated/ArrayTypeRepr/ArrayTypeRepr.ql +++ b/rust/ql/test/extractor-tests/generated/ArrayTypeRepr/ArrayTypeRepr.ql @@ -2,10 +2,12 @@ import codeql.rust.elements import TestUtils -from ArrayTypeRepr x, string hasConstArg, string hasElementTypeRepr -where - toBeTested(x) and - not x.isUnknown() and - (if x.hasConstArg() then hasConstArg = "yes" else hasConstArg = "no") and - if x.hasElementTypeRepr() then hasElementTypeRepr = "yes" else hasElementTypeRepr = "no" -select x, "hasConstArg:", hasConstArg, "hasElementTypeRepr:", hasElementTypeRepr +query predicate instances(ArrayTypeRepr x) { toBeTested(x) and not x.isUnknown() } + +query predicate getConstArg(ArrayTypeRepr x, ConstArg getConstArg) { + toBeTested(x) and not x.isUnknown() and getConstArg = x.getConstArg() +} + +query predicate getElementTypeRepr(ArrayTypeRepr x, TypeRepr getElementTypeRepr) { + toBeTested(x) and not x.isUnknown() and getElementTypeRepr = x.getElementTypeRepr() +} diff --git a/rust/ql/test/extractor-tests/generated/ArrayTypeRepr/ArrayTypeRepr_getConstArg.expected b/rust/ql/test/extractor-tests/generated/ArrayTypeRepr/ArrayTypeRepr_getConstArg.expected deleted file mode 100644 index 9ab029133f6..00000000000 --- a/rust/ql/test/extractor-tests/generated/ArrayTypeRepr/ArrayTypeRepr_getConstArg.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_array_type_repr.rs:7:14:7:21 | ArrayTypeRepr | gen_array_type_repr.rs:7:20:7:20 | ConstArg | diff --git a/rust/ql/test/extractor-tests/generated/ArrayTypeRepr/ArrayTypeRepr_getConstArg.ql b/rust/ql/test/extractor-tests/generated/ArrayTypeRepr/ArrayTypeRepr_getConstArg.ql deleted file mode 100644 index f89dc93f5b8..00000000000 --- a/rust/ql/test/extractor-tests/generated/ArrayTypeRepr/ArrayTypeRepr_getConstArg.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from ArrayTypeRepr x -where toBeTested(x) and not x.isUnknown() -select x, x.getConstArg() diff --git a/rust/ql/test/extractor-tests/generated/ArrayTypeRepr/ArrayTypeRepr_getElementTypeRepr.expected b/rust/ql/test/extractor-tests/generated/ArrayTypeRepr/ArrayTypeRepr_getElementTypeRepr.expected deleted file mode 100644 index 86b22f2f39d..00000000000 --- a/rust/ql/test/extractor-tests/generated/ArrayTypeRepr/ArrayTypeRepr_getElementTypeRepr.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_array_type_repr.rs:7:14:7:21 | ArrayTypeRepr | gen_array_type_repr.rs:7:15:7:17 | i32 | diff --git a/rust/ql/test/extractor-tests/generated/ArrayTypeRepr/ArrayTypeRepr_getElementTypeRepr.ql b/rust/ql/test/extractor-tests/generated/ArrayTypeRepr/ArrayTypeRepr_getElementTypeRepr.ql deleted file mode 100644 index f343cbd19c9..00000000000 --- a/rust/ql/test/extractor-tests/generated/ArrayTypeRepr/ArrayTypeRepr_getElementTypeRepr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from ArrayTypeRepr x -where toBeTested(x) and not x.isUnknown() -select x, x.getElementTypeRepr() diff --git a/rust/ql/test/extractor-tests/generated/ArrayTypeRepr/Cargo.lock b/rust/ql/test/extractor-tests/generated/ArrayTypeRepr/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ArrayTypeRepr/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/AsmClobberAbi/AsmClobberAbi.ql b/rust/ql/test/extractor-tests/generated/AsmClobberAbi/AsmClobberAbi.ql index 087663779db..65680442dfb 100644 --- a/rust/ql/test/extractor-tests/generated/AsmClobberAbi/AsmClobberAbi.ql +++ b/rust/ql/test/extractor-tests/generated/AsmClobberAbi/AsmClobberAbi.ql @@ -2,6 +2,4 @@ import codeql.rust.elements import TestUtils -from AsmClobberAbi x -where toBeTested(x) and not x.isUnknown() -select x +query predicate instances(AsmClobberAbi x) { toBeTested(x) and not x.isUnknown() } diff --git a/rust/ql/test/extractor-tests/generated/AsmClobberAbi/Cargo.lock b/rust/ql/test/extractor-tests/generated/AsmClobberAbi/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/AsmClobberAbi/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/AsmConst/AsmConst.expected b/rust/ql/test/extractor-tests/generated/AsmConst/AsmConst.expected index 5a82c38127c..30ed42e46f9 100644 --- a/rust/ql/test/extractor-tests/generated/AsmConst/AsmConst.expected +++ b/rust/ql/test/extractor-tests/generated/AsmConst/AsmConst.expected @@ -1 +1,4 @@ -| gen_asm_const.rs:8:30:8:37 | AsmConst | hasExpr: | yes | isConst: | yes | +instances +| gen_asm_const.rs:8:30:8:37 | AsmConst | isConst: | yes | +getExpr +| gen_asm_const.rs:8:30:8:37 | AsmConst | gen_asm_const.rs:8:36:8:37 | 42 | diff --git a/rust/ql/test/extractor-tests/generated/AsmConst/AsmConst.ql b/rust/ql/test/extractor-tests/generated/AsmConst/AsmConst.ql index 151d7a70fa2..dbec4fe27e3 100644 --- a/rust/ql/test/extractor-tests/generated/AsmConst/AsmConst.ql +++ b/rust/ql/test/extractor-tests/generated/AsmConst/AsmConst.ql @@ -2,10 +2,13 @@ import codeql.rust.elements import TestUtils -from AsmConst x, string hasExpr, string isConst -where +query predicate instances(AsmConst x, string isConst__label, string isConst) { toBeTested(x) and not x.isUnknown() and - (if x.hasExpr() then hasExpr = "yes" else hasExpr = "no") and + isConst__label = "isConst:" and if x.isConst() then isConst = "yes" else isConst = "no" -select x, "hasExpr:", hasExpr, "isConst:", isConst +} + +query predicate getExpr(AsmConst x, Expr getExpr) { + toBeTested(x) and not x.isUnknown() and getExpr = x.getExpr() +} diff --git a/rust/ql/test/extractor-tests/generated/AsmConst/AsmConst_getExpr.expected b/rust/ql/test/extractor-tests/generated/AsmConst/AsmConst_getExpr.expected deleted file mode 100644 index f1bb1ffc053..00000000000 --- a/rust/ql/test/extractor-tests/generated/AsmConst/AsmConst_getExpr.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_asm_const.rs:8:30:8:37 | AsmConst | gen_asm_const.rs:8:36:8:37 | 42 | diff --git a/rust/ql/test/extractor-tests/generated/AsmConst/AsmConst_getExpr.ql b/rust/ql/test/extractor-tests/generated/AsmConst/AsmConst_getExpr.ql deleted file mode 100644 index e01d9d86fbe..00000000000 --- a/rust/ql/test/extractor-tests/generated/AsmConst/AsmConst_getExpr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from AsmConst x -where toBeTested(x) and not x.isUnknown() -select x, x.getExpr() diff --git a/rust/ql/test/extractor-tests/generated/AsmConst/Cargo.lock b/rust/ql/test/extractor-tests/generated/AsmConst/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/AsmConst/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/AsmDirSpec/AsmDirSpec.ql b/rust/ql/test/extractor-tests/generated/AsmDirSpec/AsmDirSpec.ql index 0d009492422..2507d0e2081 100644 --- a/rust/ql/test/extractor-tests/generated/AsmDirSpec/AsmDirSpec.ql +++ b/rust/ql/test/extractor-tests/generated/AsmDirSpec/AsmDirSpec.ql @@ -2,6 +2,4 @@ import codeql.rust.elements import TestUtils -from AsmDirSpec x -where toBeTested(x) and not x.isUnknown() -select x +query predicate instances(AsmDirSpec x) { toBeTested(x) and not x.isUnknown() } diff --git a/rust/ql/test/extractor-tests/generated/AsmDirSpec/Cargo.lock b/rust/ql/test/extractor-tests/generated/AsmDirSpec/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/AsmDirSpec/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr.expected b/rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr.expected index 3a039fe43fe..2091c3814d5 100644 --- a/rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr.expected +++ b/rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr.expected @@ -1 +1,9 @@ -| gen_asm_expr.rs:6:9:7:59 | AsmExpr | getNumberOfAsmPieces: | 2 | getNumberOfAttrs: | 1 | getNumberOfTemplates: | 1 | +instances +| gen_asm_expr.rs:6:9:7:59 | AsmExpr | +getAsmPiece +| gen_asm_expr.rs:6:9:7:59 | AsmExpr | 0 | gen_asm_expr.rs:7:39:7:47 | AsmOperandNamed | +| gen_asm_expr.rs:6:9:7:59 | AsmExpr | 1 | gen_asm_expr.rs:7:50:7:58 | AsmOperandNamed | +getAttr +| gen_asm_expr.rs:6:9:7:59 | AsmExpr | 0 | gen_asm_expr.rs:6:9:6:25 | Attr | +getTemplate +| gen_asm_expr.rs:6:9:7:59 | AsmExpr | 0 | gen_asm_expr.rs:7:23:7:36 | "cmp {0}, {1}" | diff --git a/rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr.ql b/rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr.ql index 1658328f7b6..11cc082dae0 100644 --- a/rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr.ql +++ b/rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr.ql @@ -2,12 +2,16 @@ import codeql.rust.elements import TestUtils -from AsmExpr x, int getNumberOfAsmPieces, int getNumberOfAttrs, int getNumberOfTemplates -where - toBeTested(x) and - not x.isUnknown() and - getNumberOfAsmPieces = x.getNumberOfAsmPieces() and - getNumberOfAttrs = x.getNumberOfAttrs() and - getNumberOfTemplates = x.getNumberOfTemplates() -select x, "getNumberOfAsmPieces:", getNumberOfAsmPieces, "getNumberOfAttrs:", getNumberOfAttrs, - "getNumberOfTemplates:", getNumberOfTemplates +query predicate instances(AsmExpr x) { toBeTested(x) and not x.isUnknown() } + +query predicate getAsmPiece(AsmExpr x, int index, AsmPiece getAsmPiece) { + toBeTested(x) and not x.isUnknown() and getAsmPiece = x.getAsmPiece(index) +} + +query predicate getAttr(AsmExpr x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} + +query predicate getTemplate(AsmExpr x, int index, Expr getTemplate) { + toBeTested(x) and not x.isUnknown() and getTemplate = x.getTemplate(index) +} diff --git a/rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr_getAsmPiece.expected b/rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr_getAsmPiece.expected deleted file mode 100644 index 449113ff8fa..00000000000 --- a/rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr_getAsmPiece.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_asm_expr.rs:6:9:7:59 | AsmExpr | 0 | gen_asm_expr.rs:7:39:7:47 | AsmOperandNamed | -| gen_asm_expr.rs:6:9:7:59 | AsmExpr | 1 | gen_asm_expr.rs:7:50:7:58 | AsmOperandNamed | diff --git a/rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr_getAsmPiece.ql b/rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr_getAsmPiece.ql deleted file mode 100644 index a29ac3d4889..00000000000 --- a/rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr_getAsmPiece.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from AsmExpr x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAsmPiece(index) diff --git a/rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr_getAttr.expected deleted file mode 100644 index 1e857299755..00000000000 --- a/rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr_getAttr.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_asm_expr.rs:6:9:7:59 | AsmExpr | 0 | gen_asm_expr.rs:6:9:6:25 | Attr | diff --git a/rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr_getAttr.ql deleted file mode 100644 index 4455caf1aa5..00000000000 --- a/rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from AsmExpr x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr_getTemplate.expected b/rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr_getTemplate.expected deleted file mode 100644 index fa3414743e9..00000000000 --- a/rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr_getTemplate.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_asm_expr.rs:6:9:7:59 | AsmExpr | 0 | gen_asm_expr.rs:7:23:7:36 | "cmp {0}, {1}" | diff --git a/rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr_getTemplate.ql b/rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr_getTemplate.ql deleted file mode 100644 index 71e98db67db..00000000000 --- a/rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr_getTemplate.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from AsmExpr x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getTemplate(index) diff --git a/rust/ql/test/extractor-tests/generated/AsmExpr/Cargo.lock b/rust/ql/test/extractor-tests/generated/AsmExpr/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/AsmExpr/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/AsmLabel/AsmLabel.expected b/rust/ql/test/extractor-tests/generated/AsmLabel/AsmLabel.expected index e77dfa46a42..cbd9eac398a 100644 --- a/rust/ql/test/extractor-tests/generated/AsmLabel/AsmLabel.expected +++ b/rust/ql/test/extractor-tests/generated/AsmLabel/AsmLabel.expected @@ -1 +1,4 @@ -| gen_asm_label.rs:10:9:10:47 | AsmLabel | hasBlockExpr: | yes | +instances +| gen_asm_label.rs:10:9:10:47 | AsmLabel | +getBlockExpr +| gen_asm_label.rs:10:9:10:47 | AsmLabel | gen_asm_label.rs:10:15:10:47 | { ... } | diff --git a/rust/ql/test/extractor-tests/generated/AsmLabel/AsmLabel.ql b/rust/ql/test/extractor-tests/generated/AsmLabel/AsmLabel.ql index fd81bc1820a..d2517cdd413 100644 --- a/rust/ql/test/extractor-tests/generated/AsmLabel/AsmLabel.ql +++ b/rust/ql/test/extractor-tests/generated/AsmLabel/AsmLabel.ql @@ -2,9 +2,8 @@ import codeql.rust.elements import TestUtils -from AsmLabel x, string hasBlockExpr -where - toBeTested(x) and - not x.isUnknown() and - if x.hasBlockExpr() then hasBlockExpr = "yes" else hasBlockExpr = "no" -select x, "hasBlockExpr:", hasBlockExpr +query predicate instances(AsmLabel x) { toBeTested(x) and not x.isUnknown() } + +query predicate getBlockExpr(AsmLabel x, BlockExpr getBlockExpr) { + toBeTested(x) and not x.isUnknown() and getBlockExpr = x.getBlockExpr() +} diff --git a/rust/ql/test/extractor-tests/generated/AsmLabel/AsmLabel_getBlockExpr.expected b/rust/ql/test/extractor-tests/generated/AsmLabel/AsmLabel_getBlockExpr.expected deleted file mode 100644 index 8f99b753a28..00000000000 --- a/rust/ql/test/extractor-tests/generated/AsmLabel/AsmLabel_getBlockExpr.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_asm_label.rs:10:9:10:47 | AsmLabel | gen_asm_label.rs:10:15:10:47 | { ... } | diff --git a/rust/ql/test/extractor-tests/generated/AsmLabel/AsmLabel_getBlockExpr.ql b/rust/ql/test/extractor-tests/generated/AsmLabel/AsmLabel_getBlockExpr.ql deleted file mode 100644 index 910efd74be1..00000000000 --- a/rust/ql/test/extractor-tests/generated/AsmLabel/AsmLabel_getBlockExpr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from AsmLabel x -where toBeTested(x) and not x.isUnknown() -select x, x.getBlockExpr() diff --git a/rust/ql/test/extractor-tests/generated/AsmLabel/Cargo.lock b/rust/ql/test/extractor-tests/generated/AsmLabel/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/AsmLabel/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/AsmOperandExpr/AsmOperandExpr.expected b/rust/ql/test/extractor-tests/generated/AsmOperandExpr/AsmOperandExpr.expected index f7101833911..262ca3ada57 100644 --- a/rust/ql/test/extractor-tests/generated/AsmOperandExpr/AsmOperandExpr.expected +++ b/rust/ql/test/extractor-tests/generated/AsmOperandExpr/AsmOperandExpr.expected @@ -1,2 +1,9 @@ -| gen_asm_operand_expr.rs:8:35:8:35 | AsmOperandExpr | hasInExpr: | yes | hasOutExpr: | yes | -| gen_asm_operand_expr.rs:8:46:8:46 | AsmOperandExpr | hasInExpr: | yes | hasOutExpr: | yes | +instances +| gen_asm_operand_expr.rs:8:35:8:35 | AsmOperandExpr | +| gen_asm_operand_expr.rs:8:46:8:46 | AsmOperandExpr | +getInExpr +| gen_asm_operand_expr.rs:8:35:8:35 | AsmOperandExpr | gen_asm_operand_expr.rs:8:35:8:35 | x | +| gen_asm_operand_expr.rs:8:46:8:46 | AsmOperandExpr | gen_asm_operand_expr.rs:8:46:8:46 | y | +getOutExpr +| gen_asm_operand_expr.rs:8:35:8:35 | AsmOperandExpr | gen_asm_operand_expr.rs:8:35:8:35 | x | +| gen_asm_operand_expr.rs:8:46:8:46 | AsmOperandExpr | gen_asm_operand_expr.rs:8:46:8:46 | y | diff --git a/rust/ql/test/extractor-tests/generated/AsmOperandExpr/AsmOperandExpr.ql b/rust/ql/test/extractor-tests/generated/AsmOperandExpr/AsmOperandExpr.ql index b7ccc0b5722..c8dda7a07e0 100644 --- a/rust/ql/test/extractor-tests/generated/AsmOperandExpr/AsmOperandExpr.ql +++ b/rust/ql/test/extractor-tests/generated/AsmOperandExpr/AsmOperandExpr.ql @@ -2,10 +2,12 @@ import codeql.rust.elements import TestUtils -from AsmOperandExpr x, string hasInExpr, string hasOutExpr -where - toBeTested(x) and - not x.isUnknown() and - (if x.hasInExpr() then hasInExpr = "yes" else hasInExpr = "no") and - if x.hasOutExpr() then hasOutExpr = "yes" else hasOutExpr = "no" -select x, "hasInExpr:", hasInExpr, "hasOutExpr:", hasOutExpr +query predicate instances(AsmOperandExpr x) { toBeTested(x) and not x.isUnknown() } + +query predicate getInExpr(AsmOperandExpr x, Expr getInExpr) { + toBeTested(x) and not x.isUnknown() and getInExpr = x.getInExpr() +} + +query predicate getOutExpr(AsmOperandExpr x, Expr getOutExpr) { + toBeTested(x) and not x.isUnknown() and getOutExpr = x.getOutExpr() +} diff --git a/rust/ql/test/extractor-tests/generated/AsmOperandExpr/AsmOperandExpr_getInExpr.expected b/rust/ql/test/extractor-tests/generated/AsmOperandExpr/AsmOperandExpr_getInExpr.expected deleted file mode 100644 index 642838b0ef3..00000000000 --- a/rust/ql/test/extractor-tests/generated/AsmOperandExpr/AsmOperandExpr_getInExpr.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_asm_operand_expr.rs:8:35:8:35 | AsmOperandExpr | gen_asm_operand_expr.rs:8:35:8:35 | x | -| gen_asm_operand_expr.rs:8:46:8:46 | AsmOperandExpr | gen_asm_operand_expr.rs:8:46:8:46 | y | diff --git a/rust/ql/test/extractor-tests/generated/AsmOperandExpr/AsmOperandExpr_getInExpr.ql b/rust/ql/test/extractor-tests/generated/AsmOperandExpr/AsmOperandExpr_getInExpr.ql deleted file mode 100644 index 95aec8cc53d..00000000000 --- a/rust/ql/test/extractor-tests/generated/AsmOperandExpr/AsmOperandExpr_getInExpr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from AsmOperandExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getInExpr() diff --git a/rust/ql/test/extractor-tests/generated/AsmOperandExpr/AsmOperandExpr_getOutExpr.expected b/rust/ql/test/extractor-tests/generated/AsmOperandExpr/AsmOperandExpr_getOutExpr.expected deleted file mode 100644 index 642838b0ef3..00000000000 --- a/rust/ql/test/extractor-tests/generated/AsmOperandExpr/AsmOperandExpr_getOutExpr.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_asm_operand_expr.rs:8:35:8:35 | AsmOperandExpr | gen_asm_operand_expr.rs:8:35:8:35 | x | -| gen_asm_operand_expr.rs:8:46:8:46 | AsmOperandExpr | gen_asm_operand_expr.rs:8:46:8:46 | y | diff --git a/rust/ql/test/extractor-tests/generated/AsmOperandExpr/AsmOperandExpr_getOutExpr.ql b/rust/ql/test/extractor-tests/generated/AsmOperandExpr/AsmOperandExpr_getOutExpr.ql deleted file mode 100644 index a137533938a..00000000000 --- a/rust/ql/test/extractor-tests/generated/AsmOperandExpr/AsmOperandExpr_getOutExpr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from AsmOperandExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getOutExpr() diff --git a/rust/ql/test/extractor-tests/generated/AsmOperandExpr/Cargo.lock b/rust/ql/test/extractor-tests/generated/AsmOperandExpr/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/AsmOperandExpr/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/AsmOperandNamed/AsmOperandNamed.expected b/rust/ql/test/extractor-tests/generated/AsmOperandNamed/AsmOperandNamed.expected index 4f8c21cb7ef..c8aec731ff8 100644 --- a/rust/ql/test/extractor-tests/generated/AsmOperandNamed/AsmOperandNamed.expected +++ b/rust/ql/test/extractor-tests/generated/AsmOperandNamed/AsmOperandNamed.expected @@ -1,2 +1,8 @@ -| gen_asm_operand_named.rs:8:34:8:43 | AsmOperandNamed | hasAsmOperand: | yes | hasName: | no | -| gen_asm_operand_named.rs:8:46:8:62 | AsmOperandNamed | hasAsmOperand: | yes | hasName: | yes | +instances +| gen_asm_operand_named.rs:8:34:8:43 | AsmOperandNamed | +| gen_asm_operand_named.rs:8:46:8:62 | AsmOperandNamed | +getAsmOperand +| gen_asm_operand_named.rs:8:34:8:43 | AsmOperandNamed | gen_asm_operand_named.rs:8:34:8:43 | AsmRegOperand | +| gen_asm_operand_named.rs:8:46:8:62 | AsmOperandNamed | gen_asm_operand_named.rs:8:54:8:62 | AsmRegOperand | +getName +| gen_asm_operand_named.rs:8:46:8:62 | AsmOperandNamed | gen_asm_operand_named.rs:8:46:8:50 | input | diff --git a/rust/ql/test/extractor-tests/generated/AsmOperandNamed/AsmOperandNamed.ql b/rust/ql/test/extractor-tests/generated/AsmOperandNamed/AsmOperandNamed.ql index 7cb204f6b9e..9c900afe42e 100644 --- a/rust/ql/test/extractor-tests/generated/AsmOperandNamed/AsmOperandNamed.ql +++ b/rust/ql/test/extractor-tests/generated/AsmOperandNamed/AsmOperandNamed.ql @@ -2,10 +2,12 @@ import codeql.rust.elements import TestUtils -from AsmOperandNamed x, string hasAsmOperand, string hasName -where - toBeTested(x) and - not x.isUnknown() and - (if x.hasAsmOperand() then hasAsmOperand = "yes" else hasAsmOperand = "no") and - if x.hasName() then hasName = "yes" else hasName = "no" -select x, "hasAsmOperand:", hasAsmOperand, "hasName:", hasName +query predicate instances(AsmOperandNamed x) { toBeTested(x) and not x.isUnknown() } + +query predicate getAsmOperand(AsmOperandNamed x, AsmOperand getAsmOperand) { + toBeTested(x) and not x.isUnknown() and getAsmOperand = x.getAsmOperand() +} + +query predicate getName(AsmOperandNamed x, Name getName) { + toBeTested(x) and not x.isUnknown() and getName = x.getName() +} diff --git a/rust/ql/test/extractor-tests/generated/AsmOperandNamed/AsmOperandNamed_getAsmOperand.expected b/rust/ql/test/extractor-tests/generated/AsmOperandNamed/AsmOperandNamed_getAsmOperand.expected deleted file mode 100644 index 8e008a44f8a..00000000000 --- a/rust/ql/test/extractor-tests/generated/AsmOperandNamed/AsmOperandNamed_getAsmOperand.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_asm_operand_named.rs:8:34:8:43 | AsmOperandNamed | gen_asm_operand_named.rs:8:34:8:43 | AsmRegOperand | -| gen_asm_operand_named.rs:8:46:8:62 | AsmOperandNamed | gen_asm_operand_named.rs:8:54:8:62 | AsmRegOperand | diff --git a/rust/ql/test/extractor-tests/generated/AsmOperandNamed/AsmOperandNamed_getAsmOperand.ql b/rust/ql/test/extractor-tests/generated/AsmOperandNamed/AsmOperandNamed_getAsmOperand.ql deleted file mode 100644 index c3cd36b2ac5..00000000000 --- a/rust/ql/test/extractor-tests/generated/AsmOperandNamed/AsmOperandNamed_getAsmOperand.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from AsmOperandNamed x -where toBeTested(x) and not x.isUnknown() -select x, x.getAsmOperand() diff --git a/rust/ql/test/extractor-tests/generated/AsmOperandNamed/AsmOperandNamed_getName.expected b/rust/ql/test/extractor-tests/generated/AsmOperandNamed/AsmOperandNamed_getName.expected deleted file mode 100644 index aad90d4b5e8..00000000000 --- a/rust/ql/test/extractor-tests/generated/AsmOperandNamed/AsmOperandNamed_getName.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_asm_operand_named.rs:8:46:8:62 | AsmOperandNamed | gen_asm_operand_named.rs:8:46:8:50 | input | diff --git a/rust/ql/test/extractor-tests/generated/AsmOperandNamed/AsmOperandNamed_getName.ql b/rust/ql/test/extractor-tests/generated/AsmOperandNamed/AsmOperandNamed_getName.ql deleted file mode 100644 index a8b856ffaa8..00000000000 --- a/rust/ql/test/extractor-tests/generated/AsmOperandNamed/AsmOperandNamed_getName.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from AsmOperandNamed x -where toBeTested(x) and not x.isUnknown() -select x, x.getName() diff --git a/rust/ql/test/extractor-tests/generated/AsmOperandNamed/Cargo.lock b/rust/ql/test/extractor-tests/generated/AsmOperandNamed/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/AsmOperandNamed/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/AsmOption/AsmOption.ql b/rust/ql/test/extractor-tests/generated/AsmOption/AsmOption.ql index c9e3997ed42..3247f52ea36 100644 --- a/rust/ql/test/extractor-tests/generated/AsmOption/AsmOption.ql +++ b/rust/ql/test/extractor-tests/generated/AsmOption/AsmOption.ql @@ -2,9 +2,9 @@ import codeql.rust.elements import TestUtils -from AsmOption x, string isRaw -where +query predicate instances(AsmOption x, string isRaw__label, string isRaw) { toBeTested(x) and not x.isUnknown() and + isRaw__label = "isRaw:" and if x.isRaw() then isRaw = "yes" else isRaw = "no" -select x, "isRaw:", isRaw +} diff --git a/rust/ql/test/extractor-tests/generated/AsmOption/Cargo.lock b/rust/ql/test/extractor-tests/generated/AsmOption/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/AsmOption/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/AsmOptionsList/AsmOptionsList.expected b/rust/ql/test/extractor-tests/generated/AsmOptionsList/AsmOptionsList.expected index 692d66164f8..cf9ec35d070 100644 --- a/rust/ql/test/extractor-tests/generated/AsmOptionsList/AsmOptionsList.expected +++ b/rust/ql/test/extractor-tests/generated/AsmOptionsList/AsmOptionsList.expected @@ -1 +1,5 @@ -| gen_asm_options_list.rs:8:14:8:36 | AsmOptionsList | getNumberOfAsmOptions: | 2 | +instances +| gen_asm_options_list.rs:8:14:8:36 | AsmOptionsList | +getAsmOption +| gen_asm_options_list.rs:8:14:8:36 | AsmOptionsList | 0 | gen_asm_options_list.rs:8:22:8:28 | AsmOption | +| gen_asm_options_list.rs:8:14:8:36 | AsmOptionsList | 1 | gen_asm_options_list.rs:8:31:8:35 | AsmOption | diff --git a/rust/ql/test/extractor-tests/generated/AsmOptionsList/AsmOptionsList.ql b/rust/ql/test/extractor-tests/generated/AsmOptionsList/AsmOptionsList.ql index 77790bb8506..a4806cce353 100644 --- a/rust/ql/test/extractor-tests/generated/AsmOptionsList/AsmOptionsList.ql +++ b/rust/ql/test/extractor-tests/generated/AsmOptionsList/AsmOptionsList.ql @@ -2,9 +2,8 @@ import codeql.rust.elements import TestUtils -from AsmOptionsList x, int getNumberOfAsmOptions -where - toBeTested(x) and - not x.isUnknown() and - getNumberOfAsmOptions = x.getNumberOfAsmOptions() -select x, "getNumberOfAsmOptions:", getNumberOfAsmOptions +query predicate instances(AsmOptionsList x) { toBeTested(x) and not x.isUnknown() } + +query predicate getAsmOption(AsmOptionsList x, int index, AsmOption getAsmOption) { + toBeTested(x) and not x.isUnknown() and getAsmOption = x.getAsmOption(index) +} diff --git a/rust/ql/test/extractor-tests/generated/AsmOptionsList/AsmOptionsList_getAsmOption.expected b/rust/ql/test/extractor-tests/generated/AsmOptionsList/AsmOptionsList_getAsmOption.expected deleted file mode 100644 index f159de9080e..00000000000 --- a/rust/ql/test/extractor-tests/generated/AsmOptionsList/AsmOptionsList_getAsmOption.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_asm_options_list.rs:8:14:8:36 | AsmOptionsList | 0 | gen_asm_options_list.rs:8:22:8:28 | AsmOption | -| gen_asm_options_list.rs:8:14:8:36 | AsmOptionsList | 1 | gen_asm_options_list.rs:8:31:8:35 | AsmOption | diff --git a/rust/ql/test/extractor-tests/generated/AsmOptionsList/AsmOptionsList_getAsmOption.ql b/rust/ql/test/extractor-tests/generated/AsmOptionsList/AsmOptionsList_getAsmOption.ql deleted file mode 100644 index 06f2ba54b6e..00000000000 --- a/rust/ql/test/extractor-tests/generated/AsmOptionsList/AsmOptionsList_getAsmOption.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from AsmOptionsList x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAsmOption(index) diff --git a/rust/ql/test/extractor-tests/generated/AsmOptionsList/Cargo.lock b/rust/ql/test/extractor-tests/generated/AsmOptionsList/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/AsmOptionsList/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/AsmRegOperand/AsmRegOperand.expected b/rust/ql/test/extractor-tests/generated/AsmRegOperand/AsmRegOperand.expected index c9eca662143..a141f1a25c2 100644 --- a/rust/ql/test/extractor-tests/generated/AsmRegOperand/AsmRegOperand.expected +++ b/rust/ql/test/extractor-tests/generated/AsmRegOperand/AsmRegOperand.expected @@ -1,2 +1,12 @@ -| gen_asm_reg_operand.rs:8:26:8:35 | AsmRegOperand | hasAsmDirSpec: | yes | hasAsmOperandExpr: | yes | hasAsmRegSpec: | yes | -| gen_asm_reg_operand.rs:8:38:8:46 | AsmRegOperand | hasAsmDirSpec: | yes | hasAsmOperandExpr: | yes | hasAsmRegSpec: | yes | +instances +| gen_asm_reg_operand.rs:8:26:8:35 | AsmRegOperand | +| gen_asm_reg_operand.rs:8:38:8:46 | AsmRegOperand | +getAsmDirSpec +| gen_asm_reg_operand.rs:8:26:8:35 | AsmRegOperand | gen_asm_reg_operand.rs:8:26:8:28 | AsmDirSpec | +| gen_asm_reg_operand.rs:8:38:8:46 | AsmRegOperand | gen_asm_reg_operand.rs:8:38:8:39 | AsmDirSpec | +getAsmOperandExpr +| gen_asm_reg_operand.rs:8:26:8:35 | AsmRegOperand | gen_asm_reg_operand.rs:8:35:8:35 | AsmOperandExpr | +| gen_asm_reg_operand.rs:8:38:8:46 | AsmRegOperand | gen_asm_reg_operand.rs:8:46:8:46 | AsmOperandExpr | +getAsmRegSpec +| gen_asm_reg_operand.rs:8:26:8:35 | AsmRegOperand | gen_asm_reg_operand.rs:8:30:8:32 | AsmRegSpec | +| gen_asm_reg_operand.rs:8:38:8:46 | AsmRegOperand | gen_asm_reg_operand.rs:8:41:8:43 | AsmRegSpec | diff --git a/rust/ql/test/extractor-tests/generated/AsmRegOperand/AsmRegOperand.ql b/rust/ql/test/extractor-tests/generated/AsmRegOperand/AsmRegOperand.ql index 05685f3d994..ae7a9bb84f1 100644 --- a/rust/ql/test/extractor-tests/generated/AsmRegOperand/AsmRegOperand.ql +++ b/rust/ql/test/extractor-tests/generated/AsmRegOperand/AsmRegOperand.ql @@ -2,12 +2,16 @@ import codeql.rust.elements import TestUtils -from AsmRegOperand x, string hasAsmDirSpec, string hasAsmOperandExpr, string hasAsmRegSpec -where - toBeTested(x) and - not x.isUnknown() and - (if x.hasAsmDirSpec() then hasAsmDirSpec = "yes" else hasAsmDirSpec = "no") and - (if x.hasAsmOperandExpr() then hasAsmOperandExpr = "yes" else hasAsmOperandExpr = "no") and - if x.hasAsmRegSpec() then hasAsmRegSpec = "yes" else hasAsmRegSpec = "no" -select x, "hasAsmDirSpec:", hasAsmDirSpec, "hasAsmOperandExpr:", hasAsmOperandExpr, - "hasAsmRegSpec:", hasAsmRegSpec +query predicate instances(AsmRegOperand x) { toBeTested(x) and not x.isUnknown() } + +query predicate getAsmDirSpec(AsmRegOperand x, AsmDirSpec getAsmDirSpec) { + toBeTested(x) and not x.isUnknown() and getAsmDirSpec = x.getAsmDirSpec() +} + +query predicate getAsmOperandExpr(AsmRegOperand x, AsmOperandExpr getAsmOperandExpr) { + toBeTested(x) and not x.isUnknown() and getAsmOperandExpr = x.getAsmOperandExpr() +} + +query predicate getAsmRegSpec(AsmRegOperand x, AsmRegSpec getAsmRegSpec) { + toBeTested(x) and not x.isUnknown() and getAsmRegSpec = x.getAsmRegSpec() +} diff --git a/rust/ql/test/extractor-tests/generated/AsmRegOperand/AsmRegOperand_getAsmDirSpec.expected b/rust/ql/test/extractor-tests/generated/AsmRegOperand/AsmRegOperand_getAsmDirSpec.expected deleted file mode 100644 index e47c650ada0..00000000000 --- a/rust/ql/test/extractor-tests/generated/AsmRegOperand/AsmRegOperand_getAsmDirSpec.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_asm_reg_operand.rs:8:26:8:35 | AsmRegOperand | gen_asm_reg_operand.rs:8:26:8:28 | AsmDirSpec | -| gen_asm_reg_operand.rs:8:38:8:46 | AsmRegOperand | gen_asm_reg_operand.rs:8:38:8:39 | AsmDirSpec | diff --git a/rust/ql/test/extractor-tests/generated/AsmRegOperand/AsmRegOperand_getAsmDirSpec.ql b/rust/ql/test/extractor-tests/generated/AsmRegOperand/AsmRegOperand_getAsmDirSpec.ql deleted file mode 100644 index 5542617aea6..00000000000 --- a/rust/ql/test/extractor-tests/generated/AsmRegOperand/AsmRegOperand_getAsmDirSpec.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from AsmRegOperand x -where toBeTested(x) and not x.isUnknown() -select x, x.getAsmDirSpec() diff --git a/rust/ql/test/extractor-tests/generated/AsmRegOperand/AsmRegOperand_getAsmOperandExpr.expected b/rust/ql/test/extractor-tests/generated/AsmRegOperand/AsmRegOperand_getAsmOperandExpr.expected deleted file mode 100644 index c43a8ca1443..00000000000 --- a/rust/ql/test/extractor-tests/generated/AsmRegOperand/AsmRegOperand_getAsmOperandExpr.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_asm_reg_operand.rs:8:26:8:35 | AsmRegOperand | gen_asm_reg_operand.rs:8:35:8:35 | AsmOperandExpr | -| gen_asm_reg_operand.rs:8:38:8:46 | AsmRegOperand | gen_asm_reg_operand.rs:8:46:8:46 | AsmOperandExpr | diff --git a/rust/ql/test/extractor-tests/generated/AsmRegOperand/AsmRegOperand_getAsmOperandExpr.ql b/rust/ql/test/extractor-tests/generated/AsmRegOperand/AsmRegOperand_getAsmOperandExpr.ql deleted file mode 100644 index bcda631ef9d..00000000000 --- a/rust/ql/test/extractor-tests/generated/AsmRegOperand/AsmRegOperand_getAsmOperandExpr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from AsmRegOperand x -where toBeTested(x) and not x.isUnknown() -select x, x.getAsmOperandExpr() diff --git a/rust/ql/test/extractor-tests/generated/AsmRegOperand/AsmRegOperand_getAsmRegSpec.expected b/rust/ql/test/extractor-tests/generated/AsmRegOperand/AsmRegOperand_getAsmRegSpec.expected deleted file mode 100644 index b1da1a4d1d4..00000000000 --- a/rust/ql/test/extractor-tests/generated/AsmRegOperand/AsmRegOperand_getAsmRegSpec.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_asm_reg_operand.rs:8:26:8:35 | AsmRegOperand | gen_asm_reg_operand.rs:8:30:8:32 | AsmRegSpec | -| gen_asm_reg_operand.rs:8:38:8:46 | AsmRegOperand | gen_asm_reg_operand.rs:8:41:8:43 | AsmRegSpec | diff --git a/rust/ql/test/extractor-tests/generated/AsmRegOperand/AsmRegOperand_getAsmRegSpec.ql b/rust/ql/test/extractor-tests/generated/AsmRegOperand/AsmRegOperand_getAsmRegSpec.ql deleted file mode 100644 index aaf03f13212..00000000000 --- a/rust/ql/test/extractor-tests/generated/AsmRegOperand/AsmRegOperand_getAsmRegSpec.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from AsmRegOperand x -where toBeTested(x) and not x.isUnknown() -select x, x.getAsmRegSpec() diff --git a/rust/ql/test/extractor-tests/generated/AsmRegOperand/Cargo.lock b/rust/ql/test/extractor-tests/generated/AsmRegOperand/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/AsmRegOperand/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/AsmRegSpec/AsmRegSpec.expected b/rust/ql/test/extractor-tests/generated/AsmRegSpec/AsmRegSpec.expected index 0ecd2dfbdf8..120ba8d2093 100644 --- a/rust/ql/test/extractor-tests/generated/AsmRegSpec/AsmRegSpec.expected +++ b/rust/ql/test/extractor-tests/generated/AsmRegSpec/AsmRegSpec.expected @@ -1,2 +1,5 @@ -| gen_asm_reg_spec.rs:8:30:8:34 | AsmRegSpec | hasIdentifier: | no | -| gen_asm_reg_spec.rs:8:43:8:45 | AsmRegSpec | hasIdentifier: | yes | +instances +| gen_asm_reg_spec.rs:8:30:8:34 | AsmRegSpec | +| gen_asm_reg_spec.rs:8:43:8:45 | AsmRegSpec | +getIdentifier +| gen_asm_reg_spec.rs:8:43:8:45 | AsmRegSpec | gen_asm_reg_spec.rs:8:43:8:45 | EBX | diff --git a/rust/ql/test/extractor-tests/generated/AsmRegSpec/AsmRegSpec.ql b/rust/ql/test/extractor-tests/generated/AsmRegSpec/AsmRegSpec.ql index 5fce70e50f9..a84d2843da2 100644 --- a/rust/ql/test/extractor-tests/generated/AsmRegSpec/AsmRegSpec.ql +++ b/rust/ql/test/extractor-tests/generated/AsmRegSpec/AsmRegSpec.ql @@ -2,9 +2,8 @@ import codeql.rust.elements import TestUtils -from AsmRegSpec x, string hasIdentifier -where - toBeTested(x) and - not x.isUnknown() and - if x.hasIdentifier() then hasIdentifier = "yes" else hasIdentifier = "no" -select x, "hasIdentifier:", hasIdentifier +query predicate instances(AsmRegSpec x) { toBeTested(x) and not x.isUnknown() } + +query predicate getIdentifier(AsmRegSpec x, NameRef getIdentifier) { + toBeTested(x) and not x.isUnknown() and getIdentifier = x.getIdentifier() +} diff --git a/rust/ql/test/extractor-tests/generated/AsmRegSpec/AsmRegSpec_getIdentifier.expected b/rust/ql/test/extractor-tests/generated/AsmRegSpec/AsmRegSpec_getIdentifier.expected deleted file mode 100644 index d40d67cb6a7..00000000000 --- a/rust/ql/test/extractor-tests/generated/AsmRegSpec/AsmRegSpec_getIdentifier.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_asm_reg_spec.rs:8:43:8:45 | AsmRegSpec | gen_asm_reg_spec.rs:8:43:8:45 | EBX | diff --git a/rust/ql/test/extractor-tests/generated/AsmRegSpec/AsmRegSpec_getIdentifier.ql b/rust/ql/test/extractor-tests/generated/AsmRegSpec/AsmRegSpec_getIdentifier.ql deleted file mode 100644 index 3fe54bd3697..00000000000 --- a/rust/ql/test/extractor-tests/generated/AsmRegSpec/AsmRegSpec_getIdentifier.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from AsmRegSpec x -where toBeTested(x) and not x.isUnknown() -select x, x.getIdentifier() diff --git a/rust/ql/test/extractor-tests/generated/AsmRegSpec/Cargo.lock b/rust/ql/test/extractor-tests/generated/AsmRegSpec/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/AsmRegSpec/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/AsmSym/AsmSym.expected b/rust/ql/test/extractor-tests/generated/AsmSym/AsmSym.expected index 664c70d06ba..e3f8fbc9ec7 100644 --- a/rust/ql/test/extractor-tests/generated/AsmSym/AsmSym.expected +++ b/rust/ql/test/extractor-tests/generated/AsmSym/AsmSym.expected @@ -1 +1,4 @@ -| gen_asm_sym.rs:8:30:8:44 | AsmSym | hasPath: | yes | +instances +| gen_asm_sym.rs:8:30:8:44 | AsmSym | +getPath +| gen_asm_sym.rs:8:30:8:44 | AsmSym | gen_asm_sym.rs:8:34:8:44 | my_function | diff --git a/rust/ql/test/extractor-tests/generated/AsmSym/AsmSym.ql b/rust/ql/test/extractor-tests/generated/AsmSym/AsmSym.ql index e7841f07f68..d105903ad16 100644 --- a/rust/ql/test/extractor-tests/generated/AsmSym/AsmSym.ql +++ b/rust/ql/test/extractor-tests/generated/AsmSym/AsmSym.ql @@ -2,9 +2,8 @@ import codeql.rust.elements import TestUtils -from AsmSym x, string hasPath -where - toBeTested(x) and - not x.isUnknown() and - if x.hasPath() then hasPath = "yes" else hasPath = "no" -select x, "hasPath:", hasPath +query predicate instances(AsmSym x) { toBeTested(x) and not x.isUnknown() } + +query predicate getPath(AsmSym x, Path getPath) { + toBeTested(x) and not x.isUnknown() and getPath = x.getPath() +} diff --git a/rust/ql/test/extractor-tests/generated/AsmSym/AsmSym_getPath.expected b/rust/ql/test/extractor-tests/generated/AsmSym/AsmSym_getPath.expected deleted file mode 100644 index 0bcf012c475..00000000000 --- a/rust/ql/test/extractor-tests/generated/AsmSym/AsmSym_getPath.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_asm_sym.rs:8:30:8:44 | AsmSym | gen_asm_sym.rs:8:34:8:44 | my_function | diff --git a/rust/ql/test/extractor-tests/generated/AsmSym/AsmSym_getPath.ql b/rust/ql/test/extractor-tests/generated/AsmSym/AsmSym_getPath.ql deleted file mode 100644 index b753181e728..00000000000 --- a/rust/ql/test/extractor-tests/generated/AsmSym/AsmSym_getPath.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from AsmSym x -where toBeTested(x) and not x.isUnknown() -select x, x.getPath() diff --git a/rust/ql/test/extractor-tests/generated/AsmSym/Cargo.lock b/rust/ql/test/extractor-tests/generated/AsmSym/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/AsmSym/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg.expected b/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg.expected index 2c62ef6594b..83bfd832501 100644 --- a/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg.expected +++ b/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg.expected @@ -1 +1,12 @@ -| gen_assoc_type_arg.rs:9:21:9:31 | AssocTypeArg | hasConstArg: | no | hasGenericArgList: | no | hasIdentifier: | yes | hasParamList: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTypeRepr: | no | hasTypeBoundList: | yes | +instances +| gen_assoc_type_arg.rs:9:21:9:31 | AssocTypeArg | +getConstArg +getGenericArgList +getIdentifier +| gen_assoc_type_arg.rs:9:21:9:31 | AssocTypeArg | gen_assoc_type_arg.rs:9:21:9:24 | Item | +getParamList +getRetType +getReturnTypeSyntax +getTypeRepr +getTypeBoundList +| gen_assoc_type_arg.rs:9:21:9:31 | AssocTypeArg | gen_assoc_type_arg.rs:9:27:9:31 | TypeBoundList | diff --git a/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg.ql b/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg.ql index 52095924f85..1117c934180 100644 --- a/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg.ql +++ b/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg.ql @@ -2,21 +2,36 @@ import codeql.rust.elements import TestUtils -from - AssocTypeArg x, string hasConstArg, string hasGenericArgList, string hasIdentifier, - string hasParamList, string hasRetType, string hasReturnTypeSyntax, string hasTypeRepr, - string hasTypeBoundList -where - toBeTested(x) and - not x.isUnknown() and - (if x.hasConstArg() then hasConstArg = "yes" else hasConstArg = "no") and - (if x.hasGenericArgList() then hasGenericArgList = "yes" else hasGenericArgList = "no") and - (if x.hasIdentifier() then hasIdentifier = "yes" else hasIdentifier = "no") and - (if x.hasParamList() then hasParamList = "yes" else hasParamList = "no") and - (if x.hasRetType() then hasRetType = "yes" else hasRetType = "no") and - (if x.hasReturnTypeSyntax() then hasReturnTypeSyntax = "yes" else hasReturnTypeSyntax = "no") and - (if x.hasTypeRepr() then hasTypeRepr = "yes" else hasTypeRepr = "no") and - if x.hasTypeBoundList() then hasTypeBoundList = "yes" else hasTypeBoundList = "no" -select x, "hasConstArg:", hasConstArg, "hasGenericArgList:", hasGenericArgList, "hasIdentifier:", - hasIdentifier, "hasParamList:", hasParamList, "hasRetType:", hasRetType, "hasReturnTypeSyntax:", - hasReturnTypeSyntax, "hasTypeRepr:", hasTypeRepr, "hasTypeBoundList:", hasTypeBoundList +query predicate instances(AssocTypeArg x) { toBeTested(x) and not x.isUnknown() } + +query predicate getConstArg(AssocTypeArg x, ConstArg getConstArg) { + toBeTested(x) and not x.isUnknown() and getConstArg = x.getConstArg() +} + +query predicate getGenericArgList(AssocTypeArg x, GenericArgList getGenericArgList) { + toBeTested(x) and not x.isUnknown() and getGenericArgList = x.getGenericArgList() +} + +query predicate getIdentifier(AssocTypeArg x, NameRef getIdentifier) { + toBeTested(x) and not x.isUnknown() and getIdentifier = x.getIdentifier() +} + +query predicate getParamList(AssocTypeArg x, ParamList getParamList) { + toBeTested(x) and not x.isUnknown() and getParamList = x.getParamList() +} + +query predicate getRetType(AssocTypeArg x, RetTypeRepr getRetType) { + toBeTested(x) and not x.isUnknown() and getRetType = x.getRetType() +} + +query predicate getReturnTypeSyntax(AssocTypeArg x, ReturnTypeSyntax getReturnTypeSyntax) { + toBeTested(x) and not x.isUnknown() and getReturnTypeSyntax = x.getReturnTypeSyntax() +} + +query predicate getTypeRepr(AssocTypeArg x, TypeRepr getTypeRepr) { + toBeTested(x) and not x.isUnknown() and getTypeRepr = x.getTypeRepr() +} + +query predicate getTypeBoundList(AssocTypeArg x, TypeBoundList getTypeBoundList) { + toBeTested(x) and not x.isUnknown() and getTypeBoundList = x.getTypeBoundList() +} diff --git a/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getConstArg.expected b/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getConstArg.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getConstArg.ql b/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getConstArg.ql deleted file mode 100644 index 6619858dfe3..00000000000 --- a/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getConstArg.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from AssocTypeArg x -where toBeTested(x) and not x.isUnknown() -select x, x.getConstArg() diff --git a/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getGenericArgList.expected b/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getGenericArgList.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getGenericArgList.ql b/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getGenericArgList.ql deleted file mode 100644 index 09c1924f693..00000000000 --- a/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getGenericArgList.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from AssocTypeArg x -where toBeTested(x) and not x.isUnknown() -select x, x.getGenericArgList() diff --git a/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getIdentifier.expected b/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getIdentifier.expected deleted file mode 100644 index 901ebce3a55..00000000000 --- a/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getIdentifier.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_assoc_type_arg.rs:9:21:9:31 | AssocTypeArg | gen_assoc_type_arg.rs:9:21:9:24 | Item | diff --git a/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getIdentifier.ql b/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getIdentifier.ql deleted file mode 100644 index ce4016622d4..00000000000 --- a/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getIdentifier.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from AssocTypeArg x -where toBeTested(x) and not x.isUnknown() -select x, x.getIdentifier() diff --git a/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getParamList.expected b/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getParamList.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getParamList.ql b/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getParamList.ql deleted file mode 100644 index e745669c52d..00000000000 --- a/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getParamList.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from AssocTypeArg x -where toBeTested(x) and not x.isUnknown() -select x, x.getParamList() diff --git a/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getRetType.expected b/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getRetType.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getRetType.ql b/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getRetType.ql deleted file mode 100644 index 413b05df0d4..00000000000 --- a/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getRetType.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from AssocTypeArg x -where toBeTested(x) and not x.isUnknown() -select x, x.getRetType() diff --git a/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getReturnTypeSyntax.expected b/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getReturnTypeSyntax.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getReturnTypeSyntax.ql b/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getReturnTypeSyntax.ql deleted file mode 100644 index f3929edba7e..00000000000 --- a/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getReturnTypeSyntax.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from AssocTypeArg x -where toBeTested(x) and not x.isUnknown() -select x, x.getReturnTypeSyntax() diff --git a/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getTypeBoundList.expected b/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getTypeBoundList.expected deleted file mode 100644 index b6c9b7e740d..00000000000 --- a/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getTypeBoundList.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_assoc_type_arg.rs:9:21:9:31 | AssocTypeArg | gen_assoc_type_arg.rs:9:27:9:31 | TypeBoundList | diff --git a/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getTypeBoundList.ql b/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getTypeBoundList.ql deleted file mode 100644 index e798c8bbaa4..00000000000 --- a/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getTypeBoundList.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from AssocTypeArg x -where toBeTested(x) and not x.isUnknown() -select x, x.getTypeBoundList() diff --git a/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getTypeRepr.expected b/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getTypeRepr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getTypeRepr.ql b/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getTypeRepr.ql deleted file mode 100644 index 0e4d81812ed..00000000000 --- a/rust/ql/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getTypeRepr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from AssocTypeArg x -where toBeTested(x) and not x.isUnknown() -select x, x.getTypeRepr() diff --git a/rust/ql/test/extractor-tests/generated/AssocTypeArg/Cargo.lock b/rust/ql/test/extractor-tests/generated/AssocTypeArg/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/AssocTypeArg/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/Attr/Attr.expected b/rust/ql/test/extractor-tests/generated/Attr/Attr.expected index e0c63af7678..1272453173d 100644 --- a/rust/ql/test/extractor-tests/generated/Attr/Attr.expected +++ b/rust/ql/test/extractor-tests/generated/Attr/Attr.expected @@ -1 +1,4 @@ -| gen_attr.rs:7:5:7:20 | Attr | hasMeta: | yes | +instances +| gen_attr.rs:7:5:7:20 | Attr | +getMeta +| gen_attr.rs:7:5:7:20 | Attr | gen_attr.rs:7:7:7:19 | Meta | diff --git a/rust/ql/test/extractor-tests/generated/Attr/Attr.ql b/rust/ql/test/extractor-tests/generated/Attr/Attr.ql index b80d3089be9..4f717cc7f4d 100644 --- a/rust/ql/test/extractor-tests/generated/Attr/Attr.ql +++ b/rust/ql/test/extractor-tests/generated/Attr/Attr.ql @@ -2,9 +2,8 @@ import codeql.rust.elements import TestUtils -from Attr x, string hasMeta -where - toBeTested(x) and - not x.isUnknown() and - if x.hasMeta() then hasMeta = "yes" else hasMeta = "no" -select x, "hasMeta:", hasMeta +query predicate instances(Attr x) { toBeTested(x) and not x.isUnknown() } + +query predicate getMeta(Attr x, Meta getMeta) { + toBeTested(x) and not x.isUnknown() and getMeta = x.getMeta() +} diff --git a/rust/ql/test/extractor-tests/generated/Attr/Attr_getMeta.expected b/rust/ql/test/extractor-tests/generated/Attr/Attr_getMeta.expected deleted file mode 100644 index 8b7c87927b2..00000000000 --- a/rust/ql/test/extractor-tests/generated/Attr/Attr_getMeta.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_attr.rs:7:5:7:20 | Attr | gen_attr.rs:7:7:7:19 | Meta | diff --git a/rust/ql/test/extractor-tests/generated/Attr/Attr_getMeta.ql b/rust/ql/test/extractor-tests/generated/Attr/Attr_getMeta.ql deleted file mode 100644 index dd4ed7f56ef..00000000000 --- a/rust/ql/test/extractor-tests/generated/Attr/Attr_getMeta.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Attr x -where toBeTested(x) and not x.isUnknown() -select x, x.getMeta() diff --git a/rust/ql/test/extractor-tests/generated/Attr/Cargo.lock b/rust/ql/test/extractor-tests/generated/Attr/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Attr/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr.expected b/rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr.expected index 9104ba77e5f..1135e3b3e45 100644 --- a/rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr.expected +++ b/rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr.expected @@ -1 +1,5 @@ -| gen_await_expr.rs:6:17:6:27 | await ... | getNumberOfAttrs: | 0 | hasExpr: | yes | +instances +| gen_await_expr.rs:6:17:6:27 | await ... | +getAttr +getExpr +| gen_await_expr.rs:6:17:6:27 | await ... | gen_await_expr.rs:6:17:6:21 | foo(...) | diff --git a/rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr.ql b/rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr.ql index f78d81a3ec4..d98d833c951 100644 --- a/rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr.ql +++ b/rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr.ql @@ -2,10 +2,12 @@ import codeql.rust.elements import TestUtils -from AwaitExpr x, int getNumberOfAttrs, string hasExpr -where - toBeTested(x) and - not x.isUnknown() and - getNumberOfAttrs = x.getNumberOfAttrs() and - if x.hasExpr() then hasExpr = "yes" else hasExpr = "no" -select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasExpr:", hasExpr +query predicate instances(AwaitExpr x) { toBeTested(x) and not x.isUnknown() } + +query predicate getAttr(AwaitExpr x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} + +query predicate getExpr(AwaitExpr x, Expr getExpr) { + toBeTested(x) and not x.isUnknown() and getExpr = x.getExpr() +} diff --git a/rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr_getAttr.ql deleted file mode 100644 index 9ac930312b5..00000000000 --- a/rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from AwaitExpr x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr_getExpr.expected b/rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr_getExpr.expected deleted file mode 100644 index a1ea7809bb0..00000000000 --- a/rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr_getExpr.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_await_expr.rs:6:17:6:27 | await ... | gen_await_expr.rs:6:17:6:21 | foo(...) | diff --git a/rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr_getExpr.ql b/rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr_getExpr.ql deleted file mode 100644 index 45e9d40ec73..00000000000 --- a/rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr_getExpr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from AwaitExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getExpr() diff --git a/rust/ql/test/extractor-tests/generated/AwaitExpr/Cargo.lock b/rust/ql/test/extractor-tests/generated/AwaitExpr/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/AwaitExpr/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr.expected b/rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr.expected index ce3e6a09690..2ec05480e36 100644 --- a/rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr.expected +++ b/rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr.expected @@ -1 +1,5 @@ -| gen_become_expr.rs:8:10:8:36 | become ... | getNumberOfAttrs: | 0 | hasExpr: | yes | +instances +| gen_become_expr.rs:8:10:8:36 | become ... | +getAttr +getExpr +| gen_become_expr.rs:8:10:8:36 | become ... | gen_become_expr.rs:8:17:8:36 | fact_a(...) | diff --git a/rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr.ql b/rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr.ql index e297230419c..d8b5775da70 100644 --- a/rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr.ql +++ b/rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr.ql @@ -2,10 +2,12 @@ import codeql.rust.elements import TestUtils -from BecomeExpr x, int getNumberOfAttrs, string hasExpr -where - toBeTested(x) and - not x.isUnknown() and - getNumberOfAttrs = x.getNumberOfAttrs() and - if x.hasExpr() then hasExpr = "yes" else hasExpr = "no" -select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasExpr:", hasExpr +query predicate instances(BecomeExpr x) { toBeTested(x) and not x.isUnknown() } + +query predicate getAttr(BecomeExpr x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} + +query predicate getExpr(BecomeExpr x, Expr getExpr) { + toBeTested(x) and not x.isUnknown() and getExpr = x.getExpr() +} diff --git a/rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr_getAttr.ql deleted file mode 100644 index aac3e259a32..00000000000 --- a/rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from BecomeExpr x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr_getExpr.expected b/rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr_getExpr.expected deleted file mode 100644 index d0cb86a0303..00000000000 --- a/rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr_getExpr.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_become_expr.rs:8:10:8:36 | become ... | gen_become_expr.rs:8:17:8:36 | fact_a(...) | diff --git a/rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr_getExpr.ql b/rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr_getExpr.ql deleted file mode 100644 index 697178d5e48..00000000000 --- a/rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr_getExpr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from BecomeExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getExpr() diff --git a/rust/ql/test/extractor-tests/generated/BecomeExpr/Cargo.lock b/rust/ql/test/extractor-tests/generated/BecomeExpr/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BecomeExpr/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr.expected b/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr.expected index 2f7a47933b1..f1b99f24258 100644 --- a/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr.expected +++ b/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr.expected @@ -1,5 +1,25 @@ -| gen_binary_expr.rs:5:5:5:9 | ... + ... | getNumberOfAttrs: | 0 | hasLhs: | yes | hasOperatorName: | yes | hasRhs: | yes | -| gen_binary_expr.rs:6:5:6:10 | ... && ... | getNumberOfAttrs: | 0 | hasLhs: | yes | hasOperatorName: | yes | hasRhs: | yes | -| gen_binary_expr.rs:7:5:7:10 | ... <= ... | getNumberOfAttrs: | 0 | hasLhs: | yes | hasOperatorName: | yes | hasRhs: | yes | -| gen_binary_expr.rs:8:5:8:9 | ... = ... | getNumberOfAttrs: | 0 | hasLhs: | yes | hasOperatorName: | yes | hasRhs: | yes | -| gen_binary_expr.rs:9:5:9:10 | ... += ... | getNumberOfAttrs: | 0 | hasLhs: | yes | hasOperatorName: | yes | hasRhs: | yes | +instances +| gen_binary_expr.rs:5:5:5:9 | ... + ... | +| gen_binary_expr.rs:6:5:6:10 | ... && ... | +| gen_binary_expr.rs:7:5:7:10 | ... <= ... | +| gen_binary_expr.rs:8:5:8:9 | ... = ... | +| gen_binary_expr.rs:9:5:9:10 | ... += ... | +getAttr +getLhs +| gen_binary_expr.rs:5:5:5:9 | ... + ... | gen_binary_expr.rs:5:5:5:5 | x | +| gen_binary_expr.rs:6:5:6:10 | ... && ... | gen_binary_expr.rs:6:5:6:5 | x | +| gen_binary_expr.rs:7:5:7:10 | ... <= ... | gen_binary_expr.rs:7:5:7:5 | x | +| gen_binary_expr.rs:8:5:8:9 | ... = ... | gen_binary_expr.rs:8:5:8:5 | x | +| gen_binary_expr.rs:9:5:9:10 | ... += ... | gen_binary_expr.rs:9:5:9:5 | x | +getOperatorName +| gen_binary_expr.rs:5:5:5:9 | ... + ... | + | +| gen_binary_expr.rs:6:5:6:10 | ... && ... | && | +| gen_binary_expr.rs:7:5:7:10 | ... <= ... | <= | +| gen_binary_expr.rs:8:5:8:9 | ... = ... | = | +| gen_binary_expr.rs:9:5:9:10 | ... += ... | += | +getRhs +| gen_binary_expr.rs:5:5:5:9 | ... + ... | gen_binary_expr.rs:5:9:5:9 | y | +| gen_binary_expr.rs:6:5:6:10 | ... && ... | gen_binary_expr.rs:6:10:6:10 | y | +| gen_binary_expr.rs:7:5:7:10 | ... <= ... | gen_binary_expr.rs:7:10:7:10 | y | +| gen_binary_expr.rs:8:5:8:9 | ... = ... | gen_binary_expr.rs:8:9:8:9 | y | +| gen_binary_expr.rs:9:5:9:10 | ... += ... | gen_binary_expr.rs:9:10:9:10 | y | diff --git a/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr.ql b/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr.ql index 87c00d18e3e..6b5bf4ba206 100644 --- a/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr.ql +++ b/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr.ql @@ -2,13 +2,20 @@ import codeql.rust.elements import TestUtils -from BinaryExpr x, int getNumberOfAttrs, string hasLhs, string hasOperatorName, string hasRhs -where - toBeTested(x) and - not x.isUnknown() and - getNumberOfAttrs = x.getNumberOfAttrs() and - (if x.hasLhs() then hasLhs = "yes" else hasLhs = "no") and - (if x.hasOperatorName() then hasOperatorName = "yes" else hasOperatorName = "no") and - if x.hasRhs() then hasRhs = "yes" else hasRhs = "no" -select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasLhs:", hasLhs, "hasOperatorName:", - hasOperatorName, "hasRhs:", hasRhs +query predicate instances(BinaryExpr x) { toBeTested(x) and not x.isUnknown() } + +query predicate getAttr(BinaryExpr x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} + +query predicate getLhs(BinaryExpr x, Expr getLhs) { + toBeTested(x) and not x.isUnknown() and getLhs = x.getLhs() +} + +query predicate getOperatorName(BinaryExpr x, string getOperatorName) { + toBeTested(x) and not x.isUnknown() and getOperatorName = x.getOperatorName() +} + +query predicate getRhs(BinaryExpr x, Expr getRhs) { + toBeTested(x) and not x.isUnknown() and getRhs = x.getRhs() +} diff --git a/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getAttr.ql deleted file mode 100644 index 0d4503c82bd..00000000000 --- a/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from BinaryExpr x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getLhs.expected b/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getLhs.expected deleted file mode 100644 index 9321ce0724a..00000000000 --- a/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getLhs.expected +++ /dev/null @@ -1,5 +0,0 @@ -| gen_binary_expr.rs:5:5:5:9 | ... + ... | gen_binary_expr.rs:5:5:5:5 | x | -| gen_binary_expr.rs:6:5:6:10 | ... && ... | gen_binary_expr.rs:6:5:6:5 | x | -| gen_binary_expr.rs:7:5:7:10 | ... <= ... | gen_binary_expr.rs:7:5:7:5 | x | -| gen_binary_expr.rs:8:5:8:9 | ... = ... | gen_binary_expr.rs:8:5:8:5 | x | -| gen_binary_expr.rs:9:5:9:10 | ... += ... | gen_binary_expr.rs:9:5:9:5 | x | diff --git a/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getLhs.ql b/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getLhs.ql deleted file mode 100644 index a8b21f01495..00000000000 --- a/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getLhs.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from BinaryExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getLhs() diff --git a/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getOperatorName.expected b/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getOperatorName.expected deleted file mode 100644 index e55ca0c63a0..00000000000 --- a/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getOperatorName.expected +++ /dev/null @@ -1,5 +0,0 @@ -| gen_binary_expr.rs:5:5:5:9 | ... + ... | + | -| gen_binary_expr.rs:6:5:6:10 | ... && ... | && | -| gen_binary_expr.rs:7:5:7:10 | ... <= ... | <= | -| gen_binary_expr.rs:8:5:8:9 | ... = ... | = | -| gen_binary_expr.rs:9:5:9:10 | ... += ... | += | diff --git a/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getOperatorName.ql b/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getOperatorName.ql deleted file mode 100644 index 05da704202d..00000000000 --- a/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getOperatorName.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from BinaryExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getOperatorName() diff --git a/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getRhs.expected b/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getRhs.expected deleted file mode 100644 index 9bd36da5fa6..00000000000 --- a/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getRhs.expected +++ /dev/null @@ -1,5 +0,0 @@ -| gen_binary_expr.rs:5:5:5:9 | ... + ... | gen_binary_expr.rs:5:9:5:9 | y | -| gen_binary_expr.rs:6:5:6:10 | ... && ... | gen_binary_expr.rs:6:10:6:10 | y | -| gen_binary_expr.rs:7:5:7:10 | ... <= ... | gen_binary_expr.rs:7:10:7:10 | y | -| gen_binary_expr.rs:8:5:8:9 | ... = ... | gen_binary_expr.rs:8:9:8:9 | y | -| gen_binary_expr.rs:9:5:9:10 | ... += ... | gen_binary_expr.rs:9:10:9:10 | y | diff --git a/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getRhs.ql b/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getRhs.ql deleted file mode 100644 index 8c491b7f575..00000000000 --- a/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getRhs.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from BinaryExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getRhs() diff --git a/rust/ql/test/extractor-tests/generated/BinaryExpr/Cargo.lock b/rust/ql/test/extractor-tests/generated/BinaryExpr/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BinaryExpr/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr.expected b/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr.expected index b6be24d0bb7..0423524834b 100644 --- a/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr.expected +++ b/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr.expected @@ -1,3 +1,11 @@ -| gen_block_expr.rs:3:28:12:1 | { ... } | hasLabel: | no | getNumberOfAttrs: | 0 | isAsync: | no | isConst: | no | isGen: | no | isMove: | no | isTry: | no | isUnsafe: | no | hasStmtList: | yes | -| gen_block_expr.rs:5:5:7:5 | { ... } | hasLabel: | no | getNumberOfAttrs: | 0 | isAsync: | no | isConst: | no | isGen: | no | isMove: | no | isTry: | no | isUnsafe: | no | hasStmtList: | yes | -| gen_block_expr.rs:8:5:11:5 | 'label: { ... } | hasLabel: | yes | getNumberOfAttrs: | 0 | isAsync: | no | isConst: | no | isGen: | no | isMove: | no | isTry: | no | isUnsafe: | no | hasStmtList: | yes | +instances +| gen_block_expr.rs:3:28:12:1 | { ... } | isAsync: | no | isConst: | no | isGen: | no | isMove: | no | isTry: | no | isUnsafe: | no | +| gen_block_expr.rs:5:5:7:5 | { ... } | isAsync: | no | isConst: | no | isGen: | no | isMove: | no | isTry: | no | isUnsafe: | no | +| gen_block_expr.rs:8:5:11:5 | 'label: { ... } | isAsync: | no | isConst: | no | isGen: | no | isMove: | no | isTry: | no | isUnsafe: | no | +getLabel +| gen_block_expr.rs:8:5:11:5 | 'label: { ... } | gen_block_expr.rs:8:5:8:11 | 'label | +getAttr +getStmtList +| gen_block_expr.rs:3:28:12:1 | { ... } | gen_block_expr.rs:3:28:12:1 | StmtList | +| gen_block_expr.rs:5:5:7:5 | { ... } | gen_block_expr.rs:5:5:7:5 | StmtList | +| gen_block_expr.rs:8:5:11:5 | 'label: { ... } | gen_block_expr.rs:8:13:11:5 | StmtList | diff --git a/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr.ql b/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr.ql index 992c06a605b..4b69689bb91 100644 --- a/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr.ql +++ b/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr.ql @@ -2,21 +2,35 @@ import codeql.rust.elements import TestUtils -from - BlockExpr x, string hasLabel, int getNumberOfAttrs, string isAsync, string isConst, string isGen, - string isMove, string isTry, string isUnsafe, string hasStmtList -where +query predicate instances( + BlockExpr x, string isAsync__label, string isAsync, string isConst__label, string isConst, + string isGen__label, string isGen, string isMove__label, string isMove, string isTry__label, + string isTry, string isUnsafe__label, string isUnsafe +) { toBeTested(x) and not x.isUnknown() and - (if x.hasLabel() then hasLabel = "yes" else hasLabel = "no") and - getNumberOfAttrs = x.getNumberOfAttrs() and + isAsync__label = "isAsync:" and (if x.isAsync() then isAsync = "yes" else isAsync = "no") and + isConst__label = "isConst:" and (if x.isConst() then isConst = "yes" else isConst = "no") and + isGen__label = "isGen:" and (if x.isGen() then isGen = "yes" else isGen = "no") and + isMove__label = "isMove:" and (if x.isMove() then isMove = "yes" else isMove = "no") and + isTry__label = "isTry:" and (if x.isTry() then isTry = "yes" else isTry = "no") and - (if x.isUnsafe() then isUnsafe = "yes" else isUnsafe = "no") and - if x.hasStmtList() then hasStmtList = "yes" else hasStmtList = "no" -select x, "hasLabel:", hasLabel, "getNumberOfAttrs:", getNumberOfAttrs, "isAsync:", isAsync, - "isConst:", isConst, "isGen:", isGen, "isMove:", isMove, "isTry:", isTry, "isUnsafe:", isUnsafe, - "hasStmtList:", hasStmtList + isUnsafe__label = "isUnsafe:" and + if x.isUnsafe() then isUnsafe = "yes" else isUnsafe = "no" +} + +query predicate getLabel(BlockExpr x, Label getLabel) { + toBeTested(x) and not x.isUnknown() and getLabel = x.getLabel() +} + +query predicate getAttr(BlockExpr x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} + +query predicate getStmtList(BlockExpr x, StmtList getStmtList) { + toBeTested(x) and not x.isUnknown() and getStmtList = x.getStmtList() +} diff --git a/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getAttr.ql deleted file mode 100644 index b44ebf9d08d..00000000000 --- a/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from BlockExpr x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getLabel.expected b/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getLabel.expected deleted file mode 100644 index a6933d65b22..00000000000 --- a/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getLabel.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_block_expr.rs:8:5:11:5 | 'label: { ... } | gen_block_expr.rs:8:5:8:11 | 'label | diff --git a/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getLabel.ql b/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getLabel.ql deleted file mode 100644 index 25f432e2a99..00000000000 --- a/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getLabel.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from BlockExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getLabel() diff --git a/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getStmtList.expected b/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getStmtList.expected deleted file mode 100644 index 4863264491b..00000000000 --- a/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getStmtList.expected +++ /dev/null @@ -1,3 +0,0 @@ -| gen_block_expr.rs:3:28:12:1 | { ... } | gen_block_expr.rs:3:28:12:1 | StmtList | -| gen_block_expr.rs:5:5:7:5 | { ... } | gen_block_expr.rs:5:5:7:5 | StmtList | -| gen_block_expr.rs:8:5:11:5 | 'label: { ... } | gen_block_expr.rs:8:13:11:5 | StmtList | diff --git a/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getStmtList.ql b/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getStmtList.ql deleted file mode 100644 index 493e9ad5d4a..00000000000 --- a/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getStmtList.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from BlockExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getStmtList() diff --git a/rust/ql/test/extractor-tests/generated/BlockExpr/Cargo.lock b/rust/ql/test/extractor-tests/generated/BlockExpr/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BlockExpr/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/BoxPat/BoxPat.expected b/rust/ql/test/extractor-tests/generated/BoxPat/BoxPat.expected index 8ca2412e8ff..67b2f917b49 100644 --- a/rust/ql/test/extractor-tests/generated/BoxPat/BoxPat.expected +++ b/rust/ql/test/extractor-tests/generated/BoxPat/BoxPat.expected @@ -1,2 +1,6 @@ -| gen_box_pat.rs:6:9:6:27 | box ... | hasPat: | yes | -| gen_box_pat.rs:7:9:7:24 | box ...::None | hasPat: | yes | +instances +| gen_box_pat.rs:6:9:6:27 | box ... | +| gen_box_pat.rs:7:9:7:24 | box ...::None | +getPat +| gen_box_pat.rs:6:9:6:27 | box ... | gen_box_pat.rs:6:13:6:27 | ...::Some(...) | +| gen_box_pat.rs:7:9:7:24 | box ...::None | gen_box_pat.rs:7:13:7:24 | ...::None | diff --git a/rust/ql/test/extractor-tests/generated/BoxPat/BoxPat.ql b/rust/ql/test/extractor-tests/generated/BoxPat/BoxPat.ql index cee3b683e66..3bed43b630a 100644 --- a/rust/ql/test/extractor-tests/generated/BoxPat/BoxPat.ql +++ b/rust/ql/test/extractor-tests/generated/BoxPat/BoxPat.ql @@ -2,9 +2,8 @@ import codeql.rust.elements import TestUtils -from BoxPat x, string hasPat -where - toBeTested(x) and - not x.isUnknown() and - if x.hasPat() then hasPat = "yes" else hasPat = "no" -select x, "hasPat:", hasPat +query predicate instances(BoxPat x) { toBeTested(x) and not x.isUnknown() } + +query predicate getPat(BoxPat x, Pat getPat) { + toBeTested(x) and not x.isUnknown() and getPat = x.getPat() +} diff --git a/rust/ql/test/extractor-tests/generated/BoxPat/BoxPat_getPat.expected b/rust/ql/test/extractor-tests/generated/BoxPat/BoxPat_getPat.expected deleted file mode 100644 index a43975657a8..00000000000 --- a/rust/ql/test/extractor-tests/generated/BoxPat/BoxPat_getPat.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_box_pat.rs:6:9:6:27 | box ... | gen_box_pat.rs:6:13:6:27 | ...::Some(...) | -| gen_box_pat.rs:7:9:7:24 | box ...::None | gen_box_pat.rs:7:13:7:24 | ...::None | diff --git a/rust/ql/test/extractor-tests/generated/BoxPat/BoxPat_getPat.ql b/rust/ql/test/extractor-tests/generated/BoxPat/BoxPat_getPat.ql deleted file mode 100644 index d1a4ad6fca8..00000000000 --- a/rust/ql/test/extractor-tests/generated/BoxPat/BoxPat_getPat.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from BoxPat x -where toBeTested(x) and not x.isUnknown() -select x, x.getPat() diff --git a/rust/ql/test/extractor-tests/generated/BoxPat/Cargo.lock b/rust/ql/test/extractor-tests/generated/BoxPat/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BoxPat/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr.expected b/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr.expected index 26a3ea2d998..6901bc607f4 100644 --- a/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr.expected +++ b/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr.expected @@ -1,3 +1,11 @@ -| gen_break_expr.rs:7:13:7:17 | break | getNumberOfAttrs: | 0 | hasExpr: | no | hasLifetime: | no | -| gen_break_expr.rs:12:13:12:27 | break 'label 42 | getNumberOfAttrs: | 0 | hasExpr: | yes | hasLifetime: | yes | -| gen_break_expr.rs:17:13:17:27 | break 'label 42 | getNumberOfAttrs: | 0 | hasExpr: | yes | hasLifetime: | yes | +instances +| gen_break_expr.rs:7:13:7:17 | break | +| gen_break_expr.rs:12:13:12:27 | break 'label 42 | +| gen_break_expr.rs:17:13:17:27 | break 'label 42 | +getAttr +getExpr +| gen_break_expr.rs:12:13:12:27 | break 'label 42 | gen_break_expr.rs:12:26:12:27 | 42 | +| gen_break_expr.rs:17:13:17:27 | break 'label 42 | gen_break_expr.rs:17:26:17:27 | 42 | +getLifetime +| gen_break_expr.rs:12:13:12:27 | break 'label 42 | gen_break_expr.rs:12:19:12:24 | 'label | +| gen_break_expr.rs:17:13:17:27 | break 'label 42 | gen_break_expr.rs:17:19:17:24 | 'label | diff --git a/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr.ql b/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr.ql index 1238e6e4231..c9d9fb9ee66 100644 --- a/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr.ql +++ b/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr.ql @@ -2,11 +2,16 @@ import codeql.rust.elements import TestUtils -from BreakExpr x, int getNumberOfAttrs, string hasExpr, string hasLifetime -where - toBeTested(x) and - not x.isUnknown() and - getNumberOfAttrs = x.getNumberOfAttrs() and - (if x.hasExpr() then hasExpr = "yes" else hasExpr = "no") and - if x.hasLifetime() then hasLifetime = "yes" else hasLifetime = "no" -select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasExpr:", hasExpr, "hasLifetime:", hasLifetime +query predicate instances(BreakExpr x) { toBeTested(x) and not x.isUnknown() } + +query predicate getAttr(BreakExpr x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} + +query predicate getExpr(BreakExpr x, Expr getExpr) { + toBeTested(x) and not x.isUnknown() and getExpr = x.getExpr() +} + +query predicate getLifetime(BreakExpr x, Lifetime getLifetime) { + toBeTested(x) and not x.isUnknown() and getLifetime = x.getLifetime() +} diff --git a/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getAttr.ql deleted file mode 100644 index dca05d9b890..00000000000 --- a/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from BreakExpr x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getExpr.expected b/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getExpr.expected deleted file mode 100644 index 276f1d3333b..00000000000 --- a/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getExpr.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_break_expr.rs:12:13:12:27 | break 'label 42 | gen_break_expr.rs:12:26:12:27 | 42 | -| gen_break_expr.rs:17:13:17:27 | break 'label 42 | gen_break_expr.rs:17:26:17:27 | 42 | diff --git a/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getExpr.ql b/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getExpr.ql deleted file mode 100644 index 0ae64a4d533..00000000000 --- a/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getExpr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from BreakExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getExpr() diff --git a/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getLifetime.expected b/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getLifetime.expected deleted file mode 100644 index 09f1132362f..00000000000 --- a/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getLifetime.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_break_expr.rs:12:13:12:27 | break 'label 42 | gen_break_expr.rs:12:19:12:24 | 'label | -| gen_break_expr.rs:17:13:17:27 | break 'label 42 | gen_break_expr.rs:17:19:17:24 | 'label | diff --git a/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getLifetime.ql b/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getLifetime.ql deleted file mode 100644 index c272d79f9cf..00000000000 --- a/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getLifetime.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from BreakExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getLifetime() diff --git a/rust/ql/test/extractor-tests/generated/BreakExpr/Cargo.lock b/rust/ql/test/extractor-tests/generated/BreakExpr/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BreakExpr/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr.expected b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr.expected index 31824b731a6..3aaaed00da2 100644 --- a/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr.expected +++ b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr.expected @@ -1,4 +1,21 @@ -| gen_call_expr.rs:5:5:5:11 | foo(...) | hasArgList: | yes | getNumberOfAttrs: | 0 | getNumberOfArgs: | 1 | hasFunction: | yes | -| gen_call_expr.rs:6:5:6:23 | foo::<...>(...) | hasArgList: | yes | getNumberOfAttrs: | 0 | getNumberOfArgs: | 1 | hasFunction: | yes | -| gen_call_expr.rs:7:5:7:14 | ...(...) | hasArgList: | yes | getNumberOfAttrs: | 0 | getNumberOfArgs: | 1 | hasFunction: | yes | -| gen_call_expr.rs:8:5:8:10 | foo(...) | hasArgList: | yes | getNumberOfAttrs: | 0 | getNumberOfArgs: | 1 | hasFunction: | yes | +instances +| gen_call_expr.rs:5:5:5:11 | foo(...) | +| gen_call_expr.rs:6:5:6:23 | foo::<...>(...) | +| gen_call_expr.rs:7:5:7:14 | ...(...) | +| gen_call_expr.rs:8:5:8:10 | foo(...) | +getArgList +| gen_call_expr.rs:5:5:5:11 | foo(...) | gen_call_expr.rs:5:8:5:11 | ArgList | +| gen_call_expr.rs:6:5:6:23 | foo::<...>(...) | gen_call_expr.rs:6:20:6:23 | ArgList | +| gen_call_expr.rs:7:5:7:14 | ...(...) | gen_call_expr.rs:7:11:7:14 | ArgList | +| gen_call_expr.rs:8:5:8:10 | foo(...) | gen_call_expr.rs:8:8:8:10 | ArgList | +getAttr +getArg +| gen_call_expr.rs:5:5:5:11 | foo(...) | 0 | gen_call_expr.rs:5:9:5:10 | 42 | +| gen_call_expr.rs:6:5:6:23 | foo::<...>(...) | 0 | gen_call_expr.rs:6:21:6:22 | 42 | +| gen_call_expr.rs:7:5:7:14 | ...(...) | 0 | gen_call_expr.rs:7:12:7:13 | 42 | +| gen_call_expr.rs:8:5:8:10 | foo(...) | 0 | gen_call_expr.rs:8:9:8:9 | 1 | +getFunction +| gen_call_expr.rs:5:5:5:11 | foo(...) | gen_call_expr.rs:5:5:5:7 | foo | +| gen_call_expr.rs:6:5:6:23 | foo::<...>(...) | gen_call_expr.rs:6:5:6:19 | foo::<...> | +| gen_call_expr.rs:7:5:7:14 | ...(...) | gen_call_expr.rs:7:5:7:10 | foo[0] | +| gen_call_expr.rs:8:5:8:10 | foo(...) | gen_call_expr.rs:8:5:8:7 | foo | diff --git a/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr.ql b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr.ql index 8abf8b2a08e..e16ab837325 100644 --- a/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr.ql +++ b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr.ql @@ -2,13 +2,20 @@ import codeql.rust.elements import TestUtils -from CallExpr x, string hasArgList, int getNumberOfAttrs, int getNumberOfArgs, string hasFunction -where - toBeTested(x) and - not x.isUnknown() and - (if x.hasArgList() then hasArgList = "yes" else hasArgList = "no") and - getNumberOfAttrs = x.getNumberOfAttrs() and - getNumberOfArgs = x.getNumberOfArgs() and - if x.hasFunction() then hasFunction = "yes" else hasFunction = "no" -select x, "hasArgList:", hasArgList, "getNumberOfAttrs:", getNumberOfAttrs, "getNumberOfArgs:", - getNumberOfArgs, "hasFunction:", hasFunction +query predicate instances(CallExpr x) { toBeTested(x) and not x.isUnknown() } + +query predicate getArgList(CallExpr x, ArgList getArgList) { + toBeTested(x) and not x.isUnknown() and getArgList = x.getArgList() +} + +query predicate getAttr(CallExpr x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} + +query predicate getArg(CallExpr x, int index, Expr getArg) { + toBeTested(x) and not x.isUnknown() and getArg = x.getArg(index) +} + +query predicate getFunction(CallExpr x, Expr getFunction) { + toBeTested(x) and not x.isUnknown() and getFunction = x.getFunction() +} diff --git a/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getArg.expected b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getArg.expected deleted file mode 100644 index 2bf84953410..00000000000 --- a/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getArg.expected +++ /dev/null @@ -1,4 +0,0 @@ -| gen_call_expr.rs:5:5:5:11 | foo(...) | 0 | gen_call_expr.rs:5:9:5:10 | 42 | -| gen_call_expr.rs:6:5:6:23 | foo::<...>(...) | 0 | gen_call_expr.rs:6:21:6:22 | 42 | -| gen_call_expr.rs:7:5:7:14 | ...(...) | 0 | gen_call_expr.rs:7:12:7:13 | 42 | -| gen_call_expr.rs:8:5:8:10 | foo(...) | 0 | gen_call_expr.rs:8:9:8:9 | 1 | diff --git a/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getArg.ql b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getArg.ql deleted file mode 100644 index 37483c3e637..00000000000 --- a/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getArg.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from CallExpr x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getArg(index) diff --git a/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getArgList.expected b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getArgList.expected deleted file mode 100644 index 13c426db99d..00000000000 --- a/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getArgList.expected +++ /dev/null @@ -1,4 +0,0 @@ -| gen_call_expr.rs:5:5:5:11 | foo(...) | gen_call_expr.rs:5:8:5:11 | ArgList | -| gen_call_expr.rs:6:5:6:23 | foo::<...>(...) | gen_call_expr.rs:6:20:6:23 | ArgList | -| gen_call_expr.rs:7:5:7:14 | ...(...) | gen_call_expr.rs:7:11:7:14 | ArgList | -| gen_call_expr.rs:8:5:8:10 | foo(...) | gen_call_expr.rs:8:8:8:10 | ArgList | diff --git a/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getArgList.ql b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getArgList.ql deleted file mode 100644 index 088f92ec06d..00000000000 --- a/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getArgList.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from CallExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getArgList() diff --git a/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getAttr.ql deleted file mode 100644 index 53b8ec257a6..00000000000 --- a/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from CallExpr x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getFunction.expected b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getFunction.expected deleted file mode 100644 index ecaaf15cebb..00000000000 --- a/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getFunction.expected +++ /dev/null @@ -1,4 +0,0 @@ -| gen_call_expr.rs:5:5:5:11 | foo(...) | gen_call_expr.rs:5:5:5:7 | foo | -| gen_call_expr.rs:6:5:6:23 | foo::<...>(...) | gen_call_expr.rs:6:5:6:19 | foo::<...> | -| gen_call_expr.rs:7:5:7:14 | ...(...) | gen_call_expr.rs:7:5:7:10 | foo[0] | -| gen_call_expr.rs:8:5:8:10 | foo(...) | gen_call_expr.rs:8:5:8:7 | foo | diff --git a/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getFunction.ql b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getFunction.ql deleted file mode 100644 index 61196bcd14d..00000000000 --- a/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getFunction.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from CallExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getFunction() diff --git a/rust/ql/test/extractor-tests/generated/CallExpr/Cargo.lock b/rust/ql/test/extractor-tests/generated/CallExpr/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/CallExpr/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/CastExpr/Cargo.lock b/rust/ql/test/extractor-tests/generated/CastExpr/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/CastExpr/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr.expected b/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr.expected index 76e6f567b06..05f618ced10 100644 --- a/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr.expected +++ b/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr.expected @@ -1 +1,7 @@ -| gen_cast_expr.rs:5:5:5:16 | value as u64 | getNumberOfAttrs: | 0 | hasExpr: | yes | hasTypeRepr: | yes | +instances +| gen_cast_expr.rs:5:5:5:16 | value as u64 | +getAttr +getExpr +| gen_cast_expr.rs:5:5:5:16 | value as u64 | gen_cast_expr.rs:5:5:5:9 | value | +getTypeRepr +| gen_cast_expr.rs:5:5:5:16 | value as u64 | gen_cast_expr.rs:5:14:5:16 | u64 | diff --git a/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr.ql b/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr.ql index 0c60d9f8c4e..46c06b4c21c 100644 --- a/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr.ql +++ b/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr.ql @@ -2,11 +2,16 @@ import codeql.rust.elements import TestUtils -from CastExpr x, int getNumberOfAttrs, string hasExpr, string hasTypeRepr -where - toBeTested(x) and - not x.isUnknown() and - getNumberOfAttrs = x.getNumberOfAttrs() and - (if x.hasExpr() then hasExpr = "yes" else hasExpr = "no") and - if x.hasTypeRepr() then hasTypeRepr = "yes" else hasTypeRepr = "no" -select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasExpr:", hasExpr, "hasTypeRepr:", hasTypeRepr +query predicate instances(CastExpr x) { toBeTested(x) and not x.isUnknown() } + +query predicate getAttr(CastExpr x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} + +query predicate getExpr(CastExpr x, Expr getExpr) { + toBeTested(x) and not x.isUnknown() and getExpr = x.getExpr() +} + +query predicate getTypeRepr(CastExpr x, TypeRepr getTypeRepr) { + toBeTested(x) and not x.isUnknown() and getTypeRepr = x.getTypeRepr() +} diff --git a/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr_getAttr.ql deleted file mode 100644 index afb47c82fdb..00000000000 --- a/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from CastExpr x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr_getExpr.expected b/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr_getExpr.expected deleted file mode 100644 index 01a710bfb53..00000000000 --- a/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr_getExpr.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_cast_expr.rs:5:5:5:16 | value as u64 | gen_cast_expr.rs:5:5:5:9 | value | diff --git a/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr_getExpr.ql b/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr_getExpr.ql deleted file mode 100644 index 3d8c47f1354..00000000000 --- a/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr_getExpr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from CastExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getExpr() diff --git a/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr_getTypeRepr.expected b/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr_getTypeRepr.expected deleted file mode 100644 index 87c07babb02..00000000000 --- a/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr_getTypeRepr.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_cast_expr.rs:5:5:5:16 | value as u64 | gen_cast_expr.rs:5:14:5:16 | u64 | diff --git a/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr_getTypeRepr.ql b/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr_getTypeRepr.ql deleted file mode 100644 index 34ee4c5ef9d..00000000000 --- a/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr_getTypeRepr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from CastExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getTypeRepr() diff --git a/rust/ql/test/extractor-tests/generated/ClosureBinder/Cargo.lock b/rust/ql/test/extractor-tests/generated/ClosureBinder/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ClosureBinder/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/ClosureBinder/ClosureBinder.expected b/rust/ql/test/extractor-tests/generated/ClosureBinder/ClosureBinder.expected index 66e669e9e9f..dfd2bd58d07 100644 --- a/rust/ql/test/extractor-tests/generated/ClosureBinder/ClosureBinder.expected +++ b/rust/ql/test/extractor-tests/generated/ClosureBinder/ClosureBinder.expected @@ -1 +1,4 @@ -| gen_closure_binder.rs:7:21:7:43 | ClosureBinder | hasGenericParamList: | yes | +instances +| gen_closure_binder.rs:7:21:7:43 | ClosureBinder | +getGenericParamList +| gen_closure_binder.rs:7:21:7:43 | ClosureBinder | gen_closure_binder.rs:7:24:7:43 | <...> | diff --git a/rust/ql/test/extractor-tests/generated/ClosureBinder/ClosureBinder.ql b/rust/ql/test/extractor-tests/generated/ClosureBinder/ClosureBinder.ql index b099f4aa548..d204c5fbde1 100644 --- a/rust/ql/test/extractor-tests/generated/ClosureBinder/ClosureBinder.ql +++ b/rust/ql/test/extractor-tests/generated/ClosureBinder/ClosureBinder.ql @@ -2,9 +2,8 @@ import codeql.rust.elements import TestUtils -from ClosureBinder x, string hasGenericParamList -where - toBeTested(x) and - not x.isUnknown() and - if x.hasGenericParamList() then hasGenericParamList = "yes" else hasGenericParamList = "no" -select x, "hasGenericParamList:", hasGenericParamList +query predicate instances(ClosureBinder x) { toBeTested(x) and not x.isUnknown() } + +query predicate getGenericParamList(ClosureBinder x, GenericParamList getGenericParamList) { + toBeTested(x) and not x.isUnknown() and getGenericParamList = x.getGenericParamList() +} diff --git a/rust/ql/test/extractor-tests/generated/ClosureBinder/ClosureBinder_getGenericParamList.expected b/rust/ql/test/extractor-tests/generated/ClosureBinder/ClosureBinder_getGenericParamList.expected deleted file mode 100644 index f3d94f1b8fa..00000000000 --- a/rust/ql/test/extractor-tests/generated/ClosureBinder/ClosureBinder_getGenericParamList.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_closure_binder.rs:7:21:7:43 | ClosureBinder | gen_closure_binder.rs:7:24:7:43 | <...> | diff --git a/rust/ql/test/extractor-tests/generated/ClosureBinder/ClosureBinder_getGenericParamList.ql b/rust/ql/test/extractor-tests/generated/ClosureBinder/ClosureBinder_getGenericParamList.ql deleted file mode 100644 index 553bcf8970e..00000000000 --- a/rust/ql/test/extractor-tests/generated/ClosureBinder/ClosureBinder_getGenericParamList.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from ClosureBinder x -where toBeTested(x) and not x.isUnknown() -select x, x.getGenericParamList() diff --git a/rust/ql/test/extractor-tests/generated/ClosureExpr/Cargo.lock b/rust/ql/test/extractor-tests/generated/ClosureExpr/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ClosureExpr/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr.expected b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr.expected index d8a9b33ce0e..041669861b9 100644 --- a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr.expected +++ b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr.expected @@ -1,5 +1,31 @@ -| gen_closure_expr.rs:5:5:5:13 | \|...\| ... | hasParamList: | yes | getNumberOfAttrs: | 0 | getNumberOfParams: | 1 | hasBody: | yes | hasClosureBinder: | no | isAsync: | no | isConst: | no | isGen: | no | isMove: | no | isStatic: | no | hasRetType: | no | -| gen_closure_expr.rs:6:5:6:34 | \|...\| ... | hasParamList: | yes | getNumberOfAttrs: | 0 | getNumberOfParams: | 1 | hasBody: | yes | hasClosureBinder: | no | isAsync: | no | isConst: | no | isGen: | no | isMove: | yes | isStatic: | no | hasRetType: | yes | -| gen_closure_expr.rs:7:5:7:27 | \|...\| ... | hasParamList: | yes | getNumberOfAttrs: | 0 | getNumberOfParams: | 2 | hasBody: | yes | hasClosureBinder: | no | isAsync: | yes | isConst: | no | isGen: | no | isMove: | no | isStatic: | no | hasRetType: | no | -| gen_closure_expr.rs:8:6:9:15 | \|...\| ... | hasParamList: | yes | getNumberOfAttrs: | 1 | getNumberOfParams: | 1 | hasBody: | yes | hasClosureBinder: | no | isAsync: | no | isConst: | no | isGen: | no | isMove: | no | isStatic: | no | hasRetType: | no | -| gen_closure_expr.rs:10:6:11:23 | \|...\| ... | hasParamList: | yes | getNumberOfAttrs: | 1 | getNumberOfParams: | 1 | hasBody: | yes | hasClosureBinder: | no | isAsync: | no | isConst: | no | isGen: | no | isMove: | no | isStatic: | yes | hasRetType: | no | +instances +| gen_closure_expr.rs:5:5:5:13 | \|...\| ... | isAsync: | no | isConst: | no | isGen: | no | isMove: | no | isStatic: | no | +| gen_closure_expr.rs:6:5:6:34 | \|...\| ... | isAsync: | no | isConst: | no | isGen: | no | isMove: | yes | isStatic: | no | +| gen_closure_expr.rs:7:5:7:27 | \|...\| ... | isAsync: | yes | isConst: | no | isGen: | no | isMove: | no | isStatic: | no | +| gen_closure_expr.rs:8:6:9:15 | \|...\| ... | isAsync: | no | isConst: | no | isGen: | no | isMove: | no | isStatic: | no | +| gen_closure_expr.rs:10:6:11:23 | \|...\| ... | isAsync: | no | isConst: | no | isGen: | no | isMove: | no | isStatic: | yes | +getParamList +| gen_closure_expr.rs:5:5:5:13 | \|...\| ... | gen_closure_expr.rs:5:5:5:7 | ParamList | +| gen_closure_expr.rs:6:5:6:34 | \|...\| ... | gen_closure_expr.rs:6:10:6:17 | ParamList | +| gen_closure_expr.rs:7:5:7:27 | \|...\| ... | gen_closure_expr.rs:7:11:7:21 | ParamList | +| gen_closure_expr.rs:8:6:9:15 | \|...\| ... | gen_closure_expr.rs:9:5:9:7 | ParamList | +| gen_closure_expr.rs:10:6:11:23 | \|...\| ... | gen_closure_expr.rs:11:13:11:15 | ParamList | +getAttr +| gen_closure_expr.rs:8:6:9:15 | \|...\| ... | 0 | gen_closure_expr.rs:8:6:8:17 | Attr | +| gen_closure_expr.rs:10:6:11:23 | \|...\| ... | 0 | gen_closure_expr.rs:10:6:10:17 | Attr | +getParam +| gen_closure_expr.rs:5:5:5:13 | \|...\| ... | 0 | gen_closure_expr.rs:5:6:5:6 | ... | +| gen_closure_expr.rs:6:5:6:34 | \|...\| ... | 0 | gen_closure_expr.rs:6:11:6:16 | ...: i32 | +| gen_closure_expr.rs:7:5:7:27 | \|...\| ... | 0 | gen_closure_expr.rs:7:12:7:17 | ...: i32 | +| gen_closure_expr.rs:7:5:7:27 | \|...\| ... | 1 | gen_closure_expr.rs:7:20:7:20 | ... | +| gen_closure_expr.rs:8:6:9:15 | \|...\| ... | 0 | gen_closure_expr.rs:9:6:9:6 | ... | +| gen_closure_expr.rs:10:6:11:23 | \|...\| ... | 0 | gen_closure_expr.rs:11:14:11:14 | ... | +getBody +| gen_closure_expr.rs:5:5:5:13 | \|...\| ... | gen_closure_expr.rs:5:9:5:13 | ... + ... | +| gen_closure_expr.rs:6:5:6:34 | \|...\| ... | gen_closure_expr.rs:6:26:6:34 | { ... } | +| gen_closure_expr.rs:7:5:7:27 | \|...\| ... | gen_closure_expr.rs:7:23:7:27 | ... + ... | +| gen_closure_expr.rs:8:6:9:15 | \|...\| ... | gen_closure_expr.rs:9:9:9:15 | YieldExpr | +| gen_closure_expr.rs:10:6:11:23 | \|...\| ... | gen_closure_expr.rs:11:17:11:23 | YieldExpr | +getClosureBinder +getRetType +| gen_closure_expr.rs:6:5:6:34 | \|...\| ... | gen_closure_expr.rs:6:19:6:24 | RetTypeRepr | diff --git a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr.ql b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr.ql index 6a5536c5be1..acf3b130677 100644 --- a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr.ql +++ b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr.ql @@ -2,25 +2,45 @@ import codeql.rust.elements import TestUtils -from - ClosureExpr x, string hasParamList, int getNumberOfAttrs, int getNumberOfParams, string hasBody, - string hasClosureBinder, string isAsync, string isConst, string isGen, string isMove, - string isStatic, string hasRetType -where +query predicate instances( + ClosureExpr x, string isAsync__label, string isAsync, string isConst__label, string isConst, + string isGen__label, string isGen, string isMove__label, string isMove, string isStatic__label, + string isStatic +) { toBeTested(x) and not x.isUnknown() and - (if x.hasParamList() then hasParamList = "yes" else hasParamList = "no") and - getNumberOfAttrs = x.getNumberOfAttrs() and - getNumberOfParams = x.getNumberOfParams() and - (if x.hasBody() then hasBody = "yes" else hasBody = "no") and - (if x.hasClosureBinder() then hasClosureBinder = "yes" else hasClosureBinder = "no") and + isAsync__label = "isAsync:" and (if x.isAsync() then isAsync = "yes" else isAsync = "no") and + isConst__label = "isConst:" and (if x.isConst() then isConst = "yes" else isConst = "no") and + isGen__label = "isGen:" and (if x.isGen() then isGen = "yes" else isGen = "no") and + isMove__label = "isMove:" and (if x.isMove() then isMove = "yes" else isMove = "no") and - (if x.isStatic() then isStatic = "yes" else isStatic = "no") and - if x.hasRetType() then hasRetType = "yes" else hasRetType = "no" -select x, "hasParamList:", hasParamList, "getNumberOfAttrs:", getNumberOfAttrs, - "getNumberOfParams:", getNumberOfParams, "hasBody:", hasBody, "hasClosureBinder:", - hasClosureBinder, "isAsync:", isAsync, "isConst:", isConst, "isGen:", isGen, "isMove:", isMove, - "isStatic:", isStatic, "hasRetType:", hasRetType + isStatic__label = "isStatic:" and + if x.isStatic() then isStatic = "yes" else isStatic = "no" +} + +query predicate getParamList(ClosureExpr x, ParamList getParamList) { + toBeTested(x) and not x.isUnknown() and getParamList = x.getParamList() +} + +query predicate getAttr(ClosureExpr x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} + +query predicate getParam(ClosureExpr x, int index, Param getParam) { + toBeTested(x) and not x.isUnknown() and getParam = x.getParam(index) +} + +query predicate getBody(ClosureExpr x, Expr getBody) { + toBeTested(x) and not x.isUnknown() and getBody = x.getBody() +} + +query predicate getClosureBinder(ClosureExpr x, ClosureBinder getClosureBinder) { + toBeTested(x) and not x.isUnknown() and getClosureBinder = x.getClosureBinder() +} + +query predicate getRetType(ClosureExpr x, RetTypeRepr getRetType) { + toBeTested(x) and not x.isUnknown() and getRetType = x.getRetType() +} diff --git a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getAttr.expected deleted file mode 100644 index 4de6e17d785..00000000000 --- a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getAttr.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_closure_expr.rs:8:6:9:15 | \|...\| ... | 0 | gen_closure_expr.rs:8:6:8:17 | Attr | -| gen_closure_expr.rs:10:6:11:23 | \|...\| ... | 0 | gen_closure_expr.rs:10:6:10:17 | Attr | diff --git a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getAttr.ql deleted file mode 100644 index b32da8e541b..00000000000 --- a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from ClosureExpr x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getBody.expected b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getBody.expected deleted file mode 100644 index d7b6180e63b..00000000000 --- a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getBody.expected +++ /dev/null @@ -1,5 +0,0 @@ -| gen_closure_expr.rs:5:5:5:13 | \|...\| ... | gen_closure_expr.rs:5:9:5:13 | ... + ... | -| gen_closure_expr.rs:6:5:6:34 | \|...\| ... | gen_closure_expr.rs:6:26:6:34 | { ... } | -| gen_closure_expr.rs:7:5:7:27 | \|...\| ... | gen_closure_expr.rs:7:23:7:27 | ... + ... | -| gen_closure_expr.rs:8:6:9:15 | \|...\| ... | gen_closure_expr.rs:9:9:9:15 | YieldExpr | -| gen_closure_expr.rs:10:6:11:23 | \|...\| ... | gen_closure_expr.rs:11:17:11:23 | YieldExpr | diff --git a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getBody.ql b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getBody.ql deleted file mode 100644 index cee8662cc44..00000000000 --- a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getBody.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from ClosureExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getBody() diff --git a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getClosureBinder.expected b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getClosureBinder.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getClosureBinder.ql b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getClosureBinder.ql deleted file mode 100644 index fc838f8e254..00000000000 --- a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getClosureBinder.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from ClosureExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getClosureBinder() diff --git a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getParam.expected b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getParam.expected deleted file mode 100644 index 29be6ae9ef0..00000000000 --- a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getParam.expected +++ /dev/null @@ -1,6 +0,0 @@ -| gen_closure_expr.rs:5:5:5:13 | \|...\| ... | 0 | gen_closure_expr.rs:5:6:5:6 | ... | -| gen_closure_expr.rs:6:5:6:34 | \|...\| ... | 0 | gen_closure_expr.rs:6:11:6:16 | ...: i32 | -| gen_closure_expr.rs:7:5:7:27 | \|...\| ... | 0 | gen_closure_expr.rs:7:12:7:17 | ...: i32 | -| gen_closure_expr.rs:7:5:7:27 | \|...\| ... | 1 | gen_closure_expr.rs:7:20:7:20 | ... | -| gen_closure_expr.rs:8:6:9:15 | \|...\| ... | 0 | gen_closure_expr.rs:9:6:9:6 | ... | -| gen_closure_expr.rs:10:6:11:23 | \|...\| ... | 0 | gen_closure_expr.rs:11:14:11:14 | ... | diff --git a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getParam.ql b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getParam.ql deleted file mode 100644 index 06cef03f206..00000000000 --- a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getParam.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from ClosureExpr x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getParam(index) diff --git a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getParamList.expected b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getParamList.expected deleted file mode 100644 index 5945738433b..00000000000 --- a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getParamList.expected +++ /dev/null @@ -1,5 +0,0 @@ -| gen_closure_expr.rs:5:5:5:13 | \|...\| ... | gen_closure_expr.rs:5:5:5:7 | ParamList | -| gen_closure_expr.rs:6:5:6:34 | \|...\| ... | gen_closure_expr.rs:6:10:6:17 | ParamList | -| gen_closure_expr.rs:7:5:7:27 | \|...\| ... | gen_closure_expr.rs:7:11:7:21 | ParamList | -| gen_closure_expr.rs:8:6:9:15 | \|...\| ... | gen_closure_expr.rs:9:5:9:7 | ParamList | -| gen_closure_expr.rs:10:6:11:23 | \|...\| ... | gen_closure_expr.rs:11:13:11:15 | ParamList | diff --git a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getParamList.ql b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getParamList.ql deleted file mode 100644 index d055aa69de3..00000000000 --- a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getParamList.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from ClosureExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getParamList() diff --git a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getRetType.expected b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getRetType.expected deleted file mode 100644 index d5b2095eacc..00000000000 --- a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getRetType.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_closure_expr.rs:6:5:6:34 | \|...\| ... | gen_closure_expr.rs:6:19:6:24 | RetTypeRepr | diff --git a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getRetType.ql b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getRetType.ql deleted file mode 100644 index acafcc71062..00000000000 --- a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getRetType.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from ClosureExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getRetType() diff --git a/rust/ql/test/extractor-tests/generated/Comment/Cargo.lock b/rust/ql/test/extractor-tests/generated/Comment/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Comment/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/Comment/Comment.ql b/rust/ql/test/extractor-tests/generated/Comment/Comment.ql index 7e940186748..43aad9a404b 100644 --- a/rust/ql/test/extractor-tests/generated/Comment/Comment.ql +++ b/rust/ql/test/extractor-tests/generated/Comment/Comment.ql @@ -2,10 +2,13 @@ import codeql.rust.elements import TestUtils -from Comment x, AstNode getParent, string getText -where +query predicate instances( + Comment x, string getParent__label, AstNode getParent, string getText__label, string getText +) { toBeTested(x) and not x.isUnknown() and + getParent__label = "getParent:" and getParent = x.getParent() and + getText__label = "getText:" and getText = x.getText() -select x, "getParent:", getParent, "getText:", getText +} diff --git a/rust/ql/test/extractor-tests/generated/Const/Const.expected b/rust/ql/test/extractor-tests/generated/Const/Const.expected index 09c791ffe4f..64b20c95e26 100644 --- a/rust/ql/test/extractor-tests/generated/Const/Const.expected +++ b/rust/ql/test/extractor-tests/generated/Const/Const.expected @@ -1 +1,15 @@ -| gen_const.rs:4:5:7:22 | Const | hasExtendedCanonicalPath: | no | hasCrateOrigin: | no | hasAttributeMacroExpansion: | no | getNumberOfAttrs: | 0 | hasBody: | yes | hasGenericParamList: | no | isConst: | yes | isDefault: | no | hasName: | yes | hasTypeRepr: | yes | hasVisibility: | no | hasWhereClause: | no | hasImplementation: | yes | +instances +| gen_const.rs:4:5:7:22 | Const | isConst: | yes | isDefault: | no | hasImplementation: | yes | +getExtendedCanonicalPath +getCrateOrigin +getAttributeMacroExpansion +getAttr +getBody +| gen_const.rs:4:5:7:22 | Const | gen_const.rs:7:20:7:21 | 42 | +getGenericParamList +getName +| gen_const.rs:4:5:7:22 | Const | gen_const.rs:7:11:7:11 | X | +getTypeRepr +| gen_const.rs:4:5:7:22 | Const | gen_const.rs:7:14:7:16 | i32 | +getVisibility +getWhereClause diff --git a/rust/ql/test/extractor-tests/generated/Const/Const.ql b/rust/ql/test/extractor-tests/generated/Const/Const.ql index 348f7bec1a6..ef88f980fc0 100644 --- a/rust/ql/test/extractor-tests/generated/Const/Const.ql +++ b/rust/ql/test/extractor-tests/generated/Const/Const.ql @@ -2,37 +2,58 @@ import codeql.rust.elements import TestUtils -from - Const x, string hasExtendedCanonicalPath, string hasCrateOrigin, - string hasAttributeMacroExpansion, int getNumberOfAttrs, string hasBody, - string hasGenericParamList, string isConst, string isDefault, string hasName, string hasTypeRepr, - string hasVisibility, string hasWhereClause, string hasImplementation -where +query predicate instances( + Const x, string isConst__label, string isConst, string isDefault__label, string isDefault, + string hasImplementation__label, string hasImplementation +) { toBeTested(x) and not x.isUnknown() and - ( - if x.hasExtendedCanonicalPath() - then hasExtendedCanonicalPath = "yes" - else hasExtendedCanonicalPath = "no" - ) and - (if x.hasCrateOrigin() then hasCrateOrigin = "yes" else hasCrateOrigin = "no") and - ( - if x.hasAttributeMacroExpansion() - then hasAttributeMacroExpansion = "yes" - else hasAttributeMacroExpansion = "no" - ) and - getNumberOfAttrs = x.getNumberOfAttrs() and - (if x.hasBody() then hasBody = "yes" else hasBody = "no") and - (if x.hasGenericParamList() then hasGenericParamList = "yes" else hasGenericParamList = "no") and + isConst__label = "isConst:" and (if x.isConst() then isConst = "yes" else isConst = "no") and + isDefault__label = "isDefault:" and (if x.isDefault() then isDefault = "yes" else isDefault = "no") and - (if x.hasName() then hasName = "yes" else hasName = "no") and - (if x.hasTypeRepr() then hasTypeRepr = "yes" else hasTypeRepr = "no") and - (if x.hasVisibility() then hasVisibility = "yes" else hasVisibility = "no") and - (if x.hasWhereClause() then hasWhereClause = "yes" else hasWhereClause = "no") and + hasImplementation__label = "hasImplementation:" and if x.hasImplementation() then hasImplementation = "yes" else hasImplementation = "no" -select x, "hasExtendedCanonicalPath:", hasExtendedCanonicalPath, "hasCrateOrigin:", hasCrateOrigin, - "hasAttributeMacroExpansion:", hasAttributeMacroExpansion, "getNumberOfAttrs:", getNumberOfAttrs, - "hasBody:", hasBody, "hasGenericParamList:", hasGenericParamList, "isConst:", isConst, - "isDefault:", isDefault, "hasName:", hasName, "hasTypeRepr:", hasTypeRepr, "hasVisibility:", - hasVisibility, "hasWhereClause:", hasWhereClause, "hasImplementation:", hasImplementation +} + +query predicate getExtendedCanonicalPath(Const x, string getExtendedCanonicalPath) { + toBeTested(x) and not x.isUnknown() and getExtendedCanonicalPath = x.getExtendedCanonicalPath() +} + +query predicate getCrateOrigin(Const x, string getCrateOrigin) { + toBeTested(x) and not x.isUnknown() and getCrateOrigin = x.getCrateOrigin() +} + +query predicate getAttributeMacroExpansion(Const x, MacroItems getAttributeMacroExpansion) { + toBeTested(x) and + not x.isUnknown() and + getAttributeMacroExpansion = x.getAttributeMacroExpansion() +} + +query predicate getAttr(Const x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} + +query predicate getBody(Const x, Expr getBody) { + toBeTested(x) and not x.isUnknown() and getBody = x.getBody() +} + +query predicate getGenericParamList(Const x, GenericParamList getGenericParamList) { + toBeTested(x) and not x.isUnknown() and getGenericParamList = x.getGenericParamList() +} + +query predicate getName(Const x, Name getName) { + toBeTested(x) and not x.isUnknown() and getName = x.getName() +} + +query predicate getTypeRepr(Const x, TypeRepr getTypeRepr) { + toBeTested(x) and not x.isUnknown() and getTypeRepr = x.getTypeRepr() +} + +query predicate getVisibility(Const x, Visibility getVisibility) { + toBeTested(x) and not x.isUnknown() and getVisibility = x.getVisibility() +} + +query predicate getWhereClause(Const x, WhereClause getWhereClause) { + toBeTested(x) and not x.isUnknown() and getWhereClause = x.getWhereClause() +} diff --git a/rust/ql/test/extractor-tests/generated/Const/Const_getAttr.expected b/rust/ql/test/extractor-tests/generated/Const/Const_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Const/Const_getAttr.ql b/rust/ql/test/extractor-tests/generated/Const/Const_getAttr.ql deleted file mode 100644 index 0b4adeec093..00000000000 --- a/rust/ql/test/extractor-tests/generated/Const/Const_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Const x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/Const/Const_getAttributeMacroExpansion.expected b/rust/ql/test/extractor-tests/generated/Const/Const_getAttributeMacroExpansion.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Const/Const_getAttributeMacroExpansion.ql b/rust/ql/test/extractor-tests/generated/Const/Const_getAttributeMacroExpansion.ql deleted file mode 100644 index 4056751f972..00000000000 --- a/rust/ql/test/extractor-tests/generated/Const/Const_getAttributeMacroExpansion.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Const x -where toBeTested(x) and not x.isUnknown() -select x, x.getAttributeMacroExpansion() diff --git a/rust/ql/test/extractor-tests/generated/Const/Const_getBody.expected b/rust/ql/test/extractor-tests/generated/Const/Const_getBody.expected deleted file mode 100644 index e6653a26b91..00000000000 --- a/rust/ql/test/extractor-tests/generated/Const/Const_getBody.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_const.rs:4:5:7:22 | Const | gen_const.rs:7:20:7:21 | 42 | diff --git a/rust/ql/test/extractor-tests/generated/Const/Const_getBody.ql b/rust/ql/test/extractor-tests/generated/Const/Const_getBody.ql deleted file mode 100644 index 368aa82afb4..00000000000 --- a/rust/ql/test/extractor-tests/generated/Const/Const_getBody.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Const x -where toBeTested(x) and not x.isUnknown() -select x, x.getBody() diff --git a/rust/ql/test/extractor-tests/generated/Const/Const_getCrateOrigin.expected b/rust/ql/test/extractor-tests/generated/Const/Const_getCrateOrigin.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Const/Const_getCrateOrigin.ql b/rust/ql/test/extractor-tests/generated/Const/Const_getCrateOrigin.ql deleted file mode 100644 index 644b9240980..00000000000 --- a/rust/ql/test/extractor-tests/generated/Const/Const_getCrateOrigin.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Const x -where toBeTested(x) and not x.isUnknown() -select x, x.getCrateOrigin() diff --git a/rust/ql/test/extractor-tests/generated/Const/Const_getExtendedCanonicalPath.expected b/rust/ql/test/extractor-tests/generated/Const/Const_getExtendedCanonicalPath.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Const/Const_getExtendedCanonicalPath.ql b/rust/ql/test/extractor-tests/generated/Const/Const_getExtendedCanonicalPath.ql deleted file mode 100644 index c11c4e0856d..00000000000 --- a/rust/ql/test/extractor-tests/generated/Const/Const_getExtendedCanonicalPath.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Const x -where toBeTested(x) and not x.isUnknown() -select x, x.getExtendedCanonicalPath() diff --git a/rust/ql/test/extractor-tests/generated/Const/Const_getGenericParamList.expected b/rust/ql/test/extractor-tests/generated/Const/Const_getGenericParamList.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Const/Const_getGenericParamList.ql b/rust/ql/test/extractor-tests/generated/Const/Const_getGenericParamList.ql deleted file mode 100644 index 6c62c3eac40..00000000000 --- a/rust/ql/test/extractor-tests/generated/Const/Const_getGenericParamList.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Const x -where toBeTested(x) and not x.isUnknown() -select x, x.getGenericParamList() diff --git a/rust/ql/test/extractor-tests/generated/Const/Const_getName.expected b/rust/ql/test/extractor-tests/generated/Const/Const_getName.expected deleted file mode 100644 index e0c9ac08554..00000000000 --- a/rust/ql/test/extractor-tests/generated/Const/Const_getName.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_const.rs:4:5:7:22 | Const | gen_const.rs:7:11:7:11 | X | diff --git a/rust/ql/test/extractor-tests/generated/Const/Const_getName.ql b/rust/ql/test/extractor-tests/generated/Const/Const_getName.ql deleted file mode 100644 index 23698a012eb..00000000000 --- a/rust/ql/test/extractor-tests/generated/Const/Const_getName.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Const x -where toBeTested(x) and not x.isUnknown() -select x, x.getName() diff --git a/rust/ql/test/extractor-tests/generated/Const/Const_getTypeRepr.expected b/rust/ql/test/extractor-tests/generated/Const/Const_getTypeRepr.expected deleted file mode 100644 index dde3546336a..00000000000 --- a/rust/ql/test/extractor-tests/generated/Const/Const_getTypeRepr.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_const.rs:4:5:7:22 | Const | gen_const.rs:7:14:7:16 | i32 | diff --git a/rust/ql/test/extractor-tests/generated/Const/Const_getTypeRepr.ql b/rust/ql/test/extractor-tests/generated/Const/Const_getTypeRepr.ql deleted file mode 100644 index 4185581df19..00000000000 --- a/rust/ql/test/extractor-tests/generated/Const/Const_getTypeRepr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Const x -where toBeTested(x) and not x.isUnknown() -select x, x.getTypeRepr() diff --git a/rust/ql/test/extractor-tests/generated/Const/Const_getVisibility.expected b/rust/ql/test/extractor-tests/generated/Const/Const_getVisibility.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Const/Const_getVisibility.ql b/rust/ql/test/extractor-tests/generated/Const/Const_getVisibility.ql deleted file mode 100644 index c0599d921a0..00000000000 --- a/rust/ql/test/extractor-tests/generated/Const/Const_getVisibility.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Const x -where toBeTested(x) and not x.isUnknown() -select x, x.getVisibility() diff --git a/rust/ql/test/extractor-tests/generated/Const/Const_getWhereClause.expected b/rust/ql/test/extractor-tests/generated/Const/Const_getWhereClause.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Const/Const_getWhereClause.ql b/rust/ql/test/extractor-tests/generated/Const/Const_getWhereClause.ql deleted file mode 100644 index a6667b9b8d2..00000000000 --- a/rust/ql/test/extractor-tests/generated/Const/Const_getWhereClause.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Const x -where toBeTested(x) and not x.isUnknown() -select x, x.getWhereClause() diff --git a/rust/ql/test/extractor-tests/generated/ConstArg/Cargo.lock b/rust/ql/test/extractor-tests/generated/ConstArg/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ConstArg/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/ConstArg/ConstArg.expected b/rust/ql/test/extractor-tests/generated/ConstArg/ConstArg.expected index 56a3b5946fa..111690872fe 100644 --- a/rust/ql/test/extractor-tests/generated/ConstArg/ConstArg.expected +++ b/rust/ql/test/extractor-tests/generated/ConstArg/ConstArg.expected @@ -1 +1,4 @@ -| gen_const_arg.rs:7:11:7:11 | ConstArg | hasExpr: | yes | +instances +| gen_const_arg.rs:7:11:7:11 | ConstArg | +getExpr +| gen_const_arg.rs:7:11:7:11 | ConstArg | gen_const_arg.rs:7:11:7:11 | 3 | diff --git a/rust/ql/test/extractor-tests/generated/ConstArg/ConstArg.ql b/rust/ql/test/extractor-tests/generated/ConstArg/ConstArg.ql index 4080bf099c4..c89b791090a 100644 --- a/rust/ql/test/extractor-tests/generated/ConstArg/ConstArg.ql +++ b/rust/ql/test/extractor-tests/generated/ConstArg/ConstArg.ql @@ -2,9 +2,8 @@ import codeql.rust.elements import TestUtils -from ConstArg x, string hasExpr -where - toBeTested(x) and - not x.isUnknown() and - if x.hasExpr() then hasExpr = "yes" else hasExpr = "no" -select x, "hasExpr:", hasExpr +query predicate instances(ConstArg x) { toBeTested(x) and not x.isUnknown() } + +query predicate getExpr(ConstArg x, Expr getExpr) { + toBeTested(x) and not x.isUnknown() and getExpr = x.getExpr() +} diff --git a/rust/ql/test/extractor-tests/generated/ConstArg/ConstArg_getExpr.expected b/rust/ql/test/extractor-tests/generated/ConstArg/ConstArg_getExpr.expected deleted file mode 100644 index c26632a25e7..00000000000 --- a/rust/ql/test/extractor-tests/generated/ConstArg/ConstArg_getExpr.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_const_arg.rs:7:11:7:11 | ConstArg | gen_const_arg.rs:7:11:7:11 | 3 | diff --git a/rust/ql/test/extractor-tests/generated/ConstArg/ConstArg_getExpr.ql b/rust/ql/test/extractor-tests/generated/ConstArg/ConstArg_getExpr.ql deleted file mode 100644 index 702328c2aac..00000000000 --- a/rust/ql/test/extractor-tests/generated/ConstArg/ConstArg_getExpr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from ConstArg x -where toBeTested(x) and not x.isUnknown() -select x, x.getExpr() diff --git a/rust/ql/test/extractor-tests/generated/ConstBlockPat/Cargo.lock b/rust/ql/test/extractor-tests/generated/ConstBlockPat/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ConstBlockPat/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/ConstBlockPat/ConstBlockPat.expected b/rust/ql/test/extractor-tests/generated/ConstBlockPat/ConstBlockPat.expected index 21feba1f729..742ac11f985 100644 --- a/rust/ql/test/extractor-tests/generated/ConstBlockPat/ConstBlockPat.expected +++ b/rust/ql/test/extractor-tests/generated/ConstBlockPat/ConstBlockPat.expected @@ -1 +1,4 @@ -| gen_const_block_pat.rs:6:9:6:27 | ConstBlockPat | hasBlockExpr: | yes | isConst: | yes | +instances +| gen_const_block_pat.rs:6:9:6:27 | ConstBlockPat | isConst: | yes | +getBlockExpr +| gen_const_block_pat.rs:6:9:6:27 | ConstBlockPat | gen_const_block_pat.rs:6:15:6:27 | { ... } | diff --git a/rust/ql/test/extractor-tests/generated/ConstBlockPat/ConstBlockPat.ql b/rust/ql/test/extractor-tests/generated/ConstBlockPat/ConstBlockPat.ql index 005f8a752c1..324b275e007 100644 --- a/rust/ql/test/extractor-tests/generated/ConstBlockPat/ConstBlockPat.ql +++ b/rust/ql/test/extractor-tests/generated/ConstBlockPat/ConstBlockPat.ql @@ -2,10 +2,13 @@ import codeql.rust.elements import TestUtils -from ConstBlockPat x, string hasBlockExpr, string isConst -where +query predicate instances(ConstBlockPat x, string isConst__label, string isConst) { toBeTested(x) and not x.isUnknown() and - (if x.hasBlockExpr() then hasBlockExpr = "yes" else hasBlockExpr = "no") and + isConst__label = "isConst:" and if x.isConst() then isConst = "yes" else isConst = "no" -select x, "hasBlockExpr:", hasBlockExpr, "isConst:", isConst +} + +query predicate getBlockExpr(ConstBlockPat x, BlockExpr getBlockExpr) { + toBeTested(x) and not x.isUnknown() and getBlockExpr = x.getBlockExpr() +} diff --git a/rust/ql/test/extractor-tests/generated/ConstBlockPat/ConstBlockPat_getBlockExpr.expected b/rust/ql/test/extractor-tests/generated/ConstBlockPat/ConstBlockPat_getBlockExpr.expected deleted file mode 100644 index 42cdb5ef4c3..00000000000 --- a/rust/ql/test/extractor-tests/generated/ConstBlockPat/ConstBlockPat_getBlockExpr.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_const_block_pat.rs:6:9:6:27 | ConstBlockPat | gen_const_block_pat.rs:6:15:6:27 | { ... } | diff --git a/rust/ql/test/extractor-tests/generated/ConstBlockPat/ConstBlockPat_getBlockExpr.ql b/rust/ql/test/extractor-tests/generated/ConstBlockPat/ConstBlockPat_getBlockExpr.ql deleted file mode 100644 index e2c0f644007..00000000000 --- a/rust/ql/test/extractor-tests/generated/ConstBlockPat/ConstBlockPat_getBlockExpr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from ConstBlockPat x -where toBeTested(x) and not x.isUnknown() -select x, x.getBlockExpr() diff --git a/rust/ql/test/extractor-tests/generated/ConstParam/Cargo.lock b/rust/ql/test/extractor-tests/generated/ConstParam/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ConstParam/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/ConstParam/ConstParam.expected b/rust/ql/test/extractor-tests/generated/ConstParam/ConstParam.expected index 9632fea6dd5..f6067623d27 100644 --- a/rust/ql/test/extractor-tests/generated/ConstParam/ConstParam.expected +++ b/rust/ql/test/extractor-tests/generated/ConstParam/ConstParam.expected @@ -1 +1,8 @@ -| gen_const_param.rs:7:17:7:30 | ConstParam | getNumberOfAttrs: | 0 | hasDefaultVal: | no | isConst: | yes | hasName: | yes | hasTypeRepr: | yes | +instances +| gen_const_param.rs:7:17:7:30 | ConstParam | isConst: | yes | +getAttr +getDefaultVal +getName +| gen_const_param.rs:7:17:7:30 | ConstParam | gen_const_param.rs:7:23:7:23 | N | +getTypeRepr +| gen_const_param.rs:7:17:7:30 | ConstParam | gen_const_param.rs:7:26:7:30 | usize | diff --git a/rust/ql/test/extractor-tests/generated/ConstParam/ConstParam.ql b/rust/ql/test/extractor-tests/generated/ConstParam/ConstParam.ql index 4f7fbab909e..cfbf6f3cc45 100644 --- a/rust/ql/test/extractor-tests/generated/ConstParam/ConstParam.ql +++ b/rust/ql/test/extractor-tests/generated/ConstParam/ConstParam.ql @@ -2,16 +2,25 @@ import codeql.rust.elements import TestUtils -from - ConstParam x, int getNumberOfAttrs, string hasDefaultVal, string isConst, string hasName, - string hasTypeRepr -where +query predicate instances(ConstParam x, string isConst__label, string isConst) { toBeTested(x) and not x.isUnknown() and - getNumberOfAttrs = x.getNumberOfAttrs() and - (if x.hasDefaultVal() then hasDefaultVal = "yes" else hasDefaultVal = "no") and - (if x.isConst() then isConst = "yes" else isConst = "no") and - (if x.hasName() then hasName = "yes" else hasName = "no") and - if x.hasTypeRepr() then hasTypeRepr = "yes" else hasTypeRepr = "no" -select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasDefaultVal:", hasDefaultVal, "isConst:", - isConst, "hasName:", hasName, "hasTypeRepr:", hasTypeRepr + isConst__label = "isConst:" and + if x.isConst() then isConst = "yes" else isConst = "no" +} + +query predicate getAttr(ConstParam x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} + +query predicate getDefaultVal(ConstParam x, ConstArg getDefaultVal) { + toBeTested(x) and not x.isUnknown() and getDefaultVal = x.getDefaultVal() +} + +query predicate getName(ConstParam x, Name getName) { + toBeTested(x) and not x.isUnknown() and getName = x.getName() +} + +query predicate getTypeRepr(ConstParam x, TypeRepr getTypeRepr) { + toBeTested(x) and not x.isUnknown() and getTypeRepr = x.getTypeRepr() +} diff --git a/rust/ql/test/extractor-tests/generated/ConstParam/ConstParam_getAttr.expected b/rust/ql/test/extractor-tests/generated/ConstParam/ConstParam_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/ConstParam/ConstParam_getAttr.ql b/rust/ql/test/extractor-tests/generated/ConstParam/ConstParam_getAttr.ql deleted file mode 100644 index ed8406eecef..00000000000 --- a/rust/ql/test/extractor-tests/generated/ConstParam/ConstParam_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from ConstParam x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/ConstParam/ConstParam_getDefaultVal.expected b/rust/ql/test/extractor-tests/generated/ConstParam/ConstParam_getDefaultVal.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/ConstParam/ConstParam_getDefaultVal.ql b/rust/ql/test/extractor-tests/generated/ConstParam/ConstParam_getDefaultVal.ql deleted file mode 100644 index f4af24f39b7..00000000000 --- a/rust/ql/test/extractor-tests/generated/ConstParam/ConstParam_getDefaultVal.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from ConstParam x -where toBeTested(x) and not x.isUnknown() -select x, x.getDefaultVal() diff --git a/rust/ql/test/extractor-tests/generated/ConstParam/ConstParam_getName.expected b/rust/ql/test/extractor-tests/generated/ConstParam/ConstParam_getName.expected deleted file mode 100644 index 65eb953a20b..00000000000 --- a/rust/ql/test/extractor-tests/generated/ConstParam/ConstParam_getName.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_const_param.rs:7:17:7:30 | ConstParam | gen_const_param.rs:7:23:7:23 | N | diff --git a/rust/ql/test/extractor-tests/generated/ConstParam/ConstParam_getName.ql b/rust/ql/test/extractor-tests/generated/ConstParam/ConstParam_getName.ql deleted file mode 100644 index 7c627d43650..00000000000 --- a/rust/ql/test/extractor-tests/generated/ConstParam/ConstParam_getName.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from ConstParam x -where toBeTested(x) and not x.isUnknown() -select x, x.getName() diff --git a/rust/ql/test/extractor-tests/generated/ConstParam/ConstParam_getTypeRepr.expected b/rust/ql/test/extractor-tests/generated/ConstParam/ConstParam_getTypeRepr.expected deleted file mode 100644 index 5a96f2d3ad6..00000000000 --- a/rust/ql/test/extractor-tests/generated/ConstParam/ConstParam_getTypeRepr.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_const_param.rs:7:17:7:30 | ConstParam | gen_const_param.rs:7:26:7:30 | usize | diff --git a/rust/ql/test/extractor-tests/generated/ConstParam/ConstParam_getTypeRepr.ql b/rust/ql/test/extractor-tests/generated/ConstParam/ConstParam_getTypeRepr.ql deleted file mode 100644 index d789f9eb144..00000000000 --- a/rust/ql/test/extractor-tests/generated/ConstParam/ConstParam_getTypeRepr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from ConstParam x -where toBeTested(x) and not x.isUnknown() -select x, x.getTypeRepr() diff --git a/rust/ql/test/extractor-tests/generated/ContinueExpr/Cargo.lock b/rust/ql/test/extractor-tests/generated/ContinueExpr/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ContinueExpr/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr.expected b/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr.expected index a09556b9a3f..e9547d569a3 100644 --- a/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr.expected +++ b/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr.expected @@ -1,2 +1,6 @@ -| gen_continue_expr.rs:7:13:7:20 | continue | getNumberOfAttrs: | 0 | hasLifetime: | no | -| gen_continue_expr.rs:12:13:12:27 | continue 'label | getNumberOfAttrs: | 0 | hasLifetime: | yes | +instances +| gen_continue_expr.rs:7:13:7:20 | continue | +| gen_continue_expr.rs:12:13:12:27 | continue 'label | +getAttr +getLifetime +| gen_continue_expr.rs:12:13:12:27 | continue 'label | gen_continue_expr.rs:12:22:12:27 | 'label | diff --git a/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr.ql b/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr.ql index 9d2e2d5177d..590b8d1faa5 100644 --- a/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr.ql +++ b/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr.ql @@ -2,10 +2,12 @@ import codeql.rust.elements import TestUtils -from ContinueExpr x, int getNumberOfAttrs, string hasLifetime -where - toBeTested(x) and - not x.isUnknown() and - getNumberOfAttrs = x.getNumberOfAttrs() and - if x.hasLifetime() then hasLifetime = "yes" else hasLifetime = "no" -select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasLifetime:", hasLifetime +query predicate instances(ContinueExpr x) { toBeTested(x) and not x.isUnknown() } + +query predicate getAttr(ContinueExpr x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} + +query predicate getLifetime(ContinueExpr x, Lifetime getLifetime) { + toBeTested(x) and not x.isUnknown() and getLifetime = x.getLifetime() +} diff --git a/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr_getAttr.ql deleted file mode 100644 index d6166fe4a29..00000000000 --- a/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from ContinueExpr x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr_getLifetime.expected b/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr_getLifetime.expected deleted file mode 100644 index 3260e45d1b7..00000000000 --- a/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr_getLifetime.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_continue_expr.rs:12:13:12:27 | continue 'label | gen_continue_expr.rs:12:22:12:27 | 'label | diff --git a/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr_getLifetime.ql b/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr_getLifetime.ql deleted file mode 100644 index 89bc6f68dd3..00000000000 --- a/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr_getLifetime.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from ContinueExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getLifetime() diff --git a/rust/ql/test/extractor-tests/generated/DynTraitTypeRepr/Cargo.lock b/rust/ql/test/extractor-tests/generated/DynTraitTypeRepr/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/DynTraitTypeRepr/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/DynTraitTypeRepr/DynTraitTypeRepr.expected b/rust/ql/test/extractor-tests/generated/DynTraitTypeRepr/DynTraitTypeRepr.expected index af1df824814..14ff9874ffb 100644 --- a/rust/ql/test/extractor-tests/generated/DynTraitTypeRepr/DynTraitTypeRepr.expected +++ b/rust/ql/test/extractor-tests/generated/DynTraitTypeRepr/DynTraitTypeRepr.expected @@ -1 +1,4 @@ -| gen_dyn_trait_type_repr.rs:7:13:7:21 | DynTraitTypeRepr | hasTypeBoundList: | yes | +instances +| gen_dyn_trait_type_repr.rs:7:13:7:21 | DynTraitTypeRepr | +getTypeBoundList +| gen_dyn_trait_type_repr.rs:7:13:7:21 | DynTraitTypeRepr | gen_dyn_trait_type_repr.rs:7:17:7:21 | TypeBoundList | diff --git a/rust/ql/test/extractor-tests/generated/DynTraitTypeRepr/DynTraitTypeRepr.ql b/rust/ql/test/extractor-tests/generated/DynTraitTypeRepr/DynTraitTypeRepr.ql index c67812dec36..e67423fadfd 100644 --- a/rust/ql/test/extractor-tests/generated/DynTraitTypeRepr/DynTraitTypeRepr.ql +++ b/rust/ql/test/extractor-tests/generated/DynTraitTypeRepr/DynTraitTypeRepr.ql @@ -2,9 +2,8 @@ import codeql.rust.elements import TestUtils -from DynTraitTypeRepr x, string hasTypeBoundList -where - toBeTested(x) and - not x.isUnknown() and - if x.hasTypeBoundList() then hasTypeBoundList = "yes" else hasTypeBoundList = "no" -select x, "hasTypeBoundList:", hasTypeBoundList +query predicate instances(DynTraitTypeRepr x) { toBeTested(x) and not x.isUnknown() } + +query predicate getTypeBoundList(DynTraitTypeRepr x, TypeBoundList getTypeBoundList) { + toBeTested(x) and not x.isUnknown() and getTypeBoundList = x.getTypeBoundList() +} diff --git a/rust/ql/test/extractor-tests/generated/DynTraitTypeRepr/DynTraitTypeRepr_getTypeBoundList.expected b/rust/ql/test/extractor-tests/generated/DynTraitTypeRepr/DynTraitTypeRepr_getTypeBoundList.expected deleted file mode 100644 index 63b58d830c1..00000000000 --- a/rust/ql/test/extractor-tests/generated/DynTraitTypeRepr/DynTraitTypeRepr_getTypeBoundList.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_dyn_trait_type_repr.rs:7:13:7:21 | DynTraitTypeRepr | gen_dyn_trait_type_repr.rs:7:17:7:21 | TypeBoundList | diff --git a/rust/ql/test/extractor-tests/generated/DynTraitTypeRepr/DynTraitTypeRepr_getTypeBoundList.ql b/rust/ql/test/extractor-tests/generated/DynTraitTypeRepr/DynTraitTypeRepr_getTypeBoundList.ql deleted file mode 100644 index f9c215991a3..00000000000 --- a/rust/ql/test/extractor-tests/generated/DynTraitTypeRepr/DynTraitTypeRepr_getTypeBoundList.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from DynTraitTypeRepr x -where toBeTested(x) and not x.isUnknown() -select x, x.getTypeBoundList() diff --git a/rust/ql/test/extractor-tests/generated/Enum/Enum.expected b/rust/ql/test/extractor-tests/generated/Enum/Enum.expected index cefb56b3334..45154c93e48 100644 --- a/rust/ql/test/extractor-tests/generated/Enum/Enum.expected +++ b/rust/ql/test/extractor-tests/generated/Enum/Enum.expected @@ -1 +1,14 @@ -| gen_enum.rs:4:5:7:34 | enum E | hasExtendedCanonicalPath: | no | hasCrateOrigin: | no | hasAttributeMacroExpansion: | no | getNumberOfDeriveMacroExpansions: | 0 | getNumberOfAttrs: | 0 | hasGenericParamList: | no | hasName: | yes | hasVariantList: | yes | hasVisibility: | no | hasWhereClause: | no | +instances +| gen_enum.rs:4:5:7:34 | enum E | +getExtendedCanonicalPath +getCrateOrigin +getAttributeMacroExpansion +getDeriveMacroExpansion +getAttr +getGenericParamList +getName +| gen_enum.rs:4:5:7:34 | enum E | gen_enum.rs:7:10:7:10 | E | +getVariantList +| gen_enum.rs:4:5:7:34 | enum E | gen_enum.rs:7:12:7:34 | VariantList | +getVisibility +getWhereClause diff --git a/rust/ql/test/extractor-tests/generated/Enum/Enum.ql b/rust/ql/test/extractor-tests/generated/Enum/Enum.ql index 4c7f7a835ac..e5c4c12693e 100644 --- a/rust/ql/test/extractor-tests/generated/Enum/Enum.ql +++ b/rust/ql/test/extractor-tests/generated/Enum/Enum.ql @@ -2,33 +2,46 @@ import codeql.rust.elements import TestUtils -from - Enum x, string hasExtendedCanonicalPath, string hasCrateOrigin, string hasAttributeMacroExpansion, - int getNumberOfDeriveMacroExpansions, int getNumberOfAttrs, string hasGenericParamList, - string hasName, string hasVariantList, string hasVisibility, string hasWhereClause -where +query predicate instances(Enum x) { toBeTested(x) and not x.isUnknown() } + +query predicate getExtendedCanonicalPath(Enum x, string getExtendedCanonicalPath) { + toBeTested(x) and not x.isUnknown() and getExtendedCanonicalPath = x.getExtendedCanonicalPath() +} + +query predicate getCrateOrigin(Enum x, string getCrateOrigin) { + toBeTested(x) and not x.isUnknown() and getCrateOrigin = x.getCrateOrigin() +} + +query predicate getAttributeMacroExpansion(Enum x, MacroItems getAttributeMacroExpansion) { toBeTested(x) and not x.isUnknown() and - ( - if x.hasExtendedCanonicalPath() - then hasExtendedCanonicalPath = "yes" - else hasExtendedCanonicalPath = "no" - ) and - (if x.hasCrateOrigin() then hasCrateOrigin = "yes" else hasCrateOrigin = "no") and - ( - if x.hasAttributeMacroExpansion() - then hasAttributeMacroExpansion = "yes" - else hasAttributeMacroExpansion = "no" - ) and - getNumberOfDeriveMacroExpansions = x.getNumberOfDeriveMacroExpansions() and - getNumberOfAttrs = x.getNumberOfAttrs() and - (if x.hasGenericParamList() then hasGenericParamList = "yes" else hasGenericParamList = "no") and - (if x.hasName() then hasName = "yes" else hasName = "no") and - (if x.hasVariantList() then hasVariantList = "yes" else hasVariantList = "no") and - (if x.hasVisibility() then hasVisibility = "yes" else hasVisibility = "no") and - if x.hasWhereClause() then hasWhereClause = "yes" else hasWhereClause = "no" -select x, "hasExtendedCanonicalPath:", hasExtendedCanonicalPath, "hasCrateOrigin:", hasCrateOrigin, - "hasAttributeMacroExpansion:", hasAttributeMacroExpansion, "getNumberOfDeriveMacroExpansions:", - getNumberOfDeriveMacroExpansions, "getNumberOfAttrs:", getNumberOfAttrs, "hasGenericParamList:", - hasGenericParamList, "hasName:", hasName, "hasVariantList:", hasVariantList, "hasVisibility:", - hasVisibility, "hasWhereClause:", hasWhereClause + getAttributeMacroExpansion = x.getAttributeMacroExpansion() +} + +query predicate getDeriveMacroExpansion(Enum x, int index, MacroItems getDeriveMacroExpansion) { + toBeTested(x) and not x.isUnknown() and getDeriveMacroExpansion = x.getDeriveMacroExpansion(index) +} + +query predicate getAttr(Enum x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} + +query predicate getGenericParamList(Enum x, GenericParamList getGenericParamList) { + toBeTested(x) and not x.isUnknown() and getGenericParamList = x.getGenericParamList() +} + +query predicate getName(Enum x, Name getName) { + toBeTested(x) and not x.isUnknown() and getName = x.getName() +} + +query predicate getVariantList(Enum x, VariantList getVariantList) { + toBeTested(x) and not x.isUnknown() and getVariantList = x.getVariantList() +} + +query predicate getVisibility(Enum x, Visibility getVisibility) { + toBeTested(x) and not x.isUnknown() and getVisibility = x.getVisibility() +} + +query predicate getWhereClause(Enum x, WhereClause getWhereClause) { + toBeTested(x) and not x.isUnknown() and getWhereClause = x.getWhereClause() +} diff --git a/rust/ql/test/extractor-tests/generated/Enum/Enum_getAttr.expected b/rust/ql/test/extractor-tests/generated/Enum/Enum_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Enum/Enum_getAttr.ql b/rust/ql/test/extractor-tests/generated/Enum/Enum_getAttr.ql deleted file mode 100644 index b2ffb4b5666..00000000000 --- a/rust/ql/test/extractor-tests/generated/Enum/Enum_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Enum x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/Enum/Enum_getAttributeMacroExpansion.expected b/rust/ql/test/extractor-tests/generated/Enum/Enum_getAttributeMacroExpansion.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Enum/Enum_getAttributeMacroExpansion.ql b/rust/ql/test/extractor-tests/generated/Enum/Enum_getAttributeMacroExpansion.ql deleted file mode 100644 index 6f0623348c4..00000000000 --- a/rust/ql/test/extractor-tests/generated/Enum/Enum_getAttributeMacroExpansion.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Enum x -where toBeTested(x) and not x.isUnknown() -select x, x.getAttributeMacroExpansion() diff --git a/rust/ql/test/extractor-tests/generated/Enum/Enum_getCrateOrigin.expected b/rust/ql/test/extractor-tests/generated/Enum/Enum_getCrateOrigin.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Enum/Enum_getCrateOrigin.ql b/rust/ql/test/extractor-tests/generated/Enum/Enum_getCrateOrigin.ql deleted file mode 100644 index 07fdc2fe5cd..00000000000 --- a/rust/ql/test/extractor-tests/generated/Enum/Enum_getCrateOrigin.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Enum x -where toBeTested(x) and not x.isUnknown() -select x, x.getCrateOrigin() diff --git a/rust/ql/test/extractor-tests/generated/Enum/Enum_getDeriveMacroExpansion.expected b/rust/ql/test/extractor-tests/generated/Enum/Enum_getDeriveMacroExpansion.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Enum/Enum_getDeriveMacroExpansion.ql b/rust/ql/test/extractor-tests/generated/Enum/Enum_getDeriveMacroExpansion.ql deleted file mode 100644 index 1bb9710f97d..00000000000 --- a/rust/ql/test/extractor-tests/generated/Enum/Enum_getDeriveMacroExpansion.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Enum x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getDeriveMacroExpansion(index) diff --git a/rust/ql/test/extractor-tests/generated/Enum/Enum_getExtendedCanonicalPath.expected b/rust/ql/test/extractor-tests/generated/Enum/Enum_getExtendedCanonicalPath.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Enum/Enum_getExtendedCanonicalPath.ql b/rust/ql/test/extractor-tests/generated/Enum/Enum_getExtendedCanonicalPath.ql deleted file mode 100644 index fa456ecd9d0..00000000000 --- a/rust/ql/test/extractor-tests/generated/Enum/Enum_getExtendedCanonicalPath.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Enum x -where toBeTested(x) and not x.isUnknown() -select x, x.getExtendedCanonicalPath() diff --git a/rust/ql/test/extractor-tests/generated/Enum/Enum_getGenericParamList.expected b/rust/ql/test/extractor-tests/generated/Enum/Enum_getGenericParamList.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Enum/Enum_getGenericParamList.ql b/rust/ql/test/extractor-tests/generated/Enum/Enum_getGenericParamList.ql deleted file mode 100644 index 79486fad3eb..00000000000 --- a/rust/ql/test/extractor-tests/generated/Enum/Enum_getGenericParamList.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Enum x -where toBeTested(x) and not x.isUnknown() -select x, x.getGenericParamList() diff --git a/rust/ql/test/extractor-tests/generated/Enum/Enum_getName.expected b/rust/ql/test/extractor-tests/generated/Enum/Enum_getName.expected deleted file mode 100644 index 0e5f3660d5e..00000000000 --- a/rust/ql/test/extractor-tests/generated/Enum/Enum_getName.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_enum.rs:4:5:7:34 | enum E | gen_enum.rs:7:10:7:10 | E | diff --git a/rust/ql/test/extractor-tests/generated/Enum/Enum_getName.ql b/rust/ql/test/extractor-tests/generated/Enum/Enum_getName.ql deleted file mode 100644 index 218e5ee494b..00000000000 --- a/rust/ql/test/extractor-tests/generated/Enum/Enum_getName.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Enum x -where toBeTested(x) and not x.isUnknown() -select x, x.getName() diff --git a/rust/ql/test/extractor-tests/generated/Enum/Enum_getVariantList.expected b/rust/ql/test/extractor-tests/generated/Enum/Enum_getVariantList.expected deleted file mode 100644 index 4827f814fac..00000000000 --- a/rust/ql/test/extractor-tests/generated/Enum/Enum_getVariantList.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_enum.rs:4:5:7:34 | enum E | gen_enum.rs:7:12:7:34 | VariantList | diff --git a/rust/ql/test/extractor-tests/generated/Enum/Enum_getVariantList.ql b/rust/ql/test/extractor-tests/generated/Enum/Enum_getVariantList.ql deleted file mode 100644 index 35af7d9d396..00000000000 --- a/rust/ql/test/extractor-tests/generated/Enum/Enum_getVariantList.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Enum x -where toBeTested(x) and not x.isUnknown() -select x, x.getVariantList() diff --git a/rust/ql/test/extractor-tests/generated/Enum/Enum_getVisibility.expected b/rust/ql/test/extractor-tests/generated/Enum/Enum_getVisibility.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Enum/Enum_getVisibility.ql b/rust/ql/test/extractor-tests/generated/Enum/Enum_getVisibility.ql deleted file mode 100644 index b437e30e2ca..00000000000 --- a/rust/ql/test/extractor-tests/generated/Enum/Enum_getVisibility.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Enum x -where toBeTested(x) and not x.isUnknown() -select x, x.getVisibility() diff --git a/rust/ql/test/extractor-tests/generated/Enum/Enum_getWhereClause.expected b/rust/ql/test/extractor-tests/generated/Enum/Enum_getWhereClause.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Enum/Enum_getWhereClause.ql b/rust/ql/test/extractor-tests/generated/Enum/Enum_getWhereClause.ql deleted file mode 100644 index b9aaa3f3499..00000000000 --- a/rust/ql/test/extractor-tests/generated/Enum/Enum_getWhereClause.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Enum x -where toBeTested(x) and not x.isUnknown() -select x, x.getWhereClause() diff --git a/rust/ql/test/extractor-tests/generated/ExprStmt/Cargo.lock b/rust/ql/test/extractor-tests/generated/ExprStmt/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ExprStmt/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/ExprStmt/ExprStmt.expected b/rust/ql/test/extractor-tests/generated/ExprStmt/ExprStmt.expected index 61f85c10f9e..35db91b7cfb 100644 --- a/rust/ql/test/extractor-tests/generated/ExprStmt/ExprStmt.expected +++ b/rust/ql/test/extractor-tests/generated/ExprStmt/ExprStmt.expected @@ -1,2 +1,6 @@ -| gen_expr_stmt.rs:5:5:5:12 | ExprStmt | hasExpr: | yes | -| gen_expr_stmt.rs:6:5:6:13 | ExprStmt | hasExpr: | yes | +instances +| gen_expr_stmt.rs:5:5:5:12 | ExprStmt | +| gen_expr_stmt.rs:6:5:6:13 | ExprStmt | +getExpr +| gen_expr_stmt.rs:5:5:5:12 | ExprStmt | gen_expr_stmt.rs:5:5:5:11 | start(...) | +| gen_expr_stmt.rs:6:5:6:13 | ExprStmt | gen_expr_stmt.rs:6:5:6:12 | finish(...) | diff --git a/rust/ql/test/extractor-tests/generated/ExprStmt/ExprStmt.ql b/rust/ql/test/extractor-tests/generated/ExprStmt/ExprStmt.ql index 977516d1eea..34995cf5014 100644 --- a/rust/ql/test/extractor-tests/generated/ExprStmt/ExprStmt.ql +++ b/rust/ql/test/extractor-tests/generated/ExprStmt/ExprStmt.ql @@ -2,9 +2,8 @@ import codeql.rust.elements import TestUtils -from ExprStmt x, string hasExpr -where - toBeTested(x) and - not x.isUnknown() and - if x.hasExpr() then hasExpr = "yes" else hasExpr = "no" -select x, "hasExpr:", hasExpr +query predicate instances(ExprStmt x) { toBeTested(x) and not x.isUnknown() } + +query predicate getExpr(ExprStmt x, Expr getExpr) { + toBeTested(x) and not x.isUnknown() and getExpr = x.getExpr() +} diff --git a/rust/ql/test/extractor-tests/generated/ExprStmt/ExprStmt_getExpr.expected b/rust/ql/test/extractor-tests/generated/ExprStmt/ExprStmt_getExpr.expected deleted file mode 100644 index 1cacf1e8424..00000000000 --- a/rust/ql/test/extractor-tests/generated/ExprStmt/ExprStmt_getExpr.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_expr_stmt.rs:5:5:5:12 | ExprStmt | gen_expr_stmt.rs:5:5:5:11 | start(...) | -| gen_expr_stmt.rs:6:5:6:13 | ExprStmt | gen_expr_stmt.rs:6:5:6:12 | finish(...) | diff --git a/rust/ql/test/extractor-tests/generated/ExprStmt/ExprStmt_getExpr.ql b/rust/ql/test/extractor-tests/generated/ExprStmt/ExprStmt_getExpr.ql deleted file mode 100644 index df142202a02..00000000000 --- a/rust/ql/test/extractor-tests/generated/ExprStmt/ExprStmt_getExpr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from ExprStmt x -where toBeTested(x) and not x.isUnknown() -select x, x.getExpr() diff --git a/rust/ql/test/extractor-tests/generated/ExternBlock/Cargo.lock b/rust/ql/test/extractor-tests/generated/ExternBlock/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ExternBlock/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock.expected b/rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock.expected index 9c06abfad70..8e061f24a56 100644 --- a/rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock.expected +++ b/rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock.expected @@ -1 +1,10 @@ -| gen_extern_block.rs:7:5:9:5 | ExternBlock | hasExtendedCanonicalPath: | no | hasCrateOrigin: | no | hasAttributeMacroExpansion: | no | hasAbi: | yes | getNumberOfAttrs: | 0 | hasExternItemList: | yes | isUnsafe: | no | +instances +| gen_extern_block.rs:7:5:9:5 | ExternBlock | isUnsafe: | no | +getExtendedCanonicalPath +getCrateOrigin +getAttributeMacroExpansion +getAbi +| gen_extern_block.rs:7:5:9:5 | ExternBlock | gen_extern_block.rs:7:5:7:14 | Abi | +getAttr +getExternItemList +| gen_extern_block.rs:7:5:9:5 | ExternBlock | gen_extern_block.rs:7:16:9:5 | ExternItemList | diff --git a/rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock.ql b/rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock.ql index e7ef0f90fe9..2f07e5dfcae 100644 --- a/rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock.ql +++ b/rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock.ql @@ -2,28 +2,35 @@ import codeql.rust.elements import TestUtils -from - ExternBlock x, string hasExtendedCanonicalPath, string hasCrateOrigin, - string hasAttributeMacroExpansion, string hasAbi, int getNumberOfAttrs, string hasExternItemList, - string isUnsafe -where +query predicate instances(ExternBlock x, string isUnsafe__label, string isUnsafe) { toBeTested(x) and not x.isUnknown() and - ( - if x.hasExtendedCanonicalPath() - then hasExtendedCanonicalPath = "yes" - else hasExtendedCanonicalPath = "no" - ) and - (if x.hasCrateOrigin() then hasCrateOrigin = "yes" else hasCrateOrigin = "no") and - ( - if x.hasAttributeMacroExpansion() - then hasAttributeMacroExpansion = "yes" - else hasAttributeMacroExpansion = "no" - ) and - (if x.hasAbi() then hasAbi = "yes" else hasAbi = "no") and - getNumberOfAttrs = x.getNumberOfAttrs() and - (if x.hasExternItemList() then hasExternItemList = "yes" else hasExternItemList = "no") and + isUnsafe__label = "isUnsafe:" and if x.isUnsafe() then isUnsafe = "yes" else isUnsafe = "no" -select x, "hasExtendedCanonicalPath:", hasExtendedCanonicalPath, "hasCrateOrigin:", hasCrateOrigin, - "hasAttributeMacroExpansion:", hasAttributeMacroExpansion, "hasAbi:", hasAbi, "getNumberOfAttrs:", - getNumberOfAttrs, "hasExternItemList:", hasExternItemList, "isUnsafe:", isUnsafe +} + +query predicate getExtendedCanonicalPath(ExternBlock x, string getExtendedCanonicalPath) { + toBeTested(x) and not x.isUnknown() and getExtendedCanonicalPath = x.getExtendedCanonicalPath() +} + +query predicate getCrateOrigin(ExternBlock x, string getCrateOrigin) { + toBeTested(x) and not x.isUnknown() and getCrateOrigin = x.getCrateOrigin() +} + +query predicate getAttributeMacroExpansion(ExternBlock x, MacroItems getAttributeMacroExpansion) { + toBeTested(x) and + not x.isUnknown() and + getAttributeMacroExpansion = x.getAttributeMacroExpansion() +} + +query predicate getAbi(ExternBlock x, Abi getAbi) { + toBeTested(x) and not x.isUnknown() and getAbi = x.getAbi() +} + +query predicate getAttr(ExternBlock x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} + +query predicate getExternItemList(ExternBlock x, ExternItemList getExternItemList) { + toBeTested(x) and not x.isUnknown() and getExternItemList = x.getExternItemList() +} diff --git a/rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock_getAbi.expected b/rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock_getAbi.expected deleted file mode 100644 index ea8e7797362..00000000000 --- a/rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock_getAbi.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_extern_block.rs:7:5:9:5 | ExternBlock | gen_extern_block.rs:7:5:7:14 | Abi | diff --git a/rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock_getAbi.ql b/rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock_getAbi.ql deleted file mode 100644 index d713045ef75..00000000000 --- a/rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock_getAbi.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from ExternBlock x -where toBeTested(x) and not x.isUnknown() -select x, x.getAbi() diff --git a/rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock_getAttr.expected b/rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock_getAttr.ql b/rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock_getAttr.ql deleted file mode 100644 index 2ac7fc2aa72..00000000000 --- a/rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from ExternBlock x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock_getAttributeMacroExpansion.expected b/rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock_getAttributeMacroExpansion.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock_getAttributeMacroExpansion.ql b/rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock_getAttributeMacroExpansion.ql deleted file mode 100644 index f3b6ad363fa..00000000000 --- a/rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock_getAttributeMacroExpansion.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from ExternBlock x -where toBeTested(x) and not x.isUnknown() -select x, x.getAttributeMacroExpansion() diff --git a/rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock_getCrateOrigin.expected b/rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock_getCrateOrigin.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock_getCrateOrigin.ql b/rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock_getCrateOrigin.ql deleted file mode 100644 index 5be455fe7d2..00000000000 --- a/rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock_getCrateOrigin.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from ExternBlock x -where toBeTested(x) and not x.isUnknown() -select x, x.getCrateOrigin() diff --git a/rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock_getExtendedCanonicalPath.expected b/rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock_getExtendedCanonicalPath.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock_getExtendedCanonicalPath.ql b/rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock_getExtendedCanonicalPath.ql deleted file mode 100644 index f0bd607a179..00000000000 --- a/rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock_getExtendedCanonicalPath.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from ExternBlock x -where toBeTested(x) and not x.isUnknown() -select x, x.getExtendedCanonicalPath() diff --git a/rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock_getExternItemList.expected b/rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock_getExternItemList.expected deleted file mode 100644 index 83bb34c61ab..00000000000 --- a/rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock_getExternItemList.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_extern_block.rs:7:5:9:5 | ExternBlock | gen_extern_block.rs:7:16:9:5 | ExternItemList | diff --git a/rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock_getExternItemList.ql b/rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock_getExternItemList.ql deleted file mode 100644 index 6d04cb67441..00000000000 --- a/rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock_getExternItemList.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from ExternBlock x -where toBeTested(x) and not x.isUnknown() -select x, x.getExternItemList() diff --git a/rust/ql/test/extractor-tests/generated/ExternCrate/Cargo.lock b/rust/ql/test/extractor-tests/generated/ExternCrate/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ExternCrate/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate.expected b/rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate.expected index f47afb2acb5..6e1b1a84e1a 100644 --- a/rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate.expected +++ b/rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate.expected @@ -1 +1,10 @@ -| gen_extern_crate.rs:4:5:7:23 | ExternCrate | hasExtendedCanonicalPath: | no | hasCrateOrigin: | no | hasAttributeMacroExpansion: | no | getNumberOfAttrs: | 0 | hasIdentifier: | yes | hasRename: | no | hasVisibility: | no | +instances +| gen_extern_crate.rs:4:5:7:23 | ExternCrate | +getExtendedCanonicalPath +getCrateOrigin +getAttributeMacroExpansion +getAttr +getIdentifier +| gen_extern_crate.rs:4:5:7:23 | ExternCrate | gen_extern_crate.rs:7:18:7:22 | serde | +getRename +getVisibility diff --git a/rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate.ql b/rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate.ql index cbcfd462473..b0c2c372896 100644 --- a/rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate.ql +++ b/rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate.ql @@ -2,28 +2,34 @@ import codeql.rust.elements import TestUtils -from - ExternCrate x, string hasExtendedCanonicalPath, string hasCrateOrigin, - string hasAttributeMacroExpansion, int getNumberOfAttrs, string hasIdentifier, string hasRename, - string hasVisibility -where +query predicate instances(ExternCrate x) { toBeTested(x) and not x.isUnknown() } + +query predicate getExtendedCanonicalPath(ExternCrate x, string getExtendedCanonicalPath) { + toBeTested(x) and not x.isUnknown() and getExtendedCanonicalPath = x.getExtendedCanonicalPath() +} + +query predicate getCrateOrigin(ExternCrate x, string getCrateOrigin) { + toBeTested(x) and not x.isUnknown() and getCrateOrigin = x.getCrateOrigin() +} + +query predicate getAttributeMacroExpansion(ExternCrate x, MacroItems getAttributeMacroExpansion) { toBeTested(x) and not x.isUnknown() and - ( - if x.hasExtendedCanonicalPath() - then hasExtendedCanonicalPath = "yes" - else hasExtendedCanonicalPath = "no" - ) and - (if x.hasCrateOrigin() then hasCrateOrigin = "yes" else hasCrateOrigin = "no") and - ( - if x.hasAttributeMacroExpansion() - then hasAttributeMacroExpansion = "yes" - else hasAttributeMacroExpansion = "no" - ) and - getNumberOfAttrs = x.getNumberOfAttrs() and - (if x.hasIdentifier() then hasIdentifier = "yes" else hasIdentifier = "no") and - (if x.hasRename() then hasRename = "yes" else hasRename = "no") and - if x.hasVisibility() then hasVisibility = "yes" else hasVisibility = "no" -select x, "hasExtendedCanonicalPath:", hasExtendedCanonicalPath, "hasCrateOrigin:", hasCrateOrigin, - "hasAttributeMacroExpansion:", hasAttributeMacroExpansion, "getNumberOfAttrs:", getNumberOfAttrs, - "hasIdentifier:", hasIdentifier, "hasRename:", hasRename, "hasVisibility:", hasVisibility + getAttributeMacroExpansion = x.getAttributeMacroExpansion() +} + +query predicate getAttr(ExternCrate x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} + +query predicate getIdentifier(ExternCrate x, NameRef getIdentifier) { + toBeTested(x) and not x.isUnknown() and getIdentifier = x.getIdentifier() +} + +query predicate getRename(ExternCrate x, Rename getRename) { + toBeTested(x) and not x.isUnknown() and getRename = x.getRename() +} + +query predicate getVisibility(ExternCrate x, Visibility getVisibility) { + toBeTested(x) and not x.isUnknown() and getVisibility = x.getVisibility() +} diff --git a/rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate_getAttr.expected b/rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate_getAttr.ql b/rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate_getAttr.ql deleted file mode 100644 index 68edd573a7a..00000000000 --- a/rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from ExternCrate x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate_getAttributeMacroExpansion.expected b/rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate_getAttributeMacroExpansion.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate_getAttributeMacroExpansion.ql b/rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate_getAttributeMacroExpansion.ql deleted file mode 100644 index 0c7c0e8c89d..00000000000 --- a/rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate_getAttributeMacroExpansion.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from ExternCrate x -where toBeTested(x) and not x.isUnknown() -select x, x.getAttributeMacroExpansion() diff --git a/rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate_getCrateOrigin.expected b/rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate_getCrateOrigin.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate_getCrateOrigin.ql b/rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate_getCrateOrigin.ql deleted file mode 100644 index b6b74730fe4..00000000000 --- a/rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate_getCrateOrigin.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from ExternCrate x -where toBeTested(x) and not x.isUnknown() -select x, x.getCrateOrigin() diff --git a/rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate_getExtendedCanonicalPath.expected b/rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate_getExtendedCanonicalPath.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate_getExtendedCanonicalPath.ql b/rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate_getExtendedCanonicalPath.ql deleted file mode 100644 index 15959426eed..00000000000 --- a/rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate_getExtendedCanonicalPath.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from ExternCrate x -where toBeTested(x) and not x.isUnknown() -select x, x.getExtendedCanonicalPath() diff --git a/rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate_getIdentifier.expected b/rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate_getIdentifier.expected deleted file mode 100644 index 3e545d1761d..00000000000 --- a/rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate_getIdentifier.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_extern_crate.rs:4:5:7:23 | ExternCrate | gen_extern_crate.rs:7:18:7:22 | serde | diff --git a/rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate_getIdentifier.ql b/rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate_getIdentifier.ql deleted file mode 100644 index 1a8f5693f13..00000000000 --- a/rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate_getIdentifier.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from ExternCrate x -where toBeTested(x) and not x.isUnknown() -select x, x.getIdentifier() diff --git a/rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate_getRename.expected b/rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate_getRename.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate_getRename.ql b/rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate_getRename.ql deleted file mode 100644 index 82df3d60e05..00000000000 --- a/rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate_getRename.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from ExternCrate x -where toBeTested(x) and not x.isUnknown() -select x, x.getRename() diff --git a/rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate_getVisibility.expected b/rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate_getVisibility.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate_getVisibility.ql b/rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate_getVisibility.ql deleted file mode 100644 index e7a9b316e1b..00000000000 --- a/rust/ql/test/extractor-tests/generated/ExternCrate/ExternCrate_getVisibility.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from ExternCrate x -where toBeTested(x) and not x.isUnknown() -select x, x.getVisibility() diff --git a/rust/ql/test/extractor-tests/generated/ExternItemList/Cargo.lock b/rust/ql/test/extractor-tests/generated/ExternItemList/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ExternItemList/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/ExternItemList/ExternItemList.expected b/rust/ql/test/extractor-tests/generated/ExternItemList/ExternItemList.expected index 9cc7190339f..8b6eb94b1b2 100644 --- a/rust/ql/test/extractor-tests/generated/ExternItemList/ExternItemList.expected +++ b/rust/ql/test/extractor-tests/generated/ExternItemList/ExternItemList.expected @@ -1 +1,6 @@ -| gen_extern_item_list.rs:7:16:10:5 | ExternItemList | getNumberOfAttrs: | 0 | getNumberOfExternItems: | 2 | +instances +| gen_extern_item_list.rs:7:16:10:5 | ExternItemList | +getAttr +getExternItem +| gen_extern_item_list.rs:7:16:10:5 | ExternItemList | 0 | gen_extern_item_list.rs:8:9:8:17 | fn foo | +| gen_extern_item_list.rs:7:16:10:5 | ExternItemList | 1 | gen_extern_item_list.rs:9:9:9:24 | Static | diff --git a/rust/ql/test/extractor-tests/generated/ExternItemList/ExternItemList.ql b/rust/ql/test/extractor-tests/generated/ExternItemList/ExternItemList.ql index e9530f3c1aa..b947daaff64 100644 --- a/rust/ql/test/extractor-tests/generated/ExternItemList/ExternItemList.ql +++ b/rust/ql/test/extractor-tests/generated/ExternItemList/ExternItemList.ql @@ -2,10 +2,12 @@ import codeql.rust.elements import TestUtils -from ExternItemList x, int getNumberOfAttrs, int getNumberOfExternItems -where - toBeTested(x) and - not x.isUnknown() and - getNumberOfAttrs = x.getNumberOfAttrs() and - getNumberOfExternItems = x.getNumberOfExternItems() -select x, "getNumberOfAttrs:", getNumberOfAttrs, "getNumberOfExternItems:", getNumberOfExternItems +query predicate instances(ExternItemList x) { toBeTested(x) and not x.isUnknown() } + +query predicate getAttr(ExternItemList x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} + +query predicate getExternItem(ExternItemList x, int index, ExternItem getExternItem) { + toBeTested(x) and not x.isUnknown() and getExternItem = x.getExternItem(index) +} diff --git a/rust/ql/test/extractor-tests/generated/ExternItemList/ExternItemList_getAttr.expected b/rust/ql/test/extractor-tests/generated/ExternItemList/ExternItemList_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/ExternItemList/ExternItemList_getAttr.ql b/rust/ql/test/extractor-tests/generated/ExternItemList/ExternItemList_getAttr.ql deleted file mode 100644 index 33a1c2f4c5c..00000000000 --- a/rust/ql/test/extractor-tests/generated/ExternItemList/ExternItemList_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from ExternItemList x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/ExternItemList/ExternItemList_getExternItem.expected b/rust/ql/test/extractor-tests/generated/ExternItemList/ExternItemList_getExternItem.expected deleted file mode 100644 index a1f1b91aca6..00000000000 --- a/rust/ql/test/extractor-tests/generated/ExternItemList/ExternItemList_getExternItem.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_extern_item_list.rs:7:16:10:5 | ExternItemList | 0 | gen_extern_item_list.rs:8:9:8:17 | fn foo | -| gen_extern_item_list.rs:7:16:10:5 | ExternItemList | 1 | gen_extern_item_list.rs:9:9:9:24 | Static | diff --git a/rust/ql/test/extractor-tests/generated/ExternItemList/ExternItemList_getExternItem.ql b/rust/ql/test/extractor-tests/generated/ExternItemList/ExternItemList_getExternItem.ql deleted file mode 100644 index d4be03a1d47..00000000000 --- a/rust/ql/test/extractor-tests/generated/ExternItemList/ExternItemList_getExternItem.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from ExternItemList x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getExternItem(index) diff --git a/rust/ql/test/extractor-tests/generated/FieldExpr/Cargo.lock b/rust/ql/test/extractor-tests/generated/FieldExpr/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/FieldExpr/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr.expected b/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr.expected index 9bb0e244fd1..dab9e4a05b4 100644 --- a/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr.expected +++ b/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr.expected @@ -1 +1,7 @@ -| gen_field_expr.rs:5:5:5:9 | x.foo | getNumberOfAttrs: | 0 | hasContainer: | yes | hasIdentifier: | yes | +instances +| gen_field_expr.rs:5:5:5:9 | x.foo | +getAttr +getContainer +| gen_field_expr.rs:5:5:5:9 | x.foo | gen_field_expr.rs:5:5:5:5 | x | +getIdentifier +| gen_field_expr.rs:5:5:5:9 | x.foo | gen_field_expr.rs:5:7:5:9 | foo | diff --git a/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr.ql b/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr.ql index 631e15698b6..49780f145b8 100644 --- a/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr.ql +++ b/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr.ql @@ -2,12 +2,16 @@ import codeql.rust.elements import TestUtils -from FieldExpr x, int getNumberOfAttrs, string hasContainer, string hasIdentifier -where - toBeTested(x) and - not x.isUnknown() and - getNumberOfAttrs = x.getNumberOfAttrs() and - (if x.hasContainer() then hasContainer = "yes" else hasContainer = "no") and - if x.hasIdentifier() then hasIdentifier = "yes" else hasIdentifier = "no" -select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasContainer:", hasContainer, "hasIdentifier:", - hasIdentifier +query predicate instances(FieldExpr x) { toBeTested(x) and not x.isUnknown() } + +query predicate getAttr(FieldExpr x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} + +query predicate getContainer(FieldExpr x, Expr getContainer) { + toBeTested(x) and not x.isUnknown() and getContainer = x.getContainer() +} + +query predicate getIdentifier(FieldExpr x, NameRef getIdentifier) { + toBeTested(x) and not x.isUnknown() and getIdentifier = x.getIdentifier() +} diff --git a/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr_getAttr.ql deleted file mode 100644 index eeaad96fb6a..00000000000 --- a/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from FieldExpr x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr_getContainer.expected b/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr_getContainer.expected deleted file mode 100644 index 7d21f7f7af8..00000000000 --- a/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr_getContainer.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_field_expr.rs:5:5:5:9 | x.foo | gen_field_expr.rs:5:5:5:5 | x | diff --git a/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr_getContainer.ql b/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr_getContainer.ql deleted file mode 100644 index b32e302ad91..00000000000 --- a/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr_getContainer.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from FieldExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getContainer() diff --git a/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr_getIdentifier.expected b/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr_getIdentifier.expected deleted file mode 100644 index 0722ca1aaf2..00000000000 --- a/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr_getIdentifier.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_field_expr.rs:5:5:5:9 | x.foo | gen_field_expr.rs:5:7:5:9 | foo | diff --git a/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr_getIdentifier.ql b/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr_getIdentifier.ql deleted file mode 100644 index 766fc85ab0f..00000000000 --- a/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr_getIdentifier.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from FieldExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getIdentifier() diff --git a/rust/ql/test/extractor-tests/generated/FnPtrTypeRepr/Cargo.lock b/rust/ql/test/extractor-tests/generated/FnPtrTypeRepr/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/FnPtrTypeRepr/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/FnPtrTypeRepr/FnPtrTypeRepr.expected b/rust/ql/test/extractor-tests/generated/FnPtrTypeRepr/FnPtrTypeRepr.expected index e70c54798b2..1e61549b3f3 100644 --- a/rust/ql/test/extractor-tests/generated/FnPtrTypeRepr/FnPtrTypeRepr.expected +++ b/rust/ql/test/extractor-tests/generated/FnPtrTypeRepr/FnPtrTypeRepr.expected @@ -1 +1,7 @@ -| gen_fn_ptr_type_repr.rs:7:12:7:25 | FnPtrTypeRepr | hasAbi: | no | isAsync: | no | isConst: | no | isUnsafe: | no | hasParamList: | yes | hasRetType: | yes | +instances +| gen_fn_ptr_type_repr.rs:7:12:7:25 | FnPtrTypeRepr | isAsync: | no | isConst: | no | isUnsafe: | no | +getAbi +getParamList +| gen_fn_ptr_type_repr.rs:7:12:7:25 | FnPtrTypeRepr | gen_fn_ptr_type_repr.rs:7:14:7:18 | ParamList | +getRetType +| gen_fn_ptr_type_repr.rs:7:12:7:25 | FnPtrTypeRepr | gen_fn_ptr_type_repr.rs:7:20:7:25 | RetTypeRepr | diff --git a/rust/ql/test/extractor-tests/generated/FnPtrTypeRepr/FnPtrTypeRepr.ql b/rust/ql/test/extractor-tests/generated/FnPtrTypeRepr/FnPtrTypeRepr.ql index a3f3b81fcde..47cbb8ee28c 100644 --- a/rust/ql/test/extractor-tests/generated/FnPtrTypeRepr/FnPtrTypeRepr.ql +++ b/rust/ql/test/extractor-tests/generated/FnPtrTypeRepr/FnPtrTypeRepr.ql @@ -2,17 +2,28 @@ import codeql.rust.elements import TestUtils -from - FnPtrTypeRepr x, string hasAbi, string isAsync, string isConst, string isUnsafe, - string hasParamList, string hasRetType -where +query predicate instances( + FnPtrTypeRepr x, string isAsync__label, string isAsync, string isConst__label, string isConst, + string isUnsafe__label, string isUnsafe +) { toBeTested(x) and not x.isUnknown() and - (if x.hasAbi() then hasAbi = "yes" else hasAbi = "no") and + isAsync__label = "isAsync:" and (if x.isAsync() then isAsync = "yes" else isAsync = "no") and + isConst__label = "isConst:" and (if x.isConst() then isConst = "yes" else isConst = "no") and - (if x.isUnsafe() then isUnsafe = "yes" else isUnsafe = "no") and - (if x.hasParamList() then hasParamList = "yes" else hasParamList = "no") and - if x.hasRetType() then hasRetType = "yes" else hasRetType = "no" -select x, "hasAbi:", hasAbi, "isAsync:", isAsync, "isConst:", isConst, "isUnsafe:", isUnsafe, - "hasParamList:", hasParamList, "hasRetType:", hasRetType + isUnsafe__label = "isUnsafe:" and + if x.isUnsafe() then isUnsafe = "yes" else isUnsafe = "no" +} + +query predicate getAbi(FnPtrTypeRepr x, Abi getAbi) { + toBeTested(x) and not x.isUnknown() and getAbi = x.getAbi() +} + +query predicate getParamList(FnPtrTypeRepr x, ParamList getParamList) { + toBeTested(x) and not x.isUnknown() and getParamList = x.getParamList() +} + +query predicate getRetType(FnPtrTypeRepr x, RetTypeRepr getRetType) { + toBeTested(x) and not x.isUnknown() and getRetType = x.getRetType() +} diff --git a/rust/ql/test/extractor-tests/generated/FnPtrTypeRepr/FnPtrTypeRepr_getAbi.expected b/rust/ql/test/extractor-tests/generated/FnPtrTypeRepr/FnPtrTypeRepr_getAbi.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/FnPtrTypeRepr/FnPtrTypeRepr_getAbi.ql b/rust/ql/test/extractor-tests/generated/FnPtrTypeRepr/FnPtrTypeRepr_getAbi.ql deleted file mode 100644 index 738031ddf22..00000000000 --- a/rust/ql/test/extractor-tests/generated/FnPtrTypeRepr/FnPtrTypeRepr_getAbi.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from FnPtrTypeRepr x -where toBeTested(x) and not x.isUnknown() -select x, x.getAbi() diff --git a/rust/ql/test/extractor-tests/generated/FnPtrTypeRepr/FnPtrTypeRepr_getParamList.expected b/rust/ql/test/extractor-tests/generated/FnPtrTypeRepr/FnPtrTypeRepr_getParamList.expected deleted file mode 100644 index 26e6ae2ef9f..00000000000 --- a/rust/ql/test/extractor-tests/generated/FnPtrTypeRepr/FnPtrTypeRepr_getParamList.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_fn_ptr_type_repr.rs:7:12:7:25 | FnPtrTypeRepr | gen_fn_ptr_type_repr.rs:7:14:7:18 | ParamList | diff --git a/rust/ql/test/extractor-tests/generated/FnPtrTypeRepr/FnPtrTypeRepr_getParamList.ql b/rust/ql/test/extractor-tests/generated/FnPtrTypeRepr/FnPtrTypeRepr_getParamList.ql deleted file mode 100644 index bc5b5d935ca..00000000000 --- a/rust/ql/test/extractor-tests/generated/FnPtrTypeRepr/FnPtrTypeRepr_getParamList.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from FnPtrTypeRepr x -where toBeTested(x) and not x.isUnknown() -select x, x.getParamList() diff --git a/rust/ql/test/extractor-tests/generated/FnPtrTypeRepr/FnPtrTypeRepr_getRetType.expected b/rust/ql/test/extractor-tests/generated/FnPtrTypeRepr/FnPtrTypeRepr_getRetType.expected deleted file mode 100644 index 244765e9506..00000000000 --- a/rust/ql/test/extractor-tests/generated/FnPtrTypeRepr/FnPtrTypeRepr_getRetType.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_fn_ptr_type_repr.rs:7:12:7:25 | FnPtrTypeRepr | gen_fn_ptr_type_repr.rs:7:20:7:25 | RetTypeRepr | diff --git a/rust/ql/test/extractor-tests/generated/FnPtrTypeRepr/FnPtrTypeRepr_getRetType.ql b/rust/ql/test/extractor-tests/generated/FnPtrTypeRepr/FnPtrTypeRepr_getRetType.ql deleted file mode 100644 index a0bd1df08d9..00000000000 --- a/rust/ql/test/extractor-tests/generated/FnPtrTypeRepr/FnPtrTypeRepr_getRetType.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from FnPtrTypeRepr x -where toBeTested(x) and not x.isUnknown() -select x, x.getRetType() diff --git a/rust/ql/test/extractor-tests/generated/ForExpr/Cargo.lock b/rust/ql/test/extractor-tests/generated/ForExpr/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ForExpr/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr.expected b/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr.expected index afe5349abb5..2e91473136f 100644 --- a/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr.expected +++ b/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr.expected @@ -1 +1,10 @@ -| gen_for_expr.rs:7:5:9:5 | for ... in ... { ... } | hasLabel: | no | hasLoopBody: | yes | getNumberOfAttrs: | 0 | hasIterable: | yes | hasPat: | yes | +instances +| gen_for_expr.rs:7:5:9:5 | for ... in ... { ... } | +getLabel +getLoopBody +| gen_for_expr.rs:7:5:9:5 | for ... in ... { ... } | gen_for_expr.rs:7:20:9:5 | { ... } | +getAttr +getIterable +| gen_for_expr.rs:7:5:9:5 | for ... in ... { ... } | gen_for_expr.rs:7:14:7:18 | 0..10 | +getPat +| gen_for_expr.rs:7:5:9:5 | for ... in ... { ... } | gen_for_expr.rs:7:9:7:9 | x | diff --git a/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr.ql b/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr.ql index 60f5ab1e080..1bb7bba5c49 100644 --- a/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr.ql +++ b/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr.ql @@ -2,16 +2,24 @@ import codeql.rust.elements import TestUtils -from - ForExpr x, string hasLabel, string hasLoopBody, int getNumberOfAttrs, string hasIterable, - string hasPat -where - toBeTested(x) and - not x.isUnknown() and - (if x.hasLabel() then hasLabel = "yes" else hasLabel = "no") and - (if x.hasLoopBody() then hasLoopBody = "yes" else hasLoopBody = "no") and - getNumberOfAttrs = x.getNumberOfAttrs() and - (if x.hasIterable() then hasIterable = "yes" else hasIterable = "no") and - if x.hasPat() then hasPat = "yes" else hasPat = "no" -select x, "hasLabel:", hasLabel, "hasLoopBody:", hasLoopBody, "getNumberOfAttrs:", getNumberOfAttrs, - "hasIterable:", hasIterable, "hasPat:", hasPat +query predicate instances(ForExpr x) { toBeTested(x) and not x.isUnknown() } + +query predicate getLabel(ForExpr x, Label getLabel) { + toBeTested(x) and not x.isUnknown() and getLabel = x.getLabel() +} + +query predicate getLoopBody(ForExpr x, BlockExpr getLoopBody) { + toBeTested(x) and not x.isUnknown() and getLoopBody = x.getLoopBody() +} + +query predicate getAttr(ForExpr x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} + +query predicate getIterable(ForExpr x, Expr getIterable) { + toBeTested(x) and not x.isUnknown() and getIterable = x.getIterable() +} + +query predicate getPat(ForExpr x, Pat getPat) { + toBeTested(x) and not x.isUnknown() and getPat = x.getPat() +} diff --git a/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr_getAttr.ql deleted file mode 100644 index c348759b84e..00000000000 --- a/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from ForExpr x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr_getIterable.expected b/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr_getIterable.expected deleted file mode 100644 index d73979b6df8..00000000000 --- a/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr_getIterable.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_for_expr.rs:7:5:9:5 | for ... in ... { ... } | gen_for_expr.rs:7:14:7:18 | 0..10 | diff --git a/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr_getIterable.ql b/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr_getIterable.ql deleted file mode 100644 index 74218990350..00000000000 --- a/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr_getIterable.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from ForExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getIterable() diff --git a/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr_getLabel.expected b/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr_getLabel.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr_getLabel.ql b/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr_getLabel.ql deleted file mode 100644 index 019495fcf98..00000000000 --- a/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr_getLabel.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from ForExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getLabel() diff --git a/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr_getLoopBody.expected b/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr_getLoopBody.expected deleted file mode 100644 index d0460f8ed7a..00000000000 --- a/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr_getLoopBody.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_for_expr.rs:7:5:9:5 | for ... in ... { ... } | gen_for_expr.rs:7:20:9:5 | { ... } | diff --git a/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr_getLoopBody.ql b/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr_getLoopBody.ql deleted file mode 100644 index 5cc166fa96f..00000000000 --- a/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr_getLoopBody.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from ForExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getLoopBody() diff --git a/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr_getPat.expected b/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr_getPat.expected deleted file mode 100644 index 44c312073f9..00000000000 --- a/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr_getPat.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_for_expr.rs:7:5:9:5 | for ... in ... { ... } | gen_for_expr.rs:7:9:7:9 | x | diff --git a/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr_getPat.ql b/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr_getPat.ql deleted file mode 100644 index 9f83218ea31..00000000000 --- a/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr_getPat.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from ForExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getPat() diff --git a/rust/ql/test/extractor-tests/generated/ForTypeRepr/Cargo.lock b/rust/ql/test/extractor-tests/generated/ForTypeRepr/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ForTypeRepr/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/ForTypeRepr/ForTypeRepr.expected b/rust/ql/test/extractor-tests/generated/ForTypeRepr/ForTypeRepr.expected index 6adad498f31..8f5ac12ec36 100644 --- a/rust/ql/test/extractor-tests/generated/ForTypeRepr/ForTypeRepr.expected +++ b/rust/ql/test/extractor-tests/generated/ForTypeRepr/ForTypeRepr.expected @@ -1 +1,6 @@ -| gen_for_type_repr.rs:9:12:9:41 | ForTypeRepr | hasGenericParamList: | yes | hasTypeRepr: | yes | +instances +| gen_for_type_repr.rs:9:12:9:41 | ForTypeRepr | +getGenericParamList +| gen_for_type_repr.rs:9:12:9:41 | ForTypeRepr | gen_for_type_repr.rs:9:15:9:18 | <...> | +getTypeRepr +| gen_for_type_repr.rs:9:12:9:41 | ForTypeRepr | gen_for_type_repr.rs:9:20:9:41 | Fn | diff --git a/rust/ql/test/extractor-tests/generated/ForTypeRepr/ForTypeRepr.ql b/rust/ql/test/extractor-tests/generated/ForTypeRepr/ForTypeRepr.ql index 5cb8aeecde1..398a317a3dd 100644 --- a/rust/ql/test/extractor-tests/generated/ForTypeRepr/ForTypeRepr.ql +++ b/rust/ql/test/extractor-tests/generated/ForTypeRepr/ForTypeRepr.ql @@ -2,10 +2,12 @@ import codeql.rust.elements import TestUtils -from ForTypeRepr x, string hasGenericParamList, string hasTypeRepr -where - toBeTested(x) and - not x.isUnknown() and - (if x.hasGenericParamList() then hasGenericParamList = "yes" else hasGenericParamList = "no") and - if x.hasTypeRepr() then hasTypeRepr = "yes" else hasTypeRepr = "no" -select x, "hasGenericParamList:", hasGenericParamList, "hasTypeRepr:", hasTypeRepr +query predicate instances(ForTypeRepr x) { toBeTested(x) and not x.isUnknown() } + +query predicate getGenericParamList(ForTypeRepr x, GenericParamList getGenericParamList) { + toBeTested(x) and not x.isUnknown() and getGenericParamList = x.getGenericParamList() +} + +query predicate getTypeRepr(ForTypeRepr x, TypeRepr getTypeRepr) { + toBeTested(x) and not x.isUnknown() and getTypeRepr = x.getTypeRepr() +} diff --git a/rust/ql/test/extractor-tests/generated/ForTypeRepr/ForTypeRepr_getGenericParamList.expected b/rust/ql/test/extractor-tests/generated/ForTypeRepr/ForTypeRepr_getGenericParamList.expected deleted file mode 100644 index 0cb4ba87209..00000000000 --- a/rust/ql/test/extractor-tests/generated/ForTypeRepr/ForTypeRepr_getGenericParamList.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_for_type_repr.rs:9:12:9:41 | ForTypeRepr | gen_for_type_repr.rs:9:15:9:18 | <...> | diff --git a/rust/ql/test/extractor-tests/generated/ForTypeRepr/ForTypeRepr_getGenericParamList.ql b/rust/ql/test/extractor-tests/generated/ForTypeRepr/ForTypeRepr_getGenericParamList.ql deleted file mode 100644 index 3ee936fca2a..00000000000 --- a/rust/ql/test/extractor-tests/generated/ForTypeRepr/ForTypeRepr_getGenericParamList.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from ForTypeRepr x -where toBeTested(x) and not x.isUnknown() -select x, x.getGenericParamList() diff --git a/rust/ql/test/extractor-tests/generated/ForTypeRepr/ForTypeRepr_getTypeRepr.expected b/rust/ql/test/extractor-tests/generated/ForTypeRepr/ForTypeRepr_getTypeRepr.expected deleted file mode 100644 index 14610d6319f..00000000000 --- a/rust/ql/test/extractor-tests/generated/ForTypeRepr/ForTypeRepr_getTypeRepr.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_for_type_repr.rs:9:12:9:41 | ForTypeRepr | gen_for_type_repr.rs:9:20:9:41 | Fn | diff --git a/rust/ql/test/extractor-tests/generated/ForTypeRepr/ForTypeRepr_getTypeRepr.ql b/rust/ql/test/extractor-tests/generated/ForTypeRepr/ForTypeRepr_getTypeRepr.ql deleted file mode 100644 index 677f61b023d..00000000000 --- a/rust/ql/test/extractor-tests/generated/ForTypeRepr/ForTypeRepr_getTypeRepr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from ForTypeRepr x -where toBeTested(x) and not x.isUnknown() -select x, x.getTypeRepr() diff --git a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/Cargo.lock b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/Format.expected b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/Format.expected index efd593719cc..ec9fba8965a 100644 --- a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/Format.expected +++ b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/Format.expected @@ -1,17 +1,40 @@ -| gen_format.rs:5:21:5:22 | {} | getParent: | gen_format.rs:5:14:5:32 | FormatArgsExpr | getIndex: | 1 | hasArgumentRef: | no | hasWidthArgument: | no | hasPrecisionArgument: | no | -| gen_format.rs:7:21:7:46 | {value:#width$.precision$} | getParent: | gen_format.rs:7:14:7:47 | FormatArgsExpr | getIndex: | 1 | hasArgumentRef: | yes | hasWidthArgument: | yes | hasPrecisionArgument: | yes | -| gen_format.rs:11:15:11:20 | {name} | getParent: | gen_format.rs:11:14:11:35 | FormatArgsExpr | getIndex: | 1 | hasArgumentRef: | yes | hasWidthArgument: | no | hasPrecisionArgument: | no | -| gen_format.rs:12:15:12:17 | {0} | getParent: | gen_format.rs:12:14:12:38 | FormatArgsExpr | getIndex: | 1 | hasArgumentRef: | yes | hasWidthArgument: | no | hasPrecisionArgument: | no | -| gen_format.rs:16:15:16:23 | {:width$} | getParent: | gen_format.rs:16:14:16:28 | FormatArgsExpr | getIndex: | 1 | hasArgumentRef: | no | hasWidthArgument: | yes | hasPrecisionArgument: | no | -| gen_format.rs:17:15:17:19 | {:1$} | getParent: | gen_format.rs:17:14:17:31 | FormatArgsExpr | getIndex: | 1 | hasArgumentRef: | no | hasWidthArgument: | yes | hasPrecisionArgument: | no | -| gen_format.rs:21:15:21:23 | {:.prec$} | getParent: | gen_format.rs:21:14:21:28 | FormatArgsExpr | getIndex: | 1 | hasArgumentRef: | no | hasWidthArgument: | no | hasPrecisionArgument: | yes | -| gen_format.rs:22:15:22:20 | {:.1$} | getParent: | gen_format.rs:22:14:22:31 | FormatArgsExpr | getIndex: | 1 | hasArgumentRef: | no | hasWidthArgument: | no | hasPrecisionArgument: | yes | -| gen_format_args_arg.rs:5:26:5:27 | {} | getParent: | gen_format_args_arg.rs:5:17:5:39 | FormatArgsExpr | getIndex: | 1 | hasArgumentRef: | no | hasWidthArgument: | no | hasPrecisionArgument: | no | -| gen_format_args_expr.rs:6:19:6:20 | {} | getParent: | gen_format_args_expr.rs:6:17:6:37 | FormatArgsExpr | getIndex: | 1 | hasArgumentRef: | no | hasWidthArgument: | no | hasPrecisionArgument: | no | -| gen_format_args_expr.rs:6:26:6:29 | {:?} | getParent: | gen_format_args_expr.rs:6:17:6:37 | FormatArgsExpr | getIndex: | 3 | hasArgumentRef: | no | hasWidthArgument: | no | hasPrecisionArgument: | no | -| gen_format_args_expr.rs:7:19:7:21 | {b} | getParent: | gen_format_args_expr.rs:7:17:7:43 | FormatArgsExpr | getIndex: | 1 | hasArgumentRef: | yes | hasWidthArgument: | no | hasPrecisionArgument: | no | -| gen_format_args_expr.rs:7:27:7:31 | {a:?} | getParent: | gen_format_args_expr.rs:7:17:7:43 | FormatArgsExpr | getIndex: | 3 | hasArgumentRef: | yes | hasWidthArgument: | no | hasPrecisionArgument: | no | -| gen_format_args_expr.rs:9:19:9:21 | {x} | getParent: | gen_format_args_expr.rs:9:17:9:28 | FormatArgsExpr | getIndex: | 1 | hasArgumentRef: | yes | hasWidthArgument: | no | hasPrecisionArgument: | no | -| gen_format_args_expr.rs:9:24:9:26 | {y} | getParent: | gen_format_args_expr.rs:9:17:9:28 | FormatArgsExpr | getIndex: | 3 | hasArgumentRef: | yes | hasWidthArgument: | no | hasPrecisionArgument: | no | -| gen_format_argument.rs:5:21:5:46 | {value:#width$.precision$} | getParent: | gen_format_argument.rs:5:14:5:47 | FormatArgsExpr | getIndex: | 1 | hasArgumentRef: | yes | hasWidthArgument: | yes | hasPrecisionArgument: | yes | -| gen_format_argument.rs:7:21:7:30 | {0:#1$.2$} | getParent: | gen_format_argument.rs:7:14:7:56 | FormatArgsExpr | getIndex: | 1 | hasArgumentRef: | yes | hasWidthArgument: | yes | hasPrecisionArgument: | yes | +instances +| gen_format.rs:5:21:5:22 | {} | getParent: | gen_format.rs:5:14:5:32 | FormatArgsExpr | getIndex: | 1 | +| gen_format.rs:7:21:7:46 | {value:#width$.precision$} | getParent: | gen_format.rs:7:14:7:47 | FormatArgsExpr | getIndex: | 1 | +| gen_format.rs:11:15:11:20 | {name} | getParent: | gen_format.rs:11:14:11:35 | FormatArgsExpr | getIndex: | 1 | +| gen_format.rs:12:15:12:17 | {0} | getParent: | gen_format.rs:12:14:12:38 | FormatArgsExpr | getIndex: | 1 | +| gen_format.rs:16:15:16:23 | {:width$} | getParent: | gen_format.rs:16:14:16:28 | FormatArgsExpr | getIndex: | 1 | +| gen_format.rs:17:15:17:19 | {:1$} | getParent: | gen_format.rs:17:14:17:31 | FormatArgsExpr | getIndex: | 1 | +| gen_format.rs:21:15:21:23 | {:.prec$} | getParent: | gen_format.rs:21:14:21:28 | FormatArgsExpr | getIndex: | 1 | +| gen_format.rs:22:15:22:20 | {:.1$} | getParent: | gen_format.rs:22:14:22:31 | FormatArgsExpr | getIndex: | 1 | +| gen_format_args_arg.rs:5:26:5:27 | {} | getParent: | gen_format_args_arg.rs:5:17:5:39 | FormatArgsExpr | getIndex: | 1 | +| gen_format_args_expr.rs:6:19:6:20 | {} | getParent: | gen_format_args_expr.rs:6:17:6:37 | FormatArgsExpr | getIndex: | 1 | +| gen_format_args_expr.rs:6:26:6:29 | {:?} | getParent: | gen_format_args_expr.rs:6:17:6:37 | FormatArgsExpr | getIndex: | 3 | +| gen_format_args_expr.rs:7:19:7:21 | {b} | getParent: | gen_format_args_expr.rs:7:17:7:43 | FormatArgsExpr | getIndex: | 1 | +| gen_format_args_expr.rs:7:27:7:31 | {a:?} | getParent: | gen_format_args_expr.rs:7:17:7:43 | FormatArgsExpr | getIndex: | 3 | +| gen_format_args_expr.rs:9:19:9:21 | {x} | getParent: | gen_format_args_expr.rs:9:17:9:28 | FormatArgsExpr | getIndex: | 1 | +| gen_format_args_expr.rs:9:24:9:26 | {y} | getParent: | gen_format_args_expr.rs:9:17:9:28 | FormatArgsExpr | getIndex: | 3 | +| gen_format_argument.rs:5:21:5:46 | {value:#width$.precision$} | getParent: | gen_format_argument.rs:5:14:5:47 | FormatArgsExpr | getIndex: | 1 | +| gen_format_argument.rs:7:21:7:30 | {0:#1$.2$} | getParent: | gen_format_argument.rs:7:14:7:56 | FormatArgsExpr | getIndex: | 1 | +getArgumentRef +| gen_format.rs:7:21:7:46 | {value:#width$.precision$} | gen_format.rs:7:22:7:26 | value | +| gen_format.rs:11:15:11:20 | {name} | gen_format.rs:11:16:11:19 | name | +| gen_format.rs:12:15:12:17 | {0} | gen_format.rs:12:16:12:16 | 0 | +| gen_format_args_expr.rs:7:19:7:21 | {b} | gen_format_args_expr.rs:7:20:7:20 | b | +| gen_format_args_expr.rs:7:27:7:31 | {a:?} | gen_format_args_expr.rs:7:28:7:28 | a | +| gen_format_args_expr.rs:9:19:9:21 | {x} | gen_format_args_expr.rs:9:20:9:20 | x | +| gen_format_args_expr.rs:9:24:9:26 | {y} | gen_format_args_expr.rs:9:25:9:25 | y | +| gen_format_argument.rs:5:21:5:46 | {value:#width$.precision$} | gen_format_argument.rs:5:22:5:26 | value | +| gen_format_argument.rs:7:21:7:30 | {0:#1$.2$} | gen_format_argument.rs:7:22:7:22 | 0 | +getWidthArgument +| gen_format.rs:7:21:7:46 | {value:#width$.precision$} | gen_format.rs:7:29:7:33 | width | +| gen_format.rs:16:15:16:23 | {:width$} | gen_format.rs:16:17:16:21 | width | +| gen_format.rs:17:15:17:19 | {:1$} | gen_format.rs:17:17:17:17 | 1 | +| gen_format_argument.rs:5:21:5:46 | {value:#width$.precision$} | gen_format_argument.rs:5:29:5:33 | width | +| gen_format_argument.rs:7:21:7:30 | {0:#1$.2$} | gen_format_argument.rs:7:25:7:25 | 1 | +getPrecisionArgument +| gen_format.rs:7:21:7:46 | {value:#width$.precision$} | gen_format.rs:7:36:7:44 | precision | +| gen_format.rs:21:15:21:23 | {:.prec$} | gen_format.rs:21:18:21:21 | prec | +| gen_format.rs:22:15:22:20 | {:.1$} | gen_format.rs:22:18:22:18 | 1 | +| gen_format_argument.rs:5:21:5:46 | {value:#width$.precision$} | gen_format_argument.rs:5:36:5:44 | precision | +| gen_format_argument.rs:7:21:7:30 | {0:#1$.2$} | gen_format_argument.rs:7:28:7:28 | 2 | diff --git a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/Format.ql b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/Format.ql index 5c7893ea65c..5a74e34cbaf 100644 --- a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/Format.ql +++ b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/Format.ql @@ -2,16 +2,25 @@ import codeql.rust.elements import TestUtils -from - Format x, FormatArgsExpr getParent, int getIndex, string hasArgumentRef, string hasWidthArgument, - string hasPrecisionArgument -where +query predicate instances( + Format x, string getParent__label, FormatArgsExpr getParent, string getIndex__label, int getIndex +) { toBeTested(x) and not x.isUnknown() and + getParent__label = "getParent:" and getParent = x.getParent() and - getIndex = x.getIndex() and - (if x.hasArgumentRef() then hasArgumentRef = "yes" else hasArgumentRef = "no") and - (if x.hasWidthArgument() then hasWidthArgument = "yes" else hasWidthArgument = "no") and - if x.hasPrecisionArgument() then hasPrecisionArgument = "yes" else hasPrecisionArgument = "no" -select x, "getParent:", getParent, "getIndex:", getIndex, "hasArgumentRef:", hasArgumentRef, - "hasWidthArgument:", hasWidthArgument, "hasPrecisionArgument:", hasPrecisionArgument + getIndex__label = "getIndex:" and + getIndex = x.getIndex() +} + +query predicate getArgumentRef(Format x, FormatArgument getArgumentRef) { + toBeTested(x) and not x.isUnknown() and getArgumentRef = x.getArgumentRef() +} + +query predicate getWidthArgument(Format x, FormatArgument getWidthArgument) { + toBeTested(x) and not x.isUnknown() and getWidthArgument = x.getWidthArgument() +} + +query predicate getPrecisionArgument(Format x, FormatArgument getPrecisionArgument) { + toBeTested(x) and not x.isUnknown() and getPrecisionArgument = x.getPrecisionArgument() +} diff --git a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsArg.expected b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsArg.expected index e1ce7c44998..32a73ae1c7c 100644 --- a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsArg.expected +++ b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsArg.expected @@ -1,16 +1,37 @@ -| gen_format.rs:5:26:5:32 | FormatArgsArg | hasExpr: | yes | hasName: | no | -| gen_format.rs:12:35:12:38 | FormatArgsArg | hasExpr: | yes | hasName: | no | -| gen_format.rs:16:27:16:28 | FormatArgsArg | hasExpr: | yes | hasName: | no | -| gen_format.rs:17:23:17:24 | FormatArgsArg | hasExpr: | yes | hasName: | no | -| gen_format.rs:17:27:17:31 | FormatArgsArg | hasExpr: | yes | hasName: | no | -| gen_format.rs:21:27:21:28 | FormatArgsArg | hasExpr: | yes | hasName: | no | -| gen_format.rs:22:24:22:25 | FormatArgsArg | hasExpr: | yes | hasName: | no | -| gen_format.rs:22:28:22:31 | FormatArgsArg | hasExpr: | yes | hasName: | no | -| gen_format_args_arg.rs:5:32:5:38 | FormatArgsArg | hasExpr: | yes | hasName: | no | -| gen_format_args_expr.rs:6:33:6:33 | FormatArgsArg | hasExpr: | yes | hasName: | no | -| gen_format_args_expr.rs:6:36:6:36 | FormatArgsArg | hasExpr: | yes | hasName: | no | -| gen_format_args_expr.rs:7:35:7:37 | FormatArgsArg | hasExpr: | yes | hasName: | yes | -| gen_format_args_expr.rs:7:40:7:42 | FormatArgsArg | hasExpr: | yes | hasName: | yes | -| gen_format_argument.rs:7:34:7:38 | FormatArgsArg | hasExpr: | yes | hasName: | no | -| gen_format_argument.rs:7:41:7:45 | FormatArgsArg | hasExpr: | yes | hasName: | no | -| gen_format_argument.rs:7:48:7:56 | FormatArgsArg | hasExpr: | yes | hasName: | no | +instances +| gen_format.rs:5:26:5:32 | FormatArgsArg | +| gen_format.rs:12:35:12:38 | FormatArgsArg | +| gen_format.rs:16:27:16:28 | FormatArgsArg | +| gen_format.rs:17:23:17:24 | FormatArgsArg | +| gen_format.rs:17:27:17:31 | FormatArgsArg | +| gen_format.rs:21:27:21:28 | FormatArgsArg | +| gen_format.rs:22:24:22:25 | FormatArgsArg | +| gen_format.rs:22:28:22:31 | FormatArgsArg | +| gen_format_args_arg.rs:5:32:5:38 | FormatArgsArg | +| gen_format_args_expr.rs:6:33:6:33 | FormatArgsArg | +| gen_format_args_expr.rs:6:36:6:36 | FormatArgsArg | +| gen_format_args_expr.rs:7:35:7:37 | FormatArgsArg | +| gen_format_args_expr.rs:7:40:7:42 | FormatArgsArg | +| gen_format_argument.rs:7:34:7:38 | FormatArgsArg | +| gen_format_argument.rs:7:41:7:45 | FormatArgsArg | +| gen_format_argument.rs:7:48:7:56 | FormatArgsArg | +getExpr +| gen_format.rs:5:26:5:32 | FormatArgsArg | gen_format.rs:5:26:5:32 | "world" | +| gen_format.rs:12:35:12:38 | FormatArgsArg | gen_format.rs:12:35:12:38 | name | +| gen_format.rs:16:27:16:28 | FormatArgsArg | gen_format.rs:16:27:16:28 | PI | +| gen_format.rs:17:23:17:24 | FormatArgsArg | gen_format.rs:17:23:17:24 | PI | +| gen_format.rs:17:27:17:31 | FormatArgsArg | gen_format.rs:17:27:17:31 | width | +| gen_format.rs:21:27:21:28 | FormatArgsArg | gen_format.rs:21:27:21:28 | PI | +| gen_format.rs:22:24:22:25 | FormatArgsArg | gen_format.rs:22:24:22:25 | PI | +| gen_format.rs:22:28:22:31 | FormatArgsArg | gen_format.rs:22:28:22:31 | prec | +| gen_format_args_arg.rs:5:32:5:38 | FormatArgsArg | gen_format_args_arg.rs:5:32:5:38 | "world" | +| gen_format_args_expr.rs:6:33:6:33 | FormatArgsArg | gen_format_args_expr.rs:6:33:6:33 | 1 | +| gen_format_args_expr.rs:6:36:6:36 | FormatArgsArg | gen_format_args_expr.rs:6:36:6:36 | 2 | +| gen_format_args_expr.rs:7:35:7:37 | FormatArgsArg | gen_format_args_expr.rs:7:37:7:37 | 1 | +| gen_format_args_expr.rs:7:40:7:42 | FormatArgsArg | gen_format_args_expr.rs:7:42:7:42 | 2 | +| gen_format_argument.rs:7:34:7:38 | FormatArgsArg | gen_format_argument.rs:7:34:7:38 | value | +| gen_format_argument.rs:7:41:7:45 | FormatArgsArg | gen_format_argument.rs:7:41:7:45 | width | +| gen_format_argument.rs:7:48:7:56 | FormatArgsArg | gen_format_argument.rs:7:48:7:56 | precision | +getName +| gen_format_args_expr.rs:7:35:7:37 | FormatArgsArg | gen_format_args_expr.rs:7:35:7:35 | a | +| gen_format_args_expr.rs:7:40:7:42 | FormatArgsArg | gen_format_args_expr.rs:7:40:7:40 | b | diff --git a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsArg.ql b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsArg.ql index 428bd82909f..d3931f98511 100644 --- a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsArg.ql +++ b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsArg.ql @@ -2,10 +2,12 @@ import codeql.rust.elements import TestUtils -from FormatArgsArg x, string hasExpr, string hasName -where - toBeTested(x) and - not x.isUnknown() and - (if x.hasExpr() then hasExpr = "yes" else hasExpr = "no") and - if x.hasName() then hasName = "yes" else hasName = "no" -select x, "hasExpr:", hasExpr, "hasName:", hasName +query predicate instances(FormatArgsArg x) { toBeTested(x) and not x.isUnknown() } + +query predicate getExpr(FormatArgsArg x, Expr getExpr) { + toBeTested(x) and not x.isUnknown() and getExpr = x.getExpr() +} + +query predicate getName(FormatArgsArg x, Name getName) { + toBeTested(x) and not x.isUnknown() and getName = x.getName() +} diff --git a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsArg_getExpr.expected b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsArg_getExpr.expected deleted file mode 100644 index 326f5d0415e..00000000000 --- a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsArg_getExpr.expected +++ /dev/null @@ -1,16 +0,0 @@ -| gen_format.rs:5:26:5:32 | FormatArgsArg | gen_format.rs:5:26:5:32 | "world" | -| gen_format.rs:12:35:12:38 | FormatArgsArg | gen_format.rs:12:35:12:38 | name | -| gen_format.rs:16:27:16:28 | FormatArgsArg | gen_format.rs:16:27:16:28 | PI | -| gen_format.rs:17:23:17:24 | FormatArgsArg | gen_format.rs:17:23:17:24 | PI | -| gen_format.rs:17:27:17:31 | FormatArgsArg | gen_format.rs:17:27:17:31 | width | -| gen_format.rs:21:27:21:28 | FormatArgsArg | gen_format.rs:21:27:21:28 | PI | -| gen_format.rs:22:24:22:25 | FormatArgsArg | gen_format.rs:22:24:22:25 | PI | -| gen_format.rs:22:28:22:31 | FormatArgsArg | gen_format.rs:22:28:22:31 | prec | -| gen_format_args_arg.rs:5:32:5:38 | FormatArgsArg | gen_format_args_arg.rs:5:32:5:38 | "world" | -| gen_format_args_expr.rs:6:33:6:33 | FormatArgsArg | gen_format_args_expr.rs:6:33:6:33 | 1 | -| gen_format_args_expr.rs:6:36:6:36 | FormatArgsArg | gen_format_args_expr.rs:6:36:6:36 | 2 | -| gen_format_args_expr.rs:7:35:7:37 | FormatArgsArg | gen_format_args_expr.rs:7:37:7:37 | 1 | -| gen_format_args_expr.rs:7:40:7:42 | FormatArgsArg | gen_format_args_expr.rs:7:42:7:42 | 2 | -| gen_format_argument.rs:7:34:7:38 | FormatArgsArg | gen_format_argument.rs:7:34:7:38 | value | -| gen_format_argument.rs:7:41:7:45 | FormatArgsArg | gen_format_argument.rs:7:41:7:45 | width | -| gen_format_argument.rs:7:48:7:56 | FormatArgsArg | gen_format_argument.rs:7:48:7:56 | precision | diff --git a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsArg_getExpr.ql b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsArg_getExpr.ql deleted file mode 100644 index ee67794f93a..00000000000 --- a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsArg_getExpr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from FormatArgsArg x -where toBeTested(x) and not x.isUnknown() -select x, x.getExpr() diff --git a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsArg_getName.expected b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsArg_getName.expected deleted file mode 100644 index ad5d7ab4ab2..00000000000 --- a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsArg_getName.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_format_args_expr.rs:7:35:7:37 | FormatArgsArg | gen_format_args_expr.rs:7:35:7:35 | a | -| gen_format_args_expr.rs:7:40:7:42 | FormatArgsArg | gen_format_args_expr.rs:7:40:7:40 | b | diff --git a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsArg_getName.ql b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsArg_getName.ql deleted file mode 100644 index 8f4bdb2a0c8..00000000000 --- a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsArg_getName.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from FormatArgsArg x -where toBeTested(x) and not x.isUnknown() -select x, x.getName() diff --git a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr.expected b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr.expected index d3319ded2fb..36afee17dac 100644 --- a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr.expected +++ b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr.expected @@ -1,15 +1,68 @@ -| gen_format.rs:5:14:5:32 | FormatArgsExpr | getNumberOfArgs: | 1 | getNumberOfAttrs: | 0 | hasTemplate: | yes | getNumberOfFormats: | 1 | -| gen_format.rs:7:14:7:47 | FormatArgsExpr | getNumberOfArgs: | 0 | getNumberOfAttrs: | 0 | hasTemplate: | yes | getNumberOfFormats: | 1 | -| gen_format.rs:11:14:11:35 | FormatArgsExpr | getNumberOfArgs: | 0 | getNumberOfAttrs: | 0 | hasTemplate: | yes | getNumberOfFormats: | 1 | -| gen_format.rs:12:14:12:38 | FormatArgsExpr | getNumberOfArgs: | 1 | getNumberOfAttrs: | 0 | hasTemplate: | yes | getNumberOfFormats: | 1 | -| gen_format.rs:16:14:16:28 | FormatArgsExpr | getNumberOfArgs: | 1 | getNumberOfAttrs: | 0 | hasTemplate: | yes | getNumberOfFormats: | 1 | -| gen_format.rs:17:14:17:31 | FormatArgsExpr | getNumberOfArgs: | 2 | getNumberOfAttrs: | 0 | hasTemplate: | yes | getNumberOfFormats: | 1 | -| gen_format.rs:21:14:21:28 | FormatArgsExpr | getNumberOfArgs: | 1 | getNumberOfAttrs: | 0 | hasTemplate: | yes | getNumberOfFormats: | 1 | -| gen_format.rs:22:14:22:31 | FormatArgsExpr | getNumberOfArgs: | 2 | getNumberOfAttrs: | 0 | hasTemplate: | yes | getNumberOfFormats: | 1 | -| gen_format_args_arg.rs:5:17:5:39 | FormatArgsExpr | getNumberOfArgs: | 1 | getNumberOfAttrs: | 0 | hasTemplate: | yes | getNumberOfFormats: | 1 | -| gen_format_args_expr.rs:5:17:5:27 | FormatArgsExpr | getNumberOfArgs: | 0 | getNumberOfAttrs: | 0 | hasTemplate: | yes | getNumberOfFormats: | 0 | -| gen_format_args_expr.rs:6:17:6:37 | FormatArgsExpr | getNumberOfArgs: | 2 | getNumberOfAttrs: | 0 | hasTemplate: | yes | getNumberOfFormats: | 2 | -| gen_format_args_expr.rs:7:17:7:43 | FormatArgsExpr | getNumberOfArgs: | 2 | getNumberOfAttrs: | 0 | hasTemplate: | yes | getNumberOfFormats: | 2 | -| gen_format_args_expr.rs:9:17:9:28 | FormatArgsExpr | getNumberOfArgs: | 0 | getNumberOfAttrs: | 0 | hasTemplate: | yes | getNumberOfFormats: | 2 | -| gen_format_argument.rs:5:14:5:47 | FormatArgsExpr | getNumberOfArgs: | 0 | getNumberOfAttrs: | 0 | hasTemplate: | yes | getNumberOfFormats: | 1 | -| gen_format_argument.rs:7:14:7:56 | FormatArgsExpr | getNumberOfArgs: | 3 | getNumberOfAttrs: | 0 | hasTemplate: | yes | getNumberOfFormats: | 1 | +instances +| gen_format.rs:5:14:5:32 | FormatArgsExpr | +| gen_format.rs:7:14:7:47 | FormatArgsExpr | +| gen_format.rs:11:14:11:35 | FormatArgsExpr | +| gen_format.rs:12:14:12:38 | FormatArgsExpr | +| gen_format.rs:16:14:16:28 | FormatArgsExpr | +| gen_format.rs:17:14:17:31 | FormatArgsExpr | +| gen_format.rs:21:14:21:28 | FormatArgsExpr | +| gen_format.rs:22:14:22:31 | FormatArgsExpr | +| gen_format_args_arg.rs:5:17:5:39 | FormatArgsExpr | +| gen_format_args_expr.rs:5:17:5:27 | FormatArgsExpr | +| gen_format_args_expr.rs:6:17:6:37 | FormatArgsExpr | +| gen_format_args_expr.rs:7:17:7:43 | FormatArgsExpr | +| gen_format_args_expr.rs:9:17:9:28 | FormatArgsExpr | +| gen_format_argument.rs:5:14:5:47 | FormatArgsExpr | +| gen_format_argument.rs:7:14:7:56 | FormatArgsExpr | +getArg +| gen_format.rs:5:14:5:32 | FormatArgsExpr | 0 | gen_format.rs:5:26:5:32 | FormatArgsArg | +| gen_format.rs:12:14:12:38 | FormatArgsExpr | 0 | gen_format.rs:12:35:12:38 | FormatArgsArg | +| gen_format.rs:16:14:16:28 | FormatArgsExpr | 0 | gen_format.rs:16:27:16:28 | FormatArgsArg | +| gen_format.rs:17:14:17:31 | FormatArgsExpr | 0 | gen_format.rs:17:23:17:24 | FormatArgsArg | +| gen_format.rs:17:14:17:31 | FormatArgsExpr | 1 | gen_format.rs:17:27:17:31 | FormatArgsArg | +| gen_format.rs:21:14:21:28 | FormatArgsExpr | 0 | gen_format.rs:21:27:21:28 | FormatArgsArg | +| gen_format.rs:22:14:22:31 | FormatArgsExpr | 0 | gen_format.rs:22:24:22:25 | FormatArgsArg | +| gen_format.rs:22:14:22:31 | FormatArgsExpr | 1 | gen_format.rs:22:28:22:31 | FormatArgsArg | +| gen_format_args_arg.rs:5:17:5:39 | FormatArgsExpr | 0 | gen_format_args_arg.rs:5:32:5:38 | FormatArgsArg | +| gen_format_args_expr.rs:6:17:6:37 | FormatArgsExpr | 0 | gen_format_args_expr.rs:6:33:6:33 | FormatArgsArg | +| gen_format_args_expr.rs:6:17:6:37 | FormatArgsExpr | 1 | gen_format_args_expr.rs:6:36:6:36 | FormatArgsArg | +| gen_format_args_expr.rs:7:17:7:43 | FormatArgsExpr | 0 | gen_format_args_expr.rs:7:35:7:37 | FormatArgsArg | +| gen_format_args_expr.rs:7:17:7:43 | FormatArgsExpr | 1 | gen_format_args_expr.rs:7:40:7:42 | FormatArgsArg | +| gen_format_argument.rs:7:14:7:56 | FormatArgsExpr | 0 | gen_format_argument.rs:7:34:7:38 | FormatArgsArg | +| gen_format_argument.rs:7:14:7:56 | FormatArgsExpr | 1 | gen_format_argument.rs:7:41:7:45 | FormatArgsArg | +| gen_format_argument.rs:7:14:7:56 | FormatArgsExpr | 2 | gen_format_argument.rs:7:48:7:56 | FormatArgsArg | +getAttr +getTemplate +| gen_format.rs:5:14:5:32 | FormatArgsExpr | gen_format.rs:5:14:5:23 | "Hello {}\\n" | +| gen_format.rs:7:14:7:47 | FormatArgsExpr | gen_format.rs:7:14:7:47 | "Value {value:#width$.precisio... | +| gen_format.rs:11:14:11:35 | FormatArgsExpr | gen_format.rs:11:14:11:35 | "{name} in wonderland\\n" | +| gen_format.rs:12:14:12:38 | FormatArgsExpr | gen_format.rs:12:14:12:32 | "{0} in wonderland\\n" | +| gen_format.rs:16:14:16:28 | FormatArgsExpr | gen_format.rs:16:14:16:24 | "{:width$}\\n" | +| gen_format.rs:17:14:17:31 | FormatArgsExpr | gen_format.rs:17:14:17:20 | "{:1$}\\n" | +| gen_format.rs:21:14:21:28 | FormatArgsExpr | gen_format.rs:21:14:21:24 | "{:.prec$}\\n" | +| gen_format.rs:22:14:22:31 | FormatArgsExpr | gen_format.rs:22:14:22:21 | "{:.1$}\\n" | +| gen_format_args_arg.rs:5:17:5:39 | FormatArgsExpr | gen_format_args_arg.rs:5:18:5:29 | "Hello, {}!" | +| gen_format_args_expr.rs:5:17:5:27 | FormatArgsExpr | gen_format_args_expr.rs:5:18:5:26 | "no args" | +| gen_format_args_expr.rs:6:17:6:37 | FormatArgsExpr | gen_format_args_expr.rs:6:18:6:30 | "{} foo {:?}" | +| gen_format_args_expr.rs:7:17:7:43 | FormatArgsExpr | gen_format_args_expr.rs:7:18:7:32 | "{b} foo {a:?}" | +| gen_format_args_expr.rs:9:17:9:28 | FormatArgsExpr | gen_format_args_expr.rs:9:18:9:27 | "{x}, {y}" | +| gen_format_argument.rs:5:14:5:47 | FormatArgsExpr | gen_format_argument.rs:5:14:5:47 | "Value {value:#width$.precisio... | +| gen_format_argument.rs:7:14:7:56 | FormatArgsExpr | gen_format_argument.rs:7:14:7:31 | "Value {0:#1$.2$}\\n" | +getFormat +| gen_format.rs:5:14:5:32 | FormatArgsExpr | 0 | gen_format.rs:5:21:5:22 | {} | +| gen_format.rs:7:14:7:47 | FormatArgsExpr | 0 | gen_format.rs:7:21:7:46 | {value:#width$.precision$} | +| gen_format.rs:11:14:11:35 | FormatArgsExpr | 0 | gen_format.rs:11:15:11:20 | {name} | +| gen_format.rs:12:14:12:38 | FormatArgsExpr | 0 | gen_format.rs:12:15:12:17 | {0} | +| gen_format.rs:16:14:16:28 | FormatArgsExpr | 0 | gen_format.rs:16:15:16:23 | {:width$} | +| gen_format.rs:17:14:17:31 | FormatArgsExpr | 0 | gen_format.rs:17:15:17:19 | {:1$} | +| gen_format.rs:21:14:21:28 | FormatArgsExpr | 0 | gen_format.rs:21:15:21:23 | {:.prec$} | +| gen_format.rs:22:14:22:31 | FormatArgsExpr | 0 | gen_format.rs:22:15:22:20 | {:.1$} | +| gen_format_args_arg.rs:5:17:5:39 | FormatArgsExpr | 0 | gen_format_args_arg.rs:5:26:5:27 | {} | +| gen_format_args_expr.rs:6:17:6:37 | FormatArgsExpr | 0 | gen_format_args_expr.rs:6:19:6:20 | {} | +| gen_format_args_expr.rs:6:17:6:37 | FormatArgsExpr | 1 | gen_format_args_expr.rs:6:26:6:29 | {:?} | +| gen_format_args_expr.rs:7:17:7:43 | FormatArgsExpr | 0 | gen_format_args_expr.rs:7:19:7:21 | {b} | +| gen_format_args_expr.rs:7:17:7:43 | FormatArgsExpr | 1 | gen_format_args_expr.rs:7:27:7:31 | {a:?} | +| gen_format_args_expr.rs:9:17:9:28 | FormatArgsExpr | 0 | gen_format_args_expr.rs:9:19:9:21 | {x} | +| gen_format_args_expr.rs:9:17:9:28 | FormatArgsExpr | 1 | gen_format_args_expr.rs:9:24:9:26 | {y} | +| gen_format_argument.rs:5:14:5:47 | FormatArgsExpr | 0 | gen_format_argument.rs:5:21:5:46 | {value:#width$.precision$} | +| gen_format_argument.rs:7:14:7:56 | FormatArgsExpr | 0 | gen_format_argument.rs:7:21:7:30 | {0:#1$.2$} | diff --git a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr.ql b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr.ql index 6a43bc1ea0a..04e7a007e67 100644 --- a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr.ql +++ b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr.ql @@ -2,15 +2,20 @@ import codeql.rust.elements import TestUtils -from - FormatArgsExpr x, int getNumberOfArgs, int getNumberOfAttrs, string hasTemplate, - int getNumberOfFormats -where - toBeTested(x) and - not x.isUnknown() and - getNumberOfArgs = x.getNumberOfArgs() and - getNumberOfAttrs = x.getNumberOfAttrs() and - (if x.hasTemplate() then hasTemplate = "yes" else hasTemplate = "no") and - getNumberOfFormats = x.getNumberOfFormats() -select x, "getNumberOfArgs:", getNumberOfArgs, "getNumberOfAttrs:", getNumberOfAttrs, - "hasTemplate:", hasTemplate, "getNumberOfFormats:", getNumberOfFormats +query predicate instances(FormatArgsExpr x) { toBeTested(x) and not x.isUnknown() } + +query predicate getArg(FormatArgsExpr x, int index, FormatArgsArg getArg) { + toBeTested(x) and not x.isUnknown() and getArg = x.getArg(index) +} + +query predicate getAttr(FormatArgsExpr x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} + +query predicate getTemplate(FormatArgsExpr x, Expr getTemplate) { + toBeTested(x) and not x.isUnknown() and getTemplate = x.getTemplate() +} + +query predicate getFormat(FormatArgsExpr x, int index, Format getFormat) { + toBeTested(x) and not x.isUnknown() and getFormat = x.getFormat(index) +} diff --git a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getArg.expected b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getArg.expected deleted file mode 100644 index 8a6e0ba1227..00000000000 --- a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getArg.expected +++ /dev/null @@ -1,16 +0,0 @@ -| gen_format.rs:5:14:5:32 | FormatArgsExpr | 0 | gen_format.rs:5:26:5:32 | FormatArgsArg | -| gen_format.rs:12:14:12:38 | FormatArgsExpr | 0 | gen_format.rs:12:35:12:38 | FormatArgsArg | -| gen_format.rs:16:14:16:28 | FormatArgsExpr | 0 | gen_format.rs:16:27:16:28 | FormatArgsArg | -| gen_format.rs:17:14:17:31 | FormatArgsExpr | 0 | gen_format.rs:17:23:17:24 | FormatArgsArg | -| gen_format.rs:17:14:17:31 | FormatArgsExpr | 1 | gen_format.rs:17:27:17:31 | FormatArgsArg | -| gen_format.rs:21:14:21:28 | FormatArgsExpr | 0 | gen_format.rs:21:27:21:28 | FormatArgsArg | -| gen_format.rs:22:14:22:31 | FormatArgsExpr | 0 | gen_format.rs:22:24:22:25 | FormatArgsArg | -| gen_format.rs:22:14:22:31 | FormatArgsExpr | 1 | gen_format.rs:22:28:22:31 | FormatArgsArg | -| gen_format_args_arg.rs:5:17:5:39 | FormatArgsExpr | 0 | gen_format_args_arg.rs:5:32:5:38 | FormatArgsArg | -| gen_format_args_expr.rs:6:17:6:37 | FormatArgsExpr | 0 | gen_format_args_expr.rs:6:33:6:33 | FormatArgsArg | -| gen_format_args_expr.rs:6:17:6:37 | FormatArgsExpr | 1 | gen_format_args_expr.rs:6:36:6:36 | FormatArgsArg | -| gen_format_args_expr.rs:7:17:7:43 | FormatArgsExpr | 0 | gen_format_args_expr.rs:7:35:7:37 | FormatArgsArg | -| gen_format_args_expr.rs:7:17:7:43 | FormatArgsExpr | 1 | gen_format_args_expr.rs:7:40:7:42 | FormatArgsArg | -| gen_format_argument.rs:7:14:7:56 | FormatArgsExpr | 0 | gen_format_argument.rs:7:34:7:38 | FormatArgsArg | -| gen_format_argument.rs:7:14:7:56 | FormatArgsExpr | 1 | gen_format_argument.rs:7:41:7:45 | FormatArgsArg | -| gen_format_argument.rs:7:14:7:56 | FormatArgsExpr | 2 | gen_format_argument.rs:7:48:7:56 | FormatArgsArg | diff --git a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getArg.ql b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getArg.ql deleted file mode 100644 index 1bf575a0f86..00000000000 --- a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getArg.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from FormatArgsExpr x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getArg(index) diff --git a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getAttr.ql deleted file mode 100644 index bfaf15b6ff5..00000000000 --- a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from FormatArgsExpr x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getFormat.expected b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getFormat.expected deleted file mode 100644 index 3b6486bcfdb..00000000000 --- a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getFormat.expected +++ /dev/null @@ -1,17 +0,0 @@ -| gen_format.rs:5:14:5:32 | FormatArgsExpr | 0 | gen_format.rs:5:21:5:22 | {} | -| gen_format.rs:7:14:7:47 | FormatArgsExpr | 0 | gen_format.rs:7:21:7:46 | {value:#width$.precision$} | -| gen_format.rs:11:14:11:35 | FormatArgsExpr | 0 | gen_format.rs:11:15:11:20 | {name} | -| gen_format.rs:12:14:12:38 | FormatArgsExpr | 0 | gen_format.rs:12:15:12:17 | {0} | -| gen_format.rs:16:14:16:28 | FormatArgsExpr | 0 | gen_format.rs:16:15:16:23 | {:width$} | -| gen_format.rs:17:14:17:31 | FormatArgsExpr | 0 | gen_format.rs:17:15:17:19 | {:1$} | -| gen_format.rs:21:14:21:28 | FormatArgsExpr | 0 | gen_format.rs:21:15:21:23 | {:.prec$} | -| gen_format.rs:22:14:22:31 | FormatArgsExpr | 0 | gen_format.rs:22:15:22:20 | {:.1$} | -| gen_format_args_arg.rs:5:17:5:39 | FormatArgsExpr | 0 | gen_format_args_arg.rs:5:26:5:27 | {} | -| gen_format_args_expr.rs:6:17:6:37 | FormatArgsExpr | 0 | gen_format_args_expr.rs:6:19:6:20 | {} | -| gen_format_args_expr.rs:6:17:6:37 | FormatArgsExpr | 1 | gen_format_args_expr.rs:6:26:6:29 | {:?} | -| gen_format_args_expr.rs:7:17:7:43 | FormatArgsExpr | 0 | gen_format_args_expr.rs:7:19:7:21 | {b} | -| gen_format_args_expr.rs:7:17:7:43 | FormatArgsExpr | 1 | gen_format_args_expr.rs:7:27:7:31 | {a:?} | -| gen_format_args_expr.rs:9:17:9:28 | FormatArgsExpr | 0 | gen_format_args_expr.rs:9:19:9:21 | {x} | -| gen_format_args_expr.rs:9:17:9:28 | FormatArgsExpr | 1 | gen_format_args_expr.rs:9:24:9:26 | {y} | -| gen_format_argument.rs:5:14:5:47 | FormatArgsExpr | 0 | gen_format_argument.rs:5:21:5:46 | {value:#width$.precision$} | -| gen_format_argument.rs:7:14:7:56 | FormatArgsExpr | 0 | gen_format_argument.rs:7:21:7:30 | {0:#1$.2$} | diff --git a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getFormat.ql b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getFormat.ql deleted file mode 100644 index ca61ca2bebd..00000000000 --- a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getFormat.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from FormatArgsExpr x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getFormat(index) diff --git a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getTemplate.expected b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getTemplate.expected deleted file mode 100644 index 3ef17d6470a..00000000000 --- a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getTemplate.expected +++ /dev/null @@ -1,15 +0,0 @@ -| gen_format.rs:5:14:5:32 | FormatArgsExpr | gen_format.rs:5:14:5:23 | "Hello {}\\n" | -| gen_format.rs:7:14:7:47 | FormatArgsExpr | gen_format.rs:7:14:7:47 | "Value {value:#width$.precisio... | -| gen_format.rs:11:14:11:35 | FormatArgsExpr | gen_format.rs:11:14:11:35 | "{name} in wonderland\\n" | -| gen_format.rs:12:14:12:38 | FormatArgsExpr | gen_format.rs:12:14:12:32 | "{0} in wonderland\\n" | -| gen_format.rs:16:14:16:28 | FormatArgsExpr | gen_format.rs:16:14:16:24 | "{:width$}\\n" | -| gen_format.rs:17:14:17:31 | FormatArgsExpr | gen_format.rs:17:14:17:20 | "{:1$}\\n" | -| gen_format.rs:21:14:21:28 | FormatArgsExpr | gen_format.rs:21:14:21:24 | "{:.prec$}\\n" | -| gen_format.rs:22:14:22:31 | FormatArgsExpr | gen_format.rs:22:14:22:21 | "{:.1$}\\n" | -| gen_format_args_arg.rs:5:17:5:39 | FormatArgsExpr | gen_format_args_arg.rs:5:18:5:29 | "Hello, {}!" | -| gen_format_args_expr.rs:5:17:5:27 | FormatArgsExpr | gen_format_args_expr.rs:5:18:5:26 | "no args" | -| gen_format_args_expr.rs:6:17:6:37 | FormatArgsExpr | gen_format_args_expr.rs:6:18:6:30 | "{} foo {:?}" | -| gen_format_args_expr.rs:7:17:7:43 | FormatArgsExpr | gen_format_args_expr.rs:7:18:7:32 | "{b} foo {a:?}" | -| gen_format_args_expr.rs:9:17:9:28 | FormatArgsExpr | gen_format_args_expr.rs:9:18:9:27 | "{x}, {y}" | -| gen_format_argument.rs:5:14:5:47 | FormatArgsExpr | gen_format_argument.rs:5:14:5:47 | "Value {value:#width$.precisio... | -| gen_format_argument.rs:7:14:7:56 | FormatArgsExpr | gen_format_argument.rs:7:14:7:31 | "Value {0:#1$.2$}\\n" | diff --git a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getTemplate.ql b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getTemplate.ql deleted file mode 100644 index b43b24ed4f2..00000000000 --- a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getTemplate.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from FormatArgsExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getTemplate() diff --git a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgument.expected b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgument.expected index 6da44e9d84b..d51a409ea94 100644 --- a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgument.expected +++ b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgument.expected @@ -1,19 +1,32 @@ -| gen_format.rs:7:22:7:26 | value | getParent: | gen_format.rs:7:21:7:46 | {value:#width$.precision$} | hasVariable: | yes | -| gen_format.rs:7:29:7:33 | width | getParent: | gen_format.rs:7:21:7:46 | {value:#width$.precision$} | hasVariable: | yes | -| gen_format.rs:7:36:7:44 | precision | getParent: | gen_format.rs:7:21:7:46 | {value:#width$.precision$} | hasVariable: | yes | -| gen_format.rs:11:16:11:19 | name | getParent: | gen_format.rs:11:15:11:20 | {name} | hasVariable: | yes | -| gen_format.rs:12:16:12:16 | 0 | getParent: | gen_format.rs:12:15:12:17 | {0} | hasVariable: | no | -| gen_format.rs:16:17:16:21 | width | getParent: | gen_format.rs:16:15:16:23 | {:width$} | hasVariable: | yes | -| gen_format.rs:17:17:17:17 | 1 | getParent: | gen_format.rs:17:15:17:19 | {:1$} | hasVariable: | no | -| gen_format.rs:21:18:21:21 | prec | getParent: | gen_format.rs:21:15:21:23 | {:.prec$} | hasVariable: | yes | -| gen_format.rs:22:18:22:18 | 1 | getParent: | gen_format.rs:22:15:22:20 | {:.1$} | hasVariable: | no | -| gen_format_args_expr.rs:7:20:7:20 | b | getParent: | gen_format_args_expr.rs:7:19:7:21 | {b} | hasVariable: | no | -| gen_format_args_expr.rs:7:28:7:28 | a | getParent: | gen_format_args_expr.rs:7:27:7:31 | {a:?} | hasVariable: | no | -| gen_format_args_expr.rs:9:20:9:20 | x | getParent: | gen_format_args_expr.rs:9:19:9:21 | {x} | hasVariable: | yes | -| gen_format_args_expr.rs:9:25:9:25 | y | getParent: | gen_format_args_expr.rs:9:24:9:26 | {y} | hasVariable: | yes | -| gen_format_argument.rs:5:22:5:26 | value | getParent: | gen_format_argument.rs:5:21:5:46 | {value:#width$.precision$} | hasVariable: | yes | -| gen_format_argument.rs:5:29:5:33 | width | getParent: | gen_format_argument.rs:5:21:5:46 | {value:#width$.precision$} | hasVariable: | yes | -| gen_format_argument.rs:5:36:5:44 | precision | getParent: | gen_format_argument.rs:5:21:5:46 | {value:#width$.precision$} | hasVariable: | yes | -| gen_format_argument.rs:7:22:7:22 | 0 | getParent: | gen_format_argument.rs:7:21:7:30 | {0:#1$.2$} | hasVariable: | no | -| gen_format_argument.rs:7:25:7:25 | 1 | getParent: | gen_format_argument.rs:7:21:7:30 | {0:#1$.2$} | hasVariable: | no | -| gen_format_argument.rs:7:28:7:28 | 2 | getParent: | gen_format_argument.rs:7:21:7:30 | {0:#1$.2$} | hasVariable: | no | +instances +| gen_format.rs:7:22:7:26 | value | getParent: | gen_format.rs:7:21:7:46 | {value:#width$.precision$} | +| gen_format.rs:7:29:7:33 | width | getParent: | gen_format.rs:7:21:7:46 | {value:#width$.precision$} | +| gen_format.rs:7:36:7:44 | precision | getParent: | gen_format.rs:7:21:7:46 | {value:#width$.precision$} | +| gen_format.rs:11:16:11:19 | name | getParent: | gen_format.rs:11:15:11:20 | {name} | +| gen_format.rs:12:16:12:16 | 0 | getParent: | gen_format.rs:12:15:12:17 | {0} | +| gen_format.rs:16:17:16:21 | width | getParent: | gen_format.rs:16:15:16:23 | {:width$} | +| gen_format.rs:17:17:17:17 | 1 | getParent: | gen_format.rs:17:15:17:19 | {:1$} | +| gen_format.rs:21:18:21:21 | prec | getParent: | gen_format.rs:21:15:21:23 | {:.prec$} | +| gen_format.rs:22:18:22:18 | 1 | getParent: | gen_format.rs:22:15:22:20 | {:.1$} | +| gen_format_args_expr.rs:7:20:7:20 | b | getParent: | gen_format_args_expr.rs:7:19:7:21 | {b} | +| gen_format_args_expr.rs:7:28:7:28 | a | getParent: | gen_format_args_expr.rs:7:27:7:31 | {a:?} | +| gen_format_args_expr.rs:9:20:9:20 | x | getParent: | gen_format_args_expr.rs:9:19:9:21 | {x} | +| gen_format_args_expr.rs:9:25:9:25 | y | getParent: | gen_format_args_expr.rs:9:24:9:26 | {y} | +| gen_format_argument.rs:5:22:5:26 | value | getParent: | gen_format_argument.rs:5:21:5:46 | {value:#width$.precision$} | +| gen_format_argument.rs:5:29:5:33 | width | getParent: | gen_format_argument.rs:5:21:5:46 | {value:#width$.precision$} | +| gen_format_argument.rs:5:36:5:44 | precision | getParent: | gen_format_argument.rs:5:21:5:46 | {value:#width$.precision$} | +| gen_format_argument.rs:7:22:7:22 | 0 | getParent: | gen_format_argument.rs:7:21:7:30 | {0:#1$.2$} | +| gen_format_argument.rs:7:25:7:25 | 1 | getParent: | gen_format_argument.rs:7:21:7:30 | {0:#1$.2$} | +| gen_format_argument.rs:7:28:7:28 | 2 | getParent: | gen_format_argument.rs:7:21:7:30 | {0:#1$.2$} | +getVariable +| gen_format.rs:7:22:7:26 | value | gen_format.rs:7:22:7:26 | value | +| gen_format.rs:7:29:7:33 | width | gen_format.rs:7:29:7:33 | width | +| gen_format.rs:7:36:7:44 | precision | gen_format.rs:7:36:7:44 | precision | +| gen_format.rs:11:16:11:19 | name | gen_format.rs:11:16:11:19 | name | +| gen_format.rs:16:17:16:21 | width | gen_format.rs:16:17:16:21 | width | +| gen_format.rs:21:18:21:21 | prec | gen_format.rs:21:18:21:21 | prec | +| gen_format_args_expr.rs:9:20:9:20 | x | gen_format_args_expr.rs:9:20:9:20 | x | +| gen_format_args_expr.rs:9:25:9:25 | y | gen_format_args_expr.rs:9:25:9:25 | y | +| gen_format_argument.rs:5:22:5:26 | value | gen_format_argument.rs:5:22:5:26 | value | +| gen_format_argument.rs:5:29:5:33 | width | gen_format_argument.rs:5:29:5:33 | width | +| gen_format_argument.rs:5:36:5:44 | precision | gen_format_argument.rs:5:36:5:44 | precision | diff --git a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgument.ql b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgument.ql index ed57154f7e8..0c8498fba86 100644 --- a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgument.ql +++ b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgument.ql @@ -2,10 +2,13 @@ import codeql.rust.elements import TestUtils -from FormatArgument x, Format getParent, string hasVariable -where +query predicate instances(FormatArgument x, string getParent__label, Format getParent) { toBeTested(x) and not x.isUnknown() and - getParent = x.getParent() and - if x.hasVariable() then hasVariable = "yes" else hasVariable = "no" -select x, "getParent:", getParent, "hasVariable:", hasVariable + getParent__label = "getParent:" and + getParent = x.getParent() +} + +query predicate getVariable(FormatArgument x, FormatTemplateVariableAccess getVariable) { + toBeTested(x) and not x.isUnknown() and getVariable = x.getVariable() +} diff --git a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgument_getVariable.expected b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgument_getVariable.expected deleted file mode 100644 index 46b5e6255e1..00000000000 --- a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgument_getVariable.expected +++ /dev/null @@ -1,11 +0,0 @@ -| gen_format.rs:7:22:7:26 | value | gen_format.rs:7:22:7:26 | value | -| gen_format.rs:7:29:7:33 | width | gen_format.rs:7:29:7:33 | width | -| gen_format.rs:7:36:7:44 | precision | gen_format.rs:7:36:7:44 | precision | -| gen_format.rs:11:16:11:19 | name | gen_format.rs:11:16:11:19 | name | -| gen_format.rs:16:17:16:21 | width | gen_format.rs:16:17:16:21 | width | -| gen_format.rs:21:18:21:21 | prec | gen_format.rs:21:18:21:21 | prec | -| gen_format_args_expr.rs:9:20:9:20 | x | gen_format_args_expr.rs:9:20:9:20 | x | -| gen_format_args_expr.rs:9:25:9:25 | y | gen_format_args_expr.rs:9:25:9:25 | y | -| gen_format_argument.rs:5:22:5:26 | value | gen_format_argument.rs:5:22:5:26 | value | -| gen_format_argument.rs:5:29:5:33 | width | gen_format_argument.rs:5:29:5:33 | width | -| gen_format_argument.rs:5:36:5:44 | precision | gen_format_argument.rs:5:36:5:44 | precision | diff --git a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgument_getVariable.ql b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgument_getVariable.ql deleted file mode 100644 index 5d303bc4b6c..00000000000 --- a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgument_getVariable.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from FormatArgument x -where toBeTested(x) and not x.isUnknown() -select x, x.getVariable() diff --git a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatTemplateVariableAccess.ql b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatTemplateVariableAccess.ql index 4f43ca11870..8a75f9cdb54 100644 --- a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatTemplateVariableAccess.ql +++ b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatTemplateVariableAccess.ql @@ -2,6 +2,4 @@ import codeql.rust.elements import TestUtils -from FormatTemplateVariableAccess x -where toBeTested(x) and not x.isUnknown() -select x +query predicate instances(FormatTemplateVariableAccess x) { toBeTested(x) and not x.isUnknown() } diff --git a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/Format_getArgumentRef.expected b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/Format_getArgumentRef.expected deleted file mode 100644 index 5df8716a659..00000000000 --- a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/Format_getArgumentRef.expected +++ /dev/null @@ -1,9 +0,0 @@ -| gen_format.rs:7:21:7:46 | {value:#width$.precision$} | gen_format.rs:7:22:7:26 | value | -| gen_format.rs:11:15:11:20 | {name} | gen_format.rs:11:16:11:19 | name | -| gen_format.rs:12:15:12:17 | {0} | gen_format.rs:12:16:12:16 | 0 | -| gen_format_args_expr.rs:7:19:7:21 | {b} | gen_format_args_expr.rs:7:20:7:20 | b | -| gen_format_args_expr.rs:7:27:7:31 | {a:?} | gen_format_args_expr.rs:7:28:7:28 | a | -| gen_format_args_expr.rs:9:19:9:21 | {x} | gen_format_args_expr.rs:9:20:9:20 | x | -| gen_format_args_expr.rs:9:24:9:26 | {y} | gen_format_args_expr.rs:9:25:9:25 | y | -| gen_format_argument.rs:5:21:5:46 | {value:#width$.precision$} | gen_format_argument.rs:5:22:5:26 | value | -| gen_format_argument.rs:7:21:7:30 | {0:#1$.2$} | gen_format_argument.rs:7:22:7:22 | 0 | diff --git a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/Format_getArgumentRef.ql b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/Format_getArgumentRef.ql deleted file mode 100644 index e9958bcf0fa..00000000000 --- a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/Format_getArgumentRef.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Format x -where toBeTested(x) and not x.isUnknown() -select x, x.getArgumentRef() diff --git a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/Format_getPrecisionArgument.expected b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/Format_getPrecisionArgument.expected deleted file mode 100644 index 21a246404d7..00000000000 --- a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/Format_getPrecisionArgument.expected +++ /dev/null @@ -1,5 +0,0 @@ -| gen_format.rs:7:21:7:46 | {value:#width$.precision$} | gen_format.rs:7:36:7:44 | precision | -| gen_format.rs:21:15:21:23 | {:.prec$} | gen_format.rs:21:18:21:21 | prec | -| gen_format.rs:22:15:22:20 | {:.1$} | gen_format.rs:22:18:22:18 | 1 | -| gen_format_argument.rs:5:21:5:46 | {value:#width$.precision$} | gen_format_argument.rs:5:36:5:44 | precision | -| gen_format_argument.rs:7:21:7:30 | {0:#1$.2$} | gen_format_argument.rs:7:28:7:28 | 2 | diff --git a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/Format_getPrecisionArgument.ql b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/Format_getPrecisionArgument.ql deleted file mode 100644 index 4b690bb0cc1..00000000000 --- a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/Format_getPrecisionArgument.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Format x -where toBeTested(x) and not x.isUnknown() -select x, x.getPrecisionArgument() diff --git a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/Format_getWidthArgument.expected b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/Format_getWidthArgument.expected deleted file mode 100644 index 9e009ee4fd1..00000000000 --- a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/Format_getWidthArgument.expected +++ /dev/null @@ -1,5 +0,0 @@ -| gen_format.rs:7:21:7:46 | {value:#width$.precision$} | gen_format.rs:7:29:7:33 | width | -| gen_format.rs:16:15:16:23 | {:width$} | gen_format.rs:16:17:16:21 | width | -| gen_format.rs:17:15:17:19 | {:1$} | gen_format.rs:17:17:17:17 | 1 | -| gen_format_argument.rs:5:21:5:46 | {value:#width$.precision$} | gen_format_argument.rs:5:29:5:33 | width | -| gen_format_argument.rs:7:21:7:30 | {0:#1$.2$} | gen_format_argument.rs:7:25:7:25 | 1 | diff --git a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/Format_getWidthArgument.ql b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/Format_getWidthArgument.ql deleted file mode 100644 index 62fe11f48eb..00000000000 --- a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/Format_getWidthArgument.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Format x -where toBeTested(x) and not x.isUnknown() -select x, x.getWidthArgument() diff --git a/rust/ql/test/extractor-tests/generated/Function/Cargo.lock b/rust/ql/test/extractor-tests/generated/Function/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Function/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/Function/Function.expected b/rust/ql/test/extractor-tests/generated/Function/Function.expected index 967606c2542..4c5e331252d 100644 --- a/rust/ql/test/extractor-tests/generated/Function/Function.expected +++ b/rust/ql/test/extractor-tests/generated/Function/Function.expected @@ -1,2 +1,27 @@ -| gen_function.rs:3:1:4:38 | fn foo | hasParamList: | yes | getNumberOfAttrs: | 0 | getNumberOfParams: | 1 | hasExtendedCanonicalPath: | yes | hasCrateOrigin: | yes | hasAttributeMacroExpansion: | no | hasAbi: | no | hasBody: | yes | hasGenericParamList: | no | isAsync: | no | isConst: | no | isDefault: | no | isGen: | no | isUnsafe: | no | hasName: | yes | hasRetType: | yes | hasVisibility: | no | hasWhereClause: | no | hasImplementation: | yes | -| gen_function.rs:7:5:7:13 | fn bar | hasParamList: | yes | getNumberOfAttrs: | 0 | getNumberOfParams: | 0 | hasExtendedCanonicalPath: | yes | hasCrateOrigin: | yes | hasAttributeMacroExpansion: | no | hasAbi: | no | hasBody: | no | hasGenericParamList: | no | isAsync: | no | isConst: | no | isDefault: | no | isGen: | no | isUnsafe: | no | hasName: | yes | hasRetType: | no | hasVisibility: | no | hasWhereClause: | no | hasImplementation: | no | +instances +| gen_function.rs:3:1:4:38 | fn foo | isAsync: | no | isConst: | no | isDefault: | no | isGen: | no | isUnsafe: | no | hasImplementation: | yes | +| gen_function.rs:7:5:7:13 | fn bar | isAsync: | no | isConst: | no | isDefault: | no | isGen: | no | isUnsafe: | no | hasImplementation: | no | +getParamList +| gen_function.rs:3:1:4:38 | fn foo | gen_function.rs:4:7:4:14 | ParamList | +| gen_function.rs:7:5:7:13 | fn bar | gen_function.rs:7:11:7:12 | ParamList | +getAttr +getParam +| gen_function.rs:3:1:4:38 | fn foo | 0 | gen_function.rs:4:8:4:13 | ...: u32 | +getExtendedCanonicalPath +| gen_function.rs:3:1:4:38 | fn foo | crate::gen_function::foo | +| gen_function.rs:7:5:7:13 | fn bar | crate::gen_function::Trait::bar | +getCrateOrigin +| gen_function.rs:3:1:4:38 | fn foo | repo::test | +| gen_function.rs:7:5:7:13 | fn bar | repo::test | +getAttributeMacroExpansion +getAbi +getBody +| gen_function.rs:3:1:4:38 | fn foo | gen_function.rs:4:23:4:38 | { ... } | +getGenericParamList +getName +| gen_function.rs:3:1:4:38 | fn foo | gen_function.rs:4:4:4:6 | foo | +| gen_function.rs:7:5:7:13 | fn bar | gen_function.rs:7:8:7:10 | bar | +getRetType +| gen_function.rs:3:1:4:38 | fn foo | gen_function.rs:4:16:4:21 | RetTypeRepr | +getVisibility +getWhereClause diff --git a/rust/ql/test/extractor-tests/generated/Function/Function.ql b/rust/ql/test/extractor-tests/generated/Function/Function.ql index 5e50f7a4ac0..81f578573b0 100644 --- a/rust/ql/test/extractor-tests/generated/Function/Function.ql +++ b/rust/ql/test/extractor-tests/generated/Function/Function.ql @@ -2,46 +2,77 @@ import codeql.rust.elements import TestUtils -from - Function x, string hasParamList, int getNumberOfAttrs, int getNumberOfParams, - string hasExtendedCanonicalPath, string hasCrateOrigin, string hasAttributeMacroExpansion, - string hasAbi, string hasBody, string hasGenericParamList, string isAsync, string isConst, - string isDefault, string isGen, string isUnsafe, string hasName, string hasRetType, - string hasVisibility, string hasWhereClause, string hasImplementation -where +query predicate instances( + Function x, string isAsync__label, string isAsync, string isConst__label, string isConst, + string isDefault__label, string isDefault, string isGen__label, string isGen, + string isUnsafe__label, string isUnsafe, string hasImplementation__label, string hasImplementation +) { toBeTested(x) and not x.isUnknown() and - (if x.hasParamList() then hasParamList = "yes" else hasParamList = "no") and - getNumberOfAttrs = x.getNumberOfAttrs() and - getNumberOfParams = x.getNumberOfParams() and - ( - if x.hasExtendedCanonicalPath() - then hasExtendedCanonicalPath = "yes" - else hasExtendedCanonicalPath = "no" - ) and - (if x.hasCrateOrigin() then hasCrateOrigin = "yes" else hasCrateOrigin = "no") and - ( - if x.hasAttributeMacroExpansion() - then hasAttributeMacroExpansion = "yes" - else hasAttributeMacroExpansion = "no" - ) and - (if x.hasAbi() then hasAbi = "yes" else hasAbi = "no") and - (if x.hasBody() then hasBody = "yes" else hasBody = "no") and - (if x.hasGenericParamList() then hasGenericParamList = "yes" else hasGenericParamList = "no") and + isAsync__label = "isAsync:" and (if x.isAsync() then isAsync = "yes" else isAsync = "no") and + isConst__label = "isConst:" and (if x.isConst() then isConst = "yes" else isConst = "no") and + isDefault__label = "isDefault:" and (if x.isDefault() then isDefault = "yes" else isDefault = "no") and + isGen__label = "isGen:" and (if x.isGen() then isGen = "yes" else isGen = "no") and + isUnsafe__label = "isUnsafe:" and (if x.isUnsafe() then isUnsafe = "yes" else isUnsafe = "no") and - (if x.hasName() then hasName = "yes" else hasName = "no") and - (if x.hasRetType() then hasRetType = "yes" else hasRetType = "no") and - (if x.hasVisibility() then hasVisibility = "yes" else hasVisibility = "no") and - (if x.hasWhereClause() then hasWhereClause = "yes" else hasWhereClause = "no") and + hasImplementation__label = "hasImplementation:" and if x.hasImplementation() then hasImplementation = "yes" else hasImplementation = "no" -select x, "hasParamList:", hasParamList, "getNumberOfAttrs:", getNumberOfAttrs, - "getNumberOfParams:", getNumberOfParams, "hasExtendedCanonicalPath:", hasExtendedCanonicalPath, - "hasCrateOrigin:", hasCrateOrigin, "hasAttributeMacroExpansion:", hasAttributeMacroExpansion, - "hasAbi:", hasAbi, "hasBody:", hasBody, "hasGenericParamList:", hasGenericParamList, "isAsync:", - isAsync, "isConst:", isConst, "isDefault:", isDefault, "isGen:", isGen, "isUnsafe:", isUnsafe, - "hasName:", hasName, "hasRetType:", hasRetType, "hasVisibility:", hasVisibility, - "hasWhereClause:", hasWhereClause, "hasImplementation:", hasImplementation +} + +query predicate getParamList(Function x, ParamList getParamList) { + toBeTested(x) and not x.isUnknown() and getParamList = x.getParamList() +} + +query predicate getAttr(Function x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} + +query predicate getParam(Function x, int index, Param getParam) { + toBeTested(x) and not x.isUnknown() and getParam = x.getParam(index) +} + +query predicate getExtendedCanonicalPath(Function x, string getExtendedCanonicalPath) { + toBeTested(x) and not x.isUnknown() and getExtendedCanonicalPath = x.getExtendedCanonicalPath() +} + +query predicate getCrateOrigin(Function x, string getCrateOrigin) { + toBeTested(x) and not x.isUnknown() and getCrateOrigin = x.getCrateOrigin() +} + +query predicate getAttributeMacroExpansion(Function x, MacroItems getAttributeMacroExpansion) { + toBeTested(x) and + not x.isUnknown() and + getAttributeMacroExpansion = x.getAttributeMacroExpansion() +} + +query predicate getAbi(Function x, Abi getAbi) { + toBeTested(x) and not x.isUnknown() and getAbi = x.getAbi() +} + +query predicate getBody(Function x, BlockExpr getBody) { + toBeTested(x) and not x.isUnknown() and getBody = x.getBody() +} + +query predicate getGenericParamList(Function x, GenericParamList getGenericParamList) { + toBeTested(x) and not x.isUnknown() and getGenericParamList = x.getGenericParamList() +} + +query predicate getName(Function x, Name getName) { + toBeTested(x) and not x.isUnknown() and getName = x.getName() +} + +query predicate getRetType(Function x, RetTypeRepr getRetType) { + toBeTested(x) and not x.isUnknown() and getRetType = x.getRetType() +} + +query predicate getVisibility(Function x, Visibility getVisibility) { + toBeTested(x) and not x.isUnknown() and getVisibility = x.getVisibility() +} + +query predicate getWhereClause(Function x, WhereClause getWhereClause) { + toBeTested(x) and not x.isUnknown() and getWhereClause = x.getWhereClause() +} diff --git a/rust/ql/test/extractor-tests/generated/Function/Function_getAbi.expected b/rust/ql/test/extractor-tests/generated/Function/Function_getAbi.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Function/Function_getAbi.ql b/rust/ql/test/extractor-tests/generated/Function/Function_getAbi.ql deleted file mode 100644 index a1317ed761f..00000000000 --- a/rust/ql/test/extractor-tests/generated/Function/Function_getAbi.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Function x -where toBeTested(x) and not x.isUnknown() -select x, x.getAbi() diff --git a/rust/ql/test/extractor-tests/generated/Function/Function_getAttr.expected b/rust/ql/test/extractor-tests/generated/Function/Function_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Function/Function_getAttr.ql b/rust/ql/test/extractor-tests/generated/Function/Function_getAttr.ql deleted file mode 100644 index 239c6da56c4..00000000000 --- a/rust/ql/test/extractor-tests/generated/Function/Function_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Function x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/Function/Function_getAttributeMacroExpansion.expected b/rust/ql/test/extractor-tests/generated/Function/Function_getAttributeMacroExpansion.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Function/Function_getAttributeMacroExpansion.ql b/rust/ql/test/extractor-tests/generated/Function/Function_getAttributeMacroExpansion.ql deleted file mode 100644 index 4bb6e2852cb..00000000000 --- a/rust/ql/test/extractor-tests/generated/Function/Function_getAttributeMacroExpansion.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Function x -where toBeTested(x) and not x.isUnknown() -select x, x.getAttributeMacroExpansion() diff --git a/rust/ql/test/extractor-tests/generated/Function/Function_getBody.expected b/rust/ql/test/extractor-tests/generated/Function/Function_getBody.expected deleted file mode 100644 index 894900b3eaa..00000000000 --- a/rust/ql/test/extractor-tests/generated/Function/Function_getBody.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_function.rs:3:1:4:38 | fn foo | gen_function.rs:4:23:4:38 | { ... } | diff --git a/rust/ql/test/extractor-tests/generated/Function/Function_getBody.ql b/rust/ql/test/extractor-tests/generated/Function/Function_getBody.ql deleted file mode 100644 index 5b3191cac00..00000000000 --- a/rust/ql/test/extractor-tests/generated/Function/Function_getBody.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Function x -where toBeTested(x) and not x.isUnknown() -select x, x.getBody() diff --git a/rust/ql/test/extractor-tests/generated/Function/Function_getCrateOrigin.expected b/rust/ql/test/extractor-tests/generated/Function/Function_getCrateOrigin.expected deleted file mode 100644 index eabc941bd5b..00000000000 --- a/rust/ql/test/extractor-tests/generated/Function/Function_getCrateOrigin.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_function.rs:3:1:4:38 | fn foo | repo::test | -| gen_function.rs:7:5:7:13 | fn bar | repo::test | diff --git a/rust/ql/test/extractor-tests/generated/Function/Function_getCrateOrigin.ql b/rust/ql/test/extractor-tests/generated/Function/Function_getCrateOrigin.ql deleted file mode 100644 index 933e5867d84..00000000000 --- a/rust/ql/test/extractor-tests/generated/Function/Function_getCrateOrigin.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Function x -where toBeTested(x) and not x.isUnknown() -select x, x.getCrateOrigin() diff --git a/rust/ql/test/extractor-tests/generated/Function/Function_getExtendedCanonicalPath.expected b/rust/ql/test/extractor-tests/generated/Function/Function_getExtendedCanonicalPath.expected deleted file mode 100644 index 2c0059ebc2a..00000000000 --- a/rust/ql/test/extractor-tests/generated/Function/Function_getExtendedCanonicalPath.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_function.rs:3:1:4:38 | fn foo | crate::gen_function::foo | -| gen_function.rs:7:5:7:13 | fn bar | crate::gen_function::Trait::bar | diff --git a/rust/ql/test/extractor-tests/generated/Function/Function_getExtendedCanonicalPath.ql b/rust/ql/test/extractor-tests/generated/Function/Function_getExtendedCanonicalPath.ql deleted file mode 100644 index f2c413748de..00000000000 --- a/rust/ql/test/extractor-tests/generated/Function/Function_getExtendedCanonicalPath.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Function x -where toBeTested(x) and not x.isUnknown() -select x, x.getExtendedCanonicalPath() diff --git a/rust/ql/test/extractor-tests/generated/Function/Function_getGenericParamList.expected b/rust/ql/test/extractor-tests/generated/Function/Function_getGenericParamList.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Function/Function_getGenericParamList.ql b/rust/ql/test/extractor-tests/generated/Function/Function_getGenericParamList.ql deleted file mode 100644 index 410d28c3ef8..00000000000 --- a/rust/ql/test/extractor-tests/generated/Function/Function_getGenericParamList.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Function x -where toBeTested(x) and not x.isUnknown() -select x, x.getGenericParamList() diff --git a/rust/ql/test/extractor-tests/generated/Function/Function_getName.expected b/rust/ql/test/extractor-tests/generated/Function/Function_getName.expected deleted file mode 100644 index 7e889e82d28..00000000000 --- a/rust/ql/test/extractor-tests/generated/Function/Function_getName.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_function.rs:3:1:4:38 | fn foo | gen_function.rs:4:4:4:6 | foo | -| gen_function.rs:7:5:7:13 | fn bar | gen_function.rs:7:8:7:10 | bar | diff --git a/rust/ql/test/extractor-tests/generated/Function/Function_getName.ql b/rust/ql/test/extractor-tests/generated/Function/Function_getName.ql deleted file mode 100644 index 8d1e2fbfe20..00000000000 --- a/rust/ql/test/extractor-tests/generated/Function/Function_getName.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Function x -where toBeTested(x) and not x.isUnknown() -select x, x.getName() diff --git a/rust/ql/test/extractor-tests/generated/Function/Function_getParam.expected b/rust/ql/test/extractor-tests/generated/Function/Function_getParam.expected deleted file mode 100644 index 6a7340509a7..00000000000 --- a/rust/ql/test/extractor-tests/generated/Function/Function_getParam.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_function.rs:3:1:4:38 | fn foo | 0 | gen_function.rs:4:8:4:13 | ...: u32 | diff --git a/rust/ql/test/extractor-tests/generated/Function/Function_getParam.ql b/rust/ql/test/extractor-tests/generated/Function/Function_getParam.ql deleted file mode 100644 index c936ea99da7..00000000000 --- a/rust/ql/test/extractor-tests/generated/Function/Function_getParam.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Function x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getParam(index) diff --git a/rust/ql/test/extractor-tests/generated/Function/Function_getParamList.expected b/rust/ql/test/extractor-tests/generated/Function/Function_getParamList.expected deleted file mode 100644 index df581061919..00000000000 --- a/rust/ql/test/extractor-tests/generated/Function/Function_getParamList.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_function.rs:3:1:4:38 | fn foo | gen_function.rs:4:7:4:14 | ParamList | -| gen_function.rs:7:5:7:13 | fn bar | gen_function.rs:7:11:7:12 | ParamList | diff --git a/rust/ql/test/extractor-tests/generated/Function/Function_getParamList.ql b/rust/ql/test/extractor-tests/generated/Function/Function_getParamList.ql deleted file mode 100644 index 6d9fed49b7b..00000000000 --- a/rust/ql/test/extractor-tests/generated/Function/Function_getParamList.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Function x -where toBeTested(x) and not x.isUnknown() -select x, x.getParamList() diff --git a/rust/ql/test/extractor-tests/generated/Function/Function_getRetType.expected b/rust/ql/test/extractor-tests/generated/Function/Function_getRetType.expected deleted file mode 100644 index f9778c63c7e..00000000000 --- a/rust/ql/test/extractor-tests/generated/Function/Function_getRetType.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_function.rs:3:1:4:38 | fn foo | gen_function.rs:4:16:4:21 | RetTypeRepr | diff --git a/rust/ql/test/extractor-tests/generated/Function/Function_getRetType.ql b/rust/ql/test/extractor-tests/generated/Function/Function_getRetType.ql deleted file mode 100644 index 123640add8b..00000000000 --- a/rust/ql/test/extractor-tests/generated/Function/Function_getRetType.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Function x -where toBeTested(x) and not x.isUnknown() -select x, x.getRetType() diff --git a/rust/ql/test/extractor-tests/generated/Function/Function_getVisibility.expected b/rust/ql/test/extractor-tests/generated/Function/Function_getVisibility.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Function/Function_getVisibility.ql b/rust/ql/test/extractor-tests/generated/Function/Function_getVisibility.ql deleted file mode 100644 index 1aa04da90e9..00000000000 --- a/rust/ql/test/extractor-tests/generated/Function/Function_getVisibility.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Function x -where toBeTested(x) and not x.isUnknown() -select x, x.getVisibility() diff --git a/rust/ql/test/extractor-tests/generated/Function/Function_getWhereClause.expected b/rust/ql/test/extractor-tests/generated/Function/Function_getWhereClause.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Function/Function_getWhereClause.ql b/rust/ql/test/extractor-tests/generated/Function/Function_getWhereClause.ql deleted file mode 100644 index b4f5bd56274..00000000000 --- a/rust/ql/test/extractor-tests/generated/Function/Function_getWhereClause.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Function x -where toBeTested(x) and not x.isUnknown() -select x, x.getWhereClause() diff --git a/rust/ql/test/extractor-tests/generated/GenericArgList/Cargo.lock b/rust/ql/test/extractor-tests/generated/GenericArgList/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/GenericArgList/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/GenericArgList/GenericArgList.expected b/rust/ql/test/extractor-tests/generated/GenericArgList/GenericArgList.expected index d2a5b7bcd8f..79282232386 100644 --- a/rust/ql/test/extractor-tests/generated/GenericArgList/GenericArgList.expected +++ b/rust/ql/test/extractor-tests/generated/GenericArgList/GenericArgList.expected @@ -1 +1,5 @@ -| gen_generic_arg_list.rs:5:10:5:21 | <...> | getNumberOfGenericArgs: | 2 | +instances +| gen_generic_arg_list.rs:5:10:5:21 | <...> | +getGenericArg +| gen_generic_arg_list.rs:5:10:5:21 | <...> | 0 | gen_generic_arg_list.rs:5:13:5:15 | TypeArg | +| gen_generic_arg_list.rs:5:10:5:21 | <...> | 1 | gen_generic_arg_list.rs:5:18:5:20 | TypeArg | diff --git a/rust/ql/test/extractor-tests/generated/GenericArgList/GenericArgList.ql b/rust/ql/test/extractor-tests/generated/GenericArgList/GenericArgList.ql index bd3e8bfb63f..3ba930f204a 100644 --- a/rust/ql/test/extractor-tests/generated/GenericArgList/GenericArgList.ql +++ b/rust/ql/test/extractor-tests/generated/GenericArgList/GenericArgList.ql @@ -2,9 +2,8 @@ import codeql.rust.elements import TestUtils -from GenericArgList x, int getNumberOfGenericArgs -where - toBeTested(x) and - not x.isUnknown() and - getNumberOfGenericArgs = x.getNumberOfGenericArgs() -select x, "getNumberOfGenericArgs:", getNumberOfGenericArgs +query predicate instances(GenericArgList x) { toBeTested(x) and not x.isUnknown() } + +query predicate getGenericArg(GenericArgList x, int index, GenericArg getGenericArg) { + toBeTested(x) and not x.isUnknown() and getGenericArg = x.getGenericArg(index) +} diff --git a/rust/ql/test/extractor-tests/generated/GenericArgList/GenericArgList_getGenericArg.expected b/rust/ql/test/extractor-tests/generated/GenericArgList/GenericArgList_getGenericArg.expected deleted file mode 100644 index 69e416a57ad..00000000000 --- a/rust/ql/test/extractor-tests/generated/GenericArgList/GenericArgList_getGenericArg.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_generic_arg_list.rs:5:10:5:21 | <...> | 0 | gen_generic_arg_list.rs:5:13:5:15 | TypeArg | -| gen_generic_arg_list.rs:5:10:5:21 | <...> | 1 | gen_generic_arg_list.rs:5:18:5:20 | TypeArg | diff --git a/rust/ql/test/extractor-tests/generated/GenericArgList/GenericArgList_getGenericArg.ql b/rust/ql/test/extractor-tests/generated/GenericArgList/GenericArgList_getGenericArg.ql deleted file mode 100644 index cc13c85782a..00000000000 --- a/rust/ql/test/extractor-tests/generated/GenericArgList/GenericArgList_getGenericArg.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from GenericArgList x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getGenericArg(index) diff --git a/rust/ql/test/extractor-tests/generated/GenericParamList/Cargo.lock b/rust/ql/test/extractor-tests/generated/GenericParamList/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/GenericParamList/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/GenericParamList/GenericParamList.expected b/rust/ql/test/extractor-tests/generated/GenericParamList/GenericParamList.expected index 22f71c13aa6..be0b98eb2c5 100644 --- a/rust/ql/test/extractor-tests/generated/GenericParamList/GenericParamList.expected +++ b/rust/ql/test/extractor-tests/generated/GenericParamList/GenericParamList.expected @@ -1,2 +1,8 @@ -| gen_generic_param_list.rs:5:9:5:14 | <...> | getNumberOfGenericParams: | 2 | -| gen_generic_param_list.rs:7:13:7:20 | <...> | getNumberOfGenericParams: | 2 | +instances +| gen_generic_param_list.rs:5:9:5:14 | <...> | +| gen_generic_param_list.rs:7:13:7:20 | <...> | +getGenericParam +| gen_generic_param_list.rs:5:9:5:14 | <...> | 0 | gen_generic_param_list.rs:5:10:5:10 | A | +| gen_generic_param_list.rs:5:9:5:14 | <...> | 1 | gen_generic_param_list.rs:5:13:5:13 | B | +| gen_generic_param_list.rs:7:13:7:20 | <...> | 0 | gen_generic_param_list.rs:7:14:7:15 | T1 | +| gen_generic_param_list.rs:7:13:7:20 | <...> | 1 | gen_generic_param_list.rs:7:18:7:19 | T2 | diff --git a/rust/ql/test/extractor-tests/generated/GenericParamList/GenericParamList.ql b/rust/ql/test/extractor-tests/generated/GenericParamList/GenericParamList.ql index b79afcf33f7..c09637a5757 100644 --- a/rust/ql/test/extractor-tests/generated/GenericParamList/GenericParamList.ql +++ b/rust/ql/test/extractor-tests/generated/GenericParamList/GenericParamList.ql @@ -2,9 +2,8 @@ import codeql.rust.elements import TestUtils -from GenericParamList x, int getNumberOfGenericParams -where - toBeTested(x) and - not x.isUnknown() and - getNumberOfGenericParams = x.getNumberOfGenericParams() -select x, "getNumberOfGenericParams:", getNumberOfGenericParams +query predicate instances(GenericParamList x) { toBeTested(x) and not x.isUnknown() } + +query predicate getGenericParam(GenericParamList x, int index, GenericParam getGenericParam) { + toBeTested(x) and not x.isUnknown() and getGenericParam = x.getGenericParam(index) +} diff --git a/rust/ql/test/extractor-tests/generated/GenericParamList/GenericParamList_getGenericParam.expected b/rust/ql/test/extractor-tests/generated/GenericParamList/GenericParamList_getGenericParam.expected deleted file mode 100644 index 01af2d987e9..00000000000 --- a/rust/ql/test/extractor-tests/generated/GenericParamList/GenericParamList_getGenericParam.expected +++ /dev/null @@ -1,4 +0,0 @@ -| gen_generic_param_list.rs:5:9:5:14 | <...> | 0 | gen_generic_param_list.rs:5:10:5:10 | A | -| gen_generic_param_list.rs:5:9:5:14 | <...> | 1 | gen_generic_param_list.rs:5:13:5:13 | B | -| gen_generic_param_list.rs:7:13:7:20 | <...> | 0 | gen_generic_param_list.rs:7:14:7:15 | T1 | -| gen_generic_param_list.rs:7:13:7:20 | <...> | 1 | gen_generic_param_list.rs:7:18:7:19 | T2 | diff --git a/rust/ql/test/extractor-tests/generated/GenericParamList/GenericParamList_getGenericParam.ql b/rust/ql/test/extractor-tests/generated/GenericParamList/GenericParamList_getGenericParam.ql deleted file mode 100644 index 323c11e3841..00000000000 --- a/rust/ql/test/extractor-tests/generated/GenericParamList/GenericParamList_getGenericParam.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from GenericParamList x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getGenericParam(index) diff --git a/rust/ql/test/extractor-tests/generated/IdentPat/Cargo.lock b/rust/ql/test/extractor-tests/generated/IdentPat/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/IdentPat/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat.expected b/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat.expected index e00fd230ad1..931a1e9069a 100644 --- a/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat.expected +++ b/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat.expected @@ -1,2 +1,9 @@ -| gen_ident_pat.rs:6:22:6:22 | y | getNumberOfAttrs: | 0 | isMut: | no | isRef: | no | hasName: | yes | hasPat: | no | -| gen_ident_pat.rs:10:9:10:25 | y @ ... | getNumberOfAttrs: | 0 | isMut: | no | isRef: | no | hasName: | yes | hasPat: | yes | +instances +| gen_ident_pat.rs:6:22:6:22 | y | isMut: | no | isRef: | no | +| gen_ident_pat.rs:10:9:10:25 | y @ ... | isMut: | no | isRef: | no | +getAttr +getName +| gen_ident_pat.rs:6:22:6:22 | y | gen_ident_pat.rs:6:22:6:22 | y | +| gen_ident_pat.rs:10:9:10:25 | y @ ... | gen_ident_pat.rs:10:9:10:9 | y | +getPat +| gen_ident_pat.rs:10:9:10:25 | y @ ... | gen_ident_pat.rs:10:11:10:25 | ...::Some(...) | diff --git a/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat.ql b/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat.ql index 3587ccff9ae..a70bc32ca79 100644 --- a/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat.ql +++ b/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat.ql @@ -2,14 +2,25 @@ import codeql.rust.elements import TestUtils -from IdentPat x, int getNumberOfAttrs, string isMut, string isRef, string hasName, string hasPat -where +query predicate instances( + IdentPat x, string isMut__label, string isMut, string isRef__label, string isRef +) { toBeTested(x) and not x.isUnknown() and - getNumberOfAttrs = x.getNumberOfAttrs() and + isMut__label = "isMut:" and (if x.isMut() then isMut = "yes" else isMut = "no") and - (if x.isRef() then isRef = "yes" else isRef = "no") and - (if x.hasName() then hasName = "yes" else hasName = "no") and - if x.hasPat() then hasPat = "yes" else hasPat = "no" -select x, "getNumberOfAttrs:", getNumberOfAttrs, "isMut:", isMut, "isRef:", isRef, "hasName:", - hasName, "hasPat:", hasPat + isRef__label = "isRef:" and + if x.isRef() then isRef = "yes" else isRef = "no" +} + +query predicate getAttr(IdentPat x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} + +query predicate getName(IdentPat x, Name getName) { + toBeTested(x) and not x.isUnknown() and getName = x.getName() +} + +query predicate getPat(IdentPat x, Pat getPat) { + toBeTested(x) and not x.isUnknown() and getPat = x.getPat() +} diff --git a/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat_getAttr.expected b/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat_getAttr.ql b/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat_getAttr.ql deleted file mode 100644 index 8dde5cce1ca..00000000000 --- a/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from IdentPat x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat_getName.expected b/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat_getName.expected deleted file mode 100644 index c3009e862a4..00000000000 --- a/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat_getName.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_ident_pat.rs:6:22:6:22 | y | gen_ident_pat.rs:6:22:6:22 | y | -| gen_ident_pat.rs:10:9:10:25 | y @ ... | gen_ident_pat.rs:10:9:10:9 | y | diff --git a/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat_getName.ql b/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat_getName.ql deleted file mode 100644 index e96736741f5..00000000000 --- a/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat_getName.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from IdentPat x -where toBeTested(x) and not x.isUnknown() -select x, x.getName() diff --git a/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat_getPat.expected b/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat_getPat.expected deleted file mode 100644 index 6ae1d9f978a..00000000000 --- a/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat_getPat.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_ident_pat.rs:10:9:10:25 | y @ ... | gen_ident_pat.rs:10:11:10:25 | ...::Some(...) | diff --git a/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat_getPat.ql b/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat_getPat.ql deleted file mode 100644 index 14d979626d4..00000000000 --- a/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat_getPat.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from IdentPat x -where toBeTested(x) and not x.isUnknown() -select x, x.getPat() diff --git a/rust/ql/test/extractor-tests/generated/IfExpr/Cargo.lock b/rust/ql/test/extractor-tests/generated/IfExpr/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/IfExpr/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr.expected b/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr.expected index d9a33ad74f7..3051c69d10e 100644 --- a/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr.expected +++ b/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr.expected @@ -1,2 +1,12 @@ -| gen_if_expr.rs:5:5:7:5 | if ... {...} | getNumberOfAttrs: | 0 | hasCondition: | yes | hasElse: | no | hasThen: | yes | -| gen_if_expr.rs:8:13:12:5 | if ... {...} else {...} | getNumberOfAttrs: | 0 | hasCondition: | yes | hasElse: | yes | hasThen: | yes | +instances +| gen_if_expr.rs:5:5:7:5 | if ... {...} | +| gen_if_expr.rs:8:13:12:5 | if ... {...} else {...} | +getAttr +getCondition +| gen_if_expr.rs:5:5:7:5 | if ... {...} | gen_if_expr.rs:5:8:5:14 | ... == ... | +| gen_if_expr.rs:8:13:12:5 | if ... {...} else {...} | gen_if_expr.rs:8:16:8:20 | ... > ... | +getElse +| gen_if_expr.rs:8:13:12:5 | if ... {...} else {...} | gen_if_expr.rs:10:12:12:5 | { ... } | +getThen +| gen_if_expr.rs:5:5:7:5 | if ... {...} | gen_if_expr.rs:5:16:7:5 | { ... } | +| gen_if_expr.rs:8:13:12:5 | if ... {...} else {...} | gen_if_expr.rs:8:22:10:5 | { ... } | diff --git a/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr.ql b/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr.ql index e7281627957..c41248fa322 100644 --- a/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr.ql +++ b/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr.ql @@ -2,13 +2,20 @@ import codeql.rust.elements import TestUtils -from IfExpr x, int getNumberOfAttrs, string hasCondition, string hasElse, string hasThen -where - toBeTested(x) and - not x.isUnknown() and - getNumberOfAttrs = x.getNumberOfAttrs() and - (if x.hasCondition() then hasCondition = "yes" else hasCondition = "no") and - (if x.hasElse() then hasElse = "yes" else hasElse = "no") and - if x.hasThen() then hasThen = "yes" else hasThen = "no" -select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasCondition:", hasCondition, "hasElse:", hasElse, - "hasThen:", hasThen +query predicate instances(IfExpr x) { toBeTested(x) and not x.isUnknown() } + +query predicate getAttr(IfExpr x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} + +query predicate getCondition(IfExpr x, Expr getCondition) { + toBeTested(x) and not x.isUnknown() and getCondition = x.getCondition() +} + +query predicate getElse(IfExpr x, Expr getElse) { + toBeTested(x) and not x.isUnknown() and getElse = x.getElse() +} + +query predicate getThen(IfExpr x, BlockExpr getThen) { + toBeTested(x) and not x.isUnknown() and getThen = x.getThen() +} diff --git a/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getAttr.ql deleted file mode 100644 index 46f5bde3e3b..00000000000 --- a/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from IfExpr x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getCondition.expected b/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getCondition.expected deleted file mode 100644 index 4990a47bc96..00000000000 --- a/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getCondition.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_if_expr.rs:5:5:7:5 | if ... {...} | gen_if_expr.rs:5:8:5:14 | ... == ... | -| gen_if_expr.rs:8:13:12:5 | if ... {...} else {...} | gen_if_expr.rs:8:16:8:20 | ... > ... | diff --git a/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getCondition.ql b/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getCondition.ql deleted file mode 100644 index 459d6961e5a..00000000000 --- a/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getCondition.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from IfExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getCondition() diff --git a/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getElse.expected b/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getElse.expected deleted file mode 100644 index a03626f5e5d..00000000000 --- a/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getElse.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_if_expr.rs:8:13:12:5 | if ... {...} else {...} | gen_if_expr.rs:10:12:12:5 | { ... } | diff --git a/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getElse.ql b/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getElse.ql deleted file mode 100644 index 187637aab21..00000000000 --- a/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getElse.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from IfExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getElse() diff --git a/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getThen.expected b/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getThen.expected deleted file mode 100644 index 6080b004f38..00000000000 --- a/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getThen.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_if_expr.rs:5:5:7:5 | if ... {...} | gen_if_expr.rs:5:16:7:5 | { ... } | -| gen_if_expr.rs:8:13:12:5 | if ... {...} else {...} | gen_if_expr.rs:8:22:10:5 | { ... } | diff --git a/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getThen.ql b/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getThen.ql deleted file mode 100644 index 35fa0919661..00000000000 --- a/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getThen.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from IfExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getThen() diff --git a/rust/ql/test/extractor-tests/generated/Impl/Cargo.lock b/rust/ql/test/extractor-tests/generated/Impl/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Impl/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/Impl/Impl.expected b/rust/ql/test/extractor-tests/generated/Impl/Impl.expected index 5297703e7d8..2a47a4e20f6 100644 --- a/rust/ql/test/extractor-tests/generated/Impl/Impl.expected +++ b/rust/ql/test/extractor-tests/generated/Impl/Impl.expected @@ -1 +1,15 @@ -| gen_impl.rs:4:5:9:5 | impl MyTrait for MyType { ... } | hasExtendedCanonicalPath: | no | hasCrateOrigin: | no | hasAttributeMacroExpansion: | no | hasAssocItemList: | yes | getNumberOfAttrs: | 0 | hasGenericParamList: | no | isConst: | no | isDefault: | no | isUnsafe: | no | hasSelfTy: | yes | hasTrait: | yes | hasVisibility: | no | hasWhereClause: | no | +instances +| gen_impl.rs:4:5:9:5 | impl MyTrait for MyType { ... } | isConst: | no | isDefault: | no | isUnsafe: | no | +getExtendedCanonicalPath +getCrateOrigin +getAttributeMacroExpansion +getAssocItemList +| gen_impl.rs:4:5:9:5 | impl MyTrait for MyType { ... } | gen_impl.rs:7:29:9:5 | AssocItemList | +getAttr +getGenericParamList +getSelfTy +| gen_impl.rs:4:5:9:5 | impl MyTrait for MyType { ... } | gen_impl.rs:7:22:7:27 | MyType | +getTrait +| gen_impl.rs:4:5:9:5 | impl MyTrait for MyType { ... } | gen_impl.rs:7:10:7:16 | MyTrait | +getVisibility +getWhereClause diff --git a/rust/ql/test/extractor-tests/generated/Impl/Impl.ql b/rust/ql/test/extractor-tests/generated/Impl/Impl.ql index fa92053a217..c64bae752c3 100644 --- a/rust/ql/test/extractor-tests/generated/Impl/Impl.ql +++ b/rust/ql/test/extractor-tests/generated/Impl/Impl.ql @@ -2,37 +2,58 @@ import codeql.rust.elements import TestUtils -from - Impl x, string hasExtendedCanonicalPath, string hasCrateOrigin, string hasAttributeMacroExpansion, - string hasAssocItemList, int getNumberOfAttrs, string hasGenericParamList, string isConst, - string isDefault, string isUnsafe, string hasSelfTy, string hasTrait, string hasVisibility, - string hasWhereClause -where +query predicate instances( + Impl x, string isConst__label, string isConst, string isDefault__label, string isDefault, + string isUnsafe__label, string isUnsafe +) { toBeTested(x) and not x.isUnknown() and - ( - if x.hasExtendedCanonicalPath() - then hasExtendedCanonicalPath = "yes" - else hasExtendedCanonicalPath = "no" - ) and - (if x.hasCrateOrigin() then hasCrateOrigin = "yes" else hasCrateOrigin = "no") and - ( - if x.hasAttributeMacroExpansion() - then hasAttributeMacroExpansion = "yes" - else hasAttributeMacroExpansion = "no" - ) and - (if x.hasAssocItemList() then hasAssocItemList = "yes" else hasAssocItemList = "no") and - getNumberOfAttrs = x.getNumberOfAttrs() and - (if x.hasGenericParamList() then hasGenericParamList = "yes" else hasGenericParamList = "no") and + isConst__label = "isConst:" and (if x.isConst() then isConst = "yes" else isConst = "no") and + isDefault__label = "isDefault:" and (if x.isDefault() then isDefault = "yes" else isDefault = "no") and - (if x.isUnsafe() then isUnsafe = "yes" else isUnsafe = "no") and - (if x.hasSelfTy() then hasSelfTy = "yes" else hasSelfTy = "no") and - (if x.hasTrait() then hasTrait = "yes" else hasTrait = "no") and - (if x.hasVisibility() then hasVisibility = "yes" else hasVisibility = "no") and - if x.hasWhereClause() then hasWhereClause = "yes" else hasWhereClause = "no" -select x, "hasExtendedCanonicalPath:", hasExtendedCanonicalPath, "hasCrateOrigin:", hasCrateOrigin, - "hasAttributeMacroExpansion:", hasAttributeMacroExpansion, "hasAssocItemList:", hasAssocItemList, - "getNumberOfAttrs:", getNumberOfAttrs, "hasGenericParamList:", hasGenericParamList, "isConst:", - isConst, "isDefault:", isDefault, "isUnsafe:", isUnsafe, "hasSelfTy:", hasSelfTy, "hasTrait:", - hasTrait, "hasVisibility:", hasVisibility, "hasWhereClause:", hasWhereClause + isUnsafe__label = "isUnsafe:" and + if x.isUnsafe() then isUnsafe = "yes" else isUnsafe = "no" +} + +query predicate getExtendedCanonicalPath(Impl x, string getExtendedCanonicalPath) { + toBeTested(x) and not x.isUnknown() and getExtendedCanonicalPath = x.getExtendedCanonicalPath() +} + +query predicate getCrateOrigin(Impl x, string getCrateOrigin) { + toBeTested(x) and not x.isUnknown() and getCrateOrigin = x.getCrateOrigin() +} + +query predicate getAttributeMacroExpansion(Impl x, MacroItems getAttributeMacroExpansion) { + toBeTested(x) and + not x.isUnknown() and + getAttributeMacroExpansion = x.getAttributeMacroExpansion() +} + +query predicate getAssocItemList(Impl x, AssocItemList getAssocItemList) { + toBeTested(x) and not x.isUnknown() and getAssocItemList = x.getAssocItemList() +} + +query predicate getAttr(Impl x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} + +query predicate getGenericParamList(Impl x, GenericParamList getGenericParamList) { + toBeTested(x) and not x.isUnknown() and getGenericParamList = x.getGenericParamList() +} + +query predicate getSelfTy(Impl x, TypeRepr getSelfTy) { + toBeTested(x) and not x.isUnknown() and getSelfTy = x.getSelfTy() +} + +query predicate getTrait(Impl x, TypeRepr getTrait) { + toBeTested(x) and not x.isUnknown() and getTrait = x.getTrait() +} + +query predicate getVisibility(Impl x, Visibility getVisibility) { + toBeTested(x) and not x.isUnknown() and getVisibility = x.getVisibility() +} + +query predicate getWhereClause(Impl x, WhereClause getWhereClause) { + toBeTested(x) and not x.isUnknown() and getWhereClause = x.getWhereClause() +} diff --git a/rust/ql/test/extractor-tests/generated/Impl/Impl_getAssocItemList.expected b/rust/ql/test/extractor-tests/generated/Impl/Impl_getAssocItemList.expected deleted file mode 100644 index ae3d1f4a97f..00000000000 --- a/rust/ql/test/extractor-tests/generated/Impl/Impl_getAssocItemList.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_impl.rs:4:5:9:5 | impl MyTrait for MyType { ... } | gen_impl.rs:7:29:9:5 | AssocItemList | diff --git a/rust/ql/test/extractor-tests/generated/Impl/Impl_getAssocItemList.ql b/rust/ql/test/extractor-tests/generated/Impl/Impl_getAssocItemList.ql deleted file mode 100644 index 8365b6b0dfe..00000000000 --- a/rust/ql/test/extractor-tests/generated/Impl/Impl_getAssocItemList.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Impl x -where toBeTested(x) and not x.isUnknown() -select x, x.getAssocItemList() diff --git a/rust/ql/test/extractor-tests/generated/Impl/Impl_getAttr.expected b/rust/ql/test/extractor-tests/generated/Impl/Impl_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Impl/Impl_getAttr.ql b/rust/ql/test/extractor-tests/generated/Impl/Impl_getAttr.ql deleted file mode 100644 index d6c01005755..00000000000 --- a/rust/ql/test/extractor-tests/generated/Impl/Impl_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Impl x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/Impl/Impl_getAttributeMacroExpansion.expected b/rust/ql/test/extractor-tests/generated/Impl/Impl_getAttributeMacroExpansion.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Impl/Impl_getAttributeMacroExpansion.ql b/rust/ql/test/extractor-tests/generated/Impl/Impl_getAttributeMacroExpansion.ql deleted file mode 100644 index 3496b9cebe7..00000000000 --- a/rust/ql/test/extractor-tests/generated/Impl/Impl_getAttributeMacroExpansion.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Impl x -where toBeTested(x) and not x.isUnknown() -select x, x.getAttributeMacroExpansion() diff --git a/rust/ql/test/extractor-tests/generated/Impl/Impl_getCrateOrigin.expected b/rust/ql/test/extractor-tests/generated/Impl/Impl_getCrateOrigin.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Impl/Impl_getCrateOrigin.ql b/rust/ql/test/extractor-tests/generated/Impl/Impl_getCrateOrigin.ql deleted file mode 100644 index b9d428ce94a..00000000000 --- a/rust/ql/test/extractor-tests/generated/Impl/Impl_getCrateOrigin.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Impl x -where toBeTested(x) and not x.isUnknown() -select x, x.getCrateOrigin() diff --git a/rust/ql/test/extractor-tests/generated/Impl/Impl_getExtendedCanonicalPath.expected b/rust/ql/test/extractor-tests/generated/Impl/Impl_getExtendedCanonicalPath.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Impl/Impl_getExtendedCanonicalPath.ql b/rust/ql/test/extractor-tests/generated/Impl/Impl_getExtendedCanonicalPath.ql deleted file mode 100644 index 140490fcaff..00000000000 --- a/rust/ql/test/extractor-tests/generated/Impl/Impl_getExtendedCanonicalPath.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Impl x -where toBeTested(x) and not x.isUnknown() -select x, x.getExtendedCanonicalPath() diff --git a/rust/ql/test/extractor-tests/generated/Impl/Impl_getGenericParamList.expected b/rust/ql/test/extractor-tests/generated/Impl/Impl_getGenericParamList.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Impl/Impl_getGenericParamList.ql b/rust/ql/test/extractor-tests/generated/Impl/Impl_getGenericParamList.ql deleted file mode 100644 index 2b24c7d73a9..00000000000 --- a/rust/ql/test/extractor-tests/generated/Impl/Impl_getGenericParamList.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Impl x -where toBeTested(x) and not x.isUnknown() -select x, x.getGenericParamList() diff --git a/rust/ql/test/extractor-tests/generated/Impl/Impl_getSelfTy.expected b/rust/ql/test/extractor-tests/generated/Impl/Impl_getSelfTy.expected deleted file mode 100644 index 3d38010c592..00000000000 --- a/rust/ql/test/extractor-tests/generated/Impl/Impl_getSelfTy.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_impl.rs:4:5:9:5 | impl MyTrait for MyType { ... } | gen_impl.rs:7:22:7:27 | MyType | diff --git a/rust/ql/test/extractor-tests/generated/Impl/Impl_getSelfTy.ql b/rust/ql/test/extractor-tests/generated/Impl/Impl_getSelfTy.ql deleted file mode 100644 index 283903e8d34..00000000000 --- a/rust/ql/test/extractor-tests/generated/Impl/Impl_getSelfTy.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Impl x -where toBeTested(x) and not x.isUnknown() -select x, x.getSelfTy() diff --git a/rust/ql/test/extractor-tests/generated/Impl/Impl_getTrait.expected b/rust/ql/test/extractor-tests/generated/Impl/Impl_getTrait.expected deleted file mode 100644 index 9c0392972e1..00000000000 --- a/rust/ql/test/extractor-tests/generated/Impl/Impl_getTrait.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_impl.rs:4:5:9:5 | impl MyTrait for MyType { ... } | gen_impl.rs:7:10:7:16 | MyTrait | diff --git a/rust/ql/test/extractor-tests/generated/Impl/Impl_getTrait.ql b/rust/ql/test/extractor-tests/generated/Impl/Impl_getTrait.ql deleted file mode 100644 index 7551a5e960e..00000000000 --- a/rust/ql/test/extractor-tests/generated/Impl/Impl_getTrait.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Impl x -where toBeTested(x) and not x.isUnknown() -select x, x.getTrait() diff --git a/rust/ql/test/extractor-tests/generated/Impl/Impl_getVisibility.expected b/rust/ql/test/extractor-tests/generated/Impl/Impl_getVisibility.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Impl/Impl_getVisibility.ql b/rust/ql/test/extractor-tests/generated/Impl/Impl_getVisibility.ql deleted file mode 100644 index f50c36bc834..00000000000 --- a/rust/ql/test/extractor-tests/generated/Impl/Impl_getVisibility.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Impl x -where toBeTested(x) and not x.isUnknown() -select x, x.getVisibility() diff --git a/rust/ql/test/extractor-tests/generated/Impl/Impl_getWhereClause.expected b/rust/ql/test/extractor-tests/generated/Impl/Impl_getWhereClause.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Impl/Impl_getWhereClause.ql b/rust/ql/test/extractor-tests/generated/Impl/Impl_getWhereClause.ql deleted file mode 100644 index e2e87ef03c4..00000000000 --- a/rust/ql/test/extractor-tests/generated/Impl/Impl_getWhereClause.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Impl x -where toBeTested(x) and not x.isUnknown() -select x, x.getWhereClause() diff --git a/rust/ql/test/extractor-tests/generated/ImplTraitTypeRepr/Cargo.lock b/rust/ql/test/extractor-tests/generated/ImplTraitTypeRepr/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ImplTraitTypeRepr/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/ImplTraitTypeRepr/ImplTraitTypeRepr.expected b/rust/ql/test/extractor-tests/generated/ImplTraitTypeRepr/ImplTraitTypeRepr.expected index 27a8426d9c2..aa04363dc44 100644 --- a/rust/ql/test/extractor-tests/generated/ImplTraitTypeRepr/ImplTraitTypeRepr.expected +++ b/rust/ql/test/extractor-tests/generated/ImplTraitTypeRepr/ImplTraitTypeRepr.expected @@ -1 +1,4 @@ -| gen_impl_trait_type_repr.rs:7:17:7:41 | ImplTraitTypeRepr | hasTypeBoundList: | yes | +instances +| gen_impl_trait_type_repr.rs:7:17:7:41 | ImplTraitTypeRepr | +getTypeBoundList +| gen_impl_trait_type_repr.rs:7:17:7:41 | ImplTraitTypeRepr | gen_impl_trait_type_repr.rs:7:22:7:41 | TypeBoundList | diff --git a/rust/ql/test/extractor-tests/generated/ImplTraitTypeRepr/ImplTraitTypeRepr.ql b/rust/ql/test/extractor-tests/generated/ImplTraitTypeRepr/ImplTraitTypeRepr.ql index 8ff70bd976d..e877ba909ff 100644 --- a/rust/ql/test/extractor-tests/generated/ImplTraitTypeRepr/ImplTraitTypeRepr.ql +++ b/rust/ql/test/extractor-tests/generated/ImplTraitTypeRepr/ImplTraitTypeRepr.ql @@ -2,9 +2,8 @@ import codeql.rust.elements import TestUtils -from ImplTraitTypeRepr x, string hasTypeBoundList -where - toBeTested(x) and - not x.isUnknown() and - if x.hasTypeBoundList() then hasTypeBoundList = "yes" else hasTypeBoundList = "no" -select x, "hasTypeBoundList:", hasTypeBoundList +query predicate instances(ImplTraitTypeRepr x) { toBeTested(x) and not x.isUnknown() } + +query predicate getTypeBoundList(ImplTraitTypeRepr x, TypeBoundList getTypeBoundList) { + toBeTested(x) and not x.isUnknown() and getTypeBoundList = x.getTypeBoundList() +} diff --git a/rust/ql/test/extractor-tests/generated/ImplTraitTypeRepr/ImplTraitTypeRepr_getTypeBoundList.expected b/rust/ql/test/extractor-tests/generated/ImplTraitTypeRepr/ImplTraitTypeRepr_getTypeBoundList.expected deleted file mode 100644 index fbab626faa2..00000000000 --- a/rust/ql/test/extractor-tests/generated/ImplTraitTypeRepr/ImplTraitTypeRepr_getTypeBoundList.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_impl_trait_type_repr.rs:7:17:7:41 | ImplTraitTypeRepr | gen_impl_trait_type_repr.rs:7:22:7:41 | TypeBoundList | diff --git a/rust/ql/test/extractor-tests/generated/ImplTraitTypeRepr/ImplTraitTypeRepr_getTypeBoundList.ql b/rust/ql/test/extractor-tests/generated/ImplTraitTypeRepr/ImplTraitTypeRepr_getTypeBoundList.ql deleted file mode 100644 index 32c100f1907..00000000000 --- a/rust/ql/test/extractor-tests/generated/ImplTraitTypeRepr/ImplTraitTypeRepr_getTypeBoundList.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from ImplTraitTypeRepr x -where toBeTested(x) and not x.isUnknown() -select x, x.getTypeBoundList() diff --git a/rust/ql/test/extractor-tests/generated/IndexExpr/Cargo.lock b/rust/ql/test/extractor-tests/generated/IndexExpr/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/IndexExpr/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr.expected b/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr.expected index 614afc3040f..d951344b17e 100644 --- a/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr.expected +++ b/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr.expected @@ -1,2 +1,10 @@ -| gen_index_expr.rs:5:5:5:12 | list[42] | getNumberOfAttrs: | 0 | hasBase: | yes | hasIndex: | yes | -| gen_index_expr.rs:6:5:6:12 | list[42] | getNumberOfAttrs: | 0 | hasBase: | yes | hasIndex: | yes | +instances +| gen_index_expr.rs:5:5:5:12 | list[42] | +| gen_index_expr.rs:6:5:6:12 | list[42] | +getAttr +getBase +| gen_index_expr.rs:5:5:5:12 | list[42] | gen_index_expr.rs:5:5:5:8 | list | +| gen_index_expr.rs:6:5:6:12 | list[42] | gen_index_expr.rs:6:5:6:8 | list | +getIndex +| gen_index_expr.rs:5:5:5:12 | list[42] | gen_index_expr.rs:5:10:5:11 | 42 | +| gen_index_expr.rs:6:5:6:12 | list[42] | gen_index_expr.rs:6:10:6:11 | 42 | diff --git a/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr.ql b/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr.ql index a4b7139c97e..a7a870b1423 100644 --- a/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr.ql +++ b/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr.ql @@ -2,11 +2,16 @@ import codeql.rust.elements import TestUtils -from IndexExpr x, int getNumberOfAttrs, string hasBase, string hasIndex -where - toBeTested(x) and - not x.isUnknown() and - getNumberOfAttrs = x.getNumberOfAttrs() and - (if x.hasBase() then hasBase = "yes" else hasBase = "no") and - if x.hasIndex() then hasIndex = "yes" else hasIndex = "no" -select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasBase:", hasBase, "hasIndex:", hasIndex +query predicate instances(IndexExpr x) { toBeTested(x) and not x.isUnknown() } + +query predicate getAttr(IndexExpr x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} + +query predicate getBase(IndexExpr x, Expr getBase) { + toBeTested(x) and not x.isUnknown() and getBase = x.getBase() +} + +query predicate getIndex(IndexExpr x, Expr getIndex) { + toBeTested(x) and not x.isUnknown() and getIndex = x.getIndex() +} diff --git a/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr_getAttr.ql deleted file mode 100644 index 504f8e56cbe..00000000000 --- a/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from IndexExpr x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr_getBase.expected b/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr_getBase.expected deleted file mode 100644 index 13fb9a2c6a6..00000000000 --- a/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr_getBase.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_index_expr.rs:5:5:5:12 | list[42] | gen_index_expr.rs:5:5:5:8 | list | -| gen_index_expr.rs:6:5:6:12 | list[42] | gen_index_expr.rs:6:5:6:8 | list | diff --git a/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr_getBase.ql b/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr_getBase.ql deleted file mode 100644 index b4debab06d7..00000000000 --- a/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr_getBase.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from IndexExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getBase() diff --git a/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr_getIndex.expected b/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr_getIndex.expected deleted file mode 100644 index dfca8204088..00000000000 --- a/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr_getIndex.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_index_expr.rs:5:5:5:12 | list[42] | gen_index_expr.rs:5:10:5:11 | 42 | -| gen_index_expr.rs:6:5:6:12 | list[42] | gen_index_expr.rs:6:10:6:11 | 42 | diff --git a/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr_getIndex.ql b/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr_getIndex.ql deleted file mode 100644 index f6d5b1e5998..00000000000 --- a/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr_getIndex.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from IndexExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getIndex() diff --git a/rust/ql/test/extractor-tests/generated/InferTypeRepr/Cargo.lock b/rust/ql/test/extractor-tests/generated/InferTypeRepr/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/InferTypeRepr/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/InferTypeRepr/InferTypeRepr.ql b/rust/ql/test/extractor-tests/generated/InferTypeRepr/InferTypeRepr.ql index 97f91c3307e..5ee772eee5c 100644 --- a/rust/ql/test/extractor-tests/generated/InferTypeRepr/InferTypeRepr.ql +++ b/rust/ql/test/extractor-tests/generated/InferTypeRepr/InferTypeRepr.ql @@ -2,6 +2,4 @@ import codeql.rust.elements import TestUtils -from InferTypeRepr x -where toBeTested(x) and not x.isUnknown() -select x +query predicate instances(InferTypeRepr x) { toBeTested(x) and not x.isUnknown() } diff --git a/rust/ql/test/extractor-tests/generated/ItemList/Cargo.lock b/rust/ql/test/extractor-tests/generated/ItemList/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ItemList/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/ItemList/ItemList.expected b/rust/ql/test/extractor-tests/generated/ItemList/ItemList.expected index 482eff5695c..2efc834b622 100644 --- a/rust/ql/test/extractor-tests/generated/ItemList/ItemList.expected +++ b/rust/ql/test/extractor-tests/generated/ItemList/ItemList.expected @@ -1 +1,6 @@ -| gen_item_list.rs:7:11:10:5 | ItemList | getNumberOfAttrs: | 0 | getNumberOfItems: | 2 | +instances +| gen_item_list.rs:7:11:10:5 | ItemList | +getAttr +getItem +| gen_item_list.rs:7:11:10:5 | ItemList | 0 | gen_item_list.rs:8:9:8:19 | fn foo | +| gen_item_list.rs:7:11:10:5 | ItemList | 1 | gen_item_list.rs:9:9:9:17 | struct S | diff --git a/rust/ql/test/extractor-tests/generated/ItemList/ItemList.ql b/rust/ql/test/extractor-tests/generated/ItemList/ItemList.ql index b656fd73500..015b8f79125 100644 --- a/rust/ql/test/extractor-tests/generated/ItemList/ItemList.ql +++ b/rust/ql/test/extractor-tests/generated/ItemList/ItemList.ql @@ -2,10 +2,12 @@ import codeql.rust.elements import TestUtils -from ItemList x, int getNumberOfAttrs, int getNumberOfItems -where - toBeTested(x) and - not x.isUnknown() and - getNumberOfAttrs = x.getNumberOfAttrs() and - getNumberOfItems = x.getNumberOfItems() -select x, "getNumberOfAttrs:", getNumberOfAttrs, "getNumberOfItems:", getNumberOfItems +query predicate instances(ItemList x) { toBeTested(x) and not x.isUnknown() } + +query predicate getAttr(ItemList x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} + +query predicate getItem(ItemList x, int index, Item getItem) { + toBeTested(x) and not x.isUnknown() and getItem = x.getItem(index) +} diff --git a/rust/ql/test/extractor-tests/generated/ItemList/ItemList_getAttr.expected b/rust/ql/test/extractor-tests/generated/ItemList/ItemList_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/ItemList/ItemList_getAttr.ql b/rust/ql/test/extractor-tests/generated/ItemList/ItemList_getAttr.ql deleted file mode 100644 index b49e5c18d37..00000000000 --- a/rust/ql/test/extractor-tests/generated/ItemList/ItemList_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from ItemList x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/ItemList/ItemList_getItem.expected b/rust/ql/test/extractor-tests/generated/ItemList/ItemList_getItem.expected deleted file mode 100644 index 1ea2c7b8fc7..00000000000 --- a/rust/ql/test/extractor-tests/generated/ItemList/ItemList_getItem.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_item_list.rs:7:11:10:5 | ItemList | 0 | gen_item_list.rs:8:9:8:19 | fn foo | -| gen_item_list.rs:7:11:10:5 | ItemList | 1 | gen_item_list.rs:9:9:9:17 | struct S | diff --git a/rust/ql/test/extractor-tests/generated/ItemList/ItemList_getItem.ql b/rust/ql/test/extractor-tests/generated/ItemList/ItemList_getItem.ql deleted file mode 100644 index f9e65903fe9..00000000000 --- a/rust/ql/test/extractor-tests/generated/ItemList/ItemList_getItem.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from ItemList x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getItem(index) diff --git a/rust/ql/test/extractor-tests/generated/Label/Cargo.lock b/rust/ql/test/extractor-tests/generated/Label/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Label/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/Label/Label.expected b/rust/ql/test/extractor-tests/generated/Label/Label.expected index 7525044aaa2..1028afbe3f6 100644 --- a/rust/ql/test/extractor-tests/generated/Label/Label.expected +++ b/rust/ql/test/extractor-tests/generated/Label/Label.expected @@ -1 +1,4 @@ -| gen_label.rs:5:5:5:11 | 'label | hasLifetime: | yes | +instances +| gen_label.rs:5:5:5:11 | 'label | +getLifetime +| gen_label.rs:5:5:5:11 | 'label | gen_label.rs:5:5:5:10 | 'label | diff --git a/rust/ql/test/extractor-tests/generated/Label/Label.ql b/rust/ql/test/extractor-tests/generated/Label/Label.ql index 92f4d44230e..e8cfb2a2b13 100644 --- a/rust/ql/test/extractor-tests/generated/Label/Label.ql +++ b/rust/ql/test/extractor-tests/generated/Label/Label.ql @@ -2,9 +2,8 @@ import codeql.rust.elements import TestUtils -from Label x, string hasLifetime -where - toBeTested(x) and - not x.isUnknown() and - if x.hasLifetime() then hasLifetime = "yes" else hasLifetime = "no" -select x, "hasLifetime:", hasLifetime +query predicate instances(Label x) { toBeTested(x) and not x.isUnknown() } + +query predicate getLifetime(Label x, Lifetime getLifetime) { + toBeTested(x) and not x.isUnknown() and getLifetime = x.getLifetime() +} diff --git a/rust/ql/test/extractor-tests/generated/Label/Label_getLifetime.expected b/rust/ql/test/extractor-tests/generated/Label/Label_getLifetime.expected deleted file mode 100644 index 9bbe9151913..00000000000 --- a/rust/ql/test/extractor-tests/generated/Label/Label_getLifetime.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_label.rs:5:5:5:11 | 'label | gen_label.rs:5:5:5:10 | 'label | diff --git a/rust/ql/test/extractor-tests/generated/Label/Label_getLifetime.ql b/rust/ql/test/extractor-tests/generated/Label/Label_getLifetime.ql deleted file mode 100644 index ba555d1209c..00000000000 --- a/rust/ql/test/extractor-tests/generated/Label/Label_getLifetime.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Label x -where toBeTested(x) and not x.isUnknown() -select x, x.getLifetime() diff --git a/rust/ql/test/extractor-tests/generated/LetElse/Cargo.lock b/rust/ql/test/extractor-tests/generated/LetElse/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LetElse/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/LetElse/LetElse.expected b/rust/ql/test/extractor-tests/generated/LetElse/LetElse.expected index 64b1e39e01d..f0816731e30 100644 --- a/rust/ql/test/extractor-tests/generated/LetElse/LetElse.expected +++ b/rust/ql/test/extractor-tests/generated/LetElse/LetElse.expected @@ -1 +1,4 @@ -| gen_let_else.rs:7:23:9:5 | else {...} | hasBlockExpr: | yes | +instances +| gen_let_else.rs:7:23:9:5 | else {...} | +getBlockExpr +| gen_let_else.rs:7:23:9:5 | else {...} | gen_let_else.rs:7:28:9:5 | { ... } | diff --git a/rust/ql/test/extractor-tests/generated/LetElse/LetElse.ql b/rust/ql/test/extractor-tests/generated/LetElse/LetElse.ql index 288e99d5a47..12302dcd6fa 100644 --- a/rust/ql/test/extractor-tests/generated/LetElse/LetElse.ql +++ b/rust/ql/test/extractor-tests/generated/LetElse/LetElse.ql @@ -2,9 +2,8 @@ import codeql.rust.elements import TestUtils -from LetElse x, string hasBlockExpr -where - toBeTested(x) and - not x.isUnknown() and - if x.hasBlockExpr() then hasBlockExpr = "yes" else hasBlockExpr = "no" -select x, "hasBlockExpr:", hasBlockExpr +query predicate instances(LetElse x) { toBeTested(x) and not x.isUnknown() } + +query predicate getBlockExpr(LetElse x, BlockExpr getBlockExpr) { + toBeTested(x) and not x.isUnknown() and getBlockExpr = x.getBlockExpr() +} diff --git a/rust/ql/test/extractor-tests/generated/LetElse/LetElse_getBlockExpr.expected b/rust/ql/test/extractor-tests/generated/LetElse/LetElse_getBlockExpr.expected deleted file mode 100644 index 0083f6a3df5..00000000000 --- a/rust/ql/test/extractor-tests/generated/LetElse/LetElse_getBlockExpr.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_let_else.rs:7:23:9:5 | else {...} | gen_let_else.rs:7:28:9:5 | { ... } | diff --git a/rust/ql/test/extractor-tests/generated/LetElse/LetElse_getBlockExpr.ql b/rust/ql/test/extractor-tests/generated/LetElse/LetElse_getBlockExpr.ql deleted file mode 100644 index daebdb30613..00000000000 --- a/rust/ql/test/extractor-tests/generated/LetElse/LetElse_getBlockExpr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from LetElse x -where toBeTested(x) and not x.isUnknown() -select x, x.getBlockExpr() diff --git a/rust/ql/test/extractor-tests/generated/LetExpr/Cargo.lock b/rust/ql/test/extractor-tests/generated/LetExpr/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LetExpr/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr.expected b/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr.expected index 115493214ea..ad1544b9f97 100644 --- a/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr.expected +++ b/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr.expected @@ -1 +1,7 @@ -| gen_let_expr.rs:5:8:5:31 | let ... = maybe_some | getNumberOfAttrs: | 0 | hasScrutinee: | yes | hasPat: | yes | +instances +| gen_let_expr.rs:5:8:5:31 | let ... = maybe_some | +getAttr +getScrutinee +| gen_let_expr.rs:5:8:5:31 | let ... = maybe_some | gen_let_expr.rs:5:22:5:31 | maybe_some | +getPat +| gen_let_expr.rs:5:8:5:31 | let ... = maybe_some | gen_let_expr.rs:5:12:5:18 | Some(...) | diff --git a/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr.ql b/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr.ql index 60aa8b90892..2f8de7cd2d7 100644 --- a/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr.ql +++ b/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr.ql @@ -2,11 +2,16 @@ import codeql.rust.elements import TestUtils -from LetExpr x, int getNumberOfAttrs, string hasScrutinee, string hasPat -where - toBeTested(x) and - not x.isUnknown() and - getNumberOfAttrs = x.getNumberOfAttrs() and - (if x.hasScrutinee() then hasScrutinee = "yes" else hasScrutinee = "no") and - if x.hasPat() then hasPat = "yes" else hasPat = "no" -select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasScrutinee:", hasScrutinee, "hasPat:", hasPat +query predicate instances(LetExpr x) { toBeTested(x) and not x.isUnknown() } + +query predicate getAttr(LetExpr x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} + +query predicate getScrutinee(LetExpr x, Expr getScrutinee) { + toBeTested(x) and not x.isUnknown() and getScrutinee = x.getScrutinee() +} + +query predicate getPat(LetExpr x, Pat getPat) { + toBeTested(x) and not x.isUnknown() and getPat = x.getPat() +} diff --git a/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr_getAttr.ql deleted file mode 100644 index 24330c4b19b..00000000000 --- a/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from LetExpr x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr_getPat.expected b/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr_getPat.expected deleted file mode 100644 index b935bd98013..00000000000 --- a/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr_getPat.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_let_expr.rs:5:8:5:31 | let ... = maybe_some | gen_let_expr.rs:5:12:5:18 | Some(...) | diff --git a/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr_getPat.ql b/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr_getPat.ql deleted file mode 100644 index bd358b49c04..00000000000 --- a/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr_getPat.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from LetExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getPat() diff --git a/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr_getScrutinee.expected b/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr_getScrutinee.expected deleted file mode 100644 index 0080ab4ee6e..00000000000 --- a/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr_getScrutinee.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_let_expr.rs:5:8:5:31 | let ... = maybe_some | gen_let_expr.rs:5:22:5:31 | maybe_some | diff --git a/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr_getScrutinee.ql b/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr_getScrutinee.ql deleted file mode 100644 index 2c144c2ac3c..00000000000 --- a/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr_getScrutinee.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from LetExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getScrutinee() diff --git a/rust/ql/test/extractor-tests/generated/LetStmt/Cargo.lock b/rust/ql/test/extractor-tests/generated/LetStmt/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LetStmt/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt.expected b/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt.expected index 8f01e57d3e9..235eb5e04b5 100644 --- a/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt.expected +++ b/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt.expected @@ -1,6 +1,25 @@ -| gen_let_stmt.rs:5:5:5:15 | let ... = 42 | getNumberOfAttrs: | 0 | hasInitializer: | yes | hasLetElse: | no | hasPat: | yes | hasTypeRepr: | no | -| gen_let_stmt.rs:6:5:6:20 | let ... = 42 | getNumberOfAttrs: | 0 | hasInitializer: | yes | hasLetElse: | no | hasPat: | yes | hasTypeRepr: | yes | -| gen_let_stmt.rs:7:5:7:15 | let ... | getNumberOfAttrs: | 0 | hasInitializer: | no | hasLetElse: | no | hasPat: | yes | hasTypeRepr: | yes | -| gen_let_stmt.rs:8:5:8:10 | let ... | getNumberOfAttrs: | 0 | hasInitializer: | no | hasLetElse: | no | hasPat: | yes | hasTypeRepr: | no | -| gen_let_stmt.rs:9:5:9:24 | let ... = ... | getNumberOfAttrs: | 0 | hasInitializer: | yes | hasLetElse: | no | hasPat: | yes | hasTypeRepr: | no | -| gen_let_stmt.rs:10:5:12:6 | let ... = ... else {...} | getNumberOfAttrs: | 0 | hasInitializer: | yes | hasLetElse: | yes | hasPat: | yes | hasTypeRepr: | no | +instances +| gen_let_stmt.rs:5:5:5:15 | let ... = 42 | +| gen_let_stmt.rs:6:5:6:20 | let ... = 42 | +| gen_let_stmt.rs:7:5:7:15 | let ... | +| gen_let_stmt.rs:8:5:8:10 | let ... | +| gen_let_stmt.rs:9:5:9:24 | let ... = ... | +| gen_let_stmt.rs:10:5:12:6 | let ... = ... else {...} | +getAttr +getInitializer +| gen_let_stmt.rs:5:5:5:15 | let ... = 42 | gen_let_stmt.rs:5:13:5:14 | 42 | +| gen_let_stmt.rs:6:5:6:20 | let ... = 42 | gen_let_stmt.rs:6:18:6:19 | 42 | +| gen_let_stmt.rs:9:5:9:24 | let ... = ... | gen_let_stmt.rs:9:18:9:23 | TupleExpr | +| gen_let_stmt.rs:10:5:12:6 | let ... = ... else {...} | gen_let_stmt.rs:10:19:10:38 | ...::var(...) | +getLetElse +| gen_let_stmt.rs:10:5:12:6 | let ... = ... else {...} | gen_let_stmt.rs:10:40:12:5 | else {...} | +getPat +| gen_let_stmt.rs:5:5:5:15 | let ... = 42 | gen_let_stmt.rs:5:9:5:9 | x | +| gen_let_stmt.rs:6:5:6:20 | let ... = 42 | gen_let_stmt.rs:6:9:6:9 | x | +| gen_let_stmt.rs:7:5:7:15 | let ... | gen_let_stmt.rs:7:9:7:9 | x | +| gen_let_stmt.rs:8:5:8:10 | let ... | gen_let_stmt.rs:8:9:8:9 | x | +| gen_let_stmt.rs:9:5:9:24 | let ... = ... | gen_let_stmt.rs:9:9:9:14 | TuplePat | +| gen_let_stmt.rs:10:5:12:6 | let ... = ... else {...} | gen_let_stmt.rs:10:9:10:15 | Some(...) | +getTypeRepr +| gen_let_stmt.rs:6:5:6:20 | let ... = 42 | gen_let_stmt.rs:6:12:6:14 | i32 | +| gen_let_stmt.rs:7:5:7:15 | let ... | gen_let_stmt.rs:7:12:7:14 | i32 | diff --git a/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt.ql b/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt.ql index 0501354dfa1..07feca93399 100644 --- a/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt.ql +++ b/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt.ql @@ -2,16 +2,24 @@ import codeql.rust.elements import TestUtils -from - LetStmt x, int getNumberOfAttrs, string hasInitializer, string hasLetElse, string hasPat, - string hasTypeRepr -where - toBeTested(x) and - not x.isUnknown() and - getNumberOfAttrs = x.getNumberOfAttrs() and - (if x.hasInitializer() then hasInitializer = "yes" else hasInitializer = "no") and - (if x.hasLetElse() then hasLetElse = "yes" else hasLetElse = "no") and - (if x.hasPat() then hasPat = "yes" else hasPat = "no") and - if x.hasTypeRepr() then hasTypeRepr = "yes" else hasTypeRepr = "no" -select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasInitializer:", hasInitializer, "hasLetElse:", - hasLetElse, "hasPat:", hasPat, "hasTypeRepr:", hasTypeRepr +query predicate instances(LetStmt x) { toBeTested(x) and not x.isUnknown() } + +query predicate getAttr(LetStmt x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} + +query predicate getInitializer(LetStmt x, Expr getInitializer) { + toBeTested(x) and not x.isUnknown() and getInitializer = x.getInitializer() +} + +query predicate getLetElse(LetStmt x, LetElse getLetElse) { + toBeTested(x) and not x.isUnknown() and getLetElse = x.getLetElse() +} + +query predicate getPat(LetStmt x, Pat getPat) { + toBeTested(x) and not x.isUnknown() and getPat = x.getPat() +} + +query predicate getTypeRepr(LetStmt x, TypeRepr getTypeRepr) { + toBeTested(x) and not x.isUnknown() and getTypeRepr = x.getTypeRepr() +} diff --git a/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getAttr.expected b/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getAttr.ql b/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getAttr.ql deleted file mode 100644 index 82f56332351..00000000000 --- a/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from LetStmt x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getInitializer.expected b/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getInitializer.expected deleted file mode 100644 index bd8368e351f..00000000000 --- a/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getInitializer.expected +++ /dev/null @@ -1,4 +0,0 @@ -| gen_let_stmt.rs:5:5:5:15 | let ... = 42 | gen_let_stmt.rs:5:13:5:14 | 42 | -| gen_let_stmt.rs:6:5:6:20 | let ... = 42 | gen_let_stmt.rs:6:18:6:19 | 42 | -| gen_let_stmt.rs:9:5:9:24 | let ... = ... | gen_let_stmt.rs:9:18:9:23 | TupleExpr | -| gen_let_stmt.rs:10:5:12:6 | let ... = ... else {...} | gen_let_stmt.rs:10:19:10:38 | ...::var(...) | diff --git a/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getInitializer.ql b/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getInitializer.ql deleted file mode 100644 index cac847aa726..00000000000 --- a/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getInitializer.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from LetStmt x -where toBeTested(x) and not x.isUnknown() -select x, x.getInitializer() diff --git a/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getLetElse.expected b/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getLetElse.expected deleted file mode 100644 index 5e8090859af..00000000000 --- a/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getLetElse.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_let_stmt.rs:10:5:12:6 | let ... = ... else {...} | gen_let_stmt.rs:10:40:12:5 | else {...} | diff --git a/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getLetElse.ql b/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getLetElse.ql deleted file mode 100644 index f29257c0b28..00000000000 --- a/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getLetElse.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from LetStmt x -where toBeTested(x) and not x.isUnknown() -select x, x.getLetElse() diff --git a/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getPat.expected b/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getPat.expected deleted file mode 100644 index cd4c3f8cc64..00000000000 --- a/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getPat.expected +++ /dev/null @@ -1,6 +0,0 @@ -| gen_let_stmt.rs:5:5:5:15 | let ... = 42 | gen_let_stmt.rs:5:9:5:9 | x | -| gen_let_stmt.rs:6:5:6:20 | let ... = 42 | gen_let_stmt.rs:6:9:6:9 | x | -| gen_let_stmt.rs:7:5:7:15 | let ... | gen_let_stmt.rs:7:9:7:9 | x | -| gen_let_stmt.rs:8:5:8:10 | let ... | gen_let_stmt.rs:8:9:8:9 | x | -| gen_let_stmt.rs:9:5:9:24 | let ... = ... | gen_let_stmt.rs:9:9:9:14 | TuplePat | -| gen_let_stmt.rs:10:5:12:6 | let ... = ... else {...} | gen_let_stmt.rs:10:9:10:15 | Some(...) | diff --git a/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getPat.ql b/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getPat.ql deleted file mode 100644 index fd10317a287..00000000000 --- a/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getPat.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from LetStmt x -where toBeTested(x) and not x.isUnknown() -select x, x.getPat() diff --git a/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getTypeRepr.expected b/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getTypeRepr.expected deleted file mode 100644 index 489647f4793..00000000000 --- a/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getTypeRepr.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_let_stmt.rs:6:5:6:20 | let ... = 42 | gen_let_stmt.rs:6:12:6:14 | i32 | -| gen_let_stmt.rs:7:5:7:15 | let ... | gen_let_stmt.rs:7:12:7:14 | i32 | diff --git a/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getTypeRepr.ql b/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getTypeRepr.ql deleted file mode 100644 index 7c5a8872bc3..00000000000 --- a/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getTypeRepr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from LetStmt x -where toBeTested(x) and not x.isUnknown() -select x, x.getTypeRepr() diff --git a/rust/ql/test/extractor-tests/generated/Lifetime/Cargo.lock b/rust/ql/test/extractor-tests/generated/Lifetime/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Lifetime/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/Lifetime/Lifetime.expected b/rust/ql/test/extractor-tests/generated/Lifetime/Lifetime.expected index bb57ab8de87..e55b5553b5c 100644 --- a/rust/ql/test/extractor-tests/generated/Lifetime/Lifetime.expected +++ b/rust/ql/test/extractor-tests/generated/Lifetime/Lifetime.expected @@ -1,2 +1,6 @@ -| gen_lifetime.rs:7:12:7:13 | 'a | hasText: | yes | -| gen_lifetime.rs:7:20:7:21 | 'a | hasText: | yes | +instances +| gen_lifetime.rs:7:12:7:13 | 'a | +| gen_lifetime.rs:7:20:7:21 | 'a | +getText +| gen_lifetime.rs:7:12:7:13 | 'a | 'a | +| gen_lifetime.rs:7:20:7:21 | 'a | 'a | diff --git a/rust/ql/test/extractor-tests/generated/Lifetime/Lifetime.ql b/rust/ql/test/extractor-tests/generated/Lifetime/Lifetime.ql index e07b53ec7a0..fa2a2e90910 100644 --- a/rust/ql/test/extractor-tests/generated/Lifetime/Lifetime.ql +++ b/rust/ql/test/extractor-tests/generated/Lifetime/Lifetime.ql @@ -2,9 +2,8 @@ import codeql.rust.elements import TestUtils -from Lifetime x, string hasText -where - toBeTested(x) and - not x.isUnknown() and - if x.hasText() then hasText = "yes" else hasText = "no" -select x, "hasText:", hasText +query predicate instances(Lifetime x) { toBeTested(x) and not x.isUnknown() } + +query predicate getText(Lifetime x, string getText) { + toBeTested(x) and not x.isUnknown() and getText = x.getText() +} diff --git a/rust/ql/test/extractor-tests/generated/Lifetime/Lifetime_getText.expected b/rust/ql/test/extractor-tests/generated/Lifetime/Lifetime_getText.expected deleted file mode 100644 index 3570dcab91a..00000000000 --- a/rust/ql/test/extractor-tests/generated/Lifetime/Lifetime_getText.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_lifetime.rs:7:12:7:13 | 'a | 'a | -| gen_lifetime.rs:7:20:7:21 | 'a | 'a | diff --git a/rust/ql/test/extractor-tests/generated/Lifetime/Lifetime_getText.ql b/rust/ql/test/extractor-tests/generated/Lifetime/Lifetime_getText.ql deleted file mode 100644 index 471b3a2405b..00000000000 --- a/rust/ql/test/extractor-tests/generated/Lifetime/Lifetime_getText.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Lifetime x -where toBeTested(x) and not x.isUnknown() -select x, x.getText() diff --git a/rust/ql/test/extractor-tests/generated/LifetimeArg/Cargo.lock b/rust/ql/test/extractor-tests/generated/LifetimeArg/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LifetimeArg/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/LifetimeArg/LifetimeArg.expected b/rust/ql/test/extractor-tests/generated/LifetimeArg/LifetimeArg.expected index 07554eee9bc..0e80f0af319 100644 --- a/rust/ql/test/extractor-tests/generated/LifetimeArg/LifetimeArg.expected +++ b/rust/ql/test/extractor-tests/generated/LifetimeArg/LifetimeArg.expected @@ -1 +1,4 @@ -| gen_lifetime_arg.rs:7:20:7:21 | LifetimeArg | hasLifetime: | yes | +instances +| gen_lifetime_arg.rs:7:20:7:21 | LifetimeArg | +getLifetime +| gen_lifetime_arg.rs:7:20:7:21 | LifetimeArg | gen_lifetime_arg.rs:7:20:7:21 | 'a | diff --git a/rust/ql/test/extractor-tests/generated/LifetimeArg/LifetimeArg.ql b/rust/ql/test/extractor-tests/generated/LifetimeArg/LifetimeArg.ql index 83033e27af9..9d0c48958d8 100644 --- a/rust/ql/test/extractor-tests/generated/LifetimeArg/LifetimeArg.ql +++ b/rust/ql/test/extractor-tests/generated/LifetimeArg/LifetimeArg.ql @@ -2,9 +2,8 @@ import codeql.rust.elements import TestUtils -from LifetimeArg x, string hasLifetime -where - toBeTested(x) and - not x.isUnknown() and - if x.hasLifetime() then hasLifetime = "yes" else hasLifetime = "no" -select x, "hasLifetime:", hasLifetime +query predicate instances(LifetimeArg x) { toBeTested(x) and not x.isUnknown() } + +query predicate getLifetime(LifetimeArg x, Lifetime getLifetime) { + toBeTested(x) and not x.isUnknown() and getLifetime = x.getLifetime() +} diff --git a/rust/ql/test/extractor-tests/generated/LifetimeArg/LifetimeArg_getLifetime.expected b/rust/ql/test/extractor-tests/generated/LifetimeArg/LifetimeArg_getLifetime.expected deleted file mode 100644 index 598bae0390f..00000000000 --- a/rust/ql/test/extractor-tests/generated/LifetimeArg/LifetimeArg_getLifetime.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_lifetime_arg.rs:7:20:7:21 | LifetimeArg | gen_lifetime_arg.rs:7:20:7:21 | 'a | diff --git a/rust/ql/test/extractor-tests/generated/LifetimeArg/LifetimeArg_getLifetime.ql b/rust/ql/test/extractor-tests/generated/LifetimeArg/LifetimeArg_getLifetime.ql deleted file mode 100644 index 0fe36ad8514..00000000000 --- a/rust/ql/test/extractor-tests/generated/LifetimeArg/LifetimeArg_getLifetime.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from LifetimeArg x -where toBeTested(x) and not x.isUnknown() -select x, x.getLifetime() diff --git a/rust/ql/test/extractor-tests/generated/LifetimeParam/Cargo.lock b/rust/ql/test/extractor-tests/generated/LifetimeParam/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LifetimeParam/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/LifetimeParam/LifetimeParam.expected b/rust/ql/test/extractor-tests/generated/LifetimeParam/LifetimeParam.expected index 2055797b2fd..7e33b58d17f 100644 --- a/rust/ql/test/extractor-tests/generated/LifetimeParam/LifetimeParam.expected +++ b/rust/ql/test/extractor-tests/generated/LifetimeParam/LifetimeParam.expected @@ -1 +1,6 @@ -| gen_lifetime_param.rs:7:12:7:13 | LifetimeParam | getNumberOfAttrs: | 0 | hasLifetime: | yes | hasTypeBoundList: | no | +instances +| gen_lifetime_param.rs:7:12:7:13 | LifetimeParam | +getAttr +getLifetime +| gen_lifetime_param.rs:7:12:7:13 | LifetimeParam | gen_lifetime_param.rs:7:12:7:13 | 'a | +getTypeBoundList diff --git a/rust/ql/test/extractor-tests/generated/LifetimeParam/LifetimeParam.ql b/rust/ql/test/extractor-tests/generated/LifetimeParam/LifetimeParam.ql index abe4635c285..bddc4418ba4 100644 --- a/rust/ql/test/extractor-tests/generated/LifetimeParam/LifetimeParam.ql +++ b/rust/ql/test/extractor-tests/generated/LifetimeParam/LifetimeParam.ql @@ -2,12 +2,16 @@ import codeql.rust.elements import TestUtils -from LifetimeParam x, int getNumberOfAttrs, string hasLifetime, string hasTypeBoundList -where - toBeTested(x) and - not x.isUnknown() and - getNumberOfAttrs = x.getNumberOfAttrs() and - (if x.hasLifetime() then hasLifetime = "yes" else hasLifetime = "no") and - if x.hasTypeBoundList() then hasTypeBoundList = "yes" else hasTypeBoundList = "no" -select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasLifetime:", hasLifetime, "hasTypeBoundList:", - hasTypeBoundList +query predicate instances(LifetimeParam x) { toBeTested(x) and not x.isUnknown() } + +query predicate getAttr(LifetimeParam x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} + +query predicate getLifetime(LifetimeParam x, Lifetime getLifetime) { + toBeTested(x) and not x.isUnknown() and getLifetime = x.getLifetime() +} + +query predicate getTypeBoundList(LifetimeParam x, TypeBoundList getTypeBoundList) { + toBeTested(x) and not x.isUnknown() and getTypeBoundList = x.getTypeBoundList() +} diff --git a/rust/ql/test/extractor-tests/generated/LifetimeParam/LifetimeParam_getAttr.expected b/rust/ql/test/extractor-tests/generated/LifetimeParam/LifetimeParam_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/LifetimeParam/LifetimeParam_getAttr.ql b/rust/ql/test/extractor-tests/generated/LifetimeParam/LifetimeParam_getAttr.ql deleted file mode 100644 index 6053ca9b5fe..00000000000 --- a/rust/ql/test/extractor-tests/generated/LifetimeParam/LifetimeParam_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from LifetimeParam x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/LifetimeParam/LifetimeParam_getLifetime.expected b/rust/ql/test/extractor-tests/generated/LifetimeParam/LifetimeParam_getLifetime.expected deleted file mode 100644 index 1d1bc5bf0b0..00000000000 --- a/rust/ql/test/extractor-tests/generated/LifetimeParam/LifetimeParam_getLifetime.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_lifetime_param.rs:7:12:7:13 | LifetimeParam | gen_lifetime_param.rs:7:12:7:13 | 'a | diff --git a/rust/ql/test/extractor-tests/generated/LifetimeParam/LifetimeParam_getLifetime.ql b/rust/ql/test/extractor-tests/generated/LifetimeParam/LifetimeParam_getLifetime.ql deleted file mode 100644 index 0cc315fabe0..00000000000 --- a/rust/ql/test/extractor-tests/generated/LifetimeParam/LifetimeParam_getLifetime.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from LifetimeParam x -where toBeTested(x) and not x.isUnknown() -select x, x.getLifetime() diff --git a/rust/ql/test/extractor-tests/generated/LifetimeParam/LifetimeParam_getTypeBoundList.expected b/rust/ql/test/extractor-tests/generated/LifetimeParam/LifetimeParam_getTypeBoundList.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/LifetimeParam/LifetimeParam_getTypeBoundList.ql b/rust/ql/test/extractor-tests/generated/LifetimeParam/LifetimeParam_getTypeBoundList.ql deleted file mode 100644 index 67370167084..00000000000 --- a/rust/ql/test/extractor-tests/generated/LifetimeParam/LifetimeParam_getTypeBoundList.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from LifetimeParam x -where toBeTested(x) and not x.isUnknown() -select x, x.getTypeBoundList() diff --git a/rust/ql/test/extractor-tests/generated/LiteralExpr/Cargo.lock b/rust/ql/test/extractor-tests/generated/LiteralExpr/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LiteralExpr/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr.expected b/rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr.expected index afe42a48f8f..1cd7c4573ee 100644 --- a/rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr.expected +++ b/rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr.expected @@ -1,8 +1,19 @@ -| gen_literal_expr.rs:5:5:5:6 | 42 | getNumberOfAttrs: | 0 | hasTextValue: | yes | -| gen_literal_expr.rs:6:5:6:8 | 42.0 | getNumberOfAttrs: | 0 | hasTextValue: | yes | -| gen_literal_expr.rs:7:5:7:19 | "Hello, world!" | getNumberOfAttrs: | 0 | hasTextValue: | yes | -| gen_literal_expr.rs:8:5:8:20 | b"Hello, world!" | getNumberOfAttrs: | 0 | hasTextValue: | yes | -| gen_literal_expr.rs:9:5:9:7 | 'x' | getNumberOfAttrs: | 0 | hasTextValue: | yes | -| gen_literal_expr.rs:10:5:10:8 | b'x' | getNumberOfAttrs: | 0 | hasTextValue: | yes | -| gen_literal_expr.rs:11:5:11:20 | r"Hello, world!" | getNumberOfAttrs: | 0 | hasTextValue: | yes | -| gen_literal_expr.rs:12:5:12:8 | true | getNumberOfAttrs: | 0 | hasTextValue: | yes | +instances +| gen_literal_expr.rs:5:5:5:6 | 42 | +| gen_literal_expr.rs:6:5:6:8 | 42.0 | +| gen_literal_expr.rs:7:5:7:19 | "Hello, world!" | +| gen_literal_expr.rs:8:5:8:20 | b"Hello, world!" | +| gen_literal_expr.rs:9:5:9:7 | 'x' | +| gen_literal_expr.rs:10:5:10:8 | b'x' | +| gen_literal_expr.rs:11:5:11:20 | r"Hello, world!" | +| gen_literal_expr.rs:12:5:12:8 | true | +getAttr +getTextValue +| gen_literal_expr.rs:5:5:5:6 | 42 | 42 | +| gen_literal_expr.rs:6:5:6:8 | 42.0 | 42.0 | +| gen_literal_expr.rs:7:5:7:19 | "Hello, world!" | "Hello, world!" | +| gen_literal_expr.rs:8:5:8:20 | b"Hello, world!" | b"Hello, world!" | +| gen_literal_expr.rs:9:5:9:7 | 'x' | 'x' | +| gen_literal_expr.rs:10:5:10:8 | b'x' | b'x' | +| gen_literal_expr.rs:11:5:11:20 | r"Hello, world!" | r"Hello, world!" | +| gen_literal_expr.rs:12:5:12:8 | true | true | diff --git a/rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr.ql b/rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr.ql index c33f15d8aff..0b49e28cff2 100644 --- a/rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr.ql +++ b/rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr.ql @@ -2,10 +2,12 @@ import codeql.rust.elements import TestUtils -from LiteralExpr x, int getNumberOfAttrs, string hasTextValue -where - toBeTested(x) and - not x.isUnknown() and - getNumberOfAttrs = x.getNumberOfAttrs() and - if x.hasTextValue() then hasTextValue = "yes" else hasTextValue = "no" -select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasTextValue:", hasTextValue +query predicate instances(LiteralExpr x) { toBeTested(x) and not x.isUnknown() } + +query predicate getAttr(LiteralExpr x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} + +query predicate getTextValue(LiteralExpr x, string getTextValue) { + toBeTested(x) and not x.isUnknown() and getTextValue = x.getTextValue() +} diff --git a/rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr_getAttr.ql deleted file mode 100644 index a4362a3ea72..00000000000 --- a/rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from LiteralExpr x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr_getTextValue.expected b/rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr_getTextValue.expected deleted file mode 100644 index c41aeee97ec..00000000000 --- a/rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr_getTextValue.expected +++ /dev/null @@ -1,8 +0,0 @@ -| gen_literal_expr.rs:5:5:5:6 | 42 | 42 | -| gen_literal_expr.rs:6:5:6:8 | 42.0 | 42.0 | -| gen_literal_expr.rs:7:5:7:19 | "Hello, world!" | "Hello, world!" | -| gen_literal_expr.rs:8:5:8:20 | b"Hello, world!" | b"Hello, world!" | -| gen_literal_expr.rs:9:5:9:7 | 'x' | 'x' | -| gen_literal_expr.rs:10:5:10:8 | b'x' | b'x' | -| gen_literal_expr.rs:11:5:11:20 | r"Hello, world!" | r"Hello, world!" | -| gen_literal_expr.rs:12:5:12:8 | true | true | diff --git a/rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr_getTextValue.ql b/rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr_getTextValue.ql deleted file mode 100644 index 147110b9333..00000000000 --- a/rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr_getTextValue.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from LiteralExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getTextValue() diff --git a/rust/ql/test/extractor-tests/generated/LiteralPat/Cargo.lock b/rust/ql/test/extractor-tests/generated/LiteralPat/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LiteralPat/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/LiteralPat/LiteralPat.expected b/rust/ql/test/extractor-tests/generated/LiteralPat/LiteralPat.expected index d4734ef3dac..104913be1a1 100644 --- a/rust/ql/test/extractor-tests/generated/LiteralPat/LiteralPat.expected +++ b/rust/ql/test/extractor-tests/generated/LiteralPat/LiteralPat.expected @@ -1 +1,4 @@ -| gen_literal_pat.rs:6:9:6:10 | 42 | hasLiteral: | yes | +instances +| gen_literal_pat.rs:6:9:6:10 | 42 | +getLiteral +| gen_literal_pat.rs:6:9:6:10 | 42 | gen_literal_pat.rs:6:9:6:10 | 42 | diff --git a/rust/ql/test/extractor-tests/generated/LiteralPat/LiteralPat.ql b/rust/ql/test/extractor-tests/generated/LiteralPat/LiteralPat.ql index 6052b07a005..ede49533726 100644 --- a/rust/ql/test/extractor-tests/generated/LiteralPat/LiteralPat.ql +++ b/rust/ql/test/extractor-tests/generated/LiteralPat/LiteralPat.ql @@ -2,9 +2,8 @@ import codeql.rust.elements import TestUtils -from LiteralPat x, string hasLiteral -where - toBeTested(x) and - not x.isUnknown() and - if x.hasLiteral() then hasLiteral = "yes" else hasLiteral = "no" -select x, "hasLiteral:", hasLiteral +query predicate instances(LiteralPat x) { toBeTested(x) and not x.isUnknown() } + +query predicate getLiteral(LiteralPat x, LiteralExpr getLiteral) { + toBeTested(x) and not x.isUnknown() and getLiteral = x.getLiteral() +} diff --git a/rust/ql/test/extractor-tests/generated/LiteralPat/LiteralPat_getLiteral.expected b/rust/ql/test/extractor-tests/generated/LiteralPat/LiteralPat_getLiteral.expected deleted file mode 100644 index 487f239737b..00000000000 --- a/rust/ql/test/extractor-tests/generated/LiteralPat/LiteralPat_getLiteral.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_literal_pat.rs:6:9:6:10 | 42 | gen_literal_pat.rs:6:9:6:10 | 42 | diff --git a/rust/ql/test/extractor-tests/generated/LiteralPat/LiteralPat_getLiteral.ql b/rust/ql/test/extractor-tests/generated/LiteralPat/LiteralPat_getLiteral.ql deleted file mode 100644 index ca6ff418b1a..00000000000 --- a/rust/ql/test/extractor-tests/generated/LiteralPat/LiteralPat_getLiteral.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from LiteralPat x -where toBeTested(x) and not x.isUnknown() -select x, x.getLiteral() diff --git a/rust/ql/test/extractor-tests/generated/LoopExpr/Cargo.lock b/rust/ql/test/extractor-tests/generated/LoopExpr/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LoopExpr/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr.expected b/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr.expected index b0adbe40897..970ebd6911b 100644 --- a/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr.expected +++ b/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr.expected @@ -1,3 +1,11 @@ -| gen_loop_expr.rs:5:5:7:5 | loop { ... } | hasLabel: | no | hasLoopBody: | yes | getNumberOfAttrs: | 0 | -| gen_loop_expr.rs:8:5:11:5 | 'label: loop { ... } | hasLabel: | yes | hasLoopBody: | yes | getNumberOfAttrs: | 0 | -| gen_loop_expr.rs:13:5:19:5 | loop { ... } | hasLabel: | no | hasLoopBody: | yes | getNumberOfAttrs: | 0 | +instances +| gen_loop_expr.rs:5:5:7:5 | loop { ... } | +| gen_loop_expr.rs:8:5:11:5 | 'label: loop { ... } | +| gen_loop_expr.rs:13:5:19:5 | loop { ... } | +getLabel +| gen_loop_expr.rs:8:5:11:5 | 'label: loop { ... } | gen_loop_expr.rs:8:5:8:11 | 'label | +getLoopBody +| gen_loop_expr.rs:5:5:7:5 | loop { ... } | gen_loop_expr.rs:5:10:7:5 | { ... } | +| gen_loop_expr.rs:8:5:11:5 | 'label: loop { ... } | gen_loop_expr.rs:8:18:11:5 | { ... } | +| gen_loop_expr.rs:13:5:19:5 | loop { ... } | gen_loop_expr.rs:13:10:19:5 | { ... } | +getAttr diff --git a/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr.ql b/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr.ql index 92248ab5ec0..c266b1c064e 100644 --- a/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr.ql +++ b/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr.ql @@ -2,11 +2,16 @@ import codeql.rust.elements import TestUtils -from LoopExpr x, string hasLabel, string hasLoopBody, int getNumberOfAttrs -where - toBeTested(x) and - not x.isUnknown() and - (if x.hasLabel() then hasLabel = "yes" else hasLabel = "no") and - (if x.hasLoopBody() then hasLoopBody = "yes" else hasLoopBody = "no") and - getNumberOfAttrs = x.getNumberOfAttrs() -select x, "hasLabel:", hasLabel, "hasLoopBody:", hasLoopBody, "getNumberOfAttrs:", getNumberOfAttrs +query predicate instances(LoopExpr x) { toBeTested(x) and not x.isUnknown() } + +query predicate getLabel(LoopExpr x, Label getLabel) { + toBeTested(x) and not x.isUnknown() and getLabel = x.getLabel() +} + +query predicate getLoopBody(LoopExpr x, BlockExpr getLoopBody) { + toBeTested(x) and not x.isUnknown() and getLoopBody = x.getLoopBody() +} + +query predicate getAttr(LoopExpr x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} diff --git a/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr_getAttr.ql deleted file mode 100644 index 6367edb6421..00000000000 --- a/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from LoopExpr x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr_getLabel.expected b/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr_getLabel.expected deleted file mode 100644 index e2dc2fdf895..00000000000 --- a/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr_getLabel.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_loop_expr.rs:8:5:11:5 | 'label: loop { ... } | gen_loop_expr.rs:8:5:8:11 | 'label | diff --git a/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr_getLabel.ql b/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr_getLabel.ql deleted file mode 100644 index 9617abd7f34..00000000000 --- a/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr_getLabel.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from LoopExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getLabel() diff --git a/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr_getLoopBody.expected b/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr_getLoopBody.expected deleted file mode 100644 index 9cf0c64dd0b..00000000000 --- a/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr_getLoopBody.expected +++ /dev/null @@ -1,3 +0,0 @@ -| gen_loop_expr.rs:5:5:7:5 | loop { ... } | gen_loop_expr.rs:5:10:7:5 | { ... } | -| gen_loop_expr.rs:8:5:11:5 | 'label: loop { ... } | gen_loop_expr.rs:8:18:11:5 | { ... } | -| gen_loop_expr.rs:13:5:19:5 | loop { ... } | gen_loop_expr.rs:13:10:19:5 | { ... } | diff --git a/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr_getLoopBody.ql b/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr_getLoopBody.ql deleted file mode 100644 index bd44b0ac733..00000000000 --- a/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr_getLoopBody.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from LoopExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getLoopBody() diff --git a/rust/ql/test/extractor-tests/generated/MacroBlockExpr/Cargo.lock b/rust/ql/test/extractor-tests/generated/MacroBlockExpr/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MacroBlockExpr/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/MacroBlockExpr/MacroBlockExpr.expected b/rust/ql/test/extractor-tests/generated/MacroBlockExpr/MacroBlockExpr.expected index 4bf0740b930..67d330d937e 100644 --- a/rust/ql/test/extractor-tests/generated/MacroBlockExpr/MacroBlockExpr.expected +++ b/rust/ql/test/extractor-tests/generated/MacroBlockExpr/MacroBlockExpr.expected @@ -1 +1,5 @@ -| gen_macro_block_expr.rs:5:14:5:28 | MacroBlockExpr | hasTailExpr: | yes | getNumberOfStatements: | 0 | +instances +| gen_macro_block_expr.rs:5:14:5:28 | MacroBlockExpr | +getTailExpr +| gen_macro_block_expr.rs:5:14:5:28 | MacroBlockExpr | gen_macro_block_expr.rs:5:14:5:28 | { ... } | +getStatement diff --git a/rust/ql/test/extractor-tests/generated/MacroBlockExpr/MacroBlockExpr.ql b/rust/ql/test/extractor-tests/generated/MacroBlockExpr/MacroBlockExpr.ql index c003ca232f1..82502ad4ec0 100644 --- a/rust/ql/test/extractor-tests/generated/MacroBlockExpr/MacroBlockExpr.ql +++ b/rust/ql/test/extractor-tests/generated/MacroBlockExpr/MacroBlockExpr.ql @@ -2,10 +2,12 @@ import codeql.rust.elements import TestUtils -from MacroBlockExpr x, string hasTailExpr, int getNumberOfStatements -where - toBeTested(x) and - not x.isUnknown() and - (if x.hasTailExpr() then hasTailExpr = "yes" else hasTailExpr = "no") and - getNumberOfStatements = x.getNumberOfStatements() -select x, "hasTailExpr:", hasTailExpr, "getNumberOfStatements:", getNumberOfStatements +query predicate instances(MacroBlockExpr x) { toBeTested(x) and not x.isUnknown() } + +query predicate getTailExpr(MacroBlockExpr x, Expr getTailExpr) { + toBeTested(x) and not x.isUnknown() and getTailExpr = x.getTailExpr() +} + +query predicate getStatement(MacroBlockExpr x, int index, Stmt getStatement) { + toBeTested(x) and not x.isUnknown() and getStatement = x.getStatement(index) +} diff --git a/rust/ql/test/extractor-tests/generated/MacroBlockExpr/MacroBlockExpr_getStatement.expected b/rust/ql/test/extractor-tests/generated/MacroBlockExpr/MacroBlockExpr_getStatement.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/MacroBlockExpr/MacroBlockExpr_getStatement.ql b/rust/ql/test/extractor-tests/generated/MacroBlockExpr/MacroBlockExpr_getStatement.ql deleted file mode 100644 index a5d58c0e32d..00000000000 --- a/rust/ql/test/extractor-tests/generated/MacroBlockExpr/MacroBlockExpr_getStatement.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from MacroBlockExpr x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getStatement(index) diff --git a/rust/ql/test/extractor-tests/generated/MacroBlockExpr/MacroBlockExpr_getTailExpr.expected b/rust/ql/test/extractor-tests/generated/MacroBlockExpr/MacroBlockExpr_getTailExpr.expected deleted file mode 100644 index ed7fbf364cf..00000000000 --- a/rust/ql/test/extractor-tests/generated/MacroBlockExpr/MacroBlockExpr_getTailExpr.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_macro_block_expr.rs:5:14:5:28 | MacroBlockExpr | gen_macro_block_expr.rs:5:14:5:28 | { ... } | diff --git a/rust/ql/test/extractor-tests/generated/MacroBlockExpr/MacroBlockExpr_getTailExpr.ql b/rust/ql/test/extractor-tests/generated/MacroBlockExpr/MacroBlockExpr_getTailExpr.ql deleted file mode 100644 index 4fdb10bc351..00000000000 --- a/rust/ql/test/extractor-tests/generated/MacroBlockExpr/MacroBlockExpr_getTailExpr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from MacroBlockExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getTailExpr() diff --git a/rust/ql/test/extractor-tests/generated/MacroCall/Cargo.lock b/rust/ql/test/extractor-tests/generated/MacroCall/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MacroCall/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall.expected b/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall.expected index 1192db0ba7e..0fae1d5e49d 100644 --- a/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall.expected +++ b/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall.expected @@ -1,2 +1,16 @@ -| gen_macro_call.rs:7:5:7:29 | println!... | hasExtendedCanonicalPath: | no | hasCrateOrigin: | no | hasAttributeMacroExpansion: | no | getNumberOfAttrs: | 0 | hasPath: | yes | hasTokenTree: | yes | hasMacroCallExpansion: | yes | -| gen_macro_call.rs:7:14:7:28 | ...::format_args_nl!... | hasExtendedCanonicalPath: | no | hasCrateOrigin: | no | hasAttributeMacroExpansion: | no | getNumberOfAttrs: | 0 | hasPath: | yes | hasTokenTree: | yes | hasMacroCallExpansion: | yes | +instances +| gen_macro_call.rs:7:5:7:29 | println!... | +| gen_macro_call.rs:7:14:7:28 | ...::format_args_nl!... | +getExtendedCanonicalPath +getCrateOrigin +getAttributeMacroExpansion +getAttr +getPath +| gen_macro_call.rs:7:5:7:29 | println!... | gen_macro_call.rs:7:5:7:11 | println | +| gen_macro_call.rs:7:14:7:28 | ...::format_args_nl!... | gen_macro_call.rs:7:5:7:29 | ...::format_args_nl | +getTokenTree +| gen_macro_call.rs:7:5:7:29 | println!... | gen_macro_call.rs:7:13:7:29 | TokenTree | +| gen_macro_call.rs:7:14:7:28 | ...::format_args_nl!... | gen_macro_call.rs:7:14:7:28 | TokenTree | +getMacroCallExpansion +| gen_macro_call.rs:7:5:7:29 | println!... | gen_macro_call.rs:7:14:7:28 | MacroBlockExpr | +| gen_macro_call.rs:7:14:7:28 | ...::format_args_nl!... | gen_macro_call.rs:7:14:7:28 | FormatArgsExpr | diff --git a/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall.ql b/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall.ql index b9461abfcf1..48fddccf341 100644 --- a/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall.ql +++ b/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall.ql @@ -2,29 +2,34 @@ import codeql.rust.elements import TestUtils -from - MacroCall x, string hasExtendedCanonicalPath, string hasCrateOrigin, - string hasAttributeMacroExpansion, int getNumberOfAttrs, string hasPath, string hasTokenTree, - string hasMacroCallExpansion -where +query predicate instances(MacroCall x) { toBeTested(x) and not x.isUnknown() } + +query predicate getExtendedCanonicalPath(MacroCall x, string getExtendedCanonicalPath) { + toBeTested(x) and not x.isUnknown() and getExtendedCanonicalPath = x.getExtendedCanonicalPath() +} + +query predicate getCrateOrigin(MacroCall x, string getCrateOrigin) { + toBeTested(x) and not x.isUnknown() and getCrateOrigin = x.getCrateOrigin() +} + +query predicate getAttributeMacroExpansion(MacroCall x, MacroItems getAttributeMacroExpansion) { toBeTested(x) and not x.isUnknown() and - ( - if x.hasExtendedCanonicalPath() - then hasExtendedCanonicalPath = "yes" - else hasExtendedCanonicalPath = "no" - ) and - (if x.hasCrateOrigin() then hasCrateOrigin = "yes" else hasCrateOrigin = "no") and - ( - if x.hasAttributeMacroExpansion() - then hasAttributeMacroExpansion = "yes" - else hasAttributeMacroExpansion = "no" - ) and - getNumberOfAttrs = x.getNumberOfAttrs() and - (if x.hasPath() then hasPath = "yes" else hasPath = "no") and - (if x.hasTokenTree() then hasTokenTree = "yes" else hasTokenTree = "no") and - if x.hasMacroCallExpansion() then hasMacroCallExpansion = "yes" else hasMacroCallExpansion = "no" -select x, "hasExtendedCanonicalPath:", hasExtendedCanonicalPath, "hasCrateOrigin:", hasCrateOrigin, - "hasAttributeMacroExpansion:", hasAttributeMacroExpansion, "getNumberOfAttrs:", getNumberOfAttrs, - "hasPath:", hasPath, "hasTokenTree:", hasTokenTree, "hasMacroCallExpansion:", - hasMacroCallExpansion + getAttributeMacroExpansion = x.getAttributeMacroExpansion() +} + +query predicate getAttr(MacroCall x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} + +query predicate getPath(MacroCall x, Path getPath) { + toBeTested(x) and not x.isUnknown() and getPath = x.getPath() +} + +query predicate getTokenTree(MacroCall x, TokenTree getTokenTree) { + toBeTested(x) and not x.isUnknown() and getTokenTree = x.getTokenTree() +} + +query predicate getMacroCallExpansion(MacroCall x, AstNode getMacroCallExpansion) { + toBeTested(x) and not x.isUnknown() and getMacroCallExpansion = x.getMacroCallExpansion() +} diff --git a/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall_getAttr.expected b/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall_getAttr.ql b/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall_getAttr.ql deleted file mode 100644 index ef6a94400f0..00000000000 --- a/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from MacroCall x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall_getAttributeMacroExpansion.expected b/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall_getAttributeMacroExpansion.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall_getAttributeMacroExpansion.ql b/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall_getAttributeMacroExpansion.ql deleted file mode 100644 index 7931273e757..00000000000 --- a/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall_getAttributeMacroExpansion.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from MacroCall x -where toBeTested(x) and not x.isUnknown() -select x, x.getAttributeMacroExpansion() diff --git a/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall_getCrateOrigin.expected b/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall_getCrateOrigin.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall_getCrateOrigin.ql b/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall_getCrateOrigin.ql deleted file mode 100644 index 60e32669e7f..00000000000 --- a/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall_getCrateOrigin.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from MacroCall x -where toBeTested(x) and not x.isUnknown() -select x, x.getCrateOrigin() diff --git a/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall_getExtendedCanonicalPath.expected b/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall_getExtendedCanonicalPath.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall_getExtendedCanonicalPath.ql b/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall_getExtendedCanonicalPath.ql deleted file mode 100644 index 0fffb4f4384..00000000000 --- a/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall_getExtendedCanonicalPath.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from MacroCall x -where toBeTested(x) and not x.isUnknown() -select x, x.getExtendedCanonicalPath() diff --git a/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall_getMacroCallExpansion.expected b/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall_getMacroCallExpansion.expected deleted file mode 100644 index e93d36c8ac2..00000000000 --- a/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall_getMacroCallExpansion.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_macro_call.rs:7:5:7:29 | println!... | gen_macro_call.rs:7:14:7:28 | MacroBlockExpr | -| gen_macro_call.rs:7:14:7:28 | ...::format_args_nl!... | gen_macro_call.rs:7:14:7:28 | FormatArgsExpr | diff --git a/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall_getMacroCallExpansion.ql b/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall_getMacroCallExpansion.ql deleted file mode 100644 index 6ce5fd6e7c8..00000000000 --- a/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall_getMacroCallExpansion.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from MacroCall x -where toBeTested(x) and not x.isUnknown() -select x, x.getMacroCallExpansion() diff --git a/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall_getPath.expected b/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall_getPath.expected deleted file mode 100644 index 0f17b0ddd12..00000000000 --- a/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall_getPath.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_macro_call.rs:7:5:7:29 | println!... | gen_macro_call.rs:7:5:7:11 | println | -| gen_macro_call.rs:7:14:7:28 | ...::format_args_nl!... | gen_macro_call.rs:7:5:7:29 | ...::format_args_nl | diff --git a/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall_getPath.ql b/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall_getPath.ql deleted file mode 100644 index 729ce15fb3f..00000000000 --- a/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall_getPath.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from MacroCall x -where toBeTested(x) and not x.isUnknown() -select x, x.getPath() diff --git a/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall_getTokenTree.expected b/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall_getTokenTree.expected deleted file mode 100644 index 833429dd94f..00000000000 --- a/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall_getTokenTree.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_macro_call.rs:7:5:7:29 | println!... | gen_macro_call.rs:7:13:7:29 | TokenTree | -| gen_macro_call.rs:7:14:7:28 | ...::format_args_nl!... | gen_macro_call.rs:7:14:7:28 | TokenTree | diff --git a/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall_getTokenTree.ql b/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall_getTokenTree.ql deleted file mode 100644 index 3186e5c6297..00000000000 --- a/rust/ql/test/extractor-tests/generated/MacroCall/MacroCall_getTokenTree.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from MacroCall x -where toBeTested(x) and not x.isUnknown() -select x, x.getTokenTree() diff --git a/rust/ql/test/extractor-tests/generated/MacroDef/Cargo.lock b/rust/ql/test/extractor-tests/generated/MacroDef/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MacroDef/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef.expected b/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef.expected index 2aa118cbfbc..b9b6ddc10cd 100644 --- a/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef.expected +++ b/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef.expected @@ -1 +1,14 @@ -| gen_macro_def.rs:4:5:9:5 | MacroDef | hasExtendedCanonicalPath: | no | hasCrateOrigin: | no | hasAttributeMacroExpansion: | no | hasArgs: | yes | getNumberOfAttrs: | 0 | hasBody: | yes | hasName: | yes | hasVisibility: | yes | +instances +| gen_macro_def.rs:4:5:9:5 | MacroDef | +getExtendedCanonicalPath +getCrateOrigin +getAttributeMacroExpansion +getArgs +| gen_macro_def.rs:4:5:9:5 | MacroDef | gen_macro_def.rs:7:25:7:39 | TokenTree | +getAttr +getBody +| gen_macro_def.rs:4:5:9:5 | MacroDef | gen_macro_def.rs:7:41:9:5 | TokenTree | +getName +| gen_macro_def.rs:4:5:9:5 | MacroDef | gen_macro_def.rs:7:15:7:24 | vec_of_two | +getVisibility +| gen_macro_def.rs:4:5:9:5 | MacroDef | gen_macro_def.rs:7:5:7:7 | Visibility | diff --git a/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef.ql b/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef.ql index 3ec25748abd..e85173597cb 100644 --- a/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef.ql +++ b/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef.ql @@ -2,30 +2,38 @@ import codeql.rust.elements import TestUtils -from - MacroDef x, string hasExtendedCanonicalPath, string hasCrateOrigin, - string hasAttributeMacroExpansion, string hasArgs, int getNumberOfAttrs, string hasBody, - string hasName, string hasVisibility -where +query predicate instances(MacroDef x) { toBeTested(x) and not x.isUnknown() } + +query predicate getExtendedCanonicalPath(MacroDef x, string getExtendedCanonicalPath) { + toBeTested(x) and not x.isUnknown() and getExtendedCanonicalPath = x.getExtendedCanonicalPath() +} + +query predicate getCrateOrigin(MacroDef x, string getCrateOrigin) { + toBeTested(x) and not x.isUnknown() and getCrateOrigin = x.getCrateOrigin() +} + +query predicate getAttributeMacroExpansion(MacroDef x, MacroItems getAttributeMacroExpansion) { toBeTested(x) and not x.isUnknown() and - ( - if x.hasExtendedCanonicalPath() - then hasExtendedCanonicalPath = "yes" - else hasExtendedCanonicalPath = "no" - ) and - (if x.hasCrateOrigin() then hasCrateOrigin = "yes" else hasCrateOrigin = "no") and - ( - if x.hasAttributeMacroExpansion() - then hasAttributeMacroExpansion = "yes" - else hasAttributeMacroExpansion = "no" - ) and - (if x.hasArgs() then hasArgs = "yes" else hasArgs = "no") and - getNumberOfAttrs = x.getNumberOfAttrs() and - (if x.hasBody() then hasBody = "yes" else hasBody = "no") and - (if x.hasName() then hasName = "yes" else hasName = "no") and - if x.hasVisibility() then hasVisibility = "yes" else hasVisibility = "no" -select x, "hasExtendedCanonicalPath:", hasExtendedCanonicalPath, "hasCrateOrigin:", hasCrateOrigin, - "hasAttributeMacroExpansion:", hasAttributeMacroExpansion, "hasArgs:", hasArgs, - "getNumberOfAttrs:", getNumberOfAttrs, "hasBody:", hasBody, "hasName:", hasName, "hasVisibility:", - hasVisibility + getAttributeMacroExpansion = x.getAttributeMacroExpansion() +} + +query predicate getArgs(MacroDef x, TokenTree getArgs) { + toBeTested(x) and not x.isUnknown() and getArgs = x.getArgs() +} + +query predicate getAttr(MacroDef x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} + +query predicate getBody(MacroDef x, TokenTree getBody) { + toBeTested(x) and not x.isUnknown() and getBody = x.getBody() +} + +query predicate getName(MacroDef x, Name getName) { + toBeTested(x) and not x.isUnknown() and getName = x.getName() +} + +query predicate getVisibility(MacroDef x, Visibility getVisibility) { + toBeTested(x) and not x.isUnknown() and getVisibility = x.getVisibility() +} diff --git a/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getArgs.expected b/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getArgs.expected deleted file mode 100644 index fecd14ff2ba..00000000000 --- a/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getArgs.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_macro_def.rs:4:5:9:5 | MacroDef | gen_macro_def.rs:7:25:7:39 | TokenTree | diff --git a/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getArgs.ql b/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getArgs.ql deleted file mode 100644 index 304f6f8d5e3..00000000000 --- a/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getArgs.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from MacroDef x -where toBeTested(x) and not x.isUnknown() -select x, x.getArgs() diff --git a/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getAttr.expected b/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getAttr.ql b/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getAttr.ql deleted file mode 100644 index 28e5f418c01..00000000000 --- a/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from MacroDef x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getAttributeMacroExpansion.expected b/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getAttributeMacroExpansion.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getAttributeMacroExpansion.ql b/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getAttributeMacroExpansion.ql deleted file mode 100644 index be299283916..00000000000 --- a/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getAttributeMacroExpansion.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from MacroDef x -where toBeTested(x) and not x.isUnknown() -select x, x.getAttributeMacroExpansion() diff --git a/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getBody.expected b/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getBody.expected deleted file mode 100644 index 776a64f484a..00000000000 --- a/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getBody.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_macro_def.rs:4:5:9:5 | MacroDef | gen_macro_def.rs:7:41:9:5 | TokenTree | diff --git a/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getBody.ql b/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getBody.ql deleted file mode 100644 index 0c2f4e329fd..00000000000 --- a/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getBody.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from MacroDef x -where toBeTested(x) and not x.isUnknown() -select x, x.getBody() diff --git a/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getCrateOrigin.expected b/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getCrateOrigin.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getCrateOrigin.ql b/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getCrateOrigin.ql deleted file mode 100644 index 81aa4aa3fad..00000000000 --- a/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getCrateOrigin.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from MacroDef x -where toBeTested(x) and not x.isUnknown() -select x, x.getCrateOrigin() diff --git a/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getExtendedCanonicalPath.expected b/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getExtendedCanonicalPath.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getExtendedCanonicalPath.ql b/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getExtendedCanonicalPath.ql deleted file mode 100644 index c30de43e669..00000000000 --- a/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getExtendedCanonicalPath.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from MacroDef x -where toBeTested(x) and not x.isUnknown() -select x, x.getExtendedCanonicalPath() diff --git a/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getName.expected b/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getName.expected deleted file mode 100644 index 7b7e532ab2e..00000000000 --- a/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getName.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_macro_def.rs:4:5:9:5 | MacroDef | gen_macro_def.rs:7:15:7:24 | vec_of_two | diff --git a/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getName.ql b/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getName.ql deleted file mode 100644 index 49cba18e277..00000000000 --- a/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getName.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from MacroDef x -where toBeTested(x) and not x.isUnknown() -select x, x.getName() diff --git a/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getVisibility.expected b/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getVisibility.expected deleted file mode 100644 index 74234db763b..00000000000 --- a/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getVisibility.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_macro_def.rs:4:5:9:5 | MacroDef | gen_macro_def.rs:7:5:7:7 | Visibility | diff --git a/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getVisibility.ql b/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getVisibility.ql deleted file mode 100644 index 11323b3a581..00000000000 --- a/rust/ql/test/extractor-tests/generated/MacroDef/MacroDef_getVisibility.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from MacroDef x -where toBeTested(x) and not x.isUnknown() -select x, x.getVisibility() diff --git a/rust/ql/test/extractor-tests/generated/MacroExpr/Cargo.lock b/rust/ql/test/extractor-tests/generated/MacroExpr/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MacroExpr/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/MacroExpr/MacroExpr.expected b/rust/ql/test/extractor-tests/generated/MacroExpr/MacroExpr.expected index 819ac71ef40..32cb0efaaef 100644 --- a/rust/ql/test/extractor-tests/generated/MacroExpr/MacroExpr.expected +++ b/rust/ql/test/extractor-tests/generated/MacroExpr/MacroExpr.expected @@ -1 +1,4 @@ -| gen_macro_expr.rs:7:13:7:25 | MacroExpr | hasMacroCall: | yes | +instances +| gen_macro_expr.rs:7:13:7:25 | MacroExpr | +getMacroCall +| gen_macro_expr.rs:7:13:7:25 | MacroExpr | gen_macro_expr.rs:7:13:7:25 | vec!... | diff --git a/rust/ql/test/extractor-tests/generated/MacroExpr/MacroExpr.ql b/rust/ql/test/extractor-tests/generated/MacroExpr/MacroExpr.ql index a2c2d431512..0787ed7392c 100644 --- a/rust/ql/test/extractor-tests/generated/MacroExpr/MacroExpr.ql +++ b/rust/ql/test/extractor-tests/generated/MacroExpr/MacroExpr.ql @@ -2,9 +2,8 @@ import codeql.rust.elements import TestUtils -from MacroExpr x, string hasMacroCall -where - toBeTested(x) and - not x.isUnknown() and - if x.hasMacroCall() then hasMacroCall = "yes" else hasMacroCall = "no" -select x, "hasMacroCall:", hasMacroCall +query predicate instances(MacroExpr x) { toBeTested(x) and not x.isUnknown() } + +query predicate getMacroCall(MacroExpr x, MacroCall getMacroCall) { + toBeTested(x) and not x.isUnknown() and getMacroCall = x.getMacroCall() +} diff --git a/rust/ql/test/extractor-tests/generated/MacroExpr/MacroExpr_getMacroCall.expected b/rust/ql/test/extractor-tests/generated/MacroExpr/MacroExpr_getMacroCall.expected deleted file mode 100644 index 493f2f88291..00000000000 --- a/rust/ql/test/extractor-tests/generated/MacroExpr/MacroExpr_getMacroCall.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_macro_expr.rs:7:13:7:25 | MacroExpr | gen_macro_expr.rs:7:13:7:25 | vec!... | diff --git a/rust/ql/test/extractor-tests/generated/MacroExpr/MacroExpr_getMacroCall.ql b/rust/ql/test/extractor-tests/generated/MacroExpr/MacroExpr_getMacroCall.ql deleted file mode 100644 index 7c1d6c44c26..00000000000 --- a/rust/ql/test/extractor-tests/generated/MacroExpr/MacroExpr_getMacroCall.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from MacroExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getMacroCall() diff --git a/rust/ql/test/extractor-tests/generated/MacroItems/Cargo.lock b/rust/ql/test/extractor-tests/generated/MacroItems/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MacroItems/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/MacroItems/MacroItems.expected b/rust/ql/test/extractor-tests/generated/MacroItems/MacroItems.expected index 00f51a7b82b..90daafd5817 100644 --- a/rust/ql/test/extractor-tests/generated/MacroItems/MacroItems.expected +++ b/rust/ql/test/extractor-tests/generated/MacroItems/MacroItems.expected @@ -1,2 +1,7 @@ -| gen_macro_items.rs:5:5:5:38 | MacroItems | getNumberOfItems: | 2 | -| gen_macro_items.rs:13:12:13:14 | MacroItems | getNumberOfItems: | 1 | +instances +| gen_macro_items.rs:5:5:5:38 | MacroItems | +| gen_macro_items.rs:13:12:13:14 | MacroItems | +getItem +| gen_macro_items.rs:5:5:5:38 | MacroItems | 0 | gen_macro_items.rs:5:5:5:38 | use ...::Path | +| gen_macro_items.rs:5:5:5:38 | MacroItems | 1 | gen_macro_items.rs:5:5:5:38 | fn get_parent | +| gen_macro_items.rs:13:12:13:14 | MacroItems | 0 | gen_macro_items.rs:13:12:13:14 | impl ...::Debug for Bar::<...> { ... } | diff --git a/rust/ql/test/extractor-tests/generated/MacroItems/MacroItems.ql b/rust/ql/test/extractor-tests/generated/MacroItems/MacroItems.ql index cd72b24c18d..3a9cd1c8499 100644 --- a/rust/ql/test/extractor-tests/generated/MacroItems/MacroItems.ql +++ b/rust/ql/test/extractor-tests/generated/MacroItems/MacroItems.ql @@ -2,9 +2,8 @@ import codeql.rust.elements import TestUtils -from MacroItems x, int getNumberOfItems -where - toBeTested(x) and - not x.isUnknown() and - getNumberOfItems = x.getNumberOfItems() -select x, "getNumberOfItems:", getNumberOfItems +query predicate instances(MacroItems x) { toBeTested(x) and not x.isUnknown() } + +query predicate getItem(MacroItems x, int index, Item getItem) { + toBeTested(x) and not x.isUnknown() and getItem = x.getItem(index) +} diff --git a/rust/ql/test/extractor-tests/generated/MacroItems/MacroItems_getItem.expected b/rust/ql/test/extractor-tests/generated/MacroItems/MacroItems_getItem.expected deleted file mode 100644 index 803bf159c94..00000000000 --- a/rust/ql/test/extractor-tests/generated/MacroItems/MacroItems_getItem.expected +++ /dev/null @@ -1,3 +0,0 @@ -| gen_macro_items.rs:5:5:5:38 | MacroItems | 0 | gen_macro_items.rs:5:5:5:38 | use ...::Path | -| gen_macro_items.rs:5:5:5:38 | MacroItems | 1 | gen_macro_items.rs:5:5:5:38 | fn get_parent | -| gen_macro_items.rs:13:12:13:14 | MacroItems | 0 | gen_macro_items.rs:13:12:13:14 | impl ...::Debug for Bar::<...> { ... } | diff --git a/rust/ql/test/extractor-tests/generated/MacroItems/MacroItems_getItem.ql b/rust/ql/test/extractor-tests/generated/MacroItems/MacroItems_getItem.ql deleted file mode 100644 index 09aaa2b8be7..00000000000 --- a/rust/ql/test/extractor-tests/generated/MacroItems/MacroItems_getItem.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from MacroItems x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getItem(index) diff --git a/rust/ql/test/extractor-tests/generated/MacroPat/Cargo.lock b/rust/ql/test/extractor-tests/generated/MacroPat/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MacroPat/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/MacroPat/MacroPat.expected b/rust/ql/test/extractor-tests/generated/MacroPat/MacroPat.expected index b56789484ff..029b7554987 100644 --- a/rust/ql/test/extractor-tests/generated/MacroPat/MacroPat.expected +++ b/rust/ql/test/extractor-tests/generated/MacroPat/MacroPat.expected @@ -1 +1,4 @@ -| gen_macro_pat.rs:13:9:13:19 | MacroPat | hasMacroCall: | yes | +instances +| gen_macro_pat.rs:13:9:13:19 | MacroPat | +getMacroCall +| gen_macro_pat.rs:13:9:13:19 | MacroPat | gen_macro_pat.rs:13:9:13:19 | my_macro!... | diff --git a/rust/ql/test/extractor-tests/generated/MacroPat/MacroPat.ql b/rust/ql/test/extractor-tests/generated/MacroPat/MacroPat.ql index d54889e043b..6d9d7ba17fd 100644 --- a/rust/ql/test/extractor-tests/generated/MacroPat/MacroPat.ql +++ b/rust/ql/test/extractor-tests/generated/MacroPat/MacroPat.ql @@ -2,9 +2,8 @@ import codeql.rust.elements import TestUtils -from MacroPat x, string hasMacroCall -where - toBeTested(x) and - not x.isUnknown() and - if x.hasMacroCall() then hasMacroCall = "yes" else hasMacroCall = "no" -select x, "hasMacroCall:", hasMacroCall +query predicate instances(MacroPat x) { toBeTested(x) and not x.isUnknown() } + +query predicate getMacroCall(MacroPat x, MacroCall getMacroCall) { + toBeTested(x) and not x.isUnknown() and getMacroCall = x.getMacroCall() +} diff --git a/rust/ql/test/extractor-tests/generated/MacroPat/MacroPat_getMacroCall.expected b/rust/ql/test/extractor-tests/generated/MacroPat/MacroPat_getMacroCall.expected deleted file mode 100644 index faa6c1d7e6d..00000000000 --- a/rust/ql/test/extractor-tests/generated/MacroPat/MacroPat_getMacroCall.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_macro_pat.rs:13:9:13:19 | MacroPat | gen_macro_pat.rs:13:9:13:19 | my_macro!... | diff --git a/rust/ql/test/extractor-tests/generated/MacroPat/MacroPat_getMacroCall.ql b/rust/ql/test/extractor-tests/generated/MacroPat/MacroPat_getMacroCall.ql deleted file mode 100644 index 9c8f0846ede..00000000000 --- a/rust/ql/test/extractor-tests/generated/MacroPat/MacroPat_getMacroCall.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from MacroPat x -where toBeTested(x) and not x.isUnknown() -select x, x.getMacroCall() diff --git a/rust/ql/test/extractor-tests/generated/MacroRules/Cargo.lock b/rust/ql/test/extractor-tests/generated/MacroRules/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MacroRules/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules.expected b/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules.expected index db582f99f87..4bfb98220f2 100644 --- a/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules.expected +++ b/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules.expected @@ -1 +1,11 @@ -| gen_macro_rules.rs:4:5:9:5 | MacroRules | hasExtendedCanonicalPath: | no | hasCrateOrigin: | no | hasAttributeMacroExpansion: | no | getNumberOfAttrs: | 0 | hasName: | yes | hasTokenTree: | yes | hasVisibility: | no | +instances +| gen_macro_rules.rs:4:5:9:5 | MacroRules | +getExtendedCanonicalPath +getCrateOrigin +getAttributeMacroExpansion +getAttr +getName +| gen_macro_rules.rs:4:5:9:5 | MacroRules | gen_macro_rules.rs:5:18:5:25 | my_macro | +getTokenTree +| gen_macro_rules.rs:4:5:9:5 | MacroRules | gen_macro_rules.rs:5:27:9:5 | TokenTree | +getVisibility diff --git a/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules.ql b/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules.ql index 5e1ebacd573..ef051f77c9e 100644 --- a/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules.ql +++ b/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules.ql @@ -2,28 +2,34 @@ import codeql.rust.elements import TestUtils -from - MacroRules x, string hasExtendedCanonicalPath, string hasCrateOrigin, - string hasAttributeMacroExpansion, int getNumberOfAttrs, string hasName, string hasTokenTree, - string hasVisibility -where +query predicate instances(MacroRules x) { toBeTested(x) and not x.isUnknown() } + +query predicate getExtendedCanonicalPath(MacroRules x, string getExtendedCanonicalPath) { + toBeTested(x) and not x.isUnknown() and getExtendedCanonicalPath = x.getExtendedCanonicalPath() +} + +query predicate getCrateOrigin(MacroRules x, string getCrateOrigin) { + toBeTested(x) and not x.isUnknown() and getCrateOrigin = x.getCrateOrigin() +} + +query predicate getAttributeMacroExpansion(MacroRules x, MacroItems getAttributeMacroExpansion) { toBeTested(x) and not x.isUnknown() and - ( - if x.hasExtendedCanonicalPath() - then hasExtendedCanonicalPath = "yes" - else hasExtendedCanonicalPath = "no" - ) and - (if x.hasCrateOrigin() then hasCrateOrigin = "yes" else hasCrateOrigin = "no") and - ( - if x.hasAttributeMacroExpansion() - then hasAttributeMacroExpansion = "yes" - else hasAttributeMacroExpansion = "no" - ) and - getNumberOfAttrs = x.getNumberOfAttrs() and - (if x.hasName() then hasName = "yes" else hasName = "no") and - (if x.hasTokenTree() then hasTokenTree = "yes" else hasTokenTree = "no") and - if x.hasVisibility() then hasVisibility = "yes" else hasVisibility = "no" -select x, "hasExtendedCanonicalPath:", hasExtendedCanonicalPath, "hasCrateOrigin:", hasCrateOrigin, - "hasAttributeMacroExpansion:", hasAttributeMacroExpansion, "getNumberOfAttrs:", getNumberOfAttrs, - "hasName:", hasName, "hasTokenTree:", hasTokenTree, "hasVisibility:", hasVisibility + getAttributeMacroExpansion = x.getAttributeMacroExpansion() +} + +query predicate getAttr(MacroRules x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} + +query predicate getName(MacroRules x, Name getName) { + toBeTested(x) and not x.isUnknown() and getName = x.getName() +} + +query predicate getTokenTree(MacroRules x, TokenTree getTokenTree) { + toBeTested(x) and not x.isUnknown() and getTokenTree = x.getTokenTree() +} + +query predicate getVisibility(MacroRules x, Visibility getVisibility) { + toBeTested(x) and not x.isUnknown() and getVisibility = x.getVisibility() +} diff --git a/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules_getAttr.expected b/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules_getAttr.ql b/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules_getAttr.ql deleted file mode 100644 index 4fa5d762c62..00000000000 --- a/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from MacroRules x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules_getAttributeMacroExpansion.expected b/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules_getAttributeMacroExpansion.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules_getAttributeMacroExpansion.ql b/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules_getAttributeMacroExpansion.ql deleted file mode 100644 index b7b01f36fe7..00000000000 --- a/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules_getAttributeMacroExpansion.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from MacroRules x -where toBeTested(x) and not x.isUnknown() -select x, x.getAttributeMacroExpansion() diff --git a/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules_getCrateOrigin.expected b/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules_getCrateOrigin.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules_getCrateOrigin.ql b/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules_getCrateOrigin.ql deleted file mode 100644 index 987a91f5706..00000000000 --- a/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules_getCrateOrigin.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from MacroRules x -where toBeTested(x) and not x.isUnknown() -select x, x.getCrateOrigin() diff --git a/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules_getExtendedCanonicalPath.expected b/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules_getExtendedCanonicalPath.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules_getExtendedCanonicalPath.ql b/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules_getExtendedCanonicalPath.ql deleted file mode 100644 index b2fa0cc9f7e..00000000000 --- a/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules_getExtendedCanonicalPath.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from MacroRules x -where toBeTested(x) and not x.isUnknown() -select x, x.getExtendedCanonicalPath() diff --git a/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules_getName.expected b/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules_getName.expected deleted file mode 100644 index 08044386ded..00000000000 --- a/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules_getName.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_macro_rules.rs:4:5:9:5 | MacroRules | gen_macro_rules.rs:5:18:5:25 | my_macro | diff --git a/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules_getName.ql b/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules_getName.ql deleted file mode 100644 index 7a1fd49401a..00000000000 --- a/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules_getName.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from MacroRules x -where toBeTested(x) and not x.isUnknown() -select x, x.getName() diff --git a/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules_getTokenTree.expected b/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules_getTokenTree.expected deleted file mode 100644 index 9aafcc37389..00000000000 --- a/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules_getTokenTree.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_macro_rules.rs:4:5:9:5 | MacroRules | gen_macro_rules.rs:5:27:9:5 | TokenTree | diff --git a/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules_getTokenTree.ql b/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules_getTokenTree.ql deleted file mode 100644 index 7fae79438fc..00000000000 --- a/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules_getTokenTree.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from MacroRules x -where toBeTested(x) and not x.isUnknown() -select x, x.getTokenTree() diff --git a/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules_getVisibility.expected b/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules_getVisibility.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules_getVisibility.ql b/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules_getVisibility.ql deleted file mode 100644 index bd50e49e339..00000000000 --- a/rust/ql/test/extractor-tests/generated/MacroRules/MacroRules_getVisibility.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from MacroRules x -where toBeTested(x) and not x.isUnknown() -select x, x.getVisibility() diff --git a/rust/ql/test/extractor-tests/generated/MacroTypeRepr/Cargo.lock b/rust/ql/test/extractor-tests/generated/MacroTypeRepr/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MacroTypeRepr/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/MacroTypeRepr/MacroTypeRepr.expected b/rust/ql/test/extractor-tests/generated/MacroTypeRepr/MacroTypeRepr.expected index 2f91b7f8d00..4047903cc5e 100644 --- a/rust/ql/test/extractor-tests/generated/MacroTypeRepr/MacroTypeRepr.expected +++ b/rust/ql/test/extractor-tests/generated/MacroTypeRepr/MacroTypeRepr.expected @@ -1 +1,4 @@ -| gen_macro_type_repr.rs:10:14:10:26 | MacroTypeRepr | hasMacroCall: | yes | +instances +| gen_macro_type_repr.rs:10:14:10:26 | MacroTypeRepr | +getMacroCall +| gen_macro_type_repr.rs:10:14:10:26 | MacroTypeRepr | gen_macro_type_repr.rs:10:14:10:26 | macro_type!... | diff --git a/rust/ql/test/extractor-tests/generated/MacroTypeRepr/MacroTypeRepr.ql b/rust/ql/test/extractor-tests/generated/MacroTypeRepr/MacroTypeRepr.ql index 466d4cf0405..d946ec6d05d 100644 --- a/rust/ql/test/extractor-tests/generated/MacroTypeRepr/MacroTypeRepr.ql +++ b/rust/ql/test/extractor-tests/generated/MacroTypeRepr/MacroTypeRepr.ql @@ -2,9 +2,8 @@ import codeql.rust.elements import TestUtils -from MacroTypeRepr x, string hasMacroCall -where - toBeTested(x) and - not x.isUnknown() and - if x.hasMacroCall() then hasMacroCall = "yes" else hasMacroCall = "no" -select x, "hasMacroCall:", hasMacroCall +query predicate instances(MacroTypeRepr x) { toBeTested(x) and not x.isUnknown() } + +query predicate getMacroCall(MacroTypeRepr x, MacroCall getMacroCall) { + toBeTested(x) and not x.isUnknown() and getMacroCall = x.getMacroCall() +} diff --git a/rust/ql/test/extractor-tests/generated/MacroTypeRepr/MacroTypeRepr_getMacroCall.expected b/rust/ql/test/extractor-tests/generated/MacroTypeRepr/MacroTypeRepr_getMacroCall.expected deleted file mode 100644 index 896e3e199b2..00000000000 --- a/rust/ql/test/extractor-tests/generated/MacroTypeRepr/MacroTypeRepr_getMacroCall.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_macro_type_repr.rs:10:14:10:26 | MacroTypeRepr | gen_macro_type_repr.rs:10:14:10:26 | macro_type!... | diff --git a/rust/ql/test/extractor-tests/generated/MacroTypeRepr/MacroTypeRepr_getMacroCall.ql b/rust/ql/test/extractor-tests/generated/MacroTypeRepr/MacroTypeRepr_getMacroCall.ql deleted file mode 100644 index 22aa72d039b..00000000000 --- a/rust/ql/test/extractor-tests/generated/MacroTypeRepr/MacroTypeRepr_getMacroCall.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from MacroTypeRepr x -where toBeTested(x) and not x.isUnknown() -select x, x.getMacroCall() diff --git a/rust/ql/test/extractor-tests/generated/MatchArm/Cargo.lock b/rust/ql/test/extractor-tests/generated/MatchArm/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MatchArm/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm.expected b/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm.expected index b3eb4c178b2..964af263cd7 100644 --- a/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm.expected +++ b/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm.expected @@ -1,4 +1,18 @@ -| gen_match_arm.rs:6:9:6:29 | ... => y | getNumberOfAttrs: | 0 | hasExpr: | yes | hasGuard: | no | hasPat: | yes | -| gen_match_arm.rs:7:9:7:26 | ...::None => 0 | getNumberOfAttrs: | 0 | hasExpr: | yes | hasGuard: | no | hasPat: | yes | -| gen_match_arm.rs:10:9:10:35 | ... if ... => ... | getNumberOfAttrs: | 0 | hasExpr: | yes | hasGuard: | yes | hasPat: | yes | -| gen_match_arm.rs:11:9:11:15 | _ => 0 | getNumberOfAttrs: | 0 | hasExpr: | yes | hasGuard: | no | hasPat: | yes | +instances +| gen_match_arm.rs:6:9:6:29 | ... => y | +| gen_match_arm.rs:7:9:7:26 | ...::None => 0 | +| gen_match_arm.rs:10:9:10:35 | ... if ... => ... | +| gen_match_arm.rs:11:9:11:15 | _ => 0 | +getAttr +getExpr +| gen_match_arm.rs:6:9:6:29 | ... => y | gen_match_arm.rs:6:28:6:28 | y | +| gen_match_arm.rs:7:9:7:26 | ...::None => 0 | gen_match_arm.rs:7:25:7:25 | 0 | +| gen_match_arm.rs:10:9:10:35 | ... if ... => ... | gen_match_arm.rs:10:30:10:34 | ... / ... | +| gen_match_arm.rs:11:9:11:15 | _ => 0 | gen_match_arm.rs:11:14:11:14 | 0 | +getGuard +| gen_match_arm.rs:10:9:10:35 | ... if ... => ... | gen_match_arm.rs:10:17:10:25 | MatchGuard | +getPat +| gen_match_arm.rs:6:9:6:29 | ... => y | gen_match_arm.rs:6:9:6:23 | ...::Some(...) | +| gen_match_arm.rs:7:9:7:26 | ...::None => 0 | gen_match_arm.rs:7:9:7:20 | ...::None | +| gen_match_arm.rs:10:9:10:35 | ... if ... => ... | gen_match_arm.rs:10:9:10:15 | Some(...) | +| gen_match_arm.rs:11:9:11:15 | _ => 0 | gen_match_arm.rs:11:9:11:9 | _ | diff --git a/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm.ql b/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm.ql index 9161cdadf73..11450061ab0 100644 --- a/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm.ql +++ b/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm.ql @@ -2,13 +2,20 @@ import codeql.rust.elements import TestUtils -from MatchArm x, int getNumberOfAttrs, string hasExpr, string hasGuard, string hasPat -where - toBeTested(x) and - not x.isUnknown() and - getNumberOfAttrs = x.getNumberOfAttrs() and - (if x.hasExpr() then hasExpr = "yes" else hasExpr = "no") and - (if x.hasGuard() then hasGuard = "yes" else hasGuard = "no") and - if x.hasPat() then hasPat = "yes" else hasPat = "no" -select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasExpr:", hasExpr, "hasGuard:", hasGuard, - "hasPat:", hasPat +query predicate instances(MatchArm x) { toBeTested(x) and not x.isUnknown() } + +query predicate getAttr(MatchArm x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} + +query predicate getExpr(MatchArm x, Expr getExpr) { + toBeTested(x) and not x.isUnknown() and getExpr = x.getExpr() +} + +query predicate getGuard(MatchArm x, MatchGuard getGuard) { + toBeTested(x) and not x.isUnknown() and getGuard = x.getGuard() +} + +query predicate getPat(MatchArm x, Pat getPat) { + toBeTested(x) and not x.isUnknown() and getPat = x.getPat() +} diff --git a/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getAttr.expected b/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getAttr.ql b/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getAttr.ql deleted file mode 100644 index d86de1bb46d..00000000000 --- a/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from MatchArm x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getExpr.expected b/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getExpr.expected deleted file mode 100644 index 95d4a7fc2f2..00000000000 --- a/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getExpr.expected +++ /dev/null @@ -1,4 +0,0 @@ -| gen_match_arm.rs:6:9:6:29 | ... => y | gen_match_arm.rs:6:28:6:28 | y | -| gen_match_arm.rs:7:9:7:26 | ...::None => 0 | gen_match_arm.rs:7:25:7:25 | 0 | -| gen_match_arm.rs:10:9:10:35 | ... if ... => ... | gen_match_arm.rs:10:30:10:34 | ... / ... | -| gen_match_arm.rs:11:9:11:15 | _ => 0 | gen_match_arm.rs:11:14:11:14 | 0 | diff --git a/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getExpr.ql b/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getExpr.ql deleted file mode 100644 index b488c8cd7ad..00000000000 --- a/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getExpr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from MatchArm x -where toBeTested(x) and not x.isUnknown() -select x, x.getExpr() diff --git a/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getGuard.expected b/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getGuard.expected deleted file mode 100644 index 00291745547..00000000000 --- a/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getGuard.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_match_arm.rs:10:9:10:35 | ... if ... => ... | gen_match_arm.rs:10:17:10:25 | MatchGuard | diff --git a/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getGuard.ql b/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getGuard.ql deleted file mode 100644 index 508c72779ed..00000000000 --- a/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getGuard.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from MatchArm x -where toBeTested(x) and not x.isUnknown() -select x, x.getGuard() diff --git a/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getPat.expected b/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getPat.expected deleted file mode 100644 index d4adba7f838..00000000000 --- a/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getPat.expected +++ /dev/null @@ -1,4 +0,0 @@ -| gen_match_arm.rs:6:9:6:29 | ... => y | gen_match_arm.rs:6:9:6:23 | ...::Some(...) | -| gen_match_arm.rs:7:9:7:26 | ...::None => 0 | gen_match_arm.rs:7:9:7:20 | ...::None | -| gen_match_arm.rs:10:9:10:35 | ... if ... => ... | gen_match_arm.rs:10:9:10:15 | Some(...) | -| gen_match_arm.rs:11:9:11:15 | _ => 0 | gen_match_arm.rs:11:9:11:9 | _ | diff --git a/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getPat.ql b/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getPat.ql deleted file mode 100644 index ff83947901a..00000000000 --- a/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getPat.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from MatchArm x -where toBeTested(x) and not x.isUnknown() -select x, x.getPat() diff --git a/rust/ql/test/extractor-tests/generated/MatchArmList/Cargo.lock b/rust/ql/test/extractor-tests/generated/MatchArmList/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MatchArmList/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/MatchArmList/MatchArmList.expected b/rust/ql/test/extractor-tests/generated/MatchArmList/MatchArmList.expected index 8a796ef9a55..fec09a4f9ba 100644 --- a/rust/ql/test/extractor-tests/generated/MatchArmList/MatchArmList.expected +++ b/rust/ql/test/extractor-tests/generated/MatchArmList/MatchArmList.expected @@ -1 +1,7 @@ -| gen_match_arm_list.rs:7:13:11:5 | MatchArmList | getNumberOfArms: | 3 | getNumberOfAttrs: | 0 | +instances +| gen_match_arm_list.rs:7:13:11:5 | MatchArmList | +getArm +| gen_match_arm_list.rs:7:13:11:5 | MatchArmList | 0 | gen_match_arm_list.rs:8:9:8:19 | 1 => "one" | +| gen_match_arm_list.rs:7:13:11:5 | MatchArmList | 1 | gen_match_arm_list.rs:9:9:9:19 | 2 => "two" | +| gen_match_arm_list.rs:7:13:11:5 | MatchArmList | 2 | gen_match_arm_list.rs:10:9:10:21 | _ => "other" | +getAttr diff --git a/rust/ql/test/extractor-tests/generated/MatchArmList/MatchArmList.ql b/rust/ql/test/extractor-tests/generated/MatchArmList/MatchArmList.ql index be4583a9501..5565aeafc7d 100644 --- a/rust/ql/test/extractor-tests/generated/MatchArmList/MatchArmList.ql +++ b/rust/ql/test/extractor-tests/generated/MatchArmList/MatchArmList.ql @@ -2,10 +2,12 @@ import codeql.rust.elements import TestUtils -from MatchArmList x, int getNumberOfArms, int getNumberOfAttrs -where - toBeTested(x) and - not x.isUnknown() and - getNumberOfArms = x.getNumberOfArms() and - getNumberOfAttrs = x.getNumberOfAttrs() -select x, "getNumberOfArms:", getNumberOfArms, "getNumberOfAttrs:", getNumberOfAttrs +query predicate instances(MatchArmList x) { toBeTested(x) and not x.isUnknown() } + +query predicate getArm(MatchArmList x, int index, MatchArm getArm) { + toBeTested(x) and not x.isUnknown() and getArm = x.getArm(index) +} + +query predicate getAttr(MatchArmList x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} diff --git a/rust/ql/test/extractor-tests/generated/MatchArmList/MatchArmList_getArm.expected b/rust/ql/test/extractor-tests/generated/MatchArmList/MatchArmList_getArm.expected deleted file mode 100644 index 5a53f429e98..00000000000 --- a/rust/ql/test/extractor-tests/generated/MatchArmList/MatchArmList_getArm.expected +++ /dev/null @@ -1,3 +0,0 @@ -| gen_match_arm_list.rs:7:13:11:5 | MatchArmList | 0 | gen_match_arm_list.rs:8:9:8:19 | 1 => "one" | -| gen_match_arm_list.rs:7:13:11:5 | MatchArmList | 1 | gen_match_arm_list.rs:9:9:9:19 | 2 => "two" | -| gen_match_arm_list.rs:7:13:11:5 | MatchArmList | 2 | gen_match_arm_list.rs:10:9:10:21 | _ => "other" | diff --git a/rust/ql/test/extractor-tests/generated/MatchArmList/MatchArmList_getArm.ql b/rust/ql/test/extractor-tests/generated/MatchArmList/MatchArmList_getArm.ql deleted file mode 100644 index 3d29c573158..00000000000 --- a/rust/ql/test/extractor-tests/generated/MatchArmList/MatchArmList_getArm.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from MatchArmList x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getArm(index) diff --git a/rust/ql/test/extractor-tests/generated/MatchArmList/MatchArmList_getAttr.expected b/rust/ql/test/extractor-tests/generated/MatchArmList/MatchArmList_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/MatchArmList/MatchArmList_getAttr.ql b/rust/ql/test/extractor-tests/generated/MatchArmList/MatchArmList_getAttr.ql deleted file mode 100644 index 0992c49ba30..00000000000 --- a/rust/ql/test/extractor-tests/generated/MatchArmList/MatchArmList_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from MatchArmList x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/MatchExpr/Cargo.lock b/rust/ql/test/extractor-tests/generated/MatchExpr/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MatchExpr/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr.expected b/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr.expected index 8c5b0a32a8f..9648a7aa6c7 100644 --- a/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr.expected +++ b/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr.expected @@ -1,2 +1,10 @@ -| gen_match_expr.rs:5:5:8:5 | match x { ... } | getNumberOfAttrs: | 0 | hasScrutinee: | yes | hasMatchArmList: | yes | -| gen_match_expr.rs:9:5:12:5 | match x { ... } | getNumberOfAttrs: | 0 | hasScrutinee: | yes | hasMatchArmList: | yes | +instances +| gen_match_expr.rs:5:5:8:5 | match x { ... } | +| gen_match_expr.rs:9:5:12:5 | match x { ... } | +getAttr +getScrutinee +| gen_match_expr.rs:5:5:8:5 | match x { ... } | gen_match_expr.rs:5:11:5:11 | x | +| gen_match_expr.rs:9:5:12:5 | match x { ... } | gen_match_expr.rs:9:11:9:11 | x | +getMatchArmList +| gen_match_expr.rs:5:5:8:5 | match x { ... } | gen_match_expr.rs:5:13:8:5 | MatchArmList | +| gen_match_expr.rs:9:5:12:5 | match x { ... } | gen_match_expr.rs:9:13:12:5 | MatchArmList | diff --git a/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr.ql b/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr.ql index 0847933e937..c8cc9448d5e 100644 --- a/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr.ql +++ b/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr.ql @@ -2,12 +2,16 @@ import codeql.rust.elements import TestUtils -from MatchExpr x, int getNumberOfAttrs, string hasScrutinee, string hasMatchArmList -where - toBeTested(x) and - not x.isUnknown() and - getNumberOfAttrs = x.getNumberOfAttrs() and - (if x.hasScrutinee() then hasScrutinee = "yes" else hasScrutinee = "no") and - if x.hasMatchArmList() then hasMatchArmList = "yes" else hasMatchArmList = "no" -select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasScrutinee:", hasScrutinee, "hasMatchArmList:", - hasMatchArmList +query predicate instances(MatchExpr x) { toBeTested(x) and not x.isUnknown() } + +query predicate getAttr(MatchExpr x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} + +query predicate getScrutinee(MatchExpr x, Expr getScrutinee) { + toBeTested(x) and not x.isUnknown() and getScrutinee = x.getScrutinee() +} + +query predicate getMatchArmList(MatchExpr x, MatchArmList getMatchArmList) { + toBeTested(x) and not x.isUnknown() and getMatchArmList = x.getMatchArmList() +} diff --git a/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr_getAttr.ql deleted file mode 100644 index 51c49a77073..00000000000 --- a/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from MatchExpr x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr_getMatchArmList.expected b/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr_getMatchArmList.expected deleted file mode 100644 index f5e25db5b39..00000000000 --- a/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr_getMatchArmList.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_match_expr.rs:5:5:8:5 | match x { ... } | gen_match_expr.rs:5:13:8:5 | MatchArmList | -| gen_match_expr.rs:9:5:12:5 | match x { ... } | gen_match_expr.rs:9:13:12:5 | MatchArmList | diff --git a/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr_getMatchArmList.ql b/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr_getMatchArmList.ql deleted file mode 100644 index d6dc36bfc91..00000000000 --- a/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr_getMatchArmList.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from MatchExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getMatchArmList() diff --git a/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr_getScrutinee.expected b/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr_getScrutinee.expected deleted file mode 100644 index 427af7c6ed0..00000000000 --- a/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr_getScrutinee.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_match_expr.rs:5:5:8:5 | match x { ... } | gen_match_expr.rs:5:11:5:11 | x | -| gen_match_expr.rs:9:5:12:5 | match x { ... } | gen_match_expr.rs:9:11:9:11 | x | diff --git a/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr_getScrutinee.ql b/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr_getScrutinee.ql deleted file mode 100644 index 4d29f21fbfb..00000000000 --- a/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr_getScrutinee.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from MatchExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getScrutinee() diff --git a/rust/ql/test/extractor-tests/generated/MatchGuard/Cargo.lock b/rust/ql/test/extractor-tests/generated/MatchGuard/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MatchGuard/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/MatchGuard/MatchGuard.expected b/rust/ql/test/extractor-tests/generated/MatchGuard/MatchGuard.expected index 2005c2a1c3d..bcddfde4c26 100644 --- a/rust/ql/test/extractor-tests/generated/MatchGuard/MatchGuard.expected +++ b/rust/ql/test/extractor-tests/generated/MatchGuard/MatchGuard.expected @@ -1 +1,4 @@ -| gen_match_guard.rs:8:11:8:18 | MatchGuard | hasCondition: | yes | +instances +| gen_match_guard.rs:8:11:8:18 | MatchGuard | +getCondition +| gen_match_guard.rs:8:11:8:18 | MatchGuard | gen_match_guard.rs:8:14:8:18 | ... > ... | diff --git a/rust/ql/test/extractor-tests/generated/MatchGuard/MatchGuard.ql b/rust/ql/test/extractor-tests/generated/MatchGuard/MatchGuard.ql index d31138b1d95..b7051db22d6 100644 --- a/rust/ql/test/extractor-tests/generated/MatchGuard/MatchGuard.ql +++ b/rust/ql/test/extractor-tests/generated/MatchGuard/MatchGuard.ql @@ -2,9 +2,8 @@ import codeql.rust.elements import TestUtils -from MatchGuard x, string hasCondition -where - toBeTested(x) and - not x.isUnknown() and - if x.hasCondition() then hasCondition = "yes" else hasCondition = "no" -select x, "hasCondition:", hasCondition +query predicate instances(MatchGuard x) { toBeTested(x) and not x.isUnknown() } + +query predicate getCondition(MatchGuard x, Expr getCondition) { + toBeTested(x) and not x.isUnknown() and getCondition = x.getCondition() +} diff --git a/rust/ql/test/extractor-tests/generated/MatchGuard/MatchGuard_getCondition.expected b/rust/ql/test/extractor-tests/generated/MatchGuard/MatchGuard_getCondition.expected deleted file mode 100644 index e6d76089e71..00000000000 --- a/rust/ql/test/extractor-tests/generated/MatchGuard/MatchGuard_getCondition.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_match_guard.rs:8:11:8:18 | MatchGuard | gen_match_guard.rs:8:14:8:18 | ... > ... | diff --git a/rust/ql/test/extractor-tests/generated/MatchGuard/MatchGuard_getCondition.ql b/rust/ql/test/extractor-tests/generated/MatchGuard/MatchGuard_getCondition.ql deleted file mode 100644 index 1334666a960..00000000000 --- a/rust/ql/test/extractor-tests/generated/MatchGuard/MatchGuard_getCondition.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from MatchGuard x -where toBeTested(x) and not x.isUnknown() -select x, x.getCondition() diff --git a/rust/ql/test/extractor-tests/generated/Meta/Cargo.lock b/rust/ql/test/extractor-tests/generated/Meta/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Meta/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/Meta/Meta.expected b/rust/ql/test/extractor-tests/generated/Meta/Meta.expected index 0aa36a59d61..92385fa4da9 100644 --- a/rust/ql/test/extractor-tests/generated/Meta/Meta.expected +++ b/rust/ql/test/extractor-tests/generated/Meta/Meta.expected @@ -1,2 +1,10 @@ -| gen_meta.rs:7:7:7:46 | Meta | hasExpr: | yes | isUnsafe: | yes | hasPath: | yes | hasTokenTree: | no | -| gen_meta.rs:9:7:9:72 | Meta | hasExpr: | no | isUnsafe: | no | hasPath: | yes | hasTokenTree: | yes | +instances +| gen_meta.rs:7:7:7:46 | Meta | isUnsafe: | yes | +| gen_meta.rs:9:7:9:72 | Meta | isUnsafe: | no | +getExpr +| gen_meta.rs:7:7:7:46 | Meta | gen_meta.rs:7:27:7:45 | "reason_for_bypass" | +getPath +| gen_meta.rs:7:7:7:46 | Meta | gen_meta.rs:7:14:7:23 | ...::name | +| gen_meta.rs:9:7:9:72 | Meta | gen_meta.rs:9:7:9:16 | deprecated | +getTokenTree +| gen_meta.rs:9:7:9:72 | Meta | gen_meta.rs:9:17:9:72 | TokenTree | diff --git a/rust/ql/test/extractor-tests/generated/Meta/Meta.ql b/rust/ql/test/extractor-tests/generated/Meta/Meta.ql index 72a0426d809..dd054ea7e99 100644 --- a/rust/ql/test/extractor-tests/generated/Meta/Meta.ql +++ b/rust/ql/test/extractor-tests/generated/Meta/Meta.ql @@ -2,13 +2,21 @@ import codeql.rust.elements import TestUtils -from Meta x, string hasExpr, string isUnsafe, string hasPath, string hasTokenTree -where +query predicate instances(Meta x, string isUnsafe__label, string isUnsafe) { toBeTested(x) and not x.isUnknown() and - (if x.hasExpr() then hasExpr = "yes" else hasExpr = "no") and - (if x.isUnsafe() then isUnsafe = "yes" else isUnsafe = "no") and - (if x.hasPath() then hasPath = "yes" else hasPath = "no") and - if x.hasTokenTree() then hasTokenTree = "yes" else hasTokenTree = "no" -select x, "hasExpr:", hasExpr, "isUnsafe:", isUnsafe, "hasPath:", hasPath, "hasTokenTree:", - hasTokenTree + isUnsafe__label = "isUnsafe:" and + if x.isUnsafe() then isUnsafe = "yes" else isUnsafe = "no" +} + +query predicate getExpr(Meta x, Expr getExpr) { + toBeTested(x) and not x.isUnknown() and getExpr = x.getExpr() +} + +query predicate getPath(Meta x, Path getPath) { + toBeTested(x) and not x.isUnknown() and getPath = x.getPath() +} + +query predicate getTokenTree(Meta x, TokenTree getTokenTree) { + toBeTested(x) and not x.isUnknown() and getTokenTree = x.getTokenTree() +} diff --git a/rust/ql/test/extractor-tests/generated/Meta/Meta_getExpr.expected b/rust/ql/test/extractor-tests/generated/Meta/Meta_getExpr.expected deleted file mode 100644 index b4c0ec93734..00000000000 --- a/rust/ql/test/extractor-tests/generated/Meta/Meta_getExpr.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_meta.rs:7:7:7:46 | Meta | gen_meta.rs:7:27:7:45 | "reason_for_bypass" | diff --git a/rust/ql/test/extractor-tests/generated/Meta/Meta_getExpr.ql b/rust/ql/test/extractor-tests/generated/Meta/Meta_getExpr.ql deleted file mode 100644 index a93132dd15a..00000000000 --- a/rust/ql/test/extractor-tests/generated/Meta/Meta_getExpr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Meta x -where toBeTested(x) and not x.isUnknown() -select x, x.getExpr() diff --git a/rust/ql/test/extractor-tests/generated/Meta/Meta_getPath.expected b/rust/ql/test/extractor-tests/generated/Meta/Meta_getPath.expected deleted file mode 100644 index ad4a23a5e2a..00000000000 --- a/rust/ql/test/extractor-tests/generated/Meta/Meta_getPath.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_meta.rs:7:7:7:46 | Meta | gen_meta.rs:7:14:7:23 | ...::name | -| gen_meta.rs:9:7:9:72 | Meta | gen_meta.rs:9:7:9:16 | deprecated | diff --git a/rust/ql/test/extractor-tests/generated/Meta/Meta_getPath.ql b/rust/ql/test/extractor-tests/generated/Meta/Meta_getPath.ql deleted file mode 100644 index 759c013a975..00000000000 --- a/rust/ql/test/extractor-tests/generated/Meta/Meta_getPath.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Meta x -where toBeTested(x) and not x.isUnknown() -select x, x.getPath() diff --git a/rust/ql/test/extractor-tests/generated/Meta/Meta_getTokenTree.expected b/rust/ql/test/extractor-tests/generated/Meta/Meta_getTokenTree.expected deleted file mode 100644 index ffeca33dd3a..00000000000 --- a/rust/ql/test/extractor-tests/generated/Meta/Meta_getTokenTree.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_meta.rs:9:7:9:72 | Meta | gen_meta.rs:9:17:9:72 | TokenTree | diff --git a/rust/ql/test/extractor-tests/generated/Meta/Meta_getTokenTree.ql b/rust/ql/test/extractor-tests/generated/Meta/Meta_getTokenTree.ql deleted file mode 100644 index b0425a57bd3..00000000000 --- a/rust/ql/test/extractor-tests/generated/Meta/Meta_getTokenTree.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Meta x -where toBeTested(x) and not x.isUnknown() -select x, x.getTokenTree() diff --git a/rust/ql/test/extractor-tests/generated/MethodCallExpr/Cargo.lock b/rust/ql/test/extractor-tests/generated/MethodCallExpr/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MethodCallExpr/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.expected b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.expected index 516e47d8b39..61054a3841a 100644 --- a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.expected +++ b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.expected @@ -1,2 +1,20 @@ -| gen_method_call_expr.rs:5:5:5:13 | x.foo(...) | hasArgList: | yes | getNumberOfAttrs: | 0 | getNumberOfArgs: | 1 | hasResolvedPath: | no | hasResolvedCrateOrigin: | no | hasGenericArgList: | no | hasIdentifier: | yes | hasReceiver: | yes | -| gen_method_call_expr.rs:6:5:6:25 | x.foo(...) | hasArgList: | yes | getNumberOfAttrs: | 0 | getNumberOfArgs: | 1 | hasResolvedPath: | no | hasResolvedCrateOrigin: | no | hasGenericArgList: | yes | hasIdentifier: | yes | hasReceiver: | yes | +instances +| gen_method_call_expr.rs:5:5:5:13 | x.foo(...) | +| gen_method_call_expr.rs:6:5:6:25 | x.foo(...) | +getArgList +| gen_method_call_expr.rs:5:5:5:13 | x.foo(...) | gen_method_call_expr.rs:5:10:5:13 | ArgList | +| gen_method_call_expr.rs:6:5:6:25 | x.foo(...) | gen_method_call_expr.rs:6:22:6:25 | ArgList | +getAttr +getArg +| gen_method_call_expr.rs:5:5:5:13 | x.foo(...) | 0 | gen_method_call_expr.rs:5:11:5:12 | 42 | +| gen_method_call_expr.rs:6:5:6:25 | x.foo(...) | 0 | gen_method_call_expr.rs:6:23:6:24 | 42 | +getResolvedPath +getResolvedCrateOrigin +getGenericArgList +| gen_method_call_expr.rs:6:5:6:25 | x.foo(...) | gen_method_call_expr.rs:6:10:6:21 | <...> | +getIdentifier +| gen_method_call_expr.rs:5:5:5:13 | x.foo(...) | gen_method_call_expr.rs:5:7:5:9 | foo | +| gen_method_call_expr.rs:6:5:6:25 | x.foo(...) | gen_method_call_expr.rs:6:7:6:9 | foo | +getReceiver +| gen_method_call_expr.rs:5:5:5:13 | x.foo(...) | gen_method_call_expr.rs:5:5:5:5 | x | +| gen_method_call_expr.rs:6:5:6:25 | x.foo(...) | gen_method_call_expr.rs:6:5:6:5 | x | diff --git a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.ql b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.ql index 518d3dee36e..73ddf8e7d2e 100644 --- a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.ql +++ b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.ql @@ -2,26 +2,36 @@ import codeql.rust.elements import TestUtils -from - MethodCallExpr x, string hasArgList, int getNumberOfAttrs, int getNumberOfArgs, - string hasResolvedPath, string hasResolvedCrateOrigin, string hasGenericArgList, - string hasIdentifier, string hasReceiver -where - toBeTested(x) and - not x.isUnknown() and - (if x.hasArgList() then hasArgList = "yes" else hasArgList = "no") and - getNumberOfAttrs = x.getNumberOfAttrs() and - getNumberOfArgs = x.getNumberOfArgs() and - (if x.hasResolvedPath() then hasResolvedPath = "yes" else hasResolvedPath = "no") and - ( - if x.hasResolvedCrateOrigin() - then hasResolvedCrateOrigin = "yes" - else hasResolvedCrateOrigin = "no" - ) and - (if x.hasGenericArgList() then hasGenericArgList = "yes" else hasGenericArgList = "no") and - (if x.hasIdentifier() then hasIdentifier = "yes" else hasIdentifier = "no") and - if x.hasReceiver() then hasReceiver = "yes" else hasReceiver = "no" -select x, "hasArgList:", hasArgList, "getNumberOfAttrs:", getNumberOfAttrs, "getNumberOfArgs:", - getNumberOfArgs, "hasResolvedPath:", hasResolvedPath, "hasResolvedCrateOrigin:", - hasResolvedCrateOrigin, "hasGenericArgList:", hasGenericArgList, "hasIdentifier:", hasIdentifier, - "hasReceiver:", hasReceiver +query predicate instances(MethodCallExpr x) { toBeTested(x) and not x.isUnknown() } + +query predicate getArgList(MethodCallExpr x, ArgList getArgList) { + toBeTested(x) and not x.isUnknown() and getArgList = x.getArgList() +} + +query predicate getAttr(MethodCallExpr x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} + +query predicate getArg(MethodCallExpr x, int index, Expr getArg) { + toBeTested(x) and not x.isUnknown() and getArg = x.getArg(index) +} + +query predicate getResolvedPath(MethodCallExpr x, string getResolvedPath) { + toBeTested(x) and not x.isUnknown() and getResolvedPath = x.getResolvedPath() +} + +query predicate getResolvedCrateOrigin(MethodCallExpr x, string getResolvedCrateOrigin) { + toBeTested(x) and not x.isUnknown() and getResolvedCrateOrigin = x.getResolvedCrateOrigin() +} + +query predicate getGenericArgList(MethodCallExpr x, GenericArgList getGenericArgList) { + toBeTested(x) and not x.isUnknown() and getGenericArgList = x.getGenericArgList() +} + +query predicate getIdentifier(MethodCallExpr x, NameRef getIdentifier) { + toBeTested(x) and not x.isUnknown() and getIdentifier = x.getIdentifier() +} + +query predicate getReceiver(MethodCallExpr x, Expr getReceiver) { + toBeTested(x) and not x.isUnknown() and getReceiver = x.getReceiver() +} diff --git a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArg.expected b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArg.expected deleted file mode 100644 index 36af4e22c50..00000000000 --- a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArg.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_method_call_expr.rs:5:5:5:13 | x.foo(...) | 0 | gen_method_call_expr.rs:5:11:5:12 | 42 | -| gen_method_call_expr.rs:6:5:6:25 | x.foo(...) | 0 | gen_method_call_expr.rs:6:23:6:24 | 42 | diff --git a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArg.ql b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArg.ql deleted file mode 100644 index 58529cebfe5..00000000000 --- a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArg.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from MethodCallExpr x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getArg(index) diff --git a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArgList.expected b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArgList.expected deleted file mode 100644 index c9d10231cd9..00000000000 --- a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArgList.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_method_call_expr.rs:5:5:5:13 | x.foo(...) | gen_method_call_expr.rs:5:10:5:13 | ArgList | -| gen_method_call_expr.rs:6:5:6:25 | x.foo(...) | gen_method_call_expr.rs:6:22:6:25 | ArgList | diff --git a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArgList.ql b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArgList.ql deleted file mode 100644 index 3e6eb43ba1f..00000000000 --- a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArgList.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from MethodCallExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getArgList() diff --git a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getAttr.ql deleted file mode 100644 index 5cffc6cd43b..00000000000 --- a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from MethodCallExpr x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getGenericArgList.expected b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getGenericArgList.expected deleted file mode 100644 index 51e1108ebb2..00000000000 --- a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getGenericArgList.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_method_call_expr.rs:6:5:6:25 | x.foo(...) | gen_method_call_expr.rs:6:10:6:21 | <...> | diff --git a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getGenericArgList.ql b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getGenericArgList.ql deleted file mode 100644 index d68ec9fa0ca..00000000000 --- a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getGenericArgList.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from MethodCallExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getGenericArgList() diff --git a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getIdentifier.expected b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getIdentifier.expected deleted file mode 100644 index 9f20d2b07dd..00000000000 --- a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getIdentifier.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_method_call_expr.rs:5:5:5:13 | x.foo(...) | gen_method_call_expr.rs:5:7:5:9 | foo | -| gen_method_call_expr.rs:6:5:6:25 | x.foo(...) | gen_method_call_expr.rs:6:7:6:9 | foo | diff --git a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getIdentifier.ql b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getIdentifier.ql deleted file mode 100644 index f14399765d8..00000000000 --- a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getIdentifier.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from MethodCallExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getIdentifier() diff --git a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getReceiver.expected b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getReceiver.expected deleted file mode 100644 index b909a0f7793..00000000000 --- a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getReceiver.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_method_call_expr.rs:5:5:5:13 | x.foo(...) | gen_method_call_expr.rs:5:5:5:5 | x | -| gen_method_call_expr.rs:6:5:6:25 | x.foo(...) | gen_method_call_expr.rs:6:5:6:5 | x | diff --git a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getReceiver.ql b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getReceiver.ql deleted file mode 100644 index 853315863fb..00000000000 --- a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getReceiver.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from MethodCallExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getReceiver() diff --git a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getResolvedCrateOrigin.expected b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getResolvedCrateOrigin.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getResolvedCrateOrigin.ql b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getResolvedCrateOrigin.ql deleted file mode 100644 index dfb29218133..00000000000 --- a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getResolvedCrateOrigin.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from MethodCallExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getResolvedCrateOrigin() diff --git a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getResolvedPath.expected b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getResolvedPath.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getResolvedPath.ql b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getResolvedPath.ql deleted file mode 100644 index df94686cbf6..00000000000 --- a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getResolvedPath.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from MethodCallExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getResolvedPath() diff --git a/rust/ql/test/extractor-tests/generated/Module/Cargo.lock b/rust/ql/test/extractor-tests/generated/Module/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Module/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/Module/Module.expected b/rust/ql/test/extractor-tests/generated/Module/Module.expected index 9383e08f281..a742b7145d3 100644 --- a/rust/ql/test/extractor-tests/generated/Module/Module.expected +++ b/rust/ql/test/extractor-tests/generated/Module/Module.expected @@ -1,3 +1,21 @@ -| gen_module.rs:3:1:4:8 | mod foo | hasExtendedCanonicalPath: | yes | hasCrateOrigin: | yes | hasAttributeMacroExpansion: | no | getNumberOfAttrs: | 0 | hasItemList: | no | hasName: | yes | hasVisibility: | no | -| gen_module.rs:5:1:7:1 | mod bar | hasExtendedCanonicalPath: | yes | hasCrateOrigin: | yes | hasAttributeMacroExpansion: | no | getNumberOfAttrs: | 0 | hasItemList: | yes | hasName: | yes | hasVisibility: | no | -| lib.rs:1:1:1:15 | mod gen_module | hasExtendedCanonicalPath: | yes | hasCrateOrigin: | yes | hasAttributeMacroExpansion: | no | getNumberOfAttrs: | 0 | hasItemList: | no | hasName: | yes | hasVisibility: | no | +instances +| gen_module.rs:3:1:4:8 | mod foo | +| gen_module.rs:5:1:7:1 | mod bar | +| lib.rs:1:1:1:15 | mod gen_module | +getExtendedCanonicalPath +| gen_module.rs:3:1:4:8 | mod foo | crate::gen_module::foo | +| gen_module.rs:5:1:7:1 | mod bar | crate::gen_module::bar | +| lib.rs:1:1:1:15 | mod gen_module | crate::gen_module | +getCrateOrigin +| gen_module.rs:3:1:4:8 | mod foo | repo::test | +| gen_module.rs:5:1:7:1 | mod bar | repo::test | +| lib.rs:1:1:1:15 | mod gen_module | repo::test | +getAttributeMacroExpansion +getAttr +getItemList +| gen_module.rs:5:1:7:1 | mod bar | gen_module.rs:5:9:7:1 | ItemList | +getName +| gen_module.rs:3:1:4:8 | mod foo | gen_module.rs:4:5:4:7 | foo | +| gen_module.rs:5:1:7:1 | mod bar | gen_module.rs:5:5:5:7 | bar | +| lib.rs:1:1:1:15 | mod gen_module | lib.rs:1:5:1:14 | gen_module | +getVisibility diff --git a/rust/ql/test/extractor-tests/generated/Module/Module.ql b/rust/ql/test/extractor-tests/generated/Module/Module.ql index bd668e40b66..48a141bbc1f 100644 --- a/rust/ql/test/extractor-tests/generated/Module/Module.ql +++ b/rust/ql/test/extractor-tests/generated/Module/Module.ql @@ -2,28 +2,34 @@ import codeql.rust.elements import TestUtils -from - Module x, string hasExtendedCanonicalPath, string hasCrateOrigin, - string hasAttributeMacroExpansion, int getNumberOfAttrs, string hasItemList, string hasName, - string hasVisibility -where +query predicate instances(Module x) { toBeTested(x) and not x.isUnknown() } + +query predicate getExtendedCanonicalPath(Module x, string getExtendedCanonicalPath) { + toBeTested(x) and not x.isUnknown() and getExtendedCanonicalPath = x.getExtendedCanonicalPath() +} + +query predicate getCrateOrigin(Module x, string getCrateOrigin) { + toBeTested(x) and not x.isUnknown() and getCrateOrigin = x.getCrateOrigin() +} + +query predicate getAttributeMacroExpansion(Module x, MacroItems getAttributeMacroExpansion) { toBeTested(x) and not x.isUnknown() and - ( - if x.hasExtendedCanonicalPath() - then hasExtendedCanonicalPath = "yes" - else hasExtendedCanonicalPath = "no" - ) and - (if x.hasCrateOrigin() then hasCrateOrigin = "yes" else hasCrateOrigin = "no") and - ( - if x.hasAttributeMacroExpansion() - then hasAttributeMacroExpansion = "yes" - else hasAttributeMacroExpansion = "no" - ) and - getNumberOfAttrs = x.getNumberOfAttrs() and - (if x.hasItemList() then hasItemList = "yes" else hasItemList = "no") and - (if x.hasName() then hasName = "yes" else hasName = "no") and - if x.hasVisibility() then hasVisibility = "yes" else hasVisibility = "no" -select x, "hasExtendedCanonicalPath:", hasExtendedCanonicalPath, "hasCrateOrigin:", hasCrateOrigin, - "hasAttributeMacroExpansion:", hasAttributeMacroExpansion, "getNumberOfAttrs:", getNumberOfAttrs, - "hasItemList:", hasItemList, "hasName:", hasName, "hasVisibility:", hasVisibility + getAttributeMacroExpansion = x.getAttributeMacroExpansion() +} + +query predicate getAttr(Module x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} + +query predicate getItemList(Module x, ItemList getItemList) { + toBeTested(x) and not x.isUnknown() and getItemList = x.getItemList() +} + +query predicate getName(Module x, Name getName) { + toBeTested(x) and not x.isUnknown() and getName = x.getName() +} + +query predicate getVisibility(Module x, Visibility getVisibility) { + toBeTested(x) and not x.isUnknown() and getVisibility = x.getVisibility() +} diff --git a/rust/ql/test/extractor-tests/generated/Module/Module_getAttr.expected b/rust/ql/test/extractor-tests/generated/Module/Module_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Module/Module_getAttr.ql b/rust/ql/test/extractor-tests/generated/Module/Module_getAttr.ql deleted file mode 100644 index 1efd9a937c3..00000000000 --- a/rust/ql/test/extractor-tests/generated/Module/Module_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Module x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/Module/Module_getAttributeMacroExpansion.expected b/rust/ql/test/extractor-tests/generated/Module/Module_getAttributeMacroExpansion.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Module/Module_getAttributeMacroExpansion.ql b/rust/ql/test/extractor-tests/generated/Module/Module_getAttributeMacroExpansion.ql deleted file mode 100644 index 1a7c70f63b6..00000000000 --- a/rust/ql/test/extractor-tests/generated/Module/Module_getAttributeMacroExpansion.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Module x -where toBeTested(x) and not x.isUnknown() -select x, x.getAttributeMacroExpansion() diff --git a/rust/ql/test/extractor-tests/generated/Module/Module_getCrateOrigin.expected b/rust/ql/test/extractor-tests/generated/Module/Module_getCrateOrigin.expected deleted file mode 100644 index 0164fbb8e29..00000000000 --- a/rust/ql/test/extractor-tests/generated/Module/Module_getCrateOrigin.expected +++ /dev/null @@ -1,3 +0,0 @@ -| gen_module.rs:3:1:4:8 | mod foo | repo::test | -| gen_module.rs:5:1:7:1 | mod bar | repo::test | -| lib.rs:1:1:1:15 | mod gen_module | repo::test | diff --git a/rust/ql/test/extractor-tests/generated/Module/Module_getCrateOrigin.ql b/rust/ql/test/extractor-tests/generated/Module/Module_getCrateOrigin.ql deleted file mode 100644 index 7a95cdcc772..00000000000 --- a/rust/ql/test/extractor-tests/generated/Module/Module_getCrateOrigin.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Module x -where toBeTested(x) and not x.isUnknown() -select x, x.getCrateOrigin() diff --git a/rust/ql/test/extractor-tests/generated/Module/Module_getExtendedCanonicalPath.expected b/rust/ql/test/extractor-tests/generated/Module/Module_getExtendedCanonicalPath.expected deleted file mode 100644 index c573ef164eb..00000000000 --- a/rust/ql/test/extractor-tests/generated/Module/Module_getExtendedCanonicalPath.expected +++ /dev/null @@ -1,3 +0,0 @@ -| gen_module.rs:3:1:4:8 | mod foo | crate::gen_module::foo | -| gen_module.rs:5:1:7:1 | mod bar | crate::gen_module::bar | -| lib.rs:1:1:1:15 | mod gen_module | crate::gen_module | diff --git a/rust/ql/test/extractor-tests/generated/Module/Module_getExtendedCanonicalPath.ql b/rust/ql/test/extractor-tests/generated/Module/Module_getExtendedCanonicalPath.ql deleted file mode 100644 index 9c810fe65c6..00000000000 --- a/rust/ql/test/extractor-tests/generated/Module/Module_getExtendedCanonicalPath.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Module x -where toBeTested(x) and not x.isUnknown() -select x, x.getExtendedCanonicalPath() diff --git a/rust/ql/test/extractor-tests/generated/Module/Module_getItemList.expected b/rust/ql/test/extractor-tests/generated/Module/Module_getItemList.expected deleted file mode 100644 index 8edc36efa73..00000000000 --- a/rust/ql/test/extractor-tests/generated/Module/Module_getItemList.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_module.rs:5:1:7:1 | mod bar | gen_module.rs:5:9:7:1 | ItemList | diff --git a/rust/ql/test/extractor-tests/generated/Module/Module_getItemList.ql b/rust/ql/test/extractor-tests/generated/Module/Module_getItemList.ql deleted file mode 100644 index 0654df37918..00000000000 --- a/rust/ql/test/extractor-tests/generated/Module/Module_getItemList.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Module x -where toBeTested(x) and not x.isUnknown() -select x, x.getItemList() diff --git a/rust/ql/test/extractor-tests/generated/Module/Module_getName.expected b/rust/ql/test/extractor-tests/generated/Module/Module_getName.expected deleted file mode 100644 index 1874862befe..00000000000 --- a/rust/ql/test/extractor-tests/generated/Module/Module_getName.expected +++ /dev/null @@ -1,3 +0,0 @@ -| gen_module.rs:3:1:4:8 | mod foo | gen_module.rs:4:5:4:7 | foo | -| gen_module.rs:5:1:7:1 | mod bar | gen_module.rs:5:5:5:7 | bar | -| lib.rs:1:1:1:15 | mod gen_module | lib.rs:1:5:1:14 | gen_module | diff --git a/rust/ql/test/extractor-tests/generated/Module/Module_getName.ql b/rust/ql/test/extractor-tests/generated/Module/Module_getName.ql deleted file mode 100644 index dbda0724b1e..00000000000 --- a/rust/ql/test/extractor-tests/generated/Module/Module_getName.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Module x -where toBeTested(x) and not x.isUnknown() -select x, x.getName() diff --git a/rust/ql/test/extractor-tests/generated/Module/Module_getVisibility.expected b/rust/ql/test/extractor-tests/generated/Module/Module_getVisibility.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Module/Module_getVisibility.ql b/rust/ql/test/extractor-tests/generated/Module/Module_getVisibility.ql deleted file mode 100644 index 064f520d6a7..00000000000 --- a/rust/ql/test/extractor-tests/generated/Module/Module_getVisibility.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Module x -where toBeTested(x) and not x.isUnknown() -select x, x.getVisibility() diff --git a/rust/ql/test/extractor-tests/generated/Name/Cargo.lock b/rust/ql/test/extractor-tests/generated/Name/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Name/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/Name/Name.expected b/rust/ql/test/extractor-tests/generated/Name/Name.expected index 28a23a6d392..2bcd496ef2e 100644 --- a/rust/ql/test/extractor-tests/generated/Name/Name.expected +++ b/rust/ql/test/extractor-tests/generated/Name/Name.expected @@ -1,3 +1,8 @@ -| gen_name.rs:3:4:3:12 | test_name | hasText: | yes | -| gen_name.rs:7:9:7:11 | foo | hasText: | yes | -| lib.rs:1:5:1:12 | gen_name | hasText: | yes | +instances +| gen_name.rs:3:4:3:12 | test_name | +| gen_name.rs:7:9:7:11 | foo | +| lib.rs:1:5:1:12 | gen_name | +getText +| gen_name.rs:3:4:3:12 | test_name | test_name | +| gen_name.rs:7:9:7:11 | foo | foo | +| lib.rs:1:5:1:12 | gen_name | gen_name | diff --git a/rust/ql/test/extractor-tests/generated/Name/Name.ql b/rust/ql/test/extractor-tests/generated/Name/Name.ql index 6685f4f9b7a..141042ac6a8 100644 --- a/rust/ql/test/extractor-tests/generated/Name/Name.ql +++ b/rust/ql/test/extractor-tests/generated/Name/Name.ql @@ -2,9 +2,8 @@ import codeql.rust.elements import TestUtils -from Name x, string hasText -where - toBeTested(x) and - not x.isUnknown() and - if x.hasText() then hasText = "yes" else hasText = "no" -select x, "hasText:", hasText +query predicate instances(Name x) { toBeTested(x) and not x.isUnknown() } + +query predicate getText(Name x, string getText) { + toBeTested(x) and not x.isUnknown() and getText = x.getText() +} diff --git a/rust/ql/test/extractor-tests/generated/Name/Name_getText.expected b/rust/ql/test/extractor-tests/generated/Name/Name_getText.expected deleted file mode 100644 index 3098a78003b..00000000000 --- a/rust/ql/test/extractor-tests/generated/Name/Name_getText.expected +++ /dev/null @@ -1,3 +0,0 @@ -| gen_name.rs:3:4:3:12 | test_name | test_name | -| gen_name.rs:7:9:7:11 | foo | foo | -| lib.rs:1:5:1:12 | gen_name | gen_name | diff --git a/rust/ql/test/extractor-tests/generated/Name/Name_getText.ql b/rust/ql/test/extractor-tests/generated/Name/Name_getText.ql deleted file mode 100644 index 90ff2d3e04b..00000000000 --- a/rust/ql/test/extractor-tests/generated/Name/Name_getText.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Name x -where toBeTested(x) and not x.isUnknown() -select x, x.getText() diff --git a/rust/ql/test/extractor-tests/generated/NameRef/Cargo.lock b/rust/ql/test/extractor-tests/generated/NameRef/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/NameRef/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/NameRef/NameRef.expected b/rust/ql/test/extractor-tests/generated/NameRef/NameRef.expected index a73f8a02945..a77dc575a77 100644 --- a/rust/ql/test/extractor-tests/generated/NameRef/NameRef.expected +++ b/rust/ql/test/extractor-tests/generated/NameRef/NameRef.expected @@ -1 +1,4 @@ -| gen_name_ref.rs:7:7:7:9 | foo | hasText: | yes | +instances +| gen_name_ref.rs:7:7:7:9 | foo | +getText +| gen_name_ref.rs:7:7:7:9 | foo | foo | diff --git a/rust/ql/test/extractor-tests/generated/NameRef/NameRef.ql b/rust/ql/test/extractor-tests/generated/NameRef/NameRef.ql index cb5ab8652f8..00af6f1dbcf 100644 --- a/rust/ql/test/extractor-tests/generated/NameRef/NameRef.ql +++ b/rust/ql/test/extractor-tests/generated/NameRef/NameRef.ql @@ -2,9 +2,8 @@ import codeql.rust.elements import TestUtils -from NameRef x, string hasText -where - toBeTested(x) and - not x.isUnknown() and - if x.hasText() then hasText = "yes" else hasText = "no" -select x, "hasText:", hasText +query predicate instances(NameRef x) { toBeTested(x) and not x.isUnknown() } + +query predicate getText(NameRef x, string getText) { + toBeTested(x) and not x.isUnknown() and getText = x.getText() +} diff --git a/rust/ql/test/extractor-tests/generated/NameRef/NameRef_getText.expected b/rust/ql/test/extractor-tests/generated/NameRef/NameRef_getText.expected deleted file mode 100644 index 1b98842e5ec..00000000000 --- a/rust/ql/test/extractor-tests/generated/NameRef/NameRef_getText.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_name_ref.rs:7:7:7:9 | foo | foo | diff --git a/rust/ql/test/extractor-tests/generated/NameRef/NameRef_getText.ql b/rust/ql/test/extractor-tests/generated/NameRef/NameRef_getText.ql deleted file mode 100644 index daa44134dca..00000000000 --- a/rust/ql/test/extractor-tests/generated/NameRef/NameRef_getText.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from NameRef x -where toBeTested(x) and not x.isUnknown() -select x, x.getText() diff --git a/rust/ql/test/extractor-tests/generated/NeverTypeRepr/Cargo.lock b/rust/ql/test/extractor-tests/generated/NeverTypeRepr/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/NeverTypeRepr/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/NeverTypeRepr/NeverTypeRepr.ql b/rust/ql/test/extractor-tests/generated/NeverTypeRepr/NeverTypeRepr.ql index 71ab05928df..0cdfe366eed 100644 --- a/rust/ql/test/extractor-tests/generated/NeverTypeRepr/NeverTypeRepr.ql +++ b/rust/ql/test/extractor-tests/generated/NeverTypeRepr/NeverTypeRepr.ql @@ -2,6 +2,4 @@ import codeql.rust.elements import TestUtils -from NeverTypeRepr x -where toBeTested(x) and not x.isUnknown() -select x +query predicate instances(NeverTypeRepr x) { toBeTested(x) and not x.isUnknown() } diff --git a/rust/ql/test/extractor-tests/generated/OffsetOfExpr/Cargo.lock b/rust/ql/test/extractor-tests/generated/OffsetOfExpr/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/OffsetOfExpr/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr.expected b/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr.expected index 4f8705ab0da..eb8b19babfe 100644 --- a/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr.expected +++ b/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr.expected @@ -1 +1,7 @@ -| gen_offset_of_expr.rs:5:5:5:38 | OffsetOfExpr | getNumberOfAttrs: | 0 | getNumberOfFields: | 1 | hasTypeRepr: | yes | +instances +| gen_offset_of_expr.rs:5:5:5:38 | OffsetOfExpr | +getAttr +getField +| gen_offset_of_expr.rs:5:5:5:38 | OffsetOfExpr | 0 | gen_offset_of_expr.rs:5:33:5:37 | field | +getTypeRepr +| gen_offset_of_expr.rs:5:5:5:38 | OffsetOfExpr | gen_offset_of_expr.rs:5:25:5:30 | Struct | diff --git a/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr.ql b/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr.ql index afcd0de84df..64208e34bbf 100644 --- a/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr.ql +++ b/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr.ql @@ -2,12 +2,16 @@ import codeql.rust.elements import TestUtils -from OffsetOfExpr x, int getNumberOfAttrs, int getNumberOfFields, string hasTypeRepr -where - toBeTested(x) and - not x.isUnknown() and - getNumberOfAttrs = x.getNumberOfAttrs() and - getNumberOfFields = x.getNumberOfFields() and - if x.hasTypeRepr() then hasTypeRepr = "yes" else hasTypeRepr = "no" -select x, "getNumberOfAttrs:", getNumberOfAttrs, "getNumberOfFields:", getNumberOfFields, - "hasTypeRepr:", hasTypeRepr +query predicate instances(OffsetOfExpr x) { toBeTested(x) and not x.isUnknown() } + +query predicate getAttr(OffsetOfExpr x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} + +query predicate getField(OffsetOfExpr x, int index, NameRef getField) { + toBeTested(x) and not x.isUnknown() and getField = x.getField(index) +} + +query predicate getTypeRepr(OffsetOfExpr x, TypeRepr getTypeRepr) { + toBeTested(x) and not x.isUnknown() and getTypeRepr = x.getTypeRepr() +} diff --git a/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getAttr.ql deleted file mode 100644 index c038e83f2f5..00000000000 --- a/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from OffsetOfExpr x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getField.expected b/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getField.expected deleted file mode 100644 index bec224d18ce..00000000000 --- a/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getField.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_offset_of_expr.rs:5:5:5:38 | OffsetOfExpr | 0 | gen_offset_of_expr.rs:5:33:5:37 | field | diff --git a/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getField.ql b/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getField.ql deleted file mode 100644 index c5b41700f64..00000000000 --- a/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getField.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from OffsetOfExpr x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getField(index) diff --git a/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getTypeRepr.expected b/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getTypeRepr.expected deleted file mode 100644 index e2e11abb6a0..00000000000 --- a/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getTypeRepr.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_offset_of_expr.rs:5:5:5:38 | OffsetOfExpr | gen_offset_of_expr.rs:5:25:5:30 | Struct | diff --git a/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getTypeRepr.ql b/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getTypeRepr.ql deleted file mode 100644 index 5f2a647d807..00000000000 --- a/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getTypeRepr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from OffsetOfExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getTypeRepr() diff --git a/rust/ql/test/extractor-tests/generated/OrPat/Cargo.lock b/rust/ql/test/extractor-tests/generated/OrPat/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/OrPat/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/OrPat/OrPat.expected b/rust/ql/test/extractor-tests/generated/OrPat/OrPat.expected index 1d67a8509b9..8dcc1baa8d5 100644 --- a/rust/ql/test/extractor-tests/generated/OrPat/OrPat.expected +++ b/rust/ql/test/extractor-tests/generated/OrPat/OrPat.expected @@ -1 +1,5 @@ -| gen_or_pat.rs:6:9:6:38 | ... \| ...::None | getNumberOfPats: | 2 | +instances +| gen_or_pat.rs:6:9:6:38 | ... \| ...::None | +getPat +| gen_or_pat.rs:6:9:6:38 | ... \| ...::None | 0 | gen_or_pat.rs:6:9:6:23 | ...::Some(...) | +| gen_or_pat.rs:6:9:6:38 | ... \| ...::None | 1 | gen_or_pat.rs:6:27:6:38 | ...::None | diff --git a/rust/ql/test/extractor-tests/generated/OrPat/OrPat.ql b/rust/ql/test/extractor-tests/generated/OrPat/OrPat.ql index 11b3bb7394c..0c60f19278f 100644 --- a/rust/ql/test/extractor-tests/generated/OrPat/OrPat.ql +++ b/rust/ql/test/extractor-tests/generated/OrPat/OrPat.ql @@ -2,9 +2,8 @@ import codeql.rust.elements import TestUtils -from OrPat x, int getNumberOfPats -where - toBeTested(x) and - not x.isUnknown() and - getNumberOfPats = x.getNumberOfPats() -select x, "getNumberOfPats:", getNumberOfPats +query predicate instances(OrPat x) { toBeTested(x) and not x.isUnknown() } + +query predicate getPat(OrPat x, int index, Pat getPat) { + toBeTested(x) and not x.isUnknown() and getPat = x.getPat(index) +} diff --git a/rust/ql/test/extractor-tests/generated/OrPat/OrPat_getPat.expected b/rust/ql/test/extractor-tests/generated/OrPat/OrPat_getPat.expected deleted file mode 100644 index 9e50c27e035..00000000000 --- a/rust/ql/test/extractor-tests/generated/OrPat/OrPat_getPat.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_or_pat.rs:6:9:6:38 | ... \| ...::None | 0 | gen_or_pat.rs:6:9:6:23 | ...::Some(...) | -| gen_or_pat.rs:6:9:6:38 | ... \| ...::None | 1 | gen_or_pat.rs:6:27:6:38 | ...::None | diff --git a/rust/ql/test/extractor-tests/generated/OrPat/OrPat_getPat.ql b/rust/ql/test/extractor-tests/generated/OrPat/OrPat_getPat.ql deleted file mode 100644 index 468619511dd..00000000000 --- a/rust/ql/test/extractor-tests/generated/OrPat/OrPat_getPat.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from OrPat x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getPat(index) diff --git a/rust/ql/test/extractor-tests/generated/Param/Cargo.lock b/rust/ql/test/extractor-tests/generated/Param/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Param/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/Param/Param.expected b/rust/ql/test/extractor-tests/generated/Param/Param.expected index c8218bdaec5..929e72c51fb 100644 --- a/rust/ql/test/extractor-tests/generated/Param/Param.expected +++ b/rust/ql/test/extractor-tests/generated/Param/Param.expected @@ -1 +1,7 @@ -| gen_param.rs:5:12:5:15 | ...: T | getNumberOfAttrs: | 0 | hasTypeRepr: | yes | hasPat: | yes | +instances +| gen_param.rs:5:12:5:15 | ...: T | +getAttr +getTypeRepr +| gen_param.rs:5:12:5:15 | ...: T | gen_param.rs:5:15:5:15 | T | +getPat +| gen_param.rs:5:12:5:15 | ...: T | gen_param.rs:5:12:5:12 | x | diff --git a/rust/ql/test/extractor-tests/generated/Param/Param.ql b/rust/ql/test/extractor-tests/generated/Param/Param.ql index c471f2aeb39..ff1a261ef04 100644 --- a/rust/ql/test/extractor-tests/generated/Param/Param.ql +++ b/rust/ql/test/extractor-tests/generated/Param/Param.ql @@ -2,11 +2,16 @@ import codeql.rust.elements import TestUtils -from Param x, int getNumberOfAttrs, string hasTypeRepr, string hasPat -where - toBeTested(x) and - not x.isUnknown() and - getNumberOfAttrs = x.getNumberOfAttrs() and - (if x.hasTypeRepr() then hasTypeRepr = "yes" else hasTypeRepr = "no") and - if x.hasPat() then hasPat = "yes" else hasPat = "no" -select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasTypeRepr:", hasTypeRepr, "hasPat:", hasPat +query predicate instances(Param x) { toBeTested(x) and not x.isUnknown() } + +query predicate getAttr(Param x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} + +query predicate getTypeRepr(Param x, TypeRepr getTypeRepr) { + toBeTested(x) and not x.isUnknown() and getTypeRepr = x.getTypeRepr() +} + +query predicate getPat(Param x, Pat getPat) { + toBeTested(x) and not x.isUnknown() and getPat = x.getPat() +} diff --git a/rust/ql/test/extractor-tests/generated/Param/Param_getAttr.expected b/rust/ql/test/extractor-tests/generated/Param/Param_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Param/Param_getAttr.ql b/rust/ql/test/extractor-tests/generated/Param/Param_getAttr.ql deleted file mode 100644 index 72c78863531..00000000000 --- a/rust/ql/test/extractor-tests/generated/Param/Param_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Param x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/Param/Param_getPat.expected b/rust/ql/test/extractor-tests/generated/Param/Param_getPat.expected deleted file mode 100644 index c42d7ce0b9f..00000000000 --- a/rust/ql/test/extractor-tests/generated/Param/Param_getPat.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_param.rs:5:12:5:15 | ...: T | gen_param.rs:5:12:5:12 | x | diff --git a/rust/ql/test/extractor-tests/generated/Param/Param_getPat.ql b/rust/ql/test/extractor-tests/generated/Param/Param_getPat.ql deleted file mode 100644 index 5e8e11356c7..00000000000 --- a/rust/ql/test/extractor-tests/generated/Param/Param_getPat.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Param x -where toBeTested(x) and not x.isUnknown() -select x, x.getPat() diff --git a/rust/ql/test/extractor-tests/generated/Param/Param_getTypeRepr.expected b/rust/ql/test/extractor-tests/generated/Param/Param_getTypeRepr.expected deleted file mode 100644 index 10bf906af5d..00000000000 --- a/rust/ql/test/extractor-tests/generated/Param/Param_getTypeRepr.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_param.rs:5:12:5:15 | ...: T | gen_param.rs:5:15:5:15 | T | diff --git a/rust/ql/test/extractor-tests/generated/Param/Param_getTypeRepr.ql b/rust/ql/test/extractor-tests/generated/Param/Param_getTypeRepr.ql deleted file mode 100644 index 0e03e4b5118..00000000000 --- a/rust/ql/test/extractor-tests/generated/Param/Param_getTypeRepr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Param x -where toBeTested(x) and not x.isUnknown() -select x, x.getTypeRepr() diff --git a/rust/ql/test/extractor-tests/generated/ParamList/Cargo.lock b/rust/ql/test/extractor-tests/generated/ParamList/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ParamList/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/ParamList/ParamList.expected b/rust/ql/test/extractor-tests/generated/ParamList/ParamList.expected index bb999506a0c..5b95cf48ca8 100644 --- a/rust/ql/test/extractor-tests/generated/ParamList/ParamList.expected +++ b/rust/ql/test/extractor-tests/generated/ParamList/ParamList.expected @@ -1,2 +1,7 @@ -| gen_param_list.rs:3:19:3:20 | ParamList | getNumberOfParams: | 0 | hasSelfParam: | no | -| gen_param_list.rs:7:11:7:26 | ParamList | getNumberOfParams: | 2 | hasSelfParam: | no | +instances +| gen_param_list.rs:3:19:3:20 | ParamList | +| gen_param_list.rs:7:11:7:26 | ParamList | +getParam +| gen_param_list.rs:7:11:7:26 | ParamList | 0 | gen_param_list.rs:7:12:7:17 | ...: i32 | +| gen_param_list.rs:7:11:7:26 | ParamList | 1 | gen_param_list.rs:7:20:7:25 | ...: i32 | +getSelfParam diff --git a/rust/ql/test/extractor-tests/generated/ParamList/ParamList.ql b/rust/ql/test/extractor-tests/generated/ParamList/ParamList.ql index 9e65fbf7f7f..36af8b9eafa 100644 --- a/rust/ql/test/extractor-tests/generated/ParamList/ParamList.ql +++ b/rust/ql/test/extractor-tests/generated/ParamList/ParamList.ql @@ -2,10 +2,12 @@ import codeql.rust.elements import TestUtils -from ParamList x, int getNumberOfParams, string hasSelfParam -where - toBeTested(x) and - not x.isUnknown() and - getNumberOfParams = x.getNumberOfParams() and - if x.hasSelfParam() then hasSelfParam = "yes" else hasSelfParam = "no" -select x, "getNumberOfParams:", getNumberOfParams, "hasSelfParam:", hasSelfParam +query predicate instances(ParamList x) { toBeTested(x) and not x.isUnknown() } + +query predicate getParam(ParamList x, int index, Param getParam) { + toBeTested(x) and not x.isUnknown() and getParam = x.getParam(index) +} + +query predicate getSelfParam(ParamList x, SelfParam getSelfParam) { + toBeTested(x) and not x.isUnknown() and getSelfParam = x.getSelfParam() +} diff --git a/rust/ql/test/extractor-tests/generated/ParamList/ParamList_getParam.expected b/rust/ql/test/extractor-tests/generated/ParamList/ParamList_getParam.expected deleted file mode 100644 index 9006caf6916..00000000000 --- a/rust/ql/test/extractor-tests/generated/ParamList/ParamList_getParam.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_param_list.rs:7:11:7:26 | ParamList | 0 | gen_param_list.rs:7:12:7:17 | ...: i32 | -| gen_param_list.rs:7:11:7:26 | ParamList | 1 | gen_param_list.rs:7:20:7:25 | ...: i32 | diff --git a/rust/ql/test/extractor-tests/generated/ParamList/ParamList_getParam.ql b/rust/ql/test/extractor-tests/generated/ParamList/ParamList_getParam.ql deleted file mode 100644 index d0a24b09409..00000000000 --- a/rust/ql/test/extractor-tests/generated/ParamList/ParamList_getParam.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from ParamList x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getParam(index) diff --git a/rust/ql/test/extractor-tests/generated/ParamList/ParamList_getSelfParam.expected b/rust/ql/test/extractor-tests/generated/ParamList/ParamList_getSelfParam.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/ParamList/ParamList_getSelfParam.ql b/rust/ql/test/extractor-tests/generated/ParamList/ParamList_getSelfParam.ql deleted file mode 100644 index bdd98b434d7..00000000000 --- a/rust/ql/test/extractor-tests/generated/ParamList/ParamList_getSelfParam.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from ParamList x -where toBeTested(x) and not x.isUnknown() -select x, x.getSelfParam() diff --git a/rust/ql/test/extractor-tests/generated/ParenExpr/Cargo.lock b/rust/ql/test/extractor-tests/generated/ParenExpr/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ParenExpr/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/ParenExpr/ParenExpr.expected b/rust/ql/test/extractor-tests/generated/ParenExpr/ParenExpr.expected index efe22fdb625..57a89a35cde 100644 --- a/rust/ql/test/extractor-tests/generated/ParenExpr/ParenExpr.expected +++ b/rust/ql/test/extractor-tests/generated/ParenExpr/ParenExpr.expected @@ -1 +1,5 @@ -| gen_paren_expr.rs:7:5:7:11 | (...) | getNumberOfAttrs: | 0 | hasExpr: | yes | +instances +| gen_paren_expr.rs:7:5:7:11 | (...) | +getAttr +getExpr +| gen_paren_expr.rs:7:5:7:11 | (...) | gen_paren_expr.rs:7:6:7:10 | ... + ... | diff --git a/rust/ql/test/extractor-tests/generated/ParenExpr/ParenExpr.ql b/rust/ql/test/extractor-tests/generated/ParenExpr/ParenExpr.ql index 114bf888239..1074fc3cd00 100644 --- a/rust/ql/test/extractor-tests/generated/ParenExpr/ParenExpr.ql +++ b/rust/ql/test/extractor-tests/generated/ParenExpr/ParenExpr.ql @@ -2,10 +2,12 @@ import codeql.rust.elements import TestUtils -from ParenExpr x, int getNumberOfAttrs, string hasExpr -where - toBeTested(x) and - not x.isUnknown() and - getNumberOfAttrs = x.getNumberOfAttrs() and - if x.hasExpr() then hasExpr = "yes" else hasExpr = "no" -select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasExpr:", hasExpr +query predicate instances(ParenExpr x) { toBeTested(x) and not x.isUnknown() } + +query predicate getAttr(ParenExpr x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} + +query predicate getExpr(ParenExpr x, Expr getExpr) { + toBeTested(x) and not x.isUnknown() and getExpr = x.getExpr() +} diff --git a/rust/ql/test/extractor-tests/generated/ParenExpr/ParenExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/ParenExpr/ParenExpr_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/ParenExpr/ParenExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/ParenExpr/ParenExpr_getAttr.ql deleted file mode 100644 index c2352453b9a..00000000000 --- a/rust/ql/test/extractor-tests/generated/ParenExpr/ParenExpr_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from ParenExpr x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/ParenExpr/ParenExpr_getExpr.expected b/rust/ql/test/extractor-tests/generated/ParenExpr/ParenExpr_getExpr.expected deleted file mode 100644 index c20c0ec66fa..00000000000 --- a/rust/ql/test/extractor-tests/generated/ParenExpr/ParenExpr_getExpr.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_paren_expr.rs:7:5:7:11 | (...) | gen_paren_expr.rs:7:6:7:10 | ... + ... | diff --git a/rust/ql/test/extractor-tests/generated/ParenExpr/ParenExpr_getExpr.ql b/rust/ql/test/extractor-tests/generated/ParenExpr/ParenExpr_getExpr.ql deleted file mode 100644 index c8a007478c3..00000000000 --- a/rust/ql/test/extractor-tests/generated/ParenExpr/ParenExpr_getExpr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from ParenExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getExpr() diff --git a/rust/ql/test/extractor-tests/generated/ParenPat/Cargo.lock b/rust/ql/test/extractor-tests/generated/ParenPat/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ParenPat/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/ParenPat/ParenPat.expected b/rust/ql/test/extractor-tests/generated/ParenPat/ParenPat.expected index 7b9b66a886d..2e26da6da78 100644 --- a/rust/ql/test/extractor-tests/generated/ParenPat/ParenPat.expected +++ b/rust/ql/test/extractor-tests/generated/ParenPat/ParenPat.expected @@ -1 +1,4 @@ -| gen_paren_pat.rs:7:9:7:11 | (...) | hasPat: | yes | +instances +| gen_paren_pat.rs:7:9:7:11 | (...) | +getPat +| gen_paren_pat.rs:7:9:7:11 | (...) | gen_paren_pat.rs:7:10:7:10 | x | diff --git a/rust/ql/test/extractor-tests/generated/ParenPat/ParenPat.ql b/rust/ql/test/extractor-tests/generated/ParenPat/ParenPat.ql index bf9724edde3..18b7c74b94b 100644 --- a/rust/ql/test/extractor-tests/generated/ParenPat/ParenPat.ql +++ b/rust/ql/test/extractor-tests/generated/ParenPat/ParenPat.ql @@ -2,9 +2,8 @@ import codeql.rust.elements import TestUtils -from ParenPat x, string hasPat -where - toBeTested(x) and - not x.isUnknown() and - if x.hasPat() then hasPat = "yes" else hasPat = "no" -select x, "hasPat:", hasPat +query predicate instances(ParenPat x) { toBeTested(x) and not x.isUnknown() } + +query predicate getPat(ParenPat x, Pat getPat) { + toBeTested(x) and not x.isUnknown() and getPat = x.getPat() +} diff --git a/rust/ql/test/extractor-tests/generated/ParenPat/ParenPat_getPat.expected b/rust/ql/test/extractor-tests/generated/ParenPat/ParenPat_getPat.expected deleted file mode 100644 index 832d823866f..00000000000 --- a/rust/ql/test/extractor-tests/generated/ParenPat/ParenPat_getPat.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_paren_pat.rs:7:9:7:11 | (...) | gen_paren_pat.rs:7:10:7:10 | x | diff --git a/rust/ql/test/extractor-tests/generated/ParenPat/ParenPat_getPat.ql b/rust/ql/test/extractor-tests/generated/ParenPat/ParenPat_getPat.ql deleted file mode 100644 index 648fbfd9df0..00000000000 --- a/rust/ql/test/extractor-tests/generated/ParenPat/ParenPat_getPat.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from ParenPat x -where toBeTested(x) and not x.isUnknown() -select x, x.getPat() diff --git a/rust/ql/test/extractor-tests/generated/ParenTypeRepr/Cargo.lock b/rust/ql/test/extractor-tests/generated/ParenTypeRepr/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ParenTypeRepr/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/ParenTypeRepr/ParenTypeRepr.expected b/rust/ql/test/extractor-tests/generated/ParenTypeRepr/ParenTypeRepr.expected index fd5d8310d17..1e77f93912f 100644 --- a/rust/ql/test/extractor-tests/generated/ParenTypeRepr/ParenTypeRepr.expected +++ b/rust/ql/test/extractor-tests/generated/ParenTypeRepr/ParenTypeRepr.expected @@ -1 +1,4 @@ -| gen_paren_type_repr.rs:7:12:7:16 | (i32) | hasTypeRepr: | yes | +instances +| gen_paren_type_repr.rs:7:12:7:16 | (i32) | +getTypeRepr +| gen_paren_type_repr.rs:7:12:7:16 | (i32) | gen_paren_type_repr.rs:7:13:7:15 | i32 | diff --git a/rust/ql/test/extractor-tests/generated/ParenTypeRepr/ParenTypeRepr.ql b/rust/ql/test/extractor-tests/generated/ParenTypeRepr/ParenTypeRepr.ql index 83a4f846add..8df81166aa5 100644 --- a/rust/ql/test/extractor-tests/generated/ParenTypeRepr/ParenTypeRepr.ql +++ b/rust/ql/test/extractor-tests/generated/ParenTypeRepr/ParenTypeRepr.ql @@ -2,9 +2,8 @@ import codeql.rust.elements import TestUtils -from ParenTypeRepr x, string hasTypeRepr -where - toBeTested(x) and - not x.isUnknown() and - if x.hasTypeRepr() then hasTypeRepr = "yes" else hasTypeRepr = "no" -select x, "hasTypeRepr:", hasTypeRepr +query predicate instances(ParenTypeRepr x) { toBeTested(x) and not x.isUnknown() } + +query predicate getTypeRepr(ParenTypeRepr x, TypeRepr getTypeRepr) { + toBeTested(x) and not x.isUnknown() and getTypeRepr = x.getTypeRepr() +} diff --git a/rust/ql/test/extractor-tests/generated/ParenTypeRepr/ParenTypeRepr_getTypeRepr.expected b/rust/ql/test/extractor-tests/generated/ParenTypeRepr/ParenTypeRepr_getTypeRepr.expected deleted file mode 100644 index b4167e4201a..00000000000 --- a/rust/ql/test/extractor-tests/generated/ParenTypeRepr/ParenTypeRepr_getTypeRepr.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_paren_type_repr.rs:7:12:7:16 | (i32) | gen_paren_type_repr.rs:7:13:7:15 | i32 | diff --git a/rust/ql/test/extractor-tests/generated/ParenTypeRepr/ParenTypeRepr_getTypeRepr.ql b/rust/ql/test/extractor-tests/generated/ParenTypeRepr/ParenTypeRepr_getTypeRepr.ql deleted file mode 100644 index 2b3a274fc08..00000000000 --- a/rust/ql/test/extractor-tests/generated/ParenTypeRepr/ParenTypeRepr_getTypeRepr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from ParenTypeRepr x -where toBeTested(x) and not x.isUnknown() -select x, x.getTypeRepr() diff --git a/rust/ql/test/extractor-tests/generated/ParenthesizedArgList/Cargo.lock b/rust/ql/test/extractor-tests/generated/ParenthesizedArgList/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ParenthesizedArgList/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/ParenthesizedArgList/ParenthesizedArgList.expected b/rust/ql/test/extractor-tests/generated/ParenthesizedArgList/ParenthesizedArgList.expected index 317d43de72d..b787bde1ae2 100644 --- a/rust/ql/test/extractor-tests/generated/ParenthesizedArgList/ParenthesizedArgList.expected +++ b/rust/ql/test/extractor-tests/generated/ParenthesizedArgList/ParenthesizedArgList.expected @@ -1 +1,5 @@ -| gen_parenthesized_arg_list.rs:9:14:9:26 | ParenthesizedArgList | getNumberOfTypeArgs: | 2 | +instances +| gen_parenthesized_arg_list.rs:9:14:9:26 | ParenthesizedArgList | +getTypeArg +| gen_parenthesized_arg_list.rs:9:14:9:26 | ParenthesizedArgList | 0 | gen_parenthesized_arg_list.rs:9:15:9:17 | TypeArg | +| gen_parenthesized_arg_list.rs:9:14:9:26 | ParenthesizedArgList | 1 | gen_parenthesized_arg_list.rs:9:20:9:25 | TypeArg | diff --git a/rust/ql/test/extractor-tests/generated/ParenthesizedArgList/ParenthesizedArgList.ql b/rust/ql/test/extractor-tests/generated/ParenthesizedArgList/ParenthesizedArgList.ql index 73080b26f2d..b35858d3ad0 100644 --- a/rust/ql/test/extractor-tests/generated/ParenthesizedArgList/ParenthesizedArgList.ql +++ b/rust/ql/test/extractor-tests/generated/ParenthesizedArgList/ParenthesizedArgList.ql @@ -2,9 +2,8 @@ import codeql.rust.elements import TestUtils -from ParenthesizedArgList x, int getNumberOfTypeArgs -where - toBeTested(x) and - not x.isUnknown() and - getNumberOfTypeArgs = x.getNumberOfTypeArgs() -select x, "getNumberOfTypeArgs:", getNumberOfTypeArgs +query predicate instances(ParenthesizedArgList x) { toBeTested(x) and not x.isUnknown() } + +query predicate getTypeArg(ParenthesizedArgList x, int index, TypeArg getTypeArg) { + toBeTested(x) and not x.isUnknown() and getTypeArg = x.getTypeArg(index) +} diff --git a/rust/ql/test/extractor-tests/generated/ParenthesizedArgList/ParenthesizedArgList_getTypeArg.expected b/rust/ql/test/extractor-tests/generated/ParenthesizedArgList/ParenthesizedArgList_getTypeArg.expected deleted file mode 100644 index 8ae7aa526d3..00000000000 --- a/rust/ql/test/extractor-tests/generated/ParenthesizedArgList/ParenthesizedArgList_getTypeArg.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_parenthesized_arg_list.rs:9:14:9:26 | ParenthesizedArgList | 0 | gen_parenthesized_arg_list.rs:9:15:9:17 | TypeArg | -| gen_parenthesized_arg_list.rs:9:14:9:26 | ParenthesizedArgList | 1 | gen_parenthesized_arg_list.rs:9:20:9:25 | TypeArg | diff --git a/rust/ql/test/extractor-tests/generated/ParenthesizedArgList/ParenthesizedArgList_getTypeArg.ql b/rust/ql/test/extractor-tests/generated/ParenthesizedArgList/ParenthesizedArgList_getTypeArg.ql deleted file mode 100644 index 04247f8ff64..00000000000 --- a/rust/ql/test/extractor-tests/generated/ParenthesizedArgList/ParenthesizedArgList_getTypeArg.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from ParenthesizedArgList x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getTypeArg(index) diff --git a/rust/ql/test/extractor-tests/generated/Path/Cargo.lock b/rust/ql/test/extractor-tests/generated/Path/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Path/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/Path/Path.expected b/rust/ql/test/extractor-tests/generated/Path/Path.expected index 7cf8362293e..e188cc32fec 100644 --- a/rust/ql/test/extractor-tests/generated/Path/Path.expected +++ b/rust/ql/test/extractor-tests/generated/Path/Path.expected @@ -1,25 +1,63 @@ -| gen_path.rs:5:9:5:18 | some_crate | hasQualifier: | no | hasSegment: | yes | -| gen_path.rs:5:9:5:31 | ...::some_module | hasQualifier: | yes | hasSegment: | yes | -| gen_path.rs:5:9:5:42 | ...::some_item | hasQualifier: | yes | hasSegment: | yes | -| gen_path.rs:6:5:6:7 | foo | hasQualifier: | no | hasSegment: | yes | -| gen_path.rs:6:5:6:12 | ...::bar | hasQualifier: | yes | hasSegment: | yes | -| gen_path_expr.rs:5:13:5:20 | variable | hasQualifier: | no | hasSegment: | yes | -| gen_path_expr.rs:6:13:6:15 | foo | hasQualifier: | no | hasSegment: | yes | -| gen_path_expr.rs:6:13:6:20 | ...::bar | hasQualifier: | yes | hasSegment: | yes | -| gen_path_expr.rs:7:13:7:15 | <...> | hasQualifier: | no | hasSegment: | yes | -| gen_path_expr.rs:7:13:7:20 | ...::foo | hasQualifier: | yes | hasSegment: | yes | -| gen_path_expr.rs:7:14:7:14 | T | hasQualifier: | no | hasSegment: | yes | -| gen_path_expr.rs:8:13:8:31 | <...> | hasQualifier: | no | hasSegment: | yes | -| gen_path_expr.rs:8:13:8:36 | ...::foo | hasQualifier: | yes | hasSegment: | yes | -| gen_path_expr.rs:8:14:8:21 | TypeRepr | hasQualifier: | no | hasSegment: | yes | -| gen_path_expr.rs:8:26:8:30 | Trait | hasQualifier: | no | hasSegment: | yes | -| gen_path_pat.rs:5:11:5:11 | x | hasQualifier: | no | hasSegment: | yes | -| gen_path_pat.rs:6:9:6:11 | Foo | hasQualifier: | no | hasSegment: | yes | -| gen_path_pat.rs:6:9:6:16 | ...::Bar | hasQualifier: | yes | hasSegment: | yes | -| gen_path_type_repr.rs:5:14:5:16 | std | hasQualifier: | no | hasSegment: | yes | -| gen_path_type_repr.rs:5:14:5:29 | ...::collections | hasQualifier: | yes | hasSegment: | yes | -| gen_path_type_repr.rs:5:14:5:48 | ...::HashMap::<...> | hasQualifier: | yes | hasSegment: | yes | -| gen_path_type_repr.rs:5:40:5:42 | i32 | hasQualifier: | no | hasSegment: | yes | -| gen_path_type_repr.rs:5:45:5:47 | i32 | hasQualifier: | no | hasSegment: | yes | -| gen_path_type_repr.rs:6:14:6:14 | X | hasQualifier: | no | hasSegment: | yes | -| gen_path_type_repr.rs:6:14:6:20 | ...::Item | hasQualifier: | yes | hasSegment: | yes | +instances +| gen_path.rs:5:9:5:18 | some_crate | +| gen_path.rs:5:9:5:31 | ...::some_module | +| gen_path.rs:5:9:5:42 | ...::some_item | +| gen_path.rs:6:5:6:7 | foo | +| gen_path.rs:6:5:6:12 | ...::bar | +| gen_path_expr.rs:5:13:5:20 | variable | +| gen_path_expr.rs:6:13:6:15 | foo | +| gen_path_expr.rs:6:13:6:20 | ...::bar | +| gen_path_expr.rs:7:13:7:15 | <...> | +| gen_path_expr.rs:7:13:7:20 | ...::foo | +| gen_path_expr.rs:7:14:7:14 | T | +| gen_path_expr.rs:8:13:8:31 | <...> | +| gen_path_expr.rs:8:13:8:36 | ...::foo | +| gen_path_expr.rs:8:14:8:21 | TypeRepr | +| gen_path_expr.rs:8:26:8:30 | Trait | +| gen_path_pat.rs:5:11:5:11 | x | +| gen_path_pat.rs:6:9:6:11 | Foo | +| gen_path_pat.rs:6:9:6:16 | ...::Bar | +| gen_path_type_repr.rs:5:14:5:16 | std | +| gen_path_type_repr.rs:5:14:5:29 | ...::collections | +| gen_path_type_repr.rs:5:14:5:48 | ...::HashMap::<...> | +| gen_path_type_repr.rs:5:40:5:42 | i32 | +| gen_path_type_repr.rs:5:45:5:47 | i32 | +| gen_path_type_repr.rs:6:14:6:14 | X | +| gen_path_type_repr.rs:6:14:6:20 | ...::Item | +getQualifier +| gen_path.rs:5:9:5:31 | ...::some_module | gen_path.rs:5:9:5:18 | some_crate | +| gen_path.rs:5:9:5:42 | ...::some_item | gen_path.rs:5:9:5:31 | ...::some_module | +| gen_path.rs:6:5:6:12 | ...::bar | gen_path.rs:6:5:6:7 | foo | +| gen_path_expr.rs:6:13:6:20 | ...::bar | gen_path_expr.rs:6:13:6:15 | foo | +| gen_path_expr.rs:7:13:7:20 | ...::foo | gen_path_expr.rs:7:13:7:15 | <...> | +| gen_path_expr.rs:8:13:8:36 | ...::foo | gen_path_expr.rs:8:13:8:31 | <...> | +| gen_path_pat.rs:6:9:6:16 | ...::Bar | gen_path_pat.rs:6:9:6:11 | Foo | +| gen_path_type_repr.rs:5:14:5:29 | ...::collections | gen_path_type_repr.rs:5:14:5:16 | std | +| gen_path_type_repr.rs:5:14:5:48 | ...::HashMap::<...> | gen_path_type_repr.rs:5:14:5:29 | ...::collections | +| gen_path_type_repr.rs:6:14:6:20 | ...::Item | gen_path_type_repr.rs:6:14:6:14 | X | +getSegment +| gen_path.rs:5:9:5:18 | some_crate | gen_path.rs:5:9:5:18 | some_crate | +| gen_path.rs:5:9:5:31 | ...::some_module | gen_path.rs:5:21:5:31 | some_module | +| gen_path.rs:5:9:5:42 | ...::some_item | gen_path.rs:5:34:5:42 | some_item | +| gen_path.rs:6:5:6:7 | foo | gen_path.rs:6:5:6:7 | foo | +| gen_path.rs:6:5:6:12 | ...::bar | gen_path.rs:6:10:6:12 | bar | +| gen_path_expr.rs:5:13:5:20 | variable | gen_path_expr.rs:5:13:5:20 | variable | +| gen_path_expr.rs:6:13:6:15 | foo | gen_path_expr.rs:6:13:6:15 | foo | +| gen_path_expr.rs:6:13:6:20 | ...::bar | gen_path_expr.rs:6:18:6:20 | bar | +| gen_path_expr.rs:7:13:7:15 | <...> | gen_path_expr.rs:7:13:7:15 | <...> | +| gen_path_expr.rs:7:13:7:20 | ...::foo | gen_path_expr.rs:7:18:7:20 | foo | +| gen_path_expr.rs:7:14:7:14 | T | gen_path_expr.rs:7:14:7:14 | T | +| gen_path_expr.rs:8:13:8:31 | <...> | gen_path_expr.rs:8:13:8:31 | <...> | +| gen_path_expr.rs:8:13:8:36 | ...::foo | gen_path_expr.rs:8:34:8:36 | foo | +| gen_path_expr.rs:8:14:8:21 | TypeRepr | gen_path_expr.rs:8:14:8:21 | TypeRepr | +| gen_path_expr.rs:8:26:8:30 | Trait | gen_path_expr.rs:8:26:8:30 | Trait | +| gen_path_pat.rs:5:11:5:11 | x | gen_path_pat.rs:5:11:5:11 | x | +| gen_path_pat.rs:6:9:6:11 | Foo | gen_path_pat.rs:6:9:6:11 | Foo | +| gen_path_pat.rs:6:9:6:16 | ...::Bar | gen_path_pat.rs:6:14:6:16 | Bar | +| gen_path_type_repr.rs:5:14:5:16 | std | gen_path_type_repr.rs:5:14:5:16 | std | +| gen_path_type_repr.rs:5:14:5:29 | ...::collections | gen_path_type_repr.rs:5:19:5:29 | collections | +| gen_path_type_repr.rs:5:14:5:48 | ...::HashMap::<...> | gen_path_type_repr.rs:5:32:5:48 | HashMap::<...> | +| gen_path_type_repr.rs:5:40:5:42 | i32 | gen_path_type_repr.rs:5:40:5:42 | i32 | +| gen_path_type_repr.rs:5:45:5:47 | i32 | gen_path_type_repr.rs:5:45:5:47 | i32 | +| gen_path_type_repr.rs:6:14:6:14 | X | gen_path_type_repr.rs:6:14:6:14 | X | +| gen_path_type_repr.rs:6:14:6:20 | ...::Item | gen_path_type_repr.rs:6:17:6:20 | Item | diff --git a/rust/ql/test/extractor-tests/generated/Path/Path.ql b/rust/ql/test/extractor-tests/generated/Path/Path.ql index 2f32fa34147..183fcbb24a6 100644 --- a/rust/ql/test/extractor-tests/generated/Path/Path.ql +++ b/rust/ql/test/extractor-tests/generated/Path/Path.ql @@ -2,10 +2,12 @@ import codeql.rust.elements import TestUtils -from Path x, string hasQualifier, string hasSegment -where - toBeTested(x) and - not x.isUnknown() and - (if x.hasQualifier() then hasQualifier = "yes" else hasQualifier = "no") and - if x.hasSegment() then hasSegment = "yes" else hasSegment = "no" -select x, "hasQualifier:", hasQualifier, "hasSegment:", hasSegment +query predicate instances(Path x) { toBeTested(x) and not x.isUnknown() } + +query predicate getQualifier(Path x, Path getQualifier) { + toBeTested(x) and not x.isUnknown() and getQualifier = x.getQualifier() +} + +query predicate getSegment(Path x, PathSegment getSegment) { + toBeTested(x) and not x.isUnknown() and getSegment = x.getSegment() +} diff --git a/rust/ql/test/extractor-tests/generated/Path/PathExpr.expected b/rust/ql/test/extractor-tests/generated/Path/PathExpr.expected index 25bc95ed055..5a2df7ee29f 100644 --- a/rust/ql/test/extractor-tests/generated/Path/PathExpr.expected +++ b/rust/ql/test/extractor-tests/generated/Path/PathExpr.expected @@ -1,6 +1,17 @@ -| gen_path.rs:6:5:6:12 | ...::bar | hasResolvedPath: | no | hasResolvedCrateOrigin: | no | hasPath: | yes | getNumberOfAttrs: | 0 | -| gen_path_expr.rs:5:13:5:20 | variable | hasResolvedPath: | no | hasResolvedCrateOrigin: | no | hasPath: | yes | getNumberOfAttrs: | 0 | -| gen_path_expr.rs:6:13:6:20 | ...::bar | hasResolvedPath: | no | hasResolvedCrateOrigin: | no | hasPath: | yes | getNumberOfAttrs: | 0 | -| gen_path_expr.rs:7:13:7:20 | ...::foo | hasResolvedPath: | no | hasResolvedCrateOrigin: | no | hasPath: | yes | getNumberOfAttrs: | 0 | -| gen_path_expr.rs:8:13:8:36 | ...::foo | hasResolvedPath: | no | hasResolvedCrateOrigin: | no | hasPath: | yes | getNumberOfAttrs: | 0 | -| gen_path_pat.rs:5:11:5:11 | x | hasResolvedPath: | no | hasResolvedCrateOrigin: | no | hasPath: | yes | getNumberOfAttrs: | 0 | +instances +| gen_path.rs:6:5:6:12 | ...::bar | +| gen_path_expr.rs:5:13:5:20 | variable | +| gen_path_expr.rs:6:13:6:20 | ...::bar | +| gen_path_expr.rs:7:13:7:20 | ...::foo | +| gen_path_expr.rs:8:13:8:36 | ...::foo | +| gen_path_pat.rs:5:11:5:11 | x | +getResolvedPath +getResolvedCrateOrigin +getPath +| gen_path.rs:6:5:6:12 | ...::bar | gen_path.rs:6:5:6:12 | ...::bar | +| gen_path_expr.rs:5:13:5:20 | variable | gen_path_expr.rs:5:13:5:20 | variable | +| gen_path_expr.rs:6:13:6:20 | ...::bar | gen_path_expr.rs:6:13:6:20 | ...::bar | +| gen_path_expr.rs:7:13:7:20 | ...::foo | gen_path_expr.rs:7:13:7:20 | ...::foo | +| gen_path_expr.rs:8:13:8:36 | ...::foo | gen_path_expr.rs:8:13:8:36 | ...::foo | +| gen_path_pat.rs:5:11:5:11 | x | gen_path_pat.rs:5:11:5:11 | x | +getAttr diff --git a/rust/ql/test/extractor-tests/generated/Path/PathExpr.ql b/rust/ql/test/extractor-tests/generated/Path/PathExpr.ql index 41b7414d24c..70bff600ace 100644 --- a/rust/ql/test/extractor-tests/generated/Path/PathExpr.ql +++ b/rust/ql/test/extractor-tests/generated/Path/PathExpr.ql @@ -2,19 +2,20 @@ import codeql.rust.elements import TestUtils -from - PathExpr x, string hasResolvedPath, string hasResolvedCrateOrigin, string hasPath, - int getNumberOfAttrs -where - toBeTested(x) and - not x.isUnknown() and - (if x.hasResolvedPath() then hasResolvedPath = "yes" else hasResolvedPath = "no") and - ( - if x.hasResolvedCrateOrigin() - then hasResolvedCrateOrigin = "yes" - else hasResolvedCrateOrigin = "no" - ) and - (if x.hasPath() then hasPath = "yes" else hasPath = "no") and - getNumberOfAttrs = x.getNumberOfAttrs() -select x, "hasResolvedPath:", hasResolvedPath, "hasResolvedCrateOrigin:", hasResolvedCrateOrigin, - "hasPath:", hasPath, "getNumberOfAttrs:", getNumberOfAttrs +query predicate instances(PathExpr x) { toBeTested(x) and not x.isUnknown() } + +query predicate getResolvedPath(PathExpr x, string getResolvedPath) { + toBeTested(x) and not x.isUnknown() and getResolvedPath = x.getResolvedPath() +} + +query predicate getResolvedCrateOrigin(PathExpr x, string getResolvedCrateOrigin) { + toBeTested(x) and not x.isUnknown() and getResolvedCrateOrigin = x.getResolvedCrateOrigin() +} + +query predicate getPath(PathExpr x, Path getPath) { + toBeTested(x) and not x.isUnknown() and getPath = x.getPath() +} + +query predicate getAttr(PathExpr x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} diff --git a/rust/ql/test/extractor-tests/generated/Path/PathExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/Path/PathExpr_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Path/PathExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/Path/PathExpr_getAttr.ql deleted file mode 100644 index 0c0ed2aa7e4..00000000000 --- a/rust/ql/test/extractor-tests/generated/Path/PathExpr_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from PathExpr x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/Path/PathExpr_getPath.expected b/rust/ql/test/extractor-tests/generated/Path/PathExpr_getPath.expected deleted file mode 100644 index e9680024dc1..00000000000 --- a/rust/ql/test/extractor-tests/generated/Path/PathExpr_getPath.expected +++ /dev/null @@ -1,6 +0,0 @@ -| gen_path.rs:6:5:6:12 | ...::bar | gen_path.rs:6:5:6:12 | ...::bar | -| gen_path_expr.rs:5:13:5:20 | variable | gen_path_expr.rs:5:13:5:20 | variable | -| gen_path_expr.rs:6:13:6:20 | ...::bar | gen_path_expr.rs:6:13:6:20 | ...::bar | -| gen_path_expr.rs:7:13:7:20 | ...::foo | gen_path_expr.rs:7:13:7:20 | ...::foo | -| gen_path_expr.rs:8:13:8:36 | ...::foo | gen_path_expr.rs:8:13:8:36 | ...::foo | -| gen_path_pat.rs:5:11:5:11 | x | gen_path_pat.rs:5:11:5:11 | x | diff --git a/rust/ql/test/extractor-tests/generated/Path/PathExpr_getPath.ql b/rust/ql/test/extractor-tests/generated/Path/PathExpr_getPath.ql deleted file mode 100644 index a776443137e..00000000000 --- a/rust/ql/test/extractor-tests/generated/Path/PathExpr_getPath.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from PathExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getPath() diff --git a/rust/ql/test/extractor-tests/generated/Path/PathExpr_getResolvedCrateOrigin.expected b/rust/ql/test/extractor-tests/generated/Path/PathExpr_getResolvedCrateOrigin.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Path/PathExpr_getResolvedCrateOrigin.ql b/rust/ql/test/extractor-tests/generated/Path/PathExpr_getResolvedCrateOrigin.ql deleted file mode 100644 index 24e07918484..00000000000 --- a/rust/ql/test/extractor-tests/generated/Path/PathExpr_getResolvedCrateOrigin.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from PathExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getResolvedCrateOrigin() diff --git a/rust/ql/test/extractor-tests/generated/Path/PathExpr_getResolvedPath.expected b/rust/ql/test/extractor-tests/generated/Path/PathExpr_getResolvedPath.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Path/PathExpr_getResolvedPath.ql b/rust/ql/test/extractor-tests/generated/Path/PathExpr_getResolvedPath.ql deleted file mode 100644 index 10e6ceb2a0b..00000000000 --- a/rust/ql/test/extractor-tests/generated/Path/PathExpr_getResolvedPath.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from PathExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getResolvedPath() diff --git a/rust/ql/test/extractor-tests/generated/Path/PathPat.expected b/rust/ql/test/extractor-tests/generated/Path/PathPat.expected index cf90175a84c..9bcce903558 100644 --- a/rust/ql/test/extractor-tests/generated/Path/PathPat.expected +++ b/rust/ql/test/extractor-tests/generated/Path/PathPat.expected @@ -1 +1,6 @@ -| gen_path_pat.rs:6:9:6:16 | ...::Bar | hasResolvedPath: | no | hasResolvedCrateOrigin: | no | hasPath: | yes | +instances +| gen_path_pat.rs:6:9:6:16 | ...::Bar | +getResolvedPath +getResolvedCrateOrigin +getPath +| gen_path_pat.rs:6:9:6:16 | ...::Bar | gen_path_pat.rs:6:9:6:16 | ...::Bar | diff --git a/rust/ql/test/extractor-tests/generated/Path/PathPat.ql b/rust/ql/test/extractor-tests/generated/Path/PathPat.ql index a105c20c39e..9c5a874cabf 100644 --- a/rust/ql/test/extractor-tests/generated/Path/PathPat.ql +++ b/rust/ql/test/extractor-tests/generated/Path/PathPat.ql @@ -2,16 +2,16 @@ import codeql.rust.elements import TestUtils -from PathPat x, string hasResolvedPath, string hasResolvedCrateOrigin, string hasPath -where - toBeTested(x) and - not x.isUnknown() and - (if x.hasResolvedPath() then hasResolvedPath = "yes" else hasResolvedPath = "no") and - ( - if x.hasResolvedCrateOrigin() - then hasResolvedCrateOrigin = "yes" - else hasResolvedCrateOrigin = "no" - ) and - if x.hasPath() then hasPath = "yes" else hasPath = "no" -select x, "hasResolvedPath:", hasResolvedPath, "hasResolvedCrateOrigin:", hasResolvedCrateOrigin, - "hasPath:", hasPath +query predicate instances(PathPat x) { toBeTested(x) and not x.isUnknown() } + +query predicate getResolvedPath(PathPat x, string getResolvedPath) { + toBeTested(x) and not x.isUnknown() and getResolvedPath = x.getResolvedPath() +} + +query predicate getResolvedCrateOrigin(PathPat x, string getResolvedCrateOrigin) { + toBeTested(x) and not x.isUnknown() and getResolvedCrateOrigin = x.getResolvedCrateOrigin() +} + +query predicate getPath(PathPat x, Path getPath) { + toBeTested(x) and not x.isUnknown() and getPath = x.getPath() +} diff --git a/rust/ql/test/extractor-tests/generated/Path/PathPat_getPath.expected b/rust/ql/test/extractor-tests/generated/Path/PathPat_getPath.expected deleted file mode 100644 index 3a601023f3f..00000000000 --- a/rust/ql/test/extractor-tests/generated/Path/PathPat_getPath.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_path_pat.rs:6:9:6:16 | ...::Bar | gen_path_pat.rs:6:9:6:16 | ...::Bar | diff --git a/rust/ql/test/extractor-tests/generated/Path/PathPat_getPath.ql b/rust/ql/test/extractor-tests/generated/Path/PathPat_getPath.ql deleted file mode 100644 index 820b1028de2..00000000000 --- a/rust/ql/test/extractor-tests/generated/Path/PathPat_getPath.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from PathPat x -where toBeTested(x) and not x.isUnknown() -select x, x.getPath() diff --git a/rust/ql/test/extractor-tests/generated/Path/PathPat_getResolvedCrateOrigin.expected b/rust/ql/test/extractor-tests/generated/Path/PathPat_getResolvedCrateOrigin.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Path/PathPat_getResolvedCrateOrigin.ql b/rust/ql/test/extractor-tests/generated/Path/PathPat_getResolvedCrateOrigin.ql deleted file mode 100644 index 7ed41155d77..00000000000 --- a/rust/ql/test/extractor-tests/generated/Path/PathPat_getResolvedCrateOrigin.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from PathPat x -where toBeTested(x) and not x.isUnknown() -select x, x.getResolvedCrateOrigin() diff --git a/rust/ql/test/extractor-tests/generated/Path/PathPat_getResolvedPath.expected b/rust/ql/test/extractor-tests/generated/Path/PathPat_getResolvedPath.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Path/PathPat_getResolvedPath.ql b/rust/ql/test/extractor-tests/generated/Path/PathPat_getResolvedPath.ql deleted file mode 100644 index cbe1932925a..00000000000 --- a/rust/ql/test/extractor-tests/generated/Path/PathPat_getResolvedPath.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from PathPat x -where toBeTested(x) and not x.isUnknown() -select x, x.getResolvedPath() diff --git a/rust/ql/test/extractor-tests/generated/Path/PathSegment.expected b/rust/ql/test/extractor-tests/generated/Path/PathSegment.expected index a37dd8cbd96..cf9e4501366 100644 --- a/rust/ql/test/extractor-tests/generated/Path/PathSegment.expected +++ b/rust/ql/test/extractor-tests/generated/Path/PathSegment.expected @@ -1,25 +1,60 @@ -| gen_path.rs:5:9:5:18 | some_crate | hasGenericArgList: | no | hasIdentifier: | yes | hasParenthesizedArgList: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTypeRepr: | no | hasTraitTypeRepr: | no | -| gen_path.rs:5:21:5:31 | some_module | hasGenericArgList: | no | hasIdentifier: | yes | hasParenthesizedArgList: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTypeRepr: | no | hasTraitTypeRepr: | no | -| gen_path.rs:5:34:5:42 | some_item | hasGenericArgList: | no | hasIdentifier: | yes | hasParenthesizedArgList: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTypeRepr: | no | hasTraitTypeRepr: | no | -| gen_path.rs:6:5:6:7 | foo | hasGenericArgList: | no | hasIdentifier: | yes | hasParenthesizedArgList: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTypeRepr: | no | hasTraitTypeRepr: | no | -| gen_path.rs:6:10:6:12 | bar | hasGenericArgList: | no | hasIdentifier: | yes | hasParenthesizedArgList: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTypeRepr: | no | hasTraitTypeRepr: | no | -| gen_path_expr.rs:5:13:5:20 | variable | hasGenericArgList: | no | hasIdentifier: | yes | hasParenthesizedArgList: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTypeRepr: | no | hasTraitTypeRepr: | no | -| gen_path_expr.rs:6:13:6:15 | foo | hasGenericArgList: | no | hasIdentifier: | yes | hasParenthesizedArgList: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTypeRepr: | no | hasTraitTypeRepr: | no | -| gen_path_expr.rs:6:18:6:20 | bar | hasGenericArgList: | no | hasIdentifier: | yes | hasParenthesizedArgList: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTypeRepr: | no | hasTraitTypeRepr: | no | -| gen_path_expr.rs:7:13:7:15 | <...> | hasGenericArgList: | no | hasIdentifier: | no | hasParenthesizedArgList: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTypeRepr: | yes | hasTraitTypeRepr: | no | -| gen_path_expr.rs:7:14:7:14 | T | hasGenericArgList: | no | hasIdentifier: | yes | hasParenthesizedArgList: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTypeRepr: | no | hasTraitTypeRepr: | no | -| gen_path_expr.rs:7:18:7:20 | foo | hasGenericArgList: | no | hasIdentifier: | yes | hasParenthesizedArgList: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTypeRepr: | no | hasTraitTypeRepr: | no | -| gen_path_expr.rs:8:13:8:31 | <...> | hasGenericArgList: | no | hasIdentifier: | no | hasParenthesizedArgList: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTypeRepr: | yes | hasTraitTypeRepr: | yes | -| gen_path_expr.rs:8:14:8:21 | TypeRepr | hasGenericArgList: | no | hasIdentifier: | yes | hasParenthesizedArgList: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTypeRepr: | no | hasTraitTypeRepr: | no | -| gen_path_expr.rs:8:26:8:30 | Trait | hasGenericArgList: | no | hasIdentifier: | yes | hasParenthesizedArgList: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTypeRepr: | no | hasTraitTypeRepr: | no | -| gen_path_expr.rs:8:34:8:36 | foo | hasGenericArgList: | no | hasIdentifier: | yes | hasParenthesizedArgList: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTypeRepr: | no | hasTraitTypeRepr: | no | -| gen_path_pat.rs:5:11:5:11 | x | hasGenericArgList: | no | hasIdentifier: | yes | hasParenthesizedArgList: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTypeRepr: | no | hasTraitTypeRepr: | no | -| gen_path_pat.rs:6:9:6:11 | Foo | hasGenericArgList: | no | hasIdentifier: | yes | hasParenthesizedArgList: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTypeRepr: | no | hasTraitTypeRepr: | no | -| gen_path_pat.rs:6:14:6:16 | Bar | hasGenericArgList: | no | hasIdentifier: | yes | hasParenthesizedArgList: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTypeRepr: | no | hasTraitTypeRepr: | no | -| gen_path_type_repr.rs:5:14:5:16 | std | hasGenericArgList: | no | hasIdentifier: | yes | hasParenthesizedArgList: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTypeRepr: | no | hasTraitTypeRepr: | no | -| gen_path_type_repr.rs:5:19:5:29 | collections | hasGenericArgList: | no | hasIdentifier: | yes | hasParenthesizedArgList: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTypeRepr: | no | hasTraitTypeRepr: | no | -| gen_path_type_repr.rs:5:32:5:48 | HashMap::<...> | hasGenericArgList: | yes | hasIdentifier: | yes | hasParenthesizedArgList: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTypeRepr: | no | hasTraitTypeRepr: | no | -| gen_path_type_repr.rs:5:40:5:42 | i32 | hasGenericArgList: | no | hasIdentifier: | yes | hasParenthesizedArgList: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTypeRepr: | no | hasTraitTypeRepr: | no | -| gen_path_type_repr.rs:5:45:5:47 | i32 | hasGenericArgList: | no | hasIdentifier: | yes | hasParenthesizedArgList: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTypeRepr: | no | hasTraitTypeRepr: | no | -| gen_path_type_repr.rs:6:14:6:14 | X | hasGenericArgList: | no | hasIdentifier: | yes | hasParenthesizedArgList: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTypeRepr: | no | hasTraitTypeRepr: | no | -| gen_path_type_repr.rs:6:17:6:20 | Item | hasGenericArgList: | no | hasIdentifier: | yes | hasParenthesizedArgList: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTypeRepr: | no | hasTraitTypeRepr: | no | +instances +| gen_path.rs:5:9:5:18 | some_crate | +| gen_path.rs:5:21:5:31 | some_module | +| gen_path.rs:5:34:5:42 | some_item | +| gen_path.rs:6:5:6:7 | foo | +| gen_path.rs:6:10:6:12 | bar | +| gen_path_expr.rs:5:13:5:20 | variable | +| gen_path_expr.rs:6:13:6:15 | foo | +| gen_path_expr.rs:6:18:6:20 | bar | +| gen_path_expr.rs:7:13:7:15 | <...> | +| gen_path_expr.rs:7:14:7:14 | T | +| gen_path_expr.rs:7:18:7:20 | foo | +| gen_path_expr.rs:8:13:8:31 | <...> | +| gen_path_expr.rs:8:14:8:21 | TypeRepr | +| gen_path_expr.rs:8:26:8:30 | Trait | +| gen_path_expr.rs:8:34:8:36 | foo | +| gen_path_pat.rs:5:11:5:11 | x | +| gen_path_pat.rs:6:9:6:11 | Foo | +| gen_path_pat.rs:6:14:6:16 | Bar | +| gen_path_type_repr.rs:5:14:5:16 | std | +| gen_path_type_repr.rs:5:19:5:29 | collections | +| gen_path_type_repr.rs:5:32:5:48 | HashMap::<...> | +| gen_path_type_repr.rs:5:40:5:42 | i32 | +| gen_path_type_repr.rs:5:45:5:47 | i32 | +| gen_path_type_repr.rs:6:14:6:14 | X | +| gen_path_type_repr.rs:6:17:6:20 | Item | +getGenericArgList +| gen_path_type_repr.rs:5:32:5:48 | HashMap::<...> | gen_path_type_repr.rs:5:39:5:48 | <...> | +getIdentifier +| gen_path.rs:5:9:5:18 | some_crate | gen_path.rs:5:9:5:18 | some_crate | +| gen_path.rs:5:21:5:31 | some_module | gen_path.rs:5:21:5:31 | some_module | +| gen_path.rs:5:34:5:42 | some_item | gen_path.rs:5:34:5:42 | some_item | +| gen_path.rs:6:5:6:7 | foo | gen_path.rs:6:5:6:7 | foo | +| gen_path.rs:6:10:6:12 | bar | gen_path.rs:6:10:6:12 | bar | +| gen_path_expr.rs:5:13:5:20 | variable | gen_path_expr.rs:5:13:5:20 | variable | +| gen_path_expr.rs:6:13:6:15 | foo | gen_path_expr.rs:6:13:6:15 | foo | +| gen_path_expr.rs:6:18:6:20 | bar | gen_path_expr.rs:6:18:6:20 | bar | +| gen_path_expr.rs:7:14:7:14 | T | gen_path_expr.rs:7:14:7:14 | T | +| gen_path_expr.rs:7:18:7:20 | foo | gen_path_expr.rs:7:18:7:20 | foo | +| gen_path_expr.rs:8:14:8:21 | TypeRepr | gen_path_expr.rs:8:14:8:21 | TypeRepr | +| gen_path_expr.rs:8:26:8:30 | Trait | gen_path_expr.rs:8:26:8:30 | Trait | +| gen_path_expr.rs:8:34:8:36 | foo | gen_path_expr.rs:8:34:8:36 | foo | +| gen_path_pat.rs:5:11:5:11 | x | gen_path_pat.rs:5:11:5:11 | x | +| gen_path_pat.rs:6:9:6:11 | Foo | gen_path_pat.rs:6:9:6:11 | Foo | +| gen_path_pat.rs:6:14:6:16 | Bar | gen_path_pat.rs:6:14:6:16 | Bar | +| gen_path_type_repr.rs:5:14:5:16 | std | gen_path_type_repr.rs:5:14:5:16 | std | +| gen_path_type_repr.rs:5:19:5:29 | collections | gen_path_type_repr.rs:5:19:5:29 | collections | +| gen_path_type_repr.rs:5:32:5:48 | HashMap::<...> | gen_path_type_repr.rs:5:32:5:38 | HashMap | +| gen_path_type_repr.rs:5:40:5:42 | i32 | gen_path_type_repr.rs:5:40:5:42 | i32 | +| gen_path_type_repr.rs:5:45:5:47 | i32 | gen_path_type_repr.rs:5:45:5:47 | i32 | +| gen_path_type_repr.rs:6:14:6:14 | X | gen_path_type_repr.rs:6:14:6:14 | X | +| gen_path_type_repr.rs:6:17:6:20 | Item | gen_path_type_repr.rs:6:17:6:20 | Item | +getParenthesizedArgList +getRetType +getReturnTypeSyntax +getTypeRepr +| gen_path_expr.rs:7:13:7:15 | <...> | gen_path_expr.rs:7:14:7:14 | T | +| gen_path_expr.rs:8:13:8:31 | <...> | gen_path_expr.rs:8:14:8:21 | TypeRepr | +getTraitTypeRepr +| gen_path_expr.rs:8:13:8:31 | <...> | gen_path_expr.rs:8:26:8:30 | Trait | diff --git a/rust/ql/test/extractor-tests/generated/Path/PathSegment.ql b/rust/ql/test/extractor-tests/generated/Path/PathSegment.ql index 5bfa26039b1..2e0800706f0 100644 --- a/rust/ql/test/extractor-tests/generated/Path/PathSegment.ql +++ b/rust/ql/test/extractor-tests/generated/Path/PathSegment.ql @@ -2,24 +2,32 @@ import codeql.rust.elements import TestUtils -from - PathSegment x, string hasGenericArgList, string hasIdentifier, string hasParenthesizedArgList, - string hasRetType, string hasReturnTypeSyntax, string hasTypeRepr, string hasTraitTypeRepr -where - toBeTested(x) and - not x.isUnknown() and - (if x.hasGenericArgList() then hasGenericArgList = "yes" else hasGenericArgList = "no") and - (if x.hasIdentifier() then hasIdentifier = "yes" else hasIdentifier = "no") and - ( - if x.hasParenthesizedArgList() - then hasParenthesizedArgList = "yes" - else hasParenthesizedArgList = "no" - ) and - (if x.hasRetType() then hasRetType = "yes" else hasRetType = "no") and - (if x.hasReturnTypeSyntax() then hasReturnTypeSyntax = "yes" else hasReturnTypeSyntax = "no") and - (if x.hasTypeRepr() then hasTypeRepr = "yes" else hasTypeRepr = "no") and - if x.hasTraitTypeRepr() then hasTraitTypeRepr = "yes" else hasTraitTypeRepr = "no" -select x, "hasGenericArgList:", hasGenericArgList, "hasIdentifier:", hasIdentifier, - "hasParenthesizedArgList:", hasParenthesizedArgList, "hasRetType:", hasRetType, - "hasReturnTypeSyntax:", hasReturnTypeSyntax, "hasTypeRepr:", hasTypeRepr, "hasTraitTypeRepr:", - hasTraitTypeRepr +query predicate instances(PathSegment x) { toBeTested(x) and not x.isUnknown() } + +query predicate getGenericArgList(PathSegment x, GenericArgList getGenericArgList) { + toBeTested(x) and not x.isUnknown() and getGenericArgList = x.getGenericArgList() +} + +query predicate getIdentifier(PathSegment x, NameRef getIdentifier) { + toBeTested(x) and not x.isUnknown() and getIdentifier = x.getIdentifier() +} + +query predicate getParenthesizedArgList(PathSegment x, ParenthesizedArgList getParenthesizedArgList) { + toBeTested(x) and not x.isUnknown() and getParenthesizedArgList = x.getParenthesizedArgList() +} + +query predicate getRetType(PathSegment x, RetTypeRepr getRetType) { + toBeTested(x) and not x.isUnknown() and getRetType = x.getRetType() +} + +query predicate getReturnTypeSyntax(PathSegment x, ReturnTypeSyntax getReturnTypeSyntax) { + toBeTested(x) and not x.isUnknown() and getReturnTypeSyntax = x.getReturnTypeSyntax() +} + +query predicate getTypeRepr(PathSegment x, TypeRepr getTypeRepr) { + toBeTested(x) and not x.isUnknown() and getTypeRepr = x.getTypeRepr() +} + +query predicate getTraitTypeRepr(PathSegment x, PathTypeRepr getTraitTypeRepr) { + toBeTested(x) and not x.isUnknown() and getTraitTypeRepr = x.getTraitTypeRepr() +} diff --git a/rust/ql/test/extractor-tests/generated/Path/PathSegment_getGenericArgList.expected b/rust/ql/test/extractor-tests/generated/Path/PathSegment_getGenericArgList.expected deleted file mode 100644 index ff0110440ae..00000000000 --- a/rust/ql/test/extractor-tests/generated/Path/PathSegment_getGenericArgList.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_path_type_repr.rs:5:32:5:48 | HashMap::<...> | gen_path_type_repr.rs:5:39:5:48 | <...> | diff --git a/rust/ql/test/extractor-tests/generated/Path/PathSegment_getGenericArgList.ql b/rust/ql/test/extractor-tests/generated/Path/PathSegment_getGenericArgList.ql deleted file mode 100644 index a9367578003..00000000000 --- a/rust/ql/test/extractor-tests/generated/Path/PathSegment_getGenericArgList.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from PathSegment x -where toBeTested(x) and not x.isUnknown() -select x, x.getGenericArgList() diff --git a/rust/ql/test/extractor-tests/generated/Path/PathSegment_getIdentifier.expected b/rust/ql/test/extractor-tests/generated/Path/PathSegment_getIdentifier.expected deleted file mode 100644 index dfa33cf9611..00000000000 --- a/rust/ql/test/extractor-tests/generated/Path/PathSegment_getIdentifier.expected +++ /dev/null @@ -1,23 +0,0 @@ -| gen_path.rs:5:9:5:18 | some_crate | gen_path.rs:5:9:5:18 | some_crate | -| gen_path.rs:5:21:5:31 | some_module | gen_path.rs:5:21:5:31 | some_module | -| gen_path.rs:5:34:5:42 | some_item | gen_path.rs:5:34:5:42 | some_item | -| gen_path.rs:6:5:6:7 | foo | gen_path.rs:6:5:6:7 | foo | -| gen_path.rs:6:10:6:12 | bar | gen_path.rs:6:10:6:12 | bar | -| gen_path_expr.rs:5:13:5:20 | variable | gen_path_expr.rs:5:13:5:20 | variable | -| gen_path_expr.rs:6:13:6:15 | foo | gen_path_expr.rs:6:13:6:15 | foo | -| gen_path_expr.rs:6:18:6:20 | bar | gen_path_expr.rs:6:18:6:20 | bar | -| gen_path_expr.rs:7:14:7:14 | T | gen_path_expr.rs:7:14:7:14 | T | -| gen_path_expr.rs:7:18:7:20 | foo | gen_path_expr.rs:7:18:7:20 | foo | -| gen_path_expr.rs:8:14:8:21 | TypeRepr | gen_path_expr.rs:8:14:8:21 | TypeRepr | -| gen_path_expr.rs:8:26:8:30 | Trait | gen_path_expr.rs:8:26:8:30 | Trait | -| gen_path_expr.rs:8:34:8:36 | foo | gen_path_expr.rs:8:34:8:36 | foo | -| gen_path_pat.rs:5:11:5:11 | x | gen_path_pat.rs:5:11:5:11 | x | -| gen_path_pat.rs:6:9:6:11 | Foo | gen_path_pat.rs:6:9:6:11 | Foo | -| gen_path_pat.rs:6:14:6:16 | Bar | gen_path_pat.rs:6:14:6:16 | Bar | -| gen_path_type_repr.rs:5:14:5:16 | std | gen_path_type_repr.rs:5:14:5:16 | std | -| gen_path_type_repr.rs:5:19:5:29 | collections | gen_path_type_repr.rs:5:19:5:29 | collections | -| gen_path_type_repr.rs:5:32:5:48 | HashMap::<...> | gen_path_type_repr.rs:5:32:5:38 | HashMap | -| gen_path_type_repr.rs:5:40:5:42 | i32 | gen_path_type_repr.rs:5:40:5:42 | i32 | -| gen_path_type_repr.rs:5:45:5:47 | i32 | gen_path_type_repr.rs:5:45:5:47 | i32 | -| gen_path_type_repr.rs:6:14:6:14 | X | gen_path_type_repr.rs:6:14:6:14 | X | -| gen_path_type_repr.rs:6:17:6:20 | Item | gen_path_type_repr.rs:6:17:6:20 | Item | diff --git a/rust/ql/test/extractor-tests/generated/Path/PathSegment_getIdentifier.ql b/rust/ql/test/extractor-tests/generated/Path/PathSegment_getIdentifier.ql deleted file mode 100644 index 23c06cef506..00000000000 --- a/rust/ql/test/extractor-tests/generated/Path/PathSegment_getIdentifier.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from PathSegment x -where toBeTested(x) and not x.isUnknown() -select x, x.getIdentifier() diff --git a/rust/ql/test/extractor-tests/generated/Path/PathSegment_getParenthesizedArgList.expected b/rust/ql/test/extractor-tests/generated/Path/PathSegment_getParenthesizedArgList.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Path/PathSegment_getParenthesizedArgList.ql b/rust/ql/test/extractor-tests/generated/Path/PathSegment_getParenthesizedArgList.ql deleted file mode 100644 index 917567c100f..00000000000 --- a/rust/ql/test/extractor-tests/generated/Path/PathSegment_getParenthesizedArgList.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from PathSegment x -where toBeTested(x) and not x.isUnknown() -select x, x.getParenthesizedArgList() diff --git a/rust/ql/test/extractor-tests/generated/Path/PathSegment_getRetType.expected b/rust/ql/test/extractor-tests/generated/Path/PathSegment_getRetType.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Path/PathSegment_getRetType.ql b/rust/ql/test/extractor-tests/generated/Path/PathSegment_getRetType.ql deleted file mode 100644 index 311642a5f85..00000000000 --- a/rust/ql/test/extractor-tests/generated/Path/PathSegment_getRetType.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from PathSegment x -where toBeTested(x) and not x.isUnknown() -select x, x.getRetType() diff --git a/rust/ql/test/extractor-tests/generated/Path/PathSegment_getReturnTypeSyntax.expected b/rust/ql/test/extractor-tests/generated/Path/PathSegment_getReturnTypeSyntax.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Path/PathSegment_getReturnTypeSyntax.ql b/rust/ql/test/extractor-tests/generated/Path/PathSegment_getReturnTypeSyntax.ql deleted file mode 100644 index f978f70c8a6..00000000000 --- a/rust/ql/test/extractor-tests/generated/Path/PathSegment_getReturnTypeSyntax.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from PathSegment x -where toBeTested(x) and not x.isUnknown() -select x, x.getReturnTypeSyntax() diff --git a/rust/ql/test/extractor-tests/generated/Path/PathSegment_getTraitTypeRepr.expected b/rust/ql/test/extractor-tests/generated/Path/PathSegment_getTraitTypeRepr.expected deleted file mode 100644 index bb178b90970..00000000000 --- a/rust/ql/test/extractor-tests/generated/Path/PathSegment_getTraitTypeRepr.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_path_expr.rs:8:13:8:31 | <...> | gen_path_expr.rs:8:26:8:30 | Trait | diff --git a/rust/ql/test/extractor-tests/generated/Path/PathSegment_getTraitTypeRepr.ql b/rust/ql/test/extractor-tests/generated/Path/PathSegment_getTraitTypeRepr.ql deleted file mode 100644 index 11675883d6a..00000000000 --- a/rust/ql/test/extractor-tests/generated/Path/PathSegment_getTraitTypeRepr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from PathSegment x -where toBeTested(x) and not x.isUnknown() -select x, x.getTraitTypeRepr() diff --git a/rust/ql/test/extractor-tests/generated/Path/PathSegment_getTypeRepr.expected b/rust/ql/test/extractor-tests/generated/Path/PathSegment_getTypeRepr.expected deleted file mode 100644 index 99ac97381b3..00000000000 --- a/rust/ql/test/extractor-tests/generated/Path/PathSegment_getTypeRepr.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_path_expr.rs:7:13:7:15 | <...> | gen_path_expr.rs:7:14:7:14 | T | -| gen_path_expr.rs:8:13:8:31 | <...> | gen_path_expr.rs:8:14:8:21 | TypeRepr | diff --git a/rust/ql/test/extractor-tests/generated/Path/PathSegment_getTypeRepr.ql b/rust/ql/test/extractor-tests/generated/Path/PathSegment_getTypeRepr.ql deleted file mode 100644 index 98303f7f0fb..00000000000 --- a/rust/ql/test/extractor-tests/generated/Path/PathSegment_getTypeRepr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from PathSegment x -where toBeTested(x) and not x.isUnknown() -select x, x.getTypeRepr() diff --git a/rust/ql/test/extractor-tests/generated/Path/PathTypeRepr.expected b/rust/ql/test/extractor-tests/generated/Path/PathTypeRepr.expected index 37988d0dfd7..841a1e6eb77 100644 --- a/rust/ql/test/extractor-tests/generated/Path/PathTypeRepr.expected +++ b/rust/ql/test/extractor-tests/generated/Path/PathTypeRepr.expected @@ -1,7 +1,16 @@ -| gen_path_expr.rs:7:14:7:14 | T | hasPath: | yes | -| gen_path_expr.rs:8:14:8:21 | TypeRepr | hasPath: | yes | -| gen_path_expr.rs:8:26:8:30 | Trait | hasPath: | yes | -| gen_path_type_repr.rs:5:14:5:48 | ...::HashMap::<...> | hasPath: | yes | -| gen_path_type_repr.rs:5:40:5:42 | i32 | hasPath: | yes | -| gen_path_type_repr.rs:5:45:5:47 | i32 | hasPath: | yes | -| gen_path_type_repr.rs:6:14:6:20 | ...::Item | hasPath: | yes | +instances +| gen_path_expr.rs:7:14:7:14 | T | +| gen_path_expr.rs:8:14:8:21 | TypeRepr | +| gen_path_expr.rs:8:26:8:30 | Trait | +| gen_path_type_repr.rs:5:14:5:48 | ...::HashMap::<...> | +| gen_path_type_repr.rs:5:40:5:42 | i32 | +| gen_path_type_repr.rs:5:45:5:47 | i32 | +| gen_path_type_repr.rs:6:14:6:20 | ...::Item | +getPath +| gen_path_expr.rs:7:14:7:14 | T | gen_path_expr.rs:7:14:7:14 | T | +| gen_path_expr.rs:8:14:8:21 | TypeRepr | gen_path_expr.rs:8:14:8:21 | TypeRepr | +| gen_path_expr.rs:8:26:8:30 | Trait | gen_path_expr.rs:8:26:8:30 | Trait | +| gen_path_type_repr.rs:5:14:5:48 | ...::HashMap::<...> | gen_path_type_repr.rs:5:14:5:48 | ...::HashMap::<...> | +| gen_path_type_repr.rs:5:40:5:42 | i32 | gen_path_type_repr.rs:5:40:5:42 | i32 | +| gen_path_type_repr.rs:5:45:5:47 | i32 | gen_path_type_repr.rs:5:45:5:47 | i32 | +| gen_path_type_repr.rs:6:14:6:20 | ...::Item | gen_path_type_repr.rs:6:14:6:20 | ...::Item | diff --git a/rust/ql/test/extractor-tests/generated/Path/PathTypeRepr.ql b/rust/ql/test/extractor-tests/generated/Path/PathTypeRepr.ql index 0be55070a1b..5ec18fd220a 100644 --- a/rust/ql/test/extractor-tests/generated/Path/PathTypeRepr.ql +++ b/rust/ql/test/extractor-tests/generated/Path/PathTypeRepr.ql @@ -2,9 +2,8 @@ import codeql.rust.elements import TestUtils -from PathTypeRepr x, string hasPath -where - toBeTested(x) and - not x.isUnknown() and - if x.hasPath() then hasPath = "yes" else hasPath = "no" -select x, "hasPath:", hasPath +query predicate instances(PathTypeRepr x) { toBeTested(x) and not x.isUnknown() } + +query predicate getPath(PathTypeRepr x, Path getPath) { + toBeTested(x) and not x.isUnknown() and getPath = x.getPath() +} diff --git a/rust/ql/test/extractor-tests/generated/Path/PathTypeRepr_getPath.expected b/rust/ql/test/extractor-tests/generated/Path/PathTypeRepr_getPath.expected deleted file mode 100644 index 57b46ef2813..00000000000 --- a/rust/ql/test/extractor-tests/generated/Path/PathTypeRepr_getPath.expected +++ /dev/null @@ -1,7 +0,0 @@ -| gen_path_expr.rs:7:14:7:14 | T | gen_path_expr.rs:7:14:7:14 | T | -| gen_path_expr.rs:8:14:8:21 | TypeRepr | gen_path_expr.rs:8:14:8:21 | TypeRepr | -| gen_path_expr.rs:8:26:8:30 | Trait | gen_path_expr.rs:8:26:8:30 | Trait | -| gen_path_type_repr.rs:5:14:5:48 | ...::HashMap::<...> | gen_path_type_repr.rs:5:14:5:48 | ...::HashMap::<...> | -| gen_path_type_repr.rs:5:40:5:42 | i32 | gen_path_type_repr.rs:5:40:5:42 | i32 | -| gen_path_type_repr.rs:5:45:5:47 | i32 | gen_path_type_repr.rs:5:45:5:47 | i32 | -| gen_path_type_repr.rs:6:14:6:20 | ...::Item | gen_path_type_repr.rs:6:14:6:20 | ...::Item | diff --git a/rust/ql/test/extractor-tests/generated/Path/PathTypeRepr_getPath.ql b/rust/ql/test/extractor-tests/generated/Path/PathTypeRepr_getPath.ql deleted file mode 100644 index b90c858b4cf..00000000000 --- a/rust/ql/test/extractor-tests/generated/Path/PathTypeRepr_getPath.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from PathTypeRepr x -where toBeTested(x) and not x.isUnknown() -select x, x.getPath() diff --git a/rust/ql/test/extractor-tests/generated/Path/Path_getQualifier.expected b/rust/ql/test/extractor-tests/generated/Path/Path_getQualifier.expected deleted file mode 100644 index de116eaca6a..00000000000 --- a/rust/ql/test/extractor-tests/generated/Path/Path_getQualifier.expected +++ /dev/null @@ -1,10 +0,0 @@ -| gen_path.rs:5:9:5:31 | ...::some_module | gen_path.rs:5:9:5:18 | some_crate | -| gen_path.rs:5:9:5:42 | ...::some_item | gen_path.rs:5:9:5:31 | ...::some_module | -| gen_path.rs:6:5:6:12 | ...::bar | gen_path.rs:6:5:6:7 | foo | -| gen_path_expr.rs:6:13:6:20 | ...::bar | gen_path_expr.rs:6:13:6:15 | foo | -| gen_path_expr.rs:7:13:7:20 | ...::foo | gen_path_expr.rs:7:13:7:15 | <...> | -| gen_path_expr.rs:8:13:8:36 | ...::foo | gen_path_expr.rs:8:13:8:31 | <...> | -| gen_path_pat.rs:6:9:6:16 | ...::Bar | gen_path_pat.rs:6:9:6:11 | Foo | -| gen_path_type_repr.rs:5:14:5:29 | ...::collections | gen_path_type_repr.rs:5:14:5:16 | std | -| gen_path_type_repr.rs:5:14:5:48 | ...::HashMap::<...> | gen_path_type_repr.rs:5:14:5:29 | ...::collections | -| gen_path_type_repr.rs:6:14:6:20 | ...::Item | gen_path_type_repr.rs:6:14:6:14 | X | diff --git a/rust/ql/test/extractor-tests/generated/Path/Path_getQualifier.ql b/rust/ql/test/extractor-tests/generated/Path/Path_getQualifier.ql deleted file mode 100644 index 7678cffceca..00000000000 --- a/rust/ql/test/extractor-tests/generated/Path/Path_getQualifier.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Path x -where toBeTested(x) and not x.isUnknown() -select x, x.getQualifier() diff --git a/rust/ql/test/extractor-tests/generated/Path/Path_getSegment.expected b/rust/ql/test/extractor-tests/generated/Path/Path_getSegment.expected deleted file mode 100644 index 54cad7249d6..00000000000 --- a/rust/ql/test/extractor-tests/generated/Path/Path_getSegment.expected +++ /dev/null @@ -1,25 +0,0 @@ -| gen_path.rs:5:9:5:18 | some_crate | gen_path.rs:5:9:5:18 | some_crate | -| gen_path.rs:5:9:5:31 | ...::some_module | gen_path.rs:5:21:5:31 | some_module | -| gen_path.rs:5:9:5:42 | ...::some_item | gen_path.rs:5:34:5:42 | some_item | -| gen_path.rs:6:5:6:7 | foo | gen_path.rs:6:5:6:7 | foo | -| gen_path.rs:6:5:6:12 | ...::bar | gen_path.rs:6:10:6:12 | bar | -| gen_path_expr.rs:5:13:5:20 | variable | gen_path_expr.rs:5:13:5:20 | variable | -| gen_path_expr.rs:6:13:6:15 | foo | gen_path_expr.rs:6:13:6:15 | foo | -| gen_path_expr.rs:6:13:6:20 | ...::bar | gen_path_expr.rs:6:18:6:20 | bar | -| gen_path_expr.rs:7:13:7:15 | <...> | gen_path_expr.rs:7:13:7:15 | <...> | -| gen_path_expr.rs:7:13:7:20 | ...::foo | gen_path_expr.rs:7:18:7:20 | foo | -| gen_path_expr.rs:7:14:7:14 | T | gen_path_expr.rs:7:14:7:14 | T | -| gen_path_expr.rs:8:13:8:31 | <...> | gen_path_expr.rs:8:13:8:31 | <...> | -| gen_path_expr.rs:8:13:8:36 | ...::foo | gen_path_expr.rs:8:34:8:36 | foo | -| gen_path_expr.rs:8:14:8:21 | TypeRepr | gen_path_expr.rs:8:14:8:21 | TypeRepr | -| gen_path_expr.rs:8:26:8:30 | Trait | gen_path_expr.rs:8:26:8:30 | Trait | -| gen_path_pat.rs:5:11:5:11 | x | gen_path_pat.rs:5:11:5:11 | x | -| gen_path_pat.rs:6:9:6:11 | Foo | gen_path_pat.rs:6:9:6:11 | Foo | -| gen_path_pat.rs:6:9:6:16 | ...::Bar | gen_path_pat.rs:6:14:6:16 | Bar | -| gen_path_type_repr.rs:5:14:5:16 | std | gen_path_type_repr.rs:5:14:5:16 | std | -| gen_path_type_repr.rs:5:14:5:29 | ...::collections | gen_path_type_repr.rs:5:19:5:29 | collections | -| gen_path_type_repr.rs:5:14:5:48 | ...::HashMap::<...> | gen_path_type_repr.rs:5:32:5:48 | HashMap::<...> | -| gen_path_type_repr.rs:5:40:5:42 | i32 | gen_path_type_repr.rs:5:40:5:42 | i32 | -| gen_path_type_repr.rs:5:45:5:47 | i32 | gen_path_type_repr.rs:5:45:5:47 | i32 | -| gen_path_type_repr.rs:6:14:6:14 | X | gen_path_type_repr.rs:6:14:6:14 | X | -| gen_path_type_repr.rs:6:14:6:20 | ...::Item | gen_path_type_repr.rs:6:17:6:20 | Item | diff --git a/rust/ql/test/extractor-tests/generated/Path/Path_getSegment.ql b/rust/ql/test/extractor-tests/generated/Path/Path_getSegment.ql deleted file mode 100644 index 7ccbefb4149..00000000000 --- a/rust/ql/test/extractor-tests/generated/Path/Path_getSegment.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Path x -where toBeTested(x) and not x.isUnknown() -select x, x.getSegment() diff --git a/rust/ql/test/extractor-tests/generated/PrefixExpr/Cargo.lock b/rust/ql/test/extractor-tests/generated/PrefixExpr/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/PrefixExpr/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr.expected b/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr.expected index 01ebd0f099c..056a1a6dd5d 100644 --- a/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr.expected +++ b/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr.expected @@ -1,3 +1,13 @@ -| gen_prefix_expr.rs:5:13:5:15 | - ... | getNumberOfAttrs: | 0 | hasExpr: | yes | hasOperatorName: | yes | -| gen_prefix_expr.rs:6:13:6:17 | ! ... | getNumberOfAttrs: | 0 | hasExpr: | yes | hasOperatorName: | yes | -| gen_prefix_expr.rs:7:13:7:16 | * ... | getNumberOfAttrs: | 0 | hasExpr: | yes | hasOperatorName: | yes | +instances +| gen_prefix_expr.rs:5:13:5:15 | - ... | +| gen_prefix_expr.rs:6:13:6:17 | ! ... | +| gen_prefix_expr.rs:7:13:7:16 | * ... | +getAttr +getExpr +| gen_prefix_expr.rs:5:13:5:15 | - ... | gen_prefix_expr.rs:5:14:5:15 | 42 | +| gen_prefix_expr.rs:6:13:6:17 | ! ... | gen_prefix_expr.rs:6:14:6:17 | true | +| gen_prefix_expr.rs:7:13:7:16 | * ... | gen_prefix_expr.rs:7:14:7:16 | ptr | +getOperatorName +| gen_prefix_expr.rs:5:13:5:15 | - ... | - | +| gen_prefix_expr.rs:6:13:6:17 | ! ... | ! | +| gen_prefix_expr.rs:7:13:7:16 | * ... | * | diff --git a/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr.ql b/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr.ql index 67d69c5363b..0765d6e07d9 100644 --- a/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr.ql +++ b/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr.ql @@ -2,12 +2,16 @@ import codeql.rust.elements import TestUtils -from PrefixExpr x, int getNumberOfAttrs, string hasExpr, string hasOperatorName -where - toBeTested(x) and - not x.isUnknown() and - getNumberOfAttrs = x.getNumberOfAttrs() and - (if x.hasExpr() then hasExpr = "yes" else hasExpr = "no") and - if x.hasOperatorName() then hasOperatorName = "yes" else hasOperatorName = "no" -select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasExpr:", hasExpr, "hasOperatorName:", - hasOperatorName +query predicate instances(PrefixExpr x) { toBeTested(x) and not x.isUnknown() } + +query predicate getAttr(PrefixExpr x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} + +query predicate getExpr(PrefixExpr x, Expr getExpr) { + toBeTested(x) and not x.isUnknown() and getExpr = x.getExpr() +} + +query predicate getOperatorName(PrefixExpr x, string getOperatorName) { + toBeTested(x) and not x.isUnknown() and getOperatorName = x.getOperatorName() +} diff --git a/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr_getAttr.ql deleted file mode 100644 index 813cb53ae4f..00000000000 --- a/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from PrefixExpr x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr_getExpr.expected b/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr_getExpr.expected deleted file mode 100644 index 6c9edcba00d..00000000000 --- a/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr_getExpr.expected +++ /dev/null @@ -1,3 +0,0 @@ -| gen_prefix_expr.rs:5:13:5:15 | - ... | gen_prefix_expr.rs:5:14:5:15 | 42 | -| gen_prefix_expr.rs:6:13:6:17 | ! ... | gen_prefix_expr.rs:6:14:6:17 | true | -| gen_prefix_expr.rs:7:13:7:16 | * ... | gen_prefix_expr.rs:7:14:7:16 | ptr | diff --git a/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr_getExpr.ql b/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr_getExpr.ql deleted file mode 100644 index d3e054d5eb8..00000000000 --- a/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr_getExpr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from PrefixExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getExpr() diff --git a/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr_getOperatorName.expected b/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr_getOperatorName.expected deleted file mode 100644 index 0cee9c31bc3..00000000000 --- a/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr_getOperatorName.expected +++ /dev/null @@ -1,3 +0,0 @@ -| gen_prefix_expr.rs:5:13:5:15 | - ... | - | -| gen_prefix_expr.rs:6:13:6:17 | ! ... | ! | -| gen_prefix_expr.rs:7:13:7:16 | * ... | * | diff --git a/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr_getOperatorName.ql b/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr_getOperatorName.ql deleted file mode 100644 index 0246ef2465c..00000000000 --- a/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr_getOperatorName.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from PrefixExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getOperatorName() diff --git a/rust/ql/test/extractor-tests/generated/PtrTypeRepr/Cargo.lock b/rust/ql/test/extractor-tests/generated/PtrTypeRepr/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/PtrTypeRepr/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/PtrTypeRepr/PtrTypeRepr.expected b/rust/ql/test/extractor-tests/generated/PtrTypeRepr/PtrTypeRepr.expected index b975dde09ff..6414c8ce04a 100644 --- a/rust/ql/test/extractor-tests/generated/PtrTypeRepr/PtrTypeRepr.expected +++ b/rust/ql/test/extractor-tests/generated/PtrTypeRepr/PtrTypeRepr.expected @@ -1,2 +1,6 @@ -| gen_ptr_type_repr.rs:7:12:7:21 | PtrTypeRepr | isConst: | yes | isMut: | no | hasTypeRepr: | yes | -| gen_ptr_type_repr.rs:8:12:8:19 | PtrTypeRepr | isConst: | no | isMut: | yes | hasTypeRepr: | yes | +instances +| gen_ptr_type_repr.rs:7:12:7:21 | PtrTypeRepr | isConst: | yes | isMut: | no | +| gen_ptr_type_repr.rs:8:12:8:19 | PtrTypeRepr | isConst: | no | isMut: | yes | +getTypeRepr +| gen_ptr_type_repr.rs:7:12:7:21 | PtrTypeRepr | gen_ptr_type_repr.rs:7:19:7:21 | i32 | +| gen_ptr_type_repr.rs:8:12:8:19 | PtrTypeRepr | gen_ptr_type_repr.rs:8:17:8:19 | i32 | diff --git a/rust/ql/test/extractor-tests/generated/PtrTypeRepr/PtrTypeRepr.ql b/rust/ql/test/extractor-tests/generated/PtrTypeRepr/PtrTypeRepr.ql index 4cbda847f32..d2a41eb9e59 100644 --- a/rust/ql/test/extractor-tests/generated/PtrTypeRepr/PtrTypeRepr.ql +++ b/rust/ql/test/extractor-tests/generated/PtrTypeRepr/PtrTypeRepr.ql @@ -2,11 +2,17 @@ import codeql.rust.elements import TestUtils -from PtrTypeRepr x, string isConst, string isMut, string hasTypeRepr -where +query predicate instances( + PtrTypeRepr x, string isConst__label, string isConst, string isMut__label, string isMut +) { toBeTested(x) and not x.isUnknown() and + isConst__label = "isConst:" and (if x.isConst() then isConst = "yes" else isConst = "no") and - (if x.isMut() then isMut = "yes" else isMut = "no") and - if x.hasTypeRepr() then hasTypeRepr = "yes" else hasTypeRepr = "no" -select x, "isConst:", isConst, "isMut:", isMut, "hasTypeRepr:", hasTypeRepr + isMut__label = "isMut:" and + if x.isMut() then isMut = "yes" else isMut = "no" +} + +query predicate getTypeRepr(PtrTypeRepr x, TypeRepr getTypeRepr) { + toBeTested(x) and not x.isUnknown() and getTypeRepr = x.getTypeRepr() +} diff --git a/rust/ql/test/extractor-tests/generated/PtrTypeRepr/PtrTypeRepr_getTypeRepr.expected b/rust/ql/test/extractor-tests/generated/PtrTypeRepr/PtrTypeRepr_getTypeRepr.expected deleted file mode 100644 index 8006e33f1d6..00000000000 --- a/rust/ql/test/extractor-tests/generated/PtrTypeRepr/PtrTypeRepr_getTypeRepr.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_ptr_type_repr.rs:7:12:7:21 | PtrTypeRepr | gen_ptr_type_repr.rs:7:19:7:21 | i32 | -| gen_ptr_type_repr.rs:8:12:8:19 | PtrTypeRepr | gen_ptr_type_repr.rs:8:17:8:19 | i32 | diff --git a/rust/ql/test/extractor-tests/generated/PtrTypeRepr/PtrTypeRepr_getTypeRepr.ql b/rust/ql/test/extractor-tests/generated/PtrTypeRepr/PtrTypeRepr_getTypeRepr.ql deleted file mode 100644 index 8200677c2b5..00000000000 --- a/rust/ql/test/extractor-tests/generated/PtrTypeRepr/PtrTypeRepr_getTypeRepr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from PtrTypeRepr x -where toBeTested(x) and not x.isUnknown() -select x, x.getTypeRepr() diff --git a/rust/ql/test/extractor-tests/generated/RangeExpr/Cargo.lock b/rust/ql/test/extractor-tests/generated/RangeExpr/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RangeExpr/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr.expected b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr.expected index 7d8aeff6dfa..a79ce67401a 100644 --- a/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr.expected +++ b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr.expected @@ -1,6 +1,24 @@ -| gen_range_expr.rs:5:13:5:18 | 1..=10 | getNumberOfAttrs: | 0 | hasEnd: | yes | hasOperatorName: | yes | hasStart: | yes | -| gen_range_expr.rs:6:13:6:17 | 1..10 | getNumberOfAttrs: | 0 | hasEnd: | yes | hasOperatorName: | yes | hasStart: | yes | -| gen_range_expr.rs:7:13:7:16 | 10.. | getNumberOfAttrs: | 0 | hasEnd: | no | hasOperatorName: | yes | hasStart: | yes | -| gen_range_expr.rs:8:13:8:16 | ..10 | getNumberOfAttrs: | 0 | hasEnd: | yes | hasOperatorName: | yes | hasStart: | no | -| gen_range_expr.rs:9:13:9:17 | ..=10 | getNumberOfAttrs: | 0 | hasEnd: | yes | hasOperatorName: | yes | hasStart: | no | -| gen_range_expr.rs:10:13:10:14 | .. | getNumberOfAttrs: | 0 | hasEnd: | no | hasOperatorName: | yes | hasStart: | no | +instances +| gen_range_expr.rs:5:13:5:18 | 1..=10 | +| gen_range_expr.rs:6:13:6:17 | 1..10 | +| gen_range_expr.rs:7:13:7:16 | 10.. | +| gen_range_expr.rs:8:13:8:16 | ..10 | +| gen_range_expr.rs:9:13:9:17 | ..=10 | +| gen_range_expr.rs:10:13:10:14 | .. | +getAttr +getEnd +| gen_range_expr.rs:5:13:5:18 | 1..=10 | gen_range_expr.rs:5:17:5:18 | 10 | +| gen_range_expr.rs:6:13:6:17 | 1..10 | gen_range_expr.rs:6:16:6:17 | 10 | +| gen_range_expr.rs:8:13:8:16 | ..10 | gen_range_expr.rs:8:15:8:16 | 10 | +| gen_range_expr.rs:9:13:9:17 | ..=10 | gen_range_expr.rs:9:16:9:17 | 10 | +getOperatorName +| gen_range_expr.rs:5:13:5:18 | 1..=10 | ..= | +| gen_range_expr.rs:6:13:6:17 | 1..10 | .. | +| gen_range_expr.rs:7:13:7:16 | 10.. | .. | +| gen_range_expr.rs:8:13:8:16 | ..10 | .. | +| gen_range_expr.rs:9:13:9:17 | ..=10 | ..= | +| gen_range_expr.rs:10:13:10:14 | .. | .. | +getStart +| gen_range_expr.rs:5:13:5:18 | 1..=10 | gen_range_expr.rs:5:13:5:13 | 1 | +| gen_range_expr.rs:6:13:6:17 | 1..10 | gen_range_expr.rs:6:13:6:13 | 1 | +| gen_range_expr.rs:7:13:7:16 | 10.. | gen_range_expr.rs:7:13:7:14 | 10 | diff --git a/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr.ql b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr.ql index c664f1d747e..69a699f14be 100644 --- a/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr.ql +++ b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr.ql @@ -2,13 +2,20 @@ import codeql.rust.elements import TestUtils -from RangeExpr x, int getNumberOfAttrs, string hasEnd, string hasOperatorName, string hasStart -where - toBeTested(x) and - not x.isUnknown() and - getNumberOfAttrs = x.getNumberOfAttrs() and - (if x.hasEnd() then hasEnd = "yes" else hasEnd = "no") and - (if x.hasOperatorName() then hasOperatorName = "yes" else hasOperatorName = "no") and - if x.hasStart() then hasStart = "yes" else hasStart = "no" -select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasEnd:", hasEnd, "hasOperatorName:", - hasOperatorName, "hasStart:", hasStart +query predicate instances(RangeExpr x) { toBeTested(x) and not x.isUnknown() } + +query predicate getAttr(RangeExpr x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} + +query predicate getEnd(RangeExpr x, Expr getEnd) { + toBeTested(x) and not x.isUnknown() and getEnd = x.getEnd() +} + +query predicate getOperatorName(RangeExpr x, string getOperatorName) { + toBeTested(x) and not x.isUnknown() and getOperatorName = x.getOperatorName() +} + +query predicate getStart(RangeExpr x, Expr getStart) { + toBeTested(x) and not x.isUnknown() and getStart = x.getStart() +} diff --git a/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getAttr.ql deleted file mode 100644 index 1c538e88c29..00000000000 --- a/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from RangeExpr x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getEnd.expected b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getEnd.expected deleted file mode 100644 index 46f5dba778c..00000000000 --- a/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getEnd.expected +++ /dev/null @@ -1,4 +0,0 @@ -| gen_range_expr.rs:5:13:5:18 | 1..=10 | gen_range_expr.rs:5:17:5:18 | 10 | -| gen_range_expr.rs:6:13:6:17 | 1..10 | gen_range_expr.rs:6:16:6:17 | 10 | -| gen_range_expr.rs:8:13:8:16 | ..10 | gen_range_expr.rs:8:15:8:16 | 10 | -| gen_range_expr.rs:9:13:9:17 | ..=10 | gen_range_expr.rs:9:16:9:17 | 10 | diff --git a/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getEnd.ql b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getEnd.ql deleted file mode 100644 index c39a039099d..00000000000 --- a/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getEnd.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from RangeExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getEnd() diff --git a/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getOperatorName.expected b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getOperatorName.expected deleted file mode 100644 index ee9172ac1ce..00000000000 --- a/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getOperatorName.expected +++ /dev/null @@ -1,6 +0,0 @@ -| gen_range_expr.rs:5:13:5:18 | 1..=10 | ..= | -| gen_range_expr.rs:6:13:6:17 | 1..10 | .. | -| gen_range_expr.rs:7:13:7:16 | 10.. | .. | -| gen_range_expr.rs:8:13:8:16 | ..10 | .. | -| gen_range_expr.rs:9:13:9:17 | ..=10 | ..= | -| gen_range_expr.rs:10:13:10:14 | .. | .. | diff --git a/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getOperatorName.ql b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getOperatorName.ql deleted file mode 100644 index f554a9ecf74..00000000000 --- a/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getOperatorName.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from RangeExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getOperatorName() diff --git a/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getStart.expected b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getStart.expected deleted file mode 100644 index 7f58ee5299f..00000000000 --- a/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getStart.expected +++ /dev/null @@ -1,3 +0,0 @@ -| gen_range_expr.rs:5:13:5:18 | 1..=10 | gen_range_expr.rs:5:13:5:13 | 1 | -| gen_range_expr.rs:6:13:6:17 | 1..10 | gen_range_expr.rs:6:13:6:13 | 1 | -| gen_range_expr.rs:7:13:7:16 | 10.. | gen_range_expr.rs:7:13:7:14 | 10 | diff --git a/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getStart.ql b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getStart.ql deleted file mode 100644 index d47b9e81b86..00000000000 --- a/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getStart.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from RangeExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getStart() diff --git a/rust/ql/test/extractor-tests/generated/RangePat/Cargo.lock b/rust/ql/test/extractor-tests/generated/RangePat/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RangePat/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/RangePat/RangePat.expected b/rust/ql/test/extractor-tests/generated/RangePat/RangePat.expected index ec32f2a5a1c..969ccf754df 100644 --- a/rust/ql/test/extractor-tests/generated/RangePat/RangePat.expected +++ b/rust/ql/test/extractor-tests/generated/RangePat/RangePat.expected @@ -1,3 +1,14 @@ -| gen_range_pat.rs:6:9:6:12 | RangePat | hasEnd: | yes | hasOperatorName: | yes | hasStart: | no | -| gen_range_pat.rs:7:9:7:15 | RangePat | hasEnd: | yes | hasOperatorName: | yes | hasStart: | yes | -| gen_range_pat.rs:8:9:8:12 | RangePat | hasEnd: | no | hasOperatorName: | yes | hasStart: | yes | +instances +| gen_range_pat.rs:6:9:6:12 | RangePat | +| gen_range_pat.rs:7:9:7:15 | RangePat | +| gen_range_pat.rs:8:9:8:12 | RangePat | +getEnd +| gen_range_pat.rs:6:9:6:12 | RangePat | gen_range_pat.rs:6:11:6:12 | 15 | +| gen_range_pat.rs:7:9:7:15 | RangePat | gen_range_pat.rs:7:14:7:15 | 25 | +getOperatorName +| gen_range_pat.rs:6:9:6:12 | RangePat | .. | +| gen_range_pat.rs:7:9:7:15 | RangePat | ..= | +| gen_range_pat.rs:8:9:8:12 | RangePat | .. | +getStart +| gen_range_pat.rs:7:9:7:15 | RangePat | gen_range_pat.rs:7:9:7:10 | 16 | +| gen_range_pat.rs:8:9:8:12 | RangePat | gen_range_pat.rs:8:9:8:10 | 26 | diff --git a/rust/ql/test/extractor-tests/generated/RangePat/RangePat.ql b/rust/ql/test/extractor-tests/generated/RangePat/RangePat.ql index d9b4bb41348..19070c77f26 100644 --- a/rust/ql/test/extractor-tests/generated/RangePat/RangePat.ql +++ b/rust/ql/test/extractor-tests/generated/RangePat/RangePat.ql @@ -2,11 +2,16 @@ import codeql.rust.elements import TestUtils -from RangePat x, string hasEnd, string hasOperatorName, string hasStart -where - toBeTested(x) and - not x.isUnknown() and - (if x.hasEnd() then hasEnd = "yes" else hasEnd = "no") and - (if x.hasOperatorName() then hasOperatorName = "yes" else hasOperatorName = "no") and - if x.hasStart() then hasStart = "yes" else hasStart = "no" -select x, "hasEnd:", hasEnd, "hasOperatorName:", hasOperatorName, "hasStart:", hasStart +query predicate instances(RangePat x) { toBeTested(x) and not x.isUnknown() } + +query predicate getEnd(RangePat x, Pat getEnd) { + toBeTested(x) and not x.isUnknown() and getEnd = x.getEnd() +} + +query predicate getOperatorName(RangePat x, string getOperatorName) { + toBeTested(x) and not x.isUnknown() and getOperatorName = x.getOperatorName() +} + +query predicate getStart(RangePat x, Pat getStart) { + toBeTested(x) and not x.isUnknown() and getStart = x.getStart() +} diff --git a/rust/ql/test/extractor-tests/generated/RangePat/RangePat_getEnd.expected b/rust/ql/test/extractor-tests/generated/RangePat/RangePat_getEnd.expected deleted file mode 100644 index 38ded3fb940..00000000000 --- a/rust/ql/test/extractor-tests/generated/RangePat/RangePat_getEnd.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_range_pat.rs:6:9:6:12 | RangePat | gen_range_pat.rs:6:11:6:12 | 15 | -| gen_range_pat.rs:7:9:7:15 | RangePat | gen_range_pat.rs:7:14:7:15 | 25 | diff --git a/rust/ql/test/extractor-tests/generated/RangePat/RangePat_getEnd.ql b/rust/ql/test/extractor-tests/generated/RangePat/RangePat_getEnd.ql deleted file mode 100644 index 61a27c77543..00000000000 --- a/rust/ql/test/extractor-tests/generated/RangePat/RangePat_getEnd.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from RangePat x -where toBeTested(x) and not x.isUnknown() -select x, x.getEnd() diff --git a/rust/ql/test/extractor-tests/generated/RangePat/RangePat_getOperatorName.expected b/rust/ql/test/extractor-tests/generated/RangePat/RangePat_getOperatorName.expected deleted file mode 100644 index 537608104c7..00000000000 --- a/rust/ql/test/extractor-tests/generated/RangePat/RangePat_getOperatorName.expected +++ /dev/null @@ -1,3 +0,0 @@ -| gen_range_pat.rs:6:9:6:12 | RangePat | .. | -| gen_range_pat.rs:7:9:7:15 | RangePat | ..= | -| gen_range_pat.rs:8:9:8:12 | RangePat | .. | diff --git a/rust/ql/test/extractor-tests/generated/RangePat/RangePat_getOperatorName.ql b/rust/ql/test/extractor-tests/generated/RangePat/RangePat_getOperatorName.ql deleted file mode 100644 index f2f3052eae3..00000000000 --- a/rust/ql/test/extractor-tests/generated/RangePat/RangePat_getOperatorName.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from RangePat x -where toBeTested(x) and not x.isUnknown() -select x, x.getOperatorName() diff --git a/rust/ql/test/extractor-tests/generated/RangePat/RangePat_getStart.expected b/rust/ql/test/extractor-tests/generated/RangePat/RangePat_getStart.expected deleted file mode 100644 index ac6eadaf08c..00000000000 --- a/rust/ql/test/extractor-tests/generated/RangePat/RangePat_getStart.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_range_pat.rs:7:9:7:15 | RangePat | gen_range_pat.rs:7:9:7:10 | 16 | -| gen_range_pat.rs:8:9:8:12 | RangePat | gen_range_pat.rs:8:9:8:10 | 26 | diff --git a/rust/ql/test/extractor-tests/generated/RangePat/RangePat_getStart.ql b/rust/ql/test/extractor-tests/generated/RangePat/RangePat_getStart.ql deleted file mode 100644 index 29bbeda81cf..00000000000 --- a/rust/ql/test/extractor-tests/generated/RangePat/RangePat_getStart.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from RangePat x -where toBeTested(x) and not x.isUnknown() -select x, x.getStart() diff --git a/rust/ql/test/extractor-tests/generated/RefExpr/Cargo.lock b/rust/ql/test/extractor-tests/generated/RefExpr/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RefExpr/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/RefExpr/RefExpr.expected b/rust/ql/test/extractor-tests/generated/RefExpr/RefExpr.expected index 412f8214206..031daf88888 100644 --- a/rust/ql/test/extractor-tests/generated/RefExpr/RefExpr.expected +++ b/rust/ql/test/extractor-tests/generated/RefExpr/RefExpr.expected @@ -1,4 +1,11 @@ -| gen_ref_expr.rs:5:25:5:28 | &foo | getNumberOfAttrs: | 0 | hasExpr: | yes | isConst: | no | isMut: | no | isRaw: | no | -| gen_ref_expr.rs:6:23:6:30 | &mut foo | getNumberOfAttrs: | 0 | hasExpr: | yes | isConst: | no | isMut: | yes | isRaw: | no | -| gen_ref_expr.rs:7:35:7:48 | &raw const foo | getNumberOfAttrs: | 0 | hasExpr: | yes | isConst: | yes | isMut: | no | isRaw: | yes | -| gen_ref_expr.rs:8:33:8:44 | &raw mut foo | getNumberOfAttrs: | 0 | hasExpr: | yes | isConst: | no | isMut: | yes | isRaw: | yes | +instances +| gen_ref_expr.rs:5:25:5:28 | &foo | isConst: | no | isMut: | no | isRaw: | no | +| gen_ref_expr.rs:6:23:6:30 | &mut foo | isConst: | no | isMut: | yes | isRaw: | no | +| gen_ref_expr.rs:7:35:7:48 | &raw const foo | isConst: | yes | isMut: | no | isRaw: | yes | +| gen_ref_expr.rs:8:33:8:44 | &raw mut foo | isConst: | no | isMut: | yes | isRaw: | yes | +getAttr +getExpr +| gen_ref_expr.rs:5:25:5:28 | &foo | gen_ref_expr.rs:5:26:5:28 | foo | +| gen_ref_expr.rs:6:23:6:30 | &mut foo | gen_ref_expr.rs:6:28:6:30 | foo | +| gen_ref_expr.rs:7:35:7:48 | &raw const foo | gen_ref_expr.rs:7:46:7:48 | foo | +| gen_ref_expr.rs:8:33:8:44 | &raw mut foo | gen_ref_expr.rs:8:42:8:44 | foo | diff --git a/rust/ql/test/extractor-tests/generated/RefExpr/RefExpr.ql b/rust/ql/test/extractor-tests/generated/RefExpr/RefExpr.ql index a2567b81ed7..a9ae1f9ae8d 100644 --- a/rust/ql/test/extractor-tests/generated/RefExpr/RefExpr.ql +++ b/rust/ql/test/extractor-tests/generated/RefExpr/RefExpr.ql @@ -2,14 +2,24 @@ import codeql.rust.elements import TestUtils -from RefExpr x, int getNumberOfAttrs, string hasExpr, string isConst, string isMut, string isRaw -where +query predicate instances( + RefExpr x, string isConst__label, string isConst, string isMut__label, string isMut, + string isRaw__label, string isRaw +) { toBeTested(x) and not x.isUnknown() and - getNumberOfAttrs = x.getNumberOfAttrs() and - (if x.hasExpr() then hasExpr = "yes" else hasExpr = "no") and + isConst__label = "isConst:" and (if x.isConst() then isConst = "yes" else isConst = "no") and + isMut__label = "isMut:" and (if x.isMut() then isMut = "yes" else isMut = "no") and + isRaw__label = "isRaw:" and if x.isRaw() then isRaw = "yes" else isRaw = "no" -select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasExpr:", hasExpr, "isConst:", isConst, "isMut:", - isMut, "isRaw:", isRaw +} + +query predicate getAttr(RefExpr x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} + +query predicate getExpr(RefExpr x, Expr getExpr) { + toBeTested(x) and not x.isUnknown() and getExpr = x.getExpr() +} diff --git a/rust/ql/test/extractor-tests/generated/RefExpr/RefExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/RefExpr/RefExpr_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/RefExpr/RefExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/RefExpr/RefExpr_getAttr.ql deleted file mode 100644 index 7ef6d44228e..00000000000 --- a/rust/ql/test/extractor-tests/generated/RefExpr/RefExpr_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from RefExpr x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/RefExpr/RefExpr_getExpr.expected b/rust/ql/test/extractor-tests/generated/RefExpr/RefExpr_getExpr.expected deleted file mode 100644 index 7709668f6fd..00000000000 --- a/rust/ql/test/extractor-tests/generated/RefExpr/RefExpr_getExpr.expected +++ /dev/null @@ -1,4 +0,0 @@ -| gen_ref_expr.rs:5:25:5:28 | &foo | gen_ref_expr.rs:5:26:5:28 | foo | -| gen_ref_expr.rs:6:23:6:30 | &mut foo | gen_ref_expr.rs:6:28:6:30 | foo | -| gen_ref_expr.rs:7:35:7:48 | &raw const foo | gen_ref_expr.rs:7:46:7:48 | foo | -| gen_ref_expr.rs:8:33:8:44 | &raw mut foo | gen_ref_expr.rs:8:42:8:44 | foo | diff --git a/rust/ql/test/extractor-tests/generated/RefExpr/RefExpr_getExpr.ql b/rust/ql/test/extractor-tests/generated/RefExpr/RefExpr_getExpr.ql deleted file mode 100644 index b1404db9783..00000000000 --- a/rust/ql/test/extractor-tests/generated/RefExpr/RefExpr_getExpr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from RefExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getExpr() diff --git a/rust/ql/test/extractor-tests/generated/RefPat/Cargo.lock b/rust/ql/test/extractor-tests/generated/RefPat/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RefPat/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/RefPat/RefPat.expected b/rust/ql/test/extractor-tests/generated/RefPat/RefPat.expected index a9dfaf87456..0babab322d3 100644 --- a/rust/ql/test/extractor-tests/generated/RefPat/RefPat.expected +++ b/rust/ql/test/extractor-tests/generated/RefPat/RefPat.expected @@ -1,2 +1,6 @@ -| gen_ref_pat.rs:6:9:6:28 | &mut ... | isMut: | yes | hasPat: | yes | -| gen_ref_pat.rs:7:9:7:21 | &...::None | isMut: | no | hasPat: | yes | +instances +| gen_ref_pat.rs:6:9:6:28 | &mut ... | isMut: | yes | +| gen_ref_pat.rs:7:9:7:21 | &...::None | isMut: | no | +getPat +| gen_ref_pat.rs:6:9:6:28 | &mut ... | gen_ref_pat.rs:6:14:6:28 | ...::Some(...) | +| gen_ref_pat.rs:7:9:7:21 | &...::None | gen_ref_pat.rs:7:10:7:21 | ...::None | diff --git a/rust/ql/test/extractor-tests/generated/RefPat/RefPat.ql b/rust/ql/test/extractor-tests/generated/RefPat/RefPat.ql index 4ae72433dad..3e8ec464569 100644 --- a/rust/ql/test/extractor-tests/generated/RefPat/RefPat.ql +++ b/rust/ql/test/extractor-tests/generated/RefPat/RefPat.ql @@ -2,10 +2,13 @@ import codeql.rust.elements import TestUtils -from RefPat x, string isMut, string hasPat -where +query predicate instances(RefPat x, string isMut__label, string isMut) { toBeTested(x) and not x.isUnknown() and - (if x.isMut() then isMut = "yes" else isMut = "no") and - if x.hasPat() then hasPat = "yes" else hasPat = "no" -select x, "isMut:", isMut, "hasPat:", hasPat + isMut__label = "isMut:" and + if x.isMut() then isMut = "yes" else isMut = "no" +} + +query predicate getPat(RefPat x, Pat getPat) { + toBeTested(x) and not x.isUnknown() and getPat = x.getPat() +} diff --git a/rust/ql/test/extractor-tests/generated/RefPat/RefPat_getPat.expected b/rust/ql/test/extractor-tests/generated/RefPat/RefPat_getPat.expected deleted file mode 100644 index 029fd9fa172..00000000000 --- a/rust/ql/test/extractor-tests/generated/RefPat/RefPat_getPat.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_ref_pat.rs:6:9:6:28 | &mut ... | gen_ref_pat.rs:6:14:6:28 | ...::Some(...) | -| gen_ref_pat.rs:7:9:7:21 | &...::None | gen_ref_pat.rs:7:10:7:21 | ...::None | diff --git a/rust/ql/test/extractor-tests/generated/RefPat/RefPat_getPat.ql b/rust/ql/test/extractor-tests/generated/RefPat/RefPat_getPat.ql deleted file mode 100644 index 758e4e7895e..00000000000 --- a/rust/ql/test/extractor-tests/generated/RefPat/RefPat_getPat.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from RefPat x -where toBeTested(x) and not x.isUnknown() -select x, x.getPat() diff --git a/rust/ql/test/extractor-tests/generated/RefTypeRepr/Cargo.lock b/rust/ql/test/extractor-tests/generated/RefTypeRepr/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RefTypeRepr/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/RefTypeRepr/RefTypeRepr.expected b/rust/ql/test/extractor-tests/generated/RefTypeRepr/RefTypeRepr.expected index da74246c0db..d48b8b7b998 100644 --- a/rust/ql/test/extractor-tests/generated/RefTypeRepr/RefTypeRepr.expected +++ b/rust/ql/test/extractor-tests/generated/RefTypeRepr/RefTypeRepr.expected @@ -1,2 +1,7 @@ -| gen_ref_type_repr.rs:7:12:7:15 | RefTypeRepr | isMut: | no | hasLifetime: | no | hasTypeRepr: | yes | -| gen_ref_type_repr.rs:8:12:8:19 | RefTypeRepr | isMut: | yes | hasLifetime: | no | hasTypeRepr: | yes | +instances +| gen_ref_type_repr.rs:7:12:7:15 | RefTypeRepr | isMut: | no | +| gen_ref_type_repr.rs:8:12:8:19 | RefTypeRepr | isMut: | yes | +getLifetime +getTypeRepr +| gen_ref_type_repr.rs:7:12:7:15 | RefTypeRepr | gen_ref_type_repr.rs:7:13:7:15 | i32 | +| gen_ref_type_repr.rs:8:12:8:19 | RefTypeRepr | gen_ref_type_repr.rs:8:17:8:19 | i32 | diff --git a/rust/ql/test/extractor-tests/generated/RefTypeRepr/RefTypeRepr.ql b/rust/ql/test/extractor-tests/generated/RefTypeRepr/RefTypeRepr.ql index e60d7faa8ed..a414e9a3e66 100644 --- a/rust/ql/test/extractor-tests/generated/RefTypeRepr/RefTypeRepr.ql +++ b/rust/ql/test/extractor-tests/generated/RefTypeRepr/RefTypeRepr.ql @@ -2,11 +2,17 @@ import codeql.rust.elements import TestUtils -from RefTypeRepr x, string isMut, string hasLifetime, string hasTypeRepr -where +query predicate instances(RefTypeRepr x, string isMut__label, string isMut) { toBeTested(x) and not x.isUnknown() and - (if x.isMut() then isMut = "yes" else isMut = "no") and - (if x.hasLifetime() then hasLifetime = "yes" else hasLifetime = "no") and - if x.hasTypeRepr() then hasTypeRepr = "yes" else hasTypeRepr = "no" -select x, "isMut:", isMut, "hasLifetime:", hasLifetime, "hasTypeRepr:", hasTypeRepr + isMut__label = "isMut:" and + if x.isMut() then isMut = "yes" else isMut = "no" +} + +query predicate getLifetime(RefTypeRepr x, Lifetime getLifetime) { + toBeTested(x) and not x.isUnknown() and getLifetime = x.getLifetime() +} + +query predicate getTypeRepr(RefTypeRepr x, TypeRepr getTypeRepr) { + toBeTested(x) and not x.isUnknown() and getTypeRepr = x.getTypeRepr() +} diff --git a/rust/ql/test/extractor-tests/generated/RefTypeRepr/RefTypeRepr_getLifetime.expected b/rust/ql/test/extractor-tests/generated/RefTypeRepr/RefTypeRepr_getLifetime.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/RefTypeRepr/RefTypeRepr_getLifetime.ql b/rust/ql/test/extractor-tests/generated/RefTypeRepr/RefTypeRepr_getLifetime.ql deleted file mode 100644 index 9d857300ea4..00000000000 --- a/rust/ql/test/extractor-tests/generated/RefTypeRepr/RefTypeRepr_getLifetime.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from RefTypeRepr x -where toBeTested(x) and not x.isUnknown() -select x, x.getLifetime() diff --git a/rust/ql/test/extractor-tests/generated/RefTypeRepr/RefTypeRepr_getTypeRepr.expected b/rust/ql/test/extractor-tests/generated/RefTypeRepr/RefTypeRepr_getTypeRepr.expected deleted file mode 100644 index 59518bf3743..00000000000 --- a/rust/ql/test/extractor-tests/generated/RefTypeRepr/RefTypeRepr_getTypeRepr.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_ref_type_repr.rs:7:12:7:15 | RefTypeRepr | gen_ref_type_repr.rs:7:13:7:15 | i32 | -| gen_ref_type_repr.rs:8:12:8:19 | RefTypeRepr | gen_ref_type_repr.rs:8:17:8:19 | i32 | diff --git a/rust/ql/test/extractor-tests/generated/RefTypeRepr/RefTypeRepr_getTypeRepr.ql b/rust/ql/test/extractor-tests/generated/RefTypeRepr/RefTypeRepr_getTypeRepr.ql deleted file mode 100644 index 1e04fa75ab3..00000000000 --- a/rust/ql/test/extractor-tests/generated/RefTypeRepr/RefTypeRepr_getTypeRepr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from RefTypeRepr x -where toBeTested(x) and not x.isUnknown() -select x, x.getTypeRepr() diff --git a/rust/ql/test/extractor-tests/generated/Rename/Cargo.lock b/rust/ql/test/extractor-tests/generated/Rename/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Rename/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/Rename/Rename.expected b/rust/ql/test/extractor-tests/generated/Rename/Rename.expected index 3568d798d28..73137c57c98 100644 --- a/rust/ql/test/extractor-tests/generated/Rename/Rename.expected +++ b/rust/ql/test/extractor-tests/generated/Rename/Rename.expected @@ -1 +1,4 @@ -| gen_rename.rs:7:13:7:18 | Rename | hasName: | yes | +instances +| gen_rename.rs:7:13:7:18 | Rename | +getName +| gen_rename.rs:7:13:7:18 | Rename | gen_rename.rs:7:16:7:18 | bar | diff --git a/rust/ql/test/extractor-tests/generated/Rename/Rename.ql b/rust/ql/test/extractor-tests/generated/Rename/Rename.ql index 91e748797f2..170b5e8bd7b 100644 --- a/rust/ql/test/extractor-tests/generated/Rename/Rename.ql +++ b/rust/ql/test/extractor-tests/generated/Rename/Rename.ql @@ -2,9 +2,8 @@ import codeql.rust.elements import TestUtils -from Rename x, string hasName -where - toBeTested(x) and - not x.isUnknown() and - if x.hasName() then hasName = "yes" else hasName = "no" -select x, "hasName:", hasName +query predicate instances(Rename x) { toBeTested(x) and not x.isUnknown() } + +query predicate getName(Rename x, Name getName) { + toBeTested(x) and not x.isUnknown() and getName = x.getName() +} diff --git a/rust/ql/test/extractor-tests/generated/Rename/Rename_getName.expected b/rust/ql/test/extractor-tests/generated/Rename/Rename_getName.expected deleted file mode 100644 index 323982f910d..00000000000 --- a/rust/ql/test/extractor-tests/generated/Rename/Rename_getName.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_rename.rs:7:13:7:18 | Rename | gen_rename.rs:7:16:7:18 | bar | diff --git a/rust/ql/test/extractor-tests/generated/Rename/Rename_getName.ql b/rust/ql/test/extractor-tests/generated/Rename/Rename_getName.ql deleted file mode 100644 index 59df9dcf5ca..00000000000 --- a/rust/ql/test/extractor-tests/generated/Rename/Rename_getName.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Rename x -where toBeTested(x) and not x.isUnknown() -select x, x.getName() diff --git a/rust/ql/test/extractor-tests/generated/RestPat/Cargo.lock b/rust/ql/test/extractor-tests/generated/RestPat/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RestPat/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/RestPat/RestPat.expected b/rust/ql/test/extractor-tests/generated/RestPat/RestPat.expected index c5d19cda38d..6fd34b7cf23 100644 --- a/rust/ql/test/extractor-tests/generated/RestPat/RestPat.expected +++ b/rust/ql/test/extractor-tests/generated/RestPat/RestPat.expected @@ -1 +1,3 @@ -| gen_rest_pat.rs:7:13:7:14 | .. | getNumberOfAttrs: | 0 | +instances +| gen_rest_pat.rs:7:13:7:14 | .. | +getAttr diff --git a/rust/ql/test/extractor-tests/generated/RestPat/RestPat.ql b/rust/ql/test/extractor-tests/generated/RestPat/RestPat.ql index c3cb2a24f83..3754d7fd2f2 100644 --- a/rust/ql/test/extractor-tests/generated/RestPat/RestPat.ql +++ b/rust/ql/test/extractor-tests/generated/RestPat/RestPat.ql @@ -2,9 +2,8 @@ import codeql.rust.elements import TestUtils -from RestPat x, int getNumberOfAttrs -where - toBeTested(x) and - not x.isUnknown() and - getNumberOfAttrs = x.getNumberOfAttrs() -select x, "getNumberOfAttrs:", getNumberOfAttrs +query predicate instances(RestPat x) { toBeTested(x) and not x.isUnknown() } + +query predicate getAttr(RestPat x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} diff --git a/rust/ql/test/extractor-tests/generated/RestPat/RestPat_getAttr.expected b/rust/ql/test/extractor-tests/generated/RestPat/RestPat_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/RestPat/RestPat_getAttr.ql b/rust/ql/test/extractor-tests/generated/RestPat/RestPat_getAttr.ql deleted file mode 100644 index e85a7975b6b..00000000000 --- a/rust/ql/test/extractor-tests/generated/RestPat/RestPat_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from RestPat x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/RetTypeRepr/Cargo.lock b/rust/ql/test/extractor-tests/generated/RetTypeRepr/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RetTypeRepr/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/RetTypeRepr/RetTypeRepr.expected b/rust/ql/test/extractor-tests/generated/RetTypeRepr/RetTypeRepr.expected index 18726b694bf..5b661298194 100644 --- a/rust/ql/test/extractor-tests/generated/RetTypeRepr/RetTypeRepr.expected +++ b/rust/ql/test/extractor-tests/generated/RetTypeRepr/RetTypeRepr.expected @@ -1,2 +1,6 @@ -| gen_ret_type_repr.rs:3:25:3:29 | RetTypeRepr | hasTypeRepr: | yes | -| gen_ret_type_repr.rs:7:14:7:19 | RetTypeRepr | hasTypeRepr: | yes | +instances +| gen_ret_type_repr.rs:3:25:3:29 | RetTypeRepr | +| gen_ret_type_repr.rs:7:14:7:19 | RetTypeRepr | +getTypeRepr +| gen_ret_type_repr.rs:3:25:3:29 | RetTypeRepr | gen_ret_type_repr.rs:3:28:3:29 | TupleTypeRepr | +| gen_ret_type_repr.rs:7:14:7:19 | RetTypeRepr | gen_ret_type_repr.rs:7:17:7:19 | i32 | diff --git a/rust/ql/test/extractor-tests/generated/RetTypeRepr/RetTypeRepr.ql b/rust/ql/test/extractor-tests/generated/RetTypeRepr/RetTypeRepr.ql index d03f9d4f1b6..b92b05897e8 100644 --- a/rust/ql/test/extractor-tests/generated/RetTypeRepr/RetTypeRepr.ql +++ b/rust/ql/test/extractor-tests/generated/RetTypeRepr/RetTypeRepr.ql @@ -2,9 +2,8 @@ import codeql.rust.elements import TestUtils -from RetTypeRepr x, string hasTypeRepr -where - toBeTested(x) and - not x.isUnknown() and - if x.hasTypeRepr() then hasTypeRepr = "yes" else hasTypeRepr = "no" -select x, "hasTypeRepr:", hasTypeRepr +query predicate instances(RetTypeRepr x) { toBeTested(x) and not x.isUnknown() } + +query predicate getTypeRepr(RetTypeRepr x, TypeRepr getTypeRepr) { + toBeTested(x) and not x.isUnknown() and getTypeRepr = x.getTypeRepr() +} diff --git a/rust/ql/test/extractor-tests/generated/RetTypeRepr/RetTypeRepr_getTypeRepr.expected b/rust/ql/test/extractor-tests/generated/RetTypeRepr/RetTypeRepr_getTypeRepr.expected deleted file mode 100644 index c150253243e..00000000000 --- a/rust/ql/test/extractor-tests/generated/RetTypeRepr/RetTypeRepr_getTypeRepr.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_ret_type_repr.rs:3:25:3:29 | RetTypeRepr | gen_ret_type_repr.rs:3:28:3:29 | TupleTypeRepr | -| gen_ret_type_repr.rs:7:14:7:19 | RetTypeRepr | gen_ret_type_repr.rs:7:17:7:19 | i32 | diff --git a/rust/ql/test/extractor-tests/generated/RetTypeRepr/RetTypeRepr_getTypeRepr.ql b/rust/ql/test/extractor-tests/generated/RetTypeRepr/RetTypeRepr_getTypeRepr.ql deleted file mode 100644 index b2a7bf73d76..00000000000 --- a/rust/ql/test/extractor-tests/generated/RetTypeRepr/RetTypeRepr_getTypeRepr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from RetTypeRepr x -where toBeTested(x) and not x.isUnknown() -select x, x.getTypeRepr() diff --git a/rust/ql/test/extractor-tests/generated/ReturnExpr/Cargo.lock b/rust/ql/test/extractor-tests/generated/ReturnExpr/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ReturnExpr/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr.expected b/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr.expected index 83220773989..e978eca2e7c 100644 --- a/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr.expected +++ b/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr.expected @@ -1,2 +1,6 @@ -| gen_return_expr.rs:5:5:5:13 | return 42 | getNumberOfAttrs: | 0 | hasExpr: | yes | -| gen_return_expr.rs:8:5:8:10 | return | getNumberOfAttrs: | 0 | hasExpr: | no | +instances +| gen_return_expr.rs:5:5:5:13 | return 42 | +| gen_return_expr.rs:8:5:8:10 | return | +getAttr +getExpr +| gen_return_expr.rs:5:5:5:13 | return 42 | gen_return_expr.rs:5:12:5:13 | 42 | diff --git a/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr.ql b/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr.ql index aa8c4d886a7..11eeed2222c 100644 --- a/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr.ql +++ b/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr.ql @@ -2,10 +2,12 @@ import codeql.rust.elements import TestUtils -from ReturnExpr x, int getNumberOfAttrs, string hasExpr -where - toBeTested(x) and - not x.isUnknown() and - getNumberOfAttrs = x.getNumberOfAttrs() and - if x.hasExpr() then hasExpr = "yes" else hasExpr = "no" -select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasExpr:", hasExpr +query predicate instances(ReturnExpr x) { toBeTested(x) and not x.isUnknown() } + +query predicate getAttr(ReturnExpr x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} + +query predicate getExpr(ReturnExpr x, Expr getExpr) { + toBeTested(x) and not x.isUnknown() and getExpr = x.getExpr() +} diff --git a/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr_getAttr.ql deleted file mode 100644 index 23366928f39..00000000000 --- a/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from ReturnExpr x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr_getExpr.expected b/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr_getExpr.expected deleted file mode 100644 index c75ecd0b23c..00000000000 --- a/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr_getExpr.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_return_expr.rs:5:5:5:13 | return 42 | gen_return_expr.rs:5:12:5:13 | 42 | diff --git a/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr_getExpr.ql b/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr_getExpr.ql deleted file mode 100644 index 8f682d7a5b1..00000000000 --- a/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr_getExpr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from ReturnExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getExpr() diff --git a/rust/ql/test/extractor-tests/generated/ReturnTypeSyntax/Cargo.lock b/rust/ql/test/extractor-tests/generated/ReturnTypeSyntax/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ReturnTypeSyntax/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/ReturnTypeSyntax/ReturnTypeSyntax.ql b/rust/ql/test/extractor-tests/generated/ReturnTypeSyntax/ReturnTypeSyntax.ql index e29f818af43..0b84f93a9b2 100644 --- a/rust/ql/test/extractor-tests/generated/ReturnTypeSyntax/ReturnTypeSyntax.ql +++ b/rust/ql/test/extractor-tests/generated/ReturnTypeSyntax/ReturnTypeSyntax.ql @@ -2,6 +2,4 @@ import codeql.rust.elements import TestUtils -from ReturnTypeSyntax x -where toBeTested(x) and not x.isUnknown() -select x +query predicate instances(ReturnTypeSyntax x) { toBeTested(x) and not x.isUnknown() } diff --git a/rust/ql/test/extractor-tests/generated/SelfParam/Cargo.lock b/rust/ql/test/extractor-tests/generated/SelfParam/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/SelfParam/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam.expected b/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam.expected index ba8ab1e624d..faa10f8e912 100644 --- a/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam.expected +++ b/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam.expected @@ -1,5 +1,16 @@ -| gen_self_param.rs:6:10:6:14 | SelfParam | getNumberOfAttrs: | 0 | hasTypeRepr: | no | isRef: | yes | isMut: | no | hasLifetime: | no | hasName: | yes | -| gen_self_param.rs:7:10:7:18 | SelfParam | getNumberOfAttrs: | 0 | hasTypeRepr: | no | isRef: | yes | isMut: | yes | hasLifetime: | no | hasName: | yes | -| gen_self_param.rs:8:12:8:15 | SelfParam | getNumberOfAttrs: | 0 | hasTypeRepr: | no | isRef: | no | isMut: | no | hasLifetime: | no | hasName: | yes | -| gen_self_param.rs:9:11:9:18 | SelfParam | getNumberOfAttrs: | 0 | hasTypeRepr: | no | isRef: | no | isMut: | yes | hasLifetime: | no | hasName: | yes | -| gen_self_param.rs:10:15:10:22 | SelfParam | getNumberOfAttrs: | 0 | hasTypeRepr: | no | isRef: | yes | isMut: | no | hasLifetime: | yes | hasName: | yes | +instances +| gen_self_param.rs:6:10:6:14 | SelfParam | isRef: | yes | isMut: | no | +| gen_self_param.rs:7:10:7:18 | SelfParam | isRef: | yes | isMut: | yes | +| gen_self_param.rs:8:12:8:15 | SelfParam | isRef: | no | isMut: | no | +| gen_self_param.rs:9:11:9:18 | SelfParam | isRef: | no | isMut: | yes | +| gen_self_param.rs:10:15:10:22 | SelfParam | isRef: | yes | isMut: | no | +getAttr +getTypeRepr +getLifetime +| gen_self_param.rs:10:15:10:22 | SelfParam | gen_self_param.rs:10:16:10:17 | 'a | +getName +| gen_self_param.rs:6:10:6:14 | SelfParam | gen_self_param.rs:6:11:6:14 | self | +| gen_self_param.rs:7:10:7:18 | SelfParam | gen_self_param.rs:7:15:7:18 | self | +| gen_self_param.rs:8:12:8:15 | SelfParam | gen_self_param.rs:8:12:8:15 | self | +| gen_self_param.rs:9:11:9:18 | SelfParam | gen_self_param.rs:9:15:9:18 | self | +| gen_self_param.rs:10:15:10:22 | SelfParam | gen_self_param.rs:10:19:10:22 | self | diff --git a/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam.ql b/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam.ql index 3f09c3ece20..07dd03a406f 100644 --- a/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam.ql +++ b/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam.ql @@ -2,17 +2,29 @@ import codeql.rust.elements import TestUtils -from - SelfParam x, int getNumberOfAttrs, string hasTypeRepr, string isRef, string isMut, - string hasLifetime, string hasName -where +query predicate instances( + SelfParam x, string isRef__label, string isRef, string isMut__label, string isMut +) { toBeTested(x) and not x.isUnknown() and - getNumberOfAttrs = x.getNumberOfAttrs() and - (if x.hasTypeRepr() then hasTypeRepr = "yes" else hasTypeRepr = "no") and + isRef__label = "isRef:" and (if x.isRef() then isRef = "yes" else isRef = "no") and - (if x.isMut() then isMut = "yes" else isMut = "no") and - (if x.hasLifetime() then hasLifetime = "yes" else hasLifetime = "no") and - if x.hasName() then hasName = "yes" else hasName = "no" -select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasTypeRepr:", hasTypeRepr, "isRef:", isRef, - "isMut:", isMut, "hasLifetime:", hasLifetime, "hasName:", hasName + isMut__label = "isMut:" and + if x.isMut() then isMut = "yes" else isMut = "no" +} + +query predicate getAttr(SelfParam x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} + +query predicate getTypeRepr(SelfParam x, TypeRepr getTypeRepr) { + toBeTested(x) and not x.isUnknown() and getTypeRepr = x.getTypeRepr() +} + +query predicate getLifetime(SelfParam x, Lifetime getLifetime) { + toBeTested(x) and not x.isUnknown() and getLifetime = x.getLifetime() +} + +query predicate getName(SelfParam x, Name getName) { + toBeTested(x) and not x.isUnknown() and getName = x.getName() +} diff --git a/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam_getAttr.expected b/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam_getAttr.ql b/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam_getAttr.ql deleted file mode 100644 index 682c1a9374a..00000000000 --- a/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from SelfParam x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam_getLifetime.expected b/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam_getLifetime.expected deleted file mode 100644 index cfe91c68c85..00000000000 --- a/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam_getLifetime.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_self_param.rs:10:15:10:22 | SelfParam | gen_self_param.rs:10:16:10:17 | 'a | diff --git a/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam_getLifetime.ql b/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam_getLifetime.ql deleted file mode 100644 index a64eb368a71..00000000000 --- a/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam_getLifetime.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from SelfParam x -where toBeTested(x) and not x.isUnknown() -select x, x.getLifetime() diff --git a/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam_getName.expected b/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam_getName.expected deleted file mode 100644 index 6b57cfe1570..00000000000 --- a/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam_getName.expected +++ /dev/null @@ -1,5 +0,0 @@ -| gen_self_param.rs:6:10:6:14 | SelfParam | gen_self_param.rs:6:11:6:14 | self | -| gen_self_param.rs:7:10:7:18 | SelfParam | gen_self_param.rs:7:15:7:18 | self | -| gen_self_param.rs:8:12:8:15 | SelfParam | gen_self_param.rs:8:12:8:15 | self | -| gen_self_param.rs:9:11:9:18 | SelfParam | gen_self_param.rs:9:15:9:18 | self | -| gen_self_param.rs:10:15:10:22 | SelfParam | gen_self_param.rs:10:19:10:22 | self | diff --git a/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam_getName.ql b/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam_getName.ql deleted file mode 100644 index 7a99270bfa5..00000000000 --- a/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam_getName.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from SelfParam x -where toBeTested(x) and not x.isUnknown() -select x, x.getName() diff --git a/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam_getTypeRepr.expected b/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam_getTypeRepr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam_getTypeRepr.ql b/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam_getTypeRepr.ql deleted file mode 100644 index 0be0ec9902d..00000000000 --- a/rust/ql/test/extractor-tests/generated/SelfParam/SelfParam_getTypeRepr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from SelfParam x -where toBeTested(x) and not x.isUnknown() -select x, x.getTypeRepr() diff --git a/rust/ql/test/extractor-tests/generated/SlicePat/Cargo.lock b/rust/ql/test/extractor-tests/generated/SlicePat/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/SlicePat/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat.expected b/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat.expected index 0821ea23323..0594cf27e55 100644 --- a/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat.expected +++ b/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat.expected @@ -1,3 +1,18 @@ -| gen_slice_pat.rs:6:9:6:23 | SlicePat | getNumberOfPats: | 5 | -| gen_slice_pat.rs:7:9:7:18 | SlicePat | getNumberOfPats: | 3 | -| gen_slice_pat.rs:8:9:8:24 | SlicePat | getNumberOfPats: | 5 | +instances +| gen_slice_pat.rs:6:9:6:23 | SlicePat | +| gen_slice_pat.rs:7:9:7:18 | SlicePat | +| gen_slice_pat.rs:8:9:8:24 | SlicePat | +getPat +| gen_slice_pat.rs:6:9:6:23 | SlicePat | 0 | gen_slice_pat.rs:6:10:6:10 | 1 | +| gen_slice_pat.rs:6:9:6:23 | SlicePat | 1 | gen_slice_pat.rs:6:13:6:13 | 2 | +| gen_slice_pat.rs:6:9:6:23 | SlicePat | 2 | gen_slice_pat.rs:6:16:6:16 | 3 | +| gen_slice_pat.rs:6:9:6:23 | SlicePat | 3 | gen_slice_pat.rs:6:19:6:19 | 4 | +| gen_slice_pat.rs:6:9:6:23 | SlicePat | 4 | gen_slice_pat.rs:6:22:6:22 | 5 | +| gen_slice_pat.rs:7:9:7:18 | SlicePat | 0 | gen_slice_pat.rs:7:10:7:10 | 1 | +| gen_slice_pat.rs:7:9:7:18 | SlicePat | 1 | gen_slice_pat.rs:7:13:7:13 | 2 | +| gen_slice_pat.rs:7:9:7:18 | SlicePat | 2 | gen_slice_pat.rs:7:16:7:17 | .. | +| gen_slice_pat.rs:8:9:8:24 | SlicePat | 0 | gen_slice_pat.rs:8:10:8:10 | x | +| gen_slice_pat.rs:8:9:8:24 | SlicePat | 1 | gen_slice_pat.rs:8:13:8:13 | y | +| gen_slice_pat.rs:8:9:8:24 | SlicePat | 2 | gen_slice_pat.rs:8:16:8:17 | .. | +| gen_slice_pat.rs:8:9:8:24 | SlicePat | 3 | gen_slice_pat.rs:8:20:8:20 | z | +| gen_slice_pat.rs:8:9:8:24 | SlicePat | 4 | gen_slice_pat.rs:8:23:8:23 | 7 | diff --git a/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat.ql b/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat.ql index 2b6c51f9da6..b4b0e943036 100644 --- a/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat.ql +++ b/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat.ql @@ -2,9 +2,8 @@ import codeql.rust.elements import TestUtils -from SlicePat x, int getNumberOfPats -where - toBeTested(x) and - not x.isUnknown() and - getNumberOfPats = x.getNumberOfPats() -select x, "getNumberOfPats:", getNumberOfPats +query predicate instances(SlicePat x) { toBeTested(x) and not x.isUnknown() } + +query predicate getPat(SlicePat x, int index, Pat getPat) { + toBeTested(x) and not x.isUnknown() and getPat = x.getPat(index) +} diff --git a/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat_getPat.expected b/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat_getPat.expected deleted file mode 100644 index 0725988f37f..00000000000 --- a/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat_getPat.expected +++ /dev/null @@ -1,13 +0,0 @@ -| gen_slice_pat.rs:6:9:6:23 | SlicePat | 0 | gen_slice_pat.rs:6:10:6:10 | 1 | -| gen_slice_pat.rs:6:9:6:23 | SlicePat | 1 | gen_slice_pat.rs:6:13:6:13 | 2 | -| gen_slice_pat.rs:6:9:6:23 | SlicePat | 2 | gen_slice_pat.rs:6:16:6:16 | 3 | -| gen_slice_pat.rs:6:9:6:23 | SlicePat | 3 | gen_slice_pat.rs:6:19:6:19 | 4 | -| gen_slice_pat.rs:6:9:6:23 | SlicePat | 4 | gen_slice_pat.rs:6:22:6:22 | 5 | -| gen_slice_pat.rs:7:9:7:18 | SlicePat | 0 | gen_slice_pat.rs:7:10:7:10 | 1 | -| gen_slice_pat.rs:7:9:7:18 | SlicePat | 1 | gen_slice_pat.rs:7:13:7:13 | 2 | -| gen_slice_pat.rs:7:9:7:18 | SlicePat | 2 | gen_slice_pat.rs:7:16:7:17 | .. | -| gen_slice_pat.rs:8:9:8:24 | SlicePat | 0 | gen_slice_pat.rs:8:10:8:10 | x | -| gen_slice_pat.rs:8:9:8:24 | SlicePat | 1 | gen_slice_pat.rs:8:13:8:13 | y | -| gen_slice_pat.rs:8:9:8:24 | SlicePat | 2 | gen_slice_pat.rs:8:16:8:17 | .. | -| gen_slice_pat.rs:8:9:8:24 | SlicePat | 3 | gen_slice_pat.rs:8:20:8:20 | z | -| gen_slice_pat.rs:8:9:8:24 | SlicePat | 4 | gen_slice_pat.rs:8:23:8:23 | 7 | diff --git a/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat_getPat.ql b/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat_getPat.ql deleted file mode 100644 index 37194fd2f1d..00000000000 --- a/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat_getPat.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from SlicePat x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getPat(index) diff --git a/rust/ql/test/extractor-tests/generated/SliceTypeRepr/Cargo.lock b/rust/ql/test/extractor-tests/generated/SliceTypeRepr/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/SliceTypeRepr/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/SliceTypeRepr/SliceTypeRepr.expected b/rust/ql/test/extractor-tests/generated/SliceTypeRepr/SliceTypeRepr.expected index dfcfb754437..20b1883e4d3 100644 --- a/rust/ql/test/extractor-tests/generated/SliceTypeRepr/SliceTypeRepr.expected +++ b/rust/ql/test/extractor-tests/generated/SliceTypeRepr/SliceTypeRepr.expected @@ -1 +1,4 @@ -| gen_slice_type_repr.rs:7:13:7:17 | SliceTypeRepr | hasTypeRepr: | yes | +instances +| gen_slice_type_repr.rs:7:13:7:17 | SliceTypeRepr | +getTypeRepr +| gen_slice_type_repr.rs:7:13:7:17 | SliceTypeRepr | gen_slice_type_repr.rs:7:14:7:16 | i32 | diff --git a/rust/ql/test/extractor-tests/generated/SliceTypeRepr/SliceTypeRepr.ql b/rust/ql/test/extractor-tests/generated/SliceTypeRepr/SliceTypeRepr.ql index 4f60ce58624..b32b4edf6d3 100644 --- a/rust/ql/test/extractor-tests/generated/SliceTypeRepr/SliceTypeRepr.ql +++ b/rust/ql/test/extractor-tests/generated/SliceTypeRepr/SliceTypeRepr.ql @@ -2,9 +2,8 @@ import codeql.rust.elements import TestUtils -from SliceTypeRepr x, string hasTypeRepr -where - toBeTested(x) and - not x.isUnknown() and - if x.hasTypeRepr() then hasTypeRepr = "yes" else hasTypeRepr = "no" -select x, "hasTypeRepr:", hasTypeRepr +query predicate instances(SliceTypeRepr x) { toBeTested(x) and not x.isUnknown() } + +query predicate getTypeRepr(SliceTypeRepr x, TypeRepr getTypeRepr) { + toBeTested(x) and not x.isUnknown() and getTypeRepr = x.getTypeRepr() +} diff --git a/rust/ql/test/extractor-tests/generated/SliceTypeRepr/SliceTypeRepr_getTypeRepr.expected b/rust/ql/test/extractor-tests/generated/SliceTypeRepr/SliceTypeRepr_getTypeRepr.expected deleted file mode 100644 index 7c0b5e94e2f..00000000000 --- a/rust/ql/test/extractor-tests/generated/SliceTypeRepr/SliceTypeRepr_getTypeRepr.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_slice_type_repr.rs:7:13:7:17 | SliceTypeRepr | gen_slice_type_repr.rs:7:14:7:16 | i32 | diff --git a/rust/ql/test/extractor-tests/generated/SliceTypeRepr/SliceTypeRepr_getTypeRepr.ql b/rust/ql/test/extractor-tests/generated/SliceTypeRepr/SliceTypeRepr_getTypeRepr.ql deleted file mode 100644 index 80d2c59ba29..00000000000 --- a/rust/ql/test/extractor-tests/generated/SliceTypeRepr/SliceTypeRepr_getTypeRepr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from SliceTypeRepr x -where toBeTested(x) and not x.isUnknown() -select x, x.getTypeRepr() diff --git a/rust/ql/test/extractor-tests/generated/SourceFile/Cargo.lock b/rust/ql/test/extractor-tests/generated/SourceFile/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/SourceFile/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/SourceFile/SourceFile.expected b/rust/ql/test/extractor-tests/generated/SourceFile/SourceFile.expected index e354381a921..e308c26daa8 100644 --- a/rust/ql/test/extractor-tests/generated/SourceFile/SourceFile.expected +++ b/rust/ql/test/extractor-tests/generated/SourceFile/SourceFile.expected @@ -1,2 +1,7 @@ -| gen_source_file.rs:1:1:9:2 | SourceFile | getNumberOfAttrs: | 0 | getNumberOfItems: | 1 | -| lib.rs:1:1:1:20 | SourceFile | getNumberOfAttrs: | 0 | getNumberOfItems: | 1 | +instances +| gen_source_file.rs:1:1:9:2 | SourceFile | +| lib.rs:1:1:1:20 | SourceFile | +getAttr +getItem +| gen_source_file.rs:1:1:9:2 | SourceFile | 0 | gen_source_file.rs:3:1:9:1 | fn test_source_file | +| lib.rs:1:1:1:20 | SourceFile | 0 | lib.rs:1:1:1:20 | mod gen_source_file | diff --git a/rust/ql/test/extractor-tests/generated/SourceFile/SourceFile.ql b/rust/ql/test/extractor-tests/generated/SourceFile/SourceFile.ql index b904bf731a8..257752e706e 100644 --- a/rust/ql/test/extractor-tests/generated/SourceFile/SourceFile.ql +++ b/rust/ql/test/extractor-tests/generated/SourceFile/SourceFile.ql @@ -2,10 +2,12 @@ import codeql.rust.elements import TestUtils -from SourceFile x, int getNumberOfAttrs, int getNumberOfItems -where - toBeTested(x) and - not x.isUnknown() and - getNumberOfAttrs = x.getNumberOfAttrs() and - getNumberOfItems = x.getNumberOfItems() -select x, "getNumberOfAttrs:", getNumberOfAttrs, "getNumberOfItems:", getNumberOfItems +query predicate instances(SourceFile x) { toBeTested(x) and not x.isUnknown() } + +query predicate getAttr(SourceFile x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} + +query predicate getItem(SourceFile x, int index, Item getItem) { + toBeTested(x) and not x.isUnknown() and getItem = x.getItem(index) +} diff --git a/rust/ql/test/extractor-tests/generated/SourceFile/SourceFile_getAttr.expected b/rust/ql/test/extractor-tests/generated/SourceFile/SourceFile_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/SourceFile/SourceFile_getAttr.ql b/rust/ql/test/extractor-tests/generated/SourceFile/SourceFile_getAttr.ql deleted file mode 100644 index d1842052239..00000000000 --- a/rust/ql/test/extractor-tests/generated/SourceFile/SourceFile_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from SourceFile x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/SourceFile/SourceFile_getItem.expected b/rust/ql/test/extractor-tests/generated/SourceFile/SourceFile_getItem.expected deleted file mode 100644 index 236a2a0755b..00000000000 --- a/rust/ql/test/extractor-tests/generated/SourceFile/SourceFile_getItem.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_source_file.rs:1:1:9:2 | SourceFile | 0 | gen_source_file.rs:3:1:9:1 | fn test_source_file | -| lib.rs:1:1:1:20 | SourceFile | 0 | lib.rs:1:1:1:20 | mod gen_source_file | diff --git a/rust/ql/test/extractor-tests/generated/SourceFile/SourceFile_getItem.ql b/rust/ql/test/extractor-tests/generated/SourceFile/SourceFile_getItem.ql deleted file mode 100644 index 339ea18c216..00000000000 --- a/rust/ql/test/extractor-tests/generated/SourceFile/SourceFile_getItem.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from SourceFile x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getItem(index) diff --git a/rust/ql/test/extractor-tests/generated/Static/Cargo.lock b/rust/ql/test/extractor-tests/generated/Static/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Static/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/Static/Static.expected b/rust/ql/test/extractor-tests/generated/Static/Static.expected index 076578efe68..ee87d07a2c1 100644 --- a/rust/ql/test/extractor-tests/generated/Static/Static.expected +++ b/rust/ql/test/extractor-tests/generated/Static/Static.expected @@ -1 +1,13 @@ -| gen_static.rs:4:5:7:23 | Static | hasExtendedCanonicalPath: | no | hasCrateOrigin: | no | hasAttributeMacroExpansion: | no | getNumberOfAttrs: | 0 | hasBody: | yes | isMut: | no | isStatic: | yes | isUnsafe: | no | hasName: | yes | hasTypeRepr: | yes | hasVisibility: | no | +instances +| gen_static.rs:4:5:7:23 | Static | isMut: | no | isStatic: | yes | isUnsafe: | no | +getExtendedCanonicalPath +getCrateOrigin +getAttributeMacroExpansion +getAttr +getBody +| gen_static.rs:4:5:7:23 | Static | gen_static.rs:7:21:7:22 | 42 | +getName +| gen_static.rs:4:5:7:23 | Static | gen_static.rs:7:12:7:12 | X | +getTypeRepr +| gen_static.rs:4:5:7:23 | Static | gen_static.rs:7:15:7:17 | i32 | +getVisibility diff --git a/rust/ql/test/extractor-tests/generated/Static/Static.ql b/rust/ql/test/extractor-tests/generated/Static/Static.ql index 96a1fbd9814..58ade5f044f 100644 --- a/rust/ql/test/extractor-tests/generated/Static/Static.ql +++ b/rust/ql/test/extractor-tests/generated/Static/Static.ql @@ -2,33 +2,50 @@ import codeql.rust.elements import TestUtils -from - Static x, string hasExtendedCanonicalPath, string hasCrateOrigin, - string hasAttributeMacroExpansion, int getNumberOfAttrs, string hasBody, string isMut, - string isStatic, string isUnsafe, string hasName, string hasTypeRepr, string hasVisibility -where +query predicate instances( + Static x, string isMut__label, string isMut, string isStatic__label, string isStatic, + string isUnsafe__label, string isUnsafe +) { toBeTested(x) and not x.isUnknown() and - ( - if x.hasExtendedCanonicalPath() - then hasExtendedCanonicalPath = "yes" - else hasExtendedCanonicalPath = "no" - ) and - (if x.hasCrateOrigin() then hasCrateOrigin = "yes" else hasCrateOrigin = "no") and - ( - if x.hasAttributeMacroExpansion() - then hasAttributeMacroExpansion = "yes" - else hasAttributeMacroExpansion = "no" - ) and - getNumberOfAttrs = x.getNumberOfAttrs() and - (if x.hasBody() then hasBody = "yes" else hasBody = "no") and + isMut__label = "isMut:" and (if x.isMut() then isMut = "yes" else isMut = "no") and + isStatic__label = "isStatic:" and (if x.isStatic() then isStatic = "yes" else isStatic = "no") and - (if x.isUnsafe() then isUnsafe = "yes" else isUnsafe = "no") and - (if x.hasName() then hasName = "yes" else hasName = "no") and - (if x.hasTypeRepr() then hasTypeRepr = "yes" else hasTypeRepr = "no") and - if x.hasVisibility() then hasVisibility = "yes" else hasVisibility = "no" -select x, "hasExtendedCanonicalPath:", hasExtendedCanonicalPath, "hasCrateOrigin:", hasCrateOrigin, - "hasAttributeMacroExpansion:", hasAttributeMacroExpansion, "getNumberOfAttrs:", getNumberOfAttrs, - "hasBody:", hasBody, "isMut:", isMut, "isStatic:", isStatic, "isUnsafe:", isUnsafe, "hasName:", - hasName, "hasTypeRepr:", hasTypeRepr, "hasVisibility:", hasVisibility + isUnsafe__label = "isUnsafe:" and + if x.isUnsafe() then isUnsafe = "yes" else isUnsafe = "no" +} + +query predicate getExtendedCanonicalPath(Static x, string getExtendedCanonicalPath) { + toBeTested(x) and not x.isUnknown() and getExtendedCanonicalPath = x.getExtendedCanonicalPath() +} + +query predicate getCrateOrigin(Static x, string getCrateOrigin) { + toBeTested(x) and not x.isUnknown() and getCrateOrigin = x.getCrateOrigin() +} + +query predicate getAttributeMacroExpansion(Static x, MacroItems getAttributeMacroExpansion) { + toBeTested(x) and + not x.isUnknown() and + getAttributeMacroExpansion = x.getAttributeMacroExpansion() +} + +query predicate getAttr(Static x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} + +query predicate getBody(Static x, Expr getBody) { + toBeTested(x) and not x.isUnknown() and getBody = x.getBody() +} + +query predicate getName(Static x, Name getName) { + toBeTested(x) and not x.isUnknown() and getName = x.getName() +} + +query predicate getTypeRepr(Static x, TypeRepr getTypeRepr) { + toBeTested(x) and not x.isUnknown() and getTypeRepr = x.getTypeRepr() +} + +query predicate getVisibility(Static x, Visibility getVisibility) { + toBeTested(x) and not x.isUnknown() and getVisibility = x.getVisibility() +} diff --git a/rust/ql/test/extractor-tests/generated/Static/Static_getAttr.expected b/rust/ql/test/extractor-tests/generated/Static/Static_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Static/Static_getAttr.ql b/rust/ql/test/extractor-tests/generated/Static/Static_getAttr.ql deleted file mode 100644 index df76d9642d2..00000000000 --- a/rust/ql/test/extractor-tests/generated/Static/Static_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Static x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/Static/Static_getAttributeMacroExpansion.expected b/rust/ql/test/extractor-tests/generated/Static/Static_getAttributeMacroExpansion.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Static/Static_getAttributeMacroExpansion.ql b/rust/ql/test/extractor-tests/generated/Static/Static_getAttributeMacroExpansion.ql deleted file mode 100644 index 500484b60b3..00000000000 --- a/rust/ql/test/extractor-tests/generated/Static/Static_getAttributeMacroExpansion.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Static x -where toBeTested(x) and not x.isUnknown() -select x, x.getAttributeMacroExpansion() diff --git a/rust/ql/test/extractor-tests/generated/Static/Static_getBody.expected b/rust/ql/test/extractor-tests/generated/Static/Static_getBody.expected deleted file mode 100644 index 1c7305c4991..00000000000 --- a/rust/ql/test/extractor-tests/generated/Static/Static_getBody.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_static.rs:4:5:7:23 | Static | gen_static.rs:7:21:7:22 | 42 | diff --git a/rust/ql/test/extractor-tests/generated/Static/Static_getBody.ql b/rust/ql/test/extractor-tests/generated/Static/Static_getBody.ql deleted file mode 100644 index 3983685f7fa..00000000000 --- a/rust/ql/test/extractor-tests/generated/Static/Static_getBody.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Static x -where toBeTested(x) and not x.isUnknown() -select x, x.getBody() diff --git a/rust/ql/test/extractor-tests/generated/Static/Static_getCrateOrigin.expected b/rust/ql/test/extractor-tests/generated/Static/Static_getCrateOrigin.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Static/Static_getCrateOrigin.ql b/rust/ql/test/extractor-tests/generated/Static/Static_getCrateOrigin.ql deleted file mode 100644 index 373b6bd45f4..00000000000 --- a/rust/ql/test/extractor-tests/generated/Static/Static_getCrateOrigin.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Static x -where toBeTested(x) and not x.isUnknown() -select x, x.getCrateOrigin() diff --git a/rust/ql/test/extractor-tests/generated/Static/Static_getExtendedCanonicalPath.expected b/rust/ql/test/extractor-tests/generated/Static/Static_getExtendedCanonicalPath.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Static/Static_getExtendedCanonicalPath.ql b/rust/ql/test/extractor-tests/generated/Static/Static_getExtendedCanonicalPath.ql deleted file mode 100644 index 32b3a0c127e..00000000000 --- a/rust/ql/test/extractor-tests/generated/Static/Static_getExtendedCanonicalPath.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Static x -where toBeTested(x) and not x.isUnknown() -select x, x.getExtendedCanonicalPath() diff --git a/rust/ql/test/extractor-tests/generated/Static/Static_getName.expected b/rust/ql/test/extractor-tests/generated/Static/Static_getName.expected deleted file mode 100644 index 96c219c64db..00000000000 --- a/rust/ql/test/extractor-tests/generated/Static/Static_getName.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_static.rs:4:5:7:23 | Static | gen_static.rs:7:12:7:12 | X | diff --git a/rust/ql/test/extractor-tests/generated/Static/Static_getName.ql b/rust/ql/test/extractor-tests/generated/Static/Static_getName.ql deleted file mode 100644 index 714d58c3892..00000000000 --- a/rust/ql/test/extractor-tests/generated/Static/Static_getName.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Static x -where toBeTested(x) and not x.isUnknown() -select x, x.getName() diff --git a/rust/ql/test/extractor-tests/generated/Static/Static_getTypeRepr.expected b/rust/ql/test/extractor-tests/generated/Static/Static_getTypeRepr.expected deleted file mode 100644 index 556c5467484..00000000000 --- a/rust/ql/test/extractor-tests/generated/Static/Static_getTypeRepr.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_static.rs:4:5:7:23 | Static | gen_static.rs:7:15:7:17 | i32 | diff --git a/rust/ql/test/extractor-tests/generated/Static/Static_getTypeRepr.ql b/rust/ql/test/extractor-tests/generated/Static/Static_getTypeRepr.ql deleted file mode 100644 index 6aa9e4108e9..00000000000 --- a/rust/ql/test/extractor-tests/generated/Static/Static_getTypeRepr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Static x -where toBeTested(x) and not x.isUnknown() -select x, x.getTypeRepr() diff --git a/rust/ql/test/extractor-tests/generated/Static/Static_getVisibility.expected b/rust/ql/test/extractor-tests/generated/Static/Static_getVisibility.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Static/Static_getVisibility.ql b/rust/ql/test/extractor-tests/generated/Static/Static_getVisibility.ql deleted file mode 100644 index 7ba134e17bc..00000000000 --- a/rust/ql/test/extractor-tests/generated/Static/Static_getVisibility.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Static x -where toBeTested(x) and not x.isUnknown() -select x, x.getVisibility() diff --git a/rust/ql/test/extractor-tests/generated/StmtList/Cargo.lock b/rust/ql/test/extractor-tests/generated/StmtList/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/StmtList/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/StmtList/StmtList.expected b/rust/ql/test/extractor-tests/generated/StmtList/StmtList.expected index 46bdea2a71c..02f322734ca 100644 --- a/rust/ql/test/extractor-tests/generated/StmtList/StmtList.expected +++ b/rust/ql/test/extractor-tests/generated/StmtList/StmtList.expected @@ -1,2 +1,9 @@ -| gen_stmt_list.rs:3:27:12:1 | StmtList | getNumberOfAttrs: | 0 | getNumberOfStatements: | 0 | hasTailExpr: | yes | -| gen_stmt_list.rs:7:5:10:5 | StmtList | getNumberOfAttrs: | 0 | getNumberOfStatements: | 2 | hasTailExpr: | no | +instances +| gen_stmt_list.rs:3:27:12:1 | StmtList | +| gen_stmt_list.rs:7:5:10:5 | StmtList | +getAttr +getStatement +| gen_stmt_list.rs:7:5:10:5 | StmtList | 0 | gen_stmt_list.rs:8:9:8:18 | let ... = 1 | +| gen_stmt_list.rs:7:5:10:5 | StmtList | 1 | gen_stmt_list.rs:9:9:9:18 | let ... = 2 | +getTailExpr +| gen_stmt_list.rs:3:27:12:1 | StmtList | gen_stmt_list.rs:7:5:10:5 | { ... } | diff --git a/rust/ql/test/extractor-tests/generated/StmtList/StmtList.ql b/rust/ql/test/extractor-tests/generated/StmtList/StmtList.ql index e24be9ebffe..1dcc1ce6db1 100644 --- a/rust/ql/test/extractor-tests/generated/StmtList/StmtList.ql +++ b/rust/ql/test/extractor-tests/generated/StmtList/StmtList.ql @@ -2,12 +2,16 @@ import codeql.rust.elements import TestUtils -from StmtList x, int getNumberOfAttrs, int getNumberOfStatements, string hasTailExpr -where - toBeTested(x) and - not x.isUnknown() and - getNumberOfAttrs = x.getNumberOfAttrs() and - getNumberOfStatements = x.getNumberOfStatements() and - if x.hasTailExpr() then hasTailExpr = "yes" else hasTailExpr = "no" -select x, "getNumberOfAttrs:", getNumberOfAttrs, "getNumberOfStatements:", getNumberOfStatements, - "hasTailExpr:", hasTailExpr +query predicate instances(StmtList x) { toBeTested(x) and not x.isUnknown() } + +query predicate getAttr(StmtList x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} + +query predicate getStatement(StmtList x, int index, Stmt getStatement) { + toBeTested(x) and not x.isUnknown() and getStatement = x.getStatement(index) +} + +query predicate getTailExpr(StmtList x, Expr getTailExpr) { + toBeTested(x) and not x.isUnknown() and getTailExpr = x.getTailExpr() +} diff --git a/rust/ql/test/extractor-tests/generated/StmtList/StmtList_getAttr.expected b/rust/ql/test/extractor-tests/generated/StmtList/StmtList_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/StmtList/StmtList_getAttr.ql b/rust/ql/test/extractor-tests/generated/StmtList/StmtList_getAttr.ql deleted file mode 100644 index a1a2079e938..00000000000 --- a/rust/ql/test/extractor-tests/generated/StmtList/StmtList_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from StmtList x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/StmtList/StmtList_getStatement.expected b/rust/ql/test/extractor-tests/generated/StmtList/StmtList_getStatement.expected deleted file mode 100644 index 46bda795699..00000000000 --- a/rust/ql/test/extractor-tests/generated/StmtList/StmtList_getStatement.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_stmt_list.rs:7:5:10:5 | StmtList | 0 | gen_stmt_list.rs:8:9:8:18 | let ... = 1 | -| gen_stmt_list.rs:7:5:10:5 | StmtList | 1 | gen_stmt_list.rs:9:9:9:18 | let ... = 2 | diff --git a/rust/ql/test/extractor-tests/generated/StmtList/StmtList_getStatement.ql b/rust/ql/test/extractor-tests/generated/StmtList/StmtList_getStatement.ql deleted file mode 100644 index f895ca9fa01..00000000000 --- a/rust/ql/test/extractor-tests/generated/StmtList/StmtList_getStatement.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from StmtList x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getStatement(index) diff --git a/rust/ql/test/extractor-tests/generated/StmtList/StmtList_getTailExpr.expected b/rust/ql/test/extractor-tests/generated/StmtList/StmtList_getTailExpr.expected deleted file mode 100644 index 998a40aea79..00000000000 --- a/rust/ql/test/extractor-tests/generated/StmtList/StmtList_getTailExpr.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_stmt_list.rs:3:27:12:1 | StmtList | gen_stmt_list.rs:7:5:10:5 | { ... } | diff --git a/rust/ql/test/extractor-tests/generated/StmtList/StmtList_getTailExpr.ql b/rust/ql/test/extractor-tests/generated/StmtList/StmtList_getTailExpr.ql deleted file mode 100644 index 592c6085451..00000000000 --- a/rust/ql/test/extractor-tests/generated/StmtList/StmtList_getTailExpr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from StmtList x -where toBeTested(x) and not x.isUnknown() -select x, x.getTailExpr() diff --git a/rust/ql/test/extractor-tests/generated/Struct/Struct.expected b/rust/ql/test/extractor-tests/generated/Struct/Struct.expected index 971e141a202..ad34c13babe 100644 --- a/rust/ql/test/extractor-tests/generated/Struct/Struct.expected +++ b/rust/ql/test/extractor-tests/generated/Struct/Struct.expected @@ -1 +1,14 @@ -| gen_struct.rs:4:5:8:5 | struct Point | hasExtendedCanonicalPath: | no | hasCrateOrigin: | no | hasAttributeMacroExpansion: | no | getNumberOfDeriveMacroExpansions: | 0 | getNumberOfAttrs: | 0 | hasFieldList: | yes | hasGenericParamList: | no | hasName: | yes | hasVisibility: | no | hasWhereClause: | no | +instances +| gen_struct.rs:4:5:8:5 | struct Point | +getExtendedCanonicalPath +getCrateOrigin +getAttributeMacroExpansion +getDeriveMacroExpansion +getAttr +getFieldList +| gen_struct.rs:4:5:8:5 | struct Point | gen_struct.rs:5:18:8:5 | StructFieldList | +getGenericParamList +getName +| gen_struct.rs:4:5:8:5 | struct Point | gen_struct.rs:5:12:5:16 | Point | +getVisibility +getWhereClause diff --git a/rust/ql/test/extractor-tests/generated/Struct/Struct.ql b/rust/ql/test/extractor-tests/generated/Struct/Struct.ql index f5f0439f175..185c1125f5c 100644 --- a/rust/ql/test/extractor-tests/generated/Struct/Struct.ql +++ b/rust/ql/test/extractor-tests/generated/Struct/Struct.ql @@ -2,34 +2,46 @@ import codeql.rust.elements import TestUtils -from - Struct x, string hasExtendedCanonicalPath, string hasCrateOrigin, - string hasAttributeMacroExpansion, int getNumberOfDeriveMacroExpansions, int getNumberOfAttrs, - string hasFieldList, string hasGenericParamList, string hasName, string hasVisibility, - string hasWhereClause -where +query predicate instances(Struct x) { toBeTested(x) and not x.isUnknown() } + +query predicate getExtendedCanonicalPath(Struct x, string getExtendedCanonicalPath) { + toBeTested(x) and not x.isUnknown() and getExtendedCanonicalPath = x.getExtendedCanonicalPath() +} + +query predicate getCrateOrigin(Struct x, string getCrateOrigin) { + toBeTested(x) and not x.isUnknown() and getCrateOrigin = x.getCrateOrigin() +} + +query predicate getAttributeMacroExpansion(Struct x, MacroItems getAttributeMacroExpansion) { toBeTested(x) and not x.isUnknown() and - ( - if x.hasExtendedCanonicalPath() - then hasExtendedCanonicalPath = "yes" - else hasExtendedCanonicalPath = "no" - ) and - (if x.hasCrateOrigin() then hasCrateOrigin = "yes" else hasCrateOrigin = "no") and - ( - if x.hasAttributeMacroExpansion() - then hasAttributeMacroExpansion = "yes" - else hasAttributeMacroExpansion = "no" - ) and - getNumberOfDeriveMacroExpansions = x.getNumberOfDeriveMacroExpansions() and - getNumberOfAttrs = x.getNumberOfAttrs() and - (if x.hasFieldList() then hasFieldList = "yes" else hasFieldList = "no") and - (if x.hasGenericParamList() then hasGenericParamList = "yes" else hasGenericParamList = "no") and - (if x.hasName() then hasName = "yes" else hasName = "no") and - (if x.hasVisibility() then hasVisibility = "yes" else hasVisibility = "no") and - if x.hasWhereClause() then hasWhereClause = "yes" else hasWhereClause = "no" -select x, "hasExtendedCanonicalPath:", hasExtendedCanonicalPath, "hasCrateOrigin:", hasCrateOrigin, - "hasAttributeMacroExpansion:", hasAttributeMacroExpansion, "getNumberOfDeriveMacroExpansions:", - getNumberOfDeriveMacroExpansions, "getNumberOfAttrs:", getNumberOfAttrs, "hasFieldList:", - hasFieldList, "hasGenericParamList:", hasGenericParamList, "hasName:", hasName, "hasVisibility:", - hasVisibility, "hasWhereClause:", hasWhereClause + getAttributeMacroExpansion = x.getAttributeMacroExpansion() +} + +query predicate getDeriveMacroExpansion(Struct x, int index, MacroItems getDeriveMacroExpansion) { + toBeTested(x) and not x.isUnknown() and getDeriveMacroExpansion = x.getDeriveMacroExpansion(index) +} + +query predicate getAttr(Struct x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} + +query predicate getFieldList(Struct x, FieldList getFieldList) { + toBeTested(x) and not x.isUnknown() and getFieldList = x.getFieldList() +} + +query predicate getGenericParamList(Struct x, GenericParamList getGenericParamList) { + toBeTested(x) and not x.isUnknown() and getGenericParamList = x.getGenericParamList() +} + +query predicate getName(Struct x, Name getName) { + toBeTested(x) and not x.isUnknown() and getName = x.getName() +} + +query predicate getVisibility(Struct x, Visibility getVisibility) { + toBeTested(x) and not x.isUnknown() and getVisibility = x.getVisibility() +} + +query predicate getWhereClause(Struct x, WhereClause getWhereClause) { + toBeTested(x) and not x.isUnknown() and getWhereClause = x.getWhereClause() +} diff --git a/rust/ql/test/extractor-tests/generated/Struct/Struct_getAttr.expected b/rust/ql/test/extractor-tests/generated/Struct/Struct_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Struct/Struct_getAttr.ql b/rust/ql/test/extractor-tests/generated/Struct/Struct_getAttr.ql deleted file mode 100644 index 11789c109f0..00000000000 --- a/rust/ql/test/extractor-tests/generated/Struct/Struct_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Struct x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/Struct/Struct_getAttributeMacroExpansion.expected b/rust/ql/test/extractor-tests/generated/Struct/Struct_getAttributeMacroExpansion.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Struct/Struct_getAttributeMacroExpansion.ql b/rust/ql/test/extractor-tests/generated/Struct/Struct_getAttributeMacroExpansion.ql deleted file mode 100644 index 7673f2d669e..00000000000 --- a/rust/ql/test/extractor-tests/generated/Struct/Struct_getAttributeMacroExpansion.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Struct x -where toBeTested(x) and not x.isUnknown() -select x, x.getAttributeMacroExpansion() diff --git a/rust/ql/test/extractor-tests/generated/Struct/Struct_getCrateOrigin.expected b/rust/ql/test/extractor-tests/generated/Struct/Struct_getCrateOrigin.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Struct/Struct_getCrateOrigin.ql b/rust/ql/test/extractor-tests/generated/Struct/Struct_getCrateOrigin.ql deleted file mode 100644 index cafe120d4de..00000000000 --- a/rust/ql/test/extractor-tests/generated/Struct/Struct_getCrateOrigin.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Struct x -where toBeTested(x) and not x.isUnknown() -select x, x.getCrateOrigin() diff --git a/rust/ql/test/extractor-tests/generated/Struct/Struct_getDeriveMacroExpansion.expected b/rust/ql/test/extractor-tests/generated/Struct/Struct_getDeriveMacroExpansion.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Struct/Struct_getDeriveMacroExpansion.ql b/rust/ql/test/extractor-tests/generated/Struct/Struct_getDeriveMacroExpansion.ql deleted file mode 100644 index 3009a782a88..00000000000 --- a/rust/ql/test/extractor-tests/generated/Struct/Struct_getDeriveMacroExpansion.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Struct x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getDeriveMacroExpansion(index) diff --git a/rust/ql/test/extractor-tests/generated/Struct/Struct_getExtendedCanonicalPath.expected b/rust/ql/test/extractor-tests/generated/Struct/Struct_getExtendedCanonicalPath.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Struct/Struct_getExtendedCanonicalPath.ql b/rust/ql/test/extractor-tests/generated/Struct/Struct_getExtendedCanonicalPath.ql deleted file mode 100644 index f502a347b3e..00000000000 --- a/rust/ql/test/extractor-tests/generated/Struct/Struct_getExtendedCanonicalPath.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Struct x -where toBeTested(x) and not x.isUnknown() -select x, x.getExtendedCanonicalPath() diff --git a/rust/ql/test/extractor-tests/generated/Struct/Struct_getFieldList.expected b/rust/ql/test/extractor-tests/generated/Struct/Struct_getFieldList.expected deleted file mode 100644 index b2233206f64..00000000000 --- a/rust/ql/test/extractor-tests/generated/Struct/Struct_getFieldList.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_struct.rs:4:5:8:5 | struct Point | gen_struct.rs:5:18:8:5 | StructFieldList | diff --git a/rust/ql/test/extractor-tests/generated/Struct/Struct_getFieldList.ql b/rust/ql/test/extractor-tests/generated/Struct/Struct_getFieldList.ql deleted file mode 100644 index cdbdf6a37be..00000000000 --- a/rust/ql/test/extractor-tests/generated/Struct/Struct_getFieldList.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Struct x -where toBeTested(x) and not x.isUnknown() -select x, x.getFieldList() diff --git a/rust/ql/test/extractor-tests/generated/Struct/Struct_getGenericParamList.expected b/rust/ql/test/extractor-tests/generated/Struct/Struct_getGenericParamList.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Struct/Struct_getGenericParamList.ql b/rust/ql/test/extractor-tests/generated/Struct/Struct_getGenericParamList.ql deleted file mode 100644 index 31a30a865f7..00000000000 --- a/rust/ql/test/extractor-tests/generated/Struct/Struct_getGenericParamList.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Struct x -where toBeTested(x) and not x.isUnknown() -select x, x.getGenericParamList() diff --git a/rust/ql/test/extractor-tests/generated/Struct/Struct_getName.expected b/rust/ql/test/extractor-tests/generated/Struct/Struct_getName.expected deleted file mode 100644 index 6912576e6fb..00000000000 --- a/rust/ql/test/extractor-tests/generated/Struct/Struct_getName.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_struct.rs:4:5:8:5 | struct Point | gen_struct.rs:5:12:5:16 | Point | diff --git a/rust/ql/test/extractor-tests/generated/Struct/Struct_getName.ql b/rust/ql/test/extractor-tests/generated/Struct/Struct_getName.ql deleted file mode 100644 index 40a167b3f2e..00000000000 --- a/rust/ql/test/extractor-tests/generated/Struct/Struct_getName.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Struct x -where toBeTested(x) and not x.isUnknown() -select x, x.getName() diff --git a/rust/ql/test/extractor-tests/generated/Struct/Struct_getVisibility.expected b/rust/ql/test/extractor-tests/generated/Struct/Struct_getVisibility.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Struct/Struct_getVisibility.ql b/rust/ql/test/extractor-tests/generated/Struct/Struct_getVisibility.ql deleted file mode 100644 index a86863cb1c7..00000000000 --- a/rust/ql/test/extractor-tests/generated/Struct/Struct_getVisibility.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Struct x -where toBeTested(x) and not x.isUnknown() -select x, x.getVisibility() diff --git a/rust/ql/test/extractor-tests/generated/Struct/Struct_getWhereClause.expected b/rust/ql/test/extractor-tests/generated/Struct/Struct_getWhereClause.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Struct/Struct_getWhereClause.ql b/rust/ql/test/extractor-tests/generated/Struct/Struct_getWhereClause.ql deleted file mode 100644 index b1df6874c1d..00000000000 --- a/rust/ql/test/extractor-tests/generated/Struct/Struct_getWhereClause.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Struct x -where toBeTested(x) and not x.isUnknown() -select x, x.getWhereClause() diff --git a/rust/ql/test/extractor-tests/generated/StructExpr/Cargo.lock b/rust/ql/test/extractor-tests/generated/StructExpr/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/StructExpr/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/StructExpr/StructExpr.expected b/rust/ql/test/extractor-tests/generated/StructExpr/StructExpr.expected index b9d3562413c..477aa732ece 100644 --- a/rust/ql/test/extractor-tests/generated/StructExpr/StructExpr.expected +++ b/rust/ql/test/extractor-tests/generated/StructExpr/StructExpr.expected @@ -1,4 +1,17 @@ -| gen_struct_expr.rs:5:17:5:34 | Foo {...} | hasResolvedPath: | no | hasResolvedCrateOrigin: | no | hasPath: | yes | hasStructExprFieldList: | yes | -| gen_struct_expr.rs:6:18:6:38 | Foo {...} | hasResolvedPath: | no | hasResolvedCrateOrigin: | no | hasPath: | yes | hasStructExprFieldList: | yes | -| gen_struct_expr.rs:7:5:7:22 | Foo {...} | hasResolvedPath: | no | hasResolvedCrateOrigin: | no | hasPath: | yes | hasStructExprFieldList: | yes | -| gen_struct_expr.rs:8:5:8:14 | Foo {...} | hasResolvedPath: | no | hasResolvedCrateOrigin: | no | hasPath: | yes | hasStructExprFieldList: | yes | +instances +| gen_struct_expr.rs:5:17:5:34 | Foo {...} | +| gen_struct_expr.rs:6:18:6:38 | Foo {...} | +| gen_struct_expr.rs:7:5:7:22 | Foo {...} | +| gen_struct_expr.rs:8:5:8:14 | Foo {...} | +getResolvedPath +getResolvedCrateOrigin +getPath +| gen_struct_expr.rs:5:17:5:34 | Foo {...} | gen_struct_expr.rs:5:17:5:19 | Foo | +| gen_struct_expr.rs:6:18:6:38 | Foo {...} | gen_struct_expr.rs:6:18:6:20 | Foo | +| gen_struct_expr.rs:7:5:7:22 | Foo {...} | gen_struct_expr.rs:7:5:7:7 | Foo | +| gen_struct_expr.rs:8:5:8:14 | Foo {...} | gen_struct_expr.rs:8:5:8:7 | Foo | +getStructExprFieldList +| gen_struct_expr.rs:5:17:5:34 | Foo {...} | gen_struct_expr.rs:5:21:5:34 | StructExprFieldList | +| gen_struct_expr.rs:6:18:6:38 | Foo {...} | gen_struct_expr.rs:6:22:6:38 | StructExprFieldList | +| gen_struct_expr.rs:7:5:7:22 | Foo {...} | gen_struct_expr.rs:7:9:7:22 | StructExprFieldList | +| gen_struct_expr.rs:8:5:8:14 | Foo {...} | gen_struct_expr.rs:8:9:8:14 | StructExprFieldList | diff --git a/rust/ql/test/extractor-tests/generated/StructExpr/StructExpr.ql b/rust/ql/test/extractor-tests/generated/StructExpr/StructExpr.ql index 6b4189951a5..4a71efa31ee 100644 --- a/rust/ql/test/extractor-tests/generated/StructExpr/StructExpr.ql +++ b/rust/ql/test/extractor-tests/generated/StructExpr/StructExpr.ql @@ -2,21 +2,20 @@ import codeql.rust.elements import TestUtils -from - StructExpr x, string hasResolvedPath, string hasResolvedCrateOrigin, string hasPath, - string hasStructExprFieldList -where - toBeTested(x) and - not x.isUnknown() and - (if x.hasResolvedPath() then hasResolvedPath = "yes" else hasResolvedPath = "no") and - ( - if x.hasResolvedCrateOrigin() - then hasResolvedCrateOrigin = "yes" - else hasResolvedCrateOrigin = "no" - ) and - (if x.hasPath() then hasPath = "yes" else hasPath = "no") and - if x.hasStructExprFieldList() - then hasStructExprFieldList = "yes" - else hasStructExprFieldList = "no" -select x, "hasResolvedPath:", hasResolvedPath, "hasResolvedCrateOrigin:", hasResolvedCrateOrigin, - "hasPath:", hasPath, "hasStructExprFieldList:", hasStructExprFieldList +query predicate instances(StructExpr x) { toBeTested(x) and not x.isUnknown() } + +query predicate getResolvedPath(StructExpr x, string getResolvedPath) { + toBeTested(x) and not x.isUnknown() and getResolvedPath = x.getResolvedPath() +} + +query predicate getResolvedCrateOrigin(StructExpr x, string getResolvedCrateOrigin) { + toBeTested(x) and not x.isUnknown() and getResolvedCrateOrigin = x.getResolvedCrateOrigin() +} + +query predicate getPath(StructExpr x, Path getPath) { + toBeTested(x) and not x.isUnknown() and getPath = x.getPath() +} + +query predicate getStructExprFieldList(StructExpr x, StructExprFieldList getStructExprFieldList) { + toBeTested(x) and not x.isUnknown() and getStructExprFieldList = x.getStructExprFieldList() +} diff --git a/rust/ql/test/extractor-tests/generated/StructExpr/StructExpr_getPath.expected b/rust/ql/test/extractor-tests/generated/StructExpr/StructExpr_getPath.expected deleted file mode 100644 index ca22511d4c1..00000000000 --- a/rust/ql/test/extractor-tests/generated/StructExpr/StructExpr_getPath.expected +++ /dev/null @@ -1,4 +0,0 @@ -| gen_struct_expr.rs:5:17:5:34 | Foo {...} | gen_struct_expr.rs:5:17:5:19 | Foo | -| gen_struct_expr.rs:6:18:6:38 | Foo {...} | gen_struct_expr.rs:6:18:6:20 | Foo | -| gen_struct_expr.rs:7:5:7:22 | Foo {...} | gen_struct_expr.rs:7:5:7:7 | Foo | -| gen_struct_expr.rs:8:5:8:14 | Foo {...} | gen_struct_expr.rs:8:5:8:7 | Foo | diff --git a/rust/ql/test/extractor-tests/generated/StructExpr/StructExpr_getPath.ql b/rust/ql/test/extractor-tests/generated/StructExpr/StructExpr_getPath.ql deleted file mode 100644 index dd6682ca28b..00000000000 --- a/rust/ql/test/extractor-tests/generated/StructExpr/StructExpr_getPath.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from StructExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getPath() diff --git a/rust/ql/test/extractor-tests/generated/StructExpr/StructExpr_getResolvedCrateOrigin.expected b/rust/ql/test/extractor-tests/generated/StructExpr/StructExpr_getResolvedCrateOrigin.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/StructExpr/StructExpr_getResolvedCrateOrigin.ql b/rust/ql/test/extractor-tests/generated/StructExpr/StructExpr_getResolvedCrateOrigin.ql deleted file mode 100644 index 10d7894e2e1..00000000000 --- a/rust/ql/test/extractor-tests/generated/StructExpr/StructExpr_getResolvedCrateOrigin.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from StructExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getResolvedCrateOrigin() diff --git a/rust/ql/test/extractor-tests/generated/StructExpr/StructExpr_getResolvedPath.expected b/rust/ql/test/extractor-tests/generated/StructExpr/StructExpr_getResolvedPath.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/StructExpr/StructExpr_getResolvedPath.ql b/rust/ql/test/extractor-tests/generated/StructExpr/StructExpr_getResolvedPath.ql deleted file mode 100644 index 49876f1872a..00000000000 --- a/rust/ql/test/extractor-tests/generated/StructExpr/StructExpr_getResolvedPath.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from StructExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getResolvedPath() diff --git a/rust/ql/test/extractor-tests/generated/StructExpr/StructExpr_getStructExprFieldList.expected b/rust/ql/test/extractor-tests/generated/StructExpr/StructExpr_getStructExprFieldList.expected deleted file mode 100644 index cf201f27ca2..00000000000 --- a/rust/ql/test/extractor-tests/generated/StructExpr/StructExpr_getStructExprFieldList.expected +++ /dev/null @@ -1,4 +0,0 @@ -| gen_struct_expr.rs:5:17:5:34 | Foo {...} | gen_struct_expr.rs:5:21:5:34 | StructExprFieldList | -| gen_struct_expr.rs:6:18:6:38 | Foo {...} | gen_struct_expr.rs:6:22:6:38 | StructExprFieldList | -| gen_struct_expr.rs:7:5:7:22 | Foo {...} | gen_struct_expr.rs:7:9:7:22 | StructExprFieldList | -| gen_struct_expr.rs:8:5:8:14 | Foo {...} | gen_struct_expr.rs:8:9:8:14 | StructExprFieldList | diff --git a/rust/ql/test/extractor-tests/generated/StructExpr/StructExpr_getStructExprFieldList.ql b/rust/ql/test/extractor-tests/generated/StructExpr/StructExpr_getStructExprFieldList.ql deleted file mode 100644 index 4e8e74dca36..00000000000 --- a/rust/ql/test/extractor-tests/generated/StructExpr/StructExpr_getStructExprFieldList.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from StructExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getStructExprFieldList() diff --git a/rust/ql/test/extractor-tests/generated/StructExprField/Cargo.lock b/rust/ql/test/extractor-tests/generated/StructExprField/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/StructExprField/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/StructExprField/StructExprField.expected b/rust/ql/test/extractor-tests/generated/StructExprField/StructExprField.expected index 952656c39aa..3e275eb6a24 100644 --- a/rust/ql/test/extractor-tests/generated/StructExprField/StructExprField.expected +++ b/rust/ql/test/extractor-tests/generated/StructExprField/StructExprField.expected @@ -1,2 +1,10 @@ -| gen_struct_expr_field.rs:5:11:5:14 | a: 1 | getNumberOfAttrs: | 0 | hasExpr: | yes | hasIdentifier: | yes | -| gen_struct_expr_field.rs:5:17:5:20 | b: 2 | getNumberOfAttrs: | 0 | hasExpr: | yes | hasIdentifier: | yes | +instances +| gen_struct_expr_field.rs:5:11:5:14 | a: 1 | +| gen_struct_expr_field.rs:5:17:5:20 | b: 2 | +getAttr +getExpr +| gen_struct_expr_field.rs:5:11:5:14 | a: 1 | gen_struct_expr_field.rs:5:14:5:14 | 1 | +| gen_struct_expr_field.rs:5:17:5:20 | b: 2 | gen_struct_expr_field.rs:5:20:5:20 | 2 | +getIdentifier +| gen_struct_expr_field.rs:5:11:5:14 | a: 1 | gen_struct_expr_field.rs:5:11:5:11 | a | +| gen_struct_expr_field.rs:5:17:5:20 | b: 2 | gen_struct_expr_field.rs:5:17:5:17 | b | diff --git a/rust/ql/test/extractor-tests/generated/StructExprField/StructExprField.ql b/rust/ql/test/extractor-tests/generated/StructExprField/StructExprField.ql index 3d383af10dc..4b4703c8828 100644 --- a/rust/ql/test/extractor-tests/generated/StructExprField/StructExprField.ql +++ b/rust/ql/test/extractor-tests/generated/StructExprField/StructExprField.ql @@ -2,12 +2,16 @@ import codeql.rust.elements import TestUtils -from StructExprField x, int getNumberOfAttrs, string hasExpr, string hasIdentifier -where - toBeTested(x) and - not x.isUnknown() and - getNumberOfAttrs = x.getNumberOfAttrs() and - (if x.hasExpr() then hasExpr = "yes" else hasExpr = "no") and - if x.hasIdentifier() then hasIdentifier = "yes" else hasIdentifier = "no" -select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasExpr:", hasExpr, "hasIdentifier:", - hasIdentifier +query predicate instances(StructExprField x) { toBeTested(x) and not x.isUnknown() } + +query predicate getAttr(StructExprField x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} + +query predicate getExpr(StructExprField x, Expr getExpr) { + toBeTested(x) and not x.isUnknown() and getExpr = x.getExpr() +} + +query predicate getIdentifier(StructExprField x, NameRef getIdentifier) { + toBeTested(x) and not x.isUnknown() and getIdentifier = x.getIdentifier() +} diff --git a/rust/ql/test/extractor-tests/generated/StructExprField/StructExprField_getAttr.expected b/rust/ql/test/extractor-tests/generated/StructExprField/StructExprField_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/StructExprField/StructExprField_getAttr.ql b/rust/ql/test/extractor-tests/generated/StructExprField/StructExprField_getAttr.ql deleted file mode 100644 index 2742907ba87..00000000000 --- a/rust/ql/test/extractor-tests/generated/StructExprField/StructExprField_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from StructExprField x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/StructExprField/StructExprField_getExpr.expected b/rust/ql/test/extractor-tests/generated/StructExprField/StructExprField_getExpr.expected deleted file mode 100644 index ee1f3e2a9fe..00000000000 --- a/rust/ql/test/extractor-tests/generated/StructExprField/StructExprField_getExpr.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_struct_expr_field.rs:5:11:5:14 | a: 1 | gen_struct_expr_field.rs:5:14:5:14 | 1 | -| gen_struct_expr_field.rs:5:17:5:20 | b: 2 | gen_struct_expr_field.rs:5:20:5:20 | 2 | diff --git a/rust/ql/test/extractor-tests/generated/StructExprField/StructExprField_getExpr.ql b/rust/ql/test/extractor-tests/generated/StructExprField/StructExprField_getExpr.ql deleted file mode 100644 index f301995d0b9..00000000000 --- a/rust/ql/test/extractor-tests/generated/StructExprField/StructExprField_getExpr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from StructExprField x -where toBeTested(x) and not x.isUnknown() -select x, x.getExpr() diff --git a/rust/ql/test/extractor-tests/generated/StructExprField/StructExprField_getIdentifier.expected b/rust/ql/test/extractor-tests/generated/StructExprField/StructExprField_getIdentifier.expected deleted file mode 100644 index feb2debc66e..00000000000 --- a/rust/ql/test/extractor-tests/generated/StructExprField/StructExprField_getIdentifier.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_struct_expr_field.rs:5:11:5:14 | a: 1 | gen_struct_expr_field.rs:5:11:5:11 | a | -| gen_struct_expr_field.rs:5:17:5:20 | b: 2 | gen_struct_expr_field.rs:5:17:5:17 | b | diff --git a/rust/ql/test/extractor-tests/generated/StructExprField/StructExprField_getIdentifier.ql b/rust/ql/test/extractor-tests/generated/StructExprField/StructExprField_getIdentifier.ql deleted file mode 100644 index 6d6b06cf3d5..00000000000 --- a/rust/ql/test/extractor-tests/generated/StructExprField/StructExprField_getIdentifier.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from StructExprField x -where toBeTested(x) and not x.isUnknown() -select x, x.getIdentifier() diff --git a/rust/ql/test/extractor-tests/generated/StructExprFieldList/Cargo.lock b/rust/ql/test/extractor-tests/generated/StructExprFieldList/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/StructExprFieldList/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/StructExprFieldList/StructExprFieldList.expected b/rust/ql/test/extractor-tests/generated/StructExprFieldList/StructExprFieldList.expected index 16e48f1e4f9..188a3690d83 100644 --- a/rust/ql/test/extractor-tests/generated/StructExprFieldList/StructExprFieldList.expected +++ b/rust/ql/test/extractor-tests/generated/StructExprFieldList/StructExprFieldList.expected @@ -1 +1,7 @@ -| gen_struct_expr_field_list.rs:7:9:7:22 | StructExprFieldList | getNumberOfAttrs: | 0 | getNumberOfFields: | 2 | hasSpread: | no | +instances +| gen_struct_expr_field_list.rs:7:9:7:22 | StructExprFieldList | +getAttr +getField +| gen_struct_expr_field_list.rs:7:9:7:22 | StructExprFieldList | 0 | gen_struct_expr_field_list.rs:7:11:7:14 | a: 1 | +| gen_struct_expr_field_list.rs:7:9:7:22 | StructExprFieldList | 1 | gen_struct_expr_field_list.rs:7:17:7:20 | b: 2 | +getSpread diff --git a/rust/ql/test/extractor-tests/generated/StructExprFieldList/StructExprFieldList.ql b/rust/ql/test/extractor-tests/generated/StructExprFieldList/StructExprFieldList.ql index 75690e39e19..dfa2ea4c324 100644 --- a/rust/ql/test/extractor-tests/generated/StructExprFieldList/StructExprFieldList.ql +++ b/rust/ql/test/extractor-tests/generated/StructExprFieldList/StructExprFieldList.ql @@ -2,12 +2,16 @@ import codeql.rust.elements import TestUtils -from StructExprFieldList x, int getNumberOfAttrs, int getNumberOfFields, string hasSpread -where - toBeTested(x) and - not x.isUnknown() and - getNumberOfAttrs = x.getNumberOfAttrs() and - getNumberOfFields = x.getNumberOfFields() and - if x.hasSpread() then hasSpread = "yes" else hasSpread = "no" -select x, "getNumberOfAttrs:", getNumberOfAttrs, "getNumberOfFields:", getNumberOfFields, - "hasSpread:", hasSpread +query predicate instances(StructExprFieldList x) { toBeTested(x) and not x.isUnknown() } + +query predicate getAttr(StructExprFieldList x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} + +query predicate getField(StructExprFieldList x, int index, StructExprField getField) { + toBeTested(x) and not x.isUnknown() and getField = x.getField(index) +} + +query predicate getSpread(StructExprFieldList x, Expr getSpread) { + toBeTested(x) and not x.isUnknown() and getSpread = x.getSpread() +} diff --git a/rust/ql/test/extractor-tests/generated/StructExprFieldList/StructExprFieldList_getAttr.expected b/rust/ql/test/extractor-tests/generated/StructExprFieldList/StructExprFieldList_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/StructExprFieldList/StructExprFieldList_getAttr.ql b/rust/ql/test/extractor-tests/generated/StructExprFieldList/StructExprFieldList_getAttr.ql deleted file mode 100644 index 2285cd246d6..00000000000 --- a/rust/ql/test/extractor-tests/generated/StructExprFieldList/StructExprFieldList_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from StructExprFieldList x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/StructExprFieldList/StructExprFieldList_getField.expected b/rust/ql/test/extractor-tests/generated/StructExprFieldList/StructExprFieldList_getField.expected deleted file mode 100644 index a9e8edc6aae..00000000000 --- a/rust/ql/test/extractor-tests/generated/StructExprFieldList/StructExprFieldList_getField.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_struct_expr_field_list.rs:7:9:7:22 | StructExprFieldList | 0 | gen_struct_expr_field_list.rs:7:11:7:14 | a: 1 | -| gen_struct_expr_field_list.rs:7:9:7:22 | StructExprFieldList | 1 | gen_struct_expr_field_list.rs:7:17:7:20 | b: 2 | diff --git a/rust/ql/test/extractor-tests/generated/StructExprFieldList/StructExprFieldList_getField.ql b/rust/ql/test/extractor-tests/generated/StructExprFieldList/StructExprFieldList_getField.ql deleted file mode 100644 index 3872d178afc..00000000000 --- a/rust/ql/test/extractor-tests/generated/StructExprFieldList/StructExprFieldList_getField.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from StructExprFieldList x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getField(index) diff --git a/rust/ql/test/extractor-tests/generated/StructExprFieldList/StructExprFieldList_getSpread.expected b/rust/ql/test/extractor-tests/generated/StructExprFieldList/StructExprFieldList_getSpread.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/StructExprFieldList/StructExprFieldList_getSpread.ql b/rust/ql/test/extractor-tests/generated/StructExprFieldList/StructExprFieldList_getSpread.ql deleted file mode 100644 index d3a50472592..00000000000 --- a/rust/ql/test/extractor-tests/generated/StructExprFieldList/StructExprFieldList_getSpread.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from StructExprFieldList x -where toBeTested(x) and not x.isUnknown() -select x, x.getSpread() diff --git a/rust/ql/test/extractor-tests/generated/StructField/Cargo.lock b/rust/ql/test/extractor-tests/generated/StructField/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/StructField/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/StructField/StructField.expected b/rust/ql/test/extractor-tests/generated/StructField/StructField.expected index 52a70f01feb..3b5d0d7b71c 100644 --- a/rust/ql/test/extractor-tests/generated/StructField/StructField.expected +++ b/rust/ql/test/extractor-tests/generated/StructField/StructField.expected @@ -1 +1,9 @@ -| gen_struct_field.rs:7:16:7:21 | StructField | getNumberOfAttrs: | 0 | hasDefault: | no | isUnsafe: | no | hasName: | yes | hasTypeRepr: | yes | hasVisibility: | no | +instances +| gen_struct_field.rs:7:16:7:21 | StructField | isUnsafe: | no | +getAttr +getDefault +getName +| gen_struct_field.rs:7:16:7:21 | StructField | gen_struct_field.rs:7:16:7:16 | x | +getTypeRepr +| gen_struct_field.rs:7:16:7:21 | StructField | gen_struct_field.rs:7:19:7:21 | i32 | +getVisibility diff --git a/rust/ql/test/extractor-tests/generated/StructField/StructField.ql b/rust/ql/test/extractor-tests/generated/StructField/StructField.ql index cf7b3d995e1..773f282e36b 100644 --- a/rust/ql/test/extractor-tests/generated/StructField/StructField.ql +++ b/rust/ql/test/extractor-tests/generated/StructField/StructField.ql @@ -2,17 +2,29 @@ import codeql.rust.elements import TestUtils -from - StructField x, int getNumberOfAttrs, string hasDefault, string isUnsafe, string hasName, - string hasTypeRepr, string hasVisibility -where +query predicate instances(StructField x, string isUnsafe__label, string isUnsafe) { toBeTested(x) and not x.isUnknown() and - getNumberOfAttrs = x.getNumberOfAttrs() and - (if x.hasDefault() then hasDefault = "yes" else hasDefault = "no") and - (if x.isUnsafe() then isUnsafe = "yes" else isUnsafe = "no") and - (if x.hasName() then hasName = "yes" else hasName = "no") and - (if x.hasTypeRepr() then hasTypeRepr = "yes" else hasTypeRepr = "no") and - if x.hasVisibility() then hasVisibility = "yes" else hasVisibility = "no" -select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasDefault:", hasDefault, "isUnsafe:", isUnsafe, - "hasName:", hasName, "hasTypeRepr:", hasTypeRepr, "hasVisibility:", hasVisibility + isUnsafe__label = "isUnsafe:" and + if x.isUnsafe() then isUnsafe = "yes" else isUnsafe = "no" +} + +query predicate getAttr(StructField x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} + +query predicate getDefault(StructField x, Expr getDefault) { + toBeTested(x) and not x.isUnknown() and getDefault = x.getDefault() +} + +query predicate getName(StructField x, Name getName) { + toBeTested(x) and not x.isUnknown() and getName = x.getName() +} + +query predicate getTypeRepr(StructField x, TypeRepr getTypeRepr) { + toBeTested(x) and not x.isUnknown() and getTypeRepr = x.getTypeRepr() +} + +query predicate getVisibility(StructField x, Visibility getVisibility) { + toBeTested(x) and not x.isUnknown() and getVisibility = x.getVisibility() +} diff --git a/rust/ql/test/extractor-tests/generated/StructField/StructField_getAttr.expected b/rust/ql/test/extractor-tests/generated/StructField/StructField_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/StructField/StructField_getAttr.ql b/rust/ql/test/extractor-tests/generated/StructField/StructField_getAttr.ql deleted file mode 100644 index 61661be4490..00000000000 --- a/rust/ql/test/extractor-tests/generated/StructField/StructField_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from StructField x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/StructField/StructField_getDefault.expected b/rust/ql/test/extractor-tests/generated/StructField/StructField_getDefault.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/StructField/StructField_getDefault.ql b/rust/ql/test/extractor-tests/generated/StructField/StructField_getDefault.ql deleted file mode 100644 index dbdd22c00e0..00000000000 --- a/rust/ql/test/extractor-tests/generated/StructField/StructField_getDefault.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from StructField x -where toBeTested(x) and not x.isUnknown() -select x, x.getDefault() diff --git a/rust/ql/test/extractor-tests/generated/StructField/StructField_getName.expected b/rust/ql/test/extractor-tests/generated/StructField/StructField_getName.expected deleted file mode 100644 index 1b66b3a883b..00000000000 --- a/rust/ql/test/extractor-tests/generated/StructField/StructField_getName.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_struct_field.rs:7:16:7:21 | StructField | gen_struct_field.rs:7:16:7:16 | x | diff --git a/rust/ql/test/extractor-tests/generated/StructField/StructField_getName.ql b/rust/ql/test/extractor-tests/generated/StructField/StructField_getName.ql deleted file mode 100644 index a8078e8a34e..00000000000 --- a/rust/ql/test/extractor-tests/generated/StructField/StructField_getName.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from StructField x -where toBeTested(x) and not x.isUnknown() -select x, x.getName() diff --git a/rust/ql/test/extractor-tests/generated/StructField/StructField_getTypeRepr.expected b/rust/ql/test/extractor-tests/generated/StructField/StructField_getTypeRepr.expected deleted file mode 100644 index ad77aac4601..00000000000 --- a/rust/ql/test/extractor-tests/generated/StructField/StructField_getTypeRepr.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_struct_field.rs:7:16:7:21 | StructField | gen_struct_field.rs:7:19:7:21 | i32 | diff --git a/rust/ql/test/extractor-tests/generated/StructField/StructField_getTypeRepr.ql b/rust/ql/test/extractor-tests/generated/StructField/StructField_getTypeRepr.ql deleted file mode 100644 index 27cd539c0be..00000000000 --- a/rust/ql/test/extractor-tests/generated/StructField/StructField_getTypeRepr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from StructField x -where toBeTested(x) and not x.isUnknown() -select x, x.getTypeRepr() diff --git a/rust/ql/test/extractor-tests/generated/StructField/StructField_getVisibility.expected b/rust/ql/test/extractor-tests/generated/StructField/StructField_getVisibility.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/StructField/StructField_getVisibility.ql b/rust/ql/test/extractor-tests/generated/StructField/StructField_getVisibility.ql deleted file mode 100644 index 43ebca77656..00000000000 --- a/rust/ql/test/extractor-tests/generated/StructField/StructField_getVisibility.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from StructField x -where toBeTested(x) and not x.isUnknown() -select x, x.getVisibility() diff --git a/rust/ql/test/extractor-tests/generated/StructFieldList/Cargo.lock b/rust/ql/test/extractor-tests/generated/StructFieldList/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/StructFieldList/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/StructFieldList/StructFieldList.expected b/rust/ql/test/extractor-tests/generated/StructFieldList/StructFieldList.expected index f07a535897f..847bfd3c937 100644 --- a/rust/ql/test/extractor-tests/generated/StructFieldList/StructFieldList.expected +++ b/rust/ql/test/extractor-tests/generated/StructFieldList/StructFieldList.expected @@ -1 +1,5 @@ -| gen_struct_field_list.rs:7:14:7:31 | StructFieldList | getNumberOfFields: | 2 | +instances +| gen_struct_field_list.rs:7:14:7:31 | StructFieldList | +getField +| gen_struct_field_list.rs:7:14:7:31 | StructFieldList | 0 | gen_struct_field_list.rs:7:16:7:21 | StructField | +| gen_struct_field_list.rs:7:14:7:31 | StructFieldList | 1 | gen_struct_field_list.rs:7:24:7:29 | StructField | diff --git a/rust/ql/test/extractor-tests/generated/StructFieldList/StructFieldList.ql b/rust/ql/test/extractor-tests/generated/StructFieldList/StructFieldList.ql index 62725f6189b..f8afe271d81 100644 --- a/rust/ql/test/extractor-tests/generated/StructFieldList/StructFieldList.ql +++ b/rust/ql/test/extractor-tests/generated/StructFieldList/StructFieldList.ql @@ -2,9 +2,8 @@ import codeql.rust.elements import TestUtils -from StructFieldList x, int getNumberOfFields -where - toBeTested(x) and - not x.isUnknown() and - getNumberOfFields = x.getNumberOfFields() -select x, "getNumberOfFields:", getNumberOfFields +query predicate instances(StructFieldList x) { toBeTested(x) and not x.isUnknown() } + +query predicate getField(StructFieldList x, int index, StructField getField) { + toBeTested(x) and not x.isUnknown() and getField = x.getField(index) +} diff --git a/rust/ql/test/extractor-tests/generated/StructFieldList/StructFieldList_getField.expected b/rust/ql/test/extractor-tests/generated/StructFieldList/StructFieldList_getField.expected deleted file mode 100644 index cd2ac33b4c9..00000000000 --- a/rust/ql/test/extractor-tests/generated/StructFieldList/StructFieldList_getField.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_struct_field_list.rs:7:14:7:31 | StructFieldList | 0 | gen_struct_field_list.rs:7:16:7:21 | StructField | -| gen_struct_field_list.rs:7:14:7:31 | StructFieldList | 1 | gen_struct_field_list.rs:7:24:7:29 | StructField | diff --git a/rust/ql/test/extractor-tests/generated/StructFieldList/StructFieldList_getField.ql b/rust/ql/test/extractor-tests/generated/StructFieldList/StructFieldList_getField.ql deleted file mode 100644 index f1c7d0b58dc..00000000000 --- a/rust/ql/test/extractor-tests/generated/StructFieldList/StructFieldList_getField.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from StructFieldList x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getField(index) diff --git a/rust/ql/test/extractor-tests/generated/StructPat/Cargo.lock b/rust/ql/test/extractor-tests/generated/StructPat/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/StructPat/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/StructPat/StructPat.expected b/rust/ql/test/extractor-tests/generated/StructPat/StructPat.expected index 976f45ab4cd..894e52fb196 100644 --- a/rust/ql/test/extractor-tests/generated/StructPat/StructPat.expected +++ b/rust/ql/test/extractor-tests/generated/StructPat/StructPat.expected @@ -1,2 +1,11 @@ -| gen_struct_pat.rs:6:9:6:26 | Foo {...} | hasResolvedPath: | no | hasResolvedCrateOrigin: | no | hasPath: | yes | hasStructPatFieldList: | yes | -| gen_struct_pat.rs:7:9:7:18 | Foo {...} | hasResolvedPath: | no | hasResolvedCrateOrigin: | no | hasPath: | yes | hasStructPatFieldList: | yes | +instances +| gen_struct_pat.rs:6:9:6:26 | Foo {...} | +| gen_struct_pat.rs:7:9:7:18 | Foo {...} | +getResolvedPath +getResolvedCrateOrigin +getPath +| gen_struct_pat.rs:6:9:6:26 | Foo {...} | gen_struct_pat.rs:6:9:6:11 | Foo | +| gen_struct_pat.rs:7:9:7:18 | Foo {...} | gen_struct_pat.rs:7:9:7:11 | Foo | +getStructPatFieldList +| gen_struct_pat.rs:6:9:6:26 | Foo {...} | gen_struct_pat.rs:6:13:6:26 | StructPatFieldList | +| gen_struct_pat.rs:7:9:7:18 | Foo {...} | gen_struct_pat.rs:7:13:7:18 | StructPatFieldList | diff --git a/rust/ql/test/extractor-tests/generated/StructPat/StructPat.ql b/rust/ql/test/extractor-tests/generated/StructPat/StructPat.ql index 9df81390d42..4aad29aede9 100644 --- a/rust/ql/test/extractor-tests/generated/StructPat/StructPat.ql +++ b/rust/ql/test/extractor-tests/generated/StructPat/StructPat.ql @@ -2,19 +2,20 @@ import codeql.rust.elements import TestUtils -from - StructPat x, string hasResolvedPath, string hasResolvedCrateOrigin, string hasPath, - string hasStructPatFieldList -where - toBeTested(x) and - not x.isUnknown() and - (if x.hasResolvedPath() then hasResolvedPath = "yes" else hasResolvedPath = "no") and - ( - if x.hasResolvedCrateOrigin() - then hasResolvedCrateOrigin = "yes" - else hasResolvedCrateOrigin = "no" - ) and - (if x.hasPath() then hasPath = "yes" else hasPath = "no") and - if x.hasStructPatFieldList() then hasStructPatFieldList = "yes" else hasStructPatFieldList = "no" -select x, "hasResolvedPath:", hasResolvedPath, "hasResolvedCrateOrigin:", hasResolvedCrateOrigin, - "hasPath:", hasPath, "hasStructPatFieldList:", hasStructPatFieldList +query predicate instances(StructPat x) { toBeTested(x) and not x.isUnknown() } + +query predicate getResolvedPath(StructPat x, string getResolvedPath) { + toBeTested(x) and not x.isUnknown() and getResolvedPath = x.getResolvedPath() +} + +query predicate getResolvedCrateOrigin(StructPat x, string getResolvedCrateOrigin) { + toBeTested(x) and not x.isUnknown() and getResolvedCrateOrigin = x.getResolvedCrateOrigin() +} + +query predicate getPath(StructPat x, Path getPath) { + toBeTested(x) and not x.isUnknown() and getPath = x.getPath() +} + +query predicate getStructPatFieldList(StructPat x, StructPatFieldList getStructPatFieldList) { + toBeTested(x) and not x.isUnknown() and getStructPatFieldList = x.getStructPatFieldList() +} diff --git a/rust/ql/test/extractor-tests/generated/StructPat/StructPat_getPath.expected b/rust/ql/test/extractor-tests/generated/StructPat/StructPat_getPath.expected deleted file mode 100644 index 1430d89402a..00000000000 --- a/rust/ql/test/extractor-tests/generated/StructPat/StructPat_getPath.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_struct_pat.rs:6:9:6:26 | Foo {...} | gen_struct_pat.rs:6:9:6:11 | Foo | -| gen_struct_pat.rs:7:9:7:18 | Foo {...} | gen_struct_pat.rs:7:9:7:11 | Foo | diff --git a/rust/ql/test/extractor-tests/generated/StructPat/StructPat_getPath.ql b/rust/ql/test/extractor-tests/generated/StructPat/StructPat_getPath.ql deleted file mode 100644 index 078813c2700..00000000000 --- a/rust/ql/test/extractor-tests/generated/StructPat/StructPat_getPath.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from StructPat x -where toBeTested(x) and not x.isUnknown() -select x, x.getPath() diff --git a/rust/ql/test/extractor-tests/generated/StructPat/StructPat_getResolvedCrateOrigin.expected b/rust/ql/test/extractor-tests/generated/StructPat/StructPat_getResolvedCrateOrigin.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/StructPat/StructPat_getResolvedCrateOrigin.ql b/rust/ql/test/extractor-tests/generated/StructPat/StructPat_getResolvedCrateOrigin.ql deleted file mode 100644 index 1fdff67b735..00000000000 --- a/rust/ql/test/extractor-tests/generated/StructPat/StructPat_getResolvedCrateOrigin.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from StructPat x -where toBeTested(x) and not x.isUnknown() -select x, x.getResolvedCrateOrigin() diff --git a/rust/ql/test/extractor-tests/generated/StructPat/StructPat_getResolvedPath.expected b/rust/ql/test/extractor-tests/generated/StructPat/StructPat_getResolvedPath.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/StructPat/StructPat_getResolvedPath.ql b/rust/ql/test/extractor-tests/generated/StructPat/StructPat_getResolvedPath.ql deleted file mode 100644 index f7a60efc20e..00000000000 --- a/rust/ql/test/extractor-tests/generated/StructPat/StructPat_getResolvedPath.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from StructPat x -where toBeTested(x) and not x.isUnknown() -select x, x.getResolvedPath() diff --git a/rust/ql/test/extractor-tests/generated/StructPat/StructPat_getStructPatFieldList.expected b/rust/ql/test/extractor-tests/generated/StructPat/StructPat_getStructPatFieldList.expected deleted file mode 100644 index 33464196b16..00000000000 --- a/rust/ql/test/extractor-tests/generated/StructPat/StructPat_getStructPatFieldList.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_struct_pat.rs:6:9:6:26 | Foo {...} | gen_struct_pat.rs:6:13:6:26 | StructPatFieldList | -| gen_struct_pat.rs:7:9:7:18 | Foo {...} | gen_struct_pat.rs:7:13:7:18 | StructPatFieldList | diff --git a/rust/ql/test/extractor-tests/generated/StructPat/StructPat_getStructPatFieldList.ql b/rust/ql/test/extractor-tests/generated/StructPat/StructPat_getStructPatFieldList.ql deleted file mode 100644 index 1304a8e16f3..00000000000 --- a/rust/ql/test/extractor-tests/generated/StructPat/StructPat_getStructPatFieldList.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from StructPat x -where toBeTested(x) and not x.isUnknown() -select x, x.getStructPatFieldList() diff --git a/rust/ql/test/extractor-tests/generated/StructPatField/Cargo.lock b/rust/ql/test/extractor-tests/generated/StructPatField/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/StructPatField/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/StructPatField/StructPatField.expected b/rust/ql/test/extractor-tests/generated/StructPatField/StructPatField.expected index bb492dabd12..c2efa2bda82 100644 --- a/rust/ql/test/extractor-tests/generated/StructPatField/StructPatField.expected +++ b/rust/ql/test/extractor-tests/generated/StructPatField/StructPatField.expected @@ -1,2 +1,10 @@ -| gen_struct_pat_field.rs:5:15:5:18 | a: 1 | getNumberOfAttrs: | 0 | hasIdentifier: | yes | hasPat: | yes | -| gen_struct_pat_field.rs:5:21:5:24 | b: 2 | getNumberOfAttrs: | 0 | hasIdentifier: | yes | hasPat: | yes | +instances +| gen_struct_pat_field.rs:5:15:5:18 | a: 1 | +| gen_struct_pat_field.rs:5:21:5:24 | b: 2 | +getAttr +getIdentifier +| gen_struct_pat_field.rs:5:15:5:18 | a: 1 | gen_struct_pat_field.rs:5:15:5:15 | a | +| gen_struct_pat_field.rs:5:21:5:24 | b: 2 | gen_struct_pat_field.rs:5:21:5:21 | b | +getPat +| gen_struct_pat_field.rs:5:15:5:18 | a: 1 | gen_struct_pat_field.rs:5:18:5:18 | 1 | +| gen_struct_pat_field.rs:5:21:5:24 | b: 2 | gen_struct_pat_field.rs:5:24:5:24 | 2 | diff --git a/rust/ql/test/extractor-tests/generated/StructPatField/StructPatField.ql b/rust/ql/test/extractor-tests/generated/StructPatField/StructPatField.ql index a68d2b52614..4b3c605590d 100644 --- a/rust/ql/test/extractor-tests/generated/StructPatField/StructPatField.ql +++ b/rust/ql/test/extractor-tests/generated/StructPatField/StructPatField.ql @@ -2,11 +2,16 @@ import codeql.rust.elements import TestUtils -from StructPatField x, int getNumberOfAttrs, string hasIdentifier, string hasPat -where - toBeTested(x) and - not x.isUnknown() and - getNumberOfAttrs = x.getNumberOfAttrs() and - (if x.hasIdentifier() then hasIdentifier = "yes" else hasIdentifier = "no") and - if x.hasPat() then hasPat = "yes" else hasPat = "no" -select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasIdentifier:", hasIdentifier, "hasPat:", hasPat +query predicate instances(StructPatField x) { toBeTested(x) and not x.isUnknown() } + +query predicate getAttr(StructPatField x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} + +query predicate getIdentifier(StructPatField x, NameRef getIdentifier) { + toBeTested(x) and not x.isUnknown() and getIdentifier = x.getIdentifier() +} + +query predicate getPat(StructPatField x, Pat getPat) { + toBeTested(x) and not x.isUnknown() and getPat = x.getPat() +} diff --git a/rust/ql/test/extractor-tests/generated/StructPatField/StructPatField_getAttr.expected b/rust/ql/test/extractor-tests/generated/StructPatField/StructPatField_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/StructPatField/StructPatField_getAttr.ql b/rust/ql/test/extractor-tests/generated/StructPatField/StructPatField_getAttr.ql deleted file mode 100644 index 4dd2a726473..00000000000 --- a/rust/ql/test/extractor-tests/generated/StructPatField/StructPatField_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from StructPatField x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/StructPatField/StructPatField_getIdentifier.expected b/rust/ql/test/extractor-tests/generated/StructPatField/StructPatField_getIdentifier.expected deleted file mode 100644 index b2f9c496747..00000000000 --- a/rust/ql/test/extractor-tests/generated/StructPatField/StructPatField_getIdentifier.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_struct_pat_field.rs:5:15:5:18 | a: 1 | gen_struct_pat_field.rs:5:15:5:15 | a | -| gen_struct_pat_field.rs:5:21:5:24 | b: 2 | gen_struct_pat_field.rs:5:21:5:21 | b | diff --git a/rust/ql/test/extractor-tests/generated/StructPatField/StructPatField_getIdentifier.ql b/rust/ql/test/extractor-tests/generated/StructPatField/StructPatField_getIdentifier.ql deleted file mode 100644 index e03a98229b3..00000000000 --- a/rust/ql/test/extractor-tests/generated/StructPatField/StructPatField_getIdentifier.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from StructPatField x -where toBeTested(x) and not x.isUnknown() -select x, x.getIdentifier() diff --git a/rust/ql/test/extractor-tests/generated/StructPatField/StructPatField_getPat.expected b/rust/ql/test/extractor-tests/generated/StructPatField/StructPatField_getPat.expected deleted file mode 100644 index 28e7c4313b0..00000000000 --- a/rust/ql/test/extractor-tests/generated/StructPatField/StructPatField_getPat.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_struct_pat_field.rs:5:15:5:18 | a: 1 | gen_struct_pat_field.rs:5:18:5:18 | 1 | -| gen_struct_pat_field.rs:5:21:5:24 | b: 2 | gen_struct_pat_field.rs:5:24:5:24 | 2 | diff --git a/rust/ql/test/extractor-tests/generated/StructPatField/StructPatField_getPat.ql b/rust/ql/test/extractor-tests/generated/StructPatField/StructPatField_getPat.ql deleted file mode 100644 index 4a8cbbd794b..00000000000 --- a/rust/ql/test/extractor-tests/generated/StructPatField/StructPatField_getPat.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from StructPatField x -where toBeTested(x) and not x.isUnknown() -select x, x.getPat() diff --git a/rust/ql/test/extractor-tests/generated/StructPatFieldList/Cargo.lock b/rust/ql/test/extractor-tests/generated/StructPatFieldList/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/StructPatFieldList/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/StructPatFieldList/StructPatFieldList.expected b/rust/ql/test/extractor-tests/generated/StructPatFieldList/StructPatFieldList.expected index a52d73ab6c8..a40c54bd30a 100644 --- a/rust/ql/test/extractor-tests/generated/StructPatFieldList/StructPatFieldList.expected +++ b/rust/ql/test/extractor-tests/generated/StructPatFieldList/StructPatFieldList.expected @@ -1 +1,6 @@ -| gen_struct_pat_field_list.rs:7:13:7:20 | StructPatFieldList | getNumberOfFields: | 2 | hasRestPat: | no | +instances +| gen_struct_pat_field_list.rs:7:13:7:20 | StructPatFieldList | +getField +| gen_struct_pat_field_list.rs:7:13:7:20 | StructPatFieldList | 0 | gen_struct_pat_field_list.rs:7:15:7:15 | ... | +| gen_struct_pat_field_list.rs:7:13:7:20 | StructPatFieldList | 1 | gen_struct_pat_field_list.rs:7:18:7:18 | ... | +getRestPat diff --git a/rust/ql/test/extractor-tests/generated/StructPatFieldList/StructPatFieldList.ql b/rust/ql/test/extractor-tests/generated/StructPatFieldList/StructPatFieldList.ql index 051b28b0718..2d9433fdb80 100644 --- a/rust/ql/test/extractor-tests/generated/StructPatFieldList/StructPatFieldList.ql +++ b/rust/ql/test/extractor-tests/generated/StructPatFieldList/StructPatFieldList.ql @@ -2,10 +2,12 @@ import codeql.rust.elements import TestUtils -from StructPatFieldList x, int getNumberOfFields, string hasRestPat -where - toBeTested(x) and - not x.isUnknown() and - getNumberOfFields = x.getNumberOfFields() and - if x.hasRestPat() then hasRestPat = "yes" else hasRestPat = "no" -select x, "getNumberOfFields:", getNumberOfFields, "hasRestPat:", hasRestPat +query predicate instances(StructPatFieldList x) { toBeTested(x) and not x.isUnknown() } + +query predicate getField(StructPatFieldList x, int index, StructPatField getField) { + toBeTested(x) and not x.isUnknown() and getField = x.getField(index) +} + +query predicate getRestPat(StructPatFieldList x, RestPat getRestPat) { + toBeTested(x) and not x.isUnknown() and getRestPat = x.getRestPat() +} diff --git a/rust/ql/test/extractor-tests/generated/StructPatFieldList/StructPatFieldList_getField.expected b/rust/ql/test/extractor-tests/generated/StructPatFieldList/StructPatFieldList_getField.expected deleted file mode 100644 index c2d445a5a3f..00000000000 --- a/rust/ql/test/extractor-tests/generated/StructPatFieldList/StructPatFieldList_getField.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_struct_pat_field_list.rs:7:13:7:20 | StructPatFieldList | 0 | gen_struct_pat_field_list.rs:7:15:7:15 | ... | -| gen_struct_pat_field_list.rs:7:13:7:20 | StructPatFieldList | 1 | gen_struct_pat_field_list.rs:7:18:7:18 | ... | diff --git a/rust/ql/test/extractor-tests/generated/StructPatFieldList/StructPatFieldList_getField.ql b/rust/ql/test/extractor-tests/generated/StructPatFieldList/StructPatFieldList_getField.ql deleted file mode 100644 index 65e6d34b0f8..00000000000 --- a/rust/ql/test/extractor-tests/generated/StructPatFieldList/StructPatFieldList_getField.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from StructPatFieldList x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getField(index) diff --git a/rust/ql/test/extractor-tests/generated/StructPatFieldList/StructPatFieldList_getRestPat.expected b/rust/ql/test/extractor-tests/generated/StructPatFieldList/StructPatFieldList_getRestPat.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/StructPatFieldList/StructPatFieldList_getRestPat.ql b/rust/ql/test/extractor-tests/generated/StructPatFieldList/StructPatFieldList_getRestPat.ql deleted file mode 100644 index 6ba00441e92..00000000000 --- a/rust/ql/test/extractor-tests/generated/StructPatFieldList/StructPatFieldList_getRestPat.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from StructPatFieldList x -where toBeTested(x) and not x.isUnknown() -select x, x.getRestPat() diff --git a/rust/ql/test/extractor-tests/generated/TokenTree/Cargo.lock b/rust/ql/test/extractor-tests/generated/TokenTree/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TokenTree/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/TokenTree/TokenTree.ql b/rust/ql/test/extractor-tests/generated/TokenTree/TokenTree.ql index 299c1e48b6b..9e4496fc718 100644 --- a/rust/ql/test/extractor-tests/generated/TokenTree/TokenTree.ql +++ b/rust/ql/test/extractor-tests/generated/TokenTree/TokenTree.ql @@ -2,6 +2,4 @@ import codeql.rust.elements import TestUtils -from TokenTree x -where toBeTested(x) and not x.isUnknown() -select x +query predicate instances(TokenTree x) { toBeTested(x) and not x.isUnknown() } diff --git a/rust/ql/test/extractor-tests/generated/Trait/AssocItemList.expected b/rust/ql/test/extractor-tests/generated/Trait/AssocItemList.expected index 123a2da6653..526d4057b3c 100644 --- a/rust/ql/test/extractor-tests/generated/Trait/AssocItemList.expected +++ b/rust/ql/test/extractor-tests/generated/Trait/AssocItemList.expected @@ -1,2 +1,8 @@ -| gen_trait.rs:4:20:8:1 | AssocItemList | getNumberOfAssocItems: | 3 | getNumberOfAttrs: | 0 | -| gen_trait.rs:10:56:10:57 | AssocItemList | getNumberOfAssocItems: | 0 | getNumberOfAttrs: | 0 | +instances +| gen_trait.rs:4:20:8:1 | AssocItemList | +| gen_trait.rs:10:56:10:57 | AssocItemList | +getAssocItem +| gen_trait.rs:4:20:8:1 | AssocItemList | 0 | gen_trait.rs:5:3:5:18 | type Frobinator | +| gen_trait.rs:4:20:8:1 | AssocItemList | 1 | gen_trait.rs:6:3:6:20 | type Result | +| gen_trait.rs:4:20:8:1 | AssocItemList | 2 | gen_trait.rs:7:3:7:72 | fn frobinize_with | +getAttr diff --git a/rust/ql/test/extractor-tests/generated/Trait/AssocItemList.ql b/rust/ql/test/extractor-tests/generated/Trait/AssocItemList.ql index eebd261c6bd..bbef174971f 100644 --- a/rust/ql/test/extractor-tests/generated/Trait/AssocItemList.ql +++ b/rust/ql/test/extractor-tests/generated/Trait/AssocItemList.ql @@ -2,10 +2,12 @@ import codeql.rust.elements import TestUtils -from AssocItemList x, int getNumberOfAssocItems, int getNumberOfAttrs -where - toBeTested(x) and - not x.isUnknown() and - getNumberOfAssocItems = x.getNumberOfAssocItems() and - getNumberOfAttrs = x.getNumberOfAttrs() -select x, "getNumberOfAssocItems:", getNumberOfAssocItems, "getNumberOfAttrs:", getNumberOfAttrs +query predicate instances(AssocItemList x) { toBeTested(x) and not x.isUnknown() } + +query predicate getAssocItem(AssocItemList x, int index, AssocItem getAssocItem) { + toBeTested(x) and not x.isUnknown() and getAssocItem = x.getAssocItem(index) +} + +query predicate getAttr(AssocItemList x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} diff --git a/rust/ql/test/extractor-tests/generated/Trait/AssocItemList_getAssocItem.expected b/rust/ql/test/extractor-tests/generated/Trait/AssocItemList_getAssocItem.expected deleted file mode 100644 index a8b21eb8466..00000000000 --- a/rust/ql/test/extractor-tests/generated/Trait/AssocItemList_getAssocItem.expected +++ /dev/null @@ -1,3 +0,0 @@ -| gen_trait.rs:4:20:8:1 | AssocItemList | 0 | gen_trait.rs:5:3:5:18 | type Frobinator | -| gen_trait.rs:4:20:8:1 | AssocItemList | 1 | gen_trait.rs:6:3:6:20 | type Result | -| gen_trait.rs:4:20:8:1 | AssocItemList | 2 | gen_trait.rs:7:3:7:72 | fn frobinize_with | diff --git a/rust/ql/test/extractor-tests/generated/Trait/AssocItemList_getAssocItem.ql b/rust/ql/test/extractor-tests/generated/Trait/AssocItemList_getAssocItem.ql deleted file mode 100644 index 01d36f7cc54..00000000000 --- a/rust/ql/test/extractor-tests/generated/Trait/AssocItemList_getAssocItem.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from AssocItemList x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAssocItem(index) diff --git a/rust/ql/test/extractor-tests/generated/Trait/AssocItemList_getAttr.expected b/rust/ql/test/extractor-tests/generated/Trait/AssocItemList_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Trait/AssocItemList_getAttr.ql b/rust/ql/test/extractor-tests/generated/Trait/AssocItemList_getAttr.ql deleted file mode 100644 index 72b5f366737..00000000000 --- a/rust/ql/test/extractor-tests/generated/Trait/AssocItemList_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from AssocItemList x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/Trait/Cargo.lock b/rust/ql/test/extractor-tests/generated/Trait/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Trait/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/Trait/Trait.expected b/rust/ql/test/extractor-tests/generated/Trait/Trait.expected index de921f246b4..ff60871f40b 100644 --- a/rust/ql/test/extractor-tests/generated/Trait/Trait.expected +++ b/rust/ql/test/extractor-tests/generated/Trait/Trait.expected @@ -1,2 +1,24 @@ -| gen_trait.rs:3:1:8:1 | trait Frobinizable | hasExtendedCanonicalPath: | yes | hasCrateOrigin: | yes | hasAttributeMacroExpansion: | no | hasAssocItemList: | yes | getNumberOfAttrs: | 0 | hasGenericParamList: | no | isAuto: | no | isUnsafe: | no | hasName: | yes | hasTypeBoundList: | no | hasVisibility: | no | hasWhereClause: | no | -| gen_trait.rs:10:1:10:57 | trait Foo | hasExtendedCanonicalPath: | yes | hasCrateOrigin: | yes | hasAttributeMacroExpansion: | no | hasAssocItemList: | yes | getNumberOfAttrs: | 0 | hasGenericParamList: | yes | isAuto: | no | isUnsafe: | no | hasName: | yes | hasTypeBoundList: | no | hasVisibility: | yes | hasWhereClause: | yes | +instances +| gen_trait.rs:3:1:8:1 | trait Frobinizable | isAuto: | no | isUnsafe: | no | +| gen_trait.rs:10:1:10:57 | trait Foo | isAuto: | no | isUnsafe: | no | +getExtendedCanonicalPath +| gen_trait.rs:3:1:8:1 | trait Frobinizable | crate::gen_trait::Frobinizable | +| gen_trait.rs:10:1:10:57 | trait Foo | crate::gen_trait::Foo | +getCrateOrigin +| gen_trait.rs:3:1:8:1 | trait Frobinizable | repo::test | +| gen_trait.rs:10:1:10:57 | trait Foo | repo::test | +getAttributeMacroExpansion +getAssocItemList +| gen_trait.rs:3:1:8:1 | trait Frobinizable | gen_trait.rs:4:20:8:1 | AssocItemList | +| gen_trait.rs:10:1:10:57 | trait Foo | gen_trait.rs:10:56:10:57 | AssocItemList | +getAttr +getGenericParamList +| gen_trait.rs:10:1:10:57 | trait Foo | gen_trait.rs:10:14:10:30 | <...> | +getName +| gen_trait.rs:3:1:8:1 | trait Frobinizable | gen_trait.rs:4:7:4:18 | Frobinizable | +| gen_trait.rs:10:1:10:57 | trait Foo | gen_trait.rs:10:11:10:13 | Foo | +getTypeBoundList +getVisibility +| gen_trait.rs:10:1:10:57 | trait Foo | gen_trait.rs:10:1:10:3 | Visibility | +getWhereClause +| gen_trait.rs:10:1:10:57 | trait Foo | gen_trait.rs:10:32:10:54 | WhereClause | diff --git a/rust/ql/test/extractor-tests/generated/Trait/Trait.ql b/rust/ql/test/extractor-tests/generated/Trait/Trait.ql index 2e8173a21af..35725fcd526 100644 --- a/rust/ql/test/extractor-tests/generated/Trait/Trait.ql +++ b/rust/ql/test/extractor-tests/generated/Trait/Trait.ql @@ -2,36 +2,55 @@ import codeql.rust.elements import TestUtils -from - Trait x, string hasExtendedCanonicalPath, string hasCrateOrigin, - string hasAttributeMacroExpansion, string hasAssocItemList, int getNumberOfAttrs, - string hasGenericParamList, string isAuto, string isUnsafe, string hasName, - string hasTypeBoundList, string hasVisibility, string hasWhereClause -where +query predicate instances( + Trait x, string isAuto__label, string isAuto, string isUnsafe__label, string isUnsafe +) { toBeTested(x) and not x.isUnknown() and - ( - if x.hasExtendedCanonicalPath() - then hasExtendedCanonicalPath = "yes" - else hasExtendedCanonicalPath = "no" - ) and - (if x.hasCrateOrigin() then hasCrateOrigin = "yes" else hasCrateOrigin = "no") and - ( - if x.hasAttributeMacroExpansion() - then hasAttributeMacroExpansion = "yes" - else hasAttributeMacroExpansion = "no" - ) and - (if x.hasAssocItemList() then hasAssocItemList = "yes" else hasAssocItemList = "no") and - getNumberOfAttrs = x.getNumberOfAttrs() and - (if x.hasGenericParamList() then hasGenericParamList = "yes" else hasGenericParamList = "no") and + isAuto__label = "isAuto:" and (if x.isAuto() then isAuto = "yes" else isAuto = "no") and - (if x.isUnsafe() then isUnsafe = "yes" else isUnsafe = "no") and - (if x.hasName() then hasName = "yes" else hasName = "no") and - (if x.hasTypeBoundList() then hasTypeBoundList = "yes" else hasTypeBoundList = "no") and - (if x.hasVisibility() then hasVisibility = "yes" else hasVisibility = "no") and - if x.hasWhereClause() then hasWhereClause = "yes" else hasWhereClause = "no" -select x, "hasExtendedCanonicalPath:", hasExtendedCanonicalPath, "hasCrateOrigin:", hasCrateOrigin, - "hasAttributeMacroExpansion:", hasAttributeMacroExpansion, "hasAssocItemList:", hasAssocItemList, - "getNumberOfAttrs:", getNumberOfAttrs, "hasGenericParamList:", hasGenericParamList, "isAuto:", - isAuto, "isUnsafe:", isUnsafe, "hasName:", hasName, "hasTypeBoundList:", hasTypeBoundList, - "hasVisibility:", hasVisibility, "hasWhereClause:", hasWhereClause + isUnsafe__label = "isUnsafe:" and + if x.isUnsafe() then isUnsafe = "yes" else isUnsafe = "no" +} + +query predicate getExtendedCanonicalPath(Trait x, string getExtendedCanonicalPath) { + toBeTested(x) and not x.isUnknown() and getExtendedCanonicalPath = x.getExtendedCanonicalPath() +} + +query predicate getCrateOrigin(Trait x, string getCrateOrigin) { + toBeTested(x) and not x.isUnknown() and getCrateOrigin = x.getCrateOrigin() +} + +query predicate getAttributeMacroExpansion(Trait x, MacroItems getAttributeMacroExpansion) { + toBeTested(x) and + not x.isUnknown() and + getAttributeMacroExpansion = x.getAttributeMacroExpansion() +} + +query predicate getAssocItemList(Trait x, AssocItemList getAssocItemList) { + toBeTested(x) and not x.isUnknown() and getAssocItemList = x.getAssocItemList() +} + +query predicate getAttr(Trait x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} + +query predicate getGenericParamList(Trait x, GenericParamList getGenericParamList) { + toBeTested(x) and not x.isUnknown() and getGenericParamList = x.getGenericParamList() +} + +query predicate getName(Trait x, Name getName) { + toBeTested(x) and not x.isUnknown() and getName = x.getName() +} + +query predicate getTypeBoundList(Trait x, TypeBoundList getTypeBoundList) { + toBeTested(x) and not x.isUnknown() and getTypeBoundList = x.getTypeBoundList() +} + +query predicate getVisibility(Trait x, Visibility getVisibility) { + toBeTested(x) and not x.isUnknown() and getVisibility = x.getVisibility() +} + +query predicate getWhereClause(Trait x, WhereClause getWhereClause) { + toBeTested(x) and not x.isUnknown() and getWhereClause = x.getWhereClause() +} diff --git a/rust/ql/test/extractor-tests/generated/Trait/Trait_getAssocItemList.expected b/rust/ql/test/extractor-tests/generated/Trait/Trait_getAssocItemList.expected deleted file mode 100644 index b60c89c8d3f..00000000000 --- a/rust/ql/test/extractor-tests/generated/Trait/Trait_getAssocItemList.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_trait.rs:3:1:8:1 | trait Frobinizable | gen_trait.rs:4:20:8:1 | AssocItemList | -| gen_trait.rs:10:1:10:57 | trait Foo | gen_trait.rs:10:56:10:57 | AssocItemList | diff --git a/rust/ql/test/extractor-tests/generated/Trait/Trait_getAssocItemList.ql b/rust/ql/test/extractor-tests/generated/Trait/Trait_getAssocItemList.ql deleted file mode 100644 index 94a59605021..00000000000 --- a/rust/ql/test/extractor-tests/generated/Trait/Trait_getAssocItemList.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Trait x -where toBeTested(x) and not x.isUnknown() -select x, x.getAssocItemList() diff --git a/rust/ql/test/extractor-tests/generated/Trait/Trait_getAttr.expected b/rust/ql/test/extractor-tests/generated/Trait/Trait_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Trait/Trait_getAttr.ql b/rust/ql/test/extractor-tests/generated/Trait/Trait_getAttr.ql deleted file mode 100644 index 219303af515..00000000000 --- a/rust/ql/test/extractor-tests/generated/Trait/Trait_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Trait x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/Trait/Trait_getAttributeMacroExpansion.expected b/rust/ql/test/extractor-tests/generated/Trait/Trait_getAttributeMacroExpansion.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Trait/Trait_getAttributeMacroExpansion.ql b/rust/ql/test/extractor-tests/generated/Trait/Trait_getAttributeMacroExpansion.ql deleted file mode 100644 index 9499d03e9cc..00000000000 --- a/rust/ql/test/extractor-tests/generated/Trait/Trait_getAttributeMacroExpansion.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Trait x -where toBeTested(x) and not x.isUnknown() -select x, x.getAttributeMacroExpansion() diff --git a/rust/ql/test/extractor-tests/generated/Trait/Trait_getCrateOrigin.expected b/rust/ql/test/extractor-tests/generated/Trait/Trait_getCrateOrigin.expected deleted file mode 100644 index 1e42bb43731..00000000000 --- a/rust/ql/test/extractor-tests/generated/Trait/Trait_getCrateOrigin.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_trait.rs:3:1:8:1 | trait Frobinizable | repo::test | -| gen_trait.rs:10:1:10:57 | trait Foo | repo::test | diff --git a/rust/ql/test/extractor-tests/generated/Trait/Trait_getCrateOrigin.ql b/rust/ql/test/extractor-tests/generated/Trait/Trait_getCrateOrigin.ql deleted file mode 100644 index 8c2c71a918e..00000000000 --- a/rust/ql/test/extractor-tests/generated/Trait/Trait_getCrateOrigin.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Trait x -where toBeTested(x) and not x.isUnknown() -select x, x.getCrateOrigin() diff --git a/rust/ql/test/extractor-tests/generated/Trait/Trait_getExtendedCanonicalPath.expected b/rust/ql/test/extractor-tests/generated/Trait/Trait_getExtendedCanonicalPath.expected deleted file mode 100644 index 6a5e8203673..00000000000 --- a/rust/ql/test/extractor-tests/generated/Trait/Trait_getExtendedCanonicalPath.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_trait.rs:3:1:8:1 | trait Frobinizable | crate::gen_trait::Frobinizable | -| gen_trait.rs:10:1:10:57 | trait Foo | crate::gen_trait::Foo | diff --git a/rust/ql/test/extractor-tests/generated/Trait/Trait_getExtendedCanonicalPath.ql b/rust/ql/test/extractor-tests/generated/Trait/Trait_getExtendedCanonicalPath.ql deleted file mode 100644 index 5281a18656b..00000000000 --- a/rust/ql/test/extractor-tests/generated/Trait/Trait_getExtendedCanonicalPath.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Trait x -where toBeTested(x) and not x.isUnknown() -select x, x.getExtendedCanonicalPath() diff --git a/rust/ql/test/extractor-tests/generated/Trait/Trait_getGenericParamList.expected b/rust/ql/test/extractor-tests/generated/Trait/Trait_getGenericParamList.expected deleted file mode 100644 index ba9e996565f..00000000000 --- a/rust/ql/test/extractor-tests/generated/Trait/Trait_getGenericParamList.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_trait.rs:10:1:10:57 | trait Foo | gen_trait.rs:10:14:10:30 | <...> | diff --git a/rust/ql/test/extractor-tests/generated/Trait/Trait_getGenericParamList.ql b/rust/ql/test/extractor-tests/generated/Trait/Trait_getGenericParamList.ql deleted file mode 100644 index db979636892..00000000000 --- a/rust/ql/test/extractor-tests/generated/Trait/Trait_getGenericParamList.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Trait x -where toBeTested(x) and not x.isUnknown() -select x, x.getGenericParamList() diff --git a/rust/ql/test/extractor-tests/generated/Trait/Trait_getName.expected b/rust/ql/test/extractor-tests/generated/Trait/Trait_getName.expected deleted file mode 100644 index 1c087cdea89..00000000000 --- a/rust/ql/test/extractor-tests/generated/Trait/Trait_getName.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_trait.rs:3:1:8:1 | trait Frobinizable | gen_trait.rs:4:7:4:18 | Frobinizable | -| gen_trait.rs:10:1:10:57 | trait Foo | gen_trait.rs:10:11:10:13 | Foo | diff --git a/rust/ql/test/extractor-tests/generated/Trait/Trait_getName.ql b/rust/ql/test/extractor-tests/generated/Trait/Trait_getName.ql deleted file mode 100644 index eeb7b6f4802..00000000000 --- a/rust/ql/test/extractor-tests/generated/Trait/Trait_getName.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Trait x -where toBeTested(x) and not x.isUnknown() -select x, x.getName() diff --git a/rust/ql/test/extractor-tests/generated/Trait/Trait_getTypeBoundList.expected b/rust/ql/test/extractor-tests/generated/Trait/Trait_getTypeBoundList.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Trait/Trait_getTypeBoundList.ql b/rust/ql/test/extractor-tests/generated/Trait/Trait_getTypeBoundList.ql deleted file mode 100644 index f5544da39d3..00000000000 --- a/rust/ql/test/extractor-tests/generated/Trait/Trait_getTypeBoundList.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Trait x -where toBeTested(x) and not x.isUnknown() -select x, x.getTypeBoundList() diff --git a/rust/ql/test/extractor-tests/generated/Trait/Trait_getVisibility.expected b/rust/ql/test/extractor-tests/generated/Trait/Trait_getVisibility.expected deleted file mode 100644 index 56576624e47..00000000000 --- a/rust/ql/test/extractor-tests/generated/Trait/Trait_getVisibility.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_trait.rs:10:1:10:57 | trait Foo | gen_trait.rs:10:1:10:3 | Visibility | diff --git a/rust/ql/test/extractor-tests/generated/Trait/Trait_getVisibility.ql b/rust/ql/test/extractor-tests/generated/Trait/Trait_getVisibility.ql deleted file mode 100644 index 1405d15127e..00000000000 --- a/rust/ql/test/extractor-tests/generated/Trait/Trait_getVisibility.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Trait x -where toBeTested(x) and not x.isUnknown() -select x, x.getVisibility() diff --git a/rust/ql/test/extractor-tests/generated/Trait/Trait_getWhereClause.expected b/rust/ql/test/extractor-tests/generated/Trait/Trait_getWhereClause.expected deleted file mode 100644 index d46ac2d04cd..00000000000 --- a/rust/ql/test/extractor-tests/generated/Trait/Trait_getWhereClause.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_trait.rs:10:1:10:57 | trait Foo | gen_trait.rs:10:32:10:54 | WhereClause | diff --git a/rust/ql/test/extractor-tests/generated/Trait/Trait_getWhereClause.ql b/rust/ql/test/extractor-tests/generated/Trait/Trait_getWhereClause.ql deleted file mode 100644 index fb7448f8196..00000000000 --- a/rust/ql/test/extractor-tests/generated/Trait/Trait_getWhereClause.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Trait x -where toBeTested(x) and not x.isUnknown() -select x, x.getWhereClause() diff --git a/rust/ql/test/extractor-tests/generated/TraitAlias/Cargo.lock b/rust/ql/test/extractor-tests/generated/TraitAlias/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TraitAlias/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias.expected b/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias.expected index 0a5b69dcd5e..f8fc1628036 100644 --- a/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias.expected +++ b/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias.expected @@ -1 +1,13 @@ -| gen_trait_alias.rs:7:5:7:26 | TraitAlias | hasExtendedCanonicalPath: | no | hasCrateOrigin: | no | hasAttributeMacroExpansion: | no | getNumberOfAttrs: | 0 | hasGenericParamList: | no | hasName: | yes | hasTypeBoundList: | yes | hasVisibility: | no | hasWhereClause: | no | +instances +| gen_trait_alias.rs:7:5:7:26 | TraitAlias | +getExtendedCanonicalPath +getCrateOrigin +getAttributeMacroExpansion +getAttr +getGenericParamList +getName +| gen_trait_alias.rs:7:5:7:26 | TraitAlias | gen_trait_alias.rs:7:11:7:13 | Foo | +getTypeBoundList +| gen_trait_alias.rs:7:5:7:26 | TraitAlias | gen_trait_alias.rs:7:17:7:25 | TypeBoundList | +getVisibility +getWhereClause diff --git a/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias.ql b/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias.ql index 319f65e3730..2d65541f50c 100644 --- a/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias.ql +++ b/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias.ql @@ -2,31 +2,42 @@ import codeql.rust.elements import TestUtils -from - TraitAlias x, string hasExtendedCanonicalPath, string hasCrateOrigin, - string hasAttributeMacroExpansion, int getNumberOfAttrs, string hasGenericParamList, - string hasName, string hasTypeBoundList, string hasVisibility, string hasWhereClause -where +query predicate instances(TraitAlias x) { toBeTested(x) and not x.isUnknown() } + +query predicate getExtendedCanonicalPath(TraitAlias x, string getExtendedCanonicalPath) { + toBeTested(x) and not x.isUnknown() and getExtendedCanonicalPath = x.getExtendedCanonicalPath() +} + +query predicate getCrateOrigin(TraitAlias x, string getCrateOrigin) { + toBeTested(x) and not x.isUnknown() and getCrateOrigin = x.getCrateOrigin() +} + +query predicate getAttributeMacroExpansion(TraitAlias x, MacroItems getAttributeMacroExpansion) { toBeTested(x) and not x.isUnknown() and - ( - if x.hasExtendedCanonicalPath() - then hasExtendedCanonicalPath = "yes" - else hasExtendedCanonicalPath = "no" - ) and - (if x.hasCrateOrigin() then hasCrateOrigin = "yes" else hasCrateOrigin = "no") and - ( - if x.hasAttributeMacroExpansion() - then hasAttributeMacroExpansion = "yes" - else hasAttributeMacroExpansion = "no" - ) and - getNumberOfAttrs = x.getNumberOfAttrs() and - (if x.hasGenericParamList() then hasGenericParamList = "yes" else hasGenericParamList = "no") and - (if x.hasName() then hasName = "yes" else hasName = "no") and - (if x.hasTypeBoundList() then hasTypeBoundList = "yes" else hasTypeBoundList = "no") and - (if x.hasVisibility() then hasVisibility = "yes" else hasVisibility = "no") and - if x.hasWhereClause() then hasWhereClause = "yes" else hasWhereClause = "no" -select x, "hasExtendedCanonicalPath:", hasExtendedCanonicalPath, "hasCrateOrigin:", hasCrateOrigin, - "hasAttributeMacroExpansion:", hasAttributeMacroExpansion, "getNumberOfAttrs:", getNumberOfAttrs, - "hasGenericParamList:", hasGenericParamList, "hasName:", hasName, "hasTypeBoundList:", - hasTypeBoundList, "hasVisibility:", hasVisibility, "hasWhereClause:", hasWhereClause + getAttributeMacroExpansion = x.getAttributeMacroExpansion() +} + +query predicate getAttr(TraitAlias x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} + +query predicate getGenericParamList(TraitAlias x, GenericParamList getGenericParamList) { + toBeTested(x) and not x.isUnknown() and getGenericParamList = x.getGenericParamList() +} + +query predicate getName(TraitAlias x, Name getName) { + toBeTested(x) and not x.isUnknown() and getName = x.getName() +} + +query predicate getTypeBoundList(TraitAlias x, TypeBoundList getTypeBoundList) { + toBeTested(x) and not x.isUnknown() and getTypeBoundList = x.getTypeBoundList() +} + +query predicate getVisibility(TraitAlias x, Visibility getVisibility) { + toBeTested(x) and not x.isUnknown() and getVisibility = x.getVisibility() +} + +query predicate getWhereClause(TraitAlias x, WhereClause getWhereClause) { + toBeTested(x) and not x.isUnknown() and getWhereClause = x.getWhereClause() +} diff --git a/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getAttr.expected b/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getAttr.ql b/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getAttr.ql deleted file mode 100644 index 3ca992de122..00000000000 --- a/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from TraitAlias x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getAttributeMacroExpansion.expected b/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getAttributeMacroExpansion.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getAttributeMacroExpansion.ql b/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getAttributeMacroExpansion.ql deleted file mode 100644 index 6a0c43cfc87..00000000000 --- a/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getAttributeMacroExpansion.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from TraitAlias x -where toBeTested(x) and not x.isUnknown() -select x, x.getAttributeMacroExpansion() diff --git a/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getCrateOrigin.expected b/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getCrateOrigin.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getCrateOrigin.ql b/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getCrateOrigin.ql deleted file mode 100644 index 6f9ccf89262..00000000000 --- a/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getCrateOrigin.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from TraitAlias x -where toBeTested(x) and not x.isUnknown() -select x, x.getCrateOrigin() diff --git a/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getExtendedCanonicalPath.expected b/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getExtendedCanonicalPath.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getExtendedCanonicalPath.ql b/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getExtendedCanonicalPath.ql deleted file mode 100644 index 6326e730c33..00000000000 --- a/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getExtendedCanonicalPath.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from TraitAlias x -where toBeTested(x) and not x.isUnknown() -select x, x.getExtendedCanonicalPath() diff --git a/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getGenericParamList.expected b/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getGenericParamList.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getGenericParamList.ql b/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getGenericParamList.ql deleted file mode 100644 index 3372d78e89e..00000000000 --- a/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getGenericParamList.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from TraitAlias x -where toBeTested(x) and not x.isUnknown() -select x, x.getGenericParamList() diff --git a/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getName.expected b/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getName.expected deleted file mode 100644 index e0aae353801..00000000000 --- a/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getName.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_trait_alias.rs:7:5:7:26 | TraitAlias | gen_trait_alias.rs:7:11:7:13 | Foo | diff --git a/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getName.ql b/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getName.ql deleted file mode 100644 index 2b64f27e19d..00000000000 --- a/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getName.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from TraitAlias x -where toBeTested(x) and not x.isUnknown() -select x, x.getName() diff --git a/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getTypeBoundList.expected b/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getTypeBoundList.expected deleted file mode 100644 index 797921bf4dd..00000000000 --- a/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getTypeBoundList.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_trait_alias.rs:7:5:7:26 | TraitAlias | gen_trait_alias.rs:7:17:7:25 | TypeBoundList | diff --git a/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getTypeBoundList.ql b/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getTypeBoundList.ql deleted file mode 100644 index 28f7588ec9f..00000000000 --- a/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getTypeBoundList.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from TraitAlias x -where toBeTested(x) and not x.isUnknown() -select x, x.getTypeBoundList() diff --git a/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getVisibility.expected b/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getVisibility.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getVisibility.ql b/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getVisibility.ql deleted file mode 100644 index 1dde55e9663..00000000000 --- a/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getVisibility.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from TraitAlias x -where toBeTested(x) and not x.isUnknown() -select x, x.getVisibility() diff --git a/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getWhereClause.expected b/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getWhereClause.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getWhereClause.ql b/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getWhereClause.ql deleted file mode 100644 index 91e39d5e646..00000000000 --- a/rust/ql/test/extractor-tests/generated/TraitAlias/TraitAlias_getWhereClause.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from TraitAlias x -where toBeTested(x) and not x.isUnknown() -select x, x.getWhereClause() diff --git a/rust/ql/test/extractor-tests/generated/TryExpr/Cargo.lock b/rust/ql/test/extractor-tests/generated/TryExpr/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TryExpr/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/TryExpr/TryExpr.expected b/rust/ql/test/extractor-tests/generated/TryExpr/TryExpr.expected index 214ca5597ec..7bfee39ff2a 100644 --- a/rust/ql/test/extractor-tests/generated/TryExpr/TryExpr.expected +++ b/rust/ql/test/extractor-tests/generated/TryExpr/TryExpr.expected @@ -1 +1,5 @@ -| gen_try_expr.rs:7:13:7:18 | TryExpr | getNumberOfAttrs: | 0 | hasExpr: | yes | +instances +| gen_try_expr.rs:7:13:7:18 | TryExpr | +getAttr +getExpr +| gen_try_expr.rs:7:13:7:18 | TryExpr | gen_try_expr.rs:7:13:7:17 | foo(...) | diff --git a/rust/ql/test/extractor-tests/generated/TryExpr/TryExpr.ql b/rust/ql/test/extractor-tests/generated/TryExpr/TryExpr.ql index be3c70a933c..fc42bca14a9 100644 --- a/rust/ql/test/extractor-tests/generated/TryExpr/TryExpr.ql +++ b/rust/ql/test/extractor-tests/generated/TryExpr/TryExpr.ql @@ -2,10 +2,12 @@ import codeql.rust.elements import TestUtils -from TryExpr x, int getNumberOfAttrs, string hasExpr -where - toBeTested(x) and - not x.isUnknown() and - getNumberOfAttrs = x.getNumberOfAttrs() and - if x.hasExpr() then hasExpr = "yes" else hasExpr = "no" -select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasExpr:", hasExpr +query predicate instances(TryExpr x) { toBeTested(x) and not x.isUnknown() } + +query predicate getAttr(TryExpr x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} + +query predicate getExpr(TryExpr x, Expr getExpr) { + toBeTested(x) and not x.isUnknown() and getExpr = x.getExpr() +} diff --git a/rust/ql/test/extractor-tests/generated/TryExpr/TryExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/TryExpr/TryExpr_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/TryExpr/TryExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/TryExpr/TryExpr_getAttr.ql deleted file mode 100644 index 1073bec1860..00000000000 --- a/rust/ql/test/extractor-tests/generated/TryExpr/TryExpr_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from TryExpr x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/TryExpr/TryExpr_getExpr.expected b/rust/ql/test/extractor-tests/generated/TryExpr/TryExpr_getExpr.expected deleted file mode 100644 index fb0c8042969..00000000000 --- a/rust/ql/test/extractor-tests/generated/TryExpr/TryExpr_getExpr.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_try_expr.rs:7:13:7:18 | TryExpr | gen_try_expr.rs:7:13:7:17 | foo(...) | diff --git a/rust/ql/test/extractor-tests/generated/TryExpr/TryExpr_getExpr.ql b/rust/ql/test/extractor-tests/generated/TryExpr/TryExpr_getExpr.ql deleted file mode 100644 index 477a2bb5811..00000000000 --- a/rust/ql/test/extractor-tests/generated/TryExpr/TryExpr_getExpr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from TryExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getExpr() diff --git a/rust/ql/test/extractor-tests/generated/TupleExpr/Cargo.lock b/rust/ql/test/extractor-tests/generated/TupleExpr/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TupleExpr/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr.expected b/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr.expected index 2bd4e57c30e..3a35afd6630 100644 --- a/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr.expected +++ b/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr.expected @@ -1,2 +1,9 @@ -| gen_tuple_expr.rs:5:5:5:14 | TupleExpr | getNumberOfAttrs: | 0 | getNumberOfFields: | 2 | -| gen_tuple_expr.rs:6:5:6:14 | TupleExpr | getNumberOfAttrs: | 0 | getNumberOfFields: | 2 | +instances +| gen_tuple_expr.rs:5:5:5:14 | TupleExpr | +| gen_tuple_expr.rs:6:5:6:14 | TupleExpr | +getAttr +getField +| gen_tuple_expr.rs:5:5:5:14 | TupleExpr | 0 | gen_tuple_expr.rs:5:6:5:6 | 1 | +| gen_tuple_expr.rs:5:5:5:14 | TupleExpr | 1 | gen_tuple_expr.rs:5:9:5:13 | "one" | +| gen_tuple_expr.rs:6:5:6:14 | TupleExpr | 0 | gen_tuple_expr.rs:6:6:6:6 | 2 | +| gen_tuple_expr.rs:6:5:6:14 | TupleExpr | 1 | gen_tuple_expr.rs:6:9:6:13 | "two" | diff --git a/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr.ql b/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr.ql index 573d7936d6c..0b49fca4cee 100644 --- a/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr.ql +++ b/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr.ql @@ -2,10 +2,12 @@ import codeql.rust.elements import TestUtils -from TupleExpr x, int getNumberOfAttrs, int getNumberOfFields -where - toBeTested(x) and - not x.isUnknown() and - getNumberOfAttrs = x.getNumberOfAttrs() and - getNumberOfFields = x.getNumberOfFields() -select x, "getNumberOfAttrs:", getNumberOfAttrs, "getNumberOfFields:", getNumberOfFields +query predicate instances(TupleExpr x) { toBeTested(x) and not x.isUnknown() } + +query predicate getAttr(TupleExpr x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} + +query predicate getField(TupleExpr x, int index, Expr getField) { + toBeTested(x) and not x.isUnknown() and getField = x.getField(index) +} diff --git a/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr_getAttr.ql deleted file mode 100644 index 6736dada82b..00000000000 --- a/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from TupleExpr x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr_getField.expected b/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr_getField.expected deleted file mode 100644 index 11cd1614ccd..00000000000 --- a/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr_getField.expected +++ /dev/null @@ -1,4 +0,0 @@ -| gen_tuple_expr.rs:5:5:5:14 | TupleExpr | 0 | gen_tuple_expr.rs:5:6:5:6 | 1 | -| gen_tuple_expr.rs:5:5:5:14 | TupleExpr | 1 | gen_tuple_expr.rs:5:9:5:13 | "one" | -| gen_tuple_expr.rs:6:5:6:14 | TupleExpr | 0 | gen_tuple_expr.rs:6:6:6:6 | 2 | -| gen_tuple_expr.rs:6:5:6:14 | TupleExpr | 1 | gen_tuple_expr.rs:6:9:6:13 | "two" | diff --git a/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr_getField.ql b/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr_getField.ql deleted file mode 100644 index 79c25f047d0..00000000000 --- a/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr_getField.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from TupleExpr x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getField(index) diff --git a/rust/ql/test/extractor-tests/generated/TupleField/Cargo.lock b/rust/ql/test/extractor-tests/generated/TupleField/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TupleField/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/TupleField/TupleField.expected b/rust/ql/test/extractor-tests/generated/TupleField/TupleField.expected index 4c658836ad9..6c653a9c37f 100644 --- a/rust/ql/test/extractor-tests/generated/TupleField/TupleField.expected +++ b/rust/ql/test/extractor-tests/generated/TupleField/TupleField.expected @@ -1,2 +1,8 @@ -| gen_tuple_field.rs:7:14:7:16 | TupleField | getNumberOfAttrs: | 0 | hasTypeRepr: | yes | hasVisibility: | no | -| gen_tuple_field.rs:7:19:7:24 | TupleField | getNumberOfAttrs: | 0 | hasTypeRepr: | yes | hasVisibility: | no | +instances +| gen_tuple_field.rs:7:14:7:16 | TupleField | +| gen_tuple_field.rs:7:19:7:24 | TupleField | +getAttr +getTypeRepr +| gen_tuple_field.rs:7:14:7:16 | TupleField | gen_tuple_field.rs:7:14:7:16 | i32 | +| gen_tuple_field.rs:7:19:7:24 | TupleField | gen_tuple_field.rs:7:19:7:24 | String | +getVisibility diff --git a/rust/ql/test/extractor-tests/generated/TupleField/TupleField.ql b/rust/ql/test/extractor-tests/generated/TupleField/TupleField.ql index 15401629a60..01c15ace3dd 100644 --- a/rust/ql/test/extractor-tests/generated/TupleField/TupleField.ql +++ b/rust/ql/test/extractor-tests/generated/TupleField/TupleField.ql @@ -2,12 +2,16 @@ import codeql.rust.elements import TestUtils -from TupleField x, int getNumberOfAttrs, string hasTypeRepr, string hasVisibility -where - toBeTested(x) and - not x.isUnknown() and - getNumberOfAttrs = x.getNumberOfAttrs() and - (if x.hasTypeRepr() then hasTypeRepr = "yes" else hasTypeRepr = "no") and - if x.hasVisibility() then hasVisibility = "yes" else hasVisibility = "no" -select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasTypeRepr:", hasTypeRepr, "hasVisibility:", - hasVisibility +query predicate instances(TupleField x) { toBeTested(x) and not x.isUnknown() } + +query predicate getAttr(TupleField x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} + +query predicate getTypeRepr(TupleField x, TypeRepr getTypeRepr) { + toBeTested(x) and not x.isUnknown() and getTypeRepr = x.getTypeRepr() +} + +query predicate getVisibility(TupleField x, Visibility getVisibility) { + toBeTested(x) and not x.isUnknown() and getVisibility = x.getVisibility() +} diff --git a/rust/ql/test/extractor-tests/generated/TupleField/TupleField_getAttr.expected b/rust/ql/test/extractor-tests/generated/TupleField/TupleField_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/TupleField/TupleField_getAttr.ql b/rust/ql/test/extractor-tests/generated/TupleField/TupleField_getAttr.ql deleted file mode 100644 index 23481ed001a..00000000000 --- a/rust/ql/test/extractor-tests/generated/TupleField/TupleField_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from TupleField x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/TupleField/TupleField_getTypeRepr.expected b/rust/ql/test/extractor-tests/generated/TupleField/TupleField_getTypeRepr.expected deleted file mode 100644 index 31c4849e7a3..00000000000 --- a/rust/ql/test/extractor-tests/generated/TupleField/TupleField_getTypeRepr.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_tuple_field.rs:7:14:7:16 | TupleField | gen_tuple_field.rs:7:14:7:16 | i32 | -| gen_tuple_field.rs:7:19:7:24 | TupleField | gen_tuple_field.rs:7:19:7:24 | String | diff --git a/rust/ql/test/extractor-tests/generated/TupleField/TupleField_getTypeRepr.ql b/rust/ql/test/extractor-tests/generated/TupleField/TupleField_getTypeRepr.ql deleted file mode 100644 index b68e736cec3..00000000000 --- a/rust/ql/test/extractor-tests/generated/TupleField/TupleField_getTypeRepr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from TupleField x -where toBeTested(x) and not x.isUnknown() -select x, x.getTypeRepr() diff --git a/rust/ql/test/extractor-tests/generated/TupleField/TupleField_getVisibility.expected b/rust/ql/test/extractor-tests/generated/TupleField/TupleField_getVisibility.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/TupleField/TupleField_getVisibility.ql b/rust/ql/test/extractor-tests/generated/TupleField/TupleField_getVisibility.ql deleted file mode 100644 index 457bbd1a57b..00000000000 --- a/rust/ql/test/extractor-tests/generated/TupleField/TupleField_getVisibility.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from TupleField x -where toBeTested(x) and not x.isUnknown() -select x, x.getVisibility() diff --git a/rust/ql/test/extractor-tests/generated/TupleFieldList/Cargo.lock b/rust/ql/test/extractor-tests/generated/TupleFieldList/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TupleFieldList/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/TupleFieldList/TupleFieldList.expected b/rust/ql/test/extractor-tests/generated/TupleFieldList/TupleFieldList.expected index 5101ab7bf19..48940b31c34 100644 --- a/rust/ql/test/extractor-tests/generated/TupleFieldList/TupleFieldList.expected +++ b/rust/ql/test/extractor-tests/generated/TupleFieldList/TupleFieldList.expected @@ -1 +1,5 @@ -| gen_tuple_field_list.rs:7:13:7:25 | TupleFieldList | getNumberOfFields: | 2 | +instances +| gen_tuple_field_list.rs:7:13:7:25 | TupleFieldList | +getField +| gen_tuple_field_list.rs:7:13:7:25 | TupleFieldList | 0 | gen_tuple_field_list.rs:7:14:7:16 | TupleField | +| gen_tuple_field_list.rs:7:13:7:25 | TupleFieldList | 1 | gen_tuple_field_list.rs:7:19:7:24 | TupleField | diff --git a/rust/ql/test/extractor-tests/generated/TupleFieldList/TupleFieldList.ql b/rust/ql/test/extractor-tests/generated/TupleFieldList/TupleFieldList.ql index fd25929804e..90b61236db3 100644 --- a/rust/ql/test/extractor-tests/generated/TupleFieldList/TupleFieldList.ql +++ b/rust/ql/test/extractor-tests/generated/TupleFieldList/TupleFieldList.ql @@ -2,9 +2,8 @@ import codeql.rust.elements import TestUtils -from TupleFieldList x, int getNumberOfFields -where - toBeTested(x) and - not x.isUnknown() and - getNumberOfFields = x.getNumberOfFields() -select x, "getNumberOfFields:", getNumberOfFields +query predicate instances(TupleFieldList x) { toBeTested(x) and not x.isUnknown() } + +query predicate getField(TupleFieldList x, int index, TupleField getField) { + toBeTested(x) and not x.isUnknown() and getField = x.getField(index) +} diff --git a/rust/ql/test/extractor-tests/generated/TupleFieldList/TupleFieldList_getField.expected b/rust/ql/test/extractor-tests/generated/TupleFieldList/TupleFieldList_getField.expected deleted file mode 100644 index 77b15f1aa42..00000000000 --- a/rust/ql/test/extractor-tests/generated/TupleFieldList/TupleFieldList_getField.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_tuple_field_list.rs:7:13:7:25 | TupleFieldList | 0 | gen_tuple_field_list.rs:7:14:7:16 | TupleField | -| gen_tuple_field_list.rs:7:13:7:25 | TupleFieldList | 1 | gen_tuple_field_list.rs:7:19:7:24 | TupleField | diff --git a/rust/ql/test/extractor-tests/generated/TupleFieldList/TupleFieldList_getField.ql b/rust/ql/test/extractor-tests/generated/TupleFieldList/TupleFieldList_getField.ql deleted file mode 100644 index 8483c03f1d7..00000000000 --- a/rust/ql/test/extractor-tests/generated/TupleFieldList/TupleFieldList_getField.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from TupleFieldList x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getField(index) diff --git a/rust/ql/test/extractor-tests/generated/TuplePat/Cargo.lock b/rust/ql/test/extractor-tests/generated/TuplePat/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TuplePat/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/TuplePat/TuplePat.expected b/rust/ql/test/extractor-tests/generated/TuplePat/TuplePat.expected index d6522bb7bf1..8e769296d5f 100644 --- a/rust/ql/test/extractor-tests/generated/TuplePat/TuplePat.expected +++ b/rust/ql/test/extractor-tests/generated/TuplePat/TuplePat.expected @@ -1,2 +1,10 @@ -| gen_tuple_pat.rs:5:9:5:14 | TuplePat | getNumberOfFields: | 2 | -| gen_tuple_pat.rs:6:9:6:22 | TuplePat | getNumberOfFields: | 4 | +instances +| gen_tuple_pat.rs:5:9:5:14 | TuplePat | +| gen_tuple_pat.rs:6:9:6:22 | TuplePat | +getField +| gen_tuple_pat.rs:5:9:5:14 | TuplePat | 0 | gen_tuple_pat.rs:5:10:5:10 | x | +| gen_tuple_pat.rs:5:9:5:14 | TuplePat | 1 | gen_tuple_pat.rs:5:13:5:13 | y | +| gen_tuple_pat.rs:6:9:6:22 | TuplePat | 0 | gen_tuple_pat.rs:6:10:6:10 | a | +| gen_tuple_pat.rs:6:9:6:22 | TuplePat | 1 | gen_tuple_pat.rs:6:13:6:13 | b | +| gen_tuple_pat.rs:6:9:6:22 | TuplePat | 2 | gen_tuple_pat.rs:6:16:6:17 | .. | +| gen_tuple_pat.rs:6:9:6:22 | TuplePat | 3 | gen_tuple_pat.rs:6:21:6:21 | z | diff --git a/rust/ql/test/extractor-tests/generated/TuplePat/TuplePat.ql b/rust/ql/test/extractor-tests/generated/TuplePat/TuplePat.ql index 6e65f167985..1692fe6758c 100644 --- a/rust/ql/test/extractor-tests/generated/TuplePat/TuplePat.ql +++ b/rust/ql/test/extractor-tests/generated/TuplePat/TuplePat.ql @@ -2,9 +2,8 @@ import codeql.rust.elements import TestUtils -from TuplePat x, int getNumberOfFields -where - toBeTested(x) and - not x.isUnknown() and - getNumberOfFields = x.getNumberOfFields() -select x, "getNumberOfFields:", getNumberOfFields +query predicate instances(TuplePat x) { toBeTested(x) and not x.isUnknown() } + +query predicate getField(TuplePat x, int index, Pat getField) { + toBeTested(x) and not x.isUnknown() and getField = x.getField(index) +} diff --git a/rust/ql/test/extractor-tests/generated/TuplePat/TuplePat_getField.expected b/rust/ql/test/extractor-tests/generated/TuplePat/TuplePat_getField.expected deleted file mode 100644 index 78e00f39c92..00000000000 --- a/rust/ql/test/extractor-tests/generated/TuplePat/TuplePat_getField.expected +++ /dev/null @@ -1,6 +0,0 @@ -| gen_tuple_pat.rs:5:9:5:14 | TuplePat | 0 | gen_tuple_pat.rs:5:10:5:10 | x | -| gen_tuple_pat.rs:5:9:5:14 | TuplePat | 1 | gen_tuple_pat.rs:5:13:5:13 | y | -| gen_tuple_pat.rs:6:9:6:22 | TuplePat | 0 | gen_tuple_pat.rs:6:10:6:10 | a | -| gen_tuple_pat.rs:6:9:6:22 | TuplePat | 1 | gen_tuple_pat.rs:6:13:6:13 | b | -| gen_tuple_pat.rs:6:9:6:22 | TuplePat | 2 | gen_tuple_pat.rs:6:16:6:17 | .. | -| gen_tuple_pat.rs:6:9:6:22 | TuplePat | 3 | gen_tuple_pat.rs:6:21:6:21 | z | diff --git a/rust/ql/test/extractor-tests/generated/TuplePat/TuplePat_getField.ql b/rust/ql/test/extractor-tests/generated/TuplePat/TuplePat_getField.ql deleted file mode 100644 index 5366bc445f1..00000000000 --- a/rust/ql/test/extractor-tests/generated/TuplePat/TuplePat_getField.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from TuplePat x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getField(index) diff --git a/rust/ql/test/extractor-tests/generated/TupleStructPat/Cargo.lock b/rust/ql/test/extractor-tests/generated/TupleStructPat/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TupleStructPat/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat.expected b/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat.expected index 9e9de534b1e..c5ce2e2640a 100644 --- a/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat.expected +++ b/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat.expected @@ -1,3 +1,18 @@ -| gen_tuple_struct_pat.rs:6:9:6:27 | Tuple(...) | hasResolvedPath: | no | hasResolvedCrateOrigin: | no | hasPath: | yes | getNumberOfFields: | 4 | -| gen_tuple_struct_pat.rs:7:9:7:20 | Tuple(...) | hasResolvedPath: | no | hasResolvedCrateOrigin: | no | hasPath: | yes | getNumberOfFields: | 2 | -| gen_tuple_struct_pat.rs:8:9:8:17 | Tuple(...) | hasResolvedPath: | no | hasResolvedCrateOrigin: | no | hasPath: | yes | getNumberOfFields: | 1 | +instances +| gen_tuple_struct_pat.rs:6:9:6:27 | Tuple(...) | +| gen_tuple_struct_pat.rs:7:9:7:20 | Tuple(...) | +| gen_tuple_struct_pat.rs:8:9:8:17 | Tuple(...) | +getResolvedPath +getResolvedCrateOrigin +getPath +| gen_tuple_struct_pat.rs:6:9:6:27 | Tuple(...) | gen_tuple_struct_pat.rs:6:9:6:13 | Tuple | +| gen_tuple_struct_pat.rs:7:9:7:20 | Tuple(...) | gen_tuple_struct_pat.rs:7:9:7:13 | Tuple | +| gen_tuple_struct_pat.rs:8:9:8:17 | Tuple(...) | gen_tuple_struct_pat.rs:8:9:8:13 | Tuple | +getField +| gen_tuple_struct_pat.rs:6:9:6:27 | Tuple(...) | 0 | gen_tuple_struct_pat.rs:6:15:6:17 | "a" | +| gen_tuple_struct_pat.rs:6:9:6:27 | Tuple(...) | 1 | gen_tuple_struct_pat.rs:6:20:6:20 | 1 | +| gen_tuple_struct_pat.rs:6:9:6:27 | Tuple(...) | 2 | gen_tuple_struct_pat.rs:6:23:6:23 | 2 | +| gen_tuple_struct_pat.rs:6:9:6:27 | Tuple(...) | 3 | gen_tuple_struct_pat.rs:6:26:6:26 | 3 | +| gen_tuple_struct_pat.rs:7:9:7:20 | Tuple(...) | 0 | gen_tuple_struct_pat.rs:7:15:7:16 | .. | +| gen_tuple_struct_pat.rs:7:9:7:20 | Tuple(...) | 1 | gen_tuple_struct_pat.rs:7:19:7:19 | 3 | +| gen_tuple_struct_pat.rs:8:9:8:17 | Tuple(...) | 0 | gen_tuple_struct_pat.rs:8:15:8:16 | .. | diff --git a/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat.ql b/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat.ql index af59101fe75..408c892ea3c 100644 --- a/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat.ql +++ b/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat.ql @@ -2,19 +2,20 @@ import codeql.rust.elements import TestUtils -from - TupleStructPat x, string hasResolvedPath, string hasResolvedCrateOrigin, string hasPath, - int getNumberOfFields -where - toBeTested(x) and - not x.isUnknown() and - (if x.hasResolvedPath() then hasResolvedPath = "yes" else hasResolvedPath = "no") and - ( - if x.hasResolvedCrateOrigin() - then hasResolvedCrateOrigin = "yes" - else hasResolvedCrateOrigin = "no" - ) and - (if x.hasPath() then hasPath = "yes" else hasPath = "no") and - getNumberOfFields = x.getNumberOfFields() -select x, "hasResolvedPath:", hasResolvedPath, "hasResolvedCrateOrigin:", hasResolvedCrateOrigin, - "hasPath:", hasPath, "getNumberOfFields:", getNumberOfFields +query predicate instances(TupleStructPat x) { toBeTested(x) and not x.isUnknown() } + +query predicate getResolvedPath(TupleStructPat x, string getResolvedPath) { + toBeTested(x) and not x.isUnknown() and getResolvedPath = x.getResolvedPath() +} + +query predicate getResolvedCrateOrigin(TupleStructPat x, string getResolvedCrateOrigin) { + toBeTested(x) and not x.isUnknown() and getResolvedCrateOrigin = x.getResolvedCrateOrigin() +} + +query predicate getPath(TupleStructPat x, Path getPath) { + toBeTested(x) and not x.isUnknown() and getPath = x.getPath() +} + +query predicate getField(TupleStructPat x, int index, Pat getField) { + toBeTested(x) and not x.isUnknown() and getField = x.getField(index) +} diff --git a/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getField.expected b/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getField.expected deleted file mode 100644 index 21e1a701963..00000000000 --- a/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getField.expected +++ /dev/null @@ -1,7 +0,0 @@ -| gen_tuple_struct_pat.rs:6:9:6:27 | Tuple(...) | 0 | gen_tuple_struct_pat.rs:6:15:6:17 | "a" | -| gen_tuple_struct_pat.rs:6:9:6:27 | Tuple(...) | 1 | gen_tuple_struct_pat.rs:6:20:6:20 | 1 | -| gen_tuple_struct_pat.rs:6:9:6:27 | Tuple(...) | 2 | gen_tuple_struct_pat.rs:6:23:6:23 | 2 | -| gen_tuple_struct_pat.rs:6:9:6:27 | Tuple(...) | 3 | gen_tuple_struct_pat.rs:6:26:6:26 | 3 | -| gen_tuple_struct_pat.rs:7:9:7:20 | Tuple(...) | 0 | gen_tuple_struct_pat.rs:7:15:7:16 | .. | -| gen_tuple_struct_pat.rs:7:9:7:20 | Tuple(...) | 1 | gen_tuple_struct_pat.rs:7:19:7:19 | 3 | -| gen_tuple_struct_pat.rs:8:9:8:17 | Tuple(...) | 0 | gen_tuple_struct_pat.rs:8:15:8:16 | .. | diff --git a/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getField.ql b/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getField.ql deleted file mode 100644 index b3919608ce8..00000000000 --- a/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getField.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from TupleStructPat x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getField(index) diff --git a/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getPath.expected b/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getPath.expected deleted file mode 100644 index 34f30ed8ae1..00000000000 --- a/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getPath.expected +++ /dev/null @@ -1,3 +0,0 @@ -| gen_tuple_struct_pat.rs:6:9:6:27 | Tuple(...) | gen_tuple_struct_pat.rs:6:9:6:13 | Tuple | -| gen_tuple_struct_pat.rs:7:9:7:20 | Tuple(...) | gen_tuple_struct_pat.rs:7:9:7:13 | Tuple | -| gen_tuple_struct_pat.rs:8:9:8:17 | Tuple(...) | gen_tuple_struct_pat.rs:8:9:8:13 | Tuple | diff --git a/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getPath.ql b/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getPath.ql deleted file mode 100644 index bc5318bc103..00000000000 --- a/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getPath.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from TupleStructPat x -where toBeTested(x) and not x.isUnknown() -select x, x.getPath() diff --git a/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getResolvedCrateOrigin.expected b/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getResolvedCrateOrigin.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getResolvedCrateOrigin.ql b/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getResolvedCrateOrigin.ql deleted file mode 100644 index 144302946a9..00000000000 --- a/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getResolvedCrateOrigin.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from TupleStructPat x -where toBeTested(x) and not x.isUnknown() -select x, x.getResolvedCrateOrigin() diff --git a/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getResolvedPath.expected b/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getResolvedPath.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getResolvedPath.ql b/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getResolvedPath.ql deleted file mode 100644 index 561c303d968..00000000000 --- a/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getResolvedPath.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from TupleStructPat x -where toBeTested(x) and not x.isUnknown() -select x, x.getResolvedPath() diff --git a/rust/ql/test/extractor-tests/generated/TupleTypeRepr/Cargo.lock b/rust/ql/test/extractor-tests/generated/TupleTypeRepr/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TupleTypeRepr/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/TupleTypeRepr/TupleTypeRepr.expected b/rust/ql/test/extractor-tests/generated/TupleTypeRepr/TupleTypeRepr.expected index f3dcaadb7a2..1682ee89d08 100644 --- a/rust/ql/test/extractor-tests/generated/TupleTypeRepr/TupleTypeRepr.expected +++ b/rust/ql/test/extractor-tests/generated/TupleTypeRepr/TupleTypeRepr.expected @@ -1,2 +1,6 @@ -| gen_tuple_type_repr.rs:3:30:3:31 | TupleTypeRepr | getNumberOfFields: | 0 | -| gen_tuple_type_repr.rs:7:12:7:24 | TupleTypeRepr | getNumberOfFields: | 2 | +instances +| gen_tuple_type_repr.rs:3:30:3:31 | TupleTypeRepr | +| gen_tuple_type_repr.rs:7:12:7:24 | TupleTypeRepr | +getField +| gen_tuple_type_repr.rs:7:12:7:24 | TupleTypeRepr | 0 | gen_tuple_type_repr.rs:7:13:7:15 | i32 | +| gen_tuple_type_repr.rs:7:12:7:24 | TupleTypeRepr | 1 | gen_tuple_type_repr.rs:7:18:7:23 | String | diff --git a/rust/ql/test/extractor-tests/generated/TupleTypeRepr/TupleTypeRepr.ql b/rust/ql/test/extractor-tests/generated/TupleTypeRepr/TupleTypeRepr.ql index 79bf87b93a6..6e0cbbe65fe 100644 --- a/rust/ql/test/extractor-tests/generated/TupleTypeRepr/TupleTypeRepr.ql +++ b/rust/ql/test/extractor-tests/generated/TupleTypeRepr/TupleTypeRepr.ql @@ -2,9 +2,8 @@ import codeql.rust.elements import TestUtils -from TupleTypeRepr x, int getNumberOfFields -where - toBeTested(x) and - not x.isUnknown() and - getNumberOfFields = x.getNumberOfFields() -select x, "getNumberOfFields:", getNumberOfFields +query predicate instances(TupleTypeRepr x) { toBeTested(x) and not x.isUnknown() } + +query predicate getField(TupleTypeRepr x, int index, TypeRepr getField) { + toBeTested(x) and not x.isUnknown() and getField = x.getField(index) +} diff --git a/rust/ql/test/extractor-tests/generated/TupleTypeRepr/TupleTypeRepr_getField.expected b/rust/ql/test/extractor-tests/generated/TupleTypeRepr/TupleTypeRepr_getField.expected deleted file mode 100644 index c4d5db977c5..00000000000 --- a/rust/ql/test/extractor-tests/generated/TupleTypeRepr/TupleTypeRepr_getField.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_tuple_type_repr.rs:7:12:7:24 | TupleTypeRepr | 0 | gen_tuple_type_repr.rs:7:13:7:15 | i32 | -| gen_tuple_type_repr.rs:7:12:7:24 | TupleTypeRepr | 1 | gen_tuple_type_repr.rs:7:18:7:23 | String | diff --git a/rust/ql/test/extractor-tests/generated/TupleTypeRepr/TupleTypeRepr_getField.ql b/rust/ql/test/extractor-tests/generated/TupleTypeRepr/TupleTypeRepr_getField.ql deleted file mode 100644 index 3f11b1aa415..00000000000 --- a/rust/ql/test/extractor-tests/generated/TupleTypeRepr/TupleTypeRepr_getField.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from TupleTypeRepr x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getField(index) diff --git a/rust/ql/test/extractor-tests/generated/TypeAlias/Cargo.lock b/rust/ql/test/extractor-tests/generated/TypeAlias/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TypeAlias/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias.expected b/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias.expected index 8fbbae07cc3..b9b58485752 100644 --- a/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias.expected +++ b/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias.expected @@ -1,2 +1,16 @@ -| gen_type_alias.rs:4:5:5:26 | type Point | hasExtendedCanonicalPath: | no | hasCrateOrigin: | no | hasAttributeMacroExpansion: | no | getNumberOfAttrs: | 0 | hasGenericParamList: | no | isDefault: | no | hasName: | yes | hasTypeRepr: | yes | hasTypeBoundList: | no | hasVisibility: | no | hasWhereClause: | no | -| gen_type_alias.rs:8:9:8:20 | type Output | hasExtendedCanonicalPath: | no | hasCrateOrigin: | no | hasAttributeMacroExpansion: | no | getNumberOfAttrs: | 0 | hasGenericParamList: | no | isDefault: | no | hasName: | yes | hasTypeRepr: | no | hasTypeBoundList: | no | hasVisibility: | no | hasWhereClause: | no | +instances +| gen_type_alias.rs:4:5:5:26 | type Point | isDefault: | no | +| gen_type_alias.rs:8:9:8:20 | type Output | isDefault: | no | +getExtendedCanonicalPath +getCrateOrigin +getAttributeMacroExpansion +getAttr +getGenericParamList +getName +| gen_type_alias.rs:4:5:5:26 | type Point | gen_type_alias.rs:5:10:5:14 | Point | +| gen_type_alias.rs:8:9:8:20 | type Output | gen_type_alias.rs:8:14:8:19 | Output | +getTypeRepr +| gen_type_alias.rs:4:5:5:26 | type Point | gen_type_alias.rs:5:18:5:25 | TupleTypeRepr | +getTypeBoundList +getVisibility +getWhereClause diff --git a/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias.ql b/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias.ql index dd8183b6d41..014bd119d33 100644 --- a/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias.ql +++ b/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias.ql @@ -2,35 +2,51 @@ import codeql.rust.elements import TestUtils -from - TypeAlias x, string hasExtendedCanonicalPath, string hasCrateOrigin, - string hasAttributeMacroExpansion, int getNumberOfAttrs, string hasGenericParamList, - string isDefault, string hasName, string hasTypeRepr, string hasTypeBoundList, - string hasVisibility, string hasWhereClause -where +query predicate instances(TypeAlias x, string isDefault__label, string isDefault) { toBeTested(x) and not x.isUnknown() and - ( - if x.hasExtendedCanonicalPath() - then hasExtendedCanonicalPath = "yes" - else hasExtendedCanonicalPath = "no" - ) and - (if x.hasCrateOrigin() then hasCrateOrigin = "yes" else hasCrateOrigin = "no") and - ( - if x.hasAttributeMacroExpansion() - then hasAttributeMacroExpansion = "yes" - else hasAttributeMacroExpansion = "no" - ) and - getNumberOfAttrs = x.getNumberOfAttrs() and - (if x.hasGenericParamList() then hasGenericParamList = "yes" else hasGenericParamList = "no") and - (if x.isDefault() then isDefault = "yes" else isDefault = "no") and - (if x.hasName() then hasName = "yes" else hasName = "no") and - (if x.hasTypeRepr() then hasTypeRepr = "yes" else hasTypeRepr = "no") and - (if x.hasTypeBoundList() then hasTypeBoundList = "yes" else hasTypeBoundList = "no") and - (if x.hasVisibility() then hasVisibility = "yes" else hasVisibility = "no") and - if x.hasWhereClause() then hasWhereClause = "yes" else hasWhereClause = "no" -select x, "hasExtendedCanonicalPath:", hasExtendedCanonicalPath, "hasCrateOrigin:", hasCrateOrigin, - "hasAttributeMacroExpansion:", hasAttributeMacroExpansion, "getNumberOfAttrs:", getNumberOfAttrs, - "hasGenericParamList:", hasGenericParamList, "isDefault:", isDefault, "hasName:", hasName, - "hasTypeRepr:", hasTypeRepr, "hasTypeBoundList:", hasTypeBoundList, "hasVisibility:", - hasVisibility, "hasWhereClause:", hasWhereClause + isDefault__label = "isDefault:" and + if x.isDefault() then isDefault = "yes" else isDefault = "no" +} + +query predicate getExtendedCanonicalPath(TypeAlias x, string getExtendedCanonicalPath) { + toBeTested(x) and not x.isUnknown() and getExtendedCanonicalPath = x.getExtendedCanonicalPath() +} + +query predicate getCrateOrigin(TypeAlias x, string getCrateOrigin) { + toBeTested(x) and not x.isUnknown() and getCrateOrigin = x.getCrateOrigin() +} + +query predicate getAttributeMacroExpansion(TypeAlias x, MacroItems getAttributeMacroExpansion) { + toBeTested(x) and + not x.isUnknown() and + getAttributeMacroExpansion = x.getAttributeMacroExpansion() +} + +query predicate getAttr(TypeAlias x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} + +query predicate getGenericParamList(TypeAlias x, GenericParamList getGenericParamList) { + toBeTested(x) and not x.isUnknown() and getGenericParamList = x.getGenericParamList() +} + +query predicate getName(TypeAlias x, Name getName) { + toBeTested(x) and not x.isUnknown() and getName = x.getName() +} + +query predicate getTypeRepr(TypeAlias x, TypeRepr getTypeRepr) { + toBeTested(x) and not x.isUnknown() and getTypeRepr = x.getTypeRepr() +} + +query predicate getTypeBoundList(TypeAlias x, TypeBoundList getTypeBoundList) { + toBeTested(x) and not x.isUnknown() and getTypeBoundList = x.getTypeBoundList() +} + +query predicate getVisibility(TypeAlias x, Visibility getVisibility) { + toBeTested(x) and not x.isUnknown() and getVisibility = x.getVisibility() +} + +query predicate getWhereClause(TypeAlias x, WhereClause getWhereClause) { + toBeTested(x) and not x.isUnknown() and getWhereClause = x.getWhereClause() +} diff --git a/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getAttr.expected b/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getAttr.ql b/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getAttr.ql deleted file mode 100644 index 2eabe53ca6d..00000000000 --- a/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from TypeAlias x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getAttributeMacroExpansion.expected b/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getAttributeMacroExpansion.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getAttributeMacroExpansion.ql b/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getAttributeMacroExpansion.ql deleted file mode 100644 index 62be0d7b829..00000000000 --- a/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getAttributeMacroExpansion.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from TypeAlias x -where toBeTested(x) and not x.isUnknown() -select x, x.getAttributeMacroExpansion() diff --git a/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getCrateOrigin.expected b/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getCrateOrigin.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getCrateOrigin.ql b/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getCrateOrigin.ql deleted file mode 100644 index 9a4de0cd9b8..00000000000 --- a/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getCrateOrigin.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from TypeAlias x -where toBeTested(x) and not x.isUnknown() -select x, x.getCrateOrigin() diff --git a/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getExtendedCanonicalPath.expected b/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getExtendedCanonicalPath.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getExtendedCanonicalPath.ql b/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getExtendedCanonicalPath.ql deleted file mode 100644 index 1f99c759556..00000000000 --- a/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getExtendedCanonicalPath.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from TypeAlias x -where toBeTested(x) and not x.isUnknown() -select x, x.getExtendedCanonicalPath() diff --git a/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getGenericParamList.expected b/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getGenericParamList.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getGenericParamList.ql b/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getGenericParamList.ql deleted file mode 100644 index 9742b1a9bb7..00000000000 --- a/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getGenericParamList.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from TypeAlias x -where toBeTested(x) and not x.isUnknown() -select x, x.getGenericParamList() diff --git a/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getName.expected b/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getName.expected deleted file mode 100644 index 57aefa9327d..00000000000 --- a/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getName.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_type_alias.rs:4:5:5:26 | type Point | gen_type_alias.rs:5:10:5:14 | Point | -| gen_type_alias.rs:8:9:8:20 | type Output | gen_type_alias.rs:8:14:8:19 | Output | diff --git a/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getName.ql b/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getName.ql deleted file mode 100644 index 95b90c69e39..00000000000 --- a/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getName.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from TypeAlias x -where toBeTested(x) and not x.isUnknown() -select x, x.getName() diff --git a/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getTypeBoundList.expected b/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getTypeBoundList.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getTypeBoundList.ql b/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getTypeBoundList.ql deleted file mode 100644 index 6988a3baf7d..00000000000 --- a/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getTypeBoundList.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from TypeAlias x -where toBeTested(x) and not x.isUnknown() -select x, x.getTypeBoundList() diff --git a/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getTypeRepr.expected b/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getTypeRepr.expected deleted file mode 100644 index a15078cc57d..00000000000 --- a/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getTypeRepr.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_type_alias.rs:4:5:5:26 | type Point | gen_type_alias.rs:5:18:5:25 | TupleTypeRepr | diff --git a/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getTypeRepr.ql b/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getTypeRepr.ql deleted file mode 100644 index 82be0a670ec..00000000000 --- a/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getTypeRepr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from TypeAlias x -where toBeTested(x) and not x.isUnknown() -select x, x.getTypeRepr() diff --git a/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getVisibility.expected b/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getVisibility.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getVisibility.ql b/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getVisibility.ql deleted file mode 100644 index 78bb19e876a..00000000000 --- a/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getVisibility.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from TypeAlias x -where toBeTested(x) and not x.isUnknown() -select x, x.getVisibility() diff --git a/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getWhereClause.expected b/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getWhereClause.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getWhereClause.ql b/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getWhereClause.ql deleted file mode 100644 index becbdac3016..00000000000 --- a/rust/ql/test/extractor-tests/generated/TypeAlias/TypeAlias_getWhereClause.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from TypeAlias x -where toBeTested(x) and not x.isUnknown() -select x, x.getWhereClause() diff --git a/rust/ql/test/extractor-tests/generated/TypeArg/Cargo.lock b/rust/ql/test/extractor-tests/generated/TypeArg/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TypeArg/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/TypeArg/TypeArg.expected b/rust/ql/test/extractor-tests/generated/TypeArg/TypeArg.expected index d81b48448fa..e628c7daee7 100644 --- a/rust/ql/test/extractor-tests/generated/TypeArg/TypeArg.expected +++ b/rust/ql/test/extractor-tests/generated/TypeArg/TypeArg.expected @@ -1 +1,4 @@ -| gen_type_arg.rs:7:11:7:13 | TypeArg | hasTypeRepr: | yes | +instances +| gen_type_arg.rs:7:11:7:13 | TypeArg | +getTypeRepr +| gen_type_arg.rs:7:11:7:13 | TypeArg | gen_type_arg.rs:7:11:7:13 | u32 | diff --git a/rust/ql/test/extractor-tests/generated/TypeArg/TypeArg.ql b/rust/ql/test/extractor-tests/generated/TypeArg/TypeArg.ql index 03464c38218..57178cd8502 100644 --- a/rust/ql/test/extractor-tests/generated/TypeArg/TypeArg.ql +++ b/rust/ql/test/extractor-tests/generated/TypeArg/TypeArg.ql @@ -2,9 +2,8 @@ import codeql.rust.elements import TestUtils -from TypeArg x, string hasTypeRepr -where - toBeTested(x) and - not x.isUnknown() and - if x.hasTypeRepr() then hasTypeRepr = "yes" else hasTypeRepr = "no" -select x, "hasTypeRepr:", hasTypeRepr +query predicate instances(TypeArg x) { toBeTested(x) and not x.isUnknown() } + +query predicate getTypeRepr(TypeArg x, TypeRepr getTypeRepr) { + toBeTested(x) and not x.isUnknown() and getTypeRepr = x.getTypeRepr() +} diff --git a/rust/ql/test/extractor-tests/generated/TypeArg/TypeArg_getTypeRepr.expected b/rust/ql/test/extractor-tests/generated/TypeArg/TypeArg_getTypeRepr.expected deleted file mode 100644 index f1bb3e460e1..00000000000 --- a/rust/ql/test/extractor-tests/generated/TypeArg/TypeArg_getTypeRepr.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_type_arg.rs:7:11:7:13 | TypeArg | gen_type_arg.rs:7:11:7:13 | u32 | diff --git a/rust/ql/test/extractor-tests/generated/TypeArg/TypeArg_getTypeRepr.ql b/rust/ql/test/extractor-tests/generated/TypeArg/TypeArg_getTypeRepr.ql deleted file mode 100644 index d1a4956f460..00000000000 --- a/rust/ql/test/extractor-tests/generated/TypeArg/TypeArg_getTypeRepr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from TypeArg x -where toBeTested(x) and not x.isUnknown() -select x, x.getTypeRepr() diff --git a/rust/ql/test/extractor-tests/generated/TypeBound/Cargo.lock b/rust/ql/test/extractor-tests/generated/TypeBound/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TypeBound/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/TypeBound/TypeBound.expected b/rust/ql/test/extractor-tests/generated/TypeBound/TypeBound.expected index 40e38f919ce..e0ed9fcdd6c 100644 --- a/rust/ql/test/extractor-tests/generated/TypeBound/TypeBound.expected +++ b/rust/ql/test/extractor-tests/generated/TypeBound/TypeBound.expected @@ -1 +1,6 @@ -| gen_type_bound.rs:7:15:7:19 | TypeBound | isAsync: | no | isConst: | no | hasLifetime: | no | hasTypeRepr: | yes | hasUseBoundGenericArgs: | no | +instances +| gen_type_bound.rs:7:15:7:19 | TypeBound | isAsync: | no | isConst: | no | +getLifetime +getTypeRepr +| gen_type_bound.rs:7:15:7:19 | TypeBound | gen_type_bound.rs:7:15:7:19 | Debug | +getUseBoundGenericArgs diff --git a/rust/ql/test/extractor-tests/generated/TypeBound/TypeBound.ql b/rust/ql/test/extractor-tests/generated/TypeBound/TypeBound.ql index efd099905db..e4b2b6127dc 100644 --- a/rust/ql/test/extractor-tests/generated/TypeBound/TypeBound.ql +++ b/rust/ql/test/extractor-tests/generated/TypeBound/TypeBound.ql @@ -2,18 +2,25 @@ import codeql.rust.elements import TestUtils -from - TypeBound x, string isAsync, string isConst, string hasLifetime, string hasTypeRepr, - string hasUseBoundGenericArgs -where +query predicate instances( + TypeBound x, string isAsync__label, string isAsync, string isConst__label, string isConst +) { toBeTested(x) and not x.isUnknown() and + isAsync__label = "isAsync:" and (if x.isAsync() then isAsync = "yes" else isAsync = "no") and - (if x.isConst() then isConst = "yes" else isConst = "no") and - (if x.hasLifetime() then hasLifetime = "yes" else hasLifetime = "no") and - (if x.hasTypeRepr() then hasTypeRepr = "yes" else hasTypeRepr = "no") and - if x.hasUseBoundGenericArgs() - then hasUseBoundGenericArgs = "yes" - else hasUseBoundGenericArgs = "no" -select x, "isAsync:", isAsync, "isConst:", isConst, "hasLifetime:", hasLifetime, "hasTypeRepr:", - hasTypeRepr, "hasUseBoundGenericArgs:", hasUseBoundGenericArgs + isConst__label = "isConst:" and + if x.isConst() then isConst = "yes" else isConst = "no" +} + +query predicate getLifetime(TypeBound x, Lifetime getLifetime) { + toBeTested(x) and not x.isUnknown() and getLifetime = x.getLifetime() +} + +query predicate getTypeRepr(TypeBound x, TypeRepr getTypeRepr) { + toBeTested(x) and not x.isUnknown() and getTypeRepr = x.getTypeRepr() +} + +query predicate getUseBoundGenericArgs(TypeBound x, UseBoundGenericArgs getUseBoundGenericArgs) { + toBeTested(x) and not x.isUnknown() and getUseBoundGenericArgs = x.getUseBoundGenericArgs() +} diff --git a/rust/ql/test/extractor-tests/generated/TypeBound/TypeBound_getLifetime.expected b/rust/ql/test/extractor-tests/generated/TypeBound/TypeBound_getLifetime.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/TypeBound/TypeBound_getLifetime.ql b/rust/ql/test/extractor-tests/generated/TypeBound/TypeBound_getLifetime.ql deleted file mode 100644 index 267ed0dd7ae..00000000000 --- a/rust/ql/test/extractor-tests/generated/TypeBound/TypeBound_getLifetime.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from TypeBound x -where toBeTested(x) and not x.isUnknown() -select x, x.getLifetime() diff --git a/rust/ql/test/extractor-tests/generated/TypeBound/TypeBound_getTypeRepr.expected b/rust/ql/test/extractor-tests/generated/TypeBound/TypeBound_getTypeRepr.expected deleted file mode 100644 index 7d9cf96f2ad..00000000000 --- a/rust/ql/test/extractor-tests/generated/TypeBound/TypeBound_getTypeRepr.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_type_bound.rs:7:15:7:19 | TypeBound | gen_type_bound.rs:7:15:7:19 | Debug | diff --git a/rust/ql/test/extractor-tests/generated/TypeBound/TypeBound_getTypeRepr.ql b/rust/ql/test/extractor-tests/generated/TypeBound/TypeBound_getTypeRepr.ql deleted file mode 100644 index d8ed0d05256..00000000000 --- a/rust/ql/test/extractor-tests/generated/TypeBound/TypeBound_getTypeRepr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from TypeBound x -where toBeTested(x) and not x.isUnknown() -select x, x.getTypeRepr() diff --git a/rust/ql/test/extractor-tests/generated/TypeBound/TypeBound_getUseBoundGenericArgs.expected b/rust/ql/test/extractor-tests/generated/TypeBound/TypeBound_getUseBoundGenericArgs.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/TypeBound/TypeBound_getUseBoundGenericArgs.ql b/rust/ql/test/extractor-tests/generated/TypeBound/TypeBound_getUseBoundGenericArgs.ql deleted file mode 100644 index a265464633e..00000000000 --- a/rust/ql/test/extractor-tests/generated/TypeBound/TypeBound_getUseBoundGenericArgs.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from TypeBound x -where toBeTested(x) and not x.isUnknown() -select x, x.getUseBoundGenericArgs() diff --git a/rust/ql/test/extractor-tests/generated/TypeBoundList/Cargo.lock b/rust/ql/test/extractor-tests/generated/TypeBoundList/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TypeBoundList/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/TypeBoundList/TypeBoundList.expected b/rust/ql/test/extractor-tests/generated/TypeBoundList/TypeBoundList.expected index 3044718de47..e195424d097 100644 --- a/rust/ql/test/extractor-tests/generated/TypeBoundList/TypeBoundList.expected +++ b/rust/ql/test/extractor-tests/generated/TypeBoundList/TypeBoundList.expected @@ -1 +1,5 @@ -| gen_type_bound_list.rs:7:15:7:27 | TypeBoundList | getNumberOfBounds: | 2 | +instances +| gen_type_bound_list.rs:7:15:7:27 | TypeBoundList | +getBound +| gen_type_bound_list.rs:7:15:7:27 | TypeBoundList | 0 | gen_type_bound_list.rs:7:15:7:19 | TypeBound | +| gen_type_bound_list.rs:7:15:7:27 | TypeBoundList | 1 | gen_type_bound_list.rs:7:23:7:27 | TypeBound | diff --git a/rust/ql/test/extractor-tests/generated/TypeBoundList/TypeBoundList.ql b/rust/ql/test/extractor-tests/generated/TypeBoundList/TypeBoundList.ql index c5da2906153..8af2507e772 100644 --- a/rust/ql/test/extractor-tests/generated/TypeBoundList/TypeBoundList.ql +++ b/rust/ql/test/extractor-tests/generated/TypeBoundList/TypeBoundList.ql @@ -2,9 +2,8 @@ import codeql.rust.elements import TestUtils -from TypeBoundList x, int getNumberOfBounds -where - toBeTested(x) and - not x.isUnknown() and - getNumberOfBounds = x.getNumberOfBounds() -select x, "getNumberOfBounds:", getNumberOfBounds +query predicate instances(TypeBoundList x) { toBeTested(x) and not x.isUnknown() } + +query predicate getBound(TypeBoundList x, int index, TypeBound getBound) { + toBeTested(x) and not x.isUnknown() and getBound = x.getBound(index) +} diff --git a/rust/ql/test/extractor-tests/generated/TypeBoundList/TypeBoundList_getBound.expected b/rust/ql/test/extractor-tests/generated/TypeBoundList/TypeBoundList_getBound.expected deleted file mode 100644 index 7106e5ae664..00000000000 --- a/rust/ql/test/extractor-tests/generated/TypeBoundList/TypeBoundList_getBound.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_type_bound_list.rs:7:15:7:27 | TypeBoundList | 0 | gen_type_bound_list.rs:7:15:7:19 | TypeBound | -| gen_type_bound_list.rs:7:15:7:27 | TypeBoundList | 1 | gen_type_bound_list.rs:7:23:7:27 | TypeBound | diff --git a/rust/ql/test/extractor-tests/generated/TypeBoundList/TypeBoundList_getBound.ql b/rust/ql/test/extractor-tests/generated/TypeBoundList/TypeBoundList_getBound.ql deleted file mode 100644 index d06ceb53fae..00000000000 --- a/rust/ql/test/extractor-tests/generated/TypeBoundList/TypeBoundList_getBound.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from TypeBoundList x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getBound(index) diff --git a/rust/ql/test/extractor-tests/generated/TypeParam/Cargo.lock b/rust/ql/test/extractor-tests/generated/TypeParam/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TypeParam/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/TypeParam/TypeParam.expected b/rust/ql/test/extractor-tests/generated/TypeParam/TypeParam.expected index 1ba76dc60d3..c856ca9c69e 100644 --- a/rust/ql/test/extractor-tests/generated/TypeParam/TypeParam.expected +++ b/rust/ql/test/extractor-tests/generated/TypeParam/TypeParam.expected @@ -1 +1,7 @@ -| gen_type_param.rs:7:12:7:12 | T | getNumberOfAttrs: | 0 | hasDefaultType: | no | hasName: | yes | hasTypeBoundList: | no | +instances +| gen_type_param.rs:7:12:7:12 | T | +getAttr +getDefaultType +getName +| gen_type_param.rs:7:12:7:12 | T | gen_type_param.rs:7:12:7:12 | T | +getTypeBoundList diff --git a/rust/ql/test/extractor-tests/generated/TypeParam/TypeParam.ql b/rust/ql/test/extractor-tests/generated/TypeParam/TypeParam.ql index d81ec72681c..61f38aab835 100644 --- a/rust/ql/test/extractor-tests/generated/TypeParam/TypeParam.ql +++ b/rust/ql/test/extractor-tests/generated/TypeParam/TypeParam.ql @@ -2,14 +2,20 @@ import codeql.rust.elements import TestUtils -from - TypeParam x, int getNumberOfAttrs, string hasDefaultType, string hasName, string hasTypeBoundList -where - toBeTested(x) and - not x.isUnknown() and - getNumberOfAttrs = x.getNumberOfAttrs() and - (if x.hasDefaultType() then hasDefaultType = "yes" else hasDefaultType = "no") and - (if x.hasName() then hasName = "yes" else hasName = "no") and - if x.hasTypeBoundList() then hasTypeBoundList = "yes" else hasTypeBoundList = "no" -select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasDefaultType:", hasDefaultType, "hasName:", - hasName, "hasTypeBoundList:", hasTypeBoundList +query predicate instances(TypeParam x) { toBeTested(x) and not x.isUnknown() } + +query predicate getAttr(TypeParam x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} + +query predicate getDefaultType(TypeParam x, TypeRepr getDefaultType) { + toBeTested(x) and not x.isUnknown() and getDefaultType = x.getDefaultType() +} + +query predicate getName(TypeParam x, Name getName) { + toBeTested(x) and not x.isUnknown() and getName = x.getName() +} + +query predicate getTypeBoundList(TypeParam x, TypeBoundList getTypeBoundList) { + toBeTested(x) and not x.isUnknown() and getTypeBoundList = x.getTypeBoundList() +} diff --git a/rust/ql/test/extractor-tests/generated/TypeParam/TypeParam_getAttr.expected b/rust/ql/test/extractor-tests/generated/TypeParam/TypeParam_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/TypeParam/TypeParam_getAttr.ql b/rust/ql/test/extractor-tests/generated/TypeParam/TypeParam_getAttr.ql deleted file mode 100644 index fdbefc1b5bd..00000000000 --- a/rust/ql/test/extractor-tests/generated/TypeParam/TypeParam_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from TypeParam x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/TypeParam/TypeParam_getDefaultType.expected b/rust/ql/test/extractor-tests/generated/TypeParam/TypeParam_getDefaultType.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/TypeParam/TypeParam_getDefaultType.ql b/rust/ql/test/extractor-tests/generated/TypeParam/TypeParam_getDefaultType.ql deleted file mode 100644 index 8afef31826a..00000000000 --- a/rust/ql/test/extractor-tests/generated/TypeParam/TypeParam_getDefaultType.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from TypeParam x -where toBeTested(x) and not x.isUnknown() -select x, x.getDefaultType() diff --git a/rust/ql/test/extractor-tests/generated/TypeParam/TypeParam_getName.expected b/rust/ql/test/extractor-tests/generated/TypeParam/TypeParam_getName.expected deleted file mode 100644 index a51942c95c2..00000000000 --- a/rust/ql/test/extractor-tests/generated/TypeParam/TypeParam_getName.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_type_param.rs:7:12:7:12 | T | gen_type_param.rs:7:12:7:12 | T | diff --git a/rust/ql/test/extractor-tests/generated/TypeParam/TypeParam_getName.ql b/rust/ql/test/extractor-tests/generated/TypeParam/TypeParam_getName.ql deleted file mode 100644 index 37b18a8b39c..00000000000 --- a/rust/ql/test/extractor-tests/generated/TypeParam/TypeParam_getName.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from TypeParam x -where toBeTested(x) and not x.isUnknown() -select x, x.getName() diff --git a/rust/ql/test/extractor-tests/generated/TypeParam/TypeParam_getTypeBoundList.expected b/rust/ql/test/extractor-tests/generated/TypeParam/TypeParam_getTypeBoundList.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/TypeParam/TypeParam_getTypeBoundList.ql b/rust/ql/test/extractor-tests/generated/TypeParam/TypeParam_getTypeBoundList.ql deleted file mode 100644 index b496a7793a6..00000000000 --- a/rust/ql/test/extractor-tests/generated/TypeParam/TypeParam_getTypeBoundList.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from TypeParam x -where toBeTested(x) and not x.isUnknown() -select x, x.getTypeBoundList() diff --git a/rust/ql/test/extractor-tests/generated/UnderscoreExpr/Cargo.lock b/rust/ql/test/extractor-tests/generated/UnderscoreExpr/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/UnderscoreExpr/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr.expected b/rust/ql/test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr.expected index ea89e8b29b4..b4ff46aa5d0 100644 --- a/rust/ql/test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr.expected +++ b/rust/ql/test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr.expected @@ -1 +1,3 @@ -| gen_underscore_expr.rs:5:5:5:5 | _ | getNumberOfAttrs: | 0 | +instances +| gen_underscore_expr.rs:5:5:5:5 | _ | +getAttr diff --git a/rust/ql/test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr.ql b/rust/ql/test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr.ql index 1dc793e9d6e..13324f21bf2 100644 --- a/rust/ql/test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr.ql +++ b/rust/ql/test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr.ql @@ -2,9 +2,8 @@ import codeql.rust.elements import TestUtils -from UnderscoreExpr x, int getNumberOfAttrs -where - toBeTested(x) and - not x.isUnknown() and - getNumberOfAttrs = x.getNumberOfAttrs() -select x, "getNumberOfAttrs:", getNumberOfAttrs +query predicate instances(UnderscoreExpr x) { toBeTested(x) and not x.isUnknown() } + +query predicate getAttr(UnderscoreExpr x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} diff --git a/rust/ql/test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr_getAttr.ql deleted file mode 100644 index 8b2b16e2904..00000000000 --- a/rust/ql/test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from UnderscoreExpr x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/Union/Union.expected b/rust/ql/test/extractor-tests/generated/Union/Union.expected index 22d383104ea..110643aeac9 100644 --- a/rust/ql/test/extractor-tests/generated/Union/Union.expected +++ b/rust/ql/test/extractor-tests/generated/Union/Union.expected @@ -1 +1,14 @@ -| gen_union.rs:4:5:7:32 | union U | hasExtendedCanonicalPath: | no | hasCrateOrigin: | no | hasAttributeMacroExpansion: | no | getNumberOfDeriveMacroExpansions: | 0 | getNumberOfAttrs: | 0 | hasGenericParamList: | no | hasName: | yes | hasStructFieldList: | yes | hasVisibility: | no | hasWhereClause: | no | +instances +| gen_union.rs:4:5:7:32 | union U | +getExtendedCanonicalPath +getCrateOrigin +getAttributeMacroExpansion +getDeriveMacroExpansion +getAttr +getGenericParamList +getName +| gen_union.rs:4:5:7:32 | union U | gen_union.rs:7:11:7:11 | U | +getStructFieldList +| gen_union.rs:4:5:7:32 | union U | gen_union.rs:7:13:7:32 | StructFieldList | +getVisibility +getWhereClause diff --git a/rust/ql/test/extractor-tests/generated/Union/Union.ql b/rust/ql/test/extractor-tests/generated/Union/Union.ql index a67dee68ec1..147a8fca09e 100644 --- a/rust/ql/test/extractor-tests/generated/Union/Union.ql +++ b/rust/ql/test/extractor-tests/generated/Union/Union.ql @@ -2,34 +2,46 @@ import codeql.rust.elements import TestUtils -from - Union x, string hasExtendedCanonicalPath, string hasCrateOrigin, - string hasAttributeMacroExpansion, int getNumberOfDeriveMacroExpansions, int getNumberOfAttrs, - string hasGenericParamList, string hasName, string hasStructFieldList, string hasVisibility, - string hasWhereClause -where +query predicate instances(Union x) { toBeTested(x) and not x.isUnknown() } + +query predicate getExtendedCanonicalPath(Union x, string getExtendedCanonicalPath) { + toBeTested(x) and not x.isUnknown() and getExtendedCanonicalPath = x.getExtendedCanonicalPath() +} + +query predicate getCrateOrigin(Union x, string getCrateOrigin) { + toBeTested(x) and not x.isUnknown() and getCrateOrigin = x.getCrateOrigin() +} + +query predicate getAttributeMacroExpansion(Union x, MacroItems getAttributeMacroExpansion) { toBeTested(x) and not x.isUnknown() and - ( - if x.hasExtendedCanonicalPath() - then hasExtendedCanonicalPath = "yes" - else hasExtendedCanonicalPath = "no" - ) and - (if x.hasCrateOrigin() then hasCrateOrigin = "yes" else hasCrateOrigin = "no") and - ( - if x.hasAttributeMacroExpansion() - then hasAttributeMacroExpansion = "yes" - else hasAttributeMacroExpansion = "no" - ) and - getNumberOfDeriveMacroExpansions = x.getNumberOfDeriveMacroExpansions() and - getNumberOfAttrs = x.getNumberOfAttrs() and - (if x.hasGenericParamList() then hasGenericParamList = "yes" else hasGenericParamList = "no") and - (if x.hasName() then hasName = "yes" else hasName = "no") and - (if x.hasStructFieldList() then hasStructFieldList = "yes" else hasStructFieldList = "no") and - (if x.hasVisibility() then hasVisibility = "yes" else hasVisibility = "no") and - if x.hasWhereClause() then hasWhereClause = "yes" else hasWhereClause = "no" -select x, "hasExtendedCanonicalPath:", hasExtendedCanonicalPath, "hasCrateOrigin:", hasCrateOrigin, - "hasAttributeMacroExpansion:", hasAttributeMacroExpansion, "getNumberOfDeriveMacroExpansions:", - getNumberOfDeriveMacroExpansions, "getNumberOfAttrs:", getNumberOfAttrs, "hasGenericParamList:", - hasGenericParamList, "hasName:", hasName, "hasStructFieldList:", hasStructFieldList, - "hasVisibility:", hasVisibility, "hasWhereClause:", hasWhereClause + getAttributeMacroExpansion = x.getAttributeMacroExpansion() +} + +query predicate getDeriveMacroExpansion(Union x, int index, MacroItems getDeriveMacroExpansion) { + toBeTested(x) and not x.isUnknown() and getDeriveMacroExpansion = x.getDeriveMacroExpansion(index) +} + +query predicate getAttr(Union x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} + +query predicate getGenericParamList(Union x, GenericParamList getGenericParamList) { + toBeTested(x) and not x.isUnknown() and getGenericParamList = x.getGenericParamList() +} + +query predicate getName(Union x, Name getName) { + toBeTested(x) and not x.isUnknown() and getName = x.getName() +} + +query predicate getStructFieldList(Union x, StructFieldList getStructFieldList) { + toBeTested(x) and not x.isUnknown() and getStructFieldList = x.getStructFieldList() +} + +query predicate getVisibility(Union x, Visibility getVisibility) { + toBeTested(x) and not x.isUnknown() and getVisibility = x.getVisibility() +} + +query predicate getWhereClause(Union x, WhereClause getWhereClause) { + toBeTested(x) and not x.isUnknown() and getWhereClause = x.getWhereClause() +} diff --git a/rust/ql/test/extractor-tests/generated/Union/Union_getAttr.expected b/rust/ql/test/extractor-tests/generated/Union/Union_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Union/Union_getAttr.ql b/rust/ql/test/extractor-tests/generated/Union/Union_getAttr.ql deleted file mode 100644 index a4ae6761d23..00000000000 --- a/rust/ql/test/extractor-tests/generated/Union/Union_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Union x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/Union/Union_getAttributeMacroExpansion.expected b/rust/ql/test/extractor-tests/generated/Union/Union_getAttributeMacroExpansion.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Union/Union_getAttributeMacroExpansion.ql b/rust/ql/test/extractor-tests/generated/Union/Union_getAttributeMacroExpansion.ql deleted file mode 100644 index 3edc4b71aa3..00000000000 --- a/rust/ql/test/extractor-tests/generated/Union/Union_getAttributeMacroExpansion.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Union x -where toBeTested(x) and not x.isUnknown() -select x, x.getAttributeMacroExpansion() diff --git a/rust/ql/test/extractor-tests/generated/Union/Union_getCrateOrigin.expected b/rust/ql/test/extractor-tests/generated/Union/Union_getCrateOrigin.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Union/Union_getCrateOrigin.ql b/rust/ql/test/extractor-tests/generated/Union/Union_getCrateOrigin.ql deleted file mode 100644 index fdbd56d9e88..00000000000 --- a/rust/ql/test/extractor-tests/generated/Union/Union_getCrateOrigin.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Union x -where toBeTested(x) and not x.isUnknown() -select x, x.getCrateOrigin() diff --git a/rust/ql/test/extractor-tests/generated/Union/Union_getDeriveMacroExpansion.expected b/rust/ql/test/extractor-tests/generated/Union/Union_getDeriveMacroExpansion.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Union/Union_getDeriveMacroExpansion.ql b/rust/ql/test/extractor-tests/generated/Union/Union_getDeriveMacroExpansion.ql deleted file mode 100644 index 1851791caef..00000000000 --- a/rust/ql/test/extractor-tests/generated/Union/Union_getDeriveMacroExpansion.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Union x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getDeriveMacroExpansion(index) diff --git a/rust/ql/test/extractor-tests/generated/Union/Union_getExtendedCanonicalPath.expected b/rust/ql/test/extractor-tests/generated/Union/Union_getExtendedCanonicalPath.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Union/Union_getExtendedCanonicalPath.ql b/rust/ql/test/extractor-tests/generated/Union/Union_getExtendedCanonicalPath.ql deleted file mode 100644 index fb20efa8f29..00000000000 --- a/rust/ql/test/extractor-tests/generated/Union/Union_getExtendedCanonicalPath.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Union x -where toBeTested(x) and not x.isUnknown() -select x, x.getExtendedCanonicalPath() diff --git a/rust/ql/test/extractor-tests/generated/Union/Union_getGenericParamList.expected b/rust/ql/test/extractor-tests/generated/Union/Union_getGenericParamList.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Union/Union_getGenericParamList.ql b/rust/ql/test/extractor-tests/generated/Union/Union_getGenericParamList.ql deleted file mode 100644 index e9ba2bbeef6..00000000000 --- a/rust/ql/test/extractor-tests/generated/Union/Union_getGenericParamList.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Union x -where toBeTested(x) and not x.isUnknown() -select x, x.getGenericParamList() diff --git a/rust/ql/test/extractor-tests/generated/Union/Union_getName.expected b/rust/ql/test/extractor-tests/generated/Union/Union_getName.expected deleted file mode 100644 index 02b0d8ebc8c..00000000000 --- a/rust/ql/test/extractor-tests/generated/Union/Union_getName.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_union.rs:4:5:7:32 | union U | gen_union.rs:7:11:7:11 | U | diff --git a/rust/ql/test/extractor-tests/generated/Union/Union_getName.ql b/rust/ql/test/extractor-tests/generated/Union/Union_getName.ql deleted file mode 100644 index e452a2ff63e..00000000000 --- a/rust/ql/test/extractor-tests/generated/Union/Union_getName.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Union x -where toBeTested(x) and not x.isUnknown() -select x, x.getName() diff --git a/rust/ql/test/extractor-tests/generated/Union/Union_getStructFieldList.expected b/rust/ql/test/extractor-tests/generated/Union/Union_getStructFieldList.expected deleted file mode 100644 index 3613a0fcb38..00000000000 --- a/rust/ql/test/extractor-tests/generated/Union/Union_getStructFieldList.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_union.rs:4:5:7:32 | union U | gen_union.rs:7:13:7:32 | StructFieldList | diff --git a/rust/ql/test/extractor-tests/generated/Union/Union_getStructFieldList.ql b/rust/ql/test/extractor-tests/generated/Union/Union_getStructFieldList.ql deleted file mode 100644 index 2afeaa6c3f1..00000000000 --- a/rust/ql/test/extractor-tests/generated/Union/Union_getStructFieldList.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Union x -where toBeTested(x) and not x.isUnknown() -select x, x.getStructFieldList() diff --git a/rust/ql/test/extractor-tests/generated/Union/Union_getVisibility.expected b/rust/ql/test/extractor-tests/generated/Union/Union_getVisibility.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Union/Union_getVisibility.ql b/rust/ql/test/extractor-tests/generated/Union/Union_getVisibility.ql deleted file mode 100644 index 5b1688250a5..00000000000 --- a/rust/ql/test/extractor-tests/generated/Union/Union_getVisibility.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Union x -where toBeTested(x) and not x.isUnknown() -select x, x.getVisibility() diff --git a/rust/ql/test/extractor-tests/generated/Union/Union_getWhereClause.expected b/rust/ql/test/extractor-tests/generated/Union/Union_getWhereClause.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Union/Union_getWhereClause.ql b/rust/ql/test/extractor-tests/generated/Union/Union_getWhereClause.ql deleted file mode 100644 index 083aea2ba01..00000000000 --- a/rust/ql/test/extractor-tests/generated/Union/Union_getWhereClause.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Union x -where toBeTested(x) and not x.isUnknown() -select x, x.getWhereClause() diff --git a/rust/ql/test/extractor-tests/generated/Use/Cargo.lock b/rust/ql/test/extractor-tests/generated/Use/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Use/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/Use/Use.expected b/rust/ql/test/extractor-tests/generated/Use/Use.expected index e016b067371..23057c691dc 100644 --- a/rust/ql/test/extractor-tests/generated/Use/Use.expected +++ b/rust/ql/test/extractor-tests/generated/Use/Use.expected @@ -1 +1,9 @@ -| gen_use.rs:4:5:5:34 | use ...::HashMap | hasExtendedCanonicalPath: | no | hasCrateOrigin: | no | hasAttributeMacroExpansion: | no | getNumberOfAttrs: | 0 | hasUseTree: | yes | hasVisibility: | no | +instances +| gen_use.rs:4:5:5:34 | use ...::HashMap | +getExtendedCanonicalPath +getCrateOrigin +getAttributeMacroExpansion +getAttr +getUseTree +| gen_use.rs:4:5:5:34 | use ...::HashMap | gen_use.rs:5:9:5:33 | ...::HashMap | +getVisibility diff --git a/rust/ql/test/extractor-tests/generated/Use/Use.ql b/rust/ql/test/extractor-tests/generated/Use/Use.ql index 9dbf23d628a..bfce3bcc89c 100644 --- a/rust/ql/test/extractor-tests/generated/Use/Use.ql +++ b/rust/ql/test/extractor-tests/generated/Use/Use.ql @@ -2,26 +2,30 @@ import codeql.rust.elements import TestUtils -from - Use x, string hasExtendedCanonicalPath, string hasCrateOrigin, string hasAttributeMacroExpansion, - int getNumberOfAttrs, string hasUseTree, string hasVisibility -where +query predicate instances(Use x) { toBeTested(x) and not x.isUnknown() } + +query predicate getExtendedCanonicalPath(Use x, string getExtendedCanonicalPath) { + toBeTested(x) and not x.isUnknown() and getExtendedCanonicalPath = x.getExtendedCanonicalPath() +} + +query predicate getCrateOrigin(Use x, string getCrateOrigin) { + toBeTested(x) and not x.isUnknown() and getCrateOrigin = x.getCrateOrigin() +} + +query predicate getAttributeMacroExpansion(Use x, MacroItems getAttributeMacroExpansion) { toBeTested(x) and not x.isUnknown() and - ( - if x.hasExtendedCanonicalPath() - then hasExtendedCanonicalPath = "yes" - else hasExtendedCanonicalPath = "no" - ) and - (if x.hasCrateOrigin() then hasCrateOrigin = "yes" else hasCrateOrigin = "no") and - ( - if x.hasAttributeMacroExpansion() - then hasAttributeMacroExpansion = "yes" - else hasAttributeMacroExpansion = "no" - ) and - getNumberOfAttrs = x.getNumberOfAttrs() and - (if x.hasUseTree() then hasUseTree = "yes" else hasUseTree = "no") and - if x.hasVisibility() then hasVisibility = "yes" else hasVisibility = "no" -select x, "hasExtendedCanonicalPath:", hasExtendedCanonicalPath, "hasCrateOrigin:", hasCrateOrigin, - "hasAttributeMacroExpansion:", hasAttributeMacroExpansion, "getNumberOfAttrs:", getNumberOfAttrs, - "hasUseTree:", hasUseTree, "hasVisibility:", hasVisibility + getAttributeMacroExpansion = x.getAttributeMacroExpansion() +} + +query predicate getAttr(Use x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} + +query predicate getUseTree(Use x, UseTree getUseTree) { + toBeTested(x) and not x.isUnknown() and getUseTree = x.getUseTree() +} + +query predicate getVisibility(Use x, Visibility getVisibility) { + toBeTested(x) and not x.isUnknown() and getVisibility = x.getVisibility() +} diff --git a/rust/ql/test/extractor-tests/generated/Use/Use_getAttr.expected b/rust/ql/test/extractor-tests/generated/Use/Use_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Use/Use_getAttr.ql b/rust/ql/test/extractor-tests/generated/Use/Use_getAttr.ql deleted file mode 100644 index 35b975fa0e6..00000000000 --- a/rust/ql/test/extractor-tests/generated/Use/Use_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Use x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/Use/Use_getAttributeMacroExpansion.expected b/rust/ql/test/extractor-tests/generated/Use/Use_getAttributeMacroExpansion.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Use/Use_getAttributeMacroExpansion.ql b/rust/ql/test/extractor-tests/generated/Use/Use_getAttributeMacroExpansion.ql deleted file mode 100644 index 1b83be27986..00000000000 --- a/rust/ql/test/extractor-tests/generated/Use/Use_getAttributeMacroExpansion.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Use x -where toBeTested(x) and not x.isUnknown() -select x, x.getAttributeMacroExpansion() diff --git a/rust/ql/test/extractor-tests/generated/Use/Use_getCrateOrigin.expected b/rust/ql/test/extractor-tests/generated/Use/Use_getCrateOrigin.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Use/Use_getCrateOrigin.ql b/rust/ql/test/extractor-tests/generated/Use/Use_getCrateOrigin.ql deleted file mode 100644 index 8e90afcc335..00000000000 --- a/rust/ql/test/extractor-tests/generated/Use/Use_getCrateOrigin.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Use x -where toBeTested(x) and not x.isUnknown() -select x, x.getCrateOrigin() diff --git a/rust/ql/test/extractor-tests/generated/Use/Use_getExtendedCanonicalPath.expected b/rust/ql/test/extractor-tests/generated/Use/Use_getExtendedCanonicalPath.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Use/Use_getExtendedCanonicalPath.ql b/rust/ql/test/extractor-tests/generated/Use/Use_getExtendedCanonicalPath.ql deleted file mode 100644 index 64c633c6c7d..00000000000 --- a/rust/ql/test/extractor-tests/generated/Use/Use_getExtendedCanonicalPath.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Use x -where toBeTested(x) and not x.isUnknown() -select x, x.getExtendedCanonicalPath() diff --git a/rust/ql/test/extractor-tests/generated/Use/Use_getUseTree.expected b/rust/ql/test/extractor-tests/generated/Use/Use_getUseTree.expected deleted file mode 100644 index 81b2c2c8ad3..00000000000 --- a/rust/ql/test/extractor-tests/generated/Use/Use_getUseTree.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_use.rs:4:5:5:34 | use ...::HashMap | gen_use.rs:5:9:5:33 | ...::HashMap | diff --git a/rust/ql/test/extractor-tests/generated/Use/Use_getUseTree.ql b/rust/ql/test/extractor-tests/generated/Use/Use_getUseTree.ql deleted file mode 100644 index 863d1617d40..00000000000 --- a/rust/ql/test/extractor-tests/generated/Use/Use_getUseTree.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Use x -where toBeTested(x) and not x.isUnknown() -select x, x.getUseTree() diff --git a/rust/ql/test/extractor-tests/generated/Use/Use_getVisibility.expected b/rust/ql/test/extractor-tests/generated/Use/Use_getVisibility.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Use/Use_getVisibility.ql b/rust/ql/test/extractor-tests/generated/Use/Use_getVisibility.ql deleted file mode 100644 index 122499de581..00000000000 --- a/rust/ql/test/extractor-tests/generated/Use/Use_getVisibility.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Use x -where toBeTested(x) and not x.isUnknown() -select x, x.getVisibility() diff --git a/rust/ql/test/extractor-tests/generated/UseBoundGenericArgs/Cargo.lock b/rust/ql/test/extractor-tests/generated/UseBoundGenericArgs/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/UseBoundGenericArgs/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/UseBoundGenericArgs/UseBoundGenericArgs.expected b/rust/ql/test/extractor-tests/generated/UseBoundGenericArgs/UseBoundGenericArgs.expected index 3ea69e78251..6bd467ca708 100644 --- a/rust/ql/test/extractor-tests/generated/UseBoundGenericArgs/UseBoundGenericArgs.expected +++ b/rust/ql/test/extractor-tests/generated/UseBoundGenericArgs/UseBoundGenericArgs.expected @@ -1 +1,6 @@ -| gen_use_bound_generic_args.rs:7:62:7:71 | UseBoundGenericArgs | getNumberOfUseBoundGenericArgs: | 3 | +instances +| gen_use_bound_generic_args.rs:7:62:7:71 | UseBoundGenericArgs | +getUseBoundGenericArg +| gen_use_bound_generic_args.rs:7:62:7:71 | UseBoundGenericArgs | 0 | gen_use_bound_generic_args.rs:7:63:7:64 | 'a | +| gen_use_bound_generic_args.rs:7:62:7:71 | UseBoundGenericArgs | 1 | gen_use_bound_generic_args.rs:7:67:7:67 | T | +| gen_use_bound_generic_args.rs:7:62:7:71 | UseBoundGenericArgs | 2 | gen_use_bound_generic_args.rs:7:70:7:70 | N | diff --git a/rust/ql/test/extractor-tests/generated/UseBoundGenericArgs/UseBoundGenericArgs.ql b/rust/ql/test/extractor-tests/generated/UseBoundGenericArgs/UseBoundGenericArgs.ql index 5100891c77a..7147be569b9 100644 --- a/rust/ql/test/extractor-tests/generated/UseBoundGenericArgs/UseBoundGenericArgs.ql +++ b/rust/ql/test/extractor-tests/generated/UseBoundGenericArgs/UseBoundGenericArgs.ql @@ -2,9 +2,10 @@ import codeql.rust.elements import TestUtils -from UseBoundGenericArgs x, int getNumberOfUseBoundGenericArgs -where - toBeTested(x) and - not x.isUnknown() and - getNumberOfUseBoundGenericArgs = x.getNumberOfUseBoundGenericArgs() -select x, "getNumberOfUseBoundGenericArgs:", getNumberOfUseBoundGenericArgs +query predicate instances(UseBoundGenericArgs x) { toBeTested(x) and not x.isUnknown() } + +query predicate getUseBoundGenericArg( + UseBoundGenericArgs x, int index, UseBoundGenericArg getUseBoundGenericArg +) { + toBeTested(x) and not x.isUnknown() and getUseBoundGenericArg = x.getUseBoundGenericArg(index) +} diff --git a/rust/ql/test/extractor-tests/generated/UseBoundGenericArgs/UseBoundGenericArgs_getUseBoundGenericArg.expected b/rust/ql/test/extractor-tests/generated/UseBoundGenericArgs/UseBoundGenericArgs_getUseBoundGenericArg.expected deleted file mode 100644 index 9cae2694f99..00000000000 --- a/rust/ql/test/extractor-tests/generated/UseBoundGenericArgs/UseBoundGenericArgs_getUseBoundGenericArg.expected +++ /dev/null @@ -1,3 +0,0 @@ -| gen_use_bound_generic_args.rs:7:62:7:71 | UseBoundGenericArgs | 0 | gen_use_bound_generic_args.rs:7:63:7:64 | 'a | -| gen_use_bound_generic_args.rs:7:62:7:71 | UseBoundGenericArgs | 1 | gen_use_bound_generic_args.rs:7:67:7:67 | T | -| gen_use_bound_generic_args.rs:7:62:7:71 | UseBoundGenericArgs | 2 | gen_use_bound_generic_args.rs:7:70:7:70 | N | diff --git a/rust/ql/test/extractor-tests/generated/UseBoundGenericArgs/UseBoundGenericArgs_getUseBoundGenericArg.ql b/rust/ql/test/extractor-tests/generated/UseBoundGenericArgs/UseBoundGenericArgs_getUseBoundGenericArg.ql deleted file mode 100644 index 794bf615b04..00000000000 --- a/rust/ql/test/extractor-tests/generated/UseBoundGenericArgs/UseBoundGenericArgs_getUseBoundGenericArg.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from UseBoundGenericArgs x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getUseBoundGenericArg(index) diff --git a/rust/ql/test/extractor-tests/generated/UseTree/Cargo.lock b/rust/ql/test/extractor-tests/generated/UseTree/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/UseTree/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/UseTree/UseTree.expected b/rust/ql/test/extractor-tests/generated/UseTree/UseTree.expected index ac5d1b77295..5e59c0c9f83 100644 --- a/rust/ql/test/extractor-tests/generated/UseTree/UseTree.expected +++ b/rust/ql/test/extractor-tests/generated/UseTree/UseTree.expected @@ -1,7 +1,20 @@ -| gen_use_tree.rs:5:9:5:33 | ...::HashMap | isGlob: | no | hasPath: | yes | hasRename: | no | hasUseTreeList: | no | -| gen_use_tree.rs:6:9:6:27 | ...::collections::* | isGlob: | yes | hasPath: | yes | hasRename: | no | hasUseTreeList: | no | -| gen_use_tree.rs:7:9:7:46 | ...::HashMap as MyHashMap | isGlob: | no | hasPath: | yes | hasRename: | yes | hasUseTreeList: | no | -| gen_use_tree.rs:8:9:8:50 | ...::collections::{...} | isGlob: | no | hasPath: | yes | hasRename: | no | hasUseTreeList: | yes | -| gen_use_tree.rs:8:28:8:31 | self | isGlob: | no | hasPath: | yes | hasRename: | no | hasUseTreeList: | no | -| gen_use_tree.rs:8:34:8:40 | HashMap | isGlob: | no | hasPath: | yes | hasRename: | no | hasUseTreeList: | no | -| gen_use_tree.rs:8:43:8:49 | HashSet | isGlob: | no | hasPath: | yes | hasRename: | no | hasUseTreeList: | no | +instances +| gen_use_tree.rs:5:9:5:33 | ...::HashMap | isGlob: | no | +| gen_use_tree.rs:6:9:6:27 | ...::collections::* | isGlob: | yes | +| gen_use_tree.rs:7:9:7:46 | ...::HashMap as MyHashMap | isGlob: | no | +| gen_use_tree.rs:8:9:8:50 | ...::collections::{...} | isGlob: | no | +| gen_use_tree.rs:8:28:8:31 | self | isGlob: | no | +| gen_use_tree.rs:8:34:8:40 | HashMap | isGlob: | no | +| gen_use_tree.rs:8:43:8:49 | HashSet | isGlob: | no | +getPath +| gen_use_tree.rs:5:9:5:33 | ...::HashMap | gen_use_tree.rs:5:9:5:33 | ...::HashMap | +| gen_use_tree.rs:6:9:6:27 | ...::collections::* | gen_use_tree.rs:6:9:6:24 | ...::collections | +| gen_use_tree.rs:7:9:7:46 | ...::HashMap as MyHashMap | gen_use_tree.rs:7:9:7:33 | ...::HashMap | +| gen_use_tree.rs:8:9:8:50 | ...::collections::{...} | gen_use_tree.rs:8:9:8:24 | ...::collections | +| gen_use_tree.rs:8:28:8:31 | self | gen_use_tree.rs:8:28:8:31 | self | +| gen_use_tree.rs:8:34:8:40 | HashMap | gen_use_tree.rs:8:34:8:40 | HashMap | +| gen_use_tree.rs:8:43:8:49 | HashSet | gen_use_tree.rs:8:43:8:49 | HashSet | +getRename +| gen_use_tree.rs:7:9:7:46 | ...::HashMap as MyHashMap | gen_use_tree.rs:7:35:7:46 | Rename | +getUseTreeList +| gen_use_tree.rs:8:9:8:50 | ...::collections::{...} | gen_use_tree.rs:8:27:8:50 | UseTreeList | diff --git a/rust/ql/test/extractor-tests/generated/UseTree/UseTree.ql b/rust/ql/test/extractor-tests/generated/UseTree/UseTree.ql index f4294877043..5f4c010c7e4 100644 --- a/rust/ql/test/extractor-tests/generated/UseTree/UseTree.ql +++ b/rust/ql/test/extractor-tests/generated/UseTree/UseTree.ql @@ -2,13 +2,21 @@ import codeql.rust.elements import TestUtils -from UseTree x, string isGlob, string hasPath, string hasRename, string hasUseTreeList -where +query predicate instances(UseTree x, string isGlob__label, string isGlob) { toBeTested(x) and not x.isUnknown() and - (if x.isGlob() then isGlob = "yes" else isGlob = "no") and - (if x.hasPath() then hasPath = "yes" else hasPath = "no") and - (if x.hasRename() then hasRename = "yes" else hasRename = "no") and - if x.hasUseTreeList() then hasUseTreeList = "yes" else hasUseTreeList = "no" -select x, "isGlob:", isGlob, "hasPath:", hasPath, "hasRename:", hasRename, "hasUseTreeList:", - hasUseTreeList + isGlob__label = "isGlob:" and + if x.isGlob() then isGlob = "yes" else isGlob = "no" +} + +query predicate getPath(UseTree x, Path getPath) { + toBeTested(x) and not x.isUnknown() and getPath = x.getPath() +} + +query predicate getRename(UseTree x, Rename getRename) { + toBeTested(x) and not x.isUnknown() and getRename = x.getRename() +} + +query predicate getUseTreeList(UseTree x, UseTreeList getUseTreeList) { + toBeTested(x) and not x.isUnknown() and getUseTreeList = x.getUseTreeList() +} diff --git a/rust/ql/test/extractor-tests/generated/UseTree/UseTree_getPath.expected b/rust/ql/test/extractor-tests/generated/UseTree/UseTree_getPath.expected deleted file mode 100644 index b6164b65342..00000000000 --- a/rust/ql/test/extractor-tests/generated/UseTree/UseTree_getPath.expected +++ /dev/null @@ -1,7 +0,0 @@ -| gen_use_tree.rs:5:9:5:33 | ...::HashMap | gen_use_tree.rs:5:9:5:33 | ...::HashMap | -| gen_use_tree.rs:6:9:6:27 | ...::collections::* | gen_use_tree.rs:6:9:6:24 | ...::collections | -| gen_use_tree.rs:7:9:7:46 | ...::HashMap as MyHashMap | gen_use_tree.rs:7:9:7:33 | ...::HashMap | -| gen_use_tree.rs:8:9:8:50 | ...::collections::{...} | gen_use_tree.rs:8:9:8:24 | ...::collections | -| gen_use_tree.rs:8:28:8:31 | self | gen_use_tree.rs:8:28:8:31 | self | -| gen_use_tree.rs:8:34:8:40 | HashMap | gen_use_tree.rs:8:34:8:40 | HashMap | -| gen_use_tree.rs:8:43:8:49 | HashSet | gen_use_tree.rs:8:43:8:49 | HashSet | diff --git a/rust/ql/test/extractor-tests/generated/UseTree/UseTree_getPath.ql b/rust/ql/test/extractor-tests/generated/UseTree/UseTree_getPath.ql deleted file mode 100644 index 74f892d46f8..00000000000 --- a/rust/ql/test/extractor-tests/generated/UseTree/UseTree_getPath.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from UseTree x -where toBeTested(x) and not x.isUnknown() -select x, x.getPath() diff --git a/rust/ql/test/extractor-tests/generated/UseTree/UseTree_getRename.expected b/rust/ql/test/extractor-tests/generated/UseTree/UseTree_getRename.expected deleted file mode 100644 index 77c4b31a86a..00000000000 --- a/rust/ql/test/extractor-tests/generated/UseTree/UseTree_getRename.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_use_tree.rs:7:9:7:46 | ...::HashMap as MyHashMap | gen_use_tree.rs:7:35:7:46 | Rename | diff --git a/rust/ql/test/extractor-tests/generated/UseTree/UseTree_getRename.ql b/rust/ql/test/extractor-tests/generated/UseTree/UseTree_getRename.ql deleted file mode 100644 index 754d167eefd..00000000000 --- a/rust/ql/test/extractor-tests/generated/UseTree/UseTree_getRename.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from UseTree x -where toBeTested(x) and not x.isUnknown() -select x, x.getRename() diff --git a/rust/ql/test/extractor-tests/generated/UseTree/UseTree_getUseTreeList.expected b/rust/ql/test/extractor-tests/generated/UseTree/UseTree_getUseTreeList.expected deleted file mode 100644 index 547fb0bd37b..00000000000 --- a/rust/ql/test/extractor-tests/generated/UseTree/UseTree_getUseTreeList.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_use_tree.rs:8:9:8:50 | ...::collections::{...} | gen_use_tree.rs:8:27:8:50 | UseTreeList | diff --git a/rust/ql/test/extractor-tests/generated/UseTree/UseTree_getUseTreeList.ql b/rust/ql/test/extractor-tests/generated/UseTree/UseTree_getUseTreeList.ql deleted file mode 100644 index 5e57b7a6b69..00000000000 --- a/rust/ql/test/extractor-tests/generated/UseTree/UseTree_getUseTreeList.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from UseTree x -where toBeTested(x) and not x.isUnknown() -select x, x.getUseTreeList() diff --git a/rust/ql/test/extractor-tests/generated/UseTreeList/Cargo.lock b/rust/ql/test/extractor-tests/generated/UseTreeList/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/UseTreeList/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/UseTreeList/UseTreeList.expected b/rust/ql/test/extractor-tests/generated/UseTreeList/UseTreeList.expected index 1d1bbfd4e14..451bd9daf4a 100644 --- a/rust/ql/test/extractor-tests/generated/UseTreeList/UseTreeList.expected +++ b/rust/ql/test/extractor-tests/generated/UseTreeList/UseTreeList.expected @@ -1 +1,5 @@ -| gen_use_tree_list.rs:7:14:7:21 | UseTreeList | getNumberOfUseTrees: | 2 | +instances +| gen_use_tree_list.rs:7:14:7:21 | UseTreeList | +getUseTree +| gen_use_tree_list.rs:7:14:7:21 | UseTreeList | 0 | gen_use_tree_list.rs:7:15:7:16 | fs | +| gen_use_tree_list.rs:7:14:7:21 | UseTreeList | 1 | gen_use_tree_list.rs:7:19:7:20 | io | diff --git a/rust/ql/test/extractor-tests/generated/UseTreeList/UseTreeList.ql b/rust/ql/test/extractor-tests/generated/UseTreeList/UseTreeList.ql index ebcfc59a58f..5e0058df86d 100644 --- a/rust/ql/test/extractor-tests/generated/UseTreeList/UseTreeList.ql +++ b/rust/ql/test/extractor-tests/generated/UseTreeList/UseTreeList.ql @@ -2,9 +2,8 @@ import codeql.rust.elements import TestUtils -from UseTreeList x, int getNumberOfUseTrees -where - toBeTested(x) and - not x.isUnknown() and - getNumberOfUseTrees = x.getNumberOfUseTrees() -select x, "getNumberOfUseTrees:", getNumberOfUseTrees +query predicate instances(UseTreeList x) { toBeTested(x) and not x.isUnknown() } + +query predicate getUseTree(UseTreeList x, int index, UseTree getUseTree) { + toBeTested(x) and not x.isUnknown() and getUseTree = x.getUseTree(index) +} diff --git a/rust/ql/test/extractor-tests/generated/UseTreeList/UseTreeList_getUseTree.expected b/rust/ql/test/extractor-tests/generated/UseTreeList/UseTreeList_getUseTree.expected deleted file mode 100644 index 1bfef2daee1..00000000000 --- a/rust/ql/test/extractor-tests/generated/UseTreeList/UseTreeList_getUseTree.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_use_tree_list.rs:7:14:7:21 | UseTreeList | 0 | gen_use_tree_list.rs:7:15:7:16 | fs | -| gen_use_tree_list.rs:7:14:7:21 | UseTreeList | 1 | gen_use_tree_list.rs:7:19:7:20 | io | diff --git a/rust/ql/test/extractor-tests/generated/UseTreeList/UseTreeList_getUseTree.ql b/rust/ql/test/extractor-tests/generated/UseTreeList/UseTreeList_getUseTree.ql deleted file mode 100644 index dc7262d7ab5..00000000000 --- a/rust/ql/test/extractor-tests/generated/UseTreeList/UseTreeList_getUseTree.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from UseTreeList x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getUseTree(index) diff --git a/rust/ql/test/extractor-tests/generated/Variant/Cargo.lock b/rust/ql/test/extractor-tests/generated/Variant/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Variant/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/Variant/Variant.expected b/rust/ql/test/extractor-tests/generated/Variant/Variant.expected index cca0757d458..ad970afe530 100644 --- a/rust/ql/test/extractor-tests/generated/Variant/Variant.expected +++ b/rust/ql/test/extractor-tests/generated/Variant/Variant.expected @@ -1,3 +1,16 @@ -| gen_variant.rs:7:14:7:14 | A | hasExtendedCanonicalPath: | no | hasCrateOrigin: | no | getNumberOfAttrs: | 0 | hasDiscriminant: | no | hasFieldList: | no | hasName: | yes | hasVisibility: | no | -| gen_variant.rs:7:17:7:22 | B | hasExtendedCanonicalPath: | no | hasCrateOrigin: | no | getNumberOfAttrs: | 0 | hasDiscriminant: | no | hasFieldList: | yes | hasName: | yes | hasVisibility: | no | -| gen_variant.rs:7:25:7:36 | C | hasExtendedCanonicalPath: | no | hasCrateOrigin: | no | getNumberOfAttrs: | 0 | hasDiscriminant: | no | hasFieldList: | yes | hasName: | yes | hasVisibility: | no | +instances +| gen_variant.rs:7:14:7:14 | A | +| gen_variant.rs:7:17:7:22 | B | +| gen_variant.rs:7:25:7:36 | C | +getExtendedCanonicalPath +getCrateOrigin +getAttr +getDiscriminant +getFieldList +| gen_variant.rs:7:17:7:22 | B | gen_variant.rs:7:18:7:22 | TupleFieldList | +| gen_variant.rs:7:25:7:36 | C | gen_variant.rs:7:27:7:36 | StructFieldList | +getName +| gen_variant.rs:7:14:7:14 | A | gen_variant.rs:7:14:7:14 | A | +| gen_variant.rs:7:17:7:22 | B | gen_variant.rs:7:17:7:17 | B | +| gen_variant.rs:7:25:7:36 | C | gen_variant.rs:7:25:7:25 | C | +getVisibility diff --git a/rust/ql/test/extractor-tests/generated/Variant/Variant.ql b/rust/ql/test/extractor-tests/generated/Variant/Variant.ql index a21c0509978..088f610637a 100644 --- a/rust/ql/test/extractor-tests/generated/Variant/Variant.ql +++ b/rust/ql/test/extractor-tests/generated/Variant/Variant.ql @@ -2,23 +2,32 @@ import codeql.rust.elements import TestUtils -from - Variant x, string hasExtendedCanonicalPath, string hasCrateOrigin, int getNumberOfAttrs, - string hasDiscriminant, string hasFieldList, string hasName, string hasVisibility -where - toBeTested(x) and - not x.isUnknown() and - ( - if x.hasExtendedCanonicalPath() - then hasExtendedCanonicalPath = "yes" - else hasExtendedCanonicalPath = "no" - ) and - (if x.hasCrateOrigin() then hasCrateOrigin = "yes" else hasCrateOrigin = "no") and - getNumberOfAttrs = x.getNumberOfAttrs() and - (if x.hasDiscriminant() then hasDiscriminant = "yes" else hasDiscriminant = "no") and - (if x.hasFieldList() then hasFieldList = "yes" else hasFieldList = "no") and - (if x.hasName() then hasName = "yes" else hasName = "no") and - if x.hasVisibility() then hasVisibility = "yes" else hasVisibility = "no" -select x, "hasExtendedCanonicalPath:", hasExtendedCanonicalPath, "hasCrateOrigin:", hasCrateOrigin, - "getNumberOfAttrs:", getNumberOfAttrs, "hasDiscriminant:", hasDiscriminant, "hasFieldList:", - hasFieldList, "hasName:", hasName, "hasVisibility:", hasVisibility +query predicate instances(Variant x) { toBeTested(x) and not x.isUnknown() } + +query predicate getExtendedCanonicalPath(Variant x, string getExtendedCanonicalPath) { + toBeTested(x) and not x.isUnknown() and getExtendedCanonicalPath = x.getExtendedCanonicalPath() +} + +query predicate getCrateOrigin(Variant x, string getCrateOrigin) { + toBeTested(x) and not x.isUnknown() and getCrateOrigin = x.getCrateOrigin() +} + +query predicate getAttr(Variant x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} + +query predicate getDiscriminant(Variant x, Expr getDiscriminant) { + toBeTested(x) and not x.isUnknown() and getDiscriminant = x.getDiscriminant() +} + +query predicate getFieldList(Variant x, FieldList getFieldList) { + toBeTested(x) and not x.isUnknown() and getFieldList = x.getFieldList() +} + +query predicate getName(Variant x, Name getName) { + toBeTested(x) and not x.isUnknown() and getName = x.getName() +} + +query predicate getVisibility(Variant x, Visibility getVisibility) { + toBeTested(x) and not x.isUnknown() and getVisibility = x.getVisibility() +} diff --git a/rust/ql/test/extractor-tests/generated/Variant/Variant_getAttr.expected b/rust/ql/test/extractor-tests/generated/Variant/Variant_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Variant/Variant_getAttr.ql b/rust/ql/test/extractor-tests/generated/Variant/Variant_getAttr.ql deleted file mode 100644 index 99972ef847d..00000000000 --- a/rust/ql/test/extractor-tests/generated/Variant/Variant_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Variant x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/Variant/Variant_getCrateOrigin.expected b/rust/ql/test/extractor-tests/generated/Variant/Variant_getCrateOrigin.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Variant/Variant_getCrateOrigin.ql b/rust/ql/test/extractor-tests/generated/Variant/Variant_getCrateOrigin.ql deleted file mode 100644 index 0acfd9827fe..00000000000 --- a/rust/ql/test/extractor-tests/generated/Variant/Variant_getCrateOrigin.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Variant x -where toBeTested(x) and not x.isUnknown() -select x, x.getCrateOrigin() diff --git a/rust/ql/test/extractor-tests/generated/Variant/Variant_getDiscriminant.expected b/rust/ql/test/extractor-tests/generated/Variant/Variant_getDiscriminant.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Variant/Variant_getDiscriminant.ql b/rust/ql/test/extractor-tests/generated/Variant/Variant_getDiscriminant.ql deleted file mode 100644 index cde11c30887..00000000000 --- a/rust/ql/test/extractor-tests/generated/Variant/Variant_getDiscriminant.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Variant x -where toBeTested(x) and not x.isUnknown() -select x, x.getDiscriminant() diff --git a/rust/ql/test/extractor-tests/generated/Variant/Variant_getExtendedCanonicalPath.expected b/rust/ql/test/extractor-tests/generated/Variant/Variant_getExtendedCanonicalPath.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Variant/Variant_getExtendedCanonicalPath.ql b/rust/ql/test/extractor-tests/generated/Variant/Variant_getExtendedCanonicalPath.ql deleted file mode 100644 index ad8aaf86a5c..00000000000 --- a/rust/ql/test/extractor-tests/generated/Variant/Variant_getExtendedCanonicalPath.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Variant x -where toBeTested(x) and not x.isUnknown() -select x, x.getExtendedCanonicalPath() diff --git a/rust/ql/test/extractor-tests/generated/Variant/Variant_getFieldList.expected b/rust/ql/test/extractor-tests/generated/Variant/Variant_getFieldList.expected deleted file mode 100644 index 9461de62cc6..00000000000 --- a/rust/ql/test/extractor-tests/generated/Variant/Variant_getFieldList.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_variant.rs:7:17:7:22 | B | gen_variant.rs:7:18:7:22 | TupleFieldList | -| gen_variant.rs:7:25:7:36 | C | gen_variant.rs:7:27:7:36 | StructFieldList | diff --git a/rust/ql/test/extractor-tests/generated/Variant/Variant_getFieldList.ql b/rust/ql/test/extractor-tests/generated/Variant/Variant_getFieldList.ql deleted file mode 100644 index e1bae7650ba..00000000000 --- a/rust/ql/test/extractor-tests/generated/Variant/Variant_getFieldList.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Variant x -where toBeTested(x) and not x.isUnknown() -select x, x.getFieldList() diff --git a/rust/ql/test/extractor-tests/generated/Variant/Variant_getName.expected b/rust/ql/test/extractor-tests/generated/Variant/Variant_getName.expected deleted file mode 100644 index 87faede2aad..00000000000 --- a/rust/ql/test/extractor-tests/generated/Variant/Variant_getName.expected +++ /dev/null @@ -1,3 +0,0 @@ -| gen_variant.rs:7:14:7:14 | A | gen_variant.rs:7:14:7:14 | A | -| gen_variant.rs:7:17:7:22 | B | gen_variant.rs:7:17:7:17 | B | -| gen_variant.rs:7:25:7:36 | C | gen_variant.rs:7:25:7:25 | C | diff --git a/rust/ql/test/extractor-tests/generated/Variant/Variant_getName.ql b/rust/ql/test/extractor-tests/generated/Variant/Variant_getName.ql deleted file mode 100644 index 73f4ff33e40..00000000000 --- a/rust/ql/test/extractor-tests/generated/Variant/Variant_getName.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Variant x -where toBeTested(x) and not x.isUnknown() -select x, x.getName() diff --git a/rust/ql/test/extractor-tests/generated/Variant/Variant_getVisibility.expected b/rust/ql/test/extractor-tests/generated/Variant/Variant_getVisibility.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Variant/Variant_getVisibility.ql b/rust/ql/test/extractor-tests/generated/Variant/Variant_getVisibility.ql deleted file mode 100644 index 7edb649fbda..00000000000 --- a/rust/ql/test/extractor-tests/generated/Variant/Variant_getVisibility.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Variant x -where toBeTested(x) and not x.isUnknown() -select x, x.getVisibility() diff --git a/rust/ql/test/extractor-tests/generated/VariantList/Cargo.lock b/rust/ql/test/extractor-tests/generated/VariantList/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/VariantList/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/VariantList/VariantList.expected b/rust/ql/test/extractor-tests/generated/VariantList/VariantList.expected index b7b25116f58..9642b1fe308 100644 --- a/rust/ql/test/extractor-tests/generated/VariantList/VariantList.expected +++ b/rust/ql/test/extractor-tests/generated/VariantList/VariantList.expected @@ -1 +1,6 @@ -| gen_variant_list.rs:7:12:7:22 | VariantList | getNumberOfVariants: | 3 | +instances +| gen_variant_list.rs:7:12:7:22 | VariantList | +getVariant +| gen_variant_list.rs:7:12:7:22 | VariantList | 0 | gen_variant_list.rs:7:14:7:14 | A | +| gen_variant_list.rs:7:12:7:22 | VariantList | 1 | gen_variant_list.rs:7:17:7:17 | B | +| gen_variant_list.rs:7:12:7:22 | VariantList | 2 | gen_variant_list.rs:7:20:7:20 | C | diff --git a/rust/ql/test/extractor-tests/generated/VariantList/VariantList.ql b/rust/ql/test/extractor-tests/generated/VariantList/VariantList.ql index 213e4d447dc..85ecb0fe409 100644 --- a/rust/ql/test/extractor-tests/generated/VariantList/VariantList.ql +++ b/rust/ql/test/extractor-tests/generated/VariantList/VariantList.ql @@ -2,9 +2,8 @@ import codeql.rust.elements import TestUtils -from VariantList x, int getNumberOfVariants -where - toBeTested(x) and - not x.isUnknown() and - getNumberOfVariants = x.getNumberOfVariants() -select x, "getNumberOfVariants:", getNumberOfVariants +query predicate instances(VariantList x) { toBeTested(x) and not x.isUnknown() } + +query predicate getVariant(VariantList x, int index, Variant getVariant) { + toBeTested(x) and not x.isUnknown() and getVariant = x.getVariant(index) +} diff --git a/rust/ql/test/extractor-tests/generated/VariantList/VariantList_getVariant.expected b/rust/ql/test/extractor-tests/generated/VariantList/VariantList_getVariant.expected deleted file mode 100644 index c62dfe00472..00000000000 --- a/rust/ql/test/extractor-tests/generated/VariantList/VariantList_getVariant.expected +++ /dev/null @@ -1,3 +0,0 @@ -| gen_variant_list.rs:7:12:7:22 | VariantList | 0 | gen_variant_list.rs:7:14:7:14 | A | -| gen_variant_list.rs:7:12:7:22 | VariantList | 1 | gen_variant_list.rs:7:17:7:17 | B | -| gen_variant_list.rs:7:12:7:22 | VariantList | 2 | gen_variant_list.rs:7:20:7:20 | C | diff --git a/rust/ql/test/extractor-tests/generated/VariantList/VariantList_getVariant.ql b/rust/ql/test/extractor-tests/generated/VariantList/VariantList_getVariant.ql deleted file mode 100644 index fe1800104a3..00000000000 --- a/rust/ql/test/extractor-tests/generated/VariantList/VariantList_getVariant.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from VariantList x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getVariant(index) diff --git a/rust/ql/test/extractor-tests/generated/Visibility/Cargo.lock b/rust/ql/test/extractor-tests/generated/Visibility/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Visibility/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/Visibility/Visibility.expected b/rust/ql/test/extractor-tests/generated/Visibility/Visibility.expected index 7be919b547e..daae8776ad7 100644 --- a/rust/ql/test/extractor-tests/generated/Visibility/Visibility.expected +++ b/rust/ql/test/extractor-tests/generated/Visibility/Visibility.expected @@ -1 +1,3 @@ -| gen_visibility.rs:7:7:7:9 | Visibility | hasPath: | no | +instances +| gen_visibility.rs:7:7:7:9 | Visibility | +getPath diff --git a/rust/ql/test/extractor-tests/generated/Visibility/Visibility.ql b/rust/ql/test/extractor-tests/generated/Visibility/Visibility.ql index adf0833c12c..651d0aecb2f 100644 --- a/rust/ql/test/extractor-tests/generated/Visibility/Visibility.ql +++ b/rust/ql/test/extractor-tests/generated/Visibility/Visibility.ql @@ -2,9 +2,8 @@ import codeql.rust.elements import TestUtils -from Visibility x, string hasPath -where - toBeTested(x) and - not x.isUnknown() and - if x.hasPath() then hasPath = "yes" else hasPath = "no" -select x, "hasPath:", hasPath +query predicate instances(Visibility x) { toBeTested(x) and not x.isUnknown() } + +query predicate getPath(Visibility x, Path getPath) { + toBeTested(x) and not x.isUnknown() and getPath = x.getPath() +} diff --git a/rust/ql/test/extractor-tests/generated/Visibility/Visibility_getPath.expected b/rust/ql/test/extractor-tests/generated/Visibility/Visibility_getPath.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/Visibility/Visibility_getPath.ql b/rust/ql/test/extractor-tests/generated/Visibility/Visibility_getPath.ql deleted file mode 100644 index 0f0b641d212..00000000000 --- a/rust/ql/test/extractor-tests/generated/Visibility/Visibility_getPath.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from Visibility x -where toBeTested(x) and not x.isUnknown() -select x, x.getPath() diff --git a/rust/ql/test/extractor-tests/generated/WhereClause/Cargo.lock b/rust/ql/test/extractor-tests/generated/WhereClause/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/WhereClause/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/WhereClause/WhereClause.expected b/rust/ql/test/extractor-tests/generated/WhereClause/WhereClause.expected index 4610fc7dea1..8dbec29fd90 100644 --- a/rust/ql/test/extractor-tests/generated/WhereClause/WhereClause.expected +++ b/rust/ql/test/extractor-tests/generated/WhereClause/WhereClause.expected @@ -1 +1,4 @@ -| gen_where_clause.rs:7:21:7:34 | WhereClause | getNumberOfPredicates: | 1 | +instances +| gen_where_clause.rs:7:21:7:34 | WhereClause | +getPredicate +| gen_where_clause.rs:7:21:7:34 | WhereClause | 0 | gen_where_clause.rs:7:27:7:34 | WherePred | diff --git a/rust/ql/test/extractor-tests/generated/WhereClause/WhereClause.ql b/rust/ql/test/extractor-tests/generated/WhereClause/WhereClause.ql index 891b8d55fc2..8890de0efaf 100644 --- a/rust/ql/test/extractor-tests/generated/WhereClause/WhereClause.ql +++ b/rust/ql/test/extractor-tests/generated/WhereClause/WhereClause.ql @@ -2,9 +2,8 @@ import codeql.rust.elements import TestUtils -from WhereClause x, int getNumberOfPredicates -where - toBeTested(x) and - not x.isUnknown() and - getNumberOfPredicates = x.getNumberOfPredicates() -select x, "getNumberOfPredicates:", getNumberOfPredicates +query predicate instances(WhereClause x) { toBeTested(x) and not x.isUnknown() } + +query predicate getPredicate(WhereClause x, int index, WherePred getPredicate) { + toBeTested(x) and not x.isUnknown() and getPredicate = x.getPredicate(index) +} diff --git a/rust/ql/test/extractor-tests/generated/WhereClause/WhereClause_getPredicate.expected b/rust/ql/test/extractor-tests/generated/WhereClause/WhereClause_getPredicate.expected deleted file mode 100644 index b8fcba86a6a..00000000000 --- a/rust/ql/test/extractor-tests/generated/WhereClause/WhereClause_getPredicate.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_where_clause.rs:7:21:7:34 | WhereClause | 0 | gen_where_clause.rs:7:27:7:34 | WherePred | diff --git a/rust/ql/test/extractor-tests/generated/WhereClause/WhereClause_getPredicate.ql b/rust/ql/test/extractor-tests/generated/WhereClause/WhereClause_getPredicate.ql deleted file mode 100644 index 4b0c8ab7b7d..00000000000 --- a/rust/ql/test/extractor-tests/generated/WhereClause/WhereClause_getPredicate.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from WhereClause x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getPredicate(index) diff --git a/rust/ql/test/extractor-tests/generated/WherePred/Cargo.lock b/rust/ql/test/extractor-tests/generated/WherePred/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/WherePred/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/WherePred/WherePred.expected b/rust/ql/test/extractor-tests/generated/WherePred/WherePred.expected index d2988eb245d..4980b912b86 100644 --- a/rust/ql/test/extractor-tests/generated/WherePred/WherePred.expected +++ b/rust/ql/test/extractor-tests/generated/WherePred/WherePred.expected @@ -1,2 +1,11 @@ -| gen_where_pred.rs:7:36:7:43 | WherePred | hasGenericParamList: | no | hasLifetime: | no | hasTypeRepr: | yes | hasTypeBoundList: | yes | -| gen_where_pred.rs:7:46:7:53 | WherePred | hasGenericParamList: | no | hasLifetime: | no | hasTypeRepr: | yes | hasTypeBoundList: | yes | +instances +| gen_where_pred.rs:7:36:7:43 | WherePred | +| gen_where_pred.rs:7:46:7:53 | WherePred | +getGenericParamList +getLifetime +getTypeRepr +| gen_where_pred.rs:7:36:7:43 | WherePred | gen_where_pred.rs:7:36:7:36 | T | +| gen_where_pred.rs:7:46:7:53 | WherePred | gen_where_pred.rs:7:46:7:46 | U | +getTypeBoundList +| gen_where_pred.rs:7:36:7:43 | WherePred | gen_where_pred.rs:7:39:7:43 | TypeBoundList | +| gen_where_pred.rs:7:46:7:53 | WherePred | gen_where_pred.rs:7:49:7:53 | TypeBoundList | diff --git a/rust/ql/test/extractor-tests/generated/WherePred/WherePred.ql b/rust/ql/test/extractor-tests/generated/WherePred/WherePred.ql index a4471e43ef6..3d1ecb7339d 100644 --- a/rust/ql/test/extractor-tests/generated/WherePred/WherePred.ql +++ b/rust/ql/test/extractor-tests/generated/WherePred/WherePred.ql @@ -2,15 +2,20 @@ import codeql.rust.elements import TestUtils -from - WherePred x, string hasGenericParamList, string hasLifetime, string hasTypeRepr, - string hasTypeBoundList -where - toBeTested(x) and - not x.isUnknown() and - (if x.hasGenericParamList() then hasGenericParamList = "yes" else hasGenericParamList = "no") and - (if x.hasLifetime() then hasLifetime = "yes" else hasLifetime = "no") and - (if x.hasTypeRepr() then hasTypeRepr = "yes" else hasTypeRepr = "no") and - if x.hasTypeBoundList() then hasTypeBoundList = "yes" else hasTypeBoundList = "no" -select x, "hasGenericParamList:", hasGenericParamList, "hasLifetime:", hasLifetime, "hasTypeRepr:", - hasTypeRepr, "hasTypeBoundList:", hasTypeBoundList +query predicate instances(WherePred x) { toBeTested(x) and not x.isUnknown() } + +query predicate getGenericParamList(WherePred x, GenericParamList getGenericParamList) { + toBeTested(x) and not x.isUnknown() and getGenericParamList = x.getGenericParamList() +} + +query predicate getLifetime(WherePred x, Lifetime getLifetime) { + toBeTested(x) and not x.isUnknown() and getLifetime = x.getLifetime() +} + +query predicate getTypeRepr(WherePred x, TypeRepr getTypeRepr) { + toBeTested(x) and not x.isUnknown() and getTypeRepr = x.getTypeRepr() +} + +query predicate getTypeBoundList(WherePred x, TypeBoundList getTypeBoundList) { + toBeTested(x) and not x.isUnknown() and getTypeBoundList = x.getTypeBoundList() +} diff --git a/rust/ql/test/extractor-tests/generated/WherePred/WherePred_getGenericParamList.expected b/rust/ql/test/extractor-tests/generated/WherePred/WherePred_getGenericParamList.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/WherePred/WherePred_getGenericParamList.ql b/rust/ql/test/extractor-tests/generated/WherePred/WherePred_getGenericParamList.ql deleted file mode 100644 index ef15cd7f4f8..00000000000 --- a/rust/ql/test/extractor-tests/generated/WherePred/WherePred_getGenericParamList.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from WherePred x -where toBeTested(x) and not x.isUnknown() -select x, x.getGenericParamList() diff --git a/rust/ql/test/extractor-tests/generated/WherePred/WherePred_getLifetime.expected b/rust/ql/test/extractor-tests/generated/WherePred/WherePred_getLifetime.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/WherePred/WherePred_getLifetime.ql b/rust/ql/test/extractor-tests/generated/WherePred/WherePred_getLifetime.ql deleted file mode 100644 index a0bd226ca4f..00000000000 --- a/rust/ql/test/extractor-tests/generated/WherePred/WherePred_getLifetime.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from WherePred x -where toBeTested(x) and not x.isUnknown() -select x, x.getLifetime() diff --git a/rust/ql/test/extractor-tests/generated/WherePred/WherePred_getTypeBoundList.expected b/rust/ql/test/extractor-tests/generated/WherePred/WherePred_getTypeBoundList.expected deleted file mode 100644 index 2b3b7d1172a..00000000000 --- a/rust/ql/test/extractor-tests/generated/WherePred/WherePred_getTypeBoundList.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_where_pred.rs:7:36:7:43 | WherePred | gen_where_pred.rs:7:39:7:43 | TypeBoundList | -| gen_where_pred.rs:7:46:7:53 | WherePred | gen_where_pred.rs:7:49:7:53 | TypeBoundList | diff --git a/rust/ql/test/extractor-tests/generated/WherePred/WherePred_getTypeBoundList.ql b/rust/ql/test/extractor-tests/generated/WherePred/WherePred_getTypeBoundList.ql deleted file mode 100644 index 0f269fa9140..00000000000 --- a/rust/ql/test/extractor-tests/generated/WherePred/WherePred_getTypeBoundList.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from WherePred x -where toBeTested(x) and not x.isUnknown() -select x, x.getTypeBoundList() diff --git a/rust/ql/test/extractor-tests/generated/WherePred/WherePred_getTypeRepr.expected b/rust/ql/test/extractor-tests/generated/WherePred/WherePred_getTypeRepr.expected deleted file mode 100644 index 92c8489eda0..00000000000 --- a/rust/ql/test/extractor-tests/generated/WherePred/WherePred_getTypeRepr.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_where_pred.rs:7:36:7:43 | WherePred | gen_where_pred.rs:7:36:7:36 | T | -| gen_where_pred.rs:7:46:7:53 | WherePred | gen_where_pred.rs:7:46:7:46 | U | diff --git a/rust/ql/test/extractor-tests/generated/WherePred/WherePred_getTypeRepr.ql b/rust/ql/test/extractor-tests/generated/WherePred/WherePred_getTypeRepr.ql deleted file mode 100644 index e1992ba278e..00000000000 --- a/rust/ql/test/extractor-tests/generated/WherePred/WherePred_getTypeRepr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from WherePred x -where toBeTested(x) and not x.isUnknown() -select x, x.getTypeRepr() diff --git a/rust/ql/test/extractor-tests/generated/WhileExpr/Cargo.lock b/rust/ql/test/extractor-tests/generated/WhileExpr/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/WhileExpr/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr.expected b/rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr.expected index 547e3e0ad2e..8ff736a0af0 100644 --- a/rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr.expected +++ b/rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr.expected @@ -1 +1,8 @@ -| gen_while_expr.rs:7:5:9:5 | while ... { ... } | hasLabel: | no | hasLoopBody: | yes | getNumberOfAttrs: | 0 | hasCondition: | yes | +instances +| gen_while_expr.rs:7:5:9:5 | while ... { ... } | +getLabel +getLoopBody +| gen_while_expr.rs:7:5:9:5 | while ... { ... } | gen_while_expr.rs:7:18:9:5 | { ... } | +getAttr +getCondition +| gen_while_expr.rs:7:5:9:5 | while ... { ... } | gen_while_expr.rs:7:11:7:16 | ... < ... | diff --git a/rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr.ql b/rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr.ql index 8544014e571..67a0dc562ad 100644 --- a/rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr.ql +++ b/rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr.ql @@ -2,13 +2,20 @@ import codeql.rust.elements import TestUtils -from WhileExpr x, string hasLabel, string hasLoopBody, int getNumberOfAttrs, string hasCondition -where - toBeTested(x) and - not x.isUnknown() and - (if x.hasLabel() then hasLabel = "yes" else hasLabel = "no") and - (if x.hasLoopBody() then hasLoopBody = "yes" else hasLoopBody = "no") and - getNumberOfAttrs = x.getNumberOfAttrs() and - if x.hasCondition() then hasCondition = "yes" else hasCondition = "no" -select x, "hasLabel:", hasLabel, "hasLoopBody:", hasLoopBody, "getNumberOfAttrs:", getNumberOfAttrs, - "hasCondition:", hasCondition +query predicate instances(WhileExpr x) { toBeTested(x) and not x.isUnknown() } + +query predicate getLabel(WhileExpr x, Label getLabel) { + toBeTested(x) and not x.isUnknown() and getLabel = x.getLabel() +} + +query predicate getLoopBody(WhileExpr x, BlockExpr getLoopBody) { + toBeTested(x) and not x.isUnknown() and getLoopBody = x.getLoopBody() +} + +query predicate getAttr(WhileExpr x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} + +query predicate getCondition(WhileExpr x, Expr getCondition) { + toBeTested(x) and not x.isUnknown() and getCondition = x.getCondition() +} diff --git a/rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr_getAttr.ql deleted file mode 100644 index eeb05dcc0b0..00000000000 --- a/rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from WhileExpr x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr_getCondition.expected b/rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr_getCondition.expected deleted file mode 100644 index 1b6f53eeea0..00000000000 --- a/rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr_getCondition.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_while_expr.rs:7:5:9:5 | while ... { ... } | gen_while_expr.rs:7:11:7:16 | ... < ... | diff --git a/rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr_getCondition.ql b/rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr_getCondition.ql deleted file mode 100644 index 184dc6f8a7c..00000000000 --- a/rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr_getCondition.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from WhileExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getCondition() diff --git a/rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr_getLabel.expected b/rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr_getLabel.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr_getLabel.ql b/rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr_getLabel.ql deleted file mode 100644 index 59865e97014..00000000000 --- a/rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr_getLabel.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from WhileExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getLabel() diff --git a/rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr_getLoopBody.expected b/rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr_getLoopBody.expected deleted file mode 100644 index 54fd5ed5152..00000000000 --- a/rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr_getLoopBody.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_while_expr.rs:7:5:9:5 | while ... { ... } | gen_while_expr.rs:7:18:9:5 | { ... } | diff --git a/rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr_getLoopBody.ql b/rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr_getLoopBody.ql deleted file mode 100644 index 3d19f2e7341..00000000000 --- a/rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr_getLoopBody.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from WhileExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getLoopBody() diff --git a/rust/ql/test/extractor-tests/generated/WildcardPat/Cargo.lock b/rust/ql/test/extractor-tests/generated/WildcardPat/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/WildcardPat/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/WildcardPat/WildcardPat.ql b/rust/ql/test/extractor-tests/generated/WildcardPat/WildcardPat.ql index cac335f3b7f..e64d55357a3 100644 --- a/rust/ql/test/extractor-tests/generated/WildcardPat/WildcardPat.ql +++ b/rust/ql/test/extractor-tests/generated/WildcardPat/WildcardPat.ql @@ -2,6 +2,4 @@ import codeql.rust.elements import TestUtils -from WildcardPat x -where toBeTested(x) and not x.isUnknown() -select x +query predicate instances(WildcardPat x) { toBeTested(x) and not x.isUnknown() } diff --git a/rust/ql/test/extractor-tests/generated/YeetExpr/Cargo.lock b/rust/ql/test/extractor-tests/generated/YeetExpr/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/YeetExpr/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr.expected b/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr.expected index 3bce2660fe3..a77777c99fd 100644 --- a/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr.expected +++ b/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr.expected @@ -1 +1,5 @@ -| gen_yeet_expr.rs:6:8:6:36 | YeetExpr | getNumberOfAttrs: | 0 | hasExpr: | yes | +instances +| gen_yeet_expr.rs:6:8:6:36 | YeetExpr | +getAttr +getExpr +| gen_yeet_expr.rs:6:8:6:36 | YeetExpr | gen_yeet_expr.rs:6:16:6:36 | "index out of bounds" | diff --git a/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr.ql b/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr.ql index 165bd667d3c..88d4e570a1e 100644 --- a/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr.ql +++ b/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr.ql @@ -2,10 +2,12 @@ import codeql.rust.elements import TestUtils -from YeetExpr x, int getNumberOfAttrs, string hasExpr -where - toBeTested(x) and - not x.isUnknown() and - getNumberOfAttrs = x.getNumberOfAttrs() and - if x.hasExpr() then hasExpr = "yes" else hasExpr = "no" -select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasExpr:", hasExpr +query predicate instances(YeetExpr x) { toBeTested(x) and not x.isUnknown() } + +query predicate getAttr(YeetExpr x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} + +query predicate getExpr(YeetExpr x, Expr getExpr) { + toBeTested(x) and not x.isUnknown() and getExpr = x.getExpr() +} diff --git a/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr_getAttr.ql deleted file mode 100644 index a246607b779..00000000000 --- a/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from YeetExpr x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr_getExpr.expected b/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr_getExpr.expected deleted file mode 100644 index e1d96684eec..00000000000 --- a/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr_getExpr.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_yeet_expr.rs:6:8:6:36 | YeetExpr | gen_yeet_expr.rs:6:16:6:36 | "index out of bounds" | diff --git a/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr_getExpr.ql b/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr_getExpr.ql deleted file mode 100644 index edb0e0676a7..00000000000 --- a/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr_getExpr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from YeetExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getExpr() diff --git a/rust/ql/test/extractor-tests/generated/YieldExpr/Cargo.lock b/rust/ql/test/extractor-tests/generated/YieldExpr/Cargo.lock new file mode 100644 index 00000000000..b9856cfaf77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/YieldExpr/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "test" +version = "0.0.1" diff --git a/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr.expected b/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr.expected index 5045b11d25d..da73c1be671 100644 --- a/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr.expected +++ b/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr.expected @@ -1 +1,5 @@ -| gen_yield_expr.rs:7:13:7:19 | YieldExpr | getNumberOfAttrs: | 0 | hasExpr: | yes | +instances +| gen_yield_expr.rs:7:13:7:19 | YieldExpr | +getAttr +getExpr +| gen_yield_expr.rs:7:13:7:19 | YieldExpr | gen_yield_expr.rs:7:19:7:19 | 1 | diff --git a/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr.ql b/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr.ql index 47f32503bfc..68281d39d9e 100644 --- a/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr.ql +++ b/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr.ql @@ -2,10 +2,12 @@ import codeql.rust.elements import TestUtils -from YieldExpr x, int getNumberOfAttrs, string hasExpr -where - toBeTested(x) and - not x.isUnknown() and - getNumberOfAttrs = x.getNumberOfAttrs() and - if x.hasExpr() then hasExpr = "yes" else hasExpr = "no" -select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasExpr:", hasExpr +query predicate instances(YieldExpr x) { toBeTested(x) and not x.isUnknown() } + +query predicate getAttr(YieldExpr x, int index, Attr getAttr) { + toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index) +} + +query predicate getExpr(YieldExpr x, Expr getExpr) { + toBeTested(x) and not x.isUnknown() and getExpr = x.getExpr() +} diff --git a/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr_getAttr.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr_getAttr.ql deleted file mode 100644 index 9c6b01bc228..00000000000 --- a/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr_getAttr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from YieldExpr x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAttr(index) diff --git a/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr_getExpr.expected b/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr_getExpr.expected deleted file mode 100644 index 96884087f9d..00000000000 --- a/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr_getExpr.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_yield_expr.rs:7:13:7:19 | YieldExpr | gen_yield_expr.rs:7:19:7:19 | 1 | diff --git a/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr_getExpr.ql b/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr_getExpr.ql deleted file mode 100644 index bdaa4755e6d..00000000000 --- a/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr_getExpr.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen, do not edit -import codeql.rust.elements -import TestUtils - -from YieldExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getExpr() diff --git a/rust/ql/test/library-tests/type-inference/CONSISTENCY/PathResolutionConsistency.expected b/rust/ql/test/library-tests/type-inference/CONSISTENCY/PathResolutionConsistency.expected index 0b49270f755..65d2aa474e8 100644 --- a/rust/ql/test/library-tests/type-inference/CONSISTENCY/PathResolutionConsistency.expected +++ b/rust/ql/test/library-tests/type-inference/CONSISTENCY/PathResolutionConsistency.expected @@ -1,2 +1,9 @@ multipleCallTargets | dereference.rs:61:15:61:24 | e1.deref() | +| main.rs:1963:13:1963:31 | ...::from(...) | +| main.rs:1964:13:1964:31 | ...::from(...) | +| main.rs:1965:13:1965:31 | ...::from(...) | +| main.rs:1970:13:1970:31 | ...::from(...) | +| main.rs:1971:13:1971:31 | ...::from(...) | +| main.rs:1972:13:1972:31 | ...::from(...) | +| main.rs:2006:21:2006:43 | ...::from(...) | diff --git a/rust/ql/test/library-tests/type-inference/main.rs b/rust/ql/test/library-tests/type-inference/main.rs index 109581588a5..050f8152ac7 100644 --- a/rust/ql/test/library-tests/type-inference/main.rs +++ b/rust/ql/test/library-tests/type-inference/main.rs @@ -1856,21 +1856,27 @@ mod indexers { // MyVec::index fn index(&self, index: usize) -> &Self::Output { - &self.data[index] // $ fieldof=MyVec + &self.data[index] // $ fieldof=MyVec method=index } } fn analyze_slice(slice: &[S]) { - let x = slice[0].foo(); // $ method=foo type=x:S + // NOTE: `slice` gets the spurious type `[]` because the desugaring of + // the index expression adds an implicit borrow. `&slice` has the type + // `&&[S]`, but the `index` methods takes a `&[S]`, so Rust adds an + // implicit dereference. We cannot currently handle a position that is + // both implicitly dereferenced and implicitly borrowed, so the extra + // type sneaks in. + let x = slice[0].foo(); // $ method=foo type=x:S method=index SPURIOUS: type=slice:[] } pub fn f() { let mut vec = MyVec::new(); // $ type=vec:T.S vec.push(S); // $ method=push - vec[0].foo(); // $ MISSING: method=foo -- type inference does not support the `Index` trait yet + vec[0].foo(); // $ method=MyVec::index method=foo let xs: [S; 1] = [S]; - let x = xs[0].foo(); // $ method=foo type=x:S + let x = xs[0].foo(); // $ method=foo type=x:S method=index analyze_slice(&xs); } @@ -1904,11 +1910,7 @@ mod method_determined_by_argument_type { impl MyAdd for i64 { // MyAdd::my_add fn my_add(&self, value: bool) -> Self { - if value { - 1 - } else { - 0 - } + if value { 1 } else { 0 } } } @@ -1920,6 +1922,122 @@ mod method_determined_by_argument_type { } } +mod loops { + struct MyCallable {} + + impl MyCallable { + fn new() -> Self { + MyCallable {} + } + + fn call(&self) -> i64 { + 1 + } + } + + pub fn f() { + // for loops with arrays + + for i in [1, 2, 3] {} // $ type=i:i32 + for i in [1, 2, 3].map(|x| x + 1) {} // $ method=map MISSING: type=i:i32 + for i in [1, 2, 3].into_iter() {} // $ method=into_iter MISSING: type=i:i32 + + let vals1 = [1u8, 2, 3]; // $ type=vals1:[T;...].u8 + for u in vals1 {} // $ type=u:u8 + + let vals2 = [1u16; 3]; // $ type=vals2:[T;...].u16 + for u in vals2 {} // $ type=u:u16 + + let vals3: [u32; 3] = [1, 2, 3]; // $ type=vals3:[T;...].u32 + for u in vals3 {} // $ type=u:u32 + + let vals4: [u64; 3] = [1; 3]; // $ type=vals4:[T;...].u64 + for u in vals4 {} // $ type=u:u64 + + let mut strings1 = ["foo", "bar", "baz"]; // $ type=strings1:[T;...].str + for s in &strings1 {} // $ MISSING: type=s:&T.str + for s in &mut strings1 {} // $ MISSING: type=s:&T.str + for s in strings1 {} // $ type=s:str + + let strings2 = [ // $ type=strings2:[T;...].String + String::from("foo"), + String::from("bar"), + String::from("baz"), + ]; + for s in strings2 {} // $ type=s:String + + let strings3 = &[ // $ type=strings3:&T.[T;...].String + String::from("foo"), + String::from("bar"), + String::from("baz"), + ]; + for s in strings3 {} // $ MISSING: type=s:String + + let callables = [MyCallable::new(), MyCallable::new(), MyCallable::new()]; // $ MISSING: type=callables:[T;...].MyCallable; 3 + for c in callables // $ type=c:MyCallable + { + let result = c.call(); // $ type=result:i64 method=call + } + + // for loops with ranges + + for i in 0..10 {} // $ MISSING: type=i:i32 + for u in [0u8..10] {} // $ MISSING: type=u:u8 + let range = 0..10; // $ MISSING: type=range:Range type=range:Idx.i32 + for i in range {} // $ MISSING: type=i:i32 + + let range1 = std::ops::Range { // $ type=range1:Range type=range1:Idx.u16 + start: 0u16, + end: 10u16, + }; + for u in range1 {} // $ MISSING: type=u:u16 + + // for loops with containers + + let vals3 = vec![1, 2, 3]; // $ MISSING: type=vals3:Vec type=vals3:T.i32 + for i in vals3 {} // $ MISSING: type=i:i32 + + let vals4a: Vec = [1u16, 2, 3].to_vec(); // $ type=vals4a:Vec type=vals4a:T.u16 + for u in vals4a {} // $ type=u:u16 + + let vals4b = [1u16, 2, 3].to_vec(); // $ MISSING: type=vals4b:Vec type=vals4b:T.u16 + for u in vals4b {} // $ MISSING: type=u:u16 + + let vals5 = Vec::from([1u32, 2, 3]); // $ type=vals5:Vec MISSING: type=vals5:T.u32 + for u in vals5 {} // $ MISSING: type=u:u32 + + let vals6: Vec<&u64> = [1u64, 2, 3].iter().collect(); // $ type=vals6:Vec type=vals6:T.&T.u64 + for u in vals6 {} // $ type=u:&T.u64 + + let mut vals7 = Vec::new(); // $ type=vals7:Vec MISSING: type=vals7:T.u8 + vals7.push(1u8); // $ method=push + for u in vals7 {} // $ MISSING: type=u:u8 + + let matrix1 = vec![vec![1, 2], vec![3, 4]]; // $ MISSING: type=matrix1:Vec type=matrix1:T.Vec type=matrix1:T.T.i32 + for row in matrix1 { + // $ MISSING: type=row:Vec type=row:T.i32 + for cell in row { // $ MISSING: type=cell:i32 + } + } + + let mut map1 = std::collections::HashMap::new(); // $ MISSING: type=map1:Hashmap type=map1:K.i32 type=map1:V.Box type1=map1:V.T.&T.str + map1.insert(1, Box::new("one")); // $ method=insert + map1.insert(2, Box::new("two")); // $ method=insert + for key in map1.keys() {} // $ method=keys MISSING: type=key:i32 + for value in map1.values() {} // $ method=values MISSING: type=value:Box type=value:T.&T.str + for (key, value) in map1.iter() {} // $ method=iter MISSING: type=key:i32 type=value:Box type=value:T.&T.str + for (key, value) in &map1 {} // $ MISSING: type=key:i32 type=value:Box type=value:T.&T.str + + // while loops + + let mut a: i64 = 0; // $ type=a:i64 + while a < 10 // $ method=lt type=a:i64 + { + a += 1; // $ type=a:i64 method=add_assign + } + } +} + mod dereference; fn main() { @@ -1944,6 +2062,7 @@ fn main() { async_::f(); impl_trait::f(); indexers::f(); + loops::f(); macros::f(); method_determined_by_argument_type::f(); dereference::test(); diff --git a/rust/ql/test/library-tests/type-inference/type-inference.expected b/rust/ql/test/library-tests/type-inference/type-inference.expected index fdbe769eba8..5420c5afbcf 100644 --- a/rust/ql/test/library-tests/type-inference/type-inference.expected +++ b/rust/ql/test/library-tests/type-inference/type-inference.expected @@ -31,23 +31,15 @@ inferType | dereference.rs:36:14:36:42 | MyIntPointer {...} | | dereference.rs:4:1:6:1 | MyIntPointer | | dereference.rs:36:36:36:40 | 34i64 | | {EXTERNAL LOCATION} | i64 | | dereference.rs:37:9:37:11 | _b2 | | {EXTERNAL LOCATION} | i64 | -| dereference.rs:37:9:37:11 | _b2 | | file://:0:0:0:0 | & | -| dereference.rs:37:9:37:11 | _b2 | &T | {EXTERNAL LOCATION} | i64 | | dereference.rs:37:15:37:17 | * ... | | {EXTERNAL LOCATION} | i64 | -| dereference.rs:37:15:37:17 | * ... | | file://:0:0:0:0 | & | -| dereference.rs:37:15:37:17 | * ... | &T | {EXTERNAL LOCATION} | i64 | | dereference.rs:37:16:37:17 | a2 | | dereference.rs:4:1:6:1 | MyIntPointer | | dereference.rs:40:9:40:10 | a3 | | dereference.rs:4:1:6:1 | MyIntPointer | | dereference.rs:40:14:40:42 | MyIntPointer {...} | | dereference.rs:4:1:6:1 | MyIntPointer | | dereference.rs:40:36:40:40 | 34i64 | | {EXTERNAL LOCATION} | i64 | | dereference.rs:41:9:41:11 | _b3 | | {EXTERNAL LOCATION} | bool | | dereference.rs:41:15:41:19 | (...) | | {EXTERNAL LOCATION} | i64 | -| dereference.rs:41:15:41:19 | (...) | | file://:0:0:0:0 | & | -| dereference.rs:41:15:41:19 | (...) | &T | {EXTERNAL LOCATION} | i64 | | dereference.rs:41:15:41:33 | ... .is_positive() | | {EXTERNAL LOCATION} | bool | | dereference.rs:41:16:41:18 | * ... | | {EXTERNAL LOCATION} | i64 | -| dereference.rs:41:16:41:18 | * ... | | file://:0:0:0:0 | & | -| dereference.rs:41:16:41:18 | * ... | &T | {EXTERNAL LOCATION} | i64 | | dereference.rs:41:17:41:18 | a3 | | dereference.rs:4:1:6:1 | MyIntPointer | | dereference.rs:46:9:46:10 | c1 | | dereference.rs:17:1:19:1 | MySmartPointer | | dereference.rs:46:9:46:10 | c1 | T | {EXTERNAL LOCATION} | char | @@ -66,11 +58,7 @@ inferType | dereference.rs:50:14:50:42 | MySmartPointer {...} | T | {EXTERNAL LOCATION} | char | | dereference.rs:50:38:50:40 | 'a' | | {EXTERNAL LOCATION} | char | | dereference.rs:51:9:51:11 | _d2 | | {EXTERNAL LOCATION} | char | -| dereference.rs:51:9:51:11 | _d2 | | file://:0:0:0:0 | & | -| dereference.rs:51:9:51:11 | _d2 | &T | {EXTERNAL LOCATION} | char | | dereference.rs:51:15:51:17 | * ... | | {EXTERNAL LOCATION} | char | -| dereference.rs:51:15:51:17 | * ... | | file://:0:0:0:0 | & | -| dereference.rs:51:15:51:17 | * ... | &T | {EXTERNAL LOCATION} | char | | dereference.rs:51:16:51:17 | c2 | | dereference.rs:17:1:19:1 | MySmartPointer | | dereference.rs:51:16:51:17 | c2 | T | {EXTERNAL LOCATION} | char | | dereference.rs:54:9:54:10 | c3 | | dereference.rs:17:1:19:1 | MySmartPointer | @@ -80,12 +68,8 @@ inferType | dereference.rs:54:38:54:42 | 34i64 | | {EXTERNAL LOCATION} | i64 | | dereference.rs:55:9:55:11 | _d3 | | {EXTERNAL LOCATION} | bool | | dereference.rs:55:15:55:19 | (...) | | {EXTERNAL LOCATION} | i64 | -| dereference.rs:55:15:55:19 | (...) | | file://:0:0:0:0 | & | -| dereference.rs:55:15:55:19 | (...) | &T | {EXTERNAL LOCATION} | i64 | | dereference.rs:55:15:55:33 | ... .is_positive() | | {EXTERNAL LOCATION} | bool | | dereference.rs:55:16:55:18 | * ... | | {EXTERNAL LOCATION} | i64 | -| dereference.rs:55:16:55:18 | * ... | | file://:0:0:0:0 | & | -| dereference.rs:55:16:55:18 | * ... | &T | {EXTERNAL LOCATION} | i64 | | dereference.rs:55:17:55:18 | c3 | | dereference.rs:17:1:19:1 | MySmartPointer | | dereference.rs:55:17:55:18 | c3 | T | {EXTERNAL LOCATION} | i64 | | dereference.rs:60:9:60:10 | e1 | | file://:0:0:0:0 | & | @@ -107,11 +91,7 @@ inferType | dereference.rs:64:14:64:17 | &'a' | &T | {EXTERNAL LOCATION} | char | | dereference.rs:64:15:64:17 | 'a' | | {EXTERNAL LOCATION} | char | | dereference.rs:65:9:65:11 | _f2 | | {EXTERNAL LOCATION} | char | -| dereference.rs:65:9:65:11 | _f2 | | file://:0:0:0:0 | & | -| dereference.rs:65:9:65:11 | _f2 | &T | {EXTERNAL LOCATION} | char | | dereference.rs:65:15:65:17 | * ... | | {EXTERNAL LOCATION} | char | -| dereference.rs:65:15:65:17 | * ... | | file://:0:0:0:0 | & | -| dereference.rs:65:15:65:17 | * ... | &T | {EXTERNAL LOCATION} | char | | dereference.rs:65:16:65:17 | e2 | | file://:0:0:0:0 | & | | dereference.rs:65:16:65:17 | e2 | &T | {EXTERNAL LOCATION} | char | | dereference.rs:68:9:68:10 | e3 | | file://:0:0:0:0 | & | @@ -121,12 +101,8 @@ inferType | dereference.rs:68:15:68:19 | 34i64 | | {EXTERNAL LOCATION} | i64 | | dereference.rs:69:9:69:11 | _f3 | | {EXTERNAL LOCATION} | bool | | dereference.rs:69:15:69:19 | (...) | | {EXTERNAL LOCATION} | i64 | -| dereference.rs:69:15:69:19 | (...) | | file://:0:0:0:0 | & | -| dereference.rs:69:15:69:19 | (...) | &T | {EXTERNAL LOCATION} | i64 | | dereference.rs:69:15:69:33 | ... .is_positive() | | {EXTERNAL LOCATION} | bool | | dereference.rs:69:16:69:18 | * ... | | {EXTERNAL LOCATION} | i64 | -| dereference.rs:69:16:69:18 | * ... | | file://:0:0:0:0 | & | -| dereference.rs:69:16:69:18 | * ... | &T | {EXTERNAL LOCATION} | i64 | | dereference.rs:69:17:69:18 | e3 | | file://:0:0:0:0 | & | | dereference.rs:69:17:69:18 | e3 | &T | {EXTERNAL LOCATION} | i64 | | dereference.rs:74:9:74:10 | g1 | | {EXTERNAL LOCATION} | Box | @@ -151,11 +127,7 @@ inferType | dereference.rs:78:25:78:37 | ...::new(...) | T | {EXTERNAL LOCATION} | char | | dereference.rs:78:34:78:36 | 'a' | | {EXTERNAL LOCATION} | char | | dereference.rs:79:9:79:11 | _h2 | | {EXTERNAL LOCATION} | char | -| dereference.rs:79:9:79:11 | _h2 | | file://:0:0:0:0 | & | -| dereference.rs:79:9:79:11 | _h2 | &T | {EXTERNAL LOCATION} | char | | dereference.rs:79:15:79:17 | * ... | | {EXTERNAL LOCATION} | char | -| dereference.rs:79:15:79:17 | * ... | | file://:0:0:0:0 | & | -| dereference.rs:79:15:79:17 | * ... | &T | {EXTERNAL LOCATION} | char | | dereference.rs:79:16:79:17 | g2 | | {EXTERNAL LOCATION} | Box | | dereference.rs:79:16:79:17 | g2 | A | {EXTERNAL LOCATION} | Global | | dereference.rs:79:16:79:17 | g2 | T | {EXTERNAL LOCATION} | char | @@ -168,12 +140,8 @@ inferType | dereference.rs:82:33:82:37 | 34i64 | | {EXTERNAL LOCATION} | i64 | | dereference.rs:83:9:83:11 | _h3 | | {EXTERNAL LOCATION} | bool | | dereference.rs:83:15:83:19 | (...) | | {EXTERNAL LOCATION} | i64 | -| dereference.rs:83:15:83:19 | (...) | | file://:0:0:0:0 | & | -| dereference.rs:83:15:83:19 | (...) | &T | {EXTERNAL LOCATION} | i64 | | dereference.rs:83:15:83:33 | ... .is_positive() | | {EXTERNAL LOCATION} | bool | | dereference.rs:83:16:83:18 | * ... | | {EXTERNAL LOCATION} | i64 | -| dereference.rs:83:16:83:18 | * ... | | file://:0:0:0:0 | & | -| dereference.rs:83:16:83:18 | * ... | &T | {EXTERNAL LOCATION} | i64 | | dereference.rs:83:17:83:18 | g3 | | {EXTERNAL LOCATION} | Box | | dereference.rs:83:17:83:18 | g3 | A | {EXTERNAL LOCATION} | Global | | dereference.rs:83:17:83:18 | g3 | T | {EXTERNAL LOCATION} | i64 | @@ -1500,27 +1468,15 @@ inferType | main.rs:1109:29:1109:33 | SelfParam | &T | main.rs:1082:5:1085:5 | MyInt | | main.rs:1109:29:1109:33 | SelfParam | &T.&T | main.rs:1082:5:1085:5 | MyInt | | main.rs:1109:43:1111:9 | { ... } | | {EXTERNAL LOCATION} | i64 | -| main.rs:1110:13:1110:22 | (...) | | file://:0:0:0:0 | & | | main.rs:1110:13:1110:22 | (...) | | main.rs:1082:5:1085:5 | MyInt | -| main.rs:1110:13:1110:22 | (...) | &T | file://:0:0:0:0 | & | -| main.rs:1110:13:1110:22 | (...) | &T | main.rs:1082:5:1085:5 | MyInt | -| main.rs:1110:13:1110:22 | (...) | &T.&T | main.rs:1082:5:1085:5 | MyInt | | main.rs:1110:13:1110:24 | ... .a | | {EXTERNAL LOCATION} | i64 | -| main.rs:1110:14:1110:21 | * ... | | file://:0:0:0:0 | & | | main.rs:1110:14:1110:21 | * ... | | main.rs:1082:5:1085:5 | MyInt | -| main.rs:1110:14:1110:21 | * ... | &T | file://:0:0:0:0 | & | -| main.rs:1110:14:1110:21 | * ... | &T | main.rs:1082:5:1085:5 | MyInt | -| main.rs:1110:14:1110:21 | * ... | &T.&T | main.rs:1082:5:1085:5 | MyInt | | main.rs:1110:15:1110:21 | (...) | | file://:0:0:0:0 | & | | main.rs:1110:15:1110:21 | (...) | | main.rs:1082:5:1085:5 | MyInt | -| main.rs:1110:15:1110:21 | (...) | &T | file://:0:0:0:0 | & | | main.rs:1110:15:1110:21 | (...) | &T | main.rs:1082:5:1085:5 | MyInt | -| main.rs:1110:15:1110:21 | (...) | &T.&T | main.rs:1082:5:1085:5 | MyInt | | main.rs:1110:16:1110:20 | * ... | | file://:0:0:0:0 | & | | main.rs:1110:16:1110:20 | * ... | | main.rs:1082:5:1085:5 | MyInt | -| main.rs:1110:16:1110:20 | * ... | &T | file://:0:0:0:0 | & | | main.rs:1110:16:1110:20 | * ... | &T | main.rs:1082:5:1085:5 | MyInt | -| main.rs:1110:16:1110:20 | * ... | &T.&T | main.rs:1082:5:1085:5 | MyInt | | main.rs:1110:17:1110:20 | self | | file://:0:0:0:0 | & | | main.rs:1110:17:1110:20 | self | &T | file://:0:0:0:0 | & | | main.rs:1110:17:1110:20 | self | &T | main.rs:1082:5:1085:5 | MyInt | @@ -1528,13 +1484,9 @@ inferType | main.rs:1114:33:1114:36 | SelfParam | | file://:0:0:0:0 | & | | main.rs:1114:33:1114:36 | SelfParam | &T | main.rs:1082:5:1085:5 | MyInt | | main.rs:1114:46:1116:9 | { ... } | | {EXTERNAL LOCATION} | i64 | -| main.rs:1115:13:1115:19 | (...) | | file://:0:0:0:0 | & | | main.rs:1115:13:1115:19 | (...) | | main.rs:1082:5:1085:5 | MyInt | -| main.rs:1115:13:1115:19 | (...) | &T | main.rs:1082:5:1085:5 | MyInt | | main.rs:1115:13:1115:21 | ... .a | | {EXTERNAL LOCATION} | i64 | -| main.rs:1115:14:1115:18 | * ... | | file://:0:0:0:0 | & | | main.rs:1115:14:1115:18 | * ... | | main.rs:1082:5:1085:5 | MyInt | -| main.rs:1115:14:1115:18 | * ... | &T | main.rs:1082:5:1085:5 | MyInt | | main.rs:1115:15:1115:18 | self | | file://:0:0:0:0 | & | | main.rs:1115:15:1115:18 | self | &T | main.rs:1082:5:1085:5 | MyInt | | main.rs:1120:13:1120:14 | x1 | | main.rs:1076:5:1077:19 | S | @@ -1632,16 +1584,10 @@ inferType | main.rs:1143:19:1143:23 | S(...) | T | main.rs:1079:5:1080:14 | S2 | | main.rs:1143:21:1143:22 | S2 | | main.rs:1079:5:1080:14 | S2 | | main.rs:1146:18:1146:23 | "{:?}\\n" | | {EXTERNAL LOCATION} | str | -| main.rs:1146:26:1146:30 | (...) | | file://:0:0:0:0 | & | | main.rs:1146:26:1146:30 | (...) | | main.rs:1076:5:1077:19 | S | -| main.rs:1146:26:1146:30 | (...) | &T | main.rs:1076:5:1077:19 | S | -| main.rs:1146:26:1146:30 | (...) | &T.T | main.rs:1079:5:1080:14 | S2 | | main.rs:1146:26:1146:30 | (...) | T | main.rs:1079:5:1080:14 | S2 | | main.rs:1146:26:1146:35 | ... .m1() | | main.rs:1079:5:1080:14 | S2 | -| main.rs:1146:27:1146:29 | * ... | | file://:0:0:0:0 | & | | main.rs:1146:27:1146:29 | * ... | | main.rs:1076:5:1077:19 | S | -| main.rs:1146:27:1146:29 | * ... | &T | main.rs:1076:5:1077:19 | S | -| main.rs:1146:27:1146:29 | * ... | &T.T | main.rs:1079:5:1080:14 | S2 | | main.rs:1146:27:1146:29 | * ... | T | main.rs:1079:5:1080:14 | S2 | | main.rs:1146:28:1146:29 | x6 | | file://:0:0:0:0 | & | | main.rs:1146:28:1146:29 | x6 | &T | main.rs:1076:5:1077:19 | S | @@ -1836,20 +1782,10 @@ inferType | main.rs:1251:15:1251:16 | &x | &T | main.rs:1227:5:1227:13 | S | | main.rs:1251:16:1251:16 | x | | main.rs:1227:5:1227:13 | S | | main.rs:1253:13:1253:13 | n | | {EXTERNAL LOCATION} | bool | -| main.rs:1253:13:1253:13 | n | | file://:0:0:0:0 | & | -| main.rs:1253:13:1253:13 | n | &T | {EXTERNAL LOCATION} | bool | -| main.rs:1253:13:1253:13 | n | &T | file://:0:0:0:0 | & | -| main.rs:1253:13:1253:13 | n | &T.&T | {EXTERNAL LOCATION} | bool | | main.rs:1253:17:1253:24 | * ... | | {EXTERNAL LOCATION} | bool | -| main.rs:1253:17:1253:24 | * ... | | file://:0:0:0:0 | & | -| main.rs:1253:17:1253:24 | * ... | &T | {EXTERNAL LOCATION} | bool | -| main.rs:1253:17:1253:24 | * ... | &T | file://:0:0:0:0 | & | -| main.rs:1253:17:1253:24 | * ... | &T.&T | {EXTERNAL LOCATION} | bool | | main.rs:1253:18:1253:24 | * ... | | {EXTERNAL LOCATION} | bool | | main.rs:1253:18:1253:24 | * ... | | file://:0:0:0:0 | & | | main.rs:1253:18:1253:24 | * ... | &T | {EXTERNAL LOCATION} | bool | -| main.rs:1253:18:1253:24 | * ... | &T | file://:0:0:0:0 | & | -| main.rs:1253:18:1253:24 | * ... | &T.&T | {EXTERNAL LOCATION} | bool | | main.rs:1253:19:1253:24 | &... | | file://:0:0:0:0 | & | | main.rs:1253:19:1253:24 | &... | &T | {EXTERNAL LOCATION} | bool | | main.rs:1253:19:1253:24 | &... | &T | file://:0:0:0:0 | & | @@ -2860,113 +2796,407 @@ inferType | main.rs:1859:14:1859:29 | ...[index] | | main.rs:1854:10:1854:10 | T | | main.rs:1859:24:1859:28 | index | | {EXTERNAL LOCATION} | usize | | main.rs:1863:22:1863:26 | slice | | file://:0:0:0:0 | & | +| main.rs:1863:22:1863:26 | slice | | file://:0:0:0:0 | [] | | main.rs:1863:22:1863:26 | slice | &T | file://:0:0:0:0 | [] | | main.rs:1863:22:1863:26 | slice | &T.[T] | main.rs:1830:5:1831:13 | S | -| main.rs:1864:13:1864:13 | x | | main.rs:1830:5:1831:13 | S | -| main.rs:1864:17:1864:21 | slice | | file://:0:0:0:0 | & | -| main.rs:1864:17:1864:21 | slice | &T | file://:0:0:0:0 | [] | -| main.rs:1864:17:1864:21 | slice | &T.[T] | main.rs:1830:5:1831:13 | S | -| main.rs:1864:17:1864:24 | slice[0] | | main.rs:1830:5:1831:13 | S | -| main.rs:1864:17:1864:30 | ... .foo() | | main.rs:1830:5:1831:13 | S | -| main.rs:1864:23:1864:23 | 0 | | {EXTERNAL LOCATION} | i32 | -| main.rs:1868:13:1868:19 | mut vec | | main.rs:1839:5:1842:5 | MyVec | -| main.rs:1868:13:1868:19 | mut vec | T | main.rs:1830:5:1831:13 | S | -| main.rs:1868:23:1868:34 | ...::new(...) | | main.rs:1839:5:1842:5 | MyVec | -| main.rs:1868:23:1868:34 | ...::new(...) | T | main.rs:1830:5:1831:13 | S | -| main.rs:1869:9:1869:11 | vec | | main.rs:1839:5:1842:5 | MyVec | -| main.rs:1869:9:1869:11 | vec | T | main.rs:1830:5:1831:13 | S | -| main.rs:1869:18:1869:18 | S | | main.rs:1830:5:1831:13 | S | -| main.rs:1870:9:1870:11 | vec | | main.rs:1839:5:1842:5 | MyVec | -| main.rs:1870:9:1870:11 | vec | T | main.rs:1830:5:1831:13 | S | -| main.rs:1870:13:1870:13 | 0 | | {EXTERNAL LOCATION} | i32 | -| main.rs:1872:13:1872:14 | xs | | file://:0:0:0:0 | [] | -| main.rs:1872:13:1872:14 | xs | | file://:0:0:0:0 | [] | -| main.rs:1872:13:1872:14 | xs | [T;...] | main.rs:1830:5:1831:13 | S | -| main.rs:1872:13:1872:14 | xs | [T] | main.rs:1830:5:1831:13 | S | -| main.rs:1872:21:1872:21 | 1 | | {EXTERNAL LOCATION} | i32 | -| main.rs:1872:26:1872:28 | [...] | | file://:0:0:0:0 | [] | -| main.rs:1872:26:1872:28 | [...] | | file://:0:0:0:0 | [] | -| main.rs:1872:26:1872:28 | [...] | [T;...] | main.rs:1830:5:1831:13 | S | -| main.rs:1872:26:1872:28 | [...] | [T] | main.rs:1830:5:1831:13 | S | -| main.rs:1872:27:1872:27 | S | | main.rs:1830:5:1831:13 | S | -| main.rs:1873:13:1873:13 | x | | main.rs:1830:5:1831:13 | S | -| main.rs:1873:17:1873:18 | xs | | file://:0:0:0:0 | [] | -| main.rs:1873:17:1873:18 | xs | | file://:0:0:0:0 | [] | -| main.rs:1873:17:1873:18 | xs | [T;...] | main.rs:1830:5:1831:13 | S | -| main.rs:1873:17:1873:18 | xs | [T] | main.rs:1830:5:1831:13 | S | -| main.rs:1873:17:1873:21 | xs[0] | | main.rs:1830:5:1831:13 | S | -| main.rs:1873:17:1873:27 | ... .foo() | | main.rs:1830:5:1831:13 | S | -| main.rs:1873:20:1873:20 | 0 | | {EXTERNAL LOCATION} | i32 | -| main.rs:1875:23:1875:25 | &xs | | file://:0:0:0:0 | & | -| main.rs:1875:23:1875:25 | &xs | &T | file://:0:0:0:0 | [] | -| main.rs:1875:23:1875:25 | &xs | &T | file://:0:0:0:0 | [] | -| main.rs:1875:23:1875:25 | &xs | &T.[T;...] | main.rs:1830:5:1831:13 | S | -| main.rs:1875:23:1875:25 | &xs | &T.[T] | main.rs:1830:5:1831:13 | S | -| main.rs:1875:24:1875:25 | xs | | file://:0:0:0:0 | [] | -| main.rs:1875:24:1875:25 | xs | | file://:0:0:0:0 | [] | -| main.rs:1875:24:1875:25 | xs | [T;...] | main.rs:1830:5:1831:13 | S | -| main.rs:1875:24:1875:25 | xs | [T] | main.rs:1830:5:1831:13 | S | -| main.rs:1881:25:1881:35 | "Hello, {}" | | {EXTERNAL LOCATION} | str | -| main.rs:1881:25:1881:45 | ...::format(...) | | {EXTERNAL LOCATION} | String | -| main.rs:1881:25:1881:45 | { ... } | | {EXTERNAL LOCATION} | String | -| main.rs:1881:38:1881:45 | "World!" | | {EXTERNAL LOCATION} | str | -| main.rs:1887:19:1887:23 | SelfParam | | file://:0:0:0:0 | & | -| main.rs:1887:19:1887:23 | SelfParam | &T | main.rs:1886:5:1888:5 | Self [trait MyAdd] | -| main.rs:1887:26:1887:30 | value | | main.rs:1886:17:1886:17 | T | -| main.rs:1892:19:1892:23 | SelfParam | | file://:0:0:0:0 | & | -| main.rs:1892:19:1892:23 | SelfParam | &T | {EXTERNAL LOCATION} | i64 | -| main.rs:1892:26:1892:30 | value | | {EXTERNAL LOCATION} | i64 | -| main.rs:1892:46:1894:9 | { ... } | | {EXTERNAL LOCATION} | i64 | -| main.rs:1893:13:1893:17 | value | | {EXTERNAL LOCATION} | i64 | -| main.rs:1899:19:1899:23 | SelfParam | | file://:0:0:0:0 | & | -| main.rs:1899:19:1899:23 | SelfParam | &T | {EXTERNAL LOCATION} | i64 | -| main.rs:1899:26:1899:30 | value | | file://:0:0:0:0 | & | -| main.rs:1899:26:1899:30 | value | &T | {EXTERNAL LOCATION} | i64 | -| main.rs:1899:47:1901:9 | { ... } | | {EXTERNAL LOCATION} | i64 | -| main.rs:1899:47:1901:9 | { ... } | | file://:0:0:0:0 | & | -| main.rs:1899:47:1901:9 | { ... } | &T | {EXTERNAL LOCATION} | i64 | -| main.rs:1900:13:1900:18 | * ... | | {EXTERNAL LOCATION} | i64 | -| main.rs:1900:13:1900:18 | * ... | | file://:0:0:0:0 | & | -| main.rs:1900:13:1900:18 | * ... | &T | {EXTERNAL LOCATION} | i64 | -| main.rs:1900:14:1900:18 | value | | file://:0:0:0:0 | & | -| main.rs:1900:14:1900:18 | value | &T | {EXTERNAL LOCATION} | i64 | -| main.rs:1906:19:1906:23 | SelfParam | | file://:0:0:0:0 | & | -| main.rs:1906:19:1906:23 | SelfParam | &T | {EXTERNAL LOCATION} | i64 | -| main.rs:1906:26:1906:30 | value | | {EXTERNAL LOCATION} | bool | -| main.rs:1906:47:1912:9 | { ... } | | {EXTERNAL LOCATION} | i32 | -| main.rs:1906:47:1912:9 | { ... } | | {EXTERNAL LOCATION} | i64 | -| main.rs:1907:13:1911:13 | if value {...} else {...} | | {EXTERNAL LOCATION} | i32 | -| main.rs:1907:13:1911:13 | if value {...} else {...} | | {EXTERNAL LOCATION} | i64 | -| main.rs:1907:16:1907:20 | value | | {EXTERNAL LOCATION} | bool | -| main.rs:1907:22:1909:13 | { ... } | | {EXTERNAL LOCATION} | i32 | -| main.rs:1907:22:1909:13 | { ... } | | {EXTERNAL LOCATION} | i64 | -| main.rs:1908:17:1908:17 | 1 | | {EXTERNAL LOCATION} | i32 | -| main.rs:1908:17:1908:17 | 1 | | {EXTERNAL LOCATION} | i64 | -| main.rs:1909:20:1911:13 | { ... } | | {EXTERNAL LOCATION} | i32 | -| main.rs:1909:20:1911:13 | { ... } | | {EXTERNAL LOCATION} | i64 | -| main.rs:1910:17:1910:17 | 0 | | {EXTERNAL LOCATION} | i32 | -| main.rs:1910:17:1910:17 | 0 | | {EXTERNAL LOCATION} | i64 | -| main.rs:1916:13:1916:13 | x | | {EXTERNAL LOCATION} | i32 | -| main.rs:1916:13:1916:13 | x | | {EXTERNAL LOCATION} | i64 | -| main.rs:1916:22:1916:23 | 73 | | {EXTERNAL LOCATION} | i32 | -| main.rs:1916:22:1916:23 | 73 | | {EXTERNAL LOCATION} | i64 | -| main.rs:1917:9:1917:9 | x | | {EXTERNAL LOCATION} | i32 | -| main.rs:1917:9:1917:9 | x | | {EXTERNAL LOCATION} | i64 | -| main.rs:1917:9:1917:22 | x.my_add(...) | | {EXTERNAL LOCATION} | i64 | -| main.rs:1917:18:1917:21 | 5i64 | | {EXTERNAL LOCATION} | i64 | -| main.rs:1918:9:1918:9 | x | | {EXTERNAL LOCATION} | i32 | -| main.rs:1918:9:1918:9 | x | | {EXTERNAL LOCATION} | i64 | -| main.rs:1918:9:1918:23 | x.my_add(...) | | {EXTERNAL LOCATION} | i64 | -| main.rs:1918:18:1918:22 | &5i64 | | file://:0:0:0:0 | & | -| main.rs:1918:18:1918:22 | &5i64 | &T | {EXTERNAL LOCATION} | i64 | -| main.rs:1918:19:1918:22 | 5i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:1870:13:1870:13 | x | | main.rs:1830:5:1831:13 | S | +| main.rs:1870:17:1870:21 | slice | | file://:0:0:0:0 | & | +| main.rs:1870:17:1870:21 | slice | | file://:0:0:0:0 | [] | +| main.rs:1870:17:1870:21 | slice | &T | file://:0:0:0:0 | [] | +| main.rs:1870:17:1870:21 | slice | &T.[T] | main.rs:1830:5:1831:13 | S | +| main.rs:1870:17:1870:24 | slice[0] | | main.rs:1830:5:1831:13 | S | +| main.rs:1870:17:1870:30 | ... .foo() | | main.rs:1830:5:1831:13 | S | +| main.rs:1870:23:1870:23 | 0 | | {EXTERNAL LOCATION} | i32 | +| main.rs:1874:13:1874:19 | mut vec | | main.rs:1839:5:1842:5 | MyVec | +| main.rs:1874:13:1874:19 | mut vec | T | main.rs:1830:5:1831:13 | S | +| main.rs:1874:23:1874:34 | ...::new(...) | | main.rs:1839:5:1842:5 | MyVec | +| main.rs:1874:23:1874:34 | ...::new(...) | T | main.rs:1830:5:1831:13 | S | +| main.rs:1875:9:1875:11 | vec | | main.rs:1839:5:1842:5 | MyVec | +| main.rs:1875:9:1875:11 | vec | T | main.rs:1830:5:1831:13 | S | +| main.rs:1875:18:1875:18 | S | | main.rs:1830:5:1831:13 | S | +| main.rs:1876:9:1876:11 | vec | | main.rs:1839:5:1842:5 | MyVec | +| main.rs:1876:9:1876:11 | vec | T | main.rs:1830:5:1831:13 | S | +| main.rs:1876:9:1876:14 | vec[0] | | main.rs:1830:5:1831:13 | S | +| main.rs:1876:9:1876:20 | ... .foo() | | main.rs:1830:5:1831:13 | S | +| main.rs:1876:13:1876:13 | 0 | | {EXTERNAL LOCATION} | i32 | +| main.rs:1876:13:1876:13 | 0 | | {EXTERNAL LOCATION} | usize | +| main.rs:1878:13:1878:14 | xs | | file://:0:0:0:0 | [] | +| main.rs:1878:13:1878:14 | xs | | file://:0:0:0:0 | [] | +| main.rs:1878:13:1878:14 | xs | [T;...] | main.rs:1830:5:1831:13 | S | +| main.rs:1878:13:1878:14 | xs | [T] | main.rs:1830:5:1831:13 | S | +| main.rs:1878:21:1878:21 | 1 | | {EXTERNAL LOCATION} | i32 | +| main.rs:1878:26:1878:28 | [...] | | file://:0:0:0:0 | [] | +| main.rs:1878:26:1878:28 | [...] | | file://:0:0:0:0 | [] | +| main.rs:1878:26:1878:28 | [...] | [T;...] | main.rs:1830:5:1831:13 | S | +| main.rs:1878:26:1878:28 | [...] | [T] | main.rs:1830:5:1831:13 | S | +| main.rs:1878:27:1878:27 | S | | main.rs:1830:5:1831:13 | S | +| main.rs:1879:13:1879:13 | x | | main.rs:1830:5:1831:13 | S | +| main.rs:1879:17:1879:18 | xs | | file://:0:0:0:0 | [] | +| main.rs:1879:17:1879:18 | xs | | file://:0:0:0:0 | [] | +| main.rs:1879:17:1879:18 | xs | [T;...] | main.rs:1830:5:1831:13 | S | +| main.rs:1879:17:1879:18 | xs | [T] | main.rs:1830:5:1831:13 | S | +| main.rs:1879:17:1879:21 | xs[0] | | main.rs:1830:5:1831:13 | S | +| main.rs:1879:17:1879:27 | ... .foo() | | main.rs:1830:5:1831:13 | S | +| main.rs:1879:20:1879:20 | 0 | | {EXTERNAL LOCATION} | i32 | +| main.rs:1881:23:1881:25 | &xs | | file://:0:0:0:0 | & | +| main.rs:1881:23:1881:25 | &xs | &T | file://:0:0:0:0 | [] | +| main.rs:1881:23:1881:25 | &xs | &T | file://:0:0:0:0 | [] | +| main.rs:1881:23:1881:25 | &xs | &T.[T;...] | main.rs:1830:5:1831:13 | S | +| main.rs:1881:23:1881:25 | &xs | &T.[T] | main.rs:1830:5:1831:13 | S | +| main.rs:1881:24:1881:25 | xs | | file://:0:0:0:0 | [] | +| main.rs:1881:24:1881:25 | xs | | file://:0:0:0:0 | [] | +| main.rs:1881:24:1881:25 | xs | [T;...] | main.rs:1830:5:1831:13 | S | +| main.rs:1881:24:1881:25 | xs | [T] | main.rs:1830:5:1831:13 | S | +| main.rs:1887:25:1887:35 | "Hello, {}" | | {EXTERNAL LOCATION} | str | +| main.rs:1887:25:1887:45 | ...::format(...) | | {EXTERNAL LOCATION} | String | +| main.rs:1887:25:1887:45 | { ... } | | {EXTERNAL LOCATION} | String | +| main.rs:1887:38:1887:45 | "World!" | | {EXTERNAL LOCATION} | str | +| main.rs:1893:19:1893:23 | SelfParam | | file://:0:0:0:0 | & | +| main.rs:1893:19:1893:23 | SelfParam | &T | main.rs:1892:5:1894:5 | Self [trait MyAdd] | +| main.rs:1893:26:1893:30 | value | | main.rs:1892:17:1892:17 | T | +| main.rs:1898:19:1898:23 | SelfParam | | file://:0:0:0:0 | & | +| main.rs:1898:19:1898:23 | SelfParam | &T | {EXTERNAL LOCATION} | i64 | +| main.rs:1898:26:1898:30 | value | | {EXTERNAL LOCATION} | i64 | +| main.rs:1898:46:1900:9 | { ... } | | {EXTERNAL LOCATION} | i64 | +| main.rs:1899:13:1899:17 | value | | {EXTERNAL LOCATION} | i64 | +| main.rs:1905:19:1905:23 | SelfParam | | file://:0:0:0:0 | & | +| main.rs:1905:19:1905:23 | SelfParam | &T | {EXTERNAL LOCATION} | i64 | +| main.rs:1905:26:1905:30 | value | | file://:0:0:0:0 | & | +| main.rs:1905:26:1905:30 | value | &T | {EXTERNAL LOCATION} | i64 | +| main.rs:1905:47:1907:9 | { ... } | | {EXTERNAL LOCATION} | i64 | +| main.rs:1906:13:1906:18 | * ... | | {EXTERNAL LOCATION} | i64 | +| main.rs:1906:14:1906:18 | value | | file://:0:0:0:0 | & | +| main.rs:1906:14:1906:18 | value | &T | {EXTERNAL LOCATION} | i64 | +| main.rs:1912:19:1912:23 | SelfParam | | file://:0:0:0:0 | & | +| main.rs:1912:19:1912:23 | SelfParam | &T | {EXTERNAL LOCATION} | i64 | +| main.rs:1912:26:1912:30 | value | | {EXTERNAL LOCATION} | bool | +| main.rs:1912:47:1914:9 | { ... } | | {EXTERNAL LOCATION} | i32 | +| main.rs:1912:47:1914:9 | { ... } | | {EXTERNAL LOCATION} | i64 | +| main.rs:1913:13:1913:37 | if value {...} else {...} | | {EXTERNAL LOCATION} | i32 | +| main.rs:1913:13:1913:37 | if value {...} else {...} | | {EXTERNAL LOCATION} | i64 | +| main.rs:1913:16:1913:20 | value | | {EXTERNAL LOCATION} | bool | +| main.rs:1913:22:1913:26 | { ... } | | {EXTERNAL LOCATION} | i32 | +| main.rs:1913:22:1913:26 | { ... } | | {EXTERNAL LOCATION} | i64 | +| main.rs:1913:24:1913:24 | 1 | | {EXTERNAL LOCATION} | i32 | +| main.rs:1913:24:1913:24 | 1 | | {EXTERNAL LOCATION} | i64 | +| main.rs:1913:33:1913:37 | { ... } | | {EXTERNAL LOCATION} | i32 | +| main.rs:1913:33:1913:37 | { ... } | | {EXTERNAL LOCATION} | i64 | +| main.rs:1913:35:1913:35 | 0 | | {EXTERNAL LOCATION} | i32 | +| main.rs:1913:35:1913:35 | 0 | | {EXTERNAL LOCATION} | i64 | +| main.rs:1918:13:1918:13 | x | | {EXTERNAL LOCATION} | i32 | +| main.rs:1918:13:1918:13 | x | | {EXTERNAL LOCATION} | i64 | +| main.rs:1918:22:1918:23 | 73 | | {EXTERNAL LOCATION} | i32 | +| main.rs:1918:22:1918:23 | 73 | | {EXTERNAL LOCATION} | i64 | | main.rs:1919:9:1919:9 | x | | {EXTERNAL LOCATION} | i32 | | main.rs:1919:9:1919:9 | x | | {EXTERNAL LOCATION} | i64 | | main.rs:1919:9:1919:22 | x.my_add(...) | | {EXTERNAL LOCATION} | i64 | -| main.rs:1919:18:1919:21 | true | | {EXTERNAL LOCATION} | bool | -| main.rs:1927:5:1927:20 | ...::f(...) | | main.rs:72:5:72:21 | Foo | -| main.rs:1928:5:1928:60 | ...::g(...) | | main.rs:72:5:72:21 | Foo | -| main.rs:1928:20:1928:38 | ...::Foo {...} | | main.rs:72:5:72:21 | Foo | -| main.rs:1928:41:1928:59 | ...::Foo {...} | | main.rs:72:5:72:21 | Foo | -| main.rs:1944:5:1944:15 | ...::f(...) | | {EXTERNAL LOCATION} | trait Future | +| main.rs:1919:18:1919:21 | 5i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:1920:9:1920:9 | x | | {EXTERNAL LOCATION} | i32 | +| main.rs:1920:9:1920:9 | x | | {EXTERNAL LOCATION} | i64 | +| main.rs:1920:9:1920:23 | x.my_add(...) | | {EXTERNAL LOCATION} | i64 | +| main.rs:1920:18:1920:22 | &5i64 | | file://:0:0:0:0 | & | +| main.rs:1920:18:1920:22 | &5i64 | &T | {EXTERNAL LOCATION} | i64 | +| main.rs:1920:19:1920:22 | 5i64 | | {EXTERNAL LOCATION} | i64 | +| main.rs:1921:9:1921:9 | x | | {EXTERNAL LOCATION} | i32 | +| main.rs:1921:9:1921:9 | x | | {EXTERNAL LOCATION} | i64 | +| main.rs:1921:9:1921:22 | x.my_add(...) | | {EXTERNAL LOCATION} | i64 | +| main.rs:1921:18:1921:21 | true | | {EXTERNAL LOCATION} | bool | +| main.rs:1929:26:1931:9 | { ... } | | main.rs:1926:5:1926:24 | MyCallable | +| main.rs:1930:13:1930:25 | MyCallable {...} | | main.rs:1926:5:1926:24 | MyCallable | +| main.rs:1933:17:1933:21 | SelfParam | | file://:0:0:0:0 | & | +| main.rs:1933:17:1933:21 | SelfParam | &T | main.rs:1926:5:1926:24 | MyCallable | +| main.rs:1933:31:1935:9 | { ... } | | {EXTERNAL LOCATION} | i32 | +| main.rs:1933:31:1935:9 | { ... } | | {EXTERNAL LOCATION} | i64 | +| main.rs:1934:13:1934:13 | 1 | | {EXTERNAL LOCATION} | i32 | +| main.rs:1934:13:1934:13 | 1 | | {EXTERNAL LOCATION} | i64 | +| main.rs:1941:13:1941:13 | i | | {EXTERNAL LOCATION} | i32 | +| main.rs:1941:18:1941:26 | [...] | | file://:0:0:0:0 | [] | +| main.rs:1941:18:1941:26 | [...] | [T;...] | {EXTERNAL LOCATION} | i32 | +| main.rs:1941:19:1941:19 | 1 | | {EXTERNAL LOCATION} | i32 | +| main.rs:1941:22:1941:22 | 2 | | {EXTERNAL LOCATION} | i32 | +| main.rs:1941:25:1941:25 | 3 | | {EXTERNAL LOCATION} | i32 | +| main.rs:1942:18:1942:26 | [...] | | file://:0:0:0:0 | [] | +| main.rs:1942:18:1942:26 | [...] | [T;...] | {EXTERNAL LOCATION} | i32 | +| main.rs:1942:18:1942:41 | ... .map(...) | | file://:0:0:0:0 | [] | +| main.rs:1942:19:1942:19 | 1 | | {EXTERNAL LOCATION} | i32 | +| main.rs:1942:22:1942:22 | 2 | | {EXTERNAL LOCATION} | i32 | +| main.rs:1942:25:1942:25 | 3 | | {EXTERNAL LOCATION} | i32 | +| main.rs:1942:40:1942:40 | 1 | | {EXTERNAL LOCATION} | i32 | +| main.rs:1943:18:1943:26 | [...] | | file://:0:0:0:0 | [] | +| main.rs:1943:18:1943:26 | [...] | [T;...] | {EXTERNAL LOCATION} | i32 | +| main.rs:1943:19:1943:19 | 1 | | {EXTERNAL LOCATION} | i32 | +| main.rs:1943:22:1943:22 | 2 | | {EXTERNAL LOCATION} | i32 | +| main.rs:1943:25:1943:25 | 3 | | {EXTERNAL LOCATION} | i32 | +| main.rs:1945:13:1945:17 | vals1 | | file://:0:0:0:0 | [] | +| main.rs:1945:13:1945:17 | vals1 | [T;...] | {EXTERNAL LOCATION} | i32 | +| main.rs:1945:13:1945:17 | vals1 | [T;...] | {EXTERNAL LOCATION} | u8 | +| main.rs:1945:21:1945:31 | [...] | | file://:0:0:0:0 | [] | +| main.rs:1945:21:1945:31 | [...] | [T;...] | {EXTERNAL LOCATION} | i32 | +| main.rs:1945:21:1945:31 | [...] | [T;...] | {EXTERNAL LOCATION} | u8 | +| main.rs:1945:22:1945:24 | 1u8 | | {EXTERNAL LOCATION} | i32 | +| main.rs:1945:22:1945:24 | 1u8 | | {EXTERNAL LOCATION} | u8 | +| main.rs:1945:27:1945:27 | 2 | | {EXTERNAL LOCATION} | i32 | +| main.rs:1945:27:1945:27 | 2 | | {EXTERNAL LOCATION} | u8 | +| main.rs:1945:30:1945:30 | 3 | | {EXTERNAL LOCATION} | i32 | +| main.rs:1945:30:1945:30 | 3 | | {EXTERNAL LOCATION} | u8 | +| main.rs:1946:13:1946:13 | u | | {EXTERNAL LOCATION} | i32 | +| main.rs:1946:13:1946:13 | u | | {EXTERNAL LOCATION} | u8 | +| main.rs:1946:18:1946:22 | vals1 | | file://:0:0:0:0 | [] | +| main.rs:1946:18:1946:22 | vals1 | [T;...] | {EXTERNAL LOCATION} | i32 | +| main.rs:1946:18:1946:22 | vals1 | [T;...] | {EXTERNAL LOCATION} | u8 | +| main.rs:1948:13:1948:17 | vals2 | | file://:0:0:0:0 | [] | +| main.rs:1948:13:1948:17 | vals2 | [T;...] | {EXTERNAL LOCATION} | u16 | +| main.rs:1948:21:1948:29 | [1u16; 3] | | file://:0:0:0:0 | [] | +| main.rs:1948:21:1948:29 | [1u16; 3] | [T;...] | {EXTERNAL LOCATION} | u16 | +| main.rs:1948:22:1948:25 | 1u16 | | {EXTERNAL LOCATION} | u16 | +| main.rs:1948:28:1948:28 | 3 | | {EXTERNAL LOCATION} | i32 | +| main.rs:1949:13:1949:13 | u | | {EXTERNAL LOCATION} | u16 | +| main.rs:1949:18:1949:22 | vals2 | | file://:0:0:0:0 | [] | +| main.rs:1949:18:1949:22 | vals2 | [T;...] | {EXTERNAL LOCATION} | u16 | +| main.rs:1951:13:1951:17 | vals3 | | file://:0:0:0:0 | [] | +| main.rs:1951:13:1951:17 | vals3 | [T;...] | {EXTERNAL LOCATION} | i32 | +| main.rs:1951:13:1951:17 | vals3 | [T;...] | {EXTERNAL LOCATION} | u32 | +| main.rs:1951:26:1951:26 | 3 | | {EXTERNAL LOCATION} | i32 | +| main.rs:1951:31:1951:39 | [...] | | file://:0:0:0:0 | [] | +| main.rs:1951:31:1951:39 | [...] | [T;...] | {EXTERNAL LOCATION} | i32 | +| main.rs:1951:31:1951:39 | [...] | [T;...] | {EXTERNAL LOCATION} | u32 | +| main.rs:1951:32:1951:32 | 1 | | {EXTERNAL LOCATION} | i32 | +| main.rs:1951:32:1951:32 | 1 | | {EXTERNAL LOCATION} | u32 | +| main.rs:1951:35:1951:35 | 2 | | {EXTERNAL LOCATION} | i32 | +| main.rs:1951:35:1951:35 | 2 | | {EXTERNAL LOCATION} | u32 | +| main.rs:1951:38:1951:38 | 3 | | {EXTERNAL LOCATION} | i32 | +| main.rs:1951:38:1951:38 | 3 | | {EXTERNAL LOCATION} | u32 | +| main.rs:1952:13:1952:13 | u | | {EXTERNAL LOCATION} | i32 | +| main.rs:1952:13:1952:13 | u | | {EXTERNAL LOCATION} | u32 | +| main.rs:1952:18:1952:22 | vals3 | | file://:0:0:0:0 | [] | +| main.rs:1952:18:1952:22 | vals3 | [T;...] | {EXTERNAL LOCATION} | i32 | +| main.rs:1952:18:1952:22 | vals3 | [T;...] | {EXTERNAL LOCATION} | u32 | +| main.rs:1954:13:1954:17 | vals4 | | file://:0:0:0:0 | [] | +| main.rs:1954:13:1954:17 | vals4 | [T;...] | {EXTERNAL LOCATION} | i32 | +| main.rs:1954:13:1954:17 | vals4 | [T;...] | {EXTERNAL LOCATION} | u64 | +| main.rs:1954:26:1954:26 | 3 | | {EXTERNAL LOCATION} | i32 | +| main.rs:1954:31:1954:36 | [1; 3] | | file://:0:0:0:0 | [] | +| main.rs:1954:31:1954:36 | [1; 3] | [T;...] | {EXTERNAL LOCATION} | i32 | +| main.rs:1954:31:1954:36 | [1; 3] | [T;...] | {EXTERNAL LOCATION} | u64 | +| main.rs:1954:32:1954:32 | 1 | | {EXTERNAL LOCATION} | i32 | +| main.rs:1954:32:1954:32 | 1 | | {EXTERNAL LOCATION} | u64 | +| main.rs:1954:35:1954:35 | 3 | | {EXTERNAL LOCATION} | i32 | +| main.rs:1955:13:1955:13 | u | | {EXTERNAL LOCATION} | i32 | +| main.rs:1955:13:1955:13 | u | | {EXTERNAL LOCATION} | u64 | +| main.rs:1955:18:1955:22 | vals4 | | file://:0:0:0:0 | [] | +| main.rs:1955:18:1955:22 | vals4 | [T;...] | {EXTERNAL LOCATION} | i32 | +| main.rs:1955:18:1955:22 | vals4 | [T;...] | {EXTERNAL LOCATION} | u64 | +| main.rs:1957:13:1957:24 | mut strings1 | | file://:0:0:0:0 | [] | +| main.rs:1957:13:1957:24 | mut strings1 | [T;...] | {EXTERNAL LOCATION} | str | +| main.rs:1957:28:1957:48 | [...] | | file://:0:0:0:0 | [] | +| main.rs:1957:28:1957:48 | [...] | [T;...] | {EXTERNAL LOCATION} | str | +| main.rs:1957:29:1957:33 | "foo" | | {EXTERNAL LOCATION} | str | +| main.rs:1957:36:1957:40 | "bar" | | {EXTERNAL LOCATION} | str | +| main.rs:1957:43:1957:47 | "baz" | | {EXTERNAL LOCATION} | str | +| main.rs:1958:18:1958:26 | &strings1 | | file://:0:0:0:0 | & | +| main.rs:1958:18:1958:26 | &strings1 | &T | file://:0:0:0:0 | [] | +| main.rs:1958:18:1958:26 | &strings1 | &T.[T;...] | {EXTERNAL LOCATION} | str | +| main.rs:1958:19:1958:26 | strings1 | | file://:0:0:0:0 | [] | +| main.rs:1958:19:1958:26 | strings1 | [T;...] | {EXTERNAL LOCATION} | str | +| main.rs:1959:18:1959:30 | &mut strings1 | | file://:0:0:0:0 | & | +| main.rs:1959:18:1959:30 | &mut strings1 | &T | file://:0:0:0:0 | [] | +| main.rs:1959:18:1959:30 | &mut strings1 | &T.[T;...] | {EXTERNAL LOCATION} | str | +| main.rs:1959:23:1959:30 | strings1 | | file://:0:0:0:0 | [] | +| main.rs:1959:23:1959:30 | strings1 | [T;...] | {EXTERNAL LOCATION} | str | +| main.rs:1960:13:1960:13 | s | | {EXTERNAL LOCATION} | str | +| main.rs:1960:18:1960:25 | strings1 | | file://:0:0:0:0 | [] | +| main.rs:1960:18:1960:25 | strings1 | [T;...] | {EXTERNAL LOCATION} | str | +| main.rs:1962:13:1962:20 | strings2 | | file://:0:0:0:0 | [] | +| main.rs:1962:13:1962:20 | strings2 | [T;...] | {EXTERNAL LOCATION} | String | +| main.rs:1962:24:1966:9 | [...] | | file://:0:0:0:0 | [] | +| main.rs:1962:24:1966:9 | [...] | [T;...] | {EXTERNAL LOCATION} | String | +| main.rs:1963:13:1963:31 | ...::from(...) | | {EXTERNAL LOCATION} | String | +| main.rs:1963:26:1963:30 | "foo" | | {EXTERNAL LOCATION} | str | +| main.rs:1964:13:1964:31 | ...::from(...) | | {EXTERNAL LOCATION} | String | +| main.rs:1964:26:1964:30 | "bar" | | {EXTERNAL LOCATION} | str | +| main.rs:1965:13:1965:31 | ...::from(...) | | {EXTERNAL LOCATION} | String | +| main.rs:1965:26:1965:30 | "baz" | | {EXTERNAL LOCATION} | str | +| main.rs:1967:13:1967:13 | s | | {EXTERNAL LOCATION} | String | +| main.rs:1967:18:1967:25 | strings2 | | file://:0:0:0:0 | [] | +| main.rs:1967:18:1967:25 | strings2 | [T;...] | {EXTERNAL LOCATION} | String | +| main.rs:1969:13:1969:20 | strings3 | | file://:0:0:0:0 | & | +| main.rs:1969:13:1969:20 | strings3 | &T | file://:0:0:0:0 | [] | +| main.rs:1969:13:1969:20 | strings3 | &T.[T;...] | {EXTERNAL LOCATION} | String | +| main.rs:1969:24:1973:9 | &... | | file://:0:0:0:0 | & | +| main.rs:1969:24:1973:9 | &... | &T | file://:0:0:0:0 | [] | +| main.rs:1969:24:1973:9 | &... | &T.[T;...] | {EXTERNAL LOCATION} | String | +| main.rs:1969:25:1973:9 | [...] | | file://:0:0:0:0 | [] | +| main.rs:1969:25:1973:9 | [...] | [T;...] | {EXTERNAL LOCATION} | String | +| main.rs:1970:13:1970:31 | ...::from(...) | | {EXTERNAL LOCATION} | String | +| main.rs:1970:26:1970:30 | "foo" | | {EXTERNAL LOCATION} | str | +| main.rs:1971:13:1971:31 | ...::from(...) | | {EXTERNAL LOCATION} | String | +| main.rs:1971:26:1971:30 | "bar" | | {EXTERNAL LOCATION} | str | +| main.rs:1972:13:1972:31 | ...::from(...) | | {EXTERNAL LOCATION} | String | +| main.rs:1972:26:1972:30 | "baz" | | {EXTERNAL LOCATION} | str | +| main.rs:1974:18:1974:25 | strings3 | | file://:0:0:0:0 | & | +| main.rs:1974:18:1974:25 | strings3 | &T | file://:0:0:0:0 | [] | +| main.rs:1974:18:1974:25 | strings3 | &T.[T;...] | {EXTERNAL LOCATION} | String | +| main.rs:1976:13:1976:21 | callables | | file://:0:0:0:0 | [] | +| main.rs:1976:13:1976:21 | callables | [T;...] | main.rs:1926:5:1926:24 | MyCallable | +| main.rs:1976:25:1976:81 | [...] | | file://:0:0:0:0 | [] | +| main.rs:1976:25:1976:81 | [...] | [T;...] | main.rs:1926:5:1926:24 | MyCallable | +| main.rs:1976:26:1976:42 | ...::new(...) | | main.rs:1926:5:1926:24 | MyCallable | +| main.rs:1976:45:1976:61 | ...::new(...) | | main.rs:1926:5:1926:24 | MyCallable | +| main.rs:1976:64:1976:80 | ...::new(...) | | main.rs:1926:5:1926:24 | MyCallable | +| main.rs:1977:13:1977:13 | c | | main.rs:1926:5:1926:24 | MyCallable | +| main.rs:1977:18:1977:26 | callables | | file://:0:0:0:0 | [] | +| main.rs:1977:18:1977:26 | callables | [T;...] | main.rs:1926:5:1926:24 | MyCallable | +| main.rs:1979:17:1979:22 | result | | {EXTERNAL LOCATION} | i64 | +| main.rs:1979:26:1979:26 | c | | main.rs:1926:5:1926:24 | MyCallable | +| main.rs:1979:26:1979:33 | c.call() | | {EXTERNAL LOCATION} | i64 | +| main.rs:1984:18:1984:18 | 0 | | {EXTERNAL LOCATION} | i32 | +| main.rs:1984:21:1984:22 | 10 | | {EXTERNAL LOCATION} | i32 | +| main.rs:1985:18:1985:26 | [...] | | file://:0:0:0:0 | [] | +| main.rs:1985:19:1985:21 | 0u8 | | {EXTERNAL LOCATION} | u8 | +| main.rs:1985:24:1985:25 | 10 | | {EXTERNAL LOCATION} | i32 | +| main.rs:1986:21:1986:21 | 0 | | {EXTERNAL LOCATION} | i32 | +| main.rs:1986:24:1986:25 | 10 | | {EXTERNAL LOCATION} | i32 | +| main.rs:1989:13:1989:18 | range1 | | {EXTERNAL LOCATION} | Range | +| main.rs:1989:13:1989:18 | range1 | Idx | {EXTERNAL LOCATION} | u16 | +| main.rs:1989:22:1992:9 | ...::Range {...} | | {EXTERNAL LOCATION} | Range | +| main.rs:1989:22:1992:9 | ...::Range {...} | Idx | {EXTERNAL LOCATION} | u16 | +| main.rs:1990:20:1990:23 | 0u16 | | {EXTERNAL LOCATION} | u16 | +| main.rs:1991:18:1991:22 | 10u16 | | {EXTERNAL LOCATION} | u16 | +| main.rs:1993:18:1993:23 | range1 | | {EXTERNAL LOCATION} | Range | +| main.rs:1993:18:1993:23 | range1 | Idx | {EXTERNAL LOCATION} | u16 | +| main.rs:1997:26:1997:26 | 1 | | {EXTERNAL LOCATION} | i32 | +| main.rs:1997:29:1997:29 | 2 | | {EXTERNAL LOCATION} | i32 | +| main.rs:1997:32:1997:32 | 3 | | {EXTERNAL LOCATION} | i32 | +| main.rs:2000:13:2000:18 | vals4a | | {EXTERNAL LOCATION} | Vec | +| main.rs:2000:13:2000:18 | vals4a | A | {EXTERNAL LOCATION} | Global | +| main.rs:2000:13:2000:18 | vals4a | T | {EXTERNAL LOCATION} | u16 | +| main.rs:2000:32:2000:43 | [...] | | file://:0:0:0:0 | [] | +| main.rs:2000:32:2000:43 | [...] | [T;...] | {EXTERNAL LOCATION} | i32 | +| main.rs:2000:32:2000:43 | [...] | [T;...] | {EXTERNAL LOCATION} | u16 | +| main.rs:2000:32:2000:52 | ... .to_vec() | | {EXTERNAL LOCATION} | Vec | +| main.rs:2000:32:2000:52 | ... .to_vec() | A | {EXTERNAL LOCATION} | Global | +| main.rs:2000:32:2000:52 | ... .to_vec() | T | {EXTERNAL LOCATION} | u16 | +| main.rs:2000:33:2000:36 | 1u16 | | {EXTERNAL LOCATION} | i32 | +| main.rs:2000:33:2000:36 | 1u16 | | {EXTERNAL LOCATION} | u16 | +| main.rs:2000:39:2000:39 | 2 | | {EXTERNAL LOCATION} | i32 | +| main.rs:2000:39:2000:39 | 2 | | {EXTERNAL LOCATION} | u16 | +| main.rs:2000:42:2000:42 | 3 | | {EXTERNAL LOCATION} | i32 | +| main.rs:2000:42:2000:42 | 3 | | {EXTERNAL LOCATION} | u16 | +| main.rs:2001:13:2001:13 | u | | {EXTERNAL LOCATION} | u16 | +| main.rs:2001:18:2001:23 | vals4a | | {EXTERNAL LOCATION} | Vec | +| main.rs:2001:18:2001:23 | vals4a | A | {EXTERNAL LOCATION} | Global | +| main.rs:2001:18:2001:23 | vals4a | T | {EXTERNAL LOCATION} | u16 | +| main.rs:2003:22:2003:33 | [...] | | file://:0:0:0:0 | [] | +| main.rs:2003:22:2003:33 | [...] | [T;...] | {EXTERNAL LOCATION} | i32 | +| main.rs:2003:22:2003:33 | [...] | [T;...] | {EXTERNAL LOCATION} | u16 | +| main.rs:2003:23:2003:26 | 1u16 | | {EXTERNAL LOCATION} | i32 | +| main.rs:2003:23:2003:26 | 1u16 | | {EXTERNAL LOCATION} | u16 | +| main.rs:2003:29:2003:29 | 2 | | {EXTERNAL LOCATION} | i32 | +| main.rs:2003:29:2003:29 | 2 | | {EXTERNAL LOCATION} | u16 | +| main.rs:2003:32:2003:32 | 3 | | {EXTERNAL LOCATION} | i32 | +| main.rs:2003:32:2003:32 | 3 | | {EXTERNAL LOCATION} | u16 | +| main.rs:2006:13:2006:17 | vals5 | | {EXTERNAL LOCATION} | Vec | +| main.rs:2006:13:2006:17 | vals5 | A | {EXTERNAL LOCATION} | Global | +| main.rs:2006:13:2006:17 | vals5 | T | {EXTERNAL LOCATION} | u8 | +| main.rs:2006:21:2006:43 | ...::from(...) | | {EXTERNAL LOCATION} | Vec | +| main.rs:2006:21:2006:43 | ...::from(...) | A | {EXTERNAL LOCATION} | Global | +| main.rs:2006:21:2006:43 | ...::from(...) | T | {EXTERNAL LOCATION} | u8 | +| main.rs:2006:31:2006:42 | [...] | | file://:0:0:0:0 | [] | +| main.rs:2006:31:2006:42 | [...] | [T;...] | {EXTERNAL LOCATION} | i32 | +| main.rs:2006:31:2006:42 | [...] | [T;...] | {EXTERNAL LOCATION} | u32 | +| main.rs:2006:32:2006:35 | 1u32 | | {EXTERNAL LOCATION} | i32 | +| main.rs:2006:32:2006:35 | 1u32 | | {EXTERNAL LOCATION} | u32 | +| main.rs:2006:38:2006:38 | 2 | | {EXTERNAL LOCATION} | i32 | +| main.rs:2006:38:2006:38 | 2 | | {EXTERNAL LOCATION} | u32 | +| main.rs:2006:41:2006:41 | 3 | | {EXTERNAL LOCATION} | i32 | +| main.rs:2006:41:2006:41 | 3 | | {EXTERNAL LOCATION} | u32 | +| main.rs:2007:13:2007:13 | u | | {EXTERNAL LOCATION} | u8 | +| main.rs:2007:18:2007:22 | vals5 | | {EXTERNAL LOCATION} | Vec | +| main.rs:2007:18:2007:22 | vals5 | A | {EXTERNAL LOCATION} | Global | +| main.rs:2007:18:2007:22 | vals5 | T | {EXTERNAL LOCATION} | u8 | +| main.rs:2009:13:2009:17 | vals6 | | {EXTERNAL LOCATION} | Vec | +| main.rs:2009:13:2009:17 | vals6 | A | {EXTERNAL LOCATION} | Global | +| main.rs:2009:13:2009:17 | vals6 | T | file://:0:0:0:0 | & | +| main.rs:2009:13:2009:17 | vals6 | T.&T | {EXTERNAL LOCATION} | u64 | +| main.rs:2009:32:2009:43 | [...] | | file://:0:0:0:0 | [] | +| main.rs:2009:32:2009:43 | [...] | [T;...] | {EXTERNAL LOCATION} | i32 | +| main.rs:2009:32:2009:43 | [...] | [T;...] | {EXTERNAL LOCATION} | u64 | +| main.rs:2009:32:2009:60 | ... .collect() | | {EXTERNAL LOCATION} | Vec | +| main.rs:2009:32:2009:60 | ... .collect() | A | {EXTERNAL LOCATION} | Global | +| main.rs:2009:32:2009:60 | ... .collect() | T | file://:0:0:0:0 | & | +| main.rs:2009:32:2009:60 | ... .collect() | T.&T | {EXTERNAL LOCATION} | u64 | +| main.rs:2009:33:2009:36 | 1u64 | | {EXTERNAL LOCATION} | i32 | +| main.rs:2009:33:2009:36 | 1u64 | | {EXTERNAL LOCATION} | u64 | +| main.rs:2009:39:2009:39 | 2 | | {EXTERNAL LOCATION} | i32 | +| main.rs:2009:39:2009:39 | 2 | | {EXTERNAL LOCATION} | u64 | +| main.rs:2009:42:2009:42 | 3 | | {EXTERNAL LOCATION} | i32 | +| main.rs:2009:42:2009:42 | 3 | | {EXTERNAL LOCATION} | u64 | +| main.rs:2010:13:2010:13 | u | | file://:0:0:0:0 | & | +| main.rs:2010:13:2010:13 | u | &T | {EXTERNAL LOCATION} | u64 | +| main.rs:2010:18:2010:22 | vals6 | | {EXTERNAL LOCATION} | Vec | +| main.rs:2010:18:2010:22 | vals6 | A | {EXTERNAL LOCATION} | Global | +| main.rs:2010:18:2010:22 | vals6 | T | file://:0:0:0:0 | & | +| main.rs:2010:18:2010:22 | vals6 | T.&T | {EXTERNAL LOCATION} | u64 | +| main.rs:2012:13:2012:21 | mut vals7 | | {EXTERNAL LOCATION} | Vec | +| main.rs:2012:13:2012:21 | mut vals7 | A | {EXTERNAL LOCATION} | Global | +| main.rs:2012:25:2012:34 | ...::new(...) | | {EXTERNAL LOCATION} | Vec | +| main.rs:2012:25:2012:34 | ...::new(...) | A | {EXTERNAL LOCATION} | Global | +| main.rs:2013:9:2013:13 | vals7 | | {EXTERNAL LOCATION} | Vec | +| main.rs:2013:9:2013:13 | vals7 | A | {EXTERNAL LOCATION} | Global | +| main.rs:2013:20:2013:22 | 1u8 | | {EXTERNAL LOCATION} | u8 | +| main.rs:2014:18:2014:22 | vals7 | | {EXTERNAL LOCATION} | Vec | +| main.rs:2014:18:2014:22 | vals7 | A | {EXTERNAL LOCATION} | Global | +| main.rs:2016:33:2016:33 | 1 | | {EXTERNAL LOCATION} | i32 | +| main.rs:2016:36:2016:36 | 2 | | {EXTERNAL LOCATION} | i32 | +| main.rs:2016:45:2016:45 | 3 | | {EXTERNAL LOCATION} | i32 | +| main.rs:2016:48:2016:48 | 4 | | {EXTERNAL LOCATION} | i32 | +| main.rs:2023:13:2023:20 | mut map1 | | {EXTERNAL LOCATION} | HashMap | +| main.rs:2023:13:2023:20 | mut map1 | S | {EXTERNAL LOCATION} | RandomState | +| main.rs:2023:24:2023:55 | ...::new(...) | | {EXTERNAL LOCATION} | HashMap | +| main.rs:2023:24:2023:55 | ...::new(...) | S | {EXTERNAL LOCATION} | RandomState | +| main.rs:2024:9:2024:12 | map1 | | {EXTERNAL LOCATION} | HashMap | +| main.rs:2024:9:2024:12 | map1 | S | {EXTERNAL LOCATION} | RandomState | +| main.rs:2024:9:2024:39 | map1.insert(...) | | {EXTERNAL LOCATION} | Option | +| main.rs:2024:21:2024:21 | 1 | | {EXTERNAL LOCATION} | i32 | +| main.rs:2024:24:2024:38 | ...::new(...) | | {EXTERNAL LOCATION} | Box | +| main.rs:2024:24:2024:38 | ...::new(...) | A | {EXTERNAL LOCATION} | Global | +| main.rs:2024:33:2024:37 | "one" | | {EXTERNAL LOCATION} | str | +| main.rs:2025:9:2025:12 | map1 | | {EXTERNAL LOCATION} | HashMap | +| main.rs:2025:9:2025:12 | map1 | S | {EXTERNAL LOCATION} | RandomState | +| main.rs:2025:9:2025:39 | map1.insert(...) | | {EXTERNAL LOCATION} | Option | +| main.rs:2025:21:2025:21 | 2 | | {EXTERNAL LOCATION} | i32 | +| main.rs:2025:24:2025:38 | ...::new(...) | | {EXTERNAL LOCATION} | Box | +| main.rs:2025:24:2025:38 | ...::new(...) | A | {EXTERNAL LOCATION} | Global | +| main.rs:2025:33:2025:37 | "two" | | {EXTERNAL LOCATION} | str | +| main.rs:2026:20:2026:23 | map1 | | {EXTERNAL LOCATION} | HashMap | +| main.rs:2026:20:2026:23 | map1 | S | {EXTERNAL LOCATION} | RandomState | +| main.rs:2026:20:2026:30 | map1.keys() | | {EXTERNAL LOCATION} | Keys | +| main.rs:2027:22:2027:25 | map1 | | {EXTERNAL LOCATION} | HashMap | +| main.rs:2027:22:2027:25 | map1 | S | {EXTERNAL LOCATION} | RandomState | +| main.rs:2027:22:2027:34 | map1.values() | | {EXTERNAL LOCATION} | Values | +| main.rs:2028:29:2028:32 | map1 | | {EXTERNAL LOCATION} | HashMap | +| main.rs:2028:29:2028:32 | map1 | S | {EXTERNAL LOCATION} | RandomState | +| main.rs:2028:29:2028:39 | map1.iter() | | {EXTERNAL LOCATION} | Iter | +| main.rs:2029:29:2029:33 | &map1 | | file://:0:0:0:0 | & | +| main.rs:2029:29:2029:33 | &map1 | &T | {EXTERNAL LOCATION} | HashMap | +| main.rs:2029:29:2029:33 | &map1 | &T.S | {EXTERNAL LOCATION} | RandomState | +| main.rs:2029:30:2029:33 | map1 | | {EXTERNAL LOCATION} | HashMap | +| main.rs:2029:30:2029:33 | map1 | S | {EXTERNAL LOCATION} | RandomState | +| main.rs:2033:13:2033:17 | mut a | | {EXTERNAL LOCATION} | i32 | +| main.rs:2033:13:2033:17 | mut a | | {EXTERNAL LOCATION} | i64 | +| main.rs:2033:26:2033:26 | 0 | | {EXTERNAL LOCATION} | i32 | +| main.rs:2033:26:2033:26 | 0 | | {EXTERNAL LOCATION} | i64 | +| main.rs:2034:15:2034:15 | a | | {EXTERNAL LOCATION} | i32 | +| main.rs:2034:15:2034:15 | a | | {EXTERNAL LOCATION} | i64 | +| main.rs:2034:15:2034:20 | ... < ... | | {EXTERNAL LOCATION} | bool | +| main.rs:2034:19:2034:20 | 10 | | {EXTERNAL LOCATION} | i32 | +| main.rs:2036:13:2036:13 | a | | {EXTERNAL LOCATION} | i32 | +| main.rs:2036:13:2036:13 | a | | {EXTERNAL LOCATION} | i64 | +| main.rs:2036:13:2036:18 | ... += ... | | file://:0:0:0:0 | () | +| main.rs:2036:18:2036:18 | 1 | | {EXTERNAL LOCATION} | i32 | +| main.rs:2045:5:2045:20 | ...::f(...) | | main.rs:72:5:72:21 | Foo | +| main.rs:2046:5:2046:60 | ...::g(...) | | main.rs:72:5:72:21 | Foo | +| main.rs:2046:20:2046:38 | ...::Foo {...} | | main.rs:72:5:72:21 | Foo | +| main.rs:2046:41:2046:59 | ...::Foo {...} | | main.rs:72:5:72:21 | Foo | +| main.rs:2062:5:2062:15 | ...::f(...) | | {EXTERNAL LOCATION} | trait Future | testFailures diff --git a/rust/ql/test/setup.sh b/rust/ql/test/setup.sh index f087e7bc32b..1d7feb284ed 100755 --- a/rust/ql/test/setup.sh +++ b/rust/ql/test/setup.sh @@ -5,14 +5,11 @@ set -euo pipefail # This script is run by the CI to set up the test environment for the Rust QL tests # We run this as rustup is not meant to be run in parallel, and will this setup will be run by rust-analyzer in the # parallel QL tests unless we do the setup prior to launching the tests. -# We do this for each `rust-toolchain.toml` we use in the tests (and the root one in `rust` last, so it becomes the -# default). +# no need to install rust-src explicitly, it's listed in both toolchains cd "$(dirname "$0")" - -find . -name rust-toolchain.toml \ - -execdir rustup install \; \ - -execdir rustup component add rust-src \; - -# no to install rust-src explicitly, it's listed in ql/rust/rust-toolchain.toml +pushd ../../extractor/src/nightly-toolchain +rustup install +popd +# this needs to be last to set the default toolchain rustup install diff --git a/shared/controlflow/CHANGELOG.md b/shared/controlflow/CHANGELOG.md index a9641b2d087..0109a7bd5a7 100644 --- a/shared/controlflow/CHANGELOG.md +++ b/shared/controlflow/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.0.10 + +No user-facing changes. + ## 2.0.9 No user-facing changes. diff --git a/shared/controlflow/change-notes/released/2.0.10.md b/shared/controlflow/change-notes/released/2.0.10.md new file mode 100644 index 00000000000..37310f107aa --- /dev/null +++ b/shared/controlflow/change-notes/released/2.0.10.md @@ -0,0 +1,3 @@ +## 2.0.10 + +No user-facing changes. diff --git a/shared/controlflow/codeql-pack.release.yml b/shared/controlflow/codeql-pack.release.yml index ce305265e33..96ea0220a69 100644 --- a/shared/controlflow/codeql-pack.release.yml +++ b/shared/controlflow/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 2.0.9 +lastReleaseVersion: 2.0.10 diff --git a/shared/controlflow/codeql/controlflow/Guards.qll b/shared/controlflow/codeql/controlflow/Guards.qll new file mode 100644 index 00000000000..887eef9021a --- /dev/null +++ b/shared/controlflow/codeql/controlflow/Guards.qll @@ -0,0 +1,1114 @@ +/** + * Provides classes and predicates for determining "guard-controls" + * relationships. + * + * In their most general form, these relate a guard expression, a value, and a + * basic block, and state that execution of the basic block implies that + * control flow must have passed through the guard in order to reach the basic + * block, and when it did, the guard evaluated to the given value. + * + * For example, in `if (x == 0) { A }`, the guard `x == 0` evaluating to `true` + * controls the basic block `A`, in this case because the true branch dominates + * `A`, but more elaborate controls-relationships may also hold. + * For example, in + * ```java + * int sz = a != null ? a.length : 0; + * if (sz != 0) { + * // this block is controlled by: + * // sz != 0 evaluating to true + * // sz evaluating to not 0 + * // a.length evaluating to not 0 + * // a != null evaluating to true + * // a evaluating to not null + * } + * ``` + * + * The provided predicates are separated into general "controls" predicates and + * "directly controls" predicates. The former use all possible implication + * logic as described above, whereas the latter only use control flow dominance + * of the corresponding conditional successor edges. + * + * In some cases, a guard may have a successor edge that can be relevant for + * controlling the input to an SSA phi node, but does not dominate the + * preceding block. To support this, the `hasBranchEdge` and + * `controlsBranchEdge` predicates are provided, where the former only uses the + * control flow graph similar to the `directlyControls` predicate, and the + * latter uses the full implication logic. + * + * All of these predicates are also available in the more general form that refers + * to `GuardValue`s instead of `boolean`s. + * + * The implementation is nested in two parameterized modules intended to + * facilitate multiple instantiations of the nested module with different + * precision levels. For example, more implications are available if the result + * of Range Analysis is available, but Range Analysis depends on Guards. This + * allows an initial instantiation of the `Logic` module without Range Analysis + * that can be used as input to Range Analysis, and a second instantiation + * using the result of Range Analysis to provide a final and more complete + * controls relation. + */ + +private import codeql.util.Boolean +private import codeql.util.Location + +signature module InputSig { + class SuccessorType { + /** Gets a textual representation of this successor type. */ + string toString(); + } + + class ExceptionSuccessor extends SuccessorType; + + class ConditionalSuccessor extends SuccessorType { + /** Gets the Boolean value of this successor. */ + boolean getValue(); + } + + class BooleanSuccessor extends ConditionalSuccessor; + + class NullnessSuccessor extends ConditionalSuccessor; + + /** A control flow node. */ + class ControlFlowNode { + /** Gets a textual representation of this control flow node. */ + string toString(); + + /** Gets the location of this control flow node. */ + Location getLocation(); + } + + /** + * A basic block, that is, a maximal straight-line sequence of control flow nodes + * without branches or joins. + */ + class BasicBlock { + /** Gets a textual representation of this basic block. */ + string toString(); + + /** Gets the `i`th node in this basic block. */ + ControlFlowNode getNode(int i); + + /** Gets the last control flow node in this basic block. */ + ControlFlowNode getLastNode(); + + /** Gets the length of this basic block. */ + int length(); + + /** Gets the location of this basic block. */ + Location getLocation(); + + BasicBlock getASuccessor(SuccessorType t); + + predicate dominates(BasicBlock bb); + + predicate strictlyDominates(BasicBlock bb); + } + + /** + * Holds if `bb1` has `bb2` as a direct successor and the edge between `bb1` + * and `bb2` is a dominating edge. + * + * An edge `(bb1, bb2)` is dominating if there exists a basic block that can + * only be reached from the entry block by going through `(bb1, bb2)`. This + * implies that `(bb1, bb2)` dominates its endpoint `bb2`. I.e., `bb2` can + * only be reached from the entry block by going via `(bb1, bb2)`. + * + * This is a necessary and sufficient condition for an edge to dominate some + * block, and therefore `dominatingEdge(bb1, bb2) and bb2.dominates(bb3)` + * means that the edge `(bb1, bb2)` dominates `bb3`. + */ + predicate dominatingEdge(BasicBlock bb1, BasicBlock bb2); + + class AstNode { + /** Gets a textual representation of this AST node. */ + string toString(); + + /** Gets the location of this AST node. */ + Location getLocation(); + } + + class Expr extends AstNode { + /** Gets the associated control flow node. */ + ControlFlowNode getControlFlowNode(); + + /** Gets the basic block containing this expression. */ + BasicBlock getBasicBlock(); + } + + class ConstantValue { + /** Gets a textual representation of this constant value. */ + string toString(); + } + + class ConstantExpr extends Expr { + predicate isNull(); + + boolean asBooleanValue(); + + int asIntegerValue(); + + ConstantValue asConstantValue(); + } + + class NonNullExpr extends Expr; + + class Case extends AstNode { + Expr getSwitchExpr(); + + predicate isDefaultCase(); + + ConstantExpr asConstantCase(); + + predicate matchEdge(BasicBlock bb1, BasicBlock bb2); + + predicate nonMatchEdge(BasicBlock bb1, BasicBlock bb2); + } + + class AndExpr extends Expr { + /** Gets an operand of this expression. */ + Expr getAnOperand(); + } + + class OrExpr extends Expr { + /** Gets an operand of this expression. */ + Expr getAnOperand(); + } + + class NotExpr extends Expr { + /** Gets the operand of this expression. */ + Expr getOperand(); + } + + /** + * An expression that has the same value as a specific sub-expression. + * + * For example, in Java, the assignment `x = rhs` has the same value as `rhs`. + */ + class IdExpr extends Expr { + Expr getEqualChildExpr(); + } + + /** + * Holds if `eqtest` is an equality or inequality test between `left` and + * `right`. The `polarity` indicates whether this is an equality test (true) + * or inequality test (false). + */ + predicate equalityTest(Expr eqtest, Expr left, Expr right, boolean polarity); + + class ConditionalExpr extends Expr { + /** Gets the condition of this expression. */ + Expr getCondition(); + + /** Gets the true branch of this expression. */ + Expr getThen(); + + /** Gets the false branch of this expression. */ + Expr getElse(); + } +} + +/** Provides guards-related predicates and classes. */ +module Make Input> { + private import Input + + private newtype TAbstractSingleValue = + TValueNull() or + TValueTrue() or + TValueInt(int i) { exists(ConstantExpr c | c.asIntegerValue() = i) or i = 0 } or + TValueConstant(ConstantValue c) { exists(ConstantExpr ce | ce.asConstantValue() = c) } + + private newtype TGuardValue = + TValue(TAbstractSingleValue val, Boolean isVal) or + TException(Boolean throws) + + private class AbstractSingleValue extends TAbstractSingleValue { + /** Gets a textual representation of this value. */ + string toString() { + result = "null" and this instanceof TValueNull + or + result = "true" and this instanceof TValueTrue + or + exists(int i | result = i.toString() and this = TValueInt(i)) + or + exists(ConstantValue c | result = c.toString() and this = TValueConstant(c)) + } + } + + /** An abstract value that a `Guard` may evaluate to. */ + class GuardValue extends TGuardValue { + /** + * Gets the dual value. Examples of dual values include: + * - null vs. not null + * - true vs. false + * - evaluating to a specific value vs. evaluating to any other value + * - throwing an exception vs. not throwing an exception + */ + GuardValue getDualValue() { + exists(AbstractSingleValue val, boolean isVal | + this = TValue(val, isVal) and + result = TValue(val, isVal.booleanNot()) + ) + or + exists(boolean throws | + this = TException(throws) and + result = TException(throws.booleanNot()) + ) + } + + /** Holds if this value represents `null`. */ + predicate isNullValue() { this.isNullness(true) } + + /** Holds if this value represents non-`null`. */ + predicate isNonNullValue() { this.isNullness(false) } + + /** Holds if this value represents `null` or non-`null` as indicated by `isNull`. */ + predicate isNullness(boolean isNull) { this = TValue(TValueNull(), isNull) } + + /** Gets the integer that this value represents, if any. */ + int asIntValue() { this = TValue(TValueInt(result), true) } + + /** Gets the boolean that this value represents, if any. */ + boolean asBooleanValue() { this = TValue(TValueTrue(), result) } + + /** Gets the constant that this value represents, if any. */ + ConstantValue asConstantValue() { this = TValue(TValueConstant(result), true) } + + /** Holds if this value represents throwing an exception. */ + predicate isThrowsException() { this = TException(true) } + + /** Gets a textual representation of this value. */ + string toString() { + result = this.asBooleanValue().toString() + or + exists(AbstractSingleValue val | not val instanceof TValueTrue | + this = TValue(val, true) and result = val.toString() + or + this = TValue(val, false) and result = "not " + val.toString() + ) + or + exists(boolean throws | this = TException(throws) | + throws = true and result = "exception" + or + throws = false and result = "no exception" + ) + } + } + + bindingset[a, b] + pragma[inline_late] + private predicate disjointValues(GuardValue a, GuardValue b) { + a = b.getDualValue() + or + exists(AbstractSingleValue a1, AbstractSingleValue b1 | + a = TValue(a1, true) and + b = TValue(b1, true) and + a1 != b1 + ) + } + + private predicate constantHasValue(ConstantExpr c, GuardValue v) { + c.isNull() and v.isNullValue() + or + v.asBooleanValue() = c.asBooleanValue() + or + v.asIntValue() = c.asIntegerValue() + or + v.asConstantValue() = c.asConstantValue() + } + + private predicate exceptionBranchPoint(BasicBlock bb1, BasicBlock normalSucc, BasicBlock excSucc) { + exists(SuccessorType norm, ExceptionSuccessor exc | + bb1.getASuccessor(norm) = normalSucc and + bb1.getASuccessor(exc) = excSucc and + normalSucc != excSucc and + not norm instanceof ExceptionSuccessor + ) + } + + private predicate branchEdge(BasicBlock bb1, BasicBlock bb2, GuardValue v) { + exists(ConditionalSuccessor s | + bb1.getASuccessor(s) = bb2 and + exists(AbstractSingleValue val | + s instanceof NullnessSuccessor and val = TValueNull() + or + s instanceof BooleanSuccessor and val = TValueTrue() + | + v = TValue(val, s.getValue()) + ) + ) + or + exceptionBranchPoint(bb1, bb2, _) and v = TException(false) + or + exceptionBranchPoint(bb1, _, bb2) and v = TException(true) + } + + private predicate caseBranchEdge(BasicBlock bb1, BasicBlock bb2, GuardValue v, Case c) { + v.asBooleanValue() = true and + c.matchEdge(bb1, bb2) + or + v.asBooleanValue() = false and + c.nonMatchEdge(bb1, bb2) + } + + private predicate equalityTestSymmetric(Expr eqtest, Expr e1, Expr e2, boolean eqval) { + equalityTest(eqtest, e1, e2, eqval) + or + equalityTest(eqtest, e2, e1, eqval) + } + + private predicate constcaseEquality(PreGuard g, Expr e1, ConstantExpr e2) { + exists(Case c | + g = c and + e1 = c.getSwitchExpr() and + e2 = c.asConstantCase() + ) + } + + final private class FinalAstNode = AstNode; + + /** + * A guard. This may be any expression whose value determines subsequent + * control flow. It may also be a switch case, which as a guard is considered + * to evaluate to either true or false depending on whether the case matches. + */ + final class PreGuard extends FinalAstNode { + /** + * Holds if this guard evaluating to `v` corresponds to taking the edge + * from `bb1` to `bb2`. For ordinary conditional branching this guard is + * the last node in `bb1`, but for switch case matching it is the switch + * expression, which may either be in `bb1` or an earlier basic block. + */ + predicate hasValueBranchEdge(BasicBlock bb1, BasicBlock bb2, GuardValue v) { + bb1.getLastNode() = this.(Expr).getControlFlowNode() and + branchEdge(bb1, bb2, v) + or + caseBranchEdge(bb1, bb2, v, this) + } + + /** + * Holds if this guard evaluating to `v` directly controls the basic block `bb`. + * + * That is, `bb` is dominated by the `v`-successor edge of this guard. + */ + predicate directlyValueControls(BasicBlock bb, GuardValue v) { + exists(BasicBlock guard, BasicBlock succ | + this.hasValueBranchEdge(guard, succ, v) and + dominatingEdge(guard, succ) and + succ.dominates(bb) + ) + } + + /** + * Holds if this guard is the last node in `bb1` and that its successor is + * `bb2` exactly when evaluating to `branch`. + */ + predicate hasBranchEdge(BasicBlock bb1, BasicBlock bb2, boolean branch) { + this.hasValueBranchEdge(bb1, bb2, any(GuardValue gv | gv.asBooleanValue() = branch)) + } + + /** + * Holds if this guard evaluating to `branch` directly controls the basic + * block `bb`. + * + * That is, `bb` is dominated by the `branch`-successor edge of this guard. + */ + predicate directlyControls(BasicBlock bb, boolean branch) { + this.directlyValueControls(bb, any(GuardValue gv | gv.asBooleanValue() = branch)) + } + + /** + * Holds if this guard tests equality between `e1` and `e2` upon evaluating + * to `eqval`. + */ + predicate isEquality(Expr e1, Expr e2, boolean eqval) { + equalityTestSymmetric(this, e1, e2, eqval) + or + constcaseEquality(this, e1, e2) and eqval = true + or + constcaseEquality(this, e2, e1) and eqval = true + } + + /** + * Gets the basic block of this guard. For expressions, this is the basic + * block of the expression itself, and for switch cases, this is the basic + * block of the expression being compared against the cases. + */ + BasicBlock getBasicBlock() { + result = this.(Expr).getBasicBlock() + or + result = this.(Case).getSwitchExpr().getBasicBlock() + } + } + + private Expr getBranchExpr(ConditionalExpr cond, boolean branch) { + branch = true and result = cond.getThen() + or + branch = false and result = cond.getElse() + } + + private predicate baseImpliesStep(PreGuard g1, GuardValue v1, PreGuard g2, GuardValue v2) { + g1.(AndExpr).getAnOperand() = g2 and v1.asBooleanValue() = true and v2 = v1 + or + g1.(OrExpr).getAnOperand() = g2 and v1.asBooleanValue() = false and v2 = v1 + or + g1.(NotExpr).getOperand() = g2 and v1.asBooleanValue().booleanNot() = v2.asBooleanValue() + or + exists(GuardValue eqval, ConstantExpr constant, GuardValue cv | + g1.isEquality(g2, constant, eqval.asBooleanValue()) and + constantHasValue(constant, cv) + | + v1 = eqval and v2 = cv + or + v1 = eqval.getDualValue() and v2 = cv.getDualValue() + ) + or + exists(NonNullExpr nonnull | + equalityTestSymmetric(g1, g2, nonnull, v1.asBooleanValue()) and + v2.isNonNullValue() + ) + or + exists(Case c1, Expr switchExpr | + g1 = c1 and + c1.isDefaultCase() and + c1.getSwitchExpr() = switchExpr and + v1.asBooleanValue() = true and + g2.(Case).getSwitchExpr() = switchExpr and + v2.asBooleanValue() = false and + g1 != g2 + ) + } + + signature module LogicInputSig { + class SsaDefinition { + /** Gets the basic block to which this SSA definition belongs. */ + BasicBlock getBasicBlock(); + + Expr getARead(); + + /** Gets a textual representation of this SSA definition. */ + string toString(); + + /** Gets the location of this SSA definition. */ + Location getLocation(); + } + + class SsaWriteDefinition extends SsaDefinition { + Expr getDefinition(); + } + + class SsaPhiNode extends SsaDefinition { + /** Holds if `inp` is an input to the phi node along the edge originating in `bb`. */ + predicate hasInputFromBlock(SsaDefinition inp, BasicBlock bb); + } + + /** + * Holds if `guard` evaluating to `val` ensures that: + * `e <= k` when `upper = true` + * `e >= k` when `upper = false` + */ + default predicate rangeGuard(PreGuard guard, GuardValue val, Expr e, int k, boolean upper) { + none() + } + + /** + * Holds if `guard` evaluating to `val` ensures that: + * `e == null` when `isNull = true` + * `e != null` when `isNull = false` + */ + default predicate additionalNullCheck(PreGuard guard, GuardValue val, Expr e, boolean isNull) { + none() + } + + /** + * Holds if the assumption that `g1` has been evaluated to `v1` implies that + * `g2` has been evaluated to `v2`, that is, the evaluation of `g2` to `v2` + * dominates the evaluation of `g1` to `v1`. + * + * This predicate can be instantiated with `CustomGuard<..>::additionalImpliesStep`. + */ + default predicate additionalImpliesStep(PreGuard g1, GuardValue v1, PreGuard g2, GuardValue v2) { + none() + } + } + + /** + * Provides the `Guard` class with suitable 'controls' predicates augmented + * with logical implications based on SSA. + */ + module Logic { + private import LogicInput + + /** + * Holds if `guard` evaluating to `v` directly controls `phi` taking the value + * `inp`. This means that `guard` evaluating to `v` must control all the input + * edges to `phi` that read `inp`. + * + * We also require that `guard` dominates `phi` in order to allow logical inferences + * from the value of `phi` to the value of `guard`. + * + * Trivial cases where `guard` controls `phi` itself are excluded, since that makes + * logical inferences from `phi` to `guard` trivial and irrelevant. + */ + private predicate guardControlsPhiBranch( + Guard guard, GuardValue v, SsaPhiNode phi, SsaDefinition inp + ) { + exists(BasicBlock bbPhi | + phi.hasInputFromBlock(inp, _) and + phi.getBasicBlock() = bbPhi and + guard.getBasicBlock().strictlyDominates(bbPhi) and + not guard.directlyValueControls(bbPhi, _) and + forex(BasicBlock bbInput | phi.hasInputFromBlock(inp, bbInput) | + guard.directlyValueControls(bbInput, v) or + guard.hasValueBranchEdge(bbInput, bbPhi, v) + ) + ) + } + + /** + * Holds if `phi` takes `input` exactly when `guard` is `v`. That is, + * `guard == v` directly controls `input` and `guard == v.getDualValue()` + * directly controls all other inputs to `phi`. + * + * This makes `phi` similar to the conditional `phi = guard==v ? input : ...`. + */ + private predicate guardDeterminesPhiInput(Guard guard, GuardValue v, SsaPhiNode phi, Expr input) { + exists(GuardValue dv, SsaWriteDefinition inp | + guardControlsPhiBranch(guard, v, phi, inp) and + inp.getDefinition() = input and + dv = v.getDualValue() and + forall(SsaDefinition other | phi.hasInputFromBlock(other, _) and other != inp | + guardControlsPhiBranch(guard, dv, phi, other) + ) + ) + } + + pragma[nomagic] + private predicate guardChecksEqualVars( + Guard guard, SsaDefinition v1, SsaDefinition v2, boolean branch + ) { + equalityTestSymmetric(guard, v1.getARead(), v2.getARead(), branch) + } + + private predicate guardReadsSsaVar(Guard guard, SsaDefinition def) { + def.getARead() = guard + or + // A read of `y` can be considered as a read of `x` if guarded by `x == y`. + exists(Guard eqtest, SsaDefinition other, boolean branch | + guardChecksEqualVars(eqtest, def, other, branch) and + other.getARead() = guard and + eqtest.directlyControls(guard.getBasicBlock(), branch) + ) + or + // An expression `x = ...` can be considered as a read of `x`. + guard.(IdExpr).getEqualChildExpr() = def.(SsaWriteDefinition).getDefinition() + } + + private predicate valueStep(Expr e1, Expr e2) { + e2.(ConditionalExpr).getThen() = e1 or + e2.(ConditionalExpr).getElse() = e1 or + e2.(IdExpr).getEqualChildExpr() = e1 + } + + /** + * Gets a sub-expression of `e` whose value can flow to `e` through + * `valueStep`s + */ + private Expr possibleValue(Expr e) { + result = possibleValue(any(Expr e1 | valueStep(e1, e))) + or + result = e and not valueStep(_, e) + } + + /** + * Gets an ultimate definition of `v` that is not itself a phi node. The + * boolean `fromBackEdge` indicates whether the flow from `result` to `v` goes + * through a back edge. + */ + private SsaDefinition getAnUltimateDefinition(SsaDefinition v, boolean fromBackEdge) { + result = v and not v instanceof SsaPhiNode and fromBackEdge = false + or + exists(SsaDefinition inp, BasicBlock bb, boolean fbe | + v.(SsaPhiNode).hasInputFromBlock(inp, bb) and + result = getAnUltimateDefinition(inp, fbe) and + (if v.getBasicBlock().dominates(bb) then fromBackEdge = true else fromBackEdge = fbe) + ) + } + + /** + * Holds if `v` can have a value that is not representable as a `GuardValue`. + */ + private predicate hasPossibleUnknownValue(SsaDefinition v) { + exists(SsaDefinition def | def = getAnUltimateDefinition(v, _) | + not exists(def.(SsaWriteDefinition).getDefinition()) + or + exists(Expr e | e = possibleValue(def.(SsaWriteDefinition).getDefinition()) | + not constantHasValue(e, _) + ) + ) + } + + /** + * Holds if `e` equals `k` and may be assigned to `v`. The boolean + * `fromBackEdge` indicates whether the flow from `e` to `v` goes through a + * back edge. + */ + private predicate possibleValue(SsaDefinition v, boolean fromBackEdge, Expr e, GuardValue k) { + not hasPossibleUnknownValue(v) and + exists(SsaWriteDefinition def | + def = getAnUltimateDefinition(v, fromBackEdge) and + e = possibleValue(def.getDefinition()) and + constantHasValue(e, k) + ) + } + + /** + * Holds if `e` equals `k` and may be assigned to `v` without going through + * back edges, and all other possible ultimate definitions of `v` are different + * from `k`. The trivial case where `v` is an `SsaWriteDefinition` with `e` as + * the only possible value is excluded. + */ + private predicate uniqueValue(SsaDefinition v, Expr e, GuardValue k) { + possibleValue(v, false, e, k) and + not possibleValue(v, true, e, k) and + forex(Expr other, GuardValue otherval | possibleValue(v, _, other, otherval) and other != e | + disjointValues(otherval, k) + ) + } + + /** + * Holds if `phi` has exactly two inputs, `def1` and `e2`, and that `def1` + * does not come from a back-edge into `phi`. + */ + private predicate phiWithTwoInputs(SsaPhiNode phi, SsaDefinition def1, Expr e2) { + exists(SsaWriteDefinition def2, BasicBlock bb1 | + 2 = strictcount(SsaDefinition inp, BasicBlock bb | phi.hasInputFromBlock(inp, bb)) and + phi.hasInputFromBlock(def1, bb1) and + phi.hasInputFromBlock(def2, _) and + def1 != def2 and + not phi.getBasicBlock().dominates(bb1) and + def2.getDefinition() = e2 + ) + } + + /** Holds if `e` may take the value `k` */ + private predicate relevantInt(Expr e, int k) { + e.(ConstantExpr).asIntegerValue() = k + or + relevantInt(any(Expr e1 | valueStep(e1, e)), k) + or + exists(SsaDefinition def | + guardReadsSsaVar(e, def) and + relevantInt(getAnUltimateDefinition(def, _).(SsaWriteDefinition).getDefinition(), k) + ) + } + + private predicate impliesStep1(Guard g1, GuardValue v1, Guard g2, GuardValue v2) { + baseImpliesStep(g1, v1, g2, v2) + or + exists(SsaDefinition def, Expr e | + // If `def = g2 ? v1 : ...` and all other assignments to `def` are different from + // `v1` then a guard proving `def == v1` ensures that `g2` evaluates to `v2`. + uniqueValue(def, e, v1) and + guardReadsSsaVar(g1, def) and + g2.directlyValueControls(e.getBasicBlock(), v2) and + not g2.directlyValueControls(g1.getBasicBlock(), v2) + ) + or + exists(int k1, int k2, boolean upper | + rangeGuard(g1, v1, g2, k1, upper) and + relevantInt(g2, k2) and + v2 = TValue(TValueInt(k2), false) + | + upper = true and k1 < k2 // g2 <= k1 < k2 ==> g2 != k2 + or + upper = false and k1 > k2 // g2 >= k1 > k2 ==> g2 != k2 + ) + or + exists(boolean isNull | + additionalNullCheck(g1, v1, g2, isNull) and + v2.isNullness(isNull) and + not (g2 instanceof NonNullExpr and isNull = false) // disregard trivial guard + ) + } + + /** + * Holds if `g` evaluating to `v` implies that `def` evaluates to `ssaVal`. + * The included set of implications is somewhat restricted to avoid a + * recursive dependency on `exprHasValue`. + */ + private predicate baseSsaValueCheck(SsaDefinition def, GuardValue ssaVal, Guard g, GuardValue v) { + exists(Guard g0, GuardValue v0 | + guardReadsSsaVar(g0, def) and v0 = ssaVal + or + baseSsaValueCheck(def, ssaVal, g0, v0) + | + impliesStep1(g, v, g0, v0) + ) + } + + private predicate exprHasValue(Expr e, GuardValue v) { + constantHasValue(e, v) + or + e instanceof NonNullExpr and v.isNonNullValue() + or + exprHasValue(e.(IdExpr).getEqualChildExpr(), v) + or + exists(SsaDefinition def, Guard g, GuardValue gv | + e = def.getARead() and + g.directlyValueControls(e.getBasicBlock(), gv) and + baseSsaValueCheck(def, v, g, gv) + ) + or + exists(SsaWriteDefinition def | + exprHasValue(def.getDefinition(), v) and + e = def.getARead() + ) + } + + private predicate impliesStep2(Guard g1, GuardValue v1, Guard g2, GuardValue v2) { + impliesStep1(g1, v1, g2, v2) + or + exists(Expr nonnull | + exprHasValue(nonnull, v2) and + equalityTestSymmetric(g1, g2, nonnull, v1.asBooleanValue()) and + v2.isNonNullValue() + ) + } + + bindingset[g1, v1] + pragma[inline_late] + private predicate unboundImpliesStep(Guard g1, GuardValue v1, Guard g2, GuardValue v2) { + g1.(IdExpr).getEqualChildExpr() = g2 and v1 = v2 and not v1 instanceof TException + or + exists(ConditionalExpr cond, boolean branch, Expr e, GuardValue ev | + cond = g1 and + e = getBranchExpr(cond, branch) and + exprHasValue(e, ev) and + disjointValues(v1, ev) + | + // g1 === g2 ? e : ...; + // g1 === g2 ? ... : e; + g2 = cond.getCondition() and + v2.asBooleanValue() = branch.booleanNot() + or + // g1 === ... ? g2 : e + // g1 === ... ? e : g2 + g2 = getBranchExpr(cond, branch.booleanNot()) and + v2 = v1 and + not exprHasValue(g2, v2) // disregard trivial guard + ) + } + + bindingset[def1, v1] + pragma[inline_late] + private predicate impliesStepSsaGuard(SsaDefinition def1, GuardValue v1, Guard g2, GuardValue v2) { + def1.(SsaWriteDefinition).getDefinition() = g2 and + v1 = v2 and + not exprHasValue(g2, v2) // disregard trivial guard + or + exists(Expr e, GuardValue ev | + guardDeterminesPhiInput(g2, v2.getDualValue(), def1, e) and + exprHasValue(e, ev) and + disjointValues(v1, ev) + ) + } + + bindingset[def1, v] + pragma[inline_late] + private predicate impliesStepSsa(SsaDefinition def1, GuardValue v, SsaDefinition def2) { + exists(Expr e, GuardValue ev | + phiWithTwoInputs(def1, def2, e) and + exprHasValue(e, ev) and + disjointValues(v, ev) + ) + } + + private signature predicate baseGuardValueSig(Guard guard, GuardValue v); + + /** + * Calculates the transitive closure of all the guard implication steps + * starting from a given set of base cases. + */ + cached + private module ImpliesTC { + /** + * Holds if `tgtGuard` evaluating to `tgtVal` implies that `guard` + * evaluates to `v`. + */ + pragma[nomagic] + cached + predicate guardControls(Guard guard, GuardValue v, Guard tgtGuard, GuardValue tgtVal) { + baseGuardValue(tgtGuard, tgtVal) and + guard = tgtGuard and + v = tgtVal + or + exists(Guard g0, GuardValue v0 | + guardControls(g0, v0, tgtGuard, tgtVal) and + impliesStep2(g0, v0, guard, v) + ) + or + exists(Guard g0, GuardValue v0 | + guardControls(g0, v0, tgtGuard, tgtVal) and + unboundImpliesStep(g0, v0, guard, v) + ) + or + exists(SsaDefinition def0, GuardValue v0 | + ssaControls(def0, v0, tgtGuard, tgtVal) and + impliesStepSsaGuard(def0, v0, guard, v) + ) + or + exists(Guard g0, GuardValue v0 | + guardControls(g0, v0, tgtGuard, tgtVal) and + additionalImpliesStep(g0, v0, guard, v) + ) + } + + /** + * Holds if `tgtGuard` evaluating to `tgtVal` implies that `def` + * evaluates to `v`. + */ + pragma[nomagic] + cached + predicate ssaControls(SsaDefinition def, GuardValue v, Guard tgtGuard, GuardValue tgtVal) { + exists(Guard g0 | + guardControls(g0, v, tgtGuard, tgtVal) and + guardReadsSsaVar(g0, def) + ) + or + exists(SsaDefinition def0 | + ssaControls(def0, v, tgtGuard, tgtVal) and + impliesStepSsa(def0, v, def) + ) + } + } + + private predicate booleanGuard(Guard guard, GuardValue val) { + exists(guard) and exists(val.asBooleanValue()) + } + + private module BooleanImplies = ImpliesTC; + + /** INTERNAL: Don't use. */ + predicate boolImplies(Guard g1, GuardValue v1, Guard g2, GuardValue v2) { + BooleanImplies::guardControls(g2, v2, g1, v1) and + g2 != g1 + } + + /** + * Holds if `guard` evaluating to `v` implies that `e` is guaranteed to be + * null if `isNull` is true, and non-null if `isNull` is false. + */ + predicate nullGuard(Guard guard, GuardValue v, Expr e, boolean isNull) { + impliesStep2(guard, v, e, any(GuardValue gv | gv.isNullness(isNull))) or + additionalImpliesStep(guard, v, e, any(GuardValue gv | gv.isNullness(isNull))) + } + + private predicate hasAValueBranchEdge(Guard guard, GuardValue v) { + guard.hasValueBranchEdge(_, _, v) + } + + private module BranchImplies = ImpliesTC; + + private predicate guardControlsBranchEdge( + Guard guard, BasicBlock bb1, BasicBlock bb2, GuardValue v + ) { + exists(Guard g0, GuardValue v0 | + g0.hasValueBranchEdge(bb1, bb2, v0) and + BranchImplies::guardControls(guard, v, g0, v0) + ) + } + + /** + * Holds if `def` evaluating to `v` controls the control-flow branch + * edge from `bb1` to `bb2`. That is, following the edge from `bb1` to + * `bb2` implies that `def` evaluated to `v`. + */ + predicate ssaControlsBranchEdge(SsaDefinition def, BasicBlock bb1, BasicBlock bb2, GuardValue v) { + exists(Guard g0, GuardValue v0 | + g0.hasValueBranchEdge(bb1, bb2, v0) and + BranchImplies::ssaControls(def, v, g0, v0) + ) + } + + /** + * Holds if `def` evaluating to `v` controls the basic block `bb`. + * That is, execution of `bb` implies that `def` evaluated to `v`. + */ + predicate ssaControls(SsaDefinition def, BasicBlock bb, GuardValue v) { + exists(BasicBlock guard, BasicBlock succ | + ssaControlsBranchEdge(def, guard, succ, v) and + dominatingEdge(guard, succ) and + succ.dominates(bb) + ) + } + + signature module CustomGuardInputSig { + class ParameterPosition { + /** Gets a textual representation of this element. */ + bindingset[this] + string toString(); + } + + class ArgumentPosition { + /** Gets a textual representation of this element. */ + bindingset[this] + string toString(); + } + + /** + * Holds if the parameter position `ppos` matches the argument position + * `apos`. + */ + predicate parameterMatch(ParameterPosition ppos, ArgumentPosition apos); + + /** A non-overridable method with a boolean return value. */ + class BooleanMethod { + SsaDefinition getParameter(ParameterPosition ppos); + + Expr getAReturnExpr(); + } + + class BooleanMethodCall extends Expr { + BooleanMethod getMethod(); + + Expr getArgument(ArgumentPosition apos); + } + } + + /** + * Provides an implementation of guard implication logic for custom + * wrappers. This can be used to instantiate the `additionalImpliesStep` + * predicate. + */ + module CustomGuard { + private import CustomGuardInput + + final private class FinalExpr = Expr; + + private class ReturnExpr extends FinalExpr { + ReturnExpr() { any(BooleanMethod m).getAReturnExpr() = this } + + pragma[nomagic] + BasicBlock getBasicBlock() { result = super.getBasicBlock() } + } + + private predicate booleanReturnGuard(Guard guard, GuardValue val) { + guard instanceof ReturnExpr and exists(val.asBooleanValue()) + } + + private module ReturnImplies = ImpliesTC; + + /** + * Holds if `ret` is a return expression in a non-overridable method that + * on a return value of `retval` allows the conclusion that the `ppos`th + * parameter has the value `val`. + */ + private predicate validReturnInCustomGuard( + ReturnExpr ret, ParameterPosition ppos, boolean retval, GuardValue val + ) { + exists(BooleanMethod m, SsaDefinition param | + m.getAReturnExpr() = ret and + m.getParameter(ppos) = param + | + exists(Guard g0, GuardValue v0 | + g0.directlyValueControls(ret.getBasicBlock(), v0) and + BranchImplies::ssaControls(param, val, g0, v0) and + retval = [true, false] + ) + or + ReturnImplies::ssaControls(param, val, ret, + any(GuardValue r | r.asBooleanValue() = retval)) + ) + } + + /** + * Gets a non-overridable method with a boolean return value that performs a check + * on the `ppos`th parameter. A return value equal to `retval` allows us to conclude + * that the argument has the value `val`. + */ + private BooleanMethod customGuard(ParameterPosition ppos, boolean retval, GuardValue val) { + forex(ReturnExpr ret | + result.getAReturnExpr() = ret and + not ret.(ConstantExpr).asBooleanValue() = retval.booleanNot() + | + validReturnInCustomGuard(ret, ppos, retval, val) + ) + } + + /** + * Holds if the assumption that `g1` has been evaluated to `v1` implies that + * `g2` has been evaluated to `v2`, that is, the evaluation of `g2` to `v2` + * dominates the evaluation of `g1` to `v1`. + * + * This predicate covers the implication steps that arise from calls to + * custom guard wrappers. + */ + predicate additionalImpliesStep(PreGuard g1, GuardValue v1, PreGuard g2, GuardValue v2) { + exists(BooleanMethodCall call, ParameterPosition ppos, ArgumentPosition apos | + g1 = call and + call.getMethod() = customGuard(ppos, v1.asBooleanValue(), v2) and + call.getArgument(apos) = g2 and + parameterMatch(pragma[only_bind_out](ppos), pragma[only_bind_out](apos)) + ) + } + } + + /** + * A guard. This may be any expression whose value determines subsequent + * control flow. It may also be a switch case, which as a guard is considered + * to evaluate to either true or false depending on whether the case matches. + */ + final class Guard extends PreGuard { + /** + * Holds if this guard evaluating to `v` controls the control-flow branch + * edge from `bb1` to `bb2`. That is, following the edge from `bb1` to + * `bb2` implies that this guard evaluated to `v`. + * + * Note that this goes beyond mere control-flow graph dominance, as it + * also considers additional logical reasoning. + */ + predicate valueControlsBranchEdge(BasicBlock bb1, BasicBlock bb2, GuardValue v) { + guardControlsBranchEdge(this, bb1, bb2, v) + } + + /** + * Holds if this guard evaluating to `v` controls the basic block `bb`. + * That is, execution of `bb` implies that this guard evaluated to `v`. + * + * Note that this goes beyond mere control-flow graph dominance, as it + * also considers additional logical reasoning. + */ + predicate valueControls(BasicBlock bb, GuardValue v) { + exists(BasicBlock guard, BasicBlock succ | + this.valueControlsBranchEdge(guard, succ, v) and + dominatingEdge(guard, succ) and + succ.dominates(bb) + ) + } + + /** + * Holds if this guard evaluating to `branch` controls the control-flow + * branch edge from `bb1` to `bb2`. That is, following the edge from + * `bb1` to `bb2` implies that this guard evaluated to `branch`. + * + * Note that this goes beyond mere control-flow graph dominance, as it + * also considers additional logical reasoning. + */ + predicate controlsBranchEdge(BasicBlock bb1, BasicBlock bb2, boolean branch) { + this.valueControlsBranchEdge(bb1, bb2, any(GuardValue gv | gv.asBooleanValue() = branch)) + } + + /** + * Holds if this guard evaluating to `branch` controls the basic block + * `bb`. That is, execution of `bb` implies that this guard evaluated to + * `branch`. + * + * Note that this goes beyond mere control-flow graph dominance, as it + * also considers additional logical reasoning. + */ + predicate controls(BasicBlock bb, boolean branch) { + this.valueControls(bb, any(GuardValue gv | gv.asBooleanValue() = branch)) + } + } + } +} diff --git a/shared/controlflow/qlpack.yml b/shared/controlflow/qlpack.yml index 6325acc4c5b..a1020700a1a 100644 --- a/shared/controlflow/qlpack.yml +++ b/shared/controlflow/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/controlflow -version: 2.0.10-dev +version: 2.0.11-dev groups: shared library: true dependencies: diff --git a/shared/dataflow/CHANGELOG.md b/shared/dataflow/CHANGELOG.md index 10cb758f6ea..128d8ccd0d4 100644 --- a/shared/dataflow/CHANGELOG.md +++ b/shared/dataflow/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.0.10 + +No user-facing changes. + ## 2.0.9 No user-facing changes. diff --git a/shared/dataflow/change-notes/released/2.0.10.md b/shared/dataflow/change-notes/released/2.0.10.md new file mode 100644 index 00000000000..37310f107aa --- /dev/null +++ b/shared/dataflow/change-notes/released/2.0.10.md @@ -0,0 +1,3 @@ +## 2.0.10 + +No user-facing changes. diff --git a/shared/dataflow/codeql-pack.release.yml b/shared/dataflow/codeql-pack.release.yml index ce305265e33..96ea0220a69 100644 --- a/shared/dataflow/codeql-pack.release.yml +++ b/shared/dataflow/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 2.0.9 +lastReleaseVersion: 2.0.10 diff --git a/shared/dataflow/qlpack.yml b/shared/dataflow/qlpack.yml index 1e1736c81f6..2064efe3b6b 100644 --- a/shared/dataflow/qlpack.yml +++ b/shared/dataflow/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/dataflow -version: 2.0.10-dev +version: 2.0.11-dev groups: shared library: true dependencies: diff --git a/shared/mad/CHANGELOG.md b/shared/mad/CHANGELOG.md index ac6be6596f7..01f4051da30 100644 --- a/shared/mad/CHANGELOG.md +++ b/shared/mad/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.26 + +No user-facing changes. + ## 1.0.25 No user-facing changes. diff --git a/shared/mad/change-notes/released/1.0.26.md b/shared/mad/change-notes/released/1.0.26.md new file mode 100644 index 00000000000..4920e2b2435 --- /dev/null +++ b/shared/mad/change-notes/released/1.0.26.md @@ -0,0 +1,3 @@ +## 1.0.26 + +No user-facing changes. diff --git a/shared/mad/codeql-pack.release.yml b/shared/mad/codeql-pack.release.yml index a5a44030e85..125d169e44f 100644 --- a/shared/mad/codeql-pack.release.yml +++ b/shared/mad/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.25 +lastReleaseVersion: 1.0.26 diff --git a/shared/mad/qlpack.yml b/shared/mad/qlpack.yml index 0e8adfc89c2..6a57f272569 100644 --- a/shared/mad/qlpack.yml +++ b/shared/mad/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/mad -version: 1.0.26-dev +version: 1.0.27-dev groups: shared library: true dependencies: diff --git a/shared/quantum/CHANGELOG.md b/shared/quantum/CHANGELOG.md index d7831747b12..4ffbff1e0c4 100644 --- a/shared/quantum/CHANGELOG.md +++ b/shared/quantum/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.0.4 + +No user-facing changes. + ## 0.0.3 No user-facing changes. diff --git a/shared/quantum/change-notes/released/0.0.4.md b/shared/quantum/change-notes/released/0.0.4.md new file mode 100644 index 00000000000..eefe286a4d8 --- /dev/null +++ b/shared/quantum/change-notes/released/0.0.4.md @@ -0,0 +1,3 @@ +## 0.0.4 + +No user-facing changes. diff --git a/shared/quantum/codeql-pack.release.yml b/shared/quantum/codeql-pack.release.yml index a24b693d1e7..ec411a674bc 100644 --- a/shared/quantum/codeql-pack.release.yml +++ b/shared/quantum/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 0.0.3 +lastReleaseVersion: 0.0.4 diff --git a/shared/quantum/qlpack.yml b/shared/quantum/qlpack.yml index d3b36828ade..f95d9c773b1 100644 --- a/shared/quantum/qlpack.yml +++ b/shared/quantum/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/quantum -version: 0.0.4-dev +version: 0.0.5-dev groups: shared library: true dependencies: diff --git a/shared/rangeanalysis/CHANGELOG.md b/shared/rangeanalysis/CHANGELOG.md index c06e99c5f7f..e0f22e5bc3a 100644 --- a/shared/rangeanalysis/CHANGELOG.md +++ b/shared/rangeanalysis/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.26 + +No user-facing changes. + ## 1.0.25 No user-facing changes. diff --git a/shared/rangeanalysis/change-notes/released/1.0.26.md b/shared/rangeanalysis/change-notes/released/1.0.26.md new file mode 100644 index 00000000000..4920e2b2435 --- /dev/null +++ b/shared/rangeanalysis/change-notes/released/1.0.26.md @@ -0,0 +1,3 @@ +## 1.0.26 + +No user-facing changes. diff --git a/shared/rangeanalysis/codeql-pack.release.yml b/shared/rangeanalysis/codeql-pack.release.yml index a5a44030e85..125d169e44f 100644 --- a/shared/rangeanalysis/codeql-pack.release.yml +++ b/shared/rangeanalysis/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.25 +lastReleaseVersion: 1.0.26 diff --git a/shared/rangeanalysis/qlpack.yml b/shared/rangeanalysis/qlpack.yml index 059cf59c2bf..b2b9dabb75a 100644 --- a/shared/rangeanalysis/qlpack.yml +++ b/shared/rangeanalysis/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/rangeanalysis -version: 1.0.26-dev +version: 1.0.27-dev groups: shared library: true dependencies: diff --git a/shared/regex/CHANGELOG.md b/shared/regex/CHANGELOG.md index 1a63aa6e43a..aced064cc7a 100644 --- a/shared/regex/CHANGELOG.md +++ b/shared/regex/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.26 + +No user-facing changes. + ## 1.0.25 No user-facing changes. diff --git a/shared/regex/change-notes/released/1.0.26.md b/shared/regex/change-notes/released/1.0.26.md new file mode 100644 index 00000000000..4920e2b2435 --- /dev/null +++ b/shared/regex/change-notes/released/1.0.26.md @@ -0,0 +1,3 @@ +## 1.0.26 + +No user-facing changes. diff --git a/shared/regex/codeql-pack.release.yml b/shared/regex/codeql-pack.release.yml index a5a44030e85..125d169e44f 100644 --- a/shared/regex/codeql-pack.release.yml +++ b/shared/regex/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.25 +lastReleaseVersion: 1.0.26 diff --git a/shared/regex/qlpack.yml b/shared/regex/qlpack.yml index a98c2f6003b..3c478e25f9d 100644 --- a/shared/regex/qlpack.yml +++ b/shared/regex/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/regex -version: 1.0.26-dev +version: 1.0.27-dev groups: shared library: true dependencies: diff --git a/shared/ssa/CHANGELOG.md b/shared/ssa/CHANGELOG.md index fff1d5b89e2..2359940bf9a 100644 --- a/shared/ssa/CHANGELOG.md +++ b/shared/ssa/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.0.2 + +No user-facing changes. + ## 2.0.1 No user-facing changes. diff --git a/shared/ssa/change-notes/released/2.0.2.md b/shared/ssa/change-notes/released/2.0.2.md new file mode 100644 index 00000000000..862ef0e9df7 --- /dev/null +++ b/shared/ssa/change-notes/released/2.0.2.md @@ -0,0 +1,3 @@ +## 2.0.2 + +No user-facing changes. diff --git a/shared/ssa/codeql-pack.release.yml b/shared/ssa/codeql-pack.release.yml index fe974a4dbf3..81c7f1dbc13 100644 --- a/shared/ssa/codeql-pack.release.yml +++ b/shared/ssa/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 2.0.1 +lastReleaseVersion: 2.0.2 diff --git a/shared/ssa/qlpack.yml b/shared/ssa/qlpack.yml index 4c73efe3912..9a9f8759539 100644 --- a/shared/ssa/qlpack.yml +++ b/shared/ssa/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/ssa -version: 2.0.2-dev +version: 2.0.3-dev groups: shared library: true dependencies: diff --git a/shared/threat-models/CHANGELOG.md b/shared/threat-models/CHANGELOG.md index 3fa1fa4c69b..0d814dec385 100644 --- a/shared/threat-models/CHANGELOG.md +++ b/shared/threat-models/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.26 + +No user-facing changes. + ## 1.0.25 No user-facing changes. diff --git a/shared/threat-models/change-notes/released/1.0.26.md b/shared/threat-models/change-notes/released/1.0.26.md new file mode 100644 index 00000000000..4920e2b2435 --- /dev/null +++ b/shared/threat-models/change-notes/released/1.0.26.md @@ -0,0 +1,3 @@ +## 1.0.26 + +No user-facing changes. diff --git a/shared/threat-models/codeql-pack.release.yml b/shared/threat-models/codeql-pack.release.yml index a5a44030e85..125d169e44f 100644 --- a/shared/threat-models/codeql-pack.release.yml +++ b/shared/threat-models/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.25 +lastReleaseVersion: 1.0.26 diff --git a/shared/threat-models/qlpack.yml b/shared/threat-models/qlpack.yml index fda94a8f4ff..b514f75bb94 100644 --- a/shared/threat-models/qlpack.yml +++ b/shared/threat-models/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/threat-models -version: 1.0.26-dev +version: 1.0.27-dev library: true groups: shared dataExtensions: diff --git a/shared/tree-sitter-extractor/src/extractor/mod.rs b/shared/tree-sitter-extractor/src/extractor/mod.rs index 18a0cfc9452..0bc489cd559 100644 --- a/shared/tree-sitter-extractor/src/extractor/mod.rs +++ b/shared/tree-sitter-extractor/src/extractor/mod.rs @@ -67,19 +67,26 @@ pub fn default_subscriber_with_level( ), ) } -pub fn populate_file(writer: &mut trap::Writer, absolute_path: &Path) -> trap::Label { +pub fn populate_file( + writer: &mut trap::Writer, + absolute_path: &Path, + transformer: Option<&file_paths::PathTransformer>, +) -> trap::Label { let (file_label, fresh) = writer.global_id(&trap::full_id_for_file( - &file_paths::normalize_path(absolute_path), + &file_paths::normalize_and_transform_path(absolute_path, transformer), )); if fresh { writer.add_tuple( "files", vec![ trap::Arg::Label(file_label), - trap::Arg::String(file_paths::normalize_path(absolute_path)), + trap::Arg::String(file_paths::normalize_and_transform_path( + absolute_path, + transformer, + )), ], ); - populate_parent_folders(writer, file_label, absolute_path.parent()); + populate_parent_folders(writer, file_label, absolute_path.parent(), transformer); } file_label } @@ -117,6 +124,7 @@ pub fn populate_parent_folders( writer: &mut trap::Writer, child_label: trap::Label, path: Option<&Path>, + transformer: Option<&file_paths::PathTransformer>, ) { let mut path = path; let mut child_label = child_label; @@ -124,9 +132,9 @@ pub fn populate_parent_folders( match path { None => break, Some(folder) => { - let (folder_label, fresh) = writer.global_id(&trap::full_id_for_folder( - &file_paths::normalize_path(folder), - )); + let parent = folder.parent(); + let folder = file_paths::normalize_and_transform_path(folder, transformer); + let (folder_label, fresh) = writer.global_id(&trap::full_id_for_folder(&folder)); writer.add_tuple( "containerparent", vec![ @@ -137,12 +145,9 @@ pub fn populate_parent_folders( if fresh { writer.add_tuple( "folders", - vec![ - trap::Arg::Label(folder_label), - trap::Arg::String(file_paths::normalize_path(folder)), - ], + vec![trap::Arg::Label(folder_label), trap::Arg::String(folder)], ); - path = folder.parent(); + path = parent; child_label = folder_label; } else { break; @@ -205,11 +210,12 @@ pub fn extract( schema: &NodeTypeMap, diagnostics_writer: &mut diagnostics::LogWriter, trap_writer: &mut trap::Writer, + transformer: Option<&file_paths::PathTransformer>, path: &Path, source: &[u8], ranges: &[Range], ) { - let path_str = file_paths::normalize_path(path); + let path_str = file_paths::normalize_and_transform_path(path, transformer); let span = tracing::span!( tracing::Level::TRACE, "extract", @@ -225,7 +231,7 @@ pub fn extract( parser.set_included_ranges(ranges).unwrap(); let tree = parser.parse(source, None).expect("Failed to parse file"); trap_writer.comment(format!("Auto-generated TRAP file for {}", path_str)); - let file_label = populate_file(trap_writer, path); + let file_label = populate_file(trap_writer, path, transformer); let mut visitor = Visitor::new( source, diagnostics_writer, diff --git a/shared/tree-sitter-extractor/src/extractor/simple.rs b/shared/tree-sitter-extractor/src/extractor/simple.rs index eb1232a8ef2..10414a7665b 100644 --- a/shared/tree-sitter-extractor/src/extractor/simple.rs +++ b/shared/tree-sitter-extractor/src/extractor/simple.rs @@ -1,4 +1,4 @@ -use crate::trap; +use crate::{file_paths, trap}; use globset::{GlobBuilder, GlobSetBuilder}; use rayon::prelude::*; use std::fs::File; @@ -111,6 +111,8 @@ impl Extractor { ) }; + let path_transformer = file_paths::load_path_transformer()?; + let lines: std::io::Result> = file_lists .iter() .flat_map(|file_list| std::io::BufReader::new(file_list).lines()) @@ -122,8 +124,12 @@ impl Extractor { .try_for_each(|line| { let mut diagnostics_writer = diagnostics.logger(); let path = PathBuf::from(line).canonicalize()?; - let src_archive_file = - crate::file_paths::path_for(&self.source_archive_dir, &path, ""); + let src_archive_file = crate::file_paths::path_for( + &self.source_archive_dir, + &path, + "", + path_transformer.as_ref(), + ); let source = std::fs::read(&path)?; let mut trap_writer = trap::Writer::new(); @@ -152,6 +158,7 @@ impl Extractor { &schemas[i], &mut diagnostics_writer, &mut trap_writer, + None, &path, &source, &[], @@ -183,7 +190,7 @@ fn write_trap( trap_writer: &trap::Writer, trap_compression: trap::Compression, ) -> std::io::Result<()> { - let trap_file = crate::file_paths::path_for(trap_dir, path, trap_compression.extension()); + let trap_file = crate::file_paths::path_for(trap_dir, path, trap_compression.extension(), None); std::fs::create_dir_all(trap_file.parent().unwrap())?; trap_writer.write_to_file(&trap_file, trap_compression) } diff --git a/shared/tree-sitter-extractor/src/file_paths.rs b/shared/tree-sitter-extractor/src/file_paths.rs index 917a2fb6322..bdb9dd035f0 100644 --- a/shared/tree-sitter-extractor/src/file_paths.rs +++ b/shared/tree-sitter-extractor/src/file_paths.rs @@ -1,8 +1,81 @@ -use std::path::{Path, PathBuf}; +use std::{ + fs, + path::{Path, PathBuf}, +}; -/// Normalizes the path according the common CodeQL specification. Assumes that -/// `path` has already been canonicalized using `std::fs::canonicalize`. -pub fn normalize_path(path: &Path) -> String { +/// This represents the minimum supported path transformation that is needed to support extracting +/// overlay databases. Specifically, it represents a transformer where one path prefix is replaced +/// with a different prefix. +pub struct PathTransformer { + pub original: String, + pub replacement: String, +} + +/// Normalizes the path according to the common CodeQL specification, and, applies the given path +/// transformer, if any. Assumes that `path` has already been canonicalized using +/// `std::fs::canonicalize`. +pub fn normalize_and_transform_path(path: &Path, transformer: Option<&PathTransformer>) -> String { + let path = normalize_path(path); + match transformer { + Some(transformer) => match path.strip_prefix(&transformer.original) { + Some(suffix) => format!("{}{}", transformer.replacement, suffix), + None => path, + }, + None => path, + } +} + +/** + * Attempts to load a path transformer. + * + * If the `CODEQL_PATH_TRANSFORMER` environment variable is not set, no transformer has been + * specified and the function returns `Ok(None)`. + * + * If the environment variable is set, the function attempts to load the transformer from the file + * at the specified path. If this is successful, it returns `Ok(Some(PathTransformer))`. + * + * If the file cannot be read, or if it does not match the minimal subset of the path-transformer + * syntax supported by this extractor, the function returns an error. + */ +pub fn load_path_transformer() -> std::io::Result> { + let path = match std::env::var("CODEQL_PATH_TRANSFORMER") { + Ok(p) => p, + Err(_) => return Ok(None), + }; + let file_content = fs::read_to_string(path)?; + let lines = file_content + .lines() + .map(|line| line.trim().to_owned()) + .filter(|line| !line.is_empty()) + .collect::>(); + + if lines.len() != 2 { + return Err(unsupported_transformer_error()); + } + let replacement = lines[0] + .strip_prefix('#') + .ok_or(unsupported_transformer_error())?; + let original = lines[1] + .strip_suffix("//") + .ok_or(unsupported_transformer_error())?; + + Ok(Some(PathTransformer { + original: original.to_owned(), + replacement: replacement.to_owned(), + })) +} + +fn unsupported_transformer_error() -> std::io::Error { + std::io::Error::new( + std::io::ErrorKind::InvalidData, + "This extractor only supports path transformers specifying a single path-prefix rewrite, \ + with the first line starting with a # and the second line ending with //.", + ) +} + +/// Normalizes the path according to the common CodeQL specification. Assumes that `path` has +/// already been canonicalized using `std::fs::canonicalize`. +fn normalize_path(path: &Path) -> String { if cfg!(windows) { // The way Rust canonicalizes paths doesn't match the CodeQL spec, so we // have to do a bit of work removing certain prefixes and replacing @@ -93,7 +166,18 @@ pub fn path_from_string(path: &str) -> PathBuf { result } -pub fn path_for(dir: &Path, path: &Path, ext: &str) -> PathBuf { +pub fn path_for( + dir: &Path, + path: &Path, + ext: &str, + transformer: Option<&PathTransformer>, +) -> PathBuf { + let path = if transformer.is_some() { + let transformed = normalize_and_transform_path(path, transformer); + PathBuf::from(transformed) + } else { + path.to_path_buf() + }; let mut result = PathBuf::from(dir); for component in path.components() { match component { diff --git a/shared/tree-sitter-extractor/src/generator/mod.rs b/shared/tree-sitter-extractor/src/generator/mod.rs index d972e9fb128..fc0abc7f273 100644 --- a/shared/tree-sitter-extractor/src/generator/mod.rs +++ b/shared/tree-sitter-extractor/src/generator/mod.rs @@ -17,6 +17,7 @@ pub fn generate( languages: Vec, dbscheme_path: PathBuf, ql_library_path: PathBuf, + overlay_support: bool, ) -> std::io::Result<()> { let dbscheme_file = File::create(dbscheme_path).map_err(|e| { tracing::error!("Failed to create dbscheme file: {}", e); @@ -32,6 +33,16 @@ pub fn generate( writeln!(dbscheme_writer, include_str!("prefix.dbscheme"))?; + // Eventually all languages will have the metadata relation (for overlay support), at which + // point this could be moved to prefix.dbscheme. + if overlay_support { + writeln!(dbscheme_writer, "/*- Database metadata -*/",)?; + dbscheme::write( + &mut dbscheme_writer, + &[dbscheme::Entry::Table(create_database_metadata())], + )?; + } + let mut ql_writer = LineWriter::new(File::create(ql_library_path)?); writeln!( ql_writer, @@ -49,6 +60,15 @@ pub fn generate( })], )?; + if overlay_support { + ql::write( + &mut ql_writer, + &[ql::TopLevel::Predicate( + ql_gen::create_is_overlay_predicate(), + )], + )?; + } + for language in languages { let prefix = node_types::to_snake_case(&language.name); let ast_node_name = format!("{}_ast_node", &prefix); @@ -92,6 +112,22 @@ pub fn generate( ql::TopLevel::Class(ql_gen::create_token_class(&token_name, &tokeninfo_name)), ql::TopLevel::Class(ql_gen::create_reserved_word_class(&reserved_word_name)), ]; + + if overlay_support { + body.push(ql::TopLevel::Predicate( + ql_gen::create_get_node_file_predicate(&ast_node_name, &node_location_table_name), + )); + body.push(ql::TopLevel::Predicate( + ql_gen::create_discard_file_predicate(), + )); + body.push(ql::TopLevel::Predicate( + ql_gen::create_discardable_ast_node_predicate(&ast_node_name), + )); + body.push(ql::TopLevel::Predicate( + ql_gen::create_discard_ast_node_predicate(&ast_node_name), + )); + } + body.append(&mut ql_gen::convert_nodes(&nodes)); ql::write( &mut ql_writer, @@ -442,3 +478,26 @@ fn create_token_case<'a>(name: &'a str, token_kinds: Map<&'a str, usize>) -> dbs branches, } } + +fn create_database_metadata() -> dbscheme::Table<'static> { + dbscheme::Table { + name: "databaseMetadata", + keysets: None, + columns: vec![ + dbscheme::Column { + db_type: dbscheme::DbColumnType::String, + name: "metadataKey", + unique: false, + ql_type: ql::Type::String, + ql_type_is_ref: true, + }, + dbscheme::Column { + db_type: dbscheme::DbColumnType::String, + name: "value", + unique: false, + ql_type: ql::Type::String, + ql_type_is_ref: true, + }, + ], + } +} diff --git a/shared/tree-sitter-extractor/src/generator/ql.rs b/shared/tree-sitter-extractor/src/generator/ql.rs index 8e899462ac3..e4c87b61bdb 100644 --- a/shared/tree-sitter-extractor/src/generator/ql.rs +++ b/shared/tree-sitter-extractor/src/generator/ql.rs @@ -6,6 +6,7 @@ pub enum TopLevel<'a> { Class(Class<'a>), Import(Import<'a>), Module(Module<'a>), + Predicate(Predicate<'a>), } impl fmt::Display for TopLevel<'_> { @@ -14,6 +15,7 @@ impl fmt::Display for TopLevel<'_> { TopLevel::Import(imp) => write!(f, "{}", imp), TopLevel::Class(cls) => write!(f, "{}", cls), TopLevel::Module(m) => write!(f, "{}", m), + TopLevel::Predicate(pred) => write!(f, "{}", pred), } } } @@ -68,10 +70,12 @@ impl fmt::Display for Class<'_> { qldoc: None, name: self.name, overridden: false, + is_private: false, is_final: false, return_type: None, formal_parameters: vec![], body: charpred.clone(), + overlay: None, } )?; } @@ -150,6 +154,7 @@ pub enum Expression<'a> { expr: Box>, second_expr: Option>>, }, + Negation(Box>), } impl fmt::Display for Expression<'_> { @@ -231,19 +236,28 @@ impl fmt::Display for Expression<'_> { } write!(f, ")") } + Expression::Negation(e) => write!(f, "not ({})", e), } } } +#[derive(Clone, Eq, PartialEq, Hash)] +pub enum OverlayAnnotation { + Local, + DiscardEntity, +} + #[derive(Clone, Eq, PartialEq, Hash)] pub struct Predicate<'a> { pub qldoc: Option, pub name: &'a str, pub overridden: bool, + pub is_private: bool, pub is_final: bool, pub return_type: Option>, pub formal_parameters: Vec>, pub body: Expression<'a>, + pub overlay: Option, } impl fmt::Display for Predicate<'_> { @@ -251,6 +265,17 @@ impl fmt::Display for Predicate<'_> { if let Some(qldoc) = &self.qldoc { write!(f, "/** {} */", qldoc)?; } + if let Some(overlay_annotation) = &self.overlay { + write!(f, "overlay[")?; + match overlay_annotation { + OverlayAnnotation::Local => write!(f, "local")?, + OverlayAnnotation::DiscardEntity => write!(f, "discard_entity")?, + } + write!(f, "] ")?; + } + if self.is_private { + write!(f, "private ")?; + } if self.is_final { write!(f, "final ")?; } diff --git a/shared/tree-sitter-extractor/src/generator/ql_gen.rs b/shared/tree-sitter-extractor/src/generator/ql_gen.rs index 919ff43af42..b5853410c1d 100644 --- a/shared/tree-sitter-extractor/src/generator/ql_gen.rs +++ b/shared/tree-sitter-extractor/src/generator/ql_gen.rs @@ -16,6 +16,7 @@ pub fn create_ast_node_class<'a>( )), name: "toString", overridden: false, + is_private: false, is_final: false, return_type: Some(ql::Type::String), formal_parameters: vec![], @@ -27,11 +28,13 @@ pub fn create_ast_node_class<'a>( vec![], )), ), + overlay: None, }; let get_location = ql::Predicate { name: "getLocation", qldoc: Some(String::from("Gets the location of this element.")), overridden: false, + is_private: false, is_final: true, return_type: Some(ql::Type::Normal("L::Location")), formal_parameters: vec![], @@ -39,6 +42,7 @@ pub fn create_ast_node_class<'a>( node_location_table, vec![ql::Expression::Var("this"), ql::Expression::Var("result")], ), + overlay: None, }; let get_a_field_or_child = create_none_predicate( Some(String::from("Gets a field or child node of this node.")), @@ -50,6 +54,7 @@ pub fn create_ast_node_class<'a>( qldoc: Some(String::from("Gets the parent of this element.")), name: "getParent", overridden: false, + is_private: false, is_final: true, return_type: Some(ql::Type::Normal("AstNode")), formal_parameters: vec![], @@ -61,6 +66,7 @@ pub fn create_ast_node_class<'a>( ql::Expression::Var("_"), ], ), + overlay: None, }; let get_parent_index = ql::Predicate { qldoc: Some(String::from( @@ -68,6 +74,7 @@ pub fn create_ast_node_class<'a>( )), name: "getParentIndex", overridden: false, + is_private: false, is_final: true, return_type: Some(ql::Type::Int), formal_parameters: vec![], @@ -79,6 +86,7 @@ pub fn create_ast_node_class<'a>( ql::Expression::Var("result"), ], ), + overlay: None, }; let get_a_primary_ql_class = ql::Predicate { qldoc: Some(String::from( @@ -86,6 +94,7 @@ pub fn create_ast_node_class<'a>( )), name: "getAPrimaryQlClass", overridden: false, + is_private: false, is_final: false, return_type: Some(ql::Type::String), formal_parameters: vec![], @@ -93,6 +102,7 @@ pub fn create_ast_node_class<'a>( Box::new(ql::Expression::Var("result")), Box::new(ql::Expression::String("???")), ), + overlay: None, }; let get_primary_ql_classes = ql::Predicate { qldoc: Some( @@ -102,6 +112,7 @@ pub fn create_ast_node_class<'a>( ), name: "getPrimaryQlClasses", overridden: false, + is_private: false, is_final: false, return_type: Some(ql::Type::String), formal_parameters: vec![], @@ -119,6 +130,7 @@ pub fn create_ast_node_class<'a>( second_expr: Some(Box::new(ql::Expression::String(","))), }), ), + overlay: None, }; ql::Class { qldoc: Some(String::from("The base class for all AST nodes")), @@ -144,10 +156,12 @@ pub fn create_token_class<'a>(token_type: &'a str, tokeninfo: &'a str) -> ql::Cl qldoc: Some(String::from("Gets the value of this token.")), name: "getValue", overridden: false, + is_private: false, is_final: true, return_type: Some(ql::Type::String), formal_parameters: vec![], body: create_get_field_expr_for_column_storage("result", tokeninfo, 1, tokeninfo_arity), + overlay: None, }; let to_string = ql::Predicate { qldoc: Some(String::from( @@ -155,6 +169,7 @@ pub fn create_token_class<'a>(token_type: &'a str, tokeninfo: &'a str) -> ql::Cl )), name: "toString", overridden: true, + is_private: false, is_final: true, return_type: Some(ql::Type::String), formal_parameters: vec![], @@ -166,6 +181,7 @@ pub fn create_token_class<'a>(token_type: &'a str, tokeninfo: &'a str) -> ql::Cl vec![], )), ), + overlay: None, }; ql::Class { qldoc: Some(String::from("A token.")), @@ -210,10 +226,12 @@ fn create_none_predicate<'a>( qldoc, name, overridden, + is_private: false, is_final: false, return_type, formal_parameters: Vec::new(), body: ql::Expression::Pred("none", vec![]), + overlay: None, } } @@ -226,6 +244,7 @@ fn create_get_a_primary_ql_class(class_name: &str, is_final: bool) -> ql::Predic )), name: "getAPrimaryQlClass", overridden: true, + is_private: false, is_final, return_type: Some(ql::Type::String), formal_parameters: vec![], @@ -233,6 +252,166 @@ fn create_get_a_primary_ql_class(class_name: &str, is_final: bool) -> ql::Predic Box::new(ql::Expression::Var("result")), Box::new(ql::Expression::String(class_name)), ), + overlay: None, + } +} + +pub fn create_is_overlay_predicate() -> ql::Predicate<'static> { + ql::Predicate { + name: "isOverlay", + qldoc: Some(String::from("Holds if the database is an overlay.")), + overridden: false, + is_private: true, + is_final: false, + return_type: None, + overlay: Some(ql::OverlayAnnotation::Local), + formal_parameters: vec![], + body: ql::Expression::Pred( + "databaseMetadata", + vec![ + ql::Expression::String("isOverlay"), + ql::Expression::String("true"), + ], + ), + } +} + +pub fn create_get_node_file_predicate<'a>( + ast_node_name: &'a str, + node_location_table_name: &'a str, +) -> ql::Predicate<'a> { + ql::Predicate { + name: "getNodeFile", + qldoc: Some(String::from("Gets the file containing the given `node`.")), + overridden: false, + is_private: true, + is_final: false, + overlay: Some(ql::OverlayAnnotation::Local), + return_type: Some(ql::Type::At("file")), + formal_parameters: vec![ql::FormalParameter { + name: "node", + param_type: ql::Type::At(ast_node_name), + }], + body: ql::Expression::Aggregate { + name: "exists", + vars: vec![ql::FormalParameter { + name: "loc", + param_type: ql::Type::At("location_default"), + }], + range: Some(Box::new(ql::Expression::Pred( + node_location_table_name, + vec![ql::Expression::Var("node"), ql::Expression::Var("loc")], + ))), + expr: Box::new(ql::Expression::Pred( + "locations_default", + vec![ + ql::Expression::Var("loc"), + ql::Expression::Var("result"), + ql::Expression::Var("_"), + ql::Expression::Var("_"), + ql::Expression::Var("_"), + ql::Expression::Var("_"), + ], + )), + second_expr: None, + }, + } +} + +pub fn create_discard_file_predicate<'a>() -> ql::Predicate<'a> { + ql::Predicate { + name: "discardFile", + qldoc: Some(String::from( + "Holds if `file` was extracted as part of the overlay database.", + )), + overridden: false, + is_private: true, + is_final: false, + overlay: Some(ql::OverlayAnnotation::Local), + return_type: None, + formal_parameters: vec![ql::FormalParameter { + name: "file", + param_type: ql::Type::At("file"), + }], + body: ql::Expression::And(vec![ + ql::Expression::Pred("isOverlay", vec![]), + ql::Expression::Equals( + Box::new(ql::Expression::Var("file")), + Box::new(ql::Expression::Pred( + "getNodeFile", + vec![ql::Expression::Var("_")], + )), + ), + ]), + } +} + +pub fn create_discardable_ast_node_predicate(ast_node_name: &str) -> ql::Predicate { + ql::Predicate { + name: "discardableAstNode", + qldoc: Some(String::from( + "Holds if `node` is in the `file` and is part of the overlay base database.", + )), + overridden: false, + is_private: true, + is_final: false, + overlay: Some(ql::OverlayAnnotation::Local), + return_type: None, + formal_parameters: vec![ + ql::FormalParameter { + name: "file", + param_type: ql::Type::At("file"), + }, + ql::FormalParameter { + name: "node", + param_type: ql::Type::At(ast_node_name), + }, + ], + body: ql::Expression::And(vec![ + ql::Expression::Negation(Box::new(ql::Expression::Pred("isOverlay", vec![]))), + ql::Expression::Equals( + Box::new(ql::Expression::Var("file")), + Box::new(ql::Expression::Pred( + "getNodeFile", + vec![ql::Expression::Var("node")], + )), + ), + ]), + } +} + +pub fn create_discard_ast_node_predicate(ast_node_name: &str) -> ql::Predicate { + ql::Predicate { + name: "discardAstNode", + qldoc: Some(String::from( + "Holds if `node` should be discarded, because it is part of the overlay base \ + and is in a file that was also extracted as part of the overlay database.", + )), + overridden: false, + is_private: true, + is_final: false, + overlay: Some(ql::OverlayAnnotation::DiscardEntity), + return_type: None, + formal_parameters: vec![ql::FormalParameter { + name: "node", + param_type: ql::Type::At(ast_node_name), + }], + body: ql::Expression::Aggregate { + name: "exists", + vars: vec![ql::FormalParameter { + name: "file", + param_type: ql::Type::At("file"), + }], + range: None, + expr: Box::new(ql::Expression::And(vec![ + ql::Expression::Pred( + "discardableAstNode", + vec![ql::Expression::Var("file"), ql::Expression::Var("node")], + ), + ql::Expression::Pred("discardFile", vec![ql::Expression::Var("file")]), + ])), + second_expr: None, + }, } } @@ -435,10 +614,12 @@ fn create_field_getters<'a>( qldoc: Some(qldoc), name: &field.getter_name, overridden: false, + is_private: false, is_final: true, return_type, formal_parameters, body, + overlay: None, }, optional_expr, ) @@ -548,10 +729,12 @@ pub fn convert_nodes(nodes: &node_types::NodeTypeMap) -> Vec { qldoc: Some(String::from("Gets a field or child node of this node.")), name: "getAFieldOrChild", overridden: true, + is_private: false, is_final: true, return_type: Some(ql::Type::Normal("AstNode")), formal_parameters: vec![], body: ql::Expression::Or(get_child_exprs), + overlay: None, }); classes.push(ql::TopLevel::Class(main_class)); diff --git a/shared/tutorial/CHANGELOG.md b/shared/tutorial/CHANGELOG.md index a5290f62bb3..92ac100d5c8 100644 --- a/shared/tutorial/CHANGELOG.md +++ b/shared/tutorial/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.26 + +No user-facing changes. + ## 1.0.25 No user-facing changes. diff --git a/shared/tutorial/change-notes/released/1.0.26.md b/shared/tutorial/change-notes/released/1.0.26.md new file mode 100644 index 00000000000..4920e2b2435 --- /dev/null +++ b/shared/tutorial/change-notes/released/1.0.26.md @@ -0,0 +1,3 @@ +## 1.0.26 + +No user-facing changes. diff --git a/shared/tutorial/codeql-pack.release.yml b/shared/tutorial/codeql-pack.release.yml index a5a44030e85..125d169e44f 100644 --- a/shared/tutorial/codeql-pack.release.yml +++ b/shared/tutorial/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.25 +lastReleaseVersion: 1.0.26 diff --git a/shared/tutorial/qlpack.yml b/shared/tutorial/qlpack.yml index 2ecf5730d21..017db79a823 100644 --- a/shared/tutorial/qlpack.yml +++ b/shared/tutorial/qlpack.yml @@ -1,7 +1,7 @@ name: codeql/tutorial description: Library for the CodeQL detective tutorials, helping new users learn to write CodeQL queries. -version: 1.0.26-dev +version: 1.0.27-dev groups: shared library: true warnOnImplicitThis: true diff --git a/shared/typeflow/CHANGELOG.md b/shared/typeflow/CHANGELOG.md index 2283f741ca7..7fa72fbd343 100644 --- a/shared/typeflow/CHANGELOG.md +++ b/shared/typeflow/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.26 + +No user-facing changes. + ## 1.0.25 No user-facing changes. diff --git a/shared/typeflow/change-notes/released/1.0.26.md b/shared/typeflow/change-notes/released/1.0.26.md new file mode 100644 index 00000000000..4920e2b2435 --- /dev/null +++ b/shared/typeflow/change-notes/released/1.0.26.md @@ -0,0 +1,3 @@ +## 1.0.26 + +No user-facing changes. diff --git a/shared/typeflow/codeql-pack.release.yml b/shared/typeflow/codeql-pack.release.yml index a5a44030e85..125d169e44f 100644 --- a/shared/typeflow/codeql-pack.release.yml +++ b/shared/typeflow/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.25 +lastReleaseVersion: 1.0.26 diff --git a/shared/typeflow/qlpack.yml b/shared/typeflow/qlpack.yml index 119a36067be..74b59ee1f74 100644 --- a/shared/typeflow/qlpack.yml +++ b/shared/typeflow/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/typeflow -version: 1.0.26-dev +version: 1.0.27-dev groups: shared library: true dependencies: diff --git a/shared/typeinference/CHANGELOG.md b/shared/typeinference/CHANGELOG.md index ad2e63eb470..8f58f5145db 100644 --- a/shared/typeinference/CHANGELOG.md +++ b/shared/typeinference/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.0.7 + +No user-facing changes. + ## 0.0.6 No user-facing changes. diff --git a/shared/typeinference/change-notes/released/0.0.7.md b/shared/typeinference/change-notes/released/0.0.7.md new file mode 100644 index 00000000000..84da6f18c42 --- /dev/null +++ b/shared/typeinference/change-notes/released/0.0.7.md @@ -0,0 +1,3 @@ +## 0.0.7 + +No user-facing changes. diff --git a/shared/typeinference/codeql-pack.release.yml b/shared/typeinference/codeql-pack.release.yml index cf398ce02aa..a2a5484910b 100644 --- a/shared/typeinference/codeql-pack.release.yml +++ b/shared/typeinference/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 0.0.6 +lastReleaseVersion: 0.0.7 diff --git a/shared/typeinference/qlpack.yml b/shared/typeinference/qlpack.yml index 32fd6de02e8..2b9a8d3ee2d 100644 --- a/shared/typeinference/qlpack.yml +++ b/shared/typeinference/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/typeinference -version: 0.0.7-dev +version: 0.0.8-dev groups: shared library: true dependencies: diff --git a/shared/typetracking/CHANGELOG.md b/shared/typetracking/CHANGELOG.md index 6e434da1f77..58e9c8119af 100644 --- a/shared/typetracking/CHANGELOG.md +++ b/shared/typetracking/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.0.10 + +No user-facing changes. + ## 2.0.9 No user-facing changes. diff --git a/shared/typetracking/change-notes/released/2.0.10.md b/shared/typetracking/change-notes/released/2.0.10.md new file mode 100644 index 00000000000..37310f107aa --- /dev/null +++ b/shared/typetracking/change-notes/released/2.0.10.md @@ -0,0 +1,3 @@ +## 2.0.10 + +No user-facing changes. diff --git a/shared/typetracking/codeql-pack.release.yml b/shared/typetracking/codeql-pack.release.yml index ce305265e33..96ea0220a69 100644 --- a/shared/typetracking/codeql-pack.release.yml +++ b/shared/typetracking/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 2.0.9 +lastReleaseVersion: 2.0.10 diff --git a/shared/typetracking/qlpack.yml b/shared/typetracking/qlpack.yml index 193e743290e..a0fbd70f893 100644 --- a/shared/typetracking/qlpack.yml +++ b/shared/typetracking/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/typetracking -version: 2.0.10-dev +version: 2.0.11-dev groups: shared library: true dependencies: diff --git a/shared/typos/CHANGELOG.md b/shared/typos/CHANGELOG.md index 62be8d62137..47359494704 100644 --- a/shared/typos/CHANGELOG.md +++ b/shared/typos/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.26 + +No user-facing changes. + ## 1.0.25 No user-facing changes. diff --git a/shared/typos/change-notes/released/1.0.26.md b/shared/typos/change-notes/released/1.0.26.md new file mode 100644 index 00000000000..4920e2b2435 --- /dev/null +++ b/shared/typos/change-notes/released/1.0.26.md @@ -0,0 +1,3 @@ +## 1.0.26 + +No user-facing changes. diff --git a/shared/typos/codeql-pack.release.yml b/shared/typos/codeql-pack.release.yml index a5a44030e85..125d169e44f 100644 --- a/shared/typos/codeql-pack.release.yml +++ b/shared/typos/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.25 +lastReleaseVersion: 1.0.26 diff --git a/shared/typos/qlpack.yml b/shared/typos/qlpack.yml index 205c84402c0..2abd1968562 100644 --- a/shared/typos/qlpack.yml +++ b/shared/typos/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/typos -version: 1.0.26-dev +version: 1.0.27-dev groups: shared library: true warnOnImplicitThis: true diff --git a/shared/util/CHANGELOG.md b/shared/util/CHANGELOG.md index e9eb55238ef..c8832ace022 100644 --- a/shared/util/CHANGELOG.md +++ b/shared/util/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.0.13 + +No user-facing changes. + ## 2.0.12 No user-facing changes. diff --git a/shared/util/change-notes/released/2.0.13.md b/shared/util/change-notes/released/2.0.13.md new file mode 100644 index 00000000000..39a24682b50 --- /dev/null +++ b/shared/util/change-notes/released/2.0.13.md @@ -0,0 +1,3 @@ +## 2.0.13 + +No user-facing changes. diff --git a/shared/util/codeql-pack.release.yml b/shared/util/codeql-pack.release.yml index b856d9a13f2..30d169d6eb8 100644 --- a/shared/util/codeql-pack.release.yml +++ b/shared/util/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 2.0.12 +lastReleaseVersion: 2.0.13 diff --git a/shared/util/qlpack.yml b/shared/util/qlpack.yml index 5ed3783fded..6bebbd01336 100644 --- a/shared/util/qlpack.yml +++ b/shared/util/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/util -version: 2.0.13-dev +version: 2.0.14-dev groups: shared library: true dependencies: null diff --git a/shared/xml/CHANGELOG.md b/shared/xml/CHANGELOG.md index 1af448dd16d..a201e0d013f 100644 --- a/shared/xml/CHANGELOG.md +++ b/shared/xml/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.26 + +No user-facing changes. + ## 1.0.25 No user-facing changes. diff --git a/shared/xml/change-notes/released/1.0.26.md b/shared/xml/change-notes/released/1.0.26.md new file mode 100644 index 00000000000..4920e2b2435 --- /dev/null +++ b/shared/xml/change-notes/released/1.0.26.md @@ -0,0 +1,3 @@ +## 1.0.26 + +No user-facing changes. diff --git a/shared/xml/codeql-pack.release.yml b/shared/xml/codeql-pack.release.yml index a5a44030e85..125d169e44f 100644 --- a/shared/xml/codeql-pack.release.yml +++ b/shared/xml/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.25 +lastReleaseVersion: 1.0.26 diff --git a/shared/xml/qlpack.yml b/shared/xml/qlpack.yml index 3c979618613..d0e1fc1af1f 100644 --- a/shared/xml/qlpack.yml +++ b/shared/xml/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/xml -version: 1.0.26-dev +version: 1.0.27-dev groups: shared library: true dependencies: diff --git a/shared/yaml/CHANGELOG.md b/shared/yaml/CHANGELOG.md index 7944d8a4a2f..74fcb889c9c 100644 --- a/shared/yaml/CHANGELOG.md +++ b/shared/yaml/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.26 + +No user-facing changes. + ## 1.0.25 No user-facing changes. diff --git a/shared/yaml/change-notes/released/1.0.26.md b/shared/yaml/change-notes/released/1.0.26.md new file mode 100644 index 00000000000..4920e2b2435 --- /dev/null +++ b/shared/yaml/change-notes/released/1.0.26.md @@ -0,0 +1,3 @@ +## 1.0.26 + +No user-facing changes. diff --git a/shared/yaml/codeql-pack.release.yml b/shared/yaml/codeql-pack.release.yml index a5a44030e85..125d169e44f 100644 --- a/shared/yaml/codeql-pack.release.yml +++ b/shared/yaml/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.0.25 +lastReleaseVersion: 1.0.26 diff --git a/shared/yaml/qlpack.yml b/shared/yaml/qlpack.yml index 4dad8cfd7f9..258719e3193 100644 --- a/shared/yaml/qlpack.yml +++ b/shared/yaml/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/yaml -version: 1.0.26-dev +version: 1.0.27-dev groups: shared library: true warnOnImplicitThis: true diff --git a/swift/ql/.generated.list b/swift/ql/.generated.list index f693ce9e9fc..f8da120e0d4 100644 --- a/swift/ql/.generated.list +++ b/swift/ql/.generated.list @@ -1032,111 +1032,37 @@ lib/codeql/swift/generated/type/UnownedStorageType.qll bbab372902a625c16b2d9a058 lib/codeql/swift/generated/type/UnresolvedType.qll 3b99e19ca7177619fb79e6e8511df915811b7b9078c0bc9ae47cf3b79e923407 b715e01583738b5e8fb2f6640d8f390bad8f5ad6d8c25ad771dfabbe5736bfaa lib/codeql/swift/generated/type/VariadicSequenceType.qll 7ece2c953e24d1c51715610f2813bd97f6d9fc6e58e5df0aacadad31e1fd1d8f be0005d973fd7c4c937fc340711fafe7ceba592ac407b88731bc35a1c2800aeb lib/codeql/swift/generated/type/WeakStorageType.qll d46b67f2b7bcc8aa7599e38506e91c219f894df4668ff1f0b5b66c1858040f5b c8e34ec9df085d938e36492d172fbf84ca56fc9d805713b8ada92e1b4c7bef54 -test/extractor-tests/generated/AvailabilityInfo/AvailabilityInfo.ql f174aa20e00010baed0000eddee62f7b70d4ce950e5f9c0cb0bd5b6f1d8dc908 170049771ebcf54ceb603e089f93516749322dd6d7bf89e4636e3b4eedd773e0 -test/extractor-tests/generated/AvailabilityInfo/AvailabilityInfo_getSpec.ql 6ee83b1f24d961c736a1579c0282ca560a2a916ffe73bb9eb2c6d14b3cddcdb0 fee90d8b1c1379bd2f7443387a3a1eb3afd7e3e7f65d39b665cc08e9f83f362f +test/extractor-tests/generated/AvailabilityInfo/AvailabilityInfo.ql 0bb0cfe3f8c38af3b870f8c404c16a5715e80d5ea8fd7939cc13032d7b824809 142ae1e76138b287aa66e091683aae545d139ef2971624e2dfdd3ea454bc2d05 test/extractor-tests/generated/Comment/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d -test/extractor-tests/generated/Diagnostics/Diagnostics.ql ee50220080a1a5df7772ab043e8aae30e3d83e45b69aa40bda12c7d272d33568 c1b41b0cfa03a0431b8a2d23dde2f194e5b9262f5a317103818b595e4f00fee0 -test/extractor-tests/generated/File/File.ql c0af919359546affceeff4f0152b8bfffe430b647016da803d6650acbb142920 e6441061e0eb14577a4e00e8e25c38219ab749b49dc66b26fe786ab5e080a8e5 -test/extractor-tests/generated/KeyPathComponent/KeyPathComponent.ql fa80af728ad8ca6da700925ada7f166324de6691acef51e01a29b10387312f76 9314cda502475b1fee74903c9fd8f1e2c930f5b16a824d9f3f5a2fbb1730ef6e -test/extractor-tests/generated/KeyPathComponent/KeyPathComponent_getDeclRef.ql 40442888d4673d92b7d4a20cbb487f887fee1dc8674d98b68fc4ab0837f9c5de 7612174b502524749c26800599d6a332a4022ef544c39fc86733193a18d6811d -test/extractor-tests/generated/KeyPathComponent/KeyPathComponent_getSubscriptArgument.ql 8c33add02f42abcd9814b7e138bee9d650f6f6360ce792fb0b5d49552513d7bf 16efaf1af88c67c64e0c7a88dbf2c5c6c259a40115cb520e5d2e9545e0ea20e0 -test/extractor-tests/generated/KeyPathComponent/KeyPathComponent_getTupleIndex.ql c55da7366086c0a927e23fbaf5cb2ebab50ac4eafde206b59efad96edd0545ff dc1cd851d68fd307a1f101a4cd94ec971475bdd2b26fb82a8566b4a99d0aa505 +test/extractor-tests/generated/Diagnostics/Diagnostics.ql c1f8be2c283e13c1a4dadaa008e42f660ea09d9ee1de22b0e8493ef76384546e d84efa40eaecbce6b928a5b235e10bf1e4409a9d0778c365ec19d2fade7ab3ab +test/extractor-tests/generated/File/File.ql a1385ef2080e04e8757f61b8e1d0129df9f955edf03fbb3b83cc9cb5498b4e95 0364d8c7f108d01b2641f996efedab7084956307e875e6bc078ea677d04267e0 +test/extractor-tests/generated/KeyPathComponent/KeyPathComponent.ql 3fa617f8ed1b308d0c56f429ee8abe6d33ef60bf57d87f6dc89fdc8fe969a102 c2fa3153077dbe9e0fc608524dc03c82ff4ed460364d341ee6a817b0d75291c3 test/extractor-tests/generated/OtherAvailabilitySpec/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d test/extractor-tests/generated/PlatformVersionAvailabilitySpec/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d -test/extractor-tests/generated/decl/Accessor/Accessor.ql fb3e3b8096ed6f9de299f73383194520bcd0a96f4e215e1945456e0c2beaa2a0 cc66788194840b4c5c57e9cbd8f7072655fa9947f2da36cf9f59463ea070d409 -test/extractor-tests/generated/decl/Accessor/Accessor_getBody.ql 89660097038fe210b72373ed6ea4d6e6cc6505a45d8e0892b53e265bb1d2c398 9abec75977ca2f5328ff6730b3b40c264cc385961c2685351c869a359c5afeb4 -test/extractor-tests/generated/decl/Accessor/Accessor_getCapture.ql 15011012186c6111d5eace2f5ad34747adaa5e84d044a98bb7da17b08695c69d 60411e7886e5cfc211c10881b6e061e02597690eccd714fff2a51874e4088d27 -test/extractor-tests/generated/decl/Accessor/Accessor_getGenericTypeParam.ql 92b13b69f0b64abd16eecbf38eae4ff1a7006617639b80c0f22b651caeb40da6 06113682dda3ff88688b6689953e21b0b8ead5d019fc56ff7752b19b46711a4d -test/extractor-tests/generated/decl/Accessor/Accessor_getMember.ql 84b36dc43f829791db6407df98e563ea4a87b42f69aad41358e175bf3f352afa 854e6bc7f0fe1dc4d3a9f069e2eb8921ea176874c44ad153dca03c2aa46d8c69 -test/extractor-tests/generated/decl/Accessor/Accessor_getName.ql df32edf0b05ade5f99508182473d2bf0ee3c69d8a58db2741d13c65d16c2ea52 0d4feea5683ca76b614a7e3da6f48ba9aefc188b77dc5bf3fa9234289f38f638 -test/extractor-tests/generated/decl/Accessor/Accessor_getParam.ql f1ab4808a4222ea6b1e649a5009f2667b7b2be471cea87b26a2cf91751555bcb 519e608cba95a9a20bcfee3049bb89b61b1b4ffec042ba5f15e554712187a809 -test/extractor-tests/generated/decl/Accessor/Accessor_getSelfParam.ql 8d4a1d9ad69b5b227b9b6a6ba546ad15c4b948b32f5871d18db17c24a8f94454 812a80f1670d4ce5392da523d53007910df3de71a43ee34da852a543dd5a9f92 -test/extractor-tests/generated/decl/AssociatedTypeDecl/AssociatedTypeDecl.ql 9a22cd6a43fb6b46df471bd544b3330d5118e64cca3aef2c5ce3b0ba7fd9b8fa 30dd927155853ac2374752c5713605afe925f40547fbe9314159e343837c7e00 -test/extractor-tests/generated/decl/AssociatedTypeDecl/AssociatedTypeDecl_getInheritedType.ql 7c399b5b1f763df5a92fe9e7258e1bca0bd57b4854865bd2f1b03154cc1e5bb4 f89a5913baa4c530bad70218660be764608e59608a104d6a219e980f2e6f1625 -test/extractor-tests/generated/decl/AssociatedTypeDecl/AssociatedTypeDecl_getMember.ql 778ef3e569f5774ae3bce286fb47342cb6cda9b47b8074942b542a1c8f18b169 2aec4012a21cf0ee4f1a7c5c726c233d61a2051210e13b2028a2ae7457609e88 -test/extractor-tests/generated/decl/CapturedDecl/CapturedDecl.ql 2730b05c8835a78815f97e0be1dfe38140a32ed81b3bd660428265fb898efbbd 3837a2cf9436aeb730f18a144934af75e6f9343b72e331200c53a64d02a0c3af -test/extractor-tests/generated/decl/CapturedDecl/CapturedDecl_getMember.ql c0ec9ec2677d30a3ffe9ed4e02a0a104fdb1245467c38dbb218a672a6996db7d 4b7e83d64879c63a234a7f66e0dd455b2fbd31ba0d718ec8eb32c35eef867496 -test/extractor-tests/generated/decl/ClassDecl/ClassDecl.ql ef3bb618dc93fe6862ab2fdf05067ee59946b6ae12af5709ea66892a6806dd2d 5d2c42b3517826ed3fac5d06f15e54cd20abf72e980c7397251fecf79176fd40 -test/extractor-tests/generated/decl/ClassDecl/ClassDecl_getGenericTypeParam.ql bf372b6dd01a22ff4705a9bba5ab8524081eb586c17201dcad257cff5b3fc159 06c9ead259d50321db18e259b32734a473b070c40eb76c9bdf11b1f8f72cd57b -test/extractor-tests/generated/decl/ClassDecl/ClassDecl_getInheritedType.ql da903d8cd38e725a0ad9d754c4d65aa576d906da930628b4d1351a0760e8c5b6 6b4d68db4f2aa2053b700b96171504f7c5dde433397987356b001d198a847331 -test/extractor-tests/generated/decl/ClassDecl/ClassDecl_getMember.ql a34a907c3b0809e2a24cdba315a20993eff60c0d7cf2e015e26f70f240357f93 b12262cf6b27973375e623e221f9ff1084376cb5266289b2728f29095671cb7c -test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl.ql baf497f323a7aea6966f0ad475a238dddd1162a18fccde12c7fe62559f07b97b 8ce68bab8901b911459d4a61fe23abe6c70670137670867a466af3a31238c691 -test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getAccessor.ql aa3777eeb59781b9f0a48e6d077f60704c73752fd348e66a4cdaaf1f18990c0b b59c2621b2147723ff1055f35dba143e3a7c464f27ebcdb4627d6bf399195f3e -test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getAttachedPropertyWrapperType.ql 98829d2dfd0a0f268b116f377f8956e18afe8ef293b30870bc6fca1a6abd1ad9 c080da788925c79302d2f8d0a731d6e8dc6bc03362176f1a64a55bdbbb544025 -test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getMember.ql dd014d28ef8542a220461740b02268331f8b3d2118a09276d4d3fc47060e82d0 c4b8748d4a8a6f95d4e65c69c6b4833b1bf7e7444eeb494ede8ac34367f15445 -test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getParentInitializer.ql bfea99ccd17bf2b8bf32efc7ce9889b2075a009f2dc8a3eead69b793deed5a54 6b3b87195b0cb19f48c7a28bc6eb167dc98b09d169587d31b1c2b12216826ab8 -test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getParentPattern.ql fc806a2fe3e41463fb1e89d03e33ad1fd5adb75614c1fe0698a8f8f587f6745d 35f470623dc23b5f8c2839f305e3881181a16a06ab15c2fe8adb39c41d84a527 -test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getPropertyWrapperBackingVar.ql bee0520be50b0b2567a31e204a23c5ee95ee8d96e2644661915ac87cd4308df7 d755aaedf1255fc29235fcbeac49c01b889443573ef3e653708f058dc9bc3cde -test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getPropertyWrapperBackingVarBinding.ql 9aea239684dc11eb93a6b43a0ffba5a24c2be2d870a086189d87625d803f1f95 ccad85fe6eb6f42b85c43c881746f2bd25687d142aaba7e3bc7b34740645ffc4 -test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getPropertyWrapperProjectionVar.ql 6ab6f45c518af82b5c96767c83bb11fd20e9ea82c6c334f88584f06d082a5c23 56e71de6ab53cd24532cfd441d1c05e863dd200db23448d9d35ea6be2e54472b -test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getPropertyWrapperProjectionVarBinding.ql 61a3ff69ca5833184f6f43aeb676734f2ef4d62cd30a122f6749e6dbf139e531 100ee61c1977e441d0bee9dd45753541312bf51e530dd3e1d9486b78b3d63170 +test/extractor-tests/generated/decl/Accessor/Accessor.ql 74d288273f26d2551ed661f0c729ae561c76c21976c3f539d4ba135d92d3aba5 e237e6ca8db21afea6c96558aae873ede63feaa81b0e6038234ab7856a0d95d4 +test/extractor-tests/generated/decl/AssociatedTypeDecl/AssociatedTypeDecl.ql 55a78a6b96a17532178a39bd39aa4df23295f98019bb00de041ba15dfd4f84d9 51dbcd86203d5d031d748f77943a81c2c50de4ff559af20a4a1a682a19978d4f +test/extractor-tests/generated/decl/CapturedDecl/CapturedDecl.ql fd62be6c38d39f371c20e8c2f233e37a9da5aa234588920634f5db67e8beb3bd d51d35d4fd6a21cd596e064e0221d0c86e36312412a9bd4e64f431c123f3019a +test/extractor-tests/generated/decl/ClassDecl/ClassDecl.ql d5fa7f68307e2e3e7ad060a125bda148e4a28f6acbef08a1a975bbf9ba947641 46d1e4f801414f1c869601dc706e41393e5fcd399e51da593c1e58737f6ff427 +test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl.ql 936ac4aa52a55bd5bb4c75c117fffcc00208b9f502ff7ee05acbaad7d48a52fb d80346fe34d40910f5ecdb33d7266b6e4d1ec79f8d767c7da5e2ab780f201457 test/extractor-tests/generated/decl/Deinitializer/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d -test/extractor-tests/generated/decl/EnumDecl/EnumCaseDecl.ql 8c7faa72f99cbd02360f3a0ac37059952fbf58d54ad79dc5b81dff209953c433 631836e15e8cd7530fdcb4470ad82ff759b61086a50139d7d91ab8dd26bb6938 -test/extractor-tests/generated/decl/EnumDecl/EnumCaseDecl_getElement.ql bb20d76f377bc895884e0830990291e721d9a0f6570e6d0e8fcc67419aaf1712 2888b9a300a946461886337670acd028f018d1cfbc826910c173308ba79bfe3b -test/extractor-tests/generated/decl/EnumDecl/EnumCaseDecl_getMember.ql 9351d7a2595a431f1f9a52fe1fddc64acdf8923b708e8dcece6a8e00c3895c58 855c122ca985bf9cb7ee439f212912187bc13789e968e46ff6536e712ba1a6b0 -test/extractor-tests/generated/decl/EnumDecl/EnumDecl.ql 8a7ba0cd48fdf52f229ea1679c5828d79df9e800f76df8dfe9a878992f034f88 dfdede262a1323b1db2618721b01a5fd4b30c172bf8a374fe48a0d9f6b21bd39 -test/extractor-tests/generated/decl/EnumDecl/EnumDecl_getGenericTypeParam.ql b70205b500419d71909a8899d9f2099b2b8340978a0ec4e275f2007bfa610f8d b5009c8c3efba9e96bbcf15eb61644d8e77a95d1b955dabcbfc75c6c084d7ca0 -test/extractor-tests/generated/decl/EnumDecl/EnumDecl_getInheritedType.ql f55ba6b8a76621fc899eceab6bbeaba3619a1a4382c318369fc3dc17bc806082 ea0cff9bc7fd87efbec16bec998d672ab5b5a8f1f4e93c10dd87ac254076887c -test/extractor-tests/generated/decl/EnumDecl/EnumDecl_getMember.ql 5a4de48886bd8fd05b9e730aefcffbba28a090ed2d8d1aa331277820ab836b7f 999c92856eff3b34839adfe9daece97834ce9ede7fad1cfe0c2055e0f019f7ab -test/extractor-tests/generated/decl/EnumDecl/EnumElementDecl.ql bd00c56cf1d05707f29c4f31defc6a3ff25f41928688c2be992a92d4c5624859 3bd69b639f883e164fa6d1d4a3ad18aed86f88b93358636c5e118f1ca96eb878 -test/extractor-tests/generated/decl/EnumDecl/EnumElementDecl_getMember.ql e40260a5689d26c9bf2dfe17617e8a1480c720523e47f50273aeb7160a69f244 7ee294373de5bd22fc2c64a7acae4a94e9bdebf808c8e73a16a57b0dc3c295ac -test/extractor-tests/generated/decl/EnumDecl/EnumElementDecl_getParam.ql a507e55efcc13544d93c91c343a3df14b79114f259cb4dbec56d6f56e804d4e8 587bf774b4c4451ff873506624ccd379dd2fd7689460b4e24af96fbccadc0e6d -test/extractor-tests/generated/decl/ExtensionDecl/ExtensionDecl.ql 11a15a67f7b19e3d1fb5a2616420c23fde400848c8dbfcadb8e52a40130b92ad 502831fd3465ff06eba1dc6be365bee5fc2fcec96be44967a6579bbbdd395a32 -test/extractor-tests/generated/decl/ExtensionDecl/ExtensionDecl_getGenericTypeParam.ql bc57c794b106df3b9da47432ef3241849145d5e86ebf601cec08729f05e15956 bce4e2150ca2efe495e544a3a074c7ebc81f68bd2f3280a76f565d31acb091e2 -test/extractor-tests/generated/decl/ExtensionDecl/ExtensionDecl_getMember.ql 0883fcc244e06329738f242a36d0c33ee5228500e8f9d4508e4b5b32d863edfe 4fa99729397085d19b25415ed40e62dc2a555d7581c6c98895e635f7d502689b -test/extractor-tests/generated/decl/ExtensionDecl/ExtensionDecl_getProtocol.ql 040731ade8fb6cfe989fb62874c405a24256ca3947251d6799c8f53e144d2ce9 d5b37f663a19fba137735b85c070405d687d3e84c1850d93f43b50f77524357f +test/extractor-tests/generated/decl/EnumDecl/EnumCaseDecl.ql 7436bb7dfaa471f5a21ea2e3faba97d61bf53f930720999abdcc6745a65f0a1a 0241b2bb07c17136f6099185f65ea1266cd912296dfe481dce30eb9e3d1dd23f +test/extractor-tests/generated/decl/EnumDecl/EnumDecl.ql 47f20279f49388a4850df4f5ee61634e30beed58567eff891688c09942862ec2 8e11af1ceb07cab9738ffb25ac877ced712d1883a6514de5e8895cd1809a7bd8 +test/extractor-tests/generated/decl/EnumDecl/EnumElementDecl.ql 16caf5b014dea42a36b23eee6932c0818d94b1416e151ce46ba06a1fd2fb73ba cac704575b50613c8f8f297ce37c6d09ef943c94df4289643a4496103ac8388e +test/extractor-tests/generated/decl/ExtensionDecl/ExtensionDecl.ql 7293da617df8d12dae74a8c7a97230d6b34b64d0afc8629988eac09dde8bcbc6 56f1e7edf6424f14ade4b99b6e1e93fbdf678e300367c07200230b640bf8d358 test/extractor-tests/generated/decl/GenericTypeParamDecl/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d -test/extractor-tests/generated/decl/IfConfigDecl/IfConfigDecl.ql 5ae0037ea3fbe733ee57d4c9a77c6dbb9da7c2675f29e5c3222a01b000e950fc c3445704a6c19ba1ea0972538512d1bab4d754dadecb377266053bba33ceb368 -test/extractor-tests/generated/decl/IfConfigDecl/IfConfigDecl_getActiveElement.ql f8696eac357db4c69919baf49ab48a2ce972032414e6cac4af17cc8b45cfde18 fda5ce16fa25c68b10fb03817b0b62b759c85c4276bb9c71ccf94d53caf48820 -test/extractor-tests/generated/decl/IfConfigDecl/IfConfigDecl_getMember.ql d6cc4bf47ccd2886030480d979ca22b9eae294243bccf58e60a8d8cf3a9746fa 0e1b6be4f315efdd1680b11c48dbe35e38ad2831c09d904862f1e090891f3515 -test/extractor-tests/generated/decl/ImportDecl/ImportDecl.ql e35450ce046e77b9f52bf57a0560f5a1b5a2d009d2f91eb7373d6f0f6e97796b 1d4a4fb376d8f07cf21081867a5b8698f71b7fb911d42e6457e790a08ff39f51 -test/extractor-tests/generated/decl/ImportDecl/ImportDecl_getDeclaration.ql 5333ed76c38fcab69269778e8c7df40ef48470cda50b2f239c1b563976b241c2 d0e0b472c777b386c8c4c83ff6a18093ec9237eef2e96adcb8c7e8c7055a8f7a -test/extractor-tests/generated/decl/ImportDecl/ImportDecl_getImportedModule.ql 40e7c9d069e0c0e3d949c6de07c11fe5fffc45b37f0bfb5980c6b2941f007f6f 564c883c4e353b6bcf63a7bb89d6814f48ca39c170b624c0f87ae0c481e88729 -test/extractor-tests/generated/decl/ImportDecl/ImportDecl_getMember.ql e9960f040d3824e1398858433e90a22924bed3a3a83d59ced742a8db123edb69 9d4ca7ea49b9c2e3987b5b94ff68fbf76b68aa0eb50a2290fc69d534bebc777c +test/extractor-tests/generated/decl/IfConfigDecl/IfConfigDecl.ql b33916c742a97ea687a46aa337738666a4cf4854b394e3296582be0e8f0b7fb3 d1b4caf8bf04af0f11685f6381e52ca62dffbb6a50256be78dd686bf0a53df1d +test/extractor-tests/generated/decl/ImportDecl/ImportDecl.ql d5d5475363155fad37fd3f60a8eb22c324b8af52a91c065ee5fffe0f855a3b03 ac642144ecd2c5fbdfe628a88394646e5047d0db284d83b6a449654545456286 test/extractor-tests/generated/decl/InfixOperatorDecl/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d test/extractor-tests/generated/decl/Initializer/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d -test/extractor-tests/generated/decl/MacroDecl/MacroDecl.ql eb4881d91d1e690c636c66fd4b99f2080ad9be9107a4c037217cfd6bf55f7262 9d6abf1cf95fa591c3b091ebaaa723fb45540f6ef183353b5467f7e8539cb09f -test/extractor-tests/generated/decl/MacroDecl/MacroDecl_getGenericTypeParam.ql 6e48f56b27dd9722722af0297bc7e4b09bf553eedf3878d1ba381cf7b7cfe7ff 4438b07be12663dbd3652c365fe7cd5bcd8441829e5123fa450cd1645886e306 -test/extractor-tests/generated/decl/MacroDecl/MacroDecl_getMember.ql 38958bd32f98f921a163bccd5586c50298b4ea7ca3a4cd4d8c77741ad104df41 852b70f1fb3f623ef533df2be321c58a7d83ec60096717d0fb946288d1bd33b9 -test/extractor-tests/generated/decl/MacroDecl/MacroDecl_getParameter.ql a18f48ca9d1b9e2bd153e0b53d199eb24fa4a3fc57fd4089c1d6422cef8aa33c e20f1f8bea29b486a622825c3b86709a0c820c5e2497d48dfa765b142c1dd3ac -test/extractor-tests/generated/decl/MacroDecl/MacroDecl_getRole.ql ae3ed80e2847f2ee948eaa5969f11a974a149191a86d5f547a4ee3ddfba718ac 7ecd29a5088000aafaa782b550fe050911ee7ed84b5adcdbc6de0d8db0987e36 -test/extractor-tests/generated/decl/MacroDecl/MacroRole.ql 3b4446673db0e3efff7941bbf849cbb7c2e0700db0c41ab3fd7372e9aa3b0795 fd3b4ca3ea7f6ec98535e94ce00c336097d4603dd17af1d7652508775d9d7ea2 -test/extractor-tests/generated/decl/MacroDecl/MacroRole_getConformance.ql 3528a1dafa45e79b6fe25f6fcf9a2970afef8aeba482080fd9abc237ccfc3b0c 3d8773c7fc18e048ea735f4caf690a6b17d7ba0b398f5e68b205c73b9b77bdd7 -test/extractor-tests/generated/decl/MacroDecl/MacroRole_getName.ql 56bc7324c16dd4dc5bba987cefdb0741c9d0d636304d71db67e13463236ad463 7804da20b8ace3e6bdce2739fda4329536c5e846a1b53f9cb543925bc5443cda -test/extractor-tests/generated/decl/ModuleDecl/ModuleDecl.ql 00a8664146a134eb7d238a34b879c5db6ea86c842d18f0ea9ea53684a94fd889 9fee72637869bc2aa52d60eff2cf524e087dbf35d0764011754e9b84e95c8d97 -test/extractor-tests/generated/decl/ModuleDecl/ModuleDecl_getAnExportedModule.ql e80e2594595d646f857807a719575c5588778e2d116a60d8f222bb58e72148c5 f2d5dcd5a63e4ead11f8f93c0e17ed09a0cb0fd8aa1023d91ef725c848fca590 -test/extractor-tests/generated/decl/ModuleDecl/ModuleDecl_getAnImportedModule.ql d85c12bc7fe2732594ca27cf85de1649ab3ecb64c49439b48a18353386e250ea ed58651f5d1c767dcb17a679a780d4248d5de779d7fb1ffff13675867071ef6f -test/extractor-tests/generated/decl/ModuleDecl/ModuleDecl_getInheritedType.ql 624711472413d1bbcdcd01a805667bdebce7f4959f39016a5b4df60610eed019 e30f3e09e160784ae6170e05075b10cc03df7d3e44b9647be193abd7733e19e9 -test/extractor-tests/generated/decl/ModuleDecl/ModuleDecl_getMember.ql 2e6fad621c4a301b124336977ba5a6489e143d37e33deb330b993a06bf263069 c4622cd12ecf94fa1e413413ee3e5d38625d8c8ea6694473baf6b6e05d222ad9 -test/extractor-tests/generated/decl/NamedFunction/NamedFunction.ql bf58ac96d6fbc3294c5780000539486d52b7ed9ff797647b83c5914ee9c12cf2 5294555db2567fd78e7580ff899819ed4bb3000c8046a806828ae67098b3e743 -test/extractor-tests/generated/decl/NamedFunction/NamedFunction_getBody.ql 365c3f2bcf802880455e0523bc6d992740d08119cc307751f6accb031f60a8b9 0f0b9ff9c0dbebb0b7b177e01d9082647f5544fa4cb9fd4c2ac228538f37cd87 -test/extractor-tests/generated/decl/NamedFunction/NamedFunction_getCapture.ql 25d10d0d28cdf5eb73dc2be56eaefed13ccd9bf5808480a950f9d91a26db93e9 fcb2af9a0032c60d08a2025688886905c5f3792a6d017f0552bdfbb8c736c118 -test/extractor-tests/generated/decl/NamedFunction/NamedFunction_getGenericTypeParam.ql 60873ee0c149f7a66572c79a7e86e2c15e7b13bae618988e6a70b7f62ea01b65 be346e023edd258cd050645b6bcb2b1dfbab8a3012b473abd33ea1386471a4ea -test/extractor-tests/generated/decl/NamedFunction/NamedFunction_getMember.ql ab250e09cb289eacd7914ecdc45e9a7eafe6f95390fa2dee6257ab3083cc86a8 2adaeb858591ee6e94b36d53c4433fe6c0a88a4543c0857db0cd1d27d8d83372 -test/extractor-tests/generated/decl/NamedFunction/NamedFunction_getName.ql 7583b5d08f9a3809afb50b44c5bc9afa57ba23359080f132f25f21ef2bf41c73 4d89e13890f86e754389f21ecf75153d7c65abcce2b00a08a4911b49f3e5288d -test/extractor-tests/generated/decl/NamedFunction/NamedFunction_getParam.ql ae14b7e9c8dacc609056669a5670f6bd8008ac3a2406873c665a43f41703a987 06442212a80ba6c6122fd6301fb817389abf37afb607e77c4c1ebeb4cc57cdfa -test/extractor-tests/generated/decl/NamedFunction/NamedFunction_getSelfParam.ql 7865a28cc038cf79f7e9d024f33d8ce17e40ab209bfec99771177a1d77819ba4 ab31689af637c6ffa77abe59adfe24a4635be937ef65d1933f5f84c3ba544fa0 -test/extractor-tests/generated/decl/OpaqueTypeDecl/OpaqueTypeDecl.ql 0e0261995e03922dd427815c2619c85671dc604a953d80d8494e59678a3be8be a428d7835bad44c0599a5235011d981ca99c0f30b3a07fa6c68087563ebb835d -test/extractor-tests/generated/decl/OpaqueTypeDecl/OpaqueTypeDecl_getGenericTypeParam.ql 374c83dc94491225480d8d89cb5c84714eec5f0b690e2cba2d1417b1c4f54710 eb1190d2521ec51ecfdb7ad0fa9809e11a5a8a862dbd6e6a5084a686021be491 -test/extractor-tests/generated/decl/OpaqueTypeDecl/OpaqueTypeDecl_getInheritedType.ql 68981db766e452118ef9c7dec3e98cd4747c5feaf5659f91a599efc010450c86 af6a67a8b08b26636da566e69d983888cb3bf33bae7165ee486e4faf94b287b7 -test/extractor-tests/generated/decl/OpaqueTypeDecl/OpaqueTypeDecl_getMember.ql 7bca8500dc892ad210f12d1152a833d4403d6fecf24d3e4dde513c614d631664 e1e1e41c05c92eb56ff2ef5c53764af290fba40ecbb56f92435930c47a7759a8 -test/extractor-tests/generated/decl/OpaqueTypeDecl/OpaqueTypeDecl_getOpaqueGenericParam.ql f6d173a46cec223774ee8ac91333b522f14ac132cfe844ef2b2a9aeb2e526835 7e2fab576df939d919ccb176c3b06bc5c0055a74088ffac1cb56775684549620 -test/extractor-tests/generated/decl/ParamDecl/ParamDecl.ql 4d6ebd63d1f4ba2754223d12ac3663dd287844d18d270764f5b36a02b5f135a9 ff388dad1c27b80fe07d26061e25b75483932e7ee9e4172662c5d1c022f7f7d7 -test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getAccessor.ql 2a382b42cbad2ebda489ff33fab56e667cee5257eae5f81d5adbdbd29ef3de9d e807c59dc5c946046ec455147a828c0417578879727eec96c65c13454f40f49d -test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getAttachedPropertyWrapperType.ql 7a0b15bda897a0ab8ab6a96166835e558da3cf7d828bf3cc89d57c01b9447349 ddc401516f880131dea231933fafc440f7ca6bc8948318969f657c0f163146d7 -test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getMember.ql eb1956b4b3ba60e9bd2f81b96ff8adf64f362648f7fdcecd59deaae2e0171d0a fef83c7a3417cd2bdcc4c62afc601bc12689cc1912c806eb633c120a98b4eb0a -test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getParentInitializer.ql 76a598f7252807b1e6cfd58753da8286701697694071838c601b012bdd3d1158 c0939d1c1ed5d9d44cb410a7c9103d7fcb8f6f97071b59db00183262d117a8e3 -test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getParentPattern.ql 7b7b7a0c2b9da446896ec089bfbbfc4d9b469f55d6ff0156ea2346309a9aff73 d0e2de47ccb6e16bd3ec43f6627fa6d5886f0b097deec25ac1fc9ac99625cf47 -test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getPropertyWrapperBackingVar.ql d6914b0aa2cf831aa4cb41389dbd5686ae9b16182630384ca1fec54e8c19473a 89dd7c0441c73916cc144a7d09477e64738343bde064f818c37a7ed3f3c3efaf -test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getPropertyWrapperBackingVarBinding.ql 846f8c0c12bb8b98e76275b16cec4978c957ca2948e914af81c7f738275997cc b25efe315ca330ddcee3486e4db9b313879328af819b940d95891805b3db5676 -test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getPropertyWrapperLocalWrappedVar.ql b55800ca26b39c12aa59076863030ed5d9ed9e6b80cc89aa40959165dca68018 ff90f5597344b68bcf66290b870d567128721c7e69555310882dab8fb26f6d5b -test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getPropertyWrapperLocalWrappedVarBinding.ql ba01112d11cc89bb75f71480799cecea66f64e4a9ed43dc15a692dcba79ccf44 20176bc553075971d6811fd8dc928e8c9142b60b262cf16da14d7e84b402ec22 -test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getPropertyWrapperProjectionVar.ql ff7b6dc6bc37dee3c7ba1731d0ac251b3d839195bbb67e00dc5d58a172b4079a 73c37603fe51f4cc3dfe009fa0c5a7a22d6fd73f4dcac1fc29c680b14759c695 -test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getPropertyWrapperProjectionVarBinding.ql c72bffe648b6f914a08858ccfb065980cd79e177d27a4e685bd3961886edc156 4cff3c7a6314619699349fc61922ef85371c3a854b3eba1935385ac4ea50f9c2 +test/extractor-tests/generated/decl/MacroDecl/MacroDecl.ql 61f092d4ed5972283b3eb0eeec81c8f299496dc548a98dca56a1aadaf8248d1d b9cd637cb0f6f34d8d0a4473f2c212a0534d49891d55593758bb03f8d225f32a +test/extractor-tests/generated/decl/MacroDecl/MacroRole.ql 7ab0dc211663c1b09a54ccbee7d6be94ffa45f420b383d2e2f22b7ccfb8d7a48 92296b89fccf6aebe877e67796885bedd809ebb470f23f48f98b27c2922c4ba2 +test/extractor-tests/generated/decl/ModuleDecl/ModuleDecl.ql 63a41a3b393b29d19752379fe29f26fe649dad2927836e24832e07c503d092a6 927fa4056a5d7c65803f7baa1216e6bef9b3b6a223c4a2bb50f2a6a31580db6a +test/extractor-tests/generated/decl/NamedFunction/NamedFunction.ql f3d080cc8ed9c0f1753f20a21d700e0f95549510d8246971dc52a6ddcf2ee385 95cf0a0789df14593348b40ccfbce27b728eff368ffebb8137efc59065cd543d +test/extractor-tests/generated/decl/OpaqueTypeDecl/OpaqueTypeDecl.ql 85b041e1f791b40ff3d3c58c79e017cebf9ef535ea3d576984b7c093f25aa95b 9fcf314b02ac95fbd2c0e5fc95dc48c16522c74def57f5647dd5ad7e80f7c2c1 +test/extractor-tests/generated/decl/ParamDecl/ParamDecl.ql cc9d89731f7a5ecc2267923268e2d8046aa3f0eb9556c6a12e53b541347f45a4 6d06279172ff2c04be0f39293a2e9a9de5e41ff1efffd41a67d5a921e1afe9ea test/extractor-tests/generated/decl/PatternBindingDecl/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d test/extractor-tests/generated/decl/PostfixOperatorDecl/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d -test/extractor-tests/generated/decl/PoundDiagnosticDecl/PoundDiagnosticDecl.ql 5e11a8fef0037610e695e82a9dca7d172d9e622cf675c92159e45780658f0ba1 ba0bd5706e5ac9bb7ee312043ac2dbf26119e84a177ace1b526fc0f025abee0a -test/extractor-tests/generated/decl/PoundDiagnosticDecl/PoundDiagnosticDecl_getMember.ql a0e0e7271ab731c5fafab59779b5d09fa9ef97329867a8f35ddfcf6cfca5650c 3ebb0c8d3ca9c07e2d2422a17a9dc3f3ae3941ffce81efbf01bfbb0f28266a33 +test/extractor-tests/generated/decl/PoundDiagnosticDecl/PoundDiagnosticDecl.ql bf730c1d84c4f6ac67f46962849bf38c4442bddb1dd70c379735ba889171d097 d58ce712bfd18d470f00c8ab7c023285fa651ab8f4f8dc6bc6c5f33df4de577b test/extractor-tests/generated/decl/PrecedenceGroupDecl/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d test/extractor-tests/generated/decl/PrefixOperatorDecl/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d test/extractor-tests/generated/decl/ProtocolDecl/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d @@ -1144,8 +1070,7 @@ test/extractor-tests/generated/decl/StructDecl/MISSING_SOURCE.txt 35fb32ea539315 test/extractor-tests/generated/decl/SubscriptDecl/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d test/extractor-tests/generated/decl/TopLevelCodeDecl/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d test/extractor-tests/generated/decl/TypeAliasDecl/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d -test/extractor-tests/generated/expr/AppliedPropertyWrapperExpr/AppliedPropertyWrapperExpr.ql db909e46bbe481831ed1ee3e2dd234e497cbc8ed938a68e5a1c5c6c4a1093e00 76ee36cb8403e6363300fac336719a16fd797b9f83dfe4b581c0a8e3d21b91a9 -test/extractor-tests/generated/expr/AppliedPropertyWrapperExpr/AppliedPropertyWrapperExpr_getType.ql 9c646eefbd283a23df8ed8e55eb685afa25c0b2e0921eb602b178de62f0baa44 45016066204a86f2c262d083d4a7477d141f5052841347a0298ab65819aa4085 +test/extractor-tests/generated/expr/AppliedPropertyWrapperExpr/AppliedPropertyWrapperExpr.ql 612ed1b62baed51cb74ea682512de8042c71cc14c99f966f8de33c65c8be7cdf 390197357690dd42d23ee5f0670f1183139cfbdd63f67c7430dd62c51e5d9426 test/extractor-tests/generated/expr/Argument/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d test/extractor-tests/generated/expr/ArrayExpr/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d test/extractor-tests/generated/expr/AssignExpr/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d @@ -1157,85 +1082,57 @@ test/extractor-tests/generated/expr/CallExpr/MISSING_SOURCE.txt 35fb32ea5393152e test/extractor-tests/generated/expr/CaptureListExpr/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d test/extractor-tests/generated/expr/CoerceExpr/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d test/extractor-tests/generated/expr/ConditionalCheckedCastExpr/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d -test/extractor-tests/generated/expr/CopyExpr/ConsumeExpr.ql 03b2c373c44b17f1c4bb2e59ae6498d8606edcaa2b867967db0be145347308d2 6a5b9c123a7ba66562a86b38f200a1234bbe8381f59af4b6b4c6640c4bb2badd -test/extractor-tests/generated/expr/CopyExpr/ConsumeExpr_getType.ql dea6fd74bdcb23ed6ede61f151345ee871d303c00c72c1952c3d5f850c0a9b42 14f535828aefcc522bbbbcb63a9911ef562cb78f67bd5aee1bb630b627b5646a -test/extractor-tests/generated/expr/CopyExpr/CopyExpr.ql ad3cd8aff3f63ed4617ae0776f26a86a13cf0b14f90b1d94e4d0fc561ae9ff4f 569353ba4ae3f1e454d465de47bf9faafbce7eb5f9c4a3a5a4d1b9a6741cf739 -test/extractor-tests/generated/expr/CopyExpr/CopyExpr_getType.ql a6e83955f0379973d46a753075e048dcb387981ba1a7a1b80b710296f034bada ced53e5dc099e6ed8bb70219893ea12658df5b6b90bc98f51054376d70412a94 +test/extractor-tests/generated/expr/CopyExpr/ConsumeExpr.ql bb2fc1efbc7ff3abe7cd812f2c906607307c30d160412e1c8be4b6162c12566c ac8a2623b7dfa1b5b406cb6e47d022e341ec3400fa22ab3017692a88cb497c51 +test/extractor-tests/generated/expr/CopyExpr/CopyExpr.ql 423e4b23c2a0b7166fd53457fcad656391f09c6a06e9a9f865ecebdf5b227ff1 9a55d96e7665cfac9adf0477119cb532645645f0a3181c5c5a16bf99f3b84ebc test/extractor-tests/generated/expr/DeclRefExpr/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d test/extractor-tests/generated/expr/DefaultArgumentExpr/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d test/extractor-tests/generated/expr/DictionaryExpr/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d test/extractor-tests/generated/expr/DiscardAssignmentExpr/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d test/extractor-tests/generated/expr/DotSyntaxBaseIgnoredExpr/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d -test/extractor-tests/generated/expr/DotSyntaxCallExpr/DotSyntaxCallExpr.ql c164e54f841680d6609b6430201f649bfa54c71ee91cd9f45f1c93d0623ed758 2638c431e5260404852ef30e136a7329a60a086c2388fad913f021e0fad14a14 -test/extractor-tests/generated/expr/DotSyntaxCallExpr/DotSyntaxCallExpr_getArgument.ql d14112baba2b31b4036f5b476233894e531d2fca6e5a6441474e04bdf5d6fcbe e7d4143006444d16d800eb1fabece36e3d66241684c3d8bfe2fb5848d569e1d0 -test/extractor-tests/generated/expr/DotSyntaxCallExpr/DotSyntaxCallExpr_getType.ql 9a79c9596f098aa6055fea72e096181ecc11ddcf2acf93fa42d7e40f97993e55 594720e72f010c6f897a2b9c8c7ce3faa0495c600c15fb74f99cc03666f402b9 -test/extractor-tests/generated/expr/DynamicLookupExpr/DynamicLookupExpr.ql 858c8801041988b038d126e416a4e79a546a8bf91225f1190b46c44eef0382e9 7de40ed3b8dcbfeef8cb6ad7f98f477a2dd2eda630c2ed02ad224de5f0bedb1e -test/extractor-tests/generated/expr/DynamicLookupExpr/DynamicLookupExpr_getMember.ql 3aa9fdfc5cc4a9c95c7a9271d94f531d1491827cb31171491cf939578da901e8 10223bd610359bafefcad20651312b7a821ea9e744fde934ef8dc4db0eca5791 -test/extractor-tests/generated/expr/DynamicLookupExpr/DynamicLookupExpr_getType.ql c21ae7f270755000dfb03d15aff39736de4c94441f4a1839475a5eccbb58ccce 65993d85c154fe74e4a79b6ff3798b176e3f8d408c42b03955260d333ca3d349 +test/extractor-tests/generated/expr/DotSyntaxCallExpr/DotSyntaxCallExpr.ql 55a98af29e0f0ddc8b57b8e5a4c31bd83cd3c00effe096081f0ad842c909ad72 3d6122bd86461e28aa4712d3733d0fa6836554abed51cc2017d6569fd6c08103 +test/extractor-tests/generated/expr/DynamicLookupExpr/DynamicLookupExpr.ql d8c376e073a24922a0f5b41def0832813771dd20f2ff57af334120d8b685914e a3a5a93f213f3212545dde703b163aa61894f0c2c59b39aa1ad57ccf203471ac test/extractor-tests/generated/expr/DynamicTypeExpr/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d -test/extractor-tests/generated/expr/EnumIsCaseExpr/EnumIsCaseExpr.ql 426837e6acd80fd5c4f79f756919c99df132f6666aae9d07274c4b95711123bd 451393b79359a46070db84d8d35ad3c7f14cc20eddd3df2a70126575d2200297 -test/extractor-tests/generated/expr/EnumIsCaseExpr/EnumIsCaseExpr_getType.ql 9deff1a2a2271c2dbe44b2aeef42f9adadd73b0e09eb6d71c68ac5bd8d315447 bdc07aec1fa2ced3f8b4c2dcede0354b8943488acf13e559f882f01161172318 +test/extractor-tests/generated/expr/EnumIsCaseExpr/EnumIsCaseExpr.ql 7e9942e6cf4bbd72405b4f1dff3c5bc0f66940117e992bce151e1fa2fca2237a b033e79c3b2d9a776c95ca0ea8adc7d78601cf825eace86fdfea74cd52755413 test/extractor-tests/generated/expr/ExplicitClosureExpr/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d -test/extractor-tests/generated/expr/ExtractFunctionIsolationExpr/ExtractFunctionIsolationExpr.ql 7c4666a86e962726a505e76c57196483c6eb5259463a1cbdb6239f5ccbb33a13 2b5acd61e85a46b1c565104ba6f58b58813ffeba3548dacd776f72db552d5d65 -test/extractor-tests/generated/expr/ExtractFunctionIsolationExpr/ExtractFunctionIsolationExpr_getType.ql 487c727c721ff925861b265d9a4f78029f04dba3b94e064529d89c7ee55ac343 3bfdadc09b8672b9030f43c2f0cab6395af803e79ddc17089c43c3da93d69979 +test/extractor-tests/generated/expr/ExtractFunctionIsolationExpr/ExtractFunctionIsolationExpr.ql b48618adfe1eb5fb2f71def3a786a00c1e8c7a6c3ca98a6223a9eaefa2df9b93 10ff1649b73698e2b89a56ba2ce950e5ce32c56eb50ee03151261ed11d20cd85 test/extractor-tests/generated/expr/FloatLiteralExpr/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d test/extractor-tests/generated/expr/ForceTryExpr/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d test/extractor-tests/generated/expr/ForceValueExpr/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d test/extractor-tests/generated/expr/ForcedCheckedCastExpr/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d -test/extractor-tests/generated/expr/IdentityExpr/IdentityExpr.ql c873205fc042fedf96692e2ff20158f76d355342d97f4a76ebe14cf7c08457be 23a554131367a46fa1629c4779de47fd3dc972ed0e7237cd5ccaa0a7ec264296 -test/extractor-tests/generated/expr/IdentityExpr/IdentityExpr_getType.ql 0ebcaed85409f23969ab4abde51a1c23a46ea76d48c7c82abc179b9f0cd85cfe 34f21b1dc5a189df88f0ea8e897a360240a93bed3399663517e3734fafa1b489 +test/extractor-tests/generated/expr/IdentityExpr/IdentityExpr.ql 2e27b79f73c73d3950b1ac356e83b40e791c6a4dd5e88a425fea4b6158aa3ae7 7bd02c429e4dcbe3d40f139b07e74c409656b9dcfb6e996a7d0be24bb96e779b test/extractor-tests/generated/expr/IfExpr/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d -test/extractor-tests/generated/expr/ImplicitConversionExpr/ImplicitConversionExpr.ql 35496181655b08d872e6d670053515f591c844250c4da987d22d9eae549b5eaf 3f9f1cf0d50da0d76653e3fa93129b7bc87f7751f8d952e8cc1fea554c24eeb8 -test/extractor-tests/generated/expr/ImplicitConversionExpr/ImplicitConversionExpr_getType.ql a2bd400ee044596059299fe75eb51467bcd368b747eb9eb221f81fabc5e2b95d 3908c24e5dfd15faa592eafe7f8ab4f458dde29b7bf3121912ea493b5dd020ab +test/extractor-tests/generated/expr/ImplicitConversionExpr/ImplicitConversionExpr.ql 846effaf47a53401f3cf13e5c58d169fa34ffd9abc8f746c65ad9f0da1edebca 37fa3a12598862abb2dd534861de5778638263173f87a8454f09a2f4173a7962 test/extractor-tests/generated/expr/InOutExpr/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d -test/extractor-tests/generated/expr/InitializerRefCallExpr/InitializerRefCallExpr.ql aee0658164807f3b04ef6c0f628e7f8cb72e8e2b8af00d79bf22ce3cb409dca0 e023826e691d3c3ba781c6e0be802dfebf65b2f169b3f8e028f8e8f8f81b427d -test/extractor-tests/generated/expr/InitializerRefCallExpr/InitializerRefCallExpr_getArgument.ql 11ab14e77000bb67fd0276b26c1b535c696984975bb6cfdf96db2a003fd0d4bd a4d17e6b22b7f03a34b11249b9092af991efa9b06db5ec9f1020c706c618a075 -test/extractor-tests/generated/expr/InitializerRefCallExpr/InitializerRefCallExpr_getType.ql cc48d5a0b2caacfc7ff12f45cabaa170200721506ddd688c26619c1c6a685ae0 97ac2e6232e7369891ee9c4bd9f2f874df4d6a177bb8705446713b28cab20086 +test/extractor-tests/generated/expr/InitializerRefCallExpr/InitializerRefCallExpr.ql a34bcbeb9a03bd0c88055bb347407f5099104d2d2bbc6c10cada8ac63cccdf7c a553ffd8f71ca792235e306a82e3a8e19bf2cc9ab8fd288c71e2b1c01e3f51d6 test/extractor-tests/generated/expr/IntegerLiteralExpr/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d test/extractor-tests/generated/expr/InterpolatedStringLiteralExpr/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d test/extractor-tests/generated/expr/IsExpr/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d test/extractor-tests/generated/expr/KeyPathApplicationExpr/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d test/extractor-tests/generated/expr/KeyPathDotExpr/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d -test/extractor-tests/generated/expr/KeyPathExpr/KeyPathExpr.ql f52a9003e106bf86082ed0fddfa809dd253746a01b2eb400d8dd11940f89e75a 072424ddeeda48d348cdc847da0467836a9921eb12e9f4133a1da4d75191b1e1 -test/extractor-tests/generated/expr/KeyPathExpr/KeyPathExpr_getComponent.ql ccd6b01bfc67abbab5d2f9a64e7d042c2bb47d85bd7c844418f0eda37188c307 d5f2119ae5d153a36eea5d82aa7fd2c2628827a110dfc539e04629f0a5ebd82e -test/extractor-tests/generated/expr/KeyPathExpr/KeyPathExpr_getRoot.ql f73fbce049d8918d6fd4001c75fdd32ae4cb4cc54d48d8a3681ee213b00b3c59 147c93af7c138ddade5542ba43cc6317a91cff4eabf5d2e2175bb4899f8ea77b -test/extractor-tests/generated/expr/KeyPathExpr/KeyPathExpr_getType.ql c7e20412261a1a2df5bc55e6fafaebe27c33b76ebac7a74a2c5d24df4744aee2 b91c4498d52bcc618a1af70c41f8084368dc7f46c132c8428bc9f94dbf9d0f8c +test/extractor-tests/generated/expr/KeyPathExpr/KeyPathExpr.ql db48f476e6d7a1b179d90eca624351232fd6cf08db87e06e4967256839da47c5 6aaa88e54d2a58a867223d5c964da83d3e7fd2d943f3f3b9b9f2caa4bb72b7b5 test/extractor-tests/generated/expr/LazyInitializationExpr/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d test/extractor-tests/generated/expr/MagicIdentifierLiteralExpr/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d test/extractor-tests/generated/expr/MakeTemporarilyEscapableExpr/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d test/extractor-tests/generated/expr/MemberRefExpr/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d -test/extractor-tests/generated/expr/MethodLookupExpr/MethodLookupExpr.ql d424b72dc8d3a443f7d0c90d3efa660fd98dce68aec971afc62f99f5243080b7 d0cc33345c0aeb00cb88c1e952897ef896ce02edeb9d2d9785aea1ea68fdfc6a -test/extractor-tests/generated/expr/MethodLookupExpr/MethodLookupExpr_getMember.ql 9b7ea8241e213758e11c9954d912200641d723302cc3f9be53deeab50b8fbd06 ddb041799a2c025c2ab2d5dcdb263fc9b4eee610dae377efff08a15d6c7701d8 -test/extractor-tests/generated/expr/MethodLookupExpr/MethodLookupExpr_getType.ql 52f2a341d784146bde524b06a96dba2b5a15190f8a56288355282693635a9224 bef08f3ee3f2d33ef027329827382eee57a4889eb03ac73717d86675a7934d02 +test/extractor-tests/generated/expr/MethodLookupExpr/MethodLookupExpr.ql ea84ba5e032d499a4ef941fcf22bf268bc3dcbe8777d27583456540ba2b3f77c c9cdeda32de8b7ac8b8cccb259458d9015d1564fae35773c041f8b48a899dec1 test/extractor-tests/generated/expr/NilLiteralExpr/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d -test/extractor-tests/generated/expr/ObjectLiteralExpr/ObjectLiteralExpr.ql bfd0654446bb5ac4326cbc637024f68fd3dd3314ed104d93db4a818cebe1c0a6 2fec0d977e211b154b8c90233be05730fd71d66489ed2c384e916befd8816e2f -test/extractor-tests/generated/expr/ObjectLiteralExpr/ObjectLiteralExpr_getArgument.ql 2357a88c0b80b702e26afc7ddff51c564136682949a456ede1287fca37bbe117 aaa956a55f895e979948b44df3c401cd02cef67184d41004534df12ee8a19212 -test/extractor-tests/generated/expr/ObjectLiteralExpr/ObjectLiteralExpr_getType.ql f6ea109525c2f41bcfc15a96246d70acce844510ae72d8f04dd4e03e6573e733 c6ba2f99c977616a62abeb7cd4138a9e9748c92715163f4238a2f0e4c456d560 +test/extractor-tests/generated/expr/ObjectLiteralExpr/ObjectLiteralExpr.ql 620878a3c2f8dd25cfb1dc400b22fa20d549793a27edd419df0693bfd1d7b987 0af15ca80f025dad9e343e392e15f40b348b2efe670cbce230f4ebe1863ec45d test/extractor-tests/generated/expr/OneWayExpr/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d test/extractor-tests/generated/expr/OpaqueValueExpr/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d -test/extractor-tests/generated/expr/OpenExistentialExpr/OpenExistentialExpr.ql 9657d2a968de2bcac5839701c6102f87f6d6947c50b1b3eef27729cc5af4b9ba 99f1b3a0f0186242a5517fef226c4d7c1a3ef5f9660844aee608b3918727db5a -test/extractor-tests/generated/expr/OpenExistentialExpr/OpenExistentialExpr_getType.ql 37411aa9c53dbbc5f1c32ec9e24a8a5bf152ce11d15b1d78078e0fce41b3a8ec e043f9f86417efb480815cb04ef7dd2b22340f849be203935d523d9f2e8589f0 +test/extractor-tests/generated/expr/OpenExistentialExpr/OpenExistentialExpr.ql 5486acdbada57e8b99e129b41fe7f674f42aa5cb1c1f01d7e3d39ddeac838db2 849a5378784006c65b8806582a8c5aa98642623a13a17e4d879ade4f682ff733 test/extractor-tests/generated/expr/OptionalEvaluationExpr/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d test/extractor-tests/generated/expr/OptionalTryExpr/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d test/extractor-tests/generated/expr/OtherInitializerRefExpr/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d -test/extractor-tests/generated/expr/PackExpansionExpr/MaterializePackExpr.ql cf429544725932933dcd3b0ce2e53ef8d63aeae6ba64db3b65c307c03243fa10 0e0f52920d0c9277b6d673115314df7e7f76434964e2200ca6245cfc0ae5cf10 -test/extractor-tests/generated/expr/PackExpansionExpr/MaterializePackExpr_getType.ql 09c403da048393b3b0b82432991104267c4e6c7daa5793641faabb572c09f129 b6ac95f43a761937dc9f50bdd57a7d5e02296ea4d337e2b566af534e4c217137 -test/extractor-tests/generated/expr/PackExpansionExpr/PackElementExpr.ql f969396327b9b93d936513bdf036f9e6fac523318ea03e03b4064a33525d36bc 452527d074d72182f3e1898fea8d5679ccfccb2ff73af70f7927850d49d652e4 -test/extractor-tests/generated/expr/PackExpansionExpr/PackElementExpr_getType.ql 23458a971238804f43baab06090ab3a281134db112b4908771c23d91c06b0b18 c5a6c792977304ed6e87aaf5e4e983055d00227e92ba661ff87adcefed0532a4 -test/extractor-tests/generated/expr/PackExpansionExpr/PackExpansionExpr.ql 8f7d3eae5fa5e3e210b8357ced549944a064ec3193de695b415f1cf62d25eb0c a17bca0032f9747d12a789774a19d3beaff35b911ceeebae3484ae3d8824e153 -test/extractor-tests/generated/expr/PackExpansionExpr/PackExpansionExpr_getType.ql db1ed61c2b644e73200d719565d8e0183b2dcad0b11e65050315c38cf82a693c 961611d2055ff1defc060f117cdb7790c63cd0c8a45d182b8592de54862a6192 -test/extractor-tests/generated/expr/PostfixUnaryExpr/PostfixUnaryExpr.ql 33e6a49d0ae7773a1c70e765d216de1b68c8df5ed69fe16f8a44c1ba39323059 b6889eb338629a3615f09c89db2d146af84c40d9915b1390167175ec50721099 -test/extractor-tests/generated/expr/PostfixUnaryExpr/PostfixUnaryExpr_getArgument.ql d5eb8c28926a1a22df7880b311f9e91aa80e69ffb978fdd4ed431ab4e368ad84 744413eec3114687e0b0f9d0fc7b8118b0938117789aedf1dcd6d8f046b254c1 -test/extractor-tests/generated/expr/PostfixUnaryExpr/PostfixUnaryExpr_getType.ql 49b0bd3f1048c6ceb904a16b084a6646ed587f55578c70ae8c57b2fb3c78ed68 a46e8af5368774166a73357c2e245decb677d81791c355f2fe74e41a430d55ad +test/extractor-tests/generated/expr/PackExpansionExpr/MaterializePackExpr.ql fbcec327377a2f349824b82ba9d17556010cce52ce60d28ca4efee045d0d4225 2155d566e460db6b6693b3bdf93e304ed762abf5edf5072c1b4cc3b4cf3d18d1 +test/extractor-tests/generated/expr/PackExpansionExpr/PackElementExpr.ql fbf8f8ee6411c1c4bf241710eac37dde39efeae70a06f4bc7ac16dd941b52937 63e2ba99385a135a5503db87db98ad16eabf9297178baee42a9d4109511c08fd +test/extractor-tests/generated/expr/PackExpansionExpr/PackExpansionExpr.ql cf89d8c42bcb31ffb33283655823ac7afb086a44ba0245887cf4cef108f71ed8 1d7bc7969aae39435178177cb0494baa20e93b3195de5ccc05a05db123cd2708 +test/extractor-tests/generated/expr/PostfixUnaryExpr/PostfixUnaryExpr.ql 0fde7c56085ede00a4e5bd33c00f51cf7bd3cf678312610b12a52399d43700eb 1d469792c22b20fe7e317d46c40b533756e279a6c2acffdfa9b1faa156d43c24 test/extractor-tests/generated/expr/PrefixUnaryExpr/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d -test/extractor-tests/generated/expr/PropertyWrapperValuePlaceholderExpr/PropertyWrapperValuePlaceholderExpr.ql 21122074264476b5edae71790e7fb6627e747f8c5d44c8d1176a1767cc17605f 68d6d79312fcf229b0eaa7be69f0cc9403143d128c3058678d73b9a1f6b4e41f -test/extractor-tests/generated/expr/PropertyWrapperValuePlaceholderExpr/PropertyWrapperValuePlaceholderExpr_getType.ql 6ccc25288e4aba93066a8b8cdbe5c5d82d346107836f2d1748fc38b43b8d01ce ee6afc9d0c6dee117fb96923874a19f3dee9d8e617c023c24daec567c272b364 -test/extractor-tests/generated/expr/PropertyWrapperValuePlaceholderExpr/PropertyWrapperValuePlaceholderExpr_getWrappedValue.ql bc827e88b77cce3f0f0df3a5dbca2cdc35199a3f566dc25b8f23edcb2f56e26d 68d9e91f44bd9e75f115aba6353d38979ca5b37f284b6357c67d5cf21630462d +test/extractor-tests/generated/expr/PropertyWrapperValuePlaceholderExpr/PropertyWrapperValuePlaceholderExpr.ql 9d5ed8460a0c906a44f7693fec6288313cc3ee73cdb09c1a54af525093f2ff10 c0fe8a5a88ce747e6f7977a2edd6123759725b6fbbed7f81e94fb1a5550d22fe test/extractor-tests/generated/expr/RebindSelfInInitializerExpr/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d test/extractor-tests/generated/expr/RegexLiteralExpr/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d -test/extractor-tests/generated/expr/SingleValueStmtExpr/SingleValueStmtExpr.ql 57837f6c123a5e89266b81feb7250f917d14b4899b426984304b9e970da7c4bc 338720ee352398436a054f46bc69425ffecebb8c9f7d2cb04b1a26638c2c9e7b -test/extractor-tests/generated/expr/SingleValueStmtExpr/SingleValueStmtExpr_getType.ql cf99bc20cdbdafc77bc574ea0c96b47b04941cc108864db8e36b82a106c00bd7 3fa585eb56d89c252f399be3f46787e3b31c69b419d88c0c9acf1a9aecf85791 -test/extractor-tests/generated/expr/SingleValueStmtExpr/ThenStmt.ql 95598451a0ffaa0f2aeb1e478a507efcc380c30d10aa90efefb6cbc14a9167a9 f511a9a527c68b76d8591c15c5e63decd56d9ef7b12d470889ebf4518bddf6d0 +test/extractor-tests/generated/expr/SingleValueStmtExpr/SingleValueStmtExpr.ql 5414253ffcd24b16a2725d7e1f8b543dac9458e32d610a7722ddcafd00d31048 3bdd13684344dae067612345cef43b4a4b13ebad3157e3dd76edce4a40895df6 +test/extractor-tests/generated/expr/SingleValueStmtExpr/ThenStmt.ql 5dea0a19b45feedee2808d81cda006b94c15d253ea80ef66dfc67d199bfec29b 49b07c7695a47935f1fdabbb547c6508360bd5269fbcd4743a486a6f9029d6c2 test/extractor-tests/generated/expr/StringLiteralExpr/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d test/extractor-tests/generated/expr/SubscriptExpr/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d test/extractor-tests/generated/expr/SuperRefExpr/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d @@ -1244,8 +1141,7 @@ test/extractor-tests/generated/expr/TryExpr/MISSING_SOURCE.txt 35fb32ea5393152eb test/extractor-tests/generated/expr/TupleElementExpr/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d test/extractor-tests/generated/expr/TupleExpr/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d test/extractor-tests/generated/expr/TypeExpr/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d -test/extractor-tests/generated/expr/TypeValueExpr/TypeValueExpr.ql 93ebaff4938dd18f3626533cbf23094c4d7eac7ce84325b743f78dd36d8831e5 c3bc6b6f7a18ca5a32084207fac2468f6306b81cd6a7af1ecf117b1a37147266 -test/extractor-tests/generated/expr/TypeValueExpr/TypeValueExpr_getType.ql da07880497965cf7f7e28fb3c3a8e8223368685fdacb62d7e562757f01fd521c 9be644216f6adf12adf102ecfac5b3820c2fe7916a86586744ae71d1c11d9704 +test/extractor-tests/generated/expr/TypeValueExpr/TypeValueExpr.ql e4f1cd638a06cfd32e987e560777fc94d016944f4c87847c4bb059bfbba48dde 3864ad30240bdccff665f77621f361e192612c95a690b6f7b31ba62652bf6b00 test/extractor-tests/generated/expr/VarargExpansionExpr/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d test/extractor-tests/generated/pattern/AnyPattern/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d test/extractor-tests/generated/pattern/BindingPattern/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d @@ -1263,31 +1159,21 @@ test/extractor-tests/generated/stmt/BreakStmt/MISSING_SOURCE.txt 35fb32ea5393152 test/extractor-tests/generated/stmt/ConditionElement/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d test/extractor-tests/generated/stmt/ContinueStmt/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d test/extractor-tests/generated/stmt/DeferStmt/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d -test/extractor-tests/generated/stmt/DiscardStmt/DiscardStmt.ql 0170171a2b75ba6beab62726a2b6a1530b11fb4b5d9b95b645a07f1671d3dad4 ef8fad038be90f35930fab0c374137e200557051cedaa89ef1cbbcaf41850530 +test/extractor-tests/generated/stmt/DiscardStmt/DiscardStmt.ql 0f4ce5a2ea261ad66f7d9aa9fb4c2917d0ecc627c1d660f203c0b3e62550f463 6dc9e5e3d83c5b94fd0a72a06fc3046883f1766dcfc91b7e7063bf1c66582f69 test/extractor-tests/generated/stmt/DoCatchStmt/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d test/extractor-tests/generated/stmt/DoStmt/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d -test/extractor-tests/generated/stmt/FailStmt/FailStmt.ql db2d21fe1b01949180ff11416f2dc0a6a561f9ac9e6a5654156f947c584971de 2cf787b54819077dd2b4da870b722396ebf953e05bf0b1c393affef2b1fe11ba +test/extractor-tests/generated/stmt/FailStmt/FailStmt.ql 70eb21a0717e68bcf59ba9861d474aaa5f7791c39fccea4015bca47fc8d082f1 18eaafd230e4eaaeb114466db17bb480591af6357d5ed7bafe74a3352b806690 test/extractor-tests/generated/stmt/FallthroughStmt/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d -test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt.ql 093a6619940636974e2a59f085937f9fa8645a134199c130ee99babfd2c1f1a0 068daffb2da1be9135eb818190926af3958d503c3c61de2659c0c0e167b2d11c -test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getIteratorVar.ql 1b8689dda5defd45c8bb743b30d723ed7b0c80ca54b81fb0f5fcf76620ec4ef4 1e48e40cff37194e0ea2b69997177237145fa1070e84c8f701a03d71416652b5 -test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getLabel.ql 1cf0663cd16886d4361bedad93759ab84fcaf54d5fbf16d7d2f4108f74c38683 129778f5f36d10e8a10452f333304fef9b95919cfe367ce6ff7309e2d3f3ab3b -test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getNextCall.ql 503106f20025ec479ffe46daf13ff80f5d824b657c43da8185ae2d74af8740a3 551e33f70028268e3b3790c17907101be768c42811b62978ed10ffc0a65e25d0 -test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getVariable.ql 749149b5164f493bb49726e1d54cdd1c85607566c0ba7adfc3514ea953b1f40e 1695a631aeeb47e6a0d22ec18d713f1fe2f730684269fc6e50c70020a78fbf3c -test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getWhere.ql 536af56264054a7af626a5ca4bb5bcc5b8f13299d11c499a110e4f12e2c166b6 bfd8b355342b0a03ced022b31d39e9adc6d7820a28394315392a9e2fc7647555 +test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt.ql 72fc91069e68f975006d6d49a54ff92a23a27706a6d5d15acdcfef09cafa2f69 38a4c56c7ed6ec47b990ee79ae2fe45cf287db474b6dbf13b4e781205894e27f test/extractor-tests/generated/stmt/GuardStmt/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d test/extractor-tests/generated/stmt/IfStmt/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d -test/extractor-tests/generated/stmt/PoundAssertStmt/PoundAssertStmt.ql 46b702865ef1dc4d9d8332a3d68ba295a1f8ce9737dbcb07a5ef4c701c021789 07eaec1abc763a4f2339466fd0f06d12c4ca21d9eeb21ab1f7366916dafc4854 +test/extractor-tests/generated/stmt/PoundAssertStmt/PoundAssertStmt.ql dbe340f6f2468a6c5ff42785101d3529ca11ce49d28cc607cbc842678b9f0b61 96aea7859f0a606ea032850339d78907406dcdcc2d3ac5b15ea8c7bd2cd36eb1 test/extractor-tests/generated/stmt/RepeatWhileStmt/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d test/extractor-tests/generated/stmt/ReturnStmt/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d test/extractor-tests/generated/stmt/StmtCondition/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d -test/extractor-tests/generated/stmt/SwitchStmt/CaseLabelItem.ql a1e1e34aa999175017c4dfefe91086d2ebd6b9b95c1680c95f2f43df39ab9487 421c8bc1b3ea40f67790c11bb414e7aa9025465a690421a23448842805f5f759 -test/extractor-tests/generated/stmt/SwitchStmt/CaseLabelItem_getGuard.ql 1bca85242d8513b9300673f666938ed59ef7f610854d97a820a09b3bab661188 1f15e6b2a29eeca1b9186e5bfd61225dadd6632bf727c79f1611653031c27de9 -test/extractor-tests/generated/stmt/SwitchStmt/CaseStmt.ql e7faadfde4c2da17c06cb2cbe9d8c7dee6b2641eca0cd13374f8ad5ed6f33e14 a96d1b1e169f296b2a9ea959fcde417521e04391e58372ed04bd717928548a02 -test/extractor-tests/generated/stmt/SwitchStmt/CaseStmt_getLabel.ql 287245a6c6770c1d3a780baf6d93ff7a012720095a770f2699a344032a2fa146 d3ad9559c06fd3c22c50ecdb92118a94860ce4d872eb7ce53c47b3053e47e716 -test/extractor-tests/generated/stmt/SwitchStmt/CaseStmt_getVariable.ql 6da5d7afa12c5de2a9e012aa2867d97c563945ebc2cc05961934070486b4c70b 546b7cbe145302b90cc3377c81be06d47248e7fe4e64af2ac455ffee8033aba4 -test/extractor-tests/generated/stmt/SwitchStmt/SwitchStmt.ql d779d040e0d7aa77a2445c0217c5e5057b42b18b431fb2a785c0f0248ed98baf 281be139df50e84a8d390e0fd80a7d6e2ac07855f488288511b4ebe2d6ab187e -test/extractor-tests/generated/stmt/SwitchStmt/SwitchStmt_getCase.ql 7df55f86cd90358245ba360160e41ab990f530ec2717a0b99438f248d879e289 f1ef8e30efe60d0ed7c312a83a789f1dd113e201bc5caff339daed1317500667 -test/extractor-tests/generated/stmt/SwitchStmt/SwitchStmt_getLabel.ql 5b6a5916ad1a04f23fb79923f4df5543c55cf187d7d6e1cc7161cad717d3ff15 27eede6ded0c4d446f63c10c232afff9d5241014bba5c9a6e6c52c25231f3c13 +test/extractor-tests/generated/stmt/SwitchStmt/CaseLabelItem.ql 5119caff56f18954f8d01f21d7a381de9aa7c35cc8a7515205542574f9b161c1 5e122758bc0cdc44ad0d292dc5bfcfc36717ab5db3b363202659d0da5c6469a6 +test/extractor-tests/generated/stmt/SwitchStmt/CaseStmt.ql 1460fc714ab50c56afd608934a9a1081104b99c032b6d77954cb6e9dd7fa33a8 c15d9755ffbe45d447d55c5408d897cbff647ec97a458090c0ad9cf597e62859 +test/extractor-tests/generated/stmt/SwitchStmt/SwitchStmt.ql 1d010c5ad6ece987163696d629ef073b6476d37794cc080ad5fcc4980dc9f64b 4b39d3945ef7419b277fa94eb15878b20e46811a5bedb03217577f507145734b test/extractor-tests/generated/stmt/ThrowStmt/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d test/extractor-tests/generated/stmt/WhileStmt/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d test/extractor-tests/generated/stmt/YieldStmt/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d @@ -1295,58 +1181,42 @@ test/extractor-tests/generated/type/ArraySliceType/MISSING_SOURCE.txt 35fb32ea53 test/extractor-tests/generated/type/BoundGenericClassType/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d test/extractor-tests/generated/type/BoundGenericEnumType/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d test/extractor-tests/generated/type/BoundGenericStructType/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d -test/extractor-tests/generated/type/BuiltinIntegerType/BuiltinIntegerType.ql 5838694bf4d035aa764e25c9bd768f63ddea7b9b1cbd0386401c24f33b7fab17 cdeedab8f8b4e28a98ee6d2775e77cf359df541827d1ea592c46ed43ec76cdb6 -test/extractor-tests/generated/type/BuiltinIntegerType/BuiltinIntegerType_getWidth.ql 4f32fdf145ee62a4bb9e29175356b7f9f47bceceb7ee20a4fc93445d99f33117 a1454fa426f528d5ed8d98a84454d1e8118a4f1bb745d4ad4fffa69e5c798180 -test/extractor-tests/generated/type/BuiltinType/BuiltinType.ql 0c50885643a7b460bd7da1610f404a983085f8022adc4dc02c337f84a06385fc 2f6e9d85c2a8d7f0d3f248619a9025c33f907028e132f8b67056719a3808f771 +test/extractor-tests/generated/type/BuiltinIntegerType/BuiltinIntegerType.ql 78d10029fa696ec4bcc48ea666923b98aa120a4a66004c491314f4abf283eac4 d23455d2ec38a1bba726d2e8fb349dfa2cdc52b8751d9caabb438d0dcdff6ab7 +test/extractor-tests/generated/type/BuiltinType/BuiltinType.ql 83a861b3ad63bed272f892031adc5bc651ed244cfcd53fc3090a2cea3f9d6a8d 197689774e28406b4bd798059fc57078695b43ca0833a7a4ef9dabd519e62d0d test/extractor-tests/generated/type/ClassType/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d test/extractor-tests/generated/type/DependentMemberType/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d test/extractor-tests/generated/type/DictionaryType/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d -test/extractor-tests/generated/type/DynamicSelfType/DynamicSelfType.ql 3214d8a7fcc076c880988b3ab2079ad0d77834e7dedcb063c6640b2d92ad2a41 3306c659f68b132941b5d013b2414122f81bfff6c7cbbabf6fce4328df38a9f9 +test/extractor-tests/generated/type/DynamicSelfType/DynamicSelfType.ql 62da270e23b080f8ceb9ec5c130f84ccd779c43cf30c88db526ef061269c5ce9 390cb48fd7873210f5f5b4e8f275347348336a1e8161c72d3fafa5f7fee90f93 test/extractor-tests/generated/type/EnumType/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d test/extractor-tests/generated/type/ExistentialMetatypeType/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d -test/extractor-tests/generated/type/ExistentialType/ExistentialType.ql 5f5c1e44519519eca7bb8bee28e58d79317c1b972549bbbdc135da11cba9a62f 3cc92fa9fb139485aa53e5c13b411360ba3cd1185ca497d84251e5b9212db676 +test/extractor-tests/generated/type/ExistentialType/ExistentialType.ql 7e09bbea166a4f269ecef1113229e98dfd7ea68ea5d4025af492fcce48698420 a4d00ff4100138020af51e8264d1d243156e52ab417bb150d33e9e1cc8cb0a69 test/extractor-tests/generated/type/FunctionType/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d test/extractor-tests/generated/type/GenericFunctionType/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d test/extractor-tests/generated/type/GenericTypeParamType/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d -test/extractor-tests/generated/type/InOutType/InOutType.ql a3591003defc284ba9c1c8492ccea5f46ff1de2d86a2240da3a501598d236f8e 4915db95b101c199dcf194e8b974a3c7c94f8ac1d4d9dbf6144822beb4ec0b66 -test/extractor-tests/generated/type/IntegerType/IntegerType.ql 7c911b67a801d8a4f0fe695c66318f6a08278b632adacb58bb10578474a43d49 9590080054ad1280eecb97d2f5265de8c2d2eeca03af24654cac5e2818240e85 +test/extractor-tests/generated/type/InOutType/InOutType.ql 611aea3776fbcd3763d798b58eba36522db9d4f8ae95dad133562abc6b9d0a9c 184e35f8ef3aa77b52d7d6dbd784fe4749793c50f0484195bd91f49bc2838509 +test/extractor-tests/generated/type/IntegerType/IntegerType.ql 6f18b3b5b4c53ca5d5302a78b04fea929bce478fa5c342f01951379a405b4c8a 486c1ceef03d02b064381ba514ad19eeca250c83ce54354a08c3a7c94bd4fd11 test/extractor-tests/generated/type/LValueType/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d test/extractor-tests/generated/type/MetatypeType/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d -test/extractor-tests/generated/type/ModuleType/ModuleType.ql a65f7a166068b3bc622864b4b7464a25e41cd8a02f2bdce214ae59475acb9893 89a165e1c0f5b1de549d6c73e893cbc520832d534f801ba5d9144ac2ae3a9b8a -test/extractor-tests/generated/type/OpaqueTypeArchetypeType/OpaqueTypeArchetypeType.ql be3663ab96b8c566ca07b72a40c08822dda7feaac65f9e0a27fee0b139dcac22 d031a8f27d4a57248c3b9edbbbbc9bbfeac8bd4507406ad3c21fa2bb241e7a8c -test/extractor-tests/generated/type/OpaqueTypeArchetypeType/OpaqueTypeArchetypeType_getProtocol.ql e14e32f950cc38b2b47210d44391c619ae14ed9a836a9a9882e26e6981b32926 b0f4988b72f2146ddb71d28227aa3f67fd6c6de1f754c4d95d4847a1b5fb7ef2 -test/extractor-tests/generated/type/OpaqueTypeArchetypeType/OpaqueTypeArchetypeType_getSuperclass.ql 4a7b5fd2a764d8fa50b9408e055d34160064dfaeb90fa64b1854fda1f39e3385 0d70b14dab911499c2275476355332f1b5048150016e978c2835cb9f7a8244f9 -test/extractor-tests/generated/type/OpenedArchetypeType/OpenedArchetypeType.ql 8f3ccc86bac852ec6d6a4e9522aa07ca66ff410b586b8275e35b7c0745726f05 8b3224c86f29b22a927f4c2ea90b120732eff7bac6c96d431bcc0cd3bcd7c1a4 -test/extractor-tests/generated/type/OpenedArchetypeType/OpenedArchetypeType_getProtocol.ql f3da83a9a32d0945ade1015103eb911a6d8a5420980fb3c2ee9b6884ab4d0be4 8d5025b9432df8b0b3d3a27f9228befbbb95f550528c4e4219ca4e6d942e1e4b -test/extractor-tests/generated/type/OpenedArchetypeType/OpenedArchetypeType_getSuperclass.ql f64968fc58d977e5c867010fdda3fa40162a2203f65067082b2d6608e3a31af8 f5ef6bb98c1f7a280fe5b84f19884dff3a8d073a410b81905307a8f41e757761 +test/extractor-tests/generated/type/ModuleType/ModuleType.ql 7d78142dc82b06e454b9875a47890d5c2364e51f6e496640d6c4d20327f535b7 cecd45f6a4b0f137cdd7e694259044016ab01da6a42e73c3a361b4d00b594133 +test/extractor-tests/generated/type/OpaqueTypeArchetypeType/OpaqueTypeArchetypeType.ql 86bc4823c19da17cbcebe3a4634eccff0a96cbebd174d8d4b1610e3fda3f8bdb 82179cb6e188a3a271428de4631c2a6fa4cec2e65a628fb56c2cbcff8a6a13d3 +test/extractor-tests/generated/type/OpenedArchetypeType/OpenedArchetypeType.ql fdbbc1cffb209097480596d3be405188d045758da03a7980511d56874690b9c4 9ba8ffc028988a21cd751d25f0c363c3c37dfc0a13629379c8ca94b6b066bb7d test/extractor-tests/generated/type/OptionalType/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d -test/extractor-tests/generated/type/PackType/ElementArchetypeType.ql 961338f1919320b6ba8f597f7c92b715a56a411b03fd6911a008f9d842a01298 cce7edb034f5257c7df3bc193dc972a5d95be55c51a1e76143566dc8bf003323 -test/extractor-tests/generated/type/PackType/ElementArchetypeType_getProtocol.ql 5f86e39a8332e5f5cefc38498cb5cc88a226e48921ade2f1541aa9b0ed58f1cb 7f46a7c01a47a7386363960dd865c564927898327ff3677d1239be1e051b4728 -test/extractor-tests/generated/type/PackType/ElementArchetypeType_getSuperclass.ql 1ff8e6414c03eb1c2a989febcf470b659d93b99d82df3dd8da52e300ae9f6a1f f4bed98c9e1c379eb013a44486bba66d523bae22ce2001afcbeae4b7dda96e29 -test/extractor-tests/generated/type/PackType/PackArchetypeType.ql b518d42787b5bdc1cdfd902c2823cc900c288f238403dd9592c102c7f59929fd ea53016b56c25734f4ef88c907183b438becfd000f181ea1f22545e200f9e175 -test/extractor-tests/generated/type/PackType/PackArchetypeType_getProtocol.ql 624112c36fb26ccb9954b30ca843c8a626e263ccf5823a6d7deb24393fa9b452 dfd5f27860addc7d9385f36b50dfa72790f212eec6a40de0a9cb81a0327cdcb3 -test/extractor-tests/generated/type/PackType/PackArchetypeType_getSuperclass.ql 9afe056468a5042cf36437dd96badeeeef0019e06ed562d75349ae142ce4fe12 c8f8fbe02636bb8397d6b8f69eff540a386e8bbc977cabcaeaa0aaa90148526c -test/extractor-tests/generated/type/PackType/PackElementType.ql a26d73996f04ddb5c4e8f89c5e5587cafb0c147669f9bd77e66971f89f708c89 ba9c89e450666411b6ff3c09916de794099676f935706adb9c216c8b79f643df -test/extractor-tests/generated/type/PackType/PackExpansionType.ql 6f0c75a1edcb627b7589a68767da5146d09fdc428ebb80a6ab81704035f19a11 71580fbfc27f2e8b1b94c687692b29e1199a61b06eeec2a264a3e702ff637f29 -test/extractor-tests/generated/type/PackType/PackType.ql cc1d69305a72720566ee10d55e0248c99f7b78ade0334905c4efa20f940df451 94b3dafd5fc037fd2ee5433c4d731f9fe9c0e1d6220298949fa45735647ac01c -test/extractor-tests/generated/type/PackType/PackType_getElement.ql ab01262c3c6b8d29c89d83463b0c9d58640d9fbfa705dfeadb458380a7f17d50 290458051bb49dda441c3f8f0c397c874c4022ffcb58b5a803f138b0f17fe2bf -test/extractor-tests/generated/type/ParameterizedProtocolType/ParameterizedProtocolType.ql 74b52173c4d39d74497d8e2d3d3dbbae8a1e84190642af2ab786464e804bbfa7 9a6a77b65c345430c768c660ae66755671d034f73c96a88b2935fed66d96b592 -test/extractor-tests/generated/type/ParameterizedProtocolType/ParameterizedProtocolType_getArg.ql d51d20195b1ad8d31a3b2d165b81b90883d9e55a96b1b421419814964bb05519 f354fe8f23507e094a2d8ec75cb9d3ab6426c009bac02b7a96dae6970b0377db +test/extractor-tests/generated/type/PackType/ElementArchetypeType.ql d4d695dcd0e723cdc9f196d828e22a3650ac751f0488e257f3bc2e2afbc343ec ff20bf849e18621b6193699bf58b3d6d127c29113dc996100bc18938fdf4658c +test/extractor-tests/generated/type/PackType/PackArchetypeType.ql 56e7f72a2d6f03e394a5e7103e337aee06b8e1fa9198d8f6123c44c4e33d5b57 e7259313ade883242bffb8e812da64c77108b55acbf39d7b8cda47251ee5f5d3 +test/extractor-tests/generated/type/PackType/PackElementType.ql 8f78e329812bb16d0ab644944c3dffba9701dffcd980018accf22c4540828315 adf4b155e1d5ba0c54177b9a296e0e5d06d2566dafcb43d60403fcf94a009009 +test/extractor-tests/generated/type/PackType/PackExpansionType.ql 4ae76353b2312ca356a11191b3b8c235fc5a394b91c9a1de48da1fbc9986f14c c676192e609e434c1c617d9c32752f39d2aa7119a9c00bd092f30734099c89dc +test/extractor-tests/generated/type/PackType/PackType.ql 9d235d6c608da8a3f2eaf3f1bc32a130cc36565c27d60f62654a2b4f3c95dfb4 760d5daf96ec4a903fa09b6ed3687f8a3e59525b1d621b6866cc7506ebe20888 +test/extractor-tests/generated/type/ParameterizedProtocolType/ParameterizedProtocolType.ql d72a5ea146d99b43e0446f7e2c5b6999383de7b6962bce2f14c616a28c75a6be 0892b65674289bc7d1bdac0b7ab6da267876765641679ee2821aba258de563f2 test/extractor-tests/generated/type/ParenType/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d -test/extractor-tests/generated/type/PrimaryArchetypeType/PrimaryArchetypeType.ql aa737251785d2467ed77f4a6710ff81a1affcc93fb974faf28244ab2b70cfc0d e6622799754179ba47e0a278f914980c3c7f51529cff97eb93e2759675e957ec -test/extractor-tests/generated/type/PrimaryArchetypeType/PrimaryArchetypeType_getProtocol.ql 96af09aefc45241d7d732cee7cfa91ff814f83a40544ec0835e2ecdbd05dcff6 45f06c1395f5f17430b7bed1d2c8f43c7380b027e41b4fe5046a8f3aa37e7dc6 -test/extractor-tests/generated/type/PrimaryArchetypeType/PrimaryArchetypeType_getSuperclass.ql a3877509c52ef4c9212bb4e266be6cc4945cde0fe99319a61a871661eeafbadc a476de7749334b20d2547971d8646662e125c3d0435bbbb8001fa4e88635e373 -test/extractor-tests/generated/type/ProtocolCompositionType/ProtocolCompositionType.ql 91a151f8ffa2050bc9434cd02929c3ddadad589e85e102d1904cd41417bbdd8b c68994e8101b9392a704de138780152c30f91882bec9587b6a6359e7a37116f9 -test/extractor-tests/generated/type/ProtocolCompositionType/ProtocolCompositionType_getMember.ql 08856a749fa3bebb09364b47d63d1524672572e1c26c525879af24d34920a68f 7764540b5fd98a6540045c6fa91027ff9344f603d77251c2d803afb966bdab2a +test/extractor-tests/generated/type/PrimaryArchetypeType/PrimaryArchetypeType.ql 4355fd06fe5e9c775ce58c025f3a8383d94e48fd8461b69325905da551001e5a 8f200f8517191b6db86c65cbd7ef4efa537eb9b26d6a417112d25af5aa9632fd +test/extractor-tests/generated/type/ProtocolCompositionType/ProtocolCompositionType.ql 5e9d97fb048d108fe3d52a69da929f93cb52afd694993cb2ed66155cb668ed0a 40888e1af510016ad7843f0e5194e4af10f6929567b63532f66667f466dcfb9e test/extractor-tests/generated/type/ProtocolType/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d test/extractor-tests/generated/type/StructType/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d -test/extractor-tests/generated/type/TupleType/TupleType.ql 265690da7f0733ca88d20efbcf07c0c452f4d44b49488f624f2673670cac56c6 2da4185f0a870c38297b58a61b295531a140b50db9be31a0c298df7921adb3ba -test/extractor-tests/generated/type/TupleType/TupleType_getName.ql 79dfaf4d6aa52572f4b43e89079876249949b1b335168cb30b6c6f6db00423ac 17a35226afc2392bd4c69eaf9cf896e0556d28a2d9086c33b5686985959798bf -test/extractor-tests/generated/type/TupleType/TupleType_getType.ql a402d5c07829ccfde5521fb5b8c5d6846126e2bc8ae0a0254a8353babdc2f2e5 ccdcf490e4ec3c2fcd3c7b1b9ffddcd0b85229b25db8ab5c1802866c8e3e03af +test/extractor-tests/generated/type/TupleType/TupleType.ql 4b7c7db3decc5d901658e1a72943c48d661f5a69f0f1c36972bee2200d0532f5 2539d830cb6dd71789072bd87bd35a260e31dbe7ca7208e84f087f13fd7c9561 test/extractor-tests/generated/type/TypeAliasType/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d test/extractor-tests/generated/type/TypeRepr/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d test/extractor-tests/generated/type/UnboundGenericType/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d -test/extractor-tests/generated/type/UnmanagedStorageType/UnmanagedStorageType.ql 841cc663df467772d7af7fdfe88dbc4f588e4f6781ce1f3cb2d4f3f75444bd95 4a64c07f3bf06792e052b154b5a0a6fb62575562935603ad63ca6d81de5dd04f -test/extractor-tests/generated/type/UnownedStorageType/UnownedStorageType.ql 6369df2814fffb6f83135bfaa610d9dfec106459470b552e8d875d74d2fae8dd 56fba1c55bd6d1f149a5a92d98b3dded158898dcdcfdd617e7537a435508a6eb -test/extractor-tests/generated/type/VariadicSequenceType/VariadicSequenceType.ql d52a0248c8f0a0cfb2ff01d470d66d11a38fcd6a12314d8e6eb752e6aa1f9b1c ceb3cb90ca6f5e5b4724890ede6179675d3ec5d834b7067a80c99e7951ef3d3f -test/extractor-tests/generated/type/WeakStorageType/WeakStorageType.ql 2b37d5fa22a78747c9ec3f924e9992f7083d3e8a3372a0c9aeed6211f47930cd d20ba54dada2388064f060967bd8577605baa30d19bb696339b7449a14fc1dbd +test/extractor-tests/generated/type/UnmanagedStorageType/UnmanagedStorageType.ql c66172a8fd9c0e9efea6db0d05beee176b02cc65d838c95f2b4f995dfdd89035 57b1e46011eaaa91472d6c58f15587eadd44341ddf8d500a0886ebe6962fa431 +test/extractor-tests/generated/type/UnownedStorageType/UnownedStorageType.ql 678e0cb7fdb9ddf6cdde9a68b6f6b8e3ff915681e1a5caeb49b3f1da5dfa9edd 49e2214c32edcfdd7a867a6a490dc37de654b1cc61ca0a39270bd71daaafc2c0 +test/extractor-tests/generated/type/VariadicSequenceType/VariadicSequenceType.ql b10c35a7500d8e5847a55fd076b0a6bfb3b6ef8b53a13a706dc5c9925727d7fc f288b3bfc5c64fcb14d2fd92f88b1abd406786c78bd22980128301599ed1937c +test/extractor-tests/generated/type/WeakStorageType/WeakStorageType.ql a5d4d46ed3162dda95fae4ba8b21150370329a3454c7854a5340f9b948e1f6ac 429a7f9a9eb69b5e6e87a5d666f0ab974380bd2bd9c79f7a4654850aa9006161 diff --git a/swift/ql/.gitattributes b/swift/ql/.gitattributes index 761b2efeb7c..068b4274967 100644 --- a/swift/ql/.gitattributes +++ b/swift/ql/.gitattributes @@ -1035,110 +1035,36 @@ /lib/codeql/swift/generated/type/VariadicSequenceType.qll linguist-generated /lib/codeql/swift/generated/type/WeakStorageType.qll linguist-generated /test/extractor-tests/generated/AvailabilityInfo/AvailabilityInfo.ql linguist-generated -/test/extractor-tests/generated/AvailabilityInfo/AvailabilityInfo_getSpec.ql linguist-generated /test/extractor-tests/generated/Comment/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/Diagnostics/Diagnostics.ql linguist-generated /test/extractor-tests/generated/File/File.ql linguist-generated /test/extractor-tests/generated/KeyPathComponent/KeyPathComponent.ql linguist-generated -/test/extractor-tests/generated/KeyPathComponent/KeyPathComponent_getDeclRef.ql linguist-generated -/test/extractor-tests/generated/KeyPathComponent/KeyPathComponent_getSubscriptArgument.ql linguist-generated -/test/extractor-tests/generated/KeyPathComponent/KeyPathComponent_getTupleIndex.ql linguist-generated /test/extractor-tests/generated/OtherAvailabilitySpec/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/PlatformVersionAvailabilitySpec/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/decl/Accessor/Accessor.ql linguist-generated -/test/extractor-tests/generated/decl/Accessor/Accessor_getBody.ql linguist-generated -/test/extractor-tests/generated/decl/Accessor/Accessor_getCapture.ql linguist-generated -/test/extractor-tests/generated/decl/Accessor/Accessor_getGenericTypeParam.ql linguist-generated -/test/extractor-tests/generated/decl/Accessor/Accessor_getMember.ql linguist-generated -/test/extractor-tests/generated/decl/Accessor/Accessor_getName.ql linguist-generated -/test/extractor-tests/generated/decl/Accessor/Accessor_getParam.ql linguist-generated -/test/extractor-tests/generated/decl/Accessor/Accessor_getSelfParam.ql linguist-generated /test/extractor-tests/generated/decl/AssociatedTypeDecl/AssociatedTypeDecl.ql linguist-generated -/test/extractor-tests/generated/decl/AssociatedTypeDecl/AssociatedTypeDecl_getInheritedType.ql linguist-generated -/test/extractor-tests/generated/decl/AssociatedTypeDecl/AssociatedTypeDecl_getMember.ql linguist-generated /test/extractor-tests/generated/decl/CapturedDecl/CapturedDecl.ql linguist-generated -/test/extractor-tests/generated/decl/CapturedDecl/CapturedDecl_getMember.ql linguist-generated /test/extractor-tests/generated/decl/ClassDecl/ClassDecl.ql linguist-generated -/test/extractor-tests/generated/decl/ClassDecl/ClassDecl_getGenericTypeParam.ql linguist-generated -/test/extractor-tests/generated/decl/ClassDecl/ClassDecl_getInheritedType.ql linguist-generated -/test/extractor-tests/generated/decl/ClassDecl/ClassDecl_getMember.ql linguist-generated /test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl.ql linguist-generated -/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getAccessor.ql linguist-generated -/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getAttachedPropertyWrapperType.ql linguist-generated -/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getMember.ql linguist-generated -/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getParentInitializer.ql linguist-generated -/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getParentPattern.ql linguist-generated -/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getPropertyWrapperBackingVar.ql linguist-generated -/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getPropertyWrapperBackingVarBinding.ql linguist-generated -/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getPropertyWrapperProjectionVar.ql linguist-generated -/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getPropertyWrapperProjectionVarBinding.ql linguist-generated /test/extractor-tests/generated/decl/Deinitializer/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/decl/EnumDecl/EnumCaseDecl.ql linguist-generated -/test/extractor-tests/generated/decl/EnumDecl/EnumCaseDecl_getElement.ql linguist-generated -/test/extractor-tests/generated/decl/EnumDecl/EnumCaseDecl_getMember.ql linguist-generated /test/extractor-tests/generated/decl/EnumDecl/EnumDecl.ql linguist-generated -/test/extractor-tests/generated/decl/EnumDecl/EnumDecl_getGenericTypeParam.ql linguist-generated -/test/extractor-tests/generated/decl/EnumDecl/EnumDecl_getInheritedType.ql linguist-generated -/test/extractor-tests/generated/decl/EnumDecl/EnumDecl_getMember.ql linguist-generated /test/extractor-tests/generated/decl/EnumDecl/EnumElementDecl.ql linguist-generated -/test/extractor-tests/generated/decl/EnumDecl/EnumElementDecl_getMember.ql linguist-generated -/test/extractor-tests/generated/decl/EnumDecl/EnumElementDecl_getParam.ql linguist-generated /test/extractor-tests/generated/decl/ExtensionDecl/ExtensionDecl.ql linguist-generated -/test/extractor-tests/generated/decl/ExtensionDecl/ExtensionDecl_getGenericTypeParam.ql linguist-generated -/test/extractor-tests/generated/decl/ExtensionDecl/ExtensionDecl_getMember.ql linguist-generated -/test/extractor-tests/generated/decl/ExtensionDecl/ExtensionDecl_getProtocol.ql linguist-generated /test/extractor-tests/generated/decl/GenericTypeParamDecl/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/decl/IfConfigDecl/IfConfigDecl.ql linguist-generated -/test/extractor-tests/generated/decl/IfConfigDecl/IfConfigDecl_getActiveElement.ql linguist-generated -/test/extractor-tests/generated/decl/IfConfigDecl/IfConfigDecl_getMember.ql linguist-generated /test/extractor-tests/generated/decl/ImportDecl/ImportDecl.ql linguist-generated -/test/extractor-tests/generated/decl/ImportDecl/ImportDecl_getDeclaration.ql linguist-generated -/test/extractor-tests/generated/decl/ImportDecl/ImportDecl_getImportedModule.ql linguist-generated -/test/extractor-tests/generated/decl/ImportDecl/ImportDecl_getMember.ql linguist-generated /test/extractor-tests/generated/decl/InfixOperatorDecl/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/decl/Initializer/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/decl/MacroDecl/MacroDecl.ql linguist-generated -/test/extractor-tests/generated/decl/MacroDecl/MacroDecl_getGenericTypeParam.ql linguist-generated -/test/extractor-tests/generated/decl/MacroDecl/MacroDecl_getMember.ql linguist-generated -/test/extractor-tests/generated/decl/MacroDecl/MacroDecl_getParameter.ql linguist-generated -/test/extractor-tests/generated/decl/MacroDecl/MacroDecl_getRole.ql linguist-generated /test/extractor-tests/generated/decl/MacroDecl/MacroRole.ql linguist-generated -/test/extractor-tests/generated/decl/MacroDecl/MacroRole_getConformance.ql linguist-generated -/test/extractor-tests/generated/decl/MacroDecl/MacroRole_getName.ql linguist-generated /test/extractor-tests/generated/decl/ModuleDecl/ModuleDecl.ql linguist-generated -/test/extractor-tests/generated/decl/ModuleDecl/ModuleDecl_getAnExportedModule.ql linguist-generated -/test/extractor-tests/generated/decl/ModuleDecl/ModuleDecl_getAnImportedModule.ql linguist-generated -/test/extractor-tests/generated/decl/ModuleDecl/ModuleDecl_getInheritedType.ql linguist-generated -/test/extractor-tests/generated/decl/ModuleDecl/ModuleDecl_getMember.ql linguist-generated /test/extractor-tests/generated/decl/NamedFunction/NamedFunction.ql linguist-generated -/test/extractor-tests/generated/decl/NamedFunction/NamedFunction_getBody.ql linguist-generated -/test/extractor-tests/generated/decl/NamedFunction/NamedFunction_getCapture.ql linguist-generated -/test/extractor-tests/generated/decl/NamedFunction/NamedFunction_getGenericTypeParam.ql linguist-generated -/test/extractor-tests/generated/decl/NamedFunction/NamedFunction_getMember.ql linguist-generated -/test/extractor-tests/generated/decl/NamedFunction/NamedFunction_getName.ql linguist-generated -/test/extractor-tests/generated/decl/NamedFunction/NamedFunction_getParam.ql linguist-generated -/test/extractor-tests/generated/decl/NamedFunction/NamedFunction_getSelfParam.ql linguist-generated /test/extractor-tests/generated/decl/OpaqueTypeDecl/OpaqueTypeDecl.ql linguist-generated -/test/extractor-tests/generated/decl/OpaqueTypeDecl/OpaqueTypeDecl_getGenericTypeParam.ql linguist-generated -/test/extractor-tests/generated/decl/OpaqueTypeDecl/OpaqueTypeDecl_getInheritedType.ql linguist-generated -/test/extractor-tests/generated/decl/OpaqueTypeDecl/OpaqueTypeDecl_getMember.ql linguist-generated -/test/extractor-tests/generated/decl/OpaqueTypeDecl/OpaqueTypeDecl_getOpaqueGenericParam.ql linguist-generated /test/extractor-tests/generated/decl/ParamDecl/ParamDecl.ql linguist-generated -/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getAccessor.ql linguist-generated -/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getAttachedPropertyWrapperType.ql linguist-generated -/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getMember.ql linguist-generated -/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getParentInitializer.ql linguist-generated -/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getParentPattern.ql linguist-generated -/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getPropertyWrapperBackingVar.ql linguist-generated -/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getPropertyWrapperBackingVarBinding.ql linguist-generated -/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getPropertyWrapperLocalWrappedVar.ql linguist-generated -/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getPropertyWrapperLocalWrappedVarBinding.ql linguist-generated -/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getPropertyWrapperProjectionVar.ql linguist-generated -/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getPropertyWrapperProjectionVarBinding.ql linguist-generated /test/extractor-tests/generated/decl/PatternBindingDecl/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/decl/PostfixOperatorDecl/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/decl/PoundDiagnosticDecl/PoundDiagnosticDecl.ql linguist-generated -/test/extractor-tests/generated/decl/PoundDiagnosticDecl/PoundDiagnosticDecl_getMember.ql linguist-generated /test/extractor-tests/generated/decl/PrecedenceGroupDecl/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/decl/PrefixOperatorDecl/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/decl/ProtocolDecl/MISSING_SOURCE.txt linguist-generated @@ -1147,7 +1073,6 @@ /test/extractor-tests/generated/decl/TopLevelCodeDecl/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/decl/TypeAliasDecl/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/expr/AppliedPropertyWrapperExpr/AppliedPropertyWrapperExpr.ql linguist-generated -/test/extractor-tests/generated/expr/AppliedPropertyWrapperExpr/AppliedPropertyWrapperExpr_getType.ql linguist-generated /test/extractor-tests/generated/expr/Argument/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/expr/ArrayExpr/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/expr/AssignExpr/MISSING_SOURCE.txt linguist-generated @@ -1160,83 +1085,55 @@ /test/extractor-tests/generated/expr/CoerceExpr/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/expr/ConditionalCheckedCastExpr/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/expr/CopyExpr/ConsumeExpr.ql linguist-generated -/test/extractor-tests/generated/expr/CopyExpr/ConsumeExpr_getType.ql linguist-generated /test/extractor-tests/generated/expr/CopyExpr/CopyExpr.ql linguist-generated -/test/extractor-tests/generated/expr/CopyExpr/CopyExpr_getType.ql linguist-generated /test/extractor-tests/generated/expr/DeclRefExpr/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/expr/DefaultArgumentExpr/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/expr/DictionaryExpr/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/expr/DiscardAssignmentExpr/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/expr/DotSyntaxBaseIgnoredExpr/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/expr/DotSyntaxCallExpr/DotSyntaxCallExpr.ql linguist-generated -/test/extractor-tests/generated/expr/DotSyntaxCallExpr/DotSyntaxCallExpr_getArgument.ql linguist-generated -/test/extractor-tests/generated/expr/DotSyntaxCallExpr/DotSyntaxCallExpr_getType.ql linguist-generated /test/extractor-tests/generated/expr/DynamicLookupExpr/DynamicLookupExpr.ql linguist-generated -/test/extractor-tests/generated/expr/DynamicLookupExpr/DynamicLookupExpr_getMember.ql linguist-generated -/test/extractor-tests/generated/expr/DynamicLookupExpr/DynamicLookupExpr_getType.ql linguist-generated /test/extractor-tests/generated/expr/DynamicTypeExpr/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/expr/EnumIsCaseExpr/EnumIsCaseExpr.ql linguist-generated -/test/extractor-tests/generated/expr/EnumIsCaseExpr/EnumIsCaseExpr_getType.ql linguist-generated /test/extractor-tests/generated/expr/ExplicitClosureExpr/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/expr/ExtractFunctionIsolationExpr/ExtractFunctionIsolationExpr.ql linguist-generated -/test/extractor-tests/generated/expr/ExtractFunctionIsolationExpr/ExtractFunctionIsolationExpr_getType.ql linguist-generated /test/extractor-tests/generated/expr/FloatLiteralExpr/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/expr/ForceTryExpr/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/expr/ForceValueExpr/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/expr/ForcedCheckedCastExpr/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/expr/IdentityExpr/IdentityExpr.ql linguist-generated -/test/extractor-tests/generated/expr/IdentityExpr/IdentityExpr_getType.ql linguist-generated /test/extractor-tests/generated/expr/IfExpr/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/expr/ImplicitConversionExpr/ImplicitConversionExpr.ql linguist-generated -/test/extractor-tests/generated/expr/ImplicitConversionExpr/ImplicitConversionExpr_getType.ql linguist-generated /test/extractor-tests/generated/expr/InOutExpr/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/expr/InitializerRefCallExpr/InitializerRefCallExpr.ql linguist-generated -/test/extractor-tests/generated/expr/InitializerRefCallExpr/InitializerRefCallExpr_getArgument.ql linguist-generated -/test/extractor-tests/generated/expr/InitializerRefCallExpr/InitializerRefCallExpr_getType.ql linguist-generated /test/extractor-tests/generated/expr/IntegerLiteralExpr/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/expr/InterpolatedStringLiteralExpr/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/expr/IsExpr/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/expr/KeyPathApplicationExpr/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/expr/KeyPathDotExpr/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/expr/KeyPathExpr/KeyPathExpr.ql linguist-generated -/test/extractor-tests/generated/expr/KeyPathExpr/KeyPathExpr_getComponent.ql linguist-generated -/test/extractor-tests/generated/expr/KeyPathExpr/KeyPathExpr_getRoot.ql linguist-generated -/test/extractor-tests/generated/expr/KeyPathExpr/KeyPathExpr_getType.ql linguist-generated /test/extractor-tests/generated/expr/LazyInitializationExpr/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/expr/MagicIdentifierLiteralExpr/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/expr/MakeTemporarilyEscapableExpr/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/expr/MemberRefExpr/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/expr/MethodLookupExpr/MethodLookupExpr.ql linguist-generated -/test/extractor-tests/generated/expr/MethodLookupExpr/MethodLookupExpr_getMember.ql linguist-generated -/test/extractor-tests/generated/expr/MethodLookupExpr/MethodLookupExpr_getType.ql linguist-generated /test/extractor-tests/generated/expr/NilLiteralExpr/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/expr/ObjectLiteralExpr/ObjectLiteralExpr.ql linguist-generated -/test/extractor-tests/generated/expr/ObjectLiteralExpr/ObjectLiteralExpr_getArgument.ql linguist-generated -/test/extractor-tests/generated/expr/ObjectLiteralExpr/ObjectLiteralExpr_getType.ql linguist-generated /test/extractor-tests/generated/expr/OneWayExpr/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/expr/OpaqueValueExpr/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/expr/OpenExistentialExpr/OpenExistentialExpr.ql linguist-generated -/test/extractor-tests/generated/expr/OpenExistentialExpr/OpenExistentialExpr_getType.ql linguist-generated /test/extractor-tests/generated/expr/OptionalEvaluationExpr/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/expr/OptionalTryExpr/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/expr/OtherInitializerRefExpr/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/expr/PackExpansionExpr/MaterializePackExpr.ql linguist-generated -/test/extractor-tests/generated/expr/PackExpansionExpr/MaterializePackExpr_getType.ql linguist-generated /test/extractor-tests/generated/expr/PackExpansionExpr/PackElementExpr.ql linguist-generated -/test/extractor-tests/generated/expr/PackExpansionExpr/PackElementExpr_getType.ql linguist-generated /test/extractor-tests/generated/expr/PackExpansionExpr/PackExpansionExpr.ql linguist-generated -/test/extractor-tests/generated/expr/PackExpansionExpr/PackExpansionExpr_getType.ql linguist-generated /test/extractor-tests/generated/expr/PostfixUnaryExpr/PostfixUnaryExpr.ql linguist-generated -/test/extractor-tests/generated/expr/PostfixUnaryExpr/PostfixUnaryExpr_getArgument.ql linguist-generated -/test/extractor-tests/generated/expr/PostfixUnaryExpr/PostfixUnaryExpr_getType.ql linguist-generated /test/extractor-tests/generated/expr/PrefixUnaryExpr/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/expr/PropertyWrapperValuePlaceholderExpr/PropertyWrapperValuePlaceholderExpr.ql linguist-generated -/test/extractor-tests/generated/expr/PropertyWrapperValuePlaceholderExpr/PropertyWrapperValuePlaceholderExpr_getType.ql linguist-generated -/test/extractor-tests/generated/expr/PropertyWrapperValuePlaceholderExpr/PropertyWrapperValuePlaceholderExpr_getWrappedValue.ql linguist-generated /test/extractor-tests/generated/expr/RebindSelfInInitializerExpr/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/expr/RegexLiteralExpr/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/expr/SingleValueStmtExpr/SingleValueStmtExpr.ql linguist-generated -/test/extractor-tests/generated/expr/SingleValueStmtExpr/SingleValueStmtExpr_getType.ql linguist-generated /test/extractor-tests/generated/expr/SingleValueStmtExpr/ThenStmt.ql linguist-generated /test/extractor-tests/generated/expr/StringLiteralExpr/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/expr/SubscriptExpr/MISSING_SOURCE.txt linguist-generated @@ -1247,7 +1144,6 @@ /test/extractor-tests/generated/expr/TupleExpr/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/expr/TypeExpr/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/expr/TypeValueExpr/TypeValueExpr.ql linguist-generated -/test/extractor-tests/generated/expr/TypeValueExpr/TypeValueExpr_getType.ql linguist-generated /test/extractor-tests/generated/expr/VarargExpansionExpr/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/pattern/AnyPattern/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/pattern/BindingPattern/MISSING_SOURCE.txt linguist-generated @@ -1271,11 +1167,6 @@ /test/extractor-tests/generated/stmt/FailStmt/FailStmt.ql linguist-generated /test/extractor-tests/generated/stmt/FallthroughStmt/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt.ql linguist-generated -/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getIteratorVar.ql linguist-generated -/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getLabel.ql linguist-generated -/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getNextCall.ql linguist-generated -/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getVariable.ql linguist-generated -/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getWhere.ql linguist-generated /test/extractor-tests/generated/stmt/GuardStmt/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/stmt/IfStmt/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/stmt/PoundAssertStmt/PoundAssertStmt.ql linguist-generated @@ -1283,13 +1174,8 @@ /test/extractor-tests/generated/stmt/ReturnStmt/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/stmt/StmtCondition/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/stmt/SwitchStmt/CaseLabelItem.ql linguist-generated -/test/extractor-tests/generated/stmt/SwitchStmt/CaseLabelItem_getGuard.ql linguist-generated /test/extractor-tests/generated/stmt/SwitchStmt/CaseStmt.ql linguist-generated -/test/extractor-tests/generated/stmt/SwitchStmt/CaseStmt_getLabel.ql linguist-generated -/test/extractor-tests/generated/stmt/SwitchStmt/CaseStmt_getVariable.ql linguist-generated /test/extractor-tests/generated/stmt/SwitchStmt/SwitchStmt.ql linguist-generated -/test/extractor-tests/generated/stmt/SwitchStmt/SwitchStmt_getCase.ql linguist-generated -/test/extractor-tests/generated/stmt/SwitchStmt/SwitchStmt_getLabel.ql linguist-generated /test/extractor-tests/generated/stmt/ThrowStmt/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/stmt/WhileStmt/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/stmt/YieldStmt/MISSING_SOURCE.txt linguist-generated @@ -1298,7 +1184,6 @@ /test/extractor-tests/generated/type/BoundGenericEnumType/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/type/BoundGenericStructType/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/type/BuiltinIntegerType/BuiltinIntegerType.ql linguist-generated -/test/extractor-tests/generated/type/BuiltinIntegerType/BuiltinIntegerType_getWidth.ql linguist-generated /test/extractor-tests/generated/type/BuiltinType/BuiltinType.ql linguist-generated /test/extractor-tests/generated/type/ClassType/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/type/DependentMemberType/MISSING_SOURCE.txt linguist-generated @@ -1316,35 +1201,20 @@ /test/extractor-tests/generated/type/MetatypeType/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/type/ModuleType/ModuleType.ql linguist-generated /test/extractor-tests/generated/type/OpaqueTypeArchetypeType/OpaqueTypeArchetypeType.ql linguist-generated -/test/extractor-tests/generated/type/OpaqueTypeArchetypeType/OpaqueTypeArchetypeType_getProtocol.ql linguist-generated -/test/extractor-tests/generated/type/OpaqueTypeArchetypeType/OpaqueTypeArchetypeType_getSuperclass.ql linguist-generated /test/extractor-tests/generated/type/OpenedArchetypeType/OpenedArchetypeType.ql linguist-generated -/test/extractor-tests/generated/type/OpenedArchetypeType/OpenedArchetypeType_getProtocol.ql linguist-generated -/test/extractor-tests/generated/type/OpenedArchetypeType/OpenedArchetypeType_getSuperclass.ql linguist-generated /test/extractor-tests/generated/type/OptionalType/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/type/PackType/ElementArchetypeType.ql linguist-generated -/test/extractor-tests/generated/type/PackType/ElementArchetypeType_getProtocol.ql linguist-generated -/test/extractor-tests/generated/type/PackType/ElementArchetypeType_getSuperclass.ql linguist-generated /test/extractor-tests/generated/type/PackType/PackArchetypeType.ql linguist-generated -/test/extractor-tests/generated/type/PackType/PackArchetypeType_getProtocol.ql linguist-generated -/test/extractor-tests/generated/type/PackType/PackArchetypeType_getSuperclass.ql linguist-generated /test/extractor-tests/generated/type/PackType/PackElementType.ql linguist-generated /test/extractor-tests/generated/type/PackType/PackExpansionType.ql linguist-generated /test/extractor-tests/generated/type/PackType/PackType.ql linguist-generated -/test/extractor-tests/generated/type/PackType/PackType_getElement.ql linguist-generated /test/extractor-tests/generated/type/ParameterizedProtocolType/ParameterizedProtocolType.ql linguist-generated -/test/extractor-tests/generated/type/ParameterizedProtocolType/ParameterizedProtocolType_getArg.ql linguist-generated /test/extractor-tests/generated/type/ParenType/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/type/PrimaryArchetypeType/PrimaryArchetypeType.ql linguist-generated -/test/extractor-tests/generated/type/PrimaryArchetypeType/PrimaryArchetypeType_getProtocol.ql linguist-generated -/test/extractor-tests/generated/type/PrimaryArchetypeType/PrimaryArchetypeType_getSuperclass.ql linguist-generated /test/extractor-tests/generated/type/ProtocolCompositionType/ProtocolCompositionType.ql linguist-generated -/test/extractor-tests/generated/type/ProtocolCompositionType/ProtocolCompositionType_getMember.ql linguist-generated /test/extractor-tests/generated/type/ProtocolType/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/type/StructType/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/type/TupleType/TupleType.ql linguist-generated -/test/extractor-tests/generated/type/TupleType/TupleType_getName.ql linguist-generated -/test/extractor-tests/generated/type/TupleType/TupleType_getType.ql linguist-generated /test/extractor-tests/generated/type/TypeAliasType/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/type/TypeRepr/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/type/UnboundGenericType/MISSING_SOURCE.txt linguist-generated diff --git a/swift/ql/lib/CHANGELOG.md b/swift/ql/lib/CHANGELOG.md index bc63ecb86b4..627463a2cac 100644 --- a/swift/ql/lib/CHANGELOG.md +++ b/swift/ql/lib/CHANGELOG.md @@ -1,3 +1,7 @@ +## 5.0.2 + +No user-facing changes. + ## 5.0.1 ### Minor Analysis Improvements diff --git a/swift/ql/lib/change-notes/released/5.0.2.md b/swift/ql/lib/change-notes/released/5.0.2.md new file mode 100644 index 00000000000..3f921f9ca8b --- /dev/null +++ b/swift/ql/lib/change-notes/released/5.0.2.md @@ -0,0 +1,3 @@ +## 5.0.2 + +No user-facing changes. diff --git a/swift/ql/lib/codeql-pack.release.yml b/swift/ql/lib/codeql-pack.release.yml index ae7df5e18b7..3940dee0f32 100644 --- a/swift/ql/lib/codeql-pack.release.yml +++ b/swift/ql/lib/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 5.0.1 +lastReleaseVersion: 5.0.2 diff --git a/swift/ql/lib/qlpack.yml b/swift/ql/lib/qlpack.yml index 68ce7d4f490..bd0816247ca 100644 --- a/swift/ql/lib/qlpack.yml +++ b/swift/ql/lib/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/swift-all -version: 5.0.2-dev +version: 5.0.3-dev groups: swift extractor: swift dbscheme: swift.dbscheme diff --git a/swift/ql/src/CHANGELOG.md b/swift/ql/src/CHANGELOG.md index 54ed582d8d9..5f5f43bafae 100644 --- a/swift/ql/src/CHANGELOG.md +++ b/swift/ql/src/CHANGELOG.md @@ -1,3 +1,9 @@ +## 1.2.0 + +### Query Metadata Changes + +* Adjusts the `@security-severity` from 9.3 to 7.3 for `swift/uncontrolled-format-string` to align `CWE-134` severity for memory safe languages to better reflect their impact. + ## 1.1.5 No user-facing changes. diff --git a/swift/ql/src/change-notes/2025-06-06-reduce-CWE-134-for-memory-safe-languages.md b/swift/ql/src/change-notes/released/1.2.0.md similarity index 59% rename from swift/ql/src/change-notes/2025-06-06-reduce-CWE-134-for-memory-safe-languages.md rename to swift/ql/src/change-notes/released/1.2.0.md index 43be14dc8eb..fddc229c985 100644 --- a/swift/ql/src/change-notes/2025-06-06-reduce-CWE-134-for-memory-safe-languages.md +++ b/swift/ql/src/change-notes/released/1.2.0.md @@ -1,4 +1,5 @@ ---- -category: queryMetadata ---- -* Adjusts the `@security-severity` from 9.3 to 7.3 for `swift/uncontrolled-format-string` to align `CWE-134` severity for memory safe languages to better reflect their impact. \ No newline at end of file +## 1.2.0 + +### Query Metadata Changes + +* Adjusts the `@security-severity` from 9.3 to 7.3 for `swift/uncontrolled-format-string` to align `CWE-134` severity for memory safe languages to better reflect their impact. diff --git a/swift/ql/src/codeql-pack.release.yml b/swift/ql/src/codeql-pack.release.yml index df39a9de059..75430e73d1c 100644 --- a/swift/ql/src/codeql-pack.release.yml +++ b/swift/ql/src/codeql-pack.release.yml @@ -1,2 +1,2 @@ --- -lastReleaseVersion: 1.1.5 +lastReleaseVersion: 1.2.0 diff --git a/swift/ql/src/qlpack.yml b/swift/ql/src/qlpack.yml index b5bf65254e8..b24d4fbd5a7 100644 --- a/swift/ql/src/qlpack.yml +++ b/swift/ql/src/qlpack.yml @@ -1,5 +1,5 @@ name: codeql/swift-queries -version: 1.1.6-dev +version: 1.2.1-dev groups: - swift - queries diff --git a/swift/ql/test/extractor-tests/generated/AvailabilityInfo/AvailabilityInfo.expected b/swift/ql/test/extractor-tests/generated/AvailabilityInfo/AvailabilityInfo.expected index 9f56de5ccdb..e6b02e7a01b 100644 --- a/swift/ql/test/extractor-tests/generated/AvailabilityInfo/AvailabilityInfo.expected +++ b/swift/ql/test/extractor-tests/generated/AvailabilityInfo/AvailabilityInfo.expected @@ -1,2 +1,9 @@ -| test.swift:1:4:1:27 | #available | isUnavailable: | no | getNumberOfSpecs: | 2 | -| test.swift:5:4:5:45 | #unavailable | isUnavailable: | yes | getNumberOfSpecs: | 3 | +instances +| test.swift:1:4:1:27 | #available | isUnavailable: | no | +| test.swift:5:4:5:45 | #unavailable | isUnavailable: | yes | +getSpec +| test.swift:1:4:1:27 | #available | 0 | test.swift:1:15:1:21 | macOS 142 | +| test.swift:1:4:1:27 | #available | 1 | test.swift:1:26:1:26 | * | +| test.swift:5:4:5:45 | #unavailable | 0 | test.swift:5:17:5:21 | iOS 10 | +| test.swift:5:4:5:45 | #unavailable | 1 | test.swift:5:25:5:33 | watchOS 10 | +| test.swift:5:4:5:45 | #unavailable | 2 | test.swift:5:37:5:43 | macOS 10 | diff --git a/swift/ql/test/extractor-tests/generated/AvailabilityInfo/AvailabilityInfo.ql b/swift/ql/test/extractor-tests/generated/AvailabilityInfo/AvailabilityInfo.ql index ae10b4bb767..50d7addece8 100644 --- a/swift/ql/test/extractor-tests/generated/AvailabilityInfo/AvailabilityInfo.ql +++ b/swift/ql/test/extractor-tests/generated/AvailabilityInfo/AvailabilityInfo.ql @@ -2,10 +2,13 @@ import codeql.swift.elements import TestUtils -from AvailabilityInfo x, string isUnavailable, int getNumberOfSpecs -where +query predicate instances(AvailabilityInfo x, string isUnavailable__label, string isUnavailable) { toBeTested(x) and not x.isUnknown() and - (if x.isUnavailable() then isUnavailable = "yes" else isUnavailable = "no") and - getNumberOfSpecs = x.getNumberOfSpecs() -select x, "isUnavailable:", isUnavailable, "getNumberOfSpecs:", getNumberOfSpecs + isUnavailable__label = "isUnavailable:" and + if x.isUnavailable() then isUnavailable = "yes" else isUnavailable = "no" +} + +query predicate getSpec(AvailabilityInfo x, int index, AvailabilitySpec getSpec) { + toBeTested(x) and not x.isUnknown() and getSpec = x.getSpec(index) +} diff --git a/swift/ql/test/extractor-tests/generated/AvailabilityInfo/AvailabilityInfo_getSpec.expected b/swift/ql/test/extractor-tests/generated/AvailabilityInfo/AvailabilityInfo_getSpec.expected deleted file mode 100644 index 83e9450d76b..00000000000 --- a/swift/ql/test/extractor-tests/generated/AvailabilityInfo/AvailabilityInfo_getSpec.expected +++ /dev/null @@ -1,5 +0,0 @@ -| test.swift:1:4:1:27 | #available | 0 | test.swift:1:15:1:21 | macOS 142 | -| test.swift:1:4:1:27 | #available | 1 | test.swift:1:26:1:26 | * | -| test.swift:5:4:5:45 | #unavailable | 0 | test.swift:5:17:5:21 | iOS 10 | -| test.swift:5:4:5:45 | #unavailable | 1 | test.swift:5:25:5:33 | watchOS 10 | -| test.swift:5:4:5:45 | #unavailable | 2 | test.swift:5:37:5:43 | macOS 10 | diff --git a/swift/ql/test/extractor-tests/generated/AvailabilityInfo/AvailabilityInfo_getSpec.ql b/swift/ql/test/extractor-tests/generated/AvailabilityInfo/AvailabilityInfo_getSpec.ql deleted file mode 100644 index 418f5251eff..00000000000 --- a/swift/ql/test/extractor-tests/generated/AvailabilityInfo/AvailabilityInfo_getSpec.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from AvailabilityInfo x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getSpec(index) diff --git a/swift/ql/test/extractor-tests/generated/Diagnostics/Diagnostics.ql b/swift/ql/test/extractor-tests/generated/Diagnostics/Diagnostics.ql index 18e302cfaa6..ef370f93d92 100644 --- a/swift/ql/test/extractor-tests/generated/Diagnostics/Diagnostics.ql +++ b/swift/ql/test/extractor-tests/generated/Diagnostics/Diagnostics.ql @@ -2,10 +2,13 @@ import codeql.swift.elements import TestUtils -from Diagnostics x, string getText, int getKind -where +query predicate instances( + Diagnostics x, string getText__label, string getText, string getKind__label, int getKind +) { toBeTested(x) and not x.isUnknown() and + getText__label = "getText:" and getText = x.getText() and + getKind__label = "getKind:" and getKind = x.getKind() -select x, "getText:", getText, "getKind:", getKind +} diff --git a/swift/ql/test/extractor-tests/generated/File/File.ql b/swift/ql/test/extractor-tests/generated/File/File.ql index 3614bcc5073..75690caf90f 100644 --- a/swift/ql/test/extractor-tests/generated/File/File.ql +++ b/swift/ql/test/extractor-tests/generated/File/File.ql @@ -2,13 +2,17 @@ import codeql.swift.elements import TestUtils -from File x, string getName, string isSuccessfullyExtracted -where +query predicate instances( + File x, string primaryQlClasses, string getName__label, string getName, + string isSuccessfullyExtracted__label, string isSuccessfullyExtracted +) { toBeTested(x) and not x.isUnknown() and + primaryQlClasses = x.getPrimaryQlClasses() and + getName__label = "getName:" and getName = x.getName() and + isSuccessfullyExtracted__label = "isSuccessfullyExtracted:" and if x.isSuccessfullyExtracted() then isSuccessfullyExtracted = "yes" else isSuccessfullyExtracted = "no" -select x, x.getPrimaryQlClasses(), "getName:", getName, "isSuccessfullyExtracted:", - isSuccessfullyExtracted +} diff --git a/swift/ql/test/extractor-tests/generated/KeyPathComponent/KeyPathComponent.expected b/swift/ql/test/extractor-tests/generated/KeyPathComponent/KeyPathComponent.expected index 90bfc4f4f2a..9d51a6ed8d5 100644 --- a/swift/ql/test/extractor-tests/generated/KeyPathComponent/KeyPathComponent.expected +++ b/swift/ql/test/extractor-tests/generated/KeyPathComponent/KeyPathComponent.expected @@ -1,14 +1,28 @@ -| file://:0:0:0:0 | KeyPathComponent | getKind: | 7 | getNumberOfSubscriptArguments: | 0 | hasTupleIndex: | no | hasDeclRef: | no | getComponentType: | Int? | -| key_path_expr.swift:11:17:11:17 | KeyPathComponent | getKind: | 3 | getNumberOfSubscriptArguments: | 0 | hasTupleIndex: | no | hasDeclRef: | yes | getComponentType: | Int | -| key_path_expr.swift:12:24:12:26 | KeyPathComponent | getKind: | 4 | getNumberOfSubscriptArguments: | 1 | hasTupleIndex: | no | hasDeclRef: | yes | getComponentType: | Int | -| key_path_expr.swift:13:34:13:38 | KeyPathComponent | getKind: | 4 | getNumberOfSubscriptArguments: | 1 | hasTupleIndex: | no | hasDeclRef: | yes | getComponentType: | Int? | -| key_path_expr.swift:14:31:14:31 | KeyPathComponent | getKind: | 5 | getNumberOfSubscriptArguments: | 0 | hasTupleIndex: | no | hasDeclRef: | no | getComponentType: | Int | -| key_path_expr.swift:14:31:14:31 | KeyPathComponent | getKind: | 8 | getNumberOfSubscriptArguments: | 0 | hasTupleIndex: | no | hasDeclRef: | no | getComponentType: | Int? | -| key_path_expr.swift:15:21:15:21 | KeyPathComponent | getKind: | 3 | getNumberOfSubscriptArguments: | 0 | hasTupleIndex: | no | hasDeclRef: | yes | getComponentType: | Bar? | -| key_path_expr.swift:15:24:15:24 | KeyPathComponent | getKind: | 6 | getNumberOfSubscriptArguments: | 0 | hasTupleIndex: | no | hasDeclRef: | no | getComponentType: | Bar | -| key_path_expr.swift:15:26:15:26 | KeyPathComponent | getKind: | 3 | getNumberOfSubscriptArguments: | 0 | hasTupleIndex: | no | hasDeclRef: | yes | getComponentType: | Int? | -| key_path_expr.swift:16:25:16:25 | KeyPathComponent | getKind: | 3 | getNumberOfSubscriptArguments: | 0 | hasTupleIndex: | no | hasDeclRef: | yes | getComponentType: | Bar? | -| key_path_expr.swift:16:28:16:28 | KeyPathComponent | getKind: | 6 | getNumberOfSubscriptArguments: | 0 | hasTupleIndex: | no | hasDeclRef: | no | getComponentType: | Bar | -| key_path_expr.swift:16:30:16:30 | KeyPathComponent | getKind: | 3 | getNumberOfSubscriptArguments: | 0 | hasTupleIndex: | no | hasDeclRef: | yes | getComponentType: | Int | -| key_path_expr.swift:17:16:17:16 | KeyPathComponent | getKind: | 8 | getNumberOfSubscriptArguments: | 0 | hasTupleIndex: | no | hasDeclRef: | no | getComponentType: | Int | -| key_path_expr.swift:18:32:18:32 | KeyPathComponent | getKind: | 9 | getNumberOfSubscriptArguments: | 0 | hasTupleIndex: | yes | hasDeclRef: | no | getComponentType: | Int | +instances +| file://:0:0:0:0 | KeyPathComponent | getKind: | 7 | getComponentType: | Int? | +| key_path_expr.swift:11:17:11:17 | KeyPathComponent | getKind: | 3 | getComponentType: | Int | +| key_path_expr.swift:12:24:12:26 | KeyPathComponent | getKind: | 4 | getComponentType: | Int | +| key_path_expr.swift:13:34:13:38 | KeyPathComponent | getKind: | 4 | getComponentType: | Int? | +| key_path_expr.swift:14:31:14:31 | KeyPathComponent | getKind: | 5 | getComponentType: | Int | +| key_path_expr.swift:14:31:14:31 | KeyPathComponent | getKind: | 8 | getComponentType: | Int? | +| key_path_expr.swift:15:21:15:21 | KeyPathComponent | getKind: | 3 | getComponentType: | Bar? | +| key_path_expr.swift:15:24:15:24 | KeyPathComponent | getKind: | 6 | getComponentType: | Bar | +| key_path_expr.swift:15:26:15:26 | KeyPathComponent | getKind: | 3 | getComponentType: | Int? | +| key_path_expr.swift:16:25:16:25 | KeyPathComponent | getKind: | 3 | getComponentType: | Bar? | +| key_path_expr.swift:16:28:16:28 | KeyPathComponent | getKind: | 6 | getComponentType: | Bar | +| key_path_expr.swift:16:30:16:30 | KeyPathComponent | getKind: | 3 | getComponentType: | Int | +| key_path_expr.swift:17:16:17:16 | KeyPathComponent | getKind: | 8 | getComponentType: | Int | +| key_path_expr.swift:18:32:18:32 | KeyPathComponent | getKind: | 9 | getComponentType: | Int | +getSubscriptArgument +| key_path_expr.swift:12:24:12:26 | KeyPathComponent | 0 | key_path_expr.swift:12:25:12:25 | : 0 | +| key_path_expr.swift:13:34:13:38 | KeyPathComponent | 0 | key_path_expr.swift:13:35:13:35 | : a | +getTupleIndex +| key_path_expr.swift:18:32:18:32 | KeyPathComponent | 0 | +getDeclRef +| key_path_expr.swift:11:17:11:17 | KeyPathComponent | key_path_expr.swift:7:9:7:9 | value | +| key_path_expr.swift:12:24:12:26 | KeyPathComponent | file://:0:0:0:0 | subscript ... | +| key_path_expr.swift:13:34:13:38 | KeyPathComponent | file://:0:0:0:0 | subscript ... | +| key_path_expr.swift:15:21:15:21 | KeyPathComponent | key_path_expr.swift:8:9:8:9 | opt | +| key_path_expr.swift:15:26:15:26 | KeyPathComponent | key_path_expr.swift:3:9:3:9 | opt | +| key_path_expr.swift:16:25:16:25 | KeyPathComponent | key_path_expr.swift:8:9:8:9 | opt | +| key_path_expr.swift:16:30:16:30 | KeyPathComponent | key_path_expr.swift:2:9:2:9 | value | diff --git a/swift/ql/test/extractor-tests/generated/KeyPathComponent/KeyPathComponent.ql b/swift/ql/test/extractor-tests/generated/KeyPathComponent/KeyPathComponent.ql index 06d9851feb6..a81df30d465 100644 --- a/swift/ql/test/extractor-tests/generated/KeyPathComponent/KeyPathComponent.ql +++ b/swift/ql/test/extractor-tests/generated/KeyPathComponent/KeyPathComponent.ql @@ -2,16 +2,26 @@ import codeql.swift.elements import TestUtils -from - KeyPathComponent x, int getKind, int getNumberOfSubscriptArguments, string hasTupleIndex, - string hasDeclRef, Type getComponentType -where +query predicate instances( + KeyPathComponent x, string getKind__label, int getKind, string getComponentType__label, + Type getComponentType +) { toBeTested(x) and not x.isUnknown() and + getKind__label = "getKind:" and getKind = x.getKind() and - getNumberOfSubscriptArguments = x.getNumberOfSubscriptArguments() and - (if x.hasTupleIndex() then hasTupleIndex = "yes" else hasTupleIndex = "no") and - (if x.hasDeclRef() then hasDeclRef = "yes" else hasDeclRef = "no") and + getComponentType__label = "getComponentType:" and getComponentType = x.getComponentType() -select x, "getKind:", getKind, "getNumberOfSubscriptArguments:", getNumberOfSubscriptArguments, - "hasTupleIndex:", hasTupleIndex, "hasDeclRef:", hasDeclRef, "getComponentType:", getComponentType +} + +query predicate getSubscriptArgument(KeyPathComponent x, int index, Argument getSubscriptArgument) { + toBeTested(x) and not x.isUnknown() and getSubscriptArgument = x.getSubscriptArgument(index) +} + +query predicate getTupleIndex(KeyPathComponent x, int getTupleIndex) { + toBeTested(x) and not x.isUnknown() and getTupleIndex = x.getTupleIndex() +} + +query predicate getDeclRef(KeyPathComponent x, ValueDecl getDeclRef) { + toBeTested(x) and not x.isUnknown() and getDeclRef = x.getDeclRef() +} diff --git a/swift/ql/test/extractor-tests/generated/KeyPathComponent/KeyPathComponent_getDeclRef.expected b/swift/ql/test/extractor-tests/generated/KeyPathComponent/KeyPathComponent_getDeclRef.expected deleted file mode 100644 index 74dc644cb80..00000000000 --- a/swift/ql/test/extractor-tests/generated/KeyPathComponent/KeyPathComponent_getDeclRef.expected +++ /dev/null @@ -1,7 +0,0 @@ -| key_path_expr.swift:11:17:11:17 | KeyPathComponent | key_path_expr.swift:7:9:7:9 | value | -| key_path_expr.swift:12:24:12:26 | KeyPathComponent | file://:0:0:0:0 | subscript ... | -| key_path_expr.swift:13:34:13:38 | KeyPathComponent | file://:0:0:0:0 | subscript ... | -| key_path_expr.swift:15:21:15:21 | KeyPathComponent | key_path_expr.swift:8:9:8:9 | opt | -| key_path_expr.swift:15:26:15:26 | KeyPathComponent | key_path_expr.swift:3:9:3:9 | opt | -| key_path_expr.swift:16:25:16:25 | KeyPathComponent | key_path_expr.swift:8:9:8:9 | opt | -| key_path_expr.swift:16:30:16:30 | KeyPathComponent | key_path_expr.swift:2:9:2:9 | value | diff --git a/swift/ql/test/extractor-tests/generated/KeyPathComponent/KeyPathComponent_getDeclRef.ql b/swift/ql/test/extractor-tests/generated/KeyPathComponent/KeyPathComponent_getDeclRef.ql deleted file mode 100644 index 74174fd4bd2..00000000000 --- a/swift/ql/test/extractor-tests/generated/KeyPathComponent/KeyPathComponent_getDeclRef.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from KeyPathComponent x -where toBeTested(x) and not x.isUnknown() -select x, x.getDeclRef() diff --git a/swift/ql/test/extractor-tests/generated/KeyPathComponent/KeyPathComponent_getSubscriptArgument.expected b/swift/ql/test/extractor-tests/generated/KeyPathComponent/KeyPathComponent_getSubscriptArgument.expected deleted file mode 100644 index c86fff6a006..00000000000 --- a/swift/ql/test/extractor-tests/generated/KeyPathComponent/KeyPathComponent_getSubscriptArgument.expected +++ /dev/null @@ -1,2 +0,0 @@ -| key_path_expr.swift:12:24:12:26 | KeyPathComponent | 0 | key_path_expr.swift:12:25:12:25 | : 0 | -| key_path_expr.swift:13:34:13:38 | KeyPathComponent | 0 | key_path_expr.swift:13:35:13:35 | : a | diff --git a/swift/ql/test/extractor-tests/generated/KeyPathComponent/KeyPathComponent_getSubscriptArgument.ql b/swift/ql/test/extractor-tests/generated/KeyPathComponent/KeyPathComponent_getSubscriptArgument.ql deleted file mode 100644 index 30b149e8204..00000000000 --- a/swift/ql/test/extractor-tests/generated/KeyPathComponent/KeyPathComponent_getSubscriptArgument.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from KeyPathComponent x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getSubscriptArgument(index) diff --git a/swift/ql/test/extractor-tests/generated/KeyPathComponent/KeyPathComponent_getTupleIndex.expected b/swift/ql/test/extractor-tests/generated/KeyPathComponent/KeyPathComponent_getTupleIndex.expected deleted file mode 100644 index d4563136606..00000000000 --- a/swift/ql/test/extractor-tests/generated/KeyPathComponent/KeyPathComponent_getTupleIndex.expected +++ /dev/null @@ -1 +0,0 @@ -| key_path_expr.swift:18:32:18:32 | KeyPathComponent | 0 | diff --git a/swift/ql/test/extractor-tests/generated/KeyPathComponent/KeyPathComponent_getTupleIndex.ql b/swift/ql/test/extractor-tests/generated/KeyPathComponent/KeyPathComponent_getTupleIndex.ql deleted file mode 100644 index 40e2e8924a8..00000000000 --- a/swift/ql/test/extractor-tests/generated/KeyPathComponent/KeyPathComponent_getTupleIndex.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from KeyPathComponent x -where toBeTested(x) and not x.isUnknown() -select x, x.getTupleIndex() diff --git a/swift/ql/test/extractor-tests/generated/decl/Accessor/Accessor.expected b/swift/ql/test/extractor-tests/generated/decl/Accessor/Accessor.expected index 15b05916e44..ade62608569 100644 --- a/swift/ql/test/extractor-tests/generated/decl/Accessor/Accessor.expected +++ b/swift/ql/test/extractor-tests/generated/decl/Accessor/Accessor.expected @@ -1,36 +1,165 @@ -| accessors.swift:2:9:2:9 | _modify | hasName: | yes | hasSelfParam: | yes | getNumberOfParams: | 0 | hasBody: | yes | getNumberOfCaptures: | 0 | getNumberOfGenericTypeParams: | 0 | getModule: | file://:0:0:0:0 | accessors | getNumberOfMembers: | 0 | getInterfaceType: | (inout Foo) -> () -> () | isGetter: | no | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | yes | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | -| accessors.swift:2:9:2:9 | get | hasName: | yes | hasSelfParam: | yes | getNumberOfParams: | 0 | hasBody: | yes | getNumberOfCaptures: | 0 | getNumberOfGenericTypeParams: | 0 | getModule: | file://:0:0:0:0 | accessors | getNumberOfMembers: | 0 | getInterfaceType: | (Foo) -> () -> Int | isGetter: | yes | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | -| accessors.swift:2:9:2:9 | set | hasName: | yes | hasSelfParam: | yes | getNumberOfParams: | 1 | hasBody: | yes | getNumberOfCaptures: | 0 | getNumberOfGenericTypeParams: | 0 | getModule: | file://:0:0:0:0 | accessors | getNumberOfMembers: | 0 | getInterfaceType: | (inout Foo) -> (Int) -> () | isGetter: | no | isSetter: | yes | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | -| accessors.swift:3:9:3:9 | _modify | hasName: | yes | hasSelfParam: | yes | getNumberOfParams: | 0 | hasBody: | yes | getNumberOfCaptures: | 0 | getNumberOfGenericTypeParams: | 0 | getModule: | file://:0:0:0:0 | accessors | getNumberOfMembers: | 0 | getInterfaceType: | (inout Foo) -> () -> () | isGetter: | no | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | yes | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | -| accessors.swift:4:9:4:28 | get | hasName: | yes | hasSelfParam: | yes | getNumberOfParams: | 0 | hasBody: | yes | getNumberOfCaptures: | 0 | getNumberOfGenericTypeParams: | 0 | getModule: | file://:0:0:0:0 | accessors | getNumberOfMembers: | 0 | getInterfaceType: | (Foo) -> () -> Int | isGetter: | yes | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | -| accessors.swift:5:9:5:42 | set | hasName: | yes | hasSelfParam: | yes | getNumberOfParams: | 1 | hasBody: | yes | getNumberOfCaptures: | 0 | getNumberOfGenericTypeParams: | 0 | getModule: | file://:0:0:0:0 | accessors | getNumberOfMembers: | 0 | getInterfaceType: | (inout Foo) -> (Int) -> () | isGetter: | no | isSetter: | yes | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | -| accessors.swift:7:9:7:9 | _modify | hasName: | yes | hasSelfParam: | yes | getNumberOfParams: | 0 | hasBody: | yes | getNumberOfCaptures: | 0 | getNumberOfGenericTypeParams: | 0 | getModule: | file://:0:0:0:0 | accessors | getNumberOfMembers: | 0 | getInterfaceType: | (inout Foo) -> () -> () | isGetter: | no | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | yes | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | -| accessors.swift:7:9:7:9 | get | hasName: | yes | hasSelfParam: | yes | getNumberOfParams: | 0 | hasBody: | yes | getNumberOfCaptures: | 0 | getNumberOfGenericTypeParams: | 0 | getModule: | file://:0:0:0:0 | accessors | getNumberOfMembers: | 0 | getInterfaceType: | (Foo) -> () -> Int | isGetter: | yes | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | -| accessors.swift:7:9:7:9 | set | hasName: | yes | hasSelfParam: | yes | getNumberOfParams: | 1 | hasBody: | yes | getNumberOfCaptures: | 0 | getNumberOfGenericTypeParams: | 0 | getModule: | file://:0:0:0:0 | accessors | getNumberOfMembers: | 0 | getInterfaceType: | (inout Foo) -> (Int) -> () | isGetter: | no | isSetter: | yes | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | -| accessors.swift:8:9:8:29 | willSet | hasName: | yes | hasSelfParam: | yes | getNumberOfParams: | 1 | hasBody: | yes | getNumberOfCaptures: | 0 | getNumberOfGenericTypeParams: | 0 | getModule: | file://:0:0:0:0 | accessors | getNumberOfMembers: | 0 | getInterfaceType: | (inout Foo) -> (Int) -> () | isGetter: | no | isSetter: | no | isWillSet: | yes | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | -| accessors.swift:11:9:11:9 | _modify | hasName: | yes | hasSelfParam: | yes | getNumberOfParams: | 0 | hasBody: | yes | getNumberOfCaptures: | 0 | getNumberOfGenericTypeParams: | 0 | getModule: | file://:0:0:0:0 | accessors | getNumberOfMembers: | 0 | getInterfaceType: | (inout Foo) -> () -> () | isGetter: | no | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | yes | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | -| accessors.swift:11:9:11:9 | get | hasName: | yes | hasSelfParam: | yes | getNumberOfParams: | 0 | hasBody: | yes | getNumberOfCaptures: | 0 | getNumberOfGenericTypeParams: | 0 | getModule: | file://:0:0:0:0 | accessors | getNumberOfMembers: | 0 | getInterfaceType: | (Foo) -> () -> Int | isGetter: | yes | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | -| accessors.swift:11:9:11:9 | set | hasName: | yes | hasSelfParam: | yes | getNumberOfParams: | 1 | hasBody: | yes | getNumberOfCaptures: | 0 | getNumberOfGenericTypeParams: | 0 | getModule: | file://:0:0:0:0 | accessors | getNumberOfMembers: | 0 | getInterfaceType: | (inout Foo) -> (Int) -> () | isGetter: | no | isSetter: | yes | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | -| accessors.swift:12:9:12:19 | willSet | hasName: | yes | hasSelfParam: | yes | getNumberOfParams: | 1 | hasBody: | yes | getNumberOfCaptures: | 0 | getNumberOfGenericTypeParams: | 0 | getModule: | file://:0:0:0:0 | accessors | getNumberOfMembers: | 0 | getInterfaceType: | (inout Foo) -> (Int) -> () | isGetter: | no | isSetter: | no | isWillSet: | yes | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | -| accessors.swift:15:9:15:9 | _modify | hasName: | yes | hasSelfParam: | yes | getNumberOfParams: | 0 | hasBody: | yes | getNumberOfCaptures: | 0 | getNumberOfGenericTypeParams: | 0 | getModule: | file://:0:0:0:0 | accessors | getNumberOfMembers: | 0 | getInterfaceType: | (inout Foo) -> () -> () | isGetter: | no | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | yes | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | -| accessors.swift:15:9:15:9 | get | hasName: | yes | hasSelfParam: | yes | getNumberOfParams: | 0 | hasBody: | yes | getNumberOfCaptures: | 0 | getNumberOfGenericTypeParams: | 0 | getModule: | file://:0:0:0:0 | accessors | getNumberOfMembers: | 0 | getInterfaceType: | (Foo) -> () -> Int | isGetter: | yes | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | -| accessors.swift:15:9:15:9 | set | hasName: | yes | hasSelfParam: | yes | getNumberOfParams: | 1 | hasBody: | yes | getNumberOfCaptures: | 0 | getNumberOfGenericTypeParams: | 0 | getModule: | file://:0:0:0:0 | accessors | getNumberOfMembers: | 0 | getInterfaceType: | (inout Foo) -> (Int) -> () | isGetter: | no | isSetter: | yes | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | -| accessors.swift:16:9:16:28 | didSet | hasName: | yes | hasSelfParam: | yes | getNumberOfParams: | 1 | hasBody: | yes | getNumberOfCaptures: | 0 | getNumberOfGenericTypeParams: | 0 | getModule: | file://:0:0:0:0 | accessors | getNumberOfMembers: | 0 | getInterfaceType: | (inout Foo) -> (Int) -> () | isGetter: | no | isSetter: | no | isWillSet: | no | isDidSet: | yes | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | -| accessors.swift:19:9:19:9 | _modify | hasName: | yes | hasSelfParam: | yes | getNumberOfParams: | 0 | hasBody: | yes | getNumberOfCaptures: | 0 | getNumberOfGenericTypeParams: | 0 | getModule: | file://:0:0:0:0 | accessors | getNumberOfMembers: | 0 | getInterfaceType: | (inout Foo) -> () -> () | isGetter: | no | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | yes | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | -| accessors.swift:19:9:19:9 | get | hasName: | yes | hasSelfParam: | yes | getNumberOfParams: | 0 | hasBody: | yes | getNumberOfCaptures: | 0 | getNumberOfGenericTypeParams: | 0 | getModule: | file://:0:0:0:0 | accessors | getNumberOfMembers: | 0 | getInterfaceType: | (Foo) -> () -> Int | isGetter: | yes | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | -| accessors.swift:19:9:19:9 | set | hasName: | yes | hasSelfParam: | yes | getNumberOfParams: | 1 | hasBody: | yes | getNumberOfCaptures: | 0 | getNumberOfGenericTypeParams: | 0 | getModule: | file://:0:0:0:0 | accessors | getNumberOfMembers: | 0 | getInterfaceType: | (inout Foo) -> (Int) -> () | isGetter: | no | isSetter: | yes | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | -| accessors.swift:20:9:20:18 | didSet | hasName: | yes | hasSelfParam: | yes | getNumberOfParams: | 0 | hasBody: | yes | getNumberOfCaptures: | 0 | getNumberOfGenericTypeParams: | 0 | getModule: | file://:0:0:0:0 | accessors | getNumberOfMembers: | 0 | getInterfaceType: | (inout Foo) -> () -> () | isGetter: | no | isSetter: | no | isWillSet: | no | isDidSet: | yes | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | -| accessors.swift:23:9:23:9 | _modify | hasName: | yes | hasSelfParam: | yes | getNumberOfParams: | 0 | hasBody: | yes | getNumberOfCaptures: | 0 | getNumberOfGenericTypeParams: | 0 | getModule: | file://:0:0:0:0 | accessors | getNumberOfMembers: | 0 | getInterfaceType: | (inout Foo) -> () -> () | isGetter: | no | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | yes | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | -| accessors.swift:23:9:23:9 | get | hasName: | yes | hasSelfParam: | yes | getNumberOfParams: | 0 | hasBody: | yes | getNumberOfCaptures: | 0 | getNumberOfGenericTypeParams: | 0 | getModule: | file://:0:0:0:0 | accessors | getNumberOfMembers: | 0 | getInterfaceType: | (Foo) -> () -> Int | isGetter: | yes | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | -| accessors.swift:23:9:23:9 | set | hasName: | yes | hasSelfParam: | yes | getNumberOfParams: | 1 | hasBody: | yes | getNumberOfCaptures: | 0 | getNumberOfGenericTypeParams: | 0 | getModule: | file://:0:0:0:0 | accessors | getNumberOfMembers: | 0 | getInterfaceType: | (inout Foo) -> (Int) -> () | isGetter: | no | isSetter: | yes | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | -| accessors.swift:24:9:24:19 | willSet | hasName: | yes | hasSelfParam: | yes | getNumberOfParams: | 1 | hasBody: | yes | getNumberOfCaptures: | 0 | getNumberOfGenericTypeParams: | 0 | getModule: | file://:0:0:0:0 | accessors | getNumberOfMembers: | 0 | getInterfaceType: | (inout Foo) -> (Int) -> () | isGetter: | no | isSetter: | no | isWillSet: | yes | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | -| accessors.swift:26:9:26:18 | didSet | hasName: | yes | hasSelfParam: | yes | getNumberOfParams: | 0 | hasBody: | yes | getNumberOfCaptures: | 0 | getNumberOfGenericTypeParams: | 0 | getModule: | file://:0:0:0:0 | accessors | getNumberOfMembers: | 0 | getInterfaceType: | (inout Foo) -> () -> () | isGetter: | no | isSetter: | no | isWillSet: | no | isDidSet: | yes | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | -| accessors.swift:29:9:29:9 | get | hasName: | yes | hasSelfParam: | yes | getNumberOfParams: | 0 | hasBody: | yes | getNumberOfCaptures: | 0 | getNumberOfGenericTypeParams: | 0 | getModule: | file://:0:0:0:0 | accessors | getNumberOfMembers: | 0 | getInterfaceType: | (Foo) -> () -> Int | isGetter: | yes | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | -| accessors.swift:29:9:29:9 | set | hasName: | yes | hasSelfParam: | yes | getNumberOfParams: | 1 | hasBody: | yes | getNumberOfCaptures: | 0 | getNumberOfGenericTypeParams: | 0 | getModule: | file://:0:0:0:0 | accessors | getNumberOfMembers: | 0 | getInterfaceType: | (inout Foo) -> (Int) -> () | isGetter: | no | isSetter: | yes | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | -| accessors.swift:30:9:32:9 | _read | hasName: | yes | hasSelfParam: | yes | getNumberOfParams: | 0 | hasBody: | yes | getNumberOfCaptures: | 0 | getNumberOfGenericTypeParams: | 0 | getModule: | file://:0:0:0:0 | accessors | getNumberOfMembers: | 0 | getInterfaceType: | (Foo) -> () -> () | isGetter: | no | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | yes | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | -| accessors.swift:33:9:35:9 | _modify | hasName: | yes | hasSelfParam: | yes | getNumberOfParams: | 0 | hasBody: | yes | getNumberOfCaptures: | 0 | getNumberOfGenericTypeParams: | 0 | getModule: | file://:0:0:0:0 | accessors | getNumberOfMembers: | 0 | getInterfaceType: | (inout Foo) -> () -> () | isGetter: | no | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | yes | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | -| accessors.swift:38:9:38:9 | _modify | hasName: | yes | hasSelfParam: | yes | getNumberOfParams: | 0 | hasBody: | yes | getNumberOfCaptures: | 0 | getNumberOfGenericTypeParams: | 0 | getModule: | file://:0:0:0:0 | accessors | getNumberOfMembers: | 0 | getInterfaceType: | (inout Foo) -> () -> () | isGetter: | no | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | yes | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | -| accessors.swift:38:9:38:9 | get | hasName: | yes | hasSelfParam: | yes | getNumberOfParams: | 0 | hasBody: | yes | getNumberOfCaptures: | 0 | getNumberOfGenericTypeParams: | 0 | getModule: | file://:0:0:0:0 | accessors | getNumberOfMembers: | 0 | getInterfaceType: | (Foo) -> () -> Int | isGetter: | yes | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | -| accessors.swift:38:9:38:9 | set | hasName: | yes | hasSelfParam: | yes | getNumberOfParams: | 1 | hasBody: | yes | getNumberOfCaptures: | 0 | getNumberOfGenericTypeParams: | 0 | getModule: | file://:0:0:0:0 | accessors | getNumberOfMembers: | 0 | getInterfaceType: | (inout Foo) -> (Int) -> () | isGetter: | no | isSetter: | yes | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | -| accessors.swift:39:9:41:9 | unsafeAddress | hasName: | yes | hasSelfParam: | yes | getNumberOfParams: | 0 | hasBody: | yes | getNumberOfCaptures: | 0 | getNumberOfGenericTypeParams: | 0 | getModule: | file://:0:0:0:0 | accessors | getNumberOfMembers: | 0 | getInterfaceType: | (Foo) -> () -> UnsafePointer | isGetter: | no | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | yes | isUnsafeMutableAddress: | no | -| accessors.swift:42:9:44:9 | unsafeMutableAddress | hasName: | yes | hasSelfParam: | yes | getNumberOfParams: | 0 | hasBody: | yes | getNumberOfCaptures: | 0 | getNumberOfGenericTypeParams: | 0 | getModule: | file://:0:0:0:0 | accessors | getNumberOfMembers: | 0 | getInterfaceType: | (inout Foo) -> () -> UnsafeMutablePointer | isGetter: | no | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | yes | +instances +| accessors.swift:2:9:2:9 | _modify | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> () -> () | isGetter: | no | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | yes | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | +| accessors.swift:2:9:2:9 | get | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (Foo) -> () -> Int | isGetter: | yes | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | +| accessors.swift:2:9:2:9 | set | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> (Int) -> () | isGetter: | no | isSetter: | yes | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | +| accessors.swift:3:9:3:9 | _modify | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> () -> () | isGetter: | no | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | yes | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | +| accessors.swift:4:9:4:28 | get | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (Foo) -> () -> Int | isGetter: | yes | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | +| accessors.swift:5:9:5:42 | set | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> (Int) -> () | isGetter: | no | isSetter: | yes | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | +| accessors.swift:7:9:7:9 | _modify | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> () -> () | isGetter: | no | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | yes | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | +| accessors.swift:7:9:7:9 | get | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (Foo) -> () -> Int | isGetter: | yes | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | +| accessors.swift:7:9:7:9 | set | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> (Int) -> () | isGetter: | no | isSetter: | yes | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | +| accessors.swift:8:9:8:29 | willSet | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> (Int) -> () | isGetter: | no | isSetter: | no | isWillSet: | yes | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | +| accessors.swift:11:9:11:9 | _modify | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> () -> () | isGetter: | no | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | yes | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | +| accessors.swift:11:9:11:9 | get | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (Foo) -> () -> Int | isGetter: | yes | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | +| accessors.swift:11:9:11:9 | set | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> (Int) -> () | isGetter: | no | isSetter: | yes | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | +| accessors.swift:12:9:12:19 | willSet | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> (Int) -> () | isGetter: | no | isSetter: | no | isWillSet: | yes | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | +| accessors.swift:15:9:15:9 | _modify | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> () -> () | isGetter: | no | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | yes | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | +| accessors.swift:15:9:15:9 | get | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (Foo) -> () -> Int | isGetter: | yes | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | +| accessors.swift:15:9:15:9 | set | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> (Int) -> () | isGetter: | no | isSetter: | yes | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | +| accessors.swift:16:9:16:28 | didSet | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> (Int) -> () | isGetter: | no | isSetter: | no | isWillSet: | no | isDidSet: | yes | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | +| accessors.swift:19:9:19:9 | _modify | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> () -> () | isGetter: | no | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | yes | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | +| accessors.swift:19:9:19:9 | get | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (Foo) -> () -> Int | isGetter: | yes | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | +| accessors.swift:19:9:19:9 | set | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> (Int) -> () | isGetter: | no | isSetter: | yes | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | +| accessors.swift:20:9:20:18 | didSet | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> () -> () | isGetter: | no | isSetter: | no | isWillSet: | no | isDidSet: | yes | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | +| accessors.swift:23:9:23:9 | _modify | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> () -> () | isGetter: | no | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | yes | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | +| accessors.swift:23:9:23:9 | get | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (Foo) -> () -> Int | isGetter: | yes | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | +| accessors.swift:23:9:23:9 | set | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> (Int) -> () | isGetter: | no | isSetter: | yes | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | +| accessors.swift:24:9:24:19 | willSet | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> (Int) -> () | isGetter: | no | isSetter: | no | isWillSet: | yes | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | +| accessors.swift:26:9:26:18 | didSet | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> () -> () | isGetter: | no | isSetter: | no | isWillSet: | no | isDidSet: | yes | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | +| accessors.swift:29:9:29:9 | get | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (Foo) -> () -> Int | isGetter: | yes | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | +| accessors.swift:29:9:29:9 | set | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> (Int) -> () | isGetter: | no | isSetter: | yes | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | +| accessors.swift:30:9:32:9 | _read | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (Foo) -> () -> () | isGetter: | no | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | yes | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | +| accessors.swift:33:9:35:9 | _modify | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> () -> () | isGetter: | no | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | yes | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | +| accessors.swift:38:9:38:9 | _modify | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> () -> () | isGetter: | no | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | yes | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | +| accessors.swift:38:9:38:9 | get | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (Foo) -> () -> Int | isGetter: | yes | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | +| accessors.swift:38:9:38:9 | set | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> (Int) -> () | isGetter: | no | isSetter: | yes | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | no | +| accessors.swift:39:9:41:9 | unsafeAddress | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (Foo) -> () -> UnsafePointer | isGetter: | no | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | yes | isUnsafeMutableAddress: | no | +| accessors.swift:42:9:44:9 | unsafeMutableAddress | getModule: | file://:0:0:0:0 | accessors | getInterfaceType: | (inout Foo) -> () -> UnsafeMutablePointer | isGetter: | no | isSetter: | no | isWillSet: | no | isDidSet: | no | isRead: | no | isModify: | no | isUnsafeAddress: | no | isUnsafeMutableAddress: | yes | +getName +| accessors.swift:2:9:2:9 | _modify | (unnamed function decl) | +| accessors.swift:2:9:2:9 | get | (unnamed function decl) | +| accessors.swift:2:9:2:9 | set | (unnamed function decl) | +| accessors.swift:3:9:3:9 | _modify | (unnamed function decl) | +| accessors.swift:4:9:4:28 | get | (unnamed function decl) | +| accessors.swift:5:9:5:42 | set | (unnamed function decl) | +| accessors.swift:7:9:7:9 | _modify | (unnamed function decl) | +| accessors.swift:7:9:7:9 | get | (unnamed function decl) | +| accessors.swift:7:9:7:9 | set | (unnamed function decl) | +| accessors.swift:8:9:8:29 | willSet | (unnamed function decl) | +| accessors.swift:11:9:11:9 | _modify | (unnamed function decl) | +| accessors.swift:11:9:11:9 | get | (unnamed function decl) | +| accessors.swift:11:9:11:9 | set | (unnamed function decl) | +| accessors.swift:12:9:12:19 | willSet | (unnamed function decl) | +| accessors.swift:15:9:15:9 | _modify | (unnamed function decl) | +| accessors.swift:15:9:15:9 | get | (unnamed function decl) | +| accessors.swift:15:9:15:9 | set | (unnamed function decl) | +| accessors.swift:16:9:16:28 | didSet | (unnamed function decl) | +| accessors.swift:19:9:19:9 | _modify | (unnamed function decl) | +| accessors.swift:19:9:19:9 | get | (unnamed function decl) | +| accessors.swift:19:9:19:9 | set | (unnamed function decl) | +| accessors.swift:20:9:20:18 | didSet | (unnamed function decl) | +| accessors.swift:23:9:23:9 | _modify | (unnamed function decl) | +| accessors.swift:23:9:23:9 | get | (unnamed function decl) | +| accessors.swift:23:9:23:9 | set | (unnamed function decl) | +| accessors.swift:24:9:24:19 | willSet | (unnamed function decl) | +| accessors.swift:26:9:26:18 | didSet | (unnamed function decl) | +| accessors.swift:29:9:29:9 | get | (unnamed function decl) | +| accessors.swift:29:9:29:9 | set | (unnamed function decl) | +| accessors.swift:30:9:32:9 | _read | (unnamed function decl) | +| accessors.swift:33:9:35:9 | _modify | (unnamed function decl) | +| accessors.swift:38:9:38:9 | _modify | (unnamed function decl) | +| accessors.swift:38:9:38:9 | get | (unnamed function decl) | +| accessors.swift:38:9:38:9 | set | (unnamed function decl) | +| accessors.swift:39:9:41:9 | unsafeAddress | (unnamed function decl) | +| accessors.swift:42:9:44:9 | unsafeMutableAddress | (unnamed function decl) | +getSelfParam +| accessors.swift:2:9:2:9 | _modify | accessors.swift:2:9:2:9 | self | +| accessors.swift:2:9:2:9 | get | accessors.swift:2:9:2:9 | self | +| accessors.swift:2:9:2:9 | set | accessors.swift:2:9:2:9 | self | +| accessors.swift:3:9:3:9 | _modify | accessors.swift:3:9:3:9 | self | +| accessors.swift:4:9:4:28 | get | accessors.swift:4:9:4:9 | self | +| accessors.swift:5:9:5:42 | set | accessors.swift:5:9:5:9 | self | +| accessors.swift:7:9:7:9 | _modify | accessors.swift:7:9:7:9 | self | +| accessors.swift:7:9:7:9 | get | accessors.swift:7:9:7:9 | self | +| accessors.swift:7:9:7:9 | set | accessors.swift:7:9:7:9 | self | +| accessors.swift:8:9:8:29 | willSet | accessors.swift:8:9:8:9 | self | +| accessors.swift:11:9:11:9 | _modify | accessors.swift:11:9:11:9 | self | +| accessors.swift:11:9:11:9 | get | accessors.swift:11:9:11:9 | self | +| accessors.swift:11:9:11:9 | set | accessors.swift:11:9:11:9 | self | +| accessors.swift:12:9:12:19 | willSet | accessors.swift:12:9:12:9 | self | +| accessors.swift:15:9:15:9 | _modify | accessors.swift:15:9:15:9 | self | +| accessors.swift:15:9:15:9 | get | accessors.swift:15:9:15:9 | self | +| accessors.swift:15:9:15:9 | set | accessors.swift:15:9:15:9 | self | +| accessors.swift:16:9:16:28 | didSet | accessors.swift:16:9:16:9 | self | +| accessors.swift:19:9:19:9 | _modify | accessors.swift:19:9:19:9 | self | +| accessors.swift:19:9:19:9 | get | accessors.swift:19:9:19:9 | self | +| accessors.swift:19:9:19:9 | set | accessors.swift:19:9:19:9 | self | +| accessors.swift:20:9:20:18 | didSet | accessors.swift:20:9:20:9 | self | +| accessors.swift:23:9:23:9 | _modify | accessors.swift:23:9:23:9 | self | +| accessors.swift:23:9:23:9 | get | accessors.swift:23:9:23:9 | self | +| accessors.swift:23:9:23:9 | set | accessors.swift:23:9:23:9 | self | +| accessors.swift:24:9:24:19 | willSet | accessors.swift:24:9:24:9 | self | +| accessors.swift:26:9:26:18 | didSet | accessors.swift:26:9:26:9 | self | +| accessors.swift:29:9:29:9 | get | accessors.swift:29:9:29:9 | self | +| accessors.swift:29:9:29:9 | set | accessors.swift:29:9:29:9 | self | +| accessors.swift:30:9:32:9 | _read | accessors.swift:30:9:30:9 | self | +| accessors.swift:33:9:35:9 | _modify | accessors.swift:33:9:33:9 | self | +| accessors.swift:38:9:38:9 | _modify | accessors.swift:38:9:38:9 | self | +| accessors.swift:38:9:38:9 | get | accessors.swift:38:9:38:9 | self | +| accessors.swift:38:9:38:9 | set | accessors.swift:38:9:38:9 | self | +| accessors.swift:39:9:41:9 | unsafeAddress | accessors.swift:39:9:39:9 | self | +| accessors.swift:42:9:44:9 | unsafeMutableAddress | accessors.swift:42:9:42:9 | self | +getParam +| accessors.swift:2:9:2:9 | set | 0 | accessors.swift:2:9:2:9 | value | +| accessors.swift:5:9:5:42 | set | 0 | accessors.swift:5:13:5:13 | newValue | +| accessors.swift:7:9:7:9 | set | 0 | accessors.swift:7:9:7:9 | value | +| accessors.swift:8:9:8:29 | willSet | 0 | accessors.swift:8:17:8:17 | newValue | +| accessors.swift:11:9:11:9 | set | 0 | accessors.swift:11:9:11:9 | value | +| accessors.swift:12:9:12:19 | willSet | 0 | accessors.swift:12:9:12:9 | newValue | +| accessors.swift:15:9:15:9 | set | 0 | accessors.swift:15:9:15:9 | value | +| accessors.swift:16:9:16:28 | didSet | 0 | accessors.swift:16:16:16:16 | oldValue | +| accessors.swift:19:9:19:9 | set | 0 | accessors.swift:19:9:19:9 | value | +| accessors.swift:23:9:23:9 | set | 0 | accessors.swift:23:9:23:9 | value | +| accessors.swift:24:9:24:19 | willSet | 0 | accessors.swift:24:9:24:9 | newValue | +| accessors.swift:29:9:29:9 | set | 0 | accessors.swift:29:9:29:9 | value | +| accessors.swift:38:9:38:9 | set | 0 | accessors.swift:38:9:38:9 | value | +getBody +| accessors.swift:2:9:2:9 | _modify | accessors.swift:2:9:2:9 | { ... } | +| accessors.swift:2:9:2:9 | get | accessors.swift:2:9:2:9 | { ... } | +| accessors.swift:2:9:2:9 | set | accessors.swift:2:9:2:9 | { ... } | +| accessors.swift:3:9:3:9 | _modify | accessors.swift:3:9:3:9 | { ... } | +| accessors.swift:4:9:4:28 | get | accessors.swift:4:13:4:28 | { ... } | +| accessors.swift:5:9:5:42 | set | accessors.swift:5:23:5:42 | { ... } | +| accessors.swift:7:9:7:9 | _modify | accessors.swift:7:9:7:9 | { ... } | +| accessors.swift:7:9:7:9 | get | accessors.swift:7:9:7:9 | { ... } | +| accessors.swift:7:9:7:9 | set | accessors.swift:7:9:7:9 | { ... } | +| accessors.swift:8:9:8:29 | willSet | accessors.swift:8:27:8:29 | { ... } | +| accessors.swift:11:9:11:9 | _modify | accessors.swift:11:9:11:9 | { ... } | +| accessors.swift:11:9:11:9 | get | accessors.swift:11:9:11:9 | { ... } | +| accessors.swift:11:9:11:9 | set | accessors.swift:11:9:11:9 | { ... } | +| accessors.swift:12:9:12:19 | willSet | accessors.swift:12:17:12:19 | { ... } | +| accessors.swift:15:9:15:9 | _modify | accessors.swift:15:9:15:9 | { ... } | +| accessors.swift:15:9:15:9 | get | accessors.swift:15:9:15:9 | { ... } | +| accessors.swift:15:9:15:9 | set | accessors.swift:15:9:15:9 | { ... } | +| accessors.swift:16:9:16:28 | didSet | accessors.swift:16:26:16:28 | { ... } | +| accessors.swift:19:9:19:9 | _modify | accessors.swift:19:9:19:9 | { ... } | +| accessors.swift:19:9:19:9 | get | accessors.swift:19:9:19:9 | { ... } | +| accessors.swift:19:9:19:9 | set | accessors.swift:19:9:19:9 | { ... } | +| accessors.swift:20:9:20:18 | didSet | accessors.swift:20:16:20:18 | { ... } | +| accessors.swift:23:9:23:9 | _modify | accessors.swift:23:9:23:9 | { ... } | +| accessors.swift:23:9:23:9 | get | accessors.swift:23:9:23:9 | { ... } | +| accessors.swift:23:9:23:9 | set | accessors.swift:23:9:23:9 | { ... } | +| accessors.swift:24:9:24:19 | willSet | accessors.swift:24:17:24:19 | { ... } | +| accessors.swift:26:9:26:18 | didSet | accessors.swift:26:16:26:18 | { ... } | +| accessors.swift:29:9:29:9 | get | accessors.swift:29:9:29:9 | { ... } | +| accessors.swift:29:9:29:9 | set | accessors.swift:29:9:29:9 | { ... } | +| accessors.swift:30:9:32:9 | _read | accessors.swift:30:15:32:9 | { ... } | +| accessors.swift:33:9:35:9 | _modify | accessors.swift:33:17:35:9 | { ... } | +| accessors.swift:38:9:38:9 | _modify | accessors.swift:38:9:38:9 | { ... } | +| accessors.swift:38:9:38:9 | get | accessors.swift:38:9:38:9 | { ... } | +| accessors.swift:38:9:38:9 | set | accessors.swift:38:9:38:9 | { ... } | +| accessors.swift:39:9:41:9 | unsafeAddress | accessors.swift:39:23:41:9 | { ... } | +| accessors.swift:42:9:44:9 | unsafeMutableAddress | accessors.swift:42:30:44:9 | { ... } | +getCapture +getGenericTypeParam +getMember diff --git a/swift/ql/test/extractor-tests/generated/decl/Accessor/Accessor.ql b/swift/ql/test/extractor-tests/generated/decl/Accessor/Accessor.ql index f4e231c7671..8fd5bfbcd9e 100644 --- a/swift/ql/test/extractor-tests/generated/decl/Accessor/Accessor.ql +++ b/swift/ql/test/extractor-tests/generated/decl/Accessor/Accessor.ql @@ -2,38 +2,64 @@ import codeql.swift.elements import TestUtils -from - Accessor x, string hasName, string hasSelfParam, int getNumberOfParams, string hasBody, - int getNumberOfCaptures, int getNumberOfGenericTypeParams, ModuleDecl getModule, - int getNumberOfMembers, Type getInterfaceType, string isGetter, string isSetter, string isWillSet, - string isDidSet, string isRead, string isModify, string isUnsafeAddress, +query predicate instances( + Accessor x, string getModule__label, ModuleDecl getModule, string getInterfaceType__label, + Type getInterfaceType, string isGetter__label, string isGetter, string isSetter__label, + string isSetter, string isWillSet__label, string isWillSet, string isDidSet__label, + string isDidSet, string isRead__label, string isRead, string isModify__label, string isModify, + string isUnsafeAddress__label, string isUnsafeAddress, string isUnsafeMutableAddress__label, string isUnsafeMutableAddress -where +) { toBeTested(x) and not x.isUnknown() and - (if x.hasName() then hasName = "yes" else hasName = "no") and - (if x.hasSelfParam() then hasSelfParam = "yes" else hasSelfParam = "no") and - getNumberOfParams = x.getNumberOfParams() and - (if x.hasBody() then hasBody = "yes" else hasBody = "no") and - getNumberOfCaptures = x.getNumberOfCaptures() and - getNumberOfGenericTypeParams = x.getNumberOfGenericTypeParams() and + getModule__label = "getModule:" and getModule = x.getModule() and - getNumberOfMembers = x.getNumberOfMembers() and + getInterfaceType__label = "getInterfaceType:" and getInterfaceType = x.getInterfaceType() and + isGetter__label = "isGetter:" and (if x.isGetter() then isGetter = "yes" else isGetter = "no") and + isSetter__label = "isSetter:" and (if x.isSetter() then isSetter = "yes" else isSetter = "no") and + isWillSet__label = "isWillSet:" and (if x.isWillSet() then isWillSet = "yes" else isWillSet = "no") and + isDidSet__label = "isDidSet:" and (if x.isDidSet() then isDidSet = "yes" else isDidSet = "no") and + isRead__label = "isRead:" and (if x.isRead() then isRead = "yes" else isRead = "no") and + isModify__label = "isModify:" and (if x.isModify() then isModify = "yes" else isModify = "no") and + isUnsafeAddress__label = "isUnsafeAddress:" and (if x.isUnsafeAddress() then isUnsafeAddress = "yes" else isUnsafeAddress = "no") and + isUnsafeMutableAddress__label = "isUnsafeMutableAddress:" and if x.isUnsafeMutableAddress() then isUnsafeMutableAddress = "yes" else isUnsafeMutableAddress = "no" -select x, "hasName:", hasName, "hasSelfParam:", hasSelfParam, "getNumberOfParams:", - getNumberOfParams, "hasBody:", hasBody, "getNumberOfCaptures:", getNumberOfCaptures, - "getNumberOfGenericTypeParams:", getNumberOfGenericTypeParams, "getModule:", getModule, - "getNumberOfMembers:", getNumberOfMembers, "getInterfaceType:", getInterfaceType, "isGetter:", - isGetter, "isSetter:", isSetter, "isWillSet:", isWillSet, "isDidSet:", isDidSet, "isRead:", - isRead, "isModify:", isModify, "isUnsafeAddress:", isUnsafeAddress, "isUnsafeMutableAddress:", - isUnsafeMutableAddress +} + +query predicate getName(Accessor x, string getName) { + toBeTested(x) and not x.isUnknown() and getName = x.getName() +} + +query predicate getSelfParam(Accessor x, ParamDecl getSelfParam) { + toBeTested(x) and not x.isUnknown() and getSelfParam = x.getSelfParam() +} + +query predicate getParam(Accessor x, int index, ParamDecl getParam) { + toBeTested(x) and not x.isUnknown() and getParam = x.getParam(index) +} + +query predicate getBody(Accessor x, BraceStmt getBody) { + toBeTested(x) and not x.isUnknown() and getBody = x.getBody() +} + +query predicate getCapture(Accessor x, int index, CapturedDecl getCapture) { + toBeTested(x) and not x.isUnknown() and getCapture = x.getCapture(index) +} + +query predicate getGenericTypeParam(Accessor x, int index, GenericTypeParamDecl getGenericTypeParam) { + toBeTested(x) and not x.isUnknown() and getGenericTypeParam = x.getGenericTypeParam(index) +} + +query predicate getMember(Accessor x, int index, Decl getMember) { + toBeTested(x) and not x.isUnknown() and getMember = x.getMember(index) +} diff --git a/swift/ql/test/extractor-tests/generated/decl/Accessor/Accessor_getBody.expected b/swift/ql/test/extractor-tests/generated/decl/Accessor/Accessor_getBody.expected deleted file mode 100644 index 7eccbae719f..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/Accessor/Accessor_getBody.expected +++ /dev/null @@ -1,36 +0,0 @@ -| accessors.swift:2:9:2:9 | _modify | accessors.swift:2:9:2:9 | { ... } | -| accessors.swift:2:9:2:9 | get | accessors.swift:2:9:2:9 | { ... } | -| accessors.swift:2:9:2:9 | set | accessors.swift:2:9:2:9 | { ... } | -| accessors.swift:3:9:3:9 | _modify | accessors.swift:3:9:3:9 | { ... } | -| accessors.swift:4:9:4:28 | get | accessors.swift:4:13:4:28 | { ... } | -| accessors.swift:5:9:5:42 | set | accessors.swift:5:23:5:42 | { ... } | -| accessors.swift:7:9:7:9 | _modify | accessors.swift:7:9:7:9 | { ... } | -| accessors.swift:7:9:7:9 | get | accessors.swift:7:9:7:9 | { ... } | -| accessors.swift:7:9:7:9 | set | accessors.swift:7:9:7:9 | { ... } | -| accessors.swift:8:9:8:29 | willSet | accessors.swift:8:27:8:29 | { ... } | -| accessors.swift:11:9:11:9 | _modify | accessors.swift:11:9:11:9 | { ... } | -| accessors.swift:11:9:11:9 | get | accessors.swift:11:9:11:9 | { ... } | -| accessors.swift:11:9:11:9 | set | accessors.swift:11:9:11:9 | { ... } | -| accessors.swift:12:9:12:19 | willSet | accessors.swift:12:17:12:19 | { ... } | -| accessors.swift:15:9:15:9 | _modify | accessors.swift:15:9:15:9 | { ... } | -| accessors.swift:15:9:15:9 | get | accessors.swift:15:9:15:9 | { ... } | -| accessors.swift:15:9:15:9 | set | accessors.swift:15:9:15:9 | { ... } | -| accessors.swift:16:9:16:28 | didSet | accessors.swift:16:26:16:28 | { ... } | -| accessors.swift:19:9:19:9 | _modify | accessors.swift:19:9:19:9 | { ... } | -| accessors.swift:19:9:19:9 | get | accessors.swift:19:9:19:9 | { ... } | -| accessors.swift:19:9:19:9 | set | accessors.swift:19:9:19:9 | { ... } | -| accessors.swift:20:9:20:18 | didSet | accessors.swift:20:16:20:18 | { ... } | -| accessors.swift:23:9:23:9 | _modify | accessors.swift:23:9:23:9 | { ... } | -| accessors.swift:23:9:23:9 | get | accessors.swift:23:9:23:9 | { ... } | -| accessors.swift:23:9:23:9 | set | accessors.swift:23:9:23:9 | { ... } | -| accessors.swift:24:9:24:19 | willSet | accessors.swift:24:17:24:19 | { ... } | -| accessors.swift:26:9:26:18 | didSet | accessors.swift:26:16:26:18 | { ... } | -| accessors.swift:29:9:29:9 | get | accessors.swift:29:9:29:9 | { ... } | -| accessors.swift:29:9:29:9 | set | accessors.swift:29:9:29:9 | { ... } | -| accessors.swift:30:9:32:9 | _read | accessors.swift:30:15:32:9 | { ... } | -| accessors.swift:33:9:35:9 | _modify | accessors.swift:33:17:35:9 | { ... } | -| accessors.swift:38:9:38:9 | _modify | accessors.swift:38:9:38:9 | { ... } | -| accessors.swift:38:9:38:9 | get | accessors.swift:38:9:38:9 | { ... } | -| accessors.swift:38:9:38:9 | set | accessors.swift:38:9:38:9 | { ... } | -| accessors.swift:39:9:41:9 | unsafeAddress | accessors.swift:39:23:41:9 | { ... } | -| accessors.swift:42:9:44:9 | unsafeMutableAddress | accessors.swift:42:30:44:9 | { ... } | diff --git a/swift/ql/test/extractor-tests/generated/decl/Accessor/Accessor_getBody.ql b/swift/ql/test/extractor-tests/generated/decl/Accessor/Accessor_getBody.ql deleted file mode 100644 index ad96f239082..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/Accessor/Accessor_getBody.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from Accessor x -where toBeTested(x) and not x.isUnknown() -select x, x.getBody() diff --git a/swift/ql/test/extractor-tests/generated/decl/Accessor/Accessor_getCapture.expected b/swift/ql/test/extractor-tests/generated/decl/Accessor/Accessor_getCapture.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/swift/ql/test/extractor-tests/generated/decl/Accessor/Accessor_getCapture.ql b/swift/ql/test/extractor-tests/generated/decl/Accessor/Accessor_getCapture.ql deleted file mode 100644 index 173f3067c0c..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/Accessor/Accessor_getCapture.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from Accessor x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getCapture(index) diff --git a/swift/ql/test/extractor-tests/generated/decl/Accessor/Accessor_getGenericTypeParam.expected b/swift/ql/test/extractor-tests/generated/decl/Accessor/Accessor_getGenericTypeParam.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/swift/ql/test/extractor-tests/generated/decl/Accessor/Accessor_getGenericTypeParam.ql b/swift/ql/test/extractor-tests/generated/decl/Accessor/Accessor_getGenericTypeParam.ql deleted file mode 100644 index 2c4d348c550..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/Accessor/Accessor_getGenericTypeParam.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from Accessor x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getGenericTypeParam(index) diff --git a/swift/ql/test/extractor-tests/generated/decl/Accessor/Accessor_getMember.expected b/swift/ql/test/extractor-tests/generated/decl/Accessor/Accessor_getMember.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/swift/ql/test/extractor-tests/generated/decl/Accessor/Accessor_getMember.ql b/swift/ql/test/extractor-tests/generated/decl/Accessor/Accessor_getMember.ql deleted file mode 100644 index 3d4fe6d2972..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/Accessor/Accessor_getMember.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from Accessor x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getMember(index) diff --git a/swift/ql/test/extractor-tests/generated/decl/Accessor/Accessor_getName.expected b/swift/ql/test/extractor-tests/generated/decl/Accessor/Accessor_getName.expected deleted file mode 100644 index 929255a57ed..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/Accessor/Accessor_getName.expected +++ /dev/null @@ -1,36 +0,0 @@ -| accessors.swift:2:9:2:9 | _modify | (unnamed function decl) | -| accessors.swift:2:9:2:9 | get | (unnamed function decl) | -| accessors.swift:2:9:2:9 | set | (unnamed function decl) | -| accessors.swift:3:9:3:9 | _modify | (unnamed function decl) | -| accessors.swift:4:9:4:28 | get | (unnamed function decl) | -| accessors.swift:5:9:5:42 | set | (unnamed function decl) | -| accessors.swift:7:9:7:9 | _modify | (unnamed function decl) | -| accessors.swift:7:9:7:9 | get | (unnamed function decl) | -| accessors.swift:7:9:7:9 | set | (unnamed function decl) | -| accessors.swift:8:9:8:29 | willSet | (unnamed function decl) | -| accessors.swift:11:9:11:9 | _modify | (unnamed function decl) | -| accessors.swift:11:9:11:9 | get | (unnamed function decl) | -| accessors.swift:11:9:11:9 | set | (unnamed function decl) | -| accessors.swift:12:9:12:19 | willSet | (unnamed function decl) | -| accessors.swift:15:9:15:9 | _modify | (unnamed function decl) | -| accessors.swift:15:9:15:9 | get | (unnamed function decl) | -| accessors.swift:15:9:15:9 | set | (unnamed function decl) | -| accessors.swift:16:9:16:28 | didSet | (unnamed function decl) | -| accessors.swift:19:9:19:9 | _modify | (unnamed function decl) | -| accessors.swift:19:9:19:9 | get | (unnamed function decl) | -| accessors.swift:19:9:19:9 | set | (unnamed function decl) | -| accessors.swift:20:9:20:18 | didSet | (unnamed function decl) | -| accessors.swift:23:9:23:9 | _modify | (unnamed function decl) | -| accessors.swift:23:9:23:9 | get | (unnamed function decl) | -| accessors.swift:23:9:23:9 | set | (unnamed function decl) | -| accessors.swift:24:9:24:19 | willSet | (unnamed function decl) | -| accessors.swift:26:9:26:18 | didSet | (unnamed function decl) | -| accessors.swift:29:9:29:9 | get | (unnamed function decl) | -| accessors.swift:29:9:29:9 | set | (unnamed function decl) | -| accessors.swift:30:9:32:9 | _read | (unnamed function decl) | -| accessors.swift:33:9:35:9 | _modify | (unnamed function decl) | -| accessors.swift:38:9:38:9 | _modify | (unnamed function decl) | -| accessors.swift:38:9:38:9 | get | (unnamed function decl) | -| accessors.swift:38:9:38:9 | set | (unnamed function decl) | -| accessors.swift:39:9:41:9 | unsafeAddress | (unnamed function decl) | -| accessors.swift:42:9:44:9 | unsafeMutableAddress | (unnamed function decl) | diff --git a/swift/ql/test/extractor-tests/generated/decl/Accessor/Accessor_getName.ql b/swift/ql/test/extractor-tests/generated/decl/Accessor/Accessor_getName.ql deleted file mode 100644 index 9d29b101bdc..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/Accessor/Accessor_getName.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from Accessor x -where toBeTested(x) and not x.isUnknown() -select x, x.getName() diff --git a/swift/ql/test/extractor-tests/generated/decl/Accessor/Accessor_getParam.expected b/swift/ql/test/extractor-tests/generated/decl/Accessor/Accessor_getParam.expected deleted file mode 100644 index e0544b5d4f5..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/Accessor/Accessor_getParam.expected +++ /dev/null @@ -1,13 +0,0 @@ -| accessors.swift:2:9:2:9 | set | 0 | accessors.swift:2:9:2:9 | value | -| accessors.swift:5:9:5:42 | set | 0 | accessors.swift:5:13:5:13 | newValue | -| accessors.swift:7:9:7:9 | set | 0 | accessors.swift:7:9:7:9 | value | -| accessors.swift:8:9:8:29 | willSet | 0 | accessors.swift:8:17:8:17 | newValue | -| accessors.swift:11:9:11:9 | set | 0 | accessors.swift:11:9:11:9 | value | -| accessors.swift:12:9:12:19 | willSet | 0 | accessors.swift:12:9:12:9 | newValue | -| accessors.swift:15:9:15:9 | set | 0 | accessors.swift:15:9:15:9 | value | -| accessors.swift:16:9:16:28 | didSet | 0 | accessors.swift:16:16:16:16 | oldValue | -| accessors.swift:19:9:19:9 | set | 0 | accessors.swift:19:9:19:9 | value | -| accessors.swift:23:9:23:9 | set | 0 | accessors.swift:23:9:23:9 | value | -| accessors.swift:24:9:24:19 | willSet | 0 | accessors.swift:24:9:24:9 | newValue | -| accessors.swift:29:9:29:9 | set | 0 | accessors.swift:29:9:29:9 | value | -| accessors.swift:38:9:38:9 | set | 0 | accessors.swift:38:9:38:9 | value | diff --git a/swift/ql/test/extractor-tests/generated/decl/Accessor/Accessor_getParam.ql b/swift/ql/test/extractor-tests/generated/decl/Accessor/Accessor_getParam.ql deleted file mode 100644 index 0640648bf1b..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/Accessor/Accessor_getParam.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from Accessor x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getParam(index) diff --git a/swift/ql/test/extractor-tests/generated/decl/Accessor/Accessor_getSelfParam.expected b/swift/ql/test/extractor-tests/generated/decl/Accessor/Accessor_getSelfParam.expected deleted file mode 100644 index 62143cca406..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/Accessor/Accessor_getSelfParam.expected +++ /dev/null @@ -1,36 +0,0 @@ -| accessors.swift:2:9:2:9 | _modify | accessors.swift:2:9:2:9 | self | -| accessors.swift:2:9:2:9 | get | accessors.swift:2:9:2:9 | self | -| accessors.swift:2:9:2:9 | set | accessors.swift:2:9:2:9 | self | -| accessors.swift:3:9:3:9 | _modify | accessors.swift:3:9:3:9 | self | -| accessors.swift:4:9:4:28 | get | accessors.swift:4:9:4:9 | self | -| accessors.swift:5:9:5:42 | set | accessors.swift:5:9:5:9 | self | -| accessors.swift:7:9:7:9 | _modify | accessors.swift:7:9:7:9 | self | -| accessors.swift:7:9:7:9 | get | accessors.swift:7:9:7:9 | self | -| accessors.swift:7:9:7:9 | set | accessors.swift:7:9:7:9 | self | -| accessors.swift:8:9:8:29 | willSet | accessors.swift:8:9:8:9 | self | -| accessors.swift:11:9:11:9 | _modify | accessors.swift:11:9:11:9 | self | -| accessors.swift:11:9:11:9 | get | accessors.swift:11:9:11:9 | self | -| accessors.swift:11:9:11:9 | set | accessors.swift:11:9:11:9 | self | -| accessors.swift:12:9:12:19 | willSet | accessors.swift:12:9:12:9 | self | -| accessors.swift:15:9:15:9 | _modify | accessors.swift:15:9:15:9 | self | -| accessors.swift:15:9:15:9 | get | accessors.swift:15:9:15:9 | self | -| accessors.swift:15:9:15:9 | set | accessors.swift:15:9:15:9 | self | -| accessors.swift:16:9:16:28 | didSet | accessors.swift:16:9:16:9 | self | -| accessors.swift:19:9:19:9 | _modify | accessors.swift:19:9:19:9 | self | -| accessors.swift:19:9:19:9 | get | accessors.swift:19:9:19:9 | self | -| accessors.swift:19:9:19:9 | set | accessors.swift:19:9:19:9 | self | -| accessors.swift:20:9:20:18 | didSet | accessors.swift:20:9:20:9 | self | -| accessors.swift:23:9:23:9 | _modify | accessors.swift:23:9:23:9 | self | -| accessors.swift:23:9:23:9 | get | accessors.swift:23:9:23:9 | self | -| accessors.swift:23:9:23:9 | set | accessors.swift:23:9:23:9 | self | -| accessors.swift:24:9:24:19 | willSet | accessors.swift:24:9:24:9 | self | -| accessors.swift:26:9:26:18 | didSet | accessors.swift:26:9:26:9 | self | -| accessors.swift:29:9:29:9 | get | accessors.swift:29:9:29:9 | self | -| accessors.swift:29:9:29:9 | set | accessors.swift:29:9:29:9 | self | -| accessors.swift:30:9:32:9 | _read | accessors.swift:30:9:30:9 | self | -| accessors.swift:33:9:35:9 | _modify | accessors.swift:33:9:33:9 | self | -| accessors.swift:38:9:38:9 | _modify | accessors.swift:38:9:38:9 | self | -| accessors.swift:38:9:38:9 | get | accessors.swift:38:9:38:9 | self | -| accessors.swift:38:9:38:9 | set | accessors.swift:38:9:38:9 | self | -| accessors.swift:39:9:41:9 | unsafeAddress | accessors.swift:39:9:39:9 | self | -| accessors.swift:42:9:44:9 | unsafeMutableAddress | accessors.swift:42:9:42:9 | self | diff --git a/swift/ql/test/extractor-tests/generated/decl/Accessor/Accessor_getSelfParam.ql b/swift/ql/test/extractor-tests/generated/decl/Accessor/Accessor_getSelfParam.ql deleted file mode 100644 index 2e98f9d74cb..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/Accessor/Accessor_getSelfParam.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from Accessor x -where toBeTested(x) and not x.isUnknown() -select x, x.getSelfParam() diff --git a/swift/ql/test/extractor-tests/generated/decl/AssociatedTypeDecl/AssociatedTypeDecl.expected b/swift/ql/test/extractor-tests/generated/decl/AssociatedTypeDecl/AssociatedTypeDecl.expected index ee463332f1d..9daa87b09cc 100644 --- a/swift/ql/test/extractor-tests/generated/decl/AssociatedTypeDecl/AssociatedTypeDecl.expected +++ b/swift/ql/test/extractor-tests/generated/decl/AssociatedTypeDecl/AssociatedTypeDecl.expected @@ -1,2 +1,6 @@ -| associated_type.swift:2:5:2:20 | Bar | getModule: | file://:0:0:0:0 | associated_type | getNumberOfMembers: | 0 | getInterfaceType: | Self.Bar.Type | getName: | Bar | getNumberOfInheritedTypes: | 0 | -| associated_type.swift:3:5:3:25 | Baz | getModule: | file://:0:0:0:0 | associated_type | getNumberOfMembers: | 0 | getInterfaceType: | Self.Baz.Type | getName: | Baz | getNumberOfInheritedTypes: | 1 | +instances +| associated_type.swift:2:5:2:20 | Bar | getModule: | file://:0:0:0:0 | associated_type | getInterfaceType: | Self.Bar.Type | getName: | Bar | +| associated_type.swift:3:5:3:25 | Baz | getModule: | file://:0:0:0:0 | associated_type | getInterfaceType: | Self.Baz.Type | getName: | Baz | +getMember +getInheritedType +| associated_type.swift:3:5:3:25 | Baz | 0 | Equatable | diff --git a/swift/ql/test/extractor-tests/generated/decl/AssociatedTypeDecl/AssociatedTypeDecl.ql b/swift/ql/test/extractor-tests/generated/decl/AssociatedTypeDecl/AssociatedTypeDecl.ql index 057981c2364..41cc9d349a4 100644 --- a/swift/ql/test/extractor-tests/generated/decl/AssociatedTypeDecl/AssociatedTypeDecl.ql +++ b/swift/ql/test/extractor-tests/generated/decl/AssociatedTypeDecl/AssociatedTypeDecl.ql @@ -2,16 +2,24 @@ import codeql.swift.elements import TestUtils -from - AssociatedTypeDecl x, ModuleDecl getModule, int getNumberOfMembers, Type getInterfaceType, - string getName, int getNumberOfInheritedTypes -where +query predicate instances( + AssociatedTypeDecl x, string getModule__label, ModuleDecl getModule, + string getInterfaceType__label, Type getInterfaceType, string getName__label, string getName +) { toBeTested(x) and not x.isUnknown() and + getModule__label = "getModule:" and getModule = x.getModule() and - getNumberOfMembers = x.getNumberOfMembers() and + getInterfaceType__label = "getInterfaceType:" and getInterfaceType = x.getInterfaceType() and - getName = x.getName() and - getNumberOfInheritedTypes = x.getNumberOfInheritedTypes() -select x, "getModule:", getModule, "getNumberOfMembers:", getNumberOfMembers, "getInterfaceType:", - getInterfaceType, "getName:", getName, "getNumberOfInheritedTypes:", getNumberOfInheritedTypes + getName__label = "getName:" and + getName = x.getName() +} + +query predicate getMember(AssociatedTypeDecl x, int index, Decl getMember) { + toBeTested(x) and not x.isUnknown() and getMember = x.getMember(index) +} + +query predicate getInheritedType(AssociatedTypeDecl x, int index, Type getInheritedType) { + toBeTested(x) and not x.isUnknown() and getInheritedType = x.getInheritedType(index) +} diff --git a/swift/ql/test/extractor-tests/generated/decl/AssociatedTypeDecl/AssociatedTypeDecl_getInheritedType.expected b/swift/ql/test/extractor-tests/generated/decl/AssociatedTypeDecl/AssociatedTypeDecl_getInheritedType.expected deleted file mode 100644 index 6cd068031f6..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/AssociatedTypeDecl/AssociatedTypeDecl_getInheritedType.expected +++ /dev/null @@ -1 +0,0 @@ -| associated_type.swift:3:5:3:25 | Baz | 0 | Equatable | diff --git a/swift/ql/test/extractor-tests/generated/decl/AssociatedTypeDecl/AssociatedTypeDecl_getInheritedType.ql b/swift/ql/test/extractor-tests/generated/decl/AssociatedTypeDecl/AssociatedTypeDecl_getInheritedType.ql deleted file mode 100644 index 2c0f23a876a..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/AssociatedTypeDecl/AssociatedTypeDecl_getInheritedType.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from AssociatedTypeDecl x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getInheritedType(index) diff --git a/swift/ql/test/extractor-tests/generated/decl/AssociatedTypeDecl/AssociatedTypeDecl_getMember.expected b/swift/ql/test/extractor-tests/generated/decl/AssociatedTypeDecl/AssociatedTypeDecl_getMember.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/swift/ql/test/extractor-tests/generated/decl/AssociatedTypeDecl/AssociatedTypeDecl_getMember.ql b/swift/ql/test/extractor-tests/generated/decl/AssociatedTypeDecl/AssociatedTypeDecl_getMember.ql deleted file mode 100644 index c36cb6ef4f9..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/AssociatedTypeDecl/AssociatedTypeDecl_getMember.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from AssociatedTypeDecl x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getMember(index) diff --git a/swift/ql/test/extractor-tests/generated/decl/CapturedDecl/CapturedDecl.expected b/swift/ql/test/extractor-tests/generated/decl/CapturedDecl/CapturedDecl.expected index 371312cb6cb..cbf62d5bd64 100644 --- a/swift/ql/test/extractor-tests/generated/decl/CapturedDecl/CapturedDecl.expected +++ b/swift/ql/test/extractor-tests/generated/decl/CapturedDecl/CapturedDecl.expected @@ -1,41 +1,43 @@ -| closures.swift:8:12:8:12 | x | getModule: | file://:0:0:0:0 | closures | getNumberOfMembers: | 0 | getDecl: | closures.swift:7:6:7:6 | x | isDirect: | yes | isEscaping: | no | -| closures.swift:9:12:9:12 | y | getModule: | file://:0:0:0:0 | closures | getNumberOfMembers: | 0 | getDecl: | closures.swift:6:7:6:7 | y | isDirect: | yes | isEscaping: | no | -| closures.swift:16:3:16:3 | escape | getModule: | file://:0:0:0:0 | closures | getNumberOfMembers: | 0 | getDecl: | closures.swift:12:5:12:5 | escape | isDirect: | yes | isEscaping: | yes | -| closures.swift:17:5:17:5 | x | getModule: | file://:0:0:0:0 | closures | getNumberOfMembers: | 0 | getDecl: | closures.swift:15:7:15:7 | x | isDirect: | yes | isEscaping: | yes | -| closures.swift:24:3:24:3 | escape | getModule: | file://:0:0:0:0 | closures | getNumberOfMembers: | 0 | getDecl: | closures.swift:12:5:12:5 | escape | isDirect: | yes | isEscaping: | yes | -| closures.swift:31:11:31:11 | x | getModule: | file://:0:0:0:0 | closures | getNumberOfMembers: | 0 | getDecl: | closures.swift:29:7:29:7 | x | isDirect: | no | isEscaping: | no | -| closures.swift:32:14:32:14 | f | getModule: | file://:0:0:0:0 | closures | getNumberOfMembers: | 0 | getDecl: | closures.swift:28:7:28:7 | f | isDirect: | no | isEscaping: | no | -| closures.swift:32:14:32:14 | f | getModule: | file://:0:0:0:0 | closures | getNumberOfMembers: | 0 | getDecl: | closures.swift:28:7:28:7 | f | isDirect: | yes | isEscaping: | no | -| closures.swift:32:17:32:17 | x | getModule: | file://:0:0:0:0 | closures | getNumberOfMembers: | 0 | getDecl: | closures.swift:29:7:29:7 | x | isDirect: | yes | isEscaping: | no | -| closures.swift:39:20:39:20 | callback | getModule: | file://:0:0:0:0 | closures | getNumberOfMembers: | 0 | getDecl: | closures.swift:36:21:36:58 | callback | isDirect: | yes | isEscaping: | yes | -| closures.swift:42:35:42:35 | wrapper(_:) | getModule: | file://:0:0:0:0 | closures | getNumberOfMembers: | 0 | getDecl: | closures.swift:38:5:40:5 | wrapper(_:) | isDirect: | no | isEscaping: | yes | -| closures.swift:52:18:52:18 | x | getModule: | file://:0:0:0:0 | closures | getNumberOfMembers: | 0 | getDecl: | closures.swift:51:7:51:7 | x | isDirect: | yes | isEscaping: | yes | -| closures.swift:54:13:54:13 | x | getModule: | file://:0:0:0:0 | closures | getNumberOfMembers: | 0 | getDecl: | closures.swift:51:7:51:7 | x | isDirect: | yes | isEscaping: | yes | -| closures.swift:61:18:61:18 | x | getModule: | file://:0:0:0:0 | closures | getNumberOfMembers: | 0 | getDecl: | closures.swift:60:7:60:7 | x | isDirect: | yes | isEscaping: | yes | -| closures.swift:63:13:63:13 | x | getModule: | file://:0:0:0:0 | closures | getNumberOfMembers: | 0 | getDecl: | closures.swift:60:7:60:7 | x | isDirect: | yes | isEscaping: | yes | -| closures.swift:71:3:71:3 | g | getModule: | file://:0:0:0:0 | closures | getNumberOfMembers: | 0 | getDecl: | closures.swift:68:5:68:5 | g | isDirect: | yes | isEscaping: | yes | -| closures.swift:71:14:71:14 | x | getModule: | file://:0:0:0:0 | closures | getNumberOfMembers: | 0 | getDecl: | closures.swift:70:7:70:7 | x | isDirect: | yes | isEscaping: | yes | -| closures.swift:73:13:73:13 | x | getModule: | file://:0:0:0:0 | closures | getNumberOfMembers: | 0 | getDecl: | closures.swift:70:7:70:7 | x | isDirect: | yes | isEscaping: | yes | -| closures.swift:85:7:85:7 | y | getModule: | file://:0:0:0:0 | closures | getNumberOfMembers: | 0 | getDecl: | closures.swift:79:7:79:7 | y | isDirect: | no | isEscaping: | yes | -| closures.swift:85:7:85:7 | y | getModule: | file://:0:0:0:0 | closures | getNumberOfMembers: | 0 | getDecl: | closures.swift:79:7:79:7 | y | isDirect: | yes | isEscaping: | yes | -| closures.swift:85:18:85:18 | x | getModule: | file://:0:0:0:0 | closures | getNumberOfMembers: | 0 | getDecl: | closures.swift:82:9:82:9 | x | isDirect: | yes | isEscaping: | yes | -| closures.swift:88:9:88:9 | b() | getModule: | file://:0:0:0:0 | closures | getNumberOfMembers: | 0 | getDecl: | closures.swift:92:5:98:5 | b() | isDirect: | no | isEscaping: | yes | -| closures.swift:93:7:93:7 | y | getModule: | file://:0:0:0:0 | closures | getNumberOfMembers: | 0 | getDecl: | closures.swift:79:7:79:7 | y | isDirect: | yes | isEscaping: | yes | -| closures.swift:93:20:93:20 | x | getModule: | file://:0:0:0:0 | closures | getNumberOfMembers: | 0 | getDecl: | closures.swift:82:9:82:9 | x | isDirect: | yes | isEscaping: | yes | -| closures.swift:96:9:96:9 | a() | getModule: | file://:0:0:0:0 | closures | getNumberOfMembers: | 0 | getDecl: | closures.swift:84:5:90:5 | a() | isDirect: | no | isEscaping: | yes | -| closures.swift:111:15:111:15 | x | getModule: | file://:0:0:0:0 | closures | getNumberOfMembers: | 0 | getDecl: | closures.swift:110:9:110:9 | x | isDirect: | yes | isEscaping: | yes | -| closures.swift:111:27:111:27 | x | getModule: | file://:0:0:0:0 | closures | getNumberOfMembers: | 0 | getDecl: | closures.swift:110:9:110:9 | x | isDirect: | yes | isEscaping: | yes | -| closures.swift:115:5:115:5 | incrX | getModule: | file://:0:0:0:0 | closures | getNumberOfMembers: | 0 | getDecl: | closures.swift:109:8:109:8 | incrX | isDirect: | yes | isEscaping: | yes | -| closures.swift:130:25:130:25 | x | getModule: | file://:0:0:0:0 | closures | getNumberOfMembers: | 0 | getDecl: | closures.swift:128:7:128:7 | x | isDirect: | yes | isEscaping: | yes | -| closures.swift:133:20:133:20 | x | getModule: | file://:0:0:0:0 | closures | getNumberOfMembers: | 0 | getDecl: | closures.swift:128:7:128:7 | x | isDirect: | no | isEscaping: | yes | -| closures.swift:133:20:133:20 | x | getModule: | file://:0:0:0:0 | closures | getNumberOfMembers: | 0 | getDecl: | closures.swift:128:7:128:7 | x | isDirect: | yes | isEscaping: | yes | -| closures.swift:133:24:133:24 | y | getModule: | file://:0:0:0:0 | closures | getNumberOfMembers: | 0 | getDecl: | closures.swift:132:22:132:22 | y | isDirect: | yes | isEscaping: | yes | -| closures.swift:151:21:151:21 | x | getModule: | file://:0:0:0:0 | closures | getNumberOfMembers: | 0 | getDecl: | closures.swift:149:10:149:15 | x | isDirect: | yes | isEscaping: | yes | -| closures.swift:154:16:154:16 | g(_:) | getModule: | file://:0:0:0:0 | closures | getNumberOfMembers: | 0 | getDecl: | closures.swift:158:3:165:3 | g(_:) | isDirect: | no | isEscaping: | yes | -| closures.swift:155:21:155:21 | next | getModule: | file://:0:0:0:0 | closures | getNumberOfMembers: | 0 | getDecl: | closures.swift:154:9:154:9 | next | isDirect: | yes | isEscaping: | yes | -| closures.swift:155:34:155:34 | x | getModule: | file://:0:0:0:0 | closures | getNumberOfMembers: | 0 | getDecl: | closures.swift:149:10:149:15 | x | isDirect: | yes | isEscaping: | yes | -| closures.swift:160:21:160:21 | x | getModule: | file://:0:0:0:0 | closures | getNumberOfMembers: | 0 | getDecl: | closures.swift:158:10:158:15 | x | isDirect: | yes | isEscaping: | yes | -| closures.swift:163:16:163:16 | f(_:) | getModule: | file://:0:0:0:0 | closures | getNumberOfMembers: | 0 | getDecl: | closures.swift:149:3:156:3 | f(_:) | isDirect: | no | isEscaping: | yes | -| closures.swift:164:21:164:21 | next | getModule: | file://:0:0:0:0 | closures | getNumberOfMembers: | 0 | getDecl: | closures.swift:163:9:163:9 | next | isDirect: | yes | isEscaping: | yes | -| closures.swift:164:36:164:36 | x | getModule: | file://:0:0:0:0 | closures | getNumberOfMembers: | 0 | getDecl: | closures.swift:158:10:158:15 | x | isDirect: | yes | isEscaping: | yes | -| closures.swift:195:3:195:3 | g | getModule: | file://:0:0:0:0 | closures | getNumberOfMembers: | 0 | getDecl: | closures.swift:68:5:68:5 | g | isDirect: | yes | isEscaping: | yes | +instances +| closures.swift:8:12:8:12 | x | getModule: | file://:0:0:0:0 | closures | getDecl: | closures.swift:7:6:7:6 | x | isDirect: | yes | isEscaping: | no | +| closures.swift:9:12:9:12 | y | getModule: | file://:0:0:0:0 | closures | getDecl: | closures.swift:6:7:6:7 | y | isDirect: | yes | isEscaping: | no | +| closures.swift:16:3:16:3 | escape | getModule: | file://:0:0:0:0 | closures | getDecl: | closures.swift:12:5:12:5 | escape | isDirect: | yes | isEscaping: | yes | +| closures.swift:17:5:17:5 | x | getModule: | file://:0:0:0:0 | closures | getDecl: | closures.swift:15:7:15:7 | x | isDirect: | yes | isEscaping: | yes | +| closures.swift:24:3:24:3 | escape | getModule: | file://:0:0:0:0 | closures | getDecl: | closures.swift:12:5:12:5 | escape | isDirect: | yes | isEscaping: | yes | +| closures.swift:31:11:31:11 | x | getModule: | file://:0:0:0:0 | closures | getDecl: | closures.swift:29:7:29:7 | x | isDirect: | no | isEscaping: | no | +| closures.swift:32:14:32:14 | f | getModule: | file://:0:0:0:0 | closures | getDecl: | closures.swift:28:7:28:7 | f | isDirect: | no | isEscaping: | no | +| closures.swift:32:14:32:14 | f | getModule: | file://:0:0:0:0 | closures | getDecl: | closures.swift:28:7:28:7 | f | isDirect: | yes | isEscaping: | no | +| closures.swift:32:17:32:17 | x | getModule: | file://:0:0:0:0 | closures | getDecl: | closures.swift:29:7:29:7 | x | isDirect: | yes | isEscaping: | no | +| closures.swift:39:20:39:20 | callback | getModule: | file://:0:0:0:0 | closures | getDecl: | closures.swift:36:21:36:58 | callback | isDirect: | yes | isEscaping: | yes | +| closures.swift:42:35:42:35 | wrapper(_:) | getModule: | file://:0:0:0:0 | closures | getDecl: | closures.swift:38:5:40:5 | wrapper(_:) | isDirect: | no | isEscaping: | yes | +| closures.swift:52:18:52:18 | x | getModule: | file://:0:0:0:0 | closures | getDecl: | closures.swift:51:7:51:7 | x | isDirect: | yes | isEscaping: | yes | +| closures.swift:54:13:54:13 | x | getModule: | file://:0:0:0:0 | closures | getDecl: | closures.swift:51:7:51:7 | x | isDirect: | yes | isEscaping: | yes | +| closures.swift:61:18:61:18 | x | getModule: | file://:0:0:0:0 | closures | getDecl: | closures.swift:60:7:60:7 | x | isDirect: | yes | isEscaping: | yes | +| closures.swift:63:13:63:13 | x | getModule: | file://:0:0:0:0 | closures | getDecl: | closures.swift:60:7:60:7 | x | isDirect: | yes | isEscaping: | yes | +| closures.swift:71:3:71:3 | g | getModule: | file://:0:0:0:0 | closures | getDecl: | closures.swift:68:5:68:5 | g | isDirect: | yes | isEscaping: | yes | +| closures.swift:71:14:71:14 | x | getModule: | file://:0:0:0:0 | closures | getDecl: | closures.swift:70:7:70:7 | x | isDirect: | yes | isEscaping: | yes | +| closures.swift:73:13:73:13 | x | getModule: | file://:0:0:0:0 | closures | getDecl: | closures.swift:70:7:70:7 | x | isDirect: | yes | isEscaping: | yes | +| closures.swift:85:7:85:7 | y | getModule: | file://:0:0:0:0 | closures | getDecl: | closures.swift:79:7:79:7 | y | isDirect: | no | isEscaping: | yes | +| closures.swift:85:7:85:7 | y | getModule: | file://:0:0:0:0 | closures | getDecl: | closures.swift:79:7:79:7 | y | isDirect: | yes | isEscaping: | yes | +| closures.swift:85:18:85:18 | x | getModule: | file://:0:0:0:0 | closures | getDecl: | closures.swift:82:9:82:9 | x | isDirect: | yes | isEscaping: | yes | +| closures.swift:88:9:88:9 | b() | getModule: | file://:0:0:0:0 | closures | getDecl: | closures.swift:92:5:98:5 | b() | isDirect: | no | isEscaping: | yes | +| closures.swift:93:7:93:7 | y | getModule: | file://:0:0:0:0 | closures | getDecl: | closures.swift:79:7:79:7 | y | isDirect: | yes | isEscaping: | yes | +| closures.swift:93:20:93:20 | x | getModule: | file://:0:0:0:0 | closures | getDecl: | closures.swift:82:9:82:9 | x | isDirect: | yes | isEscaping: | yes | +| closures.swift:96:9:96:9 | a() | getModule: | file://:0:0:0:0 | closures | getDecl: | closures.swift:84:5:90:5 | a() | isDirect: | no | isEscaping: | yes | +| closures.swift:111:15:111:15 | x | getModule: | file://:0:0:0:0 | closures | getDecl: | closures.swift:110:9:110:9 | x | isDirect: | yes | isEscaping: | yes | +| closures.swift:111:27:111:27 | x | getModule: | file://:0:0:0:0 | closures | getDecl: | closures.swift:110:9:110:9 | x | isDirect: | yes | isEscaping: | yes | +| closures.swift:115:5:115:5 | incrX | getModule: | file://:0:0:0:0 | closures | getDecl: | closures.swift:109:8:109:8 | incrX | isDirect: | yes | isEscaping: | yes | +| closures.swift:130:25:130:25 | x | getModule: | file://:0:0:0:0 | closures | getDecl: | closures.swift:128:7:128:7 | x | isDirect: | yes | isEscaping: | yes | +| closures.swift:133:20:133:20 | x | getModule: | file://:0:0:0:0 | closures | getDecl: | closures.swift:128:7:128:7 | x | isDirect: | no | isEscaping: | yes | +| closures.swift:133:20:133:20 | x | getModule: | file://:0:0:0:0 | closures | getDecl: | closures.swift:128:7:128:7 | x | isDirect: | yes | isEscaping: | yes | +| closures.swift:133:24:133:24 | y | getModule: | file://:0:0:0:0 | closures | getDecl: | closures.swift:132:22:132:22 | y | isDirect: | yes | isEscaping: | yes | +| closures.swift:151:21:151:21 | x | getModule: | file://:0:0:0:0 | closures | getDecl: | closures.swift:149:10:149:15 | x | isDirect: | yes | isEscaping: | yes | +| closures.swift:154:16:154:16 | g(_:) | getModule: | file://:0:0:0:0 | closures | getDecl: | closures.swift:158:3:165:3 | g(_:) | isDirect: | no | isEscaping: | yes | +| closures.swift:155:21:155:21 | next | getModule: | file://:0:0:0:0 | closures | getDecl: | closures.swift:154:9:154:9 | next | isDirect: | yes | isEscaping: | yes | +| closures.swift:155:34:155:34 | x | getModule: | file://:0:0:0:0 | closures | getDecl: | closures.swift:149:10:149:15 | x | isDirect: | yes | isEscaping: | yes | +| closures.swift:160:21:160:21 | x | getModule: | file://:0:0:0:0 | closures | getDecl: | closures.swift:158:10:158:15 | x | isDirect: | yes | isEscaping: | yes | +| closures.swift:163:16:163:16 | f(_:) | getModule: | file://:0:0:0:0 | closures | getDecl: | closures.swift:149:3:156:3 | f(_:) | isDirect: | no | isEscaping: | yes | +| closures.swift:164:21:164:21 | next | getModule: | file://:0:0:0:0 | closures | getDecl: | closures.swift:163:9:163:9 | next | isDirect: | yes | isEscaping: | yes | +| closures.swift:164:36:164:36 | x | getModule: | file://:0:0:0:0 | closures | getDecl: | closures.swift:158:10:158:15 | x | isDirect: | yes | isEscaping: | yes | +| closures.swift:195:3:195:3 | g | getModule: | file://:0:0:0:0 | closures | getDecl: | closures.swift:68:5:68:5 | g | isDirect: | yes | isEscaping: | yes | +getMember diff --git a/swift/ql/test/extractor-tests/generated/decl/CapturedDecl/CapturedDecl.ql b/swift/ql/test/extractor-tests/generated/decl/CapturedDecl/CapturedDecl.ql index 189558f3767..d4f39d659bc 100644 --- a/swift/ql/test/extractor-tests/generated/decl/CapturedDecl/CapturedDecl.ql +++ b/swift/ql/test/extractor-tests/generated/decl/CapturedDecl/CapturedDecl.ql @@ -2,16 +2,23 @@ import codeql.swift.elements import TestUtils -from - CapturedDecl x, ModuleDecl getModule, int getNumberOfMembers, ValueDecl getDecl, string isDirect, +query predicate instances( + CapturedDecl x, string getModule__label, ModuleDecl getModule, string getDecl__label, + ValueDecl getDecl, string isDirect__label, string isDirect, string isEscaping__label, string isEscaping -where +) { toBeTested(x) and not x.isUnknown() and + getModule__label = "getModule:" and getModule = x.getModule() and - getNumberOfMembers = x.getNumberOfMembers() and + getDecl__label = "getDecl:" and getDecl = x.getDecl() and + isDirect__label = "isDirect:" and (if x.isDirect() then isDirect = "yes" else isDirect = "no") and + isEscaping__label = "isEscaping:" and if x.isEscaping() then isEscaping = "yes" else isEscaping = "no" -select x, "getModule:", getModule, "getNumberOfMembers:", getNumberOfMembers, "getDecl:", getDecl, - "isDirect:", isDirect, "isEscaping:", isEscaping +} + +query predicate getMember(CapturedDecl x, int index, Decl getMember) { + toBeTested(x) and not x.isUnknown() and getMember = x.getMember(index) +} diff --git a/swift/ql/test/extractor-tests/generated/decl/CapturedDecl/CapturedDecl_getMember.expected b/swift/ql/test/extractor-tests/generated/decl/CapturedDecl/CapturedDecl_getMember.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/swift/ql/test/extractor-tests/generated/decl/CapturedDecl/CapturedDecl_getMember.ql b/swift/ql/test/extractor-tests/generated/decl/CapturedDecl/CapturedDecl_getMember.ql deleted file mode 100644 index 2709cc86f6f..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/CapturedDecl/CapturedDecl_getMember.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from CapturedDecl x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getMember(index) diff --git a/swift/ql/test/extractor-tests/generated/decl/ClassDecl/ClassDecl.expected b/swift/ql/test/extractor-tests/generated/decl/ClassDecl/ClassDecl.expected index c09b98045cf..b15a1cc649d 100644 --- a/swift/ql/test/extractor-tests/generated/decl/ClassDecl/ClassDecl.expected +++ b/swift/ql/test/extractor-tests/generated/decl/ClassDecl/ClassDecl.expected @@ -1,3 +1,23 @@ -| class.swift:1:1:7:1 | Foo | getNumberOfGenericTypeParams: | 0 | getModule: | file://:0:0:0:0 | class | getNumberOfMembers: | 4 | getInterfaceType: | Foo.Type | getName: | Foo | getNumberOfInheritedTypes: | 0 | getType: | Foo | -| class.swift:11:1:14:1 | Generic | getNumberOfGenericTypeParams: | 2 | getModule: | file://:0:0:0:0 | class | getNumberOfMembers: | 6 | getInterfaceType: | Generic.Type | getName: | Generic | getNumberOfInheritedTypes: | 0 | getType: | Generic | -| class.swift:16:1:17:1 | Baz | getNumberOfGenericTypeParams: | 0 | getModule: | file://:0:0:0:0 | class | getNumberOfMembers: | 2 | getInterfaceType: | Baz.Type | getName: | Baz | getNumberOfInheritedTypes: | 2 | getType: | Baz | +instances +| class.swift:1:1:7:1 | Foo | getModule: | file://:0:0:0:0 | class | getInterfaceType: | Foo.Type | getName: | Foo | getType: | Foo | +| class.swift:11:1:14:1 | Generic | getModule: | file://:0:0:0:0 | class | getInterfaceType: | Generic.Type | getName: | Generic | getType: | Generic | +| class.swift:16:1:17:1 | Baz | getModule: | file://:0:0:0:0 | class | getInterfaceType: | Baz.Type | getName: | Baz | getType: | Baz | +getGenericTypeParam +| class.swift:11:1:14:1 | Generic | 0 | class.swift:11:15:11:15 | X | +| class.swift:11:1:14:1 | Generic | 1 | class.swift:11:18:11:18 | Y | +getMember +| class.swift:1:1:7:1 | Foo | 0 | class.swift:2:5:2:16 | var ... = ... | +| class.swift:1:1:7:1 | Foo | 1 | class.swift:2:9:2:9 | field | +| class.swift:1:1:7:1 | Foo | 2 | class.swift:4:5:6:5 | Foo.init() | +| class.swift:1:1:7:1 | Foo | 3 | class.swift:1:7:1:7 | Foo.deinit() | +| class.swift:11:1:14:1 | Generic | 0 | class.swift:12:5:12:13 | var ... = ... | +| class.swift:11:1:14:1 | Generic | 1 | class.swift:12:9:12:9 | x | +| class.swift:11:1:14:1 | Generic | 2 | class.swift:13:5:13:13 | var ... = ... | +| class.swift:11:1:14:1 | Generic | 3 | class.swift:13:9:13:9 | y | +| class.swift:11:1:14:1 | Generic | 4 | class.swift:11:7:11:7 | Generic.deinit() | +| class.swift:11:1:14:1 | Generic | 5 | class.swift:11:7:11:7 | Generic.init() | +| class.swift:16:1:17:1 | Baz | 0 | class.swift:16:7:16:7 | Baz.deinit() | +| class.swift:16:1:17:1 | Baz | 1 | class.swift:16:21:16:21 | Baz.init() | +getInheritedType +| class.swift:16:1:17:1 | Baz | 0 | Foo | +| class.swift:16:1:17:1 | Baz | 1 | Bar | diff --git a/swift/ql/test/extractor-tests/generated/decl/ClassDecl/ClassDecl.ql b/swift/ql/test/extractor-tests/generated/decl/ClassDecl/ClassDecl.ql index 31cec2c9f7c..e32a98ca2bc 100644 --- a/swift/ql/test/extractor-tests/generated/decl/ClassDecl/ClassDecl.ql +++ b/swift/ql/test/extractor-tests/generated/decl/ClassDecl/ClassDecl.ql @@ -2,19 +2,30 @@ import codeql.swift.elements import TestUtils -from - ClassDecl x, int getNumberOfGenericTypeParams, ModuleDecl getModule, int getNumberOfMembers, - Type getInterfaceType, string getName, int getNumberOfInheritedTypes, Type getType -where +query predicate instances( + ClassDecl x, string getModule__label, ModuleDecl getModule, string getInterfaceType__label, + Type getInterfaceType, string getName__label, string getName, string getType__label, Type getType +) { toBeTested(x) and not x.isUnknown() and - getNumberOfGenericTypeParams = x.getNumberOfGenericTypeParams() and + getModule__label = "getModule:" and getModule = x.getModule() and - getNumberOfMembers = x.getNumberOfMembers() and + getInterfaceType__label = "getInterfaceType:" and getInterfaceType = x.getInterfaceType() and + getName__label = "getName:" and getName = x.getName() and - getNumberOfInheritedTypes = x.getNumberOfInheritedTypes() and + getType__label = "getType:" and getType = x.getType() -select x, "getNumberOfGenericTypeParams:", getNumberOfGenericTypeParams, "getModule:", getModule, - "getNumberOfMembers:", getNumberOfMembers, "getInterfaceType:", getInterfaceType, "getName:", - getName, "getNumberOfInheritedTypes:", getNumberOfInheritedTypes, "getType:", getType +} + +query predicate getGenericTypeParam(ClassDecl x, int index, GenericTypeParamDecl getGenericTypeParam) { + toBeTested(x) and not x.isUnknown() and getGenericTypeParam = x.getGenericTypeParam(index) +} + +query predicate getMember(ClassDecl x, int index, Decl getMember) { + toBeTested(x) and not x.isUnknown() and getMember = x.getMember(index) +} + +query predicate getInheritedType(ClassDecl x, int index, Type getInheritedType) { + toBeTested(x) and not x.isUnknown() and getInheritedType = x.getInheritedType(index) +} diff --git a/swift/ql/test/extractor-tests/generated/decl/ClassDecl/ClassDecl_getGenericTypeParam.expected b/swift/ql/test/extractor-tests/generated/decl/ClassDecl/ClassDecl_getGenericTypeParam.expected deleted file mode 100644 index 8dd0e061d97..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/ClassDecl/ClassDecl_getGenericTypeParam.expected +++ /dev/null @@ -1,2 +0,0 @@ -| class.swift:11:1:14:1 | Generic | 0 | class.swift:11:15:11:15 | X | -| class.swift:11:1:14:1 | Generic | 1 | class.swift:11:18:11:18 | Y | diff --git a/swift/ql/test/extractor-tests/generated/decl/ClassDecl/ClassDecl_getGenericTypeParam.ql b/swift/ql/test/extractor-tests/generated/decl/ClassDecl/ClassDecl_getGenericTypeParam.ql deleted file mode 100644 index 382d756d584..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/ClassDecl/ClassDecl_getGenericTypeParam.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from ClassDecl x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getGenericTypeParam(index) diff --git a/swift/ql/test/extractor-tests/generated/decl/ClassDecl/ClassDecl_getInheritedType.expected b/swift/ql/test/extractor-tests/generated/decl/ClassDecl/ClassDecl_getInheritedType.expected deleted file mode 100644 index 8d0be1c0267..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/ClassDecl/ClassDecl_getInheritedType.expected +++ /dev/null @@ -1,2 +0,0 @@ -| class.swift:16:1:17:1 | Baz | 0 | Foo | -| class.swift:16:1:17:1 | Baz | 1 | Bar | diff --git a/swift/ql/test/extractor-tests/generated/decl/ClassDecl/ClassDecl_getInheritedType.ql b/swift/ql/test/extractor-tests/generated/decl/ClassDecl/ClassDecl_getInheritedType.ql deleted file mode 100644 index 92e9fc52b7a..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/ClassDecl/ClassDecl_getInheritedType.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from ClassDecl x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getInheritedType(index) diff --git a/swift/ql/test/extractor-tests/generated/decl/ClassDecl/ClassDecl_getMember.expected b/swift/ql/test/extractor-tests/generated/decl/ClassDecl/ClassDecl_getMember.expected deleted file mode 100644 index 6c7b4ce0130..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/ClassDecl/ClassDecl_getMember.expected +++ /dev/null @@ -1,12 +0,0 @@ -| class.swift:1:1:7:1 | Foo | 0 | class.swift:2:5:2:16 | var ... = ... | -| class.swift:1:1:7:1 | Foo | 1 | class.swift:2:9:2:9 | field | -| class.swift:1:1:7:1 | Foo | 2 | class.swift:4:5:6:5 | Foo.init() | -| class.swift:1:1:7:1 | Foo | 3 | class.swift:1:7:1:7 | Foo.deinit() | -| class.swift:11:1:14:1 | Generic | 0 | class.swift:12:5:12:13 | var ... = ... | -| class.swift:11:1:14:1 | Generic | 1 | class.swift:12:9:12:9 | x | -| class.swift:11:1:14:1 | Generic | 2 | class.swift:13:5:13:13 | var ... = ... | -| class.swift:11:1:14:1 | Generic | 3 | class.swift:13:9:13:9 | y | -| class.swift:11:1:14:1 | Generic | 4 | class.swift:11:7:11:7 | Generic.deinit() | -| class.swift:11:1:14:1 | Generic | 5 | class.swift:11:7:11:7 | Generic.init() | -| class.swift:16:1:17:1 | Baz | 0 | class.swift:16:7:16:7 | Baz.deinit() | -| class.swift:16:1:17:1 | Baz | 1 | class.swift:16:21:16:21 | Baz.init() | diff --git a/swift/ql/test/extractor-tests/generated/decl/ClassDecl/ClassDecl_getMember.ql b/swift/ql/test/extractor-tests/generated/decl/ClassDecl/ClassDecl_getMember.ql deleted file mode 100644 index c7651a702b2..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/ClassDecl/ClassDecl_getMember.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from ClassDecl x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getMember(index) diff --git a/swift/ql/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl.expected b/swift/ql/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl.expected index 9e05b623dd7..85fef3f52ca 100644 --- a/swift/ql/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl.expected +++ b/swift/ql/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl.expected @@ -1,28 +1,137 @@ -| var_decls.swift:2:7:2:7 | i | getModule: | file://:0:0:0:0 | var_decls | getNumberOfMembers: | 0 | getInterfaceType: | Int | getNumberOfAccessors: | 0 | getName: | i | getType: | Int | hasAttachedPropertyWrapperType: | no | hasParentPattern: | yes | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | getIntroducerInt: | 0 | -| var_decls.swift:2:12:2:12 | $i$generator | getModule: | file://:0:0:0:0 | var_decls | getNumberOfMembers: | 0 | getInterfaceType: | IndexingIterator> | getNumberOfAccessors: | 0 | getName: | $i$generator | getType: | IndexingIterator> | hasAttachedPropertyWrapperType: | no | hasParentPattern: | yes | hasParentInitializer: | yes | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | getIntroducerInt: | 1 | -| var_decls.swift:4:7:4:7 | i | getModule: | file://:0:0:0:0 | var_decls | getNumberOfMembers: | 0 | getInterfaceType: | Int | getNumberOfAccessors: | 0 | getName: | i | getType: | Int | hasAttachedPropertyWrapperType: | no | hasParentPattern: | yes | hasParentInitializer: | yes | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | getIntroducerInt: | 1 | -| var_decls.swift:7:5:7:5 | numbers | getModule: | file://:0:0:0:0 | var_decls | getNumberOfMembers: | 0 | getInterfaceType: | [Int] | getNumberOfAccessors: | 0 | getName: | numbers | getType: | [Int] | hasAttachedPropertyWrapperType: | no | hasParentPattern: | yes | hasParentInitializer: | yes | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | getIntroducerInt: | 1 | -| var_decls.swift:10:12:10:12 | numbers | getModule: | file://:0:0:0:0 | var_decls | getNumberOfMembers: | 0 | getInterfaceType: | [Int] | getNumberOfAccessors: | 1 | getName: | numbers | getType: | [Int] | hasAttachedPropertyWrapperType: | no | hasParentPattern: | yes | hasParentInitializer: | yes | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | getIntroducerInt: | 0 | -| var_decls.swift:15:7:15:7 | wrappedValue | getModule: | file://:0:0:0:0 | var_decls | getNumberOfMembers: | 0 | getInterfaceType: | T | getNumberOfAccessors: | 3 | getName: | wrappedValue | getType: | T | hasAttachedPropertyWrapperType: | no | hasParentPattern: | yes | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | getIntroducerInt: | 1 | -| var_decls.swift:20:7:20:7 | wrappedValue | getModule: | file://:0:0:0:0 | var_decls | getNumberOfMembers: | 0 | getInterfaceType: | Int | getNumberOfAccessors: | 3 | getName: | wrappedValue | getType: | Int | hasAttachedPropertyWrapperType: | no | hasParentPattern: | yes | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | getIntroducerInt: | 1 | -| var_decls.swift:24:15:24:15 | _wrapped | getModule: | file://:0:0:0:0 | var_decls | getNumberOfMembers: | 0 | getInterfaceType: | X | getNumberOfAccessors: | 3 | getName: | _wrapped | getType: | X | hasAttachedPropertyWrapperType: | no | hasParentPattern: | yes | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | getIntroducerInt: | 1 | -| var_decls.swift:24:15:24:15 | wrapped | getModule: | file://:0:0:0:0 | var_decls | getNumberOfMembers: | 0 | getInterfaceType: | Int | getNumberOfAccessors: | 3 | getName: | wrapped | getType: | Int | hasAttachedPropertyWrapperType: | yes | hasParentPattern: | yes | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | yes | hasPropertyWrapperBackingVar: | yes | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | getIntroducerInt: | 1 | -| var_decls.swift:28:7:28:7 | wrappedValue | getModule: | file://:0:0:0:0 | var_decls | getNumberOfMembers: | 0 | getInterfaceType: | Int | getNumberOfAccessors: | 3 | getName: | wrappedValue | getType: | Int | hasAttachedPropertyWrapperType: | no | hasParentPattern: | yes | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | getIntroducerInt: | 1 | -| var_decls.swift:34:7:34:7 | wrappedValue | getModule: | file://:0:0:0:0 | var_decls | getNumberOfMembers: | 0 | getInterfaceType: | Int | getNumberOfAccessors: | 3 | getName: | wrappedValue | getType: | Int | hasAttachedPropertyWrapperType: | no | hasParentPattern: | yes | hasParentInitializer: | yes | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | getIntroducerInt: | 1 | -| var_decls.swift:35:7:35:7 | projectedValue | getModule: | file://:0:0:0:0 | var_decls | getNumberOfMembers: | 0 | getInterfaceType: | Bool | getNumberOfAccessors: | 3 | getName: | projectedValue | getType: | Bool | hasAttachedPropertyWrapperType: | no | hasParentPattern: | yes | hasParentInitializer: | yes | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | getIntroducerInt: | 1 | -| var_decls.swift:39:7:39:7 | wrappedValue | getModule: | file://:0:0:0:0 | var_decls | getNumberOfMembers: | 0 | getInterfaceType: | Int | getNumberOfAccessors: | 3 | getName: | wrappedValue | getType: | Int | hasAttachedPropertyWrapperType: | no | hasParentPattern: | yes | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | getIntroducerInt: | 1 | -| var_decls.swift:40:7:40:7 | projectedValue | getModule: | file://:0:0:0:0 | var_decls | getNumberOfMembers: | 0 | getInterfaceType: | Bool | getNumberOfAccessors: | 3 | getName: | projectedValue | getType: | Bool | hasAttachedPropertyWrapperType: | no | hasParentPattern: | yes | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | getIntroducerInt: | 1 | -| var_decls.swift:54:10:54:10 | _w1 | getModule: | file://:0:0:0:0 | var_decls | getNumberOfMembers: | 0 | getInterfaceType: | X | getNumberOfAccessors: | 0 | getName: | _w1 | getType: | X | hasAttachedPropertyWrapperType: | no | hasParentPattern: | yes | hasParentInitializer: | yes | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | getIntroducerInt: | 1 | -| var_decls.swift:54:10:54:10 | w1 | getModule: | file://:0:0:0:0 | var_decls | getNumberOfMembers: | 0 | getInterfaceType: | Int | getNumberOfAccessors: | 2 | getName: | w1 | getType: | Int | hasAttachedPropertyWrapperType: | yes | hasParentPattern: | yes | hasParentInitializer: | yes | hasPropertyWrapperBackingVarBinding: | yes | hasPropertyWrapperBackingVar: | yes | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | getIntroducerInt: | 1 | -| var_decls.swift:55:24:55:24 | _w2 | getModule: | file://:0:0:0:0 | var_decls | getNumberOfMembers: | 0 | getInterfaceType: | WrapperWithInit | getNumberOfAccessors: | 0 | getName: | _w2 | getType: | WrapperWithInit | hasAttachedPropertyWrapperType: | no | hasParentPattern: | yes | hasParentInitializer: | yes | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | getIntroducerInt: | 1 | -| var_decls.swift:55:24:55:24 | w2 | getModule: | file://:0:0:0:0 | var_decls | getNumberOfMembers: | 0 | getInterfaceType: | Int | getNumberOfAccessors: | 2 | getName: | w2 | getType: | Int | hasAttachedPropertyWrapperType: | yes | hasParentPattern: | yes | hasParentInitializer: | yes | hasPropertyWrapperBackingVarBinding: | yes | hasPropertyWrapperBackingVar: | yes | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | getIntroducerInt: | 1 | -| var_decls.swift:56:29:56:29 | $w3 | getModule: | file://:0:0:0:0 | var_decls | getNumberOfMembers: | 0 | getInterfaceType: | Bool | getNumberOfAccessors: | 2 | getName: | $w3 | getType: | Bool | hasAttachedPropertyWrapperType: | no | hasParentPattern: | yes | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | getIntroducerInt: | 1 | -| var_decls.swift:56:29:56:29 | _w3 | getModule: | file://:0:0:0:0 | var_decls | getNumberOfMembers: | 0 | getInterfaceType: | WrapperWithProjected | getNumberOfAccessors: | 0 | getName: | _w3 | getType: | WrapperWithProjected | hasAttachedPropertyWrapperType: | no | hasParentPattern: | yes | hasParentInitializer: | yes | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | getIntroducerInt: | 1 | -| var_decls.swift:56:29:56:29 | w3 | getModule: | file://:0:0:0:0 | var_decls | getNumberOfMembers: | 0 | getInterfaceType: | Int | getNumberOfAccessors: | 2 | getName: | w3 | getType: | Int | hasAttachedPropertyWrapperType: | yes | hasParentPattern: | yes | hasParentInitializer: | yes | hasPropertyWrapperBackingVarBinding: | yes | hasPropertyWrapperBackingVar: | yes | hasPropertyWrapperProjectionVarBinding: | yes | hasPropertyWrapperProjectionVar: | yes | getIntroducerInt: | 1 | -| var_decls.swift:57:36:57:36 | $w4 | getModule: | file://:0:0:0:0 | var_decls | getNumberOfMembers: | 0 | getInterfaceType: | Bool | getNumberOfAccessors: | 2 | getName: | $w4 | getType: | Bool | hasAttachedPropertyWrapperType: | no | hasParentPattern: | yes | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | getIntroducerInt: | 1 | -| var_decls.swift:57:36:57:36 | _w4 | getModule: | file://:0:0:0:0 | var_decls | getNumberOfMembers: | 0 | getInterfaceType: | WrapperWithProjectedAndInit | getNumberOfAccessors: | 0 | getName: | _w4 | getType: | WrapperWithProjectedAndInit | hasAttachedPropertyWrapperType: | no | hasParentPattern: | yes | hasParentInitializer: | yes | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | getIntroducerInt: | 1 | -| var_decls.swift:57:36:57:36 | w4 | getModule: | file://:0:0:0:0 | var_decls | getNumberOfMembers: | 0 | getInterfaceType: | Int | getNumberOfAccessors: | 2 | getName: | w4 | getType: | Int | hasAttachedPropertyWrapperType: | yes | hasParentPattern: | yes | hasParentInitializer: | yes | hasPropertyWrapperBackingVarBinding: | yes | hasPropertyWrapperBackingVar: | yes | hasPropertyWrapperProjectionVarBinding: | yes | hasPropertyWrapperProjectionVar: | yes | getIntroducerInt: | 1 | -| var_decls.swift:65:19:65:19 | case_variable | getModule: | file://:0:0:0:0 | var_decls | getNumberOfMembers: | 0 | getInterfaceType: | Int | getNumberOfAccessors: | 0 | getName: | case_variable | getType: | Int | hasAttachedPropertyWrapperType: | no | hasParentPattern: | yes | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | getIntroducerInt: | 0 | -| var_decls.swift:65:34:65:34 | $match | getModule: | file://:0:0:0:0 | var_decls | getNumberOfMembers: | 0 | getInterfaceType: | Int | getNumberOfAccessors: | 0 | getName: | $match | getType: | Int | hasAttachedPropertyWrapperType: | no | hasParentPattern: | no | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | getIntroducerInt: | 0 | -| var_decls.swift:67:15:67:15 | $match | getModule: | file://:0:0:0:0 | var_decls | getNumberOfMembers: | 0 | getInterfaceType: | Int | getNumberOfAccessors: | 0 | getName: | $match | getType: | Int | hasAttachedPropertyWrapperType: | no | hasParentPattern: | no | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | getIntroducerInt: | 0 | -| var_decls.swift:67:22:67:22 | unused_case_variable | getModule: | file://:0:0:0:0 | var_decls | getNumberOfMembers: | 0 | getInterfaceType: | Int | getNumberOfAccessors: | 0 | getName: | unused_case_variable | getType: | Int | hasAttachedPropertyWrapperType: | no | hasParentPattern: | yes | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | getIntroducerInt: | 0 | +instances +| var_decls.swift:2:7:2:7 | i | getModule: | file://:0:0:0:0 | var_decls | getInterfaceType: | Int | getName: | i | getType: | Int | getIntroducerInt: | 0 | +| var_decls.swift:2:12:2:12 | $i$generator | getModule: | file://:0:0:0:0 | var_decls | getInterfaceType: | IndexingIterator> | getName: | $i$generator | getType: | IndexingIterator> | getIntroducerInt: | 1 | +| var_decls.swift:4:7:4:7 | i | getModule: | file://:0:0:0:0 | var_decls | getInterfaceType: | Int | getName: | i | getType: | Int | getIntroducerInt: | 1 | +| var_decls.swift:7:5:7:5 | numbers | getModule: | file://:0:0:0:0 | var_decls | getInterfaceType: | [Int] | getName: | numbers | getType: | [Int] | getIntroducerInt: | 1 | +| var_decls.swift:10:12:10:12 | numbers | getModule: | file://:0:0:0:0 | var_decls | getInterfaceType: | [Int] | getName: | numbers | getType: | [Int] | getIntroducerInt: | 0 | +| var_decls.swift:15:7:15:7 | wrappedValue | getModule: | file://:0:0:0:0 | var_decls | getInterfaceType: | T | getName: | wrappedValue | getType: | T | getIntroducerInt: | 1 | +| var_decls.swift:20:7:20:7 | wrappedValue | getModule: | file://:0:0:0:0 | var_decls | getInterfaceType: | Int | getName: | wrappedValue | getType: | Int | getIntroducerInt: | 1 | +| var_decls.swift:24:15:24:15 | _wrapped | getModule: | file://:0:0:0:0 | var_decls | getInterfaceType: | X | getName: | _wrapped | getType: | X | getIntroducerInt: | 1 | +| var_decls.swift:24:15:24:15 | wrapped | getModule: | file://:0:0:0:0 | var_decls | getInterfaceType: | Int | getName: | wrapped | getType: | Int | getIntroducerInt: | 1 | +| var_decls.swift:28:7:28:7 | wrappedValue | getModule: | file://:0:0:0:0 | var_decls | getInterfaceType: | Int | getName: | wrappedValue | getType: | Int | getIntroducerInt: | 1 | +| var_decls.swift:34:7:34:7 | wrappedValue | getModule: | file://:0:0:0:0 | var_decls | getInterfaceType: | Int | getName: | wrappedValue | getType: | Int | getIntroducerInt: | 1 | +| var_decls.swift:35:7:35:7 | projectedValue | getModule: | file://:0:0:0:0 | var_decls | getInterfaceType: | Bool | getName: | projectedValue | getType: | Bool | getIntroducerInt: | 1 | +| var_decls.swift:39:7:39:7 | wrappedValue | getModule: | file://:0:0:0:0 | var_decls | getInterfaceType: | Int | getName: | wrappedValue | getType: | Int | getIntroducerInt: | 1 | +| var_decls.swift:40:7:40:7 | projectedValue | getModule: | file://:0:0:0:0 | var_decls | getInterfaceType: | Bool | getName: | projectedValue | getType: | Bool | getIntroducerInt: | 1 | +| var_decls.swift:54:10:54:10 | _w1 | getModule: | file://:0:0:0:0 | var_decls | getInterfaceType: | X | getName: | _w1 | getType: | X | getIntroducerInt: | 1 | +| var_decls.swift:54:10:54:10 | w1 | getModule: | file://:0:0:0:0 | var_decls | getInterfaceType: | Int | getName: | w1 | getType: | Int | getIntroducerInt: | 1 | +| var_decls.swift:55:24:55:24 | _w2 | getModule: | file://:0:0:0:0 | var_decls | getInterfaceType: | WrapperWithInit | getName: | _w2 | getType: | WrapperWithInit | getIntroducerInt: | 1 | +| var_decls.swift:55:24:55:24 | w2 | getModule: | file://:0:0:0:0 | var_decls | getInterfaceType: | Int | getName: | w2 | getType: | Int | getIntroducerInt: | 1 | +| var_decls.swift:56:29:56:29 | $w3 | getModule: | file://:0:0:0:0 | var_decls | getInterfaceType: | Bool | getName: | $w3 | getType: | Bool | getIntroducerInt: | 1 | +| var_decls.swift:56:29:56:29 | _w3 | getModule: | file://:0:0:0:0 | var_decls | getInterfaceType: | WrapperWithProjected | getName: | _w3 | getType: | WrapperWithProjected | getIntroducerInt: | 1 | +| var_decls.swift:56:29:56:29 | w3 | getModule: | file://:0:0:0:0 | var_decls | getInterfaceType: | Int | getName: | w3 | getType: | Int | getIntroducerInt: | 1 | +| var_decls.swift:57:36:57:36 | $w4 | getModule: | file://:0:0:0:0 | var_decls | getInterfaceType: | Bool | getName: | $w4 | getType: | Bool | getIntroducerInt: | 1 | +| var_decls.swift:57:36:57:36 | _w4 | getModule: | file://:0:0:0:0 | var_decls | getInterfaceType: | WrapperWithProjectedAndInit | getName: | _w4 | getType: | WrapperWithProjectedAndInit | getIntroducerInt: | 1 | +| var_decls.swift:57:36:57:36 | w4 | getModule: | file://:0:0:0:0 | var_decls | getInterfaceType: | Int | getName: | w4 | getType: | Int | getIntroducerInt: | 1 | +| var_decls.swift:65:19:65:19 | case_variable | getModule: | file://:0:0:0:0 | var_decls | getInterfaceType: | Int | getName: | case_variable | getType: | Int | getIntroducerInt: | 0 | +| var_decls.swift:65:34:65:34 | $match | getModule: | file://:0:0:0:0 | var_decls | getInterfaceType: | Int | getName: | $match | getType: | Int | getIntroducerInt: | 0 | +| var_decls.swift:67:15:67:15 | $match | getModule: | file://:0:0:0:0 | var_decls | getInterfaceType: | Int | getName: | $match | getType: | Int | getIntroducerInt: | 0 | +| var_decls.swift:67:22:67:22 | unused_case_variable | getModule: | file://:0:0:0:0 | var_decls | getInterfaceType: | Int | getName: | unused_case_variable | getType: | Int | getIntroducerInt: | 0 | +getMember +getAccessor +| var_decls.swift:10:12:10:12 | numbers | 0 | var_decls.swift:10:12:10:12 | get | +| var_decls.swift:15:7:15:7 | wrappedValue | 0 | var_decls.swift:15:7:15:7 | get | +| var_decls.swift:15:7:15:7 | wrappedValue | 1 | var_decls.swift:15:7:15:7 | set | +| var_decls.swift:15:7:15:7 | wrappedValue | 2 | var_decls.swift:15:7:15:7 | _modify | +| var_decls.swift:20:7:20:7 | wrappedValue | 0 | var_decls.swift:20:7:20:7 | get | +| var_decls.swift:20:7:20:7 | wrappedValue | 1 | var_decls.swift:20:7:20:7 | set | +| var_decls.swift:20:7:20:7 | wrappedValue | 2 | var_decls.swift:20:7:20:7 | _modify | +| var_decls.swift:24:15:24:15 | _wrapped | 0 | var_decls.swift:24:15:24:15 | get | +| var_decls.swift:24:15:24:15 | _wrapped | 1 | var_decls.swift:24:15:24:15 | set | +| var_decls.swift:24:15:24:15 | _wrapped | 2 | var_decls.swift:24:15:24:15 | _modify | +| var_decls.swift:24:15:24:15 | wrapped | 0 | var_decls.swift:24:15:24:15 | get | +| var_decls.swift:24:15:24:15 | wrapped | 1 | var_decls.swift:24:15:24:15 | set | +| var_decls.swift:24:15:24:15 | wrapped | 2 | var_decls.swift:24:15:24:15 | _modify | +| var_decls.swift:28:7:28:7 | wrappedValue | 0 | var_decls.swift:28:7:28:7 | get | +| var_decls.swift:28:7:28:7 | wrappedValue | 1 | var_decls.swift:28:7:28:7 | set | +| var_decls.swift:28:7:28:7 | wrappedValue | 2 | var_decls.swift:28:7:28:7 | _modify | +| var_decls.swift:34:7:34:7 | wrappedValue | 0 | var_decls.swift:34:7:34:7 | get | +| var_decls.swift:34:7:34:7 | wrappedValue | 1 | var_decls.swift:34:7:34:7 | set | +| var_decls.swift:34:7:34:7 | wrappedValue | 2 | var_decls.swift:34:7:34:7 | _modify | +| var_decls.swift:35:7:35:7 | projectedValue | 0 | var_decls.swift:35:7:35:7 | get | +| var_decls.swift:35:7:35:7 | projectedValue | 1 | var_decls.swift:35:7:35:7 | set | +| var_decls.swift:35:7:35:7 | projectedValue | 2 | var_decls.swift:35:7:35:7 | _modify | +| var_decls.swift:39:7:39:7 | wrappedValue | 0 | var_decls.swift:39:7:39:7 | get | +| var_decls.swift:39:7:39:7 | wrappedValue | 1 | var_decls.swift:39:7:39:7 | set | +| var_decls.swift:39:7:39:7 | wrappedValue | 2 | var_decls.swift:39:7:39:7 | _modify | +| var_decls.swift:40:7:40:7 | projectedValue | 0 | var_decls.swift:40:7:40:7 | get | +| var_decls.swift:40:7:40:7 | projectedValue | 1 | var_decls.swift:40:7:40:7 | set | +| var_decls.swift:40:7:40:7 | projectedValue | 2 | var_decls.swift:40:7:40:7 | _modify | +| var_decls.swift:54:10:54:10 | w1 | 0 | var_decls.swift:54:10:54:10 | get | +| var_decls.swift:54:10:54:10 | w1 | 1 | var_decls.swift:54:10:54:10 | set | +| var_decls.swift:55:24:55:24 | w2 | 0 | var_decls.swift:55:24:55:24 | get | +| var_decls.swift:55:24:55:24 | w2 | 1 | var_decls.swift:55:24:55:24 | set | +| var_decls.swift:56:29:56:29 | $w3 | 0 | var_decls.swift:56:29:56:29 | get | +| var_decls.swift:56:29:56:29 | $w3 | 1 | var_decls.swift:56:29:56:29 | set | +| var_decls.swift:56:29:56:29 | w3 | 0 | var_decls.swift:56:29:56:29 | get | +| var_decls.swift:56:29:56:29 | w3 | 1 | var_decls.swift:56:29:56:29 | set | +| var_decls.swift:57:36:57:36 | $w4 | 0 | var_decls.swift:57:36:57:36 | get | +| var_decls.swift:57:36:57:36 | $w4 | 1 | var_decls.swift:57:36:57:36 | set | +| var_decls.swift:57:36:57:36 | w4 | 0 | var_decls.swift:57:36:57:36 | get | +| var_decls.swift:57:36:57:36 | w4 | 1 | var_decls.swift:57:36:57:36 | set | +getAttachedPropertyWrapperType +| var_decls.swift:24:15:24:15 | wrapped | X | +| var_decls.swift:54:10:54:10 | w1 | X | +| var_decls.swift:55:24:55:24 | w2 | WrapperWithInit | +| var_decls.swift:56:29:56:29 | w3 | WrapperWithProjected | +| var_decls.swift:57:36:57:36 | w4 | WrapperWithProjectedAndInit | +getParentPattern +| var_decls.swift:2:7:2:7 | i | var_decls.swift:2:7:2:7 | i | +| var_decls.swift:2:12:2:12 | $i$generator | var_decls.swift:2:12:2:12 | $i$generator | +| var_decls.swift:4:7:4:7 | i | var_decls.swift:4:7:4:7 | i | +| var_decls.swift:7:5:7:5 | numbers | var_decls.swift:7:5:7:5 | numbers | +| var_decls.swift:10:12:10:12 | numbers | var_decls.swift:10:12:10:12 | numbers | +| var_decls.swift:15:7:15:7 | wrappedValue | var_decls.swift:15:7:15:21 | ... as ... | +| var_decls.swift:20:7:20:7 | wrappedValue | var_decls.swift:20:7:20:21 | ... as ... | +| var_decls.swift:24:15:24:15 | _wrapped | var_decls.swift:24:15:24:15 | ... as ... | +| var_decls.swift:24:15:24:15 | wrapped | var_decls.swift:24:15:24:25 | ... as ... | +| var_decls.swift:28:7:28:7 | wrappedValue | var_decls.swift:28:7:28:22 | ... as ... | +| var_decls.swift:34:7:34:7 | wrappedValue | var_decls.swift:34:7:34:22 | ... as ... | +| var_decls.swift:35:7:35:7 | projectedValue | var_decls.swift:35:7:35:24 | ... as ... | +| var_decls.swift:39:7:39:7 | wrappedValue | var_decls.swift:39:7:39:22 | ... as ... | +| var_decls.swift:40:7:40:7 | projectedValue | var_decls.swift:40:7:40:24 | ... as ... | +| var_decls.swift:54:10:54:10 | _w1 | var_decls.swift:54:10:54:10 | ... as ... | +| var_decls.swift:54:10:54:10 | w1 | var_decls.swift:54:10:54:10 | w1 | +| var_decls.swift:55:24:55:24 | _w2 | var_decls.swift:55:24:55:24 | ... as ... | +| var_decls.swift:55:24:55:24 | w2 | var_decls.swift:55:24:55:24 | w2 | +| var_decls.swift:56:29:56:29 | $w3 | var_decls.swift:56:29:56:29 | ... as ... | +| var_decls.swift:56:29:56:29 | _w3 | var_decls.swift:56:29:56:29 | ... as ... | +| var_decls.swift:56:29:56:29 | w3 | var_decls.swift:56:29:56:29 | w3 | +| var_decls.swift:57:36:57:36 | $w4 | var_decls.swift:57:36:57:36 | ... as ... | +| var_decls.swift:57:36:57:36 | _w4 | var_decls.swift:57:36:57:36 | ... as ... | +| var_decls.swift:57:36:57:36 | w4 | var_decls.swift:57:36:57:36 | w4 | +| var_decls.swift:65:19:65:19 | case_variable | var_decls.swift:65:8:65:35 | .value(...) | +| var_decls.swift:67:22:67:22 | unused_case_variable | var_decls.swift:67:8:67:42 | .value(...) | +getParentInitializer +| var_decls.swift:2:12:2:12 | $i$generator | var_decls.swift:2:12:2:16 | call to makeIterator() | +| var_decls.swift:4:7:4:7 | i | var_decls.swift:4:11:4:11 | 0 | +| var_decls.swift:7:5:7:5 | numbers | var_decls.swift:7:15:7:18 | [...] | +| var_decls.swift:10:12:10:12 | numbers | var_decls.swift:10:22:10:35 | [...] | +| var_decls.swift:34:7:34:7 | wrappedValue | var_decls.swift:34:28:34:28 | 42 | +| var_decls.swift:35:7:35:7 | projectedValue | var_decls.swift:35:31:35:31 | false | +| var_decls.swift:54:10:54:10 | _w1 | var_decls.swift:54:4:54:15 | call to X.init(wrappedValue:) | +| var_decls.swift:54:10:54:10 | w1 | var_decls.swift:54:4:54:15 | call to X.init(wrappedValue:) | +| var_decls.swift:55:24:55:24 | _w2 | var_decls.swift:55:4:55:29 | call to WrapperWithInit.init(wrappedValue:) | +| var_decls.swift:55:24:55:24 | w2 | var_decls.swift:55:4:55:29 | call to WrapperWithInit.init(wrappedValue:) | +| var_decls.swift:56:29:56:29 | _w3 | var_decls.swift:56:4:56:34 | call to WrapperWithProjected.init(wrappedValue:projectedValue:) | +| var_decls.swift:56:29:56:29 | w3 | var_decls.swift:56:4:56:34 | call to WrapperWithProjected.init(wrappedValue:projectedValue:) | +| var_decls.swift:57:36:57:36 | _w4 | var_decls.swift:57:4:57:41 | call to WrapperWithProjectedAndInit.init(wrappedValue:) | +| var_decls.swift:57:36:57:36 | w4 | var_decls.swift:57:4:57:41 | call to WrapperWithProjectedAndInit.init(wrappedValue:) | +getPropertyWrapperBackingVarBinding +| var_decls.swift:24:15:24:15 | wrapped | file://:0:0:0:0 | var ... = ... | +| var_decls.swift:54:10:54:10 | w1 | file://:0:0:0:0 | var ... = ... | +| var_decls.swift:55:24:55:24 | w2 | file://:0:0:0:0 | var ... = ... | +| var_decls.swift:56:29:56:29 | w3 | file://:0:0:0:0 | var ... = ... | +| var_decls.swift:57:36:57:36 | w4 | file://:0:0:0:0 | var ... = ... | +getPropertyWrapperBackingVar +| var_decls.swift:24:15:24:15 | wrapped | var_decls.swift:24:15:24:15 | _wrapped | +| var_decls.swift:54:10:54:10 | w1 | var_decls.swift:54:10:54:10 | _w1 | +| var_decls.swift:55:24:55:24 | w2 | var_decls.swift:55:24:55:24 | _w2 | +| var_decls.swift:56:29:56:29 | w3 | var_decls.swift:56:29:56:29 | _w3 | +| var_decls.swift:57:36:57:36 | w4 | var_decls.swift:57:36:57:36 | _w4 | +getPropertyWrapperProjectionVarBinding +| var_decls.swift:56:29:56:29 | w3 | file://:0:0:0:0 | var ... = ... | +| var_decls.swift:57:36:57:36 | w4 | file://:0:0:0:0 | var ... = ... | +getPropertyWrapperProjectionVar +| var_decls.swift:56:29:56:29 | w3 | var_decls.swift:56:29:56:29 | $w3 | +| var_decls.swift:57:36:57:36 | w4 | var_decls.swift:57:36:57:36 | $w4 | diff --git a/swift/ql/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl.ql b/swift/ql/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl.ql index 2dd21cf6a17..f6c7b554143 100644 --- a/swift/ql/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl.ql +++ b/swift/ql/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl.ql @@ -2,55 +2,75 @@ import codeql.swift.elements import TestUtils -from - ConcreteVarDecl x, ModuleDecl getModule, int getNumberOfMembers, Type getInterfaceType, - int getNumberOfAccessors, string getName, Type getType, string hasAttachedPropertyWrapperType, - string hasParentPattern, string hasParentInitializer, string hasPropertyWrapperBackingVarBinding, - string hasPropertyWrapperBackingVar, string hasPropertyWrapperProjectionVarBinding, - string hasPropertyWrapperProjectionVar, int getIntroducerInt -where +query predicate instances( + ConcreteVarDecl x, string getModule__label, ModuleDecl getModule, string getInterfaceType__label, + Type getInterfaceType, string getName__label, string getName, string getType__label, Type getType, + string getIntroducerInt__label, int getIntroducerInt +) { toBeTested(x) and not x.isUnknown() and + getModule__label = "getModule:" and getModule = x.getModule() and - getNumberOfMembers = x.getNumberOfMembers() and + getInterfaceType__label = "getInterfaceType:" and getInterfaceType = x.getInterfaceType() and - getNumberOfAccessors = x.getNumberOfAccessors() and + getName__label = "getName:" and getName = x.getName() and + getType__label = "getType:" and getType = x.getType() and - ( - if x.hasAttachedPropertyWrapperType() - then hasAttachedPropertyWrapperType = "yes" - else hasAttachedPropertyWrapperType = "no" - ) and - (if x.hasParentPattern() then hasParentPattern = "yes" else hasParentPattern = "no") and - (if x.hasParentInitializer() then hasParentInitializer = "yes" else hasParentInitializer = "no") and - ( - if x.hasPropertyWrapperBackingVarBinding() - then hasPropertyWrapperBackingVarBinding = "yes" - else hasPropertyWrapperBackingVarBinding = "no" - ) and - ( - if x.hasPropertyWrapperBackingVar() - then hasPropertyWrapperBackingVar = "yes" - else hasPropertyWrapperBackingVar = "no" - ) and - ( - if x.hasPropertyWrapperProjectionVarBinding() - then hasPropertyWrapperProjectionVarBinding = "yes" - else hasPropertyWrapperProjectionVarBinding = "no" - ) and - ( - if x.hasPropertyWrapperProjectionVar() - then hasPropertyWrapperProjectionVar = "yes" - else hasPropertyWrapperProjectionVar = "no" - ) and + getIntroducerInt__label = "getIntroducerInt:" and getIntroducerInt = x.getIntroducerInt() -select x, "getModule:", getModule, "getNumberOfMembers:", getNumberOfMembers, "getInterfaceType:", - getInterfaceType, "getNumberOfAccessors:", getNumberOfAccessors, "getName:", getName, "getType:", - getType, "hasAttachedPropertyWrapperType:", hasAttachedPropertyWrapperType, "hasParentPattern:", - hasParentPattern, "hasParentInitializer:", hasParentInitializer, - "hasPropertyWrapperBackingVarBinding:", hasPropertyWrapperBackingVarBinding, - "hasPropertyWrapperBackingVar:", hasPropertyWrapperBackingVar, - "hasPropertyWrapperProjectionVarBinding:", hasPropertyWrapperProjectionVarBinding, - "hasPropertyWrapperProjectionVar:", hasPropertyWrapperProjectionVar, "getIntroducerInt:", - getIntroducerInt +} + +query predicate getMember(ConcreteVarDecl x, int index, Decl getMember) { + toBeTested(x) and not x.isUnknown() and getMember = x.getMember(index) +} + +query predicate getAccessor(ConcreteVarDecl x, int index, Accessor getAccessor) { + toBeTested(x) and not x.isUnknown() and getAccessor = x.getAccessor(index) +} + +query predicate getAttachedPropertyWrapperType( + ConcreteVarDecl x, Type getAttachedPropertyWrapperType +) { + toBeTested(x) and + not x.isUnknown() and + getAttachedPropertyWrapperType = x.getAttachedPropertyWrapperType() +} + +query predicate getParentPattern(ConcreteVarDecl x, Pattern getParentPattern) { + toBeTested(x) and not x.isUnknown() and getParentPattern = x.getParentPattern() +} + +query predicate getParentInitializer(ConcreteVarDecl x, Expr getParentInitializer) { + toBeTested(x) and not x.isUnknown() and getParentInitializer = x.getParentInitializer() +} + +query predicate getPropertyWrapperBackingVarBinding( + ConcreteVarDecl x, PatternBindingDecl getPropertyWrapperBackingVarBinding +) { + toBeTested(x) and + not x.isUnknown() and + getPropertyWrapperBackingVarBinding = x.getPropertyWrapperBackingVarBinding() +} + +query predicate getPropertyWrapperBackingVar(ConcreteVarDecl x, VarDecl getPropertyWrapperBackingVar) { + toBeTested(x) and + not x.isUnknown() and + getPropertyWrapperBackingVar = x.getPropertyWrapperBackingVar() +} + +query predicate getPropertyWrapperProjectionVarBinding( + ConcreteVarDecl x, PatternBindingDecl getPropertyWrapperProjectionVarBinding +) { + toBeTested(x) and + not x.isUnknown() and + getPropertyWrapperProjectionVarBinding = x.getPropertyWrapperProjectionVarBinding() +} + +query predicate getPropertyWrapperProjectionVar( + ConcreteVarDecl x, VarDecl getPropertyWrapperProjectionVar +) { + toBeTested(x) and + not x.isUnknown() and + getPropertyWrapperProjectionVar = x.getPropertyWrapperProjectionVar() +} diff --git a/swift/ql/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getAccessor.expected b/swift/ql/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getAccessor.expected deleted file mode 100644 index 956ca097bd1..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getAccessor.expected +++ /dev/null @@ -1,40 +0,0 @@ -| var_decls.swift:10:12:10:12 | numbers | 0 | var_decls.swift:10:12:10:12 | get | -| var_decls.swift:15:7:15:7 | wrappedValue | 0 | var_decls.swift:15:7:15:7 | get | -| var_decls.swift:15:7:15:7 | wrappedValue | 1 | var_decls.swift:15:7:15:7 | set | -| var_decls.swift:15:7:15:7 | wrappedValue | 2 | var_decls.swift:15:7:15:7 | _modify | -| var_decls.swift:20:7:20:7 | wrappedValue | 0 | var_decls.swift:20:7:20:7 | get | -| var_decls.swift:20:7:20:7 | wrappedValue | 1 | var_decls.swift:20:7:20:7 | set | -| var_decls.swift:20:7:20:7 | wrappedValue | 2 | var_decls.swift:20:7:20:7 | _modify | -| var_decls.swift:24:15:24:15 | _wrapped | 0 | var_decls.swift:24:15:24:15 | get | -| var_decls.swift:24:15:24:15 | _wrapped | 1 | var_decls.swift:24:15:24:15 | set | -| var_decls.swift:24:15:24:15 | _wrapped | 2 | var_decls.swift:24:15:24:15 | _modify | -| var_decls.swift:24:15:24:15 | wrapped | 0 | var_decls.swift:24:15:24:15 | get | -| var_decls.swift:24:15:24:15 | wrapped | 1 | var_decls.swift:24:15:24:15 | set | -| var_decls.swift:24:15:24:15 | wrapped | 2 | var_decls.swift:24:15:24:15 | _modify | -| var_decls.swift:28:7:28:7 | wrappedValue | 0 | var_decls.swift:28:7:28:7 | get | -| var_decls.swift:28:7:28:7 | wrappedValue | 1 | var_decls.swift:28:7:28:7 | set | -| var_decls.swift:28:7:28:7 | wrappedValue | 2 | var_decls.swift:28:7:28:7 | _modify | -| var_decls.swift:34:7:34:7 | wrappedValue | 0 | var_decls.swift:34:7:34:7 | get | -| var_decls.swift:34:7:34:7 | wrappedValue | 1 | var_decls.swift:34:7:34:7 | set | -| var_decls.swift:34:7:34:7 | wrappedValue | 2 | var_decls.swift:34:7:34:7 | _modify | -| var_decls.swift:35:7:35:7 | projectedValue | 0 | var_decls.swift:35:7:35:7 | get | -| var_decls.swift:35:7:35:7 | projectedValue | 1 | var_decls.swift:35:7:35:7 | set | -| var_decls.swift:35:7:35:7 | projectedValue | 2 | var_decls.swift:35:7:35:7 | _modify | -| var_decls.swift:39:7:39:7 | wrappedValue | 0 | var_decls.swift:39:7:39:7 | get | -| var_decls.swift:39:7:39:7 | wrappedValue | 1 | var_decls.swift:39:7:39:7 | set | -| var_decls.swift:39:7:39:7 | wrappedValue | 2 | var_decls.swift:39:7:39:7 | _modify | -| var_decls.swift:40:7:40:7 | projectedValue | 0 | var_decls.swift:40:7:40:7 | get | -| var_decls.swift:40:7:40:7 | projectedValue | 1 | var_decls.swift:40:7:40:7 | set | -| var_decls.swift:40:7:40:7 | projectedValue | 2 | var_decls.swift:40:7:40:7 | _modify | -| var_decls.swift:54:10:54:10 | w1 | 0 | var_decls.swift:54:10:54:10 | get | -| var_decls.swift:54:10:54:10 | w1 | 1 | var_decls.swift:54:10:54:10 | set | -| var_decls.swift:55:24:55:24 | w2 | 0 | var_decls.swift:55:24:55:24 | get | -| var_decls.swift:55:24:55:24 | w2 | 1 | var_decls.swift:55:24:55:24 | set | -| var_decls.swift:56:29:56:29 | $w3 | 0 | var_decls.swift:56:29:56:29 | get | -| var_decls.swift:56:29:56:29 | $w3 | 1 | var_decls.swift:56:29:56:29 | set | -| var_decls.swift:56:29:56:29 | w3 | 0 | var_decls.swift:56:29:56:29 | get | -| var_decls.swift:56:29:56:29 | w3 | 1 | var_decls.swift:56:29:56:29 | set | -| var_decls.swift:57:36:57:36 | $w4 | 0 | var_decls.swift:57:36:57:36 | get | -| var_decls.swift:57:36:57:36 | $w4 | 1 | var_decls.swift:57:36:57:36 | set | -| var_decls.swift:57:36:57:36 | w4 | 0 | var_decls.swift:57:36:57:36 | get | -| var_decls.swift:57:36:57:36 | w4 | 1 | var_decls.swift:57:36:57:36 | set | diff --git a/swift/ql/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getAccessor.ql b/swift/ql/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getAccessor.ql deleted file mode 100644 index d169f10c812..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getAccessor.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from ConcreteVarDecl x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAccessor(index) diff --git a/swift/ql/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getAttachedPropertyWrapperType.expected b/swift/ql/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getAttachedPropertyWrapperType.expected deleted file mode 100644 index 0212cc38f14..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getAttachedPropertyWrapperType.expected +++ /dev/null @@ -1,5 +0,0 @@ -| var_decls.swift:24:15:24:15 | wrapped | X | -| var_decls.swift:54:10:54:10 | w1 | X | -| var_decls.swift:55:24:55:24 | w2 | WrapperWithInit | -| var_decls.swift:56:29:56:29 | w3 | WrapperWithProjected | -| var_decls.swift:57:36:57:36 | w4 | WrapperWithProjectedAndInit | diff --git a/swift/ql/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getAttachedPropertyWrapperType.ql b/swift/ql/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getAttachedPropertyWrapperType.ql deleted file mode 100644 index ef8e58e6371..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getAttachedPropertyWrapperType.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from ConcreteVarDecl x -where toBeTested(x) and not x.isUnknown() -select x, x.getAttachedPropertyWrapperType() diff --git a/swift/ql/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getMember.expected b/swift/ql/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getMember.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/swift/ql/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getMember.ql b/swift/ql/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getMember.ql deleted file mode 100644 index e559cfeae78..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getMember.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from ConcreteVarDecl x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getMember(index) diff --git a/swift/ql/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getParentInitializer.expected b/swift/ql/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getParentInitializer.expected deleted file mode 100644 index 913adec2f2b..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getParentInitializer.expected +++ /dev/null @@ -1,14 +0,0 @@ -| var_decls.swift:2:12:2:12 | $i$generator | var_decls.swift:2:12:2:16 | call to makeIterator() | -| var_decls.swift:4:7:4:7 | i | var_decls.swift:4:11:4:11 | 0 | -| var_decls.swift:7:5:7:5 | numbers | var_decls.swift:7:15:7:18 | [...] | -| var_decls.swift:10:12:10:12 | numbers | var_decls.swift:10:22:10:35 | [...] | -| var_decls.swift:34:7:34:7 | wrappedValue | var_decls.swift:34:28:34:28 | 42 | -| var_decls.swift:35:7:35:7 | projectedValue | var_decls.swift:35:31:35:31 | false | -| var_decls.swift:54:10:54:10 | _w1 | var_decls.swift:54:4:54:15 | call to X.init(wrappedValue:) | -| var_decls.swift:54:10:54:10 | w1 | var_decls.swift:54:4:54:15 | call to X.init(wrappedValue:) | -| var_decls.swift:55:24:55:24 | _w2 | var_decls.swift:55:4:55:29 | call to WrapperWithInit.init(wrappedValue:) | -| var_decls.swift:55:24:55:24 | w2 | var_decls.swift:55:4:55:29 | call to WrapperWithInit.init(wrappedValue:) | -| var_decls.swift:56:29:56:29 | _w3 | var_decls.swift:56:4:56:34 | call to WrapperWithProjected.init(wrappedValue:projectedValue:) | -| var_decls.swift:56:29:56:29 | w3 | var_decls.swift:56:4:56:34 | call to WrapperWithProjected.init(wrappedValue:projectedValue:) | -| var_decls.swift:57:36:57:36 | _w4 | var_decls.swift:57:4:57:41 | call to WrapperWithProjectedAndInit.init(wrappedValue:) | -| var_decls.swift:57:36:57:36 | w4 | var_decls.swift:57:4:57:41 | call to WrapperWithProjectedAndInit.init(wrappedValue:) | diff --git a/swift/ql/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getParentInitializer.ql b/swift/ql/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getParentInitializer.ql deleted file mode 100644 index cc09f9a38af..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getParentInitializer.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from ConcreteVarDecl x -where toBeTested(x) and not x.isUnknown() -select x, x.getParentInitializer() diff --git a/swift/ql/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getParentPattern.expected b/swift/ql/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getParentPattern.expected deleted file mode 100644 index e59322e36c1..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getParentPattern.expected +++ /dev/null @@ -1,26 +0,0 @@ -| var_decls.swift:2:7:2:7 | i | var_decls.swift:2:7:2:7 | i | -| var_decls.swift:2:12:2:12 | $i$generator | var_decls.swift:2:12:2:12 | $i$generator | -| var_decls.swift:4:7:4:7 | i | var_decls.swift:4:7:4:7 | i | -| var_decls.swift:7:5:7:5 | numbers | var_decls.swift:7:5:7:5 | numbers | -| var_decls.swift:10:12:10:12 | numbers | var_decls.swift:10:12:10:12 | numbers | -| var_decls.swift:15:7:15:7 | wrappedValue | var_decls.swift:15:7:15:21 | ... as ... | -| var_decls.swift:20:7:20:7 | wrappedValue | var_decls.swift:20:7:20:21 | ... as ... | -| var_decls.swift:24:15:24:15 | _wrapped | var_decls.swift:24:15:24:15 | ... as ... | -| var_decls.swift:24:15:24:15 | wrapped | var_decls.swift:24:15:24:25 | ... as ... | -| var_decls.swift:28:7:28:7 | wrappedValue | var_decls.swift:28:7:28:22 | ... as ... | -| var_decls.swift:34:7:34:7 | wrappedValue | var_decls.swift:34:7:34:22 | ... as ... | -| var_decls.swift:35:7:35:7 | projectedValue | var_decls.swift:35:7:35:24 | ... as ... | -| var_decls.swift:39:7:39:7 | wrappedValue | var_decls.swift:39:7:39:22 | ... as ... | -| var_decls.swift:40:7:40:7 | projectedValue | var_decls.swift:40:7:40:24 | ... as ... | -| var_decls.swift:54:10:54:10 | _w1 | var_decls.swift:54:10:54:10 | ... as ... | -| var_decls.swift:54:10:54:10 | w1 | var_decls.swift:54:10:54:10 | w1 | -| var_decls.swift:55:24:55:24 | _w2 | var_decls.swift:55:24:55:24 | ... as ... | -| var_decls.swift:55:24:55:24 | w2 | var_decls.swift:55:24:55:24 | w2 | -| var_decls.swift:56:29:56:29 | $w3 | var_decls.swift:56:29:56:29 | ... as ... | -| var_decls.swift:56:29:56:29 | _w3 | var_decls.swift:56:29:56:29 | ... as ... | -| var_decls.swift:56:29:56:29 | w3 | var_decls.swift:56:29:56:29 | w3 | -| var_decls.swift:57:36:57:36 | $w4 | var_decls.swift:57:36:57:36 | ... as ... | -| var_decls.swift:57:36:57:36 | _w4 | var_decls.swift:57:36:57:36 | ... as ... | -| var_decls.swift:57:36:57:36 | w4 | var_decls.swift:57:36:57:36 | w4 | -| var_decls.swift:65:19:65:19 | case_variable | var_decls.swift:65:8:65:35 | .value(...) | -| var_decls.swift:67:22:67:22 | unused_case_variable | var_decls.swift:67:8:67:42 | .value(...) | diff --git a/swift/ql/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getParentPattern.ql b/swift/ql/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getParentPattern.ql deleted file mode 100644 index 2fb533a5a69..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getParentPattern.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from ConcreteVarDecl x -where toBeTested(x) and not x.isUnknown() -select x, x.getParentPattern() diff --git a/swift/ql/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getPropertyWrapperBackingVar.expected b/swift/ql/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getPropertyWrapperBackingVar.expected deleted file mode 100644 index b32567e0cbb..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getPropertyWrapperBackingVar.expected +++ /dev/null @@ -1,5 +0,0 @@ -| var_decls.swift:24:15:24:15 | wrapped | var_decls.swift:24:15:24:15 | _wrapped | -| var_decls.swift:54:10:54:10 | w1 | var_decls.swift:54:10:54:10 | _w1 | -| var_decls.swift:55:24:55:24 | w2 | var_decls.swift:55:24:55:24 | _w2 | -| var_decls.swift:56:29:56:29 | w3 | var_decls.swift:56:29:56:29 | _w3 | -| var_decls.swift:57:36:57:36 | w4 | var_decls.swift:57:36:57:36 | _w4 | diff --git a/swift/ql/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getPropertyWrapperBackingVar.ql b/swift/ql/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getPropertyWrapperBackingVar.ql deleted file mode 100644 index b57a2cd02b7..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getPropertyWrapperBackingVar.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from ConcreteVarDecl x -where toBeTested(x) and not x.isUnknown() -select x, x.getPropertyWrapperBackingVar() diff --git a/swift/ql/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getPropertyWrapperBackingVarBinding.expected b/swift/ql/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getPropertyWrapperBackingVarBinding.expected deleted file mode 100644 index d6069ccf602..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getPropertyWrapperBackingVarBinding.expected +++ /dev/null @@ -1,5 +0,0 @@ -| var_decls.swift:24:15:24:15 | wrapped | file://:0:0:0:0 | var ... = ... | -| var_decls.swift:54:10:54:10 | w1 | file://:0:0:0:0 | var ... = ... | -| var_decls.swift:55:24:55:24 | w2 | file://:0:0:0:0 | var ... = ... | -| var_decls.swift:56:29:56:29 | w3 | file://:0:0:0:0 | var ... = ... | -| var_decls.swift:57:36:57:36 | w4 | file://:0:0:0:0 | var ... = ... | diff --git a/swift/ql/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getPropertyWrapperBackingVarBinding.ql b/swift/ql/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getPropertyWrapperBackingVarBinding.ql deleted file mode 100644 index 27d1215c98a..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getPropertyWrapperBackingVarBinding.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from ConcreteVarDecl x -where toBeTested(x) and not x.isUnknown() -select x, x.getPropertyWrapperBackingVarBinding() diff --git a/swift/ql/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getPropertyWrapperProjectionVar.expected b/swift/ql/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getPropertyWrapperProjectionVar.expected deleted file mode 100644 index 720938bab9b..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getPropertyWrapperProjectionVar.expected +++ /dev/null @@ -1,2 +0,0 @@ -| var_decls.swift:56:29:56:29 | w3 | var_decls.swift:56:29:56:29 | $w3 | -| var_decls.swift:57:36:57:36 | w4 | var_decls.swift:57:36:57:36 | $w4 | diff --git a/swift/ql/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getPropertyWrapperProjectionVar.ql b/swift/ql/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getPropertyWrapperProjectionVar.ql deleted file mode 100644 index 6376fc809b5..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getPropertyWrapperProjectionVar.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from ConcreteVarDecl x -where toBeTested(x) and not x.isUnknown() -select x, x.getPropertyWrapperProjectionVar() diff --git a/swift/ql/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getPropertyWrapperProjectionVarBinding.expected b/swift/ql/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getPropertyWrapperProjectionVarBinding.expected deleted file mode 100644 index cb47a922746..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getPropertyWrapperProjectionVarBinding.expected +++ /dev/null @@ -1,2 +0,0 @@ -| var_decls.swift:56:29:56:29 | w3 | file://:0:0:0:0 | var ... = ... | -| var_decls.swift:57:36:57:36 | w4 | file://:0:0:0:0 | var ... = ... | diff --git a/swift/ql/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getPropertyWrapperProjectionVarBinding.ql b/swift/ql/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getPropertyWrapperProjectionVarBinding.ql deleted file mode 100644 index 7e513c831a7..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getPropertyWrapperProjectionVarBinding.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from ConcreteVarDecl x -where toBeTested(x) and not x.isUnknown() -select x, x.getPropertyWrapperProjectionVarBinding() diff --git a/swift/ql/test/extractor-tests/generated/decl/EnumDecl/EnumCaseDecl.expected b/swift/ql/test/extractor-tests/generated/decl/EnumDecl/EnumCaseDecl.expected index 754ef2c4f19..b6e400b30fa 100644 --- a/swift/ql/test/extractor-tests/generated/decl/EnumDecl/EnumCaseDecl.expected +++ b/swift/ql/test/extractor-tests/generated/decl/EnumDecl/EnumCaseDecl.expected @@ -1,12 +1,33 @@ -| enums.swift:2:5:2:18 | case ... | getModule: | file://:0:0:0:0 | enums | getNumberOfMembers: | 0 | getNumberOfElements: | 2 | -| enums.swift:3:5:3:26 | case ... | getModule: | file://:0:0:0:0 | enums | getNumberOfMembers: | 0 | getNumberOfElements: | 3 | -| enums.swift:8:5:8:18 | case ... | getModule: | file://:0:0:0:0 | enums | getNumberOfMembers: | 0 | getNumberOfElements: | 2 | -| enums.swift:9:5:9:26 | case ... | getModule: | file://:0:0:0:0 | enums | getNumberOfMembers: | 0 | getNumberOfElements: | 3 | -| enums.swift:13:5:13:22 | case ... | getModule: | file://:0:0:0:0 | enums | getNumberOfMembers: | 0 | getNumberOfElements: | 1 | -| enums.swift:14:5:14:21 | case ... | getModule: | file://:0:0:0:0 | enums | getNumberOfMembers: | 0 | getNumberOfElements: | 1 | -| enums.swift:15:5:15:35 | case ... | getModule: | file://:0:0:0:0 | enums | getNumberOfMembers: | 0 | getNumberOfElements: | 1 | -| enums.swift:19:5:19:10 | case ... | getModule: | file://:0:0:0:0 | enums | getNumberOfMembers: | 0 | getNumberOfElements: | 1 | -| enums.swift:20:5:20:16 | case ... | getModule: | file://:0:0:0:0 | enums | getNumberOfMembers: | 0 | getNumberOfElements: | 1 | -| enums.swift:24:5:24:25 | case ... | getModule: | file://:0:0:0:0 | enums | getNumberOfMembers: | 0 | getNumberOfElements: | 1 | -| enums.swift:25:5:25:24 | case ... | getModule: | file://:0:0:0:0 | enums | getNumberOfMembers: | 0 | getNumberOfElements: | 1 | -| enums.swift:26:5:26:44 | case ... | getModule: | file://:0:0:0:0 | enums | getNumberOfMembers: | 0 | getNumberOfElements: | 1 | +instances +| enums.swift:2:5:2:18 | case ... | getModule: | file://:0:0:0:0 | enums | +| enums.swift:3:5:3:26 | case ... | getModule: | file://:0:0:0:0 | enums | +| enums.swift:8:5:8:18 | case ... | getModule: | file://:0:0:0:0 | enums | +| enums.swift:9:5:9:26 | case ... | getModule: | file://:0:0:0:0 | enums | +| enums.swift:13:5:13:22 | case ... | getModule: | file://:0:0:0:0 | enums | +| enums.swift:14:5:14:21 | case ... | getModule: | file://:0:0:0:0 | enums | +| enums.swift:15:5:15:35 | case ... | getModule: | file://:0:0:0:0 | enums | +| enums.swift:19:5:19:10 | case ... | getModule: | file://:0:0:0:0 | enums | +| enums.swift:20:5:20:16 | case ... | getModule: | file://:0:0:0:0 | enums | +| enums.swift:24:5:24:25 | case ... | getModule: | file://:0:0:0:0 | enums | +| enums.swift:25:5:25:24 | case ... | getModule: | file://:0:0:0:0 | enums | +| enums.swift:26:5:26:44 | case ... | getModule: | file://:0:0:0:0 | enums | +getMember +getElement +| enums.swift:2:5:2:18 | case ... | 0 | enums.swift:2:10:2:10 | value1 | +| enums.swift:2:5:2:18 | case ... | 1 | enums.swift:2:18:2:18 | value2 | +| enums.swift:3:5:3:26 | case ... | 0 | enums.swift:3:10:3:10 | value3 | +| enums.swift:3:5:3:26 | case ... | 1 | enums.swift:3:18:3:18 | value4 | +| enums.swift:3:5:3:26 | case ... | 2 | enums.swift:3:26:3:26 | value5 | +| enums.swift:8:5:8:18 | case ... | 0 | enums.swift:8:10:8:10 | value1 | +| enums.swift:8:5:8:18 | case ... | 1 | enums.swift:8:18:8:18 | value2 | +| enums.swift:9:5:9:26 | case ... | 0 | enums.swift:9:10:9:10 | value3 | +| enums.swift:9:5:9:26 | case ... | 1 | enums.swift:9:18:9:18 | value4 | +| enums.swift:9:5:9:26 | case ... | 2 | enums.swift:9:26:9:26 | value5 | +| enums.swift:13:5:13:22 | case ... | 0 | enums.swift:13:10:13:22 | nodata1 | +| enums.swift:14:5:14:21 | case ... | 0 | enums.swift:14:10:14:21 | intdata | +| enums.swift:15:5:15:35 | case ... | 0 | enums.swift:15:10:15:35 | tuple | +| enums.swift:19:5:19:10 | case ... | 0 | enums.swift:19:10:19:10 | none | +| enums.swift:20:5:20:16 | case ... | 0 | enums.swift:20:10:20:16 | some | +| enums.swift:24:5:24:25 | case ... | 0 | enums.swift:24:10:24:25 | nodata1 | +| enums.swift:25:5:25:24 | case ... | 0 | enums.swift:25:10:25:24 | intdata | +| enums.swift:26:5:26:44 | case ... | 0 | enums.swift:26:10:26:44 | tuple | diff --git a/swift/ql/test/extractor-tests/generated/decl/EnumDecl/EnumCaseDecl.ql b/swift/ql/test/extractor-tests/generated/decl/EnumDecl/EnumCaseDecl.ql index b0cf267f645..fffe694415c 100644 --- a/swift/ql/test/extractor-tests/generated/decl/EnumDecl/EnumCaseDecl.ql +++ b/swift/ql/test/extractor-tests/generated/decl/EnumDecl/EnumCaseDecl.ql @@ -2,12 +2,17 @@ import codeql.swift.elements import TestUtils -from EnumCaseDecl x, ModuleDecl getModule, int getNumberOfMembers, int getNumberOfElements -where +query predicate instances(EnumCaseDecl x, string getModule__label, ModuleDecl getModule) { toBeTested(x) and not x.isUnknown() and - getModule = x.getModule() and - getNumberOfMembers = x.getNumberOfMembers() and - getNumberOfElements = x.getNumberOfElements() -select x, "getModule:", getModule, "getNumberOfMembers:", getNumberOfMembers, - "getNumberOfElements:", getNumberOfElements + getModule__label = "getModule:" and + getModule = x.getModule() +} + +query predicate getMember(EnumCaseDecl x, int index, Decl getMember) { + toBeTested(x) and not x.isUnknown() and getMember = x.getMember(index) +} + +query predicate getElement(EnumCaseDecl x, int index, EnumElementDecl getElement) { + toBeTested(x) and not x.isUnknown() and getElement = x.getElement(index) +} diff --git a/swift/ql/test/extractor-tests/generated/decl/EnumDecl/EnumCaseDecl_getElement.expected b/swift/ql/test/extractor-tests/generated/decl/EnumDecl/EnumCaseDecl_getElement.expected deleted file mode 100644 index d5082606f66..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/EnumDecl/EnumCaseDecl_getElement.expected +++ /dev/null @@ -1,18 +0,0 @@ -| enums.swift:2:5:2:18 | case ... | 0 | enums.swift:2:10:2:10 | value1 | -| enums.swift:2:5:2:18 | case ... | 1 | enums.swift:2:18:2:18 | value2 | -| enums.swift:3:5:3:26 | case ... | 0 | enums.swift:3:10:3:10 | value3 | -| enums.swift:3:5:3:26 | case ... | 1 | enums.swift:3:18:3:18 | value4 | -| enums.swift:3:5:3:26 | case ... | 2 | enums.swift:3:26:3:26 | value5 | -| enums.swift:8:5:8:18 | case ... | 0 | enums.swift:8:10:8:10 | value1 | -| enums.swift:8:5:8:18 | case ... | 1 | enums.swift:8:18:8:18 | value2 | -| enums.swift:9:5:9:26 | case ... | 0 | enums.swift:9:10:9:10 | value3 | -| enums.swift:9:5:9:26 | case ... | 1 | enums.swift:9:18:9:18 | value4 | -| enums.swift:9:5:9:26 | case ... | 2 | enums.swift:9:26:9:26 | value5 | -| enums.swift:13:5:13:22 | case ... | 0 | enums.swift:13:10:13:22 | nodata1 | -| enums.swift:14:5:14:21 | case ... | 0 | enums.swift:14:10:14:21 | intdata | -| enums.swift:15:5:15:35 | case ... | 0 | enums.swift:15:10:15:35 | tuple | -| enums.swift:19:5:19:10 | case ... | 0 | enums.swift:19:10:19:10 | none | -| enums.swift:20:5:20:16 | case ... | 0 | enums.swift:20:10:20:16 | some | -| enums.swift:24:5:24:25 | case ... | 0 | enums.swift:24:10:24:25 | nodata1 | -| enums.swift:25:5:25:24 | case ... | 0 | enums.swift:25:10:25:24 | intdata | -| enums.swift:26:5:26:44 | case ... | 0 | enums.swift:26:10:26:44 | tuple | diff --git a/swift/ql/test/extractor-tests/generated/decl/EnumDecl/EnumCaseDecl_getElement.ql b/swift/ql/test/extractor-tests/generated/decl/EnumDecl/EnumCaseDecl_getElement.ql deleted file mode 100644 index bbc22666cc0..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/EnumDecl/EnumCaseDecl_getElement.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from EnumCaseDecl x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getElement(index) diff --git a/swift/ql/test/extractor-tests/generated/decl/EnumDecl/EnumCaseDecl_getMember.expected b/swift/ql/test/extractor-tests/generated/decl/EnumDecl/EnumCaseDecl_getMember.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/swift/ql/test/extractor-tests/generated/decl/EnumDecl/EnumCaseDecl_getMember.ql b/swift/ql/test/extractor-tests/generated/decl/EnumDecl/EnumCaseDecl_getMember.ql deleted file mode 100644 index 630e99f9f57..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/EnumDecl/EnumCaseDecl_getMember.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from EnumCaseDecl x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getMember(index) diff --git a/swift/ql/test/extractor-tests/generated/decl/EnumDecl/EnumDecl.expected b/swift/ql/test/extractor-tests/generated/decl/EnumDecl/EnumDecl.expected index 694cf7d1035..06c1789b3bc 100644 --- a/swift/ql/test/extractor-tests/generated/decl/EnumDecl/EnumDecl.expected +++ b/swift/ql/test/extractor-tests/generated/decl/EnumDecl/EnumDecl.expected @@ -1,5 +1,49 @@ -| enums.swift:1:1:4:1 | EnumValues | getNumberOfGenericTypeParams: | 0 | getModule: | file://:0:0:0:0 | enums | getNumberOfMembers: | 11 | getInterfaceType: | EnumValues.Type | getName: | EnumValues | getNumberOfInheritedTypes: | 0 | getType: | EnumValues | -| enums.swift:7:1:10:1 | EnumValuesWithBase | getNumberOfGenericTypeParams: | 0 | getModule: | file://:0:0:0:0 | enums | getNumberOfMembers: | 11 | getInterfaceType: | EnumValuesWithBase.Type | getName: | EnumValuesWithBase | getNumberOfInheritedTypes: | 1 | getType: | EnumValuesWithBase | -| enums.swift:12:1:16:1 | EnumWithParams | getNumberOfGenericTypeParams: | 0 | getModule: | file://:0:0:0:0 | enums | getNumberOfMembers: | 6 | getInterfaceType: | EnumWithParams.Type | getName: | EnumWithParams | getNumberOfInheritedTypes: | 0 | getType: | EnumWithParams | -| enums.swift:18:1:21:1 | GenericEnum | getNumberOfGenericTypeParams: | 1 | getModule: | file://:0:0:0:0 | enums | getNumberOfMembers: | 4 | getInterfaceType: | GenericEnum.Type | getName: | GenericEnum | getNumberOfInheritedTypes: | 0 | getType: | GenericEnum | -| enums.swift:23:1:27:1 | EnumWithNamedParams | getNumberOfGenericTypeParams: | 0 | getModule: | file://:0:0:0:0 | enums | getNumberOfMembers: | 6 | getInterfaceType: | EnumWithNamedParams.Type | getName: | EnumWithNamedParams | getNumberOfInheritedTypes: | 0 | getType: | EnumWithNamedParams | +instances +| enums.swift:1:1:4:1 | EnumValues | getModule: | file://:0:0:0:0 | enums | getInterfaceType: | EnumValues.Type | getName: | EnumValues | getType: | EnumValues | +| enums.swift:7:1:10:1 | EnumValuesWithBase | getModule: | file://:0:0:0:0 | enums | getInterfaceType: | EnumValuesWithBase.Type | getName: | EnumValuesWithBase | getType: | EnumValuesWithBase | +| enums.swift:12:1:16:1 | EnumWithParams | getModule: | file://:0:0:0:0 | enums | getInterfaceType: | EnumWithParams.Type | getName: | EnumWithParams | getType: | EnumWithParams | +| enums.swift:18:1:21:1 | GenericEnum | getModule: | file://:0:0:0:0 | enums | getInterfaceType: | GenericEnum.Type | getName: | GenericEnum | getType: | GenericEnum | +| enums.swift:23:1:27:1 | EnumWithNamedParams | getModule: | file://:0:0:0:0 | enums | getInterfaceType: | EnumWithNamedParams.Type | getName: | EnumWithNamedParams | getType: | EnumWithNamedParams | +getGenericTypeParam +| enums.swift:18:1:21:1 | GenericEnum | 0 | enums.swift:18:18:18:18 | T | +getMember +| enums.swift:1:1:4:1 | EnumValues | 0 | enums.swift:2:5:2:18 | case ... | +| enums.swift:1:1:4:1 | EnumValues | 1 | enums.swift:2:10:2:10 | value1 | +| enums.swift:1:1:4:1 | EnumValues | 2 | enums.swift:2:18:2:18 | value2 | +| enums.swift:1:1:4:1 | EnumValues | 3 | enums.swift:3:5:3:26 | case ... | +| enums.swift:1:1:4:1 | EnumValues | 4 | enums.swift:3:10:3:10 | value3 | +| enums.swift:1:1:4:1 | EnumValues | 5 | enums.swift:3:18:3:18 | value4 | +| enums.swift:1:1:4:1 | EnumValues | 6 | enums.swift:3:26:3:26 | value5 | +| enums.swift:1:1:4:1 | EnumValues | 7 | file://:0:0:0:0 | __derived_enum_equals(_:_:) | +| enums.swift:1:1:4:1 | EnumValues | 8 | file://:0:0:0:0 | hashValue | +| enums.swift:1:1:4:1 | EnumValues | 9 | file://:0:0:0:0 | var ... = ... | +| enums.swift:1:1:4:1 | EnumValues | 10 | file://:0:0:0:0 | hash(into:) | +| enums.swift:7:1:10:1 | EnumValuesWithBase | 0 | enums.swift:8:5:8:18 | case ... | +| enums.swift:7:1:10:1 | EnumValuesWithBase | 1 | enums.swift:8:10:8:10 | value1 | +| enums.swift:7:1:10:1 | EnumValuesWithBase | 2 | enums.swift:8:18:8:18 | value2 | +| enums.swift:7:1:10:1 | EnumValuesWithBase | 3 | enums.swift:9:5:9:26 | case ... | +| enums.swift:7:1:10:1 | EnumValuesWithBase | 4 | enums.swift:9:10:9:10 | value3 | +| enums.swift:7:1:10:1 | EnumValuesWithBase | 5 | enums.swift:9:18:9:18 | value4 | +| enums.swift:7:1:10:1 | EnumValuesWithBase | 6 | enums.swift:9:26:9:26 | value5 | +| enums.swift:7:1:10:1 | EnumValuesWithBase | 7 | file://:0:0:0:0 | RawValue | +| enums.swift:7:1:10:1 | EnumValuesWithBase | 8 | file://:0:0:0:0 | EnumValuesWithBase.init(rawValue:) | +| enums.swift:7:1:10:1 | EnumValuesWithBase | 9 | file://:0:0:0:0 | rawValue | +| enums.swift:7:1:10:1 | EnumValuesWithBase | 10 | file://:0:0:0:0 | var ... = ... | +| enums.swift:12:1:16:1 | EnumWithParams | 0 | enums.swift:13:5:13:22 | case ... | +| enums.swift:12:1:16:1 | EnumWithParams | 1 | enums.swift:13:10:13:22 | nodata1 | +| enums.swift:12:1:16:1 | EnumWithParams | 2 | enums.swift:14:5:14:21 | case ... | +| enums.swift:12:1:16:1 | EnumWithParams | 3 | enums.swift:14:10:14:21 | intdata | +| enums.swift:12:1:16:1 | EnumWithParams | 4 | enums.swift:15:5:15:35 | case ... | +| enums.swift:12:1:16:1 | EnumWithParams | 5 | enums.swift:15:10:15:35 | tuple | +| enums.swift:18:1:21:1 | GenericEnum | 0 | enums.swift:19:5:19:10 | case ... | +| enums.swift:18:1:21:1 | GenericEnum | 1 | enums.swift:19:10:19:10 | none | +| enums.swift:18:1:21:1 | GenericEnum | 2 | enums.swift:20:5:20:16 | case ... | +| enums.swift:18:1:21:1 | GenericEnum | 3 | enums.swift:20:10:20:16 | some | +| enums.swift:23:1:27:1 | EnumWithNamedParams | 0 | enums.swift:24:5:24:25 | case ... | +| enums.swift:23:1:27:1 | EnumWithNamedParams | 1 | enums.swift:24:10:24:25 | nodata1 | +| enums.swift:23:1:27:1 | EnumWithNamedParams | 2 | enums.swift:25:5:25:24 | case ... | +| enums.swift:23:1:27:1 | EnumWithNamedParams | 3 | enums.swift:25:10:25:24 | intdata | +| enums.swift:23:1:27:1 | EnumWithNamedParams | 4 | enums.swift:26:5:26:44 | case ... | +| enums.swift:23:1:27:1 | EnumWithNamedParams | 5 | enums.swift:26:10:26:44 | tuple | +getInheritedType +| enums.swift:7:1:10:1 | EnumValuesWithBase | 0 | Double | diff --git a/swift/ql/test/extractor-tests/generated/decl/EnumDecl/EnumDecl.ql b/swift/ql/test/extractor-tests/generated/decl/EnumDecl/EnumDecl.ql index 5a8d80276ef..dabf9078cea 100644 --- a/swift/ql/test/extractor-tests/generated/decl/EnumDecl/EnumDecl.ql +++ b/swift/ql/test/extractor-tests/generated/decl/EnumDecl/EnumDecl.ql @@ -2,19 +2,30 @@ import codeql.swift.elements import TestUtils -from - EnumDecl x, int getNumberOfGenericTypeParams, ModuleDecl getModule, int getNumberOfMembers, - Type getInterfaceType, string getName, int getNumberOfInheritedTypes, Type getType -where +query predicate instances( + EnumDecl x, string getModule__label, ModuleDecl getModule, string getInterfaceType__label, + Type getInterfaceType, string getName__label, string getName, string getType__label, Type getType +) { toBeTested(x) and not x.isUnknown() and - getNumberOfGenericTypeParams = x.getNumberOfGenericTypeParams() and + getModule__label = "getModule:" and getModule = x.getModule() and - getNumberOfMembers = x.getNumberOfMembers() and + getInterfaceType__label = "getInterfaceType:" and getInterfaceType = x.getInterfaceType() and + getName__label = "getName:" and getName = x.getName() and - getNumberOfInheritedTypes = x.getNumberOfInheritedTypes() and + getType__label = "getType:" and getType = x.getType() -select x, "getNumberOfGenericTypeParams:", getNumberOfGenericTypeParams, "getModule:", getModule, - "getNumberOfMembers:", getNumberOfMembers, "getInterfaceType:", getInterfaceType, "getName:", - getName, "getNumberOfInheritedTypes:", getNumberOfInheritedTypes, "getType:", getType +} + +query predicate getGenericTypeParam(EnumDecl x, int index, GenericTypeParamDecl getGenericTypeParam) { + toBeTested(x) and not x.isUnknown() and getGenericTypeParam = x.getGenericTypeParam(index) +} + +query predicate getMember(EnumDecl x, int index, Decl getMember) { + toBeTested(x) and not x.isUnknown() and getMember = x.getMember(index) +} + +query predicate getInheritedType(EnumDecl x, int index, Type getInheritedType) { + toBeTested(x) and not x.isUnknown() and getInheritedType = x.getInheritedType(index) +} diff --git a/swift/ql/test/extractor-tests/generated/decl/EnumDecl/EnumDecl_getGenericTypeParam.expected b/swift/ql/test/extractor-tests/generated/decl/EnumDecl/EnumDecl_getGenericTypeParam.expected deleted file mode 100644 index 47a6b335d76..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/EnumDecl/EnumDecl_getGenericTypeParam.expected +++ /dev/null @@ -1 +0,0 @@ -| enums.swift:18:1:21:1 | GenericEnum | 0 | enums.swift:18:18:18:18 | T | diff --git a/swift/ql/test/extractor-tests/generated/decl/EnumDecl/EnumDecl_getGenericTypeParam.ql b/swift/ql/test/extractor-tests/generated/decl/EnumDecl/EnumDecl_getGenericTypeParam.ql deleted file mode 100644 index 02d75edf7b3..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/EnumDecl/EnumDecl_getGenericTypeParam.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from EnumDecl x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getGenericTypeParam(index) diff --git a/swift/ql/test/extractor-tests/generated/decl/EnumDecl/EnumDecl_getInheritedType.expected b/swift/ql/test/extractor-tests/generated/decl/EnumDecl/EnumDecl_getInheritedType.expected deleted file mode 100644 index 764f6f21697..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/EnumDecl/EnumDecl_getInheritedType.expected +++ /dev/null @@ -1 +0,0 @@ -| enums.swift:7:1:10:1 | EnumValuesWithBase | 0 | Double | diff --git a/swift/ql/test/extractor-tests/generated/decl/EnumDecl/EnumDecl_getInheritedType.ql b/swift/ql/test/extractor-tests/generated/decl/EnumDecl/EnumDecl_getInheritedType.ql deleted file mode 100644 index 2ea47f737f8..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/EnumDecl/EnumDecl_getInheritedType.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from EnumDecl x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getInheritedType(index) diff --git a/swift/ql/test/extractor-tests/generated/decl/EnumDecl/EnumDecl_getMember.expected b/swift/ql/test/extractor-tests/generated/decl/EnumDecl/EnumDecl_getMember.expected deleted file mode 100644 index 8d4ba0c5e72..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/EnumDecl/EnumDecl_getMember.expected +++ /dev/null @@ -1,38 +0,0 @@ -| enums.swift:1:1:4:1 | EnumValues | 0 | enums.swift:2:5:2:18 | case ... | -| enums.swift:1:1:4:1 | EnumValues | 1 | enums.swift:2:10:2:10 | value1 | -| enums.swift:1:1:4:1 | EnumValues | 2 | enums.swift:2:18:2:18 | value2 | -| enums.swift:1:1:4:1 | EnumValues | 3 | enums.swift:3:5:3:26 | case ... | -| enums.swift:1:1:4:1 | EnumValues | 4 | enums.swift:3:10:3:10 | value3 | -| enums.swift:1:1:4:1 | EnumValues | 5 | enums.swift:3:18:3:18 | value4 | -| enums.swift:1:1:4:1 | EnumValues | 6 | enums.swift:3:26:3:26 | value5 | -| enums.swift:1:1:4:1 | EnumValues | 7 | file://:0:0:0:0 | __derived_enum_equals(_:_:) | -| enums.swift:1:1:4:1 | EnumValues | 8 | file://:0:0:0:0 | hashValue | -| enums.swift:1:1:4:1 | EnumValues | 9 | file://:0:0:0:0 | var ... = ... | -| enums.swift:1:1:4:1 | EnumValues | 10 | file://:0:0:0:0 | hash(into:) | -| enums.swift:7:1:10:1 | EnumValuesWithBase | 0 | enums.swift:8:5:8:18 | case ... | -| enums.swift:7:1:10:1 | EnumValuesWithBase | 1 | enums.swift:8:10:8:10 | value1 | -| enums.swift:7:1:10:1 | EnumValuesWithBase | 2 | enums.swift:8:18:8:18 | value2 | -| enums.swift:7:1:10:1 | EnumValuesWithBase | 3 | enums.swift:9:5:9:26 | case ... | -| enums.swift:7:1:10:1 | EnumValuesWithBase | 4 | enums.swift:9:10:9:10 | value3 | -| enums.swift:7:1:10:1 | EnumValuesWithBase | 5 | enums.swift:9:18:9:18 | value4 | -| enums.swift:7:1:10:1 | EnumValuesWithBase | 6 | enums.swift:9:26:9:26 | value5 | -| enums.swift:7:1:10:1 | EnumValuesWithBase | 7 | file://:0:0:0:0 | RawValue | -| enums.swift:7:1:10:1 | EnumValuesWithBase | 8 | file://:0:0:0:0 | EnumValuesWithBase.init(rawValue:) | -| enums.swift:7:1:10:1 | EnumValuesWithBase | 9 | file://:0:0:0:0 | rawValue | -| enums.swift:7:1:10:1 | EnumValuesWithBase | 10 | file://:0:0:0:0 | var ... = ... | -| enums.swift:12:1:16:1 | EnumWithParams | 0 | enums.swift:13:5:13:22 | case ... | -| enums.swift:12:1:16:1 | EnumWithParams | 1 | enums.swift:13:10:13:22 | nodata1 | -| enums.swift:12:1:16:1 | EnumWithParams | 2 | enums.swift:14:5:14:21 | case ... | -| enums.swift:12:1:16:1 | EnumWithParams | 3 | enums.swift:14:10:14:21 | intdata | -| enums.swift:12:1:16:1 | EnumWithParams | 4 | enums.swift:15:5:15:35 | case ... | -| enums.swift:12:1:16:1 | EnumWithParams | 5 | enums.swift:15:10:15:35 | tuple | -| enums.swift:18:1:21:1 | GenericEnum | 0 | enums.swift:19:5:19:10 | case ... | -| enums.swift:18:1:21:1 | GenericEnum | 1 | enums.swift:19:10:19:10 | none | -| enums.swift:18:1:21:1 | GenericEnum | 2 | enums.swift:20:5:20:16 | case ... | -| enums.swift:18:1:21:1 | GenericEnum | 3 | enums.swift:20:10:20:16 | some | -| enums.swift:23:1:27:1 | EnumWithNamedParams | 0 | enums.swift:24:5:24:25 | case ... | -| enums.swift:23:1:27:1 | EnumWithNamedParams | 1 | enums.swift:24:10:24:25 | nodata1 | -| enums.swift:23:1:27:1 | EnumWithNamedParams | 2 | enums.swift:25:5:25:24 | case ... | -| enums.swift:23:1:27:1 | EnumWithNamedParams | 3 | enums.swift:25:10:25:24 | intdata | -| enums.swift:23:1:27:1 | EnumWithNamedParams | 4 | enums.swift:26:5:26:44 | case ... | -| enums.swift:23:1:27:1 | EnumWithNamedParams | 5 | enums.swift:26:10:26:44 | tuple | diff --git a/swift/ql/test/extractor-tests/generated/decl/EnumDecl/EnumDecl_getMember.ql b/swift/ql/test/extractor-tests/generated/decl/EnumDecl/EnumDecl_getMember.ql deleted file mode 100644 index 28b99b8dc96..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/EnumDecl/EnumDecl_getMember.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from EnumDecl x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getMember(index) diff --git a/swift/ql/test/extractor-tests/generated/decl/EnumDecl/EnumElementDecl.expected b/swift/ql/test/extractor-tests/generated/decl/EnumDecl/EnumElementDecl.expected index 76a4a119153..70601a44e2a 100644 --- a/swift/ql/test/extractor-tests/generated/decl/EnumDecl/EnumElementDecl.expected +++ b/swift/ql/test/extractor-tests/generated/decl/EnumDecl/EnumElementDecl.expected @@ -1,18 +1,32 @@ -| enums.swift:2:10:2:10 | value1 | getModule: | file://:0:0:0:0 | enums | getNumberOfMembers: | 0 | getInterfaceType: | (EnumValues.Type) -> EnumValues | getName: | value1 | getNumberOfParams: | 0 | -| enums.swift:2:18:2:18 | value2 | getModule: | file://:0:0:0:0 | enums | getNumberOfMembers: | 0 | getInterfaceType: | (EnumValues.Type) -> EnumValues | getName: | value2 | getNumberOfParams: | 0 | -| enums.swift:3:10:3:10 | value3 | getModule: | file://:0:0:0:0 | enums | getNumberOfMembers: | 0 | getInterfaceType: | (EnumValues.Type) -> EnumValues | getName: | value3 | getNumberOfParams: | 0 | -| enums.swift:3:18:3:18 | value4 | getModule: | file://:0:0:0:0 | enums | getNumberOfMembers: | 0 | getInterfaceType: | (EnumValues.Type) -> EnumValues | getName: | value4 | getNumberOfParams: | 0 | -| enums.swift:3:26:3:26 | value5 | getModule: | file://:0:0:0:0 | enums | getNumberOfMembers: | 0 | getInterfaceType: | (EnumValues.Type) -> EnumValues | getName: | value5 | getNumberOfParams: | 0 | -| enums.swift:8:10:8:10 | value1 | getModule: | file://:0:0:0:0 | enums | getNumberOfMembers: | 0 | getInterfaceType: | (EnumValuesWithBase.Type) -> EnumValuesWithBase | getName: | value1 | getNumberOfParams: | 0 | -| enums.swift:8:18:8:18 | value2 | getModule: | file://:0:0:0:0 | enums | getNumberOfMembers: | 0 | getInterfaceType: | (EnumValuesWithBase.Type) -> EnumValuesWithBase | getName: | value2 | getNumberOfParams: | 0 | -| enums.swift:9:10:9:10 | value3 | getModule: | file://:0:0:0:0 | enums | getNumberOfMembers: | 0 | getInterfaceType: | (EnumValuesWithBase.Type) -> EnumValuesWithBase | getName: | value3 | getNumberOfParams: | 0 | -| enums.swift:9:18:9:18 | value4 | getModule: | file://:0:0:0:0 | enums | getNumberOfMembers: | 0 | getInterfaceType: | (EnumValuesWithBase.Type) -> EnumValuesWithBase | getName: | value4 | getNumberOfParams: | 0 | -| enums.swift:9:26:9:26 | value5 | getModule: | file://:0:0:0:0 | enums | getNumberOfMembers: | 0 | getInterfaceType: | (EnumValuesWithBase.Type) -> EnumValuesWithBase | getName: | value5 | getNumberOfParams: | 0 | -| enums.swift:13:10:13:22 | nodata1 | getModule: | file://:0:0:0:0 | enums | getNumberOfMembers: | 0 | getInterfaceType: | (EnumWithParams.Type) -> (Void) -> EnumWithParams | getName: | nodata1 | getNumberOfParams: | 1 | -| enums.swift:14:10:14:21 | intdata | getModule: | file://:0:0:0:0 | enums | getNumberOfMembers: | 0 | getInterfaceType: | (EnumWithParams.Type) -> (Int) -> EnumWithParams | getName: | intdata | getNumberOfParams: | 1 | -| enums.swift:15:10:15:35 | tuple | getModule: | file://:0:0:0:0 | enums | getNumberOfMembers: | 0 | getInterfaceType: | (EnumWithParams.Type) -> (Int, String, Double) -> EnumWithParams | getName: | tuple | getNumberOfParams: | 3 | -| enums.swift:19:10:19:10 | none | getModule: | file://:0:0:0:0 | enums | getNumberOfMembers: | 0 | getInterfaceType: | (GenericEnum.Type) -> GenericEnum | getName: | none | getNumberOfParams: | 0 | -| enums.swift:20:10:20:16 | some | getModule: | file://:0:0:0:0 | enums | getNumberOfMembers: | 0 | getInterfaceType: | (GenericEnum.Type) -> (T) -> GenericEnum | getName: | some | getNumberOfParams: | 1 | -| enums.swift:24:10:24:25 | nodata1 | getModule: | file://:0:0:0:0 | enums | getNumberOfMembers: | 0 | getInterfaceType: | (EnumWithNamedParams.Type) -> (Void) -> EnumWithNamedParams | getName: | nodata1 | getNumberOfParams: | 1 | -| enums.swift:25:10:25:24 | intdata | getModule: | file://:0:0:0:0 | enums | getNumberOfMembers: | 0 | getInterfaceType: | (EnumWithNamedParams.Type) -> (Int) -> EnumWithNamedParams | getName: | intdata | getNumberOfParams: | 1 | -| enums.swift:26:10:26:44 | tuple | getModule: | file://:0:0:0:0 | enums | getNumberOfMembers: | 0 | getInterfaceType: | (EnumWithNamedParams.Type) -> (Int, String, Double) -> EnumWithNamedParams | getName: | tuple | getNumberOfParams: | 3 | +instances +| enums.swift:2:10:2:10 | value1 | getModule: | file://:0:0:0:0 | enums | getInterfaceType: | (EnumValues.Type) -> EnumValues | getName: | value1 | +| enums.swift:2:18:2:18 | value2 | getModule: | file://:0:0:0:0 | enums | getInterfaceType: | (EnumValues.Type) -> EnumValues | getName: | value2 | +| enums.swift:3:10:3:10 | value3 | getModule: | file://:0:0:0:0 | enums | getInterfaceType: | (EnumValues.Type) -> EnumValues | getName: | value3 | +| enums.swift:3:18:3:18 | value4 | getModule: | file://:0:0:0:0 | enums | getInterfaceType: | (EnumValues.Type) -> EnumValues | getName: | value4 | +| enums.swift:3:26:3:26 | value5 | getModule: | file://:0:0:0:0 | enums | getInterfaceType: | (EnumValues.Type) -> EnumValues | getName: | value5 | +| enums.swift:8:10:8:10 | value1 | getModule: | file://:0:0:0:0 | enums | getInterfaceType: | (EnumValuesWithBase.Type) -> EnumValuesWithBase | getName: | value1 | +| enums.swift:8:18:8:18 | value2 | getModule: | file://:0:0:0:0 | enums | getInterfaceType: | (EnumValuesWithBase.Type) -> EnumValuesWithBase | getName: | value2 | +| enums.swift:9:10:9:10 | value3 | getModule: | file://:0:0:0:0 | enums | getInterfaceType: | (EnumValuesWithBase.Type) -> EnumValuesWithBase | getName: | value3 | +| enums.swift:9:18:9:18 | value4 | getModule: | file://:0:0:0:0 | enums | getInterfaceType: | (EnumValuesWithBase.Type) -> EnumValuesWithBase | getName: | value4 | +| enums.swift:9:26:9:26 | value5 | getModule: | file://:0:0:0:0 | enums | getInterfaceType: | (EnumValuesWithBase.Type) -> EnumValuesWithBase | getName: | value5 | +| enums.swift:13:10:13:22 | nodata1 | getModule: | file://:0:0:0:0 | enums | getInterfaceType: | (EnumWithParams.Type) -> (Void) -> EnumWithParams | getName: | nodata1 | +| enums.swift:14:10:14:21 | intdata | getModule: | file://:0:0:0:0 | enums | getInterfaceType: | (EnumWithParams.Type) -> (Int) -> EnumWithParams | getName: | intdata | +| enums.swift:15:10:15:35 | tuple | getModule: | file://:0:0:0:0 | enums | getInterfaceType: | (EnumWithParams.Type) -> (Int, String, Double) -> EnumWithParams | getName: | tuple | +| enums.swift:19:10:19:10 | none | getModule: | file://:0:0:0:0 | enums | getInterfaceType: | (GenericEnum.Type) -> GenericEnum | getName: | none | +| enums.swift:20:10:20:16 | some | getModule: | file://:0:0:0:0 | enums | getInterfaceType: | (GenericEnum.Type) -> (T) -> GenericEnum | getName: | some | +| enums.swift:24:10:24:25 | nodata1 | getModule: | file://:0:0:0:0 | enums | getInterfaceType: | (EnumWithNamedParams.Type) -> (Void) -> EnumWithNamedParams | getName: | nodata1 | +| enums.swift:25:10:25:24 | intdata | getModule: | file://:0:0:0:0 | enums | getInterfaceType: | (EnumWithNamedParams.Type) -> (Int) -> EnumWithNamedParams | getName: | intdata | +| enums.swift:26:10:26:44 | tuple | getModule: | file://:0:0:0:0 | enums | getInterfaceType: | (EnumWithNamedParams.Type) -> (Int, String, Double) -> EnumWithNamedParams | getName: | tuple | +getMember +getParam +| enums.swift:13:10:13:22 | nodata1 | 0 | enums.swift:13:18:13:18 | _ | +| enums.swift:14:10:14:21 | intdata | 0 | enums.swift:14:18:14:18 | _ | +| enums.swift:15:10:15:35 | tuple | 0 | enums.swift:15:16:15:16 | _ | +| enums.swift:15:10:15:35 | tuple | 1 | enums.swift:15:21:15:21 | _ | +| enums.swift:15:10:15:35 | tuple | 2 | enums.swift:15:29:15:29 | _ | +| enums.swift:20:10:20:16 | some | 0 | enums.swift:20:15:20:15 | _ | +| enums.swift:24:10:24:25 | nodata1 | 0 | enums.swift:24:18:24:21 | v | +| enums.swift:25:10:25:24 | intdata | 0 | enums.swift:25:18:25:21 | i | +| enums.swift:26:10:26:44 | tuple | 0 | enums.swift:26:16:26:19 | i | +| enums.swift:26:10:26:44 | tuple | 1 | enums.swift:26:24:26:27 | s | +| enums.swift:26:10:26:44 | tuple | 2 | enums.swift:26:35:26:38 | d | diff --git a/swift/ql/test/extractor-tests/generated/decl/EnumDecl/EnumElementDecl.ql b/swift/ql/test/extractor-tests/generated/decl/EnumDecl/EnumElementDecl.ql index 1ff638217b0..23f6fdd8e72 100644 --- a/swift/ql/test/extractor-tests/generated/decl/EnumDecl/EnumElementDecl.ql +++ b/swift/ql/test/extractor-tests/generated/decl/EnumDecl/EnumElementDecl.ql @@ -2,16 +2,24 @@ import codeql.swift.elements import TestUtils -from - EnumElementDecl x, ModuleDecl getModule, int getNumberOfMembers, Type getInterfaceType, - string getName, int getNumberOfParams -where +query predicate instances( + EnumElementDecl x, string getModule__label, ModuleDecl getModule, string getInterfaceType__label, + Type getInterfaceType, string getName__label, string getName +) { toBeTested(x) and not x.isUnknown() and + getModule__label = "getModule:" and getModule = x.getModule() and - getNumberOfMembers = x.getNumberOfMembers() and + getInterfaceType__label = "getInterfaceType:" and getInterfaceType = x.getInterfaceType() and - getName = x.getName() and - getNumberOfParams = x.getNumberOfParams() -select x, "getModule:", getModule, "getNumberOfMembers:", getNumberOfMembers, "getInterfaceType:", - getInterfaceType, "getName:", getName, "getNumberOfParams:", getNumberOfParams + getName__label = "getName:" and + getName = x.getName() +} + +query predicate getMember(EnumElementDecl x, int index, Decl getMember) { + toBeTested(x) and not x.isUnknown() and getMember = x.getMember(index) +} + +query predicate getParam(EnumElementDecl x, int index, ParamDecl getParam) { + toBeTested(x) and not x.isUnknown() and getParam = x.getParam(index) +} diff --git a/swift/ql/test/extractor-tests/generated/decl/EnumDecl/EnumElementDecl_getMember.expected b/swift/ql/test/extractor-tests/generated/decl/EnumDecl/EnumElementDecl_getMember.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/swift/ql/test/extractor-tests/generated/decl/EnumDecl/EnumElementDecl_getMember.ql b/swift/ql/test/extractor-tests/generated/decl/EnumDecl/EnumElementDecl_getMember.ql deleted file mode 100644 index 2a500be3149..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/EnumDecl/EnumElementDecl_getMember.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from EnumElementDecl x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getMember(index) diff --git a/swift/ql/test/extractor-tests/generated/decl/EnumDecl/EnumElementDecl_getParam.expected b/swift/ql/test/extractor-tests/generated/decl/EnumDecl/EnumElementDecl_getParam.expected deleted file mode 100644 index 15e0149f595..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/EnumDecl/EnumElementDecl_getParam.expected +++ /dev/null @@ -1,11 +0,0 @@ -| enums.swift:13:10:13:22 | nodata1 | 0 | enums.swift:13:18:13:18 | _ | -| enums.swift:14:10:14:21 | intdata | 0 | enums.swift:14:18:14:18 | _ | -| enums.swift:15:10:15:35 | tuple | 0 | enums.swift:15:16:15:16 | _ | -| enums.swift:15:10:15:35 | tuple | 1 | enums.swift:15:21:15:21 | _ | -| enums.swift:15:10:15:35 | tuple | 2 | enums.swift:15:29:15:29 | _ | -| enums.swift:20:10:20:16 | some | 0 | enums.swift:20:15:20:15 | _ | -| enums.swift:24:10:24:25 | nodata1 | 0 | enums.swift:24:18:24:21 | v | -| enums.swift:25:10:25:24 | intdata | 0 | enums.swift:25:18:25:21 | i | -| enums.swift:26:10:26:44 | tuple | 0 | enums.swift:26:16:26:19 | i | -| enums.swift:26:10:26:44 | tuple | 1 | enums.swift:26:24:26:27 | s | -| enums.swift:26:10:26:44 | tuple | 2 | enums.swift:26:35:26:38 | d | diff --git a/swift/ql/test/extractor-tests/generated/decl/EnumDecl/EnumElementDecl_getParam.ql b/swift/ql/test/extractor-tests/generated/decl/EnumDecl/EnumElementDecl_getParam.ql deleted file mode 100644 index 80621f6d6fa..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/EnumDecl/EnumElementDecl_getParam.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from EnumElementDecl x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getParam(index) diff --git a/swift/ql/test/extractor-tests/generated/decl/ExtensionDecl/ExtensionDecl.expected b/swift/ql/test/extractor-tests/generated/decl/ExtensionDecl/ExtensionDecl.expected index bd70109bed0..581c5d53fc8 100644 --- a/swift/ql/test/extractor-tests/generated/decl/ExtensionDecl/ExtensionDecl.expected +++ b/swift/ql/test/extractor-tests/generated/decl/ExtensionDecl/ExtensionDecl.expected @@ -1,4 +1,19 @@ -| extensions.swift:5:1:9:1 | extension of S | getModule: | file://:0:0:0:0 | extensions | getNumberOfMembers: | 3 | getNumberOfGenericTypeParams: | 0 | getExtendedTypeDecl: | extensions.swift:1:1:1:11 | S | getNumberOfProtocols: | 0 | -| extensions.swift:11:1:15:1 | extension of C | getModule: | file://:0:0:0:0 | extensions | getNumberOfMembers: | 3 | getNumberOfGenericTypeParams: | 0 | getExtendedTypeDecl: | extensions.swift:3:1:3:10 | C | getNumberOfProtocols: | 0 | -| extensions.swift:21:1:23:1 | extension of S | getModule: | file://:0:0:0:0 | extensions | getNumberOfMembers: | 1 | getNumberOfGenericTypeParams: | 0 | getExtendedTypeDecl: | extensions.swift:1:1:1:11 | S | getNumberOfProtocols: | 1 | -| extensions.swift:27:1:29:1 | extension of C | getModule: | file://:0:0:0:0 | extensions | getNumberOfMembers: | 1 | getNumberOfGenericTypeParams: | 0 | getExtendedTypeDecl: | extensions.swift:3:1:3:10 | C | getNumberOfProtocols: | 2 | +instances +| extensions.swift:5:1:9:1 | extension of S | getModule: | file://:0:0:0:0 | extensions | getExtendedTypeDecl: | extensions.swift:1:1:1:11 | S | +| extensions.swift:11:1:15:1 | extension of C | getModule: | file://:0:0:0:0 | extensions | getExtendedTypeDecl: | extensions.swift:3:1:3:10 | C | +| extensions.swift:21:1:23:1 | extension of S | getModule: | file://:0:0:0:0 | extensions | getExtendedTypeDecl: | extensions.swift:1:1:1:11 | S | +| extensions.swift:27:1:29:1 | extension of C | getModule: | file://:0:0:0:0 | extensions | getExtendedTypeDecl: | extensions.swift:3:1:3:10 | C | +getMember +| extensions.swift:5:1:9:1 | extension of S | 0 | extensions.swift:6:5:6:37 | var ... = ... | +| extensions.swift:5:1:9:1 | extension of S | 1 | extensions.swift:6:9:6:9 | x | +| extensions.swift:5:1:9:1 | extension of S | 2 | extensions.swift:8:5:8:17 | foo() | +| extensions.swift:11:1:15:1 | extension of C | 0 | extensions.swift:12:5:12:38 | var ... = ... | +| extensions.swift:11:1:15:1 | extension of C | 1 | extensions.swift:12:9:12:9 | y | +| extensions.swift:11:1:15:1 | extension of C | 2 | extensions.swift:14:5:14:17 | bar() | +| extensions.swift:21:1:23:1 | extension of S | 0 | extensions.swift:22:5:22:17 | baz() | +| extensions.swift:27:1:29:1 | extension of C | 0 | extensions.swift:28:5:28:17 | baz() | +getGenericTypeParam +getProtocol +| extensions.swift:21:1:23:1 | extension of S | 0 | extensions.swift:17:1:19:1 | P1 | +| extensions.swift:27:1:29:1 | extension of C | 0 | extensions.swift:17:1:19:1 | P1 | +| extensions.swift:27:1:29:1 | extension of C | 1 | extensions.swift:25:1:25:14 | P2 | diff --git a/swift/ql/test/extractor-tests/generated/decl/ExtensionDecl/ExtensionDecl.ql b/swift/ql/test/extractor-tests/generated/decl/ExtensionDecl/ExtensionDecl.ql index 725a9082047..f5900f76e5f 100644 --- a/swift/ql/test/extractor-tests/generated/decl/ExtensionDecl/ExtensionDecl.ql +++ b/swift/ql/test/extractor-tests/generated/decl/ExtensionDecl/ExtensionDecl.ql @@ -2,17 +2,28 @@ import codeql.swift.elements import TestUtils -from - ExtensionDecl x, ModuleDecl getModule, int getNumberOfMembers, int getNumberOfGenericTypeParams, - NominalTypeDecl getExtendedTypeDecl, int getNumberOfProtocols -where +query predicate instances( + ExtensionDecl x, string getModule__label, ModuleDecl getModule, string getExtendedTypeDecl__label, + NominalTypeDecl getExtendedTypeDecl +) { toBeTested(x) and not x.isUnknown() and + getModule__label = "getModule:" and getModule = x.getModule() and - getNumberOfMembers = x.getNumberOfMembers() and - getNumberOfGenericTypeParams = x.getNumberOfGenericTypeParams() and - getExtendedTypeDecl = x.getExtendedTypeDecl() and - getNumberOfProtocols = x.getNumberOfProtocols() -select x, "getModule:", getModule, "getNumberOfMembers:", getNumberOfMembers, - "getNumberOfGenericTypeParams:", getNumberOfGenericTypeParams, "getExtendedTypeDecl:", - getExtendedTypeDecl, "getNumberOfProtocols:", getNumberOfProtocols + getExtendedTypeDecl__label = "getExtendedTypeDecl:" and + getExtendedTypeDecl = x.getExtendedTypeDecl() +} + +query predicate getMember(ExtensionDecl x, int index, Decl getMember) { + toBeTested(x) and not x.isUnknown() and getMember = x.getMember(index) +} + +query predicate getGenericTypeParam( + ExtensionDecl x, int index, GenericTypeParamDecl getGenericTypeParam +) { + toBeTested(x) and not x.isUnknown() and getGenericTypeParam = x.getGenericTypeParam(index) +} + +query predicate getProtocol(ExtensionDecl x, int index, ProtocolDecl getProtocol) { + toBeTested(x) and not x.isUnknown() and getProtocol = x.getProtocol(index) +} diff --git a/swift/ql/test/extractor-tests/generated/decl/ExtensionDecl/ExtensionDecl_getGenericTypeParam.expected b/swift/ql/test/extractor-tests/generated/decl/ExtensionDecl/ExtensionDecl_getGenericTypeParam.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/swift/ql/test/extractor-tests/generated/decl/ExtensionDecl/ExtensionDecl_getGenericTypeParam.ql b/swift/ql/test/extractor-tests/generated/decl/ExtensionDecl/ExtensionDecl_getGenericTypeParam.ql deleted file mode 100644 index 4f67a7edefc..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/ExtensionDecl/ExtensionDecl_getGenericTypeParam.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from ExtensionDecl x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getGenericTypeParam(index) diff --git a/swift/ql/test/extractor-tests/generated/decl/ExtensionDecl/ExtensionDecl_getMember.expected b/swift/ql/test/extractor-tests/generated/decl/ExtensionDecl/ExtensionDecl_getMember.expected deleted file mode 100644 index 0d89d932b42..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/ExtensionDecl/ExtensionDecl_getMember.expected +++ /dev/null @@ -1,8 +0,0 @@ -| extensions.swift:5:1:9:1 | extension of S | 0 | extensions.swift:6:5:6:37 | var ... = ... | -| extensions.swift:5:1:9:1 | extension of S | 1 | extensions.swift:6:9:6:9 | x | -| extensions.swift:5:1:9:1 | extension of S | 2 | extensions.swift:8:5:8:17 | foo() | -| extensions.swift:11:1:15:1 | extension of C | 0 | extensions.swift:12:5:12:38 | var ... = ... | -| extensions.swift:11:1:15:1 | extension of C | 1 | extensions.swift:12:9:12:9 | y | -| extensions.swift:11:1:15:1 | extension of C | 2 | extensions.swift:14:5:14:17 | bar() | -| extensions.swift:21:1:23:1 | extension of S | 0 | extensions.swift:22:5:22:17 | baz() | -| extensions.swift:27:1:29:1 | extension of C | 0 | extensions.swift:28:5:28:17 | baz() | diff --git a/swift/ql/test/extractor-tests/generated/decl/ExtensionDecl/ExtensionDecl_getMember.ql b/swift/ql/test/extractor-tests/generated/decl/ExtensionDecl/ExtensionDecl_getMember.ql deleted file mode 100644 index 7025173bb21..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/ExtensionDecl/ExtensionDecl_getMember.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from ExtensionDecl x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getMember(index) diff --git a/swift/ql/test/extractor-tests/generated/decl/ExtensionDecl/ExtensionDecl_getProtocol.expected b/swift/ql/test/extractor-tests/generated/decl/ExtensionDecl/ExtensionDecl_getProtocol.expected deleted file mode 100644 index 9a8915164b4..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/ExtensionDecl/ExtensionDecl_getProtocol.expected +++ /dev/null @@ -1,3 +0,0 @@ -| extensions.swift:21:1:23:1 | extension of S | 0 | extensions.swift:17:1:19:1 | P1 | -| extensions.swift:27:1:29:1 | extension of C | 0 | extensions.swift:17:1:19:1 | P1 | -| extensions.swift:27:1:29:1 | extension of C | 1 | extensions.swift:25:1:25:14 | P2 | diff --git a/swift/ql/test/extractor-tests/generated/decl/ExtensionDecl/ExtensionDecl_getProtocol.ql b/swift/ql/test/extractor-tests/generated/decl/ExtensionDecl/ExtensionDecl_getProtocol.ql deleted file mode 100644 index 9983f602e8b..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/ExtensionDecl/ExtensionDecl_getProtocol.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from ExtensionDecl x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getProtocol(index) diff --git a/swift/ql/test/extractor-tests/generated/decl/IfConfigDecl/IfConfigDecl.expected b/swift/ql/test/extractor-tests/generated/decl/IfConfigDecl/IfConfigDecl.expected index e69de29bb2d..c7826fe6321 100644 --- a/swift/ql/test/extractor-tests/generated/decl/IfConfigDecl/IfConfigDecl.expected +++ b/swift/ql/test/extractor-tests/generated/decl/IfConfigDecl/IfConfigDecl.expected @@ -0,0 +1,3 @@ +instances +getMember +getActiveElement diff --git a/swift/ql/test/extractor-tests/generated/decl/IfConfigDecl/IfConfigDecl.ql b/swift/ql/test/extractor-tests/generated/decl/IfConfigDecl/IfConfigDecl.ql index 2bb062dbb8f..b9948cf8d48 100644 --- a/swift/ql/test/extractor-tests/generated/decl/IfConfigDecl/IfConfigDecl.ql +++ b/swift/ql/test/extractor-tests/generated/decl/IfConfigDecl/IfConfigDecl.ql @@ -2,12 +2,17 @@ import codeql.swift.elements import TestUtils -from IfConfigDecl x, ModuleDecl getModule, int getNumberOfMembers, int getNumberOfActiveElements -where +query predicate instances(IfConfigDecl x, string getModule__label, ModuleDecl getModule) { toBeTested(x) and not x.isUnknown() and - getModule = x.getModule() and - getNumberOfMembers = x.getNumberOfMembers() and - getNumberOfActiveElements = x.getNumberOfActiveElements() -select x, "getModule:", getModule, "getNumberOfMembers:", getNumberOfMembers, - "getNumberOfActiveElements:", getNumberOfActiveElements + getModule__label = "getModule:" and + getModule = x.getModule() +} + +query predicate getMember(IfConfigDecl x, int index, Decl getMember) { + toBeTested(x) and not x.isUnknown() and getMember = x.getMember(index) +} + +query predicate getActiveElement(IfConfigDecl x, int index, AstNode getActiveElement) { + toBeTested(x) and not x.isUnknown() and getActiveElement = x.getActiveElement(index) +} diff --git a/swift/ql/test/extractor-tests/generated/decl/IfConfigDecl/IfConfigDecl_getActiveElement.expected b/swift/ql/test/extractor-tests/generated/decl/IfConfigDecl/IfConfigDecl_getActiveElement.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/swift/ql/test/extractor-tests/generated/decl/IfConfigDecl/IfConfigDecl_getActiveElement.ql b/swift/ql/test/extractor-tests/generated/decl/IfConfigDecl/IfConfigDecl_getActiveElement.ql deleted file mode 100644 index d1613f30389..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/IfConfigDecl/IfConfigDecl_getActiveElement.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from IfConfigDecl x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getActiveElement(index) diff --git a/swift/ql/test/extractor-tests/generated/decl/IfConfigDecl/IfConfigDecl_getMember.expected b/swift/ql/test/extractor-tests/generated/decl/IfConfigDecl/IfConfigDecl_getMember.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/swift/ql/test/extractor-tests/generated/decl/IfConfigDecl/IfConfigDecl_getMember.ql b/swift/ql/test/extractor-tests/generated/decl/IfConfigDecl/IfConfigDecl_getMember.ql deleted file mode 100644 index d2b1b6961a3..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/IfConfigDecl/IfConfigDecl_getMember.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from IfConfigDecl x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getMember(index) diff --git a/swift/ql/test/extractor-tests/generated/decl/ImportDecl/ImportDecl.expected b/swift/ql/test/extractor-tests/generated/decl/ImportDecl/ImportDecl.expected index 2b781c5e359..0e4b0b1d19a 100644 --- a/swift/ql/test/extractor-tests/generated/decl/ImportDecl/ImportDecl.expected +++ b/swift/ql/test/extractor-tests/generated/decl/ImportDecl/ImportDecl.expected @@ -1,5 +1,19 @@ -| import.swift:1:1:1:8 | import ... | getModule: | file://:0:0:0:0 | import | getNumberOfMembers: | 0 | isExported: | no | hasImportedModule: | yes | getNumberOfDeclarations: | 0 | -| import.swift:2:1:2:24 | import ... | getModule: | file://:0:0:0:0 | import | getNumberOfMembers: | 0 | isExported: | no | hasImportedModule: | yes | getNumberOfDeclarations: | 1 | -| import.swift:3:12:3:32 | import ... | getModule: | file://:0:0:0:0 | import | getNumberOfMembers: | 0 | isExported: | yes | hasImportedModule: | yes | getNumberOfDeclarations: | 1 | -| import.swift:4:1:4:19 | import ... | getModule: | file://:0:0:0:0 | import | getNumberOfMembers: | 0 | isExported: | no | hasImportedModule: | yes | getNumberOfDeclarations: | 2 | -| import.swift:5:1:5:23 | import ... | getModule: | file://:0:0:0:0 | import | getNumberOfMembers: | 0 | isExported: | no | hasImportedModule: | yes | getNumberOfDeclarations: | 1 | +instances +| import.swift:1:1:1:8 | import ... | getModule: | file://:0:0:0:0 | import | isExported: | no | +| import.swift:2:1:2:24 | import ... | getModule: | file://:0:0:0:0 | import | isExported: | no | +| import.swift:3:12:3:32 | import ... | getModule: | file://:0:0:0:0 | import | isExported: | yes | +| import.swift:4:1:4:19 | import ... | getModule: | file://:0:0:0:0 | import | isExported: | no | +| import.swift:5:1:5:23 | import ... | getModule: | file://:0:0:0:0 | import | isExported: | no | +getMember +getImportedModule +| import.swift:1:1:1:8 | import ... | file://:0:0:0:0 | Swift | +| import.swift:2:1:2:24 | import ... | file://:0:0:0:0 | Swift | +| import.swift:3:12:3:32 | import ... | file://:0:0:0:0 | Swift | +| import.swift:4:1:4:19 | import ... | file://:0:0:0:0 | Swift | +| import.swift:5:1:5:23 | import ... | file://:0:0:0:0 | Swift | +getDeclaration +| import.swift:2:1:2:24 | import ... | 0 | file://:0:0:0:0 | Int | +| import.swift:3:12:3:32 | import ... | 0 | file://:0:0:0:0 | Double | +| import.swift:4:1:4:19 | import ... | 0 | file://:0:0:0:0 | print(_:separator:terminator:) | +| import.swift:4:1:4:19 | import ... | 1 | file://:0:0:0:0 | print(_:separator:terminator:to:) | +| import.swift:5:1:5:23 | import ... | 0 | file://:0:0:0:0 | Hashable | diff --git a/swift/ql/test/extractor-tests/generated/decl/ImportDecl/ImportDecl.ql b/swift/ql/test/extractor-tests/generated/decl/ImportDecl/ImportDecl.ql index c773f2890a5..505c5f820a7 100644 --- a/swift/ql/test/extractor-tests/generated/decl/ImportDecl/ImportDecl.ql +++ b/swift/ql/test/extractor-tests/generated/decl/ImportDecl/ImportDecl.ql @@ -2,17 +2,26 @@ import codeql.swift.elements import TestUtils -from - ImportDecl x, ModuleDecl getModule, int getNumberOfMembers, string isExported, - string hasImportedModule, int getNumberOfDeclarations -where +query predicate instances( + ImportDecl x, string getModule__label, ModuleDecl getModule, string isExported__label, + string isExported +) { toBeTested(x) and not x.isUnknown() and + getModule__label = "getModule:" and getModule = x.getModule() and - getNumberOfMembers = x.getNumberOfMembers() and - (if x.isExported() then isExported = "yes" else isExported = "no") and - (if x.hasImportedModule() then hasImportedModule = "yes" else hasImportedModule = "no") and - getNumberOfDeclarations = x.getNumberOfDeclarations() -select x, "getModule:", getModule, "getNumberOfMembers:", getNumberOfMembers, "isExported:", - isExported, "hasImportedModule:", hasImportedModule, "getNumberOfDeclarations:", - getNumberOfDeclarations + isExported__label = "isExported:" and + if x.isExported() then isExported = "yes" else isExported = "no" +} + +query predicate getMember(ImportDecl x, int index, Decl getMember) { + toBeTested(x) and not x.isUnknown() and getMember = x.getMember(index) +} + +query predicate getImportedModule(ImportDecl x, ModuleDecl getImportedModule) { + toBeTested(x) and not x.isUnknown() and getImportedModule = x.getImportedModule() +} + +query predicate getDeclaration(ImportDecl x, int index, ValueDecl getDeclaration) { + toBeTested(x) and not x.isUnknown() and getDeclaration = x.getDeclaration(index) +} diff --git a/swift/ql/test/extractor-tests/generated/decl/ImportDecl/ImportDecl_getDeclaration.expected b/swift/ql/test/extractor-tests/generated/decl/ImportDecl/ImportDecl_getDeclaration.expected deleted file mode 100644 index b877b113bc6..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/ImportDecl/ImportDecl_getDeclaration.expected +++ /dev/null @@ -1,5 +0,0 @@ -| import.swift:2:1:2:24 | import ... | 0 | file://:0:0:0:0 | Int | -| import.swift:3:12:3:32 | import ... | 0 | file://:0:0:0:0 | Double | -| import.swift:4:1:4:19 | import ... | 0 | file://:0:0:0:0 | print(_:separator:terminator:) | -| import.swift:4:1:4:19 | import ... | 1 | file://:0:0:0:0 | print(_:separator:terminator:to:) | -| import.swift:5:1:5:23 | import ... | 0 | file://:0:0:0:0 | Hashable | diff --git a/swift/ql/test/extractor-tests/generated/decl/ImportDecl/ImportDecl_getDeclaration.ql b/swift/ql/test/extractor-tests/generated/decl/ImportDecl/ImportDecl_getDeclaration.ql deleted file mode 100644 index 0c9b586186b..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/ImportDecl/ImportDecl_getDeclaration.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from ImportDecl x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getDeclaration(index) diff --git a/swift/ql/test/extractor-tests/generated/decl/ImportDecl/ImportDecl_getImportedModule.expected b/swift/ql/test/extractor-tests/generated/decl/ImportDecl/ImportDecl_getImportedModule.expected deleted file mode 100644 index 8d064a70744..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/ImportDecl/ImportDecl_getImportedModule.expected +++ /dev/null @@ -1,5 +0,0 @@ -| import.swift:1:1:1:8 | import ... | file://:0:0:0:0 | Swift | -| import.swift:2:1:2:24 | import ... | file://:0:0:0:0 | Swift | -| import.swift:3:12:3:32 | import ... | file://:0:0:0:0 | Swift | -| import.swift:4:1:4:19 | import ... | file://:0:0:0:0 | Swift | -| import.swift:5:1:5:23 | import ... | file://:0:0:0:0 | Swift | diff --git a/swift/ql/test/extractor-tests/generated/decl/ImportDecl/ImportDecl_getImportedModule.ql b/swift/ql/test/extractor-tests/generated/decl/ImportDecl/ImportDecl_getImportedModule.ql deleted file mode 100644 index 9fe8acad96e..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/ImportDecl/ImportDecl_getImportedModule.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from ImportDecl x -where toBeTested(x) and not x.isUnknown() -select x, x.getImportedModule() diff --git a/swift/ql/test/extractor-tests/generated/decl/ImportDecl/ImportDecl_getMember.expected b/swift/ql/test/extractor-tests/generated/decl/ImportDecl/ImportDecl_getMember.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/swift/ql/test/extractor-tests/generated/decl/ImportDecl/ImportDecl_getMember.ql b/swift/ql/test/extractor-tests/generated/decl/ImportDecl/ImportDecl_getMember.ql deleted file mode 100644 index 2aa0c828947..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/ImportDecl/ImportDecl_getMember.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from ImportDecl x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getMember(index) diff --git a/swift/ql/test/extractor-tests/generated/decl/MacroDecl/MacroDecl.expected b/swift/ql/test/extractor-tests/generated/decl/MacroDecl/MacroDecl.expected index 65bec16eea0..add8617f94f 100644 --- a/swift/ql/test/extractor-tests/generated/decl/MacroDecl/MacroDecl.expected +++ b/swift/ql/test/extractor-tests/generated/decl/MacroDecl/MacroDecl.expected @@ -1,3 +1,12 @@ -| test.swift:2:1:2:50 | MacroDecl | getNumberOfGenericTypeParams: | 0 | getModule: | file://:0:0:0:0 | test | getNumberOfMembers: | 0 | getInterfaceType: | () -> () | getName: | A() | getNumberOfParameters: | 0 | getNumberOfRoles: | 1 | -| test.swift:4:1:4:15 | MacroDecl | getNumberOfGenericTypeParams: | 0 | getModule: | file://:0:0:0:0 | test | getNumberOfMembers: | 0 | getInterfaceType: | () -> () | getName: | B() | getNumberOfParameters: | 0 | getNumberOfRoles: | 1 | -| test.swift:7:1:7:15 | MacroDecl | getNumberOfGenericTypeParams: | 0 | getModule: | file://:0:0:0:0 | test | getNumberOfMembers: | 0 | getInterfaceType: | () -> () | getName: | C() | getNumberOfParameters: | 0 | getNumberOfRoles: | 2 | +instances +| test.swift:2:1:2:50 | MacroDecl | getModule: | file://:0:0:0:0 | test | getInterfaceType: | () -> () | getName: | A() | +| test.swift:4:1:4:15 | MacroDecl | getModule: | file://:0:0:0:0 | test | getInterfaceType: | () -> () | getName: | B() | +| test.swift:7:1:7:15 | MacroDecl | getModule: | file://:0:0:0:0 | test | getInterfaceType: | () -> () | getName: | C() | +getGenericTypeParam +getMember +getParameter +getRole +| test.swift:2:1:2:50 | MacroDecl | 0 | test.swift:1:2:1:26 | #freestanding(declaration) | +| test.swift:4:1:4:15 | MacroDecl | 0 | test.swift:3:2:3:25 | #freestanding(expression) | +| test.swift:7:1:7:15 | MacroDecl | 0 | test.swift:6:2:6:20 | @attached(extension) | +| test.swift:7:1:7:15 | MacroDecl | 1 | test.swift:5:2:5:17 | @attached(member) | diff --git a/swift/ql/test/extractor-tests/generated/decl/MacroDecl/MacroDecl.ql b/swift/ql/test/extractor-tests/generated/decl/MacroDecl/MacroDecl.ql index 4d8c6e77aae..2a675c60910 100644 --- a/swift/ql/test/extractor-tests/generated/decl/MacroDecl/MacroDecl.ql +++ b/swift/ql/test/extractor-tests/generated/decl/MacroDecl/MacroDecl.ql @@ -2,19 +2,32 @@ import codeql.swift.elements import TestUtils -from - MacroDecl x, int getNumberOfGenericTypeParams, ModuleDecl getModule, int getNumberOfMembers, - Type getInterfaceType, string getName, int getNumberOfParameters, int getNumberOfRoles -where +query predicate instances( + MacroDecl x, string getModule__label, ModuleDecl getModule, string getInterfaceType__label, + Type getInterfaceType, string getName__label, string getName +) { toBeTested(x) and not x.isUnknown() and - getNumberOfGenericTypeParams = x.getNumberOfGenericTypeParams() and + getModule__label = "getModule:" and getModule = x.getModule() and - getNumberOfMembers = x.getNumberOfMembers() and + getInterfaceType__label = "getInterfaceType:" and getInterfaceType = x.getInterfaceType() and - getName = x.getName() and - getNumberOfParameters = x.getNumberOfParameters() and - getNumberOfRoles = x.getNumberOfRoles() -select x, "getNumberOfGenericTypeParams:", getNumberOfGenericTypeParams, "getModule:", getModule, - "getNumberOfMembers:", getNumberOfMembers, "getInterfaceType:", getInterfaceType, "getName:", - getName, "getNumberOfParameters:", getNumberOfParameters, "getNumberOfRoles:", getNumberOfRoles + getName__label = "getName:" and + getName = x.getName() +} + +query predicate getGenericTypeParam(MacroDecl x, int index, GenericTypeParamDecl getGenericTypeParam) { + toBeTested(x) and not x.isUnknown() and getGenericTypeParam = x.getGenericTypeParam(index) +} + +query predicate getMember(MacroDecl x, int index, Decl getMember) { + toBeTested(x) and not x.isUnknown() and getMember = x.getMember(index) +} + +query predicate getParameter(MacroDecl x, int index, ParamDecl getParameter) { + toBeTested(x) and not x.isUnknown() and getParameter = x.getParameter(index) +} + +query predicate getRole(MacroDecl x, int index, MacroRole getRole) { + toBeTested(x) and not x.isUnknown() and getRole = x.getRole(index) +} diff --git a/swift/ql/test/extractor-tests/generated/decl/MacroDecl/MacroDecl_getGenericTypeParam.expected b/swift/ql/test/extractor-tests/generated/decl/MacroDecl/MacroDecl_getGenericTypeParam.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/swift/ql/test/extractor-tests/generated/decl/MacroDecl/MacroDecl_getGenericTypeParam.ql b/swift/ql/test/extractor-tests/generated/decl/MacroDecl/MacroDecl_getGenericTypeParam.ql deleted file mode 100644 index c74a66c6b06..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/MacroDecl/MacroDecl_getGenericTypeParam.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from MacroDecl x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getGenericTypeParam(index) diff --git a/swift/ql/test/extractor-tests/generated/decl/MacroDecl/MacroDecl_getMember.expected b/swift/ql/test/extractor-tests/generated/decl/MacroDecl/MacroDecl_getMember.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/swift/ql/test/extractor-tests/generated/decl/MacroDecl/MacroDecl_getMember.ql b/swift/ql/test/extractor-tests/generated/decl/MacroDecl/MacroDecl_getMember.ql deleted file mode 100644 index 1de9c7f2493..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/MacroDecl/MacroDecl_getMember.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from MacroDecl x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getMember(index) diff --git a/swift/ql/test/extractor-tests/generated/decl/MacroDecl/MacroDecl_getParameter.expected b/swift/ql/test/extractor-tests/generated/decl/MacroDecl/MacroDecl_getParameter.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/swift/ql/test/extractor-tests/generated/decl/MacroDecl/MacroDecl_getParameter.ql b/swift/ql/test/extractor-tests/generated/decl/MacroDecl/MacroDecl_getParameter.ql deleted file mode 100644 index 1e4c8754e34..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/MacroDecl/MacroDecl_getParameter.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from MacroDecl x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getParameter(index) diff --git a/swift/ql/test/extractor-tests/generated/decl/MacroDecl/MacroDecl_getRole.expected b/swift/ql/test/extractor-tests/generated/decl/MacroDecl/MacroDecl_getRole.expected deleted file mode 100644 index faa0a6256a6..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/MacroDecl/MacroDecl_getRole.expected +++ /dev/null @@ -1,4 +0,0 @@ -| test.swift:2:1:2:50 | MacroDecl | 0 | test.swift:1:2:1:26 | #freestanding(declaration) | -| test.swift:4:1:4:15 | MacroDecl | 0 | test.swift:3:2:3:25 | #freestanding(expression) | -| test.swift:7:1:7:15 | MacroDecl | 0 | test.swift:6:2:6:20 | @attached(extension) | -| test.swift:7:1:7:15 | MacroDecl | 1 | test.swift:5:2:5:17 | @attached(member) | diff --git a/swift/ql/test/extractor-tests/generated/decl/MacroDecl/MacroDecl_getRole.ql b/swift/ql/test/extractor-tests/generated/decl/MacroDecl/MacroDecl_getRole.ql deleted file mode 100644 index cce29824f2a..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/MacroDecl/MacroDecl_getRole.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from MacroDecl x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getRole(index) diff --git a/swift/ql/test/extractor-tests/generated/decl/MacroDecl/MacroRole.expected b/swift/ql/test/extractor-tests/generated/decl/MacroDecl/MacroRole.expected index 036d4f7ff6e..eca30375b24 100644 --- a/swift/ql/test/extractor-tests/generated/decl/MacroDecl/MacroRole.expected +++ b/swift/ql/test/extractor-tests/generated/decl/MacroDecl/MacroRole.expected @@ -1,20 +1,25 @@ -| file://:0:0:0:0 | #freestanding(declaration) | getKind: | 2 | getMacroSyntax: | 0 | getNumberOfConformances: | 0 | getNumberOfNames: | 0 | -| file://:0:0:0:0 | #freestanding(declaration) | getKind: | 2 | getMacroSyntax: | 0 | getNumberOfConformances: | 0 | getNumberOfNames: | 0 | -| file://:0:0:0:0 | #freestanding(expression) | getKind: | 1 | getMacroSyntax: | 0 | getNumberOfConformances: | 0 | getNumberOfNames: | 0 | -| file://:0:0:0:0 | #freestanding(expression) | getKind: | 1 | getMacroSyntax: | 0 | getNumberOfConformances: | 0 | getNumberOfNames: | 0 | -| file://:0:0:0:0 | #freestanding(expression) | getKind: | 1 | getMacroSyntax: | 0 | getNumberOfConformances: | 0 | getNumberOfNames: | 0 | -| file://:0:0:0:0 | #freestanding(expression) | getKind: | 1 | getMacroSyntax: | 0 | getNumberOfConformances: | 0 | getNumberOfNames: | 0 | -| file://:0:0:0:0 | #freestanding(expression) | getKind: | 1 | getMacroSyntax: | 0 | getNumberOfConformances: | 0 | getNumberOfNames: | 0 | -| file://:0:0:0:0 | #freestanding(expression) | getKind: | 1 | getMacroSyntax: | 0 | getNumberOfConformances: | 0 | getNumberOfNames: | 0 | -| file://:0:0:0:0 | #freestanding(expression) | getKind: | 1 | getMacroSyntax: | 0 | getNumberOfConformances: | 0 | getNumberOfNames: | 0 | -| file://:0:0:0:0 | #freestanding(expression) | getKind: | 1 | getMacroSyntax: | 0 | getNumberOfConformances: | 0 | getNumberOfNames: | 0 | -| file://:0:0:0:0 | #freestanding(expression) | getKind: | 1 | getMacroSyntax: | 0 | getNumberOfConformances: | 0 | getNumberOfNames: | 0 | -| file://:0:0:0:0 | @attached(accessor) | getKind: | 4 | getMacroSyntax: | 1 | getNumberOfConformances: | 0 | getNumberOfNames: | 0 | -| file://:0:0:0:0 | @attached(member) | getKind: | 16 | getMacroSyntax: | 1 | getNumberOfConformances: | 0 | getNumberOfNames: | 0 | -| file://:0:0:0:0 | @attached(memberAttribute) | getKind: | 8 | getMacroSyntax: | 1 | getNumberOfConformances: | 0 | getNumberOfNames: | 0 | -| file://:0:0:0:0 | @attached(peer) | getKind: | 32 | getMacroSyntax: | 1 | getNumberOfConformances: | 0 | getNumberOfNames: | 1 | -| file://:0:0:0:0 | @attached(peer) | getKind: | 32 | getMacroSyntax: | 1 | getNumberOfConformances: | 0 | getNumberOfNames: | 1 | -| test.swift:1:2:1:26 | #freestanding(declaration) | getKind: | 2 | getMacroSyntax: | 0 | getNumberOfConformances: | 0 | getNumberOfNames: | 0 | -| test.swift:3:2:3:25 | #freestanding(expression) | getKind: | 1 | getMacroSyntax: | 0 | getNumberOfConformances: | 0 | getNumberOfNames: | 0 | -| test.swift:5:2:5:17 | @attached(member) | getKind: | 16 | getMacroSyntax: | 1 | getNumberOfConformances: | 0 | getNumberOfNames: | 0 | -| test.swift:6:2:6:20 | @attached(extension) | getKind: | 256 | getMacroSyntax: | 1 | getNumberOfConformances: | 0 | getNumberOfNames: | 0 | +instances +| file://:0:0:0:0 | #freestanding(declaration) | getKind: | 2 | getMacroSyntax: | 0 | +| file://:0:0:0:0 | #freestanding(declaration) | getKind: | 2 | getMacroSyntax: | 0 | +| file://:0:0:0:0 | #freestanding(expression) | getKind: | 1 | getMacroSyntax: | 0 | +| file://:0:0:0:0 | #freestanding(expression) | getKind: | 1 | getMacroSyntax: | 0 | +| file://:0:0:0:0 | #freestanding(expression) | getKind: | 1 | getMacroSyntax: | 0 | +| file://:0:0:0:0 | #freestanding(expression) | getKind: | 1 | getMacroSyntax: | 0 | +| file://:0:0:0:0 | #freestanding(expression) | getKind: | 1 | getMacroSyntax: | 0 | +| file://:0:0:0:0 | #freestanding(expression) | getKind: | 1 | getMacroSyntax: | 0 | +| file://:0:0:0:0 | #freestanding(expression) | getKind: | 1 | getMacroSyntax: | 0 | +| file://:0:0:0:0 | #freestanding(expression) | getKind: | 1 | getMacroSyntax: | 0 | +| file://:0:0:0:0 | #freestanding(expression) | getKind: | 1 | getMacroSyntax: | 0 | +| file://:0:0:0:0 | @attached(accessor) | getKind: | 4 | getMacroSyntax: | 1 | +| file://:0:0:0:0 | @attached(member) | getKind: | 16 | getMacroSyntax: | 1 | +| file://:0:0:0:0 | @attached(memberAttribute) | getKind: | 8 | getMacroSyntax: | 1 | +| file://:0:0:0:0 | @attached(peer) | getKind: | 32 | getMacroSyntax: | 1 | +| file://:0:0:0:0 | @attached(peer) | getKind: | 32 | getMacroSyntax: | 1 | +| test.swift:1:2:1:26 | #freestanding(declaration) | getKind: | 2 | getMacroSyntax: | 0 | +| test.swift:3:2:3:25 | #freestanding(expression) | getKind: | 1 | getMacroSyntax: | 0 | +| test.swift:5:2:5:17 | @attached(member) | getKind: | 16 | getMacroSyntax: | 1 | +| test.swift:6:2:6:20 | @attached(extension) | getKind: | 256 | getMacroSyntax: | 1 | +getConformance +getName +| file://:0:0:0:0 | @attached(peer) | 0 | $() | +| file://:0:0:0:0 | @attached(peer) | 0 | _lldb_summary() | diff --git a/swift/ql/test/extractor-tests/generated/decl/MacroDecl/MacroRole.ql b/swift/ql/test/extractor-tests/generated/decl/MacroDecl/MacroRole.ql index fb72920ffa4..5edff519fb8 100644 --- a/swift/ql/test/extractor-tests/generated/decl/MacroDecl/MacroRole.ql +++ b/swift/ql/test/extractor-tests/generated/decl/MacroDecl/MacroRole.ql @@ -2,13 +2,21 @@ import codeql.swift.elements import TestUtils -from MacroRole x, int getKind, int getMacroSyntax, int getNumberOfConformances, int getNumberOfNames -where +query predicate instances( + MacroRole x, string getKind__label, int getKind, string getMacroSyntax__label, int getMacroSyntax +) { toBeTested(x) and not x.isUnknown() and + getKind__label = "getKind:" and getKind = x.getKind() and - getMacroSyntax = x.getMacroSyntax() and - getNumberOfConformances = x.getNumberOfConformances() and - getNumberOfNames = x.getNumberOfNames() -select x, "getKind:", getKind, "getMacroSyntax:", getMacroSyntax, "getNumberOfConformances:", - getNumberOfConformances, "getNumberOfNames:", getNumberOfNames + getMacroSyntax__label = "getMacroSyntax:" and + getMacroSyntax = x.getMacroSyntax() +} + +query predicate getConformance(MacroRole x, int index, Expr getConformance) { + toBeTested(x) and not x.isUnknown() and getConformance = x.getConformance(index) +} + +query predicate getName(MacroRole x, int index, string getName) { + toBeTested(x) and not x.isUnknown() and getName = x.getName(index) +} diff --git a/swift/ql/test/extractor-tests/generated/decl/MacroDecl/MacroRole_getConformance.expected b/swift/ql/test/extractor-tests/generated/decl/MacroDecl/MacroRole_getConformance.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/swift/ql/test/extractor-tests/generated/decl/MacroDecl/MacroRole_getConformance.ql b/swift/ql/test/extractor-tests/generated/decl/MacroDecl/MacroRole_getConformance.ql deleted file mode 100644 index c3b8627010e..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/MacroDecl/MacroRole_getConformance.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from MacroRole x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getConformance(index) diff --git a/swift/ql/test/extractor-tests/generated/decl/MacroDecl/MacroRole_getName.expected b/swift/ql/test/extractor-tests/generated/decl/MacroDecl/MacroRole_getName.expected deleted file mode 100644 index 0c42bfc4601..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/MacroDecl/MacroRole_getName.expected +++ /dev/null @@ -1,2 +0,0 @@ -| file://:0:0:0:0 | @attached(peer) | 0 | $() | -| file://:0:0:0:0 | @attached(peer) | 0 | _lldb_summary() | diff --git a/swift/ql/test/extractor-tests/generated/decl/MacroDecl/MacroRole_getName.ql b/swift/ql/test/extractor-tests/generated/decl/MacroDecl/MacroRole_getName.ql deleted file mode 100644 index 296037f35c5..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/MacroDecl/MacroRole_getName.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from MacroRole x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getName(index) diff --git a/swift/ql/test/extractor-tests/generated/decl/ModuleDecl/ModuleDecl.expected b/swift/ql/test/extractor-tests/generated/decl/ModuleDecl/ModuleDecl.expected index 37ee373dc83..42d051d0a4f 100644 --- a/swift/ql/test/extractor-tests/generated/decl/ModuleDecl/ModuleDecl.expected +++ b/swift/ql/test/extractor-tests/generated/decl/ModuleDecl/ModuleDecl.expected @@ -1,3 +1,20 @@ -| file://:0:0:0:0 | Foo | getModule: | file://:0:0:0:0 | Foo | getNumberOfMembers: | 0 | getInterfaceType: | module | getName: | Foo | getNumberOfInheritedTypes: | 0 | isBuiltinModule: | no | isSystemModule: | no | getNumberOfImportedModules: | 5 | getNumberOfExportedModules: | 1 | -| file://:0:0:0:0 | __ObjC | getModule: | file://:0:0:0:0 | __ObjC | getNumberOfMembers: | 0 | getInterfaceType: | module<__ObjC> | getName: | __ObjC | getNumberOfInheritedTypes: | 0 | isBuiltinModule: | no | isSystemModule: | no | getNumberOfImportedModules: | 1 | getNumberOfExportedModules: | 0 | -| file://:0:0:0:0 | default_module_name | getModule: | file://:0:0:0:0 | default_module_name | getNumberOfMembers: | 0 | getInterfaceType: | module | getName: | default_module_name | getNumberOfInheritedTypes: | 0 | isBuiltinModule: | no | isSystemModule: | no | getNumberOfImportedModules: | 5 | getNumberOfExportedModules: | 0 | +instances +| file://:0:0:0:0 | Foo | getModule: | file://:0:0:0:0 | Foo | getInterfaceType: | module | getName: | Foo | isBuiltinModule: | no | isSystemModule: | no | +| file://:0:0:0:0 | __ObjC | getModule: | file://:0:0:0:0 | __ObjC | getInterfaceType: | module<__ObjC> | getName: | __ObjC | isBuiltinModule: | no | isSystemModule: | no | +| file://:0:0:0:0 | default_module_name | getModule: | file://:0:0:0:0 | default_module_name | getInterfaceType: | module | getName: | default_module_name | isBuiltinModule: | no | isSystemModule: | no | +getMember +getInheritedType +getAnImportedModule +| file://:0:0:0:0 | Foo | file://:0:0:0:0 | Swift | +| file://:0:0:0:0 | Foo | file://:0:0:0:0 | SwiftOnoneSupport | +| file://:0:0:0:0 | Foo | file://:0:0:0:0 | _Concurrency | +| file://:0:0:0:0 | Foo | file://:0:0:0:0 | _StringProcessing | +| file://:0:0:0:0 | Foo | file://:0:0:0:0 | _SwiftConcurrencyShims | +| file://:0:0:0:0 | __ObjC | file://:0:0:0:0 | Swift | +| file://:0:0:0:0 | default_module_name | file://:0:0:0:0 | Swift | +| file://:0:0:0:0 | default_module_name | file://:0:0:0:0 | SwiftOnoneSupport | +| file://:0:0:0:0 | default_module_name | file://:0:0:0:0 | _Concurrency | +| file://:0:0:0:0 | default_module_name | file://:0:0:0:0 | _StringProcessing | +| file://:0:0:0:0 | default_module_name | file://:0:0:0:0 | _SwiftConcurrencyShims | +getAnExportedModule +| file://:0:0:0:0 | Foo | file://:0:0:0:0 | Swift | diff --git a/swift/ql/test/extractor-tests/generated/decl/ModuleDecl/ModuleDecl.ql b/swift/ql/test/extractor-tests/generated/decl/ModuleDecl/ModuleDecl.ql index f48c8ae976c..911474839d4 100644 --- a/swift/ql/test/extractor-tests/generated/decl/ModuleDecl/ModuleDecl.ql +++ b/swift/ql/test/extractor-tests/generated/decl/ModuleDecl/ModuleDecl.ql @@ -2,24 +2,37 @@ import codeql.swift.elements import TestUtils -from - ModuleDecl x, ModuleDecl getModule, int getNumberOfMembers, Type getInterfaceType, string getName, - int getNumberOfInheritedTypes, string isBuiltinModule, string isSystemModule, - int getNumberOfImportedModules, int getNumberOfExportedModules -where +query predicate instances( + ModuleDecl x, string getModule__label, ModuleDecl getModule, string getInterfaceType__label, + Type getInterfaceType, string getName__label, string getName, string isBuiltinModule__label, + string isBuiltinModule, string isSystemModule__label, string isSystemModule +) { toBeTested(x) and not x.isUnknown() and + getModule__label = "getModule:" and getModule = x.getModule() and - getNumberOfMembers = x.getNumberOfMembers() and + getInterfaceType__label = "getInterfaceType:" and getInterfaceType = x.getInterfaceType() and + getName__label = "getName:" and getName = x.getName() and - getNumberOfInheritedTypes = x.getNumberOfInheritedTypes() and + isBuiltinModule__label = "isBuiltinModule:" and (if x.isBuiltinModule() then isBuiltinModule = "yes" else isBuiltinModule = "no") and - (if x.isSystemModule() then isSystemModule = "yes" else isSystemModule = "no") and - getNumberOfImportedModules = x.getNumberOfImportedModules() and - getNumberOfExportedModules = x.getNumberOfExportedModules() -select x, "getModule:", getModule, "getNumberOfMembers:", getNumberOfMembers, "getInterfaceType:", - getInterfaceType, "getName:", getName, "getNumberOfInheritedTypes:", getNumberOfInheritedTypes, - "isBuiltinModule:", isBuiltinModule, "isSystemModule:", isSystemModule, - "getNumberOfImportedModules:", getNumberOfImportedModules, "getNumberOfExportedModules:", - getNumberOfExportedModules + isSystemModule__label = "isSystemModule:" and + if x.isSystemModule() then isSystemModule = "yes" else isSystemModule = "no" +} + +query predicate getMember(ModuleDecl x, int index, Decl getMember) { + toBeTested(x) and not x.isUnknown() and getMember = x.getMember(index) +} + +query predicate getInheritedType(ModuleDecl x, int index, Type getInheritedType) { + toBeTested(x) and not x.isUnknown() and getInheritedType = x.getInheritedType(index) +} + +query predicate getAnImportedModule(ModuleDecl x, ModuleDecl getAnImportedModule) { + toBeTested(x) and not x.isUnknown() and getAnImportedModule = x.getAnImportedModule() +} + +query predicate getAnExportedModule(ModuleDecl x, ModuleDecl getAnExportedModule) { + toBeTested(x) and not x.isUnknown() and getAnExportedModule = x.getAnExportedModule() +} diff --git a/swift/ql/test/extractor-tests/generated/decl/ModuleDecl/ModuleDecl_getAnExportedModule.expected b/swift/ql/test/extractor-tests/generated/decl/ModuleDecl/ModuleDecl_getAnExportedModule.expected deleted file mode 100644 index 271c68f34fd..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/ModuleDecl/ModuleDecl_getAnExportedModule.expected +++ /dev/null @@ -1 +0,0 @@ -| file://:0:0:0:0 | Foo | file://:0:0:0:0 | Swift | diff --git a/swift/ql/test/extractor-tests/generated/decl/ModuleDecl/ModuleDecl_getAnExportedModule.ql b/swift/ql/test/extractor-tests/generated/decl/ModuleDecl/ModuleDecl_getAnExportedModule.ql deleted file mode 100644 index 1a0476fb658..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/ModuleDecl/ModuleDecl_getAnExportedModule.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from ModuleDecl x -where toBeTested(x) and not x.isUnknown() -select x, x.getAnExportedModule() diff --git a/swift/ql/test/extractor-tests/generated/decl/ModuleDecl/ModuleDecl_getAnImportedModule.expected b/swift/ql/test/extractor-tests/generated/decl/ModuleDecl/ModuleDecl_getAnImportedModule.expected deleted file mode 100644 index 57f89e195bc..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/ModuleDecl/ModuleDecl_getAnImportedModule.expected +++ /dev/null @@ -1,11 +0,0 @@ -| file://:0:0:0:0 | Foo | file://:0:0:0:0 | Swift | -| file://:0:0:0:0 | Foo | file://:0:0:0:0 | SwiftOnoneSupport | -| file://:0:0:0:0 | Foo | file://:0:0:0:0 | _Concurrency | -| file://:0:0:0:0 | Foo | file://:0:0:0:0 | _StringProcessing | -| file://:0:0:0:0 | Foo | file://:0:0:0:0 | _SwiftConcurrencyShims | -| file://:0:0:0:0 | __ObjC | file://:0:0:0:0 | Swift | -| file://:0:0:0:0 | default_module_name | file://:0:0:0:0 | Swift | -| file://:0:0:0:0 | default_module_name | file://:0:0:0:0 | SwiftOnoneSupport | -| file://:0:0:0:0 | default_module_name | file://:0:0:0:0 | _Concurrency | -| file://:0:0:0:0 | default_module_name | file://:0:0:0:0 | _StringProcessing | -| file://:0:0:0:0 | default_module_name | file://:0:0:0:0 | _SwiftConcurrencyShims | diff --git a/swift/ql/test/extractor-tests/generated/decl/ModuleDecl/ModuleDecl_getAnImportedModule.ql b/swift/ql/test/extractor-tests/generated/decl/ModuleDecl/ModuleDecl_getAnImportedModule.ql deleted file mode 100644 index fa399bef432..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/ModuleDecl/ModuleDecl_getAnImportedModule.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from ModuleDecl x -where toBeTested(x) and not x.isUnknown() -select x, x.getAnImportedModule() diff --git a/swift/ql/test/extractor-tests/generated/decl/ModuleDecl/ModuleDecl_getInheritedType.expected b/swift/ql/test/extractor-tests/generated/decl/ModuleDecl/ModuleDecl_getInheritedType.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/swift/ql/test/extractor-tests/generated/decl/ModuleDecl/ModuleDecl_getInheritedType.ql b/swift/ql/test/extractor-tests/generated/decl/ModuleDecl/ModuleDecl_getInheritedType.ql deleted file mode 100644 index 1a144659637..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/ModuleDecl/ModuleDecl_getInheritedType.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from ModuleDecl x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getInheritedType(index) diff --git a/swift/ql/test/extractor-tests/generated/decl/ModuleDecl/ModuleDecl_getMember.expected b/swift/ql/test/extractor-tests/generated/decl/ModuleDecl/ModuleDecl_getMember.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/swift/ql/test/extractor-tests/generated/decl/ModuleDecl/ModuleDecl_getMember.ql b/swift/ql/test/extractor-tests/generated/decl/ModuleDecl/ModuleDecl_getMember.ql deleted file mode 100644 index 1510213d287..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/ModuleDecl/ModuleDecl_getMember.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from ModuleDecl x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getMember(index) diff --git a/swift/ql/test/extractor-tests/generated/decl/NamedFunction/NamedFunction.expected b/swift/ql/test/extractor-tests/generated/decl/NamedFunction/NamedFunction.expected index 975da093321..df6bc9c9761 100644 --- a/swift/ql/test/extractor-tests/generated/decl/NamedFunction/NamedFunction.expected +++ b/swift/ql/test/extractor-tests/generated/decl/NamedFunction/NamedFunction.expected @@ -1,5 +1,31 @@ -| functions.swift:1:1:3:1 | foo() | hasName: | yes | hasSelfParam: | no | getNumberOfParams: | 0 | hasBody: | yes | getNumberOfCaptures: | 0 | getNumberOfGenericTypeParams: | 0 | getModule: | file://:0:0:0:0 | functions | getNumberOfMembers: | 0 | getInterfaceType: | () -> Int | -| functions.swift:5:1:7:1 | bar(_:d:) | hasName: | yes | hasSelfParam: | no | getNumberOfParams: | 2 | hasBody: | yes | getNumberOfCaptures: | 0 | getNumberOfGenericTypeParams: | 0 | getModule: | file://:0:0:0:0 | functions | getNumberOfMembers: | 0 | getInterfaceType: | (Int, Double) -> Int | -| functions.swift:10:5:10:28 | noBody(x:) | hasName: | yes | hasSelfParam: | yes | getNumberOfParams: | 1 | hasBody: | no | getNumberOfCaptures: | 0 | getNumberOfGenericTypeParams: | 0 | getModule: | file://:0:0:0:0 | functions | getNumberOfMembers: | 0 | getInterfaceType: | (Self) -> (Int) -> Int | -| functions.swift:13:1:15:1 | variadic(_:) | hasName: | yes | hasSelfParam: | no | getNumberOfParams: | 1 | hasBody: | yes | getNumberOfCaptures: | 0 | getNumberOfGenericTypeParams: | 0 | getModule: | file://:0:0:0:0 | functions | getNumberOfMembers: | 0 | getInterfaceType: | (Int...) -> () | -| functions.swift:17:1:19:1 | generic(x:y:) | hasName: | yes | hasSelfParam: | no | getNumberOfParams: | 2 | hasBody: | yes | getNumberOfCaptures: | 0 | getNumberOfGenericTypeParams: | 2 | getModule: | file://:0:0:0:0 | functions | getNumberOfMembers: | 0 | getInterfaceType: | (X, Y) -> () | +instances +| functions.swift:1:1:3:1 | foo() | getModule: | file://:0:0:0:0 | functions | getInterfaceType: | () -> Int | +| functions.swift:5:1:7:1 | bar(_:d:) | getModule: | file://:0:0:0:0 | functions | getInterfaceType: | (Int, Double) -> Int | +| functions.swift:10:5:10:28 | noBody(x:) | getModule: | file://:0:0:0:0 | functions | getInterfaceType: | (Self) -> (Int) -> Int | +| functions.swift:13:1:15:1 | variadic(_:) | getModule: | file://:0:0:0:0 | functions | getInterfaceType: | (Int...) -> () | +| functions.swift:17:1:19:1 | generic(x:y:) | getModule: | file://:0:0:0:0 | functions | getInterfaceType: | (X, Y) -> () | +getName +| functions.swift:1:1:3:1 | foo() | foo() | +| functions.swift:5:1:7:1 | bar(_:d:) | bar(_:d:) | +| functions.swift:10:5:10:28 | noBody(x:) | noBody(x:) | +| functions.swift:13:1:15:1 | variadic(_:) | variadic(_:) | +| functions.swift:17:1:19:1 | generic(x:y:) | generic(x:y:) | +getSelfParam +| functions.swift:10:5:10:28 | noBody(x:) | functions.swift:10:10:10:10 | self | +getParam +| functions.swift:5:1:7:1 | bar(_:d:) | 0 | functions.swift:5:10:5:15 | x | +| functions.swift:5:1:7:1 | bar(_:d:) | 1 | functions.swift:5:20:5:25 | y | +| functions.swift:10:5:10:28 | noBody(x:) | 0 | functions.swift:10:17:10:20 | x | +| functions.swift:13:1:15:1 | variadic(_:) | 0 | functions.swift:13:15:13:26 | ints | +| functions.swift:17:1:19:1 | generic(x:y:) | 0 | functions.swift:17:20:17:23 | x | +| functions.swift:17:1:19:1 | generic(x:y:) | 1 | functions.swift:17:26:17:29 | y | +getBody +| functions.swift:1:1:3:1 | foo() | functions.swift:1:19:3:1 | { ... } | +| functions.swift:5:1:7:1 | bar(_:d:) | functions.swift:5:40:7:1 | { ... } | +| functions.swift:13:1:15:1 | variadic(_:) | functions.swift:13:31:15:1 | { ... } | +| functions.swift:17:1:19:1 | generic(x:y:) | functions.swift:17:32:19:1 | { ... } | +getCapture +getGenericTypeParam +| functions.swift:17:1:19:1 | generic(x:y:) | 0 | functions.swift:17:14:17:14 | X | +| functions.swift:17:1:19:1 | generic(x:y:) | 1 | functions.swift:17:17:17:17 | Y | +getMember diff --git a/swift/ql/test/extractor-tests/generated/decl/NamedFunction/NamedFunction.ql b/swift/ql/test/extractor-tests/generated/decl/NamedFunction/NamedFunction.ql index b040631d9b0..ef59d8da5d6 100644 --- a/swift/ql/test/extractor-tests/generated/decl/NamedFunction/NamedFunction.ql +++ b/swift/ql/test/extractor-tests/generated/decl/NamedFunction/NamedFunction.ql @@ -2,23 +2,44 @@ import codeql.swift.elements import TestUtils -from - NamedFunction x, string hasName, string hasSelfParam, int getNumberOfParams, string hasBody, - int getNumberOfCaptures, int getNumberOfGenericTypeParams, ModuleDecl getModule, - int getNumberOfMembers, Type getInterfaceType -where +query predicate instances( + NamedFunction x, string getModule__label, ModuleDecl getModule, string getInterfaceType__label, + Type getInterfaceType +) { toBeTested(x) and not x.isUnknown() and - (if x.hasName() then hasName = "yes" else hasName = "no") and - (if x.hasSelfParam() then hasSelfParam = "yes" else hasSelfParam = "no") and - getNumberOfParams = x.getNumberOfParams() and - (if x.hasBody() then hasBody = "yes" else hasBody = "no") and - getNumberOfCaptures = x.getNumberOfCaptures() and - getNumberOfGenericTypeParams = x.getNumberOfGenericTypeParams() and + getModule__label = "getModule:" and getModule = x.getModule() and - getNumberOfMembers = x.getNumberOfMembers() and + getInterfaceType__label = "getInterfaceType:" and getInterfaceType = x.getInterfaceType() -select x, "hasName:", hasName, "hasSelfParam:", hasSelfParam, "getNumberOfParams:", - getNumberOfParams, "hasBody:", hasBody, "getNumberOfCaptures:", getNumberOfCaptures, - "getNumberOfGenericTypeParams:", getNumberOfGenericTypeParams, "getModule:", getModule, - "getNumberOfMembers:", getNumberOfMembers, "getInterfaceType:", getInterfaceType +} + +query predicate getName(NamedFunction x, string getName) { + toBeTested(x) and not x.isUnknown() and getName = x.getName() +} + +query predicate getSelfParam(NamedFunction x, ParamDecl getSelfParam) { + toBeTested(x) and not x.isUnknown() and getSelfParam = x.getSelfParam() +} + +query predicate getParam(NamedFunction x, int index, ParamDecl getParam) { + toBeTested(x) and not x.isUnknown() and getParam = x.getParam(index) +} + +query predicate getBody(NamedFunction x, BraceStmt getBody) { + toBeTested(x) and not x.isUnknown() and getBody = x.getBody() +} + +query predicate getCapture(NamedFunction x, int index, CapturedDecl getCapture) { + toBeTested(x) and not x.isUnknown() and getCapture = x.getCapture(index) +} + +query predicate getGenericTypeParam( + NamedFunction x, int index, GenericTypeParamDecl getGenericTypeParam +) { + toBeTested(x) and not x.isUnknown() and getGenericTypeParam = x.getGenericTypeParam(index) +} + +query predicate getMember(NamedFunction x, int index, Decl getMember) { + toBeTested(x) and not x.isUnknown() and getMember = x.getMember(index) +} diff --git a/swift/ql/test/extractor-tests/generated/decl/NamedFunction/NamedFunction_getBody.expected b/swift/ql/test/extractor-tests/generated/decl/NamedFunction/NamedFunction_getBody.expected deleted file mode 100644 index 54fddb5c57c..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/NamedFunction/NamedFunction_getBody.expected +++ /dev/null @@ -1,4 +0,0 @@ -| functions.swift:1:1:3:1 | foo() | functions.swift:1:19:3:1 | { ... } | -| functions.swift:5:1:7:1 | bar(_:d:) | functions.swift:5:40:7:1 | { ... } | -| functions.swift:13:1:15:1 | variadic(_:) | functions.swift:13:31:15:1 | { ... } | -| functions.swift:17:1:19:1 | generic(x:y:) | functions.swift:17:32:19:1 | { ... } | diff --git a/swift/ql/test/extractor-tests/generated/decl/NamedFunction/NamedFunction_getBody.ql b/swift/ql/test/extractor-tests/generated/decl/NamedFunction/NamedFunction_getBody.ql deleted file mode 100644 index 8f02d92b3d7..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/NamedFunction/NamedFunction_getBody.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from NamedFunction x -where toBeTested(x) and not x.isUnknown() -select x, x.getBody() diff --git a/swift/ql/test/extractor-tests/generated/decl/NamedFunction/NamedFunction_getCapture.expected b/swift/ql/test/extractor-tests/generated/decl/NamedFunction/NamedFunction_getCapture.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/swift/ql/test/extractor-tests/generated/decl/NamedFunction/NamedFunction_getCapture.ql b/swift/ql/test/extractor-tests/generated/decl/NamedFunction/NamedFunction_getCapture.ql deleted file mode 100644 index ebb3474649b..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/NamedFunction/NamedFunction_getCapture.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from NamedFunction x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getCapture(index) diff --git a/swift/ql/test/extractor-tests/generated/decl/NamedFunction/NamedFunction_getGenericTypeParam.expected b/swift/ql/test/extractor-tests/generated/decl/NamedFunction/NamedFunction_getGenericTypeParam.expected deleted file mode 100644 index 0b0d62753ce..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/NamedFunction/NamedFunction_getGenericTypeParam.expected +++ /dev/null @@ -1,2 +0,0 @@ -| functions.swift:17:1:19:1 | generic(x:y:) | 0 | functions.swift:17:14:17:14 | X | -| functions.swift:17:1:19:1 | generic(x:y:) | 1 | functions.swift:17:17:17:17 | Y | diff --git a/swift/ql/test/extractor-tests/generated/decl/NamedFunction/NamedFunction_getGenericTypeParam.ql b/swift/ql/test/extractor-tests/generated/decl/NamedFunction/NamedFunction_getGenericTypeParam.ql deleted file mode 100644 index 03110243256..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/NamedFunction/NamedFunction_getGenericTypeParam.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from NamedFunction x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getGenericTypeParam(index) diff --git a/swift/ql/test/extractor-tests/generated/decl/NamedFunction/NamedFunction_getMember.expected b/swift/ql/test/extractor-tests/generated/decl/NamedFunction/NamedFunction_getMember.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/swift/ql/test/extractor-tests/generated/decl/NamedFunction/NamedFunction_getMember.ql b/swift/ql/test/extractor-tests/generated/decl/NamedFunction/NamedFunction_getMember.ql deleted file mode 100644 index ec7c7476c68..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/NamedFunction/NamedFunction_getMember.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from NamedFunction x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getMember(index) diff --git a/swift/ql/test/extractor-tests/generated/decl/NamedFunction/NamedFunction_getName.expected b/swift/ql/test/extractor-tests/generated/decl/NamedFunction/NamedFunction_getName.expected deleted file mode 100644 index 2cca221fe4d..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/NamedFunction/NamedFunction_getName.expected +++ /dev/null @@ -1,5 +0,0 @@ -| functions.swift:1:1:3:1 | foo() | foo() | -| functions.swift:5:1:7:1 | bar(_:d:) | bar(_:d:) | -| functions.swift:10:5:10:28 | noBody(x:) | noBody(x:) | -| functions.swift:13:1:15:1 | variadic(_:) | variadic(_:) | -| functions.swift:17:1:19:1 | generic(x:y:) | generic(x:y:) | diff --git a/swift/ql/test/extractor-tests/generated/decl/NamedFunction/NamedFunction_getName.ql b/swift/ql/test/extractor-tests/generated/decl/NamedFunction/NamedFunction_getName.ql deleted file mode 100644 index 553f3a3292d..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/NamedFunction/NamedFunction_getName.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from NamedFunction x -where toBeTested(x) and not x.isUnknown() -select x, x.getName() diff --git a/swift/ql/test/extractor-tests/generated/decl/NamedFunction/NamedFunction_getParam.expected b/swift/ql/test/extractor-tests/generated/decl/NamedFunction/NamedFunction_getParam.expected deleted file mode 100644 index f549b8615ad..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/NamedFunction/NamedFunction_getParam.expected +++ /dev/null @@ -1,6 +0,0 @@ -| functions.swift:5:1:7:1 | bar(_:d:) | 0 | functions.swift:5:10:5:15 | x | -| functions.swift:5:1:7:1 | bar(_:d:) | 1 | functions.swift:5:20:5:25 | y | -| functions.swift:10:5:10:28 | noBody(x:) | 0 | functions.swift:10:17:10:20 | x | -| functions.swift:13:1:15:1 | variadic(_:) | 0 | functions.swift:13:15:13:26 | ints | -| functions.swift:17:1:19:1 | generic(x:y:) | 0 | functions.swift:17:20:17:23 | x | -| functions.swift:17:1:19:1 | generic(x:y:) | 1 | functions.swift:17:26:17:29 | y | diff --git a/swift/ql/test/extractor-tests/generated/decl/NamedFunction/NamedFunction_getParam.ql b/swift/ql/test/extractor-tests/generated/decl/NamedFunction/NamedFunction_getParam.ql deleted file mode 100644 index 1755058ad72..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/NamedFunction/NamedFunction_getParam.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from NamedFunction x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getParam(index) diff --git a/swift/ql/test/extractor-tests/generated/decl/NamedFunction/NamedFunction_getSelfParam.expected b/swift/ql/test/extractor-tests/generated/decl/NamedFunction/NamedFunction_getSelfParam.expected deleted file mode 100644 index fb6370f56e8..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/NamedFunction/NamedFunction_getSelfParam.expected +++ /dev/null @@ -1 +0,0 @@ -| functions.swift:10:5:10:28 | noBody(x:) | functions.swift:10:10:10:10 | self | diff --git a/swift/ql/test/extractor-tests/generated/decl/NamedFunction/NamedFunction_getSelfParam.ql b/swift/ql/test/extractor-tests/generated/decl/NamedFunction/NamedFunction_getSelfParam.ql deleted file mode 100644 index 11a4563f6f1..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/NamedFunction/NamedFunction_getSelfParam.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from NamedFunction x -where toBeTested(x) and not x.isUnknown() -select x, x.getSelfParam() diff --git a/swift/ql/test/extractor-tests/generated/decl/OpaqueTypeDecl/OpaqueTypeDecl.expected b/swift/ql/test/extractor-tests/generated/decl/OpaqueTypeDecl/OpaqueTypeDecl.expected index c93a86b2164..8a5d39063f5 100644 --- a/swift/ql/test/extractor-tests/generated/decl/OpaqueTypeDecl/OpaqueTypeDecl.expected +++ b/swift/ql/test/extractor-tests/generated/decl/OpaqueTypeDecl/OpaqueTypeDecl.expected @@ -1,4 +1,13 @@ -| file://:0:0:0:0 | _ | getNumberOfGenericTypeParams: | 0 | getModule: | file://:0:0:0:0 | opaque_types | getNumberOfMembers: | 0 | getInterfaceType: | (some Base).Type | getName: | _ | getNumberOfInheritedTypes: | 0 | getNamingDeclaration: | opaque_types.swift:9:1:9:51 | baz(_:) | getNumberOfOpaqueGenericParams: | 1 | -| file://:0:0:0:0 | _ | getNumberOfGenericTypeParams: | 0 | getModule: | file://:0:0:0:0 | opaque_types | getNumberOfMembers: | 0 | getInterfaceType: | (some P).Type | getName: | _ | getNumberOfInheritedTypes: | 0 | getNamingDeclaration: | opaque_types.swift:5:1:5:45 | bar(_:) | getNumberOfOpaqueGenericParams: | 1 | -| file://:0:0:0:0 | _ | getNumberOfGenericTypeParams: | 0 | getModule: | file://:0:0:0:0 | opaque_types | getNumberOfMembers: | 0 | getInterfaceType: | (some P).Type | getName: | _ | getNumberOfInheritedTypes: | 0 | getNamingDeclaration: | opaque_types.swift:13:1:13:59 | bazz() | getNumberOfOpaqueGenericParams: | 1 | -| file://:0:0:0:0 | _ | getNumberOfGenericTypeParams: | 0 | getModule: | file://:0:0:0:0 | opaque_types | getNumberOfMembers: | 0 | getInterfaceType: | (some SignedInteger).Type | getName: | _ | getNumberOfInheritedTypes: | 0 | getNamingDeclaration: | opaque_types.swift:1:1:1:45 | foo() | getNumberOfOpaqueGenericParams: | 1 | +instances +| file://:0:0:0:0 | _ | getModule: | file://:0:0:0:0 | opaque_types | getInterfaceType: | (some Base).Type | getName: | _ | getNamingDeclaration: | opaque_types.swift:9:1:9:51 | baz(_:) | +| file://:0:0:0:0 | _ | getModule: | file://:0:0:0:0 | opaque_types | getInterfaceType: | (some P).Type | getName: | _ | getNamingDeclaration: | opaque_types.swift:5:1:5:45 | bar(_:) | +| file://:0:0:0:0 | _ | getModule: | file://:0:0:0:0 | opaque_types | getInterfaceType: | (some P).Type | getName: | _ | getNamingDeclaration: | opaque_types.swift:13:1:13:59 | bazz() | +| file://:0:0:0:0 | _ | getModule: | file://:0:0:0:0 | opaque_types | getInterfaceType: | (some SignedInteger).Type | getName: | _ | getNamingDeclaration: | opaque_types.swift:1:1:1:45 | foo() | +getGenericTypeParam +getMember +getInheritedType +getOpaqueGenericParam +| file://:0:0:0:0 | _ | 0 | \u03c4_0_0 | +| file://:0:0:0:0 | _ | 0 | \u03c4_1_0 | +| file://:0:0:0:0 | _ | 0 | \u03c4_1_0 | +| file://:0:0:0:0 | _ | 0 | \u03c4_1_0 | diff --git a/swift/ql/test/extractor-tests/generated/decl/OpaqueTypeDecl/OpaqueTypeDecl.ql b/swift/ql/test/extractor-tests/generated/decl/OpaqueTypeDecl/OpaqueTypeDecl.ql index c81a2adc293..64b9149c1d0 100644 --- a/swift/ql/test/extractor-tests/generated/decl/OpaqueTypeDecl/OpaqueTypeDecl.ql +++ b/swift/ql/test/extractor-tests/generated/decl/OpaqueTypeDecl/OpaqueTypeDecl.ql @@ -2,22 +2,39 @@ import codeql.swift.elements import TestUtils -from - OpaqueTypeDecl x, int getNumberOfGenericTypeParams, ModuleDecl getModule, int getNumberOfMembers, - Type getInterfaceType, string getName, int getNumberOfInheritedTypes, - ValueDecl getNamingDeclaration, int getNumberOfOpaqueGenericParams -where +query predicate instances( + OpaqueTypeDecl x, string getModule__label, ModuleDecl getModule, string getInterfaceType__label, + Type getInterfaceType, string getName__label, string getName, string getNamingDeclaration__label, + ValueDecl getNamingDeclaration +) { toBeTested(x) and not x.isUnknown() and - getNumberOfGenericTypeParams = x.getNumberOfGenericTypeParams() and + getModule__label = "getModule:" and getModule = x.getModule() and - getNumberOfMembers = x.getNumberOfMembers() and + getInterfaceType__label = "getInterfaceType:" and getInterfaceType = x.getInterfaceType() and + getName__label = "getName:" and getName = x.getName() and - getNumberOfInheritedTypes = x.getNumberOfInheritedTypes() and - getNamingDeclaration = x.getNamingDeclaration() and - getNumberOfOpaqueGenericParams = x.getNumberOfOpaqueGenericParams() -select x, "getNumberOfGenericTypeParams:", getNumberOfGenericTypeParams, "getModule:", getModule, - "getNumberOfMembers:", getNumberOfMembers, "getInterfaceType:", getInterfaceType, "getName:", - getName, "getNumberOfInheritedTypes:", getNumberOfInheritedTypes, "getNamingDeclaration:", - getNamingDeclaration, "getNumberOfOpaqueGenericParams:", getNumberOfOpaqueGenericParams + getNamingDeclaration__label = "getNamingDeclaration:" and + getNamingDeclaration = x.getNamingDeclaration() +} + +query predicate getGenericTypeParam( + OpaqueTypeDecl x, int index, GenericTypeParamDecl getGenericTypeParam +) { + toBeTested(x) and not x.isUnknown() and getGenericTypeParam = x.getGenericTypeParam(index) +} + +query predicate getMember(OpaqueTypeDecl x, int index, Decl getMember) { + toBeTested(x) and not x.isUnknown() and getMember = x.getMember(index) +} + +query predicate getInheritedType(OpaqueTypeDecl x, int index, Type getInheritedType) { + toBeTested(x) and not x.isUnknown() and getInheritedType = x.getInheritedType(index) +} + +query predicate getOpaqueGenericParam( + OpaqueTypeDecl x, int index, GenericTypeParamType getOpaqueGenericParam +) { + toBeTested(x) and not x.isUnknown() and getOpaqueGenericParam = x.getOpaqueGenericParam(index) +} diff --git a/swift/ql/test/extractor-tests/generated/decl/OpaqueTypeDecl/OpaqueTypeDecl_getGenericTypeParam.expected b/swift/ql/test/extractor-tests/generated/decl/OpaqueTypeDecl/OpaqueTypeDecl_getGenericTypeParam.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/swift/ql/test/extractor-tests/generated/decl/OpaqueTypeDecl/OpaqueTypeDecl_getGenericTypeParam.ql b/swift/ql/test/extractor-tests/generated/decl/OpaqueTypeDecl/OpaqueTypeDecl_getGenericTypeParam.ql deleted file mode 100644 index 68e19d5d16c..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/OpaqueTypeDecl/OpaqueTypeDecl_getGenericTypeParam.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from OpaqueTypeDecl x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getGenericTypeParam(index) diff --git a/swift/ql/test/extractor-tests/generated/decl/OpaqueTypeDecl/OpaqueTypeDecl_getInheritedType.expected b/swift/ql/test/extractor-tests/generated/decl/OpaqueTypeDecl/OpaqueTypeDecl_getInheritedType.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/swift/ql/test/extractor-tests/generated/decl/OpaqueTypeDecl/OpaqueTypeDecl_getInheritedType.ql b/swift/ql/test/extractor-tests/generated/decl/OpaqueTypeDecl/OpaqueTypeDecl_getInheritedType.ql deleted file mode 100644 index dd9f8245b20..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/OpaqueTypeDecl/OpaqueTypeDecl_getInheritedType.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from OpaqueTypeDecl x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getInheritedType(index) diff --git a/swift/ql/test/extractor-tests/generated/decl/OpaqueTypeDecl/OpaqueTypeDecl_getMember.expected b/swift/ql/test/extractor-tests/generated/decl/OpaqueTypeDecl/OpaqueTypeDecl_getMember.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/swift/ql/test/extractor-tests/generated/decl/OpaqueTypeDecl/OpaqueTypeDecl_getMember.ql b/swift/ql/test/extractor-tests/generated/decl/OpaqueTypeDecl/OpaqueTypeDecl_getMember.ql deleted file mode 100644 index a1962a41c80..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/OpaqueTypeDecl/OpaqueTypeDecl_getMember.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from OpaqueTypeDecl x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getMember(index) diff --git a/swift/ql/test/extractor-tests/generated/decl/OpaqueTypeDecl/OpaqueTypeDecl_getOpaqueGenericParam.expected b/swift/ql/test/extractor-tests/generated/decl/OpaqueTypeDecl/OpaqueTypeDecl_getOpaqueGenericParam.expected deleted file mode 100644 index 922da8a9c1a..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/OpaqueTypeDecl/OpaqueTypeDecl_getOpaqueGenericParam.expected +++ /dev/null @@ -1,4 +0,0 @@ -| file://:0:0:0:0 | _ | 0 | \u03c4_0_0 | -| file://:0:0:0:0 | _ | 0 | \u03c4_1_0 | -| file://:0:0:0:0 | _ | 0 | \u03c4_1_0 | -| file://:0:0:0:0 | _ | 0 | \u03c4_1_0 | diff --git a/swift/ql/test/extractor-tests/generated/decl/OpaqueTypeDecl/OpaqueTypeDecl_getOpaqueGenericParam.ql b/swift/ql/test/extractor-tests/generated/decl/OpaqueTypeDecl/OpaqueTypeDecl_getOpaqueGenericParam.ql deleted file mode 100644 index aca25644dbb..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/OpaqueTypeDecl/OpaqueTypeDecl_getOpaqueGenericParam.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from OpaqueTypeDecl x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getOpaqueGenericParam(index) diff --git a/swift/ql/test/extractor-tests/generated/decl/ParamDecl/ParamDecl.expected b/swift/ql/test/extractor-tests/generated/decl/ParamDecl/ParamDecl.expected index ffb1fa02072..f67d25dc31b 100644 --- a/swift/ql/test/extractor-tests/generated/decl/ParamDecl/ParamDecl.expected +++ b/swift/ql/test/extractor-tests/generated/decl/ParamDecl/ParamDecl.expected @@ -1,59 +1,79 @@ -| file://:0:0:0:0 | x | getModule: | file://:0:0:0:0 | param_decls | getNumberOfMembers: | 0 | getInterfaceType: | Int | getNumberOfAccessors: | 0 | getName: | x | getType: | Int | hasAttachedPropertyWrapperType: | no | hasParentPattern: | no | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | isInout: | no | hasPropertyWrapperLocalWrappedVarBinding: | no | hasPropertyWrapperLocalWrappedVar: | no | -| file://:0:0:0:0 | y | getModule: | file://:0:0:0:0 | param_decls | getNumberOfMembers: | 0 | getInterfaceType: | Int | getNumberOfAccessors: | 0 | getName: | y | getType: | Int | hasAttachedPropertyWrapperType: | no | hasParentPattern: | no | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | isInout: | no | hasPropertyWrapperLocalWrappedVarBinding: | no | hasPropertyWrapperLocalWrappedVar: | no | -| param_decls.swift:1:10:1:13 | _ | getModule: | file://:0:0:0:0 | param_decls | getNumberOfMembers: | 0 | getInterfaceType: | Int | getNumberOfAccessors: | 0 | getName: | _ | getType: | Int | hasAttachedPropertyWrapperType: | no | hasParentPattern: | no | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | isInout: | no | hasPropertyWrapperLocalWrappedVarBinding: | no | hasPropertyWrapperLocalWrappedVar: | no | -| param_decls.swift:1:18:1:29 | y | getModule: | file://:0:0:0:0 | param_decls | getNumberOfMembers: | 0 | getInterfaceType: | Double | getNumberOfAccessors: | 0 | getName: | y | getType: | Double | hasAttachedPropertyWrapperType: | no | hasParentPattern: | no | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | isInout: | yes | hasPropertyWrapperLocalWrappedVarBinding: | no | hasPropertyWrapperLocalWrappedVar: | no | -| param_decls.swift:2:10:2:13 | _ | getModule: | file://:0:0:0:0 | param_decls | getNumberOfMembers: | 0 | getInterfaceType: | Int | getNumberOfAccessors: | 0 | getName: | _ | getType: | Int | hasAttachedPropertyWrapperType: | no | hasParentPattern: | no | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | isInout: | no | hasPropertyWrapperLocalWrappedVarBinding: | no | hasPropertyWrapperLocalWrappedVar: | no | -| param_decls.swift:2:18:2:29 | y | getModule: | file://:0:0:0:0 | param_decls | getNumberOfMembers: | 0 | getInterfaceType: | Double | getNumberOfAccessors: | 0 | getName: | y | getType: | Double | hasAttachedPropertyWrapperType: | no | hasParentPattern: | no | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | isInout: | yes | hasPropertyWrapperLocalWrappedVarBinding: | no | hasPropertyWrapperLocalWrappedVar: | no | -| param_decls.swift:4:8:4:8 | self | getModule: | file://:0:0:0:0 | param_decls | getNumberOfMembers: | 0 | getInterfaceType: | S | getNumberOfAccessors: | 0 | getName: | self | getType: | S | hasAttachedPropertyWrapperType: | no | hasParentPattern: | no | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | isInout: | yes | hasPropertyWrapperLocalWrappedVarBinding: | no | hasPropertyWrapperLocalWrappedVar: | no | -| param_decls.swift:5:5:5:5 | self | getModule: | file://:0:0:0:0 | param_decls | getNumberOfMembers: | 0 | getInterfaceType: | S | getNumberOfAccessors: | 0 | getName: | self | getType: | S | hasAttachedPropertyWrapperType: | no | hasParentPattern: | no | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | isInout: | yes | hasPropertyWrapperLocalWrappedVarBinding: | no | hasPropertyWrapperLocalWrappedVar: | no | -| param_decls.swift:5:15:5:15 | x | getModule: | file://:0:0:0:0 | param_decls | getNumberOfMembers: | 0 | getInterfaceType: | Int | getNumberOfAccessors: | 0 | getName: | x | getType: | Int | hasAttachedPropertyWrapperType: | no | hasParentPattern: | no | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | isInout: | no | hasPropertyWrapperLocalWrappedVarBinding: | no | hasPropertyWrapperLocalWrappedVar: | no | -| param_decls.swift:5:15:5:15 | x | getModule: | file://:0:0:0:0 | param_decls | getNumberOfMembers: | 0 | getInterfaceType: | Int | getNumberOfAccessors: | 0 | getName: | x | getType: | Int | hasAttachedPropertyWrapperType: | no | hasParentPattern: | no | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | isInout: | no | hasPropertyWrapperLocalWrappedVarBinding: | no | hasPropertyWrapperLocalWrappedVar: | no | -| param_decls.swift:5:15:5:18 | x | getModule: | file://:0:0:0:0 | param_decls | getNumberOfMembers: | 0 | getInterfaceType: | Int | getNumberOfAccessors: | 0 | getName: | x | getType: | Int | hasAttachedPropertyWrapperType: | no | hasParentPattern: | no | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | isInout: | no | hasPropertyWrapperLocalWrappedVarBinding: | no | hasPropertyWrapperLocalWrappedVar: | no | -| param_decls.swift:5:23:5:23 | y | getModule: | file://:0:0:0:0 | param_decls | getNumberOfMembers: | 0 | getInterfaceType: | Int | getNumberOfAccessors: | 0 | getName: | y | getType: | Int | hasAttachedPropertyWrapperType: | no | hasParentPattern: | no | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | isInout: | no | hasPropertyWrapperLocalWrappedVarBinding: | no | hasPropertyWrapperLocalWrappedVar: | no | -| param_decls.swift:5:23:5:23 | y | getModule: | file://:0:0:0:0 | param_decls | getNumberOfMembers: | 0 | getInterfaceType: | Int | getNumberOfAccessors: | 0 | getName: | y | getType: | Int | hasAttachedPropertyWrapperType: | no | hasParentPattern: | no | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | isInout: | no | hasPropertyWrapperLocalWrappedVarBinding: | no | hasPropertyWrapperLocalWrappedVar: | no | -| param_decls.swift:5:23:5:26 | y | getModule: | file://:0:0:0:0 | param_decls | getNumberOfMembers: | 0 | getInterfaceType: | Int | getNumberOfAccessors: | 0 | getName: | y | getType: | Int | hasAttachedPropertyWrapperType: | no | hasParentPattern: | no | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | isInout: | no | hasPropertyWrapperLocalWrappedVarBinding: | no | hasPropertyWrapperLocalWrappedVar: | no | -| param_decls.swift:6:9:6:9 | self | getModule: | file://:0:0:0:0 | param_decls | getNumberOfMembers: | 0 | getInterfaceType: | S | getNumberOfAccessors: | 0 | getName: | self | getType: | S | hasAttachedPropertyWrapperType: | no | hasParentPattern: | no | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | isInout: | no | hasPropertyWrapperLocalWrappedVarBinding: | no | hasPropertyWrapperLocalWrappedVar: | no | -| param_decls.swift:7:9:7:9 | newValue | getModule: | file://:0:0:0:0 | param_decls | getNumberOfMembers: | 0 | getInterfaceType: | Int? | getNumberOfAccessors: | 0 | getName: | newValue | getType: | Int? | hasAttachedPropertyWrapperType: | no | hasParentPattern: | no | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | isInout: | no | hasPropertyWrapperLocalWrappedVarBinding: | no | hasPropertyWrapperLocalWrappedVar: | no | -| param_decls.swift:7:9:7:9 | self | getModule: | file://:0:0:0:0 | param_decls | getNumberOfMembers: | 0 | getInterfaceType: | S | getNumberOfAccessors: | 0 | getName: | self | getType: | S | hasAttachedPropertyWrapperType: | no | hasParentPattern: | no | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | isInout: | yes | hasPropertyWrapperLocalWrappedVarBinding: | no | hasPropertyWrapperLocalWrappedVar: | no | -| param_decls.swift:12:13:12:22 | s | getModule: | file://:0:0:0:0 | param_decls | getNumberOfMembers: | 0 | getInterfaceType: | String | getNumberOfAccessors: | 0 | getName: | s | getType: | String | hasAttachedPropertyWrapperType: | no | hasParentPattern: | no | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | isInout: | yes | hasPropertyWrapperLocalWrappedVarBinding: | no | hasPropertyWrapperLocalWrappedVar: | no | -| param_decls.swift:13:13:13:22 | s | getModule: | file://:0:0:0:0 | param_decls | getNumberOfMembers: | 0 | getInterfaceType: | String | getNumberOfAccessors: | 0 | getName: | s | getType: | String | hasAttachedPropertyWrapperType: | no | hasParentPattern: | no | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | isInout: | yes | hasPropertyWrapperLocalWrappedVarBinding: | no | hasPropertyWrapperLocalWrappedVar: | no | -| param_decls.swift:14:26:14:26 | $0 | getModule: | file://:0:0:0:0 | param_decls | getNumberOfMembers: | 0 | getInterfaceType: | Int | getNumberOfAccessors: | 0 | getName: | $0 | getType: | Int | hasAttachedPropertyWrapperType: | no | hasParentPattern: | no | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | isInout: | no | hasPropertyWrapperLocalWrappedVarBinding: | no | hasPropertyWrapperLocalWrappedVar: | no | -| param_decls.swift:17:25:17:25 | self | getModule: | file://:0:0:0:0 | param_decls | getNumberOfMembers: | 0 | getInterfaceType: | Wrapper | getNumberOfAccessors: | 0 | getName: | self | getType: | Wrapper | hasAttachedPropertyWrapperType: | no | hasParentPattern: | no | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | isInout: | yes | hasPropertyWrapperLocalWrappedVarBinding: | no | hasPropertyWrapperLocalWrappedVar: | no | -| param_decls.swift:17:25:17:25 | self | getModule: | file://:0:0:0:0 | param_decls | getNumberOfMembers: | 0 | getInterfaceType: | Wrapper | getNumberOfAccessors: | 0 | getName: | self | getType: | Wrapper | hasAttachedPropertyWrapperType: | no | hasParentPattern: | no | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | isInout: | yes | hasPropertyWrapperLocalWrappedVarBinding: | no | hasPropertyWrapperLocalWrappedVar: | no | -| param_decls.swift:17:25:17:25 | wrappedValue | getModule: | file://:0:0:0:0 | param_decls | getNumberOfMembers: | 0 | getInterfaceType: | Int | getNumberOfAccessors: | 0 | getName: | wrappedValue | getType: | Int | hasAttachedPropertyWrapperType: | no | hasParentPattern: | no | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | isInout: | no | hasPropertyWrapperLocalWrappedVarBinding: | no | hasPropertyWrapperLocalWrappedVar: | no | -| param_decls.swift:18:9:18:9 | self | getModule: | file://:0:0:0:0 | param_decls | getNumberOfMembers: | 0 | getInterfaceType: | Wrapper | getNumberOfAccessors: | 0 | getName: | self | getType: | Wrapper | hasAttachedPropertyWrapperType: | no | hasParentPattern: | no | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | isInout: | no | hasPropertyWrapperLocalWrappedVarBinding: | no | hasPropertyWrapperLocalWrappedVar: | no | -| param_decls.swift:18:9:18:9 | self | getModule: | file://:0:0:0:0 | param_decls | getNumberOfMembers: | 0 | getInterfaceType: | Wrapper | getNumberOfAccessors: | 0 | getName: | self | getType: | Wrapper | hasAttachedPropertyWrapperType: | no | hasParentPattern: | no | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | isInout: | yes | hasPropertyWrapperLocalWrappedVarBinding: | no | hasPropertyWrapperLocalWrappedVar: | no | -| param_decls.swift:18:9:18:9 | self | getModule: | file://:0:0:0:0 | param_decls | getNumberOfMembers: | 0 | getInterfaceType: | Wrapper | getNumberOfAccessors: | 0 | getName: | self | getType: | Wrapper | hasAttachedPropertyWrapperType: | no | hasParentPattern: | no | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | isInout: | yes | hasPropertyWrapperLocalWrappedVarBinding: | no | hasPropertyWrapperLocalWrappedVar: | no | -| param_decls.swift:18:9:18:9 | value | getModule: | file://:0:0:0:0 | param_decls | getNumberOfMembers: | 0 | getInterfaceType: | Int | getNumberOfAccessors: | 0 | getName: | value | getType: | Int | hasAttachedPropertyWrapperType: | no | hasParentPattern: | no | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | isInout: | no | hasPropertyWrapperLocalWrappedVarBinding: | no | hasPropertyWrapperLocalWrappedVar: | no | -| param_decls.swift:22:9:22:9 | self | getModule: | file://:0:0:0:0 | param_decls | getNumberOfMembers: | 0 | getInterfaceType: | WrapperWithInit | getNumberOfAccessors: | 0 | getName: | self | getType: | WrapperWithInit | hasAttachedPropertyWrapperType: | no | hasParentPattern: | no | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | isInout: | no | hasPropertyWrapperLocalWrappedVarBinding: | no | hasPropertyWrapperLocalWrappedVar: | no | -| param_decls.swift:22:9:22:9 | self | getModule: | file://:0:0:0:0 | param_decls | getNumberOfMembers: | 0 | getInterfaceType: | WrapperWithInit | getNumberOfAccessors: | 0 | getName: | self | getType: | WrapperWithInit | hasAttachedPropertyWrapperType: | no | hasParentPattern: | no | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | isInout: | yes | hasPropertyWrapperLocalWrappedVarBinding: | no | hasPropertyWrapperLocalWrappedVar: | no | -| param_decls.swift:22:9:22:9 | self | getModule: | file://:0:0:0:0 | param_decls | getNumberOfMembers: | 0 | getInterfaceType: | WrapperWithInit | getNumberOfAccessors: | 0 | getName: | self | getType: | WrapperWithInit | hasAttachedPropertyWrapperType: | no | hasParentPattern: | no | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | isInout: | yes | hasPropertyWrapperLocalWrappedVarBinding: | no | hasPropertyWrapperLocalWrappedVar: | no | -| param_decls.swift:22:9:22:9 | value | getModule: | file://:0:0:0:0 | param_decls | getNumberOfMembers: | 0 | getInterfaceType: | Int | getNumberOfAccessors: | 0 | getName: | value | getType: | Int | hasAttachedPropertyWrapperType: | no | hasParentPattern: | no | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | isInout: | no | hasPropertyWrapperLocalWrappedVarBinding: | no | hasPropertyWrapperLocalWrappedVar: | no | -| param_decls.swift:24:5:24:5 | self | getModule: | file://:0:0:0:0 | param_decls | getNumberOfMembers: | 0 | getInterfaceType: | WrapperWithInit | getNumberOfAccessors: | 0 | getName: | self | getType: | WrapperWithInit | hasAttachedPropertyWrapperType: | no | hasParentPattern: | no | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | isInout: | yes | hasPropertyWrapperLocalWrappedVarBinding: | no | hasPropertyWrapperLocalWrappedVar: | no | -| param_decls.swift:24:10:24:24 | wrappedValue | getModule: | file://:0:0:0:0 | param_decls | getNumberOfMembers: | 0 | getInterfaceType: | Int | getNumberOfAccessors: | 0 | getName: | wrappedValue | getType: | Int | hasAttachedPropertyWrapperType: | no | hasParentPattern: | no | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | isInout: | no | hasPropertyWrapperLocalWrappedVarBinding: | no | hasPropertyWrapperLocalWrappedVar: | no | -| param_decls.swift:27:25:27:25 | projectedValue | getModule: | file://:0:0:0:0 | param_decls | getNumberOfMembers: | 0 | getInterfaceType: | Bool | getNumberOfAccessors: | 0 | getName: | projectedValue | getType: | Bool | hasAttachedPropertyWrapperType: | no | hasParentPattern: | no | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | isInout: | no | hasPropertyWrapperLocalWrappedVarBinding: | no | hasPropertyWrapperLocalWrappedVar: | no | -| param_decls.swift:27:25:27:25 | self | getModule: | file://:0:0:0:0 | param_decls | getNumberOfMembers: | 0 | getInterfaceType: | WrapperWithProjected | getNumberOfAccessors: | 0 | getName: | self | getType: | WrapperWithProjected | hasAttachedPropertyWrapperType: | no | hasParentPattern: | no | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | isInout: | yes | hasPropertyWrapperLocalWrappedVarBinding: | no | hasPropertyWrapperLocalWrappedVar: | no | -| param_decls.swift:27:25:27:25 | self | getModule: | file://:0:0:0:0 | param_decls | getNumberOfMembers: | 0 | getInterfaceType: | WrapperWithProjected | getNumberOfAccessors: | 0 | getName: | self | getType: | WrapperWithProjected | hasAttachedPropertyWrapperType: | no | hasParentPattern: | no | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | isInout: | yes | hasPropertyWrapperLocalWrappedVarBinding: | no | hasPropertyWrapperLocalWrappedVar: | no | -| param_decls.swift:27:25:27:25 | wrappedValue | getModule: | file://:0:0:0:0 | param_decls | getNumberOfMembers: | 0 | getInterfaceType: | Int | getNumberOfAccessors: | 0 | getName: | wrappedValue | getType: | Int | hasAttachedPropertyWrapperType: | no | hasParentPattern: | no | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | isInout: | no | hasPropertyWrapperLocalWrappedVarBinding: | no | hasPropertyWrapperLocalWrappedVar: | no | -| param_decls.swift:28:9:28:9 | self | getModule: | file://:0:0:0:0 | param_decls | getNumberOfMembers: | 0 | getInterfaceType: | WrapperWithProjected | getNumberOfAccessors: | 0 | getName: | self | getType: | WrapperWithProjected | hasAttachedPropertyWrapperType: | no | hasParentPattern: | no | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | isInout: | no | hasPropertyWrapperLocalWrappedVarBinding: | no | hasPropertyWrapperLocalWrappedVar: | no | -| param_decls.swift:28:9:28:9 | self | getModule: | file://:0:0:0:0 | param_decls | getNumberOfMembers: | 0 | getInterfaceType: | WrapperWithProjected | getNumberOfAccessors: | 0 | getName: | self | getType: | WrapperWithProjected | hasAttachedPropertyWrapperType: | no | hasParentPattern: | no | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | isInout: | yes | hasPropertyWrapperLocalWrappedVarBinding: | no | hasPropertyWrapperLocalWrappedVar: | no | -| param_decls.swift:28:9:28:9 | self | getModule: | file://:0:0:0:0 | param_decls | getNumberOfMembers: | 0 | getInterfaceType: | WrapperWithProjected | getNumberOfAccessors: | 0 | getName: | self | getType: | WrapperWithProjected | hasAttachedPropertyWrapperType: | no | hasParentPattern: | no | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | isInout: | yes | hasPropertyWrapperLocalWrappedVarBinding: | no | hasPropertyWrapperLocalWrappedVar: | no | -| param_decls.swift:28:9:28:9 | value | getModule: | file://:0:0:0:0 | param_decls | getNumberOfMembers: | 0 | getInterfaceType: | Int | getNumberOfAccessors: | 0 | getName: | value | getType: | Int | hasAttachedPropertyWrapperType: | no | hasParentPattern: | no | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | isInout: | no | hasPropertyWrapperLocalWrappedVarBinding: | no | hasPropertyWrapperLocalWrappedVar: | no | -| param_decls.swift:29:9:29:9 | self | getModule: | file://:0:0:0:0 | param_decls | getNumberOfMembers: | 0 | getInterfaceType: | WrapperWithProjected | getNumberOfAccessors: | 0 | getName: | self | getType: | WrapperWithProjected | hasAttachedPropertyWrapperType: | no | hasParentPattern: | no | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | isInout: | no | hasPropertyWrapperLocalWrappedVarBinding: | no | hasPropertyWrapperLocalWrappedVar: | no | -| param_decls.swift:29:9:29:9 | self | getModule: | file://:0:0:0:0 | param_decls | getNumberOfMembers: | 0 | getInterfaceType: | WrapperWithProjected | getNumberOfAccessors: | 0 | getName: | self | getType: | WrapperWithProjected | hasAttachedPropertyWrapperType: | no | hasParentPattern: | no | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | isInout: | yes | hasPropertyWrapperLocalWrappedVarBinding: | no | hasPropertyWrapperLocalWrappedVar: | no | -| param_decls.swift:29:9:29:9 | self | getModule: | file://:0:0:0:0 | param_decls | getNumberOfMembers: | 0 | getInterfaceType: | WrapperWithProjected | getNumberOfAccessors: | 0 | getName: | self | getType: | WrapperWithProjected | hasAttachedPropertyWrapperType: | no | hasParentPattern: | no | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | isInout: | yes | hasPropertyWrapperLocalWrappedVarBinding: | no | hasPropertyWrapperLocalWrappedVar: | no | -| param_decls.swift:29:9:29:9 | value | getModule: | file://:0:0:0:0 | param_decls | getNumberOfMembers: | 0 | getInterfaceType: | Bool | getNumberOfAccessors: | 0 | getName: | value | getType: | Bool | hasAttachedPropertyWrapperType: | no | hasParentPattern: | no | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | isInout: | no | hasPropertyWrapperLocalWrappedVarBinding: | no | hasPropertyWrapperLocalWrappedVar: | no | -| param_decls.swift:33:9:33:9 | self | getModule: | file://:0:0:0:0 | param_decls | getNumberOfMembers: | 0 | getInterfaceType: | WrapperWithProjectedAndInit | getNumberOfAccessors: | 0 | getName: | self | getType: | WrapperWithProjectedAndInit | hasAttachedPropertyWrapperType: | no | hasParentPattern: | no | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | isInout: | no | hasPropertyWrapperLocalWrappedVarBinding: | no | hasPropertyWrapperLocalWrappedVar: | no | -| param_decls.swift:33:9:33:9 | self | getModule: | file://:0:0:0:0 | param_decls | getNumberOfMembers: | 0 | getInterfaceType: | WrapperWithProjectedAndInit | getNumberOfAccessors: | 0 | getName: | self | getType: | WrapperWithProjectedAndInit | hasAttachedPropertyWrapperType: | no | hasParentPattern: | no | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | isInout: | yes | hasPropertyWrapperLocalWrappedVarBinding: | no | hasPropertyWrapperLocalWrappedVar: | no | -| param_decls.swift:33:9:33:9 | self | getModule: | file://:0:0:0:0 | param_decls | getNumberOfMembers: | 0 | getInterfaceType: | WrapperWithProjectedAndInit | getNumberOfAccessors: | 0 | getName: | self | getType: | WrapperWithProjectedAndInit | hasAttachedPropertyWrapperType: | no | hasParentPattern: | no | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | isInout: | yes | hasPropertyWrapperLocalWrappedVarBinding: | no | hasPropertyWrapperLocalWrappedVar: | no | -| param_decls.swift:33:9:33:9 | value | getModule: | file://:0:0:0:0 | param_decls | getNumberOfMembers: | 0 | getInterfaceType: | Int | getNumberOfAccessors: | 0 | getName: | value | getType: | Int | hasAttachedPropertyWrapperType: | no | hasParentPattern: | no | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | isInout: | no | hasPropertyWrapperLocalWrappedVarBinding: | no | hasPropertyWrapperLocalWrappedVar: | no | -| param_decls.swift:34:9:34:9 | self | getModule: | file://:0:0:0:0 | param_decls | getNumberOfMembers: | 0 | getInterfaceType: | WrapperWithProjectedAndInit | getNumberOfAccessors: | 0 | getName: | self | getType: | WrapperWithProjectedAndInit | hasAttachedPropertyWrapperType: | no | hasParentPattern: | no | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | isInout: | no | hasPropertyWrapperLocalWrappedVarBinding: | no | hasPropertyWrapperLocalWrappedVar: | no | -| param_decls.swift:34:9:34:9 | self | getModule: | file://:0:0:0:0 | param_decls | getNumberOfMembers: | 0 | getInterfaceType: | WrapperWithProjectedAndInit | getNumberOfAccessors: | 0 | getName: | self | getType: | WrapperWithProjectedAndInit | hasAttachedPropertyWrapperType: | no | hasParentPattern: | no | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | isInout: | yes | hasPropertyWrapperLocalWrappedVarBinding: | no | hasPropertyWrapperLocalWrappedVar: | no | -| param_decls.swift:34:9:34:9 | self | getModule: | file://:0:0:0:0 | param_decls | getNumberOfMembers: | 0 | getInterfaceType: | WrapperWithProjectedAndInit | getNumberOfAccessors: | 0 | getName: | self | getType: | WrapperWithProjectedAndInit | hasAttachedPropertyWrapperType: | no | hasParentPattern: | no | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | isInout: | yes | hasPropertyWrapperLocalWrappedVarBinding: | no | hasPropertyWrapperLocalWrappedVar: | no | -| param_decls.swift:34:9:34:9 | value | getModule: | file://:0:0:0:0 | param_decls | getNumberOfMembers: | 0 | getInterfaceType: | Bool | getNumberOfAccessors: | 0 | getName: | value | getType: | Bool | hasAttachedPropertyWrapperType: | no | hasParentPattern: | no | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | isInout: | no | hasPropertyWrapperLocalWrappedVarBinding: | no | hasPropertyWrapperLocalWrappedVar: | no | -| param_decls.swift:36:5:36:5 | self | getModule: | file://:0:0:0:0 | param_decls | getNumberOfMembers: | 0 | getInterfaceType: | WrapperWithProjectedAndInit | getNumberOfAccessors: | 0 | getName: | self | getType: | WrapperWithProjectedAndInit | hasAttachedPropertyWrapperType: | no | hasParentPattern: | no | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | isInout: | yes | hasPropertyWrapperLocalWrappedVarBinding: | no | hasPropertyWrapperLocalWrappedVar: | no | -| param_decls.swift:36:10:36:24 | wrappedValue | getModule: | file://:0:0:0:0 | param_decls | getNumberOfMembers: | 0 | getInterfaceType: | Int | getNumberOfAccessors: | 0 | getName: | wrappedValue | getType: | Int | hasAttachedPropertyWrapperType: | no | hasParentPattern: | no | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | isInout: | no | hasPropertyWrapperLocalWrappedVarBinding: | no | hasPropertyWrapperLocalWrappedVar: | no | -| param_decls.swift:41:5:41:5 | self | getModule: | file://:0:0:0:0 | param_decls | getNumberOfMembers: | 0 | getInterfaceType: | WrapperWithProjectedAndInit | getNumberOfAccessors: | 0 | getName: | self | getType: | WrapperWithProjectedAndInit | hasAttachedPropertyWrapperType: | no | hasParentPattern: | no | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | isInout: | yes | hasPropertyWrapperLocalWrappedVarBinding: | no | hasPropertyWrapperLocalWrappedVar: | no | -| param_decls.swift:41:10:41:26 | projectedValue | getModule: | file://:0:0:0:0 | param_decls | getNumberOfMembers: | 0 | getInterfaceType: | Bool | getNumberOfAccessors: | 0 | getName: | projectedValue | getType: | Bool | hasAttachedPropertyWrapperType: | no | hasParentPattern: | no | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | isInout: | no | hasPropertyWrapperLocalWrappedVarBinding: | no | hasPropertyWrapperLocalWrappedVar: | no | -| param_decls.swift:48:18:48:22 | p1 | getModule: | file://:0:0:0:0 | param_decls | getNumberOfMembers: | 0 | getInterfaceType: | Int | getNumberOfAccessors: | 0 | getName: | p1 | getType: | Int | hasAttachedPropertyWrapperType: | yes | hasParentPattern: | no | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | yes | hasPropertyWrapperBackingVar: | yes | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | isInout: | no | hasPropertyWrapperLocalWrappedVarBinding: | no | hasPropertyWrapperLocalWrappedVar: | yes | -| param_decls.swift:49:26:49:30 | p2 | getModule: | file://:0:0:0:0 | param_decls | getNumberOfMembers: | 0 | getInterfaceType: | Int | getNumberOfAccessors: | 0 | getName: | p2 | getType: | Int | hasAttachedPropertyWrapperType: | yes | hasParentPattern: | no | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | yes | hasPropertyWrapperBackingVar: | yes | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | isInout: | no | hasPropertyWrapperLocalWrappedVarBinding: | no | hasPropertyWrapperLocalWrappedVar: | yes | +instances +| file://:0:0:0:0 | x | getModule: | file://:0:0:0:0 | param_decls | getInterfaceType: | Int | getName: | x | getType: | Int | isInout: | no | +| file://:0:0:0:0 | y | getModule: | file://:0:0:0:0 | param_decls | getInterfaceType: | Int | getName: | y | getType: | Int | isInout: | no | +| param_decls.swift:1:10:1:13 | _ | getModule: | file://:0:0:0:0 | param_decls | getInterfaceType: | Int | getName: | _ | getType: | Int | isInout: | no | +| param_decls.swift:1:18:1:29 | y | getModule: | file://:0:0:0:0 | param_decls | getInterfaceType: | Double | getName: | y | getType: | Double | isInout: | yes | +| param_decls.swift:2:10:2:13 | _ | getModule: | file://:0:0:0:0 | param_decls | getInterfaceType: | Int | getName: | _ | getType: | Int | isInout: | no | +| param_decls.swift:2:18:2:29 | y | getModule: | file://:0:0:0:0 | param_decls | getInterfaceType: | Double | getName: | y | getType: | Double | isInout: | yes | +| param_decls.swift:4:8:4:8 | self | getModule: | file://:0:0:0:0 | param_decls | getInterfaceType: | S | getName: | self | getType: | S | isInout: | yes | +| param_decls.swift:5:5:5:5 | self | getModule: | file://:0:0:0:0 | param_decls | getInterfaceType: | S | getName: | self | getType: | S | isInout: | yes | +| param_decls.swift:5:15:5:15 | x | getModule: | file://:0:0:0:0 | param_decls | getInterfaceType: | Int | getName: | x | getType: | Int | isInout: | no | +| param_decls.swift:5:15:5:15 | x | getModule: | file://:0:0:0:0 | param_decls | getInterfaceType: | Int | getName: | x | getType: | Int | isInout: | no | +| param_decls.swift:5:15:5:18 | x | getModule: | file://:0:0:0:0 | param_decls | getInterfaceType: | Int | getName: | x | getType: | Int | isInout: | no | +| param_decls.swift:5:23:5:23 | y | getModule: | file://:0:0:0:0 | param_decls | getInterfaceType: | Int | getName: | y | getType: | Int | isInout: | no | +| param_decls.swift:5:23:5:23 | y | getModule: | file://:0:0:0:0 | param_decls | getInterfaceType: | Int | getName: | y | getType: | Int | isInout: | no | +| param_decls.swift:5:23:5:26 | y | getModule: | file://:0:0:0:0 | param_decls | getInterfaceType: | Int | getName: | y | getType: | Int | isInout: | no | +| param_decls.swift:6:9:6:9 | self | getModule: | file://:0:0:0:0 | param_decls | getInterfaceType: | S | getName: | self | getType: | S | isInout: | no | +| param_decls.swift:7:9:7:9 | newValue | getModule: | file://:0:0:0:0 | param_decls | getInterfaceType: | Int? | getName: | newValue | getType: | Int? | isInout: | no | +| param_decls.swift:7:9:7:9 | self | getModule: | file://:0:0:0:0 | param_decls | getInterfaceType: | S | getName: | self | getType: | S | isInout: | yes | +| param_decls.swift:12:13:12:22 | s | getModule: | file://:0:0:0:0 | param_decls | getInterfaceType: | String | getName: | s | getType: | String | isInout: | yes | +| param_decls.swift:13:13:13:22 | s | getModule: | file://:0:0:0:0 | param_decls | getInterfaceType: | String | getName: | s | getType: | String | isInout: | yes | +| param_decls.swift:14:26:14:26 | $0 | getModule: | file://:0:0:0:0 | param_decls | getInterfaceType: | Int | getName: | $0 | getType: | Int | isInout: | no | +| param_decls.swift:17:25:17:25 | self | getModule: | file://:0:0:0:0 | param_decls | getInterfaceType: | Wrapper | getName: | self | getType: | Wrapper | isInout: | yes | +| param_decls.swift:17:25:17:25 | self | getModule: | file://:0:0:0:0 | param_decls | getInterfaceType: | Wrapper | getName: | self | getType: | Wrapper | isInout: | yes | +| param_decls.swift:17:25:17:25 | wrappedValue | getModule: | file://:0:0:0:0 | param_decls | getInterfaceType: | Int | getName: | wrappedValue | getType: | Int | isInout: | no | +| param_decls.swift:18:9:18:9 | self | getModule: | file://:0:0:0:0 | param_decls | getInterfaceType: | Wrapper | getName: | self | getType: | Wrapper | isInout: | no | +| param_decls.swift:18:9:18:9 | self | getModule: | file://:0:0:0:0 | param_decls | getInterfaceType: | Wrapper | getName: | self | getType: | Wrapper | isInout: | yes | +| param_decls.swift:18:9:18:9 | self | getModule: | file://:0:0:0:0 | param_decls | getInterfaceType: | Wrapper | getName: | self | getType: | Wrapper | isInout: | yes | +| param_decls.swift:18:9:18:9 | value | getModule: | file://:0:0:0:0 | param_decls | getInterfaceType: | Int | getName: | value | getType: | Int | isInout: | no | +| param_decls.swift:22:9:22:9 | self | getModule: | file://:0:0:0:0 | param_decls | getInterfaceType: | WrapperWithInit | getName: | self | getType: | WrapperWithInit | isInout: | no | +| param_decls.swift:22:9:22:9 | self | getModule: | file://:0:0:0:0 | param_decls | getInterfaceType: | WrapperWithInit | getName: | self | getType: | WrapperWithInit | isInout: | yes | +| param_decls.swift:22:9:22:9 | self | getModule: | file://:0:0:0:0 | param_decls | getInterfaceType: | WrapperWithInit | getName: | self | getType: | WrapperWithInit | isInout: | yes | +| param_decls.swift:22:9:22:9 | value | getModule: | file://:0:0:0:0 | param_decls | getInterfaceType: | Int | getName: | value | getType: | Int | isInout: | no | +| param_decls.swift:24:5:24:5 | self | getModule: | file://:0:0:0:0 | param_decls | getInterfaceType: | WrapperWithInit | getName: | self | getType: | WrapperWithInit | isInout: | yes | +| param_decls.swift:24:10:24:24 | wrappedValue | getModule: | file://:0:0:0:0 | param_decls | getInterfaceType: | Int | getName: | wrappedValue | getType: | Int | isInout: | no | +| param_decls.swift:27:25:27:25 | projectedValue | getModule: | file://:0:0:0:0 | param_decls | getInterfaceType: | Bool | getName: | projectedValue | getType: | Bool | isInout: | no | +| param_decls.swift:27:25:27:25 | self | getModule: | file://:0:0:0:0 | param_decls | getInterfaceType: | WrapperWithProjected | getName: | self | getType: | WrapperWithProjected | isInout: | yes | +| param_decls.swift:27:25:27:25 | self | getModule: | file://:0:0:0:0 | param_decls | getInterfaceType: | WrapperWithProjected | getName: | self | getType: | WrapperWithProjected | isInout: | yes | +| param_decls.swift:27:25:27:25 | wrappedValue | getModule: | file://:0:0:0:0 | param_decls | getInterfaceType: | Int | getName: | wrappedValue | getType: | Int | isInout: | no | +| param_decls.swift:28:9:28:9 | self | getModule: | file://:0:0:0:0 | param_decls | getInterfaceType: | WrapperWithProjected | getName: | self | getType: | WrapperWithProjected | isInout: | no | +| param_decls.swift:28:9:28:9 | self | getModule: | file://:0:0:0:0 | param_decls | getInterfaceType: | WrapperWithProjected | getName: | self | getType: | WrapperWithProjected | isInout: | yes | +| param_decls.swift:28:9:28:9 | self | getModule: | file://:0:0:0:0 | param_decls | getInterfaceType: | WrapperWithProjected | getName: | self | getType: | WrapperWithProjected | isInout: | yes | +| param_decls.swift:28:9:28:9 | value | getModule: | file://:0:0:0:0 | param_decls | getInterfaceType: | Int | getName: | value | getType: | Int | isInout: | no | +| param_decls.swift:29:9:29:9 | self | getModule: | file://:0:0:0:0 | param_decls | getInterfaceType: | WrapperWithProjected | getName: | self | getType: | WrapperWithProjected | isInout: | no | +| param_decls.swift:29:9:29:9 | self | getModule: | file://:0:0:0:0 | param_decls | getInterfaceType: | WrapperWithProjected | getName: | self | getType: | WrapperWithProjected | isInout: | yes | +| param_decls.swift:29:9:29:9 | self | getModule: | file://:0:0:0:0 | param_decls | getInterfaceType: | WrapperWithProjected | getName: | self | getType: | WrapperWithProjected | isInout: | yes | +| param_decls.swift:29:9:29:9 | value | getModule: | file://:0:0:0:0 | param_decls | getInterfaceType: | Bool | getName: | value | getType: | Bool | isInout: | no | +| param_decls.swift:33:9:33:9 | self | getModule: | file://:0:0:0:0 | param_decls | getInterfaceType: | WrapperWithProjectedAndInit | getName: | self | getType: | WrapperWithProjectedAndInit | isInout: | no | +| param_decls.swift:33:9:33:9 | self | getModule: | file://:0:0:0:0 | param_decls | getInterfaceType: | WrapperWithProjectedAndInit | getName: | self | getType: | WrapperWithProjectedAndInit | isInout: | yes | +| param_decls.swift:33:9:33:9 | self | getModule: | file://:0:0:0:0 | param_decls | getInterfaceType: | WrapperWithProjectedAndInit | getName: | self | getType: | WrapperWithProjectedAndInit | isInout: | yes | +| param_decls.swift:33:9:33:9 | value | getModule: | file://:0:0:0:0 | param_decls | getInterfaceType: | Int | getName: | value | getType: | Int | isInout: | no | +| param_decls.swift:34:9:34:9 | self | getModule: | file://:0:0:0:0 | param_decls | getInterfaceType: | WrapperWithProjectedAndInit | getName: | self | getType: | WrapperWithProjectedAndInit | isInout: | no | +| param_decls.swift:34:9:34:9 | self | getModule: | file://:0:0:0:0 | param_decls | getInterfaceType: | WrapperWithProjectedAndInit | getName: | self | getType: | WrapperWithProjectedAndInit | isInout: | yes | +| param_decls.swift:34:9:34:9 | self | getModule: | file://:0:0:0:0 | param_decls | getInterfaceType: | WrapperWithProjectedAndInit | getName: | self | getType: | WrapperWithProjectedAndInit | isInout: | yes | +| param_decls.swift:34:9:34:9 | value | getModule: | file://:0:0:0:0 | param_decls | getInterfaceType: | Bool | getName: | value | getType: | Bool | isInout: | no | +| param_decls.swift:36:5:36:5 | self | getModule: | file://:0:0:0:0 | param_decls | getInterfaceType: | WrapperWithProjectedAndInit | getName: | self | getType: | WrapperWithProjectedAndInit | isInout: | yes | +| param_decls.swift:36:10:36:24 | wrappedValue | getModule: | file://:0:0:0:0 | param_decls | getInterfaceType: | Int | getName: | wrappedValue | getType: | Int | isInout: | no | +| param_decls.swift:41:5:41:5 | self | getModule: | file://:0:0:0:0 | param_decls | getInterfaceType: | WrapperWithProjectedAndInit | getName: | self | getType: | WrapperWithProjectedAndInit | isInout: | yes | +| param_decls.swift:41:10:41:26 | projectedValue | getModule: | file://:0:0:0:0 | param_decls | getInterfaceType: | Bool | getName: | projectedValue | getType: | Bool | isInout: | no | +| param_decls.swift:48:18:48:22 | p1 | getModule: | file://:0:0:0:0 | param_decls | getInterfaceType: | Int | getName: | p1 | getType: | Int | isInout: | no | +| param_decls.swift:49:26:49:30 | p2 | getModule: | file://:0:0:0:0 | param_decls | getInterfaceType: | Int | getName: | p2 | getType: | Int | isInout: | no | +getMember +getAccessor +getAttachedPropertyWrapperType +| param_decls.swift:48:18:48:22 | p1 | Wrapper | +| param_decls.swift:49:26:49:30 | p2 | WrapperWithInit | +getParentPattern +getParentInitializer +getPropertyWrapperBackingVarBinding +| param_decls.swift:48:18:48:22 | p1 | file://:0:0:0:0 | var ... = ... | +| param_decls.swift:49:26:49:30 | p2 | file://:0:0:0:0 | var ... = ... | +getPropertyWrapperBackingVar +| param_decls.swift:48:18:48:22 | p1 | param_decls.swift:48:18:48:18 | _p1 | +| param_decls.swift:49:26:49:30 | p2 | param_decls.swift:49:26:49:26 | _p2 | +getPropertyWrapperProjectionVarBinding +getPropertyWrapperProjectionVar +getPropertyWrapperLocalWrappedVarBinding +getPropertyWrapperLocalWrappedVar +| param_decls.swift:48:18:48:22 | p1 | param_decls.swift:48:18:48:18 | p1 | +| param_decls.swift:49:26:49:30 | p2 | param_decls.swift:49:26:49:26 | p2 | diff --git a/swift/ql/test/extractor-tests/generated/decl/ParamDecl/ParamDecl.ql b/swift/ql/test/extractor-tests/generated/decl/ParamDecl/ParamDecl.ql index eed0fb15c3e..1af06c1a464 100644 --- a/swift/ql/test/extractor-tests/generated/decl/ParamDecl/ParamDecl.ql +++ b/swift/ql/test/extractor-tests/generated/decl/ParamDecl/ParamDecl.ql @@ -2,65 +2,87 @@ import codeql.swift.elements import TestUtils -from - ParamDecl x, ModuleDecl getModule, int getNumberOfMembers, Type getInterfaceType, - int getNumberOfAccessors, string getName, Type getType, string hasAttachedPropertyWrapperType, - string hasParentPattern, string hasParentInitializer, string hasPropertyWrapperBackingVarBinding, - string hasPropertyWrapperBackingVar, string hasPropertyWrapperProjectionVarBinding, - string hasPropertyWrapperProjectionVar, string isInout, - string hasPropertyWrapperLocalWrappedVarBinding, string hasPropertyWrapperLocalWrappedVar -where +query predicate instances( + ParamDecl x, string getModule__label, ModuleDecl getModule, string getInterfaceType__label, + Type getInterfaceType, string getName__label, string getName, string getType__label, Type getType, + string isInout__label, string isInout +) { toBeTested(x) and not x.isUnknown() and + getModule__label = "getModule:" and getModule = x.getModule() and - getNumberOfMembers = x.getNumberOfMembers() and + getInterfaceType__label = "getInterfaceType:" and getInterfaceType = x.getInterfaceType() and - getNumberOfAccessors = x.getNumberOfAccessors() and + getName__label = "getName:" and getName = x.getName() and + getType__label = "getType:" and getType = x.getType() and - ( - if x.hasAttachedPropertyWrapperType() - then hasAttachedPropertyWrapperType = "yes" - else hasAttachedPropertyWrapperType = "no" - ) and - (if x.hasParentPattern() then hasParentPattern = "yes" else hasParentPattern = "no") and - (if x.hasParentInitializer() then hasParentInitializer = "yes" else hasParentInitializer = "no") and - ( - if x.hasPropertyWrapperBackingVarBinding() - then hasPropertyWrapperBackingVarBinding = "yes" - else hasPropertyWrapperBackingVarBinding = "no" - ) and - ( - if x.hasPropertyWrapperBackingVar() - then hasPropertyWrapperBackingVar = "yes" - else hasPropertyWrapperBackingVar = "no" - ) and - ( - if x.hasPropertyWrapperProjectionVarBinding() - then hasPropertyWrapperProjectionVarBinding = "yes" - else hasPropertyWrapperProjectionVarBinding = "no" - ) and - ( - if x.hasPropertyWrapperProjectionVar() - then hasPropertyWrapperProjectionVar = "yes" - else hasPropertyWrapperProjectionVar = "no" - ) and - (if x.isInout() then isInout = "yes" else isInout = "no") and - ( - if x.hasPropertyWrapperLocalWrappedVarBinding() - then hasPropertyWrapperLocalWrappedVarBinding = "yes" - else hasPropertyWrapperLocalWrappedVarBinding = "no" - ) and - if x.hasPropertyWrapperLocalWrappedVar() - then hasPropertyWrapperLocalWrappedVar = "yes" - else hasPropertyWrapperLocalWrappedVar = "no" -select x, "getModule:", getModule, "getNumberOfMembers:", getNumberOfMembers, "getInterfaceType:", - getInterfaceType, "getNumberOfAccessors:", getNumberOfAccessors, "getName:", getName, "getType:", - getType, "hasAttachedPropertyWrapperType:", hasAttachedPropertyWrapperType, "hasParentPattern:", - hasParentPattern, "hasParentInitializer:", hasParentInitializer, - "hasPropertyWrapperBackingVarBinding:", hasPropertyWrapperBackingVarBinding, - "hasPropertyWrapperBackingVar:", hasPropertyWrapperBackingVar, - "hasPropertyWrapperProjectionVarBinding:", hasPropertyWrapperProjectionVarBinding, - "hasPropertyWrapperProjectionVar:", hasPropertyWrapperProjectionVar, "isInout:", isInout, - "hasPropertyWrapperLocalWrappedVarBinding:", hasPropertyWrapperLocalWrappedVarBinding, - "hasPropertyWrapperLocalWrappedVar:", hasPropertyWrapperLocalWrappedVar + isInout__label = "isInout:" and + if x.isInout() then isInout = "yes" else isInout = "no" +} + +query predicate getMember(ParamDecl x, int index, Decl getMember) { + toBeTested(x) and not x.isUnknown() and getMember = x.getMember(index) +} + +query predicate getAccessor(ParamDecl x, int index, Accessor getAccessor) { + toBeTested(x) and not x.isUnknown() and getAccessor = x.getAccessor(index) +} + +query predicate getAttachedPropertyWrapperType(ParamDecl x, Type getAttachedPropertyWrapperType) { + toBeTested(x) and + not x.isUnknown() and + getAttachedPropertyWrapperType = x.getAttachedPropertyWrapperType() +} + +query predicate getParentPattern(ParamDecl x, Pattern getParentPattern) { + toBeTested(x) and not x.isUnknown() and getParentPattern = x.getParentPattern() +} + +query predicate getParentInitializer(ParamDecl x, Expr getParentInitializer) { + toBeTested(x) and not x.isUnknown() and getParentInitializer = x.getParentInitializer() +} + +query predicate getPropertyWrapperBackingVarBinding( + ParamDecl x, PatternBindingDecl getPropertyWrapperBackingVarBinding +) { + toBeTested(x) and + not x.isUnknown() and + getPropertyWrapperBackingVarBinding = x.getPropertyWrapperBackingVarBinding() +} + +query predicate getPropertyWrapperBackingVar(ParamDecl x, VarDecl getPropertyWrapperBackingVar) { + toBeTested(x) and + not x.isUnknown() and + getPropertyWrapperBackingVar = x.getPropertyWrapperBackingVar() +} + +query predicate getPropertyWrapperProjectionVarBinding( + ParamDecl x, PatternBindingDecl getPropertyWrapperProjectionVarBinding +) { + toBeTested(x) and + not x.isUnknown() and + getPropertyWrapperProjectionVarBinding = x.getPropertyWrapperProjectionVarBinding() +} + +query predicate getPropertyWrapperProjectionVar(ParamDecl x, VarDecl getPropertyWrapperProjectionVar) { + toBeTested(x) and + not x.isUnknown() and + getPropertyWrapperProjectionVar = x.getPropertyWrapperProjectionVar() +} + +query predicate getPropertyWrapperLocalWrappedVarBinding( + ParamDecl x, PatternBindingDecl getPropertyWrapperLocalWrappedVarBinding +) { + toBeTested(x) and + not x.isUnknown() and + getPropertyWrapperLocalWrappedVarBinding = x.getPropertyWrapperLocalWrappedVarBinding() +} + +query predicate getPropertyWrapperLocalWrappedVar( + ParamDecl x, VarDecl getPropertyWrapperLocalWrappedVar +) { + toBeTested(x) and + not x.isUnknown() and + getPropertyWrapperLocalWrappedVar = x.getPropertyWrapperLocalWrappedVar() +} diff --git a/swift/ql/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getAccessor.expected b/swift/ql/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getAccessor.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/swift/ql/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getAccessor.ql b/swift/ql/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getAccessor.ql deleted file mode 100644 index e6e886f9cb8..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getAccessor.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from ParamDecl x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getAccessor(index) diff --git a/swift/ql/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getAttachedPropertyWrapperType.expected b/swift/ql/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getAttachedPropertyWrapperType.expected deleted file mode 100644 index b8a99db3f8f..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getAttachedPropertyWrapperType.expected +++ /dev/null @@ -1,2 +0,0 @@ -| param_decls.swift:48:18:48:22 | p1 | Wrapper | -| param_decls.swift:49:26:49:30 | p2 | WrapperWithInit | diff --git a/swift/ql/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getAttachedPropertyWrapperType.ql b/swift/ql/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getAttachedPropertyWrapperType.ql deleted file mode 100644 index fb67e3687ae..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getAttachedPropertyWrapperType.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from ParamDecl x -where toBeTested(x) and not x.isUnknown() -select x, x.getAttachedPropertyWrapperType() diff --git a/swift/ql/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getMember.expected b/swift/ql/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getMember.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/swift/ql/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getMember.ql b/swift/ql/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getMember.ql deleted file mode 100644 index a313de88390..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getMember.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from ParamDecl x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getMember(index) diff --git a/swift/ql/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getParentInitializer.expected b/swift/ql/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getParentInitializer.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/swift/ql/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getParentInitializer.ql b/swift/ql/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getParentInitializer.ql deleted file mode 100644 index fb122e5676e..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getParentInitializer.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from ParamDecl x -where toBeTested(x) and not x.isUnknown() -select x, x.getParentInitializer() diff --git a/swift/ql/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getParentPattern.expected b/swift/ql/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getParentPattern.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/swift/ql/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getParentPattern.ql b/swift/ql/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getParentPattern.ql deleted file mode 100644 index 7f32c32313e..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getParentPattern.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from ParamDecl x -where toBeTested(x) and not x.isUnknown() -select x, x.getParentPattern() diff --git a/swift/ql/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getPropertyWrapperBackingVar.expected b/swift/ql/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getPropertyWrapperBackingVar.expected deleted file mode 100644 index 5a58e14fe48..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getPropertyWrapperBackingVar.expected +++ /dev/null @@ -1,2 +0,0 @@ -| param_decls.swift:48:18:48:22 | p1 | param_decls.swift:48:18:48:18 | _p1 | -| param_decls.swift:49:26:49:30 | p2 | param_decls.swift:49:26:49:26 | _p2 | diff --git a/swift/ql/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getPropertyWrapperBackingVar.ql b/swift/ql/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getPropertyWrapperBackingVar.ql deleted file mode 100644 index a75d4ace3fa..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getPropertyWrapperBackingVar.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from ParamDecl x -where toBeTested(x) and not x.isUnknown() -select x, x.getPropertyWrapperBackingVar() diff --git a/swift/ql/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getPropertyWrapperBackingVarBinding.expected b/swift/ql/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getPropertyWrapperBackingVarBinding.expected deleted file mode 100644 index b3dc664e1db..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getPropertyWrapperBackingVarBinding.expected +++ /dev/null @@ -1,2 +0,0 @@ -| param_decls.swift:48:18:48:22 | p1 | file://:0:0:0:0 | var ... = ... | -| param_decls.swift:49:26:49:30 | p2 | file://:0:0:0:0 | var ... = ... | diff --git a/swift/ql/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getPropertyWrapperBackingVarBinding.ql b/swift/ql/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getPropertyWrapperBackingVarBinding.ql deleted file mode 100644 index 2db7190cb95..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getPropertyWrapperBackingVarBinding.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from ParamDecl x -where toBeTested(x) and not x.isUnknown() -select x, x.getPropertyWrapperBackingVarBinding() diff --git a/swift/ql/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getPropertyWrapperLocalWrappedVar.expected b/swift/ql/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getPropertyWrapperLocalWrappedVar.expected deleted file mode 100644 index e1b555437d3..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getPropertyWrapperLocalWrappedVar.expected +++ /dev/null @@ -1,2 +0,0 @@ -| param_decls.swift:48:18:48:22 | p1 | param_decls.swift:48:18:48:18 | p1 | -| param_decls.swift:49:26:49:30 | p2 | param_decls.swift:49:26:49:26 | p2 | diff --git a/swift/ql/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getPropertyWrapperLocalWrappedVar.ql b/swift/ql/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getPropertyWrapperLocalWrappedVar.ql deleted file mode 100644 index 9ebb3df90f0..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getPropertyWrapperLocalWrappedVar.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from ParamDecl x -where toBeTested(x) and not x.isUnknown() -select x, x.getPropertyWrapperLocalWrappedVar() diff --git a/swift/ql/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getPropertyWrapperLocalWrappedVarBinding.expected b/swift/ql/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getPropertyWrapperLocalWrappedVarBinding.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/swift/ql/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getPropertyWrapperLocalWrappedVarBinding.ql b/swift/ql/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getPropertyWrapperLocalWrappedVarBinding.ql deleted file mode 100644 index 4a33cbcb268..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getPropertyWrapperLocalWrappedVarBinding.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from ParamDecl x -where toBeTested(x) and not x.isUnknown() -select x, x.getPropertyWrapperLocalWrappedVarBinding() diff --git a/swift/ql/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getPropertyWrapperProjectionVar.expected b/swift/ql/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getPropertyWrapperProjectionVar.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/swift/ql/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getPropertyWrapperProjectionVar.ql b/swift/ql/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getPropertyWrapperProjectionVar.ql deleted file mode 100644 index e919653b36b..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getPropertyWrapperProjectionVar.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from ParamDecl x -where toBeTested(x) and not x.isUnknown() -select x, x.getPropertyWrapperProjectionVar() diff --git a/swift/ql/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getPropertyWrapperProjectionVarBinding.expected b/swift/ql/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getPropertyWrapperProjectionVarBinding.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/swift/ql/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getPropertyWrapperProjectionVarBinding.ql b/swift/ql/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getPropertyWrapperProjectionVarBinding.ql deleted file mode 100644 index 47643738f7f..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/ParamDecl/ParamDecl_getPropertyWrapperProjectionVarBinding.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from ParamDecl x -where toBeTested(x) and not x.isUnknown() -select x, x.getPropertyWrapperProjectionVarBinding() diff --git a/swift/ql/test/extractor-tests/generated/decl/PoundDiagnosticDecl/PoundDiagnosticDecl.expected b/swift/ql/test/extractor-tests/generated/decl/PoundDiagnosticDecl/PoundDiagnosticDecl.expected index af19c86dec2..aaa3b31e23e 100644 --- a/swift/ql/test/extractor-tests/generated/decl/PoundDiagnosticDecl/PoundDiagnosticDecl.expected +++ b/swift/ql/test/extractor-tests/generated/decl/PoundDiagnosticDecl/PoundDiagnosticDecl.expected @@ -1,2 +1,4 @@ -| diagnostics.swift:2:1:2:25 | #warning(...) | getModule: | file://:0:0:0:0 | diagnostics | getNumberOfMembers: | 0 | getKind: | 2 | getMessage: | diagnostics.swift:2:10:2:10 | I'm a warning | -| diagnostics.swift:3:1:3:26 | #error(...) | getModule: | file://:0:0:0:0 | diagnostics | getNumberOfMembers: | 0 | getKind: | 1 | getMessage: | diagnostics.swift:3:8:3:8 | And I'm an error | +instances +| diagnostics.swift:2:1:2:25 | #warning(...) | getModule: | file://:0:0:0:0 | diagnostics | getKind: | 2 | getMessage: | diagnostics.swift:2:10:2:10 | I'm a warning | +| diagnostics.swift:3:1:3:26 | #error(...) | getModule: | file://:0:0:0:0 | diagnostics | getKind: | 1 | getMessage: | diagnostics.swift:3:8:3:8 | And I'm an error | +getMember diff --git a/swift/ql/test/extractor-tests/generated/decl/PoundDiagnosticDecl/PoundDiagnosticDecl.ql b/swift/ql/test/extractor-tests/generated/decl/PoundDiagnosticDecl/PoundDiagnosticDecl.ql index 4b4b1a2c132..acfb7f037da 100644 --- a/swift/ql/test/extractor-tests/generated/decl/PoundDiagnosticDecl/PoundDiagnosticDecl.ql +++ b/swift/ql/test/extractor-tests/generated/decl/PoundDiagnosticDecl/PoundDiagnosticDecl.ql @@ -2,15 +2,20 @@ import codeql.swift.elements import TestUtils -from - PoundDiagnosticDecl x, ModuleDecl getModule, int getNumberOfMembers, int getKind, - StringLiteralExpr getMessage -where +query predicate instances( + PoundDiagnosticDecl x, string getModule__label, ModuleDecl getModule, string getKind__label, + int getKind, string getMessage__label, StringLiteralExpr getMessage +) { toBeTested(x) and not x.isUnknown() and + getModule__label = "getModule:" and getModule = x.getModule() and - getNumberOfMembers = x.getNumberOfMembers() and + getKind__label = "getKind:" and getKind = x.getKind() and + getMessage__label = "getMessage:" and getMessage = x.getMessage() -select x, "getModule:", getModule, "getNumberOfMembers:", getNumberOfMembers, "getKind:", getKind, - "getMessage:", getMessage +} + +query predicate getMember(PoundDiagnosticDecl x, int index, Decl getMember) { + toBeTested(x) and not x.isUnknown() and getMember = x.getMember(index) +} diff --git a/swift/ql/test/extractor-tests/generated/decl/PoundDiagnosticDecl/PoundDiagnosticDecl_getMember.expected b/swift/ql/test/extractor-tests/generated/decl/PoundDiagnosticDecl/PoundDiagnosticDecl_getMember.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/swift/ql/test/extractor-tests/generated/decl/PoundDiagnosticDecl/PoundDiagnosticDecl_getMember.ql b/swift/ql/test/extractor-tests/generated/decl/PoundDiagnosticDecl/PoundDiagnosticDecl_getMember.ql deleted file mode 100644 index 9cae7c9ded0..00000000000 --- a/swift/ql/test/extractor-tests/generated/decl/PoundDiagnosticDecl/PoundDiagnosticDecl_getMember.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from PoundDiagnosticDecl x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getMember(index) diff --git a/swift/ql/test/extractor-tests/generated/expr/AppliedPropertyWrapperExpr/AppliedPropertyWrapperExpr.expected b/swift/ql/test/extractor-tests/generated/expr/AppliedPropertyWrapperExpr/AppliedPropertyWrapperExpr.expected index e69de29bb2d..26ca47278ce 100644 --- a/swift/ql/test/extractor-tests/generated/expr/AppliedPropertyWrapperExpr/AppliedPropertyWrapperExpr.expected +++ b/swift/ql/test/extractor-tests/generated/expr/AppliedPropertyWrapperExpr/AppliedPropertyWrapperExpr.expected @@ -0,0 +1,2 @@ +instances +getType diff --git a/swift/ql/test/extractor-tests/generated/expr/AppliedPropertyWrapperExpr/AppliedPropertyWrapperExpr.ql b/swift/ql/test/extractor-tests/generated/expr/AppliedPropertyWrapperExpr/AppliedPropertyWrapperExpr.ql index 4e14ce4e2f5..863c0dfe647 100644 --- a/swift/ql/test/extractor-tests/generated/expr/AppliedPropertyWrapperExpr/AppliedPropertyWrapperExpr.ql +++ b/swift/ql/test/extractor-tests/generated/expr/AppliedPropertyWrapperExpr/AppliedPropertyWrapperExpr.ql @@ -2,12 +2,20 @@ import codeql.swift.elements import TestUtils -from AppliedPropertyWrapperExpr x, string hasType, int getKind, Expr getValue, ParamDecl getParam -where +query predicate instances( + AppliedPropertyWrapperExpr x, string getKind__label, int getKind, string getValue__label, + Expr getValue, string getParam__label, ParamDecl getParam +) { toBeTested(x) and not x.isUnknown() and - (if x.hasType() then hasType = "yes" else hasType = "no") and + getKind__label = "getKind:" and getKind = x.getKind() and + getValue__label = "getValue:" and getValue = x.getValue() and + getParam__label = "getParam:" and getParam = x.getParam() -select x, "hasType:", hasType, "getKind:", getKind, "getValue:", getValue, "getParam:", getParam +} + +query predicate getType(AppliedPropertyWrapperExpr x, Type getType) { + toBeTested(x) and not x.isUnknown() and getType = x.getType() +} diff --git a/swift/ql/test/extractor-tests/generated/expr/AppliedPropertyWrapperExpr/AppliedPropertyWrapperExpr_getParam.expected b/swift/ql/test/extractor-tests/generated/expr/AppliedPropertyWrapperExpr/AppliedPropertyWrapperExpr_getParam.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/swift/ql/test/extractor-tests/generated/expr/AppliedPropertyWrapperExpr/AppliedPropertyWrapperExpr_getType.expected b/swift/ql/test/extractor-tests/generated/expr/AppliedPropertyWrapperExpr/AppliedPropertyWrapperExpr_getType.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/swift/ql/test/extractor-tests/generated/expr/AppliedPropertyWrapperExpr/AppliedPropertyWrapperExpr_getType.ql b/swift/ql/test/extractor-tests/generated/expr/AppliedPropertyWrapperExpr/AppliedPropertyWrapperExpr_getType.ql deleted file mode 100644 index 92562542130..00000000000 --- a/swift/ql/test/extractor-tests/generated/expr/AppliedPropertyWrapperExpr/AppliedPropertyWrapperExpr_getType.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from AppliedPropertyWrapperExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getType() diff --git a/swift/ql/test/extractor-tests/generated/expr/AppliedPropertyWrapperExpr/AppliedPropertyWrapperExpr_getValue.expected b/swift/ql/test/extractor-tests/generated/expr/AppliedPropertyWrapperExpr/AppliedPropertyWrapperExpr_getValue.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/swift/ql/test/extractor-tests/generated/expr/CopyExpr/ConsumeExpr.expected b/swift/ql/test/extractor-tests/generated/expr/CopyExpr/ConsumeExpr.expected index d9a7b040f1a..6d51478c433 100644 --- a/swift/ql/test/extractor-tests/generated/expr/CopyExpr/ConsumeExpr.expected +++ b/swift/ql/test/extractor-tests/generated/expr/CopyExpr/ConsumeExpr.expected @@ -1 +1,4 @@ -| move_semantics.swift:5:9:5:17 | ConsumeExpr | hasType: | yes | getSubExpr: | move_semantics.swift:5:17:5:17 | x | +instances +| move_semantics.swift:5:9:5:17 | ConsumeExpr | getSubExpr: | move_semantics.swift:5:17:5:17 | x | +getType +| move_semantics.swift:5:9:5:17 | ConsumeExpr | Int | diff --git a/swift/ql/test/extractor-tests/generated/expr/CopyExpr/ConsumeExpr.ql b/swift/ql/test/extractor-tests/generated/expr/CopyExpr/ConsumeExpr.ql index 8ff10e1d430..1521b525991 100644 --- a/swift/ql/test/extractor-tests/generated/expr/CopyExpr/ConsumeExpr.ql +++ b/swift/ql/test/extractor-tests/generated/expr/CopyExpr/ConsumeExpr.ql @@ -2,10 +2,13 @@ import codeql.swift.elements import TestUtils -from ConsumeExpr x, string hasType, Expr getSubExpr -where +query predicate instances(ConsumeExpr x, string getSubExpr__label, Expr getSubExpr) { toBeTested(x) and not x.isUnknown() and - (if x.hasType() then hasType = "yes" else hasType = "no") and + getSubExpr__label = "getSubExpr:" and getSubExpr = x.getSubExpr() -select x, "hasType:", hasType, "getSubExpr:", getSubExpr +} + +query predicate getType(ConsumeExpr x, Type getType) { + toBeTested(x) and not x.isUnknown() and getType = x.getType() +} diff --git a/swift/ql/test/extractor-tests/generated/expr/CopyExpr/ConsumeExpr_getType.expected b/swift/ql/test/extractor-tests/generated/expr/CopyExpr/ConsumeExpr_getType.expected deleted file mode 100644 index 7935a7393d6..00000000000 --- a/swift/ql/test/extractor-tests/generated/expr/CopyExpr/ConsumeExpr_getType.expected +++ /dev/null @@ -1 +0,0 @@ -| move_semantics.swift:5:9:5:17 | ConsumeExpr | Int | diff --git a/swift/ql/test/extractor-tests/generated/expr/CopyExpr/ConsumeExpr_getType.ql b/swift/ql/test/extractor-tests/generated/expr/CopyExpr/ConsumeExpr_getType.ql deleted file mode 100644 index af4c8fe9115..00000000000 --- a/swift/ql/test/extractor-tests/generated/expr/CopyExpr/ConsumeExpr_getType.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from ConsumeExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getType() diff --git a/swift/ql/test/extractor-tests/generated/expr/CopyExpr/CopyExpr.expected b/swift/ql/test/extractor-tests/generated/expr/CopyExpr/CopyExpr.expected index fe6116b6ba0..79797b15ae6 100644 --- a/swift/ql/test/extractor-tests/generated/expr/CopyExpr/CopyExpr.expected +++ b/swift/ql/test/extractor-tests/generated/expr/CopyExpr/CopyExpr.expected @@ -1 +1,4 @@ -| move_semantics.swift:4:9:4:14 | CopyExpr | hasType: | yes | getSubExpr: | move_semantics.swift:4:14:4:14 | x | +instances +| move_semantics.swift:4:9:4:14 | CopyExpr | getSubExpr: | move_semantics.swift:4:14:4:14 | x | +getType +| move_semantics.swift:4:9:4:14 | CopyExpr | Int | diff --git a/swift/ql/test/extractor-tests/generated/expr/CopyExpr/CopyExpr.ql b/swift/ql/test/extractor-tests/generated/expr/CopyExpr/CopyExpr.ql index 63145b175ba..ab58e99444e 100644 --- a/swift/ql/test/extractor-tests/generated/expr/CopyExpr/CopyExpr.ql +++ b/swift/ql/test/extractor-tests/generated/expr/CopyExpr/CopyExpr.ql @@ -2,10 +2,13 @@ import codeql.swift.elements import TestUtils -from CopyExpr x, string hasType, Expr getSubExpr -where +query predicate instances(CopyExpr x, string getSubExpr__label, Expr getSubExpr) { toBeTested(x) and not x.isUnknown() and - (if x.hasType() then hasType = "yes" else hasType = "no") and + getSubExpr__label = "getSubExpr:" and getSubExpr = x.getSubExpr() -select x, "hasType:", hasType, "getSubExpr:", getSubExpr +} + +query predicate getType(CopyExpr x, Type getType) { + toBeTested(x) and not x.isUnknown() and getType = x.getType() +} diff --git a/swift/ql/test/extractor-tests/generated/expr/CopyExpr/CopyExpr_getType.expected b/swift/ql/test/extractor-tests/generated/expr/CopyExpr/CopyExpr_getType.expected deleted file mode 100644 index bd5fe619f05..00000000000 --- a/swift/ql/test/extractor-tests/generated/expr/CopyExpr/CopyExpr_getType.expected +++ /dev/null @@ -1 +0,0 @@ -| move_semantics.swift:4:9:4:14 | CopyExpr | Int | diff --git a/swift/ql/test/extractor-tests/generated/expr/CopyExpr/CopyExpr_getType.ql b/swift/ql/test/extractor-tests/generated/expr/CopyExpr/CopyExpr_getType.ql deleted file mode 100644 index f5d74cb8a08..00000000000 --- a/swift/ql/test/extractor-tests/generated/expr/CopyExpr/CopyExpr_getType.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from CopyExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getType() diff --git a/swift/ql/test/extractor-tests/generated/expr/DotSyntaxCallExpr/DotSyntaxCallExpr.expected b/swift/ql/test/extractor-tests/generated/expr/DotSyntaxCallExpr/DotSyntaxCallExpr.expected index e69de29bb2d..3f78b481a7a 100644 --- a/swift/ql/test/extractor-tests/generated/expr/DotSyntaxCallExpr/DotSyntaxCallExpr.expected +++ b/swift/ql/test/extractor-tests/generated/expr/DotSyntaxCallExpr/DotSyntaxCallExpr.expected @@ -0,0 +1,3 @@ +instances +getType +getArgument diff --git a/swift/ql/test/extractor-tests/generated/expr/DotSyntaxCallExpr/DotSyntaxCallExpr.ql b/swift/ql/test/extractor-tests/generated/expr/DotSyntaxCallExpr/DotSyntaxCallExpr.ql index 37eb9989db3..276fa0a9aef 100644 --- a/swift/ql/test/extractor-tests/generated/expr/DotSyntaxCallExpr/DotSyntaxCallExpr.ql +++ b/swift/ql/test/extractor-tests/generated/expr/DotSyntaxCallExpr/DotSyntaxCallExpr.ql @@ -2,13 +2,22 @@ import codeql.swift.elements import TestUtils -from DotSyntaxCallExpr x, string hasType, Expr getFunction, int getNumberOfArguments, Expr getBase -where +query predicate instances( + DotSyntaxCallExpr x, string getFunction__label, Expr getFunction, string getBase__label, + Expr getBase +) { toBeTested(x) and not x.isUnknown() and - (if x.hasType() then hasType = "yes" else hasType = "no") and + getFunction__label = "getFunction:" and getFunction = x.getFunction() and - getNumberOfArguments = x.getNumberOfArguments() and + getBase__label = "getBase:" and getBase = x.getBase() -select x, "hasType:", hasType, "getFunction:", getFunction, "getNumberOfArguments:", - getNumberOfArguments, "getBase:", getBase +} + +query predicate getType(DotSyntaxCallExpr x, Type getType) { + toBeTested(x) and not x.isUnknown() and getType = x.getType() +} + +query predicate getArgument(DotSyntaxCallExpr x, int index, Argument getArgument) { + toBeTested(x) and not x.isUnknown() and getArgument = x.getArgument(index) +} diff --git a/swift/ql/test/extractor-tests/generated/expr/DotSyntaxCallExpr/DotSyntaxCallExpr_getArgument.expected b/swift/ql/test/extractor-tests/generated/expr/DotSyntaxCallExpr/DotSyntaxCallExpr_getArgument.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/swift/ql/test/extractor-tests/generated/expr/DotSyntaxCallExpr/DotSyntaxCallExpr_getArgument.ql b/swift/ql/test/extractor-tests/generated/expr/DotSyntaxCallExpr/DotSyntaxCallExpr_getArgument.ql deleted file mode 100644 index 69ca0a32f8a..00000000000 --- a/swift/ql/test/extractor-tests/generated/expr/DotSyntaxCallExpr/DotSyntaxCallExpr_getArgument.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from DotSyntaxCallExpr x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getArgument(index) diff --git a/swift/ql/test/extractor-tests/generated/expr/DotSyntaxCallExpr/DotSyntaxCallExpr_getType.expected b/swift/ql/test/extractor-tests/generated/expr/DotSyntaxCallExpr/DotSyntaxCallExpr_getType.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/swift/ql/test/extractor-tests/generated/expr/DotSyntaxCallExpr/DotSyntaxCallExpr_getType.ql b/swift/ql/test/extractor-tests/generated/expr/DotSyntaxCallExpr/DotSyntaxCallExpr_getType.ql deleted file mode 100644 index 985d4935a2e..00000000000 --- a/swift/ql/test/extractor-tests/generated/expr/DotSyntaxCallExpr/DotSyntaxCallExpr_getType.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from DotSyntaxCallExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getType() diff --git a/swift/ql/test/extractor-tests/generated/expr/DynamicLookupExpr/DynamicLookupExpr.expected b/swift/ql/test/extractor-tests/generated/expr/DynamicLookupExpr/DynamicLookupExpr.expected index e188be2275f..2460a1e34fd 100644 --- a/swift/ql/test/extractor-tests/generated/expr/DynamicLookupExpr/DynamicLookupExpr.expected +++ b/swift/ql/test/extractor-tests/generated/expr/DynamicLookupExpr/DynamicLookupExpr.expected @@ -1,2 +1,9 @@ -| dynamic_lookup.swift:15:1:15:3 | .foo(_:) | DynamicMemberRefExpr | hasType: | yes | getBase: | dynamic_lookup.swift:15:1:15:1 | OpaqueValueExpr | hasMember: | yes | -| dynamic_lookup.swift:16:5:16:9 | subscript ...[...] | DynamicSubscriptExpr | hasType: | yes | getBase: | dynamic_lookup.swift:16:5:16:5 | OpaqueValueExpr | hasMember: | yes | +instances +| dynamic_lookup.swift:15:1:15:3 | .foo(_:) | DynamicMemberRefExpr | getBase: | dynamic_lookup.swift:15:1:15:1 | OpaqueValueExpr | +| dynamic_lookup.swift:16:5:16:9 | subscript ...[...] | DynamicSubscriptExpr | getBase: | dynamic_lookup.swift:16:5:16:5 | OpaqueValueExpr | +getType +| dynamic_lookup.swift:15:1:15:3 | .foo(_:) | ((Int) -> ())? | +| dynamic_lookup.swift:16:5:16:9 | subscript ...[...] | Int? | +getMember +| dynamic_lookup.swift:15:1:15:3 | .foo(_:) | dynamic_lookup.swift:6:9:6:28 | foo(_:) | +| dynamic_lookup.swift:16:5:16:9 | subscript ...[...] | dynamic_lookup.swift:7:9:9:3 | subscript ... | diff --git a/swift/ql/test/extractor-tests/generated/expr/DynamicLookupExpr/DynamicLookupExpr.ql b/swift/ql/test/extractor-tests/generated/expr/DynamicLookupExpr/DynamicLookupExpr.ql index c32568da04e..79480f25f1e 100644 --- a/swift/ql/test/extractor-tests/generated/expr/DynamicLookupExpr/DynamicLookupExpr.ql +++ b/swift/ql/test/extractor-tests/generated/expr/DynamicLookupExpr/DynamicLookupExpr.ql @@ -2,11 +2,20 @@ import codeql.swift.elements import TestUtils -from DynamicLookupExpr x, string hasType, Expr getBase, string hasMember -where +query predicate instances( + DynamicLookupExpr x, string primaryQlClasses, string getBase__label, Expr getBase +) { toBeTested(x) and not x.isUnknown() and - (if x.hasType() then hasType = "yes" else hasType = "no") and - getBase = x.getBase() and - if x.hasMember() then hasMember = "yes" else hasMember = "no" -select x, x.getPrimaryQlClasses(), "hasType:", hasType, "getBase:", getBase, "hasMember:", hasMember + primaryQlClasses = x.getPrimaryQlClasses() and + getBase__label = "getBase:" and + getBase = x.getBase() +} + +query predicate getType(DynamicLookupExpr x, Type getType) { + toBeTested(x) and not x.isUnknown() and getType = x.getType() +} + +query predicate getMember(DynamicLookupExpr x, Decl getMember) { + toBeTested(x) and not x.isUnknown() and getMember = x.getMember() +} diff --git a/swift/ql/test/extractor-tests/generated/expr/DynamicLookupExpr/DynamicLookupExpr_getMember.expected b/swift/ql/test/extractor-tests/generated/expr/DynamicLookupExpr/DynamicLookupExpr_getMember.expected deleted file mode 100644 index 3752eb753d2..00000000000 --- a/swift/ql/test/extractor-tests/generated/expr/DynamicLookupExpr/DynamicLookupExpr_getMember.expected +++ /dev/null @@ -1,2 +0,0 @@ -| dynamic_lookup.swift:15:1:15:3 | .foo(_:) | dynamic_lookup.swift:6:9:6:28 | foo(_:) | -| dynamic_lookup.swift:16:5:16:9 | subscript ...[...] | dynamic_lookup.swift:7:9:9:3 | subscript ... | diff --git a/swift/ql/test/extractor-tests/generated/expr/DynamicLookupExpr/DynamicLookupExpr_getMember.ql b/swift/ql/test/extractor-tests/generated/expr/DynamicLookupExpr/DynamicLookupExpr_getMember.ql deleted file mode 100644 index aa38b203636..00000000000 --- a/swift/ql/test/extractor-tests/generated/expr/DynamicLookupExpr/DynamicLookupExpr_getMember.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from DynamicLookupExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getMember() diff --git a/swift/ql/test/extractor-tests/generated/expr/DynamicLookupExpr/DynamicLookupExpr_getType.expected b/swift/ql/test/extractor-tests/generated/expr/DynamicLookupExpr/DynamicLookupExpr_getType.expected deleted file mode 100644 index 981d75caf98..00000000000 --- a/swift/ql/test/extractor-tests/generated/expr/DynamicLookupExpr/DynamicLookupExpr_getType.expected +++ /dev/null @@ -1,2 +0,0 @@ -| dynamic_lookup.swift:15:1:15:3 | .foo(_:) | ((Int) -> ())? | -| dynamic_lookup.swift:16:5:16:9 | subscript ...[...] | Int? | diff --git a/swift/ql/test/extractor-tests/generated/expr/DynamicLookupExpr/DynamicLookupExpr_getType.ql b/swift/ql/test/extractor-tests/generated/expr/DynamicLookupExpr/DynamicLookupExpr_getType.ql deleted file mode 100644 index 18ac781cd1f..00000000000 --- a/swift/ql/test/extractor-tests/generated/expr/DynamicLookupExpr/DynamicLookupExpr_getType.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from DynamicLookupExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getType() diff --git a/swift/ql/test/extractor-tests/generated/expr/EnumIsCaseExpr/EnumIsCaseExpr.expected b/swift/ql/test/extractor-tests/generated/expr/EnumIsCaseExpr/EnumIsCaseExpr.expected index b40ec4fe41d..55e4538dc28 100644 --- a/swift/ql/test/extractor-tests/generated/expr/EnumIsCaseExpr/EnumIsCaseExpr.expected +++ b/swift/ql/test/extractor-tests/generated/expr/EnumIsCaseExpr/EnumIsCaseExpr.expected @@ -1,10 +1,22 @@ -| enum_is_case.swift:4:1:4:17 | ... is some | hasType: | yes | getSubExpr: | enum_is_case.swift:4:1:4:17 | OptionalEvaluationExpr | getElement: | file://:0:0:0:0 | some | -| enum_is_case.swift:5:1:5:32 | ... is some | hasType: | yes | getSubExpr: | enum_is_case.swift:5:1:5:32 | OptionalEvaluationExpr | getElement: | file://:0:0:0:0 | some | -| enum_is_case.swift:6:1:6:1 | ... is some | hasType: | yes | getSubExpr: | enum_is_case.swift:6:1:6:1 | 42 | getElement: | file://:0:0:0:0 | some | -| enum_is_case.swift:7:1:7:1 | ... is some | hasType: | yes | getSubExpr: | enum_is_case.swift:7:1:7:1 | 42 | getElement: | file://:0:0:0:0 | some | -| enum_is_case.swift:9:1:9:19 | ... is some | hasType: | yes | getSubExpr: | enum_is_case.swift:9:1:9:19 | [...] | getElement: | file://:0:0:0:0 | some | -| enum_is_case.swift:19:1:19:18 | ... is some | hasType: | yes | getSubExpr: | enum_is_case.swift:19:1:19:18 | OptionalEvaluationExpr | getElement: | file://:0:0:0:0 | some | -| enum_is_case.swift:21:1:21:5 | ... is some | hasType: | yes | getSubExpr: | enum_is_case.swift:21:1:21:5 | [...] | getElement: | file://:0:0:0:0 | some | -| enum_is_case.swift:22:1:22:10 | ... is some | hasType: | yes | getSubExpr: | enum_is_case.swift:22:1:22:10 | [...] | getElement: | file://:0:0:0:0 | some | -| enum_is_case.swift:23:1:23:10 | ... is some | hasType: | yes | getSubExpr: | enum_is_case.swift:23:1:23:10 | [...] | getElement: | file://:0:0:0:0 | some | -| enum_is_case.swift:24:1:24:8 | ... is some | hasType: | yes | getSubExpr: | enum_is_case.swift:24:1:24:8 | call to Set.init() | getElement: | file://:0:0:0:0 | some | +instances +| enum_is_case.swift:4:1:4:17 | ... is some | getSubExpr: | enum_is_case.swift:4:1:4:17 | OptionalEvaluationExpr | getElement: | file://:0:0:0:0 | some | +| enum_is_case.swift:5:1:5:32 | ... is some | getSubExpr: | enum_is_case.swift:5:1:5:32 | OptionalEvaluationExpr | getElement: | file://:0:0:0:0 | some | +| enum_is_case.swift:6:1:6:1 | ... is some | getSubExpr: | enum_is_case.swift:6:1:6:1 | 42 | getElement: | file://:0:0:0:0 | some | +| enum_is_case.swift:7:1:7:1 | ... is some | getSubExpr: | enum_is_case.swift:7:1:7:1 | 42 | getElement: | file://:0:0:0:0 | some | +| enum_is_case.swift:9:1:9:19 | ... is some | getSubExpr: | enum_is_case.swift:9:1:9:19 | [...] | getElement: | file://:0:0:0:0 | some | +| enum_is_case.swift:19:1:19:18 | ... is some | getSubExpr: | enum_is_case.swift:19:1:19:18 | OptionalEvaluationExpr | getElement: | file://:0:0:0:0 | some | +| enum_is_case.swift:21:1:21:5 | ... is some | getSubExpr: | enum_is_case.swift:21:1:21:5 | [...] | getElement: | file://:0:0:0:0 | some | +| enum_is_case.swift:22:1:22:10 | ... is some | getSubExpr: | enum_is_case.swift:22:1:22:10 | [...] | getElement: | file://:0:0:0:0 | some | +| enum_is_case.swift:23:1:23:10 | ... is some | getSubExpr: | enum_is_case.swift:23:1:23:10 | [...] | getElement: | file://:0:0:0:0 | some | +| enum_is_case.swift:24:1:24:8 | ... is some | getSubExpr: | enum_is_case.swift:24:1:24:8 | call to Set.init() | getElement: | file://:0:0:0:0 | some | +getType +| enum_is_case.swift:4:1:4:17 | ... is some | Bool | +| enum_is_case.swift:5:1:5:32 | ... is some | Bool | +| enum_is_case.swift:6:1:6:1 | ... is some | Bool | +| enum_is_case.swift:7:1:7:1 | ... is some | Bool | +| enum_is_case.swift:9:1:9:19 | ... is some | Bool | +| enum_is_case.swift:19:1:19:18 | ... is some | Bool | +| enum_is_case.swift:21:1:21:5 | ... is some | Bool | +| enum_is_case.swift:22:1:22:10 | ... is some | Bool | +| enum_is_case.swift:23:1:23:10 | ... is some | Bool | +| enum_is_case.swift:24:1:24:8 | ... is some | Bool | diff --git a/swift/ql/test/extractor-tests/generated/expr/EnumIsCaseExpr/EnumIsCaseExpr.ql b/swift/ql/test/extractor-tests/generated/expr/EnumIsCaseExpr/EnumIsCaseExpr.ql index 5c232456192..b60785e57cc 100644 --- a/swift/ql/test/extractor-tests/generated/expr/EnumIsCaseExpr/EnumIsCaseExpr.ql +++ b/swift/ql/test/extractor-tests/generated/expr/EnumIsCaseExpr/EnumIsCaseExpr.ql @@ -2,11 +2,18 @@ import codeql.swift.elements import TestUtils -from EnumIsCaseExpr x, string hasType, Expr getSubExpr, EnumElementDecl getElement -where +query predicate instances( + EnumIsCaseExpr x, string getSubExpr__label, Expr getSubExpr, string getElement__label, + EnumElementDecl getElement +) { toBeTested(x) and not x.isUnknown() and - (if x.hasType() then hasType = "yes" else hasType = "no") and + getSubExpr__label = "getSubExpr:" and getSubExpr = x.getSubExpr() and + getElement__label = "getElement:" and getElement = x.getElement() -select x, "hasType:", hasType, "getSubExpr:", getSubExpr, "getElement:", getElement +} + +query predicate getType(EnumIsCaseExpr x, Type getType) { + toBeTested(x) and not x.isUnknown() and getType = x.getType() +} diff --git a/swift/ql/test/extractor-tests/generated/expr/EnumIsCaseExpr/EnumIsCaseExpr_getType.expected b/swift/ql/test/extractor-tests/generated/expr/EnumIsCaseExpr/EnumIsCaseExpr_getType.expected deleted file mode 100644 index f1a8bd34fda..00000000000 --- a/swift/ql/test/extractor-tests/generated/expr/EnumIsCaseExpr/EnumIsCaseExpr_getType.expected +++ /dev/null @@ -1,10 +0,0 @@ -| enum_is_case.swift:4:1:4:17 | ... is some | Bool | -| enum_is_case.swift:5:1:5:32 | ... is some | Bool | -| enum_is_case.swift:6:1:6:1 | ... is some | Bool | -| enum_is_case.swift:7:1:7:1 | ... is some | Bool | -| enum_is_case.swift:9:1:9:19 | ... is some | Bool | -| enum_is_case.swift:19:1:19:18 | ... is some | Bool | -| enum_is_case.swift:21:1:21:5 | ... is some | Bool | -| enum_is_case.swift:22:1:22:10 | ... is some | Bool | -| enum_is_case.swift:23:1:23:10 | ... is some | Bool | -| enum_is_case.swift:24:1:24:8 | ... is some | Bool | diff --git a/swift/ql/test/extractor-tests/generated/expr/EnumIsCaseExpr/EnumIsCaseExpr_getType.ql b/swift/ql/test/extractor-tests/generated/expr/EnumIsCaseExpr/EnumIsCaseExpr_getType.ql deleted file mode 100644 index 33154f7aa0f..00000000000 --- a/swift/ql/test/extractor-tests/generated/expr/EnumIsCaseExpr/EnumIsCaseExpr_getType.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from EnumIsCaseExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getType() diff --git a/swift/ql/test/extractor-tests/generated/expr/ExtractFunctionIsolationExpr/ExtractFunctionIsolationExpr.expected b/swift/ql/test/extractor-tests/generated/expr/ExtractFunctionIsolationExpr/ExtractFunctionIsolationExpr.expected index aabc59fac99..ebd8475067d 100644 --- a/swift/ql/test/extractor-tests/generated/expr/ExtractFunctionIsolationExpr/ExtractFunctionIsolationExpr.expected +++ b/swift/ql/test/extractor-tests/generated/expr/ExtractFunctionIsolationExpr/ExtractFunctionIsolationExpr.expected @@ -1 +1,4 @@ -| extract_function_isolation.swift:2:21:2:23 | ExtractFunctionIsolationExpr | hasType: | yes | getFunctionExpr: | extract_function_isolation.swift:2:21:2:21 | x | +instances +| extract_function_isolation.swift:2:21:2:23 | ExtractFunctionIsolationExpr | getFunctionExpr: | extract_function_isolation.swift:2:21:2:21 | x | +getType +| extract_function_isolation.swift:2:21:2:23 | ExtractFunctionIsolationExpr | (any Actor)? | diff --git a/swift/ql/test/extractor-tests/generated/expr/ExtractFunctionIsolationExpr/ExtractFunctionIsolationExpr.ql b/swift/ql/test/extractor-tests/generated/expr/ExtractFunctionIsolationExpr/ExtractFunctionIsolationExpr.ql index f133b61f9b6..6e434d297c3 100644 --- a/swift/ql/test/extractor-tests/generated/expr/ExtractFunctionIsolationExpr/ExtractFunctionIsolationExpr.ql +++ b/swift/ql/test/extractor-tests/generated/expr/ExtractFunctionIsolationExpr/ExtractFunctionIsolationExpr.ql @@ -2,10 +2,15 @@ import codeql.swift.elements import TestUtils -from ExtractFunctionIsolationExpr x, string hasType, Expr getFunctionExpr -where +query predicate instances( + ExtractFunctionIsolationExpr x, string getFunctionExpr__label, Expr getFunctionExpr +) { toBeTested(x) and not x.isUnknown() and - (if x.hasType() then hasType = "yes" else hasType = "no") and + getFunctionExpr__label = "getFunctionExpr:" and getFunctionExpr = x.getFunctionExpr() -select x, "hasType:", hasType, "getFunctionExpr:", getFunctionExpr +} + +query predicate getType(ExtractFunctionIsolationExpr x, Type getType) { + toBeTested(x) and not x.isUnknown() and getType = x.getType() +} diff --git a/swift/ql/test/extractor-tests/generated/expr/ExtractFunctionIsolationExpr/ExtractFunctionIsolationExpr_getType.expected b/swift/ql/test/extractor-tests/generated/expr/ExtractFunctionIsolationExpr/ExtractFunctionIsolationExpr_getType.expected deleted file mode 100644 index 2c6a32f914c..00000000000 --- a/swift/ql/test/extractor-tests/generated/expr/ExtractFunctionIsolationExpr/ExtractFunctionIsolationExpr_getType.expected +++ /dev/null @@ -1 +0,0 @@ -| extract_function_isolation.swift:2:21:2:23 | ExtractFunctionIsolationExpr | (any Actor)? | diff --git a/swift/ql/test/extractor-tests/generated/expr/ExtractFunctionIsolationExpr/ExtractFunctionIsolationExpr_getType.ql b/swift/ql/test/extractor-tests/generated/expr/ExtractFunctionIsolationExpr/ExtractFunctionIsolationExpr_getType.ql deleted file mode 100644 index b7e9c6a7ba0..00000000000 --- a/swift/ql/test/extractor-tests/generated/expr/ExtractFunctionIsolationExpr/ExtractFunctionIsolationExpr_getType.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from ExtractFunctionIsolationExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getType() diff --git a/swift/ql/test/extractor-tests/generated/expr/IdentityExpr/IdentityExpr.expected b/swift/ql/test/extractor-tests/generated/expr/IdentityExpr/IdentityExpr.expected index 9f489226544..8eb957d6089 100644 --- a/swift/ql/test/extractor-tests/generated/expr/IdentityExpr/IdentityExpr.expected +++ b/swift/ql/test/extractor-tests/generated/expr/IdentityExpr/IdentityExpr.expected @@ -1,9 +1,20 @@ -| identity_expressions.swift:5:9:5:14 | .self | DotSelfExpr | hasType: | yes | getSubExpr: | identity_expressions.swift:5:9:5:9 | self | -| identity_expressions.swift:5:9:5:21 | .self | DotSelfExpr | hasType: | yes | getSubExpr: | identity_expressions.swift:5:9:5:19 | .x | -| identity_expressions.swift:5:28:5:31 | (...) | ParenExpr | hasType: | yes | getSubExpr: | identity_expressions.swift:5:29:5:29 | 42 | -| identity_expressions.swift:9:5:9:9 | (...) | ParenExpr | hasType: | yes | getSubExpr: | identity_expressions.swift:9:6:9:8 | call to A.init() | -| identity_expressions.swift:12:28:12:43 | (...) | ParenExpr | hasType: | yes | getSubExpr: | identity_expressions.swift:12:29:12:42 | await ... | -| identity_expressions.swift:12:29:12:42 | await ... | AwaitExpr | hasType: | yes | getSubExpr: | identity_expressions.swift:12:35:12:42 | call to create() | -| identity_expressions.swift:15:5:15:21 | await ... | AwaitExpr | hasType: | yes | getSubExpr: | identity_expressions.swift:15:11:15:21 | call to process() | -| identity_expressions.swift:15:11:15:19 | (...) | ParenExpr | hasType: | yes | getSubExpr: | identity_expressions.swift:15:12:15:12 | process() | -| identity_expressions.swift:18:9:18:17 | BorrowExpr | BorrowExpr | hasType: | yes | getSubExpr: | identity_expressions.swift:18:17:18:17 | x | +instances +| identity_expressions.swift:5:9:5:14 | .self | DotSelfExpr | getSubExpr: | identity_expressions.swift:5:9:5:9 | self | +| identity_expressions.swift:5:9:5:21 | .self | DotSelfExpr | getSubExpr: | identity_expressions.swift:5:9:5:19 | .x | +| identity_expressions.swift:5:28:5:31 | (...) | ParenExpr | getSubExpr: | identity_expressions.swift:5:29:5:29 | 42 | +| identity_expressions.swift:9:5:9:9 | (...) | ParenExpr | getSubExpr: | identity_expressions.swift:9:6:9:8 | call to A.init() | +| identity_expressions.swift:12:28:12:43 | (...) | ParenExpr | getSubExpr: | identity_expressions.swift:12:29:12:42 | await ... | +| identity_expressions.swift:12:29:12:42 | await ... | AwaitExpr | getSubExpr: | identity_expressions.swift:12:35:12:42 | call to create() | +| identity_expressions.swift:15:5:15:21 | await ... | AwaitExpr | getSubExpr: | identity_expressions.swift:15:11:15:21 | call to process() | +| identity_expressions.swift:15:11:15:19 | (...) | ParenExpr | getSubExpr: | identity_expressions.swift:15:12:15:12 | process() | +| identity_expressions.swift:18:9:18:17 | BorrowExpr | BorrowExpr | getSubExpr: | identity_expressions.swift:18:17:18:17 | x | +getType +| identity_expressions.swift:5:9:5:14 | .self | A | +| identity_expressions.swift:5:9:5:21 | .self | @lvalue Int | +| identity_expressions.swift:5:28:5:31 | (...) | Int | +| identity_expressions.swift:9:5:9:9 | (...) | A | +| identity_expressions.swift:12:28:12:43 | (...) | A | +| identity_expressions.swift:12:29:12:42 | await ... | A | +| identity_expressions.swift:15:5:15:21 | await ... | () | +| identity_expressions.swift:15:11:15:19 | (...) | () async -> () | +| identity_expressions.swift:18:9:18:17 | BorrowExpr | Int | diff --git a/swift/ql/test/extractor-tests/generated/expr/IdentityExpr/IdentityExpr.ql b/swift/ql/test/extractor-tests/generated/expr/IdentityExpr/IdentityExpr.ql index c21556e9736..67a23147b3b 100644 --- a/swift/ql/test/extractor-tests/generated/expr/IdentityExpr/IdentityExpr.ql +++ b/swift/ql/test/extractor-tests/generated/expr/IdentityExpr/IdentityExpr.ql @@ -2,10 +2,16 @@ import codeql.swift.elements import TestUtils -from IdentityExpr x, string hasType, Expr getSubExpr -where +query predicate instances( + IdentityExpr x, string primaryQlClasses, string getSubExpr__label, Expr getSubExpr +) { toBeTested(x) and not x.isUnknown() and - (if x.hasType() then hasType = "yes" else hasType = "no") and + primaryQlClasses = x.getPrimaryQlClasses() and + getSubExpr__label = "getSubExpr:" and getSubExpr = x.getSubExpr() -select x, x.getPrimaryQlClasses(), "hasType:", hasType, "getSubExpr:", getSubExpr +} + +query predicate getType(IdentityExpr x, Type getType) { + toBeTested(x) and not x.isUnknown() and getType = x.getType() +} diff --git a/swift/ql/test/extractor-tests/generated/expr/IdentityExpr/IdentityExpr_getType.expected b/swift/ql/test/extractor-tests/generated/expr/IdentityExpr/IdentityExpr_getType.expected deleted file mode 100644 index 7922f8fdeed..00000000000 --- a/swift/ql/test/extractor-tests/generated/expr/IdentityExpr/IdentityExpr_getType.expected +++ /dev/null @@ -1,9 +0,0 @@ -| identity_expressions.swift:5:9:5:14 | .self | A | -| identity_expressions.swift:5:9:5:21 | .self | @lvalue Int | -| identity_expressions.swift:5:28:5:31 | (...) | Int | -| identity_expressions.swift:9:5:9:9 | (...) | A | -| identity_expressions.swift:12:28:12:43 | (...) | A | -| identity_expressions.swift:12:29:12:42 | await ... | A | -| identity_expressions.swift:15:5:15:21 | await ... | () | -| identity_expressions.swift:15:11:15:19 | (...) | () async -> () | -| identity_expressions.swift:18:9:18:17 | BorrowExpr | Int | diff --git a/swift/ql/test/extractor-tests/generated/expr/IdentityExpr/IdentityExpr_getType.ql b/swift/ql/test/extractor-tests/generated/expr/IdentityExpr/IdentityExpr_getType.ql deleted file mode 100644 index d682c3be3d0..00000000000 --- a/swift/ql/test/extractor-tests/generated/expr/IdentityExpr/IdentityExpr_getType.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from IdentityExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getType() diff --git a/swift/ql/test/extractor-tests/generated/expr/ImplicitConversionExpr/ImplicitConversionExpr.expected b/swift/ql/test/extractor-tests/generated/expr/ImplicitConversionExpr/ImplicitConversionExpr.expected index ac122e39f9f..23713cba5cd 100644 --- a/swift/ql/test/extractor-tests/generated/expr/ImplicitConversionExpr/ImplicitConversionExpr.expected +++ b/swift/ql/test/extractor-tests/generated/expr/ImplicitConversionExpr/ImplicitConversionExpr.expected @@ -1,7 +1,16 @@ -| implicit_conversions.swift:2:3:2:3 | (UnsafePointer) ... | StringToPointerExpr | hasType: | yes | getSubExpr: | implicit_conversions.swift:2:3:2:3 | Hello | -| implicit_conversions.swift:4:16:4:16 | (Int?) ... | InjectIntoOptionalExpr | hasType: | yes | getSubExpr: | implicit_conversions.swift:4:16:4:16 | 42 | -| implicit_conversions.swift:5:25:5:25 | (any Equatable) ... | ErasureExpr | hasType: | yes | getSubExpr: | implicit_conversions.swift:5:25:5:25 | 42 | -| implicit_conversions.swift:12:3:12:5 | (@lvalue (() -> Void)?) ... | AbiSafeConversionExpr | hasType: | yes | getSubExpr: | implicit_conversions.swift:12:3:12:5 | .b | -| implicit_conversions.swift:12:9:12:10 | ((() -> Void)?) ... | InjectIntoOptionalExpr | hasType: | yes | getSubExpr: | implicit_conversions.swift:12:9:12:10 | { ... } | -| implicit_conversions.swift:24:3:24:5 | (Array) ... | UnsafeCastExpr | hasType: | yes | getSubExpr: | implicit_conversions.swift:24:3:24:5 | ([any Sendable]) ... | -| implicit_conversions.swift:24:3:24:5 | ([any Sendable]) ... | LoadExpr | hasType: | yes | getSubExpr: | implicit_conversions.swift:24:3:24:5 | .a | +instances +| implicit_conversions.swift:2:3:2:3 | (UnsafePointer) ... | StringToPointerExpr | getSubExpr: | implicit_conversions.swift:2:3:2:3 | Hello | +| implicit_conversions.swift:4:16:4:16 | (Int?) ... | InjectIntoOptionalExpr | getSubExpr: | implicit_conversions.swift:4:16:4:16 | 42 | +| implicit_conversions.swift:5:25:5:25 | (any Equatable) ... | ErasureExpr | getSubExpr: | implicit_conversions.swift:5:25:5:25 | 42 | +| implicit_conversions.swift:12:3:12:5 | (@lvalue (() -> Void)?) ... | AbiSafeConversionExpr | getSubExpr: | implicit_conversions.swift:12:3:12:5 | .b | +| implicit_conversions.swift:12:9:12:10 | ((() -> Void)?) ... | InjectIntoOptionalExpr | getSubExpr: | implicit_conversions.swift:12:9:12:10 | { ... } | +| implicit_conversions.swift:24:3:24:5 | (Array) ... | UnsafeCastExpr | getSubExpr: | implicit_conversions.swift:24:3:24:5 | ([any Sendable]) ... | +| implicit_conversions.swift:24:3:24:5 | ([any Sendable]) ... | LoadExpr | getSubExpr: | implicit_conversions.swift:24:3:24:5 | .a | +getType +| implicit_conversions.swift:2:3:2:3 | (UnsafePointer) ... | UnsafePointer | +| implicit_conversions.swift:4:16:4:16 | (Int?) ... | Int? | +| implicit_conversions.swift:5:25:5:25 | (any Equatable) ... | any Equatable | +| implicit_conversions.swift:12:3:12:5 | (@lvalue (() -> Void)?) ... | @lvalue (() -> Void)? | +| implicit_conversions.swift:12:9:12:10 | ((() -> Void)?) ... | (() -> Void)? | +| implicit_conversions.swift:24:3:24:5 | (Array) ... | Array | +| implicit_conversions.swift:24:3:24:5 | ([any Sendable]) ... | [any Sendable] | diff --git a/swift/ql/test/extractor-tests/generated/expr/ImplicitConversionExpr/ImplicitConversionExpr.ql b/swift/ql/test/extractor-tests/generated/expr/ImplicitConversionExpr/ImplicitConversionExpr.ql index 3e197676bb8..5861080be05 100644 --- a/swift/ql/test/extractor-tests/generated/expr/ImplicitConversionExpr/ImplicitConversionExpr.ql +++ b/swift/ql/test/extractor-tests/generated/expr/ImplicitConversionExpr/ImplicitConversionExpr.ql @@ -2,10 +2,16 @@ import codeql.swift.elements import TestUtils -from ImplicitConversionExpr x, string hasType, Expr getSubExpr -where +query predicate instances( + ImplicitConversionExpr x, string primaryQlClasses, string getSubExpr__label, Expr getSubExpr +) { toBeTested(x) and not x.isUnknown() and - (if x.hasType() then hasType = "yes" else hasType = "no") and + primaryQlClasses = x.getPrimaryQlClasses() and + getSubExpr__label = "getSubExpr:" and getSubExpr = x.getSubExpr() -select x, x.getPrimaryQlClasses(), "hasType:", hasType, "getSubExpr:", getSubExpr +} + +query predicate getType(ImplicitConversionExpr x, Type getType) { + toBeTested(x) and not x.isUnknown() and getType = x.getType() +} diff --git a/swift/ql/test/extractor-tests/generated/expr/ImplicitConversionExpr/ImplicitConversionExpr_getType.expected b/swift/ql/test/extractor-tests/generated/expr/ImplicitConversionExpr/ImplicitConversionExpr_getType.expected deleted file mode 100644 index 8254ef3cc8a..00000000000 --- a/swift/ql/test/extractor-tests/generated/expr/ImplicitConversionExpr/ImplicitConversionExpr_getType.expected +++ /dev/null @@ -1,7 +0,0 @@ -| implicit_conversions.swift:2:3:2:3 | (UnsafePointer) ... | UnsafePointer | -| implicit_conversions.swift:4:16:4:16 | (Int?) ... | Int? | -| implicit_conversions.swift:5:25:5:25 | (any Equatable) ... | any Equatable | -| implicit_conversions.swift:12:3:12:5 | (@lvalue (() -> Void)?) ... | @lvalue (() -> Void)? | -| implicit_conversions.swift:12:9:12:10 | ((() -> Void)?) ... | (() -> Void)? | -| implicit_conversions.swift:24:3:24:5 | (Array) ... | Array | -| implicit_conversions.swift:24:3:24:5 | ([any Sendable]) ... | [any Sendable] | diff --git a/swift/ql/test/extractor-tests/generated/expr/ImplicitConversionExpr/ImplicitConversionExpr_getType.ql b/swift/ql/test/extractor-tests/generated/expr/ImplicitConversionExpr/ImplicitConversionExpr_getType.ql deleted file mode 100644 index 6e9053dca6a..00000000000 --- a/swift/ql/test/extractor-tests/generated/expr/ImplicitConversionExpr/ImplicitConversionExpr_getType.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from ImplicitConversionExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getType() diff --git a/swift/ql/test/extractor-tests/generated/expr/InitializerRefCallExpr/InitializerRefCallExpr.expected b/swift/ql/test/extractor-tests/generated/expr/InitializerRefCallExpr/InitializerRefCallExpr.expected index e69de29bb2d..3f78b481a7a 100644 --- a/swift/ql/test/extractor-tests/generated/expr/InitializerRefCallExpr/InitializerRefCallExpr.expected +++ b/swift/ql/test/extractor-tests/generated/expr/InitializerRefCallExpr/InitializerRefCallExpr.expected @@ -0,0 +1,3 @@ +instances +getType +getArgument diff --git a/swift/ql/test/extractor-tests/generated/expr/InitializerRefCallExpr/InitializerRefCallExpr.ql b/swift/ql/test/extractor-tests/generated/expr/InitializerRefCallExpr/InitializerRefCallExpr.ql index 117eb37809b..190b919a498 100644 --- a/swift/ql/test/extractor-tests/generated/expr/InitializerRefCallExpr/InitializerRefCallExpr.ql +++ b/swift/ql/test/extractor-tests/generated/expr/InitializerRefCallExpr/InitializerRefCallExpr.ql @@ -2,14 +2,22 @@ import codeql.swift.elements import TestUtils -from - InitializerRefCallExpr x, string hasType, Expr getFunction, int getNumberOfArguments, Expr getBase -where +query predicate instances( + InitializerRefCallExpr x, string getFunction__label, Expr getFunction, string getBase__label, + Expr getBase +) { toBeTested(x) and not x.isUnknown() and - (if x.hasType() then hasType = "yes" else hasType = "no") and + getFunction__label = "getFunction:" and getFunction = x.getFunction() and - getNumberOfArguments = x.getNumberOfArguments() and + getBase__label = "getBase:" and getBase = x.getBase() -select x, "hasType:", hasType, "getFunction:", getFunction, "getNumberOfArguments:", - getNumberOfArguments, "getBase:", getBase +} + +query predicate getType(InitializerRefCallExpr x, Type getType) { + toBeTested(x) and not x.isUnknown() and getType = x.getType() +} + +query predicate getArgument(InitializerRefCallExpr x, int index, Argument getArgument) { + toBeTested(x) and not x.isUnknown() and getArgument = x.getArgument(index) +} diff --git a/swift/ql/test/extractor-tests/generated/expr/InitializerRefCallExpr/InitializerRefCallExpr_getArgument.expected b/swift/ql/test/extractor-tests/generated/expr/InitializerRefCallExpr/InitializerRefCallExpr_getArgument.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/swift/ql/test/extractor-tests/generated/expr/InitializerRefCallExpr/InitializerRefCallExpr_getArgument.ql b/swift/ql/test/extractor-tests/generated/expr/InitializerRefCallExpr/InitializerRefCallExpr_getArgument.ql deleted file mode 100644 index 91382b53cae..00000000000 --- a/swift/ql/test/extractor-tests/generated/expr/InitializerRefCallExpr/InitializerRefCallExpr_getArgument.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from InitializerRefCallExpr x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getArgument(index) diff --git a/swift/ql/test/extractor-tests/generated/expr/InitializerRefCallExpr/InitializerRefCallExpr_getType.expected b/swift/ql/test/extractor-tests/generated/expr/InitializerRefCallExpr/InitializerRefCallExpr_getType.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/swift/ql/test/extractor-tests/generated/expr/InitializerRefCallExpr/InitializerRefCallExpr_getType.ql b/swift/ql/test/extractor-tests/generated/expr/InitializerRefCallExpr/InitializerRefCallExpr_getType.ql deleted file mode 100644 index 70db9dde340..00000000000 --- a/swift/ql/test/extractor-tests/generated/expr/InitializerRefCallExpr/InitializerRefCallExpr_getType.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from InitializerRefCallExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getType() diff --git a/swift/ql/test/extractor-tests/generated/expr/KeyPathExpr/KeyPathExpr.expected b/swift/ql/test/extractor-tests/generated/expr/KeyPathExpr/KeyPathExpr.expected index 68e4a6ed34d..69318676c73 100644 --- a/swift/ql/test/extractor-tests/generated/expr/KeyPathExpr/KeyPathExpr.expected +++ b/swift/ql/test/extractor-tests/generated/expr/KeyPathExpr/KeyPathExpr.expected @@ -1,8 +1,42 @@ -| key_path_expr.swift:11:12:11:17 | #keyPath(...) | hasType: | yes | hasRoot: | yes | getNumberOfComponents: | 1 | -| key_path_expr.swift:12:18:12:26 | #keyPath(...) | hasType: | yes | hasRoot: | yes | getNumberOfComponents: | 1 | -| key_path_expr.swift:13:19:13:38 | #keyPath(...) | hasType: | yes | hasRoot: | yes | getNumberOfComponents: | 1 | -| key_path_expr.swift:14:16:14:35 | #keyPath(...) | hasType: | yes | hasRoot: | yes | getNumberOfComponents: | 2 | -| key_path_expr.swift:15:16:15:26 | #keyPath(...) | hasType: | yes | hasRoot: | yes | getNumberOfComponents: | 3 | -| key_path_expr.swift:16:20:16:30 | #keyPath(...) | hasType: | yes | hasRoot: | yes | getNumberOfComponents: | 4 | -| key_path_expr.swift:17:11:17:16 | #keyPath(...) | hasType: | yes | hasRoot: | yes | getNumberOfComponents: | 1 | -| key_path_expr.swift:18:20:18:32 | #keyPath(...) | hasType: | yes | hasRoot: | yes | getNumberOfComponents: | 1 | +instances +| key_path_expr.swift:11:12:11:17 | #keyPath(...) | +| key_path_expr.swift:12:18:12:26 | #keyPath(...) | +| key_path_expr.swift:13:19:13:38 | #keyPath(...) | +| key_path_expr.swift:14:16:14:35 | #keyPath(...) | +| key_path_expr.swift:15:16:15:26 | #keyPath(...) | +| key_path_expr.swift:16:20:16:30 | #keyPath(...) | +| key_path_expr.swift:17:11:17:16 | #keyPath(...) | +| key_path_expr.swift:18:20:18:32 | #keyPath(...) | +getType +| key_path_expr.swift:11:12:11:17 | #keyPath(...) | WritableKeyPath | +| key_path_expr.swift:12:18:12:26 | #keyPath(...) | WritableKeyPath<[Int], Int> | +| key_path_expr.swift:13:19:13:38 | #keyPath(...) | WritableKeyPath<[String : Int], Int?> | +| key_path_expr.swift:14:16:14:35 | #keyPath(...) | WritableKeyPath, Int> | +| key_path_expr.swift:15:16:15:26 | #keyPath(...) | KeyPath | +| key_path_expr.swift:16:20:16:30 | #keyPath(...) | KeyPath | +| key_path_expr.swift:17:11:17:16 | #keyPath(...) | WritableKeyPath | +| key_path_expr.swift:18:20:18:32 | #keyPath(...) | WritableKeyPath<(Int, Int), Int> | +getRoot +| key_path_expr.swift:11:12:11:17 | #keyPath(...) | key_path_expr.swift:11:13:11:13 | Foo | +| key_path_expr.swift:12:18:12:26 | #keyPath(...) | key_path_expr.swift:12:19:12:23 | [Int] | +| key_path_expr.swift:13:19:13:38 | #keyPath(...) | key_path_expr.swift:13:20:13:33 | [String : Int] | +| key_path_expr.swift:14:16:14:35 | #keyPath(...) | key_path_expr.swift:14:17:14:29 | Optional | +| key_path_expr.swift:15:16:15:26 | #keyPath(...) | key_path_expr.swift:15:17:15:17 | Foo | +| key_path_expr.swift:16:20:16:30 | #keyPath(...) | key_path_expr.swift:16:21:16:21 | Foo | +| key_path_expr.swift:17:11:17:16 | #keyPath(...) | key_path_expr.swift:17:12:17:12 | Int | +| key_path_expr.swift:18:20:18:32 | #keyPath(...) | key_path_expr.swift:18:21:18:30 | (Int, Int) | +getComponent +| key_path_expr.swift:11:12:11:17 | #keyPath(...) | 0 | key_path_expr.swift:11:17:11:17 | KeyPathComponent | +| key_path_expr.swift:12:18:12:26 | #keyPath(...) | 0 | key_path_expr.swift:12:24:12:26 | KeyPathComponent | +| key_path_expr.swift:13:19:13:38 | #keyPath(...) | 0 | key_path_expr.swift:13:34:13:38 | KeyPathComponent | +| key_path_expr.swift:14:16:14:35 | #keyPath(...) | 0 | key_path_expr.swift:14:31:14:31 | KeyPathComponent | +| key_path_expr.swift:14:16:14:35 | #keyPath(...) | 1 | key_path_expr.swift:14:31:14:31 | KeyPathComponent | +| key_path_expr.swift:15:16:15:26 | #keyPath(...) | 0 | key_path_expr.swift:15:21:15:21 | KeyPathComponent | +| key_path_expr.swift:15:16:15:26 | #keyPath(...) | 1 | key_path_expr.swift:15:24:15:24 | KeyPathComponent | +| key_path_expr.swift:15:16:15:26 | #keyPath(...) | 2 | key_path_expr.swift:15:26:15:26 | KeyPathComponent | +| key_path_expr.swift:16:20:16:30 | #keyPath(...) | 0 | key_path_expr.swift:16:25:16:25 | KeyPathComponent | +| key_path_expr.swift:16:20:16:30 | #keyPath(...) | 1 | key_path_expr.swift:16:28:16:28 | KeyPathComponent | +| key_path_expr.swift:16:20:16:30 | #keyPath(...) | 2 | key_path_expr.swift:16:30:16:30 | KeyPathComponent | +| key_path_expr.swift:16:20:16:30 | #keyPath(...) | 3 | file://:0:0:0:0 | KeyPathComponent | +| key_path_expr.swift:17:11:17:16 | #keyPath(...) | 0 | key_path_expr.swift:17:16:17:16 | KeyPathComponent | +| key_path_expr.swift:18:20:18:32 | #keyPath(...) | 0 | key_path_expr.swift:18:32:18:32 | KeyPathComponent | diff --git a/swift/ql/test/extractor-tests/generated/expr/KeyPathExpr/KeyPathExpr.ql b/swift/ql/test/extractor-tests/generated/expr/KeyPathExpr/KeyPathExpr.ql index 627e5b130db..67ca30250cf 100644 --- a/swift/ql/test/extractor-tests/generated/expr/KeyPathExpr/KeyPathExpr.ql +++ b/swift/ql/test/extractor-tests/generated/expr/KeyPathExpr/KeyPathExpr.ql @@ -2,11 +2,16 @@ import codeql.swift.elements import TestUtils -from KeyPathExpr x, string hasType, string hasRoot, int getNumberOfComponents -where - toBeTested(x) and - not x.isUnknown() and - (if x.hasType() then hasType = "yes" else hasType = "no") and - (if x.hasRoot() then hasRoot = "yes" else hasRoot = "no") and - getNumberOfComponents = x.getNumberOfComponents() -select x, "hasType:", hasType, "hasRoot:", hasRoot, "getNumberOfComponents:", getNumberOfComponents +query predicate instances(KeyPathExpr x) { toBeTested(x) and not x.isUnknown() } + +query predicate getType(KeyPathExpr x, Type getType) { + toBeTested(x) and not x.isUnknown() and getType = x.getType() +} + +query predicate getRoot(KeyPathExpr x, TypeRepr getRoot) { + toBeTested(x) and not x.isUnknown() and getRoot = x.getRoot() +} + +query predicate getComponent(KeyPathExpr x, int index, KeyPathComponent getComponent) { + toBeTested(x) and not x.isUnknown() and getComponent = x.getComponent(index) +} diff --git a/swift/ql/test/extractor-tests/generated/expr/KeyPathExpr/KeyPathExpr_getComponent.expected b/swift/ql/test/extractor-tests/generated/expr/KeyPathExpr/KeyPathExpr_getComponent.expected deleted file mode 100644 index 673c01e775f..00000000000 --- a/swift/ql/test/extractor-tests/generated/expr/KeyPathExpr/KeyPathExpr_getComponent.expected +++ /dev/null @@ -1,14 +0,0 @@ -| key_path_expr.swift:11:12:11:17 | #keyPath(...) | 0 | key_path_expr.swift:11:17:11:17 | KeyPathComponent | -| key_path_expr.swift:12:18:12:26 | #keyPath(...) | 0 | key_path_expr.swift:12:24:12:26 | KeyPathComponent | -| key_path_expr.swift:13:19:13:38 | #keyPath(...) | 0 | key_path_expr.swift:13:34:13:38 | KeyPathComponent | -| key_path_expr.swift:14:16:14:35 | #keyPath(...) | 0 | key_path_expr.swift:14:31:14:31 | KeyPathComponent | -| key_path_expr.swift:14:16:14:35 | #keyPath(...) | 1 | key_path_expr.swift:14:31:14:31 | KeyPathComponent | -| key_path_expr.swift:15:16:15:26 | #keyPath(...) | 0 | key_path_expr.swift:15:21:15:21 | KeyPathComponent | -| key_path_expr.swift:15:16:15:26 | #keyPath(...) | 1 | key_path_expr.swift:15:24:15:24 | KeyPathComponent | -| key_path_expr.swift:15:16:15:26 | #keyPath(...) | 2 | key_path_expr.swift:15:26:15:26 | KeyPathComponent | -| key_path_expr.swift:16:20:16:30 | #keyPath(...) | 0 | key_path_expr.swift:16:25:16:25 | KeyPathComponent | -| key_path_expr.swift:16:20:16:30 | #keyPath(...) | 1 | key_path_expr.swift:16:28:16:28 | KeyPathComponent | -| key_path_expr.swift:16:20:16:30 | #keyPath(...) | 2 | key_path_expr.swift:16:30:16:30 | KeyPathComponent | -| key_path_expr.swift:16:20:16:30 | #keyPath(...) | 3 | file://:0:0:0:0 | KeyPathComponent | -| key_path_expr.swift:17:11:17:16 | #keyPath(...) | 0 | key_path_expr.swift:17:16:17:16 | KeyPathComponent | -| key_path_expr.swift:18:20:18:32 | #keyPath(...) | 0 | key_path_expr.swift:18:32:18:32 | KeyPathComponent | diff --git a/swift/ql/test/extractor-tests/generated/expr/KeyPathExpr/KeyPathExpr_getComponent.ql b/swift/ql/test/extractor-tests/generated/expr/KeyPathExpr/KeyPathExpr_getComponent.ql deleted file mode 100644 index dc7eda14948..00000000000 --- a/swift/ql/test/extractor-tests/generated/expr/KeyPathExpr/KeyPathExpr_getComponent.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from KeyPathExpr x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getComponent(index) diff --git a/swift/ql/test/extractor-tests/generated/expr/KeyPathExpr/KeyPathExpr_getRoot.expected b/swift/ql/test/extractor-tests/generated/expr/KeyPathExpr/KeyPathExpr_getRoot.expected deleted file mode 100644 index 4106b8b42fa..00000000000 --- a/swift/ql/test/extractor-tests/generated/expr/KeyPathExpr/KeyPathExpr_getRoot.expected +++ /dev/null @@ -1,8 +0,0 @@ -| key_path_expr.swift:11:12:11:17 | #keyPath(...) | key_path_expr.swift:11:13:11:13 | Foo | -| key_path_expr.swift:12:18:12:26 | #keyPath(...) | key_path_expr.swift:12:19:12:23 | [Int] | -| key_path_expr.swift:13:19:13:38 | #keyPath(...) | key_path_expr.swift:13:20:13:33 | [String : Int] | -| key_path_expr.swift:14:16:14:35 | #keyPath(...) | key_path_expr.swift:14:17:14:29 | Optional | -| key_path_expr.swift:15:16:15:26 | #keyPath(...) | key_path_expr.swift:15:17:15:17 | Foo | -| key_path_expr.swift:16:20:16:30 | #keyPath(...) | key_path_expr.swift:16:21:16:21 | Foo | -| key_path_expr.swift:17:11:17:16 | #keyPath(...) | key_path_expr.swift:17:12:17:12 | Int | -| key_path_expr.swift:18:20:18:32 | #keyPath(...) | key_path_expr.swift:18:21:18:30 | (Int, Int) | diff --git a/swift/ql/test/extractor-tests/generated/expr/KeyPathExpr/KeyPathExpr_getRoot.ql b/swift/ql/test/extractor-tests/generated/expr/KeyPathExpr/KeyPathExpr_getRoot.ql deleted file mode 100644 index 10d5ee29d43..00000000000 --- a/swift/ql/test/extractor-tests/generated/expr/KeyPathExpr/KeyPathExpr_getRoot.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from KeyPathExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getRoot() diff --git a/swift/ql/test/extractor-tests/generated/expr/KeyPathExpr/KeyPathExpr_getType.expected b/swift/ql/test/extractor-tests/generated/expr/KeyPathExpr/KeyPathExpr_getType.expected deleted file mode 100644 index de0945572cf..00000000000 --- a/swift/ql/test/extractor-tests/generated/expr/KeyPathExpr/KeyPathExpr_getType.expected +++ /dev/null @@ -1,8 +0,0 @@ -| key_path_expr.swift:11:12:11:17 | #keyPath(...) | WritableKeyPath | -| key_path_expr.swift:12:18:12:26 | #keyPath(...) | WritableKeyPath<[Int], Int> | -| key_path_expr.swift:13:19:13:38 | #keyPath(...) | WritableKeyPath<[String : Int], Int?> | -| key_path_expr.swift:14:16:14:35 | #keyPath(...) | WritableKeyPath, Int> | -| key_path_expr.swift:15:16:15:26 | #keyPath(...) | KeyPath | -| key_path_expr.swift:16:20:16:30 | #keyPath(...) | KeyPath | -| key_path_expr.swift:17:11:17:16 | #keyPath(...) | WritableKeyPath | -| key_path_expr.swift:18:20:18:32 | #keyPath(...) | WritableKeyPath<(Int, Int), Int> | diff --git a/swift/ql/test/extractor-tests/generated/expr/KeyPathExpr/KeyPathExpr_getType.ql b/swift/ql/test/extractor-tests/generated/expr/KeyPathExpr/KeyPathExpr_getType.ql deleted file mode 100644 index 84c2a6c37d8..00000000000 --- a/swift/ql/test/extractor-tests/generated/expr/KeyPathExpr/KeyPathExpr_getType.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from KeyPathExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getType() diff --git a/swift/ql/test/extractor-tests/generated/expr/MethodLookupExpr/MethodLookupExpr.expected b/swift/ql/test/extractor-tests/generated/expr/MethodLookupExpr/MethodLookupExpr.expected index 8e528ff32a2..66837f972f2 100644 --- a/swift/ql/test/extractor-tests/generated/expr/MethodLookupExpr/MethodLookupExpr.expected +++ b/swift/ql/test/extractor-tests/generated/expr/MethodLookupExpr/MethodLookupExpr.expected @@ -1,29 +1,85 @@ -| file://:0:0:0:0 | UnownedSerialExecutor.init(_:) | hasType: | yes | getBase: | file://:0:0:0:0 | UnownedSerialExecutor.Type | hasMember: | yes | getMethodRef: | file://:0:0:0:0 | UnownedSerialExecutor.init(_:) | -| method_lookups.swift:7:13:7:13 | (no string representation) | hasType: | yes | getBase: | method_lookups.swift:7:13:7:13 | self | hasMember: | no | getMethodRef: | method_lookups.swift:7:13:7:13 | { ... } | -| method_lookups.swift:7:13:7:13 | .baz(_:) | hasType: | yes | getBase: | file://:0:0:0:0 | self | hasMember: | yes | getMethodRef: | method_lookups.swift:7:13:7:13 | baz(_:) | -| method_lookups.swift:16:13:16:13 | (no string representation) | hasType: | yes | getBase: | method_lookups.swift:16:13:16:13 | self | hasMember: | no | getMethodRef: | method_lookups.swift:16:13:16:13 | { ... } | -| method_lookups.swift:16:13:16:13 | .baz(_:) | hasType: | yes | getBase: | file://:0:0:0:0 | self | hasMember: | yes | getMethodRef: | method_lookups.swift:16:13:16:13 | baz(_:) | -| method_lookups.swift:27:13:27:13 | (no string representation) | hasType: | yes | getBase: | method_lookups.swift:27:13:27:13 | self | hasMember: | no | getMethodRef: | method_lookups.swift:27:13:27:13 | { ... } | -| method_lookups.swift:27:13:27:13 | .baz(_:) | hasType: | yes | getBase: | file://:0:0:0:0 | self | hasMember: | yes | getMethodRef: | method_lookups.swift:27:13:27:13 | baz(_:) | -| method_lookups.swift:32:3:32:5 | .foo(_:_:) | hasType: | yes | getBase: | method_lookups.swift:32:3:32:3 | X.Type | hasMember: | yes | getMethodRef: | method_lookups.swift:32:5:32:5 | foo(_:_:) | -| method_lookups.swift:33:3:33:5 | .bar() | hasType: | yes | getBase: | method_lookups.swift:33:3:33:3 | X.Type | hasMember: | yes | getMethodRef: | method_lookups.swift:33:5:33:5 | bar() | -| method_lookups.swift:34:3:34:3 | X.init() | hasType: | yes | getBase: | method_lookups.swift:34:3:34:3 | X.Type | hasMember: | yes | getMethodRef: | method_lookups.swift:34:3:34:3 | X.init() | -| method_lookups.swift:34:3:34:7 | .baz(_:) | hasType: | yes | getBase: | method_lookups.swift:34:3:34:5 | call to X.init() | hasMember: | yes | getMethodRef: | method_lookups.swift:34:7:34:7 | baz(_:) | -| method_lookups.swift:36:11:36:13 | .bar() | hasType: | yes | getBase: | method_lookups.swift:36:11:36:11 | X.Type | hasMember: | yes | getMethodRef: | method_lookups.swift:36:13:36:13 | bar() | -| method_lookups.swift:37:11:37:11 | X.init() | hasType: | yes | getBase: | method_lookups.swift:37:11:37:11 | X.Type | hasMember: | yes | getMethodRef: | method_lookups.swift:37:11:37:11 | X.init() | -| method_lookups.swift:37:11:37:15 | (no string representation) | hasType: | yes | getBase: | method_lookups.swift:37:11:37:13 | call to X.init() | hasMember: | no | getMethodRef: | method_lookups.swift:37:15:37:15 | { ... } | -| method_lookups.swift:37:15:37:15 | .baz(_:) | hasType: | yes | getBase: | file://:0:0:0:0 | self | hasMember: | yes | getMethodRef: | method_lookups.swift:37:15:37:15 | baz(_:) | -| method_lookups.swift:40:1:40:1 | Task.init(priority:operation:) | hasType: | yes | getBase: | method_lookups.swift:40:1:40:1 | Task<(), Never>.Type | hasMember: | yes | getMethodRef: | method_lookups.swift:40:1:40:1 | Task.init(priority:operation:) | -| method_lookups.swift:41:3:41:5 | .foo(_:_:) | hasType: | yes | getBase: | method_lookups.swift:41:3:41:3 | Y.Type | hasMember: | yes | getMethodRef: | method_lookups.swift:41:5:41:5 | foo(_:_:) | -| method_lookups.swift:42:9:42:9 | Y.init() | hasType: | yes | getBase: | method_lookups.swift:42:9:42:9 | Y.Type | hasMember: | yes | getMethodRef: | method_lookups.swift:42:9:42:9 | Y.init() | -| method_lookups.swift:42:9:42:13 | .baz(_:) | hasType: | yes | getBase: | method_lookups.swift:42:9:42:11 | call to Y.init() | hasMember: | yes | getMethodRef: | method_lookups.swift:42:13:42:13 | baz(_:) | -| method_lookups.swift:44:11:44:13 | .foo(_:_:) | hasType: | yes | getBase: | method_lookups.swift:44:11:44:11 | Y.Type | hasMember: | yes | getMethodRef: | method_lookups.swift:44:13:44:13 | foo(_:_:) | -| method_lookups.swift:47:1:47:1 | Task.init(priority:operation:) | hasType: | yes | getBase: | method_lookups.swift:47:1:47:1 | Task<(), Never>.Type | hasMember: | yes | getMethodRef: | method_lookups.swift:47:1:47:1 | Task.init(priority:operation:) | -| method_lookups.swift:48:9:48:11 | .foo(_:_:) | hasType: | yes | getBase: | method_lookups.swift:48:9:48:9 | Z.Type | hasMember: | yes | getMethodRef: | method_lookups.swift:48:11:48:11 | foo(_:_:) | -| method_lookups.swift:49:9:49:11 | .bar() | hasType: | yes | getBase: | method_lookups.swift:49:9:49:9 | Z.Type | hasMember: | yes | getMethodRef: | method_lookups.swift:49:11:49:11 | bar() | -| method_lookups.swift:50:9:50:9 | Z.init() | hasType: | yes | getBase: | method_lookups.swift:50:9:50:9 | Z.Type | hasMember: | yes | getMethodRef: | method_lookups.swift:50:9:50:9 | Z.init() | -| method_lookups.swift:50:9:50:13 | .baz(_:) | hasType: | yes | getBase: | method_lookups.swift:50:9:50:11 | call to Z.init() | hasMember: | yes | getMethodRef: | method_lookups.swift:50:13:50:13 | baz(_:) | -| method_lookups.swift:52:11:52:13 | .bar() | hasType: | yes | getBase: | method_lookups.swift:52:11:52:11 | Z.Type | hasMember: | yes | getMethodRef: | method_lookups.swift:52:13:52:13 | bar() | -| method_lookups.swift:53:11:53:23 | (no string representation) | hasType: | yes | getBase: | method_lookups.swift:53:18:53:20 | call to Z.init() | hasMember: | no | getMethodRef: | method_lookups.swift:53:23:53:23 | { ... } | -| method_lookups.swift:53:18:53:18 | Z.init() | hasType: | yes | getBase: | method_lookups.swift:53:18:53:18 | Z.Type | hasMember: | yes | getMethodRef: | method_lookups.swift:53:18:53:18 | Z.init() | -| method_lookups.swift:53:23:53:23 | .baz(_:) | hasType: | yes | getBase: | file://:0:0:0:0 | self | hasMember: | yes | getMethodRef: | method_lookups.swift:53:23:53:23 | baz(_:) | +instances +| file://:0:0:0:0 | UnownedSerialExecutor.init(_:) | getBase: | file://:0:0:0:0 | UnownedSerialExecutor.Type | getMethodRef: | file://:0:0:0:0 | UnownedSerialExecutor.init(_:) | +| method_lookups.swift:7:13:7:13 | (no string representation) | getBase: | method_lookups.swift:7:13:7:13 | self | getMethodRef: | method_lookups.swift:7:13:7:13 | { ... } | +| method_lookups.swift:7:13:7:13 | .baz(_:) | getBase: | file://:0:0:0:0 | self | getMethodRef: | method_lookups.swift:7:13:7:13 | baz(_:) | +| method_lookups.swift:16:13:16:13 | (no string representation) | getBase: | method_lookups.swift:16:13:16:13 | self | getMethodRef: | method_lookups.swift:16:13:16:13 | { ... } | +| method_lookups.swift:16:13:16:13 | .baz(_:) | getBase: | file://:0:0:0:0 | self | getMethodRef: | method_lookups.swift:16:13:16:13 | baz(_:) | +| method_lookups.swift:27:13:27:13 | (no string representation) | getBase: | method_lookups.swift:27:13:27:13 | self | getMethodRef: | method_lookups.swift:27:13:27:13 | { ... } | +| method_lookups.swift:27:13:27:13 | .baz(_:) | getBase: | file://:0:0:0:0 | self | getMethodRef: | method_lookups.swift:27:13:27:13 | baz(_:) | +| method_lookups.swift:32:3:32:5 | .foo(_:_:) | getBase: | method_lookups.swift:32:3:32:3 | X.Type | getMethodRef: | method_lookups.swift:32:5:32:5 | foo(_:_:) | +| method_lookups.swift:33:3:33:5 | .bar() | getBase: | method_lookups.swift:33:3:33:3 | X.Type | getMethodRef: | method_lookups.swift:33:5:33:5 | bar() | +| method_lookups.swift:34:3:34:3 | X.init() | getBase: | method_lookups.swift:34:3:34:3 | X.Type | getMethodRef: | method_lookups.swift:34:3:34:3 | X.init() | +| method_lookups.swift:34:3:34:7 | .baz(_:) | getBase: | method_lookups.swift:34:3:34:5 | call to X.init() | getMethodRef: | method_lookups.swift:34:7:34:7 | baz(_:) | +| method_lookups.swift:36:11:36:13 | .bar() | getBase: | method_lookups.swift:36:11:36:11 | X.Type | getMethodRef: | method_lookups.swift:36:13:36:13 | bar() | +| method_lookups.swift:37:11:37:11 | X.init() | getBase: | method_lookups.swift:37:11:37:11 | X.Type | getMethodRef: | method_lookups.swift:37:11:37:11 | X.init() | +| method_lookups.swift:37:11:37:15 | (no string representation) | getBase: | method_lookups.swift:37:11:37:13 | call to X.init() | getMethodRef: | method_lookups.swift:37:15:37:15 | { ... } | +| method_lookups.swift:37:15:37:15 | .baz(_:) | getBase: | file://:0:0:0:0 | self | getMethodRef: | method_lookups.swift:37:15:37:15 | baz(_:) | +| method_lookups.swift:40:1:40:1 | Task.init(priority:operation:) | getBase: | method_lookups.swift:40:1:40:1 | Task<(), Never>.Type | getMethodRef: | method_lookups.swift:40:1:40:1 | Task.init(priority:operation:) | +| method_lookups.swift:41:3:41:5 | .foo(_:_:) | getBase: | method_lookups.swift:41:3:41:3 | Y.Type | getMethodRef: | method_lookups.swift:41:5:41:5 | foo(_:_:) | +| method_lookups.swift:42:9:42:9 | Y.init() | getBase: | method_lookups.swift:42:9:42:9 | Y.Type | getMethodRef: | method_lookups.swift:42:9:42:9 | Y.init() | +| method_lookups.swift:42:9:42:13 | .baz(_:) | getBase: | method_lookups.swift:42:9:42:11 | call to Y.init() | getMethodRef: | method_lookups.swift:42:13:42:13 | baz(_:) | +| method_lookups.swift:44:11:44:13 | .foo(_:_:) | getBase: | method_lookups.swift:44:11:44:11 | Y.Type | getMethodRef: | method_lookups.swift:44:13:44:13 | foo(_:_:) | +| method_lookups.swift:47:1:47:1 | Task.init(priority:operation:) | getBase: | method_lookups.swift:47:1:47:1 | Task<(), Never>.Type | getMethodRef: | method_lookups.swift:47:1:47:1 | Task.init(priority:operation:) | +| method_lookups.swift:48:9:48:11 | .foo(_:_:) | getBase: | method_lookups.swift:48:9:48:9 | Z.Type | getMethodRef: | method_lookups.swift:48:11:48:11 | foo(_:_:) | +| method_lookups.swift:49:9:49:11 | .bar() | getBase: | method_lookups.swift:49:9:49:9 | Z.Type | getMethodRef: | method_lookups.swift:49:11:49:11 | bar() | +| method_lookups.swift:50:9:50:9 | Z.init() | getBase: | method_lookups.swift:50:9:50:9 | Z.Type | getMethodRef: | method_lookups.swift:50:9:50:9 | Z.init() | +| method_lookups.swift:50:9:50:13 | .baz(_:) | getBase: | method_lookups.swift:50:9:50:11 | call to Z.init() | getMethodRef: | method_lookups.swift:50:13:50:13 | baz(_:) | +| method_lookups.swift:52:11:52:13 | .bar() | getBase: | method_lookups.swift:52:11:52:11 | Z.Type | getMethodRef: | method_lookups.swift:52:13:52:13 | bar() | +| method_lookups.swift:53:11:53:23 | (no string representation) | getBase: | method_lookups.swift:53:18:53:20 | call to Z.init() | getMethodRef: | method_lookups.swift:53:23:53:23 | { ... } | +| method_lookups.swift:53:18:53:18 | Z.init() | getBase: | method_lookups.swift:53:18:53:18 | Z.Type | getMethodRef: | method_lookups.swift:53:18:53:18 | Z.init() | +| method_lookups.swift:53:23:53:23 | .baz(_:) | getBase: | file://:0:0:0:0 | self | getMethodRef: | method_lookups.swift:53:23:53:23 | baz(_:) | +getType +| file://:0:0:0:0 | UnownedSerialExecutor.init(_:) | (Builtin.Executor) -> UnownedSerialExecutor | +| method_lookups.swift:7:13:7:13 | (no string representation) | (Int) -> () | +| method_lookups.swift:7:13:7:13 | .baz(_:) | (Int) -> () | +| method_lookups.swift:16:13:16:13 | (no string representation) | (Int) -> () | +| method_lookups.swift:16:13:16:13 | .baz(_:) | (Int) -> () | +| method_lookups.swift:27:13:27:13 | (no string representation) | @MainActor (Int) -> () | +| method_lookups.swift:27:13:27:13 | .baz(_:) | (Int) -> () | +| method_lookups.swift:32:3:32:5 | .foo(_:_:) | (Int, Int) -> () | +| method_lookups.swift:33:3:33:5 | .bar() | () -> () | +| method_lookups.swift:34:3:34:3 | X.init() | () -> X | +| method_lookups.swift:34:3:34:7 | .baz(_:) | (Int) -> () | +| method_lookups.swift:36:11:36:13 | .bar() | () -> () | +| method_lookups.swift:37:11:37:11 | X.init() | () -> X | +| method_lookups.swift:37:11:37:15 | (no string representation) | (Int) -> () | +| method_lookups.swift:37:15:37:15 | .baz(_:) | (Int) -> () | +| method_lookups.swift:40:1:40:1 | Task.init(priority:operation:) | (TaskPriority?, sending @escaping @isolated(any) () async -> ()) -> Task<(), Never> | +| method_lookups.swift:41:3:41:5 | .foo(_:_:) | (Int, Int) -> () | +| method_lookups.swift:42:9:42:9 | Y.init() | () -> Y | +| method_lookups.swift:42:9:42:13 | .baz(_:) | (Int) -> () | +| method_lookups.swift:44:11:44:13 | .foo(_:_:) | (Int, Int) -> () | +| method_lookups.swift:47:1:47:1 | Task.init(priority:operation:) | (TaskPriority?, sending @escaping @isolated(any) () async -> ()) -> Task<(), Never> | +| method_lookups.swift:48:9:48:11 | .foo(_:_:) | @MainActor (Int, Int) -> () | +| method_lookups.swift:49:9:49:11 | .bar() | () -> () | +| method_lookups.swift:50:9:50:9 | Z.init() | @MainActor () -> Z | +| method_lookups.swift:50:9:50:13 | .baz(_:) | @MainActor (Int) -> () | +| method_lookups.swift:52:11:52:13 | .bar() | () -> () | +| method_lookups.swift:53:11:53:23 | (no string representation) | @MainActor (Int) -> () | +| method_lookups.swift:53:18:53:18 | Z.init() | @MainActor () -> Z | +| method_lookups.swift:53:23:53:23 | .baz(_:) | (Int) -> () | +getMember +| file://:0:0:0:0 | UnownedSerialExecutor.init(_:) | file://:0:0:0:0 | UnownedSerialExecutor.init(_:) | +| method_lookups.swift:7:13:7:13 | .baz(_:) | method_lookups.swift:4:3:4:21 | baz(_:) | +| method_lookups.swift:16:13:16:13 | .baz(_:) | method_lookups.swift:13:3:13:21 | baz(_:) | +| method_lookups.swift:27:13:27:13 | .baz(_:) | method_lookups.swift:24:3:24:21 | baz(_:) | +| method_lookups.swift:32:3:32:5 | .foo(_:_:) | method_lookups.swift:2:3:2:35 | foo(_:_:) | +| method_lookups.swift:33:3:33:5 | .bar() | method_lookups.swift:3:3:3:21 | bar() | +| method_lookups.swift:34:3:34:3 | X.init() | method_lookups.swift:6:3:8:3 | X.init() | +| method_lookups.swift:34:3:34:7 | .baz(_:) | method_lookups.swift:4:3:4:21 | baz(_:) | +| method_lookups.swift:36:11:36:13 | .bar() | method_lookups.swift:3:3:3:21 | bar() | +| method_lookups.swift:37:11:37:11 | X.init() | method_lookups.swift:6:3:8:3 | X.init() | +| method_lookups.swift:37:15:37:15 | .baz(_:) | method_lookups.swift:4:3:4:21 | baz(_:) | +| method_lookups.swift:40:1:40:1 | Task.init(priority:operation:) | file://:0:0:0:0 | Task.init(priority:operation:) | +| method_lookups.swift:41:3:41:5 | .foo(_:_:) | method_lookups.swift:12:3:12:35 | foo(_:_:) | +| method_lookups.swift:42:9:42:9 | Y.init() | method_lookups.swift:15:3:17:3 | Y.init() | +| method_lookups.swift:42:9:42:13 | .baz(_:) | method_lookups.swift:13:3:13:21 | baz(_:) | +| method_lookups.swift:44:11:44:13 | .foo(_:_:) | method_lookups.swift:12:3:12:35 | foo(_:_:) | +| method_lookups.swift:47:1:47:1 | Task.init(priority:operation:) | file://:0:0:0:0 | Task.init(priority:operation:) | +| method_lookups.swift:48:9:48:11 | .foo(_:_:) | method_lookups.swift:22:3:22:35 | foo(_:_:) | +| method_lookups.swift:49:9:49:11 | .bar() | method_lookups.swift:23:15:23:33 | bar() | +| method_lookups.swift:50:9:50:9 | Z.init() | method_lookups.swift:26:3:28:3 | Z.init() | +| method_lookups.swift:50:9:50:13 | .baz(_:) | method_lookups.swift:24:3:24:21 | baz(_:) | +| method_lookups.swift:52:11:52:13 | .bar() | method_lookups.swift:23:15:23:33 | bar() | +| method_lookups.swift:53:18:53:18 | Z.init() | method_lookups.swift:26:3:28:3 | Z.init() | +| method_lookups.swift:53:23:53:23 | .baz(_:) | method_lookups.swift:24:3:24:21 | baz(_:) | diff --git a/swift/ql/test/extractor-tests/generated/expr/MethodLookupExpr/MethodLookupExpr.ql b/swift/ql/test/extractor-tests/generated/expr/MethodLookupExpr/MethodLookupExpr.ql index 74a45c0bad3..d2006d3bc81 100644 --- a/swift/ql/test/extractor-tests/generated/expr/MethodLookupExpr/MethodLookupExpr.ql +++ b/swift/ql/test/extractor-tests/generated/expr/MethodLookupExpr/MethodLookupExpr.ql @@ -2,13 +2,22 @@ import codeql.swift.elements import TestUtils -from MethodLookupExpr x, string hasType, Expr getBase, string hasMember, Expr getMethodRef -where +query predicate instances( + MethodLookupExpr x, string getBase__label, Expr getBase, string getMethodRef__label, + Expr getMethodRef +) { toBeTested(x) and not x.isUnknown() and - (if x.hasType() then hasType = "yes" else hasType = "no") and + getBase__label = "getBase:" and getBase = x.getBase() and - (if x.hasMember() then hasMember = "yes" else hasMember = "no") and + getMethodRef__label = "getMethodRef:" and getMethodRef = x.getMethodRef() -select x, "hasType:", hasType, "getBase:", getBase, "hasMember:", hasMember, "getMethodRef:", - getMethodRef +} + +query predicate getType(MethodLookupExpr x, Type getType) { + toBeTested(x) and not x.isUnknown() and getType = x.getType() +} + +query predicate getMember(MethodLookupExpr x, Decl getMember) { + toBeTested(x) and not x.isUnknown() and getMember = x.getMember() +} diff --git a/swift/ql/test/extractor-tests/generated/expr/MethodLookupExpr/MethodLookupExpr_getMember.expected b/swift/ql/test/extractor-tests/generated/expr/MethodLookupExpr/MethodLookupExpr_getMember.expected deleted file mode 100644 index a272e0da941..00000000000 --- a/swift/ql/test/extractor-tests/generated/expr/MethodLookupExpr/MethodLookupExpr_getMember.expected +++ /dev/null @@ -1,24 +0,0 @@ -| file://:0:0:0:0 | UnownedSerialExecutor.init(_:) | file://:0:0:0:0 | UnownedSerialExecutor.init(_:) | -| method_lookups.swift:7:13:7:13 | .baz(_:) | method_lookups.swift:4:3:4:21 | baz(_:) | -| method_lookups.swift:16:13:16:13 | .baz(_:) | method_lookups.swift:13:3:13:21 | baz(_:) | -| method_lookups.swift:27:13:27:13 | .baz(_:) | method_lookups.swift:24:3:24:21 | baz(_:) | -| method_lookups.swift:32:3:32:5 | .foo(_:_:) | method_lookups.swift:2:3:2:35 | foo(_:_:) | -| method_lookups.swift:33:3:33:5 | .bar() | method_lookups.swift:3:3:3:21 | bar() | -| method_lookups.swift:34:3:34:3 | X.init() | method_lookups.swift:6:3:8:3 | X.init() | -| method_lookups.swift:34:3:34:7 | .baz(_:) | method_lookups.swift:4:3:4:21 | baz(_:) | -| method_lookups.swift:36:11:36:13 | .bar() | method_lookups.swift:3:3:3:21 | bar() | -| method_lookups.swift:37:11:37:11 | X.init() | method_lookups.swift:6:3:8:3 | X.init() | -| method_lookups.swift:37:15:37:15 | .baz(_:) | method_lookups.swift:4:3:4:21 | baz(_:) | -| method_lookups.swift:40:1:40:1 | Task.init(priority:operation:) | file://:0:0:0:0 | Task.init(priority:operation:) | -| method_lookups.swift:41:3:41:5 | .foo(_:_:) | method_lookups.swift:12:3:12:35 | foo(_:_:) | -| method_lookups.swift:42:9:42:9 | Y.init() | method_lookups.swift:15:3:17:3 | Y.init() | -| method_lookups.swift:42:9:42:13 | .baz(_:) | method_lookups.swift:13:3:13:21 | baz(_:) | -| method_lookups.swift:44:11:44:13 | .foo(_:_:) | method_lookups.swift:12:3:12:35 | foo(_:_:) | -| method_lookups.swift:47:1:47:1 | Task.init(priority:operation:) | file://:0:0:0:0 | Task.init(priority:operation:) | -| method_lookups.swift:48:9:48:11 | .foo(_:_:) | method_lookups.swift:22:3:22:35 | foo(_:_:) | -| method_lookups.swift:49:9:49:11 | .bar() | method_lookups.swift:23:15:23:33 | bar() | -| method_lookups.swift:50:9:50:9 | Z.init() | method_lookups.swift:26:3:28:3 | Z.init() | -| method_lookups.swift:50:9:50:13 | .baz(_:) | method_lookups.swift:24:3:24:21 | baz(_:) | -| method_lookups.swift:52:11:52:13 | .bar() | method_lookups.swift:23:15:23:33 | bar() | -| method_lookups.swift:53:18:53:18 | Z.init() | method_lookups.swift:26:3:28:3 | Z.init() | -| method_lookups.swift:53:23:53:23 | .baz(_:) | method_lookups.swift:24:3:24:21 | baz(_:) | diff --git a/swift/ql/test/extractor-tests/generated/expr/MethodLookupExpr/MethodLookupExpr_getMember.ql b/swift/ql/test/extractor-tests/generated/expr/MethodLookupExpr/MethodLookupExpr_getMember.ql deleted file mode 100644 index 5ac3ed35002..00000000000 --- a/swift/ql/test/extractor-tests/generated/expr/MethodLookupExpr/MethodLookupExpr_getMember.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from MethodLookupExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getMember() diff --git a/swift/ql/test/extractor-tests/generated/expr/MethodLookupExpr/MethodLookupExpr_getType.expected b/swift/ql/test/extractor-tests/generated/expr/MethodLookupExpr/MethodLookupExpr_getType.expected deleted file mode 100644 index 7ea638a186c..00000000000 --- a/swift/ql/test/extractor-tests/generated/expr/MethodLookupExpr/MethodLookupExpr_getType.expected +++ /dev/null @@ -1,29 +0,0 @@ -| file://:0:0:0:0 | UnownedSerialExecutor.init(_:) | (Builtin.Executor) -> UnownedSerialExecutor | -| method_lookups.swift:7:13:7:13 | (no string representation) | (Int) -> () | -| method_lookups.swift:7:13:7:13 | .baz(_:) | (Int) -> () | -| method_lookups.swift:16:13:16:13 | (no string representation) | (Int) -> () | -| method_lookups.swift:16:13:16:13 | .baz(_:) | (Int) -> () | -| method_lookups.swift:27:13:27:13 | (no string representation) | @MainActor (Int) -> () | -| method_lookups.swift:27:13:27:13 | .baz(_:) | (Int) -> () | -| method_lookups.swift:32:3:32:5 | .foo(_:_:) | (Int, Int) -> () | -| method_lookups.swift:33:3:33:5 | .bar() | () -> () | -| method_lookups.swift:34:3:34:3 | X.init() | () -> X | -| method_lookups.swift:34:3:34:7 | .baz(_:) | (Int) -> () | -| method_lookups.swift:36:11:36:13 | .bar() | () -> () | -| method_lookups.swift:37:11:37:11 | X.init() | () -> X | -| method_lookups.swift:37:11:37:15 | (no string representation) | (Int) -> () | -| method_lookups.swift:37:15:37:15 | .baz(_:) | (Int) -> () | -| method_lookups.swift:40:1:40:1 | Task.init(priority:operation:) | (TaskPriority?, sending @escaping @isolated(any) () async -> ()) -> Task<(), Never> | -| method_lookups.swift:41:3:41:5 | .foo(_:_:) | (Int, Int) -> () | -| method_lookups.swift:42:9:42:9 | Y.init() | () -> Y | -| method_lookups.swift:42:9:42:13 | .baz(_:) | (Int) -> () | -| method_lookups.swift:44:11:44:13 | .foo(_:_:) | (Int, Int) -> () | -| method_lookups.swift:47:1:47:1 | Task.init(priority:operation:) | (TaskPriority?, sending @escaping @isolated(any) () async -> ()) -> Task<(), Never> | -| method_lookups.swift:48:9:48:11 | .foo(_:_:) | @MainActor (Int, Int) -> () | -| method_lookups.swift:49:9:49:11 | .bar() | () -> () | -| method_lookups.swift:50:9:50:9 | Z.init() | @MainActor () -> Z | -| method_lookups.swift:50:9:50:13 | .baz(_:) | @MainActor (Int) -> () | -| method_lookups.swift:52:11:52:13 | .bar() | () -> () | -| method_lookups.swift:53:11:53:23 | (no string representation) | @MainActor (Int) -> () | -| method_lookups.swift:53:18:53:18 | Z.init() | @MainActor () -> Z | -| method_lookups.swift:53:23:53:23 | .baz(_:) | (Int) -> () | diff --git a/swift/ql/test/extractor-tests/generated/expr/MethodLookupExpr/MethodLookupExpr_getType.ql b/swift/ql/test/extractor-tests/generated/expr/MethodLookupExpr/MethodLookupExpr_getType.ql deleted file mode 100644 index 63641a8fc5f..00000000000 --- a/swift/ql/test/extractor-tests/generated/expr/MethodLookupExpr/MethodLookupExpr_getType.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from MethodLookupExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getType() diff --git a/swift/ql/test/extractor-tests/generated/expr/ObjectLiteralExpr/ObjectLiteralExpr.expected b/swift/ql/test/extractor-tests/generated/expr/ObjectLiteralExpr/ObjectLiteralExpr.expected index 46cfc6b8a79..abf317e5a3b 100644 --- a/swift/ql/test/extractor-tests/generated/expr/ObjectLiteralExpr/ObjectLiteralExpr.expected +++ b/swift/ql/test/extractor-tests/generated/expr/ObjectLiteralExpr/ObjectLiteralExpr.expected @@ -1,3 +1,15 @@ -| object_literals.swift:5:5:5:42 | #fileLiteral(...) | hasType: | yes | getKind: | 0 | getNumberOfArguments: | 1 | -| object_literals.swift:6:5:6:61 | #colorLiteral(...) | hasType: | yes | getKind: | 2 | getNumberOfArguments: | 4 | -| object_literals.swift:7:5:7:44 | #imageLiteral(...) | hasType: | yes | getKind: | 1 | getNumberOfArguments: | 1 | +instances +| object_literals.swift:5:5:5:42 | #fileLiteral(...) | getKind: | 0 | +| object_literals.swift:6:5:6:61 | #colorLiteral(...) | getKind: | 2 | +| object_literals.swift:7:5:7:44 | #imageLiteral(...) | getKind: | 1 | +getType +| object_literals.swift:5:5:5:42 | #fileLiteral(...) | <> | +| object_literals.swift:6:5:6:61 | #colorLiteral(...) | <> | +| object_literals.swift:7:5:7:44 | #imageLiteral(...) | <> | +getArgument +| object_literals.swift:5:5:5:42 | #fileLiteral(...) | 0 | object_literals.swift:5:18:5:32 | resourceName: file.txt | +| object_literals.swift:6:5:6:61 | #colorLiteral(...) | 0 | object_literals.swift:6:19:6:24 | red: 255 | +| object_literals.swift:6:5:6:61 | #colorLiteral(...) | 1 | object_literals.swift:6:29:6:36 | green: 255 | +| object_literals.swift:6:5:6:61 | #colorLiteral(...) | 2 | object_literals.swift:6:41:6:47 | blue: 255 | +| object_literals.swift:6:5:6:61 | #colorLiteral(...) | 3 | object_literals.swift:6:52:6:59 | alpha: 50 | +| object_literals.swift:7:5:7:44 | #imageLiteral(...) | 0 | object_literals.swift:7:19:7:33 | resourceName: image.gif | diff --git a/swift/ql/test/extractor-tests/generated/expr/ObjectLiteralExpr/ObjectLiteralExpr.ql b/swift/ql/test/extractor-tests/generated/expr/ObjectLiteralExpr/ObjectLiteralExpr.ql index 229da3ff942..f84367ab3bb 100644 --- a/swift/ql/test/extractor-tests/generated/expr/ObjectLiteralExpr/ObjectLiteralExpr.ql +++ b/swift/ql/test/extractor-tests/generated/expr/ObjectLiteralExpr/ObjectLiteralExpr.ql @@ -2,11 +2,17 @@ import codeql.swift.elements import TestUtils -from ObjectLiteralExpr x, string hasType, int getKind, int getNumberOfArguments -where +query predicate instances(ObjectLiteralExpr x, string getKind__label, int getKind) { toBeTested(x) and not x.isUnknown() and - (if x.hasType() then hasType = "yes" else hasType = "no") and - getKind = x.getKind() and - getNumberOfArguments = x.getNumberOfArguments() -select x, "hasType:", hasType, "getKind:", getKind, "getNumberOfArguments:", getNumberOfArguments + getKind__label = "getKind:" and + getKind = x.getKind() +} + +query predicate getType(ObjectLiteralExpr x, Type getType) { + toBeTested(x) and not x.isUnknown() and getType = x.getType() +} + +query predicate getArgument(ObjectLiteralExpr x, int index, Argument getArgument) { + toBeTested(x) and not x.isUnknown() and getArgument = x.getArgument(index) +} diff --git a/swift/ql/test/extractor-tests/generated/expr/ObjectLiteralExpr/ObjectLiteralExpr_getArgument.expected b/swift/ql/test/extractor-tests/generated/expr/ObjectLiteralExpr/ObjectLiteralExpr_getArgument.expected deleted file mode 100644 index aa581dfdd81..00000000000 --- a/swift/ql/test/extractor-tests/generated/expr/ObjectLiteralExpr/ObjectLiteralExpr_getArgument.expected +++ /dev/null @@ -1,6 +0,0 @@ -| object_literals.swift:5:5:5:42 | #fileLiteral(...) | 0 | object_literals.swift:5:18:5:32 | resourceName: file.txt | -| object_literals.swift:6:5:6:61 | #colorLiteral(...) | 0 | object_literals.swift:6:19:6:24 | red: 255 | -| object_literals.swift:6:5:6:61 | #colorLiteral(...) | 1 | object_literals.swift:6:29:6:36 | green: 255 | -| object_literals.swift:6:5:6:61 | #colorLiteral(...) | 2 | object_literals.swift:6:41:6:47 | blue: 255 | -| object_literals.swift:6:5:6:61 | #colorLiteral(...) | 3 | object_literals.swift:6:52:6:59 | alpha: 50 | -| object_literals.swift:7:5:7:44 | #imageLiteral(...) | 0 | object_literals.swift:7:19:7:33 | resourceName: image.gif | diff --git a/swift/ql/test/extractor-tests/generated/expr/ObjectLiteralExpr/ObjectLiteralExpr_getArgument.ql b/swift/ql/test/extractor-tests/generated/expr/ObjectLiteralExpr/ObjectLiteralExpr_getArgument.ql deleted file mode 100644 index ee6d74c73f0..00000000000 --- a/swift/ql/test/extractor-tests/generated/expr/ObjectLiteralExpr/ObjectLiteralExpr_getArgument.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from ObjectLiteralExpr x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getArgument(index) diff --git a/swift/ql/test/extractor-tests/generated/expr/ObjectLiteralExpr/ObjectLiteralExpr_getType.expected b/swift/ql/test/extractor-tests/generated/expr/ObjectLiteralExpr/ObjectLiteralExpr_getType.expected deleted file mode 100644 index 49fcd7db593..00000000000 --- a/swift/ql/test/extractor-tests/generated/expr/ObjectLiteralExpr/ObjectLiteralExpr_getType.expected +++ /dev/null @@ -1,3 +0,0 @@ -| object_literals.swift:5:5:5:42 | #fileLiteral(...) | <> | -| object_literals.swift:6:5:6:61 | #colorLiteral(...) | <> | -| object_literals.swift:7:5:7:44 | #imageLiteral(...) | <> | diff --git a/swift/ql/test/extractor-tests/generated/expr/ObjectLiteralExpr/ObjectLiteralExpr_getType.ql b/swift/ql/test/extractor-tests/generated/expr/ObjectLiteralExpr/ObjectLiteralExpr_getType.ql deleted file mode 100644 index 98378261fd0..00000000000 --- a/swift/ql/test/extractor-tests/generated/expr/ObjectLiteralExpr/ObjectLiteralExpr_getType.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from ObjectLiteralExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getType() diff --git a/swift/ql/test/extractor-tests/generated/expr/OpenExistentialExpr/OpenExistentialExpr.expected b/swift/ql/test/extractor-tests/generated/expr/OpenExistentialExpr/OpenExistentialExpr.expected index 4d2e4f05c6e..14fd43b8fd5 100644 --- a/swift/ql/test/extractor-tests/generated/expr/OpenExistentialExpr/OpenExistentialExpr.expected +++ b/swift/ql/test/extractor-tests/generated/expr/OpenExistentialExpr/OpenExistentialExpr.expected @@ -1 +1,4 @@ -| open_existentials.swift:14:5:14:19 | OpenExistentialExpr | hasType: | yes | getSubExpr: | open_existentials.swift:14:5:14:19 | call to foo() | getExistential: | open_existentials.swift:14:5:14:13 | call to createP() | getOpaqueExpr: | open_existentials.swift:14:5:14:13 | OpaqueValueExpr | +instances +| open_existentials.swift:14:5:14:19 | OpenExistentialExpr | getSubExpr: | open_existentials.swift:14:5:14:19 | call to foo() | getExistential: | open_existentials.swift:14:5:14:13 | call to createP() | getOpaqueExpr: | open_existentials.swift:14:5:14:13 | OpaqueValueExpr | +getType +| open_existentials.swift:14:5:14:19 | OpenExistentialExpr | () | diff --git a/swift/ql/test/extractor-tests/generated/expr/OpenExistentialExpr/OpenExistentialExpr.ql b/swift/ql/test/extractor-tests/generated/expr/OpenExistentialExpr/OpenExistentialExpr.ql index 86e0c488872..c94f907c4e9 100644 --- a/swift/ql/test/extractor-tests/generated/expr/OpenExistentialExpr/OpenExistentialExpr.ql +++ b/swift/ql/test/extractor-tests/generated/expr/OpenExistentialExpr/OpenExistentialExpr.ql @@ -2,15 +2,20 @@ import codeql.swift.elements import TestUtils -from - OpenExistentialExpr x, string hasType, Expr getSubExpr, Expr getExistential, - OpaqueValueExpr getOpaqueExpr -where +query predicate instances( + OpenExistentialExpr x, string getSubExpr__label, Expr getSubExpr, string getExistential__label, + Expr getExistential, string getOpaqueExpr__label, OpaqueValueExpr getOpaqueExpr +) { toBeTested(x) and not x.isUnknown() and - (if x.hasType() then hasType = "yes" else hasType = "no") and + getSubExpr__label = "getSubExpr:" and getSubExpr = x.getSubExpr() and + getExistential__label = "getExistential:" and getExistential = x.getExistential() and + getOpaqueExpr__label = "getOpaqueExpr:" and getOpaqueExpr = x.getOpaqueExpr() -select x, "hasType:", hasType, "getSubExpr:", getSubExpr, "getExistential:", getExistential, - "getOpaqueExpr:", getOpaqueExpr +} + +query predicate getType(OpenExistentialExpr x, Type getType) { + toBeTested(x) and not x.isUnknown() and getType = x.getType() +} diff --git a/swift/ql/test/extractor-tests/generated/expr/OpenExistentialExpr/OpenExistentialExpr_getType.expected b/swift/ql/test/extractor-tests/generated/expr/OpenExistentialExpr/OpenExistentialExpr_getType.expected deleted file mode 100644 index 2103b344895..00000000000 --- a/swift/ql/test/extractor-tests/generated/expr/OpenExistentialExpr/OpenExistentialExpr_getType.expected +++ /dev/null @@ -1 +0,0 @@ -| open_existentials.swift:14:5:14:19 | OpenExistentialExpr | () | diff --git a/swift/ql/test/extractor-tests/generated/expr/OpenExistentialExpr/OpenExistentialExpr_getType.ql b/swift/ql/test/extractor-tests/generated/expr/OpenExistentialExpr/OpenExistentialExpr_getType.ql deleted file mode 100644 index 3e6f5ad9700..00000000000 --- a/swift/ql/test/extractor-tests/generated/expr/OpenExistentialExpr/OpenExistentialExpr_getType.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from OpenExistentialExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getType() diff --git a/swift/ql/test/extractor-tests/generated/expr/PackExpansionExpr/MaterializePackExpr.expected b/swift/ql/test/extractor-tests/generated/expr/PackExpansionExpr/MaterializePackExpr.expected index e69de29bb2d..26ca47278ce 100644 --- a/swift/ql/test/extractor-tests/generated/expr/PackExpansionExpr/MaterializePackExpr.expected +++ b/swift/ql/test/extractor-tests/generated/expr/PackExpansionExpr/MaterializePackExpr.expected @@ -0,0 +1,2 @@ +instances +getType diff --git a/swift/ql/test/extractor-tests/generated/expr/PackExpansionExpr/MaterializePackExpr.ql b/swift/ql/test/extractor-tests/generated/expr/PackExpansionExpr/MaterializePackExpr.ql index 190e4009893..1863b6090b9 100644 --- a/swift/ql/test/extractor-tests/generated/expr/PackExpansionExpr/MaterializePackExpr.ql +++ b/swift/ql/test/extractor-tests/generated/expr/PackExpansionExpr/MaterializePackExpr.ql @@ -2,10 +2,13 @@ import codeql.swift.elements import TestUtils -from MaterializePackExpr x, string hasType, Expr getSubExpr -where +query predicate instances(MaterializePackExpr x, string getSubExpr__label, Expr getSubExpr) { toBeTested(x) and not x.isUnknown() and - (if x.hasType() then hasType = "yes" else hasType = "no") and + getSubExpr__label = "getSubExpr:" and getSubExpr = x.getSubExpr() -select x, "hasType:", hasType, "getSubExpr:", getSubExpr +} + +query predicate getType(MaterializePackExpr x, Type getType) { + toBeTested(x) and not x.isUnknown() and getType = x.getType() +} diff --git a/swift/ql/test/extractor-tests/generated/expr/PackExpansionExpr/MaterializePackExpr_getType.expected b/swift/ql/test/extractor-tests/generated/expr/PackExpansionExpr/MaterializePackExpr_getType.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/swift/ql/test/extractor-tests/generated/expr/PackExpansionExpr/MaterializePackExpr_getType.ql b/swift/ql/test/extractor-tests/generated/expr/PackExpansionExpr/MaterializePackExpr_getType.ql deleted file mode 100644 index e1c8ad68ca4..00000000000 --- a/swift/ql/test/extractor-tests/generated/expr/PackExpansionExpr/MaterializePackExpr_getType.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from MaterializePackExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getType() diff --git a/swift/ql/test/extractor-tests/generated/expr/PackExpansionExpr/PackElementExpr.expected b/swift/ql/test/extractor-tests/generated/expr/PackExpansionExpr/PackElementExpr.expected index da55509ca55..d970fe07944 100644 --- a/swift/ql/test/extractor-tests/generated/expr/PackExpansionExpr/PackElementExpr.expected +++ b/swift/ql/test/extractor-tests/generated/expr/PackExpansionExpr/PackElementExpr.expected @@ -1 +1,4 @@ -| test.swift:2:18:2:23 | PackElementExpr | hasType: | yes | getSubExpr: | test.swift:2:23:2:23 | t | +instances +| test.swift:2:18:2:23 | PackElementExpr | getSubExpr: | test.swift:2:23:2:23 | t | +getType +| test.swift:2:18:2:23 | PackElementExpr | \u03c4_1_0 | diff --git a/swift/ql/test/extractor-tests/generated/expr/PackExpansionExpr/PackElementExpr.ql b/swift/ql/test/extractor-tests/generated/expr/PackExpansionExpr/PackElementExpr.ql index c86c6235de8..a9f6532242f 100644 --- a/swift/ql/test/extractor-tests/generated/expr/PackExpansionExpr/PackElementExpr.ql +++ b/swift/ql/test/extractor-tests/generated/expr/PackExpansionExpr/PackElementExpr.ql @@ -2,10 +2,13 @@ import codeql.swift.elements import TestUtils -from PackElementExpr x, string hasType, Expr getSubExpr -where +query predicate instances(PackElementExpr x, string getSubExpr__label, Expr getSubExpr) { toBeTested(x) and not x.isUnknown() and - (if x.hasType() then hasType = "yes" else hasType = "no") and + getSubExpr__label = "getSubExpr:" and getSubExpr = x.getSubExpr() -select x, "hasType:", hasType, "getSubExpr:", getSubExpr +} + +query predicate getType(PackElementExpr x, Type getType) { + toBeTested(x) and not x.isUnknown() and getType = x.getType() +} diff --git a/swift/ql/test/extractor-tests/generated/expr/PackExpansionExpr/PackElementExpr_getType.expected b/swift/ql/test/extractor-tests/generated/expr/PackExpansionExpr/PackElementExpr_getType.expected deleted file mode 100644 index b2a455ec7f3..00000000000 --- a/swift/ql/test/extractor-tests/generated/expr/PackExpansionExpr/PackElementExpr_getType.expected +++ /dev/null @@ -1 +0,0 @@ -| test.swift:2:18:2:23 | PackElementExpr | \u03c4_1_0 | diff --git a/swift/ql/test/extractor-tests/generated/expr/PackExpansionExpr/PackElementExpr_getType.ql b/swift/ql/test/extractor-tests/generated/expr/PackExpansionExpr/PackElementExpr_getType.ql deleted file mode 100644 index 7e43978e2b2..00000000000 --- a/swift/ql/test/extractor-tests/generated/expr/PackExpansionExpr/PackElementExpr_getType.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from PackElementExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getType() diff --git a/swift/ql/test/extractor-tests/generated/expr/PackExpansionExpr/PackExpansionExpr.expected b/swift/ql/test/extractor-tests/generated/expr/PackExpansionExpr/PackExpansionExpr.expected index 071187d2746..9815b9396c7 100644 --- a/swift/ql/test/extractor-tests/generated/expr/PackExpansionExpr/PackExpansionExpr.expected +++ b/swift/ql/test/extractor-tests/generated/expr/PackExpansionExpr/PackExpansionExpr.expected @@ -1 +1,4 @@ -| test.swift:2:11:2:23 | PackExpansionExpr | hasType: | yes | getPatternExpr: | test.swift:2:18:2:23 | PackElementExpr | +instances +| test.swift:2:11:2:23 | PackExpansionExpr | getPatternExpr: | test.swift:2:18:2:23 | PackElementExpr | +getType +| test.swift:2:11:2:23 | PackExpansionExpr | repeat each T | diff --git a/swift/ql/test/extractor-tests/generated/expr/PackExpansionExpr/PackExpansionExpr.ql b/swift/ql/test/extractor-tests/generated/expr/PackExpansionExpr/PackExpansionExpr.ql index a7a19b30b9e..2ef41d1f244 100644 --- a/swift/ql/test/extractor-tests/generated/expr/PackExpansionExpr/PackExpansionExpr.ql +++ b/swift/ql/test/extractor-tests/generated/expr/PackExpansionExpr/PackExpansionExpr.ql @@ -2,10 +2,13 @@ import codeql.swift.elements import TestUtils -from PackExpansionExpr x, string hasType, Expr getPatternExpr -where +query predicate instances(PackExpansionExpr x, string getPatternExpr__label, Expr getPatternExpr) { toBeTested(x) and not x.isUnknown() and - (if x.hasType() then hasType = "yes" else hasType = "no") and + getPatternExpr__label = "getPatternExpr:" and getPatternExpr = x.getPatternExpr() -select x, "hasType:", hasType, "getPatternExpr:", getPatternExpr +} + +query predicate getType(PackExpansionExpr x, Type getType) { + toBeTested(x) and not x.isUnknown() and getType = x.getType() +} diff --git a/swift/ql/test/extractor-tests/generated/expr/PackExpansionExpr/PackExpansionExpr_getType.expected b/swift/ql/test/extractor-tests/generated/expr/PackExpansionExpr/PackExpansionExpr_getType.expected deleted file mode 100644 index c391c208118..00000000000 --- a/swift/ql/test/extractor-tests/generated/expr/PackExpansionExpr/PackExpansionExpr_getType.expected +++ /dev/null @@ -1 +0,0 @@ -| test.swift:2:11:2:23 | PackExpansionExpr | repeat each T | diff --git a/swift/ql/test/extractor-tests/generated/expr/PackExpansionExpr/PackExpansionExpr_getType.ql b/swift/ql/test/extractor-tests/generated/expr/PackExpansionExpr/PackExpansionExpr_getType.ql deleted file mode 100644 index a7d8aec2bf3..00000000000 --- a/swift/ql/test/extractor-tests/generated/expr/PackExpansionExpr/PackExpansionExpr_getType.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from PackExpansionExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getType() diff --git a/swift/ql/test/extractor-tests/generated/expr/PostfixUnaryExpr/PostfixUnaryExpr.expected b/swift/ql/test/extractor-tests/generated/expr/PostfixUnaryExpr/PostfixUnaryExpr.expected index 4207559e85e..33f82610039 100644 --- a/swift/ql/test/extractor-tests/generated/expr/PostfixUnaryExpr/PostfixUnaryExpr.expected +++ b/swift/ql/test/extractor-tests/generated/expr/PostfixUnaryExpr/PostfixUnaryExpr.expected @@ -1,2 +1,9 @@ -| postfix.swift:1:5:1:6 | call to ...(_:) | hasType: | yes | getFunction: | postfix.swift:1:6:1:6 | ....(_:) | getNumberOfArguments: | 1 | -| postfix.swift:7:1:7:2 | call to **(_:) | hasType: | yes | getFunction: | postfix.swift:7:2:7:2 | **(_:) | getNumberOfArguments: | 1 | +instances +| postfix.swift:1:5:1:6 | call to ...(_:) | getFunction: | postfix.swift:1:6:1:6 | ....(_:) | +| postfix.swift:7:1:7:2 | call to **(_:) | getFunction: | postfix.swift:7:2:7:2 | **(_:) | +getType +| postfix.swift:1:5:1:6 | call to ...(_:) | PartialRangeFrom | +| postfix.swift:7:1:7:2 | call to **(_:) | () | +getArgument +| postfix.swift:1:5:1:6 | call to ...(_:) | 0 | postfix.swift:1:5:1:5 | : 3 | +| postfix.swift:7:1:7:2 | call to **(_:) | 0 | postfix.swift:7:1:7:1 | : 3 | diff --git a/swift/ql/test/extractor-tests/generated/expr/PostfixUnaryExpr/PostfixUnaryExpr.ql b/swift/ql/test/extractor-tests/generated/expr/PostfixUnaryExpr/PostfixUnaryExpr.ql index cbdd281f5d6..101048cb5c1 100644 --- a/swift/ql/test/extractor-tests/generated/expr/PostfixUnaryExpr/PostfixUnaryExpr.ql +++ b/swift/ql/test/extractor-tests/generated/expr/PostfixUnaryExpr/PostfixUnaryExpr.ql @@ -2,12 +2,17 @@ import codeql.swift.elements import TestUtils -from PostfixUnaryExpr x, string hasType, Expr getFunction, int getNumberOfArguments -where +query predicate instances(PostfixUnaryExpr x, string getFunction__label, Expr getFunction) { toBeTested(x) and not x.isUnknown() and - (if x.hasType() then hasType = "yes" else hasType = "no") and - getFunction = x.getFunction() and - getNumberOfArguments = x.getNumberOfArguments() -select x, "hasType:", hasType, "getFunction:", getFunction, "getNumberOfArguments:", - getNumberOfArguments + getFunction__label = "getFunction:" and + getFunction = x.getFunction() +} + +query predicate getType(PostfixUnaryExpr x, Type getType) { + toBeTested(x) and not x.isUnknown() and getType = x.getType() +} + +query predicate getArgument(PostfixUnaryExpr x, int index, Argument getArgument) { + toBeTested(x) and not x.isUnknown() and getArgument = x.getArgument(index) +} diff --git a/swift/ql/test/extractor-tests/generated/expr/PostfixUnaryExpr/PostfixUnaryExpr_getArgument.expected b/swift/ql/test/extractor-tests/generated/expr/PostfixUnaryExpr/PostfixUnaryExpr_getArgument.expected deleted file mode 100644 index 8529faaf7a4..00000000000 --- a/swift/ql/test/extractor-tests/generated/expr/PostfixUnaryExpr/PostfixUnaryExpr_getArgument.expected +++ /dev/null @@ -1,2 +0,0 @@ -| postfix.swift:1:5:1:6 | call to ...(_:) | 0 | postfix.swift:1:5:1:5 | : 3 | -| postfix.swift:7:1:7:2 | call to **(_:) | 0 | postfix.swift:7:1:7:1 | : 3 | diff --git a/swift/ql/test/extractor-tests/generated/expr/PostfixUnaryExpr/PostfixUnaryExpr_getArgument.ql b/swift/ql/test/extractor-tests/generated/expr/PostfixUnaryExpr/PostfixUnaryExpr_getArgument.ql deleted file mode 100644 index f8d2dbc0b8f..00000000000 --- a/swift/ql/test/extractor-tests/generated/expr/PostfixUnaryExpr/PostfixUnaryExpr_getArgument.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from PostfixUnaryExpr x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getArgument(index) diff --git a/swift/ql/test/extractor-tests/generated/expr/PostfixUnaryExpr/PostfixUnaryExpr_getType.expected b/swift/ql/test/extractor-tests/generated/expr/PostfixUnaryExpr/PostfixUnaryExpr_getType.expected deleted file mode 100644 index caa5cc7f158..00000000000 --- a/swift/ql/test/extractor-tests/generated/expr/PostfixUnaryExpr/PostfixUnaryExpr_getType.expected +++ /dev/null @@ -1,2 +0,0 @@ -| postfix.swift:1:5:1:6 | call to ...(_:) | PartialRangeFrom | -| postfix.swift:7:1:7:2 | call to **(_:) | () | diff --git a/swift/ql/test/extractor-tests/generated/expr/PostfixUnaryExpr/PostfixUnaryExpr_getType.ql b/swift/ql/test/extractor-tests/generated/expr/PostfixUnaryExpr/PostfixUnaryExpr_getType.ql deleted file mode 100644 index 175b51cc516..00000000000 --- a/swift/ql/test/extractor-tests/generated/expr/PostfixUnaryExpr/PostfixUnaryExpr_getType.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from PostfixUnaryExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getType() diff --git a/swift/ql/test/extractor-tests/generated/expr/PropertyWrapperValuePlaceholderExpr/PropertyWrapperValuePlaceholderExpr.expected b/swift/ql/test/extractor-tests/generated/expr/PropertyWrapperValuePlaceholderExpr/PropertyWrapperValuePlaceholderExpr.expected index 9fda9feadaf..9276038c719 100644 --- a/swift/ql/test/extractor-tests/generated/expr/PropertyWrapperValuePlaceholderExpr/PropertyWrapperValuePlaceholderExpr.expected +++ b/swift/ql/test/extractor-tests/generated/expr/PropertyWrapperValuePlaceholderExpr/PropertyWrapperValuePlaceholderExpr.expected @@ -1 +1,6 @@ -| property_wrapper_value_placeholder.swift:12:26:12:26 | PropertyWrapperValuePlaceholderExpr | hasType: | yes | hasWrappedValue: | yes | getPlaceholder: | property_wrapper_value_placeholder.swift:12:26:12:26 | OpaqueValueExpr | +instances +| property_wrapper_value_placeholder.swift:12:26:12:26 | PropertyWrapperValuePlaceholderExpr | getPlaceholder: | property_wrapper_value_placeholder.swift:12:26:12:26 | OpaqueValueExpr | +getType +| property_wrapper_value_placeholder.swift:12:26:12:26 | PropertyWrapperValuePlaceholderExpr | Int | +getWrappedValue +| property_wrapper_value_placeholder.swift:12:26:12:26 | PropertyWrapperValuePlaceholderExpr | property_wrapper_value_placeholder.swift:12:26:12:26 | 42 | diff --git a/swift/ql/test/extractor-tests/generated/expr/PropertyWrapperValuePlaceholderExpr/PropertyWrapperValuePlaceholderExpr.ql b/swift/ql/test/extractor-tests/generated/expr/PropertyWrapperValuePlaceholderExpr/PropertyWrapperValuePlaceholderExpr.ql index 7d385ce8430..bdd44df47b6 100644 --- a/swift/ql/test/extractor-tests/generated/expr/PropertyWrapperValuePlaceholderExpr/PropertyWrapperValuePlaceholderExpr.ql +++ b/swift/ql/test/extractor-tests/generated/expr/PropertyWrapperValuePlaceholderExpr/PropertyWrapperValuePlaceholderExpr.ql @@ -2,14 +2,20 @@ import codeql.swift.elements import TestUtils -from - PropertyWrapperValuePlaceholderExpr x, string hasType, string hasWrappedValue, +query predicate instances( + PropertyWrapperValuePlaceholderExpr x, string getPlaceholder__label, OpaqueValueExpr getPlaceholder -where +) { toBeTested(x) and not x.isUnknown() and - (if x.hasType() then hasType = "yes" else hasType = "no") and - (if x.hasWrappedValue() then hasWrappedValue = "yes" else hasWrappedValue = "no") and + getPlaceholder__label = "getPlaceholder:" and getPlaceholder = x.getPlaceholder() -select x, "hasType:", hasType, "hasWrappedValue:", hasWrappedValue, "getPlaceholder:", - getPlaceholder +} + +query predicate getType(PropertyWrapperValuePlaceholderExpr x, Type getType) { + toBeTested(x) and not x.isUnknown() and getType = x.getType() +} + +query predicate getWrappedValue(PropertyWrapperValuePlaceholderExpr x, Expr getWrappedValue) { + toBeTested(x) and not x.isUnknown() and getWrappedValue = x.getWrappedValue() +} diff --git a/swift/ql/test/extractor-tests/generated/expr/PropertyWrapperValuePlaceholderExpr/PropertyWrapperValuePlaceholderExpr_getType.expected b/swift/ql/test/extractor-tests/generated/expr/PropertyWrapperValuePlaceholderExpr/PropertyWrapperValuePlaceholderExpr_getType.expected deleted file mode 100644 index c8ac89e2844..00000000000 --- a/swift/ql/test/extractor-tests/generated/expr/PropertyWrapperValuePlaceholderExpr/PropertyWrapperValuePlaceholderExpr_getType.expected +++ /dev/null @@ -1 +0,0 @@ -| property_wrapper_value_placeholder.swift:12:26:12:26 | PropertyWrapperValuePlaceholderExpr | Int | diff --git a/swift/ql/test/extractor-tests/generated/expr/PropertyWrapperValuePlaceholderExpr/PropertyWrapperValuePlaceholderExpr_getType.ql b/swift/ql/test/extractor-tests/generated/expr/PropertyWrapperValuePlaceholderExpr/PropertyWrapperValuePlaceholderExpr_getType.ql deleted file mode 100644 index 530cbc87283..00000000000 --- a/swift/ql/test/extractor-tests/generated/expr/PropertyWrapperValuePlaceholderExpr/PropertyWrapperValuePlaceholderExpr_getType.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from PropertyWrapperValuePlaceholderExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getType() diff --git a/swift/ql/test/extractor-tests/generated/expr/PropertyWrapperValuePlaceholderExpr/PropertyWrapperValuePlaceholderExpr_getWrappedValue.expected b/swift/ql/test/extractor-tests/generated/expr/PropertyWrapperValuePlaceholderExpr/PropertyWrapperValuePlaceholderExpr_getWrappedValue.expected deleted file mode 100644 index 042308c9ea3..00000000000 --- a/swift/ql/test/extractor-tests/generated/expr/PropertyWrapperValuePlaceholderExpr/PropertyWrapperValuePlaceholderExpr_getWrappedValue.expected +++ /dev/null @@ -1 +0,0 @@ -| property_wrapper_value_placeholder.swift:12:26:12:26 | PropertyWrapperValuePlaceholderExpr | property_wrapper_value_placeholder.swift:12:26:12:26 | 42 | diff --git a/swift/ql/test/extractor-tests/generated/expr/PropertyWrapperValuePlaceholderExpr/PropertyWrapperValuePlaceholderExpr_getWrappedValue.ql b/swift/ql/test/extractor-tests/generated/expr/PropertyWrapperValuePlaceholderExpr/PropertyWrapperValuePlaceholderExpr_getWrappedValue.ql deleted file mode 100644 index 028c492631b..00000000000 --- a/swift/ql/test/extractor-tests/generated/expr/PropertyWrapperValuePlaceholderExpr/PropertyWrapperValuePlaceholderExpr_getWrappedValue.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from PropertyWrapperValuePlaceholderExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getWrappedValue() diff --git a/swift/ql/test/extractor-tests/generated/expr/SingleValueStmtExpr/SingleValueStmtExpr.expected b/swift/ql/test/extractor-tests/generated/expr/SingleValueStmtExpr/SingleValueStmtExpr.expected index 336aca667ee..a76ec56151d 100644 --- a/swift/ql/test/extractor-tests/generated/expr/SingleValueStmtExpr/SingleValueStmtExpr.expected +++ b/swift/ql/test/extractor-tests/generated/expr/SingleValueStmtExpr/SingleValueStmtExpr.expected @@ -1,2 +1,6 @@ -| test.swift:2:3:7:3 | SingleValueStmtExpr | hasType: | yes | getStmt: | test.swift:2:3:7:3 | switch x { ... } | -| test.swift:11:3:11:30 | SingleValueStmtExpr | hasType: | yes | getStmt: | test.swift:11:3:11:30 | if ... then { ... } else { ... } | +instances +| test.swift:2:3:7:3 | SingleValueStmtExpr | getStmt: | test.swift:2:3:7:3 | switch x { ... } | +| test.swift:11:3:11:30 | SingleValueStmtExpr | getStmt: | test.swift:11:3:11:30 | if ... then { ... } else { ... } | +getType +| test.swift:2:3:7:3 | SingleValueStmtExpr | Int | +| test.swift:11:3:11:30 | SingleValueStmtExpr | Int | diff --git a/swift/ql/test/extractor-tests/generated/expr/SingleValueStmtExpr/SingleValueStmtExpr.ql b/swift/ql/test/extractor-tests/generated/expr/SingleValueStmtExpr/SingleValueStmtExpr.ql index 79e304da1d7..a6093558118 100644 --- a/swift/ql/test/extractor-tests/generated/expr/SingleValueStmtExpr/SingleValueStmtExpr.ql +++ b/swift/ql/test/extractor-tests/generated/expr/SingleValueStmtExpr/SingleValueStmtExpr.ql @@ -2,10 +2,13 @@ import codeql.swift.elements import TestUtils -from SingleValueStmtExpr x, string hasType, Stmt getStmt -where +query predicate instances(SingleValueStmtExpr x, string getStmt__label, Stmt getStmt) { toBeTested(x) and not x.isUnknown() and - (if x.hasType() then hasType = "yes" else hasType = "no") and + getStmt__label = "getStmt:" and getStmt = x.getStmt() -select x, "hasType:", hasType, "getStmt:", getStmt +} + +query predicate getType(SingleValueStmtExpr x, Type getType) { + toBeTested(x) and not x.isUnknown() and getType = x.getType() +} diff --git a/swift/ql/test/extractor-tests/generated/expr/SingleValueStmtExpr/SingleValueStmtExpr_getType.expected b/swift/ql/test/extractor-tests/generated/expr/SingleValueStmtExpr/SingleValueStmtExpr_getType.expected deleted file mode 100644 index 9d533e94cda..00000000000 --- a/swift/ql/test/extractor-tests/generated/expr/SingleValueStmtExpr/SingleValueStmtExpr_getType.expected +++ /dev/null @@ -1,2 +0,0 @@ -| test.swift:2:3:7:3 | SingleValueStmtExpr | Int | -| test.swift:11:3:11:30 | SingleValueStmtExpr | Int | diff --git a/swift/ql/test/extractor-tests/generated/expr/SingleValueStmtExpr/SingleValueStmtExpr_getType.ql b/swift/ql/test/extractor-tests/generated/expr/SingleValueStmtExpr/SingleValueStmtExpr_getType.ql deleted file mode 100644 index bd8354df61d..00000000000 --- a/swift/ql/test/extractor-tests/generated/expr/SingleValueStmtExpr/SingleValueStmtExpr_getType.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from SingleValueStmtExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getType() diff --git a/swift/ql/test/extractor-tests/generated/expr/SingleValueStmtExpr/ThenStmt.ql b/swift/ql/test/extractor-tests/generated/expr/SingleValueStmtExpr/ThenStmt.ql index a03b5a6b9ae..d98b8553bd1 100644 --- a/swift/ql/test/extractor-tests/generated/expr/SingleValueStmtExpr/ThenStmt.ql +++ b/swift/ql/test/extractor-tests/generated/expr/SingleValueStmtExpr/ThenStmt.ql @@ -2,9 +2,9 @@ import codeql.swift.elements import TestUtils -from ThenStmt x, Expr getResult -where +query predicate instances(ThenStmt x, string getResult__label, Expr getResult) { toBeTested(x) and not x.isUnknown() and + getResult__label = "getResult:" and getResult = x.getResult() -select x, "getResult:", getResult +} diff --git a/swift/ql/test/extractor-tests/generated/expr/TypeValueExpr/TypeValueExpr.expected b/swift/ql/test/extractor-tests/generated/expr/TypeValueExpr/TypeValueExpr.expected index 685ff810fcf..a495d6d72d8 100644 --- a/swift/ql/test/extractor-tests/generated/expr/TypeValueExpr/TypeValueExpr.expected +++ b/swift/ql/test/extractor-tests/generated/expr/TypeValueExpr/TypeValueExpr.expected @@ -1,2 +1,6 @@ -| type_value_exprs.swift:4:13:4:13 | TypeValueExpr | hasType: | yes | getTypeRepr: | type_value_exprs.swift:4:13:4:13 | N | -| type_value_exprs.swift:5:13:5:13 | TypeValueExpr | hasType: | yes | getTypeRepr: | type_value_exprs.swift:5:13:5:13 | N | +instances +| type_value_exprs.swift:4:13:4:13 | TypeValueExpr | getTypeRepr: | type_value_exprs.swift:4:13:4:13 | N | +| type_value_exprs.swift:5:13:5:13 | TypeValueExpr | getTypeRepr: | type_value_exprs.swift:5:13:5:13 | N | +getType +| type_value_exprs.swift:4:13:4:13 | TypeValueExpr | Int | +| type_value_exprs.swift:5:13:5:13 | TypeValueExpr | Int | diff --git a/swift/ql/test/extractor-tests/generated/expr/TypeValueExpr/TypeValueExpr.ql b/swift/ql/test/extractor-tests/generated/expr/TypeValueExpr/TypeValueExpr.ql index d434781d152..a8f3d7163fd 100644 --- a/swift/ql/test/extractor-tests/generated/expr/TypeValueExpr/TypeValueExpr.ql +++ b/swift/ql/test/extractor-tests/generated/expr/TypeValueExpr/TypeValueExpr.ql @@ -2,10 +2,13 @@ import codeql.swift.elements import TestUtils -from TypeValueExpr x, string hasType, TypeRepr getTypeRepr -where +query predicate instances(TypeValueExpr x, string getTypeRepr__label, TypeRepr getTypeRepr) { toBeTested(x) and not x.isUnknown() and - (if x.hasType() then hasType = "yes" else hasType = "no") and + getTypeRepr__label = "getTypeRepr:" and getTypeRepr = x.getTypeRepr() -select x, "hasType:", hasType, "getTypeRepr:", getTypeRepr +} + +query predicate getType(TypeValueExpr x, Type getType) { + toBeTested(x) and not x.isUnknown() and getType = x.getType() +} diff --git a/swift/ql/test/extractor-tests/generated/expr/TypeValueExpr/TypeValueExpr_getType.expected b/swift/ql/test/extractor-tests/generated/expr/TypeValueExpr/TypeValueExpr_getType.expected deleted file mode 100644 index 43e48141790..00000000000 --- a/swift/ql/test/extractor-tests/generated/expr/TypeValueExpr/TypeValueExpr_getType.expected +++ /dev/null @@ -1,2 +0,0 @@ -| type_value_exprs.swift:4:13:4:13 | TypeValueExpr | Int | -| type_value_exprs.swift:5:13:5:13 | TypeValueExpr | Int | diff --git a/swift/ql/test/extractor-tests/generated/expr/TypeValueExpr/TypeValueExpr_getType.ql b/swift/ql/test/extractor-tests/generated/expr/TypeValueExpr/TypeValueExpr_getType.ql deleted file mode 100644 index 3c08a5c76d4..00000000000 --- a/swift/ql/test/extractor-tests/generated/expr/TypeValueExpr/TypeValueExpr_getType.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from TypeValueExpr x -where toBeTested(x) and not x.isUnknown() -select x, x.getType() diff --git a/swift/ql/test/extractor-tests/generated/stmt/DiscardStmt/DiscardStmt.ql b/swift/ql/test/extractor-tests/generated/stmt/DiscardStmt/DiscardStmt.ql index 6d8807ea063..9837c935851 100644 --- a/swift/ql/test/extractor-tests/generated/stmt/DiscardStmt/DiscardStmt.ql +++ b/swift/ql/test/extractor-tests/generated/stmt/DiscardStmt/DiscardStmt.ql @@ -2,9 +2,9 @@ import codeql.swift.elements import TestUtils -from DiscardStmt x, Expr getSubExpr -where +query predicate instances(DiscardStmt x, string getSubExpr__label, Expr getSubExpr) { toBeTested(x) and not x.isUnknown() and + getSubExpr__label = "getSubExpr:" and getSubExpr = x.getSubExpr() -select x, "getSubExpr:", getSubExpr +} diff --git a/swift/ql/test/extractor-tests/generated/stmt/FailStmt/FailStmt.ql b/swift/ql/test/extractor-tests/generated/stmt/FailStmt/FailStmt.ql index 94e0f118092..b66674e3cd4 100644 --- a/swift/ql/test/extractor-tests/generated/stmt/FailStmt/FailStmt.ql +++ b/swift/ql/test/extractor-tests/generated/stmt/FailStmt/FailStmt.ql @@ -2,6 +2,4 @@ import codeql.swift.elements import TestUtils -from FailStmt x -where toBeTested(x) and not x.isUnknown() -select x +query predicate instances(FailStmt x) { toBeTested(x) and not x.isUnknown() } diff --git a/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt.expected b/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt.expected index 2fd2e5d318e..55fc86a8fdb 100644 --- a/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt.expected +++ b/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt.expected @@ -1,3 +1,19 @@ -| for.swift:4:5:6:5 | for ... in ... where ... { ... } | hasLabel: | no | getNumberOfVariables: | 2 | getPattern: | for.swift:4:9:4:9 | x | hasWhere: | yes | hasIteratorVar: | yes | hasNextCall: | yes | getBody: | for.swift:4:32:6:5 | { ... } | -| for.swift:7:5:9:5 | for ... in ... { ... } | hasLabel: | no | getNumberOfVariables: | 2 | getPattern: | for.swift:7:9:7:9 | s | hasWhere: | no | hasIteratorVar: | yes | hasNextCall: | yes | getBody: | for.swift:7:23:9:5 | { ... } | -| for.swift:13:5:17:5 | for ... in ... { ... } | hasLabel: | no | getNumberOfVariables: | 1 | getPattern: | for.swift:13:9:13:9 | x | hasWhere: | no | hasIteratorVar: | no | hasNextCall: | no | getBody: | for.swift:13:32:17:5 | { ... } | +instances +| for.swift:4:5:6:5 | for ... in ... where ... { ... } | getPattern: | for.swift:4:9:4:9 | x | getBody: | for.swift:4:32:6:5 | { ... } | +| for.swift:7:5:9:5 | for ... in ... { ... } | getPattern: | for.swift:7:9:7:9 | s | getBody: | for.swift:7:23:9:5 | { ... } | +| for.swift:13:5:17:5 | for ... in ... { ... } | getPattern: | for.swift:13:9:13:9 | x | getBody: | for.swift:13:32:17:5 | { ... } | +getLabel +getVariable +| for.swift:4:5:6:5 | for ... in ... where ... { ... } | 0 | for.swift:4:9:4:9 | x | +| for.swift:4:5:6:5 | for ... in ... where ... { ... } | 1 | for.swift:4:14:4:14 | $x$generator | +| for.swift:7:5:9:5 | for ... in ... { ... } | 0 | for.swift:7:9:7:9 | s | +| for.swift:7:5:9:5 | for ... in ... { ... } | 1 | for.swift:7:14:7:14 | $s$generator | +| for.swift:13:5:17:5 | for ... in ... { ... } | 0 | for.swift:13:9:13:9 | x | +getWhere +| for.swift:4:5:6:5 | for ... in ... where ... { ... } | for.swift:4:25:4:30 | ... .!=(_:_:) ... | +getIteratorVar +| for.swift:4:5:6:5 | for ... in ... where ... { ... } | file://:0:0:0:0 | var ... = ... | +| for.swift:7:5:9:5 | for ... in ... { ... } | file://:0:0:0:0 | var ... = ... | +getNextCall +| for.swift:4:5:6:5 | for ... in ... where ... { ... } | for.swift:4:5:4:5 | call to next() | +| for.swift:7:5:9:5 | for ... in ... { ... } | for.swift:7:5:7:5 | call to next() | diff --git a/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt.ql b/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt.ql index bb659c7855a..8b9bcabc816 100644 --- a/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt.ql +++ b/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt.ql @@ -2,19 +2,34 @@ import codeql.swift.elements import TestUtils -from - ForEachStmt x, string hasLabel, int getNumberOfVariables, Pattern getPattern, string hasWhere, - string hasIteratorVar, string hasNextCall, BraceStmt getBody -where +query predicate instances( + ForEachStmt x, string getPattern__label, Pattern getPattern, string getBody__label, + BraceStmt getBody +) { toBeTested(x) and not x.isUnknown() and - (if x.hasLabel() then hasLabel = "yes" else hasLabel = "no") and - getNumberOfVariables = x.getNumberOfVariables() and + getPattern__label = "getPattern:" and getPattern = x.getPattern() and - (if x.hasWhere() then hasWhere = "yes" else hasWhere = "no") and - (if x.hasIteratorVar() then hasIteratorVar = "yes" else hasIteratorVar = "no") and - (if x.hasNextCall() then hasNextCall = "yes" else hasNextCall = "no") and + getBody__label = "getBody:" and getBody = x.getBody() -select x, "hasLabel:", hasLabel, "getNumberOfVariables:", getNumberOfVariables, "getPattern:", - getPattern, "hasWhere:", hasWhere, "hasIteratorVar:", hasIteratorVar, "hasNextCall:", hasNextCall, - "getBody:", getBody +} + +query predicate getLabel(ForEachStmt x, string getLabel) { + toBeTested(x) and not x.isUnknown() and getLabel = x.getLabel() +} + +query predicate getVariable(ForEachStmt x, int index, VarDecl getVariable) { + toBeTested(x) and not x.isUnknown() and getVariable = x.getVariable(index) +} + +query predicate getWhere(ForEachStmt x, Expr getWhere) { + toBeTested(x) and not x.isUnknown() and getWhere = x.getWhere() +} + +query predicate getIteratorVar(ForEachStmt x, PatternBindingDecl getIteratorVar) { + toBeTested(x) and not x.isUnknown() and getIteratorVar = x.getIteratorVar() +} + +query predicate getNextCall(ForEachStmt x, Expr getNextCall) { + toBeTested(x) and not x.isUnknown() and getNextCall = x.getNextCall() +} diff --git a/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getIteratorVar.expected b/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getIteratorVar.expected deleted file mode 100644 index 72e969cbaa4..00000000000 --- a/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getIteratorVar.expected +++ /dev/null @@ -1,2 +0,0 @@ -| for.swift:4:5:6:5 | for ... in ... where ... { ... } | file://:0:0:0:0 | var ... = ... | -| for.swift:7:5:9:5 | for ... in ... { ... } | file://:0:0:0:0 | var ... = ... | diff --git a/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getIteratorVar.ql b/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getIteratorVar.ql deleted file mode 100644 index 76c004d4e56..00000000000 --- a/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getIteratorVar.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from ForEachStmt x -where toBeTested(x) and not x.isUnknown() -select x, x.getIteratorVar() diff --git a/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getLabel.expected b/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getLabel.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getLabel.ql b/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getLabel.ql deleted file mode 100644 index 218668c2e28..00000000000 --- a/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getLabel.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from ForEachStmt x -where toBeTested(x) and not x.isUnknown() -select x, x.getLabel() diff --git a/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getNextCall.expected b/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getNextCall.expected deleted file mode 100644 index 191a8f2196b..00000000000 --- a/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getNextCall.expected +++ /dev/null @@ -1,2 +0,0 @@ -| for.swift:4:5:6:5 | for ... in ... where ... { ... } | for.swift:4:5:4:5 | call to next() | -| for.swift:7:5:9:5 | for ... in ... { ... } | for.swift:7:5:7:5 | call to next() | diff --git a/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getNextCall.ql b/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getNextCall.ql deleted file mode 100644 index 1b52342b92c..00000000000 --- a/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getNextCall.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from ForEachStmt x -where toBeTested(x) and not x.isUnknown() -select x, x.getNextCall() diff --git a/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getVariable.expected b/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getVariable.expected deleted file mode 100644 index 9762122d43d..00000000000 --- a/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getVariable.expected +++ /dev/null @@ -1,5 +0,0 @@ -| for.swift:4:5:6:5 | for ... in ... where ... { ... } | 0 | for.swift:4:9:4:9 | x | -| for.swift:4:5:6:5 | for ... in ... where ... { ... } | 1 | for.swift:4:14:4:14 | $x$generator | -| for.swift:7:5:9:5 | for ... in ... { ... } | 0 | for.swift:7:9:7:9 | s | -| for.swift:7:5:9:5 | for ... in ... { ... } | 1 | for.swift:7:14:7:14 | $s$generator | -| for.swift:13:5:17:5 | for ... in ... { ... } | 0 | for.swift:13:9:13:9 | x | diff --git a/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getVariable.ql b/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getVariable.ql deleted file mode 100644 index 9981a03570a..00000000000 --- a/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getVariable.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from ForEachStmt x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getVariable(index) diff --git a/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getWhere.expected b/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getWhere.expected deleted file mode 100644 index 991ace80dd3..00000000000 --- a/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getWhere.expected +++ /dev/null @@ -1 +0,0 @@ -| for.swift:4:5:6:5 | for ... in ... where ... { ... } | for.swift:4:25:4:30 | ... .!=(_:_:) ... | diff --git a/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getWhere.ql b/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getWhere.ql deleted file mode 100644 index 176846c278c..00000000000 --- a/swift/ql/test/extractor-tests/generated/stmt/ForEachStmt/ForEachStmt_getWhere.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from ForEachStmt x -where toBeTested(x) and not x.isUnknown() -select x, x.getWhere() diff --git a/swift/ql/test/extractor-tests/generated/stmt/PoundAssertStmt/PoundAssertStmt.ql b/swift/ql/test/extractor-tests/generated/stmt/PoundAssertStmt/PoundAssertStmt.ql index b87fecd5d03..cafb34acd4c 100644 --- a/swift/ql/test/extractor-tests/generated/stmt/PoundAssertStmt/PoundAssertStmt.ql +++ b/swift/ql/test/extractor-tests/generated/stmt/PoundAssertStmt/PoundAssertStmt.ql @@ -2,10 +2,14 @@ import codeql.swift.elements import TestUtils -from PoundAssertStmt x, Expr getCondition, string getMessage -where +query predicate instances( + PoundAssertStmt x, string getCondition__label, Expr getCondition, string getMessage__label, + string getMessage +) { toBeTested(x) and not x.isUnknown() and + getCondition__label = "getCondition:" and getCondition = x.getCondition() and + getMessage__label = "getMessage:" and getMessage = x.getMessage() -select x, "getCondition:", getCondition, "getMessage:", getMessage +} diff --git a/swift/ql/test/extractor-tests/generated/stmt/SwitchStmt/CaseLabelItem.expected b/swift/ql/test/extractor-tests/generated/stmt/SwitchStmt/CaseLabelItem.expected index 0254cddd8e0..981203c520d 100644 --- a/swift/ql/test/extractor-tests/generated/stmt/SwitchStmt/CaseLabelItem.expected +++ b/swift/ql/test/extractor-tests/generated/stmt/SwitchStmt/CaseLabelItem.expected @@ -1,13 +1,17 @@ -| switch.swift:3:9:3:9 | =~ ... | getPattern: | switch.swift:3:9:3:9 | =~ ... | hasGuard: | no | -| switch.swift:6:9:6:9 | =~ ... | getPattern: | switch.swift:6:9:6:9 | =~ ... | hasGuard: | no | -| switch.swift:6:12:6:12 | =~ ... | getPattern: | switch.swift:6:12:6:12 | =~ ... | hasGuard: | no | -| switch.swift:8:9:8:26 | x where ... | getPattern: | switch.swift:8:13:8:13 | x | hasGuard: | yes | -| switch.swift:10:4:10:4 | _ | getPattern: | switch.swift:10:4:10:4 | _ | hasGuard: | no | -| switch.swift:22:8:22:9 | .one | getPattern: | switch.swift:22:8:22:9 | .one | hasGuard: | no | -| switch.swift:24:8:24:40 | .two(...) where ... | getPattern: | switch.swift:24:8:24:25 | .two(...) | hasGuard: | yes | -| switch.swift:26:8:26:25 | .two(...) | getPattern: | switch.swift:26:8:26:25 | .two(...) | hasGuard: | no | -| switch.swift:28:8:28:23 | .three(...) | getPattern: | switch.swift:28:8:28:23 | .three(...) | hasGuard: | no | -| switch.swift:33:8:33:21 | .two(...) | getPattern: | switch.swift:33:8:33:21 | .two(...) | hasGuard: | no | -| switch.swift:35:13:35:13 | =~ ... | getPattern: | switch.swift:35:13:35:13 | =~ ... | hasGuard: | no | -| switch.swift:37:8:37:8 | _ | getPattern: | switch.swift:37:8:37:8 | _ | hasGuard: | no | -| switch.swift:40:3:40:3 | _ | getPattern: | switch.swift:40:3:40:3 | _ | hasGuard: | no | +instances +| switch.swift:3:9:3:9 | =~ ... | getPattern: | switch.swift:3:9:3:9 | =~ ... | +| switch.swift:6:9:6:9 | =~ ... | getPattern: | switch.swift:6:9:6:9 | =~ ... | +| switch.swift:6:12:6:12 | =~ ... | getPattern: | switch.swift:6:12:6:12 | =~ ... | +| switch.swift:8:9:8:26 | x where ... | getPattern: | switch.swift:8:13:8:13 | x | +| switch.swift:10:4:10:4 | _ | getPattern: | switch.swift:10:4:10:4 | _ | +| switch.swift:22:8:22:9 | .one | getPattern: | switch.swift:22:8:22:9 | .one | +| switch.swift:24:8:24:40 | .two(...) where ... | getPattern: | switch.swift:24:8:24:25 | .two(...) | +| switch.swift:26:8:26:25 | .two(...) | getPattern: | switch.swift:26:8:26:25 | .two(...) | +| switch.swift:28:8:28:23 | .three(...) | getPattern: | switch.swift:28:8:28:23 | .three(...) | +| switch.swift:33:8:33:21 | .two(...) | getPattern: | switch.swift:33:8:33:21 | .two(...) | +| switch.swift:35:13:35:13 | =~ ... | getPattern: | switch.swift:35:13:35:13 | =~ ... | +| switch.swift:37:8:37:8 | _ | getPattern: | switch.swift:37:8:37:8 | _ | +| switch.swift:40:3:40:3 | _ | getPattern: | switch.swift:40:3:40:3 | _ | +getGuard +| switch.swift:8:9:8:26 | x where ... | switch.swift:8:21:8:26 | ... .>=(_:_:) ... | +| switch.swift:24:8:24:40 | .two(...) where ... | switch.swift:24:33:24:40 | ... .==(_:_:) ... | diff --git a/swift/ql/test/extractor-tests/generated/stmt/SwitchStmt/CaseLabelItem.ql b/swift/ql/test/extractor-tests/generated/stmt/SwitchStmt/CaseLabelItem.ql index 9808b8ab7d0..6838d62dbae 100644 --- a/swift/ql/test/extractor-tests/generated/stmt/SwitchStmt/CaseLabelItem.ql +++ b/swift/ql/test/extractor-tests/generated/stmt/SwitchStmt/CaseLabelItem.ql @@ -2,10 +2,13 @@ import codeql.swift.elements import TestUtils -from CaseLabelItem x, Pattern getPattern, string hasGuard -where +query predicate instances(CaseLabelItem x, string getPattern__label, Pattern getPattern) { toBeTested(x) and not x.isUnknown() and - getPattern = x.getPattern() and - if x.hasGuard() then hasGuard = "yes" else hasGuard = "no" -select x, "getPattern:", getPattern, "hasGuard:", hasGuard + getPattern__label = "getPattern:" and + getPattern = x.getPattern() +} + +query predicate getGuard(CaseLabelItem x, Expr getGuard) { + toBeTested(x) and not x.isUnknown() and getGuard = x.getGuard() +} diff --git a/swift/ql/test/extractor-tests/generated/stmt/SwitchStmt/CaseLabelItem_getGuard.expected b/swift/ql/test/extractor-tests/generated/stmt/SwitchStmt/CaseLabelItem_getGuard.expected deleted file mode 100644 index 34766875463..00000000000 --- a/swift/ql/test/extractor-tests/generated/stmt/SwitchStmt/CaseLabelItem_getGuard.expected +++ /dev/null @@ -1,2 +0,0 @@ -| switch.swift:8:9:8:26 | x where ... | switch.swift:8:21:8:26 | ... .>=(_:_:) ... | -| switch.swift:24:8:24:40 | .two(...) where ... | switch.swift:24:33:24:40 | ... .==(_:_:) ... | diff --git a/swift/ql/test/extractor-tests/generated/stmt/SwitchStmt/CaseLabelItem_getGuard.ql b/swift/ql/test/extractor-tests/generated/stmt/SwitchStmt/CaseLabelItem_getGuard.ql deleted file mode 100644 index 08e9260bc8e..00000000000 --- a/swift/ql/test/extractor-tests/generated/stmt/SwitchStmt/CaseLabelItem_getGuard.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from CaseLabelItem x -where toBeTested(x) and not x.isUnknown() -select x, x.getGuard() diff --git a/swift/ql/test/extractor-tests/generated/stmt/SwitchStmt/CaseStmt.expected b/swift/ql/test/extractor-tests/generated/stmt/SwitchStmt/CaseStmt.expected index ed701018d38..52dd5204487 100644 --- a/swift/ql/test/extractor-tests/generated/stmt/SwitchStmt/CaseStmt.expected +++ b/swift/ql/test/extractor-tests/generated/stmt/SwitchStmt/CaseStmt.expected @@ -1,12 +1,35 @@ -| switch.swift:3:4:5:7 | case ... | getNumberOfLabels: | 1 | getNumberOfVariables: | 0 | getBody: | switch.swift:4:7:5:7 | { ... } | -| switch.swift:6:4:7:20 | case ... | getNumberOfLabels: | 2 | getNumberOfVariables: | 0 | getBody: | switch.swift:7:7:7:20 | { ... } | -| switch.swift:8:4:9:18 | case ... | getNumberOfLabels: | 1 | getNumberOfVariables: | 1 | getBody: | switch.swift:9:7:9:18 | { ... } | -| switch.swift:10:4:11:22 | case ... | getNumberOfLabels: | 1 | getNumberOfVariables: | 0 | getBody: | switch.swift:11:7:11:22 | { ... } | -| switch.swift:22:3:23:5 | case ... | getNumberOfLabels: | 1 | getNumberOfVariables: | 0 | getBody: | switch.swift:23:5:23:5 | { ... } | -| switch.swift:24:3:25:5 | case ... | getNumberOfLabels: | 1 | getNumberOfVariables: | 2 | getBody: | switch.swift:25:5:25:5 | { ... } | -| switch.swift:26:3:27:5 | case ... | getNumberOfLabels: | 1 | getNumberOfVariables: | 2 | getBody: | switch.swift:27:5:27:5 | { ... } | -| switch.swift:28:3:29:5 | case ... | getNumberOfLabels: | 1 | getNumberOfVariables: | 1 | getBody: | switch.swift:29:5:29:5 | { ... } | -| switch.swift:33:3:39:5 | case ... | getNumberOfLabels: | 1 | getNumberOfVariables: | 1 | getBody: | switch.swift:34:5:39:5 | { ... } | -| switch.swift:35:8:36:16 | case ... | getNumberOfLabels: | 1 | getNumberOfVariables: | 0 | getBody: | switch.swift:36:10:36:16 | { ... } | -| switch.swift:37:8:38:16 | case ... | getNumberOfLabels: | 1 | getNumberOfVariables: | 0 | getBody: | switch.swift:38:10:38:16 | { ... } | -| switch.swift:40:3:41:5 | case ... | getNumberOfLabels: | 1 | getNumberOfVariables: | 0 | getBody: | switch.swift:41:5:41:5 | { ... } | +instances +| switch.swift:3:4:5:7 | case ... | getBody: | switch.swift:4:7:5:7 | { ... } | +| switch.swift:6:4:7:20 | case ... | getBody: | switch.swift:7:7:7:20 | { ... } | +| switch.swift:8:4:9:18 | case ... | getBody: | switch.swift:9:7:9:18 | { ... } | +| switch.swift:10:4:11:22 | case ... | getBody: | switch.swift:11:7:11:22 | { ... } | +| switch.swift:22:3:23:5 | case ... | getBody: | switch.swift:23:5:23:5 | { ... } | +| switch.swift:24:3:25:5 | case ... | getBody: | switch.swift:25:5:25:5 | { ... } | +| switch.swift:26:3:27:5 | case ... | getBody: | switch.swift:27:5:27:5 | { ... } | +| switch.swift:28:3:29:5 | case ... | getBody: | switch.swift:29:5:29:5 | { ... } | +| switch.swift:33:3:39:5 | case ... | getBody: | switch.swift:34:5:39:5 | { ... } | +| switch.swift:35:8:36:16 | case ... | getBody: | switch.swift:36:10:36:16 | { ... } | +| switch.swift:37:8:38:16 | case ... | getBody: | switch.swift:38:10:38:16 | { ... } | +| switch.swift:40:3:41:5 | case ... | getBody: | switch.swift:41:5:41:5 | { ... } | +getLabel +| switch.swift:3:4:5:7 | case ... | 0 | switch.swift:3:9:3:9 | =~ ... | +| switch.swift:6:4:7:20 | case ... | 0 | switch.swift:6:9:6:9 | =~ ... | +| switch.swift:6:4:7:20 | case ... | 1 | switch.swift:6:12:6:12 | =~ ... | +| switch.swift:8:4:9:18 | case ... | 0 | switch.swift:8:9:8:26 | x where ... | +| switch.swift:10:4:11:22 | case ... | 0 | switch.swift:10:4:10:4 | _ | +| switch.swift:22:3:23:5 | case ... | 0 | switch.swift:22:8:22:9 | .one | +| switch.swift:24:3:25:5 | case ... | 0 | switch.swift:24:8:24:40 | .two(...) where ... | +| switch.swift:26:3:27:5 | case ... | 0 | switch.swift:26:8:26:25 | .two(...) | +| switch.swift:28:3:29:5 | case ... | 0 | switch.swift:28:8:28:23 | .three(...) | +| switch.swift:33:3:39:5 | case ... | 0 | switch.swift:33:8:33:21 | .two(...) | +| switch.swift:35:8:36:16 | case ... | 0 | switch.swift:35:13:35:13 | =~ ... | +| switch.swift:37:8:38:16 | case ... | 0 | switch.swift:37:8:37:8 | _ | +| switch.swift:40:3:41:5 | case ... | 0 | switch.swift:40:3:40:3 | _ | +getVariable +| switch.swift:8:4:9:18 | case ... | 0 | switch.swift:8:13:8:13 | x | +| switch.swift:24:3:25:5 | case ... | 0 | switch.swift:24:17:24:17 | a | +| switch.swift:24:3:25:5 | case ... | 1 | switch.swift:24:24:24:24 | b | +| switch.swift:26:3:27:5 | case ... | 0 | switch.swift:26:17:26:17 | c | +| switch.swift:26:3:27:5 | case ... | 1 | switch.swift:26:24:26:24 | d | +| switch.swift:28:3:29:5 | case ... | 0 | switch.swift:28:22:28:22 | e | +| switch.swift:33:3:39:5 | case ... | 0 | switch.swift:33:17:33:17 | a | diff --git a/swift/ql/test/extractor-tests/generated/stmt/SwitchStmt/CaseStmt.ql b/swift/ql/test/extractor-tests/generated/stmt/SwitchStmt/CaseStmt.ql index 8951cdb1cb8..b248ecf3840 100644 --- a/swift/ql/test/extractor-tests/generated/stmt/SwitchStmt/CaseStmt.ql +++ b/swift/ql/test/extractor-tests/generated/stmt/SwitchStmt/CaseStmt.ql @@ -2,12 +2,17 @@ import codeql.swift.elements import TestUtils -from CaseStmt x, int getNumberOfLabels, int getNumberOfVariables, Stmt getBody -where +query predicate instances(CaseStmt x, string getBody__label, Stmt getBody) { toBeTested(x) and not x.isUnknown() and - getNumberOfLabels = x.getNumberOfLabels() and - getNumberOfVariables = x.getNumberOfVariables() and + getBody__label = "getBody:" and getBody = x.getBody() -select x, "getNumberOfLabels:", getNumberOfLabels, "getNumberOfVariables:", getNumberOfVariables, - "getBody:", getBody +} + +query predicate getLabel(CaseStmt x, int index, CaseLabelItem getLabel) { + toBeTested(x) and not x.isUnknown() and getLabel = x.getLabel(index) +} + +query predicate getVariable(CaseStmt x, int index, VarDecl getVariable) { + toBeTested(x) and not x.isUnknown() and getVariable = x.getVariable(index) +} diff --git a/swift/ql/test/extractor-tests/generated/stmt/SwitchStmt/CaseStmt_getLabel.expected b/swift/ql/test/extractor-tests/generated/stmt/SwitchStmt/CaseStmt_getLabel.expected deleted file mode 100644 index 240872c9ece..00000000000 --- a/swift/ql/test/extractor-tests/generated/stmt/SwitchStmt/CaseStmt_getLabel.expected +++ /dev/null @@ -1,13 +0,0 @@ -| switch.swift:3:4:5:7 | case ... | 0 | switch.swift:3:9:3:9 | =~ ... | -| switch.swift:6:4:7:20 | case ... | 0 | switch.swift:6:9:6:9 | =~ ... | -| switch.swift:6:4:7:20 | case ... | 1 | switch.swift:6:12:6:12 | =~ ... | -| switch.swift:8:4:9:18 | case ... | 0 | switch.swift:8:9:8:26 | x where ... | -| switch.swift:10:4:11:22 | case ... | 0 | switch.swift:10:4:10:4 | _ | -| switch.swift:22:3:23:5 | case ... | 0 | switch.swift:22:8:22:9 | .one | -| switch.swift:24:3:25:5 | case ... | 0 | switch.swift:24:8:24:40 | .two(...) where ... | -| switch.swift:26:3:27:5 | case ... | 0 | switch.swift:26:8:26:25 | .two(...) | -| switch.swift:28:3:29:5 | case ... | 0 | switch.swift:28:8:28:23 | .three(...) | -| switch.swift:33:3:39:5 | case ... | 0 | switch.swift:33:8:33:21 | .two(...) | -| switch.swift:35:8:36:16 | case ... | 0 | switch.swift:35:13:35:13 | =~ ... | -| switch.swift:37:8:38:16 | case ... | 0 | switch.swift:37:8:37:8 | _ | -| switch.swift:40:3:41:5 | case ... | 0 | switch.swift:40:3:40:3 | _ | diff --git a/swift/ql/test/extractor-tests/generated/stmt/SwitchStmt/CaseStmt_getLabel.ql b/swift/ql/test/extractor-tests/generated/stmt/SwitchStmt/CaseStmt_getLabel.ql deleted file mode 100644 index a4047035457..00000000000 --- a/swift/ql/test/extractor-tests/generated/stmt/SwitchStmt/CaseStmt_getLabel.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from CaseStmt x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getLabel(index) diff --git a/swift/ql/test/extractor-tests/generated/stmt/SwitchStmt/CaseStmt_getVariable.expected b/swift/ql/test/extractor-tests/generated/stmt/SwitchStmt/CaseStmt_getVariable.expected deleted file mode 100644 index 6e1b31a4809..00000000000 --- a/swift/ql/test/extractor-tests/generated/stmt/SwitchStmt/CaseStmt_getVariable.expected +++ /dev/null @@ -1,7 +0,0 @@ -| switch.swift:8:4:9:18 | case ... | 0 | switch.swift:8:13:8:13 | x | -| switch.swift:24:3:25:5 | case ... | 0 | switch.swift:24:17:24:17 | a | -| switch.swift:24:3:25:5 | case ... | 1 | switch.swift:24:24:24:24 | b | -| switch.swift:26:3:27:5 | case ... | 0 | switch.swift:26:17:26:17 | c | -| switch.swift:26:3:27:5 | case ... | 1 | switch.swift:26:24:26:24 | d | -| switch.swift:28:3:29:5 | case ... | 0 | switch.swift:28:22:28:22 | e | -| switch.swift:33:3:39:5 | case ... | 0 | switch.swift:33:17:33:17 | a | diff --git a/swift/ql/test/extractor-tests/generated/stmt/SwitchStmt/CaseStmt_getVariable.ql b/swift/ql/test/extractor-tests/generated/stmt/SwitchStmt/CaseStmt_getVariable.ql deleted file mode 100644 index 14d32d18ddf..00000000000 --- a/swift/ql/test/extractor-tests/generated/stmt/SwitchStmt/CaseStmt_getVariable.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from CaseStmt x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getVariable(index) diff --git a/swift/ql/test/extractor-tests/generated/stmt/SwitchStmt/SwitchStmt.expected b/swift/ql/test/extractor-tests/generated/stmt/SwitchStmt/SwitchStmt.expected index e7258f337da..ad4fed60062 100644 --- a/swift/ql/test/extractor-tests/generated/stmt/SwitchStmt/SwitchStmt.expected +++ b/swift/ql/test/extractor-tests/generated/stmt/SwitchStmt/SwitchStmt.expected @@ -1,4 +1,21 @@ -| switch.swift:2:1:12:1 | switch index { ... } | hasLabel: | no | getExpr: | switch.swift:2:8:2:8 | index | getNumberOfCases: | 4 | -| switch.swift:21:1:30:1 | switch x { ... } | hasLabel: | no | getExpr: | switch.swift:21:8:21:8 | x | getNumberOfCases: | 4 | -| switch.swift:32:1:42:1 | switch x { ... } | hasLabel: | yes | getExpr: | switch.swift:32:15:32:15 | x | getNumberOfCases: | 2 | -| switch.swift:34:5:39:5 | switch a { ... } | hasLabel: | yes | getExpr: | switch.swift:34:19:34:19 | a | getNumberOfCases: | 2 | +instances +| switch.swift:2:1:12:1 | switch index { ... } | getExpr: | switch.swift:2:8:2:8 | index | +| switch.swift:21:1:30:1 | switch x { ... } | getExpr: | switch.swift:21:8:21:8 | x | +| switch.swift:32:1:42:1 | switch x { ... } | getExpr: | switch.swift:32:15:32:15 | x | +| switch.swift:34:5:39:5 | switch a { ... } | getExpr: | switch.swift:34:19:34:19 | a | +getLabel +| switch.swift:32:1:42:1 | switch x { ... } | outer | +| switch.swift:34:5:39:5 | switch a { ... } | inner | +getCase +| switch.swift:2:1:12:1 | switch index { ... } | 0 | switch.swift:3:4:5:7 | case ... | +| switch.swift:2:1:12:1 | switch index { ... } | 1 | switch.swift:6:4:7:20 | case ... | +| switch.swift:2:1:12:1 | switch index { ... } | 2 | switch.swift:8:4:9:18 | case ... | +| switch.swift:2:1:12:1 | switch index { ... } | 3 | switch.swift:10:4:11:22 | case ... | +| switch.swift:21:1:30:1 | switch x { ... } | 0 | switch.swift:22:3:23:5 | case ... | +| switch.swift:21:1:30:1 | switch x { ... } | 1 | switch.swift:24:3:25:5 | case ... | +| switch.swift:21:1:30:1 | switch x { ... } | 2 | switch.swift:26:3:27:5 | case ... | +| switch.swift:21:1:30:1 | switch x { ... } | 3 | switch.swift:28:3:29:5 | case ... | +| switch.swift:32:1:42:1 | switch x { ... } | 0 | switch.swift:33:3:39:5 | case ... | +| switch.swift:32:1:42:1 | switch x { ... } | 1 | switch.swift:40:3:41:5 | case ... | +| switch.swift:34:5:39:5 | switch a { ... } | 0 | switch.swift:35:8:36:16 | case ... | +| switch.swift:34:5:39:5 | switch a { ... } | 1 | switch.swift:37:8:38:16 | case ... | diff --git a/swift/ql/test/extractor-tests/generated/stmt/SwitchStmt/SwitchStmt.ql b/swift/ql/test/extractor-tests/generated/stmt/SwitchStmt/SwitchStmt.ql index 2844d4ebd90..bd817bcb416 100644 --- a/swift/ql/test/extractor-tests/generated/stmt/SwitchStmt/SwitchStmt.ql +++ b/swift/ql/test/extractor-tests/generated/stmt/SwitchStmt/SwitchStmt.ql @@ -2,11 +2,17 @@ import codeql.swift.elements import TestUtils -from SwitchStmt x, string hasLabel, Expr getExpr, int getNumberOfCases -where +query predicate instances(SwitchStmt x, string getExpr__label, Expr getExpr) { toBeTested(x) and not x.isUnknown() and - (if x.hasLabel() then hasLabel = "yes" else hasLabel = "no") and - getExpr = x.getExpr() and - getNumberOfCases = x.getNumberOfCases() -select x, "hasLabel:", hasLabel, "getExpr:", getExpr, "getNumberOfCases:", getNumberOfCases + getExpr__label = "getExpr:" and + getExpr = x.getExpr() +} + +query predicate getLabel(SwitchStmt x, string getLabel) { + toBeTested(x) and not x.isUnknown() and getLabel = x.getLabel() +} + +query predicate getCase(SwitchStmt x, int index, CaseStmt getCase) { + toBeTested(x) and not x.isUnknown() and getCase = x.getCase(index) +} diff --git a/swift/ql/test/extractor-tests/generated/stmt/SwitchStmt/SwitchStmt_getCase.expected b/swift/ql/test/extractor-tests/generated/stmt/SwitchStmt/SwitchStmt_getCase.expected deleted file mode 100644 index 93c4db76adc..00000000000 --- a/swift/ql/test/extractor-tests/generated/stmt/SwitchStmt/SwitchStmt_getCase.expected +++ /dev/null @@ -1,12 +0,0 @@ -| switch.swift:2:1:12:1 | switch index { ... } | 0 | switch.swift:3:4:5:7 | case ... | -| switch.swift:2:1:12:1 | switch index { ... } | 1 | switch.swift:6:4:7:20 | case ... | -| switch.swift:2:1:12:1 | switch index { ... } | 2 | switch.swift:8:4:9:18 | case ... | -| switch.swift:2:1:12:1 | switch index { ... } | 3 | switch.swift:10:4:11:22 | case ... | -| switch.swift:21:1:30:1 | switch x { ... } | 0 | switch.swift:22:3:23:5 | case ... | -| switch.swift:21:1:30:1 | switch x { ... } | 1 | switch.swift:24:3:25:5 | case ... | -| switch.swift:21:1:30:1 | switch x { ... } | 2 | switch.swift:26:3:27:5 | case ... | -| switch.swift:21:1:30:1 | switch x { ... } | 3 | switch.swift:28:3:29:5 | case ... | -| switch.swift:32:1:42:1 | switch x { ... } | 0 | switch.swift:33:3:39:5 | case ... | -| switch.swift:32:1:42:1 | switch x { ... } | 1 | switch.swift:40:3:41:5 | case ... | -| switch.swift:34:5:39:5 | switch a { ... } | 0 | switch.swift:35:8:36:16 | case ... | -| switch.swift:34:5:39:5 | switch a { ... } | 1 | switch.swift:37:8:38:16 | case ... | diff --git a/swift/ql/test/extractor-tests/generated/stmt/SwitchStmt/SwitchStmt_getCase.ql b/swift/ql/test/extractor-tests/generated/stmt/SwitchStmt/SwitchStmt_getCase.ql deleted file mode 100644 index c9f55f3b1d2..00000000000 --- a/swift/ql/test/extractor-tests/generated/stmt/SwitchStmt/SwitchStmt_getCase.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from SwitchStmt x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getCase(index) diff --git a/swift/ql/test/extractor-tests/generated/stmt/SwitchStmt/SwitchStmt_getLabel.expected b/swift/ql/test/extractor-tests/generated/stmt/SwitchStmt/SwitchStmt_getLabel.expected deleted file mode 100644 index 99df95b0249..00000000000 --- a/swift/ql/test/extractor-tests/generated/stmt/SwitchStmt/SwitchStmt_getLabel.expected +++ /dev/null @@ -1,2 +0,0 @@ -| switch.swift:32:1:42:1 | switch x { ... } | outer | -| switch.swift:34:5:39:5 | switch a { ... } | inner | diff --git a/swift/ql/test/extractor-tests/generated/stmt/SwitchStmt/SwitchStmt_getLabel.ql b/swift/ql/test/extractor-tests/generated/stmt/SwitchStmt/SwitchStmt_getLabel.ql deleted file mode 100644 index 2d9aaf45845..00000000000 --- a/swift/ql/test/extractor-tests/generated/stmt/SwitchStmt/SwitchStmt_getLabel.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from SwitchStmt x -where toBeTested(x) and not x.isUnknown() -select x, x.getLabel() diff --git a/swift/ql/test/extractor-tests/generated/type/BuiltinIntegerType/BuiltinIntegerType.expected b/swift/ql/test/extractor-tests/generated/type/BuiltinIntegerType/BuiltinIntegerType.expected index d57e72a708b..7bc36b2f4e0 100644 --- a/swift/ql/test/extractor-tests/generated/type/BuiltinIntegerType/BuiltinIntegerType.expected +++ b/swift/ql/test/extractor-tests/generated/type/BuiltinIntegerType/BuiltinIntegerType.expected @@ -1,5 +1,11 @@ -| Builtin.Int8 | getName: | Int8 | getCanonicalType: | Builtin.Int8 | hasWidth: | yes | -| Builtin.Int16 | getName: | Int16 | getCanonicalType: | Builtin.Int16 | hasWidth: | yes | -| Builtin.Int32 | getName: | Int32 | getCanonicalType: | Builtin.Int32 | hasWidth: | yes | -| Builtin.Int64 | getName: | Int64 | getCanonicalType: | Builtin.Int64 | hasWidth: | yes | -| Builtin.Word | getName: | Word | getCanonicalType: | Builtin.Word | hasWidth: | no | +instances +| Builtin.Int8 | getName: | Int8 | getCanonicalType: | Builtin.Int8 | +| Builtin.Int16 | getName: | Int16 | getCanonicalType: | Builtin.Int16 | +| Builtin.Int32 | getName: | Int32 | getCanonicalType: | Builtin.Int32 | +| Builtin.Int64 | getName: | Int64 | getCanonicalType: | Builtin.Int64 | +| Builtin.Word | getName: | Word | getCanonicalType: | Builtin.Word | +getWidth +| Builtin.Int8 | 8 | +| Builtin.Int16 | 16 | +| Builtin.Int32 | 32 | +| Builtin.Int64 | 64 | diff --git a/swift/ql/test/extractor-tests/generated/type/BuiltinIntegerType/BuiltinIntegerType.ql b/swift/ql/test/extractor-tests/generated/type/BuiltinIntegerType/BuiltinIntegerType.ql index ea32bf91d74..47e8d4cfe5c 100644 --- a/swift/ql/test/extractor-tests/generated/type/BuiltinIntegerType/BuiltinIntegerType.ql +++ b/swift/ql/test/extractor-tests/generated/type/BuiltinIntegerType/BuiltinIntegerType.ql @@ -2,11 +2,18 @@ import codeql.swift.elements import TestUtils -from BuiltinIntegerType x, string getName, Type getCanonicalType, string hasWidth -where +query predicate instances( + BuiltinIntegerType x, string getName__label, string getName, string getCanonicalType__label, + Type getCanonicalType +) { toBeTested(x) and not x.isUnknown() and + getName__label = "getName:" and getName = x.getName() and - getCanonicalType = x.getCanonicalType() and - if x.hasWidth() then hasWidth = "yes" else hasWidth = "no" -select x, "getName:", getName, "getCanonicalType:", getCanonicalType, "hasWidth:", hasWidth + getCanonicalType__label = "getCanonicalType:" and + getCanonicalType = x.getCanonicalType() +} + +query predicate getWidth(BuiltinIntegerType x, int getWidth) { + toBeTested(x) and not x.isUnknown() and getWidth = x.getWidth() +} diff --git a/swift/ql/test/extractor-tests/generated/type/BuiltinIntegerType/BuiltinIntegerType_getWidth.expected b/swift/ql/test/extractor-tests/generated/type/BuiltinIntegerType/BuiltinIntegerType_getWidth.expected deleted file mode 100644 index 350ab9ee53a..00000000000 --- a/swift/ql/test/extractor-tests/generated/type/BuiltinIntegerType/BuiltinIntegerType_getWidth.expected +++ /dev/null @@ -1,4 +0,0 @@ -| Builtin.Int8 | 8 | -| Builtin.Int16 | 16 | -| Builtin.Int32 | 32 | -| Builtin.Int64 | 64 | diff --git a/swift/ql/test/extractor-tests/generated/type/BuiltinIntegerType/BuiltinIntegerType_getWidth.ql b/swift/ql/test/extractor-tests/generated/type/BuiltinIntegerType/BuiltinIntegerType_getWidth.ql deleted file mode 100644 index 15fcefae59f..00000000000 --- a/swift/ql/test/extractor-tests/generated/type/BuiltinIntegerType/BuiltinIntegerType_getWidth.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from BuiltinIntegerType x -where toBeTested(x) and not x.isUnknown() -select x, x.getWidth() diff --git a/swift/ql/test/extractor-tests/generated/type/BuiltinType/BuiltinType.ql b/swift/ql/test/extractor-tests/generated/type/BuiltinType/BuiltinType.ql index 6488c2a3065..984542fc002 100644 --- a/swift/ql/test/extractor-tests/generated/type/BuiltinType/BuiltinType.ql +++ b/swift/ql/test/extractor-tests/generated/type/BuiltinType/BuiltinType.ql @@ -2,10 +2,15 @@ import codeql.swift.elements import TestUtils -from BuiltinType x, string getName, Type getCanonicalType -where +query predicate instances( + BuiltinType x, string primaryQlClasses, string getName__label, string getName, + string getCanonicalType__label, Type getCanonicalType +) { toBeTested(x) and not x.isUnknown() and + primaryQlClasses = x.getPrimaryQlClasses() and + getName__label = "getName:" and getName = x.getName() and + getCanonicalType__label = "getCanonicalType:" and getCanonicalType = x.getCanonicalType() -select x, x.getPrimaryQlClasses(), "getName:", getName, "getCanonicalType:", getCanonicalType +} diff --git a/swift/ql/test/extractor-tests/generated/type/DynamicSelfType/DynamicSelfType.ql b/swift/ql/test/extractor-tests/generated/type/DynamicSelfType/DynamicSelfType.ql index 24849d7c8df..1883c35ca75 100644 --- a/swift/ql/test/extractor-tests/generated/type/DynamicSelfType/DynamicSelfType.ql +++ b/swift/ql/test/extractor-tests/generated/type/DynamicSelfType/DynamicSelfType.ql @@ -2,12 +2,16 @@ import codeql.swift.elements import TestUtils -from DynamicSelfType x, string getName, Type getCanonicalType, Type getStaticSelfType -where +query predicate instances( + DynamicSelfType x, string getName__label, string getName, string getCanonicalType__label, + Type getCanonicalType, string getStaticSelfType__label, Type getStaticSelfType +) { toBeTested(x) and not x.isUnknown() and + getName__label = "getName:" and getName = x.getName() and + getCanonicalType__label = "getCanonicalType:" and getCanonicalType = x.getCanonicalType() and + getStaticSelfType__label = "getStaticSelfType:" and getStaticSelfType = x.getStaticSelfType() -select x, "getName:", getName, "getCanonicalType:", getCanonicalType, "getStaticSelfType:", - getStaticSelfType +} diff --git a/swift/ql/test/extractor-tests/generated/type/ExistentialType/ExistentialType.ql b/swift/ql/test/extractor-tests/generated/type/ExistentialType/ExistentialType.ql index 84eb1eeef21..96200b1f27c 100644 --- a/swift/ql/test/extractor-tests/generated/type/ExistentialType/ExistentialType.ql +++ b/swift/ql/test/extractor-tests/generated/type/ExistentialType/ExistentialType.ql @@ -2,12 +2,16 @@ import codeql.swift.elements import TestUtils -from ExistentialType x, string getName, Type getCanonicalType, Type getConstraint -where +query predicate instances( + ExistentialType x, string getName__label, string getName, string getCanonicalType__label, + Type getCanonicalType, string getConstraint__label, Type getConstraint +) { toBeTested(x) and not x.isUnknown() and + getName__label = "getName:" and getName = x.getName() and + getCanonicalType__label = "getCanonicalType:" and getCanonicalType = x.getCanonicalType() and + getConstraint__label = "getConstraint:" and getConstraint = x.getConstraint() -select x, "getName:", getName, "getCanonicalType:", getCanonicalType, "getConstraint:", - getConstraint +} diff --git a/swift/ql/test/extractor-tests/generated/type/InOutType/InOutType.ql b/swift/ql/test/extractor-tests/generated/type/InOutType/InOutType.ql index 9cb466a5dbf..59ae14054a4 100644 --- a/swift/ql/test/extractor-tests/generated/type/InOutType/InOutType.ql +++ b/swift/ql/test/extractor-tests/generated/type/InOutType/InOutType.ql @@ -2,12 +2,16 @@ import codeql.swift.elements import TestUtils -from InOutType x, string getName, Type getCanonicalType, Type getObjectType -where +query predicate instances( + InOutType x, string getName__label, string getName, string getCanonicalType__label, + Type getCanonicalType, string getObjectType__label, Type getObjectType +) { toBeTested(x) and not x.isUnknown() and + getName__label = "getName:" and getName = x.getName() and + getCanonicalType__label = "getCanonicalType:" and getCanonicalType = x.getCanonicalType() and + getObjectType__label = "getObjectType:" and getObjectType = x.getObjectType() -select x, "getName:", getName, "getCanonicalType:", getCanonicalType, "getObjectType:", - getObjectType +} diff --git a/swift/ql/test/extractor-tests/generated/type/IntegerType/IntegerType.ql b/swift/ql/test/extractor-tests/generated/type/IntegerType/IntegerType.ql index dea3771c7c5..31f187e8ad2 100644 --- a/swift/ql/test/extractor-tests/generated/type/IntegerType/IntegerType.ql +++ b/swift/ql/test/extractor-tests/generated/type/IntegerType/IntegerType.ql @@ -2,11 +2,16 @@ import codeql.swift.elements import TestUtils -from IntegerType x, string getName, Type getCanonicalType, string getValue -where +query predicate instances( + IntegerType x, string getName__label, string getName, string getCanonicalType__label, + Type getCanonicalType, string getValue__label, string getValue +) { toBeTested(x) and not x.isUnknown() and + getName__label = "getName:" and getName = x.getName() and + getCanonicalType__label = "getCanonicalType:" and getCanonicalType = x.getCanonicalType() and + getValue__label = "getValue:" and getValue = x.getValue() -select x, "getName:", getName, "getCanonicalType:", getCanonicalType, "getValue:", getValue +} diff --git a/swift/ql/test/extractor-tests/generated/type/ModuleType/ModuleType.ql b/swift/ql/test/extractor-tests/generated/type/ModuleType/ModuleType.ql index b02c0ae4ee7..b9988d0f44b 100644 --- a/swift/ql/test/extractor-tests/generated/type/ModuleType/ModuleType.ql +++ b/swift/ql/test/extractor-tests/generated/type/ModuleType/ModuleType.ql @@ -2,11 +2,16 @@ import codeql.swift.elements import TestUtils -from ModuleType x, string getName, Type getCanonicalType, ModuleDecl getModule -where +query predicate instances( + ModuleType x, string getName__label, string getName, string getCanonicalType__label, + Type getCanonicalType, string getModule__label, ModuleDecl getModule +) { toBeTested(x) and not x.isUnknown() and + getName__label = "getName:" and getName = x.getName() and + getCanonicalType__label = "getCanonicalType:" and getCanonicalType = x.getCanonicalType() and + getModule__label = "getModule:" and getModule = x.getModule() -select x, "getName:", getName, "getCanonicalType:", getCanonicalType, "getModule:", getModule +} diff --git a/swift/ql/test/extractor-tests/generated/type/OpaqueTypeArchetypeType/OpaqueTypeArchetypeType.expected b/swift/ql/test/extractor-tests/generated/type/OpaqueTypeArchetypeType/OpaqueTypeArchetypeType.expected index 2b14e261f28..27dbc0ef445 100644 --- a/swift/ql/test/extractor-tests/generated/type/OpaqueTypeArchetypeType/OpaqueTypeArchetypeType.expected +++ b/swift/ql/test/extractor-tests/generated/type/OpaqueTypeArchetypeType/OpaqueTypeArchetypeType.expected @@ -1,4 +1,11 @@ -| some Base | getName: | some Base | getCanonicalType: | some Base | getInterfaceType: | \u03c4_1_0 | hasSuperclass: | yes | getNumberOfProtocols: | 0 | getDeclaration: | file://:0:0:0:0 | _ | -| some P | getName: | some P | getCanonicalType: | some P | getInterfaceType: | \u03c4_1_0 | hasSuperclass: | no | getNumberOfProtocols: | 1 | getDeclaration: | file://:0:0:0:0 | _ | -| some P | getName: | some P | getCanonicalType: | some P | getInterfaceType: | \u03c4_1_0 | hasSuperclass: | no | getNumberOfProtocols: | 1 | getDeclaration: | file://:0:0:0:0 | _ | -| some SignedInteger | getName: | some SignedInteger | getCanonicalType: | some SignedInteger | getInterfaceType: | \u03c4_0_0 | hasSuperclass: | no | getNumberOfProtocols: | 1 | getDeclaration: | file://:0:0:0:0 | _ | +instances +| some Base | getName: | some Base | getCanonicalType: | some Base | getInterfaceType: | \u03c4_1_0 | getDeclaration: | file://:0:0:0:0 | _ | +| some P | getName: | some P | getCanonicalType: | some P | getInterfaceType: | \u03c4_1_0 | getDeclaration: | file://:0:0:0:0 | _ | +| some P | getName: | some P | getCanonicalType: | some P | getInterfaceType: | \u03c4_1_0 | getDeclaration: | file://:0:0:0:0 | _ | +| some SignedInteger | getName: | some SignedInteger | getCanonicalType: | some SignedInteger | getInterfaceType: | \u03c4_0_0 | getDeclaration: | file://:0:0:0:0 | _ | +getSuperclass +| some Base | Base | +getProtocol +| some P | 0 | opaque_types.swift:3:1:3:13 | P | +| some P | 0 | opaque_types.swift:3:1:3:13 | P | +| some SignedInteger | 0 | file://:0:0:0:0 | SignedInteger | diff --git a/swift/ql/test/extractor-tests/generated/type/OpaqueTypeArchetypeType/OpaqueTypeArchetypeType.ql b/swift/ql/test/extractor-tests/generated/type/OpaqueTypeArchetypeType/OpaqueTypeArchetypeType.ql index fab7fccc357..a3a9f5f8411 100644 --- a/swift/ql/test/extractor-tests/generated/type/OpaqueTypeArchetypeType/OpaqueTypeArchetypeType.ql +++ b/swift/ql/test/extractor-tests/generated/type/OpaqueTypeArchetypeType/OpaqueTypeArchetypeType.ql @@ -2,18 +2,27 @@ import codeql.swift.elements import TestUtils -from - OpaqueTypeArchetypeType x, string getName, Type getCanonicalType, Type getInterfaceType, - string hasSuperclass, int getNumberOfProtocols, OpaqueTypeDecl getDeclaration -where +query predicate instances( + OpaqueTypeArchetypeType x, string getName__label, string getName, string getCanonicalType__label, + Type getCanonicalType, string getInterfaceType__label, Type getInterfaceType, + string getDeclaration__label, OpaqueTypeDecl getDeclaration +) { toBeTested(x) and not x.isUnknown() and + getName__label = "getName:" and getName = x.getName() and + getCanonicalType__label = "getCanonicalType:" and getCanonicalType = x.getCanonicalType() and + getInterfaceType__label = "getInterfaceType:" and getInterfaceType = x.getInterfaceType() and - (if x.hasSuperclass() then hasSuperclass = "yes" else hasSuperclass = "no") and - getNumberOfProtocols = x.getNumberOfProtocols() and + getDeclaration__label = "getDeclaration:" and getDeclaration = x.getDeclaration() -select x, "getName:", getName, "getCanonicalType:", getCanonicalType, "getInterfaceType:", - getInterfaceType, "hasSuperclass:", hasSuperclass, "getNumberOfProtocols:", getNumberOfProtocols, - "getDeclaration:", getDeclaration +} + +query predicate getSuperclass(OpaqueTypeArchetypeType x, Type getSuperclass) { + toBeTested(x) and not x.isUnknown() and getSuperclass = x.getSuperclass() +} + +query predicate getProtocol(OpaqueTypeArchetypeType x, int index, ProtocolDecl getProtocol) { + toBeTested(x) and not x.isUnknown() and getProtocol = x.getProtocol(index) +} diff --git a/swift/ql/test/extractor-tests/generated/type/OpaqueTypeArchetypeType/OpaqueTypeArchetypeType_getProtocol.expected b/swift/ql/test/extractor-tests/generated/type/OpaqueTypeArchetypeType/OpaqueTypeArchetypeType_getProtocol.expected deleted file mode 100644 index 1ca3b350aeb..00000000000 --- a/swift/ql/test/extractor-tests/generated/type/OpaqueTypeArchetypeType/OpaqueTypeArchetypeType_getProtocol.expected +++ /dev/null @@ -1,3 +0,0 @@ -| some P | 0 | opaque_types.swift:3:1:3:13 | P | -| some P | 0 | opaque_types.swift:3:1:3:13 | P | -| some SignedInteger | 0 | file://:0:0:0:0 | SignedInteger | diff --git a/swift/ql/test/extractor-tests/generated/type/OpaqueTypeArchetypeType/OpaqueTypeArchetypeType_getProtocol.ql b/swift/ql/test/extractor-tests/generated/type/OpaqueTypeArchetypeType/OpaqueTypeArchetypeType_getProtocol.ql deleted file mode 100644 index ac3498c699a..00000000000 --- a/swift/ql/test/extractor-tests/generated/type/OpaqueTypeArchetypeType/OpaqueTypeArchetypeType_getProtocol.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from OpaqueTypeArchetypeType x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getProtocol(index) diff --git a/swift/ql/test/extractor-tests/generated/type/OpaqueTypeArchetypeType/OpaqueTypeArchetypeType_getSuperclass.expected b/swift/ql/test/extractor-tests/generated/type/OpaqueTypeArchetypeType/OpaqueTypeArchetypeType_getSuperclass.expected deleted file mode 100644 index d8f0ecac66b..00000000000 --- a/swift/ql/test/extractor-tests/generated/type/OpaqueTypeArchetypeType/OpaqueTypeArchetypeType_getSuperclass.expected +++ /dev/null @@ -1 +0,0 @@ -| some Base | Base | diff --git a/swift/ql/test/extractor-tests/generated/type/OpaqueTypeArchetypeType/OpaqueTypeArchetypeType_getSuperclass.ql b/swift/ql/test/extractor-tests/generated/type/OpaqueTypeArchetypeType/OpaqueTypeArchetypeType_getSuperclass.ql deleted file mode 100644 index e32a97a7cee..00000000000 --- a/swift/ql/test/extractor-tests/generated/type/OpaqueTypeArchetypeType/OpaqueTypeArchetypeType_getSuperclass.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from OpaqueTypeArchetypeType x -where toBeTested(x) and not x.isUnknown() -select x, x.getSuperclass() diff --git a/swift/ql/test/extractor-tests/generated/type/OpenedArchetypeType/OpenedArchetypeType.expected b/swift/ql/test/extractor-tests/generated/type/OpenedArchetypeType/OpenedArchetypeType.expected index 24471c96e6c..3400ffa5fdc 100644 --- a/swift/ql/test/extractor-tests/generated/type/OpenedArchetypeType/OpenedArchetypeType.expected +++ b/swift/ql/test/extractor-tests/generated/type/OpenedArchetypeType/OpenedArchetypeType.expected @@ -1 +1,7 @@ -| any C & P1 & P2 | getName: | any C & P1 & P2 | getCanonicalType: | any C & P1 & P2 | getInterfaceType: | \u03c4_0_0 | hasSuperclass: | yes | getNumberOfProtocols: | 2 | +instances +| any C & P1 & P2 | getName: | any C & P1 & P2 | getCanonicalType: | any C & P1 & P2 | getInterfaceType: | \u03c4_0_0 | +getSuperclass +| any C & P1 & P2 | C | +getProtocol +| any C & P1 & P2 | 0 | opened_archetypes.swift:3:1:3:14 | P1 | +| any C & P1 & P2 | 1 | opened_archetypes.swift:9:1:9:14 | P2 | diff --git a/swift/ql/test/extractor-tests/generated/type/OpenedArchetypeType/OpenedArchetypeType.ql b/swift/ql/test/extractor-tests/generated/type/OpenedArchetypeType/OpenedArchetypeType.ql index 418367b34da..2d5f19580a7 100644 --- a/swift/ql/test/extractor-tests/generated/type/OpenedArchetypeType/OpenedArchetypeType.ql +++ b/swift/ql/test/extractor-tests/generated/type/OpenedArchetypeType/OpenedArchetypeType.ql @@ -2,16 +2,24 @@ import codeql.swift.elements import TestUtils -from - OpenedArchetypeType x, string getName, Type getCanonicalType, Type getInterfaceType, - string hasSuperclass, int getNumberOfProtocols -where +query predicate instances( + OpenedArchetypeType x, string getName__label, string getName, string getCanonicalType__label, + Type getCanonicalType, string getInterfaceType__label, Type getInterfaceType +) { toBeTested(x) and not x.isUnknown() and + getName__label = "getName:" and getName = x.getName() and + getCanonicalType__label = "getCanonicalType:" and getCanonicalType = x.getCanonicalType() and - getInterfaceType = x.getInterfaceType() and - (if x.hasSuperclass() then hasSuperclass = "yes" else hasSuperclass = "no") and - getNumberOfProtocols = x.getNumberOfProtocols() -select x, "getName:", getName, "getCanonicalType:", getCanonicalType, "getInterfaceType:", - getInterfaceType, "hasSuperclass:", hasSuperclass, "getNumberOfProtocols:", getNumberOfProtocols + getInterfaceType__label = "getInterfaceType:" and + getInterfaceType = x.getInterfaceType() +} + +query predicate getSuperclass(OpenedArchetypeType x, Type getSuperclass) { + toBeTested(x) and not x.isUnknown() and getSuperclass = x.getSuperclass() +} + +query predicate getProtocol(OpenedArchetypeType x, int index, ProtocolDecl getProtocol) { + toBeTested(x) and not x.isUnknown() and getProtocol = x.getProtocol(index) +} diff --git a/swift/ql/test/extractor-tests/generated/type/OpenedArchetypeType/OpenedArchetypeType_getProtocol.expected b/swift/ql/test/extractor-tests/generated/type/OpenedArchetypeType/OpenedArchetypeType_getProtocol.expected deleted file mode 100644 index 691608328bb..00000000000 --- a/swift/ql/test/extractor-tests/generated/type/OpenedArchetypeType/OpenedArchetypeType_getProtocol.expected +++ /dev/null @@ -1,2 +0,0 @@ -| any C & P1 & P2 | 0 | opened_archetypes.swift:3:1:3:14 | P1 | -| any C & P1 & P2 | 1 | opened_archetypes.swift:9:1:9:14 | P2 | diff --git a/swift/ql/test/extractor-tests/generated/type/OpenedArchetypeType/OpenedArchetypeType_getProtocol.ql b/swift/ql/test/extractor-tests/generated/type/OpenedArchetypeType/OpenedArchetypeType_getProtocol.ql deleted file mode 100644 index e3408e77e8f..00000000000 --- a/swift/ql/test/extractor-tests/generated/type/OpenedArchetypeType/OpenedArchetypeType_getProtocol.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from OpenedArchetypeType x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getProtocol(index) diff --git a/swift/ql/test/extractor-tests/generated/type/OpenedArchetypeType/OpenedArchetypeType_getSuperclass.expected b/swift/ql/test/extractor-tests/generated/type/OpenedArchetypeType/OpenedArchetypeType_getSuperclass.expected deleted file mode 100644 index dffe6bf270a..00000000000 --- a/swift/ql/test/extractor-tests/generated/type/OpenedArchetypeType/OpenedArchetypeType_getSuperclass.expected +++ /dev/null @@ -1 +0,0 @@ -| any C & P1 & P2 | C | diff --git a/swift/ql/test/extractor-tests/generated/type/OpenedArchetypeType/OpenedArchetypeType_getSuperclass.ql b/swift/ql/test/extractor-tests/generated/type/OpenedArchetypeType/OpenedArchetypeType_getSuperclass.ql deleted file mode 100644 index 6dcddb59c26..00000000000 --- a/swift/ql/test/extractor-tests/generated/type/OpenedArchetypeType/OpenedArchetypeType_getSuperclass.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from OpenedArchetypeType x -where toBeTested(x) and not x.isUnknown() -select x, x.getSuperclass() diff --git a/swift/ql/test/extractor-tests/generated/type/PackType/ElementArchetypeType.expected b/swift/ql/test/extractor-tests/generated/type/PackType/ElementArchetypeType.expected index 5bfa71a3481..de765f97081 100644 --- a/swift/ql/test/extractor-tests/generated/type/PackType/ElementArchetypeType.expected +++ b/swift/ql/test/extractor-tests/generated/type/PackType/ElementArchetypeType.expected @@ -1 +1,6 @@ -| \u03c4_1_0 | getName: | \u03c4_1_0 | getCanonicalType: | \u03c4_1_0 | getInterfaceType: | \u03c4_1_0 | hasSuperclass: | no | getNumberOfProtocols: | 2 | +instances +| \u03c4_1_0 | getName: | \u03c4_1_0 | getCanonicalType: | \u03c4_1_0 | getInterfaceType: | \u03c4_1_0 | +getSuperclass +getProtocol +| \u03c4_1_0 | 0 | file://:0:0:0:0 | Copyable | +| \u03c4_1_0 | 1 | file://:0:0:0:0 | Escapable | diff --git a/swift/ql/test/extractor-tests/generated/type/PackType/ElementArchetypeType.ql b/swift/ql/test/extractor-tests/generated/type/PackType/ElementArchetypeType.ql index 3b1e13580ed..fb8b5e0f02e 100644 --- a/swift/ql/test/extractor-tests/generated/type/PackType/ElementArchetypeType.ql +++ b/swift/ql/test/extractor-tests/generated/type/PackType/ElementArchetypeType.ql @@ -2,16 +2,24 @@ import codeql.swift.elements import TestUtils -from - ElementArchetypeType x, string getName, Type getCanonicalType, Type getInterfaceType, - string hasSuperclass, int getNumberOfProtocols -where +query predicate instances( + ElementArchetypeType x, string getName__label, string getName, string getCanonicalType__label, + Type getCanonicalType, string getInterfaceType__label, Type getInterfaceType +) { toBeTested(x) and not x.isUnknown() and + getName__label = "getName:" and getName = x.getName() and + getCanonicalType__label = "getCanonicalType:" and getCanonicalType = x.getCanonicalType() and - getInterfaceType = x.getInterfaceType() and - (if x.hasSuperclass() then hasSuperclass = "yes" else hasSuperclass = "no") and - getNumberOfProtocols = x.getNumberOfProtocols() -select x, "getName:", getName, "getCanonicalType:", getCanonicalType, "getInterfaceType:", - getInterfaceType, "hasSuperclass:", hasSuperclass, "getNumberOfProtocols:", getNumberOfProtocols + getInterfaceType__label = "getInterfaceType:" and + getInterfaceType = x.getInterfaceType() +} + +query predicate getSuperclass(ElementArchetypeType x, Type getSuperclass) { + toBeTested(x) and not x.isUnknown() and getSuperclass = x.getSuperclass() +} + +query predicate getProtocol(ElementArchetypeType x, int index, ProtocolDecl getProtocol) { + toBeTested(x) and not x.isUnknown() and getProtocol = x.getProtocol(index) +} diff --git a/swift/ql/test/extractor-tests/generated/type/PackType/ElementArchetypeType_getProtocol.expected b/swift/ql/test/extractor-tests/generated/type/PackType/ElementArchetypeType_getProtocol.expected deleted file mode 100644 index f6d6dae2dc5..00000000000 --- a/swift/ql/test/extractor-tests/generated/type/PackType/ElementArchetypeType_getProtocol.expected +++ /dev/null @@ -1,2 +0,0 @@ -| \u03c4_1_0 | 0 | file://:0:0:0:0 | Copyable | -| \u03c4_1_0 | 1 | file://:0:0:0:0 | Escapable | diff --git a/swift/ql/test/extractor-tests/generated/type/PackType/ElementArchetypeType_getProtocol.ql b/swift/ql/test/extractor-tests/generated/type/PackType/ElementArchetypeType_getProtocol.ql deleted file mode 100644 index 57385c7695f..00000000000 --- a/swift/ql/test/extractor-tests/generated/type/PackType/ElementArchetypeType_getProtocol.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from ElementArchetypeType x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getProtocol(index) diff --git a/swift/ql/test/extractor-tests/generated/type/PackType/ElementArchetypeType_getSuperclass.expected b/swift/ql/test/extractor-tests/generated/type/PackType/ElementArchetypeType_getSuperclass.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/swift/ql/test/extractor-tests/generated/type/PackType/ElementArchetypeType_getSuperclass.ql b/swift/ql/test/extractor-tests/generated/type/PackType/ElementArchetypeType_getSuperclass.ql deleted file mode 100644 index 01204fdd059..00000000000 --- a/swift/ql/test/extractor-tests/generated/type/PackType/ElementArchetypeType_getSuperclass.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from ElementArchetypeType x -where toBeTested(x) and not x.isUnknown() -select x, x.getSuperclass() diff --git a/swift/ql/test/extractor-tests/generated/type/PackType/PackArchetypeType.expected b/swift/ql/test/extractor-tests/generated/type/PackType/PackArchetypeType.expected index c53f468dc52..564700dd68d 100644 --- a/swift/ql/test/extractor-tests/generated/type/PackType/PackArchetypeType.expected +++ b/swift/ql/test/extractor-tests/generated/type/PackType/PackArchetypeType.expected @@ -1,2 +1,9 @@ -| each Arg | getName: | each Arg | getCanonicalType: | each Arg | getInterfaceType: | each Arg | hasSuperclass: | no | getNumberOfProtocols: | 2 | -| each T | getName: | each T | getCanonicalType: | each T | getInterfaceType: | each T | hasSuperclass: | no | getNumberOfProtocols: | 2 | +instances +| each Arg | getName: | each Arg | getCanonicalType: | each Arg | getInterfaceType: | each Arg | +| each T | getName: | each T | getCanonicalType: | each T | getInterfaceType: | each T | +getSuperclass +getProtocol +| each Arg | 0 | file://:0:0:0:0 | Copyable | +| each Arg | 1 | file://:0:0:0:0 | Escapable | +| each T | 0 | file://:0:0:0:0 | Copyable | +| each T | 1 | file://:0:0:0:0 | Escapable | diff --git a/swift/ql/test/extractor-tests/generated/type/PackType/PackArchetypeType.ql b/swift/ql/test/extractor-tests/generated/type/PackType/PackArchetypeType.ql index 4f98b8a7e4e..e66b73e0f77 100644 --- a/swift/ql/test/extractor-tests/generated/type/PackType/PackArchetypeType.ql +++ b/swift/ql/test/extractor-tests/generated/type/PackType/PackArchetypeType.ql @@ -2,16 +2,24 @@ import codeql.swift.elements import TestUtils -from - PackArchetypeType x, string getName, Type getCanonicalType, Type getInterfaceType, - string hasSuperclass, int getNumberOfProtocols -where +query predicate instances( + PackArchetypeType x, string getName__label, string getName, string getCanonicalType__label, + Type getCanonicalType, string getInterfaceType__label, Type getInterfaceType +) { toBeTested(x) and not x.isUnknown() and + getName__label = "getName:" and getName = x.getName() and + getCanonicalType__label = "getCanonicalType:" and getCanonicalType = x.getCanonicalType() and - getInterfaceType = x.getInterfaceType() and - (if x.hasSuperclass() then hasSuperclass = "yes" else hasSuperclass = "no") and - getNumberOfProtocols = x.getNumberOfProtocols() -select x, "getName:", getName, "getCanonicalType:", getCanonicalType, "getInterfaceType:", - getInterfaceType, "hasSuperclass:", hasSuperclass, "getNumberOfProtocols:", getNumberOfProtocols + getInterfaceType__label = "getInterfaceType:" and + getInterfaceType = x.getInterfaceType() +} + +query predicate getSuperclass(PackArchetypeType x, Type getSuperclass) { + toBeTested(x) and not x.isUnknown() and getSuperclass = x.getSuperclass() +} + +query predicate getProtocol(PackArchetypeType x, int index, ProtocolDecl getProtocol) { + toBeTested(x) and not x.isUnknown() and getProtocol = x.getProtocol(index) +} diff --git a/swift/ql/test/extractor-tests/generated/type/PackType/PackArchetypeType_getProtocol.expected b/swift/ql/test/extractor-tests/generated/type/PackType/PackArchetypeType_getProtocol.expected deleted file mode 100644 index 7ba05a259c8..00000000000 --- a/swift/ql/test/extractor-tests/generated/type/PackType/PackArchetypeType_getProtocol.expected +++ /dev/null @@ -1,4 +0,0 @@ -| each Arg | 0 | file://:0:0:0:0 | Copyable | -| each Arg | 1 | file://:0:0:0:0 | Escapable | -| each T | 0 | file://:0:0:0:0 | Copyable | -| each T | 1 | file://:0:0:0:0 | Escapable | diff --git a/swift/ql/test/extractor-tests/generated/type/PackType/PackArchetypeType_getProtocol.ql b/swift/ql/test/extractor-tests/generated/type/PackType/PackArchetypeType_getProtocol.ql deleted file mode 100644 index 653fe7b7371..00000000000 --- a/swift/ql/test/extractor-tests/generated/type/PackType/PackArchetypeType_getProtocol.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from PackArchetypeType x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getProtocol(index) diff --git a/swift/ql/test/extractor-tests/generated/type/PackType/PackArchetypeType_getSuperclass.expected b/swift/ql/test/extractor-tests/generated/type/PackType/PackArchetypeType_getSuperclass.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/swift/ql/test/extractor-tests/generated/type/PackType/PackArchetypeType_getSuperclass.ql b/swift/ql/test/extractor-tests/generated/type/PackType/PackArchetypeType_getSuperclass.ql deleted file mode 100644 index b22b1750eb4..00000000000 --- a/swift/ql/test/extractor-tests/generated/type/PackType/PackArchetypeType_getSuperclass.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from PackArchetypeType x -where toBeTested(x) and not x.isUnknown() -select x, x.getSuperclass() diff --git a/swift/ql/test/extractor-tests/generated/type/PackType/PackElementType.ql b/swift/ql/test/extractor-tests/generated/type/PackType/PackElementType.ql index af95548518a..2a8864b3a72 100644 --- a/swift/ql/test/extractor-tests/generated/type/PackType/PackElementType.ql +++ b/swift/ql/test/extractor-tests/generated/type/PackType/PackElementType.ql @@ -2,11 +2,16 @@ import codeql.swift.elements import TestUtils -from PackElementType x, string getName, Type getCanonicalType, Type getPackType -where +query predicate instances( + PackElementType x, string getName__label, string getName, string getCanonicalType__label, + Type getCanonicalType, string getPackType__label, Type getPackType +) { toBeTested(x) and not x.isUnknown() and + getName__label = "getName:" and getName = x.getName() and + getCanonicalType__label = "getCanonicalType:" and getCanonicalType = x.getCanonicalType() and + getPackType__label = "getPackType:" and getPackType = x.getPackType() -select x, "getName:", getName, "getCanonicalType:", getCanonicalType, "getPackType:", getPackType +} diff --git a/swift/ql/test/extractor-tests/generated/type/PackType/PackExpansionType.ql b/swift/ql/test/extractor-tests/generated/type/PackType/PackExpansionType.ql index d429b165a6c..88623889054 100644 --- a/swift/ql/test/extractor-tests/generated/type/PackType/PackExpansionType.ql +++ b/swift/ql/test/extractor-tests/generated/type/PackType/PackExpansionType.ql @@ -2,14 +2,19 @@ import codeql.swift.elements import TestUtils -from - PackExpansionType x, string getName, Type getCanonicalType, Type getPatternType, Type getCountType -where +query predicate instances( + PackExpansionType x, string getName__label, string getName, string getCanonicalType__label, + Type getCanonicalType, string getPatternType__label, Type getPatternType, + string getCountType__label, Type getCountType +) { toBeTested(x) and not x.isUnknown() and + getName__label = "getName:" and getName = x.getName() and + getCanonicalType__label = "getCanonicalType:" and getCanonicalType = x.getCanonicalType() and + getPatternType__label = "getPatternType:" and getPatternType = x.getPatternType() and + getCountType__label = "getCountType:" and getCountType = x.getCountType() -select x, "getName:", getName, "getCanonicalType:", getCanonicalType, "getPatternType:", - getPatternType, "getCountType:", getCountType +} diff --git a/swift/ql/test/extractor-tests/generated/type/PackType/PackType.expected b/swift/ql/test/extractor-tests/generated/type/PackType/PackType.expected index d9c928366b2..96fc0c165bb 100644 --- a/swift/ql/test/extractor-tests/generated/type/PackType/PackType.expected +++ b/swift/ql/test/extractor-tests/generated/type/PackType/PackType.expected @@ -1 +1,5 @@ -| Pack{String, Int} | getName: | Pack{String, Int} | getCanonicalType: | Pack{String, Int} | getNumberOfElements: | 2 | +instances +| Pack{String, Int} | getName: | Pack{String, Int} | getCanonicalType: | Pack{String, Int} | +getElement +| Pack{String, Int} | 0 | String | +| Pack{String, Int} | 1 | Int | diff --git a/swift/ql/test/extractor-tests/generated/type/PackType/PackType.ql b/swift/ql/test/extractor-tests/generated/type/PackType/PackType.ql index 1843314a052..bbdd989ed59 100644 --- a/swift/ql/test/extractor-tests/generated/type/PackType/PackType.ql +++ b/swift/ql/test/extractor-tests/generated/type/PackType/PackType.ql @@ -2,12 +2,18 @@ import codeql.swift.elements import TestUtils -from PackType x, string getName, Type getCanonicalType, int getNumberOfElements -where +query predicate instances( + PackType x, string getName__label, string getName, string getCanonicalType__label, + Type getCanonicalType +) { toBeTested(x) and not x.isUnknown() and + getName__label = "getName:" and getName = x.getName() and - getCanonicalType = x.getCanonicalType() and - getNumberOfElements = x.getNumberOfElements() -select x, "getName:", getName, "getCanonicalType:", getCanonicalType, "getNumberOfElements:", - getNumberOfElements + getCanonicalType__label = "getCanonicalType:" and + getCanonicalType = x.getCanonicalType() +} + +query predicate getElement(PackType x, int index, Type getElement) { + toBeTested(x) and not x.isUnknown() and getElement = x.getElement(index) +} diff --git a/swift/ql/test/extractor-tests/generated/type/PackType/PackType_getElement.expected b/swift/ql/test/extractor-tests/generated/type/PackType/PackType_getElement.expected deleted file mode 100644 index bf46cc6a812..00000000000 --- a/swift/ql/test/extractor-tests/generated/type/PackType/PackType_getElement.expected +++ /dev/null @@ -1,2 +0,0 @@ -| Pack{String, Int} | 0 | String | -| Pack{String, Int} | 1 | Int | diff --git a/swift/ql/test/extractor-tests/generated/type/PackType/PackType_getElement.ql b/swift/ql/test/extractor-tests/generated/type/PackType/PackType_getElement.ql deleted file mode 100644 index efd27f79901..00000000000 --- a/swift/ql/test/extractor-tests/generated/type/PackType/PackType_getElement.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from PackType x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getElement(index) diff --git a/swift/ql/test/extractor-tests/generated/type/ParameterizedProtocolType/ParameterizedProtocolType.expected b/swift/ql/test/extractor-tests/generated/type/ParameterizedProtocolType/ParameterizedProtocolType.expected index 309665f809f..71292b2a41d 100644 --- a/swift/ql/test/extractor-tests/generated/type/ParameterizedProtocolType/ParameterizedProtocolType.expected +++ b/swift/ql/test/extractor-tests/generated/type/ParameterizedProtocolType/ParameterizedProtocolType.expected @@ -1,17 +1,37 @@ -| P | getName: | P | getCanonicalType: | P | getBase: | P | getNumberOfArgs: | 2 | -| RawRepresentable | getName: | RawRepresentable | getCanonicalType: | RawRepresentable | getBase: | RawRepresentable | getNumberOfArgs: | 1 | -| RawRepresentable | getName: | RawRepresentable | getCanonicalType: | RawRepresentable | getBase: | RawRepresentable | getNumberOfArgs: | 1 | -| RawRepresentable | getName: | RawRepresentable | getCanonicalType: | RawRepresentable | getBase: | RawRepresentable | getNumberOfArgs: | 1 | -| RawRepresentable | getName: | RawRepresentable | getCanonicalType: | RawRepresentable | getBase: | RawRepresentable | getNumberOfArgs: | 1 | -| RawRepresentable | getName: | RawRepresentable | getCanonicalType: | RawRepresentable | getBase: | RawRepresentable | getNumberOfArgs: | 1 | -| RawRepresentable | getName: | RawRepresentable | getCanonicalType: | RawRepresentable | getBase: | RawRepresentable | getNumberOfArgs: | 1 | -| RawRepresentable | getName: | RawRepresentable | getCanonicalType: | RawRepresentable | getBase: | RawRepresentable | getNumberOfArgs: | 1 | -| RawRepresentable | getName: | RawRepresentable | getCanonicalType: | RawRepresentable | getBase: | RawRepresentable | getNumberOfArgs: | 1 | -| RawRepresentable | getName: | RawRepresentable | getCanonicalType: | RawRepresentable | getBase: | RawRepresentable | getNumberOfArgs: | 1 | -| RawRepresentable | getName: | RawRepresentable | getCanonicalType: | RawRepresentable | getBase: | RawRepresentable | getNumberOfArgs: | 1 | -| RawRepresentable | getName: | RawRepresentable | getCanonicalType: | RawRepresentable | getBase: | RawRepresentable | getNumberOfArgs: | 1 | -| RawRepresentable | getName: | RawRepresentable | getCanonicalType: | RawRepresentable | getBase: | RawRepresentable | getNumberOfArgs: | 1 | -| RawRepresentable | getName: | RawRepresentable | getCanonicalType: | RawRepresentable | getBase: | RawRepresentable | getNumberOfArgs: | 1 | -| RawRepresentable | getName: | RawRepresentable | getCanonicalType: | RawRepresentable | getBase: | RawRepresentable | getNumberOfArgs: | 1 | -| RawRepresentable | getName: | RawRepresentable | getCanonicalType: | RawRepresentable | getBase: | RawRepresentable | getNumberOfArgs: | 1 | -| RawRepresentable | getName: | RawRepresentable | getCanonicalType: | RawRepresentable | getBase: | RawRepresentable | getNumberOfArgs: | 1 | +instances +| P | getName: | P | getCanonicalType: | P | getBase: | P | +| RawRepresentable | getName: | RawRepresentable | getCanonicalType: | RawRepresentable | getBase: | RawRepresentable | +| RawRepresentable | getName: | RawRepresentable | getCanonicalType: | RawRepresentable | getBase: | RawRepresentable | +| RawRepresentable | getName: | RawRepresentable | getCanonicalType: | RawRepresentable | getBase: | RawRepresentable | +| RawRepresentable | getName: | RawRepresentable | getCanonicalType: | RawRepresentable | getBase: | RawRepresentable | +| RawRepresentable | getName: | RawRepresentable | getCanonicalType: | RawRepresentable | getBase: | RawRepresentable | +| RawRepresentable | getName: | RawRepresentable | getCanonicalType: | RawRepresentable | getBase: | RawRepresentable | +| RawRepresentable | getName: | RawRepresentable | getCanonicalType: | RawRepresentable | getBase: | RawRepresentable | +| RawRepresentable | getName: | RawRepresentable | getCanonicalType: | RawRepresentable | getBase: | RawRepresentable | +| RawRepresentable | getName: | RawRepresentable | getCanonicalType: | RawRepresentable | getBase: | RawRepresentable | +| RawRepresentable | getName: | RawRepresentable | getCanonicalType: | RawRepresentable | getBase: | RawRepresentable | +| RawRepresentable | getName: | RawRepresentable | getCanonicalType: | RawRepresentable | getBase: | RawRepresentable | +| RawRepresentable | getName: | RawRepresentable | getCanonicalType: | RawRepresentable | getBase: | RawRepresentable | +| RawRepresentable | getName: | RawRepresentable | getCanonicalType: | RawRepresentable | getBase: | RawRepresentable | +| RawRepresentable | getName: | RawRepresentable | getCanonicalType: | RawRepresentable | getBase: | RawRepresentable | +| RawRepresentable | getName: | RawRepresentable | getCanonicalType: | RawRepresentable | getBase: | RawRepresentable | +| RawRepresentable | getName: | RawRepresentable | getCanonicalType: | RawRepresentable | getBase: | RawRepresentable | +getArg +| P | 0 | Int | +| P | 1 | String | +| RawRepresentable | 0 | Bool | +| RawRepresentable | 0 | Double | +| RawRepresentable | 0 | Float | +| RawRepresentable | 0 | Int8 | +| RawRepresentable | 0 | Int16 | +| RawRepresentable | 0 | Int32 | +| RawRepresentable | 0 | Int64 | +| RawRepresentable | 0 | Int128 | +| RawRepresentable | 0 | Int | +| RawRepresentable | 0 | String | +| RawRepresentable | 0 | UInt8 | +| RawRepresentable | 0 | UInt16 | +| RawRepresentable | 0 | UInt32 | +| RawRepresentable | 0 | UInt64 | +| RawRepresentable | 0 | UInt128 | +| RawRepresentable | 0 | UInt | diff --git a/swift/ql/test/extractor-tests/generated/type/ParameterizedProtocolType/ParameterizedProtocolType.ql b/swift/ql/test/extractor-tests/generated/type/ParameterizedProtocolType/ParameterizedProtocolType.ql index f01ab88af8e..839b1aa9c92 100644 --- a/swift/ql/test/extractor-tests/generated/type/ParameterizedProtocolType/ParameterizedProtocolType.ql +++ b/swift/ql/test/extractor-tests/generated/type/ParameterizedProtocolType/ParameterizedProtocolType.ql @@ -2,15 +2,20 @@ import codeql.swift.elements import TestUtils -from - ParameterizedProtocolType x, string getName, Type getCanonicalType, ProtocolType getBase, - int getNumberOfArgs -where +query predicate instances( + ParameterizedProtocolType x, string getName__label, string getName, + string getCanonicalType__label, Type getCanonicalType, string getBase__label, ProtocolType getBase +) { toBeTested(x) and not x.isUnknown() and + getName__label = "getName:" and getName = x.getName() and + getCanonicalType__label = "getCanonicalType:" and getCanonicalType = x.getCanonicalType() and - getBase = x.getBase() and - getNumberOfArgs = x.getNumberOfArgs() -select x, "getName:", getName, "getCanonicalType:", getCanonicalType, "getBase:", getBase, - "getNumberOfArgs:", getNumberOfArgs + getBase__label = "getBase:" and + getBase = x.getBase() +} + +query predicate getArg(ParameterizedProtocolType x, int index, Type getArg) { + toBeTested(x) and not x.isUnknown() and getArg = x.getArg(index) +} diff --git a/swift/ql/test/extractor-tests/generated/type/ParameterizedProtocolType/ParameterizedProtocolType_getArg.expected b/swift/ql/test/extractor-tests/generated/type/ParameterizedProtocolType/ParameterizedProtocolType_getArg.expected deleted file mode 100644 index 2762281ade2..00000000000 --- a/swift/ql/test/extractor-tests/generated/type/ParameterizedProtocolType/ParameterizedProtocolType_getArg.expected +++ /dev/null @@ -1,18 +0,0 @@ -| P | 0 | Int | -| P | 1 | String | -| RawRepresentable | 0 | Bool | -| RawRepresentable | 0 | Double | -| RawRepresentable | 0 | Float | -| RawRepresentable | 0 | Int8 | -| RawRepresentable | 0 | Int16 | -| RawRepresentable | 0 | Int32 | -| RawRepresentable | 0 | Int64 | -| RawRepresentable | 0 | Int128 | -| RawRepresentable | 0 | Int | -| RawRepresentable | 0 | String | -| RawRepresentable | 0 | UInt8 | -| RawRepresentable | 0 | UInt16 | -| RawRepresentable | 0 | UInt32 | -| RawRepresentable | 0 | UInt64 | -| RawRepresentable | 0 | UInt128 | -| RawRepresentable | 0 | UInt | diff --git a/swift/ql/test/extractor-tests/generated/type/ParameterizedProtocolType/ParameterizedProtocolType_getArg.ql b/swift/ql/test/extractor-tests/generated/type/ParameterizedProtocolType/ParameterizedProtocolType_getArg.ql deleted file mode 100644 index 7ec2d6a6ca6..00000000000 --- a/swift/ql/test/extractor-tests/generated/type/ParameterizedProtocolType/ParameterizedProtocolType_getArg.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from ParameterizedProtocolType x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getArg(index) diff --git a/swift/ql/test/extractor-tests/generated/type/PrimaryArchetypeType/PrimaryArchetypeType.expected b/swift/ql/test/extractor-tests/generated/type/PrimaryArchetypeType/PrimaryArchetypeType.expected index 2ea99b1e227..6874035ae54 100644 --- a/swift/ql/test/extractor-tests/generated/type/PrimaryArchetypeType/PrimaryArchetypeType.expected +++ b/swift/ql/test/extractor-tests/generated/type/PrimaryArchetypeType/PrimaryArchetypeType.expected @@ -1,8 +1,23 @@ -| Base | getName: | Base | getCanonicalType: | Base | getInterfaceType: | Base | hasSuperclass: | no | getNumberOfProtocols: | 1 | -| Base | getName: | Base | getCanonicalType: | Base | getInterfaceType: | Base | hasSuperclass: | no | getNumberOfProtocols: | 1 | -| Base | getName: | Base | getCanonicalType: | Base | getInterfaceType: | Base | hasSuperclass: | yes | getNumberOfProtocols: | 0 | -| Base | getName: | Base | getCanonicalType: | Base | getInterfaceType: | Base | hasSuperclass: | yes | getNumberOfProtocols: | 0 | -| Param | getName: | Param | getCanonicalType: | Param | getInterfaceType: | Param | hasSuperclass: | no | getNumberOfProtocols: | 2 | -| ParamWithProtocols | getName: | ParamWithProtocols | getCanonicalType: | ParamWithProtocols | getInterfaceType: | ParamWithProtocols | hasSuperclass: | no | getNumberOfProtocols: | 2 | -| ParamWithSuperclass | getName: | ParamWithSuperclass | getCanonicalType: | ParamWithSuperclass | getInterfaceType: | ParamWithSuperclass | hasSuperclass: | yes | getNumberOfProtocols: | 0 | -| ParamWithSuperclassAndProtocols | getName: | ParamWithSuperclassAndProtocols | getCanonicalType: | ParamWithSuperclassAndProtocols | getInterfaceType: | ParamWithSuperclassAndProtocols | hasSuperclass: | yes | getNumberOfProtocols: | 2 | +instances +| Base | getName: | Base | getCanonicalType: | Base | getInterfaceType: | Base | +| Base | getName: | Base | getCanonicalType: | Base | getInterfaceType: | Base | +| Base | getName: | Base | getCanonicalType: | Base | getInterfaceType: | Base | +| Base | getName: | Base | getCanonicalType: | Base | getInterfaceType: | Base | +| Param | getName: | Param | getCanonicalType: | Param | getInterfaceType: | Param | +| ParamWithProtocols | getName: | ParamWithProtocols | getCanonicalType: | ParamWithProtocols | getInterfaceType: | ParamWithProtocols | +| ParamWithSuperclass | getName: | ParamWithSuperclass | getCanonicalType: | ParamWithSuperclass | getInterfaceType: | ParamWithSuperclass | +| ParamWithSuperclassAndProtocols | getName: | ParamWithSuperclassAndProtocols | getCanonicalType: | ParamWithSuperclassAndProtocols | getInterfaceType: | ParamWithSuperclassAndProtocols | +getSuperclass +| Base | S | +| Base | S2 | +| ParamWithSuperclass | S | +| ParamWithSuperclassAndProtocols | S | +getProtocol +| Base | 0 | primary_archetypes.swift:4:1:4:13 | P | +| Base | 0 | primary_archetypes.swift:5:1:5:14 | P2 | +| Param | 0 | file://:0:0:0:0 | Copyable | +| Param | 1 | file://:0:0:0:0 | Escapable | +| ParamWithProtocols | 0 | file://:0:0:0:0 | Equatable | +| ParamWithProtocols | 1 | primary_archetypes.swift:4:1:4:13 | P | +| ParamWithSuperclassAndProtocols | 0 | file://:0:0:0:0 | Equatable | +| ParamWithSuperclassAndProtocols | 1 | primary_archetypes.swift:4:1:4:13 | P | diff --git a/swift/ql/test/extractor-tests/generated/type/PrimaryArchetypeType/PrimaryArchetypeType.ql b/swift/ql/test/extractor-tests/generated/type/PrimaryArchetypeType/PrimaryArchetypeType.ql index 009b17a3eb5..4d9ff951f79 100644 --- a/swift/ql/test/extractor-tests/generated/type/PrimaryArchetypeType/PrimaryArchetypeType.ql +++ b/swift/ql/test/extractor-tests/generated/type/PrimaryArchetypeType/PrimaryArchetypeType.ql @@ -2,16 +2,24 @@ import codeql.swift.elements import TestUtils -from - PrimaryArchetypeType x, string getName, Type getCanonicalType, Type getInterfaceType, - string hasSuperclass, int getNumberOfProtocols -where +query predicate instances( + PrimaryArchetypeType x, string getName__label, string getName, string getCanonicalType__label, + Type getCanonicalType, string getInterfaceType__label, Type getInterfaceType +) { toBeTested(x) and not x.isUnknown() and + getName__label = "getName:" and getName = x.getName() and + getCanonicalType__label = "getCanonicalType:" and getCanonicalType = x.getCanonicalType() and - getInterfaceType = x.getInterfaceType() and - (if x.hasSuperclass() then hasSuperclass = "yes" else hasSuperclass = "no") and - getNumberOfProtocols = x.getNumberOfProtocols() -select x, "getName:", getName, "getCanonicalType:", getCanonicalType, "getInterfaceType:", - getInterfaceType, "hasSuperclass:", hasSuperclass, "getNumberOfProtocols:", getNumberOfProtocols + getInterfaceType__label = "getInterfaceType:" and + getInterfaceType = x.getInterfaceType() +} + +query predicate getSuperclass(PrimaryArchetypeType x, Type getSuperclass) { + toBeTested(x) and not x.isUnknown() and getSuperclass = x.getSuperclass() +} + +query predicate getProtocol(PrimaryArchetypeType x, int index, ProtocolDecl getProtocol) { + toBeTested(x) and not x.isUnknown() and getProtocol = x.getProtocol(index) +} diff --git a/swift/ql/test/extractor-tests/generated/type/PrimaryArchetypeType/PrimaryArchetypeType_getProtocol.expected b/swift/ql/test/extractor-tests/generated/type/PrimaryArchetypeType/PrimaryArchetypeType_getProtocol.expected deleted file mode 100644 index 3c0810fd7c2..00000000000 --- a/swift/ql/test/extractor-tests/generated/type/PrimaryArchetypeType/PrimaryArchetypeType_getProtocol.expected +++ /dev/null @@ -1,8 +0,0 @@ -| Base | 0 | primary_archetypes.swift:4:1:4:13 | P | -| Base | 0 | primary_archetypes.swift:5:1:5:14 | P2 | -| Param | 0 | file://:0:0:0:0 | Copyable | -| Param | 1 | file://:0:0:0:0 | Escapable | -| ParamWithProtocols | 0 | file://:0:0:0:0 | Equatable | -| ParamWithProtocols | 1 | primary_archetypes.swift:4:1:4:13 | P | -| ParamWithSuperclassAndProtocols | 0 | file://:0:0:0:0 | Equatable | -| ParamWithSuperclassAndProtocols | 1 | primary_archetypes.swift:4:1:4:13 | P | diff --git a/swift/ql/test/extractor-tests/generated/type/PrimaryArchetypeType/PrimaryArchetypeType_getProtocol.ql b/swift/ql/test/extractor-tests/generated/type/PrimaryArchetypeType/PrimaryArchetypeType_getProtocol.ql deleted file mode 100644 index 1f3a116e24f..00000000000 --- a/swift/ql/test/extractor-tests/generated/type/PrimaryArchetypeType/PrimaryArchetypeType_getProtocol.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from PrimaryArchetypeType x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getProtocol(index) diff --git a/swift/ql/test/extractor-tests/generated/type/PrimaryArchetypeType/PrimaryArchetypeType_getSuperclass.expected b/swift/ql/test/extractor-tests/generated/type/PrimaryArchetypeType/PrimaryArchetypeType_getSuperclass.expected deleted file mode 100644 index 35f9793baaa..00000000000 --- a/swift/ql/test/extractor-tests/generated/type/PrimaryArchetypeType/PrimaryArchetypeType_getSuperclass.expected +++ /dev/null @@ -1,4 +0,0 @@ -| Base | S | -| Base | S2 | -| ParamWithSuperclass | S | -| ParamWithSuperclassAndProtocols | S | diff --git a/swift/ql/test/extractor-tests/generated/type/PrimaryArchetypeType/PrimaryArchetypeType_getSuperclass.ql b/swift/ql/test/extractor-tests/generated/type/PrimaryArchetypeType/PrimaryArchetypeType_getSuperclass.ql deleted file mode 100644 index 821aea03829..00000000000 --- a/swift/ql/test/extractor-tests/generated/type/PrimaryArchetypeType/PrimaryArchetypeType_getSuperclass.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from PrimaryArchetypeType x -where toBeTested(x) and not x.isUnknown() -select x, x.getSuperclass() diff --git a/swift/ql/test/extractor-tests/generated/type/ProtocolCompositionType/ProtocolCompositionType.expected b/swift/ql/test/extractor-tests/generated/type/ProtocolCompositionType/ProtocolCompositionType.expected index f8278a6bae9..869e4caeb26 100644 --- a/swift/ql/test/extractor-tests/generated/type/ProtocolCompositionType/ProtocolCompositionType.expected +++ b/swift/ql/test/extractor-tests/generated/type/ProtocolCompositionType/ProtocolCompositionType.expected @@ -1,3 +1,12 @@ -| P1 & P2 & P3 | getName: | P1 & P2 & P3 | getCanonicalType: | P1 & P2 & P3 | getNumberOfMembers: | 3 | -| P1 & P23 | getName: | P1 & P23 | getCanonicalType: | P1 & P2 & P3 | getNumberOfMembers: | 2 | -| P2 & P4 | getName: | P2 & P4 | getCanonicalType: | P2 & P4 | getNumberOfMembers: | 2 | +instances +| P1 & P2 & P3 | getName: | P1 & P2 & P3 | getCanonicalType: | P1 & P2 & P3 | +| P1 & P23 | getName: | P1 & P23 | getCanonicalType: | P1 & P2 & P3 | +| P2 & P4 | getName: | P2 & P4 | getCanonicalType: | P2 & P4 | +getMember +| P1 & P2 & P3 | 0 | P1 | +| P1 & P2 & P3 | 1 | P2 | +| P1 & P2 & P3 | 2 | P3 | +| P1 & P23 | 0 | P1 | +| P1 & P23 | 1 | P23 | +| P2 & P4 | 0 | P2 | +| P2 & P4 | 1 | P4 | diff --git a/swift/ql/test/extractor-tests/generated/type/ProtocolCompositionType/ProtocolCompositionType.ql b/swift/ql/test/extractor-tests/generated/type/ProtocolCompositionType/ProtocolCompositionType.ql index c681ba74789..6e27ea1d9a1 100644 --- a/swift/ql/test/extractor-tests/generated/type/ProtocolCompositionType/ProtocolCompositionType.ql +++ b/swift/ql/test/extractor-tests/generated/type/ProtocolCompositionType/ProtocolCompositionType.ql @@ -2,12 +2,18 @@ import codeql.swift.elements import TestUtils -from ProtocolCompositionType x, string getName, Type getCanonicalType, int getNumberOfMembers -where +query predicate instances( + ProtocolCompositionType x, string getName__label, string getName, string getCanonicalType__label, + Type getCanonicalType +) { toBeTested(x) and not x.isUnknown() and + getName__label = "getName:" and getName = x.getName() and - getCanonicalType = x.getCanonicalType() and - getNumberOfMembers = x.getNumberOfMembers() -select x, "getName:", getName, "getCanonicalType:", getCanonicalType, "getNumberOfMembers:", - getNumberOfMembers + getCanonicalType__label = "getCanonicalType:" and + getCanonicalType = x.getCanonicalType() +} + +query predicate getMember(ProtocolCompositionType x, int index, Type getMember) { + toBeTested(x) and not x.isUnknown() and getMember = x.getMember(index) +} diff --git a/swift/ql/test/extractor-tests/generated/type/ProtocolCompositionType/ProtocolCompositionType_getMember.expected b/swift/ql/test/extractor-tests/generated/type/ProtocolCompositionType/ProtocolCompositionType_getMember.expected deleted file mode 100644 index 40aa86c2da1..00000000000 --- a/swift/ql/test/extractor-tests/generated/type/ProtocolCompositionType/ProtocolCompositionType_getMember.expected +++ /dev/null @@ -1,7 +0,0 @@ -| P1 & P2 & P3 | 0 | P1 | -| P1 & P2 & P3 | 1 | P2 | -| P1 & P2 & P3 | 2 | P3 | -| P1 & P23 | 0 | P1 | -| P1 & P23 | 1 | P23 | -| P2 & P4 | 0 | P2 | -| P2 & P4 | 1 | P4 | diff --git a/swift/ql/test/extractor-tests/generated/type/ProtocolCompositionType/ProtocolCompositionType_getMember.ql b/swift/ql/test/extractor-tests/generated/type/ProtocolCompositionType/ProtocolCompositionType_getMember.ql deleted file mode 100644 index 5eb99395660..00000000000 --- a/swift/ql/test/extractor-tests/generated/type/ProtocolCompositionType/ProtocolCompositionType_getMember.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from ProtocolCompositionType x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getMember(index) diff --git a/swift/ql/test/extractor-tests/generated/type/TupleType/TupleType.expected b/swift/ql/test/extractor-tests/generated/type/TupleType/TupleType.expected index 9649b1f618e..1e2b58f226d 100644 --- a/swift/ql/test/extractor-tests/generated/type/TupleType/TupleType.expected +++ b/swift/ql/test/extractor-tests/generated/type/TupleType/TupleType.expected @@ -1,6 +1,29 @@ -| (Builtin.IntLiteral, Builtin.IntLiteral) | getName: | (IntLiteral, IntLiteral) | getCanonicalType: | (Builtin.IntLiteral, Builtin.IntLiteral) | getNumberOfTypes: | 2 | -| (Builtin.IntLiteral, Builtin.IntLiteral) | getName: | (IntLiteral, IntLiteral) | getCanonicalType: | (Builtin.IntLiteral, Builtin.IntLiteral) | getNumberOfTypes: | 2 | -| (Int, Int, Int, Int, Int) | getName: | (Int, Int, Int, Int, Int) | getCanonicalType: | (Int, Int, Int, Int, Int) | getNumberOfTypes: | 5 | -| (Int, String, Double) | getName: | (Int, String, Double) | getCanonicalType: | (Int, String, Double) | getNumberOfTypes: | 3 | -| (Int, s: String, Double) | getName: | (Int, s: String, Double) | getCanonicalType: | (Int, s: String, Double) | getNumberOfTypes: | 3 | -| (x: Int, y: Int) | getName: | (x: Int, y: Int) | getCanonicalType: | (x: Int, y: Int) | getNumberOfTypes: | 2 | +instances +| (Builtin.IntLiteral, Builtin.IntLiteral) | getName: | (IntLiteral, IntLiteral) | getCanonicalType: | (Builtin.IntLiteral, Builtin.IntLiteral) | +| (Builtin.IntLiteral, Builtin.IntLiteral) | getName: | (IntLiteral, IntLiteral) | getCanonicalType: | (Builtin.IntLiteral, Builtin.IntLiteral) | +| (Int, Int, Int, Int, Int) | getName: | (Int, Int, Int, Int, Int) | getCanonicalType: | (Int, Int, Int, Int, Int) | +| (Int, String, Double) | getName: | (Int, String, Double) | getCanonicalType: | (Int, String, Double) | +| (Int, s: String, Double) | getName: | (Int, s: String, Double) | getCanonicalType: | (Int, s: String, Double) | +| (x: Int, y: Int) | getName: | (x: Int, y: Int) | getCanonicalType: | (x: Int, y: Int) | +getType +| (Builtin.IntLiteral, Builtin.IntLiteral) | 0 | Builtin.IntLiteral | +| (Builtin.IntLiteral, Builtin.IntLiteral) | 0 | Builtin.IntLiteral | +| (Builtin.IntLiteral, Builtin.IntLiteral) | 1 | Builtin.IntLiteral | +| (Builtin.IntLiteral, Builtin.IntLiteral) | 1 | Builtin.IntLiteral | +| (Int, Int, Int, Int, Int) | 0 | Int | +| (Int, Int, Int, Int, Int) | 1 | Int | +| (Int, Int, Int, Int, Int) | 2 | Int | +| (Int, Int, Int, Int, Int) | 3 | Int | +| (Int, Int, Int, Int, Int) | 4 | Int | +| (Int, String, Double) | 0 | Int | +| (Int, String, Double) | 1 | String | +| (Int, String, Double) | 2 | Double | +| (Int, s: String, Double) | 0 | Int | +| (Int, s: String, Double) | 1 | String | +| (Int, s: String, Double) | 2 | Double | +| (x: Int, y: Int) | 0 | Int | +| (x: Int, y: Int) | 1 | Int | +getName +| (Int, s: String, Double) | 1 | s | +| (x: Int, y: Int) | 0 | x | +| (x: Int, y: Int) | 1 | y | diff --git a/swift/ql/test/extractor-tests/generated/type/TupleType/TupleType.ql b/swift/ql/test/extractor-tests/generated/type/TupleType/TupleType.ql index a14cf6786cc..9d301e217a4 100644 --- a/swift/ql/test/extractor-tests/generated/type/TupleType/TupleType.ql +++ b/swift/ql/test/extractor-tests/generated/type/TupleType/TupleType.ql @@ -2,12 +2,22 @@ import codeql.swift.elements import TestUtils -from TupleType x, string getName, Type getCanonicalType, int getNumberOfTypes -where +query predicate instances( + TupleType x, string getName__label, string getName, string getCanonicalType__label, + Type getCanonicalType +) { toBeTested(x) and not x.isUnknown() and + getName__label = "getName:" and getName = x.getName() and - getCanonicalType = x.getCanonicalType() and - getNumberOfTypes = x.getNumberOfTypes() -select x, "getName:", getName, "getCanonicalType:", getCanonicalType, "getNumberOfTypes:", - getNumberOfTypes + getCanonicalType__label = "getCanonicalType:" and + getCanonicalType = x.getCanonicalType() +} + +query predicate getType(TupleType x, int index, Type getType) { + toBeTested(x) and not x.isUnknown() and getType = x.getType(index) +} + +query predicate getName(TupleType x, int index, string getName) { + toBeTested(x) and not x.isUnknown() and getName = x.getName(index) +} diff --git a/swift/ql/test/extractor-tests/generated/type/TupleType/TupleType_getName.expected b/swift/ql/test/extractor-tests/generated/type/TupleType/TupleType_getName.expected deleted file mode 100644 index 327e8795d7f..00000000000 --- a/swift/ql/test/extractor-tests/generated/type/TupleType/TupleType_getName.expected +++ /dev/null @@ -1,3 +0,0 @@ -| (Int, s: String, Double) | 1 | s | -| (x: Int, y: Int) | 0 | x | -| (x: Int, y: Int) | 1 | y | diff --git a/swift/ql/test/extractor-tests/generated/type/TupleType/TupleType_getName.ql b/swift/ql/test/extractor-tests/generated/type/TupleType/TupleType_getName.ql deleted file mode 100644 index f71ab6709d6..00000000000 --- a/swift/ql/test/extractor-tests/generated/type/TupleType/TupleType_getName.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from TupleType x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getName(index) diff --git a/swift/ql/test/extractor-tests/generated/type/TupleType/TupleType_getType.expected b/swift/ql/test/extractor-tests/generated/type/TupleType/TupleType_getType.expected deleted file mode 100644 index 926411dedfa..00000000000 --- a/swift/ql/test/extractor-tests/generated/type/TupleType/TupleType_getType.expected +++ /dev/null @@ -1,17 +0,0 @@ -| (Builtin.IntLiteral, Builtin.IntLiteral) | 0 | Builtin.IntLiteral | -| (Builtin.IntLiteral, Builtin.IntLiteral) | 0 | Builtin.IntLiteral | -| (Builtin.IntLiteral, Builtin.IntLiteral) | 1 | Builtin.IntLiteral | -| (Builtin.IntLiteral, Builtin.IntLiteral) | 1 | Builtin.IntLiteral | -| (Int, Int, Int, Int, Int) | 0 | Int | -| (Int, Int, Int, Int, Int) | 1 | Int | -| (Int, Int, Int, Int, Int) | 2 | Int | -| (Int, Int, Int, Int, Int) | 3 | Int | -| (Int, Int, Int, Int, Int) | 4 | Int | -| (Int, String, Double) | 0 | Int | -| (Int, String, Double) | 1 | String | -| (Int, String, Double) | 2 | Double | -| (Int, s: String, Double) | 0 | Int | -| (Int, s: String, Double) | 1 | String | -| (Int, s: String, Double) | 2 | Double | -| (x: Int, y: Int) | 0 | Int | -| (x: Int, y: Int) | 1 | Int | diff --git a/swift/ql/test/extractor-tests/generated/type/TupleType/TupleType_getType.ql b/swift/ql/test/extractor-tests/generated/type/TupleType/TupleType_getType.ql deleted file mode 100644 index 431aefc42f1..00000000000 --- a/swift/ql/test/extractor-tests/generated/type/TupleType/TupleType_getType.ql +++ /dev/null @@ -1,7 +0,0 @@ -// generated by codegen/codegen.py, do not edit -import codeql.swift.elements -import TestUtils - -from TupleType x, int index -where toBeTested(x) and not x.isUnknown() -select x, index, x.getType(index) diff --git a/swift/ql/test/extractor-tests/generated/type/UnmanagedStorageType/UnmanagedStorageType.ql b/swift/ql/test/extractor-tests/generated/type/UnmanagedStorageType/UnmanagedStorageType.ql index a69efd50492..b10012dfad6 100644 --- a/swift/ql/test/extractor-tests/generated/type/UnmanagedStorageType/UnmanagedStorageType.ql +++ b/swift/ql/test/extractor-tests/generated/type/UnmanagedStorageType/UnmanagedStorageType.ql @@ -2,12 +2,16 @@ import codeql.swift.elements import TestUtils -from UnmanagedStorageType x, string getName, Type getCanonicalType, Type getReferentType -where +query predicate instances( + UnmanagedStorageType x, string getName__label, string getName, string getCanonicalType__label, + Type getCanonicalType, string getReferentType__label, Type getReferentType +) { toBeTested(x) and not x.isUnknown() and + getName__label = "getName:" and getName = x.getName() and + getCanonicalType__label = "getCanonicalType:" and getCanonicalType = x.getCanonicalType() and + getReferentType__label = "getReferentType:" and getReferentType = x.getReferentType() -select x, "getName:", getName, "getCanonicalType:", getCanonicalType, "getReferentType:", - getReferentType +} diff --git a/swift/ql/test/extractor-tests/generated/type/UnownedStorageType/UnownedStorageType.ql b/swift/ql/test/extractor-tests/generated/type/UnownedStorageType/UnownedStorageType.ql index b08407203f7..e0370d0b948 100644 --- a/swift/ql/test/extractor-tests/generated/type/UnownedStorageType/UnownedStorageType.ql +++ b/swift/ql/test/extractor-tests/generated/type/UnownedStorageType/UnownedStorageType.ql @@ -2,12 +2,16 @@ import codeql.swift.elements import TestUtils -from UnownedStorageType x, string getName, Type getCanonicalType, Type getReferentType -where +query predicate instances( + UnownedStorageType x, string getName__label, string getName, string getCanonicalType__label, + Type getCanonicalType, string getReferentType__label, Type getReferentType +) { toBeTested(x) and not x.isUnknown() and + getName__label = "getName:" and getName = x.getName() and + getCanonicalType__label = "getCanonicalType:" and getCanonicalType = x.getCanonicalType() and + getReferentType__label = "getReferentType:" and getReferentType = x.getReferentType() -select x, "getName:", getName, "getCanonicalType:", getCanonicalType, "getReferentType:", - getReferentType +} diff --git a/swift/ql/test/extractor-tests/generated/type/VariadicSequenceType/VariadicSequenceType.ql b/swift/ql/test/extractor-tests/generated/type/VariadicSequenceType/VariadicSequenceType.ql index d87743fc4f4..d9002625031 100644 --- a/swift/ql/test/extractor-tests/generated/type/VariadicSequenceType/VariadicSequenceType.ql +++ b/swift/ql/test/extractor-tests/generated/type/VariadicSequenceType/VariadicSequenceType.ql @@ -2,11 +2,16 @@ import codeql.swift.elements import TestUtils -from VariadicSequenceType x, string getName, Type getCanonicalType, Type getBaseType -where +query predicate instances( + VariadicSequenceType x, string getName__label, string getName, string getCanonicalType__label, + Type getCanonicalType, string getBaseType__label, Type getBaseType +) { toBeTested(x) and not x.isUnknown() and + getName__label = "getName:" and getName = x.getName() and + getCanonicalType__label = "getCanonicalType:" and getCanonicalType = x.getCanonicalType() and + getBaseType__label = "getBaseType:" and getBaseType = x.getBaseType() -select x, "getName:", getName, "getCanonicalType:", getCanonicalType, "getBaseType:", getBaseType +} diff --git a/swift/ql/test/extractor-tests/generated/type/WeakStorageType/WeakStorageType.ql b/swift/ql/test/extractor-tests/generated/type/WeakStorageType/WeakStorageType.ql index 8cbe22fd154..fe1c2537fbc 100644 --- a/swift/ql/test/extractor-tests/generated/type/WeakStorageType/WeakStorageType.ql +++ b/swift/ql/test/extractor-tests/generated/type/WeakStorageType/WeakStorageType.ql @@ -2,12 +2,16 @@ import codeql.swift.elements import TestUtils -from WeakStorageType x, string getName, Type getCanonicalType, Type getReferentType -where +query predicate instances( + WeakStorageType x, string getName__label, string getName, string getCanonicalType__label, + Type getCanonicalType, string getReferentType__label, Type getReferentType +) { toBeTested(x) and not x.isUnknown() and + getName__label = "getName:" and getName = x.getName() and + getCanonicalType__label = "getCanonicalType:" and getCanonicalType = x.getCanonicalType() and + getReferentType__label = "getReferentType:" and getReferentType = x.getReferentType() -select x, "getName:", getName, "getCanonicalType:", getCanonicalType, "getReferentType:", - getReferentType +} diff --git a/swift/ql/test/query-tests/Security/CWE-022/PathInjection/PathInjectionTest.expected b/swift/ql/test/query-tests/Security/CWE-022/PathInjection/PathInjectionTest.expected index e69de29bb2d..c6be4599c2a 100644 --- a/swift/ql/test/query-tests/Security/CWE-022/PathInjection/PathInjectionTest.expected +++ b/swift/ql/test/query-tests/Security/CWE-022/PathInjection/PathInjectionTest.expected @@ -0,0 +1,415 @@ +#select +| file://:0:0:0:0 | [post] self | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | file://:0:0:0:0 | [post] self | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| file://:0:0:0:0 | [post] self | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | file://:0:0:0:0 | [post] self | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:295:24:295:24 | remoteUrl | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:295:24:295:24 | remoteUrl | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:298:30:298:30 | remoteUrl | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:298:30:298:30 | remoteUrl | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:299:22:299:22 | remoteUrl | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:299:22:299:22 | remoteUrl | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:300:34:300:34 | remoteString | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:300:34:300:34 | remoteString | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:301:26:301:26 | remoteString | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:301:26:301:26 | remoteString | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:304:40:304:40 | remoteUrl | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:304:40:304:40 | remoteUrl | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:305:44:305:44 | remoteString | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:305:44:305:44 | remoteString | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:306:31:306:31 | remoteUrl | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:306:31:306:31 | remoteUrl | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:307:35:307:35 | remoteString | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:307:35:307:35 | remoteString | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:308:44:308:44 | remoteString | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:308:44:308:44 | remoteString | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:309:33:309:33 | remoteString | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:309:33:309:33 | remoteString | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:310:28:310:28 | remoteUrl | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:310:28:310:28 | remoteUrl | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:311:40:311:40 | remoteString | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:311:40:311:40 | remoteString | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:312:35:312:35 | remoteString | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:312:35:312:35 | remoteString | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:313:23:313:23 | remoteUrl | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:313:23:313:23 | remoteUrl | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:314:27:314:27 | remoteString | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:314:27:314:27 | remoteString | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:315:22:315:22 | remoteUrl | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:315:22:315:22 | remoteUrl | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:316:30:316:30 | remoteUrl | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:316:30:316:30 | remoteUrl | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:317:51:317:51 | remoteUrl | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:317:51:317:51 | remoteUrl | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:318:24:318:24 | remoteUrl | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:318:24:318:24 | remoteUrl | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:319:45:319:45 | remoteUrl | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:319:45:319:45 | remoteUrl | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:320:21:320:21 | remoteUrl | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:320:21:320:21 | remoteUrl | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:321:34:321:34 | remoteUrl | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:321:34:321:34 | remoteUrl | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:322:25:322:25 | remoteString | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:322:25:322:25 | remoteString | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:323:37:323:37 | remoteString | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:323:37:323:37 | remoteString | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:324:21:324:21 | remoteUrl | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:324:21:324:21 | remoteUrl | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:325:34:325:34 | remoteUrl | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:325:34:325:34 | remoteUrl | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:326:25:326:25 | remoteString | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:326:25:326:25 | remoteString | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:327:37:327:37 | remoteString | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:327:37:327:37 | remoteString | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:328:31:328:31 | remoteUrl | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:328:31:328:31 | remoteUrl | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:329:60:329:60 | remoteUrl | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:329:60:329:60 | remoteUrl | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:330:35:330:35 | remoteString | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:330:35:330:35 | remoteString | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:331:60:331:60 | remoteString | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:331:60:331:60 | remoteString | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:332:21:332:21 | remoteUrl | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:332:21:332:21 | remoteUrl | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:333:34:333:34 | remoteUrl | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:333:34:333:34 | remoteUrl | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:334:25:334:25 | remoteString | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:334:25:334:25 | remoteString | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:335:37:335:37 | remoteString | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:335:37:335:37 | remoteString | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:336:50:336:50 | remoteString | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:336:50:336:50 | remoteString | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:337:35:337:35 | remoteString | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:337:35:337:35 | remoteString | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:338:35:338:35 | remoteString | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:338:35:338:35 | remoteString | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:339:41:339:41 | remoteString | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:339:41:339:41 | remoteString | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:340:33:340:33 | remoteString | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:340:33:340:33 | remoteString | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:341:38:341:38 | remoteString | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:341:38:341:38 | remoteString | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:342:51:342:51 | remoteString | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:342:51:342:51 | remoteString | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:343:43:343:43 | remoteString | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:343:43:343:43 | remoteString | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:344:34:344:34 | remoteUrl | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:344:34:344:34 | remoteUrl | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:346:50:346:50 | remoteString | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:346:50:346:50 | remoteString | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:347:42:347:42 | remoteString | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:347:42:347:42 | remoteString | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:348:40:348:40 | remoteString | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:348:40:348:40 | remoteString | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:349:43:349:43 | remoteString | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:349:43:349:43 | remoteString | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:350:60:350:60 | remoteString | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:350:60:350:60 | remoteString | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:351:50:351:50 | remoteString | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:351:50:351:50 | remoteString | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:352:50:352:50 | remoteNsUrl | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:352:50:352:50 | remoteNsUrl | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:353:76:353:76 | remoteNsUrl | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:353:76:353:76 | remoteNsUrl | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:356:41:356:41 | remoteString | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:356:41:356:41 | remoteString | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:357:41:357:41 | remoteString | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:357:41:357:41 | remoteString | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:358:41:358:41 | remoteString | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:358:41:358:41 | remoteString | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:360:43:360:43 | remoteString | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:360:43:360:43 | remoteString | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:361:43:361:43 | remoteString | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:361:43:361:43 | remoteString | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:362:26:362:26 | remoteUrl | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:362:26:362:26 | remoteUrl | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:363:30:363:30 | remoteString | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:363:30:363:30 | remoteString | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:365:59:365:59 | remoteString | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:365:59:365:59 | remoteString | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:366:46:366:46 | remoteString | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:366:46:366:46 | remoteString | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:367:42:367:42 | remoteString | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:367:42:367:42 | remoteString | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:368:48:368:84 | call to FilePath.init(stringLiteral:) | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:368:48:368:84 | call to FilePath.init(stringLiteral:) | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:369:44:369:80 | call to FilePath.init(stringLiteral:) | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:369:44:369:80 | call to FilePath.init(stringLiteral:) | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:370:25:370:25 | remoteUrl | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:370:25:370:25 | remoteUrl | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:371:26:371:26 | remoteString | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:371:26:371:26 | remoteString | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:375:28:375:28 | remoteString | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:375:28:375:28 | remoteString | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:377:32:377:32 | remoteString | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:377:32:377:32 | remoteString | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:379:33:379:33 | remoteString | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:379:33:379:33 | remoteString | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:381:40:381:40 | remoteString | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:381:40:381:40 | remoteString | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:383:38:383:38 | remoteString | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:383:38:383:38 | remoteString | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:385:38:385:38 | remoteString | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:385:38:385:38 | remoteString | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:387:38:387:38 | remoteString | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:387:38:387:38 | remoteString | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:389:38:389:38 | remoteString | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:389:38:389:38 | remoteString | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:395:35:395:35 | remoteUrl | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:395:35:395:35 | remoteUrl | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:397:40:397:40 | remoteUrl | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:397:40:397:40 | remoteUrl | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:401:2:401:2 | [post] config | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:401:2:401:2 | [post] config | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:403:2:403:2 | [post] config | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:403:2:403:2 | [post] config | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:414:22:414:22 | remoteString | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:414:22:414:22 | remoteString | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:416:24:416:24 | buffer2 | testPathInjection.swift:409:22:409:87 | call to Data.init(contentsOf:options:) | testPathInjection.swift:416:24:416:24 | buffer2 | This path depends on a $@. | testPathInjection.swift:409:22:409:87 | call to Data.init(contentsOf:options:) | user-provided value | +| testPathInjection.swift:418:25:418:25 | remoteString | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:418:25:418:25 | remoteString | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:427:49:427:49 | remoteString | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:427:49:427:49 | remoteString | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:429:25:429:25 | remoteString | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:429:25:429:25 | remoteString | This path depends on a $@. | testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:441:33:441:33 | remoteString | testPathInjection.swift:433:24:433:78 | call to String.init(contentsOf:) | testPathInjection.swift:441:33:441:33 | remoteString | This path depends on a $@. | testPathInjection.swift:433:24:433:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:450:28:450:66 | call to appendingPathComponent(_:) | testPathInjection.swift:445:24:445:78 | call to String.init(contentsOf:) | testPathInjection.swift:450:28:450:66 | call to appendingPathComponent(_:) | This path depends on a $@. | testPathInjection.swift:445:24:445:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:451:28:451:93 | call to appendingPathComponent(_:) | testPathInjection.swift:445:24:445:78 | call to String.init(contentsOf:) | testPathInjection.swift:451:28:451:93 | call to appendingPathComponent(_:) | This path depends on a $@. | testPathInjection.swift:445:24:445:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:453:28:453:28 | u1 | testPathInjection.swift:445:24:445:78 | call to String.init(contentsOf:) | testPathInjection.swift:453:28:453:28 | u1 | This path depends on a $@. | testPathInjection.swift:445:24:445:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:455:28:455:28 | remoteString | testPathInjection.swift:445:24:445:78 | call to String.init(contentsOf:) | testPathInjection.swift:455:28:455:28 | remoteString | This path depends on a $@. | testPathInjection.swift:445:24:445:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:456:28:456:28 | u2 | testPathInjection.swift:445:24:445:78 | call to String.init(contentsOf:) | testPathInjection.swift:456:28:456:28 | u2 | This path depends on a $@. | testPathInjection.swift:445:24:445:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:461:24:461:63 | ...! | testPathInjection.swift:445:24:445:78 | call to String.init(contentsOf:) | testPathInjection.swift:461:24:461:63 | ...! | This path depends on a $@. | testPathInjection.swift:445:24:445:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:464:24:464:38 | ...! | testPathInjection.swift:445:24:445:78 | call to String.init(contentsOf:) | testPathInjection.swift:464:24:464:38 | ...! | This path depends on a $@. | testPathInjection.swift:445:24:445:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:465:24:465:53 | ...! | testPathInjection.swift:445:24:445:78 | call to String.init(contentsOf:) | testPathInjection.swift:465:24:465:53 | ...! | This path depends on a $@. | testPathInjection.swift:445:24:445:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:467:32:467:32 | remoteString | testPathInjection.swift:445:24:445:78 | call to String.init(contentsOf:) | testPathInjection.swift:467:32:467:32 | remoteString | This path depends on a $@. | testPathInjection.swift:445:24:445:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:468:38:468:38 | remoteString | testPathInjection.swift:445:24:445:78 | call to String.init(contentsOf:) | testPathInjection.swift:468:38:468:38 | remoteString | This path depends on a $@. | testPathInjection.swift:445:24:445:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:469:45:469:45 | remoteString | testPathInjection.swift:445:24:445:78 | call to String.init(contentsOf:) | testPathInjection.swift:469:45:469:45 | remoteString | This path depends on a $@. | testPathInjection.swift:445:24:445:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:473:32:473:35 | .pointee | testPathInjection.swift:445:24:445:78 | call to String.init(contentsOf:) | testPathInjection.swift:473:32:473:35 | .pointee | This path depends on a $@. | testPathInjection.swift:445:24:445:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:482:32:482:36 | ...[...] | testPathInjection.swift:445:24:445:78 | call to String.init(contentsOf:) | testPathInjection.swift:482:32:482:36 | ...[...] | This path depends on a $@. | testPathInjection.swift:445:24:445:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:484:35:484:35 | remoteString | testPathInjection.swift:445:24:445:78 | call to String.init(contentsOf:) | testPathInjection.swift:484:35:484:35 | remoteString | This path depends on a $@. | testPathInjection.swift:445:24:445:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:485:41:485:41 | remoteString | testPathInjection.swift:445:24:445:78 | call to String.init(contentsOf:) | testPathInjection.swift:485:41:485:41 | remoteString | This path depends on a $@. | testPathInjection.swift:445:24:445:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:507:25:507:25 | remoteString | testPathInjection.swift:505:24:505:78 | call to String.init(contentsOf:) | testPathInjection.swift:507:25:507:25 | remoteString | This path depends on a $@. | testPathInjection.swift:505:24:505:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:508:17:508:17 | remoteString | testPathInjection.swift:505:24:505:78 | call to String.init(contentsOf:) | testPathInjection.swift:508:17:508:17 | remoteString | This path depends on a $@. | testPathInjection.swift:505:24:505:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:509:41:509:41 | remoteString | testPathInjection.swift:505:24:505:78 | call to String.init(contentsOf:) | testPathInjection.swift:509:41:509:41 | remoteString | This path depends on a $@. | testPathInjection.swift:505:24:505:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:511:38:511:38 | remoteString | testPathInjection.swift:505:24:505:78 | call to String.init(contentsOf:) | testPathInjection.swift:511:38:511:38 | remoteString | This path depends on a $@. | testPathInjection.swift:505:24:505:78 | call to String.init(contentsOf:) | user-provided value | +| testPathInjection.swift:513:22:513:22 | remoteString | testPathInjection.swift:505:24:505:78 | call to String.init(contentsOf:) | testPathInjection.swift:513:22:513:22 | remoteString | This path depends on a $@. | testPathInjection.swift:505:24:505:78 | call to String.init(contentsOf:) | user-provided value | +edges +| file://:0:0:0:0 | [post] self [fileURL] | testPathInjection.swift:248:7:248:7 | self [Return] [fileURL] | provenance | | +| file://:0:0:0:0 | [post] self [seedFilePath] | testPathInjection.swift:249:13:249:13 | self [Return] [seedFilePath] | provenance | | +| file://:0:0:0:0 | value | file://:0:0:0:0 | [post] self | provenance | | +| file://:0:0:0:0 | value | file://:0:0:0:0 | [post] self | provenance | | +| file://:0:0:0:0 | value | file://:0:0:0:0 | [post] self [fileURL] | provenance | | +| file://:0:0:0:0 | value | file://:0:0:0:0 | [post] self [seedFilePath] | provenance | | +| testPathInjection.swift:248:7:248:7 | value | file://:0:0:0:0 | value | provenance | | +| testPathInjection.swift:249:13:249:13 | value | file://:0:0:0:0 | value | provenance | | +| testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:290:33:290:33 | remoteString | provenance | | +| testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:291:37:291:37 | remoteString | provenance | | +| testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:300:34:300:34 | remoteString | provenance | | +| testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:301:26:301:26 | remoteString | provenance | | +| testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:305:44:305:44 | remoteString | provenance | | +| testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:307:35:307:35 | remoteString | provenance | | +| testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:308:44:308:44 | remoteString | provenance | | +| testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:309:33:309:33 | remoteString | provenance | | +| testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:311:40:311:40 | remoteString | provenance | | +| testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:312:35:312:35 | remoteString | provenance | | +| testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:314:27:314:27 | remoteString | provenance | | +| testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:322:25:322:25 | remoteString | provenance | | +| testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:323:37:323:37 | remoteString | provenance | | +| testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:326:25:326:25 | remoteString | provenance | | +| testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:327:37:327:37 | remoteString | provenance | | +| testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:330:35:330:35 | remoteString | provenance | | +| testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:331:60:331:60 | remoteString | provenance | | +| testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:334:25:334:25 | remoteString | provenance | | +| testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:335:37:335:37 | remoteString | provenance | | +| testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:336:50:336:50 | remoteString | provenance | | +| testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:337:35:337:35 | remoteString | provenance | | +| testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:338:35:338:35 | remoteString | provenance | | +| testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:339:41:339:41 | remoteString | provenance | | +| testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:340:33:340:33 | remoteString | provenance | | +| testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:341:38:341:38 | remoteString | provenance | | +| testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:342:51:342:51 | remoteString | provenance | | +| testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:343:43:343:43 | remoteString | provenance | | +| testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:346:50:346:50 | remoteString | provenance | | +| testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:347:42:347:42 | remoteString | provenance | | +| testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:348:40:348:40 | remoteString | provenance | | +| testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:349:43:349:43 | remoteString | provenance | | +| testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:350:60:350:60 | remoteString | provenance | | +| testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:351:50:351:50 | remoteString | provenance | | +| testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:356:41:356:41 | remoteString | provenance | | +| testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:357:41:357:41 | remoteString | provenance | | +| testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:358:41:358:41 | remoteString | provenance | | +| testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:360:43:360:43 | remoteString | provenance | | +| testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:361:43:361:43 | remoteString | provenance | | +| testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:363:30:363:30 | remoteString | provenance | | +| testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:365:59:365:59 | remoteString | provenance | | +| testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:366:46:366:46 | remoteString | provenance | | +| testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:367:42:367:42 | remoteString | provenance | | +| testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:368:72:368:72 | remoteString | provenance | | +| testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:369:68:369:68 | remoteString | provenance | | +| testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:371:26:371:26 | remoteString | provenance | | +| testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:375:28:375:28 | remoteString | provenance | | +| testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:377:32:377:32 | remoteString | provenance | | +| testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:379:33:379:33 | remoteString | provenance | | +| testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:381:40:381:40 | remoteString | provenance | | +| testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:383:38:383:38 | remoteString | provenance | | +| testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:385:38:385:38 | remoteString | provenance | | +| testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:387:38:387:38 | remoteString | provenance | | +| testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:389:38:389:38 | remoteString | provenance | | +| testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:414:22:414:22 | remoteString | provenance | | +| testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:418:25:418:25 | remoteString | provenance | | +| testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:427:49:427:49 | remoteString | provenance | | +| testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | testPathInjection.swift:429:25:429:25 | remoteString | provenance | | +| testPathInjection.swift:290:21:290:45 | call to URL.init(string:) [some:0] | testPathInjection.swift:290:21:290:46 | ...! | provenance | | +| testPathInjection.swift:290:21:290:46 | ...! | testPathInjection.swift:295:24:295:24 | remoteUrl | provenance | | +| testPathInjection.swift:290:21:290:46 | ...! | testPathInjection.swift:298:30:298:30 | remoteUrl | provenance | | +| testPathInjection.swift:290:21:290:46 | ...! | testPathInjection.swift:299:22:299:22 | remoteUrl | provenance | | +| testPathInjection.swift:290:21:290:46 | ...! | testPathInjection.swift:304:40:304:40 | remoteUrl | provenance | | +| testPathInjection.swift:290:21:290:46 | ...! | testPathInjection.swift:306:31:306:31 | remoteUrl | provenance | | +| testPathInjection.swift:290:21:290:46 | ...! | testPathInjection.swift:310:28:310:28 | remoteUrl | provenance | | +| testPathInjection.swift:290:21:290:46 | ...! | testPathInjection.swift:313:23:313:23 | remoteUrl | provenance | | +| testPathInjection.swift:290:21:290:46 | ...! | testPathInjection.swift:315:22:315:22 | remoteUrl | provenance | | +| testPathInjection.swift:290:21:290:46 | ...! | testPathInjection.swift:316:30:316:30 | remoteUrl | provenance | | +| testPathInjection.swift:290:21:290:46 | ...! | testPathInjection.swift:317:51:317:51 | remoteUrl | provenance | | +| testPathInjection.swift:290:21:290:46 | ...! | testPathInjection.swift:318:24:318:24 | remoteUrl | provenance | | +| testPathInjection.swift:290:21:290:46 | ...! | testPathInjection.swift:319:45:319:45 | remoteUrl | provenance | | +| testPathInjection.swift:290:21:290:46 | ...! | testPathInjection.swift:320:21:320:21 | remoteUrl | provenance | | +| testPathInjection.swift:290:21:290:46 | ...! | testPathInjection.swift:321:34:321:34 | remoteUrl | provenance | | +| testPathInjection.swift:290:21:290:46 | ...! | testPathInjection.swift:324:21:324:21 | remoteUrl | provenance | | +| testPathInjection.swift:290:21:290:46 | ...! | testPathInjection.swift:325:34:325:34 | remoteUrl | provenance | | +| testPathInjection.swift:290:21:290:46 | ...! | testPathInjection.swift:328:31:328:31 | remoteUrl | provenance | | +| testPathInjection.swift:290:21:290:46 | ...! | testPathInjection.swift:329:60:329:60 | remoteUrl | provenance | | +| testPathInjection.swift:290:21:290:46 | ...! | testPathInjection.swift:332:21:332:21 | remoteUrl | provenance | | +| testPathInjection.swift:290:21:290:46 | ...! | testPathInjection.swift:333:34:333:34 | remoteUrl | provenance | | +| testPathInjection.swift:290:21:290:46 | ...! | testPathInjection.swift:344:34:344:34 | remoteUrl | provenance | | +| testPathInjection.swift:290:21:290:46 | ...! | testPathInjection.swift:362:26:362:26 | remoteUrl | provenance | | +| testPathInjection.swift:290:21:290:46 | ...! | testPathInjection.swift:370:25:370:25 | remoteUrl | provenance | | +| testPathInjection.swift:290:21:290:46 | ...! | testPathInjection.swift:395:35:395:35 | remoteUrl | provenance | | +| testPathInjection.swift:290:21:290:46 | ...! | testPathInjection.swift:397:40:397:40 | remoteUrl | provenance | | +| testPathInjection.swift:290:21:290:46 | ...! | testPathInjection.swift:401:19:401:19 | remoteUrl | provenance | | +| testPathInjection.swift:290:21:290:46 | ...! | testPathInjection.swift:403:24:403:24 | remoteUrl | provenance | | +| testPathInjection.swift:290:33:290:33 | remoteString | testPathInjection.swift:290:21:290:45 | call to URL.init(string:) [some:0] | provenance | | +| testPathInjection.swift:291:23:291:49 | call to NSURL.init(string:) [some:0] | testPathInjection.swift:291:23:291:50 | ...! | provenance | | +| testPathInjection.swift:291:23:291:50 | ...! | testPathInjection.swift:352:50:352:50 | remoteNsUrl | provenance | | +| testPathInjection.swift:291:23:291:50 | ...! | testPathInjection.swift:353:76:353:76 | remoteNsUrl | provenance | | +| testPathInjection.swift:291:37:291:37 | remoteString | testPathInjection.swift:291:23:291:49 | call to NSURL.init(string:) [some:0] | provenance | | +| testPathInjection.swift:368:72:368:72 | remoteString | testPathInjection.swift:368:48:368:84 | call to FilePath.init(stringLiteral:) | provenance | | +| testPathInjection.swift:369:68:369:68 | remoteString | testPathInjection.swift:369:44:369:80 | call to FilePath.init(stringLiteral:) | provenance | | +| testPathInjection.swift:401:19:401:19 | remoteUrl | testPathInjection.swift:248:7:248:7 | value | provenance | | +| testPathInjection.swift:401:19:401:19 | remoteUrl | testPathInjection.swift:401:2:401:2 | [post] config | provenance | | +| testPathInjection.swift:403:24:403:24 | remoteUrl | testPathInjection.swift:249:13:249:13 | value | provenance | | +| testPathInjection.swift:403:24:403:24 | remoteUrl | testPathInjection.swift:403:2:403:2 | [post] config | provenance | | +| testPathInjection.swift:409:22:409:87 | call to Data.init(contentsOf:options:) | testPathInjection.swift:411:5:411:5 | remoteData | provenance | | +| testPathInjection.swift:411:5:411:5 | remoteData | testPathInjection.swift:411:30:411:30 | [post] buffer2 | provenance | | +| testPathInjection.swift:411:30:411:30 | [post] buffer2 | testPathInjection.swift:416:24:416:24 | buffer2 | provenance | | +| testPathInjection.swift:433:24:433:78 | call to String.init(contentsOf:) | testPathInjection.swift:441:33:441:33 | remoteString | provenance | | +| testPathInjection.swift:445:24:445:78 | call to String.init(contentsOf:) | testPathInjection.swift:450:54:450:54 | remoteString | provenance | | +| testPathInjection.swift:445:24:445:78 | call to String.init(contentsOf:) | testPathInjection.swift:451:54:451:54 | remoteString | provenance | | +| testPathInjection.swift:445:24:445:78 | call to String.init(contentsOf:) | testPathInjection.swift:452:28:452:28 | remoteString | provenance | | +| testPathInjection.swift:445:24:445:78 | call to String.init(contentsOf:) | testPathInjection.swift:455:28:455:28 | remoteString | provenance | | +| testPathInjection.swift:445:24:445:78 | call to String.init(contentsOf:) | testPathInjection.swift:455:28:455:28 | remoteString | provenance | | +| testPathInjection.swift:445:24:445:78 | call to String.init(contentsOf:) | testPathInjection.swift:461:50:461:50 | remoteString | provenance | | +| testPathInjection.swift:445:24:445:78 | call to String.init(contentsOf:) | testPathInjection.swift:463:28:463:28 | remoteString | provenance | | +| testPathInjection.swift:445:24:445:78 | call to String.init(contentsOf:) | testPathInjection.swift:467:32:467:32 | remoteString | provenance | | +| testPathInjection.swift:445:24:445:78 | call to String.init(contentsOf:) | testPathInjection.swift:468:38:468:38 | remoteString | provenance | | +| testPathInjection.swift:445:24:445:78 | call to String.init(contentsOf:) | testPathInjection.swift:469:45:469:45 | remoteString | provenance | | +| testPathInjection.swift:445:24:445:78 | call to String.init(contentsOf:) | testPathInjection.swift:472:18:472:18 | remoteString | provenance | | +| testPathInjection.swift:445:24:445:78 | call to String.init(contentsOf:) | testPathInjection.swift:480:9:480:9 | remoteString | provenance | | +| testPathInjection.swift:445:24:445:78 | call to String.init(contentsOf:) | testPathInjection.swift:484:35:484:35 | remoteString | provenance | | +| testPathInjection.swift:445:24:445:78 | call to String.init(contentsOf:) | testPathInjection.swift:485:41:485:41 | remoteString | provenance | | +| testPathInjection.swift:450:54:450:54 | remoteString | testPathInjection.swift:450:28:450:66 | call to appendingPathComponent(_:) | provenance | | +| testPathInjection.swift:451:28:451:66 | call to appendingPathComponent(_:) | testPathInjection.swift:451:28:451:93 | call to appendingPathComponent(_:) | provenance | | +| testPathInjection.swift:451:54:451:54 | remoteString | testPathInjection.swift:451:28:451:66 | call to appendingPathComponent(_:) | provenance | | +| testPathInjection.swift:452:5:452:5 | [post] u1 | testPathInjection.swift:453:28:453:28 | u1 | provenance | | +| testPathInjection.swift:452:28:452:28 | remoteString | testPathInjection.swift:452:5:452:5 | [post] u1 | provenance | | +| testPathInjection.swift:455:14:455:40 | call to URL.init(filePath:directoryHint:relativeTo:) | testPathInjection.swift:456:28:456:28 | u2 | provenance | | +| testPathInjection.swift:455:28:455:28 | remoteString | testPathInjection.swift:455:14:455:40 | call to URL.init(filePath:directoryHint:relativeTo:) | provenance | | +| testPathInjection.swift:461:24:461:62 | call to appendingPathComponent(_:) | testPathInjection.swift:461:24:461:63 | ...! | provenance | | +| testPathInjection.swift:461:50:461:50 | remoteString | testPathInjection.swift:461:24:461:62 | call to appendingPathComponent(_:) | provenance | | +| testPathInjection.swift:463:14:463:40 | call to NSURL.init(string:) [some:0] | testPathInjection.swift:463:14:463:41 | ...! | provenance | | +| testPathInjection.swift:463:14:463:41 | ...! | testPathInjection.swift:464:24:464:38 | ...! | provenance | | +| testPathInjection.swift:463:14:463:41 | ...! | testPathInjection.swift:465:24:465:24 | u4 | provenance | | +| testPathInjection.swift:463:28:463:28 | remoteString | testPathInjection.swift:463:14:463:40 | call to NSURL.init(string:) [some:0] | provenance | | +| testPathInjection.swift:465:24:465:24 | u4 | testPathInjection.swift:465:24:465:52 | call to appendingPathComponent(_:) | provenance | | +| testPathInjection.swift:465:24:465:52 | call to appendingPathComponent(_:) | testPathInjection.swift:465:24:465:53 | ...! | provenance | | +| testPathInjection.swift:472:5:472:5 | [post] s1 [pointee] | testPathInjection.swift:473:32:473:32 | s1 [pointee] | provenance | | +| testPathInjection.swift:472:18:472:18 | remoteString | testPathInjection.swift:472:5:472:5 | [post] s1 [pointee] | provenance | | +| testPathInjection.swift:473:32:473:32 | s1 [pointee] | testPathInjection.swift:473:32:473:35 | .pointee | provenance | | +| testPathInjection.swift:480:9:480:9 | remoteString | testPathInjection.swift:480:41:480:41 | [post] s3 [Collection element] | provenance | | +| testPathInjection.swift:480:41:480:41 | [post] s3 [Collection element] | testPathInjection.swift:482:32:482:32 | s3 [Collection element] | provenance | | +| testPathInjection.swift:482:32:482:32 | s3 [Collection element] | testPathInjection.swift:482:32:482:36 | ...[...] | provenance | | +| testPathInjection.swift:505:24:505:78 | call to String.init(contentsOf:) | testPathInjection.swift:507:25:507:25 | remoteString | provenance | | +| testPathInjection.swift:505:24:505:78 | call to String.init(contentsOf:) | testPathInjection.swift:508:17:508:17 | remoteString | provenance | | +| testPathInjection.swift:505:24:505:78 | call to String.init(contentsOf:) | testPathInjection.swift:509:41:509:41 | remoteString | provenance | | +| testPathInjection.swift:505:24:505:78 | call to String.init(contentsOf:) | testPathInjection.swift:511:38:511:38 | remoteString | provenance | | +| testPathInjection.swift:505:24:505:78 | call to String.init(contentsOf:) | testPathInjection.swift:513:22:513:22 | remoteString | provenance | | +nodes +| file://:0:0:0:0 | [post] self | semmle.label | [post] self | +| file://:0:0:0:0 | [post] self | semmle.label | [post] self | +| file://:0:0:0:0 | [post] self [fileURL] | semmle.label | [post] self [fileURL] | +| file://:0:0:0:0 | [post] self [seedFilePath] | semmle.label | [post] self [seedFilePath] | +| file://:0:0:0:0 | value | semmle.label | value | +| file://:0:0:0:0 | value | semmle.label | value | +| testPathInjection.swift:248:7:248:7 | self [Return] [fileURL] | semmle.label | self [Return] [fileURL] | +| testPathInjection.swift:248:7:248:7 | value | semmle.label | value | +| testPathInjection.swift:249:13:249:13 | self [Return] [seedFilePath] | semmle.label | self [Return] [seedFilePath] | +| testPathInjection.swift:249:13:249:13 | value | semmle.label | value | +| testPathInjection.swift:289:24:289:78 | call to String.init(contentsOf:) | semmle.label | call to String.init(contentsOf:) | +| testPathInjection.swift:290:21:290:45 | call to URL.init(string:) [some:0] | semmle.label | call to URL.init(string:) [some:0] | +| testPathInjection.swift:290:21:290:46 | ...! | semmle.label | ...! | +| testPathInjection.swift:290:33:290:33 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:291:23:291:49 | call to NSURL.init(string:) [some:0] | semmle.label | call to NSURL.init(string:) [some:0] | +| testPathInjection.swift:291:23:291:50 | ...! | semmle.label | ...! | +| testPathInjection.swift:291:37:291:37 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:295:24:295:24 | remoteUrl | semmle.label | remoteUrl | +| testPathInjection.swift:298:30:298:30 | remoteUrl | semmle.label | remoteUrl | +| testPathInjection.swift:299:22:299:22 | remoteUrl | semmle.label | remoteUrl | +| testPathInjection.swift:300:34:300:34 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:301:26:301:26 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:304:40:304:40 | remoteUrl | semmle.label | remoteUrl | +| testPathInjection.swift:305:44:305:44 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:306:31:306:31 | remoteUrl | semmle.label | remoteUrl | +| testPathInjection.swift:307:35:307:35 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:308:44:308:44 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:309:33:309:33 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:310:28:310:28 | remoteUrl | semmle.label | remoteUrl | +| testPathInjection.swift:311:40:311:40 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:312:35:312:35 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:313:23:313:23 | remoteUrl | semmle.label | remoteUrl | +| testPathInjection.swift:314:27:314:27 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:315:22:315:22 | remoteUrl | semmle.label | remoteUrl | +| testPathInjection.swift:316:30:316:30 | remoteUrl | semmle.label | remoteUrl | +| testPathInjection.swift:317:51:317:51 | remoteUrl | semmle.label | remoteUrl | +| testPathInjection.swift:318:24:318:24 | remoteUrl | semmle.label | remoteUrl | +| testPathInjection.swift:319:45:319:45 | remoteUrl | semmle.label | remoteUrl | +| testPathInjection.swift:320:21:320:21 | remoteUrl | semmle.label | remoteUrl | +| testPathInjection.swift:321:34:321:34 | remoteUrl | semmle.label | remoteUrl | +| testPathInjection.swift:322:25:322:25 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:323:37:323:37 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:324:21:324:21 | remoteUrl | semmle.label | remoteUrl | +| testPathInjection.swift:325:34:325:34 | remoteUrl | semmle.label | remoteUrl | +| testPathInjection.swift:326:25:326:25 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:327:37:327:37 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:328:31:328:31 | remoteUrl | semmle.label | remoteUrl | +| testPathInjection.swift:329:60:329:60 | remoteUrl | semmle.label | remoteUrl | +| testPathInjection.swift:330:35:330:35 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:331:60:331:60 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:332:21:332:21 | remoteUrl | semmle.label | remoteUrl | +| testPathInjection.swift:333:34:333:34 | remoteUrl | semmle.label | remoteUrl | +| testPathInjection.swift:334:25:334:25 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:335:37:335:37 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:336:50:336:50 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:337:35:337:35 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:338:35:338:35 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:339:41:339:41 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:340:33:340:33 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:341:38:341:38 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:342:51:342:51 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:343:43:343:43 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:344:34:344:34 | remoteUrl | semmle.label | remoteUrl | +| testPathInjection.swift:346:50:346:50 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:347:42:347:42 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:348:40:348:40 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:349:43:349:43 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:350:60:350:60 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:351:50:351:50 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:352:50:352:50 | remoteNsUrl | semmle.label | remoteNsUrl | +| testPathInjection.swift:353:76:353:76 | remoteNsUrl | semmle.label | remoteNsUrl | +| testPathInjection.swift:356:41:356:41 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:357:41:357:41 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:358:41:358:41 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:360:43:360:43 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:361:43:361:43 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:362:26:362:26 | remoteUrl | semmle.label | remoteUrl | +| testPathInjection.swift:363:30:363:30 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:365:59:365:59 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:366:46:366:46 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:367:42:367:42 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:368:48:368:84 | call to FilePath.init(stringLiteral:) | semmle.label | call to FilePath.init(stringLiteral:) | +| testPathInjection.swift:368:72:368:72 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:369:44:369:80 | call to FilePath.init(stringLiteral:) | semmle.label | call to FilePath.init(stringLiteral:) | +| testPathInjection.swift:369:68:369:68 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:370:25:370:25 | remoteUrl | semmle.label | remoteUrl | +| testPathInjection.swift:371:26:371:26 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:375:28:375:28 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:377:32:377:32 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:379:33:379:33 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:381:40:381:40 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:383:38:383:38 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:385:38:385:38 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:387:38:387:38 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:389:38:389:38 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:395:35:395:35 | remoteUrl | semmle.label | remoteUrl | +| testPathInjection.swift:397:40:397:40 | remoteUrl | semmle.label | remoteUrl | +| testPathInjection.swift:401:2:401:2 | [post] config | semmle.label | [post] config | +| testPathInjection.swift:401:19:401:19 | remoteUrl | semmle.label | remoteUrl | +| testPathInjection.swift:403:2:403:2 | [post] config | semmle.label | [post] config | +| testPathInjection.swift:403:24:403:24 | remoteUrl | semmle.label | remoteUrl | +| testPathInjection.swift:409:22:409:87 | call to Data.init(contentsOf:options:) | semmle.label | call to Data.init(contentsOf:options:) | +| testPathInjection.swift:411:5:411:5 | remoteData | semmle.label | remoteData | +| testPathInjection.swift:411:30:411:30 | [post] buffer2 | semmle.label | [post] buffer2 | +| testPathInjection.swift:414:22:414:22 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:416:24:416:24 | buffer2 | semmle.label | buffer2 | +| testPathInjection.swift:418:25:418:25 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:427:49:427:49 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:429:25:429:25 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:433:24:433:78 | call to String.init(contentsOf:) | semmle.label | call to String.init(contentsOf:) | +| testPathInjection.swift:441:33:441:33 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:445:24:445:78 | call to String.init(contentsOf:) | semmle.label | call to String.init(contentsOf:) | +| testPathInjection.swift:450:28:450:66 | call to appendingPathComponent(_:) | semmle.label | call to appendingPathComponent(_:) | +| testPathInjection.swift:450:54:450:54 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:451:28:451:66 | call to appendingPathComponent(_:) | semmle.label | call to appendingPathComponent(_:) | +| testPathInjection.swift:451:28:451:93 | call to appendingPathComponent(_:) | semmle.label | call to appendingPathComponent(_:) | +| testPathInjection.swift:451:54:451:54 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:452:5:452:5 | [post] u1 | semmle.label | [post] u1 | +| testPathInjection.swift:452:28:452:28 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:453:28:453:28 | u1 | semmle.label | u1 | +| testPathInjection.swift:455:14:455:40 | call to URL.init(filePath:directoryHint:relativeTo:) | semmle.label | call to URL.init(filePath:directoryHint:relativeTo:) | +| testPathInjection.swift:455:28:455:28 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:455:28:455:28 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:456:28:456:28 | u2 | semmle.label | u2 | +| testPathInjection.swift:461:24:461:62 | call to appendingPathComponent(_:) | semmle.label | call to appendingPathComponent(_:) | +| testPathInjection.swift:461:24:461:63 | ...! | semmle.label | ...! | +| testPathInjection.swift:461:50:461:50 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:463:14:463:40 | call to NSURL.init(string:) [some:0] | semmle.label | call to NSURL.init(string:) [some:0] | +| testPathInjection.swift:463:14:463:41 | ...! | semmle.label | ...! | +| testPathInjection.swift:463:28:463:28 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:464:24:464:38 | ...! | semmle.label | ...! | +| testPathInjection.swift:465:24:465:24 | u4 | semmle.label | u4 | +| testPathInjection.swift:465:24:465:52 | call to appendingPathComponent(_:) | semmle.label | call to appendingPathComponent(_:) | +| testPathInjection.swift:465:24:465:53 | ...! | semmle.label | ...! | +| testPathInjection.swift:467:32:467:32 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:468:38:468:38 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:469:45:469:45 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:472:5:472:5 | [post] s1 [pointee] | semmle.label | [post] s1 [pointee] | +| testPathInjection.swift:472:18:472:18 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:473:32:473:32 | s1 [pointee] | semmle.label | s1 [pointee] | +| testPathInjection.swift:473:32:473:35 | .pointee | semmle.label | .pointee | +| testPathInjection.swift:480:9:480:9 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:480:41:480:41 | [post] s3 [Collection element] | semmle.label | [post] s3 [Collection element] | +| testPathInjection.swift:482:32:482:32 | s3 [Collection element] | semmle.label | s3 [Collection element] | +| testPathInjection.swift:482:32:482:36 | ...[...] | semmle.label | ...[...] | +| testPathInjection.swift:484:35:484:35 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:485:41:485:41 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:505:24:505:78 | call to String.init(contentsOf:) | semmle.label | call to String.init(contentsOf:) | +| testPathInjection.swift:507:25:507:25 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:508:17:508:17 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:509:41:509:41 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:511:38:511:38 | remoteString | semmle.label | remoteString | +| testPathInjection.swift:513:22:513:22 | remoteString | semmle.label | remoteString | +subpaths +| testPathInjection.swift:401:19:401:19 | remoteUrl | testPathInjection.swift:248:7:248:7 | value | testPathInjection.swift:248:7:248:7 | self [Return] [fileURL] | testPathInjection.swift:401:2:401:2 | [post] config | +| testPathInjection.swift:403:24:403:24 | remoteUrl | testPathInjection.swift:249:13:249:13 | value | testPathInjection.swift:249:13:249:13 | self [Return] [seedFilePath] | testPathInjection.swift:403:2:403:2 | [post] config | diff --git a/swift/ql/test/query-tests/Security/CWE-022/PathInjection/PathInjectionTest.ql b/swift/ql/test/query-tests/Security/CWE-022/PathInjection/PathInjectionTest.ql deleted file mode 100644 index a32f9c56ee9..00000000000 --- a/swift/ql/test/query-tests/Security/CWE-022/PathInjection/PathInjectionTest.ql +++ /dev/null @@ -1,22 +0,0 @@ -import swift -import codeql.swift.dataflow.DataFlow -import codeql.swift.dataflow.FlowSources -import codeql.swift.security.PathInjectionQuery -import utils.test.InlineExpectationsTest - -module PathInjectionTest implements TestSig { - string getARelevantTag() { result = "hasPathInjection" } - - predicate hasActualResult(Location location, string element, string tag, string value) { - exists(DataFlow::Node source, DataFlow::Node sink | - PathInjectionFlow::flow(source, sink) and - location = sink.getLocation() and - element = sink.toString() and - tag = "hasPathInjection" and - location.getFile().getName() != "" and - value = source.asExpr().getLocation().getStartLine().toString() - ) - } -} - -import MakeTest diff --git a/swift/ql/test/query-tests/Security/CWE-022/PathInjection/PathInjectionTest.qlref b/swift/ql/test/query-tests/Security/CWE-022/PathInjection/PathInjectionTest.qlref new file mode 100644 index 00000000000..6269075fd96 --- /dev/null +++ b/swift/ql/test/query-tests/Security/CWE-022/PathInjection/PathInjectionTest.qlref @@ -0,0 +1,3 @@ +query: queries/Security/CWE-022/PathInjection.ql +postprocess: + - utils/test/InlineExpectationsTestQuery.ql diff --git a/swift/ql/test/query-tests/Security/CWE-022/PathInjection/testPathInjection.swift b/swift/ql/test/query-tests/Security/CWE-022/PathInjection/testPathInjection.swift index 2d9b6d88c39..c7c26085225 100644 --- a/swift/ql/test/query-tests/Security/CWE-022/PathInjection/testPathInjection.swift +++ b/swift/ql/test/query-tests/Security/CWE-022/PathInjection/testPathInjection.swift @@ -286,151 +286,151 @@ class Connection { // --- tests --- func test(buffer1: UnsafeMutablePointer, buffer2: UnsafeMutablePointer) { - let remoteString = String(contentsOf: URL(string: "http://example.com/")!) + let remoteString = String(contentsOf: URL(string: "http://example.com/")!) // $ Source let remoteUrl = URL(string: remoteString)! let remoteNsUrl = NSURL(string: remoteString)! let safeUrl = URL(string: "")! let safeNsUrl = NSURL(string: "")! - Data("").write(to: remoteUrl, options: []) // $ hasPathInjection=289 + Data("").write(to: remoteUrl, options: []) // $ Alert let nsData = NSData() - let _ = nsData.write(to: remoteUrl, atomically: false) // $ hasPathInjection=289 - nsData.write(to: remoteUrl, options: []) // $ hasPathInjection=289 - let _ = nsData.write(toFile: remoteString, atomically: false) // $ hasPathInjection=289 - nsData.write(toFile: remoteString, options: []) // $ hasPathInjection=289 + let _ = nsData.write(to: remoteUrl, atomically: false) // $ Alert + nsData.write(to: remoteUrl, options: []) // $ Alert + let _ = nsData.write(toFile: remoteString, atomically: false) // $ Alert + nsData.write(toFile: remoteString, options: []) // $ Alert let fm = FileManager() - let _ = fm.contentsOfDirectory(at: remoteUrl, includingPropertiesForKeys: [], options: []) // $ hasPathInjection=289 - let _ = fm.contentsOfDirectory(atPath: remoteString) // $ hasPathInjection=289 - let _ = fm.enumerator(at: remoteUrl, includingPropertiesForKeys: [], options: [], errorHandler: nil) // $ hasPathInjection=289 - let _ = fm.enumerator(atPath: remoteString) // $ hasPathInjection=289 - let _ = fm.subpathsOfDirectory(atPath: remoteString) // $ hasPathInjection=289 - let _ = fm.subpaths(atPath: remoteString) // $ hasPathInjection=289 - fm.createDirectory(at: remoteUrl, withIntermediateDirectories: false, attributes: [:]) // $ hasPathInjection=289 - let _ = fm.createDirectory(atPath: remoteString, attributes: [:]) // $ hasPathInjection=289 - let _ = fm.createFile(atPath: remoteString, contents: nil, attributes: [:]) // $ hasPathInjection=289 - fm.removeItem(at: remoteUrl) // $ hasPathInjection=289 - fm.removeItem(atPath: remoteString) // $ hasPathInjection=289 - fm.trashItem(at: remoteUrl, resultingItemURL: AutoreleasingUnsafeMutablePointer()) // $ hasPathInjection=289 - let _ = fm.replaceItemAt(remoteUrl, withItemAt: safeUrl, backupItemName: nil, options: []) // $ hasPathInjection=289 - let _ = fm.replaceItemAt(safeUrl, withItemAt: remoteUrl, backupItemName: nil, options: []) // $ hasPathInjection=289 - fm.replaceItem(at: remoteUrl, withItemAt: safeUrl, backupItemName: nil, options: [], resultingItemURL: AutoreleasingUnsafeMutablePointer()) // $ hasPathInjection=289 - fm.replaceItem(at: safeUrl, withItemAt: remoteUrl, backupItemName: nil, options: [], resultingItemURL: AutoreleasingUnsafeMutablePointer()) // $ hasPathInjection=289 - fm.copyItem(at: remoteUrl, to: safeUrl) // $ hasPathInjection=289 - fm.copyItem(at: safeUrl, to: remoteUrl) // $ hasPathInjection=289 - fm.copyItem(atPath: remoteString, toPath: "") // $ hasPathInjection=289 - fm.copyItem(atPath: "", toPath: remoteString) // $ hasPathInjection=289 - fm.moveItem(at: remoteUrl, to: safeUrl) // $ hasPathInjection=289 - fm.moveItem(at: safeUrl, to: remoteUrl) // $ hasPathInjection=289 - fm.moveItem(atPath: remoteString, toPath: "") // $ hasPathInjection=289 - fm.moveItem(atPath: "", toPath: remoteString) // $ hasPathInjection=289 - fm.createSymbolicLink(at: remoteUrl, withDestinationURL: safeUrl) // $ hasPathInjection=289 - fm.createSymbolicLink(at: safeUrl, withDestinationURL: remoteUrl) // $ hasPathInjection=289 - fm.createSymbolicLink(atPath: remoteString, withDestinationPath: "") // $ hasPathInjection=289 - fm.createSymbolicLink(atPath: "", withDestinationPath: remoteString) // $ hasPathInjection=289 - fm.linkItem(at: remoteUrl, to: safeUrl) // $ hasPathInjection=289 - fm.linkItem(at: safeUrl, to: remoteUrl) // $ hasPathInjection=289 - fm.linkItem(atPath: remoteString, toPath: "") // $ hasPathInjection=289 - fm.linkItem(atPath: "", toPath: remoteString) // $ hasPathInjection=289 - let _ = fm.destinationOfSymbolicLink(atPath: remoteString) // $ hasPathInjection=289 - let _ = fm.fileExists(atPath: remoteString) // $ hasPathInjection=289 - let _ = fm.fileExists(atPath: remoteString, isDirectory: UnsafeMutablePointer.init(bitPattern: 0)) // $ hasPathInjection=289 - fm.setAttributes([:], ofItemAtPath: remoteString) // $ hasPathInjection=289 - let _ = fm.contents(atPath: remoteString) // $ hasPathInjection=289 - let _ = fm.contentsEqual(atPath: remoteString, andPath: "") // $ hasPathInjection=289 - let _ = fm.contentsEqual(atPath: "", andPath: remoteString) // $ hasPathInjection=289 - let _ = fm.changeCurrentDirectoryPath(remoteString) // $ hasPathInjection=289 - let _ = fm.unmountVolume(at: remoteUrl, options: [], completionHandler: { _ in }) // $ hasPathInjection=289 + let _ = fm.contentsOfDirectory(at: remoteUrl, includingPropertiesForKeys: [], options: []) // $ Alert + let _ = fm.contentsOfDirectory(atPath: remoteString) // $ Alert + let _ = fm.enumerator(at: remoteUrl, includingPropertiesForKeys: [], options: [], errorHandler: nil) // $ Alert + let _ = fm.enumerator(atPath: remoteString) // $ Alert + let _ = fm.subpathsOfDirectory(atPath: remoteString) // $ Alert + let _ = fm.subpaths(atPath: remoteString) // $ Alert + fm.createDirectory(at: remoteUrl, withIntermediateDirectories: false, attributes: [:]) // $ Alert + let _ = fm.createDirectory(atPath: remoteString, attributes: [:]) // $ Alert + let _ = fm.createFile(atPath: remoteString, contents: nil, attributes: [:]) // $ Alert + fm.removeItem(at: remoteUrl) // $ Alert + fm.removeItem(atPath: remoteString) // $ Alert + fm.trashItem(at: remoteUrl, resultingItemURL: AutoreleasingUnsafeMutablePointer()) // $ Alert + let _ = fm.replaceItemAt(remoteUrl, withItemAt: safeUrl, backupItemName: nil, options: []) // $ Alert + let _ = fm.replaceItemAt(safeUrl, withItemAt: remoteUrl, backupItemName: nil, options: []) // $ Alert + fm.replaceItem(at: remoteUrl, withItemAt: safeUrl, backupItemName: nil, options: [], resultingItemURL: AutoreleasingUnsafeMutablePointer()) // $ Alert + fm.replaceItem(at: safeUrl, withItemAt: remoteUrl, backupItemName: nil, options: [], resultingItemURL: AutoreleasingUnsafeMutablePointer()) // $ Alert + fm.copyItem(at: remoteUrl, to: safeUrl) // $ Alert + fm.copyItem(at: safeUrl, to: remoteUrl) // $ Alert + fm.copyItem(atPath: remoteString, toPath: "") // $ Alert + fm.copyItem(atPath: "", toPath: remoteString) // $ Alert + fm.moveItem(at: remoteUrl, to: safeUrl) // $ Alert + fm.moveItem(at: safeUrl, to: remoteUrl) // $ Alert + fm.moveItem(atPath: remoteString, toPath: "") // $ Alert + fm.moveItem(atPath: "", toPath: remoteString) // $ Alert + fm.createSymbolicLink(at: remoteUrl, withDestinationURL: safeUrl) // $ Alert + fm.createSymbolicLink(at: safeUrl, withDestinationURL: remoteUrl) // $ Alert + fm.createSymbolicLink(atPath: remoteString, withDestinationPath: "") // $ Alert + fm.createSymbolicLink(atPath: "", withDestinationPath: remoteString) // $ Alert + fm.linkItem(at: remoteUrl, to: safeUrl) // $ Alert + fm.linkItem(at: safeUrl, to: remoteUrl) // $ Alert + fm.linkItem(atPath: remoteString, toPath: "") // $ Alert + fm.linkItem(atPath: "", toPath: remoteString) // $ Alert + let _ = fm.destinationOfSymbolicLink(atPath: remoteString) // $ Alert + let _ = fm.fileExists(atPath: remoteString) // $ Alert + let _ = fm.fileExists(atPath: remoteString, isDirectory: UnsafeMutablePointer.init(bitPattern: 0)) // $ Alert + fm.setAttributes([:], ofItemAtPath: remoteString) // $ Alert + let _ = fm.contents(atPath: remoteString) // $ Alert + let _ = fm.contentsEqual(atPath: remoteString, andPath: "") // $ Alert + let _ = fm.contentsEqual(atPath: "", andPath: remoteString) // $ Alert + let _ = fm.changeCurrentDirectoryPath(remoteString) // $ Alert + let _ = fm.unmountVolume(at: remoteUrl, options: [], completionHandler: { _ in }) // $ Alert // Deprecated methods - let _ = fm.changeFileAttributes([:], atPath: remoteString) // $ hasPathInjection=289 - let _ = fm.directoryContents(atPath: remoteString) // $ hasPathInjection=289 - let _ = fm.createDirectory(atPath: remoteString, attributes: [:]) // $ hasPathInjection=289 - let _ = fm.createSymbolicLink(atPath: remoteString, pathContent: "") // $ hasPathInjection=289 - let _ = fm.createSymbolicLink(atPath: "", pathContent: remoteString) // $ hasPathInjection=289 - let _ = fm.pathContentOfSymbolicLink(atPath: remoteString) // $ hasPathInjection=289 - let _ = fm.replaceItemAtURL(originalItemURL: remoteNsUrl, withItemAtURL: safeNsUrl, backupItemName: nil, options: []) // $ hasPathInjection=289 - let _ = fm.replaceItemAtURL(originalItemURL: safeNsUrl, withItemAtURL: remoteNsUrl, backupItemName: nil, options: []) // $ hasPathInjection=289 + let _ = fm.changeFileAttributes([:], atPath: remoteString) // $ Alert + let _ = fm.directoryContents(atPath: remoteString) // $ Alert + let _ = fm.createDirectory(atPath: remoteString, attributes: [:]) // $ Alert + let _ = fm.createSymbolicLink(atPath: remoteString, pathContent: "") // $ Alert + let _ = fm.createSymbolicLink(atPath: "", pathContent: remoteString) // $ Alert + let _ = fm.pathContentOfSymbolicLink(atPath: remoteString) // $ Alert + let _ = fm.replaceItemAtURL(originalItemURL: remoteNsUrl, withItemAtURL: safeNsUrl, backupItemName: nil, options: []) // $ Alert + let _ = fm.replaceItemAtURL(originalItemURL: safeNsUrl, withItemAtURL: remoteNsUrl, backupItemName: nil, options: []) // $ Alert var encoding = String.Encoding.utf8 - let _ = try! String(contentsOfFile: remoteString) // $ hasPathInjection=289 - let _ = try! String(contentsOfFile: remoteString, encoding: String.Encoding.utf8) // $ hasPathInjection=289 - let _ = try! String(contentsOfFile: remoteString, usedEncoding: &encoding) // $ hasPathInjection=289 + let _ = try! String(contentsOfFile: remoteString) // $ Alert + let _ = try! String(contentsOfFile: remoteString, encoding: String.Encoding.utf8) // $ Alert + let _ = try! String(contentsOfFile: remoteString, usedEncoding: &encoding) // $ Alert - let _ = try! NSString(contentsOfFile: remoteString, encoding: 0) // $ hasPathInjection=289 - let _ = try! NSString(contentsOfFile: remoteString, usedEncoding: nil) // $ hasPathInjection=289 - NSString().write(to: remoteUrl, atomically: true, encoding: 0) // $ hasPathInjection=289 - NSString().write(toFile: remoteString, atomically: true, encoding: 0) // $ hasPathInjection=289 + let _ = try! NSString(contentsOfFile: remoteString, encoding: 0) // $ Alert + let _ = try! NSString(contentsOfFile: remoteString, usedEncoding: nil) // $ Alert + NSString().write(to: remoteUrl, atomically: true, encoding: 0) // $ Alert + NSString().write(toFile: remoteString, atomically: true, encoding: 0) // $ Alert - let _ = NSKeyedUnarchiver().unarchiveObject(withFile: remoteString) // $ hasPathInjection=289 - let _ = ArchiveByteStream.fileStream(fd: remoteString as! FileDescriptor, automaticClose: true) // $ hasPathInjection=289 - ArchiveByteStream.withFileStream(fd: remoteString as! FileDescriptor, automaticClose: true) { _ in } // $ hasPathInjection=289 - let _ = ArchiveByteStream.fileStream(path: FilePath(stringLiteral: remoteString), mode: .readOnly, options: .append, permissions: .ownerRead) // $ hasPathInjection=289 - ArchiveByteStream.withFileStream(path: FilePath(stringLiteral: remoteString), mode: .readOnly, options: .append, permissions: .ownerRead) { _ in } // $ hasPathInjection=289 - let _ = Bundle(url: remoteUrl) // $ hasPathInjection=289 - let _ = Bundle(path: remoteString) // $ hasPathInjection=289 + let _ = NSKeyedUnarchiver().unarchiveObject(withFile: remoteString) // $ Alert + let _ = ArchiveByteStream.fileStream(fd: remoteString as! FileDescriptor, automaticClose: true) // $ Alert + ArchiveByteStream.withFileStream(fd: remoteString as! FileDescriptor, automaticClose: true) { _ in } // $ Alert + let _ = ArchiveByteStream.fileStream(path: FilePath(stringLiteral: remoteString), mode: .readOnly, options: .append, permissions: .ownerRead) // $ Alert + ArchiveByteStream.withFileStream(path: FilePath(stringLiteral: remoteString), mode: .readOnly, options: .append, permissions: .ownerRead) { _ in } // $ Alert + let _ = Bundle(url: remoteUrl) // $ Alert + let _ = Bundle(path: remoteString) // $ Alert // GRDB - let _ = Database(path: remoteString, description: "", configuration: Configuration()) // $ hasPathInjection=289 + let _ = Database(path: remoteString, description: "", configuration: Configuration()) // $ Alert let _ = Database(path: "", description: "", configuration: Configuration()) // Safe - let _ = DatabasePool(path: remoteString, configuration: Configuration()) // $ hasPathInjection=289 + let _ = DatabasePool(path: remoteString, configuration: Configuration()) // $ Alert let _ = DatabasePool(path: "", configuration: Configuration()) // Safe - let _ = DatabaseQueue(path: remoteString, configuration: Configuration()) // $ hasPathInjection=289 + let _ = DatabaseQueue(path: remoteString, configuration: Configuration()) // $ Alert let _ = DatabaseQueue(path: "", configuration: Configuration()) // Safe - let _ = DatabaseSnapshotPool(path: remoteString, configuration: Configuration()) // $ hasPathInjection=289 + let _ = DatabaseSnapshotPool(path: remoteString, configuration: Configuration()) // $ Alert let _ = DatabaseSnapshotPool(path: "", configuration: Configuration()) // Safe - let _ = SerializedDatabase(path: remoteString, defaultLabel: "") // $ hasPathInjection=289 + let _ = SerializedDatabase(path: remoteString, defaultLabel: "") // $ Alert let _ = SerializedDatabase(path: "", defaultLabel: "") // Safe - let _ = SerializedDatabase(path: remoteString, defaultLabel: "", purpose: nil) // $ hasPathInjection=289 + let _ = SerializedDatabase(path: remoteString, defaultLabel: "", purpose: nil) // $ Alert let _ = SerializedDatabase(path: "", defaultLabel: "", purpose: nil) // Safe - let _ = SerializedDatabase(path: remoteString, configuration: Configuration(), defaultLabel: "") // $ hasPathInjection=289 + let _ = SerializedDatabase(path: remoteString, configuration: Configuration(), defaultLabel: "") // $ Alert let _ = SerializedDatabase(path: "", configuration: Configuration(), defaultLabel: "") // Safe - let _ = SerializedDatabase(path: remoteString, configuration: Configuration(), defaultLabel: "", purpose: nil) // $ hasPathInjection=289 + let _ = SerializedDatabase(path: remoteString, configuration: Configuration(), defaultLabel: "", purpose: nil) // $ Alert let _ = SerializedDatabase(path: "", configuration: Configuration(), defaultLabel: "", purpose: nil) // Safe // Realm _ = Realm.Configuration(fileURL: safeUrl) // GOOD - _ = Realm.Configuration(fileURL: remoteUrl) // $ hasPathInjection=289 + _ = Realm.Configuration(fileURL: remoteUrl) // $ Alert _ = Realm.Configuration(seedFilePath: safeUrl) // GOOD - _ = Realm.Configuration(seedFilePath: remoteUrl) // $ hasPathInjection=289 + _ = Realm.Configuration(seedFilePath: remoteUrl) // $ Alert var config = Realm.Configuration() // GOOD config.fileURL = safeUrl // GOOD - config.fileURL = remoteUrl // $ hasPathInjection=289 + config.fileURL = remoteUrl // $ Alert config.seedFilePath = safeUrl // GOOD - config.seedFilePath = remoteUrl // $ hasPathInjection=289 + config.seedFilePath = remoteUrl // $ Alert // sqlite3 var db: OpaquePointer? let localData = Data(0) - let remoteData = Data(contentsOf: URL(string: "http://example.com/")!, options: []) + let remoteData = Data(contentsOf: URL(string: "http://example.com/")!, options: []) // $ Source localData.copyBytes(to: buffer1, count: localData.count) remoteData.copyBytes(to: buffer2, count: remoteData.count) _ = sqlite3_open("myFile.sqlite3", &db) // GOOD - _ = sqlite3_open(remoteString, &db) // $ hasPathInjection=289 + _ = sqlite3_open(remoteString, &db) // $ Alert _ = sqlite3_open16(buffer1, &db) // GOOD - _ = sqlite3_open16(buffer2, &db) // $ hasPathInjection=409 + _ = sqlite3_open16(buffer2, &db) // $ Alert _ = sqlite3_open_v2("myFile.sqlite3", &db, 0, nil) // GOOD - _ = sqlite3_open_v2(remoteString, &db, 0, nil) // $ hasPathInjection=289 + _ = sqlite3_open_v2(remoteString, &db, 0, nil) // $ Alert sqlite3_temp_directory = UnsafeMutablePointer(mutating: NSString(string: "myFile.sqlite3").utf8String) // GOOD - sqlite3_temp_directory = UnsafeMutablePointer(mutating: NSString(string: remoteString).utf8String) // $ MISSING: hasPathInjection=289 + sqlite3_temp_directory = UnsafeMutablePointer(mutating: NSString(string: remoteString).utf8String) // $ MISSING: Alert // SQLite.swift try! _ = Connection() try! _ = Connection(Connection.Location.uri("myFile.sqlite3")) // GOOD - try! _ = Connection(Connection.Location.uri(remoteString)) // $ hasPathInjection=289 + try! _ = Connection(Connection.Location.uri(remoteString)) // $ Alert try! _ = Connection("myFile.sqlite3") // GOOD - try! _ = Connection(remoteString) // $ hasPathInjection=289 + try! _ = Connection(remoteString) // $ Alert } func testBarriers() { - let remoteString = String(contentsOf: URL(string: "http://example.com/")!) + let remoteString = String(contentsOf: URL(string: "http://example.com/")!) // $ Source let fm = FileManager() @@ -438,51 +438,51 @@ func testBarriers() { if (filePath.lexicallyNormalized().starts(with: "/safe")) { let _ = fm.contents(atPath: remoteString) // Safe } - let _ = fm.contents(atPath: remoteString) // $ hasPathInjection=433 + let _ = fm.contents(atPath: remoteString) // $ Alert } func testPathInjection2(s1: UnsafeMutablePointer, s2: UnsafeMutablePointer, s3: UnsafeMutablePointer, fm: FileManager) throws { - let remoteString = String(contentsOf: URL(string: "http://example.com/")!) + let remoteString = String(contentsOf: URL(string: "http://example.com/")!) // $ Source var u1 = URL(filePath: "") _ = NSData(contentsOf: u1) _ = NSData(contentsOf: u1.appendingPathComponent("")) - _ = NSData(contentsOf: u1.appendingPathComponent(remoteString)) // $ hasPathInjection=445 - _ = NSData(contentsOf: u1.appendingPathComponent(remoteString).appendingPathComponent("")) // $ hasPathInjection=445 + _ = NSData(contentsOf: u1.appendingPathComponent(remoteString)) // $ Alert + _ = NSData(contentsOf: u1.appendingPathComponent(remoteString).appendingPathComponent("")) // $ Alert u1.appendPathComponent(remoteString) - _ = NSData(contentsOf: u1) // $ hasPathInjection=445 + _ = NSData(contentsOf: u1) // $ Alert - let u2 = URL(filePath: remoteString) // $ hasPathInjection=445 - _ = NSData(contentsOf: u2) // $ hasPathInjection=445 + let u2 = URL(filePath: remoteString) // $ Alert + _ = NSData(contentsOf: u2) // $ Alert let u3 = NSURL(string: "")! Data("").write(to: u3.filePathURL!, options: []) Data("").write(to: u3.appendingPathComponent("")!, options: []) - Data("").write(to: u3.appendingPathComponent(remoteString)!, options: []) // $ hasPathInjection=445 + Data("").write(to: u3.appendingPathComponent(remoteString)!, options: []) // $ Alert let u4 = NSURL(string: remoteString)! - Data("").write(to: u4.filePathURL!, options: []) // $ hasPathInjection=445 - Data("").write(to: u4.appendingPathComponent("")!, options: []) // $ hasPathInjection=445 + Data("").write(to: u4.filePathURL!, options: []) // $ Alert + Data("").write(to: u4.appendingPathComponent("")!, options: []) // $ Alert - _ = NSData(contentsOfFile: remoteString)! // $ hasPathInjection=445 - _ = NSData(contentsOfMappedFile: remoteString)! // $ hasPathInjection=445 - _ = NSData.dataWithContentsOfMappedFile(remoteString)! // $ hasPathInjection=445 + _ = NSData(contentsOfFile: remoteString)! // $ Alert + _ = NSData(contentsOfMappedFile: remoteString)! // $ Alert + _ = NSData.dataWithContentsOfMappedFile(remoteString)! // $ Alert _ = NSData().write(toFile: s1.pointee, atomically: true) s1.pointee = remoteString - _ = NSData().write(toFile: s1.pointee, atomically: true) // $ hasPathInjection=445 - _ = NSData().write(toFile: s1[0], atomically: true) // $ MISSING: hasPathInjection=445 + _ = NSData().write(toFile: s1.pointee, atomically: true) // $ Alert + _ = NSData().write(toFile: s1[0], atomically: true) // $ MISSING: Alert _ = "".completePath(into: s2, caseSensitive: false, matchesInto: nil, filterTypes: nil) _ = NSData().write(toFile: s2.pointee, atomically: true) _ = NSData().write(toFile: s2[0], atomically: true) _ = remoteString.completePath(into: s3, caseSensitive: false, matchesInto: nil, filterTypes: nil) - _ = NSData().write(toFile: s3.pointee, atomically: true) // $ MISSING: hasPathInjection=445 - _ = NSData().write(toFile: s3[0], atomically: true) // $ hasPathInjection=445 + _ = NSData().write(toFile: s3.pointee, atomically: true) // $ MISSING: Alert + _ = NSData().write(toFile: s3[0], atomically: true) // $ Alert - _ = fm.fileAttributes(atPath: remoteString, traverseLink: true) // $ hasPathInjection=445 - _ = try fm.attributesOfItem(atPath: remoteString) // $ hasPathInjection=445 + _ = fm.fileAttributes(atPath: remoteString, traverseLink: true) // $ Alert + _ = try fm.attributesOfItem(atPath: remoteString) // $ Alert } // --- @@ -502,18 +502,18 @@ class MyFile { } func testPathInjectionHeuristics() { - let remoteString = String(contentsOf: URL(string: "http://example.com/")!) + let remoteString = String(contentsOf: URL(string: "http://example.com/")!) // $ Source - myOpenFile1(atPath: remoteString) // $ hasPathInjection=505 - myOpenFile2(remoteString) // $ hasPathInjection=505 - myFindFiles(ofType: 0, inDirectory: remoteString) // $ hasPathInjection=505 + myOpenFile1(atPath: remoteString) // $ Alert + myOpenFile2(remoteString) // $ Alert + myFindFiles(ofType: 0, inDirectory: remoteString) // $ Alert - let mc = MyClass(contentsOfFile: remoteString) // $ hasPathInjection=505 + let mc = MyClass(contentsOfFile: remoteString) // $ Alert mc.doSomething(keyPath: remoteString) // good - not a path - mc.write(toFile: remoteString) // $ hasPathInjection=505 + mc.write(toFile: remoteString) // $ Alert let mf1 = MyFile(path: "") - let mf2 = MyFile(path: remoteString) // $ MISSING: hasPathInjection= + let mf2 = MyFile(path: remoteString) // $ MISSING: Alert _ = NSSortDescriptor(key: remoteString, ascending: true) // good - not a path _ = NSSortDescriptor(keyPath: remoteString as! KeyPath, ascending: true) // good - not a path diff --git a/swift/ql/test/query-tests/Security/CWE-312/CleartextLoggingTest.expected b/swift/ql/test/query-tests/Security/CWE-312/CleartextLoggingTest.expected index e69de29bb2d..397e4d8a05b 100644 --- a/swift/ql/test/query-tests/Security/CWE-312/CleartextLoggingTest.expected +++ b/swift/ql/test/query-tests/Security/CWE-312/CleartextLoggingTest.expected @@ -0,0 +1,297 @@ +#select +| cleartextLoggingTest.swift:167:11:167:11 | [...] | cleartextLoggingTest.swift:167:11:167:11 | password | cleartextLoggingTest.swift:167:11:167:11 | [...] | This operation writes '[...]' to a log file. It may contain unencrypted sensitive data from $@. | cleartextLoggingTest.swift:167:11:167:11 | password | password | +| cleartextLoggingTest.swift:168:11:168:11 | [...] | cleartextLoggingTest.swift:168:11:168:11 | password | cleartextLoggingTest.swift:168:11:168:11 | [...] | This operation writes '[...]' to a log file. It may contain unencrypted sensitive data from $@. | cleartextLoggingTest.swift:168:11:168:11 | password | password | +| cleartextLoggingTest.swift:169:26:169:26 | password | cleartextLoggingTest.swift:169:26:169:26 | password | cleartextLoggingTest.swift:169:26:169:26 | password | This operation writes 'password' to a log file. It may contain unencrypted sensitive data from $@. | cleartextLoggingTest.swift:169:26:169:26 | password | password | +| cleartextLoggingTest.swift:170:11:170:11 | [...] | cleartextLoggingTest.swift:170:11:170:11 | password | cleartextLoggingTest.swift:170:11:170:11 | [...] | This operation writes '[...]' to a log file. It may contain unencrypted sensitive data from $@. | cleartextLoggingTest.swift:170:11:170:11 | password | password | +| cleartextLoggingTest.swift:171:26:171:26 | password | cleartextLoggingTest.swift:171:26:171:26 | password | cleartextLoggingTest.swift:171:26:171:26 | password | This operation writes 'password' to a log file. It may contain unencrypted sensitive data from $@. | cleartextLoggingTest.swift:171:26:171:26 | password | password | +| cleartextLoggingTest.swift:172:42:172:42 | password | cleartextLoggingTest.swift:172:42:172:42 | password | cleartextLoggingTest.swift:172:42:172:42 | password | This operation writes 'password' to a log file. It may contain unencrypted sensitive data from $@. | cleartextLoggingTest.swift:172:42:172:42 | password | password | +| cleartextLoggingTest.swift:175:16:175:16 | [...] | cleartextLoggingTest.swift:175:16:175:16 | password | cleartextLoggingTest.swift:175:16:175:16 | [...] | This operation writes '[...]' to a log file. It may contain unencrypted sensitive data from $@. | cleartextLoggingTest.swift:175:16:175:16 | password | password | +| cleartextLoggingTest.swift:177:10:177:10 | password | cleartextLoggingTest.swift:177:10:177:10 | password | cleartextLoggingTest.swift:177:10:177:10 | password | This operation writes 'password' to a log file. It may contain unencrypted sensitive data from $@. | cleartextLoggingTest.swift:177:10:177:10 | password | password | +| cleartextLoggingTest.swift:179:11:179:11 | password | cleartextLoggingTest.swift:179:11:179:11 | password | cleartextLoggingTest.swift:179:11:179:11 | password | This operation writes 'password' to a log file. It may contain unencrypted sensitive data from $@. | cleartextLoggingTest.swift:179:11:179:11 | password | password | +| cleartextLoggingTest.swift:180:17:180:17 | [...] | cleartextLoggingTest.swift:180:17:180:17 | password | cleartextLoggingTest.swift:180:17:180:17 | [...] | This operation writes '[...]' to a log file. It may contain unencrypted sensitive data from $@. | cleartextLoggingTest.swift:180:17:180:17 | password | password | +| cleartextLoggingTest.swift:181:20:181:24 | [...] | cleartextLoggingTest.swift:181:24:181:24 | password | cleartextLoggingTest.swift:181:20:181:24 | [...] | This operation writes '[...]' to a log file. It may contain unencrypted sensitive data from $@. | cleartextLoggingTest.swift:181:24:181:24 | password | password | +| cleartextLoggingTest.swift:182:11:182:11 | "..." | cleartextLoggingTest.swift:182:14:182:14 | password | cleartextLoggingTest.swift:182:11:182:11 | "..." | This operation writes '"..."' to a log file. It may contain unencrypted sensitive data from $@. | cleartextLoggingTest.swift:182:14:182:14 | password | password | +| cleartextLoggingTest.swift:183:18:183:38 | call to getVaList(_:) | cleartextLoggingTest.swift:183:29:183:29 | password | cleartextLoggingTest.swift:183:18:183:38 | call to getVaList(_:) | This operation writes 'call to getVaList(_:)' to a log file. It may contain unencrypted sensitive data from $@. | cleartextLoggingTest.swift:183:29:183:29 | password | password | +| cleartextLoggingTest.swift:184:21:184:45 | call to getVaList(_:) | cleartextLoggingTest.swift:184:36:184:36 | password | cleartextLoggingTest.swift:184:21:184:45 | call to getVaList(_:) | This operation writes 'call to getVaList(_:)' to a log file. It may contain unencrypted sensitive data from $@. | cleartextLoggingTest.swift:184:36:184:36 | password | password | +| cleartextLoggingTest.swift:220:11:220:11 | passphrase | cleartextLoggingTest.swift:220:11:220:11 | passphrase | cleartextLoggingTest.swift:220:11:220:11 | passphrase | This operation writes 'passphrase' to a log file. It may contain unencrypted sensitive data from $@. | cleartextLoggingTest.swift:220:11:220:11 | passphrase | passphrase | +| cleartextLoggingTest.swift:221:11:221:11 | pass_phrase | cleartextLoggingTest.swift:221:11:221:11 | pass_phrase | cleartextLoggingTest.swift:221:11:221:11 | pass_phrase | This operation writes 'pass_phrase' to a log file. It may contain unencrypted sensitive data from $@. | cleartextLoggingTest.swift:221:11:221:11 | pass_phrase | pass_phrase | +| cleartextLoggingTest.swift:224:49:224:49 | [...] | cleartextLoggingTest.swift:224:49:224:49 | password | cleartextLoggingTest.swift:224:49:224:49 | [...] | This operation writes '[...]' to a log file. It may contain unencrypted sensitive data from $@. | cleartextLoggingTest.swift:224:49:224:49 | password | password | +| cleartextLoggingTest.swift:225:55:225:63 | [...] | cleartextLoggingTest.swift:225:63:225:63 | password | cleartextLoggingTest.swift:225:55:225:63 | [...] | This operation writes '[...]' to a log file. It may contain unencrypted sensitive data from $@. | cleartextLoggingTest.swift:225:63:225:63 | password | password | +| cleartextLoggingTest.swift:241:8:241:8 | x | cleartextLoggingTest.swift:240:24:240:24 | x | cleartextLoggingTest.swift:241:8:241:8 | x | This operation writes 'x' to a log file. It may contain unencrypted sensitive data from $@. | cleartextLoggingTest.swift:240:24:240:24 | x | x | +| cleartextLoggingTest.swift:244:8:244:8 | y | cleartextLoggingTest.swift:243:10:243:22 | call to getPassword() | cleartextLoggingTest.swift:244:8:244:8 | y | This operation writes 'y' to a log file. It may contain unencrypted sensitive data from $@. | cleartextLoggingTest.swift:243:10:243:22 | call to getPassword() | call to getPassword() | +| cleartextLoggingTest.swift:248:8:248:10 | .password | cleartextLoggingTest.swift:248:8:248:10 | .password | cleartextLoggingTest.swift:248:8:248:10 | .password | This operation writes '.password' to a log file. It may contain unencrypted sensitive data from $@. | cleartextLoggingTest.swift:248:8:248:10 | .password | .password | +| cleartextLoggingTest.swift:263:8:263:20 | .value | cleartextLoggingTest.swift:263:8:263:11 | .password | cleartextLoggingTest.swift:263:8:263:20 | .value | This operation writes '.value' to a log file. It may contain unencrypted sensitive data from $@. | cleartextLoggingTest.swift:263:8:263:11 | .password | .password | +| cleartextLoggingTest.swift:287:8:287:8 | [...] | cleartextLoggingTest.swift:286:8:286:8 | password | cleartextLoggingTest.swift:287:8:287:8 | [...] | This operation writes '[...]' to a log file. It may contain unencrypted sensitive data from $@. | cleartextLoggingTest.swift:286:8:286:8 | password | password | +| cleartextLoggingTest.swift:290:8:290:8 | [...] | cleartextLoggingTest.swift:289:18:289:18 | password | cleartextLoggingTest.swift:290:8:290:8 | [...] | This operation writes '[...]' to a log file. It may contain unencrypted sensitive data from $@. | cleartextLoggingTest.swift:289:18:289:18 | password | password | +| cleartextLoggingTest.swift:296:13:296:13 | [...] | cleartextLoggingTest.swift:295:13:295:13 | password | cleartextLoggingTest.swift:296:13:296:13 | [...] | This operation writes '[...]' to a log file. It may contain unencrypted sensitive data from $@. | cleartextLoggingTest.swift:295:13:295:13 | password | password | +| cleartextLoggingTest.swift:302:7:302:7 | myString7 | cleartextLoggingTest.swift:301:7:301:7 | password | cleartextLoggingTest.swift:302:7:302:7 | myString7 | This operation writes 'myString7' to a log file. It may contain unencrypted sensitive data from $@. | cleartextLoggingTest.swift:301:7:301:7 | password | password | +| cleartextLoggingTest.swift:308:8:308:8 | [...] | cleartextLoggingTest.swift:307:18:307:18 | password | cleartextLoggingTest.swift:308:8:308:8 | [...] | This operation writes '[...]' to a log file. It may contain unencrypted sensitive data from $@. | cleartextLoggingTest.swift:307:18:307:18 | password | password | +| cleartextLoggingTest.swift:313:8:313:8 | [...] | cleartextLoggingTest.swift:311:19:311:19 | password | cleartextLoggingTest.swift:313:8:313:8 | [...] | This operation writes '[...]' to a log file. It may contain unencrypted sensitive data from $@. | cleartextLoggingTest.swift:311:19:311:19 | password | password | +| cleartextLoggingTest.swift:319:8:319:8 | [...] | cleartextLoggingTest.swift:318:2:318:2 | password | cleartextLoggingTest.swift:319:8:319:8 | [...] | This operation writes '[...]' to a log file. It may contain unencrypted sensitive data from $@. | cleartextLoggingTest.swift:318:2:318:2 | password | password | +| cleartextLoggingTest.swift:334:17:334:17 | { ... } | cleartextLoggingTest.swift:334:17:334:17 | password | cleartextLoggingTest.swift:334:17:334:17 | { ... } | This operation writes '{ ... }' to a log file. It may contain unencrypted sensitive data from $@. | cleartextLoggingTest.swift:334:17:334:17 | password | password | +| cleartextLoggingTest.swift:336:20:336:20 | { ... } | cleartextLoggingTest.swift:336:20:336:20 | password | cleartextLoggingTest.swift:336:20:336:20 | { ... } | This operation writes '{ ... }' to a log file. It may contain unencrypted sensitive data from $@. | cleartextLoggingTest.swift:336:20:336:20 | password | password | +| cleartextLoggingTest.swift:338:23:338:23 | { ... } | cleartextLoggingTest.swift:338:23:338:23 | password | cleartextLoggingTest.swift:338:23:338:23 | { ... } | This operation writes '{ ... }' to a log file. It may contain unencrypted sensitive data from $@. | cleartextLoggingTest.swift:338:23:338:23 | password | password | +| cleartextLoggingTest.swift:340:23:340:23 | { ... } | cleartextLoggingTest.swift:340:23:340:23 | password | cleartextLoggingTest.swift:340:23:340:23 | { ... } | This operation writes '{ ... }' to a log file. It may contain unencrypted sensitive data from $@. | cleartextLoggingTest.swift:340:23:340:23 | password | password | +| cleartextLoggingTest.swift:342:14:342:14 | { ... } | cleartextLoggingTest.swift:342:14:342:14 | password | cleartextLoggingTest.swift:342:14:342:14 | { ... } | This operation writes '{ ... }' to a log file. It may contain unencrypted sensitive data from $@. | cleartextLoggingTest.swift:342:14:342:14 | password | password | +| cleartextLoggingTest.swift:347:69:347:69 | "..." | cleartextLoggingTest.swift:347:72:347:72 | passwordString | cleartextLoggingTest.swift:347:69:347:69 | "..." | This operation writes '"..."' to a log file. It may contain unencrypted sensitive data from $@. | cleartextLoggingTest.swift:347:72:347:72 | passwordString | passwordString | +| cleartextLoggingTest.swift:350:61:350:61 | "..." | cleartextLoggingTest.swift:350:64:350:64 | passwordString | cleartextLoggingTest.swift:350:61:350:61 | "..." | This operation writes '"..."' to a log file. It may contain unencrypted sensitive data from $@. | cleartextLoggingTest.swift:350:64:350:64 | passwordString | passwordString | +| cleartextLoggingTest.swift:351:92:351:118 | call to getVaList(_:) | cleartextLoggingTest.swift:351:103:351:103 | passwordString | cleartextLoggingTest.swift:351:92:351:118 | call to getVaList(_:) | This operation writes 'call to getVaList(_:)' to a log file. It may contain unencrypted sensitive data from $@. | cleartextLoggingTest.swift:351:103:351:103 | passwordString | passwordString | +| cleartextLoggingTest.swift:353:20:353:20 | "..." | cleartextLoggingTest.swift:353:23:353:23 | passwordString | cleartextLoggingTest.swift:353:20:353:20 | "..." | This operation writes '"..."' to a log file. It may contain unencrypted sensitive data from $@. | cleartextLoggingTest.swift:353:23:353:23 | passwordString | passwordString | +| cleartextLoggingTest.swift:354:40:354:40 | [...] | cleartextLoggingTest.swift:354:40:354:40 | passwordString | cleartextLoggingTest.swift:354:40:354:40 | [...] | This operation writes '[...]' to a log file. It may contain unencrypted sensitive data from $@. | cleartextLoggingTest.swift:354:40:354:40 | passwordString | passwordString | +| cleartextLoggingTest.swift:355:44:355:51 | [...] | cleartextLoggingTest.swift:355:51:355:51 | passwordString | cleartextLoggingTest.swift:355:44:355:51 | [...] | This operation writes '[...]' to a log file. It may contain unencrypted sensitive data from $@. | cleartextLoggingTest.swift:355:51:355:51 | passwordString | passwordString | +| cleartextLoggingTest.swift:356:17:356:17 | "..." | cleartextLoggingTest.swift:356:20:356:20 | passwordString | cleartextLoggingTest.swift:356:17:356:17 | "..." | This operation writes '"..."' to a log file. It may contain unencrypted sensitive data from $@. | cleartextLoggingTest.swift:356:20:356:20 | passwordString | passwordString | +| cleartextLoggingTest.swift:357:37:357:63 | call to getVaList(_:) | cleartextLoggingTest.swift:357:48:357:48 | passwordString | cleartextLoggingTest.swift:357:37:357:63 | call to getVaList(_:) | This operation writes 'call to getVaList(_:)' to a log file. It may contain unencrypted sensitive data from $@. | cleartextLoggingTest.swift:357:48:357:48 | passwordString | passwordString | +| cleartextLoggingTest.swift:358:23:358:23 | "..." | cleartextLoggingTest.swift:358:26:358:26 | passwordString | cleartextLoggingTest.swift:358:23:358:23 | "..." | This operation writes '"..."' to a log file. It may contain unencrypted sensitive data from $@. | cleartextLoggingTest.swift:358:26:358:26 | passwordString | passwordString | +| cleartextLoggingTest.swift:359:43:359:69 | call to getVaList(_:) | cleartextLoggingTest.swift:359:54:359:54 | passwordString | cleartextLoggingTest.swift:359:43:359:69 | call to getVaList(_:) | This operation writes 'call to getVaList(_:)' to a log file. It may contain unencrypted sensitive data from $@. | cleartextLoggingTest.swift:359:54:359:54 | passwordString | passwordString | +| cleartextLoggingTest.swift:365:18:365:18 | authKey | cleartextLoggingTest.swift:365:18:365:18 | authKey | cleartextLoggingTest.swift:365:18:365:18 | authKey | This operation writes 'authKey' to a log file. It may contain unencrypted sensitive data from $@. | cleartextLoggingTest.swift:365:18:365:18 | authKey | authKey | +| cleartextLoggingTest.swift:366:18:366:33 | call to String.init(_:) | cleartextLoggingTest.swift:366:25:366:25 | authKey2 | cleartextLoggingTest.swift:366:18:366:33 | call to String.init(_:) | This operation writes 'call to String.init(_:)' to a log file. It may contain unencrypted sensitive data from $@. | cleartextLoggingTest.swift:366:25:366:25 | authKey2 | authKey2 | +| cleartextLoggingTest.swift:369:16:369:40 | call to NSString.init(string:) | cleartextLoggingTest.swift:369:33:369:33 | authKey | cleartextLoggingTest.swift:369:16:369:40 | call to NSString.init(string:) | This operation writes 'call to NSString.init(string:)' to a log file. It may contain unencrypted sensitive data from $@. | cleartextLoggingTest.swift:369:33:369:33 | authKey | authKey | +| cleartextLoggingTest.swift:370:13:370:13 | authKey | cleartextLoggingTest.swift:370:13:370:13 | authKey | cleartextLoggingTest.swift:370:13:370:13 | authKey | This operation writes 'authKey' to a log file. It may contain unencrypted sensitive data from $@. | cleartextLoggingTest.swift:370:13:370:13 | authKey | authKey | +| cleartextLoggingTest.swift:371:24:371:24 | authKey | cleartextLoggingTest.swift:371:24:371:24 | authKey | cleartextLoggingTest.swift:371:24:371:24 | authKey | This operation writes 'authKey' to a log file. It may contain unencrypted sensitive data from $@. | cleartextLoggingTest.swift:371:24:371:24 | authKey | authKey | +| cleartextLoggingTest.swift:378:16:378:16 | msg | cleartextLoggingTest.swift:377:29:377:29 | authKey | cleartextLoggingTest.swift:378:16:378:16 | msg | This operation writes 'msg' to a log file. It may contain unencrypted sensitive data from $@. | cleartextLoggingTest.swift:377:29:377:29 | authKey | authKey | +| cleartextLoggingTest.swift:379:18:379:18 | msg | cleartextLoggingTest.swift:377:29:377:29 | authKey | cleartextLoggingTest.swift:379:18:379:18 | msg | This operation writes 'msg' to a log file. It may contain unencrypted sensitive data from $@. | cleartextLoggingTest.swift:377:29:377:29 | authKey | authKey | +| cleartextLoggingTest.swift:380:18:380:18 | msg | cleartextLoggingTest.swift:377:29:377:29 | authKey | cleartextLoggingTest.swift:380:18:380:18 | msg | This operation writes 'msg' to a log file. It may contain unencrypted sensitive data from $@. | cleartextLoggingTest.swift:377:29:377:29 | authKey | authKey | +| cleartextLoggingTest.swift:381:17:381:37 | call to NSString.init(string:) | cleartextLoggingTest.swift:377:29:377:29 | authKey | cleartextLoggingTest.swift:381:17:381:37 | call to NSString.init(string:) | This operation writes 'call to NSString.init(string:)' to a log file. It may contain unencrypted sensitive data from $@. | cleartextLoggingTest.swift:377:29:377:29 | authKey | authKey | +| cleartextLoggingTest.swift:382:19:382:19 | msg | cleartextLoggingTest.swift:377:29:377:29 | authKey | cleartextLoggingTest.swift:382:19:382:19 | msg | This operation writes 'msg' to a log file. It may contain unencrypted sensitive data from $@. | cleartextLoggingTest.swift:377:29:377:29 | authKey | authKey | +| cleartextLoggingTest.swift:383:20:383:20 | msg | cleartextLoggingTest.swift:377:29:377:29 | authKey | cleartextLoggingTest.swift:383:20:383:20 | msg | This operation writes 'msg' to a log file. It may contain unencrypted sensitive data from $@. | cleartextLoggingTest.swift:377:29:377:29 | authKey | authKey | +| cleartextLoggingTest.swift:384:18:384:18 | msg | cleartextLoggingTest.swift:377:29:377:29 | authKey | cleartextLoggingTest.swift:384:18:384:18 | msg | This operation writes 'msg' to a log file. It may contain unencrypted sensitive data from $@. | cleartextLoggingTest.swift:377:29:377:29 | authKey | authKey | +| cleartextLoggingTest.swift:385:21:385:21 | msg | cleartextLoggingTest.swift:377:29:377:29 | authKey | cleartextLoggingTest.swift:385:21:385:21 | msg | This operation writes 'msg' to a log file. It may contain unencrypted sensitive data from $@. | cleartextLoggingTest.swift:377:29:377:29 | authKey | authKey | +| cleartextLoggingTest.swift:386:18:386:18 | msg | cleartextLoggingTest.swift:377:29:377:29 | authKey | cleartextLoggingTest.swift:386:18:386:18 | msg | This operation writes 'msg' to a log file. It may contain unencrypted sensitive data from $@. | cleartextLoggingTest.swift:377:29:377:29 | authKey | authKey | +edges +| cleartextLoggingTest.swift:167:11:167:11 | [...] [Collection element] | cleartextLoggingTest.swift:167:11:167:11 | [...] | provenance | | +| cleartextLoggingTest.swift:167:11:167:11 | password | cleartextLoggingTest.swift:167:11:167:11 | [...] [Collection element] | provenance | | +| cleartextLoggingTest.swift:168:11:168:11 | [...] [Collection element] | cleartextLoggingTest.swift:168:11:168:11 | [...] | provenance | | +| cleartextLoggingTest.swift:168:11:168:11 | password | cleartextLoggingTest.swift:168:11:168:11 | [...] [Collection element] | provenance | | +| cleartextLoggingTest.swift:170:11:170:11 | [...] [Collection element] | cleartextLoggingTest.swift:170:11:170:11 | [...] | provenance | | +| cleartextLoggingTest.swift:170:11:170:11 | password | cleartextLoggingTest.swift:170:11:170:11 | [...] [Collection element] | provenance | | +| cleartextLoggingTest.swift:175:16:175:16 | [...] [Collection element] | cleartextLoggingTest.swift:175:16:175:16 | [...] | provenance | | +| cleartextLoggingTest.swift:175:16:175:16 | password | cleartextLoggingTest.swift:175:16:175:16 | [...] [Collection element] | provenance | | +| cleartextLoggingTest.swift:180:17:180:17 | [...] [Collection element] | cleartextLoggingTest.swift:180:17:180:17 | [...] | provenance | | +| cleartextLoggingTest.swift:180:17:180:17 | password | cleartextLoggingTest.swift:180:17:180:17 | [...] [Collection element] | provenance | | +| cleartextLoggingTest.swift:181:20:181:24 | [...] [Collection element] | cleartextLoggingTest.swift:181:20:181:24 | [...] | provenance | | +| cleartextLoggingTest.swift:181:24:181:24 | password | cleartextLoggingTest.swift:181:20:181:24 | [...] [Collection element] | provenance | | +| cleartextLoggingTest.swift:182:14:182:14 | password | cleartextLoggingTest.swift:182:11:182:11 | "..." | provenance | | +| cleartextLoggingTest.swift:183:28:183:37 | [...] [Collection element] | cleartextLoggingTest.swift:183:18:183:38 | call to getVaList(_:) | provenance | | +| cleartextLoggingTest.swift:183:29:183:29 | password | cleartextLoggingTest.swift:183:28:183:37 | [...] [Collection element] | provenance | | +| cleartextLoggingTest.swift:184:31:184:44 | [...] [Collection element] | cleartextLoggingTest.swift:184:21:184:45 | call to getVaList(_:) | provenance | | +| cleartextLoggingTest.swift:184:36:184:36 | password | cleartextLoggingTest.swift:184:31:184:44 | [...] [Collection element] | provenance | | +| cleartextLoggingTest.swift:224:49:224:49 | [...] [Collection element] | cleartextLoggingTest.swift:224:49:224:49 | [...] | provenance | | +| cleartextLoggingTest.swift:224:49:224:49 | password | cleartextLoggingTest.swift:224:49:224:49 | [...] [Collection element] | provenance | | +| cleartextLoggingTest.swift:225:55:225:63 | [...] [Collection element] | cleartextLoggingTest.swift:225:55:225:63 | [...] | provenance | | +| cleartextLoggingTest.swift:225:63:225:63 | password | cleartextLoggingTest.swift:225:55:225:63 | [...] [Collection element] | provenance | | +| cleartextLoggingTest.swift:240:24:240:24 | x | cleartextLoggingTest.swift:241:8:241:8 | x | provenance | | +| cleartextLoggingTest.swift:243:10:243:22 | call to getPassword() | cleartextLoggingTest.swift:244:8:244:8 | y | provenance | | +| cleartextLoggingTest.swift:253:7:253:7 | self | file://:0:0:0:0 | self | provenance | | +| cleartextLoggingTest.swift:263:8:263:11 | .password | cleartextLoggingTest.swift:253:7:253:7 | self | provenance | | +| cleartextLoggingTest.swift:263:8:263:11 | .password | cleartextLoggingTest.swift:263:8:263:20 | .value | provenance | Config | +| cleartextLoggingTest.swift:286:8:286:8 | [...] [Collection element] | cleartextLoggingTest.swift:286:8:286:8 | [...] [Collection element] | provenance | | +| cleartextLoggingTest.swift:286:8:286:8 | [...] [Collection element] | cleartextLoggingTest.swift:286:23:286:23 | [post] myString2 | provenance | | +| cleartextLoggingTest.swift:286:8:286:8 | password | cleartextLoggingTest.swift:286:8:286:8 | [...] [Collection element] | provenance | | +| cleartextLoggingTest.swift:286:23:286:23 | [post] myString2 | cleartextLoggingTest.swift:287:8:287:8 | myString2 | provenance | | +| cleartextLoggingTest.swift:287:8:287:8 | [...] [Collection element] | cleartextLoggingTest.swift:287:8:287:8 | [...] | provenance | | +| cleartextLoggingTest.swift:287:8:287:8 | myString2 | cleartextLoggingTest.swift:287:8:287:8 | [...] [Collection element] | provenance | | +| cleartextLoggingTest.swift:289:8:289:18 | ... .+(_:_:) ... | cleartextLoggingTest.swift:289:8:289:18 | [...] [Collection element] | provenance | | +| cleartextLoggingTest.swift:289:8:289:18 | [...] [Collection element] | cleartextLoggingTest.swift:289:8:289:18 | [...] [Collection element] | provenance | | +| cleartextLoggingTest.swift:289:8:289:18 | [...] [Collection element] | cleartextLoggingTest.swift:289:33:289:33 | [post] myString3 | provenance | | +| cleartextLoggingTest.swift:289:18:289:18 | password | cleartextLoggingTest.swift:289:8:289:18 | ... .+(_:_:) ... | provenance | | +| cleartextLoggingTest.swift:289:33:289:33 | [post] myString3 | cleartextLoggingTest.swift:290:8:290:8 | myString3 | provenance | | +| cleartextLoggingTest.swift:290:8:290:8 | [...] [Collection element] | cleartextLoggingTest.swift:290:8:290:8 | [...] | provenance | | +| cleartextLoggingTest.swift:290:8:290:8 | myString3 | cleartextLoggingTest.swift:290:8:290:8 | [...] [Collection element] | provenance | | +| cleartextLoggingTest.swift:295:13:295:13 | [...] [Collection element] | cleartextLoggingTest.swift:295:13:295:13 | [...] [Collection element] | provenance | | +| cleartextLoggingTest.swift:295:13:295:13 | [...] [Collection element] | cleartextLoggingTest.swift:295:28:295:28 | [post] myString5 | provenance | | +| cleartextLoggingTest.swift:295:13:295:13 | password | cleartextLoggingTest.swift:295:13:295:13 | [...] [Collection element] | provenance | | +| cleartextLoggingTest.swift:295:28:295:28 | [post] myString5 | cleartextLoggingTest.swift:296:13:296:13 | myString5 | provenance | | +| cleartextLoggingTest.swift:296:13:296:13 | [...] [Collection element] | cleartextLoggingTest.swift:296:13:296:13 | [...] | provenance | | +| cleartextLoggingTest.swift:296:13:296:13 | myString5 | cleartextLoggingTest.swift:296:13:296:13 | [...] [Collection element] | provenance | | +| cleartextLoggingTest.swift:301:7:301:7 | password | cleartextLoggingTest.swift:301:22:301:22 | [post] myString7 | provenance | | +| cleartextLoggingTest.swift:301:22:301:22 | [post] myString7 | cleartextLoggingTest.swift:302:7:302:7 | myString7 | provenance | | +| cleartextLoggingTest.swift:307:2:307:2 | [post] myString9 | cleartextLoggingTest.swift:308:8:308:8 | myString9 | provenance | | +| cleartextLoggingTest.swift:307:18:307:18 | password | cleartextLoggingTest.swift:307:2:307:2 | [post] myString9 | provenance | | +| cleartextLoggingTest.swift:308:8:308:8 | [...] [Collection element] | cleartextLoggingTest.swift:308:8:308:8 | [...] | provenance | | +| cleartextLoggingTest.swift:308:8:308:8 | myString9 | cleartextLoggingTest.swift:308:8:308:8 | [...] [Collection element] | provenance | | +| cleartextLoggingTest.swift:311:2:311:2 | [post] myString10 | cleartextLoggingTest.swift:313:8:313:8 | myString10 | provenance | | +| cleartextLoggingTest.swift:311:19:311:19 | password | cleartextLoggingTest.swift:311:2:311:2 | [post] myString10 | provenance | | +| cleartextLoggingTest.swift:313:8:313:8 | [...] [Collection element] | cleartextLoggingTest.swift:313:8:313:8 | [...] | provenance | | +| cleartextLoggingTest.swift:313:8:313:8 | myString10 | cleartextLoggingTest.swift:313:8:313:8 | [...] [Collection element] | provenance | | +| cleartextLoggingTest.swift:318:2:318:2 | password | cleartextLoggingTest.swift:318:22:318:22 | [post] myString12 | provenance | | +| cleartextLoggingTest.swift:318:22:318:22 | [post] myString12 | cleartextLoggingTest.swift:319:8:319:8 | myString12 | provenance | | +| cleartextLoggingTest.swift:319:8:319:8 | [...] [Collection element] | cleartextLoggingTest.swift:319:8:319:8 | [...] | provenance | | +| cleartextLoggingTest.swift:319:8:319:8 | myString12 | cleartextLoggingTest.swift:319:8:319:8 | [...] [Collection element] | provenance | | +| cleartextLoggingTest.swift:334:17:334:17 | password | cleartextLoggingTest.swift:334:17:334:17 | { ... } | provenance | | +| cleartextLoggingTest.swift:336:20:336:20 | password | cleartextLoggingTest.swift:336:20:336:20 | { ... } | provenance | | +| cleartextLoggingTest.swift:338:23:338:23 | password | cleartextLoggingTest.swift:338:23:338:23 | { ... } | provenance | | +| cleartextLoggingTest.swift:340:23:340:23 | password | cleartextLoggingTest.swift:340:23:340:23 | { ... } | provenance | | +| cleartextLoggingTest.swift:342:14:342:14 | password | cleartextLoggingTest.swift:342:14:342:14 | { ... } | provenance | | +| cleartextLoggingTest.swift:347:72:347:72 | passwordString | cleartextLoggingTest.swift:347:69:347:69 | "..." | provenance | | +| cleartextLoggingTest.swift:350:64:350:64 | passwordString | cleartextLoggingTest.swift:350:61:350:61 | "..." | provenance | | +| cleartextLoggingTest.swift:351:102:351:117 | [...] [Collection element] | cleartextLoggingTest.swift:351:92:351:118 | call to getVaList(_:) | provenance | | +| cleartextLoggingTest.swift:351:103:351:103 | passwordString | cleartextLoggingTest.swift:351:102:351:117 | [...] [Collection element] | provenance | | +| cleartextLoggingTest.swift:353:23:353:23 | passwordString | cleartextLoggingTest.swift:353:20:353:20 | "..." | provenance | | +| cleartextLoggingTest.swift:354:40:354:40 | [...] [Collection element] | cleartextLoggingTest.swift:354:40:354:40 | [...] | provenance | | +| cleartextLoggingTest.swift:354:40:354:40 | passwordString | cleartextLoggingTest.swift:354:40:354:40 | [...] [Collection element] | provenance | | +| cleartextLoggingTest.swift:355:44:355:51 | [...] [Collection element] | cleartextLoggingTest.swift:355:44:355:51 | [...] | provenance | | +| cleartextLoggingTest.swift:355:51:355:51 | passwordString | cleartextLoggingTest.swift:355:44:355:51 | [...] [Collection element] | provenance | | +| cleartextLoggingTest.swift:356:20:356:20 | passwordString | cleartextLoggingTest.swift:356:17:356:17 | "..." | provenance | | +| cleartextLoggingTest.swift:357:47:357:62 | [...] [Collection element] | cleartextLoggingTest.swift:357:37:357:63 | call to getVaList(_:) | provenance | | +| cleartextLoggingTest.swift:357:48:357:48 | passwordString | cleartextLoggingTest.swift:357:47:357:62 | [...] [Collection element] | provenance | | +| cleartextLoggingTest.swift:358:26:358:26 | passwordString | cleartextLoggingTest.swift:358:23:358:23 | "..." | provenance | | +| cleartextLoggingTest.swift:359:53:359:68 | [...] [Collection element] | cleartextLoggingTest.swift:359:43:359:69 | call to getVaList(_:) | provenance | | +| cleartextLoggingTest.swift:359:54:359:54 | passwordString | cleartextLoggingTest.swift:359:53:359:68 | [...] [Collection element] | provenance | | +| cleartextLoggingTest.swift:366:25:366:25 | authKey2 | cleartextLoggingTest.swift:366:18:366:33 | call to String.init(_:) | provenance | | +| cleartextLoggingTest.swift:369:33:369:33 | authKey | cleartextLoggingTest.swift:369:16:369:40 | call to NSString.init(string:) | provenance | | +| cleartextLoggingTest.swift:377:29:377:29 | authKey | cleartextLoggingTest.swift:378:16:378:16 | msg | provenance | | +| cleartextLoggingTest.swift:377:29:377:29 | authKey | cleartextLoggingTest.swift:379:18:379:18 | msg | provenance | | +| cleartextLoggingTest.swift:377:29:377:29 | authKey | cleartextLoggingTest.swift:380:18:380:18 | msg | provenance | | +| cleartextLoggingTest.swift:377:29:377:29 | authKey | cleartextLoggingTest.swift:381:34:381:34 | msg | provenance | | +| cleartextLoggingTest.swift:377:29:377:29 | authKey | cleartextLoggingTest.swift:382:19:382:19 | msg | provenance | | +| cleartextLoggingTest.swift:377:29:377:29 | authKey | cleartextLoggingTest.swift:383:20:383:20 | msg | provenance | | +| cleartextLoggingTest.swift:377:29:377:29 | authKey | cleartextLoggingTest.swift:384:18:384:18 | msg | provenance | | +| cleartextLoggingTest.swift:377:29:377:29 | authKey | cleartextLoggingTest.swift:385:21:385:21 | msg | provenance | | +| cleartextLoggingTest.swift:377:29:377:29 | authKey | cleartextLoggingTest.swift:386:18:386:18 | msg | provenance | | +| cleartextLoggingTest.swift:381:34:381:34 | msg | cleartextLoggingTest.swift:381:17:381:37 | call to NSString.init(string:) | provenance | | +| file://:0:0:0:0 | self | file://:0:0:0:0 | .value | provenance | Config | +nodes +| cleartextLoggingTest.swift:167:11:167:11 | [...] | semmle.label | [...] | +| cleartextLoggingTest.swift:167:11:167:11 | [...] [Collection element] | semmle.label | [...] [Collection element] | +| cleartextLoggingTest.swift:167:11:167:11 | password | semmle.label | password | +| cleartextLoggingTest.swift:168:11:168:11 | [...] | semmle.label | [...] | +| cleartextLoggingTest.swift:168:11:168:11 | [...] [Collection element] | semmle.label | [...] [Collection element] | +| cleartextLoggingTest.swift:168:11:168:11 | password | semmle.label | password | +| cleartextLoggingTest.swift:169:26:169:26 | password | semmle.label | password | +| cleartextLoggingTest.swift:170:11:170:11 | [...] | semmle.label | [...] | +| cleartextLoggingTest.swift:170:11:170:11 | [...] [Collection element] | semmle.label | [...] [Collection element] | +| cleartextLoggingTest.swift:170:11:170:11 | password | semmle.label | password | +| cleartextLoggingTest.swift:171:26:171:26 | password | semmle.label | password | +| cleartextLoggingTest.swift:172:42:172:42 | password | semmle.label | password | +| cleartextLoggingTest.swift:175:16:175:16 | [...] | semmle.label | [...] | +| cleartextLoggingTest.swift:175:16:175:16 | [...] [Collection element] | semmle.label | [...] [Collection element] | +| cleartextLoggingTest.swift:175:16:175:16 | password | semmle.label | password | +| cleartextLoggingTest.swift:177:10:177:10 | password | semmle.label | password | +| cleartextLoggingTest.swift:179:11:179:11 | password | semmle.label | password | +| cleartextLoggingTest.swift:180:17:180:17 | [...] | semmle.label | [...] | +| cleartextLoggingTest.swift:180:17:180:17 | [...] [Collection element] | semmle.label | [...] [Collection element] | +| cleartextLoggingTest.swift:180:17:180:17 | password | semmle.label | password | +| cleartextLoggingTest.swift:181:20:181:24 | [...] | semmle.label | [...] | +| cleartextLoggingTest.swift:181:20:181:24 | [...] [Collection element] | semmle.label | [...] [Collection element] | +| cleartextLoggingTest.swift:181:24:181:24 | password | semmle.label | password | +| cleartextLoggingTest.swift:182:11:182:11 | "..." | semmle.label | "..." | +| cleartextLoggingTest.swift:182:14:182:14 | password | semmle.label | password | +| cleartextLoggingTest.swift:183:18:183:38 | call to getVaList(_:) | semmle.label | call to getVaList(_:) | +| cleartextLoggingTest.swift:183:28:183:37 | [...] [Collection element] | semmle.label | [...] [Collection element] | +| cleartextLoggingTest.swift:183:29:183:29 | password | semmle.label | password | +| cleartextLoggingTest.swift:184:21:184:45 | call to getVaList(_:) | semmle.label | call to getVaList(_:) | +| cleartextLoggingTest.swift:184:31:184:44 | [...] [Collection element] | semmle.label | [...] [Collection element] | +| cleartextLoggingTest.swift:184:36:184:36 | password | semmle.label | password | +| cleartextLoggingTest.swift:220:11:220:11 | passphrase | semmle.label | passphrase | +| cleartextLoggingTest.swift:221:11:221:11 | pass_phrase | semmle.label | pass_phrase | +| cleartextLoggingTest.swift:224:49:224:49 | [...] | semmle.label | [...] | +| cleartextLoggingTest.swift:224:49:224:49 | [...] [Collection element] | semmle.label | [...] [Collection element] | +| cleartextLoggingTest.swift:224:49:224:49 | password | semmle.label | password | +| cleartextLoggingTest.swift:225:55:225:63 | [...] | semmle.label | [...] | +| cleartextLoggingTest.swift:225:55:225:63 | [...] [Collection element] | semmle.label | [...] [Collection element] | +| cleartextLoggingTest.swift:225:63:225:63 | password | semmle.label | password | +| cleartextLoggingTest.swift:240:24:240:24 | x | semmle.label | x | +| cleartextLoggingTest.swift:241:8:241:8 | x | semmle.label | x | +| cleartextLoggingTest.swift:243:10:243:22 | call to getPassword() | semmle.label | call to getPassword() | +| cleartextLoggingTest.swift:244:8:244:8 | y | semmle.label | y | +| cleartextLoggingTest.swift:248:8:248:10 | .password | semmle.label | .password | +| cleartextLoggingTest.swift:253:7:253:7 | self | semmle.label | self | +| cleartextLoggingTest.swift:263:8:263:11 | .password | semmle.label | .password | +| cleartextLoggingTest.swift:263:8:263:20 | .value | semmle.label | .value | +| cleartextLoggingTest.swift:286:8:286:8 | [...] [Collection element] | semmle.label | [...] [Collection element] | +| cleartextLoggingTest.swift:286:8:286:8 | [...] [Collection element] | semmle.label | [...] [Collection element] | +| cleartextLoggingTest.swift:286:8:286:8 | password | semmle.label | password | +| cleartextLoggingTest.swift:286:23:286:23 | [post] myString2 | semmle.label | [post] myString2 | +| cleartextLoggingTest.swift:287:8:287:8 | [...] | semmle.label | [...] | +| cleartextLoggingTest.swift:287:8:287:8 | [...] [Collection element] | semmle.label | [...] [Collection element] | +| cleartextLoggingTest.swift:287:8:287:8 | myString2 | semmle.label | myString2 | +| cleartextLoggingTest.swift:289:8:289:18 | ... .+(_:_:) ... | semmle.label | ... .+(_:_:) ... | +| cleartextLoggingTest.swift:289:8:289:18 | [...] [Collection element] | semmle.label | [...] [Collection element] | +| cleartextLoggingTest.swift:289:8:289:18 | [...] [Collection element] | semmle.label | [...] [Collection element] | +| cleartextLoggingTest.swift:289:18:289:18 | password | semmle.label | password | +| cleartextLoggingTest.swift:289:33:289:33 | [post] myString3 | semmle.label | [post] myString3 | +| cleartextLoggingTest.swift:290:8:290:8 | [...] | semmle.label | [...] | +| cleartextLoggingTest.swift:290:8:290:8 | [...] [Collection element] | semmle.label | [...] [Collection element] | +| cleartextLoggingTest.swift:290:8:290:8 | myString3 | semmle.label | myString3 | +| cleartextLoggingTest.swift:295:13:295:13 | [...] [Collection element] | semmle.label | [...] [Collection element] | +| cleartextLoggingTest.swift:295:13:295:13 | [...] [Collection element] | semmle.label | [...] [Collection element] | +| cleartextLoggingTest.swift:295:13:295:13 | password | semmle.label | password | +| cleartextLoggingTest.swift:295:28:295:28 | [post] myString5 | semmle.label | [post] myString5 | +| cleartextLoggingTest.swift:296:13:296:13 | [...] | semmle.label | [...] | +| cleartextLoggingTest.swift:296:13:296:13 | [...] [Collection element] | semmle.label | [...] [Collection element] | +| cleartextLoggingTest.swift:296:13:296:13 | myString5 | semmle.label | myString5 | +| cleartextLoggingTest.swift:301:7:301:7 | password | semmle.label | password | +| cleartextLoggingTest.swift:301:22:301:22 | [post] myString7 | semmle.label | [post] myString7 | +| cleartextLoggingTest.swift:302:7:302:7 | myString7 | semmle.label | myString7 | +| cleartextLoggingTest.swift:307:2:307:2 | [post] myString9 | semmle.label | [post] myString9 | +| cleartextLoggingTest.swift:307:18:307:18 | password | semmle.label | password | +| cleartextLoggingTest.swift:308:8:308:8 | [...] | semmle.label | [...] | +| cleartextLoggingTest.swift:308:8:308:8 | [...] [Collection element] | semmle.label | [...] [Collection element] | +| cleartextLoggingTest.swift:308:8:308:8 | myString9 | semmle.label | myString9 | +| cleartextLoggingTest.swift:311:2:311:2 | [post] myString10 | semmle.label | [post] myString10 | +| cleartextLoggingTest.swift:311:19:311:19 | password | semmle.label | password | +| cleartextLoggingTest.swift:313:8:313:8 | [...] | semmle.label | [...] | +| cleartextLoggingTest.swift:313:8:313:8 | [...] [Collection element] | semmle.label | [...] [Collection element] | +| cleartextLoggingTest.swift:313:8:313:8 | myString10 | semmle.label | myString10 | +| cleartextLoggingTest.swift:318:2:318:2 | password | semmle.label | password | +| cleartextLoggingTest.swift:318:22:318:22 | [post] myString12 | semmle.label | [post] myString12 | +| cleartextLoggingTest.swift:319:8:319:8 | [...] | semmle.label | [...] | +| cleartextLoggingTest.swift:319:8:319:8 | [...] [Collection element] | semmle.label | [...] [Collection element] | +| cleartextLoggingTest.swift:319:8:319:8 | myString12 | semmle.label | myString12 | +| cleartextLoggingTest.swift:334:17:334:17 | password | semmle.label | password | +| cleartextLoggingTest.swift:334:17:334:17 | { ... } | semmle.label | { ... } | +| cleartextLoggingTest.swift:336:20:336:20 | password | semmle.label | password | +| cleartextLoggingTest.swift:336:20:336:20 | { ... } | semmle.label | { ... } | +| cleartextLoggingTest.swift:338:23:338:23 | password | semmle.label | password | +| cleartextLoggingTest.swift:338:23:338:23 | { ... } | semmle.label | { ... } | +| cleartextLoggingTest.swift:340:23:340:23 | password | semmle.label | password | +| cleartextLoggingTest.swift:340:23:340:23 | { ... } | semmle.label | { ... } | +| cleartextLoggingTest.swift:342:14:342:14 | password | semmle.label | password | +| cleartextLoggingTest.swift:342:14:342:14 | { ... } | semmle.label | { ... } | +| cleartextLoggingTest.swift:347:69:347:69 | "..." | semmle.label | "..." | +| cleartextLoggingTest.swift:347:72:347:72 | passwordString | semmle.label | passwordString | +| cleartextLoggingTest.swift:350:61:350:61 | "..." | semmle.label | "..." | +| cleartextLoggingTest.swift:350:64:350:64 | passwordString | semmle.label | passwordString | +| cleartextLoggingTest.swift:351:92:351:118 | call to getVaList(_:) | semmle.label | call to getVaList(_:) | +| cleartextLoggingTest.swift:351:102:351:117 | [...] [Collection element] | semmle.label | [...] [Collection element] | +| cleartextLoggingTest.swift:351:103:351:103 | passwordString | semmle.label | passwordString | +| cleartextLoggingTest.swift:353:20:353:20 | "..." | semmle.label | "..." | +| cleartextLoggingTest.swift:353:23:353:23 | passwordString | semmle.label | passwordString | +| cleartextLoggingTest.swift:354:40:354:40 | [...] | semmle.label | [...] | +| cleartextLoggingTest.swift:354:40:354:40 | [...] [Collection element] | semmle.label | [...] [Collection element] | +| cleartextLoggingTest.swift:354:40:354:40 | passwordString | semmle.label | passwordString | +| cleartextLoggingTest.swift:355:44:355:51 | [...] | semmle.label | [...] | +| cleartextLoggingTest.swift:355:44:355:51 | [...] [Collection element] | semmle.label | [...] [Collection element] | +| cleartextLoggingTest.swift:355:51:355:51 | passwordString | semmle.label | passwordString | +| cleartextLoggingTest.swift:356:17:356:17 | "..." | semmle.label | "..." | +| cleartextLoggingTest.swift:356:20:356:20 | passwordString | semmle.label | passwordString | +| cleartextLoggingTest.swift:357:37:357:63 | call to getVaList(_:) | semmle.label | call to getVaList(_:) | +| cleartextLoggingTest.swift:357:47:357:62 | [...] [Collection element] | semmle.label | [...] [Collection element] | +| cleartextLoggingTest.swift:357:48:357:48 | passwordString | semmle.label | passwordString | +| cleartextLoggingTest.swift:358:23:358:23 | "..." | semmle.label | "..." | +| cleartextLoggingTest.swift:358:26:358:26 | passwordString | semmle.label | passwordString | +| cleartextLoggingTest.swift:359:43:359:69 | call to getVaList(_:) | semmle.label | call to getVaList(_:) | +| cleartextLoggingTest.swift:359:53:359:68 | [...] [Collection element] | semmle.label | [...] [Collection element] | +| cleartextLoggingTest.swift:359:54:359:54 | passwordString | semmle.label | passwordString | +| cleartextLoggingTest.swift:365:18:365:18 | authKey | semmle.label | authKey | +| cleartextLoggingTest.swift:366:18:366:33 | call to String.init(_:) | semmle.label | call to String.init(_:) | +| cleartextLoggingTest.swift:366:25:366:25 | authKey2 | semmle.label | authKey2 | +| cleartextLoggingTest.swift:369:16:369:40 | call to NSString.init(string:) | semmle.label | call to NSString.init(string:) | +| cleartextLoggingTest.swift:369:33:369:33 | authKey | semmle.label | authKey | +| cleartextLoggingTest.swift:370:13:370:13 | authKey | semmle.label | authKey | +| cleartextLoggingTest.swift:371:24:371:24 | authKey | semmle.label | authKey | +| cleartextLoggingTest.swift:377:29:377:29 | authKey | semmle.label | authKey | +| cleartextLoggingTest.swift:378:16:378:16 | msg | semmle.label | msg | +| cleartextLoggingTest.swift:379:18:379:18 | msg | semmle.label | msg | +| cleartextLoggingTest.swift:380:18:380:18 | msg | semmle.label | msg | +| cleartextLoggingTest.swift:381:17:381:37 | call to NSString.init(string:) | semmle.label | call to NSString.init(string:) | +| cleartextLoggingTest.swift:381:34:381:34 | msg | semmle.label | msg | +| cleartextLoggingTest.swift:382:19:382:19 | msg | semmle.label | msg | +| cleartextLoggingTest.swift:383:20:383:20 | msg | semmle.label | msg | +| cleartextLoggingTest.swift:384:18:384:18 | msg | semmle.label | msg | +| cleartextLoggingTest.swift:385:21:385:21 | msg | semmle.label | msg | +| cleartextLoggingTest.swift:386:18:386:18 | msg | semmle.label | msg | +| file://:0:0:0:0 | .value | semmle.label | .value | +| file://:0:0:0:0 | self | semmle.label | self | +subpaths +| cleartextLoggingTest.swift:263:8:263:11 | .password | cleartextLoggingTest.swift:253:7:253:7 | self | file://:0:0:0:0 | .value | cleartextLoggingTest.swift:263:8:263:20 | .value | diff --git a/swift/ql/test/query-tests/Security/CWE-312/CleartextLoggingTest.ql b/swift/ql/test/query-tests/Security/CWE-312/CleartextLoggingTest.ql deleted file mode 100644 index e7371e9d743..00000000000 --- a/swift/ql/test/query-tests/Security/CWE-312/CleartextLoggingTest.ql +++ /dev/null @@ -1,20 +0,0 @@ -import swift -import codeql.swift.dataflow.DataFlow -import codeql.swift.security.CleartextLoggingQuery -import utils.test.InlineExpectationsTest - -module CleartextLogging implements TestSig { - string getARelevantTag() { result = "hasCleartextLogging" } - - predicate hasActualResult(Location location, string element, string tag, string value) { - exists(DataFlow::Node source, DataFlow::Node sink | - CleartextLoggingFlow::flow(source, sink) and - location = sink.getLocation() and - element = sink.toString() and - tag = "hasCleartextLogging" and - value = source.asExpr().getLocation().getStartLine().toString() - ) - } -} - -import MakeTest diff --git a/swift/ql/test/query-tests/Security/CWE-312/CleartextLoggingTest.qlref b/swift/ql/test/query-tests/Security/CWE-312/CleartextLoggingTest.qlref new file mode 100644 index 00000000000..d277352353d --- /dev/null +++ b/swift/ql/test/query-tests/Security/CWE-312/CleartextLoggingTest.qlref @@ -0,0 +1,3 @@ +query: queries/Security/CWE-312/CleartextLogging.ql +postprocess: + - utils/test/InlineExpectationsTestQuery.ql diff --git a/swift/ql/test/query-tests/Security/CWE-312/cleartextLoggingTest.swift b/swift/ql/test/query-tests/Security/CWE-312/cleartextLoggingTest.swift index c3f29378519..060d6c5041e 100644 --- a/swift/ql/test/query-tests/Security/CWE-312/cleartextLoggingTest.swift +++ b/swift/ql/test/query-tests/Security/CWE-312/cleartextLoggingTest.swift @@ -164,24 +164,24 @@ class MyRemoteLogger { // --- tests --- func test1(password: String, passwordHash : String, passphrase: String, pass_phrase: String) { - print(password) // $ hasCleartextLogging=167 - print(password, separator: "") // $ $ hasCleartextLogging=168 - print("", separator: password) // $ hasCleartextLogging=169 - print(password, separator: "", terminator: "") // $ hasCleartextLogging=170 - print("", separator: password, terminator: "") // $ hasCleartextLogging=171 - print("", separator: "", terminator: password) // $ hasCleartextLogging=172 + print(password) // $ Alert + print(password, separator: "") // $ Alert + print("", separator: password) // $ Alert + print(password, separator: "", terminator: "") // $ Alert + print("", separator: password, terminator: "") // $ Alert + print("", separator: "", terminator: password) // $ Alert print(passwordHash) // safe - debugPrint(password) // $ hasCleartextLogging=175 + debugPrint(password) // $ Alert - dump(password) // $ hasCleartextLogging=177 + dump(password) // $ Alert - NSLog(password) // $ hasCleartextLogging=179 - NSLog("%@", password) // $ hasCleartextLogging=180 - NSLog("%@ %@", "", password) // $ hasCleartextLogging=181 - NSLog("\(password)") // $ hasCleartextLogging=182 - NSLogv("%@", getVaList([password])) // $ hasCleartextLogging=183 - NSLogv("%@ %@", getVaList(["", password])) // $ hasCleartextLogging=184 + NSLog(password) // $ Alert + NSLog("%@", password) // $ Alert + NSLog("%@ %@", "", password) // $ Alert + NSLog("\(password)") // $ Alert + NSLogv("%@", getVaList([password])) // $ Alert + NSLogv("%@ %@", getVaList(["", password])) // $ Alert NSLog(passwordHash) // safe NSLogv("%@", getVaList([passwordHash])) // safe @@ -191,38 +191,38 @@ func test1(password: String, passwordHash : String, passphrase: String, pass_phr log.log("\(password)") // safe log.log("\(password, privacy: .auto)") // safe log.log("\(password, privacy: .private)") // safe - log.log("\(password, privacy: .public)") // $ MISSING: hasCleartextLogging=194 + log.log("\(password, privacy: .public)") // $ MISSING: Alert log.log("\(passwordHash, privacy: .public)") // safe log.log("\(password, privacy: .sensitive)") // safe - log.log("\(bankAccount)") // $ MISSING: hasCleartextLogging=197 - log.log("\(bankAccount, privacy: .auto)") // $ MISSING: hasCleartextLogging=198 + log.log("\(bankAccount)") // $ MISSING: Alert + log.log("\(bankAccount, privacy: .auto)") // $ MISSING: Alert log.log("\(bankAccount, privacy: .private)") // safe - log.log("\(bankAccount, privacy: .public)") // $ MISSING: hasCleartextLogging=200 + log.log("\(bankAccount, privacy: .public)") // $ MISSING: Alert log.log("\(bankAccount, privacy: .sensitive)") // safe - log.log(level: .default, "\(password, privacy: .public)") // $ MISSING: hasCleartextLogging=202 - log.trace("\(password, privacy: .public)") // $ MISSING: hasCleartextLogging=203 + log.log(level: .default, "\(password, privacy: .public)") // $ MISSING: Alert + log.trace("\(password, privacy: .public)") // $ MISSING: Alert log.trace("\(passwordHash, privacy: .public)") // safe - log.debug("\(password, privacy: .public)") // $ MISSING: hasCleartextLogging=205 + log.debug("\(password, privacy: .public)") // $ MISSING: Alert log.debug("\(passwordHash, privacy: .public)") // safe - log.info("\(password, privacy: .public)") // $ MISSING: hasCleartextLogging=207 + log.info("\(password, privacy: .public)") // $ MISSING: Alert log.info("\(passwordHash, privacy: .public)") // safe - log.notice("\(password, privacy: .public)") // $ MISSING: hasCleartextLogging=209 + log.notice("\(password, privacy: .public)") // $ MISSING: Alert log.notice("\(passwordHash, privacy: .public)") // safe - log.warning("\(password, privacy: .public)") // $ MISSING: hasCleartextLogging=211 + log.warning("\(password, privacy: .public)") // $ MISSING: Alert log.warning("\(passwordHash, privacy: .public)") // safe - log.error("\(password, privacy: .public)") // $ MISSING: hasCleartextLogging=213 + log.error("\(password, privacy: .public)") // $ MISSING: Alert log.error("\(passwordHash, privacy: .public)") // safe - log.critical("\(password, privacy: .public)") // $ MISSING: hasCleartextLogging=215 + log.critical("\(password, privacy: .public)") // $ MISSING: Alert log.critical("\(passwordHash, privacy: .public)") // safe - log.fault("\(password, privacy: .public)") // $ MISSING: hasCleartextLogging=217 + log.fault("\(password, privacy: .public)") // $ MISSING: Alert log.fault("\(passwordHash, privacy: .public)") // safe - NSLog(passphrase) // $ hasCleartextLogging=220 - NSLog(pass_phrase) // $ hasCleartextLogging=221 + NSLog(passphrase) // $ Alert + NSLog(pass_phrase) // $ Alert os_log("%@", log: .default, type: .default, "") // safe - os_log("%@", log: .default, type: .default, password) // $ hasCleartextLogging=224 - os_log("%@ %@ %@", log: .default, type: .default, "", "", password) // $ hasCleartextLogging=225 + os_log("%@", log: .default, type: .default, password) // $ Alert + os_log("%@ %@ %@", log: .default, type: .default, "", "", password) // $ Alert } class MyClass { @@ -236,16 +236,16 @@ func doSomething(password: String) { } func test3(x: String) { // alternative evidence of sensitivity... - NSLog(x) // $ MISSING: hasCleartextLogging=240 - doSomething(password: x); - NSLog(x) // $ hasCleartextLogging=240 + NSLog(x) // $ MISSING: Alert + doSomething(password: x); // $ Source + NSLog(x) // $ Alert - let y = getPassword(); - NSLog(y) // $ hasCleartextLogging=243 + let y = getPassword(); // $ Source + NSLog(y) // $ Alert let z = MyClass() NSLog(z.harmless) // safe - NSLog(z.password) // $ hasCleartextLogging=248 + NSLog(z.password) // $ Alert } struct MyOuter { @@ -260,7 +260,7 @@ struct MyOuter { func test3(mo : MyOuter) { // struct members... - NSLog(mo.password.value) // $ hasCleartextLogging=263 + NSLog(mo.password.value) // $ Alert NSLog(mo.harmless.value) // safe } @@ -283,40 +283,40 @@ func test4(harmless: String, password: String) { print(harmless, to: &myString1) print(myString1) // safe - print(password, to: &myString2) - print(myString2) // $ hasCleartextLogging=286 + print(password, to: &myString2) // $ Source + print(myString2) // $ Alert - print("log: " + password, to: &myString3) - print(myString3) // $ hasCleartextLogging=289 + print("log: " + password, to: &myString3) // $ Source + print(myString3) // $ Alert debugPrint(harmless, to: &myString4) debugPrint(myString4) // safe - debugPrint(password, to: &myString5) - debugPrint(myString5) // $ hasCleartextLogging=295 + debugPrint(password, to: &myString5) // $ Source + debugPrint(myString5) // $ Alert dump(harmless, to: &myString6) dump(myString6) // safe - dump(password, to: &myString7) - dump(myString7) // $ hasCleartextLogging=301 + dump(password, to: &myString7) // $ Source + dump(myString7) // $ Alert myString8.write(harmless) print(myString8) - myString9.write(password) - print(myString9) // $ hasCleartextLogging=307 + myString9.write(password) // $ Source + print(myString9) // $ Alert myString10.write(harmless) - myString10.write(password) + myString10.write(password) // $ Source myString10.write(harmless) - print(myString10) // $ hasCleartextLogging=311 + print(myString10) // $ Alert harmless.write(to: &myString11) print(myString11) - password.write(to: &myString12) - print(myString12) // $ hasCleartextLogging=318 + password.write(to: &myString12) // $ Source + print(myString12) // $ Alert print(password, to: &myString13) // $ safe - only printed to another string debugPrint(password, to: &myString13) // $ safe - only printed to another string @@ -331,59 +331,59 @@ func test5(password: String, caseNum: Int) { switch caseNum { case 0: - assert(false, password) // $ hasCleartextLogging=334 + assert(false, password) // $ Alert case 1: - assertionFailure(password) // $ hasCleartextLogging=336 + assertionFailure(password) // $ Alert case 2: - precondition(false, password) // $ hasCleartextLogging=338 + precondition(false, password) // $ Alert case 3: - preconditionFailure(password) // $ hasCleartextLogging=340 + preconditionFailure(password) // $ Alert default: - fatalError(password) // $ hasCleartextLogging=342 + fatalError(password) // $ Alert } } func test6(passwordString: String) { - let e = NSException(name: NSExceptionName("exception"), reason: "\(passwordString) is incorrect!", userInfo: nil) // $ hasCleartextLogging=347 + let e = NSException(name: NSExceptionName("exception"), reason: "\(passwordString) is incorrect!", userInfo: nil) // $ Alert e.raise() - NSException.raise(NSExceptionName("exception"), format: "\(passwordString) is incorrect!", arguments: getVaList([])) // $ hasCleartextLogging=350 - NSException.raise(NSExceptionName("exception"), format: "%s is incorrect!", arguments: getVaList([passwordString])) // $ hasCleartextLogging=351 + NSException.raise(NSExceptionName("exception"), format: "\(passwordString) is incorrect!", arguments: getVaList([])) // $ Alert + NSException.raise(NSExceptionName("exception"), format: "%s is incorrect!", arguments: getVaList([passwordString])) // $ Alert - _ = dprintf(0, "\(passwordString) is incorrect!") // $ hasCleartextLogging=353 - _ = dprintf(0, "%s is incorrect!", passwordString) // $ hasCleartextLogging=354 - _ = dprintf(0, "%s: %s is incorrect!", "foo", passwordString) // $ hasCleartextLogging=355 - _ = vprintf("\(passwordString) is incorrect!", getVaList([])) // $ hasCleartextLogging=356 - _ = vprintf("%s is incorrect!", getVaList([passwordString])) // $ hasCleartextLogging=357 - _ = vfprintf(nil, "\(passwordString) is incorrect!", getVaList([])) // $ hasCleartextLogging=358 - _ = vfprintf(nil, "%s is incorrect!", getVaList([passwordString])) // $ hasCleartextLogging=359 + _ = dprintf(0, "\(passwordString) is incorrect!") // $ Alert + _ = dprintf(0, "%s is incorrect!", passwordString) // $ Alert + _ = dprintf(0, "%s: %s is incorrect!", "foo", passwordString) // $ Alert + _ = vprintf("\(passwordString) is incorrect!", getVaList([])) // $ Alert + _ = vprintf("%s is incorrect!", getVaList([passwordString])) // $ Alert + _ = vfprintf(nil, "\(passwordString) is incorrect!", getVaList([])) // $ Alert + _ = vfprintf(nil, "%s is incorrect!", getVaList([passwordString])) // $ Alert _ = vasprintf_l(nil, nil, "\(passwordString) is incorrect!", getVaList([])) // good (`sprintf` is not logging) _ = vasprintf_l(nil, nil, "%s is incorrect!", getVaList([passwordString])) // good (`sprintf` is not logging) } func test7(authKey: String, authKey2: Int, authKey3: Float, password: String, secret: String) { - log(message: authKey) // $ hasCleartextLogging=365 - log(message: String(authKey2)) // $ hasCleartextLogging=366 - logging(message: authKey) // $ MISSING: hasCleartextLogging=367 - logfile(file: 0, message: authKey) // $ MISSING: hasCleartextLogging=368 - logMessage(NSString(string: authKey)) // $ hasCleartextLogging=369 - logInfo(authKey) // $ hasCleartextLogging=370 - logError(errorMsg: authKey) // $ hasCleartextLogging=371 + log(message: authKey) // $ Alert + log(message: String(authKey2)) // $ Alert + logging(message: authKey) // $ MISSING: Alert + logfile(file: 0, message: authKey) // $ MISSING: Alert + logMessage(NSString(string: authKey)) // $ Alert + logInfo(authKey) // $ Alert + logError(errorMsg: authKey) // $ Alert harmless(authKey) // GOOD: not logging _ = logarithm(authKey3) // GOOD: not logging doLogin(login: authKey) // GOOD: not logging let logger = LogFile() - let msg = "authKey: " + authKey - logger.log(msg) // $ hasCleartextLogging=377 - logger.trace(msg) // $ hasCleartextLogging=377 - logger.debug(msg) // $ hasCleartextLogging=377 - logger.info(NSString(string: msg)) // $ hasCleartextLogging=377 - logger.notice(msg) // $ hasCleartextLogging=377 - logger.warning(msg) // $ hasCleartextLogging=377 - logger.error(msg) // $ hasCleartextLogging=377 - logger.critical(msg) // $ hasCleartextLogging=377 - logger.fatal(msg) // $ hasCleartextLogging=377 + let msg = "authKey: " + authKey // $ Source + logger.log(msg) // $ Alert + logger.trace(msg) // $ Alert + logger.debug(msg) // $ Alert + logger.info(NSString(string: msg)) // $ Alert + logger.notice(msg) // $ Alert + logger.warning(msg) // $ Alert + logger.error(msg) // $ Alert + logger.critical(msg) // $ Alert + logger.fatal(msg) // $ Alert let logic = Logic() logic.addInt(authKey2) // GOOD: not logging diff --git a/swift/ql/test/query-tests/Security/CWE-611/XXETest.expected b/swift/ql/test/query-tests/Security/CWE-611/XXETest.expected index e69de29bb2d..3f582702b1f 100644 --- a/swift/ql/test/query-tests/Security/CWE-611/XXETest.expected +++ b/swift/ql/test/query-tests/Security/CWE-611/XXETest.expected @@ -0,0 +1,85 @@ +#select +| testAEXMLDocumentXXE.swift:51:32:51:32 | remoteString | testAEXMLDocumentXXE.swift:50:24:50:78 | call to String.init(contentsOf:) | testAEXMLDocumentXXE.swift:51:32:51:32 | remoteString | XML parsing depends on a $@ without guarding against external entity expansion. | testAEXMLDocumentXXE.swift:50:24:50:78 | call to String.init(contentsOf:) | user-provided value | +| testAEXMLDocumentXXE.swift:74:32:74:32 | remoteData | testAEXMLDocumentXXE.swift:70:24:70:78 | call to String.init(contentsOf:) | testAEXMLDocumentXXE.swift:74:32:74:32 | remoteData | XML parsing depends on a $@ without guarding against external entity expansion. | testAEXMLDocumentXXE.swift:70:24:70:78 | call to String.init(contentsOf:) | user-provided value | +| testAEXMLDocumentXXE.swift:99:17:99:17 | remoteData | testAEXMLDocumentXXE.swift:97:24:97:78 | call to String.init(contentsOf:) | testAEXMLDocumentXXE.swift:99:17:99:17 | remoteData | XML parsing depends on a $@ without guarding against external entity expansion. | testAEXMLDocumentXXE.swift:97:24:97:78 | call to String.init(contentsOf:) | user-provided value | +| testAEXMLDocumentXXE.swift:128:46:128:46 | remoteData | testAEXMLDocumentXXE.swift:126:24:126:78 | call to String.init(contentsOf:) | testAEXMLDocumentXXE.swift:128:46:128:46 | remoteData | XML parsing depends on a $@ without guarding against external entity expansion. | testAEXMLDocumentXXE.swift:126:24:126:78 | call to String.init(contentsOf:) | user-provided value | +| testXMLDocumentXXE.swift:40:37:40:37 | remoteUrl | testXMLDocumentXXE.swift:38:24:38:78 | call to String.init(contentsOf:) | testXMLDocumentXXE.swift:40:37:40:37 | remoteUrl | XML parsing depends on a $@ without guarding against external entity expansion. | testXMLDocumentXXE.swift:38:24:38:78 | call to String.init(contentsOf:) | user-provided value | +| testXMLDocumentXXE.swift:58:31:58:31 | remoteData | testXMLDocumentXXE.swift:56:24:56:78 | call to String.init(contentsOf:) | testXMLDocumentXXE.swift:58:31:58:31 | remoteData | XML parsing depends on a $@ without guarding against external entity expansion. | testXMLDocumentXXE.swift:56:24:56:78 | call to String.init(contentsOf:) | user-provided value | +| testXMLDocumentXXE.swift:75:36:75:36 | remoteString | testXMLDocumentXXE.swift:74:24:74:78 | call to String.init(contentsOf:) | testXMLDocumentXXE.swift:75:36:75:36 | remoteString | XML parsing depends on a $@ without guarding against external entity expansion. | testXMLDocumentXXE.swift:74:24:74:78 | call to String.init(contentsOf:) | user-provided value | +| testXMLParserXXE.swift:34:34:34:34 | remoteData | testXMLParserXXE.swift:32:24:32:78 | call to String.init(contentsOf:) | testXMLParserXXE.swift:34:34:34:34 | remoteData | XML parsing depends on a $@ without guarding against external entity expansion. | testXMLParserXXE.swift:32:24:32:78 | call to String.init(contentsOf:) | user-provided value | +| testXMLParserXXE.swift:42:36:42:36 | remoteStream | testXMLParserXXE.swift:39:24:39:78 | call to String.init(contentsOf:) | testXMLParserXXE.swift:42:36:42:36 | remoteStream | XML parsing depends on a $@ without guarding against external entity expansion. | testXMLParserXXE.swift:39:24:39:78 | call to String.init(contentsOf:) | user-provided value | +| testXMLParserXXE.swift:49:40:49:40 | remoteUrl | testXMLParserXXE.swift:47:24:47:78 | call to String.init(contentsOf:) | testXMLParserXXE.swift:49:40:49:40 | remoteUrl | XML parsing depends on a $@ without guarding against external entity expansion. | testXMLParserXXE.swift:47:24:47:78 | call to String.init(contentsOf:) | user-provided value | +edges +| testAEXMLDocumentXXE.swift:50:24:50:78 | call to String.init(contentsOf:) | testAEXMLDocumentXXE.swift:51:32:51:32 | remoteString | provenance | | +| testAEXMLDocumentXXE.swift:70:24:70:78 | call to String.init(contentsOf:) | testAEXMLDocumentXXE.swift:71:27:71:27 | remoteString | provenance | | +| testAEXMLDocumentXXE.swift:71:22:71:39 | call to Data.init(_:) | testAEXMLDocumentXXE.swift:74:32:74:32 | remoteData | provenance | | +| testAEXMLDocumentXXE.swift:71:27:71:27 | remoteString | testAEXMLDocumentXXE.swift:71:22:71:39 | call to Data.init(_:) | provenance | | +| testAEXMLDocumentXXE.swift:97:24:97:78 | call to String.init(contentsOf:) | testAEXMLDocumentXXE.swift:98:27:98:27 | remoteString | provenance | | +| testAEXMLDocumentXXE.swift:98:22:98:39 | call to Data.init(_:) | testAEXMLDocumentXXE.swift:99:17:99:17 | remoteData | provenance | | +| testAEXMLDocumentXXE.swift:98:27:98:27 | remoteString | testAEXMLDocumentXXE.swift:98:22:98:39 | call to Data.init(_:) | provenance | | +| testAEXMLDocumentXXE.swift:126:24:126:78 | call to String.init(contentsOf:) | testAEXMLDocumentXXE.swift:127:27:127:27 | remoteString | provenance | | +| testAEXMLDocumentXXE.swift:127:22:127:39 | call to Data.init(_:) | testAEXMLDocumentXXE.swift:128:46:128:46 | remoteData | provenance | | +| testAEXMLDocumentXXE.swift:127:27:127:27 | remoteString | testAEXMLDocumentXXE.swift:127:22:127:39 | call to Data.init(_:) | provenance | | +| testXMLDocumentXXE.swift:38:24:38:78 | call to String.init(contentsOf:) | testXMLDocumentXXE.swift:39:33:39:33 | remoteString | provenance | | +| testXMLDocumentXXE.swift:39:21:39:45 | call to URL.init(string:) [some:0] | testXMLDocumentXXE.swift:39:21:39:46 | ...! | provenance | | +| testXMLDocumentXXE.swift:39:21:39:46 | ...! | testXMLDocumentXXE.swift:40:37:40:37 | remoteUrl | provenance | | +| testXMLDocumentXXE.swift:39:33:39:33 | remoteString | testXMLDocumentXXE.swift:39:21:39:45 | call to URL.init(string:) [some:0] | provenance | | +| testXMLDocumentXXE.swift:56:24:56:78 | call to String.init(contentsOf:) | testXMLDocumentXXE.swift:57:27:57:27 | remoteString | provenance | | +| testXMLDocumentXXE.swift:57:22:57:39 | call to Data.init(_:) | testXMLDocumentXXE.swift:58:31:58:31 | remoteData | provenance | | +| testXMLDocumentXXE.swift:57:27:57:27 | remoteString | testXMLDocumentXXE.swift:57:22:57:39 | call to Data.init(_:) | provenance | | +| testXMLDocumentXXE.swift:74:24:74:78 | call to String.init(contentsOf:) | testXMLDocumentXXE.swift:75:36:75:36 | remoteString | provenance | | +| testXMLParserXXE.swift:32:24:32:78 | call to String.init(contentsOf:) | testXMLParserXXE.swift:33:27:33:27 | remoteString | provenance | | +| testXMLParserXXE.swift:33:22:33:39 | call to Data.init(_:) | testXMLParserXXE.swift:34:34:34:34 | remoteData | provenance | | +| testXMLParserXXE.swift:33:27:33:27 | remoteString | testXMLParserXXE.swift:33:22:33:39 | call to Data.init(_:) | provenance | | +| testXMLParserXXE.swift:39:24:39:78 | call to String.init(contentsOf:) | testXMLParserXXE.swift:40:27:40:27 | remoteString | provenance | | +| testXMLParserXXE.swift:40:22:40:39 | call to Data.init(_:) | testXMLParserXXE.swift:41:42:41:42 | remoteData | provenance | | +| testXMLParserXXE.swift:40:22:40:39 | call to Data.init(_:) | testXMLParserXXE.swift:42:36:42:36 | remoteStream | provenance | AdditionalTaintStep | +| testXMLParserXXE.swift:40:27:40:27 | remoteString | testXMLParserXXE.swift:40:22:40:39 | call to Data.init(_:) | provenance | | +| testXMLParserXXE.swift:41:24:41:52 | call to InputStream.init(data:) | testXMLParserXXE.swift:42:36:42:36 | remoteStream | provenance | | +| testXMLParserXXE.swift:41:42:41:42 | remoteData | testXMLParserXXE.swift:41:24:41:52 | call to InputStream.init(data:) | provenance | | +| testXMLParserXXE.swift:47:24:47:78 | call to String.init(contentsOf:) | testXMLParserXXE.swift:48:33:48:33 | remoteString | provenance | | +| testXMLParserXXE.swift:48:21:48:45 | call to URL.init(string:) [some:0] | testXMLParserXXE.swift:48:21:48:46 | ...! | provenance | | +| testXMLParserXXE.swift:48:21:48:46 | ...! | testXMLParserXXE.swift:49:40:49:40 | remoteUrl | provenance | | +| testXMLParserXXE.swift:48:33:48:33 | remoteString | testXMLParserXXE.swift:48:21:48:45 | call to URL.init(string:) [some:0] | provenance | | +nodes +| testAEXMLDocumentXXE.swift:50:24:50:78 | call to String.init(contentsOf:) | semmle.label | call to String.init(contentsOf:) | +| testAEXMLDocumentXXE.swift:51:32:51:32 | remoteString | semmle.label | remoteString | +| testAEXMLDocumentXXE.swift:70:24:70:78 | call to String.init(contentsOf:) | semmle.label | call to String.init(contentsOf:) | +| testAEXMLDocumentXXE.swift:71:22:71:39 | call to Data.init(_:) | semmle.label | call to Data.init(_:) | +| testAEXMLDocumentXXE.swift:71:27:71:27 | remoteString | semmle.label | remoteString | +| testAEXMLDocumentXXE.swift:74:32:74:32 | remoteData | semmle.label | remoteData | +| testAEXMLDocumentXXE.swift:97:24:97:78 | call to String.init(contentsOf:) | semmle.label | call to String.init(contentsOf:) | +| testAEXMLDocumentXXE.swift:98:22:98:39 | call to Data.init(_:) | semmle.label | call to Data.init(_:) | +| testAEXMLDocumentXXE.swift:98:27:98:27 | remoteString | semmle.label | remoteString | +| testAEXMLDocumentXXE.swift:99:17:99:17 | remoteData | semmle.label | remoteData | +| testAEXMLDocumentXXE.swift:126:24:126:78 | call to String.init(contentsOf:) | semmle.label | call to String.init(contentsOf:) | +| testAEXMLDocumentXXE.swift:127:22:127:39 | call to Data.init(_:) | semmle.label | call to Data.init(_:) | +| testAEXMLDocumentXXE.swift:127:27:127:27 | remoteString | semmle.label | remoteString | +| testAEXMLDocumentXXE.swift:128:46:128:46 | remoteData | semmle.label | remoteData | +| testXMLDocumentXXE.swift:38:24:38:78 | call to String.init(contentsOf:) | semmle.label | call to String.init(contentsOf:) | +| testXMLDocumentXXE.swift:39:21:39:45 | call to URL.init(string:) [some:0] | semmle.label | call to URL.init(string:) [some:0] | +| testXMLDocumentXXE.swift:39:21:39:46 | ...! | semmle.label | ...! | +| testXMLDocumentXXE.swift:39:33:39:33 | remoteString | semmle.label | remoteString | +| testXMLDocumentXXE.swift:40:37:40:37 | remoteUrl | semmle.label | remoteUrl | +| testXMLDocumentXXE.swift:56:24:56:78 | call to String.init(contentsOf:) | semmle.label | call to String.init(contentsOf:) | +| testXMLDocumentXXE.swift:57:22:57:39 | call to Data.init(_:) | semmle.label | call to Data.init(_:) | +| testXMLDocumentXXE.swift:57:27:57:27 | remoteString | semmle.label | remoteString | +| testXMLDocumentXXE.swift:58:31:58:31 | remoteData | semmle.label | remoteData | +| testXMLDocumentXXE.swift:74:24:74:78 | call to String.init(contentsOf:) | semmle.label | call to String.init(contentsOf:) | +| testXMLDocumentXXE.swift:75:36:75:36 | remoteString | semmle.label | remoteString | +| testXMLParserXXE.swift:32:24:32:78 | call to String.init(contentsOf:) | semmle.label | call to String.init(contentsOf:) | +| testXMLParserXXE.swift:33:22:33:39 | call to Data.init(_:) | semmle.label | call to Data.init(_:) | +| testXMLParserXXE.swift:33:27:33:27 | remoteString | semmle.label | remoteString | +| testXMLParserXXE.swift:34:34:34:34 | remoteData | semmle.label | remoteData | +| testXMLParserXXE.swift:39:24:39:78 | call to String.init(contentsOf:) | semmle.label | call to String.init(contentsOf:) | +| testXMLParserXXE.swift:40:22:40:39 | call to Data.init(_:) | semmle.label | call to Data.init(_:) | +| testXMLParserXXE.swift:40:27:40:27 | remoteString | semmle.label | remoteString | +| testXMLParserXXE.swift:41:24:41:52 | call to InputStream.init(data:) | semmle.label | call to InputStream.init(data:) | +| testXMLParserXXE.swift:41:42:41:42 | remoteData | semmle.label | remoteData | +| testXMLParserXXE.swift:42:36:42:36 | remoteStream | semmle.label | remoteStream | +| testXMLParserXXE.swift:47:24:47:78 | call to String.init(contentsOf:) | semmle.label | call to String.init(contentsOf:) | +| testXMLParserXXE.swift:48:21:48:45 | call to URL.init(string:) [some:0] | semmle.label | call to URL.init(string:) [some:0] | +| testXMLParserXXE.swift:48:21:48:46 | ...! | semmle.label | ...! | +| testXMLParserXXE.swift:48:33:48:33 | remoteString | semmle.label | remoteString | +| testXMLParserXXE.swift:49:40:49:40 | remoteUrl | semmle.label | remoteUrl | +subpaths diff --git a/swift/ql/test/query-tests/Security/CWE-611/XXETest.ql b/swift/ql/test/query-tests/Security/CWE-611/XXETest.ql deleted file mode 100644 index 64001151b44..00000000000 --- a/swift/ql/test/query-tests/Security/CWE-611/XXETest.ql +++ /dev/null @@ -1,27 +0,0 @@ -import swift -import codeql.swift.dataflow.FlowSources -import codeql.swift.security.XXEQuery -import utils.test.InlineExpectationsTest - -class TestRemoteSource extends RemoteFlowSource { - TestRemoteSource() { this.asExpr().(ApplyExpr).getStaticTarget().getName().matches("source%") } - - override string getSourceType() { result = "Test source" } -} - -module XxeTest implements TestSig { - string getARelevantTag() { result = "hasXXE" } - - predicate hasActualResult(Location location, string element, string tag, string value) { - exists(DataFlow::Node source, DataFlow::Node sink, Expr sinkExpr | - XxeFlow::flow(source, sink) and - sinkExpr = sink.asExpr() and - location = sinkExpr.getLocation() and - element = sinkExpr.toString() and - tag = "hasXXE" and - value = source.asExpr().getLocation().getStartLine().toString() - ) - } -} - -import MakeTest diff --git a/swift/ql/test/query-tests/Security/CWE-611/XXETest.qlref b/swift/ql/test/query-tests/Security/CWE-611/XXETest.qlref new file mode 100644 index 00000000000..83154ac29d4 --- /dev/null +++ b/swift/ql/test/query-tests/Security/CWE-611/XXETest.qlref @@ -0,0 +1,3 @@ +query: queries/Security/CWE-611/XXE.ql +postprocess: + - utils/test/InlineExpectationsTestQuery.ql diff --git a/swift/ql/test/query-tests/Security/CWE-611/testAEXMLDocumentXXE.swift b/swift/ql/test/query-tests/Security/CWE-611/testAEXMLDocumentXXE.swift index 9f337030158..c7501d4bcbd 100644 --- a/swift/ql/test/query-tests/Security/CWE-611/testAEXMLDocumentXXE.swift +++ b/swift/ql/test/query-tests/Security/CWE-611/testAEXMLDocumentXXE.swift @@ -47,8 +47,8 @@ func testString() { var options = AEXMLOptions() options.parserSettings.shouldResolveExternalEntities = true - let remoteString = String(contentsOf: URL(string: "http://example.com/")!) - let _ = AEXMLDocument(xml: remoteString, encoding: String.Encoding.utf8, options: options) // $ hasXXE=50 + let remoteString = String(contentsOf: URL(string: "http://example.com/")!) // $ Source + let _ = AEXMLDocument(xml: remoteString, encoding: String.Encoding.utf8, options: options) // $ Alert } func testStringSafeImplicit() { @@ -67,11 +67,11 @@ func testStringSafeExplicit() { } func testData() { - let remoteString = String(contentsOf: URL(string: "http://example.com/")!) + let remoteString = String(contentsOf: URL(string: "http://example.com/")!) // $ Source let remoteData = Data(remoteString) var options = AEXMLOptions() options.parserSettings.shouldResolveExternalEntities = true - let _ = AEXMLDocument(xml: remoteData, options: options) // $ hasXXE=70 + let _ = AEXMLDocument(xml: remoteData, options: options) // $ Alert } func testDataSafeImplicit() { @@ -94,9 +94,9 @@ func testDataLoadXml() { options.parserSettings.shouldResolveExternalEntities = true let doc = AEXMLDocument(root: nil, options: options) - let remoteString = String(contentsOf: URL(string: "http://example.com/")!) + let remoteString = String(contentsOf: URL(string: "http://example.com/")!) // $ Source let remoteData = Data(remoteString) - doc.loadXML(remoteData) // $ hasXXE=97 + doc.loadXML(remoteData) // $ Alert } func testDataLoadXmlSafeImplicit() { @@ -123,9 +123,9 @@ func testParser() { options.parserSettings.shouldResolveExternalEntities = true let doc = AEXMLDocument(root: nil, options: options) - let remoteString = String(contentsOf: URL(string: "http://example.com/")!) + let remoteString = String(contentsOf: URL(string: "http://example.com/")!) // $ Source let remoteData = Data(remoteString) - let _ = AEXMLParser(document: doc, data: remoteData) // $ hasXXE=126 + let _ = AEXMLParser(document: doc, data: remoteData) // $ Alert } func testParserSafeImplicit() { @@ -145,4 +145,4 @@ func testParserSafeExplicit() { let remoteString = String(contentsOf: URL(string: "http://example.com/")!) let remoteData = Data(remoteString) let _ = AEXMLParser(document: doc, data: remoteData) // NO XXE -} \ No newline at end of file +} diff --git a/swift/ql/test/query-tests/Security/CWE-611/testXMLDocumentXXE.swift b/swift/ql/test/query-tests/Security/CWE-611/testXMLDocumentXXE.swift index 07180301e72..9cfa694839a 100644 --- a/swift/ql/test/query-tests/Security/CWE-611/testXMLDocumentXXE.swift +++ b/swift/ql/test/query-tests/Security/CWE-611/testXMLDocumentXXE.swift @@ -35,9 +35,9 @@ class XMLDocument { // --- tests --- func testUrl() { - let remoteString = String(contentsOf: URL(string: "http://example.com/")!) + let remoteString = String(contentsOf: URL(string: "http://example.com/")!) // $ Source let remoteUrl = URL(string: remoteString)! - let _ = XMLDocument(contentsOf: remoteUrl, options: [.nodeLoadExternalEntitiesAlways]) // $ hasXXE=38 + let _ = XMLDocument(contentsOf: remoteUrl, options: [.nodeLoadExternalEntitiesAlways]) // $ Alert } func testUrlSafeImplicit() { @@ -53,9 +53,9 @@ func testUrlSafeExplicit() { } func testData() { - let remoteString = String(contentsOf: URL(string: "http://example.com/")!) + let remoteString = String(contentsOf: URL(string: "http://example.com/")!) // $ Source let remoteData = Data(remoteString) - let _ = XMLDocument(data: remoteData, options: [.nodeLoadExternalEntitiesAlways]) // $ hasXXE=56 + let _ = XMLDocument(data: remoteData, options: [.nodeLoadExternalEntitiesAlways]) // $ Alert } func testDataSafeImplicit() { @@ -71,8 +71,8 @@ func testDataSafeExplicit() { } func testString() { - let remoteString = String(contentsOf: URL(string: "http://example.com/")!) - let _ = XMLDocument(xmlString: remoteString, options: [.nodeLoadExternalEntitiesAlways]) // $ hasXXE=74 + let remoteString = String(contentsOf: URL(string: "http://example.com/")!) // $ Source + let _ = XMLDocument(xmlString: remoteString, options: [.nodeLoadExternalEntitiesAlways]) // $ Alert } func testStringSafeImplicit() { diff --git a/swift/ql/test/query-tests/Security/CWE-611/testXMLParserXXE.swift b/swift/ql/test/query-tests/Security/CWE-611/testXMLParserXXE.swift index 75538f014f9..3b679675b1a 100644 --- a/swift/ql/test/query-tests/Security/CWE-611/testXMLParserXXE.swift +++ b/swift/ql/test/query-tests/Security/CWE-611/testXMLParserXXE.swift @@ -29,24 +29,24 @@ class XMLParser { // --- tests --- func testData() { - let remoteString = String(contentsOf: URL(string: "http://example.com/")!) + let remoteString = String(contentsOf: URL(string: "http://example.com/")!) // $ Source let remoteData = Data(remoteString) - let parser = XMLParser(data: remoteData) // $ hasXXE=32 + let parser = XMLParser(data: remoteData) // $ Alert parser.shouldResolveExternalEntities = true } func testInputStream() { - let remoteString = String(contentsOf: URL(string: "http://example.com/")!) + let remoteString = String(contentsOf: URL(string: "http://example.com/")!) // $ Source let remoteData = Data(remoteString) let remoteStream = InputStream(data: remoteData) - let parser = XMLParser(stream: remoteStream) // $ hasXXE=39 + let parser = XMLParser(stream: remoteStream) // $ Alert parser.shouldResolveExternalEntities = true } func testUrl() { - let remoteString = String(contentsOf: URL(string: "http://example.com/")!) + let remoteString = String(contentsOf: URL(string: "http://example.com/")!) // $ Source let remoteUrl = URL(string: remoteString)! - let parser = XMLParser(contentsOf: remoteUrl) // $ hasXXE=47 + let parser = XMLParser(contentsOf: remoteUrl) // $ Alert parser?.shouldResolveExternalEntities = true } @@ -89,4 +89,4 @@ func testUrlSafeExplicit() { let remoteUrl = URL(string: remoteString)! let parser = XMLParser(contentsOf: remoteUrl) // NO XXE: parser disables external entities parser?.shouldResolveExternalEntities = false -} \ No newline at end of file +} diff --git a/swift/ql/test/query-tests/Security/CWE-946/PredicateInjectionTest.expected b/swift/ql/test/query-tests/Security/CWE-946/PredicateInjectionTest.expected index e69de29bb2d..4c1b0eb782e 100644 --- a/swift/ql/test/query-tests/Security/CWE-946/PredicateInjectionTest.expected +++ b/swift/ql/test/query-tests/Security/CWE-946/PredicateInjectionTest.expected @@ -0,0 +1,20 @@ +#select +| predicateInjection.swift:26:25:26:25 | remoteString | predicateInjection.swift:23:24:23:78 | call to String.init(contentsOf:) | predicateInjection.swift:26:25:26:25 | remoteString | This predicate depends on a $@. | predicateInjection.swift:23:24:23:78 | call to String.init(contentsOf:) | user-provided value | +| predicateInjection.swift:29:25:29:25 | remoteString | predicateInjection.swift:23:24:23:78 | call to String.init(contentsOf:) | predicateInjection.swift:29:25:29:25 | remoteString | This predicate depends on a $@. | predicateInjection.swift:23:24:23:78 | call to String.init(contentsOf:) | user-provided value | +| predicateInjection.swift:31:25:31:25 | remoteString | predicateInjection.swift:23:24:23:78 | call to String.init(contentsOf:) | predicateInjection.swift:31:25:31:25 | remoteString | This predicate depends on a $@. | predicateInjection.swift:23:24:23:78 | call to String.init(contentsOf:) | user-provided value | +| predicateInjection.swift:33:25:33:25 | remoteString | predicateInjection.swift:23:24:23:78 | call to String.init(contentsOf:) | predicateInjection.swift:33:25:33:25 | remoteString | This predicate depends on a $@. | predicateInjection.swift:23:24:23:78 | call to String.init(contentsOf:) | user-provided value | +| predicateInjection.swift:36:42:36:42 | remoteString | predicateInjection.swift:23:24:23:78 | call to String.init(contentsOf:) | predicateInjection.swift:36:42:36:42 | remoteString | This predicate depends on a $@. | predicateInjection.swift:23:24:23:78 | call to String.init(contentsOf:) | user-provided value | +edges +| predicateInjection.swift:23:24:23:78 | call to String.init(contentsOf:) | predicateInjection.swift:26:25:26:25 | remoteString | provenance | | +| predicateInjection.swift:23:24:23:78 | call to String.init(contentsOf:) | predicateInjection.swift:29:25:29:25 | remoteString | provenance | | +| predicateInjection.swift:23:24:23:78 | call to String.init(contentsOf:) | predicateInjection.swift:31:25:31:25 | remoteString | provenance | | +| predicateInjection.swift:23:24:23:78 | call to String.init(contentsOf:) | predicateInjection.swift:33:25:33:25 | remoteString | provenance | | +| predicateInjection.swift:23:24:23:78 | call to String.init(contentsOf:) | predicateInjection.swift:36:42:36:42 | remoteString | provenance | | +nodes +| predicateInjection.swift:23:24:23:78 | call to String.init(contentsOf:) | semmle.label | call to String.init(contentsOf:) | +| predicateInjection.swift:26:25:26:25 | remoteString | semmle.label | remoteString | +| predicateInjection.swift:29:25:29:25 | remoteString | semmle.label | remoteString | +| predicateInjection.swift:31:25:31:25 | remoteString | semmle.label | remoteString | +| predicateInjection.swift:33:25:33:25 | remoteString | semmle.label | remoteString | +| predicateInjection.swift:36:42:36:42 | remoteString | semmle.label | remoteString | +subpaths diff --git a/swift/ql/test/query-tests/Security/CWE-946/PredicateInjectionTest.ql b/swift/ql/test/query-tests/Security/CWE-946/PredicateInjectionTest.ql deleted file mode 100644 index 202ca05ad43..00000000000 --- a/swift/ql/test/query-tests/Security/CWE-946/PredicateInjectionTest.ql +++ /dev/null @@ -1,21 +0,0 @@ -import swift -import codeql.swift.dataflow.DataFlow -import codeql.swift.security.PredicateInjectionQuery -import utils.test.InlineExpectationsTest - -module PredicateInjectionTest implements TestSig { - string getARelevantTag() { result = "hasPredicateInjection" } - - predicate hasActualResult(Location location, string element, string tag, string value) { - exists(DataFlow::Node source, DataFlow::Node sink, Expr sinkExpr | - PredicateInjectionFlow::flow(source, sink) and - sinkExpr = sink.asExpr() and - location = sinkExpr.getLocation() and - element = sinkExpr.toString() and - tag = "hasPredicateInjection" and - value = source.asExpr().getLocation().getStartLine().toString() - ) - } -} - -import MakeTest diff --git a/swift/ql/test/query-tests/Security/CWE-946/PredicateInjectionTest.qlref b/swift/ql/test/query-tests/Security/CWE-946/PredicateInjectionTest.qlref new file mode 100644 index 00000000000..f968b9a3525 --- /dev/null +++ b/swift/ql/test/query-tests/Security/CWE-946/PredicateInjectionTest.qlref @@ -0,0 +1,3 @@ +query: queries/Security/CWE-943/PredicateInjection.ql +postprocess: + - utils/test/InlineExpectationsTestQuery.ql diff --git a/swift/ql/test/query-tests/Security/CWE-946/predicateInjection.swift b/swift/ql/test/query-tests/Security/CWE-946/predicateInjection.swift index 1de6b50f4cf..56ead0544d2 100644 --- a/swift/ql/test/query-tests/Security/CWE-946/predicateInjection.swift +++ b/swift/ql/test/query-tests/Security/CWE-946/predicateInjection.swift @@ -20,19 +20,19 @@ class NSPredicate { // --- tests --- func test() { - let remoteString = String(contentsOf: URL(string: "http://example.com/")!) + let remoteString = String(contentsOf: URL(string: "http://example.com/")!) // $ Source let safeString = "safe" - NSPredicate(format: remoteString, argumentArray: []) // $ hasPredicateInjection=23 + NSPredicate(format: remoteString, argumentArray: []) // $ Alert NSPredicate(format: safeString, argumentArray: []) // Safe NSPredicate(format: safeString, argumentArray: [remoteString]) // Safe - NSPredicate(format: remoteString, arguments: CVaListPointer(_fromUnsafeMutablePointer: UnsafeMutablePointer(bitPattern: 0)!)) // $ hasPredicateInjection=23 + NSPredicate(format: remoteString, arguments: CVaListPointer(_fromUnsafeMutablePointer: UnsafeMutablePointer(bitPattern: 0)!)) // $ Alert NSPredicate(format: safeString, arguments: CVaListPointer(_fromUnsafeMutablePointer: UnsafeMutablePointer(bitPattern: 0)!)) // Safe - NSPredicate(format: remoteString) // $ hasPredicateInjection=23 + NSPredicate(format: remoteString) // $ Alert NSPredicate(format: safeString) // Safe - NSPredicate(format: remoteString, "" as! CVarArg) // $ hasPredicateInjection=23 + NSPredicate(format: remoteString, "" as! CVarArg) // $ Alert NSPredicate(format: safeString, "" as! CVarArg) // Safe NSPredicate(format: safeString, remoteString as! CVarArg) // Safe - NSPredicate(fromMetadataQueryString: remoteString) // $ hasPredicateInjection=23 + NSPredicate(fromMetadataQueryString: remoteString) // $ Alert NSPredicate(fromMetadataQueryString: safeString) // Safe }