Issues (28)

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.

src/AppBundle/Entity/Device.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 AppBundle\Entity;
4
5
use Doctrine\ORM\Mapping as ORM;
6
7
/**
8
 * @ORM\Entity
9
 * @ORM\Table(name="devices")
10
 */
11
class Device
12
{
13
14
    /**
15
     * @ORM\Column(type="integer")
16
     * @ORM\Id
17
     * @ORM\GeneratedValue(strategy="AUTO")
18
     */
19
    private $id;
20
21
    /**
22
     * @ORM\Column(type="string", length=100)
23
     */
24
    private $name;
25
26
    /**
27
     * @ORM\Column(type="string", length=100)
28
     */
29
    private $alias;
30
    /**
31
     * @ORM\Column(type="simple_array", nullable=true)
32
     */
33
    private $type;
34
35
    /**
36
     * @ORM\Column(type="simple_array", nullable=true)
37
     */
38
    private $params;
39
40
    /**
41
     * @ORM\Column(type="simple_array", nullable=true)
42
     */
43
    private $state = [];
44
45
    /**
46
     * @return mixed
47
     */
48
    public function getState()
49
    {
50
        $tmp = [];
51
        foreach ($this->state as $key => $value) {
52
            $value = explode(':', $value);
53
            $tmp[$value[0]] = $value[1];
54
        }
55
56
        return $tmp;
57
    }
58
59
    /**
60
     * @param mixed $state
61
     * @return Device
62
     */
63 1
    public function setState($state)
64
    {
65
66 1
        $tmp = [];
67
68 1
        foreach ($state as $key => $value) {
69 1
            if (is_numeric($key)) {
70
                $tmp[] = $value;
71
            } else {
72 1
                $tmp[] = $key.':'.$value;
73
            }
74
        }
75
76 1
        $this->state = $tmp;
77 1
        return $this;
78
    }
79
80
    /**
81
     * @return mixed
82
     */
83
    public function getParams()
84
    {
85
        return $this->params;
86
    }
87
88
    /**
89
     * @param mixed $params
90
     * @return Device
91
     */
92
    public function setParams($params)
93
    {
94
        $this->params = $params;
95
        return $this;
96
    }
97
98
    /**
99
     * @return [Action]
0 ignored issues
show
The doc-type [Action] could not be parsed: Unknown type name "" at position 0. [(view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
100
     */
101
    public function getActions()
102
    {
103
        return $this->actions;
104
    }
105
106
    /**
107
     * @param mixed $actions
108
     * @return Device
109
     */
110
    public function setActions($actions)
111
    {
112
        $this->actions = $actions;
113
        return $this;
114
    }
115
116
    /**
117
     * @ORM\OneToMany(targetEntity="AppBundle\Entity\Action", mappedBy="device")
118
     */
119
    private $actions;
120
121
122
    /**
123
     * @return mixed
124
     */
125
    public function getId()
126
    {
127
        return $this->id;
128
    }
129
130
    /**
131
     * @param mixed $id
132
     * @return Device
133
     */
134
    public function setId($id)
135
    {
136
        $this->id = $id;
137
        return $this;
138
    }
139
140
    /**
141
     * @return mixed
142
     */
143
    public function getName()
144
    {
145
        return $this->name;
146
    }
147
148
    /**
149
     * @param string $name
150
     * @return Device
151
     */
152 1
    public function setName($name)
153
    {
154 1
        $this->name = $name;
155 1
        return $this;
156
    }
157
158
    /**
159
     * @return mixed
160
     */
161
    public function getAlias()
162
    {
163
        return $this->alias;
164
    }
165
166
    /**
167
     * @param string $alias
168
     * @return Device
169
     */
170 1
    public function setAlias($alias)
171
    {
172 1
        $this->alias = $alias;
173 1
        return $this;
174
    }
175
176
    /**
177
     * @return mixed
178
     */
179
    public function getType()
180
    {
181
        return $this->type;
182
    }
183
184
    /**
185
     * @param mixed $type
186
     * @return Device
187
     */
188
    public function setType($type)
189
    {
190
        $this->type = $type;
191
        return $this;
192
    }
193
194
    public function __toString()
195
    {
196
        return $this->getName().' ('.implode(', ', $this->getType()).')';
197
    }
198
}
199