Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM mcr.microsoft.com/devcontainers/base:ubuntu

# Build arguments for Claude Code authentication
ARG CLAUDE_CODE_OAUTH_TOKEN

Check warning on line 4 in .devcontainer/Dockerfile

View workflow job for this annotation

GitHub Actions / Trivy Container Scan

Sensitive data should not be used in the ARG or ENV commands

SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ARG "CLAUDE_CODE_OAUTH_TOKEN") More info: https://docs.docker.com/go/dockerfile/rule/secrets-used-in-arg-or-env/

Check warning on line 4 in .devcontainer/Dockerfile

View workflow job for this annotation

GitHub Actions / Generate SBOM

Sensitive data should not be used in the ARG or ENV commands

SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ARG "CLAUDE_CODE_OAUTH_TOKEN") More info: https://docs.docker.com/go/dockerfile/rule/secrets-used-in-arg-or-env/
ARG ANTHROPIC_API_KEY

Check warning on line 5 in .devcontainer/Dockerfile

View workflow job for this annotation

GitHub Actions / Trivy Container Scan

Sensitive data should not be used in the ARG or ENV commands

SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ARG "ANTHROPIC_API_KEY") More info: https://docs.docker.com/go/dockerfile/rule/secrets-used-in-arg-or-env/

Check warning on line 5 in .devcontainer/Dockerfile

View workflow job for this annotation

GitHub Actions / Generate SBOM

Sensitive data should not be used in the ARG or ENV commands

SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ARG "ANTHROPIC_API_KEY") More info: https://docs.docker.com/go/dockerfile/rule/secrets-used-in-arg-or-env/

# Install dependencies and Node.js using official binaries
RUN apt-get update && apt-get install -y \
Expand Down Expand Up @@ -68,7 +68,7 @@
# Install Claude Code using native installer (npm installation deprecated)
# Must run as vscode user so claude installs to /home/vscode/.claude/local/bin
USER vscode
RUN curl -fsSL https://claude.ai/install.sh | bash -s 2.1.33 \
RUN curl -fsSL https://claude.ai/install.sh | bash -s 2.1.39 \
&& echo 'export PATH="$HOME/.claude/local/bin:$PATH"' >> /home/vscode/.bashrc
USER root

Expand Down
4 changes: 2 additions & 2 deletions .devcontainer/codespaces/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,6 @@
"description": "Gemini CLI google_accounts.json (base64 encoded)"
}
},
"postCreateCommand": "/workspaces/config/script/install-npm-globals.sh",
"postStartCommand": "/usr/local/script/install-skills.sh && /usr/local/script/restore-cli-auth.sh"
"postCreateCommand": "cd /workspaces/*/ && ./script/install-npm-globals.sh",
"postStartCommand": "/usr/local/script/install-skills.sh; cd /workspaces/*/ && ./script/restore-cli-auth.sh || true"
Comment on lines +71 to +72

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

cd /workspaces/*/ silently fails when the glob matches zero or multiple directories.

Shell glob cd /workspaces/*/ only works when exactly one subdirectory exists. With zero matches, the literal */ path doesn't exist and cd fails; with multiple matches, cd receives multiple arguments and errors out. In both cases, && short-circuits and the script never runs.

Line 71 is particularly risky because there's no || true fallback — postCreateCommand failure could surface as a container build error or silently skip install-npm-globals.sh depending on the shell behavior.

Consider a more robust approach:

Proposed fix
-  "postCreateCommand": "cd /workspaces/*/ && ./script/install-npm-globals.sh",
-  "postStartCommand": "/usr/local/script/install-skills.sh; cd /workspaces/*/ && ./script/restore-cli-auth.sh || true"
+  "postCreateCommand": "cd /workspaces/$(ls /workspaces/)/ && ./script/install-npm-globals.sh",
+  "postStartCommand": "/usr/local/script/install-skills.sh; cd /workspaces/$(ls /workspaces/)/ && ./script/restore-cli-auth.sh || true"

Or, if you want to be defensive about multiple directories:

-  "postCreateCommand": "cd /workspaces/*/ && ./script/install-npm-globals.sh",
+  "postCreateCommand": "dir=$(find /workspaces -mindepth 1 -maxdepth 1 -type d | head -1) && cd \"$dir\" && ./script/install-npm-globals.sh",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"postCreateCommand": "cd /workspaces/*/ && ./script/install-npm-globals.sh",
"postStartCommand": "/usr/local/script/install-skills.sh; cd /workspaces/*/ && ./script/restore-cli-auth.sh || true"
"postCreateCommand": "cd /workspaces/$(ls /workspaces/)/ && ./script/install-npm-globals.sh",
"postStartCommand": "/usr/local/script/install-skills.sh; cd /workspaces/$(ls /workspaces/)/ && ./script/restore-cli-auth.sh || true"
🤖 Prompt for AI Agents
In @.devcontainer/codespaces/devcontainer.json around lines 71 - 72, The
postCreateCommand uses a fragile glob ("cd /workspaces/*/ &&
./script/install-npm-globals.sh") which fails when zero or multiple dirs match;
update postCreateCommand to robustly find a workspace dir (e.g., iterate over
/workspaces/*/ and cd into the first directory that exists before running
./script/install-npm-globals.sh) and ensure it doesn't cause a failing build
(add a safe fallback like || true if you want to ignore failures). Do the same
defensive change for postStartCommand's cd invocation in the
"/usr/local/script/install-skills.sh; cd /workspaces/*/ &&
./script/restore-cli-auth.sh || true" sequence: iterate to the first matching
directory or check existence before cd, then run ./script/restore-cli-auth.sh,
keeping the existing || true to avoid failing the container start.

}
16 changes: 8 additions & 8 deletions npm/global.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"name": "lib",
"dependencies": {
"@commitlint/cli": {
"version": "20.3.1",
"version": "20.4.1",
"overridden": false
},
"@commitlint/config-conventional": {
"version": "20.3.1",
"version": "20.4.1",
"overridden": false
},
"@leonardsellem/n8n-mcp-server": {
Expand All @@ -18,11 +18,11 @@
"overridden": false
},
"@openai/codex": {
"version": "0.92.0",
"version": "0.99.0",
"overridden": false
},
"@google/gemini-cli": {
"version": "0.26.0",
"version": "0.28.2",
"overridden": false
},
"happy-coder": {
Expand Down Expand Up @@ -58,23 +58,23 @@
"overridden": false
},
"mcp-remote": {
"version": "0.1.37",
"version": "0.1.38",
"overridden": false
},
"n8n": {
"version": "2.4.6",
"version": "2.7.4",
"overridden": false
},
"npm": {
"version": "11.8.0",
"version": "11.10.0",
"overridden": false
},
"pm2": {
"version": "6.0.14",
"overridden": false
},
"vercel": {
"version": "50.8.1",
"version": "50.15.1",
"overridden": false
}
}
Expand Down
Loading
Loading