GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Issues (34)

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/Console/InitCommand.php (1 issue)

Labels
Severity

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
/* (c) Anton Medvedev <[email protected]>
3
 *
4
 * For the full copyright and license information, please view the LICENSE
5
 * file that was distributed with this source code.
6
 */
7
8
namespace Deployer\Console;
9
10
use Deployer\Component\Initializer\Initializer;
11
use Deployer\Component\Initializer\Template\CakeTemplate;
12
use Deployer\Component\Initializer\Template\CodeIgniterTemplate;
13
use Deployer\Component\Initializer\Template\CommonTemplate;
14
use Deployer\Component\Initializer\Template\DrupalTemplate;
15
use Deployer\Component\Initializer\Template\LaravelTemplate;
16
use Deployer\Component\Initializer\Template\SymfonyTemplate;
17
use Deployer\Component\Initializer\Template\Typo3Template;
18
use Deployer\Component\Initializer\Template\Yii2AdvancedAppTemplate;
19
use Deployer\Component\Initializer\Template\Yii2BasicAppTemplate;
20
use Deployer\Component\Initializer\Template\YiiTemplate;
21
use Deployer\Component\Initializer\Template\ZendTemplate;
22
use Symfony\Component\Console\Command\Command;
23
use Symfony\Component\Console\Helper\FormatterHelper;
24
use Symfony\Component\Console\Input\InputInterface;
25
use Symfony\Component\Console\Input\InputOption;
26
use Symfony\Component\Console\Output\OutputInterface;
27
use Symfony\Component\Console\Style\SymfonyStyle;
28
use Symfony\Component\Process\Exception\RuntimeException;
29
use Symfony\Component\Process\Process;
30
31
class InitCommand extends Command
32
{
33
34 9
    protected function configure()
35
    {
36
        $this
37 9
            ->setName('init')
38 9
            ->setDescription('Initialize deployer in your project')
39 9
            ->addOption('template', 't', InputOption::VALUE_OPTIONAL, 'The template of you project')
40 9
            ->addOption('filepath', null, InputOption::VALUE_OPTIONAL, 'The file path (default "deploy.php")', 'deploy.php');
41 9
    }
42
43
    protected function execute(InputInterface $input, OutputInterface $output)
44
    {
45
        /** @var FormatterHelper $formatter */
46
        $formatter = $this->getHelper('formatter');
47
        $initializer = new Initializer();
48
        $template = $input->getOption('template');
49
        $filepath = $input->getOption('filepath');
50
51
        if (file_exists($filepath)) {
52
            $output->writeln([
53
                $formatter->formatBlock(
54
                    sprintf('The file "%s" already exist.', $filepath),
55
                    'bg=red;fg=white', true
56
                ),
57
            ]);
58
            return 2;
59
        }
60
61
        $project = 'my_project';
62
        $repository = '';
63
        $hosts = [];
64
        $allow = true;
65
66
        if ($template === null) {
67
            $io = new SymfonyStyle($input, $output);
68
69
            // Welcome message
70
            $output->writeln("
71
  _____             _
72
 |  __ \           | |
73
 | |  | | ___ _ __ | | ___  _   _  ___ _ __
74
 | |  | |/ _ \ '_ \| |/ _ \| | | |/ _ \ '__|
75
 | |__| |  __/ |_) | | (_) | |_| |  __/ |
76
 |_____/ \___| .__/|_|\___/ \__, |\___|_|
77
             | |             __/ |
78
             |_|            |___/
79
");
80
81
            $io->text([
82
                'Welcome to the Deployer config generator.',
83
                'This utility will walk you through creating a deploy.php file.',
84
                '',
85
                'Press ^C at any time to quit.',
86
            ]);
87
88
            // Yes?
89
            $io->confirm('Continue?');
90
91
            // Template
92
            $recipes = $initializer->getRecipes();
93
            $template = $io->choice('Select project template', $recipes, 'common');
94
95
            // Repo
96
            $default = false;
97
            try {
98
                $process = Process::fromShellCommandline('git remote get-url origin');
99
                $default = $process->mustRun()->getOutput();
100
                $default = trim($default);
101
            } catch (RuntimeException $e) {
102
            }
103
            $repository = $io->ask('Repository', $default);
104
105
            // Repo
106
            $default = false;
107
            try {
108
                $process = Process::fromShellCommandline('basename "$PWD"');
109
                $default = $process->mustRun()->getOutput();
110
                $default = trim($default);
111
            } catch (RuntimeException $e) {
112
            }
113
            $project = $io->ask('Project name', $default);
114
115
            // Hosts
116
            $hosts = explode(',', $io->ask('Hosts (comma separated)', 'deployer.org'));
117
118
            // Privacy
119
            $io->text(<<<TEXT
120
    <info>Contribute to the Deployer Development</info>
121
122
Help development and improve features of Deployer by 
123
an optional usage data collection program. This program
124
collects anonymous usage data and sends it to Deployer. 
125
The data is used in Deployer development to get reliable
126
statistics on which features are used (or not used). The
127
information is not traceable to any individual or 
128
organization. Participation is voluntary, and you can 
129
change your mind at any time.
130
131
Anonymous usage data contains Deployer version, PHP version, 
132
OS type, name of the command being executed and whether 
133
it was successful or not, count of hosts and anonymized 
134
project hash. This program will not affect the performance 
135
of Deployer as the data is insignificant and transmitted 
136
in a separate process.
137
138
We appreciate your involvement!
139
TEXT);
140
141
            $allow = $io->confirm('Do you confirm?');
142
        }
143
144
145
        file_put_contents($filepath, $initializer->getTemplate($template, $project, $repository, $hosts, $allow));
146
147
        $output->writeln(sprintf(
148
            '<info>Successfully created</info> <comment>%s</comment>',
149
            $filepath
150
        ));
151
152
        return 0;
153
    }
154
155
    /**
156
     * Create a initializer system
157
     *
158
     * @return Initializer
159
     */
160
    private function createInitializer()
161
    {
162
        $initializer = new Initializer();
163
164
        $initializer->addTemplate('Common', new CommonTemplate());
165
        $initializer->addTemplate('Laravel', new LaravelTemplate());
166
        $initializer->addTemplate('Symfony', new SymfonyTemplate());
167
        $initializer->addTemplate('Yii', new YiiTemplate());
168
        $initializer->addTemplate('Yii2 Basic App', new Yii2BasicAppTemplate());
169
        $initializer->addTemplate('Yii2 Advanced App', new Yii2AdvancedAppTemplate());
170
        $initializer->addTemplate('Zend Framework', new ZendTemplate());
171
        $initializer->addTemplate('CakePHP', new CakeTemplate());
172
        $initializer->addTemplate('CodeIgniter', new CodeIgniterTemplate());
173
        $initializer->addTemplate('Drupal', new DrupalTemplate());
174
        $initializer->addTemplate('TYPO3', new Typo3Template());
175
176
        return $initializer;
0 ignored issues
show
This code did not parse for me. Apparently, there is an error somewhere around this line:

Syntax error, unexpected EOF
Loading history...
177
    }
178
}
179