Issues (6)

Security Analysis    no request data  

This project does not seem to handle request data directly as such no vulnerable execution paths were found.

  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.
  Regex Injection
Regex Injection enables an attacker to execute arbitrary code in your PHP process.
  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.
  Response Splitting
Response Splitting can be used to send arbitrary responses.
  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.
  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.
  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.
  Code Injection
Code Injection enables an attacker to execute arbitrary code on the server.
  Variable Injection
Variable Injection enables an attacker to overwrite program variables with custom data, and can lead to further vulnerabilities.
  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.
  Other Vulnerability
This category comprises other attack vectors such as manipulating the PHP runtime, loading custom extensions, freezing the runtime, or similar.
  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.
  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.
  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.
  Header Injection
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.

src/Nexus/Dumper/DumperDependencyProvider.php (2 issues)

1
<?php
2
declare(strict_types=1);
3
4
namespace Nexus\Dumper;
5
6
use Nexus\Dumper\Communication\Command\DumpLocalCommand;
7
use Nexus\Dumper\Communication\Command\DumpSshCommand;
8
use Nexus\Dumper\Communication\Command\RestoreLocalCommand;
9
use Nexus\Dumper\Communication\Command\RestoreSshCommand;
10
use Xervice\Core\Business\Model\Dependency\DependencyContainerInterface;
11
use Xervice\Core\Business\Model\Dependency\Provider\AbstractDependencyProvider;
12
13
class DumperDependencyProvider extends AbstractDependencyProvider
14
{
15
    public const DOCKER_FACADE = 'docker.facade';
16
    public const SHELL_FACADE = 'shell.facade';
17
    public const COMMAND_LIST = 'command.list';
18
19
    /**
20
     * @param \Xervice\Core\Business\Model\Dependency\DependencyContainerInterface $container
21
     *
22
     * @return \Xervice\Core\Business\Model\Dependency\DependencyContainerInterface
23
     */
24
    public function handleDependencies(DependencyContainerInterface $container): DependencyContainerInterface
25
    {
26
        $container = $this->addShellFacade($container);
27
        $container = $this->addDockerFacade($container);
28
        $container = $this->addCommandList($container);
29
30
        return $container;
31
    }
32
33
    /**
34
     * @return array
35
     */
36
    protected function getCommandList(): array
37
    {
38
        return [
39
            new DumpLocalCommand(),
40
            new DumpSshCommand(),
41
            new RestoreLocalCommand(),
42
            new RestoreSshCommand()
43
        ];
44
    }
45
46
    /**
47
     * @param \Xervice\Core\Business\Model\Dependency\DependencyContainerInterface $container
48
     *
49
     * @return \Xervice\Core\Business\Model\Dependency\DependencyContainerInterface
50
     */
51
    private function addShellFacade(DependencyContainerInterface $container): DependencyContainerInterface
52
    {
53
        $container[self::SHELL_FACADE] = function(DependencyContainerInterface $container) {
54
            return $container->getLocator()->shell()->facade();
0 ignored issues
show
The method facade() does not exist on Xervice\Core\Business\Mo...y\LocatorProxyInterface. It seems like you code against a sub-type of said class. However, the method does not exist in Xervice\Core\Business\Mo...xy\AbstractLocatorProxy or Xervice\Core\Business\Mo...PersistenceLocatorProxy. Are you sure you never get one of those? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

54
            return $container->getLocator()->shell()->/** @scrutinizer ignore-call */ facade();
Loading history...
55
        };
56
57
        return $container;
58
    }
59
60
    /**
61
     * @param \Xervice\Core\Business\Model\Dependency\DependencyContainerInterface $container
62
     *
63
     * @return \Xervice\Core\Business\Model\Dependency\DependencyContainerInterface
64
     */
65
    private function addDockerFacade(DependencyContainerInterface $container): DependencyContainerInterface
66
    {
67
        $container[self::DOCKER_FACADE] = function(DependencyContainerInterface $container) {
68
            return $container->getLocator()->dockerClient()->facade();
69
        };
70
71
        return $container;
72
    }
73
74
    /**
75
     * @param \Xervice\Core\Business\Model\Dependency\DependencyContainerInterface $container
76
     *
77
     * @return \Xervice\Core\Business\Model\Dependency\DependencyContainerInterface
78
     */
79
    protected function addCommandList(
80
        DependencyContainerInterface $container
81
    ): DependencyContainerInterface {
82
        $container[self::COMMAND_LIST] = function (DependencyContainerInterface $container) {
0 ignored issues
show
The parameter $container is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

82
        $container[self::COMMAND_LIST] = function (/** @scrutinizer ignore-unused */ DependencyContainerInterface $container) {

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

Loading history...
83
            return $this->getCommandList();
84
        };
85
        return $container;
86
}
87
}