Issues (87)

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.

Aop/Framework/StaticInitializationJoinpoint.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
declare(strict_types=1);
4
/*
5
 * Go! AOP framework
6
 *
7
 * @copyright Copyright 2011, Lisachenko Alexander <[email protected]>
8
 *
9
 * This source file is subject to the license that is bundled
10
 * with this source code in the file LICENSE.
11
 */
12
13
namespace Go\Aop\Framework;
14
15
use Go\Aop\Intercept\ClassJoinpoint;
16
use Go\Core\AspectContainer;
17
use ReflectionClass;
18
19
use function strlen;
20
21
/**
22
 * Static initialization joinpoint is invoked after class is loaded into memory
23
 */
24
class StaticInitializationJoinpoint extends AbstractJoinpoint implements ClassJoinpoint
25
{
26
27
    protected ReflectionClass $reflectionClass;
0 ignored issues
show
This code did not parse for me. Apparently, there is an error somewhere around this line:

Syntax error, unexpected T_STRING, expecting T_FUNCTION or T_CONST
Loading history...
28
29
    /**
30
     * Constructor for the class static initialization joinpoint
31
     *
32
     * @param array $advices List of advices for this invocation
33
     */
34 1
    public function __construct(array $advices, string $className)
35
    {
36 1
        $originalClass = $className;
37 1
        if (strpos($originalClass, AspectContainer::AOP_PROXIED_SUFFIX)) {
38 1
            $originalClass = substr($originalClass, 0, -strlen(AspectContainer::AOP_PROXIED_SUFFIX));
39
        }
40 1
        $this->reflectionClass = new ReflectionClass($originalClass);
41 1
        parent::__construct($advices);
42 1
    }
43
44
    /**
45
     * Proceeds to the next interceptor in the chain.
46
     *
47
     * @return void Covariant, as static initializtion could not return anything
48
     */
49 1
    public function proceed(): void
50
    {
51 1
        if (isset($this->advices[$this->current])) {
52 1
            $currentInterceptor = $this->advices[$this->current++];
53 1
            $currentInterceptor->invoke($this);
54
        }
55 1
    }
56
57
    /**
58
     * Invokes current joinpoint with all interceptors
59
     */
60 1
    final public function __invoke(): void
61
    {
62 1
        $this->current = 0;
63 1
        $this->proceed();
64 1
    }
65
66
    /**
67
     * Returns the object for which current joinpoint is invoked
68
     *
69
     * @return object|null Instance of object or null for static call/unavailable context
70
     */
71
    public function getThis(): ?object
72
    {
73
        return null;
74
    }
75
76
    /**
77
     * Checks if the current joinpoint is dynamic or static
78
     *
79
     * Dynamic joinpoint contains a reference to an object that can be received via getThis() method call
80
     *
81
     * @see ClassJoinpoint::getThis()
82
     */
83
    public function isDynamic(): bool
84
    {
85
        return false;
86
    }
87
88
    /**
89
     * Returns the static scope name (class name) of this joinpoint.
90
     */
91
    public function getScope(): string
92
    {
93
        return $this->reflectionClass->getName();
94
    }
95
96
    /**
97
     * Returns a friendly description of current joinpoint
98
     */
99
    final public function __toString(): string
100
    {
101
        return sprintf(
102
            'staticinitialization(%s)',
103
            $this->getScope()
104
        );
105
    }
106
}
107