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

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/JonnyW/PhantomJs/Http/CaptureRequest.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
/*
4
 * This file is part of the php-phantomjs.
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 */
9
10
namespace JonnyW\PhantomJs\Http;
11
12
use JonnyW\PhantomJs\Exception\NotWritableException;
13
14
/**
15
 * PHP PhantomJs.
16
 *
17
 * @author Jon Wenmoth <[email protected]>
18
 */
19
class CaptureRequest extends AbstractRequest
20
    implements CaptureRequestInterface
21
{
22
    /**
23
     * Request type.
24
     *
25
     * @var string
26
     */
27
    protected $type;
28
29
    /**
30
     * File to save output.
31
     *
32
     * @var string
33
     */
34
    protected $outputFile;
35
36
    /**
37
     * Rect top.
38
     *
39
     * @var int
40
     */
41
    protected $rectTop;
42
43
    /**
44
     * Rect left.
45
     *
46
     * @var int
47
     */
48
    protected $rectLeft;
49
50
    /**
51
     * Rect width.
52
     *
53
     * @var int
54
     */
55
    protected $rectWidth;
56
57
    /**
58
     * Rect height.
59
     *
60
     * @var int
61
     */
62
    protected $rectHeight;
63
64
    /**
65
     * Capture Format.
66
     *
67
     * @var string
68
     */
69
    protected $format;
70
71
    /**
72
     * Capture Quality.
73
     *
74
     * @var int
75
     */
76
    protected $quality;
77
78
    /**
79
     * Internal constructor.
80
     *
81
     * @param string $url     (default: null)
82
     * @param string $method  (default: RequestInterface::METHOD_GET)
83
     * @param int    $timeout (default: 5000)
84
     *
85
     * @return \JonnyW\PhantomJs\Http\CaptureRequest
0 ignored issues
show
Comprehensibility Best Practice introduced by
Adding a @return annotation to constructors is generally not recommended as a constructor does not have a meaningful return value.

Adding a @return annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.

Please refer to the PHP core documentation on constructors.

Loading history...
86
     */
87 66
    public function __construct($url = null, $method = RequestInterface::METHOD_GET, $timeout = 5000)
88
    {
89 66
        parent::__construct($url, $method, $timeout);
90
91 66
        $this->rectTop = 0;
92 66
        $this->rectLeft = 0;
93 66
        $this->rectWidth = 0;
94 66
        $this->rectHeight = 0;
95 66
        $this->format = 'jpeg';
96 66
        $this->quality = 75;
97 66
    }
98
99
    /**
100
     * Get request type.
101
     *
102
     * @return string
103
     */
104 9
    public function getType()
105
    {
106 9
        if (!$this->type) {
107 8
            return RequestInterface::REQUEST_TYPE_CAPTURE;
108
        }
109
110 1
        return $this->type;
111
    }
112
113
    /**
114
     * Set request type.
115
     *
116
     * @param string $type
117
     *
118
     * @return \JonnyW\PhantomJs\Http\AbstractRequest
119
     */
120 2
    public function setType($type)
121
    {
122 2
        $this->type = $type;
123
124 2
        return $this;
125
    }
126
127
    /**
128
     * Set viewport size.
129
     *
130
     * @param int $width
131
     * @param int $height
132
     * @param int $top    (default: 0)
133
     * @param int $left   (default: 0)
134
     *
135
     * @return \JonnyW\PhantomJs\Http\AbstractRequest
136
     */
137 5
    public function setCaptureDimensions($width, $height, $top = 0, $left = 0)
138
    {
139 5
        $this->rectWidth = (int) $width;
140 5
        $this->rectHeight = (int) $height;
141 5
        $this->rectTop = (int) $top;
142 5
        $this->rectLeft = (int) $left;
143
144 5
        return $this;
145
    }
146
147
    /**
148
     * Get rect top.
149
     *
150
     * @return int
151
     */
152 14
    public function getRectTop()
153
    {
154 14
        return (int) $this->rectTop;
155
    }
156
157
    /**
158
     * Get rect left.
159
     *
160
     * @return int
161
     */
162 14
    public function getRectLeft()
163
    {
164 14
        return (int) $this->rectLeft;
165
    }
166
167
    /**
168
     * Get rect width.
169
     *
170
     * @return int
171
     */
172 14
    public function getRectWidth()
173
    {
174 14
        return (int) $this->rectWidth;
175
    }
176
177
    /**
178
     * Get rect height.
179
     *
180
     * @return int
181
     */
182 14
    public function getRectHeight()
183
    {
184 14
        return (int) $this->rectHeight;
185
    }
186
187
    /**
188
     * Set file to save output.
189
     *
190
     * @param string $file
191
     *
192
     * @throws \JonnyW\PhantomJs\Exception\NotWritableException
193
     *
194
     * @return \JonnyW\PhantomJs\Http\CaptureRequest
195
     */
196 12
    public function setOutputFile($file)
197
    {
198 12
        if (!is_writable(dirname($file))) {
199 1
            throw new NotWritableException(sprintf('Output file is not writeable by PhantomJs: %s', $file));
200
        }
201
202 11
        $this->outputFile = $file;
203
204 11
        return $this;
205
    }
206
207
    /**
208
     * Get output file.
209
     *
210
     * @return string
211
     */
212 15
    public function getOutputFile()
213
    {
214 15
        return $this->outputFile;
215
    }
216
217
    /**
218
     * Get image format of the capture.
219
     *
220
     * @return string
221
     */
222 7
    public function getFormat()
223
    {
224 7
        return $this->format;
225
    }
226
227
    /**
228
     * Set image format of capture.
229
     * options: pdf, png, jpeg, bmp, ppm, gif.
230
     *
231
     * @param string $format
232
     */
233
    public function setFormat($format)
234
    {
235
        $this->format = $format;
236
237
        return $this;
238
    }
239
240
    /**
241
     * Get quality of capture.
242
     *
243
     * @return string
244
     */
245 7
    public function getQuality()
246
    {
247 7
        return $this->quality;
248
    }
249
250
    /**
251
     * Set quality of the capture.
252
     * example: 0 - 100.
253
     *
254
     * @param int $format
255
     */
256
    public function setQuality($quality)
257
    {
258
        $this->quality = (int) $quality;
259
260
        return $this;
261
    }
262
}
263