Issues (195)

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.

risoluto/cli/RisolutoCli.php (1 issue)

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
 * RisolutoCli.php
4
 *
5
 * Risoluto Cliプログラムを実行する
6
 *
7
 * @package           risoluto
8
 * @author            Risoluto Developers
9
 * @license           http://opensource.org/licenses/bsd-license.php new BSD license
10
 * @copyright     (C) 2008-2015 Risoluto Developers / All Rights Reserved.
11
 */
12
13
//------------------------------------------------------//
14
// 名前空間の定義
15
//------------------------------------------------------//
16
namespace RisolutoCli;
17
18
//------------------------------------------------------//
19
// 定数定義
20
//------------------------------------------------------//
21
define( 'RISOLUTODIR', dirname( dirname( dirname( __FILE__ ) ) ) );
22
23
define( 'RISOLUTO_SYSROOT', RISOLUTODIR . '/risoluto/' );
24
25
define( 'RISOLUTO_APPS', RISOLUTO_SYSROOT . 'apps/' );
26
define( 'RISOLUTO_CLI', RISOLUTO_SYSROOT . 'cli/' );
27
define( 'RISOLUTO_CONF', RISOLUTO_SYSROOT . 'conf/' );
28
define( 'RISOLUTO_DATA', RISOLUTO_SYSROOT . 'data/' );
29
define( 'RISOLUTO_LIB', RISOLUTO_SYSROOT . 'lib/' );
30
31
define( 'RISOLUTO_CACHE', RISOLUTO_DATA . 'cache/' );
32
define( 'RISOLUTO_LOGS', RISOLUTO_DATA . 'logs/' );
33
define( 'RISOLUTO_SESS', RISOLUTO_DATA . 'sess/' );
34
define( 'RISOLUTO_UPLOAD', RISOLUTO_DATA . 'upload/' );
35
36
define( 'RISOLUTO_LIB_VENDOR', RISOLUTO_LIB . 'vendor/' );
37
38
define( 'DS', DIRECTORY_SEPARATOR );
39
40
//------------------------------------------------------//
41
// 動作環境チェック
42
//------------------------------------------------------//
43
// PHPバージョンが指定された以前のものであれば強制終了
44
if (version_compare( PHP_VERSION, '5.5.0', '<' )) {
45
    exit( 'Risoluto requires PHP 5.5.0 or later...' );
46
}
47
48
if (PHP_SAPI !== 'cli') {
49
    exit( 'Cli environment required...' );
50
}
51
52
//------------------------------------------------------//
53
// インクルードパスの変更
54
//------------------------------------------------------//
55
set_include_path( RISOLUTO_LIB_VENDOR . PATH_SEPARATOR
56
    . RISOLUTO_APPS . PATH_SEPARATOR
57
    . get_include_path() );
58
59
//------------------------------------------------------//
60
// オートローダ読み込みと設定
61
//------------------------------------------------------//
62
$autoloader = RISOLUTO_LIB_VENDOR . 'autoload.php';
63
64
clearstatcache( true );
65 View Code Duplication
if (file_exists( $autoloader ) and is_file( $autoloader ) and is_readable( $autoloader )) {
0 ignored issues
show
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
66
    // オートローダが存在すれば読み込む
67
    /** @noinspection PhpIncludeInspection */
68
    require_once( $autoloader );
69
} else {
70
    // 存在しなければ強制終了
71
    exit( "この必須ファイルが存在しないかロードできません: $autoloader" );
72
}
73
74
//------------------------------------------------------//
75
// 引数のチェック
76
//------------------------------------------------------//
77
/** @noinspection PhpUndefinedVariableInspection */
78
if ($argc < 2) {
79
    /** @noinspection PhpUndefinedVariableInspection */
80
    die( "Usage: php $argv[0] {your cli program} {options...}" . PHP_EOL );
81
} else {
82
    // 不要な情報を排除(配列の先頭はこのプログラムのため、ユーザサイドのCliプログラムには不要な情報である)
83
    /** @noinspection PhpUndefinedVariableInspection */
84
    $options = $argv;
85
86
    define( 'RISOLUTOCLI_PGM', array_shift( $options ) );
87
    define( 'RISOLUTOCLI_SELF', array_shift( $options ) );
88
    $callable = '\\RisolutoCli\\' . RISOLUTOCLI_SELF;
89
}
90
91
//------------------------------------------------------//
92
// インスタンスの生成と実行
93
//------------------------------------------------------//
94
/** @noinspection PhpUnnecessaryFullyQualifiedNameInspection */
95
$instance = new $callable;
96
/** @noinspection PhpUndefinedMethodInspection */
97
$instance->run( $options );