Issues (127)

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.

UI/API/Tests/Functional/CreateWepayAccountTest.php (1 issue)

Check for unnecessary variable assignments.

Unused Code Major

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 App\Containers\Wepay\UI\API\Tests\Functional;
4
5
use App\Containers\Wepay\Tests\ApiTestCase;
6
7
/**
8
 * Class CreateWepayAccountTest.
9
 *
10
 * @group wepay
11
 * @group api
12
 *
13
 * @author Rockers Technologies <[email protected]>
14
 */
15
class CreateWepayAccountTest extends ApiTestCase
16
{
17
18
    protected $endpoint = '[email protected]/user/payments/accounts/wepay';
19
20
    protected $access = [
21
        'permissions' => '',
22
        'roles'       => '',
23
    ];
24
25
    /**
26
     * @test
27
     */
28
    public function testCreateWepayAccount_()
29
    {
30
        $userDetails = [
31
            'name'     => $this->faker->name,
32
            'email'    => $this->faker->email,
33
            'password' => '123456789',
34
        ];
35
        
36
        // get the logged in user (create one if no one is logged in)
37
        $user = $this->getTestingUser($userDetails);
0 ignored issues
show
$user is not used, you could remove the assignment.

This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.

$myVar = 'Value';
$higher = false;

if (rand(1, 6) > 3) {
    $higher = true;
} else {
    $higher = false;
}

Both the $myVar assignment in line 1 and the $higher assignment in line 2 are dead. The first because $myVar is never used and the second because $higher is always overwritten for every possible time line.

Loading history...
38
39
        $data = [
40
            'name'          => $this->faker->name,
41
            'description'   => $this->faker->text(50),
42
            'type'          => 'personal',
43
            'imageUrl'      => 'https://someurl.com',
44
            'country'       => 'US',
45
            'currencies'    => 'USD',
46
            'nickname'      => 'test account for wepay',
47
        ];
48
49
        // send the HTTP request
50
        $response = $this->makeCall($data);
51
52
        // assert response status is correct
53
        $response->assertStatus(202);
54
55
        // convert JSON response string to Object
56
        $responseContent = $this->getResponseContentObject();
57
58
        $this->assertEquals($responseContent->message, 'Wepay account created successfully.');
59
60
    }
61
62
}
63