Repository navigation
fix: isolate service users, env values, webhooks and SSH temps (#231–#234) - #235
Merged
Merged
Conversation
…unt (#231) Shared-host units for those runtimes were User=root. Each app now gets the same cleat-<slug> account Phoenix already uses, with write limited to its data dir and release tree.
systemd EnvironmentFile is always quoted so spaces and metacharacters stay data. Migrate, release_command and Rails/Rust runners load that file with python3 instead of `source`, so `$()`, backticks and `$HOME` are not executed. Fixes #232
find_repo_apps used any matching secret as authorization for every instance of the repository. Tenants that register the same repo now only enqueue when their own secret matches; instances that share a secret still deploy together. Fixes #233
run_with_stdin created the script and wrapper with File.write/2, so umask 0022 left them world-readable. They now live in a mkdir -m 700 directory and are opened with mode 0600/0700. Fixes #234
The #232 runner passes NODE_ENV via python3 --set instead of `export` and `source`. This assertion was still looking for the old shell snippet.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problema
Quatro falhas de isolamento no painel, abertas em #231–#234:
sourcedo EnvironmentFile avaliava$(), backticks e$HOMEno shellMudanças
cleat-<slug>(mesmo padrão do Phoenix), comProtectSystem=full,ReadWritePathssó em data+release, echown750 depois dorelease_command.release_commande runners Rails/Rust carregam o arquivo compython3(execvpe/--print-exports); valores com$(touch …)ficam literais.find_repo_apps/3devolve só os apps cujo próprio segredo valida a assinatura. Instâncias que compartilham o segredo continuam no mesmo disparo.run_with_stdin/3cria dirmkdir -m 700e arquivos 0600/0700, e apaga o dir noafter(sucesso ou falha).Testes
$(touch marker)não cria o arquivo; conteúdo quoted no env filemix precommit941/0 ·mix credo suggest --min-priority higherlimpo.Fixes #231
Fixes #232
Fixes #233
Fixes #234