Skip permission-callback scan for the line
The endpoint container can only return a Endpoint instance and checkPermissions returns always a boolean. The QIT check therefore is a false positive [MAILPOET-6398]
This commit is contained in:
@ -72,7 +72,7 @@ class API {
|
|||||||
},
|
},
|
||||||
'permission_callback' => function () use ($endpointClass) {
|
'permission_callback' => function () use ($endpointClass) {
|
||||||
$endpoint = $this->endpointContainer->get($endpointClass);
|
$endpoint = $this->endpointContainer->get($endpointClass);
|
||||||
return $endpoint->checkPermissions();
|
return $endpoint->checkPermissions(); // nosemgrep: scanner.php.wp.security.rest-route.permission-callback.incorrect-return
|
||||||
},
|
},
|
||||||
'args' => $schema,
|
'args' => $schema,
|
||||||
]);
|
]);
|
||||||
|
Reference in New Issue
Block a user