Issues (80)

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.

templates/loop/content.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
 * The template for displaying 404 pages (not found).
4
 *
5
 * @package spurs
6
 */
7
8
// Exit if accessed directly.
9
defined( 'ABSPATH' ) || exit;
10
11
global $post;
12
?>
13
14
<article <?php post_class('card'); ?> id="post-<?php the_ID(); ?>">
15
    <div class="card-img-top img-wrapper">
16
        <a class="no-uppercase no-underline" href="<?php echo get_the_permalink(); ?>">
17
            <span class="bg-image" <?php bg( get_the_post_thumbnail_url(), false, true, 'height: 270px' ); ?>></span>
0 ignored issues
show
false is of type boolean, but the function expects a string.

It seems like the type of the argument is not accepted by the function/method which you are calling.

In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.

We suggest to add an explicit type cast like in the following example:

function acceptsInteger($int) { }

$x = '123'; // string "123"

// Instead of
acceptsInteger($x);

// we recommend to use
acceptsInteger((integer) $x);
Loading history...
18
        </a>
19
    </div>
20
    <div class="card-body">
21
		<?php if ( 'post' === get_post_type() ) : ?>
22
            <div class="entry-meta">
23
	            <?php spurs_posted_on(); ?>
24
                <div class="categories pb-3">
25
                    <?php
26
                    $category = spurs_get_primary_term( 'category' );
27
                    if ( $category instanceof WP_Term ) {
0 ignored issues
show
The class WP_Term does not exist. Did you forget a USE statement, or did you not list all dependencies?

This error could be the result of:

1. Missing dependencies

PHP Analyzer uses your composer.json file (if available) to determine the dependencies of your project and to determine all the available classes and functions. It expects the composer.json to be in the root folder of your repository.

Are you sure this class is defined by one of your dependencies, or did you maybe not list a dependency in either the require or require-dev section?

2. Missing use statement

PHP does not complain about undefined classes in ìnstanceof checks. For example, the following PHP code will work perfectly fine:

if ($x instanceof DoesNotExist) {
    // Do something.
}

If you have not tested against this specific condition, such errors might go unnoticed.

Loading history...
28
                        printf(
29
                            '<a href="%1$s"><span class="category">%2$s</span></a>',
30
                            get_term_link($category),
31
                            esc_html( $category->name )
32
                        );
33
                    }
34
                    ?>
35
                </div>
36
            </div>
37
		<?php endif; ?>
38
39
        <a href="<?php echo get_the_permalink(); ?>">
40
	        <h4><?php echo get_the_title(); ?></h4>
41
			<?php if ( get_the_content() ) : ?>
42
                <p><?php echo spurs_get_excerpt_by_post( $post->ID, 175 ) ?></p>
43
			<?php endif; ?>
44
        </a>
45
    </div>
46
    <div class="card-footer">
47
        <a href="<?php echo get_the_permalink(); ?>">
48
            <button>LEARN MORE</button>
49
        </a>
50
    </div>
51
</article>