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.

Entity/SqsWorker.php (1 issue)

Labels
Severity

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
namespace Tavii\SQSJobQueueBundle\Entity;
3
use Doctrine\ORM\Mapping as ORM;
4
use Tavii\SQSJobQueue\Queue\QueueName;
5
use Tavii\SQSJobQueue\Storage\EntityInterface;
6
use Tavii\SQSJobQueue\Storage\EntityJobNameTrait;
7
8
/**
9
 * Class SqsJobQueue
10
 * @package Tavii\SQSJobQueueBundle\Entity
11
 *
12
 * @ORM\Entity(repositoryClass="Tavii\SQSJobQueueBundle\Repository\SqsWorkerRepository")
13
 * @ORM\Table(name="sqs_workers")
14
 * @ORM\HasLifecycleCallbacks()
15
 */
16
class SqsWorker implements EntityInterface
17
{
18
    use EntityJobNameTrait;
19
20
    /**
21
     * @ORM\Id
22
     * @ORM\GeneratedValue(strategy="AUTO")
23
     * @ORM\Column(type="bigint", name="id")
24
     */
25
    protected $id;
26
27
    /**
28
     * @ORM\Column(type="string", name="server", nullable=false)
29
     */
30
    protected $server;
31
32
    /**
33
     * @ORM\Column(type="string", name="queue", nullable=false)
34
     */
35
    protected $queue;
36
37
    /**
38
     * @var string
39
     * @ORM\Column(type="string", name="prefix", nullable=true)
40
     */
41
    protected $prefix;
42
43
    /**
44
     * @ORM\Column(type="integer", name="proc_id", nullable=false)
45
     */
46
    protected $procId;
47
48
    /**
49
     * @ORM\Column(type="datetime", name="created_at")
50
     */
51
    protected $createdAt;
52
53
    /**
54
     * @ORM\Column(type="datetime", name="updated_at")
55
     */
56
    protected $updatedAt;
57
58
    /**
59
     * @return mixed
60
     */
61
    public function getId()
62
    {
63
        return $this->id;
64
    }
65
66
    /**
67
     * @return mixed
68
     */
69
    public function getServer()
70
    {
71
        return $this->server;
72
    }
73
74
    /**
75
     * @param $server
76
     * @return $this
77
     */
78
    public function setServer($server)
79
    {
80
        $this->server = $server;
81
        return $this;
82
    }
83
84
    /**
85
     * @return mixed
86
     */
87
    public function getQueue()
88
    {
89
        return $this->queue;
90
    }
91
92
    /**
93
     * @param $queue
94
     * @return $this
95
     */
96
    public function setQueue($queue)
97
    {
98
        $this->queue = $queue;
99
        return $this;
100
    }
101
102
    /**
103
     * @return mixed
104
     */
105
    public function getPrefix()
106
    {
107
        return $this->prefix;
108
    }
109
110
    /**
111
     * @param mixed $prefix
112
     * @return $this
113
     */
114
    public function setPrefix($prefix)
115
    {
116
        $this->prefix = $prefix;
117
        return $this;
118
    }
119
120
121
122
    /**
123
     * @return mixed
124
     */
125
    public function getProcId()
126
    {
127
        return $this->procId;
128
    }
129
130
    /**
131
     * @param int $procId
132
     * @return $this
133
     */
134
    public function setProcId($procId)
135
    {
136
        $this->procId = $procId;
137
        return $this;
138
    }
139
140
    /**
141
     * @return mixed
142
     */
143
    public function getStatus()
144
    {
145
        return $this->status;
0 ignored issues
show
The property status does not exist. Did you maybe forget to declare it?

In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:

class MyClass { }

$x = new MyClass();
$x->foo = true;

Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:

class MyClass {
    public $foo;
}

$x = new MyClass();
$x->foo = true;
Loading history...
146
    }
147
148
    /**
149
     * @return mixed
150
     */
151
    public function getCreatedAt()
152
    {
153
        return $this->createdAt;
154
    }
155
156
    /**
157
     * @param $createdAt
158
     * @return $this
159
     */
160
    public function setCreatedAt($createdAt)
161
    {
162
        $this->createdAt = $createdAt;
163
        return $this;
164
    }
165
166
    /**
167
     * @return mixed
168
     */
169
    public function getUpdatedAt()
170
    {
171
        return $this->updatedAt;
172
    }
173
174
    /**
175
     * @param $updatedAt
176
     * @return $this
177
     */
178
    public function setUpdatedAt($updatedAt)
179
    {
180
        $this->updatedAt = $updatedAt;
181
        return $this;
182
    }
183
184
    /**
185
     * @ORM\PrePersist()
186
     */
187
    public function createDate()
188
    {
189
        $this->createdAt = new \DateTime();
190
        $this->updatedAt = new \DateTime();
191
    }
192
193
    /**
194
     * @ORM\PreUpdate()
195
     */
196
    public function updateDate()
197
    {
198
        $this->updatedAt = new \DateTime();
199
    }
200
201
    /**
202
     * @param QueueName $queueName
203
     */
204
    public function setQueueName(QueueName $queueName)
205
    {
206
        $this->prefix = $queueName->getPrefix();
207
        $this->queue = $queueName->getName();
208
        return $this;
209
    }
210
211
212
}