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

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/Saltwater/Server.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
namespace Saltwater;
4
5
use Saltwater\Water\Navigator;
6
7
class Server
8
{
9
    /** @var Navigator */
10
    public static $n;
11
12
    /** @var float */
13
    public static $start;
14
15
    /** @var array */
16
    public static $env = array();
17
18
    /**
19
     * Kick off the server with a set of modules.
20
     *
21
     * The first module is automatically the root module.
22
     *
23
     * @param string   $path    filepath to deployment directory
24
     * @param string[] $modules array of class names of modules to include
25
     *
26
     * @return void
27
     */
28
    public static function bootstrap($path = null, $modules = array())
29
    {
30
        self::start();
31
32
        self::$env['name'] = basename($path);
33
34
        self::$env['root-path'] = $path;
35
36
        self::detectEnv();
37
38
        if ($modules) {
0 ignored issues
show
Bug Best Practice introduced by
The expression $modules of type string[] 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...
39
            self::addModules($modules);
40
        }
41
    }
42
43
    /**
44
     * Detect some basic information about our deployment
45
     *
46
     * @return void
47
     */
48
    private static function detectEnv()
49
    {
50
        self::$env['gt36'] = version_compare(phpversion(), '5.3.6', '>=');
51
        self::$env['gt54'] = version_compare(phpversion(), '5.4.0', '>=');
52
    }
53
54
    /**
55
     * Init Server from Cache
56
     *
57
     * @param $modules
58
     * @param $cache
59
     *
60
     * @return void
61
     */
62
    private static function initCached($modules, $cache)
0 ignored issues
show
This method is not used, and could be removed.
Loading history...
63
    {
64
        if (self::loadCache($cache)) {
65
            return;
66
        }
67
68
        self::addModules($modules);
69
70
        self::$n->storeCache($cache);
71
    }
72
73
    /**
74
     * Set timestamp and Navigator instance
75
     *
76
     * @return void
77
     */
78
    private static function start()
79
    {
80
        if (!empty(self::$start)) {
81
            return;
82
        }
83
84
        /** @var float $start */
85
        self::$start = microtime(true);
86
87
        self::$n = new Navigator();
88
    }
89
90
    /**
91
     * @param string $cache
92
     *
93
     * @return bool
94
     */
95
    private static function loadCache($cache)
96
    {
97
        if (!file_exists($cache)) {
98
            return false;
99
        }
100
101
        return self::$n->loadCache($cache);
102
    }
103
104
    /**
105
     * Add one or more modules to the Saltwater\Navigator module stack
106
     *
107
     * Proxy for Saltwater\Navigator::addModule()
108
     *
109
     * @param string[] $array
110
     *
111
     * @return bool|null
112
     */
113
    private static function addModules($array)
114
    {
115
        if (empty(self::$start)) {
116
            self::bootstrap();
117
        }
118
119
        if (!is_array($array)) {
120
            $array = array($array);
121
        }
122
123
        foreach ($array as $i => $module) {
124
            self::$n->modules->append($module, $i == 0);
125
        }
126
    }
127
128
    /**
129
     * Add a module to the Saltwater\Navigator module stack
130
     *
131
     * Proxy for Saltwater\Navigator::addModule()
132
     *
133
     * @param string $class
134
     * @param bool   $master
135
     *
136
     * @return bool|null
137
     */
138
    public static function addModule($class, $master = true)
139
    {
140
        return self::$n->modules->append($class, $master);
141
    }
142
143
    /**
144
     * Halt the server and send a html header response
145
     *
146
     * @param int    $code
147
     * @param string $message
148
     *
149
     * @return void
150
     */
151
    public static function halt($code, $message)
152
    {
153
        header("HTTP/1.1 " . $code . " " . $message);
154
    }
155
156
    /**
157
     * Forget everything
158
     *
159
     * @return void
160
     */
161
    public static function destroy()
162
    {
163
        self::$n = null;
164
165
        self::$start = null;
166
    }
167
}
168