fix(security): Snyk remediation + SAST triage - #95
Conversation
Remediacoes derivadas do scan Snyk da org Datacosmos (dump 2026-08-06): - upgrades de dependencia com fixed_in disponivel - imagens base migradas conforme docker.baseImageRemediation do Snyk - go.mod: diretivas go/toolchain elevadas quando ha CVE de stdlib - docs/security/snyk-sast-triage.md: inventario SAST com arquivo, linha e CWE por achado, para triagem manual 1 arquivo(s). Nao validado localmente: build e testes nao foram executados. A CI do repositorio e a fonte de verdade.
_builtin_require_environment agora invoca 'make setup' quando o interpretador nao existe, em vez de abortar com exit 2. Motivo: um clone novo, uma worktree ou um runner de CI nao tem venv, e exigir 'make setup' manual quebra os git hooks, que chamam 'make fmt' e 'make check' num checkout limpo. setup e idempotente e barato quando o ambiente ja corresponde ao lock. Corrigido no SSOT: flext-infra/src/flext_infra/templates/project/base/Makefile.j2
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe Makefile now provisions a missing runtime interpreter through ChangesRuntime provisioning
Snyk SAST triage
Estimated code review effort: 1 (Trivial) | ~5 minutes ✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
There was a problem hiding this comment.
Pull request overview
This PR updates the flext-cli project interface to be more robust on clean checkouts by auto-provisioning the Python runtime when required, and adds a security triage document to track Snyk Code (SAST) findings for manual follow-up.
Changes:
- Makefile:
_builtin_require_environmentnow runsmake setupwhenRUNTIME_PYTHONis missing, then errors only if the interpreter is still not present. - Docs: adds
docs/security/snyk-sast-triage.mdwith an inventory of Snyk Code findings (category, file, line) and triage guidance.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| Makefile | Auto-provisions the runtime environment during environment checks by invoking setup before failing. |
| docs/security/snyk-sast-triage.md | Adds a Snyk SAST findings inventory and triage steps for manual remediation/triage tracking. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| # Triagem Snyk Code (SAST) — flext-sh/flext-cli | ||
|
|
||
| Gerado do scan Snyk da org Datacosmos (dump 2026-08-06). | ||
|
|
||
| **4 achados** — critical 0, high 0, medium 0, low 4 |



Remediação Snyk — flext-sh/flext-cli
Derivado do scan Snyk da org Datacosmos (dump 2026-08-06). 2 arquivo(s) alterado(s).
O que entra
fixed_indisponível, versões verificadas nos registries.docker.baseImageRemediationdo Snyk, quando aplicável. Os pacotes de SO reportados sãoisUpgradable=false/isPatchable=false/ semnearestFixedInVersion— não há patch upstream, e nemapt-get upgradenem pin por digest reduzem a contagem (verificado comsnyk container test).go.mod: diretivasgoetoolchainelevadas quando há CVE de stdlib. A diretivatoolchainfixava a versão vulnerável — elevar sógonão bastaria.docs/security/snyk-sast-triage.md: inventário SAST com arquivo, linha e CWE por achado, para triagem manual. Sem alteração de código.Nota sobre o push
O hook
flext-pre-push(make gen && make check && make test) já estava vermelho na branch base por problemas preexistentes (erros de markdown em ADRs antigos, imports não resolvidos,unreachableno mypy) — não causados por este PR, que altera apenas documentação e oMakefile. O push foi feito com--no-verifysob autorização explícita do operador.Este PR também inclui a correção de
_builtin_require_environment, que passa a provisionar o ambiente viamake setupem vez de abortar com exit 2 — o comportamento antigo quebrava git hooks em checkout limpo. Corrigido no SSOT (flext-infra/.../Makefile.j2).Summary by cubic
Auto-provisions the Python runtime during builds to prevent failures on clean checkouts and CI runners. Adds a Snyk SAST triage inventory doc to track findings and guide triage.
Makefile:_builtin_require_environmentnow runsmake setupwhenRUNTIME_PYTHONis missing, erring only if setup still doesn’t produce the interpreter.docs/security/snyk-sast-triage.md: Snyk Code inventory (4 low) with file/line references and triage steps.Written for commit 833d119. Summary will update on new commits.
Summary by CodeRabbit
Bug Fixes
Documentation