GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Issues (107)

Security Analysis    no request data  

This project does not seem to handle request data directly as such no vulnerable execution paths were found.

  Cross-Site Scripting
Cross-Site Scripting enables an attacker to inject code into the response of a web-request that is viewed by other users. It can for example be used to bypass access controls, or even to take over other users' accounts.
  File Exposure
File Exposure allows an attacker to gain access to local files that he should not be able to access. These files can for example include database credentials, or other configuration files.
  File Manipulation
File Manipulation enables an attacker to write custom data to files. This potentially leads to injection of arbitrary code on the server.
  Object Injection
Object Injection enables an attacker to inject an object into PHP code, and can lead to arbitrary code execution, file exposure, or file manipulation attacks.
  Code Injection
Code Injection enables an attacker to execute arbitrary code on the server.
  Response Splitting
Response Splitting can be used to send arbitrary responses.
  File Inclusion
File Inclusion enables an attacker to inject custom files into PHP's file loading mechanism, either explicitly passed to include, or for example via PHP's auto-loading mechanism.
  Command Injection
Command Injection enables an attacker to inject a shell command that is execute with the privileges of the web-server. This can be used to expose sensitive data, or gain access of your server.
  SQL Injection
SQL Injection enables an attacker to execute arbitrary SQL code on your database server gaining access to user data, or manipulating user data.
  XPath Injection
XPath Injection enables an attacker to modify the parts of XML document that are read. If that XML document is for example used for authentication, this can lead to further vulnerabilities similar to SQL Injection.
  LDAP Injection
LDAP Injection enables an attacker to inject LDAP statements potentially granting permission to run unauthorized queries, or modify content inside the LDAP tree.
  Header Injection
  Other Vulnerability
This category comprises other attack vectors such as manipulating the PHP runtime, loading custom extensions, freezing the runtime, or similar.
  Regex Injection
Regex Injection enables an attacker to execute arbitrary code in your PHP process.
  XML Injection
XML Injection enables an attacker to read files on your local filesystem including configuration files, or can be abused to freeze your web-server process.
  Variable Injection
Variable Injection enables an attacker to overwrite program variables with custom data, and can lead to further vulnerabilities.
Unfortunately, the security analysis is currently not available for your project. If you are a non-commercial open-source project, please contact support to gain access.

src/Client.php (2 issues)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php declare(strict_types=1);
2
3
namespace ApiClients\Client\Github;
4
5
use ApiClients\Client\Github\Resource\UserInterface;
6
use ApiClients\Foundation\Factory as FoundationClientFactory;
7
use ApiClients\Foundation\Options;
8
use ApiClients\Foundation\Resource\ResourceInterface;
9
use function Clue\React\Block\await;
10
use React\EventLoop\Factory;
11
use React\EventLoop\LoopInterface;
12
use Rx\Scheduler;
13
14
final class Client implements ClientInterface
15
{
16
    /**
17
     * @var LoopInterface
18
     */
19
    private $loop;
20
21
    /**
22
     * @var AsyncClient
23
     */
24
    private $asyncClient;
25
26
    /**
27
     * @param LoopInterface $loop
28
     * @param AsyncClient   $client
29
     */
30 1
    private function __construct(LoopInterface $loop, AsyncClient $client)
31
    {
32 1
        $this->loop = $loop;
33 1
        $this->asyncClient = $client;
34 1
    }
35
36
    /**
37
     * @param  AuthenticationInterface $auth
38
     * @param  array                   $options
39
     * @return Client
40
     */
41 1
    public static function create(
42
        AuthenticationInterface $auth,
43
        array $options = []
44
    ): self {
45 1
        $loop = Factory::create();
46 1
        $options = ApiSettings::getOptions($auth, $options, 'Sync');
47 1
        $rateLimitState = new RateLimitState();
48 1
        $options[Options::CONTAINER_DEFINITIONS][RateLimitState::class] = $rateLimitState;
49 1
        $client = FoundationClientFactory::create($loop, $options);
50
51
        try {
52 1
            Scheduler::setAsyncFactory(function () use ($loop) {
53
                return new Scheduler\EventLoopScheduler($loop);
0 ignored issues
show
$loop is of type object<React\EventLoop\LoopInterface>, but the function expects a callable.

It seems like the type of the argument is not accepted by the function/method which you are calling.

In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.

We suggest to add an explicit type cast like in the following example:

function acceptsInteger($int) { }

$x = '123'; // string "123"

// Instead of
acceptsInteger($x);

// we recommend to use
acceptsInteger((integer) $x);
Loading history...
54 1
            });
55
        } catch (\Throwable $t) {
0 ignored issues
show
Coding Style Comprehensibility introduced by
Consider adding a comment why this CATCH block is empty.
Loading history...
56
        }
57
58 1
        $asyncClient = AsyncClient::createFromClient($client, $rateLimitState);
59
60 1
        return new self($loop, $asyncClient);
61
    }
62
63
    public function hydrate(string $resource): ResourceInterface
64
    {
65
        return await(
66
            $this->asyncClient->hydrate($resource),
67
            $this->loop
68
        );
69
    }
70
71
    public function extract(ResourceInterface $resource): string
72
    {
73
        return await(
74
            $this->asyncClient->extract($resource),
75
            $this->loop
76
        );
77
    }
78
79
    /**
80
     * @param  string        $user
81
     * @return UserInterface
82
     */
83
    public function user(string $user): UserInterface
84
    {
85
        return await(
86
            $this->asyncClient->user($user),
87
            $this->loop
88
        );
89
    }
90
91
    /**
92
     * @return RateLimitState
93
     */
94 1
    public function getRateLimitState(): RateLimitState
95
    {
96 1
        return $this->asyncClient->getRateLimitState();
97
    }
98
}
99