Fixes #4341: package.json & package-lock.json not rsynced by default (main). #4344
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
Fixes #4341
package.json
andpackage-lock.json
files not rsynced by default. Addresses this supply-chain vulnerability: https://www.bleepingcomputer.com/news/security/researcher-hacks-over-35-tech-firms-in-novel-supply-chain-attack/Sorry I did the 11.x branch instead of main first.
Proposed changes
As mentioned in @danepowell 's comments in #4341, users can opt to do this themselves on their own repos. Once this is in place, new projects would have it available by default.
Alternatives considered
I considered possibly putting a
.htaccess
file in the theme, but @danepowell 's suggestion seemed far more elegant, robust and reliable.Testing steps
I've only verified this on a client's DEV env with a manual
blt deploy
and worked for our single use case.Merge requirements
Maybe a security hardening label?