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

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/statemachine/utils/ExternalData.php (4 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
namespace izzum\statemachine\utils;
3
4
/**
5
 * This serves as a very generic store/registry that is only
6
 * valid during one (1) single php process.
7
 *
8
 * It's main use it for it to be used so an external application
9
 * can set data that can be used in a Rule or Command to
10
 * check/execute a transition.
11
 *
12
 * This allows us to nicely encapsulate the data so we do not need to do
13
 * stuff like checking the $_REQUEST/$_SESSION etc in Rules/Commands during a
14
 * statemachine transition.
15
 *
16
 * example:
17
 * state A
18
 * state B
19
 * transition A->B (rule: t>7)
20
 * State C
21
 * transition A->C (rule: can always take place to 'force' a transition from A
22
 * to B
23
 * with step C in between. For example when we need to do
24
 * a manual transition in the context of a Controller Action)
25
 * We want this to be know via the HISTORY of the statemachine and
26
 * therefore we have a seperate transition for this
27
 * transition C->B (rule: can safely take place)
28
 *
29
 * Now when we use a cronjob where we loop over items the code would be like
30
 * this:
31
 * //pseudocode
32
 * $all = $service->getEntityIdsForState('A');
33
 * for ($all as $id) do $statemachine->run($id)
34
 * //end pseudocode
35
 *
36
 * the problem with the code above is that there are two OUTGOING transitions
37
 * for state A and that transition A->B might fail because the rule
38
 * is not satisfied (for t=4), but then A->C would run since that is
39
 * essentially an empty rule.
40
 *
41
 * Note: this is only a problem when we use the 'run' method on the
42
 * statemachine. It is not a problem when we use the 'transition' method on the
43
 * sm since we provide a transition name to that method, forcing the sm to
44
 * execute only that transition if it can. But keep in mind that there are
45
 * situations where you would just want the sm to decide what it does by calling
46
 * 'run' multiple times in a row.
47
 *
48
 * What we need is to be able to set data that is checked in the Rule for
49
 * the transition from A->C. This data can be set by the client of the
50
 * state machine in exceptional circumstances, to PREVENT the use of empty
51
 * rules and to PREVENT unwanted state transitions and to PREVENT difficult
52
 * mechanisms for setting data in the client where the rule has to do lots
53
 * of work to retrieve it (eg: controller->form->database->rule)
54
 *
55
 * for exmample: \a cron job would not set data and the rule for transition A->B
56
 * would
57
 * be checked against $t > 7. A controller would set data and the Rule for
58
 * transition A->C would be able to run in the context of a controller
59
 * that sets data but NOT in the context of the cron
60
 * that does not set the contextual data.
61
 *
62
 *
63
 * example:
64
 * controllercode where the statemachine is used:
65
 * //set context as a flag variable
66
 * ExternalData::set(Data::CONTEXT_SOME_VALUE);
67
 * $sm->transition('a_to_c');
68
 *
69
 * rule code where the context is checked:
70
 * protected function _applies()
71
 * {
72
 * //check external context and act upon it
73
 * return ExternalData::get() === Data::CONTEXT_SOME_VALUE;
74
 * }
75
 *
76
 *
77
 * @author Rolf Vreijdenberger
78
 *        
79
 */
80
class ExternalData {
81
    
82
    /**
83
     * a simple holder for any data we want, strings, domain models etc.
84
     *
85
     * @var mixed
86
     */
87
    private static $data;
88
89
    /**
90
     * is there any external data set?
91
     *
92
     * @return boolean
93
     */
94 1
    static public function has()
0 ignored issues
show
As per PSR2, the static declaration should come after the visibility declaration.
Loading history...
95
    {
96 1
        return self::$data !== null;
97
    }
98
99
    /**
100
     * clear the external context
101
     */
102 1
    static public function clear()
0 ignored issues
show
As per PSR2, the static declaration should come after the visibility declaration.
Loading history...
103
    {
104 1
        self::set(null);
105 1
    }
106
107
    /**
108
     * set the external data
109
     *
110
     * @param mixed $data            
111
     */
112 1
    static public function set($data = null)
0 ignored issues
show
As per PSR2, the static declaration should come after the visibility declaration.
Loading history...
113
    {
114 1
        self::$data = $data;
115 1
    }
116
117
    /**
118
     * get the external data
119
     *
120
     * @return mixed
121
     */
122 1
    static public function get()
0 ignored issues
show
As per PSR2, the static declaration should come after the visibility declaration.
Loading history...
123
    {
124 1
        return self::$data;
125
    }
126
}