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

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.

gutenberg/scripts/build.js (51 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
 * Build
3
 *
4
 * The create-guten-block CLI builds here.
5
 */
6
7
'use strict';
0 ignored issues
show
Use the function form of "use strict".
Loading history...
8
9
// Do this as the first thing so that any code reading it knows the right env.
10
process.env.BABEL_ENV = 'production';
0 ignored issues
show
process does not seem to be defined.
Loading history...
11
process.env.NODE_ENV = 'production';
0 ignored issues
show
process does not seem to be defined.
Loading history...
12
13
// Makes the script crash on unhandled rejections instead of silently
14
// ignoring them. In the future, promise rejections that are not handled will
15
// terminate the Node.js process with a non-zero exit code.
16
process.on( 'unhandledRejection', err => {
0 ignored issues
show
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').

Generally using ECMAScript 6 specific syntax is fine if you are sure that it is already supported by all engines which are supposed to run this code.

Further Reading:

Loading history...
process does not seem to be defined.
Loading history...
17
	throw err;
18
} );
19
20
// Modules.
21
const fs = require( 'fs' );
0 ignored issues
show
Backwards Compatibility introduced by
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
Loading history...
require does not seem to be defined.
Loading history...
22
const ora = require( 'ora' );
0 ignored issues
show
Backwards Compatibility introduced by
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
Loading history...
require does not seem to be defined.
Loading history...
23
const path = require( 'path' );
0 ignored issues
show
Backwards Compatibility introduced by
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
Loading history...
require does not seem to be defined.
Loading history...
24
const chalk = require( 'chalk' );
0 ignored issues
show
Backwards Compatibility introduced by
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
Loading history...
require does not seem to be defined.
Loading history...
25
const webpack = require( 'webpack' );
0 ignored issues
show
Backwards Compatibility introduced by
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
Loading history...
require does not seem to be defined.
Loading history...
26
const fileSize = require( 'filesize' );
0 ignored issues
show
Backwards Compatibility introduced by
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
Loading history...
require does not seem to be defined.
Loading history...
27
const gzipSize = require( 'gzip-size' );
0 ignored issues
show
Backwards Compatibility introduced by
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
Loading history...
require does not seem to be defined.
Loading history...
28
const resolvePkg = require( 'resolve-pkg' );
0 ignored issues
show
Backwards Compatibility introduced by
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
Loading history...
require does not seem to be defined.
Loading history...
29
const config = require( '../config/webpack.config.prod' );
0 ignored issues
show
Backwards Compatibility introduced by
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
Loading history...
require does not seem to be defined.
Loading history...
There were too many errors found in this file; checking aborted after 20%.

If JSHint finds too many errors in a file, it aborts checking altogether because it suspects a configuration issue.

Further Reading:

Loading history...
30
const cgbDevUtilsPath = resolvePkg( 'cgb-dev-utils', { cwd: __dirname } );
0 ignored issues
show
Backwards Compatibility introduced by
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
Loading history...
31
const clearConsole = require( cgbDevUtilsPath + '/clearConsole' );
0 ignored issues
show
Backwards Compatibility introduced by
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
Loading history...
32
const formatWebpackMessages = require( cgbDevUtilsPath +
0 ignored issues
show
Backwards Compatibility introduced by
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
Loading history...
33
	'/formatWebpackMessages' );
34
35
// Build file paths.
36
const theCWD = process.cwd();
0 ignored issues
show
Backwards Compatibility introduced by
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
Loading history...
process does not seem to be defined.
Loading history...
37
const fileBuildJS = path.resolve( theCWD, './gutenberg/dist/blocks.build.js' );
0 ignored issues
show
Backwards Compatibility introduced by
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
Loading history...
38
const fileEditorCSS = path.resolve( theCWD, './gutenberg/dist/blocks.editor.build.css' );
0 ignored issues
show
Backwards Compatibility introduced by
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
Loading history...
39
const fileStyleCSS = path.resolve( theCWD, './gutenberg/dist/blocks.style.build.css' );
0 ignored issues
show
Backwards Compatibility introduced by
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
Loading history...
40
41
/**
42
 * Get File Size
43
 *
44
 * Get filesizes of all the files.
45
 *
46
 * @param {string} filePath path.
47
 * @returns {string} then size result.
48
 */
49
const getFileSize = filePath => {
0 ignored issues
show
Backwards Compatibility introduced by
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
Loading history...
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').

Generally using ECMAScript 6 specific syntax is fine if you are sure that it is already supported by all engines which are supposed to run this code.

Further Reading:

Loading history...
50
	return fileSize( gzipSize.sync( fs.readFileSync( filePath ) ) );
51
};
52
53
clearConsole();
54
55
// Init the spinner.
56
const spinner = new ora( { text: '' } );
0 ignored issues
show
Backwards Compatibility introduced by
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
Loading history...
57
58
/**
59
 * Build function
60
 *
61
 * Create the production build and print the deployment instructions.
62
 *
63
 * @param {json} webpackConfig config
64
 */
65
async function build( webpackConfig ) {
0 ignored issues
show
Did you forget to assign or call a function?

This error message can for example pop up if you forget to assign the result of a function call to a variable or pass it to another function:

function someFunction(x) {
    (x > 0) ? callFoo() : callBar();
}

// JSHint expects you to assign the result to a variable:
function someFunction(x) {
    var rs = (x > 0) ? callFoo() : callBar();
}

// If you do not use the result, you could also use if statements in the
// case above.
function someFunction(x) {
    if (x > 0) {
        callFoo();
    } else {
        callBar();
    }
}
Loading history...
Missing semicolon.
Loading history...
66
	// Compiler Instance.
67
	const compiler = await webpack( webpackConfig );
0 ignored issues
show
Backwards Compatibility introduced by
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
Loading history...
Missing semicolon.
Loading history...
68
69
	// Run the compiler.
70
	compiler.run( ( err, stats ) => {
0 ignored issues
show
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').

Generally using ECMAScript 6 specific syntax is fine if you are sure that it is already supported by all engines which are supposed to run this code.

Further Reading:

Loading history...
71
		clearConsole();
72
73
		if ( err ) {
74
			return console.log( err );
75
		}
76
77
		// Get the messages formatted.
78
		const messages = formatWebpackMessages( stats.toJson( {}, true ) );
0 ignored issues
show
Backwards Compatibility introduced by
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
Loading history...
79
80
		// If there are errors just show the errors.
81
		if ( messages.errors.length ) {
82
			// Only keep the first error. Others are often indicative
83
			// of the same problem, but confuse the reader with noise.
84
			if ( messages.errors.length > 1 ) {
85
				messages.errors.length = 1;
86
			}
87
			// Formatted errors.
88
			clearConsole();
89
			console.log( '\n❌ ', chalk.black.bgRed( ' Failed to compile build. \n' ) );
90
			console.log( '\n👉 ', messages.errors.join( '\n\n' ) );
91
92
			// Don't go beyond this point at this time.
93
			return;
94
		}
95
96
		// CI.
97
		if (
98
			process.env.CI &&
0 ignored issues
show
process does not seem to be defined.
Loading history...
99
			( typeof process.env.CI !== 'string' ||
0 ignored issues
show
process does not seem to be defined.
Loading history...
100
				process.env.CI.toLowerCase() !== 'false' ) &&
0 ignored issues
show
process does not seem to be defined.
Loading history...
101
			messages.warnings.length
102
		) {
103
			console.log(
104
				chalk.yellow(
105
					'\nTreating warnings as errors because process.env.CI = true.\n' +
106
						'Most CI servers set it automatically.\n'
107
				)
108
			);
109
			console.log( messages.warnings.join( '\n\n' ) );
110
		}
111
112
		// Start the build.
113
		console.log( `\n ${ chalk.dim( 'Let\'s build and compile the files...' ) }` );
0 ignored issues
show
'template literal syntax' is only available in ES6 (use 'esversion: 6').

Generally using ECMAScript 6 specific syntax is fine if you are sure that it is already supported by all engines which are supposed to run this code.

Further Reading:

Loading history...
114
		console.log( '\n✅ ', chalk.black.bgGreen( ' Built successfully! \n' ) );
115
116
		console.log(
117
			'\n\n',
118
			'File sizes after gzip:',
119
			'\n\n',
120
			getFileSize( fileBuildJS ),
121
			`${ chalk.dim( '— ./gutenberg/dist/' ) }`,
0 ignored issues
show
'template literal syntax' is only available in ES6 (use 'esversion: 6').

Generally using ECMAScript 6 specific syntax is fine if you are sure that it is already supported by all engines which are supposed to run this code.

Further Reading:

Loading history...
122
			`${ chalk.green( 'blocks.build.js' ) }`,
0 ignored issues
show
'template literal syntax' is only available in ES6 (use 'esversion: 6').

Generally using ECMAScript 6 specific syntax is fine if you are sure that it is already supported by all engines which are supposed to run this code.

Further Reading:

Loading history...
123
			'\n',
124
			getFileSize( fileEditorCSS ),
125
			`${ chalk.dim( '— ./gutenberg/dist/' ) }`,
0 ignored issues
show
'template literal syntax' is only available in ES6 (use 'esversion: 6').

Generally using ECMAScript 6 specific syntax is fine if you are sure that it is already supported by all engines which are supposed to run this code.

Further Reading:

Loading history...
126
			`${ chalk.green( 'blocks.editor.build.css' ) }`,
0 ignored issues
show
'template literal syntax' is only available in ES6 (use 'esversion: 6').

Generally using ECMAScript 6 specific syntax is fine if you are sure that it is already supported by all engines which are supposed to run this code.

Further Reading:

Loading history...
127
128
			'\n',
129
			getFileSize( fileStyleCSS ),
130
			`${ chalk.dim( '— ./gutenberg/dist/' ) }`,
0 ignored issues
show
'template literal syntax' is only available in ES6 (use 'esversion: 6').

Generally using ECMAScript 6 specific syntax is fine if you are sure that it is already supported by all engines which are supposed to run this code.

Further Reading:

Loading history...
131
			`${ chalk.green( 'blocks.style.build.css' ) }`,
0 ignored issues
show
'template literal syntax' is only available in ES6 (use 'esversion: 6').

Generally using ECMAScript 6 specific syntax is fine if you are sure that it is already supported by all engines which are supposed to run this code.

Further Reading:

Loading history...
132
133
			'\n\n'
134
		);
135
136
		return true;
137
	} );
138
}
139
140
build( config );
141