Issues (46)

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/LesserPhp/NodeEnv.php (1 issue)

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
namespace LesserPhp;
4
5
/**
6
 * lesserphp
7
 * https://www.maswaba.de/lesserphp
8
 *
9
 * LESS CSS compiler, adapted from http://lesscss.org
10
 *
11
 * Copyright 2013, Leaf Corcoran <[email protected]>
12
 * Copyright 2016, Marcus Schwarz <[email protected]>
13
 * Licensed under MIT or GPLv3, see LICENSE
14
 * @package LesserPhp
15
 */
16
class NodeEnv
17
{
18
    public $seenNames;
19
20
    /**
21
     * @var \LesserPhp\NodeEnv
22
     */
23
    private $parent;
24
25
    /**
26
     * @var array
27
     */
28
    private $store = [];
29
30
    /**
31
     * @var \stdClass
32
     */
33
    private $block;
34
35
    /**
36
     * @var array|null
37
     */
38
    private $selectors;
39
40
    /**
41
     * @var array|null
42
     */
43
    private $arguments = [];
44
45
    /**
46
     * @var array
47
     */
48
    private $imports = [];
49
50
    /**
51
     * @return \LesserPhp\NodeEnv
52
     */
53 49
    public function getParent()
54
    {
55 49
        return $this->parent;
56
    }
57
58
    /**
59
     * @param \LesserPhp\NodeEnv $parent
60
     */
61 49
    public function setParent($parent)
62
    {
63 49
        $this->parent = $parent;
64 49
    }
65
66
    /**
67
     * @return array
68
     */
69 28
    public function getStore()
70
    {
71 28
        return $this->store;
72
    }
73
74
    /**
75
     * @param array $store
76
     */
77 49
    public function setStore($store)
78
    {
79 49
        $this->store = $store;
80 49
    }
81
82 27
    /**
83
     * @param string $index
84 27
     * @param $value
85 27
     */
86
    public function addStore($index, $value)
87
    {
88
        $this->store[$index] = $value;
89
    }
90 3
91
    /**
92 3
     * @return \stdClass
93
     */
94
    public function getBlock()
95
    {
96
        return $this->block;
97
    }
98 49
99
    /**
100 49
     * @param string $block
101 49
     */
102
    public function setBlock($block)
103
    {
104
        $this->block = $block;
0 ignored issues
show
Documentation Bug introduced by
It seems like $block of type string is incompatible with the declared type object<stdClass> of property $block.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
105
    }
106 46
107
    /**
108 46
     * @return array
109
     */
110
    public function getSelectors()
111
    {
112
        return $this->selectors;
113
    }
114 46
115
    /**
116 46
     * @param array $selectors
117 46
     */
118
    public function setSelectors($selectors)
119
    {
120
        $this->selectors = $selectors;
121
    }
122 3
123
    /**
124 3
     * @return mixed
125
     */
126
    public function getArguments()
127
    {
128
        return $this->arguments;
129
    }
130 16
131
    /**
132 16
     * @param mixed $arguments
133 16
     */
134
    public function setArguments($arguments)
135
    {
136
        $this->arguments = $arguments;
137
    }
138
139
    /**
140 3
     * @param null $index
141
     *
142 3
     * @return array
143
     */
144
    public function getImports($index = null)
145 3
    {
146
        if ($index === null) {
147
            return $this->imports;
148
        }
149
        return $this->imports[$index];
150
    }
151
152
    /**
153
     * @param string $index
154
     * @param $value
155
     */
156 3
    public function addImports($index, $value)
157
    {
158 3
        $this->imports[$index] = $value;
159 3
    }
160
}
161