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

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/Application.php (4 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 Nip;
4
5
use Nip\Application\ApplicationInterface;
6
use Nip\Application\Bootstrap\CoreBootstrapersTrait;
7
use Nip\Application\Traits\BindPathsTrait;
8
use Nip\Application\Traits\EnviromentConfiguration;
9
use Nip\AutoLoader\AutoLoaderAwareTrait;
10
use Nip\AutoLoader\AutoLoaderServiceProvider;
11
use Nip\Container\ContainerAliasBindingsTrait;
12
use Nip\Container\ServiceProviders\ServiceProviderAwareTrait;
13
use Nip\Database\DatabaseServiceProvider;
14
use Nip\Dispatcher\DispatcherAwareTrait;
15
use Nip\Dispatcher\DispatcherServiceProvider;
16
use Nip\Filesystem\FilesystemServiceProvider;
17
use Nip\FlashData\FlashServiceProvider;
18
use Nip\Http\Response\Response;
19
use Nip\I18n\TranslatorServiceProvider;
20
use Nip\Inflector\InflectorServiceProvider;
21
use Nip\Locale\LocaleServiceProvider;
22
use Nip\Logger\LoggerServiceProvider;
23
use Nip\Mail\MailServiceProvider;
24
use Nip\Mvc\MvcServiceProvider;
25
use Nip\Router\RouterAwareTrait;
26
use Nip\Router\RouterServiceProvider;
27
use Nip\Router\RoutesServiceProvider;
28
use Nip\Staging\StagingAwareTrait;
29
use Nip\Staging\StagingServiceProvider;
30
use Symfony\Component\HttpKernel\Exception\HttpException;
31
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
32
33
/**
34
 * Class Application
35
 * @package Nip
36
 */
37
class Application implements ApplicationInterface
38
{
39
    use ContainerAliasBindingsTrait;
40
    use CoreBootstrapersTrait;
41
    use ServiceProviderAwareTrait;
42
    use BindPathsTrait;
43
    use EnviromentConfiguration;
44
    use AutoLoaderAwareTrait;
45
    use RouterAwareTrait;
46
    use DispatcherAwareTrait;
47
    use StagingAwareTrait;
48
49
    /**
50
     * The ByTIC framework version.
51
     *
52
     * @var string
53
     */
54
    const VERSION = '1.0.1';
55
56
    /**
57
     * Indicates if the application has "booted".
58
     *
59
     * @var bool
60
     */
61
    protected $booted = false;
62
63
    /**
64
     * @var null|Request
65
     */
66
    protected $request = null;
67
68
    /**
69
     * Create a new Illuminate application instance.
70
     *
71
     * @param  string|null $basePath
72
     *
73
     * @return void
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...
74
     */
75 1
    public function __construct($basePath = null)
76
    {
77 1
        if ($basePath) {
0 ignored issues
show
Bug Best Practice introduced by
The expression $basePath of type string|null is loosely compared to true; this is ambiguous if the string can be empty. You might want to explicitly use !== null instead.

In PHP, under loose comparison (like ==, or !=, or switch conditions), values of different types might be equal.

For string values, the empty string '' is a special case, in particular the following results might be unexpected:

''   == false // true
''   == null  // true
'ab' == false // false
'ab' == null  // false

// It is often better to use strict comparison
'' === false // false
'' === null  // false
Loading history...
78
            $this->setBasePath($basePath);
79
        }
80 1
    }
81
82
    public function setupAutoLoaderPaths()
83
    {
84
    }
85
86
    public function boot()
87
    {
88
        if ($this->isBooted()) {
89
            return;
90
        }
91
92
        $this->bootProviders();
93
        $this->booted = true;
94
    }
95
96
    /**
97
     * Determine if the application has booted.
98
     *
99
     * @return bool
100
     */
101 1
    public function isBooted()
102
    {
103 1
        return $this->booted;
104
    }
105
106
    /** @noinspection PhpUnusedParameterInspection
107
     *
108
     * @param Request $request
109
     * @param Response $response
110
     * @return Response
111
     */
112
    public function filterResponse(Response $response, Request $request)
0 ignored issues
show
The parameter $request is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
113
    {
114
        return $response;
115
    }
116
117
    public function terminate()
118
    {
119
    }
120
121
    /**
122
     * @return array
123
     */
124
    public function getConfiguredProviders()
125
    {
126
        return [
127
            AutoLoaderServiceProvider::class,
128
            LoggerServiceProvider::class,
129
            InflectorServiceProvider::class,
130
            LocaleServiceProvider::class,
131
            MailServiceProvider::class,
132
            MvcServiceProvider::class,
133
            DispatcherServiceProvider::class,
134
            StagingServiceProvider::class,
135
            RouterServiceProvider::class,
136
            RoutesServiceProvider::class,
137
            DatabaseServiceProvider::class,
138
            TranslatorServiceProvider::class,
139
            FlashServiceProvider::class,
140
            FilesystemServiceProvider::class,
141
        ];
142
    }
143
144
    /**
145
     * Determine if the application configuration is cached.
146
     *
147
     * @return bool
148
     */
149
    public function configurationIsCached()
150
    {
151
        return false;
152
//        return file_exists($this->getCachedConfigPath());
0 ignored issues
show
Unused Code Comprehensibility introduced by
67% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
153
    }
154
155
    /**
156
     * Throw an HttpException with the given data.
157
     *
158
     * @param  int $code
159
     * @param  string $message
160
     * @param  array $headers
161
     * @return void
162
     *
163
     * @throws HttpException
164
     */
165
    public function abort($code, $message = '', array $headers = [])
166
    {
167
        if ($code == 404) {
168
            throw new NotFoundHttpException($message);
169
        }
170
        throw new HttpException($code, $message, null, $headers);
171
    }
172
173
    /**
174
     * @return string
175
     */
176 4
    public function getRootNamespace()
177
    {
178 4
        return 'App\\';
179
    }
180
181
    /**
182
     * @param Request $request
183
     * @return Response
184
     */
185
    protected function getResponseFromRequest($request)
186
    {
187
        if ($request->hasMCA()) {
188
            $response = $this->dispatchRequest($request);
189
            ob_get_clean();
190
191
            return $response;
192
        }
193
194
        throw new NotFoundHttpException('No MCA in Request');
195
    }
196
}
197