GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Issues (2170)

Security Analysis    not enabled

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.

backend/models/ConfigConfigurationModel.php (2 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
2
3
namespace app\backend\models;
4
5
use app;
6
use app\modules\config\models\BaseConfigurationModel;
7
use Yii;
8
9
/**
10
 * Class ConfigConfigurationModel represents configuration model for retrieving user input
11
 * in backend configuration subsystem.
12
 *
13
 * @package app\backend\models
14
 */
15
class ConfigConfigurationModel extends BaseConfigurationModel
16
{
17
    /**
18
     * @var boolean Should we show backend floating panel on bottom?
19
     */
20
    public $floatingPanelBottom = false;
21
22
    public $wysiwygUploadDir = '/upload/images';
23
24
    public $backendEditGrids = [];
25
26
    /**
27
     * @inheritdoc
28
     */
29
    public function rules()
30
    {
31
        return [
32
            [
33
                [
34
                    'floatingPanelBottom',
35
                ],
36
                'boolean',
37
            ],
38
            [
39
                [
40
                    'floatingPanelBottom',
41
                ],
42
                'filter',
43
                'filter' => 'boolval',
44
            ],
45
            [
46
                [
47
                    'wysiwygUploadDir',
48
                ],
49
                'required',
50
            ],
51
            [
52
                ['backendEditGrids'], 'each', 'rule' => ['each', 'rule' => ['string']],
53
            ],
54
        ];
55
    }
56
57
    /**
58
     * @inheritdoc
59
     */
60
    public function attributeLabels()
61
    {
62
        return [
63
            'floatingPanelBottom' => Yii::t('app', 'Display backend floating panel on bottom'),
64
        ];
65
    }
66
67
    /**
68
     * @inheritdoc
69
     */
70
    public function defaultValues()
71
    {
72
        /** @var app\backend\BackendModule $module */
73
        $module = Yii::$app->modules['backend'];
74
75
        $attributes = array_keys($this->getAttributes());
76
        foreach ($attributes as $attribute) {
77
            if ($module->hasProperty($attribute)) {
78
                $this->{$attribute} = $module->{$attribute};
79
            }
80
        }
81
        $this->floatingPanelBottom = false;
82
        if (is_array($module->floatingPanel)) {
83
            if (isset($module->floatingPanel['bottom'])) {
84
                $this->floatingPanelBottom = $module->floatingPanel['bottom'];
85
            }
86
        }
87
    }
88
89
    /**
90
     * Returns array of module configuration that should be stored in application config.
91
     * Array should be ready to merge in app config.
92
     * Used both for web only.
93
     *
94
     * @return array
0 ignored issues
show
Consider making the return type a bit more specific; maybe use array<string,array<strin...rray<string,boolean>>>>.

This check looks for the generic type array as a return type and suggests a more specific type. This type is inferred from the actual code.

Loading history...
95
     */
96
    public function webApplicationAttributes()
97
    {
98
        $attributes = $this->getAttributes(null, ['floatingPanelBottom']);
99
        $attributes['floatingPanel'] = [
100
            'bottom' => $this->floatingPanelBottom,
101
        ];
102
103
        return [
104
            'modules' => [
105
                'backend' => $attributes,
106
            ],
107
        ];
108
    }
109
110
    /**
111
     * Returns array of module configuration that should be stored in application config.
112
     * Array should be ready to merge in app config.
113
     * Used both for console only.
114
     *
115
     * @return array
116
     */
117
    public function consoleApplicationAttributes()
118
    {
119
        return [];
120
    }
121
122
    /**
123
     * Returns array of module configuration that should be stored in application config.
124
     * Array should be ready to merge in app config.
125
     * Used both for web and console.
126
     *
127
     * @return array
128
     */
129
    public function commonApplicationAttributes()
130
    {
131
        return [];
132
    }
133
134
    /**
135
     * Returns array of key=>values for configuration.
136
     *
137
     * @return mixed
138
     */
139
    public function keyValueAttributes()
140
    {
141
        return [];
142
    }
143
144
    /**
145
     * Returns array of aliases that should be set in common config
146
     * @return array
147
     */
148
    public function aliases()
149
    {
150
        return [];
151
    }
152
153
    public function getAllBackendEditGrids()
154
    {
155
        $grids = [];
156
        foreach (Yii::$app->getModules(true) as $module) {
157
            /** @var app\backend\BackendModule $module */
158
            $moduleGrids = $module->hasMethod('getBackendGrids') ? $module->getBackendGrids() : null;
0 ignored issues
show
Documentation Bug introduced by
The method getBackendGrids does not exist on object<app\backend\BackendModule>? Since you implemented __call, maybe consider adding a @method annotation.

If you implement __call and you know which methods are available, you can improve IDE auto-completion and static analysis by adding a @method annotation to the class.

This is often the case, when __call is implemented by a parent class and only the child class knows which methods exist:

class ParentClass {
    private $data = array();

    public function __call($method, array $args) {
        if (0 === strpos($method, 'get')) {
            return $this->data[strtolower(substr($method, 3))];
        }

        throw new \LogicException(sprintf('Unsupported method: %s', $method));
    }
}

/**
 * If this class knows which fields exist, you can specify the methods here:
 *
 * @method string getName()
 */
class SomeClass extends ParentClass { }
Loading history...
159
            if (!empty($moduleGrids)) {
160
                $grids[$module->id] = $moduleGrids;
161
                if (!isset($this->backendEditGrids[$module->id])) {
162
                    $this->backendEditGrids[$module->id] = [];
163
                }
164
                foreach ($moduleGrids as $grid) {
165
                    if (!isset($this->backendEditGrids[$module->id][$grid['key']])) {
166
                        $this->backendEditGrids[$module->id][$grid['key']] = $grid['defaultValue'];
167
                    }
168
                }
169
            }
170
        }
171
        return $grids;
172
    }
173
}
174