Issues (15)

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/Structures/ArtworkItem.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
4
namespace Inktale\Api\Structures;
5
6
7
class ArtworkItem extends AbstractBaseItem
8
{
9
    /**
10
     * @var string
11
     */
12
    public $artworkId;
13
14
    /**
15
     * Display name
16
     *
17
     * @var string
18
     */
19
    public $name;
20
21
    /**
22
     * Is publicly visible
23
     *
24
     * @var bool
25
     */
26
    public $isPublic;
27
28
    /**
29
     * Is processing files or products
30
     *
31
     * @var bool
32
     */
33
    public $isProcessing;
34
35
    /**
36
     * Public description
37
     *
38
     * @var string
39
     */
40
    public $description;
41
42
    /**
43
     * Public URL to artwork page
44
     *
45
     * @var string
46
     */
47
    public $url;
48
49
    /**
50
     * List of keywords
51
     *
52
     * @var string[]
53
     */
54
    public $keywords;
55
56
    /**
57
     * Main artwork file (displayed in artwork public page)
58
     * If artwork is still processing, this value can be missing
59
     *
60
     * @var ArtworkFileItem
61
     */
62
    public $mainArtworkFile;
63
64
    /**
65
     * List of additional artwork files throughout all products (if set)
66
     * If artwork is still processing, values can be missing
67
     *
68
     * @var ArtworkFileItem[]
69
     */
70
    public $artworkFiles = [];
71
72
    /**
73
     * Artwork products currently enabled
74
     *
75
     * @var ArtworkProductItem[]
76
     */
77
    public $artworkProducts = [];
78
79
    /**
80
     * Unix timestamp
81
     *
82
     * @var int
83
     */
84
    public $createdAt;
85
86
    /**
87
     * @param array|mixed $raw
88
     * @return ArtworkItem
89
     */
90
    static function fromArray($raw)
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...
91
    {
92
        $item = new self;
93
94
        $item->raw = $raw;
0 ignored issues
show
Documentation Bug introduced by
It seems like $raw of type * is incompatible with the declared type array of property $raw.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
95
96
        $item->artworkId = $raw['artworkId'];
97
        $item->name = $raw['name'];
98
        $item->isPublic = (bool)$raw['isPublic'];
99
        $item->isProcessing = (bool)$raw['isProcessing'];
100
        if (isset($raw['description'])) {
101
            $item->description = $raw['description'];
102
        }
103
        $item->url = $raw['url'];
104
105
        if (isset($raw['keywords'])) {
106
            $item->keywords = $raw['keywords'];
107
        }
108
109
        $item->mainArtworkFile = ArtworkFileItem::fromArray($raw['mainArtworkFile']);
110
111
        if (isset($raw['artworkFiles'])) {
112
            $item->artworkFiles = array_map(function ($v) {
113
                return ArtworkFileItem::fromArray($v);
114
            }, $raw['artworkFiles']);
115
        }
116
117
        if (isset($raw['artworkProducts'])) {
118
            $item->artworkProducts = array_map(function ($v) {
119
                return ArtworkProductItem::fromArray($v);
120
            }, $raw['artworkProducts']);
121
        }
122
123
        $item->createdAt = (int)$raw['createdAt'];
124
125
        return $item;
126
    }
127
}