GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Issues (41)

Security Analysis    no request data  

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.

src/Api/Entity/MessageEntity.php (1 issue)

1
<?php
2
3
namespace Teebot\Api\Entity;
4
5
class MessageEntity extends AbstractEntity
6
{
7
    const ENTITY_TYPE         = 'MessageEntity';
8
9
    const ENTITY_TYPE_COMMAND = 'Command';
10
11
    const ENTITY_TYPE_HASHTAG = 'Hashtag';
12
13
    const ENTITY_TYPE_MENTION = 'Mention';
14
15
    const ENTITY_TYPE_EMAIL   = 'Email';
16
17
    const TYPE_MENTION        = 'mention';
18
19
    const TYPE_HASHTAG        = 'hashtag';
20
21
    const TYPE_BOT_COMMAND    = 'bot_command';
22
23
    const TYPE_URL            = 'url';
24
25
    const TYPE_EMAIL          = 'email';
26
27
    const TYPE_BOLD           = 'bold';
28
29
    const TYPE_ITALIC         = 'italic';
30
31
    const TYPE_CODE           = 'code';
32
33
    const TYPE_PRE            = 'pre';
34
35
    const TYPE_TEXT_LINK      = 'text_link';
36
37
    protected $source;
38
39
    protected $args;
40
41
    protected $type;
42
43
    protected $offset = 0;
44
45
    protected $length = 0;
46
47
    protected $url;
48
49
    protected $next = null;
50
51
    public function __construct(array $data = [])
52
    {
53
        parent::__construct($data);
54
55
        $this->parseSource();
56
    }
57
58
    public function getEntityType()
59
    {
60
        $type = static::ENTITY_TYPE;
61
62
        switch ($this->type) {
63
            case self::TYPE_BOT_COMMAND:
64
                $type = self::ENTITY_TYPE_COMMAND;
65
                break;
66
            case self::TYPE_HASHTAG:
67
                $type = self::ENTITY_TYPE_HASHTAG;
68
                break;
69
            case self::TYPE_MENTION:
70
                $type = self::ENTITY_TYPE_MENTION;
71
                break;
72
            case self::TYPE_EMAIL:
73
                $type = self::ENTITY_TYPE_EMAIL;
74
                break;
75
        }
76
77
        return $type;
78
    }
79
80
    public function isNativeCommand()
81
    {
82
        return $this->type === self::TYPE_BOT_COMMAND;
83
    }
84
85
    public function isHashtag()
86
    {
87
        return $this->type === self::TYPE_HASHTAG;
88
    }
89
90
    protected function parseSource()
91
    {
92
        if ($this->isNativeCommand()) {
93
            $start      = $this->offset + $this->length;
94
            $length     = mb_strlen($this->source, 'UTF-8');
95
            $this->args = trim(mb_substr($this->source, $start, $length, 'UTF-8'));
96
        }
97
98
        $this->source = mb_substr($this->source, $this->offset, $this->length, 'UTF-8');
99
    }
100
101
    /**
102
     * @return mixed
103
     */
104
    public function getSource()
105
    {
106
        return $this->source;
107
    }
108
109
    /**
110
     * @return mixed
111
     */
112
    public function getType()
113
    {
114
        return $this->type;
115
    }
116
117
    /**
118
     * @return int
119
     */
120
    public function getOffset()
121
    {
122
        return $this->offset;
123
    }
124
125
    /**
126
     * @return int
127
     */
128
    public function getLength()
129
    {
130
        return $this->length;
131
    }
132
133
    /**
134
     * @return mixed
135
     */
136
    public function getUrl()
137
    {
138
        return $this->url;
139
    }
140
141
    public function getCommand()
142
    {
143
        if (!$this->isNativeCommand()) {
144
            return null;
145
        }
146
147
        return ltrim($this->source, '/');
148
    }
149
150
    public function getHashtag()
151
    {
152
        if (!$this->isHashtag()) {
153
            return null;
154
        }
155
156
        return ltrim($this->source, '#');
157
    }
158
159
    public function getArgs()
160
    {
161
        return $this->args;
162
    }
163
164
    /**
165
     * @return null
166
     */
167
    public function getNext()
168
    {
169
        return $this->next;
170
    }
171
172
    /**
173
     * @param null $next
0 ignored issues
show
Documentation Bug introduced by
Are you sure the doc-type for parameter $next is correct as it would always require null to be passed?
Loading history...
174
     */
175
    public function setNext($next)
176
    {
177
        $this->next = $next;
178
    }
179
}
180