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 (1410)

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.

extensions/yii-debug-toolbar/YiiDebugToolbar.php (1 issue)

Labels
Severity

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
 * YiiDebugToolbar class file.
4
 *
5
 * @author Sergey Malyshev <[email protected]>
6
 */
7
8
Yii::import('yii-debug-toolbar.panels.*');
9
Yii::import('yii-debug-toolbar.widgets.*');
10
11
/**
12
 * YiiDebugToolbar represents an ...
13
 *
14
 * Description of YiiDebugToolbar
15
 *
16
 * @author Sergey Malyshev <[email protected]>
17
 * @author Igor Golovanov <[email protected]>
18
 * @version $Id$
19
 * @package YiiDebugToolbar
20
 * @since 1.1.7
21
 */
22
class YiiDebugToolbar extends CWidget
23
{
24
    /**
25
     * CSS File.
26
     *
27
     * @var string
28
     */
29
    public $cssFile;
30
31
    /**
32
     * The URL of assets.
33
     *
34
     * @var string
35
     */
36
    private $_assetsUrl;
37
38
    /**
39
     * Panels.
40
     *
41
     * @var array
42
     */
43
    private $_panels;
44
    
45
    /**
46
     * Setup toolbar panels.
47
     *
48
     * @param array $panels Panels.
49
     * @return YiiDebugToolbar
50
     */
51
    public function setPanels(array $panels = array())
52
    {
53
        $this->_panels = $panels;
54
        return $this;
55
    }
56
57
    /**
58
     * Get toolbar panels.
59
     *
60
     * @return array
61
     */
62
    public function getPanels()
63
    {
64
        if(null === $this->_panels)
65
        {
66
            $this->_panels = array();
67
        }
68
        return $this->_panels;
69
    }
70
71
    /**
72
     * Get the URL of assets.
73
     * The base URL that contains all published asset files of yii-debug-toolbar.
74
     * @return string
75
     */
76
    public function getAssetsUrl()
77
    {
78
        if (null === $this->_assetsUrl && 'cli' !== php_sapi_name())
79
            $this->_assetsUrl = Yii::app()
80
                ->getAssetManager()
81
                ->publish(dirname(__FILE__) . '/assets', false, -1, YII_DEBUG);
82
        return $this->_assetsUrl;
83
    }
84
85
    public function getLogs()
86
    {
87
        return $this->owner->logs;
88
    }
89
90
    /**
91
     * Set the URL of assets.
92
     * The base URL that contains all published asset files of yii-debug-toolbar.
93
     *
94
     * @param string $value
95
     */
96
    public function setAssetsUrl($value)
97
    {
98
        $this->_assetsUrl = $value;
99
    }
100
101
    /**
102
     * Initialization.
103
     */
104
    public function init()
105
    {
106
        if (false === ($this->owner instanceof CLogRoute))
0 ignored issues
show
The class CLogRoute does not exist. Did you forget a USE statement, or did you not list all dependencies?

This error could be the result of:

1. Missing dependencies

PHP Analyzer uses your composer.json file (if available) to determine the dependencies of your project and to determine all the available classes and functions. It expects the composer.json to be in the root folder of your repository.

Are you sure this class is defined by one of your dependencies, or did you maybe not list a dependency in either the require or require-dev section?

2. Missing use statement

PHP does not complain about undefined classes in ìnstanceof checks. For example, the following PHP code will work perfectly fine:

if ($x instanceof DoesNotExist) {
    // Do something.
}

If you have not tested against this specific condition, such errors might go unnoticed.

Loading history...
107
        {
108
            throw new CException(YiiDebug::t('YiiDebugToolbar owner must be instance of CLogRoute'));
109
        }
110
111
        $this->createPanels()
112
             ->registerClientScripts();
113
    }
114
115
    /**
116
     * Run.
117
     */
118
    public function run()
119
    {
120
        $this->render('yii_debug_toolbar', array(
121
            'panels' => $this->getPanels()
122
        ));
123
    }
124
125
    /**
126
     * Register client scripts.
127
     *
128
     * @return YiiDebugToolbar
129
     */
130
    private function registerClientScripts()
131
    {
132
        $cs = Yii::app()->getClientScript();
133
        $cs->registerCoreScript('jquery');
134
        $cs->registerCoreScript('cookie');
135
136
        if (false !== $this->cssFile)
137
        {
138
            if (null === $this->cssFile)
139
                $this->cssFile = $this->assetsUrl . '/yii.debugtoolbar.css';
140
            $cs->registerCssFile($this->cssFile);
141
        }
142
143
        $cs->registerScriptFile($this->assetsUrl . '/yii.debugtoolbar.js',
144
                CClientScript::POS_END);
145
146
        return $this;
147
    }
148
149
    /**
150
     * Create panels.
151
     *
152
     * @return YiiDebugToolbar
153
     */
154
    private function createPanels()
155
    {
156
        foreach ($this->getPanels() as $id => $config)
157
        {
158
            if (!is_object($config))
159
            {
160
                if(is_array($config))
161
                {
162
                    isset($config['class']) || $config['class'] = $id;
163
                    if (isset($config['enabled']) && false === $config['enabled'])
164
                    {
165
                        unset($this->_panels[$id]);
166
                        continue;
167
                    }
168
                    else if (isset($config['enabled']) && true === $config['enabled'])
169
                    {
170
                        unset($config['enabled']);
171
                    }
172
                }
173
                $panel = Yii::createComponent($config, $this);
174
175
                if (false === ($panel instanceof YiiDebugToolbarPanelInterface))
176
                {
177
                    throw new CException(Yii::t('yii-debug-toolbar',
178
                            'The %class% class must be compatible with YiiDebugToolbarPanelInterface', array(
179
                                '%class%' => get_class($panel)
180
                            )));
181
                }
182
                $panel->init();
183
                $this->_panels[$id] = $panel;
184
            }
185
        }
186
        return $this;
187
    }
188
}
189
190
/**
191
 * YiiDebugToolbarPanelInterface
192
 *
193
 * @author Sergey Malyshev <[email protected]>
194
 * @author Igor Golovanov <[email protected]>
195
 * @version $Id$
196
 * @package YiiDebugToolbar
197
 * @since 1.1.7
198
 */
199
interface YiiDebugToolbarPanelInterface
200
{
201
    /**
202
     * Get the title of menu.
203
     *
204
     * @return string
205
     */
206
    function getMenuTitle();
207
208
    /**
209
     * Get the subtitle of menu.
210
     *
211
     * @return string
212
     */
213
    function getMenuSubTitle();
214
215
    /**
216
     * Get the title.
217
     *
218
     * @return string
219
     */
220
    function getTitle();
221
222
    /**
223
     * Get the subtitle.
224
     *
225
     * @return string
226
     */
227
    function getSubTitle();
228
}
229