Skip to content
Open
Changes from 2 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
39 changes: 39 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"name": "Robusta KRR Dev",
"image": "mcr.microsoft.com/devcontainers/python:3.10",

"features": {
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {
"moby": false
}
},
"customizations": {
"vscode": {
"extensions": [
"ms-python.python",
"ms-python.vscode-pylance",
"ms-python.debugpy",
"GitHub.copilot",
"GitHub.copilot-chat",
Comment on lines +15 to +16

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 | 🟡 Minor

Minor: copilot-chat may assume unnecessary licensing.

Line 15–16 includes GitHub.copilot-chat along with GitHub.copilot. This assumes all developers have Copilot licenses. Consider removing copilot-chat or making it optional via a comment.

🤖 Prompt for AI Agents
.devcontainer/devcontainer.json lines 15-16: the devcontainer currently lists
"GitHub.copilot-chat" alongside "GitHub.copilot", which presumes all developers
have the Copilot Chat license; remove "GitHub.copilot-chat" from the extensions
array or comment it out / add a note to make it optional so the devcontainer
doesn't force a licensed extension on every developer.

"EditorConfig.EditorConfig",
"dbaeumer.vscode-eslint",
"Orta.vscode-jest",
Comment on lines +18 to +19

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 | 🟡 Minor

Minor: ESLint and Jest extensions are not aligned with a Python project.

Lines 18–19 include dbaeumer.vscode-eslint and Orta.vscode-jest, which are JavaScript/TypeScript tooling. For a Python project, consider removing these unless the project explicitly includes JavaScript/TypeScript components.

       "EditorConfig.EditorConfig",
-      "dbaeumer.vscode-eslint",
-      "Orta.vscode-jest",
       "eamodio.gitlens"
📝 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
"dbaeumer.vscode-eslint",
"Orta.vscode-jest",
🤖 Prompt for AI Agents
.devcontainer/devcontainer.json around lines 18 to 19: the devcontainer lists
JavaScript/TypeScript extensions ("dbaeumer.vscode-eslint" and
"Orta.vscode-jest") that don't match a Python project; remove these two entries
from the extensions array (or replace them with Python-relevant extensions like
ms-python.python) so the devcontainer only installs tooling appropriate for the
repository.

"eamodio.gitlens"
],
"settings": {
"python.defaultInterpreterPath": "/usr/local/bin/python",
"python.analysis.typeCheckingMode": "basic"
}
}
},
"remoteUser": "root",

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

Major: Avoid running as root in development containers.

Running the container as root is a security anti-pattern and may not align with the project's development practices. Consider using a non-root user (e.g., vscode or developer). The base image mcr.microsoft.com/devcontainers/python:3.10 includes a vscode user by default.

- "remoteUser": "root",
+ "remoteUser": "vscode",
📝 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
"remoteUser": "root",
"remoteUser": "vscode",
🤖 Prompt for AI Agents
.devcontainer/devcontainer.json around line 28: the container is configured to
run as "root", which is a security anti-pattern; change "remoteUser" to a
non-root user provided by the base image (e.g., "vscode" or "developer") and
ensure any filesystem permissions or startup commands are adjusted accordingly
(update postCreateCommand or Dockerfile steps to chown workspace folders or
install tools for that user if needed) so the container runs as the non-root
user without breaking mounts or setup scripts.

"hostRequirements": {
"cpus": 2,
"memory": "2gb"
},
"initializeCommand": "rm -rf build && rm -rf dist",

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 | 🔴 Critical

Critical: initializeCommand runs on host machine and could delete build/dist directories.

The initializeCommand runs on the host before the container is spun up. Deleting build and dist from the host is destructive and unintended. Move this cleanup into postCreateCommand (inside the container) if needed, or remove it entirely.

- "initializeCommand": "rm -rf build && rm -rf dist",
+ "postCreateCommand": "set -e && apt-get update && apt-get install -y build-essential zip binutils && pip install poetry && poetry install && rm -rf build && rm -rf dist",
📝 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
"initializeCommand": "rm -rf build && rm -rf dist",
"postCreateCommand": "set -e && apt-get update && apt-get install -y build-essential zip binutils && pip install poetry && poetry install && rm -rf build && rm -rf dist",
🤖 Prompt for AI Agents
.devcontainer/devcontainer.json around line 33: the initializeCommand currently
runs on the host and performs destructive rm -rf build && rm -rf dist; move this
cleanup into postCreateCommand (which runs inside the container) or remove it
entirely to avoid deleting host files. Replace or remove the initializeCommand
entry and add a postCreateCommand that performs the cleanup inside the container
(or omit cleanup) so host directories are not affected.

"postCreateCommand": "apt-get update && apt-get install -y build-essential zip binutils && pip install 'urllib3<2' && pip install pyinstaller poetry && poetry install",
"mounts": [
"source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind"
]
}