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

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.

Sistema/Ayudantes/CFPHPCache.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
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
5
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
6
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
7
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
8
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
9
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
10
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
11
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
12
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
13
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
14
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
15
 *
16
 * This software consists of voluntary contributions made by many individuals
17
 * and is licensed under the MIT license. For more information, see
18
 * @category   
19
 * @package    sistema/ayudantes
20
 * @copyright  Copyright (c) 2006 - 2014 webcol.net (http://www.webcol.net/calima)
21
 * @license	https://github.com/webcol/Calima/blob/master/LICENSE	MIT
22
 * @version	##BETA 1.0##, ##2014 - 2015##
23
 * <http://www.calimaframework.com>.
24
 */
25
26
namespace Sistema\Ayudantes;
27
28
class CFPHPCache {
29
	/**
30
	 * Configuracion
31
	 *
32
	 * @access public
33
	 */
34
	public static $configuracion = array(
35
		'cache_dir' => 'cache',
36
		// por defecto el tiempo expira en  *minutos*
37
		'expires' => 180,
38
	);
39
	
40
	public static function configurar($clave, $valor = null) {
41
		if( is_array($clave) ) {
42
			foreach ($clave as $config_name => $config_value) {
43
				self::$configuracion[$config_name] = $config_value;
44
			}
45
		} else {
46
			self::$configuracion[$clave] = $valor;
47
		}
48
	}
49
	/**
50
	 * obtiene la ruta del archivo asociado a la clave.
51
	 *
52
	 * @access public
53
	 * @param string $clave
54
	 * @return string el nombre del archivo php
55
	 */
56
	public static function obtenerRuta($clave) {
57
		return static::$configuracion['cache_path'] . '/' . md5($clave) . '.php';
58
	}
59
	/**
60
	 * obtiene los datos asociados a la clave
61
	 *
62
	 * @access public
63
	 * @param string $clave	 
64
	 */
65
	public static function obtener($clave, $raw = false, $tiempo_personalizado = null) {
66
		if( ! self::file_expired($archivo = self::obtenerRuta($clave), $tiempo_personalizado)) {
67
			$contenido = file_get_contents($archivo);
68
			return $raw ? $contenido : unserialize($contenido);
69
		}
70
		return null;
71
	}
72
	/**
73
	 * Envia el contenido dentro de la cache
74
	 *
75
	 * @access public
76
	 * @param string $clave
77
	 * @param mixed $content the the content you want to store
0 ignored issues
show
There is no parameter named $content. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
78
	 * @param bool $raw whether if you want to store raw data or not. If it is true, $content *must* be a string
79
	 *        It can be useful for static html caching.
80
	 * @return bool whether if the operation was successful or not
81
	 */
82
	public static function enviar($clave, $contenido, $raw = false) {
83
		return @file_put_contents(self::obtenerRuta($clave), $raw ? $contenido : serialize($contenido)) !== false;
84
	}
85
	/**
86
	 * Delete data from cache
87
	 *
88
	 * @access public
89
	 * @param string $clave
90
	 * @return bool true if the data was removed successfully
91
	 */
92
	public static function eliminar($clave) {
93
		if( ! file_exists($archivo = self::obtenerRuta($clave)) ) {
94
			return true;
95
		}
96
		return @unlink($archivo);
97
	}
98
	/**
99
	 * limpia la cache
100
	 *
101
	 * @access public
102
	 * @return bool always true
103
	 */
104
	public static function limpiar() {
105
		$cache_files = glob(self::$configuracion['cache_path'] . '/*.php', GLOB_NOSORT);
106
		foreach ($cache_files as $archivo) {
107
			@unlink($archivo);
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...
108
		}
109
		return true;
110
	}
111
	/**
112
	 * Check if a file has expired or not.
113
	 *
114
	 * @access public
115
	 * @param $archivo the rout to the file
116
	 * @param int $fecha the number of minutes it was set to expire
117
	 * @return bool if the file has expired or not
118
	 */
119
	public static function file_expired($archivo, $fecha = null) {
120
		if( ! file_exists($archivo) ) {
121
			return true;
122
		}
123
		return (time() > (filemtime($archivo) + 60 * ($fecha ? $fecha : self::$configuracion['expires'])));
124
	}
125
}
126