
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
gulp-chflags
Advanced tools
Change permissions of Vinyl files
$ npm install --save-dev gulp-chflags
var gulp = require('gulp');
var chmod = require('gulp-chflags');
gulp.task('default', function () {
return gulp.src('src/app.js')
.pipe(chflags(23))
.pipe(gulp.dest('dist'));
});
or
var gulp = require('gulp');
var chmod = require('gulp-chflags');
gulp.task('default', function () {
return gulp.src('src/app.js')
.pipe(chflags({
uchg: true,
uunlnk: true
}))
.pipe(gulp.dest('dist'));
});
Type: number, object
Can either be a chflags octal number or an object with the individual flags specified.
Values depends on the current file, but these are the possible keys:
{
hidden: true,
opaque: true,
nodump: true,
uappnd: true,
uappend: true,
uchg: true,
uchange: true,
uimmutable: true,
uunlnk: true,
uunlink: true,
arch: true,
archived: true,
sappnd: true,
sappend: true,
schg: true,
schange: true,
simmutable: true,
sunlnk: true,
sunlink: true
}
Combine it with gulp-filter to only change permissions on a subset of the files.
var gulp = require('gulp');
var gFilter = require('gulp-filter');
var chmod = require('gulp-chmod');
var filter = gFilter('src/cli.js');
gulp.task('default', function () {
return gulp.src('src/*.js')
// filter a subset of the files
.pipe(filter)
// make them immutable
.pipe(chflags({ uchg: true }))
// bring back the previously filtered out files
.pipe(filter.restore())
.pipe(gulp.dest('dist'));
});
FAQs
Change flags of Vinyl files
We found that gulp-chflags demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.