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

Security Analysis    no request data  

This project does not seem to handle request data directly as such no vulnerable execution paths were found.

  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.
  Regex Injection
Regex Injection enables an attacker to execute arbitrary code in your PHP process.
  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.
  Response Splitting
Response Splitting can be used to send arbitrary responses.
  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.
  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.
  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.
  Code Injection
Code Injection enables an attacker to execute arbitrary code on the server.
  Variable Injection
Variable Injection enables an attacker to overwrite program variables with custom data, and can lead to further vulnerabilities.
  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.
  Other Vulnerability
This category comprises other attack vectors such as manipulating the PHP runtime, loading custom extensions, freezing the runtime, or similar.
  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.
  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.
  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.
  Header Injection
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/ShodanServiceProvider.php (3 issues)

1
<?php
2
3
namespace RattfieldNz\Shodan;
4
5
use Illuminate\Support\Arr;
6
use Illuminate\Support\ServiceProvider;
7
8
/**
9
 * Class ShodanServiceProvider.
10
 *
11
 * @category PHP
0 ignored issues
show
Coding Style Documentation introduced by
@category tag is not allowed in class comment
Loading history...
12
 *
13
 * @author  Rob Attfield <[email protected]>
0 ignored issues
show
Coding Style Documentation introduced by
@author tag is not allowed in class comment
Loading history...
14
 * @license https://github.com/rattfieldnz/shodan/blob/master/LICENSE MIT
0 ignored issues
show
Coding Style Documentation introduced by
@license tag is not allowed in class comment
Loading history...
15
 */
16
class ShodanServiceProvider extends ServiceProvider
17
{
18
    const CONFIG_PATH = __DIR__.'/../config/shodan.php';
19
20 18
    public function boot()
21
    {
22 18
        $this->publishes(
23
            [
24 18
            self::CONFIG_PATH => config_path('shodan.php'),
25 18
            ], 'config'
26
        );
27 18
    }
28
29 18
    public function register()
30
    {
31 18
        $this->mergeConfigFrom(
32 18
            self::CONFIG_PATH,
33 18
            'shodan'
34
        );
35
36 18
        $this->app->alias(Shodan::class, 'shodan');
37
38 18
        $this->app->bind(
39
            'shodan', function () {
40
                return new Shodan();
41 18
            }
42
        );
43 18
    }
44
45
    /**
46
     * Get the services provided by the provider.
47
     *
48
     * @return array
49
     */
50 1
    public function provides()
51
    {
52 1
        return ['shodan'];
53
    }
54
55
    /**
56
     * Console-specific booting.
57
     *
58
     * @return void
59
     */
60 1
    public function bootForConsole()
61
    {
62
        // Publishing the configuration file.
63 1
        $this->publishes(
64
            [
65 1
            __DIR__.'/../config/shodan.php' => config_path('shodan.php'),
66 1
            ], 'shodan'
67
        );
68
69
        // Registering package commands.
70 1
        $this->commands(['shodan']);
71 1
    }
72
73
    /**
74
     * Merge the given configuration with the existing configuration.
75
     *
76
     * @param string $path
77
     * @param string $key
78
     *
79
     * @return void
80
     */
81 18
    protected function mergeConfigFrom($path, $key)
82
    {
83 18
        $config = $this->app['config']->get($key, []);
84 18
        $this->app['config']->set($key, $this->mergeConfig($config, include $path));
85 18
    }
86
87
    /**
88
     * Merges the configs together and takes multi-dimensional arrays into account.
89
     *
90
     * @param array $original
91
     * @param array $merging
92
     *
93
     * @return array
94
     */
95 18
    protected function mergeConfig(array $original, array $merging)
96
    {
97 18
        $array = array_merge($original, $merging);
98 18
        foreach ($original as $key => $value) {
99 1
            if (!is_array($value)) {
100 1
                continue;
101
            }
102 1
            if (!Arr::exists($merging, $key)) {
103
                continue;
104
            }
105 1
            if (is_numeric($key)) {
106
                continue;
107
            }
108 1
            $array[$key] = $this->mergeConfig($value, $merging[$key]);
109
        }
110
111 18
        return $array;
112
    }
113
}
114