-
Notifications
You must be signed in to change notification settings - Fork 1
Add devcontainer config #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
| @@ -0,0 +1,22 @@ | ||||
| # Use Ubuntu 24.04 as base image to match the current environment | ||||
| FROM mcr.microsoft.com/devcontainers/base:ubuntu-24.04 | ||||
|
|
||||
| # Install system dependencies | ||||
| # Note: Python and Git are installed via devcontainer features | ||||
| RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ | ||||
| && apt-get -y install --no-install-recommends \ | ||||
| build-essential \ | ||||
| && apt-get clean \ | ||||
| && rm -rf /var/lib/apt/lists/* | ||||
|
|
||||
| # Install CodeQL CLI | ||||
| RUN curl -Ls -o /tmp/codeql.zip https://github.com/github/codeql-cli-binaries/releases/latest/download/codeql-linux64.zip \ | ||||
| && unzip /tmp/codeql.zip -d /opt \ | ||||
|
Comment on lines
+13
to
+14
|
||||
| && mv /opt/codeql /opt/codeql-cli \ | ||||
| && ln -s /opt/codeql-cli/codeql /usr/local/bin/codeql \ | ||||
| && rm /tmp/codeql.zip | ||||
|
|
||||
| # Set working directory | ||||
| WORKDIR /workspaces/seclab-taskflows | ||||
|
||||
| WORKDIR /workspaces/seclab-taskflows |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,56 @@ | ||||||
| { | ||||||
| "name": "Seclab Taskflows", | ||||||
| "build": { | ||||||
| "dockerfile": "Dockerfile", | ||||||
| "context": ".." | ||||||
| }, | ||||||
| // Features to add to the dev container | ||||||
| "features": { | ||||||
| "ghcr.io/devcontainers/features/python:1": { | ||||||
| "version": "3.11", | ||||||
|
||||||
| "version": "3.11", | |
| "version": "3.9", |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| #!/bin/bash | ||
|
||
| set -e | ||
|
|
||
| # If running in Codespaces, check for necessary secrets and print error if missing | ||
| if [ -v CODESPACES ]; then | ||
| echo "🔐 Running in Codespaces - injecting secrets from Codespaces settings..." | ||
| if [ ! -v COPILOT_TOKEN ]; then | ||
| echo "⚠️ Running in Codespaces - please add COPILOT_TOKEN to your Codespaces secrets" | ||
| fi | ||
| if [ ! -v GITHUB_PERSONAL_ACCESS_TOKEN ]; then | ||
| echo "⚠️ Running in Codespaces - please add GITHUB_PERSONAL_ACCESS_TOKEN to your Codespaces secrets" | ||
| fi | ||
| fi | ||
|
|
||
| echo "💡 Remember to activate the virtual environment: source .venv/bin/activate" | ||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,34 @@ | ||||||||||
| #!/bin/bash | ||||||||||
|
||||||||||
| set -e | ||||||||||
|
|
||||||||||
| echo "🚀 Setting up Seclab Taskflows development environment..." | ||||||||||
|
|
||||||||||
| # Create Python virtual environment | ||||||||||
| echo "📦 Creating Python virtual environment..." | ||||||||||
| python3 -m venv .venv | ||||||||||
|
|
||||||||||
| # Activate virtual environment and install dependencies | ||||||||||
| echo "📥 Installing Python dependencies..." | ||||||||||
| source .venv/bin/activate | ||||||||||
| python -m pip install --upgrade pip | ||||||||||
| python -m pip install hatch | ||||||||||
| hatch build | ||||||||||
|
||||||||||
| hatch build |
Copilot
AI
Nov 26, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Installing hatch may be unnecessary if you're only using pip install -e . for development. The pyproject.toml uses hatchling as the build backend, which pip will invoke automatically during installation. Consider removing this line unless hatch is specifically needed for other development tasks.
| python -m pip install hatch | |
| hatch build |
Copilot
AI
Nov 26, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the README, the project requires MEMCACHE_STATE_DIR, CODEQL_DBS_BASE_PATH, and DATA_DIR environment variables. Currently, only CODEQL_DBS_BASE_PATH is added to the .env file. Consider adding the other required environment variables:
echo "MEMCACHE_STATE_DIR=$(realpath data)" >> .env
echo "DATA_DIR=$(realpath data)" >> .envThis ensures the devcontainer setup aligns with the documented requirements.
| echo "CODEQL_DBS_BASE_PATH=$(realpath data)" >> .env | |
| echo "CODEQL_DBS_BASE_PATH=$(realpath data)" >> .env | |
| echo "MEMCACHE_STATE_DIR=$(realpath data)" >> .env | |
| echo "DATA_DIR=$(realpath data)" >> .env |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
curlcommand is used to download the CodeQL CLI, butcurlmay not be installed in the base image. To ensure reliability, addcurlto the apt-get install command on line 7, e.g.,build-essential curl unzip \.