Issues (102)

Security Analysis    no vulnerabilities found

This project does not seem to handle request data directly as such no vulnerable execution paths were found.

  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.
  Regex Injection
Regex Injection enables an attacker to execute arbitrary code in your PHP process.
  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.
  Response Splitting
Response Splitting can be used to send arbitrary responses.
  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.
  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.
  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.
  Code Injection
Code Injection enables an attacker to execute arbitrary code on the server.
  Variable Injection
Variable Injection enables an attacker to overwrite program variables with custom data, and can lead to further vulnerabilities.
  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.
  Other Vulnerability
This category comprises other attack vectors such as manipulating the PHP runtime, loading custom extensions, freezing the runtime, or similar.
  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.
  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.
  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.
  Header Injection
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.

plugin/Integrations/Breakdance/ElementTrait.php (7 issues)

1
<?php
2
3
namespace GeminiLabs\SiteReviews\Integrations\Breakdance;
4
5
use GeminiLabs\SiteReviews\Contracts\ShortcodeContract;
6
use GeminiLabs\SiteReviews\Helpers\Arr;
7
use GeminiLabs\SiteReviews\Helpers\Str;
8
9
trait ElementTrait
10
{
11
    /**
12
     * @return array
13
     */
14
    public static function actions()
15
    {
16
        return glsr()->filterArray('breakdance/element/actions', static::bdActions(), static::bdShortcode()->tag);
0 ignored issues
show
Accessing tag on the interface GeminiLabs\SiteReviews\Contracts\ShortcodeContract suggest that you code against a concrete implementation. How about adding an instanceof check?
Loading history...
17
    }
18
19
    /**
20
     * @return array
21
     */
22
    public static function badge()
23
    {
24
        return [
25
            'backgroundColor' => '',
26
            'label' => ' ', // empty because we use this to display an icon
27
            'textColor' => '',
28
        ];
29
    }
30
31
    public static function bdActions(): array
32
    {
33
        return [
34
            'onMountedElement' => [[
35
                'script' => 'GLSR_init();',
36
            ]],
37
            // 'onPropertyChange' => [[
38
            //     'script' => 'GLSR_init();',
39
            // ]],
40
        ];
41
    }
42
43
    public static function bdDependencies(): array
44
    {
45
        return [
46
            [
47
                'builderCondition' => 'return true;',
48
                'frontendCondition' => 'return false;',
49
                'inlineStyles' => [
50
                    '%%SELECTOR%% a, %%SELECTOR%% button {pointer-events: none}',
51
                ],
52
            ],
53
        ];
54
    }
55
56
    abstract public static function bdShortcode(): ShortcodeContract;
57
58
    abstract public static function bdShortcodeClass(): string;
59
60
    /**
61
     * @return string
62
     */
63
    public static function category()
64
    {
65
        return glsr()->id;
66
    }
67
68
    static function className()
0 ignored issues
show
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
69
    {
70
        return 'breakdance-'.Str::dashCase(static::bdShortcode()->tag);
0 ignored issues
show
Accessing tag on the interface GeminiLabs\SiteReviews\Contracts\ShortcodeContract suggest that you code against a concrete implementation. How about adding an instanceof check?
Loading history...
71
    }
72
73
    public static function dependencies()
74
    {
75
        return glsr()->filterArray('breakdance/element/dependencies', static::bdDependencies(), static::bdShortcode()->tag);
0 ignored issues
show
Accessing tag on the interface GeminiLabs\SiteReviews\Contracts\ShortcodeContract suggest that you code against a concrete implementation. How about adding an instanceof check?
Loading history...
76
    }
77
78
    /**
79
     * @return string
80
     */
81
    public static function name()
82
    {
83
        return static::bdShortcode()->name();
84
    }
85
86
    /**
87
     * @return array
88
     */
89
    public static function nestingRule()
90
    {
91
        return [
92
            'type' => 'final',
93
        ];
94
    }
95
96
    /**
97
     * @return string[]
98
     */
99
    public static function propertyPathsToSsrElementWhenValueChanges()
100
    {
101
        return [
102
            'content',
103
            // 'design',
104
        ];
105
    }
106
107
    /**
108
     * @return array
109
     */
110
    public static function settings()
111
    {
112
        return [
113
            'bypassPointerEvents' => true,
114
            'disableAI' => true,
115
        ];
116
    }
117
118
    /**
119
     * @return array[]
120
     */
121
    public static function settingsControls()
122
    {
123
        return [];
124
    }
125
126
    /**
127
     * @param mixed $propertiesData
128
     * @param mixed $parentPropertiesData
129
     * @param bool  $isBuilder
130
     * @param int   $repeaterItemNodeId
131
     *
132
     * @return string
133
     */
134
    public static function ssr($propertiesData, $parentPropertiesData = [], $isBuilder = false, $repeaterItemNodeId = null)
0 ignored issues
show
The parameter $repeaterItemNodeId is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

134
    public static function ssr($propertiesData, $parentPropertiesData = [], $isBuilder = false, /** @scrutinizer ignore-unused */ $repeaterItemNodeId = null)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
The parameter $isBuilder is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

134
    public static function ssr($propertiesData, $parentPropertiesData = [], /** @scrutinizer ignore-unused */ $isBuilder = false, $repeaterItemNodeId = null)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
The parameter $parentPropertiesData is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

134
    public static function ssr($propertiesData, /** @scrutinizer ignore-unused */ $parentPropertiesData = [], $isBuilder = false, $repeaterItemNodeId = null)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
135
    {
136
        $args = static::ssrArgs(Arr::consolidate($propertiesData));
137
        return static::bdShortcode()->build($args, 'breakdance', false);
138
    }
139
140
    abstract public static function ssrArgs(array $propertiesData): array;
141
142
    /**
143
     * @return string
144
     */
145
    public static function slug()
146
    {
147
        return __CLASS__;
148
    }
149
150
    /**
151
     * @return string
152
     */
153
    public static function template()
154
    {
155
        return '%%SSR%%';
156
    }
157
}
158