Skip to content

Commit aa9af6a

Browse files
authored
Merge pull request #1289 from w3bdesign/1286-pnpm-security-minimumreleaseage
Add .npmrc with security and dependency settings
2 parents f61a156 + 9bf2c24 commit aa9af6a

File tree

9 files changed

+536
-519
lines changed

9 files changed

+536
-519
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
sudo corepack prepare pnpm@latest-8 --activate
4242
- run:
4343
name: Install Dependencies
44-
command: pnpm install --no-frozen-lockfile
44+
command: pnpm install --frozen-lockfile
4545
- run:
4646
name: Chrome key start setup
4747
command: sudo apt update -y

.github/workflows/lighthouse.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
${{ runner.os }}-pnpm-store-
3333
3434
- name: Install dependencies
35-
run: pnpm install
35+
run: pnpm install --frozen-lockfile
3636

3737
- name: Build project
3838
run: pnpm build

.github/workflows/pa11y.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,10 @@ jobs:
3838
${{ runner.os }}-pnpm-store-
3939
4040
- name: Install dependencies
41-
run: pnpm install
41+
run: pnpm install --frozen-lockfile
4242

43-
- name: Install dependencies and pa11y
43+
- name: Create pa11y config
4444
run: |
45-
pnpm add -D pa11y wait-on
4645
# Create pa11y config file
4746
echo '{"chromeLaunchConfig":{"args":["--no-sandbox"]}}' > .pa11y.json
4847

.github/workflows/playwright.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
node-version: 24
1919
cache: "pnpm"
2020
- name: Install dependencies
21-
run: pnpm install
21+
run: pnpm install --frozen-lockfile
2222
- name: Install Playwright Browsers
2323
run: pnpm exec playwright install --with-deps chromium firefox
2424
- name: Build the project

.npmrc

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# pnpm Security Configuration
2+
# Defense against supply chain attacks
3+
4+
# Minimum Release Age: Packages must be at least 7 days old before installation
5+
# This prevents installing freshly compromised packages
6+
# Value is in minutes: 10080 = 7 days (7 * 24 * 60)
7+
minimum-release-age=10080
8+
9+
# Registry configuration (using default npm registry which supports release timestamps)
10+
registry=https://registry.npmjs.org/
11+
12+
# Strict peer dependencies for better dependency tree control
13+
strict-peer-dependencies=false
14+
15+
# Auto-install peers to avoid manual peer dependency management
16+
auto-install-peers=true
17+
18+
# Engine strict mode - fail if Node.js version doesn't match engines field
19+
engine-strict=true

AGENTS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ This file provides guidance to agents when working with code in this repository.
1414
- **Sanity Defaults**: Hardcoded fallback values in client config (projectId: "41s7iutf", dataset: "production")
1515
- **E2E Test Structure**: Cypress tests in `src/e2e/cypress/`, Playwright in `src/e2e/playwright/` (not standard locations)
1616
- **Custom Refresh Script**: `pnpm refresh` does full cleanup including store prune and lock file removal
17+
- **Supply Chain Security**: 7-day minimum release age enforced via `.npmrc` and `renovate.json` - see Security section below
1718

1819
## Critical Commands
1920

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
"react-error-boundary": "^5.0.0",
5454
"react-hook-form": "^7.67.0",
5555
"react-icons": "^5.5.0",
56-
"sanity": "4.19.0",
56+
"sanity": "4.15.0",
5757
"sitemap": "^9.0.0",
5858
"tar-fs": "^3.1.1",
5959
"ts-node": "^10.9.2",
@@ -95,6 +95,7 @@
9595
"jest-environment-jsdom": "^30.2.0",
9696
"jest-extended": "^7.0.0",
9797
"jsdom-testing-mocks": "^1.16.0",
98+
"pa11y": "^9.0.1",
9899
"postcss": "^8.5.6",
99100
"prettier": "3.7.3",
100101
"tailwindcss": "^4.1.17",

pnpm-lock.yaml

Lines changed: 504 additions & 511 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

renovate.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
23
"extends": [
3-
"config:recommended"
4+
"config:recommended",
5+
"security:openssf-scorecard"
46
],
7+
"minimumReleaseAge": "7 days",
8+
"internalChecksFilter": "strict",
59
"ignorePresets": [
610
":prHourlyLimit2",
711
":prConcurrentLimit20"

0 commit comments

Comments
 (0)