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
feat: enhance docs-analysis action security and error handling
- Implement strict whitelist input validation for branch references
- Add path traversal detection to sanitize_path function
- Replace eval with direct command execution in git_with_retry
- Add error tracing with line numbers for better debugging
- Add performance monitoring and metrics generation
- Update README with security enhancements
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
This action can be used in the `docs-preview-link.yml` workflow to analyze documentation changes for preview generation:
225
+
226
+
```yaml
227
+
# Example integration with docs-preview-link.yml
228
+
- name: Analyze documentation changes
229
+
id: docs-analysis
230
+
uses: ./.github/actions/docs-analysis
231
+
with:
232
+
docs-path: "docs/"
233
+
pr-ref: ${{ steps.pr_info.outputs.branch_name }}
234
+
base-ref: 'main'
235
+
```
236
+
237
+
### How to Use with weekly-docs.yaml
238
+
239
+
This action can be used to enhance the weekly documentation checks:
240
+
241
+
```yaml
242
+
# Example integration with weekly-docs.yaml
243
+
- name: Analyze documentation structure
244
+
id: docs-analysis
245
+
uses: ./.github/actions/docs-analysis
246
+
with:
247
+
docs-path: "docs/"
248
+
files-pattern: "docs/**"
249
+
max-scan-files: "500" # Higher limit for full repo scan
250
+
```
251
+
252
+
By using this shared action across all documentation workflows, you ensure consistent analysis, metrics, and reporting for all documentation-related tasks.
0 commit comments