Issues (11)

Security Analysis    no request data  

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.

Entity/CronJob.php (1 issue)

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 Alpixel\Bundle\CronBundle\Entity;
4
5
use Doctrine\ORM\Mapping as ORM;
6
7
/**
8
 * @ORM\Table(name="cronjob")
9
 * @ORM\Entity(repositoryClass="Alpixel\Bundle\CronBundle\Entity\Repository\CronJobRepository")
10
 */
11
class CronJob
12
{
13
    /**
14
     * @ORM\Id
15
     * @ORM\Column(name="cron_id", type="integer")
16
     * @ORM\GeneratedValue(strategy="AUTO")
17
     *
18
     * @var int
19
     */
20
    protected $id;
21
22
    /**
23
     * @ORM\Column
24
     *
25
     * @var string
26
     */
27
    protected $command;
28
29
    /**
30
     * @ORM\Column
31
     *
32
     * @var string
33
     */
34
    protected $description;
35
36
    /**
37
     * @ORM\Column(name="job_interval", type="string", length=40)
38
     *
39
     * @var string
40
     */
41
    protected $interval;
42
    /**
43
     * @ORM\Column(type="datetime")
44
     *
45
     * @var DateTime
46
     */
47
    protected $nextRun;
48
    /**
49
     * @ORM\Column(type="boolean")
50
     *
51
     * @var bool
52
     */
53
    protected $enabled;
54
55
    /**
56
     * @ORM\OneToMany(targetEntity="CronJobResult", mappedBy="job")
57
     *
58
     * @var ArrayCollection
59
     */
60
    protected $results;
61
62
    /**
63
     * @ORM\OneToOne(targetEntity="CronJobResult", cascade={"persist"})
64
     * @ORM\JoinColumn(name="cron_result_id",referencedColumnName="cron_result_id", nullable=true, onDelete="SET NULL")
65
     *
66
     * @var CronJobResult
67
     */
68
    protected $mostRecentRun;
69
70
    public function __construct()
71
    {
72
        $this->results = new \Doctrine\Common\Collections\ArrayCollection();
0 ignored issues
show
Documentation Bug introduced by
It seems like new \Doctrine\Common\Collections\ArrayCollection() of type object<Doctrine\Common\C...ctions\ArrayCollection> is incompatible with the declared type object<Alpixel\Bundle\Cr...Entity\ArrayCollection> of property $results.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
73
    }
74
75
    /**
76
     * Get id.
77
     *
78
     * @return int
79
     */
80
    public function getId()
81
    {
82
        return $this->id;
83
    }
84
85
    /**
86
     * Set command.
87
     *
88
     * @param string $command
89
     */
90
    public function setCommand($command)
91
    {
92
        $this->command = $command;
93
    }
94
95
    /**
96
     * Get command.
97
     *
98
     * @return string
99
     */
100
    public function getCommand()
101
    {
102
        return $this->command;
103
    }
104
105
    /**
106
     * Set description.
107
     *
108
     * @param string $description
109
     */
110
    public function setDescription($description)
111
    {
112
        $this->description = $description;
113
    }
114
115
    /**
116
     * Get description.
117
     *
118
     * @return string
119
     */
120
    public function getDescription()
121
    {
122
        return $this->description;
123
    }
124
125
    /**
126
     * Set interval.
127
     *
128
     * @param string $interval
129
     */
130
    public function setInterval($interval)
131
    {
132
        $this->interval = $interval;
133
    }
134
135
    /**
136
     * Get interval.
137
     *
138
     * @return string
139
     */
140
    public function getInterval()
141
    {
142
        return $this->interval;
143
    }
144
145
    /**
146
     * Set nextRun.
147
     *
148
     * @param datetime $nextRun
149
     */
150
    public function setNextRun($nextRun)
151
    {
152
        $this->nextRun = $nextRun;
153
    }
154
155
    /**
156
     * Get nextRun.
157
     *
158
     * @return datetime
159
     */
160
    public function getNextRun()
161
    {
162
        return $this->nextRun;
163
    }
164
165
    /**
166
     * Add results.
167
     *
168
     * @param Alpixel\Bundle\CronBundle\Entity\CronJobResult $results
169
     */
170
    public function addCronJobResult(\Alpixel\Bundle\CronBundle\Entity\CronJobResult $results)
171
    {
172
        $this->results[] = $results;
173
    }
174
175
    /**
176
     * Get results.
177
     *
178
     * @return Doctrine\Common\Collections\Collection
179
     */
180
    public function getResults()
181
    {
182
        return $this->results;
183
    }
184
185
    /**
186
     * Set mostRecentRun.
187
     *
188
     * @param Alpixel\Bundle\CronBundle\Entity\CronJobResult $mostRecentRun
189
     */
190
    public function setMostRecentRun(\Alpixel\Bundle\CronBundle\Entity\CronJobResult $mostRecentRun)
191
    {
192
        $this->mostRecentRun = $mostRecentRun;
193
    }
194
195
    /**
196
     * Get mostRecentRun.
197
     *
198
     * @return Alpixel\Bundle\CronBundle\Entity\CronJobResult
199
     */
200
    public function getMostRecentRun()
201
    {
202
        return $this->mostRecentRun;
203
    }
204
205
    /**
206
     * Set enabled.
207
     *
208
     * @param bool $enabled
209
     */
210
    public function setEnabled($enabled)
211
    {
212
        $this->enabled = $enabled;
213
    }
214
215
    /**
216
     * Get enabled.
217
     *
218
     * @return bool
219
     */
220
    public function getEnabled()
221
    {
222
        return $this->enabled;
223
    }
224
}
225