Issues (25)

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.

src/config/config.php (4 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
/**
4
 * This file is part of CaptainHook arrrrr.
5
 *
6
 * @license MIT
7
 */
8
9
return [
10
11
    /*
12
    |--------------------------------------------------------------------------
13
    | Event listeners
14
    |--------------------------------------------------------------------------
15
    |
16
    | This array allows you to define all events that Captain Hook should
17
    | listen for in the application. By default, the Captain will just
18
    | respond to eloquent events, but you may edit this as you like.
19
    */
20
    'listeners' => [
21
        'Eloquent' => 'eloquent.*',
22
    ],
23
24
    /*
25
    |--------------------------------------------------------------------------
26
    | Webhook filter closure
27
    |--------------------------------------------------------------------------
28
    |
29
    | If your webhooks are scoped to a tenant_id, you can modify
30
    | this filter function to return only the webhooks for your
31
    | tenant. This function is applied as a collection filter.
32
    | The tenant_id field can be used for verification.
33
    |
34
    */
35
    'filter' => function ($webhook) {
0 ignored issues
show
The parameter $webhook is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
36
        return true;
37
    },
38
39
    /*
40
    |--------------------------------------------------------------------------
41
    | Webhook data transformer
42
    |--------------------------------------------------------------------------
43
    |
44
    | The data transformer is a simple function that allows you to take the
45
    | subject data of an event and convert it to a format that will then
46
    | be posted to the webhooks. By default, all data is json encoded.
47
    | The second argument is the Webhook that was triggered in case
48
    | you want to transform the data in different ways per hook.
49
    |
50
    | You can also use the 'Foo\Class@transform' notation if you want.
51
    |
52
    */
53
    'transformer' => function ($eventData, $webhook) {
0 ignored issues
show
The parameter $webhook is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
54
        return json_encode($eventData);
55
    },
56
57
    /*
58
    |--------------------------------------------------------------------------
59
    | Webhook response callback
60
    |--------------------------------------------------------------------------
61
    |
62
    | The response callback can be used if you want to trigger
63
    | certain actions depending on the webhook response.
64
    | This is unused by default.
65
    |
66
    | You can also use the 'Foo\Class@handle' notation if you want.
67
    |
68
    */
69
    'response_callback' => function ($webhook, $response) {
0 ignored issues
show
The parameter $webhook is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
The parameter $response is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
70
        // Handle custom response status codes, ...
71
    },
72
73
    /*
74
    |--------------------------------------------------------------------------
75
    | Logging configuration
76
    |--------------------------------------------------------------------------
77
    |
78
    | Captain Hook ships with built-in logging to allow you to store data
79
    | about the requests that you have made in a certain time interval.
80
    */
81
    'log' => [
82
        'active' => true,
83
        'storage_quantity' => 50,
84
        'max_attempts' => 5,
85
    ],
86
87
    /*
88
    |--------------------------------------------------------------------------
89
    | Tenant configuration (Spark specific configuration)
90
    |--------------------------------------------------------------------------
91
    |
92
    | The tenant model option allows you to associate the tenant_id
93
    | to the Spark Team instead of the User like by default.
94
    |
95
    | Possible options are: 'User' or 'Team'
96
    |
97
    | If you use 'User' you should add the following to the 'filter' function:
98
    | return $webhook->tenant_id == auth()->user()->getKey();
99
    |
100
    | If you use 'Team' you should add the following to the 'filter' function:
101
    | return $webhook->tenant_id == auth()->user()->currentTeam->id;
102
    */
103
    'tenant_spark_model' => 'Team',
104
105
    /*
106
    |--------------------------------------------------------------------------
107
    | API configuration (Spark specific configuration)
108
    |--------------------------------------------------------------------------
109
    |
110
    | By enabling this option some extra routes will be added under
111
    | the /api prefix and with the 'auth:api' middleware, to allow users and
112
    | services like Zapier to create, update and delete Webhooks without user
113
    | interaction.
114
    | See more at http://resthooks.org/
115
    |
116
    */
117
    'uses_api' => true,
118
];
119