feat(workflows): add devcontainer lockfile integrity check#1874
Conversation
- Commit devcontainer-lock.json with SHA-256 feature pinning - Add reusable devcontainer-lockfile-check.yml workflow - Wire lockfile check into pr-validation.yml - Categorize lockfile in devcontainer-change-log.yml - Document in workflows, environment, and dependency-pinning docs
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1874 +/- ##
==========================================
+ Coverage 80.82% 80.85% +0.03%
==========================================
Files 117 115 -2
Lines 19095 18828 -267
==========================================
- Hits 15433 15224 -209
+ Misses 3662 3604 -58
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Dependency Review — All Checks Passed ✅
This PR adds supply-chain hardening via a devcontainer lockfile and a reusable integrity-check workflow. No new external dependencies are introduced.
SHA Pinning Compliance
| File | Reference | Status |
|---|---|---|
.github/workflows/devcontainer-lockfile-check.yml |
actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
✅ SHA-pinned |
New Dependencies
None. The devcontainer-lock.json pins the six existing devcontainer features (azure-cli, git, github-cli, node, powershell, python) to exact OCI SHA-256 digests — it does not introduce new features or packages.
Devcontainer / Setup Alignment
No new tools added to either environment. copilot-setup-steps.yml is unaffected; the lockfile covers integrity pinning of existing features only. No synchronization gap.
License Compatibility
No externally licensed packages introduced. All referenced artifacts are from ghcr.io/devcontainers/features/, which are MIT-licensed devcontainer features already in use.
Lockfile Integrity
All six feature entries carry both resolved (OCI digest reference) and integrity (sha256: prefix) fields, consistent with the devcontainer lockfile spec.
All dependency-review safety checks pass. No action required from a dependency perspective.
Generated by Dependabot PR Review for issue #1874 · sonnet46 1.1M
|
Nice work — the workflow has solid supply-chain hygiene: SHA-pinned |
WilliamBerryiii
left a comment
There was a problem hiding this comment.
LGTM ... just one follow-up item given I've been trying to extract all the embedded scripting so we can test stuff.
bindsi
left a comment
There was a problem hiding this comment.
Automated batch review: no actionable findings. The devcontainer lockfile integrity workflow, committed lockfile, and documentation updates look sound.
…ipts - Add Test-DevcontainerLockfile.ps1 and Write-DevcontainerChangeLog.ps1 - Add Pester tests with 30 passing tests and JSON fixtures - Rewrite both workflows to delegate via parameter splatting - Add npm validate:devcontainer-lockfile and validate:devcontainer-changelog - Update docs
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.OpenSSF Scorecard
Scanned Files
|
bindsi
left a comment
There was a problem hiding this comment.
Approved: the devcontainer lockfile integrity workflow, tests, and documentation remain consistent after re-review. No actionable issues found.
bindsi
left a comment
There was a problem hiding this comment.
Approved: the devcontainer lockfile integrity workflow, tests, and documentation remain consistent after re-review. I did not find actionable issues.
Committed
devcontainer-lock.jsonto source control and added a reusable CI workflow that validates lockfile integrity during PR validation. This closes a supply-chain gap where devcontainer features were declared indevcontainer.jsonwithout pinning to specific OCI digests, making builds non-reproducible and vulnerable to upstream tag mutation.Description
DevContainer Lockfile
Added
.devcontainer/devcontainer-lock.jsonpinning all six devcontainer features (azure-cli, git, github-cli, node, powershell, python) to exact versions with OCI SHA-256 digests. The lockfile follows the devcontainer lockfile spec, providing reproducible builds and supply-chain integrity verification.Lockfile Integrity Workflow
Created
.github/workflows/devcontainer-lockfile-check.ymlas a reusable workflow with three-layer validation:exit 1ifdevcontainer-lock.jsonis absentresolvedandintegrityfields withsha256:prefix via jq filteringcomm -23set difference to detect features indevcontainer.jsonmissing from the lockfileThe workflow uses
set -euo pipefail, SHA-pinnedactions/checkout,persist-credentials: false, and minimizedcontents: readpermissions. Asoft-failinput allows controlled override for non-blocking usage.PR Validation Integration
Wired
devcontainer-lockfile-check.ymlinto pr-validation.yml withsoft-fail: falsefor strict enforcement. The job runs in parallel with other security checks, positioned beforeworkflow-permissions-check.Change-Log Categorization
Updated devcontainer-change-log.yml to categorize
devcontainer-lock.jsonas "Lockfile | Medium" priority, distinguishing the generated artifact from the "High" priority source configuration.Documentation
Related Issue(s)
Fixes #1873
Type of Change
Code & Documentation:
Infrastructure & Configuration:
AI Artifacts:
prompt-builderagent and addressed all feedback.github/instructions/*.instructions.md).github/prompts/*.prompt.md).github/agents/*.agent.md).github/skills/*/SKILL.md)Other:
.ps1,.sh,.py)Testing
npm run lint:md— Passed (214 files, 0 errors)npm run spell-check— Passed (351 files, 0 issues)npm run lint:frontmatter— Passed (0 errors, 0 warnings)npm run validate:skills— Passed (22 skills, 0 errors)npm run lint:md-links— Passed (all links valid)npm run lint:ps— Passed (all PowerShell files clean)npm run plugin:generate— Passed (13 plugins generated, 0 errors)npm run docs:test— Passed (7 suites, 102 tests)persist-credentials: false, and strict bash mode.Checklist
Required Checks
AI Artifact Contributions
/prompt-analyzeto review contribution (N/A — no AI artifact changes)prompt-builderreview (N/A — no AI artifact changes)Required Automated Checks
The following validation commands must pass before merging:
npm run lint:mdnpm run spell-checknpm run lint:frontmatternpm run validate:skillsnpm run lint:md-linksnpm run lint:psnpm run plugin:generatenpm run docs:testSecurity Considerations
Additional Notes
devcontainer.jsonfeatures must rebuild the container and commit the updated lockfile alongside their changes.soft-failinput on the reusable workflow enables non-blocking usage for repositories that want to adopt lockfile validation incrementally.