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 (68 issues)

1
<?php
0 ignored issues
show
Class found in ".php" file; use ".inc" extension instead
Loading history...
This file is missing a doc comment.
Loading history...
The PHP open tag does not have a corresponding PHP close tag
Loading history...
Filename "ShodanServiceProvider.php" doesn't match the expected filename "shodanserviceprovider.php"
Loading history...
2
0 ignored issues
show
Missing file doc comment
Loading history...
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
 */
0 ignored issues
show
Missing @package tag in class comment
Loading history...
Missing @link tag in class comment
Loading history...
16
class ShodanServiceProvider extends ServiceProvider
17
{
0 ignored issues
show
Opening brace should be on the same line as the declaration for class ShodanServiceProvider
Loading history...
18
    const CONFIG_PATH = __DIR__.'/../config/shodan.php';
0 ignored issues
show
Expected at least 1 space before "."; 0 found
Loading history...
Expected at least 1 space after "."; 0 found
Loading history...
19
20 18
    public function boot()
0 ignored issues
show
Missing doc comment for function boot()
Loading history...
Expected 2 blank lines before function; 1 found
Loading history...
21
    {
0 ignored issues
show
Opening brace should be on the same line as the declaration
Loading history...
22 18
        $this->publishes(
0 ignored issues
show
The method publishes() does not exist on RattfieldNz\Shodan\ShodanServiceProvider. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

22
        $this->/** @scrutinizer ignore-call */ 
23
               publishes(

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
23
            [
0 ignored issues
show
Short array syntax is not allowed
Loading history...
24 18
            self::CONFIG_PATH => config_path('shodan.php'),
0 ignored issues
show
This array key does not seem to be aligned correctly; expected 13 spaces, but found 12.
Loading history...
Array key not indented correctly; expected 16 spaces but found 12
Loading history...
25 18
            ], 'config'
26
        );
27 18
    }
0 ignored issues
show
Expected 2 blank lines after function; 1 found
Loading history...
Expected 1 blank line before closing function brace; 0 found
Loading history...
Expected //end boot()
Loading history...
28
29 18
    public function register()
0 ignored issues
show
Missing doc comment for function register()
Loading history...
30
    {
0 ignored issues
show
Opening brace should be on the same line as the declaration
Loading history...
31 18
        $this->mergeConfigFrom(
32 18
            self::CONFIG_PATH,
33 18
            'shodan'
34
        );
35
36 18
        $this->app->alias(Shodan::class, 'shodan');
0 ignored issues
show
The method alias() does not exist on Tests\Laravel\App. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

36
        $this->app->/** @scrutinizer ignore-call */ 
37
                    alias(Shodan::class, 'shodan');

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
37
38 18
        $this->app->bind(
0 ignored issues
show
The method bind() does not exist on Tests\Laravel\App. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

38
        $this->app->/** @scrutinizer ignore-call */ 
39
                    bind(

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
39
            'shodan', function () {
40
                return new Shodan();
41 18
            }
42
        );
43 18
    }
0 ignored issues
show
Expected 2 blank lines after function; 1 found
Loading history...
Expected 1 blank line before closing function brace; 0 found
Loading history...
Expected //end register()
Loading history...
44
45
    /**
46
     * Get the services provided by the provider.
47
     *
48
     * @return array
49
     */
50 1
    public function provides()
51
    {
0 ignored issues
show
Opening brace should be on the same line as the declaration
Loading history...
52 1
        return ['shodan'];
0 ignored issues
show
Short array syntax is not allowed
Loading history...
53
    }
0 ignored issues
show
Expected 2 blank lines after function; 1 found
Loading history...
Expected 1 blank line before closing function brace; 0 found
Loading history...
Expected //end provides()
Loading history...
54
55
    /**
56
     * Console-specific booting.
57
     *
58
     * @return void
59
     */
60 1
    public function bootForConsole()
61
    {
0 ignored issues
show
Opening brace should be on the same line as the declaration
Loading history...
62
        // Publishing the configuration file.
63 1
        $this->publishes(
64
            [
0 ignored issues
show
Short array syntax is not allowed
Loading history...
65 1
            __DIR__.'/../config/shodan.php' => config_path('shodan.php'),
0 ignored issues
show
This array key does not seem to be aligned correctly; expected 13 spaces, but found 12.
Loading history...
Array key not indented correctly; expected 16 spaces but found 12
Loading history...
Expected at least 1 space before "."; 0 found
Loading history...
Expected at least 1 space after "."; 0 found
Loading history...
66 1
            ], 'shodan'
67
        );
68
69
        // Registering package commands.
70 1
        $this->commands(['shodan']);
0 ignored issues
show
Short array syntax is not allowed
Loading history...
The method commands() does not exist on RattfieldNz\Shodan\ShodanServiceProvider. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

70
        $this->/** @scrutinizer ignore-call */ 
71
               commands(['shodan']);

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
71 1
    }
0 ignored issues
show
Expected 2 blank lines after function; 1 found
Loading history...
Expected 1 blank line before closing function brace; 0 found
Loading history...
Expected //end bootForConsole()
Loading history...
72
73
    /**
74
     * Merge the given configuration with the existing configuration.
75
     *
76
     * @param string $path
0 ignored issues
show
Missing parameter comment
Loading history...
77
     * @param string $key
0 ignored issues
show
Missing parameter comment
Loading history...
78
     *
79
     * @return void
80
     */
81 18
    protected function mergeConfigFrom($path, $key)
0 ignored issues
show
Type hint "string" missing for $path
Loading history...
Type hint "string" missing for $key
Loading history...
82
    {
0 ignored issues
show
Opening brace should be on the same line as the declaration
Loading history...
83 18
        $config = $this->app['config']->get($key, []);
0 ignored issues
show
Short array syntax is not allowed
Loading history...
84 18
        $this->app['config']->set($key, $this->mergeConfig($config, include $path));
85 18
    }
0 ignored issues
show
Expected 2 blank lines after function; 1 found
Loading history...
Expected 1 blank line before closing function brace; 0 found
Loading history...
Expected //end mergeConfigFrom()
Loading history...
86
87
    /**
88
     * Merges the configs together and takes multi-dimensional arrays into account.
89
     *
90
     * @param array $original
0 ignored issues
show
Missing parameter comment
Loading history...
91
     * @param array $merging
0 ignored issues
show
Missing parameter comment
Loading history...
92
     *
93
     * @return array
94
     */
95 18
    protected function mergeConfig(array $original, array $merging)
96
    {
0 ignored issues
show
Opening brace should be on the same line as the declaration
Loading history...
97 18
        $array = array_merge($original, $merging);
98 18
        foreach ($original as $key => $value) {
99 1
            if (!is_array($value)) {
0 ignored issues
show
Expected 1 space(s) after NOT operator; 0 found
Loading history...
100 1
                continue;
101
            }
0 ignored issues
show
No blank line found after control structure
Loading history...
102 1
            if (!Arr::exists($merging, $key)) {
0 ignored issues
show
Expected 1 space(s) after NOT operator; 0 found
Loading history...
103
                continue;
104
            }
0 ignored issues
show
No blank line found after control structure
Loading history...
105 1
            if (is_numeric($key)) {
106
                continue;
107
            }
0 ignored issues
show
No blank line found after control structure
Loading history...
108 1
            $array[$key] = $this->mergeConfig($value, $merging[$key]);
109
        }
110
111 18
        return $array;
112
    }
0 ignored issues
show
Expected 2 blank lines after function; 0 found
Loading history...
Expected 1 blank line before closing function brace; 0 found
Loading history...
Expected //end mergeConfig()
Loading history...
113
}
0 ignored issues
show
Expected //end class
Loading history...
As per coding style, files should not end with a newline character.

This check marks files that end in a newline character, i.e. an empy line.

Loading history...
114