Issues (6)

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

assigning incompatible types to properties.

Bug Documentation Major

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
 * JBZoo Assets
4
 *
5
 * This file is part of the JBZoo CCK package.
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 *
9
 * @package   Assets
10
 * @license   MIT
11
 * @copyright Copyright (C) JBZoo.com,  All rights reserved.
12
 * @link      https://github.com/JBZoo/Assets
13
 * @author    Sergey Kalistratov <[email protected]>
14
 */
15
16
namespace JBZoo\Assets\Asset;
17
18
use JBZoo\Assets\Manager;
19
use JBZoo\Data\Data;
20
use JBZoo\Path\Path;
21
22
/**
23
 * Class Asset
24
 * @package JBZoo\Assets\Asset
25
 */
26
abstract class Asset
27
{
28
    const TYPE_JS_FILE    = 'js';
29
    const TYPE_JS_CODE    = 'js_code';
30
    const TYPE_JSX_FILE   = 'jsx';
31
    const TYPE_JSX_CODE   = 'jsx_code';
32
    const TYPE_CSS_FILE   = 'css';
33
    const TYPE_CSS_CODE   = 'css_code';
34
    const TYPE_LESS_FILE  = 'less';
35
    const TYPE_CALLBACK   = 'callback';
36
    const TYPE_COLLECTION = 'collection';
37
38
    /**
39
     * @var string
40
     */
41
    protected $_alias;
42
43
    /**
44
     * @var string
45
     */
46
    protected $_source;
47
48
    /**
49
     * @var array
50
     */
51
    protected $_dependencies = [];
52
53
    /**
54
     * @var array
55
     */
56
    protected $_options = [];
57
58
    /**
59
     * @var Path
60
     */
61
    protected $_path;
62
63
    /**
64
     * @var Data
65
     */
66
    protected $_params;
67
68
    /**
69
     * @var Manager
70
     */
71
    protected $_manager;
72
73
    /**
74
     * Asset constructor
75
     *
76
     * @param Manager $manager
77
     * @param string  $alias
78
     * @param mixed   $source
79
     * @param array   $dependencies
80
     * @param Data    $options
81
     */
82
    public function __construct(Manager $manager, $alias, $source, $dependencies, Data $options)
83
    {
84
        $this->_manager      = $manager;
85
        $this->_alias        = $alias;
86
        $this->_source       = $source;
87
        $this->_dependencies = (array)$dependencies;
88
        $this->_options      = $options;
0 ignored issues
show
Documentation Bug introduced by SmetDenis
It seems like $options of type object<JBZoo\Data\Data> is incompatible with the declared type array of property $_options.

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...
89
    }
90
91
    /**
92
     * Gets the name.
93
     *
94
     * @return string
95
     */
96
    public function getAlias()
97
    {
98
        return $this->_alias;
99
    }
100
101
    /**
102
     * Gets the dependencies.
103
     *
104
     * @return array
105
     */
106
    public function getDependencies()
107
    {
108
        return $this->_dependencies;
109
    }
110
111
    /**
112
     * Gets the source.
113
     *
114
     * @return string
115
     */
116
    public function getSource()
117
    {
118
        return $this->_source;
119
    }
120
121
    /**
122
     * Gets the type.
123
     *
124
     * @return Data
125
     */
126
    public function getOptions()
127
    {
128
        return $this->_options;
129
    }
130
131
    /**
132
     * @param array $filters
133
     * @return array
134
     */
135
    abstract public function load(array $filters = []);
136
}
137