chore(deps): pin CodeMirror dependencies and add automated pinning check#1570
Merged
chore(deps): pin CodeMirror dependencies and add automated pinning check#1570
Conversation
🦋 Changeset detectedLatest commit: 63dd608 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
…tion or class' Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
taymoor89
approved these changes
Mar 24, 2026
hodanoori
approved these changes
Mar 24, 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
This PR pins all CodeMirror dependencies in the Greenhouse app and introduces an automated CI/CD check
to prevent unpinned dependencies from being introduced in the future. This is a security hardening
measure to protect against supply chain attacks where malicious code could be injected through
automatic dependency updates.
Changes Made
apps/greenhouse/package.json(removed^prefixes)@codemirror/lang-yaml:^6.1.2→6.1.2@codemirror/language:^6.12.2→6.12.2@codemirror/state:^6.5.4→6.5.4@codemirror/theme-one-dark:^6.1.2→6.1.2@codemirror/view:^6.39.15→6.39.15.github/scripts/check-pinned-dependencies.js).github/workflows/check-dependency-pinning.yaml).github/workflows/ci-checks.yaml)check-pinned-depsto rootpackage.jsonfor local testing.github/scripts/README-DEPENDENCY-PINNING.md)Related Issues
Why This Matters:
Version ranges (
^,~,>=) allow package managers to automatically install newer versions, whichcan introduce malicious code through supply chain attacks.
Historical Examples:
event-stream@3.3.6- Bitcoin wallet stealer injected via compromised dependencyua-parser-js@0.7.29- Cryptominer backdoor affecting 9M+ weekly downloadscoa@2.0.3- Password stealer in widely-used packageScreenshots (if applicable)
Testing Instructions
Create test file with unpinned dependency
echo '{"dependencies":{"test":"^1.0.0"}}' > test-package.json
node .github/scripts/check-pinned-dependencies.js # Should fail
rm test-package.json
5. Verify CI check is added to matrix:
grep -A 2 "dependency-pinning-check" .github/workflows/ci-checks.yaml
Checklist
PR Manifesto
Review the PR Manifesto for best practises.