Issues (31)

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.

src/AppBundle/Entity/Package.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 declare(strict_types=1);
2
3
/**
4
 * This file is part of Packy.
5
 *
6
 * (c) Peter Nijssen
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace AppBundle\Entity;
13
14
use Doctrine\Common\Collections\ArrayCollection;
15
use Doctrine\Common\Collections\Collection;
16
17
class Package
18
{
19
    /**
20
     * @var int
21
     */
22
    private $id;
23
24
    /**
25
     * @var string
26
     */
27
    private $name;
28
29
    /**
30
     * @var string
31
     */
32
    private $manager;
33
34
    /**
35
     * @var string
36
     */
37
    private $latestVersion;
38
39
    /**
40
     * @var \DateTime
41
     */
42
    private $lastCheckAt;
43
44
    /**
45
     * @var \DateTime
46
     */
47
    private $createdAt;
48
49
    /**
50
     * @var \DateTime
51
     */
52
    private $updatedAt;
53
54
    /**
55
     * @var Collection
56
     */
57
    private $dependencies;
58
59
    /**
60
     * Constructor.
61
     */
62
    public function __construct()
63
    {
64
        $this->dependencies = new ArrayCollection();
65
    }
66
67
    /**
68
     * Get id.
69
     *
70
     * @return int
71
     */
72
    public function getId(): int
73
    {
74
        return $this->id;
75
    }
76
77
    /**
78
     * Set name.
79
     *
80
     * @param string $name
81
     */
82
    public function setName(string $name)
83
    {
84
        $this->name = $name;
85
    }
86
87
    /**
88
     * Get name.
89
     *
90
     * @return string
91
     */
92
    public function getName(): string
93
    {
94
        return $this->name;
95
    }
96
97
    /**
98
     * Set manager.
99
     *
100
     * @param string $manager
101
     */
102
    public function setManager(string $manager)
103
    {
104
        $this->manager = $manager;
105
    }
106
107
    /**
108
     * Get manager.
109
     *
110
     * @return string
111
     */
112
    public function getManager(): string
113
    {
114
        return $this->manager;
115
    }
116
117
    /**
118
     * Set latestVersion.
119
     *
120
     * @param string $latestVersion
121
     */
122
    public function setLatestVersion(string $latestVersion)
123
    {
124
        $this->latestVersion = $latestVersion;
125
    }
126
127
    /**
128
     * Get latestVersion.
129
     *
130
     * @return string|null
131
     */
132
    public function getLatestVersion(): ?string
133
    {
134
        return $this->latestVersion;
135
    }
136
137
    /**
138
     * Set $lastCheckAt.
139
     *
140
     * @param \DateTimeInterface $lastCheckAt
141
     */
142
    public function setLastCheckAt(\DateTimeInterface $lastCheckAt)
143
    {
144
        $this->lastCheckAt = $lastCheckAt;
0 ignored issues
show
Documentation Bug introduced by
$lastCheckAt is of type object<DateTimeInterface>, but the property $lastCheckAt was declared to be of type object<DateTime>. Are you sure that you always receive this specific sub-class here, or does it make sense to add an instanceof check?

Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a given class or a super-class is assigned to a property that is type hinted more strictly.

Either this assignment is in error or an instanceof check should be added for that assignment.

class Alien {}

class Dalek extends Alien {}

class Plot
{
    /** @var  Dalek */
    public $villain;
}

$alien = new Alien();
$plot = new Plot();
if ($alien instanceof Dalek) {
    $plot->villain = $alien;
}
Loading history...
145
    }
146
147
    /**
148
     * Get lastCheckAt.
149
     *
150
     * @return \DateTimeInterface
151
     */
152
    public function getLastCheckAt(): \DateTimeInterface
153
    {
154
        return $this->lastCheckAt;
155
    }
156
157
    /**
158
     * Set createdAt.
159
     *
160
     * @param \DateTimeInterface $createdAt
161
     */
162
    public function setCreatedAt(\DateTimeInterface $createdAt)
163
    {
164
        $this->createdAt = $createdAt;
0 ignored issues
show
Documentation Bug introduced by
$createdAt is of type object<DateTimeInterface>, but the property $createdAt was declared to be of type object<DateTime>. Are you sure that you always receive this specific sub-class here, or does it make sense to add an instanceof check?

Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a given class or a super-class is assigned to a property that is type hinted more strictly.

Either this assignment is in error or an instanceof check should be added for that assignment.

class Alien {}

class Dalek extends Alien {}

class Plot
{
    /** @var  Dalek */
    public $villain;
}

$alien = new Alien();
$plot = new Plot();
if ($alien instanceof Dalek) {
    $plot->villain = $alien;
}
Loading history...
165
    }
166
167
    /**
168
     * Get createdAt.
169
     *
170
     * @return \DateTimeInterface
171
     */
172
    public function getCreatedAt(): \DateTimeInterface
173
    {
174
        return $this->createdAt;
175
    }
176
177
    /**
178
     * Set updatedAt.
179
     *
180
     * @param \DateTimeInterface $updatedAt
181
     */
182
    public function setUpdatedAt(\DateTimeInterface $updatedAt)
183
    {
184
        $this->updatedAt = $updatedAt;
0 ignored issues
show
Documentation Bug introduced by
$updatedAt is of type object<DateTimeInterface>, but the property $updatedAt was declared to be of type object<DateTime>. Are you sure that you always receive this specific sub-class here, or does it make sense to add an instanceof check?

Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a given class or a super-class is assigned to a property that is type hinted more strictly.

Either this assignment is in error or an instanceof check should be added for that assignment.

class Alien {}

class Dalek extends Alien {}

class Plot
{
    /** @var  Dalek */
    public $villain;
}

$alien = new Alien();
$plot = new Plot();
if ($alien instanceof Dalek) {
    $plot->villain = $alien;
}
Loading history...
185
    }
186
187
    /**
188
     * Get updatedAt.
189
     *
190
     * @return \DateTimeInterface
191
     */
192
    public function getUpdatedAt(): \DateTimeInterface
193
    {
194
        return $this->updatedAt;
195
    }
196
197
    /**
198
     * Add dependencies.
199
     *
200
     * @param Dependency $dependencies
201
     */
202
    public function addDependency(Dependency $dependencies)
203
    {
204
        $this->dependencies[] = $dependencies;
205
    }
206
207
    /**
208
     * Remove dependencies.
209
     *
210
     * @param Dependency $dependencies
211
     */
212
    public function removeDependency(Dependency $dependencies)
213
    {
214
        $this->dependencies->removeElement($dependencies);
215
    }
216
217
    /**
218
     * Get dependencies.
219
     *
220
     * @return Collection
221
     */
222
    public function getDependencies(): Collection
223
    {
224
        return $this->dependencies;
225
    }
226
}
227