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 (13)

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.

src/SmsapiClient.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
3
namespace NotificationChannels\Smsapi;
4
5
use SMSApi\Client;
6
use SMSApi\Proxy\Proxy;
7
use SMSApi\Api\MmsFactory;
8
use SMSApi\Api\SmsFactory;
9
use SMSApi\Api\VmsFactory;
10
use SMSApi\Api\Response\Response;
11
12
class SmsapiClient
13
{
14
    /**
15
     * @var Client
16
     */
17
    protected $client;
18
19
    /**
20
     * @var array
21
     */
22
    protected $defaults;
23
24
    /**
25
     * @var Proxy
26
     */
27
    protected $proxy;
28
29
    /**
30
     * @param Client     $client
31
     * @param array      $defaults
32
     * @param Proxy|null $proxy
33
     */
34 1
    public function __construct(Client $client, array $defaults = [], Proxy $proxy = null)
35
    {
36 1
        $this->client = $client;
37 1
        $this->defaults = $defaults;
38 1
        $this->proxy = $proxy;
39 1
    }
40
41
    /**
42
     * @param  SmsapiMessage $message
43
     * @return Response
44
     */
45 1
    public function send(SmsapiMessage $message)
46
    {
47 1
        if ($message instanceof SmsapiSmsMessage) {
48 1
            return $this->sendSms($message);
49
        } elseif ($message instanceof SmsapiMmsMessage) {
50
            return $this->sendMms($message);
51
        } elseif ($message instanceof SmsapiVmsMessage) {
52
            return $this->sendVms($message);
53
        }
54
    }
55
56
    /**
57
     * @param  SmsapiSmsMessage $message
58
     * @return Response
59
     */
60 1
    public function sendSms(SmsapiSmsMessage $message)
61
    {
62 1
        $data = $message->data + $this->defaults;
63 1
        $sms = (new SmsFactory($this->proxy, $this->client))->actionSend();
64 1
        if (isset($data['content'])) {
65 1
            $sms->setText($data['content']);
66 1
        }
67 1
        if (isset($data['template'])) {
68
            $sms->setTemplate($data['template']);
69
        }
70 1
        if (isset($data['to'])) {
71 1
            $sms->setTo($data['to']);
72 1
        }
73 1
        if (isset($data['group'])) {
74
            $sms->setGroup($data['group']);
75
        }
76 1
        if (isset($data['from'])) {
77
            $sms->setSender($data['from']);
78
        }
79 1
        if (isset($data['fast'])) {
80
            $sms->setFast($data['fast']);
81
        }
82 1
        if (isset($data['flash'])) {
83
            $sms->setFlash($data['flash']);
84
        }
85 1
        if (isset($data['encoding'])) {
86
            $sms->setEncoding($data['encoding']);
87
        }
88 1
        if (isset($data['normalize'])) {
89
            $sms->setNormalize($data['normalize']);
90
        }
91 1
        if (isset($data['nounicode'])) {
92
            $sms->setNoUnicode($data['nounicode']);
93
        }
94 1
        if (isset($data['single'])) {
95
            $sms->setSingle($data['single']);
96
        }
97 1
        if (isset($data['date'])) {
98
            $sms->setDateSent($data['date']);
99
        }
100 1
        if (isset($data['notify_url'])) {
101
            $sms->setNotifyUrl($data['notify_url']);
102
        }
103 1
        if (isset($data['partner'])) {
104
            $sms->setPartner($data['partner']);
105
        }
106 1
        if (isset($data['test'])) {
107
            $sms->setTest($data['test']);
108
        }
109
110 1
        return $sms->execute();
111
    }
112
113
    /**
114
     * @param  SmsapiMmsMessage $message
115
     * @return Response
116
     */
117
    public function sendMms(SmsapiMmsMessage $message)
118
    {
119
        $data = $message->data + $this->defaults;
120
        $mms = (new MmsFactory($this->proxy, $this->client))->actionSend();
121
        $mms->setSubject($data['subject']);
122
        $mms->setSmil($data['smil']);
123
        if (isset($data['to'])) {
124
            $mms->setTo($data['to']);
125
        }
126
        if (isset($data['group'])) {
127
            $mms->setGroup($data['group']);
128
        }
129
        if (isset($data['date'])) {
130
            $mms->setDateSent($data['date']);
131
        }
132
        if (isset($data['notify_url'])) {
133
            $mms->setNotifyUrl($data['notify_url']);
134
        }
135
        if (isset($data['partner'])) {
136
            $mms->setPartner($data['partner']);
137
        }
138
        if (isset($data['test'])) {
139
            $mms->setTest($data['test']);
140
        }
141
142
        return $mms->execute();
143
    }
144
145
    /**
146
     * @param  SmsapiVmsMessage $message
147
     * @return Response
148
     */
149
    public function sendVms(SmsapiVmsMessage $message)
150
    {
151
        $data = $message->data + $this->defaults;
152
        $vms = (new VmsFactory($this->proxy, $this->client))->actionSend();
153
        if (isset($data['file'])) {
154
            $vms->setFile($data['file']);
155
        }
156
        if (isset($data['tts'])) {
157
            $vms->setTts($data['tts']);
158
            if (isset($data['tts_lector'])) {
159
                $vms->setTtsLector($data['tts_lector']);
160
            }
161
        }
162
        if (isset($data['to'])) {
163
            $vms->setTo($data['to']);
164
        }
165
        if (isset($data['group'])) {
166
            $vms->setGroup($data['group']);
167
        }
168
        if (isset($data['from'])) {
169
            $vms->setFrom($data['from']);
170
        }
171
        if (isset($data['tries'])) {
172
            $vms->setTry($data['tries']);
173
        }
174
        if (isset($data['interval'])) {
175
            $vms->setInterval($data['interval']);
176
        }
177
        if (isset($data['date'])) {
178
            $vms->setDateSent($data['date']);
179
        }
180
        if (isset($data['notify_url'])) {
181
            $vms->setNotifyUrl($data['notify_url']);
0 ignored issues
show
The method setNotifyUrl() does not seem to exist on object<SMSApi\Api\Action\Vms\Send>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
182
        }
183
        if (isset($data['partner'])) {
184
            $vms->setPartner($data['partner']);
185
        }
186
        if (isset($data['test'])) {
187
            $vms->setTest($data['test']);
188
        }
189
190
        return $vms->execute();
191
    }
192
}
193