Commit c29db54
authored
fix(build): pin npm commands for OpenSSF Scorecard compliance (#181)
# fix(build): pin npm commands for OpenSSF Scorecard compliance
## Description
Resolved npm command pinning warnings identified by OpenSSF Scorecard
analysis. Replaced non-deterministic `npm install` with `npm ci` in the
DevContainer post-create script and pinned `@vscode/vsce` to version
3.7.1 in GitHub Actions workflows to prevent supply chain
vulnerabilities from unpinned global package installations.
- **fix**(_scripts_): Replaced `npm install` with `npm ci` in
`.devcontainer/scripts/post-create.sh` for deterministic dependency
installation using lockfile
- **fix**(_build_): Pinned `@vscode/vsce` to version 3.7.1 in
`.github/workflows/extension-package.yml`
- **fix**(_build_): Pinned `@vscode/vsce` to version 3.7.1 in
`.github/workflows/extension-publish.yml`
## Related Issue(s)
Fixes #180
## Type of Change
Select all that apply:
**Code & Documentation:**
- [x] Bug fix (non-breaking change fixing an issue)
- [ ] New feature (non-breaking change adding functionality)
- [ ] Breaking change (fix or feature causing existing functionality to
change)
- [ ] Documentation update
**Infrastructure & Configuration:**
- [x] GitHub Actions workflow
- [ ] Linting configuration (markdown, PowerShell, etc.)
- [x] Security configuration
- [x] DevContainer configuration
- [ ] Dependency update
**AI Artifacts:**
- [ ] Reviewed contribution with `prompt-builder` chatmode and addressed
all feedback
- [ ] Copilot instructions (`.github/instructions/*.instructions.md`)
- [ ] Copilot prompt (`.github/prompts/*.prompt.md`)
- [ ] Copilot chatmode (`.github/chatmodes/*.chatmode.md`)
> **Note for AI Artifact Contributors**:
>
> - **Chatmodes**: Research, indexing/referencing other project (using
standard VS Code GitHub Copilot/MCP tools), planning, and general
implementation chatmodes likely already exist. Review
`.github/chatmodes/` before creating new ones.
> - **Model Versions**: Only contributions targeting the **latest
Anthropic and OpenAI models** will be accepted. Older model versions
(e.g., GPT-3.5, Claude 3) will be rejected.
> - See [Chatmodes Not
Accepted](../docs/contributing/chatmodes.md#chatmodes-not-accepted) and
[Model Version
Requirements](../docs/contributing/ai-artifacts-common.md#model-version-requirements).
**Other:**
- [x] Script/automation (`.ps1`, `.sh`, `.py`)
- [ ] Other (please describe):
## Sample Prompts (for AI Artifact Contributions)
<!-- Not applicable - this PR does not include AI artifacts -->
## Testing
- Verified file changes produce valid YAML syntax in GitHub Actions
workflows
- Confirmed shell script syntax is valid with `npm ci` command
- Changes align with npm best practices for CI/CD environments
## Checklist
### Required Checks
- [ ] Documentation is updated (if applicable)
- [x] Files follow existing naming conventions
- [x] Changes are backwards compatible (if applicable)
### AI Artifact Contributions
<!-- Not applicable - this PR does not include AI artifacts -->
### Required Automated Checks
The following validation commands must pass before merging:
- [ ] Markdown linting: `npm run lint:md`
- [ ] Spell checking: `npm run spell-check`
- [ ] Frontmatter validation: `npm run lint:frontmatter`
- [ ] Link validation: `npm run lint:md-links`
- [ ] PowerShell analysis: `npm run lint:ps`
## Security Considerations
- [x] This PR does not contain any sensitive or NDA information
- [x] Any new dependencies have been reviewed for security issues
- [x] Security-related scripts follow the principle of least privilege
## Additional Notes
This change addresses OpenSSF Scorecard npm command pinning warnings:
- `npm ci` uses the lockfile (`package-lock.json`) for deterministic,
reproducible builds
- Pinning `@vscode/[email protected]` prevents supply chain attacks from
compromised latest versions
- Both changes improve the repository's OpenSSF Scorecard security score
🔒 - Generated by Copilot1 parent 64686e7 commit c29db54
3 files changed
Lines changed: 3 additions & 3 deletions
File tree
- .devcontainer/scripts
- .github/workflows
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
| 62 | + | |
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
129 | | - | |
| 129 | + | |
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
| |||
0 commit comments