-
Notifications
You must be signed in to change notification settings - Fork 0
Aider working #4
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
base: main
Are you sure you want to change the base?
Conversation
- langfuse - default driver - and api keys
…ntainer (like docker volume)
- Relocate goose driver to mcontainer/drivers/ - Update ConfigManager to dynamically scan for driver YAML files - Add support for mc-driver.yaml instead of mai-driver.yaml - Update Driver model to support init commands and other YAML fields - Auto-discover drivers at runtime instead of hardcoding them - Update documentation to reflect new directory structure
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
if [ -n "$MC_GIT_SSH_KEY" ]; then | ||
mkdir -p ~/.ssh | ||
echo "$MC_GIT_SSH_KEY" > ~/.ssh/id_ed25519 | ||
chmod 600 ~/.ssh/id_ed25519 | ||
ssh-keyscan github.com >> ~/.ssh/known_hosts 2>/dev/null | ||
ssh-keyscan gitlab.com >> ~/.ssh/known_hosts 2>/dev/null | ||
ssh-keyscan bitbucket.org >> ~/.ssh/known_hosts 2>/dev/null | ||
fi |
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.
Suggestion: The SSH key is being written directly to a file without proper validation. This could lead to issues if the key is malformed or contains unexpected characters. Use base64 decoding to ensure the key is properly formatted. [possible issue, importance: 7]
if [ -n "$MC_GIT_SSH_KEY" ]; then | |
mkdir -p ~/.ssh | |
echo "$MC_GIT_SSH_KEY" > ~/.ssh/id_ed25519 | |
chmod 600 ~/.ssh/id_ed25519 | |
ssh-keyscan github.com >> ~/.ssh/known_hosts 2>/dev/null | |
ssh-keyscan gitlab.com >> ~/.ssh/known_hosts 2>/dev/null | |
ssh-keyscan bitbucket.org >> ~/.ssh/known_hosts 2>/dev/null | |
fi | |
# Set up SSH key if provided | |
if [ -n "$MC_GIT_SSH_KEY" ]; then | |
mkdir -p ~/.ssh | |
echo "$MC_GIT_SSH_KEY" | base64 -d > ~/.ssh/id_ed25519 2>/dev/null || echo "$MC_GIT_SSH_KEY" > ~/.ssh/id_ed25519 | |
chmod 600 ~/.ssh/id_ed25519 | |
ssh-keyscan github.com >> ~/.ssh/known_hosts 2>/dev/null | |
ssh-keyscan gitlab.com >> ~/.ssh/known_hosts 2>/dev/null | |
ssh-keyscan bitbucket.org >> ~/.ssh/known_hosts 2>/dev/null | |
fi |
if [[ "$SERVER" =~ ^(http|https)://([^:/]+)(:([0-9]+))?(/.*)?$ ]]; then | ||
PROTOCOL="${BASH_REMATCH[1]}" | ||
HOST="${BASH_REMATCH[2]}" | ||
PORT="${BASH_REMATCH[4]}" | ||
PATH_PREFIX="${BASH_REMATCH[5]:-/}" | ||
|
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.
Suggestion: The regex pattern doesn't properly handle URLs with authentication components (username:password). This could cause parsing errors when using authenticated MCP server URLs. [possible issue, importance: 8]
if [[ "$SERVER" =~ ^(http|https)://([^:/]+)(:([0-9]+))?(/.*)?$ ]]; then | |
PROTOCOL="${BASH_REMATCH[1]}" | |
HOST="${BASH_REMATCH[2]}" | |
PORT="${BASH_REMATCH[4]}" | |
PATH_PREFIX="${BASH_REMATCH[5]:-/}" | |
# Extract protocol, host, port and any path | |
if [[ "$SERVER" =~ ^(http|https)://([^@]*@)?([^:/]+)(:([0-9]+))?(/.*)?$ ]]; then | |
PROTOCOL="${BASH_REMATCH[1]}" | |
AUTH="${BASH_REMATCH[2]}" | |
HOST="${BASH_REMATCH[3]}" | |
PORT="${BASH_REMATCH[5]}" | |
PATH_PREFIX="${BASH_REMATCH[6]:-/}" |
RUN mkdir /var/run/sshd | ||
RUN echo 'root:root' | chpasswd | ||
RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config | ||
RUN sed -i 's/#PasswordAuthentication yes/PasswordAuthentication yes/' /etc/ssh/sshd_config | ||
|
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.
Suggestion: Using a hardcoded and weak password ('root') for the root user creates a significant security vulnerability. The SSH server should either use key-based authentication or generate a random password that's provided to the user. [security, importance: 9]
RUN mkdir /var/run/sshd | |
RUN echo 'root:root' | chpasswd | |
RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config | |
RUN sed -i 's/#PasswordAuthentication yes/PasswordAuthentication yes/' /etc/ssh/sshd_config | |
# Set up SSH server | |
RUN mkdir /var/run/sshd | |
RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin prohibit-password/' /etc/ssh/sshd_config | |
RUN sed -i 's/#PasswordAuthentication yes/PasswordAuthentication no/' /etc/ssh/sshd_config | |
RUN sed -i 's/#PubkeyAuthentication yes/PubkeyAuthentication yes/' /etc/ssh/sshd_config |
User description
96% goose 4% me
PR Type
Enhancement
Description
Added Aider AI assistant driver
Implemented Docker container configuration
Created initialization and configuration scripts
Added comprehensive test suite
Changes walkthrough 📝
test_aider_driver.py
Add test suite for Aider driver
tests/test_aider_driver.py
entrypoint.sh
Add container entrypoint script
mcontainer/drivers/aider/entrypoint.sh
init-status.sh
Add initialization status checker
mcontainer/drivers/aider/init-status.sh
mc-init.sh
Add main container initialization script
mcontainer/drivers/aider/mc-init.sh
update-aider-config.sh
Add MCP server configuration script
mcontainer/drivers/aider/update-aider-config.sh
Dockerfile
Add Dockerfile for Aider container
mcontainer/drivers/aider/Dockerfile
mc-driver.yaml
Add driver configuration manifest
mcontainer/drivers/aider/mc-driver.yaml
README.md
Add driver documentation
mcontainer/drivers/aider/README.md