Issues (135)

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.

Contracts/Execution/BlockSerializerInterface.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 declare(strict_types=1);
2
3
namespace Limoncello\Validation\Contracts\Execution;
4
5
/**
6
 * Copyright 2015-2020 [email protected]
7
 *
8
 * Licensed under the Apache License, Version 2.0 (the "License");
9
 * you may not use this file except in compliance with the License.
10
 * You may obtain a copy of the License at
11
 *
12
 * http://www.apache.org/licenses/LICENSE-2.0
13
 *
14
 * Unless required by applicable law or agreed to in writing, software
15
 * distributed under the License is distributed on an "AS IS" BASIS,
16
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
 * See the License for the specific language governing permissions and
18
 * limitations under the License.
19
 */
20
21
use Limoncello\Validation\Contracts\Blocks\ExecutionBlockInterface;
22
23
/**
24
 * @package Limoncello\Validation
25
 */
26
interface BlockSerializerInterface
27
{
28
    // Serialization structure
29
30
    /**
31
     * Serialization structure index.
32
     */
33
    const SERIALIZATION_BLOCKS = 0;
34
35
    /**
36
     * Serialization structure index.
37
     */
38
    const SERIALIZATION_BLOCKS_WITH_START = self::SERIALIZATION_BLOCKS + 1;
39
40
    /**
41
     * Serialization structure index.
42
     */
43
    const SERIALIZATION_BLOCKS_WITH_END = self::SERIALIZATION_BLOCKS_WITH_START + 1;
44
45
    // Block types
46
47
    /**
48
     * Serialization property index.
49
     */
50
    const TYPE = 0;
51
52
    /**
53
     * Serialization property index.
54
     */
55
    const PROPERTIES = self::TYPE + 1;
56
57
    /**
58
     * Serialization property index.
59
     */
60
    const TYPE__PROCEDURE = 0;
61
62
    /**
63
     * Serialization property index.
64
     */
65
    const TYPE__IF_EXPRESSION = self::TYPE__PROCEDURE + 1;
66
67
    /**
68
     * Serialization property index.
69
     */
70
    const TYPE__AND_EXPRESSION = self::TYPE__IF_EXPRESSION + 1;
71
72
    /**
73
     * Serialization property index.
74
     */
75
    const TYPE__OR_EXPRESSION = self::TYPE__AND_EXPRESSION + 1;
76
77
    // Procedure keys
78
79
    /**
80
     * Serialization property index.
81
     */
82
    const PROCEDURE_EXECUTE_CALLABLE = self::PROPERTIES + 1;
83
84
    /**
85
     * Serialization property index.
86
     */
87
    const PROCEDURE_START_CALLABLE = self::PROCEDURE_EXECUTE_CALLABLE + 1;
88
89
    /**
90
     * Serialization property index.
91
     */
92
    const PROCEDURE_END_CALLABLE = self::PROCEDURE_START_CALLABLE + 1;
93
94
    /**
95
     * Serialization property index.
96
     */
97
    const PROCEDURE_LAST = self::PROCEDURE_END_CALLABLE;
98
99
    // IF Expression keys
100
101
    /**
102
     * Serialization property index.
103
     */
104
    const IF_EXPRESSION_CONDITION_CALLABLE = self::PROPERTIES + 1;
105
106
    /**
107
     * Serialization property index.
108
     */
109
    const IF_EXPRESSION_ON_TRUE_BLOCK = self::IF_EXPRESSION_CONDITION_CALLABLE + 1;
110
111
    /**
112
     * Serialization property index.
113
     */
114
    const IF_EXPRESSION_ON_FALSE_BLOCK = self::IF_EXPRESSION_ON_TRUE_BLOCK + 1;
115
116
    /**
117
     * Serialization property index.
118
     */
119
    const IF_EXPRESSION_LAST = self::IF_EXPRESSION_ON_FALSE_BLOCK;
120
121
    // AND Expression keys
122
123
    /**
124
     * Serialization property index.
125
     */
126
    const AND_EXPRESSION_PRIMARY = self::PROPERTIES + 1;
127
128
    /**
129
     * Serialization property index.
130
     */
131
    const AND_EXPRESSION_SECONDARY = self::AND_EXPRESSION_PRIMARY + 1;
132
133
    /**
134
     * Serialization property index.
135
     */
136
    const AND_EXPRESSION_LAST = self::AND_EXPRESSION_SECONDARY;
137
138
    // OR Expression keys
139
140
    /**
141
     * Serialization property index.
142
     */
143
    const OR_EXPRESSION_PRIMARY = self::PROPERTIES + 1;
144
145
    /**
146
     * Serialization property index.
147
     */
148
    const OR_EXPRESSION_SECONDARY = self::OR_EXPRESSION_PRIMARY + 1;
149
150
    /**
151
     * Serialization property index.
152
     */
153
    const OR_EXPRESSION_LAST = self::OR_EXPRESSION_SECONDARY;
154
155
    /**
156
     * @param ExecutionBlockInterface $block
157
     *
158
     * @return self
0 ignored issues
show
Should the return type not be \self?

This check compares the return type specified in the @return annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.

Loading history...
159
     */
160
    public function serialize(ExecutionBlockInterface $block): self;
161
162
    /**
163
     * @param ExecutionBlockInterface $block
164
     *
165
     * @return int
166
     */
167
    public function addBlock(ExecutionBlockInterface $block): int;
168
169
    /**
170
     * @return array
171
     */
172
    public function get(): array;
173
174
    /**
175
     * @return array
176
     */
177
    public function getSerializedBlocks(): array;
178
179
    /**
180
     * @return int[]
181
     */
182
    public function getBlocksWithStart(): array;
183
184
    /**
185
     * @return int[]
186
     */
187
    public function getBlocksWithEnd(): array;
188
189
    /**
190
     * @return self
0 ignored issues
show
Should the return type not be \self?

This check compares the return type specified in the @return annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.

Loading history...
191
     *
192
     */
193
    public function clearBlocks(): self;
194
195
    /**
196
     * @return self
0 ignored issues
show
Should the return type not be \self?

This check compares the return type specified in the @return annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.

Loading history...
197
     */
198
    public function clearBlocksWithStart(): self;
199
200
    /**
201
     * @return self
0 ignored issues
show
Should the return type not be \self?

This check compares the return type specified in the @return annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.

Loading history...
202
     */
203
    public function clearBlocksWithEnd(): self;
204
205
    /**
206
     * @param array $serialized
207
     *
208
     * @return array
209
     */
210
    public static function unserializeBlocks(array $serialized): array;
211
212
    /**
213
     * @param array $serialized
214
     *
215
     * @return array
216
     */
217
    public static function unserializeBlocksWithStart(array $serialized): array;
218
219
    /**
220
     * @param array $serialized
221
     *
222
     * @return array
223
     */
224
    public static function unserializeBlocksWithEnd(array $serialized): array;
225
}
226