# Checklist de segurança - SISPROM360 Backend PHP

## 1. Remover segredos do Git

Nunca versionar `.env`, `.env.local` ou `.env.production`. Use apenas `.env.example`.

```bash
git rm --cached .env 2>/dev/null || true
git rm --cached ../frontend/.env 2>/dev/null || true
git rm --cached ../frontend/.env.local 2>/dev/null || true
git rm --cached ../frontend/.env.production 2>/dev/null || true
```

## 2. Trocar senhas expostas

Troque imediatamente a senha do usuário do PostgreSQL usada no projeto original.
Depois atualize somente o `.env` real no servidor.

## 3. Gerar chave JWT forte

No Linux/cPanel Terminal:

```bash
php -r "echo bin2hex(random_bytes(64)), PHP_EOL;"
```

Use o valor gerado em `SECRET_KEY` e `JWT_SECRET`.

## 4. CORS

Em produção, não use `*`. Exemplo:

```env
CORS_ORIGINS=https://reurbtec.sisprom.com.br,https://api-reurbtec.sisprom.com.br
```

## 5. Google Maps

A chave do Google Maps deve ser rotacionada no Google Cloud e restrita por domínio.
Não deixe chave hardcoded em JavaScript público.

## 6. Produção

Use:

```env
APP_ENV=production
APP_DEBUG=false
```
