@@ -14,9 +14,10 @@ This is the main orchestrator workflow that runs analysis tasks in parallel, the
14
14
15
15
** Stage 1: Parallel Analysis** (All run simultaneously, no build required)
16
16
17
- - ** Lint & Code Style** - XO linting, Markdown linting, Package checks by publint, Prettier checks
17
+ - ** Lint & Code Style** - XO linting, Markdown linting, Package checks by publint, Prettier checks, Spell checking with codespell
18
18
- ** Quality Analysis** - Test coverage, quality metrics (embedded quality checks)
19
- - ** Security Analysis** - CodeQL security scanning (embedded security checks)
19
+ - ** Security Analysis** - CodeQL security scanning (calls ` codeql.yml ` )
20
+ - ** Audit Fix for Dependabot** - Automatically suggests ` npm audit fix ` for Dependabot PRs (calls ` audit-fix-pr.yml ` , conditional)
20
21
21
22
** Stage 2: Build & Test** (Requires all Stage 1 to pass)
22
23
@@ -135,6 +136,35 @@ _Note: Comprehensive linting has been moved to default.yml to avoid duplication_
135
136
136
137
_ Note: This workflow remains independent as it handles specialized release processes_
137
138
139
+ ### 9. ** Audit Fix for Dependabot PRs** (` .github/workflows/audit-fix-pr.yml ` )
140
+
141
+ ** Triggers:** Dependabot PRs, Workflow calls from default.yml
142
+
143
+ ** Features:**
144
+
145
+ - Automatically runs ` npm audit fix ` on Dependabot PRs
146
+ - Creates follow-up PRs with security fixes when audit issues are found
147
+ - Branches off the Dependabot PR for seamless integration
148
+ - Adds appropriate labels (` security ` , ` dependabot ` ) for easy tracking
149
+ - Only runs when Dependabot is the actor, minimizing unnecessary executions
150
+
151
+ ** Workflow:**
152
+
153
+ 1 . Dependabot creates a PR with dependency updates
154
+ 2 . Audit-fix workflow detects it's a Dependabot PR
155
+ 3 . Runs ` npm audit fix ` to resolve any security vulnerabilities
156
+ 4 . If changes are found, creates a new PR based on the Dependabot branch
157
+ 5 . The new PR includes the audit fixes on top of the dependency updates
158
+
159
+ ** Benefits:**
160
+
161
+ - ** Proactive Security** : Catches and fixes security issues introduced by dependency updates
162
+ - ** Modular Design** : Separate workflow file maintains clean separation of concerns
163
+ - ** Automated Resolution** : Reduces manual intervention for common security fixes
164
+ - ** Clear Tracking** : Separate PRs make it easy to review security changes independently
165
+
166
+ _ Note: This workflow can run independently on PRs or be called from default.yml as part of the main pipeline_
167
+
138
168
## Workflow Architecture
139
169
140
170
### Parallel + Sequential Design
@@ -146,7 +176,8 @@ Default.yml (Orchestrator)
146
176
├── Stage 1: Parallel Analysis (simultaneous)
147
177
│ ├── Lint & Code Style
148
178
│ ├── Quality Analysis (with embedded testing)
149
- │ └── Security Analysis (CodeQL)
179
+ │ ├── Security Analysis (CodeQL)
180
+ │ └── Audit Fix for Dependabot (conditional)
150
181
├── Stage 2: CI Tests & Build (requires all Stage 1)
151
182
├── Stage 3: Performance Tests (conditional, requires Stage 2)
152
183
├── Stage 4: Deploy (main only, requires Stages 2-3)
@@ -258,6 +289,7 @@ All workflows use npm caching with `actions/setup-node@v4` to speed up dependenc
258
289
- ** CodeQL Analysis** : Automated security scanning
259
290
- ** npm audit** : Dependency vulnerability checking
260
291
- ** Dependabot** : Automated dependency updates
292
+ - ** Audit Fix Automation** : Automatically suggests ` npm audit fix ` for Dependabot PRs by creating follow-up PRs with security fixes
261
293
- ** Private security reporting** : Configured in issue templates
262
294
263
295
## Usage Examples
0 commit comments