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.

backgroundtasks/controllers/ManageController.php (3 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\backgroundtasks\controllers;
4
5
use app\backgroundtasks\models\Task;
6
use Yii;
7
use yii\filters\AccessControl;
8
use yii\filters\VerbFilter;
9
use yii\web\Controller;
10
use yii\web\NotFoundHttpException;
11
use yii\helpers\Url;
12
13
/**
14
 * Class ManageController
15
 * @package app\backgroundtasks\controllers
16
 * @author evgen-d <[email protected]>
17
 */
18
class ManageController extends Controller
19
{
20
21
    public function behaviors()
22
    {
23
        return [
24
            'access' => [
25
                'class' => AccessControl::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...
26
                'rules' => [
27
                    [
28
                        'allow' => true,
29
                        'roles' => Yii::$app->getModule('background')->manageRoles,
30
                    ],
31
                ],
32
            ],
33
            'verbs' => [
34
                'class' => VerbFilter::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...
35
                'actions' => [
36
                ],
37
            ],
38
        ];
39
    }
40
41
    /**
42
     * View all Task models.
43
     * @return string
44
     */
45 View Code Duplication
    public function actionIndex()
46
    {
47
        $searchModel = new Task(['scenario' => 'search']);
48
        $dataProvider = $searchModel->search($_GET);
49
50
        return $this->render(
51
            'index',
52
            [
53
                'dataProvider' => $dataProvider,
54
                'searchModel' => $searchModel,
55
            ]
56
        );
57
    }
58
59
    /**
60
     * Updates an existing Task model.
61
     * If update is successful, the browser will be redirected to the 'index' page.
62
     * @param $id
63
     * @return string
0 ignored issues
show
Should the return type not be \yii\web\Response|null|string?

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...
64
     * @throws \yii\web\NotFoundHttpException
65
     */
66
    public function actionUpdate($id)
67
    {
68
        /* @var $model Task|null */
69
        $model = Task::find()->where(
70
            [
71
                'id' => $id,
72
                'type' => Task::TYPE_REPEAT,
73
            ]
74
        )->one();
75
        if ($model !== null) {
76
            $model->scenario = 'repeat';
77
            if ($model->load($_POST) && $model->validate()) {
78
                $model->fail_counter = 0;
79
                if ($model->save()) {
80
                    Yii::$app->session->setFlash('success', Yii::t('app', 'Record has been saved'));
81
                    $returnUrl = Yii::$app->request->get('returnUrl', ['background/manage/index']);
82
                    switch (Yii::$app->request->post('action', 'save')) {
83
                        case 'next':
84
                            return $this->redirect(
85
                                [
86
                                    '/background/manage/create',
87
                                    'returnUrl' => $returnUrl,
88
                                ]
89
                            );
90
                        case 'back':
91
                            return $this->redirect($returnUrl);
92
                        default:
93
                            return $this->redirect(
94
                                Url::toRoute(
95
                                    [
96
                                        '/background/manage/update',
97
                                        'id' => $model->id,
98
                                        'returnUrl' => $returnUrl,
99
                                    ]
100
                                )
101
                            );
102
                    }
103
                }
104
105
            } else {
106
                return $this->render(
107
                    'update',
108
                    [
109
                        'model' => $model,
110
                    ]
111
                );
112
            }
113
        } else {
114
            throw new NotFoundHttpException('repeated task #'.$id.' not found');
115
        }
116
    }
117
118
    /**
119
     * Creates a new Task model.
120
     * If creation is successful, the browser will be redirected to the 'index' page.
121
     * @return string|\yii\web\Response
122
     */
123
    public function actionCreate()
124
    {
125
        $model = new Task(['scenario' => 'repeat']);
126
        $model->initiator = Yii::$app->user->id;
127
        $model->type = Task::TYPE_REPEAT;
128
129
        if ($model->load($_POST) && $model->save()) {
130
            Yii::$app->session->setFlash('success', Yii::t('app', 'Record has been saved'));
131
            $returnUrl = Yii::$app->request->get('returnUrl', ['background/manage/index']);
132
            switch (Yii::$app->request->post('action', 'save')) {
133
                case 'next':
134
                    return $this->redirect(
135
                        [
136
                            '/background/manage/create',
137
                            'returnUrl' => $returnUrl,
138
                        ]
139
                    );
140
                case 'back':
141
                    return $this->redirect($returnUrl);
142
                default:
143
                    return $this->redirect(
144
                        Url::toRoute(
145
                            [
146
                                '/background/manage/update',
147
                                'id' => $model->id,
148
                                'returnUrl' => $returnUrl,
149
                            ]
150
                        )
151
                    );
152
            }
153
154
        } else {
155
            return $this->render(
156
                'create',
157
                [
158
                    'model' => $model,
159
                ]
160
            );
161
        }
162
    }
163
164
    /**
165
     * Deletes an existing Task model.
166
     * If deletion is successful, the browser will be redirected to the 'index' page.
167
     * @param $id
168
     * @return \yii\web\Response
169
     */
170
    public function actionDelete($id)
171
    {
172
        Task::deleteAll('id = :id', [':id' => $id]);
173
        return $this->redirect(['index']);
174
    }
175
176
    /**
177
     * Deletes an existing Task models.
178
     * If deletion is successful, the browser will be redirected to the 'index' page.
179
     *
180
     * @return int|false number of tasks deleted or false if there was no task provided for deletion
181
     */
182
    public function actionDeleteTasks()
183
    {
184
        if (isset($_POST['tasks'])) {
185
            return Task::deleteAll([
186
                    'in',
187
                    'id',
188
                    $_POST['tasks'],
189
            ]);
190
        }
191
        return false;
192
    }
193
}
194