Issues (243)

Security Analysis    not enabled

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.

app/config/navbar.php (2 issues)

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
/**
3
 * Config-file for navigation bar.
4
 *
5
 */
6
return [
7
8
    // Use for styling the menu
9
    'class' => 'navbar',
10
 
11
    // Here comes the menu strcture
12
    'items' => [
13
14
        // This is a menu item
15
        'home'  => [
16
            'text'  => 'Home',
17
            'url'   => $this->di->get('url')->create(''),
18
            'title' => 'Home route of current frontcontroller'
19
        ],
20
 
21
        // This is a menu item
22
        'test'  => [
23
            'text'  => 'Submenu',
24
            'url'   => $this->di->get('url')->create('submenu'),
25
            'title' => 'Submenu with url as internal route within this frontcontroller',
26
27
            // Here we add the submenu, with some menu items, as part of a existing menu item
28
            'submenu' => [
29
30
                'items' => [
31
32
                    // This is a menu item of the submenu
33
                    'item 0'  => [
34
                        'text'  => 'Item 0',
35
                        'url'   => $this->di->get('url')->create('submenu/item-0'),
36
                        'title' => 'Url as internal route within this frontcontroller'
37
                    ],
38
39
                    // This is a menu item of the submenu
40
                    'item 2'  => [
41
                        'text'  => '/humans.txt',
42
                        'url'   => $this->di->get('url')->asset('/humans.txt'),
43
                        'title' => 'Url to sitespecific asset',
44
                        'class' => 'italic'
45
                    ],
46
47
                    // This is a menu item of the submenu
48
                    'item 3'  => [
49
                        'text'  => 'humans.txt',
50
                        'url'   => $this->di->get('url')->asset('humans.txt'),
51
                        'title' => 'Url to asset relative to frontcontroller',
52
                    ],
53
                ],
54
            ],
55
        ],
56
 
57
        // This is a menu item
58
        'controller' => [
59
            'text'  =>'Controller (marked for all descendent actions)',
60
            'url'   => $this->di->get('url')->create('controller'),
61
            'title' => 'Url to relative frontcontroller, other file',
62
            'mark-if-parent-of' => 'controller',
63
        ],
64
65
        // This is a menu item
66
        'about' => [
67
            'text'  =>'About',
68
            'url'   => $this->di->get('url')->create('about'),
69
            'title' => 'Internal route within this frontcontroller'
70
        ],
71
    ],
72
 
73
74
75
    /**
76
     * Callback tracing the current selected menu item base on scriptname
77
     *
78
     */
79
    'callback' => function ($url) {
80
        if ($url == $this->di->get('request')->getCurrentUrl(false)) {
0 ignored issues
show
The variable $this does not exist. Did you forget to declare it?

This check marks access to variables or properties that have not been declared yet. While PHP has no explicit notion of declaring a variable, accessing it before a value is assigned to it is most likely a bug.

Loading history...
81
            return true;
82
        }
83
    },
84
85
86
87
    /**
88
     * Callback to check if current page is a decendant of the menuitem, this check applies for those
89
     * menuitems that has the setting 'mark-if-parent' set to true.
90
     *
91
     */
92
    'is_parent' => function ($parent) {
93
        $route = $this->di->get('request')->getRoute();
0 ignored issues
show
The variable $this does not exist. Did you forget to declare it?

This check marks access to variables or properties that have not been declared yet. While PHP has no explicit notion of declaring a variable, accessing it before a value is assigned to it is most likely a bug.

Loading history...
94
        return !substr_compare($parent, $route, 0, strlen($parent));
95
    },
96
97
98
99
   /**
100
     * Callback to create the url, if needed, else comment out.
101
     *
102
     */
103
   /*
104
    'create_url' => function ($url) {
105
        return $this->di->get('url')->create($url);
106
    },
107
    */
108
];
109