Issues (20)

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/config/cdn.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
return [
4
5
    /*
6
    |--------------------------------------------------------------------------
7
    | Bypass loading assets from the CDN
8
    |--------------------------------------------------------------------------
9
    |
10
    | This option determines whether to load the assets from localhost or from
11
    | the CDN server. (this is useful during development).
12
    | Set it to "true" to load from localhost, or set it to "false" to load
13
    | from the CDN (on production).
14
    |
15
    | Default: false
16
    |
17
    */
18
    'bypass' => false,
19
20
    /*
21
    |--------------------------------------------------------------------------
22
    | Default CDN provider
23
    |--------------------------------------------------------------------------
24
    |
25
    | Here you may specify which of the CDN providers below you wish
26
    | to use as your default provider for all CDN work.
27
    |
28
    | Supported provider: Amazon S3 (AwsS3)
29
    |
30
    */
31
    'default' => 'AwsS3',
32
33
    /*
34
    |--------------------------------------------------------------------------
35
    | CDN URL
36
    |--------------------------------------------------------------------------
37
    |
38
    | Set your CDN url, [without the bucket name]
39
    |
40
    */
41
    'url' => 'https://s3.amazonaws.com',
42
43
    /*
44
    |--------------------------------------------------------------------------
45
    | Threshold
46
    |--------------------------------------------------------------------------
47
    |
48
    | Define the number of files to allow in the queue before a flush.
49
    | Automatically flush the batch when the size of the queue reaches
50
    | the defined threshold value.
51
    |
52
    | Default = 10
53
    |
54
    */
55
    'threshold' => 10,
56
57
    /*
58
    |--------------------------------------------------------------------------
59
    | HTTP Parameters
60
    |--------------------------------------------------------------------------
61
    |
62
    | Set your HTTP parameters.
63
    | Add you .pem certificate to your request.
64
    |
65
    */
66
    'http'   => [],
67
68
    /*
69
    |--------------------------------------------------------------------------
70
    | CDN Supported Providers
71
    |--------------------------------------------------------------------------
72
    |
73
    | Here are each of the CDN providers setup for your application.
74
    | Of course, examples of configuring each provider platform that is
75
    | supported by Laravel is shown below to make development simple.
76
    |
77
    | Note: Credentials must be set in the .env file:
78
    |         AWS_ACCESS_KEY_ID
79
    |         AWS_SECRET_ACCESS_KEY
80
    |
81
    */
82
    'providers' => [
83
84
        'aws' => [
85
86
            's3' => [
87
88
                /*
89
                |--------------------------------------------------------------------------
90
                | Web Service Version
91
                |--------------------------------------------------------------------------
92
                |
93
                | The version of the web service to utilize.
94
                | http://docs.aws.amazon.com/aws-sdk-php/v3/guide/guide/configuration.html#version
95
                |
96
                */
97
                'version' => 'latest',
98
99
                /*
100
                |--------------------------------------------------------------------------
101
                | Region to Connect
102
                |--------------------------------------------------------------------------
103
                |
104
                | List of available regions:
105
                | http://docs.aws.amazon.com/general/latest/gr/rande.html#awsconfig_region
106
                |
107
                */
108
                'region' => '',
109
110
                /*
111
                |--------------------------------------------------------------------------
112
                | CDN Bucket
113
                |--------------------------------------------------------------------------
114
                |
115
                | If you want all your assets to be uploaded to one bucket,
116
                | then set your bucket name below. 'your-bucket-name-here'
117
                |
118
                | And if you have multiple buckets (each for a specific directory),
119
                | then you need to specify each bucket and it's directories.
120
                |
121
                | * Note: in case of multiple buckets remove the '*'
122
                |
123
                */
124
                'buckets' => [
125
126
                    'bucket-name' => '*',
127
                    // examples:
128
                    //   'your-js-bucket-name-here'   =>  ['public/js'],
0 ignored issues
show
Unused Code Comprehensibility introduced by
67% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
129
                    //   'your-css-bucket-name-here'  =>  ['public/css'],
0 ignored issues
show
Unused Code Comprehensibility introduced by
67% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
130
                ],
131
132
                /*
133
                |--------------------------------------------------------------------------
134
                | Access Control Lists (ACL)
135
                |--------------------------------------------------------------------------
136
                |
137
                | Amazon S3 supports a set of predefined grants, known as canned ACLs.
138
                | Each canned ACL has a predefined a set of grantees and permissions.
139
                | The following list is a set of canned ACLs and the associated
140
                | predefined grants: private, public-read, public-read-write, authenticated-read
141
                | bucket-owner-read, bucket-owner-full-control, log-delivery-write
142
                |
143
                */
144
                'acl' => 'public-read',
145
146
                /*
147
                |--------------------------------------------------------------------------
148
                | CloudFront as CDN
149
                |--------------------------------------------------------------------------
150
                |
151
                | Amazon S3 can be linked to CloudFront through distributions. This allows
152
                | the files in your S3 buckets to be served from a number of global
153
                | locations to achieve low latency and faster page load times.
154
                |
155
                */
156
                'cloudfront' => [
157
                    'use' => false,
158
                    'cdn_url' => '',
159
                ],
160
161
                /*
162
                |--------------------------------------------------------------------------
163
                | Metadata of S3 Files
164
                |--------------------------------------------------------------------------
165
                |
166
                | Add metadata to each S3 file
167
                |
168
                */
169
                'metadata' => [],
170
171
                /*
172
                |--------------------------------------------------------------------------
173
                | Files Expiry Data
174
                |--------------------------------------------------------------------------
175
                |
176
                | Add expiry data to file
177
                |
178
                */
179
                'expires' => gmdate('D, d M Y H:i:s T', strtotime('+5 years')),
180
181
                /*
182
                |--------------------------------------------------------------------------
183
                | Browser Level Cache
184
                |--------------------------------------------------------------------------
185
                |
186
                | Add browser level cache
187
                |
188
                */
189
                'cache-control' => 'max-age=2628000',
190
191
            ],
192
193
        ],
194
195
    ],
196
    /*
197
    |--------------------------------------------------------------------------
198
    | Files to Include
199
    |--------------------------------------------------------------------------
200
    |
201
    | Specify which directories to be uploaded when running the
202
    | [$ php artisan cdn:push] command
203
    |
204
    | Enter the full paths of directories (starting from the application root).
205
    |
206
    */
207
    'include' => [
208
        'directories' => ['public'],
209
        'extensions' => [],
210
        'patterns' => [],
211
    ],
212
213
    /*
214
    |--------------------------------------------------------------------------
215
    | Files to Exclude
216
    |--------------------------------------------------------------------------
217
    |
218
    | Specify what to exclude from the 'include' directories when uploading
219
    | to the CDN.
220
    |
221
    | 'hidden' is a boolean to excludes "hidden" directories and files (starting with a dot)
222
    |
223
    */
224
    'exclude' => [
225
        'directories' => [],
226
        'files' => [],
227
        'extensions' => [],
228
        'patterns' => [],
229
        'hidden' => true,
230
    ],
231
232
];
233