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 (46)

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/LPTracker/models/LeadFile.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 LPTracker\models;
4
5
use LPTracker\exceptions\LPTrackerSDKException;
6
7
class LeadFile extends Model
8
{
9
    /**
10
     * @var integer
11
     */
12
    protected $id;
13
14
    /**
15
     * @var string
16
     */
17
    protected $name;
18
19
    /**
20
     * @var string
21
     */
22
    protected $ext;
23
24
    /**
25
     * @var string
26
     */
27
    protected $data;
28
29
    public function __construct(array $fileData = [])
30
    {
31
        if (!empty($fileData['id'])) {
32
            $this->id = (int) $fileData['id'];
33
        }
34
        if (!empty($fileData['name'])) {
35
            $this->name = $fileData['name'];
36
        }
37
        if (!empty($fileData['ext'])) {
38
            $this->ext = $fileData['ext'];
39
        }
40
        if (!empty($fileData['data'])) {
41
            $this->data = $fileData['data'];
42
        }
43
    }
44
45
    /**
46
     * @return array
47
     */
48
    public function toArray()
49
    {
50
        $result = [];
51
        if (!empty($this->id)) {
52
            $result['id'] = $this->getId();
53
        }
54
        if (!empty($this->name)) {
55
            $result['name'] = $this->getName();
56
        }
57
        if (!empty($this->ext)) {
58
            $result['ext'] = $this->getExt();
59
        }
60
        if (!empty($this->data)) {
61
            $result['data'] = $this->getData();
62
        }
63
        return $result;
64
    }
65
66
    /**
67
     * @return int
68
     */
69
    public function getId()
70
    {
71
        return (int) $this->id;
72
    }
73
74
    /**
75
     * @return string
76
     */
77
    public function getName()
78
    {
79
        return $this->name;
80
    }
81
82
    /**
83
     * @return string
84
     */
85
    public function getExt()
86
    {
87
        return $this->ext;
88
    }
89
90
    /**
91
     * @return string
92
     */
93
    public function getData()
94
    {
95
        return $this->data;
96
    }
97
98
    /**
99
     * @param string $path (Full path to file with name and ext)
100
     *
101
     * @return void
102
     */
103
    public function saveFile($path)
104
    {
105
        try{
106
            $content = $this->getData();
107
            if(!empty($content)){
108
                @file_put_contents($path, base64_decode($content));
0 ignored issues
show
Security Best Practice introduced by
It seems like you do not handle an error condition here. This can introduce security issues, and is generally not recommended.

If you suppress an error, we recommend checking for the error condition explicitly:

// For example instead of
@mkdir($dir);

// Better use
if (@mkdir($dir) === false) {
    throw new \RuntimeException('The directory '.$dir.' could not be created.');
}
Loading history...
109
            }
110
        }catch(\Exception $e){}
0 ignored issues
show
Coding Style Comprehensibility introduced by
Consider adding a comment why this CATCH block is empty.
Loading history...
111
    }
112
113
    public function validate(){
114
        return true;
115
    }
116
}
117