-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Labels
area:workspaceWorkspace tooling, justfile, templatesWorkspace tooling, justfile, templateseffort:smallLess than 1 hourLess than 1 hourrefactorModifications that do not bring any significant change (e.g. style, reorganization)Modifications that do not bring any significant change (e.g. style, reorganization)
Description
Description
initialize.sh and version-check.sh both load .vig-os using source "$config_file", which executes the file as shell code. Since .vig-os is a simple key-value config (DEVCONTAINER_VERSION=X.Y.Z), it should be parsed as data rather than executed.
This reduces the attack surface if .vig-os is ever modified by an untrusted source (e.g. a compromised installer or user-edited workspace).
Flagged by Copilot review: vig-os/devcontainer-smoke-test#25
Files / Modules in Scope
assets/workspace/.devcontainer/scripts/initialize.sh(functionload_vig_os_config)assets/workspace/.devcontainer/scripts/version-check.sh(functionget_current_version)
Out of Scope
.vig-osfile format (keep as-is:KEY=VALUE)- CI workflows
- Smoke-test assets
Invariants / Constraints
- All existing tests must pass without modification
- Behavior must remain identical:
DEVCONTAINER_VERSIONis read from.vig-osand used the same way - Both macOS and Linux
sedpaths ininitialize.shmust still work
Acceptance Criteria
- Both scripts parse
.vig-oswith grep/cut (or equivalent) instead ofsource - Invalid or unexpected content in
.vig-osdoes not execute - All existing tests pass
- TDD compliance (see .cursor/rules/tdd.mdc)
Changelog Category
No changelog needed
Additional Context
Pattern appears in two files with identical structure. Both were flagged independently by Copilot on vig-os/devcontainer-smoke-test#25.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area:workspaceWorkspace tooling, justfile, templatesWorkspace tooling, justfile, templateseffort:smallLess than 1 hourLess than 1 hourrefactorModifications that do not bring any significant change (e.g. style, reorganization)Modifications that do not bring any significant change (e.g. style, reorganization)