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.

  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.

RoboFile.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
/**
4
 * RoboFile.php
5
 *
6
 * NOTICE OF LICENSE
7
 *
8
 * This source file is subject to the Open Software License (OSL 3.0)
9
 * that is available through the world-wide-web at this URL:
10
 * http://opensource.org/licenses/osl-3.0.php
11
 *
12
 * PHP version 5
13
 *
14
 * @author    Tim Wagner <[email protected]>
15
 * @copyright 2015 TechDivision GmbH <[email protected]>
16
 * @license   http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
17
 * @link      https://github.com/appserver-io/robo-tasks
18
 * @link      http://www.appserver.io
19
 */
20
21
use AppserverIo\RoboTasks\AbstractRoboFile;
22
use Robo\Robo;
23
24
/**
25
 * Defines the available build tasks.
26
 *
27
 * @author    Tim Wagner <[email protected]>
28
 * @copyright 2015 TechDivision GmbH <[email protected]>
29
 * @license   http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
30
 * @link      https://github.com/appserver-io/robo-tasks
31
 * @link      http://www.appserver.io
32
 *
33
 * @SuppressWarnings(PHPMD)
34
 */
35
class RoboFile extends AbstractRoboFile
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
36
{
37
38
    /**
39
     * Run's the composer install command.
40
     *
41
     * @return void
42
     */
43
    public function composerInstall()
44
    {
45
        // optimize autoloader with custom path
46
        $this->taskComposerInstall()
47
             ->preferDist()
48
             ->optimizeAutoloader()
49
             ->run();
50
    }
51
52
    /**
53
     * Run's the composer update command.
54
     *
55
     * @return void
56
     */
57
    public function composerUpdate()
58
    {
59
        // optimize autoloader with custom path
60
        $this->taskComposerUpdate()
61
             ->preferDist()
62
             ->optimizeAutoloader()
63
             ->run();
64
    }
65
66
    /**
67
     * Clean up the environment for a new build.
68
     *
69
     * @return void
70
     */
71
    public function clean()
72
    {
73
        $this->taskDeleteDir($this->getTargetDir())->run();
74
    }
75
76
    /**
77
     * Prepare's the environment for a new build.
78
     *
79
     * @return void
80
     */
81
    public function prepare()
82
    {
83
        $this->taskFileSystemStack()
84
             ->mkdir($this->getTargetDir())
85
             ->mkdir($this->getReportsDir())
86
             ->run();
87
    }
88
89
    /**
90
     * Run's the PHPMD.
91
     *
92
     * @return void
93
     */
94
    public function runMd()
95
    {
96
97
        // run the mess detector
98
        $this->_exec(
99
            sprintf(
100
                '%s/bin/phpmd %s xml phpmd.xml --reportfile %s/reports/pmd.xml --ignore-violations-on-exit',
101
                $this->getVendorDir(),
102
                $this->getSrcDir(),
103
                $this->getTargetDir()
104
            )
105
        );
106
    }
107
108
    /**
109
     * Run's the PHPCPD.
110
     *
111
     * @return void
112
     */
113
    public function runCpd()
114
    {
115
116
        // run the copy past detector
117
        $this->_exec(
118
            sprintf(
119
                '%s/bin/phpcpd %s --log-pmd %s/reports/pmd-cpd.xml',
120
                $this->getVendorDir(),
121
                $this->getSrcDir(),
122
                $this->getTargetDir()
123
            )
124
        );
125
    }
126
127
    /**
128
     * Run's the PHPCodeSniffer.
129
     *
130
     * @return void
131
     */
132
    public function runCs()
133
    {
134
135
        // run the code sniffer
136
        $this->_exec(
137
            sprintf(
138
                '%s/bin/phpcs -n --report-full --extensions=php --standard=phpcs.xml --report-checkstyle=%s/reports/phpcs.xml %s',
139
                $this->getVendorDir(),
140
                $this->getTargetDir(),
141
                $this->getSrcDir()
142
            )
143
        );
144
    }
145
146
    /**
147
     * Run's the PHPUnit tests.
148
     *
149
     * @return void
150
     */
151
    public function runTests()
152
    {
153
154
        // run PHPUnit
155
        $this->taskPHPUnit(sprintf('%s/bin/phpunit', $this->getVendorDir()))
156
             ->configFile('phpunit.xml')
157
             ->run();
158
    }
159
160
    /**
161
     * The complete build process.
162
     *
163
     * @return void
164
     */
165
    public function build()
166
    {
167
        $this->clean();
168
        $this->prepare();
169
        $this->runCs();
170
        $this->runCpd();
171
        $this->runMd();
172
        $this->runTests();
173
    }
174
}
175