Skip to content

Force Lambda emergency logging to use stderr#156

Closed
timkelty wants to merge 27 commits into
3.xfrom
5.x
Closed

Force Lambda emergency logging to use stderr#156
timkelty wants to merge 27 commits into
3.xfrom
5.x

Conversation

@timkelty
Copy link
Copy Markdown
Contributor

Summary

  • Keep Bref’s default Laravel logging pointed at stderr on Lambda
  • Always replace the emergency channel with the configured stderr channel after provider boot
  • Keep the implementation narrow and avoid the configurable bref.logging.* direction

Testing

  • BrefServiceProviderTest covers the Lambda logging behavior and the emergency channel override
  • Local lint and PHPUnit checks passed

@timkelty timkelty closed this May 12, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 23fc6fe134

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

$process = Process::fromShellCommandline($shellCommand, null, $environment, null, self::PROCESS_TIMEOUT_SECONDS);

$process->run(function($type, $buffer): void {
$shellCommand = '"${:PHP_BINARY}" /var/task/craft ' . $command;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Escape command payload before shell execution

The shell command now appends $command directly to fromShellCommandline(...), so metacharacters in the event/SQS payload (e.g. ;, &&, backticks) are interpreted by the shell instead of being passed as craft arguments. This is a regression from the previous escapeshellcmd(...) path and allows execution of unintended commands whenever an attacker or malformed upstream payload can influence command.

Useful? React with 👍 / 👎.

}
}

return null;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Restore Redis URL fallback when SRV records are unavailable

When SRV lookup fails or CRAFT_CLOUD_CACHE_SRV is unset, resolveRedisUrl() now always returns null, which silently disables Redis cache configuration and forces failover to database/array only. Previous behavior supported a legacy CRAFT_CLOUD_REDIS_URL fallback, so environments still on that variable will regress to slower non-Redis caching after this change.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant