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

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/Unit/Template/TemplateRendererTest.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
/*
4
 * This file is part of the php-phantomjs.
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 */
9
namespace JonnyW\PhantomJs\Tests\Unit\Template;
10
11
use Twig_Environment;
12
use Twig_Loader_String;
13
use JonnyW\PhantomJs\Http\Request;
14
use JonnyW\PhantomJs\Template\TemplateRenderer;
15
16
/**
17
 * PHP PhantomJs
18
 *
19
 * @author Jon Wenmoth <[email protected]>
20
 */
21
class TemplateRendererTest extends \PHPUnit_Framework_TestCase
22
{
23
24
/** +++++++++++++++++++++++++++++++++++ **/
25
/** ++++++++++++++ TESTS ++++++++++++++ **/
26
/** +++++++++++++++++++++++++++++++++++ **/
27
28
    /**
29
     * Test render injects single parameter
30
     * into template.
31
     *
32
     * @access public
33
     * @return void
34
     */
35
    public function testRenderInjectsSingleParameterIntoTemplate()
36
    {
37
        $template = 'var param = "{{ test }}"';
38
39
        $renderer = $this->getTemplateRenderer();
40
        $result   = $renderer->render($template, array('test' => 'data'));
41
42
        $this->assertSame('var param = "data"', $result);
43
    }
44
45
    /**
46
     * Test render injects multiple parameters
47
     * into template.
48
     *
49
     * @access public
50
     * @return void
51
     */
52
    public function testRenderInjectsMultipleParametersIntoTemplates()
53
    {
54
        $template = 'var param = "{{ test }}", var param2 = "{{ test2 }}"';
55
56
        $renderer = $this->getTemplateRenderer();
57
        $result   = $renderer->render($template, array('test' => 'data', 'test2' => 'more data'));
58
59
        $this->assertSame('var param = "data", var param2 = "more data"', $result);
60
    }
61
62
    /**
63
     * Test render injects parameter into
64
     * template using object method.
65
     *
66
     * @access public
67
     * @return void
68
     */
69
    public function testRenderInjectsParameterIntoTemplateUsingObjectMethod()
70
    {
71
        $template = 'var param = {{ request.getTimeout() }}';
72
73
        $request = $this->getRequest();
74
        $request->setTimeout(5000);
75
76
        $renderer = $this->getTemplateRenderer();
77
        $result   = $renderer->render($template, array('request' => $request));
78
79
        $this->assertSame('var param = 5000', $result);
80
    }
81
82
    /**
83
     * Test render injects parameter into
84
     * template using object method
85
     * with parameter.
86
     *
87
     * @access public
88
     * @return void
89
     */
90
    public function testRenderInjectsParameterIntoTemplateUsingObjectMethodWithParameter()
91
    {
92
        $template = 'var param = {{ request.getHeaders("json") }}';
93
94
        $request = $this->getRequest();
95
        $request->addHeader('json', 'test');
96
97
        $renderer = $this->getTemplateRenderer();
98
        $result = $renderer->render($template, array('request' => $request));
99
100
        $this->assertSame(htmlspecialchars('var param = {"json":"test"}'), $result);
101
    }
102
103
/** +++++++++++++++++++++++++++++++++++ **/
104
/** ++++++++++ TEST ENTITIES ++++++++++ **/
105
/** +++++++++++++++++++++++++++++++++++ **/
106
107
    /**
108
     * Get template renderer instance.
109
     *
110
     * @return \JonnyW\PhantomJs\Message\TemplateRenderer
111
     */
112
    protected function getTemplateRenderer()
113
    {
114
        $templateRenderer = new TemplateRenderer(
115
            $this->getTwig()
116
        );
117
118
        return $templateRenderer;
119
    }
120
121
    /**
122
     * Get request
123
     *
124
     * @access protected
125
     * @return \JonnyW\PhantomJs\Http\Request
126
     */
127
    protected function getRequest()
128
    {
129
        $request = new Request();
130
131
        return $request;
132
    }
133
134
    /**
135
     * Get twig
136
     *
137
     * @access protected
138
     * @return \Twig_Environment
139
     */
140
    protected function getTwig()
141
    {
142
        $twig = new Twig_Environment(
143
            new Twig_Loader_String()
0 ignored issues
show
Deprecated Code introduced by
The class Twig_Loader_String has been deprecated with message: since 1.18.1 (to be removed in 2.0)

This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.

Loading history...
144
        );
145
146
        return $twig;
147
    }
148
}
149