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
@@ -44,6 +44,7 @@ Your PR will be blocked from merging unless it meets the following:
44
44
-`pnpm run lint`
45
45
-`pnpm run test`
46
46
-`pnpm run build`
47
+
-`pnpm audit --audit-level=high`
47
48
48
49
## Git hooks
49
50
@@ -79,3 +80,47 @@ Use the PR template (auto-applied). Ensure it includes:
79
80
## Security
80
81
81
82
Do not commit secrets. Use `.env.local` for local environment variables.
83
+
84
+
### Dependency vulnerability audit
85
+
86
+
CI runs a `security-audit` job on every pull request to `main` and `develop`. It executes:
87
+
88
+
```bash
89
+
pnpm audit --audit-level=high
90
+
```
91
+
92
+
**Policy:**
93
+
94
+
-**High** and **critical** severity vulnerabilities **fail** the pipeline and block merge.
95
+
-**Low** and **moderate** findings are reported but do not block merge.
96
+
- The full JSON audit report is uploaded as a CI artifact (`dependency-audit-report`) on every run.
97
+
98
+
Run the same check locally before pushing:
99
+
100
+
```bash
101
+
pnpm audit --audit-level=high
102
+
```
103
+
104
+
### Triaging and suppressing accepted risks
105
+
106
+
If a high or critical CVE cannot be fixed immediately (no patch available, breaking upgrade, or false positive), you may suppress it after maintainer review:
107
+
108
+
1. Confirm the risk is understood and document the rationale in the PR.
109
+
2. Add the CVE or GHSA identifier to `pnpm.auditConfig` in `package.json`:
110
+
111
+
```json
112
+
"pnpm": {
113
+
"auditConfig": {
114
+
"ignoreCves": ["CVE-YYYY-NNNNN"],
115
+
"ignoreGhsas": ["GHSA-xxxx-xxxx-xxxx"]
116
+
}
117
+
}
118
+
```
119
+
120
+
3. Open a follow-up issue to remove the suppression when a fix is available.
121
+
122
+
Suppressions require explicit PR approval — do not add ignored CVEs without maintainer sign-off.
123
+
124
+
### Automated dependency updates
125
+
126
+
[Dependabot](https://docs.github.com/en/code-security/dependabot) (`.github/dependabot.yml`) opens weekly PRs for npm dependency updates. Review and merge these promptly to keep the dependency tree current.
0 commit comments