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 (120)

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/Service/Composer.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
2
/**
3
 * See class comment
4
 *
5
 * PHP Version 5
6
 *
7
 * @category   Netresearch
8
 * @package    Netresearch\Kite
9
 * @subpackage Service
10
 * @author     Christian Opitz <[email protected]>
11
 * @license    http://www.netresearch.de Netresearch Copyright
12
 * @link       http://www.netresearch.de
13
 */
14
15
namespace Netresearch\Kite\Service;
16
use Netresearch\Kite\Job;
17
use Netresearch\Kite\Service\Composer\Package;
18
use Netresearch\Kite\Task;
19
use Netresearch\Kite\Exception;
20
use Netresearch\Kite\Tasks;
21
22
/**
23
 * Composer service
24
 *
25
 * @category   Netresearch
26
 * @package    Netresearch\Kite
27
 * @subpackage Service
28
 * @author     Christian Opitz <[email protected]>
29
 * @license    http://www.netresearch.de Netresearch Copyright
30
 * @link       http://www.netresearch.de
31
 */
32
class Composer extends Tasks
33
{
34
    /**
35
     * @var bool
36
     */
37
    protected $tasksInvalid = true;
38
39
    /**
40
     * Job constructor.
41
     *
42
     * @param Job $job The job
43
     */
44
    public function __construct(Job $job)
45
    {
46
        parent::__construct($job);
47
        $this->run();
48
    }
49
50
    /**
51
     * Invalidate the packages
52
     *
53
     * @return void
54
     */
55
    public function invalidatePackages()
56
    {
57
        $this->tasksInvalid = true;
58
    }
59
60
    /**
61
     * Get a variable (second argument can be a default value)
62
     *
63
     * @param string $name The variable name
64
     *
65
     * @return mixed
66
     */
67
    public function &offsetGet($name)
68
    {
69
        if ($this->tasksInvalid && in_array($name, array('packages', 'rootPackage'), true)) {
70
            $this->tasksInvalid = false;
71
            $packages = $this->getPackages();
72
            parent::offsetSet('packages', $packages);
0 ignored issues
show
Comprehensibility Bug introduced by
It seems like you call parent on a different method (offsetSet() instead of offsetGet()). Are you sure this is correct? If so, you might want to change this to $this->offsetSet().

This check looks for a call to a parent method whose name is different than the method from which it is called.

Consider the following code:

class Daddy
{
    protected function getFirstName()
    {
        return "Eidur";
    }

    protected function getSurName()
    {
        return "Gudjohnsen";
    }
}

class Son
{
    public function getFirstName()
    {
        return parent::getSurname();
    }
}

The getFirstName() method in the Son calls the wrong method in the parent class.

Loading history...
73
            parent::offsetSet('rootPackage', reset($packages));
0 ignored issues
show
Comprehensibility Bug introduced by
It seems like you call parent on a different method (offsetSet() instead of offsetGet()). Are you sure this is correct? If so, you might want to change this to $this->offsetSet().

This check looks for a call to a parent method whose name is different than the method from which it is called.

Consider the following code:

class Daddy
{
    protected function getFirstName()
    {
        return "Eidur";
    }

    protected function getSurName()
    {
        return "Gudjohnsen";
    }
}

class Son
{
    public function getFirstName()
    {
        return parent::getSurname();
    }
}

The getFirstName() method in the Son calls the wrong method in the parent class.

Loading history...
74
        }
75
        return parent::offsetGet($name);
76
    }
77
78
    /**
79
     * Determine if a variable is available on this very object
80
     *
81
     * @param mixed $offset Variable name
82
     *
83
     * @internal See {@see Variables::offsetGet()}
84
     *
85
     * @return boolean
86
     */
87
    public function offsetExists($offset)
88
    {
89
        return in_array($offset, array('packages', 'rootPackage')) || parent::offsetExists($offset);
90
    }
91
92
93
    /**
94
     * Get all packages
95
     *
96
     * @return array
97
     */
98
    protected function getPackages()
99
    {
100
        $packages = array();
101
102
        $this->output('<step>Gathering composer package information</step>');
103
104
        $composerJson = new Package($this, 'composer.json', true);
105
        if (!isset($composerJson->name)) {
106
            throw new Exception('No name for project found in composer.json');
107
        }
108
        $packages[$composerJson->name] = $composerJson;
109
110
        if (!file_exists('composer.lock')) {
111
            throw new Exception('Please install application first');
112
        }
113
        $composerLock = json_decode(file_get_contents('composer.lock'));
114
115
        $packagePaths = $this->composer('show', '--installed --path --no-ansi', array('pt' => false));
116
        foreach (explode("\n", $packagePaths) as $line) {
117
            list($packageName, $packagePath) = preg_split('/\s+/', $line, 2);
118
            foreach ($composerLock->packages as $package) {
119
                if ($package->name === $packageName && $package->type !== 'metapackage') {
120
                    $package->path = $packagePath;
121
                    $packages[$packageName] = new Package($this, $package);
122
                }
123
            }
124
        }
125
126
        return $packages;
127
    }
128
}
129
?>
130