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/Workflow/Composer/Checkout.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\Workflow
9
 * @subpackage Composer
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\Workflow\Composer;
16
use Netresearch\Kite\Exception;
17
use Netresearch\Kite\Service\Composer\Package;
18
19
/**
20
 * Checkout a branch and eventually merge it with the previously checked out branch
21
 *
22
 * @category   Netresearch
23
 * @package    Netresearch\Kite\Workflow
24
 * @subpackage Composer
25
 * @author     Christian Opitz <[email protected]>
26
 * @license    http://www.netresearch.de Netresearch Copyright
27
 * @link       http://www.netresearch.de
28
 */
29
class Checkout extends Base
30
{
31
    /**
32
     * Configures the arguments/options
33
     *
34
     * @return array
35
     */
36
    protected function configureVariables()
37
    {
38
        return array(
39
            'branch' => array(
40
                'type' => 'string|array',
41
                'label' => 'The branch(es) to check out (fallback is always master)',
42
                'argument' => true,
43
                'required' => true
44
            ),
45
            'merge' => array(
46
                'type' => 'bool',
47
                'label' => 'Whether to merge the checked out branch with the previously checked out branch',
48
                'option' => true,
49
                'shortcut' => 'm'
50
            ),
51
            'create' => array(
52
                'type' => 'bool',
53
                'label' => 'Create branch if not exists',
54
                'option' => true,
55
                'shortcut' => 'c'
56
            ),
57
            '--'
58
        ) + parent::configureVariables();
59
    }
60
61
    /**
62
     * Override to assemble the tasks
63
     *
64
     * @return void
65
     */
66
    public function assemble()
67
    {
68
        $this->callback(
69
            function () {
70
                $this->checkoutPackages(
71
                    array_unique(array_merge((array) $this->get('branch'), ['master'])),
72
                    $this->get('merge'),
73
                    $this->get('create')
74
                );
75
            }
76
        );
77
    }
78
79
    /**
80
     * Go through all packages and check it out in the first matching branch
81
     *
82
     * @param array $branches The branches to try
83
     * @param bool  $merge    Whether to merge the new branch with the previously
84
     *                        checked out branch
85
     * @param bool  $create   Create branch if not exists
86
     *
87
     * @throws Exception\MissingVariableException
88
     *
89
     * @return void
90
     */
91
    protected function checkoutPackages(array $branches, $merge = false, $create = false)
92
    {
93
        /* @var $packages \Netresearch\Kite\Service\Composer\Package[] */
94
        $packages = array();
95
        foreach ($this->getPackages() as $package) {
96
            foreach ($branches as $branch) {
97
                $oldBranch = $package->branch;
98
                if ($this->checkoutPackage($package, $branch, $create) !== false) {
99
                    $packages[$package->name] = $package;
100
                    if ($merge && $oldBranch !== $branch) {
101
                        $this->mergePackage($package, $oldBranch);
102
                    }
103
                    continue 2;
104
                }
105
            }
106
        }
107
108
        if (!$packages) {
0 ignored issues
show
Bug Best Practice introduced by
The expression $packages of type array<*,Netresearch\Kite...rvice\Composer\Package> is implicitly converted to a boolean; are you sure this is intended? If so, consider using empty($expr) instead to make it clear that you intend to check for an array without elements.

This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent.

Consider making the comparison explicit by using empty(..) or ! empty(...) instead.

Loading history...
109
            $lastBranch = array_pop($branches);
110
            $message = 'Could not find branch ';
111
            if ($branches) {
0 ignored issues
show
Bug Best Practice introduced by
The expression $branches of type array is implicitly converted to a boolean; are you sure this is intended? If so, consider using ! empty($expr) instead to make it clear that you intend to check for an array without elements.

This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent.

Consider making the comparison explicit by using empty(..) or ! empty(...) instead.

Loading history...
112
                $message .= implode(', ', $branches) . ' or ';
113
            }
114
            $message .= $lastBranch . ' in any installed package';
115
            $this->console->output("<warning>$message</warning>");
116
            return;
117
        }
118
119
        $this->rewriteRequirements($packages, $merge);
120
        $this->pushPackages();
121
122
        // Each package containing one of the branches should now be checked out in
123
        // this branch. Anyway we do a composer update in order to update lock file
124
        // and eventually changed dependencies
125
        $this->doComposerUpdate();
126
    }
127
}
128
129
?>
130