-
Notifications
You must be signed in to change notification settings - Fork 6
Add devcontainer files #11
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
Merged
Kwstubbs
merged 3 commits into
GitHubSecurityLab:main
from
Kwstubbs:devcontainer-configuration
Oct 10, 2025
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| # 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/* | ||
|
|
||
| # Set working directory | ||
| WORKDIR /workspaces/seclab-taskflow-agent | ||
|
|
||
| # The rest of the setup will be done in post-create script |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| { | ||
| "name": "Seclab Taskflow Agent", | ||
| "build": { | ||
| "dockerfile": "Dockerfile", | ||
| "context": ".." | ||
| }, | ||
| // Features to add to the dev container | ||
| "features": { | ||
| "ghcr.io/devcontainers/features/python:1": { | ||
| "version": "3.11", | ||
| "installTools": true | ||
| }, | ||
| "ghcr.io/devcontainers/features/git:1": { | ||
| "version": "latest" | ||
| }, | ||
| "ghcr.io/devcontainers/features/github-cli:1": { | ||
| "version": "latest" | ||
| } | ||
| }, | ||
| // Configure tool-specific properties | ||
| "customizations": { | ||
| "vscode": { | ||
| "extensions": [ | ||
| "ms-python.python", | ||
| "ms-python.vscode-pylance", | ||
| "redhat.vscode-yaml", | ||
| "GitHub.copilot", | ||
| "GitHub.copilot-chat", | ||
| "ms-azuretools.vscode-docker" | ||
| ], | ||
| "settings": { | ||
| "python.defaultInterpreterPath": "${workspaceFolder}/.venv/bin/python", | ||
| "python.terminal.activateEnvironment": true | ||
| } | ||
| } | ||
| }, | ||
| // Use 'forwardPorts' to make a list of ports inside the container available locally | ||
| "forwardPorts": [], | ||
| // Use 'postCreateCommand' to run commands after the container is created | ||
| "postCreateCommand": "bash .devcontainer/post-create.sh", | ||
| // Use 'postStartCommand' to run commands when the container starts | ||
| // "postStartCommand": "", | ||
| // Environment variables | ||
| "containerEnv": { | ||
| "PYTHONUNBUFFERED": "1" | ||
| }, | ||
| // Set the user to use in the container (non-root) | ||
| "remoteUser": "vscode", | ||
| // Grant the container access to the host's Docker daemon | ||
| "runArgs": [ | ||
| "--privileged", | ||
| "--init" | ||
| ] | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| #!/bin/bash | ||
| set -e | ||
|
|
||
| echo "🚀 Setting up Seclab Taskflow Agent 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 -r requirements.txt | ||
|
|
||
| # If running in Codespaces, check for necessary secrets and print error if missing | ||
| if [ -n "$CODESPACES" ]; then | ||
| echo "🔐 Running in Codespaces - injecting secrets from Codespaces settings..." | ||
| if [ -n "$COPILOT_TOKEN" ]; then | ||
| echo "Running in Codespaces - please add COPILOT_TOKEN to your Codespaces secrets" | ||
| fi | ||
| if [ -n "$GITHUB_AUTH_HEADER" ]; then | ||
| echo "Running in Codespaces - please add GITHUB_AUTH_HEADER to your Codespaces secrets" | ||
| fi | ||
| fi | ||
|
|
||
| # Create .env file if it doesn't exist | ||
| if [ ! -f .env ]; then | ||
| echo "📝 Creating .env template..." | ||
| cat > .env << 'EOF' | ||
|
|
||
| # Optional: CodeQL database base path | ||
| CODEQL_DBS_BASE_PATH=/workspaces/seclab-taskflow-agent/my_data | ||
|
|
||
| EOF | ||
| echo "⚠️ Please configure the enviroment or your .env file with required tokens!" | ||
| fi | ||
|
|
||
| # Create logs directory if it doesn't exist | ||
| mkdir -p logs | ||
|
|
||
| # Create optional data directories | ||
| mkdir -p my_data | ||
|
|
||
| echo "✅ Development environment setup complete!" | ||
| echo "" | ||
| echo "📋 Next steps:" | ||
| echo "Configure your environment with COPILOT_TOKEN and GITHUB_AUTH_HEADER as needed." | ||
| echo "💡 Remember to activate the virtual environment: source .venv/bin/activate" |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.