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

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/JiraClientResponse.php (1 issue)

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
namespace JiraRestApi;
4
5
use Psr\Http\Message\ResponseInterface;
6
use Psr\Http\Message\StreamInterface;
7
use Psr\Log\LoggerInterface;
8
9
class JiraClientResponse
10
{
11
    protected $originalResponse;
12
    protected $response;
13
14
    /**
15
     * raw response
16
     */
17
    protected $raw;
18
19
    /**
20
     * interpreted response array
21
     */
22
    protected $rawData = [];
23
24
    /**
25
     * error code if available
26
     */
27
    protected $code;
28
29
    /**
30
     * error message if present
31
     */
32
    protected $error;
33
34
    /**
35
     * @var LoggerInterface
36
     */
37
    protected $log;
38
39
    /**
40
     * AbstractResponse constructor.
41
     * @param ResponseInterface $raw
42
     */
43
    public function __construct(ResponseInterface $raw, LoggerInterface $logger)
44
    {
45
        $this->raw = $raw;
46
        $this->log = $logger;
47
    }
48
49
    /**
50
     * @return bool
51
     */
52
    public function parse()
53
    {
54
        /** @var StreamInterface $body */
55
        $body = $this->raw->getBody();
56
        $content = (string) $body;
57
        $content = json_decode($content, true);
58
59
        $this->code = $this->raw->getStatusCode();
60
61
        if (in_array($this->code, [200, 201, 204])) {
62
            $this->rawData = $content;
0 ignored issues
show
Documentation Bug introduced by
It seems like $content of type * is incompatible with the declared type array of property $rawData.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
63
        } else {
64
            $this->error = $content;
65
            $this->log->error('JiraRestApi parse response error: ', [$this->error]);
66
        }
67
68
        return $this;
69
    }
70
71
    /**
72
     * @return array
73
     */
74
    public function getRawData()
75
    {
76
        return $this->rawData;
77
    }
78
79
    /**
80
     * @param $rawData
81
     */
82
    public function setRawData(array $rawData)
83
    {
84
        $this->rawData = array_merge_recursive($this->rawData, $rawData);
85
    }
86
87
    /**
88
     * @return ResponseInterface
89
     */
90
    public function getRaw()
91
    {
92
        return $this->raw;
93
    }
94
95
    /**
96
     * @return ResponseInterface
97
     */
98
    public function getCode()
99
    {
100
        return $this->code;
101
    }
102
103
    /**
104
     * @return ResponseInterface
105
     */
106
    public function getError()
107
    {
108
        return $this->error;
109
    }
110
111
    /**
112
     * @return ResponseInterface
113
     */
114
    public function hasErrors()
115
    {
116
        return !empty($this->error);
117
    }
118
119
    /**
120
     * @param $message
121
     *
122
     * @return $this
123
     */
124
    public function setError($message)
125
    {
126
        if(is_array($this->error) && isset($this->error['errorMessages'])) {
127
            $this->error['errorMessages'][] = $message;
128
        } else {
129
            $this->error = ['errorMessages' => [$message]];
130
        }
131
132
        return $this;
133
    }
134
135
    /**
136
     * @param $name
137
     * @param $args
138
     * @return mixed
139
     * @throws \Exception
140
     */
141
    public function __call($name, $args)
142
    {
143
        $key = strtolower(str_replace('get', '', $name));
144
145
        if (isset($this->rawData[$key])) {
146
            return $this->rawData[$key];
147
        }
148
149
        throw new \Exception('JiraApi: unknown field ' . $key);
150
    }
151
}