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

Security Analysis    not enabled

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/Vectorface/SnappyRouter/php-5.3-compat.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 Vectorface\SnappyRouter;
4
5
use \Exception;
6
use Vectorface\SnappyRouter\Di\Di;
7
use Vectorface\SnappyRouter\Response\AbstractResponse;
8
9
function http_response_code($code = null)
10
{
11 12
    if (function_exists('\http_response_code')) {
12
        // @codeCoverageIgnoreStart
13
        return \http_response_code($code);
14
    }
15
    // @codeCoverageIgnoreEnd
16
17 12
    $diKey = 'currentResponseCode';
18 12
    if (null === $code) {
19
        try {
20 1
            return Di::getDefault()->get($diKey);
21 1
        } catch (Exception $e) {
22 1
            return Di::getDefault()->set($diKey, AbstractResponse::RESPONSE_OK)->get($diKey);
23
        }
24
    }
25
26
    $http_status_codes = array(
27 11
        100 => 'Continue',
28
        101 => 'Switching Protocols',
29
        102 => 'Processing',
30
        200 => 'OK',
31
        201 => 'Created',
32
        202 => 'Accepted',
33
        203 => 'Non-Authoritative Information',
34
        204 => 'No Content',
35
        205 => 'Reset Content',
36
        206 => 'Partial Content',
37
        207 => 'Multi-Status',
38
        300 => 'Multiple Choices',
39
        301 => 'Moved Permanently',
40
        302 => 'Found',
41
        303 => 'See Other',
42
        304 => 'Not Modified',
43
        305 => 'Use Proxy',
44
        306 => '(Unused)',
45
        307 => 'Temporary Redirect',
46
        308 => 'Permanent Redirect',
47
        400 => 'Bad Request',
48
        401 => 'Unauthorized',
49
        402 => 'Payment Required',
50
        403 => 'Forbidden',
51
        404 => 'Not Found',
52
        405 => 'Method Not Allowed',
53
        406 => 'Not Acceptable',
54
        407 => 'Proxy Authentication Required',
55
        408 => 'Request Timeout',
56
        409 => 'Conflict',
57
        410 => 'Gone',
58
        411 => 'Length Required',
59
        412 => 'Precondition Failed',
60
        413 => 'Request Entity Too Large',
61
        414 => 'Request-URI Too Long',
62
        415 => 'Unsupported Media Type',
63
        416 => 'Requested Range Not Satisfiable',
64
        417 => 'Expectation Failed',
65
        418 => 'I\'m a teapot',
66
        419 => 'Authentication Timeout',
67
        420 => 'Enhance Your Calm',
68
        422 => 'Unprocessable Entity',
69
        423 => 'Locked',
70
        424 => 'Failed Dependency',
71
        424 => 'Method Failure',
72
        425 => 'Unordered Collection',
73
        426 => 'Upgrade Required',
74
        428 => 'Precondition Required',
75
        429 => 'Too Many Requests',
76
        431 => 'Request Header Fields Too Large',
77
        444 => 'No Response',
78
        449 => 'Retry With',
79
        450 => 'Blocked by Windows Parental Controls',
80
        451 => 'Unavailable For Legal Reasons',
81
        494 => 'Request Header Too Large',
82
        495 => 'Cert Error',
83
        496 => 'No Cert',
84
        497 => 'HTTP to HTTPS',
85
        499 => 'Client Closed Request',
86
        500 => 'Internal Server Error',
87
        501 => 'Not Implemented',
88
        502 => 'Bad Gateway',
89
        503 => 'Service Unavailable',
90
        504 => 'Gateway Timeout',
91
        505 => 'HTTP Version Not Supported',
92
        506 => 'Variant Also Negotiates',
93
        507 => 'Insufficient Storage',
94
        508 => 'Loop Detected',
95
        509 => 'Bandwidth Limit Exceeded',
96
        510 => 'Not Extended',
97
        511 => 'Network Authentication Required',
98
        598 => 'Network read timeout error',
99
        599 => 'Network connect timeout error'
100
    );
101
102 11
    $code = intval($code);
103 11
    if (!isset($http_status_codes[$code])) {
104 1
        throw new Exception('Invalid response code: '.$code);
105
    }
106 10
    $protocol = (isset($_SERVER['SERVER_PROTOCOL'])) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.1';
107 10
    @header(sprintf('%s %s %s', $protocol, $code, $http_status_codes[$code]));
0 ignored issues
show
Security Best Practice introduced by
It seems like you do not handle an error condition here. This can introduce security issues, and is generally not recommended.

If you suppress an error, we recommend checking for the error condition explicitly:

// For example instead of
@mkdir($dir);

// Better use
if (@mkdir($dir) === false) {
    throw new \RuntimeException('The directory '.$dir.' could not be created.');
}
Loading history...
108 10
    Di::getDefault()->set($diKey, $code);
109
}
110