Repository navigation
chore: reduce supply chain attack exposure - #45
Conversation
There was a problem hiding this comment.
Pull request overview
This PR reduces exposure to supply-chain attacks by adding a minimum “release age” for newly published npm package versions in local installs, while allowing CI to bypass that delay so automated dependency update PRs can build immediately.
Changes:
- Add
min-release-age=7to.npmrcto avoid installing very recent dependency releases by default. - Update the publish workflow to use
npm install --min-release-age=0for the local action build step.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
.npmrc |
Enforces a 7-day minimum release age for dependency installs by default. |
.github/workflows/publish.yml |
Overrides the minimum release age to 0 for the action dependency install in CI. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| registry-url: 'https://npm.pkg.github.com' | ||
| - name: Build reencode action | ||
| run: cd ./.github/actions/reencode-dictionaries && npm install && cd ../../../ | ||
| run: cd ./.github/actions/reencode-dictionaries && npm install --min-release-age=0 && cd ../../../ |
There was a problem hiding this comment.
This step uses npm install inside .github/actions/reencode-dictionaries, but that directory includes a committed package-lock.json. In CI, npm ci is typically preferred because it installs strictly from the lockfile (more reproducible and avoids unintended lockfile updates) and is usually faster. Consider switching to npm ci while keeping the --min-release-age=0 override.
| run: cd ./.github/actions/reencode-dictionaries && npm install --min-release-age=0 && cd ../../../ | |
| run: cd ./.github/actions/reencode-dictionaries && npm ci --min-release-age=0 && cd ../../../ |
- Add `min-release-age=7` to `.npmrc` to avoid installing brand-new dependency releases - Use `--min-release-age=0` in CI to allow Dependabot PRs to build immediately See reedsy/reedsy-editor#13717 for context. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
b552efd to
568073b
Compare
Summary
min-release-age=7to.npmrcto avoid installing brand-new dependency releases--min-release-age=0in CI to allow Dependabot PRs to build immediatelySee https://github.com/reedsy/reedsy-editor/pull/13717 for context.
Test plan
npm installin CI uses--min-release-age=0flag🤖 Generated with Claude Code