security: harden skill supply-chain with version ranges and trust model - #1441
Draft
skoshx wants to merge 5 commits into
Draft
security: harden skill supply-chain with version ranges and trust model#1441skoshx wants to merge 5 commits into
skoshx wants to merge 5 commits into
Conversation
…el docs - Add SECURITY.md documenting trust model, threat boundaries, and hardening options - Replace @latest with @0.x version range in all skill files for: - Automatic patch/minor updates within major version - Protection against breaking changes from major bumps - Balance between convenience and reproducibility - Add security notes to skill files explaining version strategy - Document playbook vendoring option for security-sensitive environments - Preserve intentional UX benefits of automatic updates where appropriate Addresses supply-chain hardening concerns raised in #1440 while maintaining the core design benefit of central playbook updates. Co-authored-by: Skosh <skoshx@users.noreply.github.com>
- Update all CLI source files to generate @0.x instead of @latest - Update package spec resolver to default to @0.x - Update all test expectations to match new @0.x behavior - Applies to: install scripts, git hooks, CI configs, terminal output This completes the supply-chain hardening by ensuring the CLI generates commands with version ranges that balance automatic updates with protection against breaking changes. Co-authored-by: Skosh <skoshx@users.noreply.github.com>
Explicitly handle 'latest' as a special case that maps to '0.x' in the classifyVersionSpec function, ensuring backward compatibility while adopting the new version range strategy. Co-authored-by: Skosh <skoshx@users.noreply.github.com>
Co-authored-by: Skosh <skoshx@users.noreply.github.com>
Contributor
📦 GitHub Action release recommendedThis PR changes the React Doctor GitHub Action's release surface:
The composite action is versioned independently from the npm packages, so it After merging, cut the tag from the merge commit on git checkout main && git pull --ff-only
merge_commit=$(git rev-parse HEAD)
git tag -a v2.2.9 "$merge_commit" -m "react-doctor action v2.2.9"
git tag -fa v2 "$merge_commit" -m "react-doctor action v2 (floating major -> v2.2.9)"
git push origin v2.2.9
git push --force origin v2 # moves only the floating major pointerThis bump can also be performed automatically on merge — set the repo |
commit: |
Contributor
|
React Doctor found no new issues. 🎉 Reviewed by React Doctor for commit |
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
Addresses supply-chain hardening concerns raised in #1440 by replacing
@latestwith@0.xversion ranges throughout the codebase and documenting the trust model.Changes
1. Added SECURITY.md
2. Updated Skill Files
react-doctor@latestwithreact-doctor@0.xin:skills/react-doctor/SKILL.md.agents/skills/react-doctor/SKILL.mdskills/improve-react/SKILL.md3. Updated CLI Source
@latestwith@0.xin all CLI-generated commands:install-doctor-script.ts)install-git-hook-file.ts)gitlab-ci-provider.ts)render-diagnostics.ts,render-agent-guidance.ts)build-handoff-payload.ts)4. Updated Package Spec Resolver
scripts/resolve-package-spec.mjsnow mapslatest→0.x0.xwhen no version is specified5. Updated Tests
@0.xbehaviorRationale
The change from
@latestto@0.xprovides a balanced approach:Benefits
✅ Automatic updates within major version - Users get patch and minor updates automatically
✅ Protection against breaking changes - Won't auto-upgrade to 1.0+ without explicit action
✅ Better reproducibility - Version range is more specific than
latest✅ Security-conscious - Reduces supply-chain risk while maintaining UX benefits
Trade-offs
⚖️ Not as hardened as exact pins - Still allows automatic updates within 0.x
⚖️ Requires major version upgrade action - Users must explicitly upgrade to 1.0+
For Maximum Security
For security-critical environments, the SECURITY.md document recommends:
react-doctor@0.9.1Runtime Instruction Fetching
The skill's runtime playbook fetch (
curl https://www.react.doctor/prompts/...) is intentionally preserved because:For environments requiring vendored instructions, SECURITY.md documents how to download and commit the playbook locally.
Testing
latest→0.xIssue Reference
Closes #1440
Migration Path
For Users
No action required. The change is backward compatible:
@0.xautomaticallynpx react-doctorcontinues to work as beforeFor Upgrading to 1.0 (Future)
When 1.0 is released, users will need to:
@1.x@1.x