Regras rígidas de segurança para Docker Compose - NUNCA expor variáveis de ambiente
69%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./skills/infrastructure/docker-compose/SKILL.mdREGRAS RÍGIDAS E OBRIGATÓRIAS para Docker Compose.
services:
app:
environment:
- SERVER_TYPE=http
- SERVER_PORT=8080
- AUTHENTICATION_TYPE=apikey
- AUTHENTICATION_API_KEY=${EVOLUTION_API_KEY:-ChangeMeToSecureKey123!}
- DATABASE_ENABLED=true
- DATABASE_PROVIDER=postgresql
- DATABASE_CONNECTION_URI=${EVOLUTION_DATABASE_URI:-postgresql://user:password@127.0.0.1:5433/db}NUNCA, JAMAIS, EM HIPÓTESE ALGUMA:
ChangeMeToSecureKey123!)services:
app:
env_file:
- .env.app
- .env.database
# Apenas variáveis não-sensíveis podem estar aqui
environment:
- NODE_ENV=production
- LOG_LEVEL=infoSEMPRE:
env_file: para todas as variáveis sensíveis.env.* separados por serviço.env.* ao .gitignore.env.example com placeholdersproject/
├── docker-compose.yml # SEM variáveis sensíveis
├── .env.example # Template com placeholders
├── .env.app # Variáveis da aplicação (gitignored)
├── .env.database # Credenciais do banco (gitignored)
├── .env.redis # Credenciais do Redis (gitignored)
└── .gitignore # Deve incluir .env.*# Application
SERVER_TYPE=http
SERVER_PORT=8080
AUTHENTICATION_TYPE=apikey
AUTHENTICATION_API_KEY=your_api_key_here
# Database
DATABASE_ENABLED=true
DATABASE_PROVIDER=postgresql
DATABASE_CONNECTION_URI=postgresql://user:password@host:port/database
# Redis
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_PASSWORD=your_redis_password_here# Application - NUNCA COMMITAR
SERVER_TYPE=http
SERVER_PORT=8080
AUTHENTICATION_TYPE=apikey
AUTHENTICATION_API_KEY=sk_live_abc123xyz789Antes de commitar docker-compose.yml:
environment:env_file: está configurado.env.* está no .gitignore.env.example existe com placeholdersScript de validação:
# Verificar se há senhas/tokens no docker-compose.yml
grep -E "(password|secret|key|token|uri|connection)" docker-compose.yml | grep -v "env_file"Se encontrar algo, ERRO CRÍTICO - não commitar!
environment:env_file:.env.* no .gitignore.env.example criado com placeholdersf84a77a
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.