Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
prevent-file-changes
Advanced tools
A CLI tool designed to prevent specific files or patterns from being modified and committed, ensuring better control over sensitive or protected files in your repository.
A CLI tool designed to prevent specific files or patterns from being modified and committed, ensuring better control over sensitive or protected files in your repository.
npm: npm install --save-dev prevent-file-changes
pnpm: pnpm add -D prevent-file-changes
yarn: yarn add -D prevent-file-changes
To set it up in a Git hook, add it to your pre-commit hook. For example, using Husky, add this line to your .husky/pre-commit file:
prevent-file-changes -f README.md sensible.sh -p ".\*\\.env" ".*\\.log"
You can run it as CLI if globally installed:
prevent-file-changes -f README.md sensible.sh -p ".\*\\.env" ".\*\\.log"
Or using npx
if locally installed:
npx prevent-file-changes -f README.md sensible.sh -p ".\*\\.env" ".\*\\.log"
Command-line options:
--filesPaths
or -f
: A list of specific files to protect.--filesPatterns
or -p
: A list of regular expressions defining patterns of files to protect.Or you can use it as a script importing it as a module and passing to it as arguments the files or regex's to protect:
import { preventFileChanges } from 'prevent-file-changes';
preventFileChanges({ files: ['file1.js'], patterns: ['.*\\.env'] });
In order to collaborate with the project you should:
git clone repo-url
.pnpm install
.pnpm format
or install the prettier extension if you are using vsc editor to format on save).pnpm test
to verify your changes doesn't have major bugs.git push [remote-repo-alias] [branch-name]
.The MIT License. Full License here
FAQs
A CLI tool designed to prevent specific files or patterns from being modified and committed, ensuring better control over sensitive or protected files in your repository.
We found that prevent-file-changes demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.