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/Task/TryCatchTask.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 Task
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\Task;
16
use Netresearch\Kite\Exception;
17
use Netresearch\Kite\Task;
18
19
20
/**
21
 * Catch exceptions while executing tasks
22
 *
23
 * @category   Netresearch
24
 * @package    Netresearch\Kite
25
 * @subpackage Task
26
 * @author     Christian Opitz <[email protected]>
27
 * @license    http://www.netresearch.de Netresearch Copyright
28
 * @link       http://www.netresearch.de
29
 */
30
class TryCatchTask extends SubTask
31
{
32
    /**
33
     * @var \Netresearch\Kite\Task
34
     */
35
    protected $catchTask;
36
37
    /**
38
     * @var bool If the next fetched task should be the catch task
39
     */
40
    protected $catch = false;
41
42
    /**
43
     * Configure the options
44
     *
45
     * @return array
46
     */
47 View Code Duplication
    protected function configureVariables()
0 ignored issues
show
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
48
    {
49
        return array(
50
            'onCatch' => array(
51
                'type' => 'array',
52
                'label' => 'Task to execute when an exception was catched'
53
            ),
54
            'errorMessage' => array(
55
                'type' => 'string',
56
                'label' => 'Message to display on error'
57
            ),
58
            '--'
59
        ) + parent::configureVariables();
60
    }
61
62
    /**
63
     * Set a variable or it's value
64
     *
65
     * @param string $name  The name
66
     * @param mixed  $value The value
67
     *
68
     * @return void
69
     */
70
    public function offsetSet($name, $value)
71
    {
72
        if ($name === 'onCatch') {
73
            $this->catchTask = $this->factory->createTask($value, $this);
0 ignored issues
show
$value is of type *, 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...
74
            return;
75
        }
76
        parent::offsetSet($name, $value);
77
    }
78
79
80
    /**
81
     * Set task as catchTask if $this->catch
82
     *
83
     * @param \Netresearch\Kite\Task $task The task
84
     *
85
     * @return $this|mixed $this or the task return value when this is running
86
     */
87
    public function addTask(Task $task)
88
    {
89
        if ($this->catch) {
90
            $this->catchTask = $task;
91
            $this->catch = false;
92
            return $task;
93
        }
94
        return parent::addTask($task);
95
    }
96
97
    /**
98
     * Fetch the next task as that task to execute when an exception occured while
99
     * executing the other tasks
100
     *
101
     * @return $this
102
     */
103
    public function onCatch()
104
    {
105
        if ($this->catchTask) {
106
            throw new Exception('Only one task may be executed on catch');
107
        }
108
        $this->catch = true;
109
        return $this;
110
    }
111
112
    /**
113
     * Run an array of tasks
114
     *
115
     * @return mixed The ran tasks return value
116
     */
117
    public function run()
118
    {
119
        try {
120
            return parent::run();
121
        } catch (\Exception $e) {
122
            $message = $this->get('errorMessage');
123
            if ($message) {
124
                $this->console->output($message);
125
            }
126
            if ($this->catchTask) {
127
                return $this->addTask($this->catchTask);
128
            }
129
            return null;
130
        }
131
    }
132
}
133
?>
134