Skip to content

Commit 0e57b30

Browse files
committed
ci(release): add high severity npm audit gate
1 parent 653937b commit 0e57b30

5 files changed

Lines changed: 16 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ jobs:
2929
- name: Lint
3030
run: npm run lint
3131

32+
- name: Security audit
33+
run: npm run security:audit
34+
3235
- name: Typecheck
3336
run: npm run typecheck
3437

.github/workflows/publish.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@ jobs:
8888
- name: Package pack check
8989
run: npm run pack:check
9090

91+
- name: Security audit
92+
run: npm run security:audit
93+
9194
- name: Docs
9295
run: npm run docs:build
9396

docs/release/known-issues.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@ Developer Preview package publishing is complete for `7.0.0-next.0`. `react-nati
1818

1919
Impact: existing `react-native-chart-kit` users are protected. New adopters using `@chart-kit/react-native` should treat the scoped namespace as Developer Preview until a stable scoped release exists.
2020

21+
## Security Audit
22+
23+
`npm run security:audit` runs `npm audit --audit-level=high` and is wired into CI and the publish workflow. On May 6, 2026, the current `next` branch passed that high/critical audit gate. The open critical Dependabot alert reported during pushes targets the default-branch `expo <48` dependency path, not the current v2 preview branch; the active v2 showcase resolves Expo to patched major versions.
24+
25+
The current `next` branch still has moderate npm audit findings through Expo CLI / `@expo/metro-config` / PostCSS. npm suggests a force downgrade path for `@expo/metro-config`, which is not appropriate for the Expo 54 showcase without a deliberate SDK compatibility review.
26+
27+
Impact: high and critical npm vulnerabilities now block CI/publish for v2 work, but moderate Expo toolchain advisories remain tracked until an Expo-compatible upstream fix is available.
28+
2129
## Native E2E Coverage
2230

2331
`npm run test:e2e` covers web showcase interaction flows through Playwright. It does not cover native iOS or Android runtime behavior.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
"format": "prettier --write .",
4646
"format:check": "prettier --check .",
4747
"surface:check": "node scripts/verify-public-surface.mjs && node scripts/verify-package-boundaries.mjs && node scripts/verify-pro-preview-imports.mjs",
48+
"security:audit": "npm audit --audit-level=high",
4849
"boundaries:check": "node scripts/verify-package-boundaries.mjs",
4950
"pack:check": "node scripts/check-package-packs.mjs",
5051
"test": "npm run typecheck && npm run test:unit && npm run test:compat",

scripts/release-gate-config.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ export const requiredScripts = [
7272
"example:expo",
7373
"docs:build",
7474
"surface:check",
75+
"security:audit",
7576
"skia:parity",
7677
"native:release:dry-run",
7778
"native:release:android",

0 commit comments

Comments
 (0)