Issues (25)

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/Logging/MonologLogger.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 WZRD\Logging;
4
5
use Monolog\Logger as Monolog;
6
use WZRD\Contracts\Logging\Logger;
7
8
class MonologLogger implements Logger
9
{
10
    /**
11
     * Monolog instance.
12
     *
13
     * @var Monolog\Logger
14
     */
15
    private $monolog;
16
17
    /**
18
     * Initialize logger with Monolog instance.
19
     *
20
     * @param Monolog\Logger $monolog
21
     */
22
    public function __construct(Monolog $monolog)
23
    {
24
        $this->monolog = $monolog;
0 ignored issues
show
Documentation Bug introduced by
It seems like $monolog of type object<Monolog\Logger> is incompatible with the declared type object<Monolog\Logger\Logger> of property $monolog.

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...
25
    }
26
27
    /**
28
     * System is unusable.
29
     *
30
     * @param string $message
31
     * @param array  $context
32
     */
33
    public function emergency($message, array $context = [])
34
    {
35
        $this->monolog->addEmergency($message, $context);
36
    }
37
38
    /**
39
     * Action must be taken immediately.
40
     *
41
     * Example: Entire website down, database unavailable, etc. This should
42
     * trigger the SMS alerts and wake you up.
43
     *
44
     * @param string $message
45
     * @param array  $context
46
     */
47
    public function alert($message, array $context = [])
48
    {
49
        $this->monolog->addAlert($message, $context);
50
    }
51
52
    /**
53
     * Critical conditions.
54
     *
55
     * Example: Application component unavailable, unexpected exception.
56
     *
57
     * @param string $message
58
     * @param array  $context
59
     */
60
    public function critical($message, array $context = [])
61
    {
62
        $this->monolog->addCritical($message, $context);
63
    }
64
65
    /**
66
     * Runtime errors that do not require immediate action but should typically
67
     * be logged and monitored.
68
     *
69
     * @param string $message
70
     * @param array  $context
71
     */
72
    public function error($message, array $context = [])
73
    {
74
        $this->monolog->addError($message, $context);
75
    }
76
77
    /**
78
     * Exceptional occurrences that are not errors.
79
     *
80
     * Example: Use of deprecated APIs, poor use of an API, undesirable things
81
     * that are not necessarily wrong.
82
     *
83
     * @param string $message
84
     * @param array  $context
85
     */
86
    public function warning($message, array $context = [])
87
    {
88
        $this->monolog->addWarning($message, $context);
89
    }
90
91
    /**
92
     * Normal but significant events.
93
     *
94
     * @param string $message
95
     * @param array  $context
96
     */
97
    public function notice($message, array $context = [])
98
    {
99
        $this->monolog->addNotice($message, $context);
100
    }
101
102
    /**
103
     * Interesting events.
104
     *
105
     * Example: User logs in, SQL logs.
106
     *
107
     * @param string $message
108
     * @param array  $context
109
     */
110
    public function info($message, array $context = [])
111
    {
112
        $this->monolog->addInfo($message, $context);
113
    }
114
115
    /**
116
     * Detailed debug information.
117
     *
118
     * @param string $message
119
     * @param array  $context
120
     */
121
    public function debug($message, array $context = [])
122
    {
123
        $this->monolog->addDebug($message, $context);
124
    }
125
126
    /**
127
     * Logs with an arbitrary level.
128
     *
129
     * @param mixed  $level
130
     * @param string $message
131
     * @param array  $context
132
     */
133
    public function log($level, $message, array $context = [])
134
    {
135
        $this->monolog->addRecord($level, $message, $context);
136
    }
137
}
138