Issues (13)

Security Analysis    not enabled

This project does not seem to handle request data directly as such no vulnerable execution paths were found.

  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.
  Regex Injection
Regex Injection enables an attacker to execute arbitrary code in your PHP process.
  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.
  Response Splitting
Response Splitting can be used to send arbitrary responses.
  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.
  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.
  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.
  Code Injection
Code Injection enables an attacker to execute arbitrary code on the server.
  Variable Injection
Variable Injection enables an attacker to overwrite program variables with custom data, and can lead to further vulnerabilities.
  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.
  Other Vulnerability
This category comprises other attack vectors such as manipulating the PHP runtime, loading custom extensions, freezing the runtime, or similar.
  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.
  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.
  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.
  Header Injection
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/ImportLog.php (1 issue)

Labels
Severity
1
<?php
2
3
namespace Doctrs\SonataImportBundle\Entity;
4
5
use Doctrine\ORM\Mapping as ORM;
0 ignored issues
show
The type Doctrine\ORM\Mapping was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
6
7
/**
8
 * ImportLog
9
 *
10
 * @ORM\Table("ext_sonata_import_log")
11
 * @ORM\Entity(repositoryClass="Doctrs\SonataImportBundle\Repository\DefaultRepository")
12
 * @ORM\HasLifecycleCallbacks()
13
 */
14
class ImportLog
15
{
16
    const STATUS_SUCCESS = 1;
17
    const STATUS_EXISTS = 2;
18
    const STATUS_ERROR = 3;
19
20
    /**
21
     * @var integer
22
     *
23
     * @ORM\Column(name="id", type="integer")
24
     * @ORM\Id
25
     * @ORM\GeneratedValue(strategy="AUTO")
26
     */
27
    private $id;
28
29
    /**
30
     * @var \DateTime
31
     *
32
     * @ORM\Column(name="ts", type="datetime")
33
     */
34
    private $ts;
35
36
    /**
37
     * @var integer
38
     *
39
     * @ORM\Column(name="status", type="integer")
40
     */
41
    private $status;
42
43
    /**
44
     * @var string
45
     *
46
     * @ORM\Column(name="message", type="text", nullable=true)
47
     */
48
    private $message;
49
50
    /**
51
     * @var string
52
     *
53
     * @ORM\Column(name="line", type="string", length=255)
54
     */
55
    private $line;
56
57
    /**
58
     * @var string
59
     *
60
     * @ORM\ManyToOne(targetEntity="Doctrs\SonataImportBundle\Entity\UploadFile", inversedBy="importLog")
61
     */
62
    private $uploadFile;
63
64
    /**
65
     * @var integer
66
     *
67
     * @ORM\Column(name="foreign_id", type="integer", nullable=true)
68
     */
69
    private $foreignId;
70
71
72
    /**
73
     * Get id
74
     *
75
     * @return integer 
76
     */
77
    public function getId()
78
    {
79
        return $this->id;
80
    }
81
82
    /**
83
     * Get ts
84
     *
85
     * @return \DateTime 
86
     */
87
    public function getTs()
88
    {
89
        return $this->ts;
90
    }
91
92
    /**
93
     * Set status
94
     *
95
     * @param integer $status
96
     * @return ImportLog
97
     */
98
    public function setStatus($status)
99
    {
100
        $this->status = $status;
101
102
        return $this;
103
    }
104
105
    /**
106
     * Get status
107
     *
108
     * @return integer 
109
     */
110
    public function getStatus()
111
    {
112
        return $this->status;
113
    }
114
115
    /**
116
     * Set message
117
     *
118
     * @param string $message
119
     * @return ImportLog
120
     */
121
    public function setMessage($message)
122
    {
123
        $this->message = $message;
124
125
        return $this;
126
    }
127
128
    /**
129
     * Get message
130
     *
131
     * @return string 
132
     */
133
    public function getMessage()
134
    {
135
        return $this->message;
136
    }
137
138
    /**
139
     * @return mixed
140
     */
141
    public function messageEncode() {
142
        return json_decode($this->message);
143
    }
144
145
    /**
146
     * Set line
147
     *
148
     * @param string $line
149
     * @return ImportLog
150
     */
151
    public function setLine($line)
152
    {
153
        $this->line = $line;
154
155
        return $this;
156
    }
157
158
    /**
159
     * Get line
160
     *
161
     * @return string 
162
     */
163
    public function getLine()
164
    {
165
        return $this->line;
166
    }
167
168
    /**
169
     * Set uploadFile
170
     *
171
     * @param string $uploadFile
172
     * @return ImportLog
173
     */
174
    public function setUploadFile($uploadFile)
175
    {
176
        $this->uploadFile = $uploadFile;
177
178
        return $this;
179
    }
180
181
    /**
182
     * Get uploadFile
183
     *
184
     * @return string 
185
     */
186
    public function getUploadFile()
187
    {
188
        return $this->uploadFile;
189
    }
190
191
192
    /**
193
     * @ORM\PreUpdate()
194
     * @ORM\PrePersist()
195
     */
196
    public function prePersistUpdate() {
197
        $this->ts = new \DateTime();
198
    }
199
200
    /**
201
     * @param $foreignId
202
     * @return ImportLog
203
     */
204
    public function setForeignId($foreignId) {
205
        $this->foreignId = $foreignId;
206
207
        return $this;
208
    }
209
210
    /**
211
     * @return int
212
     */
213
    public function getForeignId() {
214
        return $this->foreignId;
215
    }
216
217
    /**
218
     * @return string
219
     */
220
    public function __toString() {
221
        return (string)$this->message;
222
    }
223
}
224