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

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.

features/bootstrap/FeatureContext.php (2 issues)

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
namespace Codeliner\CargoFeature;
3
4
use Behat\Behat\Context\ClosuredContextInterface,
5
    Behat\Behat\Context\TranslatedContextInterface,
6
    Behat\Behat\Context\BehatContext,
7
    Behat\Behat\Exception\PendingException;
8
use Behat\Gherkin\Node\PyStringNode,
9
    Behat\Gherkin\Node\TableNode;
10
use Behat\MinkExtension\Context\MinkContext;
11
use Zend\Mvc\Application;
12
use Zend\ServiceManager\ServiceManager;
13
14
//
15
// Require 3rd-party libraries here:
16
//
17
//   require_once 'PHPUnit/Autoload.php';
18
//   require_once 'PHPUnit/Framework/Assert/Functions.php';
19
//
20
21
/**
22
 * Features context.
23
 */
24
class FeatureContext extends MinkContext
25
{
26
    /**
27
     * @var \Interop\Container\ContainerInterface
28
     */
29
    private static $container;
30
    
31
    /**
32
     * Initializes context.
33
     * Every scenario gets it's own context object.
34
     *
35
     * @param array $parameters context parameters (set them up through behat.yml)
0 ignored issues
show
There is no parameter named $parameters. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
36
     */
37
    public function __construct()
38
    {
39
        // Initialize your context here
40
    }
41
42
    /**
43
     * @BeforeSuite
44
     */
45
    static public function iniializeContainer()
46
    {
47
        if (self::$container === null) {
48
            self::$container = require __DIR__ . '/../../config/container.php';
49
        }
50
    }
51
    
52
    /**
53
     * @BeforeFeature
54
     */
55
    public static function clearDatabase()
56
    {
57
        $em = self::$container->get('doctrine.entitymanager.orm_default');
58
        $q = $em->createQuery('delete from Codeliner\CargoBackend\Model\Cargo\Cargo');
59
        $q->execute();
60
    }
61
    
62
    /**
63
     * @Given /^I click the submit button$/
64
     */
65
    public function iClickTheSubmitButton()
66
    {
67
        $session = $this->getSession();
68
        $page = $session->getPage();
69
        
70
        $submit = $page->find('css', 'form input[type=submit]');
71
        
72
        if ($submit) {
73
            $submit->click();
74
        } else {
75
            throw new \RuntimeException("Can not find the submit btn");
76
        }
77
    }
78
79
    /**
80
     * @Then /^I should wait until I see "([^"]*)"$/
81
     */
82
    public function iShouldSeeAvailableRoutes($arg1)
83
    {
84
        $this->getSession()->wait(5000, '(0 === jQuery.active)');
85
86
        $this->assertElementOnPage($arg1);
87
    }
88
    
89
    /**
90
     * @When /^I click on first item in the list "([^"]*)"$/
91
     */
92
    public function iClickOnFirstItemInTheList($arg1)
0 ignored issues
show
The parameter $arg1 is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
93
    {
94
        $session = $this->getSession();
95
        $page = $session->getPage();
96
        
97
        $ul = $page->find('css', '#cargo-list');
98
        
99
        $li = $ul->find('css', 'li');
100
        
101
        $li->find('css', 'a')->click();
102
    }
103
104
    /**
105
     * @When /^I follow first "([^"]*)" link$/
106
     */
107
    public function iFollowFirstLink($arg1)
108
    {
109
        $page = $this->getSession()->getPage();
110
111
        $link = $page->find('css', $arg1);
112
113
        if ($link) {
114
            $link->click();
115
        }
116
    }
117
    
118
    /**
119
     * @Given /^I wait until I am on page "(?P<page>[^"]+)"$/
120
     */
121
    public function iWaitUntilIAmOnPage($page)
122
    {
123
        $matchingFound = false;
124
        
125
        for($i=1;$i++;$i<=5) {
126
            if (strpos($this->getSession()->getCurrentUrl(), $this->locatePath($page)) !== false) {
127
                $matchingFound = true;
128
                break;
129
            }
130
            sleep(1);
131
        }
132
        
133
        if (!$matchingFound) {
134
            throw new \Exception('Stoped waiting, timelimit reached!');
135
        }
136
    }
137
138
}
139