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:
David Remer
2024-12-19 14:59:35 +02:00
committed by David Remer
parent 891bc34efa
commit 9b0cce9c0d

View File

@ -72,7 +72,7 @@ class API {
},
'permission_callback' => function () use ($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,
]);