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 (13)

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.

Doctrine/DoctrineOrmLoadDataFixturesCommand.php (1 issue)

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
3
/*
4
 * This file is part of the Hautelook\AliceBundle package.
5
 *
6
 * (c) Baldur Rensch <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Hautelook\AliceBundle\Console\Command\Doctrine;
13
14
use Doctrine\Common\Persistence\ManagerRegistry;
15
use Hautelook\AliceBundle\LoaderInterface as AliceBundleLoaderInterface;
16
use RuntimeException;
17
use Symfony\Bundle\FrameworkBundle\Console\Application as FrameworkBundleConsoleApplication;
18
use Symfony\Component\Console\Application as ConsoleApplication;
19
use Symfony\Component\Console\Command\Command;
20
use Symfony\Component\Console\Helper\QuestionHelper;
21
use Symfony\Component\Console\Input\InputInterface;
22
use Symfony\Component\Console\Input\InputOption;
23
use Symfony\Component\Console\Output\OutputInterface;
24
use Symfony\Component\Console\Question\ConfirmationQuestion;
25
26
/**
27
 * Command used to load the fixtures.
28
 */
29
final class DoctrineOrmLoadDataFixturesCommand extends Command
30
{
31
    /**
32
     * @var ManagerRegistry
33
     */
34
    private $doctrine;
35
36
    /**
37
     * @var AliceBundleLoaderInterface
38
     */
39
    private $loader;
40
41
    public function __construct(string $name, ManagerRegistry $managerRegistry, AliceBundleLoaderInterface $loader)
42
    {
43
        parent::__construct($name);
44
45
        $this->doctrine = $managerRegistry;
46
        $this->loader = $loader;
47
    }
48
49
    /**
50
     * @inheritdoc
51
     */
52
    protected function configure()
53
    {
54
        $this
55
            ->setAliases(['hautelook:fixtures:load'])
56
            ->setDescription('Load data fixtures to your database.')
57
            ->addOption(
58
                'bundle',
59
                'b',
60
                InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY,
61
                'Bundles where fixtures should be loaded.'
62
            )
63
            ->addOption(
64
                'manager',
65
                'em',
66
                InputOption::VALUE_REQUIRED,
67
                'The entity manager to use for this command. If not specified, use the default Doctrine fixtures entity'
68
                .'manager.'
69
            )
70
            ->addOption(
71
                'append',
72
                null,
73
                InputOption::VALUE_NONE,
74
                'Append the data fixtures instead of deleting all data from the database first.'
75
            )
76
            ->addOption(
77
                'shard',
78
                null,
79
                InputOption::VALUE_REQUIRED,
80
                'The shard database id to use for this command.'
81
            )
82
            ->addOption('purge-with-truncate',
83
                null,
84
                InputOption::VALUE_NONE,
85
                'Purge data by using a database-level TRUNCATE statement when using Doctrine fixtures.'
86
            )
87
        ;
88
    }
89
90
    /**
91
     * @inheritdoc
92
     */
93
    public function setApplication(ConsoleApplication $application = null)
94
    {
95
        if (null !== $application && false === $application instanceof FrameworkBundleConsoleApplication) {
96
            throw new \InvalidArgumentException(
97
                sprintf(
98
                    'Expected application to be an instance of "%s".',
99
                    FrameworkBundleConsoleApplication::class
100
                )
101
            );
102
        }
103
104
        parent::setApplication($application);
105
    }
106
107
108
    /**
109
     * {@inheritdoc}
110
     *
111
     * @throws RuntimeException Unsupported Application type
112
     */
113
    protected function execute(InputInterface $input, OutputInterface $output)
114
    {
115
        // Warn the user that the database will be purged
116
        // Ask him to confirm his choice
117
        if ($input->isInteractive() && !$input->getOption('append')) {
118
            if (false === $this->askConfirmation(
119
                    $input,
120
                    $output,
121
                    '<question>Careful, database will be purged. Do you want to continue y/N ?</question>',
122
                    false
123
                )
124
            ) {
125
                return 0;
126
            }
127
        }
128
129
        $manager = $this->doctrine->getManager($input->getOption('manager'));
130
        $environment = $input->getOption('env');
131
        $bundles = $input->getOption('bundle');
132
        $shard = $input->getOption('shard');
133
        $append = $input->getOption('append');
134
        $truncate = $input->getOption('purge-with-truncate');
135
        /** @var FrameworkBundleConsoleApplication $application */
136
        $application = $this->getApplication();
137
138
        $this->loader->load($application, $manager, $bundles, $environment, $append, $truncate, $shard);
0 ignored issues
show
$manager of type object<Doctrine\Common\Persistence\ObjectManager> is not a sub-type of object<Doctrine\ORM\EntityManagerInterface>. It seems like you assume a child interface of the interface Doctrine\Common\Persistence\ObjectManager to be always present.

This check looks for parameters that are defined as one type in their type hint or doc comment but seem to be used as a narrower type, i.e an implementation of an interface or a subclass.

Consider changing the type of the parameter or doing an instanceof check before assuming your parameter is of the expected type.

Loading history...
139
140
        return 0;
141
    }
142
143
    /**
144
     * Prompts to the user a message to ask him a confirmation.
145
     *
146
     * @param InputInterface  $input
147
     * @param OutputInterface $output
148
     * @param string          $question
149
     * @param bool            $default
150
     *
151
     * @return bool User choice
152
     */
153
    private function askConfirmation(InputInterface $input, OutputInterface $output, $question, $default)
154
    {
155
        /** @var QuestionHelper $questionHelper */
156
        $questionHelper = $this->getHelperSet()->get('question');
157
        $question = new ConfirmationQuestion($question, $default);
158
159
        return (bool) $questionHelper->ask($input, $output, $question);
160
    }
161
}
162