Issues (4)

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.

src/SymfonyConsoleDiDto.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
 * This file is part of the Symfony Console DI package.
4
 *
5
 * (c) Stéphane Demonchaux <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
namespace SymfonyDiConsole;
11
12
use Symfony\Component\Console\Input\InputDefinition;
13
use Symfony\Component\Console\Input\InputOption;
14
use Symfony\Component\Console\Input\InputArgument;
15
16
class SymfonyConsoleDiDto
17
{
18
    /**
19
     * @var string
20
     */
21
    private $name;
22
    /**
23
     * @var string
24
     */
25
    private $description;
26
    /**
27
     * @var InputDefinition
28
     */
29
    private $definition;
30
31
    /**
32
     * @param string          $name
33
     * @param string          $description
34
     * @param InputDefinition $inputDefinition
35
     */
36 3
    public function __construct($name = null, $description = null, InputDefinition $inputDefinition = null)
37
    {
38 3
        $this->name        = $name;
39 3
        $this->description = $description;
40 3
        $this->definition  = $inputDefinition === null ? new InputDefinition() : $inputDefinition;
41 3
    }
42
43
    /**
44
     * @param string $name
45
     * @return SymfonyConsoleDiDto
46
     */
47 1
    public function setName($name)
48
    {
49 1
        $this->name = $name;
50
51 1
        return $this;
52
    }
53
54
    /**
55
     * @param string $name
56
     * @return SymfonyConsoleDiDto
57
     */
58 1
    public function setDescription($description)
59
    {
60 1
        $this->description = $description;
61
62 1
        return $this;
63
    }
64
65
    /**
66
     * Adds an argument.
67
     *
68
     * @param string $name        The argument name
69
     * @param int    $mode        The argument mode: InputArgument::REQUIRED or InputArgument::OPTIONAL
70
     * @param string $description A description text
71
     * @param mixed  $default     The default value (for InputArgument::OPTIONAL mode only)
72
     *
73
     * @return Command The current instance
74
     */
75 3
    public function addArgument($name, $mode = null, $description = '', $default = null)
76
    {
77 3
        $this->definition->addArgument(new InputArgument($name, $mode, $description, $default));
78
79 3
        return $this;
80
    }
81
82
    /**
83
     * Adds an option.
84
     *
85
     * @param string $name        The option name
86
     * @param string $shortcut    The shortcut (can be null)
87
     * @param int    $mode        The option mode: One of the InputOption::VALUE_* constants
88
     * @param string $description A description text
89
     * @param mixed  $default     The default value (must be null for InputOption::VALUE_REQUIRED or InputOption::VALUE_NONE)
0 ignored issues
show
This line exceeds maximum limit of 120 characters; contains 125 characters

Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.

Loading history...
90
     *
91
     * @return Command The current instance
92
     */
93 3
    public function addOption($name, $shortcut = null, $mode = null, $description = '', $default = null)
94
    {
95 3
        $this->definition->addOption(new InputOption($name, $shortcut, $mode, $description, $default));
96
97 3
        return $this;
98
    }
99
100
    /**
101
     * @return string
102
     */
103 3
    public function getName()
104
    {
105 3
        return $this->name;
106
    }
107
108
    /**
109
     * @return string
110
     */
111 3
    public function getDescription()
112
    {
113 3
        return $this->description;
114
    }
115
116
    /**
117
     * @return InputDefinition
118
     */
119 3
    public function getDefinition()
120
    {
121 3
        return $this->definition;
122
    }
123
}
124