Gulp plugin for running iniscan
If you haven't used Gulp before, be sure to check out the Getting Started guide, as it explains how to create a gulpfile
. Once you're familiar with that process, you may install this plugin
npm install gulp-iniscan --save-dev
Make sure you have iniscan installed
composer require psecio/iniscan
var iniscan = require('iniscan');
gulp.task('iniscan', function() {
return gulp.src('path_to/php.ini')
.pipe(iniscan({
bin: 'vendor/bin/iniscan',
threshold: 'ERROR'
}));
});
If no path to a php.ini
file is selected on the stream global PHP ini file will be used. To find your global PHP ini file run:
php -i | grep 'Loaded Configuration File' | sed 's/Loaded Configuration File *=> *//g'
Type: String
Default value: 'iniscan'
iniscan executable binary.
In case you do not provide iniscan binary path you need to have it on PATH environment variable otherwise plugin will raise an error
Type: String
Default value: WARNING
Minimum rule threshold to scan upon. One of WARNING
, ERROR
or FATAL
Type: String
Default value: 'console'
Output report format. One of console
, html
, json
or xml
In case a format other than console is selected the resulting formatted report will be added to the stream so it can be saved elsewhere
var iniscan = require('iniscan');
gulp.task('iniscan', function() {
return gulp.src('')
.pipe(iniscan({
bin: 'vendor/bin/iniscan',
format: 'json'
}))
.pipe(gulp.dest('output_path'));
});
Type: String
Default value: 'prod'
Context to scan rules against, rules out of the specified context won't be checked.
Type: String
Default value: undefined
PHP version to scan upon. If none provided current php-cli PHP_VERSION
is used.
Found a bug or have a feature request? Please open a new issue. Have a look at existing issues before.
See file CONTRIBUTING.md
See file LICENSE included with the source code for a copy of the license terms.