Issues (1191)

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/Addon/AddonServiceProvider.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 namespace Anomaly\Streams\Platform\Addon;
2
3
use Anomaly\Streams\Platform\Addon\FieldType\FieldType;
4
use Anomaly\Streams\Platform\Addon\Module\Module;
5
use Anomaly\Streams\Platform\Addon\Plugin\Plugin;
6
use Anomaly\Streams\Platform\Addon\Theme\Theme;
7
use Illuminate\Foundation\Application;
8
use Illuminate\Foundation\Bus\DispatchesJobs;
9
10
/**
11
 * Class AddonServiceProvider
12
 *
13
 * @link   http://pyrocms.com/
14
 * @author PyroCMS, Inc. <[email protected]>
15
 * @author Ryan Thompson <[email protected]>
16
 */
17
class AddonServiceProvider
18
{
19
20
    use DispatchesJobs;
21
22
    /**
23
     * Class aliases.
24
     *
25
     * @var array
26
     */
27
    protected $aliases = [];
28
29
    /**
30
     * Class bindings.
31
     *
32
     * @var array
33
     */
34
    protected $bindings = [];
35
36
    /**
37
     * The addon commands.
38
     *
39
     * @var array
40
     */
41
    protected $commands = [];
42
43
    /**
44
     * The addon command schedules.
45
     *
46
     * @var array
47
     */
48
    protected $schedules = [];
49
50
    /**
51
     * The addon view overrides.
52
     *
53
     * @var array
54
     */
55
    protected $overrides = [];
56
57
    /**
58
     * The addon plugins.
59
     *
60
     * @var array
61
     */
62
    protected $plugins = [];
63
64
    /**
65
     * Addon routes.
66
     *
67
     * @var array
68
     */
69
    protected $routes = [];
70
71
    /**
72
     * Addon API routes.
73
     *
74
     * @var array
75
     */
76
    protected $api = [];
77
78
    /**
79
     * Addon middleware.
80
     *
81
     * @var array
82
     */
83
    protected $middleware = [];
84
85
    /**
86
     * Addon route middleware.
87
     *
88
     * @var array
89
     */
90
    protected $routeMiddleware = [];
91
92
    /**
93
     * Addon event listeners.
94
     *
95
     * @var array
96
     */
97
    protected $listeners = [];
98
99
    /**
100
     * Addon providers.
101
     *
102
     * @var array
103
     */
104
    protected $providers = [];
105
106
    /**
107
     * Singleton bindings.
108
     *
109
     * @var array
110
     */
111
    protected $singletons = [];
112
113
    /**
114
     * The addon view overrides
115
     * for mobile agents only.
116
     *
117
     * @var array
118
     */
119
    protected $mobile = [];
120
121
    /**
122
     * The application instance.
123
     *
124
     * @var Application
125
     */
126
    protected $app;
127
128
    /**
129
     * The addon instance.
130
     *
131
     * @var FieldType|Module|Plugin|Theme
132
     */
133
    protected $addon;
134
135
    /**
136
     * Create a new AddonServiceProvider instance.
137
     *
138
     * @param Application $app
139
     * @param Addon       $addon
140
     */
141
    public function __construct(Application $app, Addon $addon)
142
    {
143
        $this->app   = $app;
144
        $this->addon = $addon;
0 ignored issues
show
Documentation Bug introduced by
It seems like $addon of type object<Anomaly\Streams\Platform\Addon\Addon> is incompatible with the declared type object<Anomaly\Streams\P...form\Addon\Theme\Theme> of property $addon.

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...
145
    }
146
147
    /**
148
     * Get class aliases.
149
     *
150
     * @return array
151
     */
152
    public function getAliases()
153
    {
154
        return $this->aliases;
155
    }
156
157
    /**
158
     * Get class bindings.
159
     *
160
     * @return array
161
     */
162
    public function getBindings()
163
    {
164
        return $this->bindings;
165
    }
166
167
    /**
168
     * Get the singleton bindings.
169
     *
170
     * @return array
171
     */
172
    public function getSingletons()
173
    {
174
        return $this->singletons;
175
    }
176
177
    /**
178
     * Get the providers.
179
     *
180
     * @return array
181
     */
182
    public function getProviders()
183
    {
184
        return $this->providers;
185
    }
186
187
    /**
188
     * Get the addon commands.
189
     *
190
     * @return array
191
     */
192
    public function getCommands()
193
    {
194
        return $this->commands;
195
    }
196
197
    /**
198
     * Get the addon command schedules.
199
     *
200
     * @return array
201
     */
202
    public function getSchedules()
203
    {
204
        return $this->schedules;
205
    }
206
207
    /**
208
     * Get the addon view overrides.
209
     *
210
     * @return array
211
     */
212
    public function getOverrides()
213
    {
214
        return $this->overrides;
215
    }
216
217
    /**
218
     * Get the mobile view overrides.
219
     *
220
     * @return array
221
     */
222
    public function getMobile()
223
    {
224
        return $this->mobile;
225
    }
226
227
    /**
228
     * Ge the event listeners.
229
     *
230
     * @return array
231
     */
232
    public function getListeners()
233
    {
234
        return $this->listeners;
235
    }
236
237
    /**
238
     * Get the addon routes.
239
     *
240
     * @return array
241
     */
242
    public function getRoutes()
243
    {
244
        $routes = [];
245
246
        foreach (glob($this->addon->getPath('resources/routes/*')) as $include) {
247
            $include = require $include;
248
249
            if (!is_array($include)) {
250
                continue;
251
            }
252
253
            $routes = array_merge($include, $routes);
254
        }
255
256
        return array_merge($this->routes, $routes);
257
    }
258
259
    /**
260
     * Get the addon API routes.
261
     *
262
     * @return array
263
     */
264
    public function getApi()
265
    {
266
        return $this->api;
267
    }
268
269
    /**
270
     * Get the middleware.
271
     *
272
     * @return array
273
     */
274
    public function getMiddleware()
275
    {
276
        return $this->middleware;
277
    }
278
279
    /**
280
     * Get the route middleware.
281
     *
282
     * @return array
283
     */
284
    public function getRouteMiddleware()
285
    {
286
        return $this->routeMiddleware;
287
    }
288
289
    /**
290
     * Get the addon plugins.
291
     *
292
     * @return array
293
     */
294
    public function getPlugins()
295
    {
296
        return $this->plugins;
297
    }
298
}
299