Issues (5)

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/Project.php (1 issue)

Severity

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 Manavo\DoneDone;
4
5
class Project
6
{
7
8
    /**
9
     * @var Client
10
     */
11
    private $client;
12
13
    /**
14
     * @var int
15
     */
16
    private $id;
17
18
    /**
19
     * @param Client $client
20
     * @param int    $id
21
     */
22 63
    function __construct($client, $id)
0 ignored issues
show
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
23
    {
24 63
        $this->client = $client;
25 63
        $this->id = $id;
26 63
    }
27
28
    /**
29
     * Get the details of this project
30
     *
31
     * @return array
32
     */
33
    public function get()
34
    {
35
        return $this->client->get(sprintf('projects/%d', $this->id));
36
    }
37
38
    /**
39
     * Get all the people associated with this project
40
     *
41
     * @return array
42
     */
43 3
    public function people()
44
    {
45 3
        return $this->client->get('projects/' . $this->id . '/people');
46
    }
47
48
    /**
49
     * Get all the issues associated with this project
50
     *
51
     * @return array
52
     */
53 3
    public function issues()
54
    {
55 3
        return $this->client->get('projects/' . $this->id . '/issues/all');
56
    }
57
58
    /**
59
     * @param int $id
60
     *
61
     * @return Issue
62
     */
63 27
    public function issue($id)
64
    {
65 27
        return new Issue($this->client, $this->id, $id);
66
    }
67
68
    /**
69
     * Get all the active issues associated with this project
70
     *
71
     * @return array
72
     */
73 3
    public function activeIssues()
74
    {
75 3
        return $this->client->get(
76 3
            'projects/' . $this->id . '/issues/all_active'
77 3
        );
78
    }
79
80
    /**
81
     * Get all the closed and fixed issues associated with this project
82
     *
83
     * @return array
84
     */
85 3
    public function closedAndFixedIssues()
86
    {
87 3
        return $this->client->get(
88 3
            'projects/' . $this->id . '/issues/all_closed_and_fixed'
89 3
        );
90
    }
91
92
    /**
93
     * Get all the issues by a filter associated with this project
94
     *
95
     * @param int $filter
96
     *
97
     * @return array
98
     */
99 3
    public function issuesByFilter($filter)
100
    {
101 3
        return $this->client->get(
102 3
            sprintf(
103 3
                'projects/%d/issues/by_custom_filter/%d',
104 3
                $this->id,
105
                $filter
106 3
            )
107 3
        );
108
    }
109
110
    /**
111
     * Get all the issues which are waiting on you, and are associated with
112
     * this project
113
     *
114
     * @return array
115
     */
116 3
    public function issuesWaitingOnYou()
117
    {
118 3
        return $this->client->get(
119 3
            sprintf('projects/%d/issues/waiting_on_you', $this->id)
120 3
        );
121
    }
122
123
    /**
124
     * Get all the issues which are waiting on them
125
     *
126
     * @return array
127
     */
128 3
    public function issuesWaitingOnThem()
129
    {
130 3
        return $this->client->get(
131 3
            sprintf('projects/%d/issues/waiting_on_them', $this->id)
132 3
        );
133
    }
134
135
    /**
136
     * Get release builds of this project
137
     *
138
     * @return array
139
     */
140 3
    public function releaseBuilds()
141
    {
142 3
        return $this->client->get('projects/' . $this->id . '/release_builds');
143
    }
144
145
    /**
146
     * Get release builds of this project
147
     *
148
     * @return ReleaseBuildInfo
149
     */
150
    public function releaseBuildInfo()
151
    {
152
        return new ReleaseBuildInfo($this->client->get('projects/' . $this->id . '/release_builds/info'));
153
    }
154
155
    /**
156
     * Get filters of this project
157
     *
158
     * @return array
159
     */
160 3
    public function filters()
161
    {
162 3
        return $this->client->get('projects/' . $this->id . '/custom_filters');
163
    }
164
165
    /**
166
     * Add a new issue to the project
167
     *
168
     * @param Issue $issue
169
     *
170
     * @return array
171
     */
172 3
    public function addIssue($issue)
173
    {
174 3
        return $this->client->post(
175 3
            'projects/' . $this->id . '/issues', $issue->toArray()
176 3
        );
177
    }
178
179
    /**
180
     * Create a new release build for the project
181
     *
182
     * @param ReleaseBuild $releaseBuild
183
     *
184
     * @return array
185
     */
186 3
    public function createReleaseBuild($releaseBuild)
187
    {
188 3
        return $this->client->post(
189 3
            sprintf('projects/%d/release_builds', $this->id),
190 3
            $releaseBuild->toArray()
191 3
        );
192
    }
193
194
}
195