Repository navigation
Version/2.3.8 #2818
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
Version/2.3.8 #2818
Changes from all commits
d4ddca0
191a797
3e7c00c
d171b3e
5c746b7
3ef459c
50af57c
78e3f4a
0eaa163
0aec264
9b6dcd7
7e572ce
da8004e
8bc8f9c
396629c
a2b82d1
45165f1
d614b0d
7a992f5
f7352bd
a7f272c
141fcf7
419c933
ec734af
c539c0f
56763fe
1989bac
f768a39
f329106
17d4997
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,34 @@ | ||
| { | ||
| "version": "0.2.0", | ||
| "configurations": [ | ||
| { | ||
| "type": "node", | ||
| "request": "launch", | ||
| "name": "Debug Evolution API (dev:server)", | ||
| "runtimeExecutable": "npm", | ||
| "runtimeArgs": ["run", "dev:server"], | ||
| "console": "integratedTerminal", | ||
| "cwd": "${workspaceFolder}", | ||
| "env": { | ||
| "NODE_OPTIONS": "--inspect" | ||
| }, | ||
| "skipFiles": ["<node_internals>/**"], | ||
| "resolveSourceMapLocations": [ | ||
| "${workspaceFolder}/**", | ||
| "!**/node_modules/**" | ||
| ] | ||
| }, | ||
| { | ||
| "type": "node", | ||
| "request": "attach", | ||
| "name": "Attach Evolution API (porta 9229)", | ||
| "port": 9229, | ||
| "restart": true, | ||
| "skipFiles": ["<node_internals>/**"], | ||
| "resolveSourceMapLocations": [ | ||
| "${workspaceFolder}/**", | ||
| "!**/node_modules/**" | ||
| ] | ||
| } | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| Para fazer o deploy | ||
|
|
||
| Deve fazer o login no ECR | ||
|
|
||
| # Dar permissão de execução (só precisa fazer uma vez) | ||
| chmod +x build.sh | ||
|
|
||
| # Build de teste | ||
| ./build.sh uno/evolution-test | ||
|
|
||
| # Build de produção | ||
| ./build.sh uno/evolution |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| #!/bin/bash | ||
|
|
||
| # Script para build do Docker com SSH Agent | ||
| # chmod +x build.sh | ||
| # Uso: ./build.sh <nome-da-imagem> | ||
| # Exemplo: ./build.sh uno/evolution-test | ||
| # Exemplo: ./build.sh uno/evolution | ||
|
|
||
| set -e # Parar em caso de erro | ||
|
|
||
| # Verificar se foi passado o nome da imagem | ||
| if [ -z "$1" ]; then | ||
| echo "❌ Erro: Você precisa especificar o nome da imagem!" | ||
| echo "" | ||
| echo "Uso: ./build.sh <nome-da-imagem>" | ||
| echo "" | ||
| echo "Exemplos:" | ||
| echo " ./build.sh uno/evolution-test" | ||
| echo " ./build.sh uno/evolution" | ||
| exit 1 | ||
| fi | ||
|
|
||
| IMAGE_NAME=$1 | ||
|
|
||
| echo "🔑 Iniciando SSH Agent..." | ||
| eval $(ssh-agent -s) | ||
|
|
||
| echo "🔐 Adicionando chave SSH (você precisará digitar a senha)..." | ||
| ssh-add ~/.ssh/id_ed25519 | ||
|
|
||
| echo "🐳 Fazendo build da imagem: $IMAGE_NAME" | ||
| export DOCKER_BUILDKIT=1 | ||
| docker build --ssh default -t "$IMAGE_NAME" . | ||
|
|
||
| echo "✅ Build concluído com sucesso!" | ||
| echo "" | ||
| echo "🧹 Limpando SSH Agent..." | ||
| ssh-agent -k | ||
|
|
||
| echo "🎉 Pronto! Imagem criada: $IMAGE_NAME" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,35 +1,18 @@ | ||
| services: | ||
| api: | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟠 High · Dev compose omits application services When A developer starts the documented full development stack with Keep the API and frontend services in the development Compose file, or update the documented workflow to start them separately. Prompt for AI agentsIn `docker-compose.dev.yaml` at line 2:
**Dev compose omits application services**
When A developer starts the documented full development stack with `docker-compose.dev.yaml`, the development Compose file no longer defines the API or frontend, so the documented full-stack command starts only PostgreSQL and Redis; developers cannot use it to run the application and manager as before.
Keep the API and frontend services in the development Compose file, or update the documented workflow to start them separately. |
||
| container_name: evolution_api | ||
| image: evolution/api:local | ||
| build: . | ||
| postgres: | ||
| image: postgres | ||
| restart: always | ||
| ports: | ||
| - 8080:8080 | ||
| volumes: | ||
| - evolution_instances:/evolution/instances | ||
| networks: | ||
| - evolution-net | ||
| env_file: | ||
| - .env | ||
| expose: | ||
| - 8080 | ||
|
|
||
| frontend: | ||
| container_name: evolution_frontend | ||
| image: evolution/manager:local | ||
| build: ./evolution-manager-v2 | ||
| - '5438:5432' | ||
| environment: | ||
| - POSTGRES_USER=postgres | ||
| - POSTGRES_PASSWORD=andand123 | ||
|
Comment on lines
+6
to
+9
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 Medium · Dev database exposed with weak credentials When a developer runs this compose file on a host reachable from an untrusted network, postgreSQL publishes port 5432 on the host’s default interfaces and accepts the fixed Bind the published port to loopback for local development and require a strong, externally supplied password. Prompt for AI agentsIn `docker-compose.dev.yaml` at lines 6-9:
**Dev database exposed with weak credentials**
When a developer runs this compose file on a host reachable from an untrusted network, postgreSQL publishes port 5432 on the host’s default interfaces and accepts the fixed `postgres`/`andand123` credentials, so a network attacker can connect and read or modify the development database.
Bind the published port to loopback for local development and require a strong, externally supplied password. |
||
|
|
||
| redis: | ||
| image: redis:latest | ||
| restart: always | ||
| container_name: redis | ||
| command: > | ||
| redis-server --port 6379 --appendonly yes | ||
| ports: | ||
| - "3000:80" | ||
| networks: | ||
| - evolution-net | ||
|
|
||
| volumes: | ||
| evolution_instances: | ||
|
|
||
|
|
||
| networks: | ||
| evolution-net: | ||
| name: evolution-net | ||
| driver: bridge | ||
| - 6379:6379 | ||
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.
🟡 Medium · Build scripts can use SSH agent
When a dependency or its install script is malicious or compromised, a compromised dependency install script runs while the forwarded SSH agent is available and can authenticate to GitHub as the builder, accessing repositories permitted to that key. The builder’s private key is not extractable, but its access can be abused during the build.
Restrict the SSH mount to fetching the Git dependency, then run dependency lifecycle scripts without the agent mounted.
Prompt for AI agents