Issues (197)

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.

JsonApiQueryRulesSerializerInterface.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 declare (strict_types = 1);
2
3
namespace Limoncello\Flute\Contracts\Validation;
4
5
/**
6
 * Copyright 2015-2019 [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\Rules\RuleInterface;
22
23
/**
24
 * @package Limoncello\Application
25
 */
26
interface JsonApiQueryRulesSerializerInterface
27
{
28
    /**
29
     * Add rules from query rules class.
30
     *
31
     * @param string $rulesClass
32
     *
33
     * @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...
34
     */
35
    public function addRulesFromClass(string $rulesClass): self;
36
37
    /** @noinspection PhpTooManyParametersInspection
38
     * Add rules manually.
39
     *
40
     * @param string               $name
41
     * @param RuleInterface|null   $identityRule
42
     * @param RuleInterface[]|null $filterRules
43
     * @param RuleInterface[]|null $fieldSetRules
44
     * @param RuleInterface|null   $sortsRule
45
     * @param RuleInterface|null   $includesRule
46
     * @param RuleInterface|null   $pageOffsetRule
47
     * @param RuleInterface|null   $pageLimitRule
48
     *
49
     * @return self
50
     */
51
    public function addQueryRules(
52
        string $name,
53
        ?RuleInterface $identityRule,
54
        ?array $filterRules,
55
        ?array $fieldSetRules,
56
        ?RuleInterface $sortsRule,
57
        ?RuleInterface $includesRule,
58
        ?RuleInterface $pageOffsetRule,
59
        ?RuleInterface $pageLimitRule
60
    ): JsonApiQueryRulesSerializerInterface;
61
62
    /**
63
     * Get serialized data.
64
     *
65
     * @return array
66
     */
67
    public function getData(): array;
68
69
    /**
70
     * Reads validation blocks from serialized data.
71
     *
72
     * @param array $serializedData
73
     *
74
     * @return array
75
     */
76
    public static function readBlocks(array $serializedData): array;
77
78
    /**
79
     * Reads serialized validation rules from serialized data.
80
     *
81
     * @param string $name
82
     * @param array  $serializedData
83
     *
84
     * @return bool
85
     */
86
    public static function hasRules(string $name, array $serializedData): bool;
87
88
    /**
89
     * Reads serialized validation rules from serialized data.
90
     *
91
     * @param string $name
92
     * @param array  $serializedData
93
     *
94
     * @return array
95
     */
96
    public static function readRules(string $name, array $serializedData): array;
97
98
    /**
99
     * Reads serialized identity validation rule indexes from rules.
100
     *
101
     * @param array $serializedRules
102
     *
103
     * @return array
104
     */
105
    public static function readIdentityRuleIndexes(array $serializedRules): ?array;
106
107
    /**
108
     * Reads serialized filter validation rule indexes from rules.
109
     *
110
     * @param array $serializedRules
111
     *
112
     * @return array
113
     */
114
    public static function readFilterRulesIndexes(array $serializedRules): ?array;
115
116
    /**
117
     * Reads serialized field set validation rule indexes from rules.
118
     *
119
     * @param array $serializedRules
120
     *
121
     * @return array
122
     */
123
    public static function readFieldSetRulesIndexes(array $serializedRules): ?array;
124
125
    /**
126
     * Reads serialized sorts validation rule indexes from rules.
127
     *
128
     * @param array $serializedRules
129
     *
130
     * @return array
131
     */
132
    public static function readSortsRuleIndexes(array $serializedRules): ?array;
133
134
    /**
135
     * Reads serialized includes validation rule indexes from rules.
136
     *
137
     * @param array $serializedRules
138
     *
139
     * @return array
140
     */
141
    public static function readIncludesRuleIndexes(array $serializedRules): ?array;
142
143
    /**
144
     * Reads serialized page offset validation rule indexes from rules.
145
     *
146
     * @param array $serializedRules
147
     *
148
     * @return array
149
     */
150
    public static function readPageOffsetRuleIndexes(array $serializedRules): ?array;
151
152
    /**
153
     * Reads serialized page limit validation rule indexes from rules.
154
     *
155
     * @param array $serializedRules
156
     *
157
     * @return array
158
     */
159
    public static function readPageLimitRuleIndexes(array $serializedRules): ?array;
160
161
    /**
162
     * Read rule indexes (key, index pairs) from serialized rules indexes.
163
     *
164
     * @param array $ruleIndexes
165
     *
166
     * @return array
167
     */
168
    public static function readRuleMainIndexes(array $ruleIndexes): ?array;
169
170
    /**
171
     * Read first rule index from serialized rules indexes.
172
     *
173
     * @param array $ruleIndexes
174
     *
175
     * @return int
176
     */
177
    public static function readRuleMainIndex(array $ruleIndexes): ?int;
178
179
    /**
180
     * Read rule start indexes (key, index pairs) from serialized rules indexes.
181
     *
182
     * @param array $ruleIndexes
183
     *
184
     * @return array
185
     */
186
    public static function readRuleStartIndexes(array $ruleIndexes): array;
187
188
    /**
189
     * Read rule end indexes (key, index pairs) from serialized rules indexes.
190
     *
191
     * @param array $ruleIndexes
192
     *
193
     * @return array
194
     */
195
    public static function readRuleEndIndexes(array $ruleIndexes): array;
196
}
197