You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/copilot-instructions.md
+36-7Lines changed: 36 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,22 @@
15
15
-**Build**: `npm run build` (TypeScript + Vite)
16
16
-**Test**: `npm test` (watch mode) or `npm run test:run` (CI mode)
17
17
18
+
## 🔐 Dependency and CI Security
19
+
20
+
See `docs/SECURITY/Dependency-Supply-Chain-Security-Plan.md` for the current repository policy and remediation plan.
21
+
22
+
- Treat all changes to `package.json`, `package-lock.json`, `.npmrc`, and `.github/workflows/**` as security-sensitive.
23
+
- This repository is npm-only. Do not switch to Yarn or pnpm unless the repo is explicitly migrated and the security policy is updated.
24
+
- Prefer existing platform APIs or already-approved packages before adding a new dependency.
25
+
- Use exact versions for direct npm dependencies. Avoid `^` and `~`, and keep `.npmrc` configured with `save-exact=true`.
26
+
- For existing lockfiles, use `npm ci`. For disposable review flows that only need metadata and audit signals, prefer `npm ci --ignore-scripts` first.
27
+
- In CI, use only `npm ci` and verify that `package-lock.json` stays unchanged after install.
28
+
- Review lockfile diffs for unexpected transitive packages and any new install-time script behavior before accepting dependency updates.
29
+
- Keep `package-lock.json` committed and frozen in CI.
30
+
- Do not recommend a blanket `ignore-scripts=true` change for normal local installs in this repo without a migration plan because the current toolchain depends on reviewed install-script packages such as `esbuild` and `@tailwindcss/oxide`.
31
+
- Preserve the `package.json` overrides that block compromised Axios releases `1.14.1` and `0.30.4`.
32
+
- For GitHub Actions, pin third-party actions to full commit SHAs, set explicit minimal `permissions`, and prefer OIDC over long-lived secrets whenever external systems are involved.
33
+
18
34
### **10 Learning Modules**
19
35
20
36
1. JavaScript Engine - V8 internals and execution flow
description: 'Use when changing npm dependencies, package-lock.json, .npmrc, or GitHub Actions workflows. Covers supply-chain security review, exact version pinning, install-script review, dependency incident response, and CI hardening for compromised packages such as Axios.'
3
+
name: 'Dependency and Workflow Security'
4
+
applyTo:
5
+
- package.json
6
+
- package-lock.json
7
+
- .npmrc
8
+
- .github/workflows/**
9
+
- .github/dependabot.yml
10
+
- docs/SECURITY/**
11
+
---
12
+
13
+
# Dependency and Workflow Security
14
+
15
+
- Treat any dependency, lockfile, registry, or workflow change as security-sensitive.
16
+
- This repository is npm-only. Do not introduce Yarn or pnpm for this repo unless the package manager migration is explicitly approved and the security policy is updated.
17
+
- Prefer an existing dependency or a platform-native API before introducing a new package.
18
+
- For this application repository, use exact versions for direct dependencies. Avoid `^` and `~` in `package.json`, and keep `.npmrc` configured with `save-exact=true`.
19
+
- For existing lockfiles, use `npm ci`. For dependency review in disposable environments or dedicated CI security checks, prefer `npm ci --ignore-scripts` first.
20
+
- Do not use `npm install`, `npm update`, or `npm audit fix` in CI. CI must use `npm ci` only and fail if `package-lock.json` changes.
21
+
- If Yarn or pnpm are ever introduced elsewhere, require their immutable or frozen lockfile mode and disable lifecycle scripts unless an explicit allowlist process is in place.
22
+
- Before adding or updating a package, check the current advisories, the latest patched version, maintainer health, recent publish activity, and whether the package adds install-time scripts, native binaries, or unusually large transitive churn.
23
+
- Review `package-lock.json` diffs for unexpected new packages, registry changes, or install-time script packages.
24
+
- Popularity is not a trust signal. Treat high-usage packages such as Axios as high-impact dependencies that still require full review.
25
+
- Do not enable a blanket `ignore-scripts=true` policy for normal local installs in this repo without a migration plan because the current toolchain depends on reviewed install-script packages such as `esbuild` and `@tailwindcss/oxide`.
26
+
- Keep `package-lock.json` committed. Prefer `npm ci` in CI and reproducible installs over ad hoc `npm install` in automation.
27
+
- Keep Axios guardrails in `package.json` overrides so the compromised releases `1.14.1` and `0.30.4` cannot be selected if Axios is introduced directly or transitively.
28
+
- When editing GitHub Actions workflows, pin third-party actions to full commit SHAs, set explicit minimal `permissions`, and prefer OIDC over long-lived secrets.
29
+
- Require human review for workflow files, dependency manifests, and lockfiles.
30
+
- If a package compromise is reported, immediately identify direct and transitive usage, block the affected versions, clear caches, rotate potentially exposed secrets, and record the outcome in `docs/SECURITY/Dependency-Supply-Chain-Security-Plan.md`.
0 commit comments