GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Issues (86)

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/CloudFlare/Zone/Pagerules.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 Cloudflare\Zone;
4
5
use Cloudflare\Api;
6
7
/**
8
 * CloudFlare API wrapper
9
 *
10
 * Page rules for a Zone
11
 * A rule describing target patterns for requests and actions to perform on matching requests
12
 *
13
 * @author James Bell <[email protected]>
14
 *
15
 * @version 1
16
 */
17
class Pagerules extends Api
18
{
19
    /**
20
     * Create a page rule [BETA] (permission needed: #zone:edit)
21
     *
22
     * @param string      $zone_identifier API item identifier tag
23
     * @param array       $targets         Targets to evaluate on a request
24
     * @param array       $actions         The set of actions to perform if the targets of this rule match the request.
25
     *                                     Actions can redirect the url to another url or override settings (but not both)
26
     * @param int|null    $priority        A number that indicates the preference for a page rule over another. In the case where
27
     *                                     you may have a catch-all page rule (e.g., #1: '/images/') but want a rule that is more
28
     *                                     specific to take precedence (e.g., #2: '/images/special/'), you'll want to specify a
29
     *                                     higher priority on the latter (#2) so it will override the first.
30
     * @param string|null $status          Status of the page rule
31
     */
32
    public function create($zone_identifier, $targets, $actions, $priority = null, $status = 'active')
33
    {
34
        $data = [
35
            'targets'  => $targets,
36
            'actions'  => $actions,
37
            'priority' => $priority,
38
            'status'   => $status,
39
        ];
40
41
        return $this->post('zones/'.$zone_identifier.'/pagerules', $data);
42
    }
43
44
    /**
45
     * List page rules [BETA] (permission needed: #zone:read)
46
     *
47
     * @param string      $zone_identifier API item identifier tag
48
     * @param string|null $status          Status of the page rule
49
     * @param string|null $order           Field to order page rules by (status, priority)
50
     * @param string|null $direction       Direction to order page rules (asc, desc)
51
     * @param string|null $match           Whether to match all search requirements or at least one (any) (any, all)
52
     */
53
    public function list_pagerules($zone_identifier, $status = null, $order = null, $direction = null, $match = null)
54
    {
55
        $data = [
56
            'status'    => $status,
57
            'order'     => $order,
58
            'direction' => $direction,
59
            'match'     => $match,
60
        ];
61
62
        return $this->get('zones/'.$zone_identifier.'/pagerules', $data);
63
    }
64
65
    /**
66
     * Page rule details [BETA] (permission needed: #zone:read)
67
     *
68
     * @param string $zone_identifier API item identifier tag
69
     * @param string $identifier
70
     */
71
    public function details($zone_identifier, $identifier)
72
    {
73
        return $this->get('zones/'.$zone_identifier.'/pagerules/'.$identifier);
74
    }
75
76
    /**
77
     * Change a page rule [BETA] (permission needed: #zone:edit)
78
     *
79
     * @param string      $zone_identifier API item identifier tag
80
     * @param string      $identifier
81
     * @param array|null  $targets         Targets to evaluate on a request
82
     * @param array|null  $actions         The set of actions to perform if the targets of this rule match the request.
83
     *                                     Actions can redirect the url to another url or override settings (but not both)
84
     * @param int|null    $priority        A number that indicates the preference for a page rule over another. In the case where
85
     *                                     you may have a catch-all page rule (e.g., #1: '/images/') but want a rule that is more
86
     *                                     specific to take precedence (e.g., #2: '/images/special/'), you'll want to specify a
87
     *                                     higher priority on the latter (#2) so it will override the first.
88
     * @param string|null $status          Status of the page rule
89
     */
90
    public function change($zone_identifier, $identifier, $targets = null, $actions = null, $priority = null, $status = null)
0 ignored issues
show
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
91
    {
92
        $data = [
93
            'targets'  => $targets,
94
            'actions'  => $actions,
95
            'priority' => $priority,
96
            'status'   => $status,
97
        ];
98
99
        return $this->patch('zones/'.$zone_identifier.'/pagerules/'.$identifier, $data);
100
    }
101
102
    /**
103
     * Update a page rule [BETA] (permission needed: #zone:edit)
104
     * Replace a page rule. The final rule will exactly match the data passed with this request.
105
     *
106
     * @param string      $zone_identifier API item identifier tag
107
     * @param string      $identifier
108
     * @param array       $targets         Targets to evaluate on a request
109
     * @param array       $actions         The set of actions to perform if the targets of this rule match the request.
110
     *                                     Actions can redirect the url to another url or override settings (but not both)
111
     * @param int|null    $priority        A number that indicates the preference for a page rule over another. In the case where
112
     *                                     you may have a catch-all page rule (e.g., #1: '/images/') but want a rule that is more
113
     *                                     specific to take precedence (e.g., #2: '/images/special/'), you'll want to specify a
114
     *                                     higher priority on the latter (#2) so it will override the first.
115
     * @param string|null $status          Status of the page rule
116
     */
117
    public function update($zone_identifier, $identifier, $targets, $actions, $priority = null, $status = null)
0 ignored issues
show
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
118
    {
119
        $data = [
120
            'targets'  => $targets,
121
            'actions'  => $actions,
122
            'priority' => $priority,
123
            'status'   => $status,
124
        ];
125
126
        return $this->put('zones/'.$zone_identifier.'/pagerules/'.$identifier, $data);
127
    }
128
129
    /**
130
     * Delete a page rule [BETA] (permission needed: #zone:edit)
131
     *
132
     * @param string $zone_identifier API item identifier tag
133
     * @param string $identifier
134
     */
135
    public function delete_pagerule($zone_identifier, $identifier)
136
    {
137
        return $this->delete('zones/'.$zone_identifier.'/pagerules/'.$identifier);
138
    }
139
}
140