fix: security, CI, and quality issues across repo#30079
Open
suhail-ak-2 wants to merge 1 commit intoanthropics:mainfrom
Open
fix: security, CI, and quality issues across repo#30079suhail-ak-2 wants to merge 1 commit intoanthropics:mainfrom
suhail-ak-2 wants to merge 1 commit intoanthropics:mainfrom
Conversation
Security fixes: - Fix JSON injection in log-issue-events.yml by using jq for safe payload construction - Remove unnecessary id-token:write permission from claude.yml - Pin all GitHub Actions to commit SHAs to prevent supply-chain attacks - Fix event name mismatch: log correct event (opened/closed) instead of always 'created' CI/Workflow fixes: - Move invalid top-level 'description' field to comments in 3 workflow files - Update actions/checkout SHA to latest v4 in claude.yml Code quality fixes: - Make .devcontainer/init-firewall.sh executable (was 644, all other .sh are 755) - Standardize all shell shebangs to #!/usr/bin/env bash for portability - Fix security_reminder_hook.py to check both new_string and new_text fields - Add per_page=100 to comments/reactions API calls in auto-close-duplicates.ts - Add descriptive error messages to silent exit 1 paths in gh.sh and edit-issue-labels.sh Documentation fixes: - Normalize all docs.claude.com URLs to code.claude.com (canonical domain) - Fix outdated docs.anthropic.com URL in bash_command_validator_example.py - Fix contradictory npm install instructions in plugins/README.md - Fix typo 'Use these are' -> 'Use these as' in examples/settings/README.md - Expand .gitignore with standard Node/Python/editor ignores
This was referenced Mar 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Comprehensive audit and fix of security, CI/CD, code quality, and documentation issues across the repository. 39 files changed covering 15 distinct issues.
🔴 Security Fixes
1. JSON injection in
log-issue-events.ymlThe Statsig logging workflow constructed JSON via shell string interpolation, which is vulnerable to injection via issue titles containing quotes/special characters. Replaced with
jq -nfor safe JSON construction.2. Removed unnecessary
id-token: writefromclaude.ymlThe
@claudemention workflow only needs read permissions. Theid-token: writescope was unnecessary and could allow OIDC token generation.3. Pinned all GitHub Actions to commit SHAs
6 workflows used unpinned tags (
@v4,@v2,@v7,@v1) which are vulnerable to tag-repointing attacks. All actions are now pinned to immutable commit SHAs with version comments:actions/checkout→34e114876b... # v4oven-sh/setup-bun→3d267786b... # v2actions/github-script→f28e40c7f... # v7anthropics/claude-code-action→b35a222b7... # v1🟠 CI/Workflow Fixes
4. Fixed invalid top-level
descriptionfield in 3 workflowsauto-close-duplicates.yml,backfill-duplicate-comments.yml, andclaude-dedupe-issues.ymlhaddescription:as a root-level key, which is not a valid GitHub Actions workflow field. Moved to comments.5. Fixed event name mismatch in
log-issue-events.ymlThe workflow triggers on both
openedandclosedevents but always loggedgithub_issue_created. Now dynamically usesgithub_issue_openedorgithub_issue_closedbased on the actual event action.🟡 Code Quality Fixes
6. Made
init-firewall.shexecutableOnly
.shfile in the repo missing the executable bit (was644, all others are755). The Dockerfile compensates withchmod +x, but source should be correct.7. Standardized shebangs to
#!/usr/bin/env bash13 scripts used hardcoded
#!/bin/bash; standardized to portable#!/usr/bin/env bashfor compatibility with NixOS, non-standard containers, etc.8. Fixed
security_reminder_hook.pyfield name handlingextract_content_from_input()only checkednew_stringfor Edit/MultiEdit tools. Now also checksnew_textto avoid silently missing security patterns.9. Added pagination to API calls in
auto-close-duplicates.tsComments and reactions API calls had no
per_pageparameter, defaulting to GitHub's 30-item limit. Issues with 30+ comments could miss duplicate detection. Addedper_page=100.10. Added error messages to silent exits in
gh.shandedit-issue-labels.shBoth scripts exited with code 1 on validation failures without any stderr output, making CI debugging very difficult. Added descriptive error messages for all failure paths.
🔵 Documentation Fixes
11. Normalized documentation URLs
Consolidated all
docs.claude.com/en/docs/claude-code/...URLs to the canonicalcode.claude.com/docs/en/...domain used in the main README. Also fixed an outdateddocs.anthropic.comURL in the hook example.12. Fixed contradictory install instructions in
plugins/README.mdMain README says npm install is deprecated, but plugins/README.md still recommended it. Updated to use the recommended
curl/ Homebrew methods.13. Fixed typo in
examples/settings/README.md"Use these are starting points" → "Use these as starting points"
14. Expanded
.gitignoreWas only
.DS_Store. Added standard ignores for Node (node_modules/,dist/), Python (__pycache__/,*.pyc), environment files (.env), logs, and editor swap files.Validation
All modified files pass syntax checks:
python3 -m json.tool)bash -n)py_compile)