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

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.

tests/JunitErrorFormatterTest.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
declare(strict_types=1);
4
5
namespace RQuadling\Tests\PHPStan\ErrorFormatter;
6
7
use DOMDocument;
8
use Generator;
9
use PHPStan\Command\ErrorFormatter\TestBaseFormatter;
10
use RQuadling\PHPStan\ErrorFormatter\JunitErrorFormatter;
11
12
class JunitErrorFormatterTest extends TestBaseFormatter
13
{
14
    /**
15
     * [dataFormatterOutputProvider description]
16
     *
17
     * @return \Generator<array<int, string|int>>
0 ignored issues
show
The doc-type \Generator<array<int, could not be parsed: Expected "|" or "end of type", but got "<" at position 10. (view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
18
     */
19
    public function dataFormatterOutputProvider(): Generator
20
    {
21
        yield [
22
            'No errors',
23
            0,
24
            0,
25
            0,
26
            '<?xml version="1.0" encoding="UTF-8"?>
27
<testsuite failures="0" name="phpstan" tests="0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/junit-team/junit5/r5.5.1/platform-tests/src/test/resources/jenkins-junit.xsd">
28
  <testcase name="phpstan"/>
29
</testsuite>
30
',
31
        ];
32
33
        yield [
34
            'One file error',
35
            1,
36
            1,
37
            0,
38
            '<?xml version="1.0" encoding="UTF-8"?>
39
<testsuite failures="1" name="phpstan" tests="1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/junit-team/junit5/r5.5.1/platform-tests/src/test/resources/jenkins-junit.xsd">
40
  <testcase name="folder with unicode &#x1F603;/file name with &quot;spaces&quot; and unicode &#x1F603;.php:4">
41
    <failure message="Foo" />
42
  </testcase>
43
</testsuite>
44
',
45
        ];
46
47
        yield [
48
            'One generic error',
49
            1,
50
            0,
51
            1,
52
            '<?xml version="1.0" encoding="UTF-8"?>
53
<testsuite failures="1" name="phpstan" tests="1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/junit-team/junit5/r5.5.1/platform-tests/src/test/resources/jenkins-junit.xsd">
54
  <testcase name="Generic error">
55
    <failure message="first generic error" />
56
  </testcase>
57
</testsuite>
58
',
59
        ];
60
61
        yield [
62
            'Multiple file errors',
63
            1,
64
            4,
65
            0,
66
            '<?xml version="1.0" encoding="UTF-8"?>
67
<testsuite failures="4" name="phpstan" tests="4" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/junit-team/junit5/r5.5.1/platform-tests/src/test/resources/jenkins-junit.xsd">
68
  <testcase name="folder with unicode &#x1F603;/file name with &quot;spaces&quot; and unicode &#x1F603;.php:4">
69
    <failure message="Foo" />
70
  </testcase>
71
  <testcase name="foo.php:1">
72
    <failure message="Foo"/>
73
  </testcase>
74
  <testcase name="foo.php:5">
75
    <failure message="Bar"/>
76
  </testcase>
77
  <testcase name="folder with unicode &#x1F603;/file name with &quot;spaces&quot; and unicode &#x1F603;.php:2">
78
    <failure message="Bar" />
79
  </testcase>
80
</testsuite>
81
',
82
        ];
83
84
        yield [
85
            'Multiple generic errors',
86
            1,
87
            0,
88
            2,
89
            '<?xml version="1.0" encoding="UTF-8"?>
90
<testsuite failures="2" name="phpstan" tests="2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/junit-team/junit5/r5.5.1/platform-tests/src/test/resources/jenkins-junit.xsd">
91
  <testcase name="Generic error">
92
    <failure message="first generic error" />
93
  </testcase>
94
  <testcase name="Generic error">
95
    <failure message="second generic error"/>
96
  </testcase>
97
</testsuite>
98
',
99
        ];
100
101
        yield [
102
            'Multiple file, multiple generic errors',
103
            1,
104
            4,
105
            2,
106
            '<?xml version="1.0" encoding="UTF-8"?>
107
<testsuite failures="6" name="phpstan" tests="6" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/junit-team/junit5/r5.5.1/platform-tests/src/test/resources/jenkins-junit.xsd">
108
  <testcase name="folder with unicode &#x1F603;/file name with &quot;spaces&quot; and unicode &#x1F603;.php:4">
109
    <failure message="Foo" />
110
  </testcase>
111
  <testcase name="foo.php:1">
112
    <failure message="Foo"/>
113
  </testcase>
114
  <testcase name="foo.php:5">
115
    <failure message="Bar"/>
116
  </testcase>
117
  <testcase name="folder with unicode &#x1F603;/file name with &quot;spaces&quot; and unicode &#x1F603;.php:2">
118
    <failure message="Bar" />
119
  </testcase>
120
  <testcase name="Generic error">
121
    <failure message="first generic error" />
122
  </testcase>
123
  <testcase name="Generic error">
124
    <failure message="second generic error"/>
125
  </testcase>
126
</testsuite>
127
',
128
        ];
129
    }
130
131
    /**
132
     * Test generated use cases for JUnit output format.
133
     *
134
     * @dataProvider dataFormatterOutputProvider
135
     *
136
     * @param string $message
137
     * @param int    $exitCode
138
     * @param int    $numFileErrors
139
     * @param int    $numGenericErrors
140
     * @param string $expected
141
     */
142
    public function testFormatErrors(
143
        string $message,
144
        int $exitCode,
145
        int $numFileErrors,
146
        int $numGenericErrors,
147
        string $expected
148
    ) {
149
        $formatter = new JunitErrorFormatter(self::DIRECTORY_PATH);
150
151
        $this->assertSame($exitCode, $formatter->formatErrors(
152
            $this->getAnalysisResult($numFileErrors, $numGenericErrors),
153
            $this->getErrorConsoleStyle()
154
        ), sprintf('%s: response code do not match', $message));
155
156
        $xml = new DOMDocument();
157
        $xml->loadXML($this->getOutputContent());
158
159
        $this->assertTrue($xml->schemaValidate('https://raw.githubusercontent.com/junit-team/junit5/r5.5.1/platform-tests/src/test/resources/jenkins-junit.xsd'));
160
161
        $this->assertXmlStringEqualsXmlString($expected, $this->getOutputContent(), sprintf('%s: XML do not match', $message));
162
    }
163
}
164