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/Method/AbstractMethod.php (2 issues)

1
<?php
2
3
/**
4
 * Base abstract class for supported by Telegram Method classes.
5
 *
6
 * @package Teebot (Telegram bot framework)
7
 *
8
 * @author Stanislav Drozdov <[email protected]>
9
 */
10
11
namespace Teebot\Api\Method;
12
13
use Teebot\Api\Traits\Property;
14
use Teebot\Api\Entity\{
15
    EntityInterface, Inline\InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardHide, ForceReply
16
};
17
18
abstract class AbstractMethod implements MethodInterface {
19
20
    use Property;
21
22
    protected const NAME = null;
23
24
    protected const RETURN_ENTITY = null;
25
26
    protected $parent = null;
27
28
    protected $hasAttachedData = false;
29
30
    protected $reply_markup;
31
32
    /**
33
     * @var array
34
     */
35
    protected $supportedMarkups = [
36
        InlineKeyboardMarkup::class,
37
        ReplyKeyboardMarkup::class,
38
        ReplyKeyboardHide::class,
39
        ForceReply::class
40
    ];
41
42
    /**
43
     * Constructs extended method's class and sets properties from array if passed.
44
     *
45
     * @param array $args
46
     */
47
    public function __construct(array $args = [])
48
    {
49
        if (empty($args)) {
50
            return;
51
        }
52
53
        $this->setProperties($args);
54
    }
55
56
    /**
57
     * Returns method's name.
58
     *
59
     * @return string
60
     */
61
    public function getName(): string
62
    {
63
        return static::NAME;
0 ignored issues
show
Bug Best Practice introduced by
The expression return static::NAME returns the type null which is incompatible with the type-hinted return string.
Loading history...
64
    }
65
66
    /**
67
     * Returns entity's name that should be return in method execution result.
68
     *
69
     * @return null|string
70
     */
71
    public function getReturnEntity(): ?string
72
    {
73
        return static::RETURN_ENTITY;
74
    }
75
76
    /**
77
     * Returns flag which indicates that method has attached data (audio, voice, video, photo etc.)
78
     *
79
     * @return bool
80
     */
81
    public function hasAttachedData(): bool
82
    {
83
        return $this->hasAttachedData;
84
    }
85
86
    /**
87
     * Checks that passed markup is currently supported
88
     *
89
     * @param EntityInterface $markup Markup class instance
90
     *
91
     * @return bool
92
     */
93
    protected function isValidMarkup(EntityInterface $markup): bool
94
    {
95
        foreach ($this->supportedMarkups as $className) {
96
            if ($markup instanceof $className) {
97
                return true;
98
            }
99
        }
100
101
        return false;
102
    }
103
104
    /**
105
     * Sets reply markup class
106
     *
107
     * @param EntityInterface $markup Markup class instance
108
     *
109
     * @return MethodInterface
110
     */
111
    public function setReplyMarkup(EntityInterface $markup): MethodInterface
112
    {
113
        $this->reply_markup = !$this->isValidMarkup($markup) ? null : $markup;
114
115
        return $this;
116
    }
117
118
    /**
119
     * Returns reply markup as JSON encoded string if reply_markup is an instance of EntityInterface
120
     *
121
     * @return string|mixed
122
     */
123
    public function getReplyMarkup()
124
    {
125
        if ($this->reply_markup instanceof EntityInterface) {
126
127
            return str_replace('\\\\', '\\', $this->reply_markup->asJson());
0 ignored issues
show
The method asJson() does not exist on Teebot\Api\Entity\EntityInterface. Since it exists in all sub-types, consider adding an abstract or default implementation to Teebot\Api\Entity\EntityInterface. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

127
            return str_replace('\\\\', '\\', $this->reply_markup->/** @scrutinizer ignore-call */ asJson());
Loading history...
128
        }
129
130
        return $this->reply_markup;
131
    }
132
133
    /**
134
     * Returns parent entity which triggered method's execution.
135
     *
136
     * @return MethodInterface
137
     */
138
    public function getParent(): MethodInterface
139
    {
140
        return $this->parent;
141
    }
142
143
    /**
144
     * Sets parent entity which triggered method's execution.
145
     *
146
     * @param MethodInterface $parent
147
     *
148
     * @return MethodInterface
149
     */
150
    public function setParent(MethodInterface $parent): MethodInterface
151
    {
152
        $this->parent = $parent;
153
154
        return $this;
155
    }
156
}
157