Skip to content

SG-4240: Remove Fluentbit and apply security updates#36

Merged
hllvc merged 6 commits into
mainfrom
SG-4240-security-update
Jun 18, 2026
Merged

SG-4240: Remove Fluentbit and apply security updates#36
hllvc merged 6 commits into
mainfrom
SG-4240-security-update

Conversation

@hllvc

@hllvc hllvc commented Jan 13, 2026

Copy link
Copy Markdown
Collaborator

This PR removes Fluentbit completely from the sg-runner project, as it is no longer used for logging. Alongside this removal, security updates are applied to improve overall system security.

Changes Made

  • Remove Fluentbit dependency and related configurations
  • Apply security updates to project dependencies
  • Clean up logging infrastructure that relied on Fluentbit

Testing

  • Verify application runs without Fluentbit
  • Confirm logging functionality works with alternative solutions
  • Validate no references to Fluentbit remain in codebase
  • Run security audit to confirm updates applied

@hllvc hllvc self-assigned this Jan 13, 2026
@notion-workspace

Copy link
Copy Markdown

Update sg-runner script

@hllvc hllvc force-pushed the SG-4240-security-update branch from 9f71eb7 to 891d162 Compare January 13, 2026 23:02
@hllvc

hllvc commented Jan 14, 2026

Copy link
Copy Markdown
Collaborator Author

Remove fluentbit completely. We don't use it anymore for logging.

@hllvc hllvc changed the title SG-4240: Security updates. Fluentbit version bump: 2.2.0 -> 4.2.2 SG-4240: Remove Fluentbit and apply security updates May 19, 2026
@hllvc hllvc requested review from arunim2405 and taherkk June 5, 2026 22:20
@hllvc hllvc marked this pull request as ready for review June 5, 2026 22:20
@arunim2405 arunim2405 requested a review from Copilot June 18, 2026 14:34
@hllvc hllvc merged commit f54a4c1 into main Jun 18, 2026
1 check passed
@hllvc hllvc deleted the SG-4240-security-update branch June 18, 2026 14:35

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR removes Fluent Bit-related functionality from sg-runner and tightens operational security by hardening logging/diagnostics locations, input validation, and network/proxy handling in the main runner script.

Changes:

  • Removed Fluent Bit container/config generation and any related runtime checks.
  • Hardened runner script behavior (safer log/diagnostic paths & permissions, proxy validation/config, more structured API calling).
  • Refactored parts of diagnostics, cleanup, and preflight logic.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
README.md Updates health-check docs to remove Fluent Bit container mention (but still needs updates for new log/diagnostic paths).
main.sh Removes Fluent Bit logic; adds security/robustness improvements (diagnostic dir perms, proxy validation/config), refactors API calls and diagnostics, and adjusts cleanup/preflight behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread main.sh
Comment on lines 665 to +666
bridge_id="br-$($CONTAINER_ORCHESTRATOR network ls -q --filter "name=${SG_DOCKER_NETWORK}")"
iptables \
-I DOCKER-USER \
-i "${bridge_id}" \
-d 169.254.169.254,10.0.0.0/24 \
-j DROP
iptables_ensure -I DOCKER-USER -i "${bridge_id}" -d 169.254.169.254,10.0.0.0/24 -j DROP
Comment thread main.sh

# Use the token if available; otherwise, proceed without it for IMDSv1 compatibility
if [ -n "$imdsv2_token" ]; then
attached_iam_role=$(curl --max-time 10 -fSsLk --proto "https" -H "X-aws-ec2-metadata-token: $imdsv2_token" "http://169.254.169.254/latest/meta-data/iam/security-credentials/" 2>/dev/null)
Comment thread main.sh
Comment on lines +990 to 992
local prune_filter="until=4h"
local curr_time
curr_time=$(date)
Comment thread README.md
Comment on lines 132 to +133
This command will print status of `ecs` and `docker` services.
Also, including all related Docker containers (`ecs-agent`, `fluentbit-agent`).
Also, including the related Docker container (`ecs-agent`).
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.

3 participants