Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
116 commits
Select commit Hold shift + click to select a range
79e2a75
JS: Allow more kinds of expectation comments
asgerf Feb 10, 2025
7e5c24a
JS: Remove uses of old inline expectation test library
asgerf Feb 4, 2025
9be041e
JS: Update OK-style comments to $-style
asgerf Feb 6, 2025
426edd5
JS: Update output after line number change
asgerf Feb 6, 2025
d0ce53e
JS: Enable post-processing for all .qlref files
asgerf Feb 6, 2025
ac6547f
JS: Disable for comment-related alerts
asgerf Feb 6, 2025
789a7bd
JS: Disable for test with alerts in a JSON file
asgerf Feb 11, 2025
795c110
JS: Disable for SyntaxError
asgerf Feb 26, 2025
f5911c9
JS: Accept raw test output
asgerf Feb 6, 2025
86932c5
JS: Move some alerts to their correct location
asgerf Feb 11, 2025
0453ded
JS: Add query ID to some alerts
asgerf Feb 12, 2025
10a7294
JS: Accept trivial test changes
asgerf Feb 11, 2025
07a876b
JS: Accept some alerts at the SystemCommandExecution location
asgerf Feb 12, 2025
f395651
JS: Mark alert as MISSING
asgerf Feb 12, 2025
1f3c496
JS: Accept some less obvious alerts
asgerf Feb 12, 2025
68fae9d
JS: Accept alerts about newline replacement
asgerf Feb 12, 2025
e5bee19
JS: Accept a double-flagged line
asgerf Feb 12, 2025
e026b9e
JS: Mark regressions due to lack of local field steps
asgerf Feb 12, 2025
2c46e10
JS: Mark an alert as missing
asgerf Feb 12, 2025
426a871
JS: Remove incorrect Alert marker
asgerf Feb 11, 2025
2877531
JS: Remove invalid syntax from test
asgerf Feb 11, 2025
a9b263f
JS: Remove incorrect alert expectation
asgerf Feb 11, 2025
22c218d
JS: Mark a 'good' test as 'bad' and add Alert marker
asgerf Feb 11, 2025
b095fe2
JS: Fix some bugs in a test case
asgerf Feb 12, 2025
c051b4c
JS: Add spurious alert marker
asgerf Feb 12, 2025
cf33db7
JS: Fix the spurious flow
asgerf Feb 12, 2025
c593853
JS: Record some missing alerts in FileAccessToHttp
asgerf Feb 12, 2025
319ee2c
JS: Track deep flow through qs.stringify
asgerf Feb 12, 2025
e745f42
JS: Remove alert expectation from step
asgerf Feb 28, 2025
d3de6d1
JS: Accept other changes to UnusedVariable
asgerf Feb 28, 2025
f72cd21
JS: Some more test changes in SpuriousArguments
asgerf Feb 11, 2025
576dbcb
JS: Stop overriding entire module.exports object in test
asgerf Feb 12, 2025
b54ff3b
JS: Accept an alert
asgerf Feb 12, 2025
e91a046
JS: Mark a spurious alert
asgerf Feb 12, 2025
51b4559
JS: Move an alert and add query ID
asgerf Feb 12, 2025
fc95702
JS: Accept some more alerts from CleartextStorage
asgerf Feb 12, 2025
0f8e85f
JS: Accept alerts for InsufficientKeySize
asgerf Feb 12, 2025
92c3939
JS: Accept InsecureRandomness alerts
asgerf Feb 18, 2025
283b142
JS: Accept some ReDoS alerts
asgerf Feb 21, 2025
d298d87
JS: Accept some exponenital redos alerts in the polynomial redos test…
asgerf Feb 21, 2025
51fb3da
JS: Accept ReDoS alerts in regexplib
asgerf Feb 21, 2025
607b184
JS: Fix a bug in test case
asgerf Feb 21, 2025
082e16b
JS: More Alert comments in ReDoS/tst.js based on variable naming
asgerf Feb 21, 2025
266ac09
JS: Add query iDs
asgerf Feb 21, 2025
1fcebce
JS: Move some ReDoS alerts
asgerf Feb 21, 2025
a0f8e28
JS: Accept a fixed FN
asgerf Feb 21, 2025
cded757
JS: Add a query ID
asgerf Feb 21, 2025
cea5337
JS: Accept alerts for missing-x-frame-options
asgerf Feb 21, 2025
260c66b
JS: Mark a spurious alert in missing-x-frame-options
asgerf Feb 21, 2025
48760d6
JS: Accept alerts for HardcodedDataInterpretedAsCode
asgerf Feb 21, 2025
3f7f74b
JS: Accept alerts for DecompressionBomb
asgerf Feb 21, 2025
cd788bc
JS: Mark what seems to be missing alerts for fflate
asgerf Feb 21, 2025
0f23c33
JS: Fix a comment
asgerf Feb 21, 2025
1ee93cf
JS: Manually fix two comments in JSX
asgerf Feb 21, 2025
b734a3d
JS: Fix a test case bug due to a typo
asgerf Feb 21, 2025
7c2394f
JS: Accept some alerts
asgerf Feb 21, 2025
38be524
JS: Temporarily accept a spurious alert
asgerf Feb 21, 2025
2965964
JS: Fix barrier guards for ServerSideUrlRedirect
asgerf Feb 21, 2025
4ca49fb
JS: Change note about guards in server-side url redirect
asgerf Feb 21, 2025
dbc079c
JS: Accept a spurious alert
asgerf Feb 21, 2025
360c765
JS: Accept some suboptimal alert locations
asgerf Feb 25, 2025
69b2d19
JS: Move an alert and add RelatedLocations
asgerf Feb 25, 2025
7fa63fa
JS: Update alerts in HardcodedCredentials test
asgerf Feb 25, 2025
9ef5a97
JS: Accept alerts in HardcodedCredentials and add Sink tags
asgerf Feb 25, 2025
2bed3a4
JS: Mark some missing alerts in HardcodedCredentials
asgerf Feb 25, 2025
a1796bd
JS: Accept some new alerts in HardcodedCredentials
asgerf Feb 25, 2025
7ed5398
JS: Accept some different-kind comparison-bypass alerts
asgerf Feb 25, 2025
c79d355
JS: Update alerts in example_bypass.js
asgerf Feb 25, 2025
db98dc6
JS: Move some alerts and add query IDs
asgerf Feb 25, 2025
3a535db
JS: Accept another alert
asgerf Feb 25, 2025
9f87446
JS: Remove a fixed spurious alert
asgerf Feb 25, 2025
2d1aa3e
JS: Accept missing alert and clarify reason
asgerf Feb 25, 2025
49274d5
JS: Accept an alert
asgerf Feb 25, 2025
9760965
JS: Accept an alert
asgerf Feb 25, 2025
764eb98
JS: Move two alerts and add query ID
asgerf Feb 25, 2025
4d7cbe6
JS: Accept to web socket-based SSRF alerts
asgerf Feb 25, 2025
e634b31
JS: Accept some UselessConditional alerts
asgerf Feb 25, 2025
507a091
JS: More alert updates in UselessConditional
asgerf Feb 25, 2025
7623ebb
JS: Accept changes in UseOfReturnlessFunction
asgerf Feb 25, 2025
6cf1334
Fix comment style in UnboundEventHandlerReceiver
asgerf Feb 26, 2025
2b33ed3
JS: Remove incorrect alert marker
asgerf Feb 26, 2025
a1c13f0
JS: Remove alert marker that's reported on another line
asgerf Feb 26, 2025
dc28bb5
JS: Fix alert location and use RelatedLocation in InsecureUrlWhitelist
asgerf Feb 26, 2025
6059994
JS: Accept more results in SpuriousArguments
asgerf Feb 26, 2025
87ed86e
JS: Update UnusedOrUndefinedStateProperty
asgerf Feb 11, 2025
8ef51c4
JS: Fix wrong expectation in UnusedOrUndefinedStateProperty
asgerf Feb 26, 2025
aade1e8
JS: Add a related location in UnusedOrUndefinedStateProperty
asgerf Feb 26, 2025
0496de6
JS: Accept alerts in UselessCharacterEscape
asgerf Feb 26, 2025
bb67a0e
JS: Remove outdated comment
asgerf Feb 26, 2025
87518ba
JS: Update tainted-sendFile.js
asgerf Feb 26, 2025
b4ac2f7
JS: Add a query ID
asgerf Feb 26, 2025
fd6a9c6
JS: Accept an alert
asgerf Feb 26, 2025
19cada3
JS: Migrate a new file from OK-style comments
asgerf Feb 26, 2025
64d39da
JS: Accept Sources/Sink tags
asgerf Feb 26, 2025
7bd01bf
JS: Bulk update in UnneededDefensiveProgramming test
asgerf Feb 11, 2025
c67c585
Disable for more queries with alerts in JSON
asgerf Feb 27, 2025
33602ee
JS: Convert some comments to JSX
asgerf Feb 27, 2025
193b26e
JS: Add query IDs
asgerf Feb 27, 2025
2a194a5
raw test output
asgerf Feb 27, 2025
24c9b2e
Update javascript/ql/test/query-tests/Security/CWE-078/UselessUseOfCa…
asgerf Mar 10, 2025
017f458
Update javascript/ql/test/query-tests/Security/CWE-078/UselessUseOfCa…
asgerf Mar 10, 2025
dad4838
Update javascript/ql/test/query-tests/Security/CWE-079/DomBasedXss/ts…
asgerf Mar 10, 2025
21d42bc
Update javascript/ql/test/query-tests/Security/CWE-079/ExceptionXss/e…
asgerf Mar 10, 2025
92dfdc8
Update javascript/ql/test/query-tests/Security/CWE-116/IncompleteSani…
asgerf Mar 10, 2025
8ee5b23
Update javascript/ql/test/query-tests/Security/CWE-730/server-crash.js
asgerf Mar 10, 2025
122f68e
Update javascript/ql/test/query-tests/Security/CWE-400/ReDoS/polynomi…
asgerf Mar 10, 2025
f7532c0
JS: Remove blank line
asgerf Mar 10, 2025
b9dd594
JS: Remove blank lines
asgerf Mar 10, 2025
6fe3a36
JS: Remove blank line and add trailing newline to file
asgerf Mar 10, 2025
0df893e
JS: Remove blank lines and add trailing newline
asgerf Mar 10, 2025
c88eac4
JS: Remove stray $ Alert comment inside a doc comment
asgerf Mar 10, 2025
6a47678
JS: Fix broken alert comment in HeterogenousComparison
asgerf Mar 10, 2025
75ed0d0
JS: Remove duplicate '$ Alert' in libxml test
asgerf Mar 10, 2025
0f201d2
JS: Line number changes in redos test case
asgerf Mar 10, 2025
e8c5e4d
Merge branch 'main' into js/test-suite
asgerf Mar 11, 2025
6499e54
JS: Restore line lost in merge
asgerf Mar 11, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 4 additions & 1 deletion javascript/ql/lib/semmle/javascript/frameworks/SQL.qll
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,10 @@ private module Postgres {

/** Gets a value that is plugged into a raw placeholder variable, making it a sink for SQL injection. */
private DataFlow::Node getARawValue() {
result = this.getValues() and this.getARawParameterName() = "1" // Special case: if the argument is not an array or object, it's just plugged into $1
result = this.getValues() and
this.getARawParameterName() = "1" and // Special case: if the argument is not an array or object, it's just plugged into $1
not result instanceof DataFlow::ArrayCreationNode and
not result instanceof DataFlow::ObjectLiteralNode
or
exists(DataFlow::SourceNode values | values = this.getValues().getALocalSource() |
result = values.getAPropertyWrite(this.getARawParameterName()).getRhs()
Expand Down
19 changes: 19 additions & 0 deletions javascript/ql/lib/semmle/javascript/frameworks/UriLibraries.qll
Original file line number Diff line number Diff line change
Expand Up @@ -421,3 +421,22 @@ private module ClosureLibraryUri {
}
}
}

private class QueryStringStringification extends DataFlow::SummarizedCallable {
QueryStringStringification() { this = "query-string stringification" }

override DataFlow::InvokeNode getACall() {
result =
API::moduleImport(["querystring", "query-string", "querystringify", "qs"])
.getMember("stringify")
.getACall() or
result = API::moduleImport("url-parse").getMember("qs").getMember("stringify").getACall() or
result = API::moduleImport("parseqs").getMember("encode").getACall()
}

override predicate propagatesFlow(string input, string output, boolean preservesValue) {
preservesValue = false and
input = ["Argument[0]", "Argument[0].AnyMemberDeep"] and
output = "ReturnValue"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ module ServerSideUrlRedirectConfig implements DataFlow::ConfigSig {

predicate isSink(DataFlow::Node sink) { sink instanceof Sink }

predicate isBarrier(DataFlow::Node node) { node instanceof Sanitizer }
predicate isBarrier(DataFlow::Node node) {
node instanceof Sanitizer
or
node = HostnameSanitizerGuard::getABarrierNode()
}

predicate isBarrierOut(DataFlow::Node node) { hostnameSanitizingPrefixEdge(node, _) }

Expand Down Expand Up @@ -69,10 +73,12 @@ deprecated class Configuration extends TaintTracking::Configuration {
}

/**
* DEPRECATED. This is no longer used as a sanitizer guard.
*
* A call to a function called `isLocalUrl` or similar, which is
* considered to sanitize a variable for purposes of URL redirection.
*/
class LocalUrlSanitizingGuard extends DataFlow::CallNode {
deprecated class LocalUrlSanitizingGuard extends DataFlow::CallNode {
LocalUrlSanitizingGuard() { this.getCalleeName().regexpMatch("(?i)(is_?)?local_?url") }

/** DEPRECATED. Use `blocksExpr` instead. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,22 @@ private import codeql.util.test.InlineExpectationsTest
module Impl implements InlineExpectationsTestSig {
private import javascript

final private class LineCommentFinal = LineComment;
final class ExpectationComment = ExpectationCommentImpl;

class ExpectationComment extends LineCommentFinal {
string getContents() { result = this.getText() }
class Location = JS::Location;

abstract private class ExpectationCommentImpl extends Locatable {
abstract string getContents();

/** Gets this element's location. */
Location getLocation() { result = super.getLocation() }
}

class Location = JS::Location;
private class JSComment extends ExpectationCommentImpl instanceof Comment {
override string getContents() { result = super.getText() }
}

private class HtmlComment extends ExpectationCommentImpl instanceof HTML::CommentNode {
override string getContents() { result = super.getText() }
}
}
5 changes: 5 additions & 0 deletions javascript/ql/src/change-notes/2025-02-21-test-suite.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
category: fix
---
* Fixed a recently-introduced bug that caused `js/server-side-unvalidated-url-redirection` to ignore
valid hostname checks and report spurious alerts after such a check. The original behaviour has been restored.
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
AngularJS/DeadAngularJSEventListener.ql
query: AngularJS/DeadAngularJSEventListener.ql
postprocess: utils/test/InlineExpectationsTestQuery.ql
Original file line number Diff line number Diff line change
@@ -1,50 +1,50 @@
angular.module('myModule', [])
.controller('MyController', function($scope) {
$scope.$on('destroy', cleanup); // BAD
$scope.$on('destroy', cleanup); // $ Alert
})
.controller('MyController', ["$scope", function(s) {
s.$on('destroy', cleanup); // BAD
s.$on('destroy', cleanup); // $ Alert
}])
.controller('MyController', function($scope) {
var destroy = 'destroy';
$scope.$on(destroy, cleanup); // BAD
$scope.$on(destroy, cleanup); // $ Alert
})
.controller('MyController', function($scope) {
$scope.$on('$destroy', cleanup); // GOOD
$scope.$on('$destroy', cleanup);
})
.controller('MyController', function($scope) {
$scope.$emit('foo');
$scope.$on('foo', cleanup); // GOOD
$scope.$on('foo', cleanup);
})
.controller('MyController', function($scope) {
$scope.$on('bar', cleanup); // BAD
$scope.$on('bar', cleanup); // $ Alert
})
.controller('MyController', function($scope) {
$scope.$on('$locationChangeStart', cleanup); // OK
$scope.$on('$locationChangeStart', cleanup);
})
.controller('MyController', function($scope) {
$scope.$on('lib1.foo', cleanup); // OK
$scope.$on('lib1.foo', cleanup);
})
.controller('MyController', function($scope) {
$scope.$on('lib2:foo', cleanup); // OK
$scope.$on('lib2:foo', cleanup);
})
.controller('MyController', function($scope) {
$scope.$on('onClick', cleanup); // OK
$scope.$on('onClick', cleanup);
})
.controller('MyController', function($scope) {
function f($scope){
$scope.$emit('probablyFromUserCode1')
}
$scope.$on('probablyFromUserCode1', cleanup); // OK
$scope.$on('probablyFromUserCode1', cleanup);
})
.controller('MyController', function($scope) {
function f($scope){
var scope = $scope;
scope.$emit('probablyFromUserCode2')
}
$scope.$on('probablyFromUserCode2', cleanup); // OK
$scope.$on('probablyFromUserCode2', cleanup);
})
.controller('MyController', function($scope) {
$scope.$on('event-from-AngularJS-expression', cleanup); // GOOD
$scope.$on('event-from-AngularJS-expression', cleanup);
})
;
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
AngularJS/DependencyMismatch.ql
query: AngularJS/DependencyMismatch.ql
postprocess: utils/test/InlineExpectationsTestQuery.ql
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
angular.module('app1', [])
.run(['dep1', 'dep2', 'dep3', function(dep1, dep3, dep2) {}]); // NOT OK
.run(['dep1', 'dep2', 'dep3', function(dep1, dep3, dep2) {}]); // $ Alert

angular.module('app2')
.directive('mydirective', [ '$compile', function($compile, $http) { // NOT OK
.directive('mydirective', [ '$compile', function($compile, $http) { // $ Alert
// ...
}]);

angular.module('app1', [])
.run(['dep1', 'dep2', 'dep3', function(dep1, dep2, dep3) {}]); // OK
.run(['dep1', 'dep2', 'dep3', function(dep1, dep2, dep3) {}]);

angular.module('app2')
.directive('mydirective', [ '$compile', '$http', function($compile, $http) { // OK
.directive('mydirective', [ '$compile', '$http', function($compile, $http) {
// ...
}]);

angular.module('app3', [])
.run(function(dep1, dep3) {}); // OK
.run(function(dep1, dep3) {});

angular.module('app4')
.directive('mydirective', function($compile, $http) { // OK
.directive('mydirective', function($compile, $http) {
// ...
});

angular.module('app5')
.directive('mydirective', [ 'fully.qualified.name', function(name) { // OK
.directive('mydirective', [ 'fully.qualified.name', function(name) {
// ...
}])

angular.module('app6')
.directive('mydirective', function() {
return {
link: function (scope, element, attrs) { // OK
link: function (scope, element, attrs) {
}
};
});
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
angular.module('app', [])
.config(function($sceProvider) {
$sceProvider.enabled(false); // BAD
$sceProvider.enabled(false); // $ Alert
})
.config(['otherProvider', function($sceProvider) {
$sceProvider.enabled(false); // OK
$sceProvider.enabled(false);
}])
.config(['$sceProvider', function(x) {
x.enabled(false); // BAD
x.enabled(false); // $ Alert
}])
.config(function($sceProvider) {
$sceProvider.enabled(true); // OK
$sceProvider.enabled(true);
})
.config(function($sceProvider) {
var x = false;
$sceProvider.enabled(x); // BAD
$sceProvider.enabled(x); // $ Alert
});
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
AngularJS/DisablingSce.ql
query: AngularJS/DisablingSce.ql
postprocess: utils/test/InlineExpectationsTestQuery.ql
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
AngularJS/DoubleCompilation.ql
query: AngularJS/DoubleCompilation.ql
postprocess: utils/test/InlineExpectationsTestQuery.ql
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ angular.module('app').directive('addMouseover', function($compile) {

attrs.$set('addMouseover', null); // To stop infinite compile loop
element.append(newEl);
$compile(element)(scope); // Double compilation
$compile(element)(scope); // $ Alert - Double compilation
}
}
})
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
AngularJS/IncompatibleService.ql
query: AngularJS/IncompatibleService.ql
postprocess: utils/test/InlineExpectationsTestQuery.ql
Original file line number Diff line number Diff line change
Expand Up @@ -11,68 +11,68 @@ angular.module('myModule', [])
;

angular.module('myModule2', [])
.controller('c0', function(factoryId){}) // OK
.controller('c1', function(serviceId){}) // OK
.controller('c2', function(valueId){}) // OK
.controller('c3', function(constantId){}) // OK
.controller('c4', function(providerId){}) // OK
.controller('c5', function($http){}) // OK
.controller('c6', function($provider){}) // NOT OK
.controller('c7', function($scope){}) // OK
.controller('c8', function($compile){}) // OK
.controller('c9', function(UNKNOWN){}) // OK
.controller('c10', function(providerIdProvider){}) // NOT OK
.controller('c11', function(providerIdProvider, UNKNOWN){}) // NOT OK, but only one error
.controller('c12', function($provide){}) // OK (special case)
.controller('c13', function(providerId2Provider){}) // NOT OK
.controller('c0', function(factoryId){})
.controller('c1', function(serviceId){})
.controller('c2', function(valueId){})
.controller('c3', function(constantId){})
.controller('c4', function(providerId){})
.controller('c5', function($http){})
.controller('c6', function($provider){}) // $ Alert
.controller('c7', function($scope){})
.controller('c8', function($compile){})
.controller('c9', function(UNKNOWN){})
.controller('c10', function(providerIdProvider){}) // $ Alert
.controller('c11', function(providerIdProvider, UNKNOWN){}) // $ Alert - but only one error
.controller('c12', function($provide){}) // OK - special case
.controller('c13', function(providerId2Provider){}) // $ Alert

.factory('s0', function(factoryId){}) // OK
.factory('s1', function(serviceId){}) // OK
.factory('s2', function(valueId){}) // OK
.factory('s3', function(constantId){}) // OK
.factory('s4', function(providerId){}) // OK
.factory('s5', function($http){}) // OK
.factory('s6', function($provider){}) // NOT OK
.factory('s7', function($scope){}) // NOT OK
.factory('s8', function($compile){}) // OK
.factory('s9', function(UNKNOWN){}) // OK
.factory('s10', function(providerIdProvider){}) // NOT OK
.factory('s11', function(providerIdProvider, UNKNOWN){}) // NOT OK, but only one error
.factory('s12', function($provide){}) // OK (special case)
.factory('s13', function(providerId2Provider){}) // NOT OK
.factory('s0', function(factoryId){})
.factory('s1', function(serviceId){})
.factory('s2', function(valueId){})
.factory('s3', function(constantId){})
.factory('s4', function(providerId){})
.factory('s5', function($http){})
.factory('s6', function($provider){}) // $ Alert
.factory('s7', function($scope){}) // $ Alert
.factory('s8', function($compile){})
.factory('s9', function(UNKNOWN){})
.factory('s10', function(providerIdProvider){}) // $ Alert
.factory('s11', function(providerIdProvider, UNKNOWN){}) // $ Alert - but only one error
.factory('s12', function($provide){}) // OK - special case
.factory('s13', function(providerId2Provider){}) // $ Alert

.run(function(factoryId){}) // OK
.run(function(serviceId){}) // OK
.run(function(valueId){}) // OK
.run(function(constantId){}) // OK
.run(function(providerId){}) // OK
.run(function($http){}) // OK
.run(function($provider){}) // NOT OK
.run(function($scope){}) // NOT OK
.run(function($compile){}) // OK
.run(function(UNKNOWN){}) // OK
.run(function(providerIdProvider){}) // NOT OK
.run(function(providerIdProvider, UNKNOWN){}) // NOT OK, but only one error
.run(function($provide){}) // OK (special case)
.run(function(providerId2Provider){}) // NOT OK
.run(function(factoryId){})
.run(function(serviceId){})
.run(function(valueId){})
.run(function(constantId){})
.run(function(providerId){})
.run(function($http){})
.run(function($provider){}) // $ Alert
.run(function($scope){}) // $ Alert
.run(function($compile){})
.run(function(UNKNOWN){})
.run(function(providerIdProvider){}) // $ Alert
.run(function(providerIdProvider, UNKNOWN){}) // $ Alert - but only one error
.run(function($provide){}) // OK - special case
.run(function(providerId2Provider){}) // $ Alert

.config(function(factoryId){}) // NOT OK
.config(function(serviceId){}) // NOT OK
.config(function(valueId){}) // NOT OK
.config(function(constantId){}) // OK
.config(function(providerId){}) // NOT OK
.config(function($http){}) // NOT OK
.config(function($provider){}) // OK
.config(function($scope){}) // NOT OK
.config(function($compile){}) // OK
.config(function(UNKNOWN){}) // OK
.config(function(providerIdProvider){}) // OK
.config(function(providerId, UNKNOWN){}) // NOT OK, but only one error
.config(function($provide){}) // OK (special case)
.config(function(valueId2){}) // NOT OK
.config(function(factoryId){}) // $ Alert
.config(function(serviceId){}) // $ Alert
.config(function(valueId){}) // $ Alert
.config(function(constantId){})
.config(function(providerId){}) // $ Alert
.config(function($http){}) // $ Alert
.config(function($provider){})
.config(function($scope){}) // $ Alert
.config(function($compile){})
.config(function(UNKNOWN){})
.config(function(providerIdProvider){})
.config(function(providerId, UNKNOWN){}) // $ Alert - but only one error
.config(function($provide){}) // OK - special case
.config(function(valueId2){}) // $ Alert

// service: same restrcitions as .factory
.service('s14', function(factoryId){}) // OK
.service('s15', function($provider){}) // NOT OK
.service('s14', function(factoryId){})
.service('s15', function($provider){}) // $ Alert

;
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
AngularJS/InsecureUrlWhitelist.ql
query: AngularJS/InsecureUrlWhitelist.ql
postprocess: utils/test/InlineExpectationsTestQuery.ql
Loading