Issues (140)

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.

resources/views/policy.blade.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 echo "<?php\n";
0 ignored issues
show
This code did not parse for me. Apparently, there is an error somewhere around this line:

Syntax error, unexpected '"'
Loading history...
Security Best Practice introduced by
It is not recommend to use PHP's short opening tag <?, better use <?php, or <?= in case of outputting.

Short opening tags are disabled in PHP’s default configuration. In such a case, all content of this file is output verbatim to the browser without being parsed, or executed.

As a precaution to avoid these problems better use the long opening tag <?php.

Loading history...
2
if ($modelVariableName === 'user') $modelVariableName = 'model';
3
@endphp
4
namespace {{$policyNamespace}};
5
6
use {{$modelFullName}};
7
@if ($modelVariableName!=='model')
8
use App\Models\User;
9
@endif
10
use Illuminate\Auth\Access\HandlesAuthorization;
11
12
class {{$policyBaseName}}
13
{
14
    use HandlesAuthorization;
15
16
    /**
17
     * Determine whether the user can view any models.
18
     *
19
     * @param  \App\Models\User  $user
20
     * @return mixed
21
     */
22
    public function viewAny(User $user)
23
    {
24
        return $user->hasPermissionTo('{{$modelDotNotation}}.index');
25
    }
26
27
    /**
28
     * Determine whether the user can view the model.
29
     *
30
     * @param  \App\Models\User  $user
31
     * @param  {{$modelBaseName}}  ${{$modelVariableName}}
32
     * @return mixed
33
     */
34
    public function view(User $user, {{$modelBaseName}} ${{$modelVariableName}})
35
    {
36
        return $user->hasPermissionTo('{{$modelDotNotation}}.show');
37
    }
38
39
    /**
40
     * Determine whether the user can create models.
41
     *
42
     * @param  \App\Models\User  $user
43
     * @return mixed
44
     */
45
    public function create(User $user)
46
    {
47
        return $user->hasPermissionTo('{{$modelDotNotation}}.create');
48
    }
49
50
    /**
51
     * Determine whether the user can update the model.
52
     *
53
     * @param  \App\Models\User  $user
54
     * @param  {{$modelBaseName}}  ${{$modelVariableName}}
55
     * @return mixed
56
     */
57
    public function update(User $user, {{$modelBaseName}} ${{$modelVariableName}})
58
    {
59
        return $user->hasPermissionTo('{{$modelDotNotation}}.edit');
60
    }
61
62
    /**
63
     * Determine whether the user can delete the model.
64
     *
65
     * @param  \App\Models\User  $user
66
     * @param  {{$modelBaseName}}  ${{$modelVariableName}}
67
     * @return mixed
68
     */
69
    public function delete(User $user, {{$modelBaseName}} ${{$modelVariableName}})
70
    {
71
        return $user->hasPermissionTo('{{$modelDotNotation}}.delete');
72
    }
73
74
    /**
75
     * Determine whether the user can restore the model.
76
     *
77
     * @param  \App\Models\User  $user
78
     * @param  {{$modelBaseName}}  ${{$modelVariableName}}
79
     * @return mixed
80
     */
81
    public function restore(User $user, {{$modelBaseName}} ${{$modelVariableName}})
82
    {
83
        return false;
84
    }
85
86
    /**
87
     * Determine whether the user can permanently delete the model.
88
     *
89
     * @param  \App\Models\User  $user
90
     * @param  {{$modelBaseName}}  ${{$modelVariableName}}
91
     * @return mixed
92
     */
93
    public function forceDelete(User $user, {{$modelBaseName}} ${{$modelVariableName}})
94
    {
95
        return $user->hasPermissionTo('{{$modelDotNotation}}.delete');
96
    }
97
}
98