Issues (71)

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/EntityBrowserInterface.php (2 issues)

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 Drupal\entity_browser;
4
5
use Drupal\Core\Config\Entity\ConfigEntityInterface;
6
7
/**
8
 * Provides an interface defining an entity browser entity.
9
 */
10
interface EntityBrowserInterface extends ConfigEntityInterface {
11
12
  /**
13
   * Gets the entity browser name.
14
   *
15
   * @return string
16
   *   The name of the entity browser.
17
   */
18
  public function getName();
19
20
  /**
21
   * Sets the name of the entity browser.
22
   *
23
   * @param string $name
24
   *   The name of the entity browser.
25
   *
26
   * @return \Drupal\entity_browser\EntityBrowserInterface
27
   *   The class instance this method is called on.
28
   */
29
  public function setName($name);
30
31
  /**
32
   * Sets the label of the entity browser.
33
   *
34
   * @param string $label
35
   *   The label of the entity browser.
36
   *
37
   * @return \Drupal\entity_browser\EntityBrowserInterface
38
   *   The class instance this method is called on.
39
   */
40
  public function setLabel($label);
41
42
  /**
43
   * Sets the id of the display plugin.
44
   *
45
   * @param string $display
46
   *   The id of the display plugin.
47
   *
48
   * @return \Drupal\entity_browser\EntityBrowserInterface
49
   *   The class instance this method is called on.
50
   */
51
  public function setDisplay($display);
52
53
  /**
54
   * Sets the id of the widget selector plugin.
55
   *
56
   * @param string $display
0 ignored issues
show
There is no parameter named $display. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
57
   *   The id of the widget selector plugin.
58
   *
59
   * @return \Drupal\entity_browser\EntityBrowserInterface
60
   *   The class instance this method is called on.
61
   */
62
  public function setWidgetSelector($widget_selector);
63
64
  /**
65
   * Sets the id of the selection display plugin.
66
   *
67
   * @param string $display
0 ignored issues
show
There is no parameter named $display. Did you maybe mean $selection_display?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function. It has, however, found a similar but not annotated parameter which might be a good fit.

Consider the following example. The parameter $ireland is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $ireland
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was changed, but the annotation was not.

Loading history...
68
   *   The id of the selection display plugin.
69
   *
70
   * @return \Drupal\entity_browser\EntityBrowserInterface
71
   *   The class instance this method is called on.
72
   */
73
  public function setSelectionDisplay($selection_display);
74
75
  /**
76
   * Returns the display.
77
   *
78
   * @return \Drupal\entity_browser\DisplayInterface
79
   *   The display.
80
   */
81
  public function getDisplay();
82
83
  /**
84
   * Returns a specific widget.
85
   *
86
   * @param string $widget
87
   *   The widget ID.
88
   *
89
   * @return \Drupal\entity_browser\WidgetInterface
90
   *   The widget object.
91
   */
92
  public function getWidget($widget);
93
94
  /**
95
   * Returns the widgets for this entity browser.
96
   *
97
   * @return \Drupal\entity_browser\WidgetsLazyPluginCollection
98
   *   The tag plugin bag.
99
   */
100
  public function getWidgets();
101
102
  /**
103
   * Saves a widget for this entity browser.
104
   *
105
   * @param array $configuration
106
   *   An array of widget configuration.
107
   *
108
   * @return string
109
   *   The widget ID.
110
   */
111
  public function addWidget(array $configuration);
112
113
  /**
114
   * Deletes a widget from this entity browser.
115
   *
116
   * @param \Drupal\entity_browser\WidgetInterface $widget
117
   *   The widget object.
118
   *
119
   * @return $this
120
   */
121
  public function deleteWidget(WidgetInterface $widget);
122
123
  /**
124
   * Gets first widget based on weights.
125
   *
126
   * @return string|null
127
   *   First widget instance ID or NULL if no widgets are available.
128
   */
129
  public function getFirstWidget();
130
131
  /**
132
   * Adds paramterers that will be passed to the widget.
133
   *
134
   * @param array $parameters
135
   *   An array of parameters.
136
   *
137
   * @return $this
138
   */
139
  public function addAdditionalWidgetParameters(array $parameters);
140
141
  /**
142
   * Gets additional parameters that will be passed to the widget.
143
   *
144
   * @return array
145
   *   Array of parameters.
146
   */
147
  public function getAdditionalWidgetParameters();
148
149
  /**
150
   * Returns the selection display.
151
   *
152
   * @return \Drupal\entity_browser\SelectionDisplayInterface
153
   *   The display.
154
   */
155
  public function getSelectionDisplay();
156
157
  /**
158
   * Returns the widget selector.
159
   *
160
   * @return \Drupal\entity_browser\WidgetSelectorInterface
161
   *   The widget selector.
162
   */
163
  public function getWidgetSelector();
164
165
  /**
166
   * Gets route that matches this display.
167
   *
168
   * @return \Symfony\Component\Routing\Route|bool
169
   *   Route object or FALSE if no route is used.
170
   */
171
  public function route();
172
173
  /**
174
   * Gets entity browser form object.
175
   *
176
   * @return \Drupal\entity_browser\EntityBrowserFormInterface
177
   *   Entity browser form.
178
   */
179
  public function getFormObject();
180
181
}
182