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

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.

Source/Bhaktaraz/RSSGenerator/Channel.php (1 issue)

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 Bhaktaraz\RSSGenerator;
4
5
use Bhaktaraz\RSSGenerator\FeedInterface;
6
use Bhaktaraz\RSSGenerator\ItemInterface;
7
use Bhaktaraz\RSSGenerator\SimpleXMLElement;
8
use Bhaktaraz\RSSGenerator\ChannelInterface;
9
10
class Channel implements ChannelInterface
11
{
12
13
    /** @var string */
14
    protected $title;
15
16
    /** @var string */
17
    protected $url;
18
19
    /** @var string */
20
    protected $description;
21
22
    /** @var string */
23
    protected $language;
24
25
    /** @var string */
26
    protected $copyright;
27
28
    /** @var int */
29
    protected $pubDate;
30
31
    /** @var int */
32
    protected $lastBuildDate;
33
34
    /** @var  string */
35
    protected $updatePeriod;
36
37
    /** @var integer */
38
    protected $updateFrequency;
39
40
    /** @var int */
41
    protected $ttl;
42
43
    /** @var ItemInterface[] */
44
    protected $items = [];
45
46
    /**
47
     * Set channel title
48
     * @param string $title
49
     * @return $this
50
     */
51
    public function title($title)
52
    {
53
        $this->title = $title;
54
55
        return $this;
56
    }
57
58
    /**
59
     * Set channel URL
60
     * @param string $url
61
     * @return $this
62
     */
63
    public function url($url)
64
    {
65
        $this->url = $url;
66
67
        return $this;
68
    }
69
70
    /**
71
     * Set channel description
72
     * @param string $description
73
     * @return $this
74
     */
75
    public function description($description)
76
    {
77
        $this->description = $description;
78
79
        return $this;
80
    }
81
82
    /**
83
     * Set ISO639 language code
84
     *
85
     * The language the channel is written in. This allows aggregators to group all
86
     * Italian language sites, for example, on a single page. A list of allowable
87
     * values for this element, as provided by Netscape, is here. You may also use
88
     * values defined by the W3C.
89
     *
90
     * @param string $language
91
     * @return $this
92
     */
93
    public function language($language)
94
    {
95
        $this->language = $language;
96
97
        return $this;
98
    }
99
100
    /**
101
     * Set channel copyright
102
     * @param string $copyright
103
     * @return $this
104
     */
105
    public function copyright($copyright)
106
    {
107
        $this->copyright = $copyright;
108
109
        return $this;
110
    }
111
112
    /**
113
     * Set channel published date
114
     * @param int $pubDate Unix timestamp
115
     * @return $this
116
     */
117
    public function pubDate($pubDate)
118
    {
119
        $this->pubDate = $pubDate;
120
121
        return $this;
122
    }
123
124
    /**
125
     * Set channel last build date
126
     * @param int $lastBuildDate Unix timestamp
127
     * @return $this
128
     */
129
    public function lastBuildDate($lastBuildDate)
130
    {
131
        $this->lastBuildDate = $lastBuildDate;
132
133
        return $this;
134
    }
135
136
    /**
137
     * @param $updatePeriod
138
     * @return $this
139
     */
140
    public function updatePeriod($updatePeriod)
141
    {
142
        $this->updatePeriod = $updatePeriod;
143
144
        return $this;
145
    }
146
147
    /**
148
     * @param $updateFrequency
149
     * @return $this
150
     */
151
    public function updateFrequency($updateFrequency)
152
    {
153
        $this->updateFrequency = $updateFrequency;
154
155
        return $this;
156
    }
157
158
    /**
159
     * Set channel ttl (minutes)
160
     * @param int $ttl
161
     * @return $this
162
     */
163
    public function ttl($ttl)
164
    {
165
        $this->ttl = $ttl;
166
167
        return $this;
168
    }
169
170
    /**
171
     * Add item object
172
     * @param ItemInterface $item
173
     * @return $this
174
     */
175
    public function addItem(ItemInterface $item)
176
    {
177
        $this->items[] = $item;
178
179
        return $this;
180
    }
181
182
    /**
183
     * Append to feed
184
     * @param FeedInterface $feed
185
     * @return $this
186
     */
187
    public function appendTo(FeedInterface $feed)
188
    {
189
        $feed->addChannel($this);
190
191
        return $this;
192
    }
193
194
    /**
195
     * Return XML object
196
     * @return SimpleXMLElement
197
     */
198
    public function asXML()
199
    {
200
        $xml = new SimpleXMLElement('<?xml version="1.0" encoding="UTF-8" ?><channel></channel>',
201
            LIBXML_NOERROR | LIBXML_ERR_NONE | LIBXML_ERR_FATAL);
202
        $xml->addChild('title', $this->title);
203
        $xml->addChild('link', $this->url);
204
        $xml->addChild('description', $this->description);
205
206
        if ($this->language !== null) {
207
            $xml->addChild('language', $this->language);
208
        }
209
210
        if ($this->updatePeriod) {
211
            $xml->addChild("xmlns:sy:updatePeriod", $this->updatePeriod);
212
        }
213
214
        if ($this->updateFrequency) {
215
            $xml->addChild("xmlns:sy:updateFrequency", $this->updateFrequency);
216
        }
217
218
        if ($this->copyright !== null) {
219
            $xml->addChild('copyright', $this->copyright);
220
        }
221
222
        if ($this->pubDate !== null) {
223
            $xml->addChild('pubDate', date(DATE_RSS, $this->pubDate));
224
        }
225
226
        if ($this->lastBuildDate !== null) {
227
            $xml->addChild('lastBuildDate', date(DATE_RSS, $this->lastBuildDate));
228
        }
229
230
        if ($this->ttl !== null) {
231
            $xml->addChild('ttl', $this->ttl);
232
        }
233
234 View Code Duplication
        foreach ($this->items as $item) {
0 ignored issues
show
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
235
            $toDom = dom_import_simplexml($xml);
236
            $fromDom = dom_import_simplexml($item->asXML());
237
            $toDom->appendChild($toDom->ownerDocument->importNode($fromDom, true));
238
        }
239
240
        return $xml;
241
    }
242
}
243