Conversation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
8-task plan covering script creation, workflow, cleanup, skill updates, and documentation updates. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Use awk instead of sed for line replacement (avoids | delimiter collision in markdown tables) - Fix expected output typo (by_rule → by_category) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Deterministic sed-based fixes for 18 mechanical Vale rules: 12 substitution rules and 6 removal rules. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Use temp file for awk line replacement to prevent backslash corruption - Fix Please rule: skip please-note lines, remove all other please - Add word boundaries to Checkbox pattern - Fix stale CODE_BLOCK_LINES on skipped files - Use mapfile for safe file path iteration Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Two-phase auto-fix: script fixes for mechanical rules, then Claude for AI-judgment rules. Posts summary comment on PR. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replaced by vale-autofix.yml which auto-fixes issues instead of reporting them. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Vale issues are now auto-fixed by the vale-autofix workflow. This skill now handles only Dale and editorial fixes. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Vale issues are now auto-fixed by the vale-autofix workflow. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Vale is now handled by vale-autofix workflow. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Vale issues are now auto-fixed on PRs. Pre-push hook removed. Inline comments removed. Updated CLAUDE.md, docs/CLAUDE.md, CONTRIBUTING.md, and README.md. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Vale autofix rework
| - name: Checkout PR branch | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| ref: ${{ github.event.pull_request.head.ref }} | ||
| token: ${{ secrets.PAT_TOKEN }} | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Configure git identity |
Check warning
Code scanning / CodeQL
Checkout of untrusted code in trusted context Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 10 hours ago
In general, the fix is to avoid performing privileged operations (using powerful tokens or broad write permissions) directly on untrusted PR code. For this workflow, we should remove the use of the personal access token (PAT) for checking out PR code and instead use the default GITHUB_TOKEN with the minimum required permissions. This keeps the PR checkout unprivileged while still letting the workflow commit and push changes when safe. If interaction with forks is undesired, we can also guard write operations with conditions that only allow them on same-repository PRs, but that change goes beyond what’s needed to address the flagged issue.
The minimal change that preserves existing functionality is to delete the token: ${{ secrets.PAT_TOKEN }} line in the checkout step, allowing actions/checkout@v4 to fall back to GITHUB_TOKEN. GITHUB_TOKEN is automatically provided and already governed by the permissions block (contents: write, pull-requests: write), so this should still allow the workflow to push auto-fix commits and update PRs, but removes the explicit use of a potentially over-scoped secret for untrusted code. All other logic (Vale download, file detection, auto-fix/commit steps) remains unchanged.
Concretely, in .github/workflows/vale-autofix.yml at the “Checkout PR branch” step, remove the token: line and keep ref: and fetch-depth: as-is. No additional imports, methods, or definitions are required.
| @@ -26,7 +26,6 @@ | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| ref: ${{ github.event.pull_request.head.ref }} | ||
| token: ${{ secrets.PAT_TOKEN }} | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Configure git identity |
| id: phase2 | ||
| if: steps.vale-remaining.outputs.remaining > 0 | ||
| continue-on-error: true | ||
| uses: anthropics/claude-code-action@v1 |
Check warning
Code scanning / CodeQL
Unpinned tag for a non-immutable Action in workflow Medium
No description provided.