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

Security Analysis    not enabled

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.

SnappyRouter/Controller/AbstractController.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 Vectorface\SnappyRouter\Controller;
4
5
use \Exception;
6
use Vectorface\SnappyRouter\Di\Di;
7
use Vectorface\SnappyRouter\Di\DiProviderInterface;
8
use Vectorface\SnappyRouter\Handler\AbstractRequestHandler;
9
use Vectorface\SnappyRouter\Request\HttpRequest;
10
11
/**
12
 * An abstract base controller that should be extended by all other controllers.
13
 * @copyright Copyright (c) 2014, VectorFace, Inc.
14
 * @author Dan Bruce <[email protected]>
15
 */
16
abstract class AbstractController implements DiProviderInterface
17
{
18
    /** The web request being made. */
19
    private $request;
20
21
    /** The array of view context variables. */
22
    protected $viewContext;
23
24
    /** The handler being used by the router. */
25
    protected $handler;
26
27
    /**
28
     * This method is called before invoking any specific controller action.
29
     * Override this method to provide your own logic for the subclass but
30
     * ensure you make a call to parent::initialize() as well.
31
     * @param HttpRequest $request The web request being made.
32
     * @param AbstractRequestHandler $handler The handler the router is using.
33
     * @return AbstractController Returns $this.
34
     */
35 10
    public function initialize(HttpRequest $request, AbstractRequestHandler $handler)
36
    {
37 10
        $this->request = $request;
38 10
        $this->handler = $handler;
39 10
        $this->viewContext = array();
40 10
        return $this;
41
    }
42
43
    /**
44
     * Renders the view for the given controller and action.
45
     * @param array $viewVariables An array of additional parameters to add
46
     *        to the existing view context.
47
     * @param string $template The name of the view template.
48
     * @return Returns the rendered view as a string.
49
     */
50 2
    public function renderView($viewVariables, $template)
51
    {
52 2
        $encoder = $this->handler->getEncoder();
53 2
        if (method_exists($encoder, 'renderView')) {
54 1
            return $encoder->renderView(
0 ignored issues
show
The method renderView() does not seem to exist on object<Vectorface\Snappy...er\Encoder\NullEncoder>.

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...
55 1
                $template,
56 1
                array_merge($this->viewContext, (array)$viewVariables)
57
            );
58
        } else {
59 1
            throw new Exception('The current encoder does not support the render view method.');
60
        }
61
    }
62
63
    /**
64
     * Returns the request object.
65
     * @return HttpRequest The request object.
66
     */
67 1
    public function getRequest()
68
    {
69 1
        return $this->request;
70
    }
71
72
    /**
73
     * Returns the view context.
74
     * @return array The view context.
75
     */
76 3
    public function getViewContext()
77
    {
78 3
        return $this->viewContext;
79
    }
80
81
    /**
82
     * Retrieve an element from the DI container.
83
     * @param string $key The DI key.
84
     * @param boolean $useCache (optional) An optional indicating whether we
85
     *        should use the cached version of the element (true by default).
86
     * @return mixed Returns the DI element mapped to that key.
87
     */
88 1
    public function get($key, $useCache = true)
89
    {
90 1
        return Di::getDefault()->get($key, $useCache);
91
    }
92
93
    /**
94
     * Sets an element in the DI container for the specified key.
95
     * @param string $key The DI key.
96
     * @param mixed  $element The DI element to store.
97
     * @return Di Returns the Di instance.
98
     */
99 1
    public function set($key, $element)
100
    {
101 1
        return Di::getDefault()->set($key, $element);
102
    }
103
}
104