Issues (68)

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/Helpers/Runtime.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
 * Scabbia2 Helpers Component
4
 * https://github.com/eserozvataf/scabbia2
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 *
9
 * @link        https://github.com/eserozvataf/scabbia2-helpers for the canonical source repository
10
 * @copyright   2010-2016 Eser Ozvataf. (http://eser.ozvataf.com/)
11
 * @license     http://www.apache.org/licenses/LICENSE-2.0 - Apache License, Version 2.0
12
 */
13
14
namespace Scabbia\Helpers;
15
16
/**
17
 * A bunch of utility methods for runtime hacks
18
 *
19
 * @package     Scabbia\Helpers
20
 * @author      Eser Ozvataf <[email protected]>
21
 * @since       2.0.0
22
 *
23
 * @scabbia-compile
24
 */
25
class Runtime
26
{
27
    /**
28
     * Default variables for runtime hacks
29
     *
30
     * @type array $defaults array of default variables
31
     */
32
    public static $defaults = [
33
    ];
34
35
36
    /**
37
     * Constructor to prevent new instances of Runtime class
38
     *
39
     * @return Runtime
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...
40
     */
41
    final private function __construct()
42
    {
43
    }
44
45
    /**
46
     * Clone method to prevent duplication of Runtime class
47
     *
48
     * @return Runtime
49
     */
50
    final private function __clone()
51
    {
52
    }
53
54
    /**
55
     * Unserialization method to prevent restoration of Runtime class
56
     *
57
     * @return Runtime
58
     */
59
    final private function __wakeup()
60
    {
61
    }
62
63
    /**
64
     * Sets the default variables
65
     *
66
     * @param array $uDefaults variables to be set
67
     *
68
     * @return void
69
     */
70
    public static function setDefaults($uDefaults)
71
    {
72
        self::$defaults = $uDefaults + self::$defaults;
73
    }
74
75
    /**
76
     * Allows on-the-fly construction of classes
77
     *
78
     * @param mixed    $uCallback  callback
79
     *
80
     * @return mixed   callback
81
     */
82
    public static function callbacks($uCallback)
83
    {
84
        if (is_string($uCallback) && ($tPos = strrpos($uCallback, "@")) !== false) {
85
            $tClassName = substr($uCallback, 0, $tPos);
86
            $uCallback = [new $tClassName (), substr($uCallback, $tPos + 1)];
87
        }
88
89
        return $uCallback;
90
    }
91
}
92