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.

application/models/Slider.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\models;
4
5
6
use devgroup\TagDependencyHelper\ActiveRecordHelper;
7
use Yii;
8
use yii\helpers\ArrayHelper;
9
10
/**
11
 * This is the model class for table "{{%slider}}".
12
 *
13
 * @property integer $id
14
 * @property string $name
15
 * @property integer $slider_handler_id
16
 * @property integer $image_width
17
 * @property integer $image_height
18
 * @property integer $resize_big_images
19
 * @property integer $resize_small_images
20
 * @property string $css_class
21
 * @property string $params
22
 * @property string $custom_slider_view_file
23
 * @property string $custom_slide_view_file
24
 */
25
class Slider extends \yii\db\ActiveRecord
26
{
27
    private $_slides = null;
28
29
    use \app\traits\FindById;
30
31
    public function behaviors()
32
    {
33
        return [
34
            [
35
                'class' => \devgroup\TagDependencyHelper\ActiveRecordHelper::className(),
0 ignored issues
show
Deprecated Code introduced by
The method yii\base\BaseObject::className() has been deprecated with message: since 2.0.14. On PHP >=5.5, use `::class` instead.

This method has been deprecated. The supplier of the class has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the method will be removed from the class and what other method or class to use instead.

Loading history...
36
            ],
37
        ];
38
    }
39
40
    /**
41
     * @inheritdoc
42
     */
43
    public static function tableName()
44
    {
45
        return '{{%slider}}';
46
    }
47
48
    /**
49
     * @inheritdoc
50
     */
51
    public function rules()
52
    {
53
        return [
54
            [['slider_handler_id', 'image_width', 'image_height', 'resize_big_images', 'resize_small_images'], 'integer'],
55
            [['params'], 'string'],
56
            [['name', 'css_class', 'custom_slider_view_file', 'custom_slide_view_file'], 'string', 'max' => 255],
57
            [['image_width', 'image_height'], 'default', 'value' => 300],
58
        ];
59
    }
60
61
    /**
62
     * @inheritdoc
63
     */
64
    public function attributeLabels()
65
    {
66
        return [
67
            'id' => Yii::t('app', 'ID'),
68
            'name' => Yii::t('app', 'Name'),
69
            'slider_handler_id' => Yii::t('app', 'Slider Handler ID'),
70
            'image_width' => Yii::t('app', 'Image Width'),
71
            'image_height' => Yii::t('app', 'Image Height'),
72
            'resize_big_images' => Yii::t('app', 'Resize Big Images'),
73
            'resize_small_images' => Yii::t('app', 'Resize Small Images'),
74
            'css_class' => Yii::t('app', 'Css Class'),
75
            'params' => Yii::t('app', 'Params'),
76
            'custom_slider_view_file' => Yii::t('app', 'Custom Slider View File'),
77
            'custom_slide_view_file' => Yii::t('app', 'Custom Slide View File'),
78
        ];
79
    }
80
81
    /**
82
     * Returns corresponding slides with cache support(not real relation!)
83
     * @return Slide[]
84
     */
85
    public function getSlides($onlyActive = false)
86
    {
87
        if ($this->_slides === null) {
88
            $this->_slides = Yii::$app->cache->get("Slides:" . $this->id);
89
            if (!is_array($this->_slides)) {
90
                $this->_slides = Slide::find()
91
                    ->where(['slider_id' => $this->id])
92
                    ->orderBy('sort_order ASC')
93
                    ->all();
94
                Yii::$app->cache->set(
95
                    "Slides:" . $this->id,
96
                    $this->_slides,
97
                    86400,
98
                    new \yii\caching\TagDependency([
99
                        'tags' => [
100
                            ActiveRecordHelper::getObjectTag(Slider::className(), $this->id)
0 ignored issues
show
Deprecated Code introduced by
The method yii\base\BaseObject::className() has been deprecated with message: since 2.0.14. On PHP >=5.5, use `::class` instead.

This method has been deprecated. The supplier of the class has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the method will be removed from the class and what other method or class to use instead.

Loading history...
101
                        ]
102
                    ])
103
                );
104
            }
105
        }
106
        if ($onlyActive === true) {
107
            $activeSlides = [];
108
            foreach ($this->_slides as $slide) {
109
                if ($slide->active) {
110
                    $activeSlides[] = $slide;
111
                }
112
            }
113
            return $activeSlides;
114
        } else {
115
            return $this->_slides;
116
        }
117
    }
118
119
    /**
120
     * Returns handler model for this slider
121
     * @return SliderHandler|null
122
     */
123
    public function handler()
124
    {
125
        return SliderHandler::findBySliderId($this->slider_handler_id);
126
    }
127
}
128