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.

Validation/JsonApiDataRulesSerializerInterface.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 JsonApiDataRulesSerializerInterface
27
{
28
    /**
29
     * Add rules from data 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
    /**
38
     * Add rules manually.
39
     *
40
     * @param string          $name
41
     * @param RuleInterface   $idRule
42
     * @param RuleInterface   $typeRule
43
     * @param RuleInterface[] $attributeRules
44
     * @param RuleInterface[] $toOneRules
45
     * @param RuleInterface[] $toManyRules
46
     *
47
     * @return self
48
     */
49
    public function addDataRules(
50
        string $name,
51
        RuleInterface $idRule,
52
        RuleInterface $typeRule,
53
        array $attributeRules,
54
        array $toOneRules,
55
        array $toManyRules
56
    ): JsonApiDataRulesSerializerInterface;
57
58
    /**
59
     * Get serialized data.
60
     *
61
     * @return array
62
     */
63
    public function getData(): array;
64
65
    /**
66
     * @param array $serializedData
67
     *
68
     * @return array
69
     */
70
    public static function readBlocks(array $serializedData): array;
71
72
    /**
73
     * @param string $name
74
     * @param array  $serializedData
75
     *
76
     * @return bool
77
     */
78
    public static function hasRules(string $name, array $serializedData): bool;
79
80
    /**
81
     * @param string $rulesClass
82
     * @param array  $serializedData
83
     *
84
     * @return array
85
     */
86
    public static function readRules(string $rulesClass, array $serializedData): array;
87
88
    /**
89
     * @param array $serializedRules
90
     *
91
     * @return array
92
     */
93
    public static function readIdRuleIndexes(array $serializedRules): array;
94
95
    /**
96
     * @param array $serializedRules
97
     *
98
     * @return array
99
     */
100
    public static function readTypeRuleIndexes(array $serializedRules): array;
101
102
    /**
103
     * @param array $serializedRules
104
     *
105
     * @return array
106
     */
107
    public static function readAttributeRulesIndexes(array $serializedRules): array;
108
109
    /**
110
     * @param array $serializedRules
111
     *
112
     * @return array
113
     */
114
    public static function readToOneRulesIndexes(array $serializedRules): array;
115
116
    /**
117
     * @param array $serializedRules
118
     *
119
     * @return array
120
     */
121
    public static function readToManyRulesIndexes(array $serializedRules): array;
122
123
    /**
124
     * @param array $ruleIndexes
125
     *
126
     * @return int
127
     */
128
    public static function readRuleIndex(array $ruleIndexes): int;
129
130
    /**
131
     * @param array $ruleIndexes
132
     *
133
     * @return array
134
     */
135
    public static function readRuleStartIndexes(array $ruleIndexes): array;
136
137
    /**
138
     * @param array $ruleIndexes
139
     *
140
     * @return array
141
     */
142
    public static function readRuleEndIndexes(array $ruleIndexes): array;
143
144
    /**
145
     * @param array $arrayRuleIndexes
146
     *
147
     * @return array
148
     */
149
    public static function readRulesIndexes(array $arrayRuleIndexes): array;
150
151
    /**
152
     * @param array $arrayRuleIndexes
153
     *
154
     * @return array
155
     */
156
    public static function readRulesStartIndexes(array $arrayRuleIndexes): array;
157
158
    /**
159
     * @param array $arrayRuleIndexes
160
     *
161
     * @return array
162
     */
163
    public static function readRulesEndIndexes(array $arrayRuleIndexes): array;
164
165
    /**
166
     * @param array  $arrayRuleIndexes
167
     * @param string $name
168
     *
169
     * @return array
170
     */
171
    public static function readSingleRuleIndexes(array $arrayRuleIndexes, string $name): array;
172
173
    /**
174
     * @param int   $index
175
     * @param array $blocks
176
     *
177
     * @return bool
178
     */
179
    public static function hasRule(int $index, array $blocks): bool;
180
}
181