Issues (162)

Security Analysis    not enabled

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.

Tests/lib/console-runner.js (5 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
/**
2
 Jasmine Reporter that outputs test results to the browser console.
3
 Useful for running in a headless environment such as PhantomJs, ZombieJs etc.
4
5
 Usage:
6
 // From your html file that loads jasmine:
7
 jasmine.getEnv().addReporter(new jasmine.ConsoleReporter());
8
 jasmine.getEnv().execute();
9
 */
10
11
(function(jasmine, console) {
12
    if (!jasmine) {
13
        throw "jasmine library isn't loaded!";
14
    }
15
16
    var ANSI = {}
17
    ANSI.color_map = {
18
        "green" : 32,
19
        "red"   : 31
20
    }
21
22
    ANSI.colorize_text = function(text, color) {
23
        var color_code = this.color_map[color];
24
        return "\033[" + color_code + "m" + text + "\033[0m";
25
    }
26
27
    var ConsoleReporter = function() {
28
        if (!console || !console.log) { throw "console isn't present!"; }
29
        this.status = this.statuses.stopped;
30
    };
31
32
    var proto = ConsoleReporter.prototype;
33
    proto.statuses = {
34
        stopped : "stopped",
35
        running : "running",
36
        fail    : "fail",
37
        success : "success"
38
    };
39
40
    proto.reportRunnerStarting = function(runner) {
0 ignored issues
show
The parameter runner is not used and could be removed.

This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.

Loading history...
41
        this.status = this.statuses.running;
42
        this.start_time = (new Date()).getTime();
43
        this.executed_specs = 0;
44
        this.passed_specs = 0;
45
        this.log("Starting...");
46
    };
47
48
    proto.reportRunnerResults = function(runner) {
0 ignored issues
show
The parameter runner is not used and could be removed.

This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.

Loading history...
49
        var failed = this.executed_specs - this.passed_specs;
50
        var spec_str = this.executed_specs + (this.executed_specs === 1 ? " spec, " : " specs, ");
51
        var fail_str = failed + (failed === 1 ? " failure in " : " failures in ");
52
        var color = (failed > 0)? "red" : "green";
53
        var dur = (new Date()).getTime() - this.start_time;
54
55
        this.log("");
56
        this.log("Finished");
57
        this.log("-----------------");
58
        this.log(spec_str + fail_str + (dur/1000) + "s.", color);
59
60
        this.status = (failed > 0)? this.statuses.fail : this.statuses.success;
61
62
        /* Print something that signals that testing is over so that headless browsers
63
         like PhantomJs know when to terminate. */
64
        this.log("");
65
        this.log("ConsoleReporter finished");
66
    };
67
68
69
    proto.reportSpecStarting = function(spec) {
0 ignored issues
show
The parameter spec is not used and could be removed.

This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.

Loading history...
70
        this.executed_specs++;
71
    };
72
73
    proto.reportSpecResults = function(spec) {
74
        if (spec.results().passed()) {
75
            this.passed_specs++;
76
            return;
77
        }
78
79
        var resultText = spec.suite.description + " : " + spec.description;
80
        this.log(resultText, "red");
81
82
        var items = spec.results().getItems()
83
        for (var i = 0; i < items.length; i++) {
84
            var trace = items[i].trace.stack || items[i].trace;
85
            this.log(trace, "red");
86
        }
87
    };
88
89
    proto.reportSuiteResults = function(suite) {
90
        if (!suite.parentSuite) { return; }
91
        var results = suite.results();
92
        var failed = results.totalCount - results.passedCount;
93
        var color = (failed > 0)? "red" : "green";
94
        this.log(suite.getFullName() + ": " + results.passedCount + " of " + results.totalCount + " passed.", color);
95
    };
96
97
    proto.log = function(str, color) {
98
        var text = (color != undefined)? ANSI.colorize_text(str, color) : str;
99
        console.log(text)
0 ignored issues
show
console.log looks like debug code. Are you sure you do not want to remove it?
Loading history...
100
    };
101
102
    jasmine.ConsoleReporter = ConsoleReporter;
103
})(jasmine, console);
0 ignored issues
show
The variable jasmine seems to be never declared. If this is a global, consider adding a /** global: jasmine */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...