Issues (94)

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.

Classes/Utility/OutputUtility.php (3 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 TildBJ\Seeder\Utility;
3
4
use TYPO3\CMS\Extbase\Mvc\Cli\ConsoleOutput;
5
use TYPO3\CMS\Core\Utility\GeneralUtility;
6
7
/***************************************************************
8
 *
9
 *  Copyright notice
10
 *
11
 *  (c) 2017 Dennis Römmich <[email protected]>
12
 *
13
 *  All rights reserved
14
 *
15
 *  This script is part of the TYPO3 project. The TYPO3 project is
16
 *  free software; you can redistribute it and/or modify
17
 *  it under the terms of the GNU General Public License as published by
18
 *  the Free Software Foundation; either version 3 of the License, or
19
 *  (at your option) any later version.
20
 *
21
 *  The GNU General Public License can be found at
22
 *  http://www.gnu.org/copyleft/gpl.html.
23
 *
24
 *  This script is distributed in the hope that it will be useful,
25
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
26
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
27
 *  GNU General Public License for more details.
28
 *
29
 *  This copyright notice MUST APPEAR in all copies of the script!
30
 ***************************************************************/
31
32
/**
33
 * Class OutputUtility
34
 *
35
 * @package Sunzinet\XmlExport\Utility
36
 */
37
class OutputUtility implements \TYPO3\CMS\Core\SingletonInterface
38
{
39
    /**
40
     * output
41
     *
42
     * @var ConsoleOutput $output
43
     */
44
    protected $output;
45
46
    /**
47
     * OutputUtility constructor.
48
     */
49
    public function __construct()
50
    {
51
        $this->output = GeneralUtility::makeInstance(ConsoleOutput::class);
52
    }
53
54
    /**
55
     * log
56
     *
57
     * @param string $message
58
     */
59
    public function log($message)
60
    {
61
        $this->output->outputLine($message);
62
    }
63
64
    /**
65
     * @param string $message
66
     */
67
    public function error($message)
68
    {
69
        $this->log('<fg=red>' . $message . '</>');
70
    }
71
72
    /**
73
     * @param string $message
74
     */
75
    public function warning($message)
76
    {
77
        $this->log('<fg=yellow>' . $message . '</>');
78
    }
79
80
    /**
81
     * @param string $message
82
     */
83
    public function success($message)
84
    {
85
        $this->log('<fg=green>' . $message . '</>');
86
    }
87
88
    /**
89
     * @param string $message
90
     */
91
    public function info($message)
92
    {
93
        $this->log('<fg=blue>' . $message . '</>');
94
    }
95
96
    /**
97
     * @param $question
98
     * @param null $default
99
     * @param array|null $autocomplete
100
     * @return string
101
     */
102
    public function ask($question, $default = null, array $autocomplete = null)
103
    {
104
        return $this->output->ask($question, $default, $autocomplete);
105
    }
106
107
    /**
108
     * @param $question
109
     * @param $choices
110
     * @param null $default
111
     * @param bool $multiSelect
112
     * @param bool $attempts
113
     * @return array|int|string
114
     */
115
    public function select($question, $choices, $default = null, $multiSelect = false, $attempts = false)
116
    {
117
        return $this->output->select($question, $choices, $default, $multiSelect, $attempts);
118
    }
119
120
    /**
121
     * @param null $max
122
     * @return void
123
     */
124
    public function progressStart($max = null)
125
    {
126
        $this->output->progressStart($max);
127
    }
128
129
    /**
130
     * @param int $step
131
     * @param bool $redraw
132
     * @return void
133
     */
134
    public function progressAdvance($step = 1, $redraw = false)
135
    {
136
        $this->output->progressAdvance($step, $redraw);
0 ignored issues
show
The call to ConsoleOutput::progressAdvance() has too many arguments starting with $redraw.

This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
137
    }
138
139
    /**
140
     * @param $current
141
     * @param bool $redraw
142
     * @return void
143
     */
144
    public function progressSet($current, $redraw = false)
145
    {
146
        $this->output->progressSet($current, $redraw);
0 ignored issues
show
The call to ConsoleOutput::progressSet() has too many arguments starting with $redraw.

This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
147
    }
148
149
    /**
150
     * @return void
151
     */
152
    public function progressFinish()
153
    {
154
        $this->output->progressFinish;
0 ignored issues
show
The property progressFinish does not seem to exist in TYPO3\CMS\Extbase\Mvc\Cli\ConsoleOutput.

An attempt at access to an undefined property has been detected. This may either be a typographical error or the property has been renamed but there are still references to its old name.

If you really want to allow access to undefined properties, you can define magic methods to allow access. See the php core documentation on Overloading.

Loading history...
155
    }
156
}
157