Chore/podman updates #2533
No reviewers
Labels
No labels
1week
2weeks
Failed compliance check
IP cameras
NATS
Possible security concern
Review effort 1/5
Review effort 2/5
Review effort 3/5
Review effort 4/5
Review effort 5/5
UI
aardvark
accessibility
amd64
api
arm64
auth
back-end
bgp
blog
bug
build
checkers
ci-cd
cleanup
cnpg
codex
core
dependencies
device-management
documentation
duplicate
dusk
ebpf
enhancement
eta 1d
eta 1hr
eta 3d
eta 3hr
feature
fieldsurvey
github_actions
go
good first issue
help wanted
invalid
javascript
k8s
log-collector
mapper
mtr
needs-triage
netflow
network-sweep
observability
oracle
otel
plug-in
proton
python
question
reddit
redhat
research
rperf
rperf-checker
rust
sdk
security
serviceradar-agent
serviceradar-agent-gateway
serviceradar-web
serviceradar-web-ng
siem
snmp
sysmon
topology
ubiquiti
wasm
wontfix
zen-engine
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
carverauto/serviceradar!2533
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "refs/pull/2533/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from GitHub pull request.
Original GitHub pull request: #2092
Original author: @mfreeman451
Original URL: https://github.com/carverauto/serviceradar/pull/2092
Original created: 2025-12-08T23:35:36Z
Original updated: 2025-12-09T05:05:50Z
Original head: carverauto/serviceradar:chore/podman_updates
Original base: main
Original merged: 2025-12-09T05:05:35Z by @mfreeman451
User description
IMPORTANT: Please sign the Developer Certificate of Origin
Thank you for your contribution to ServiceRadar. Please note, when contributing, the developer must include
a DCO sign-off statement indicating the DCO acceptance in one commit message. Here
is an example DCO Signed-off-by line in a commit message:
Describe your changes
Issue ticket number and link
Code checklist before requesting a review
PR Type
Enhancement, Documentation
Description
Add Podman support with dedicated startup script for dependency ordering
Implement container health checks and sequential service startup phases
Document Podman installation and configuration for multiple Linux distributions
Include SELinux troubleshooting guidance for RHEL/AlmaLinux environments
Diagram Walkthrough
File Walkthrough
podman-start.sh
Podman startup orchestration script with health checkspodman-start.sh
containers
status, and running state
messaging, and application services
--cleanflagREADME-Docker.md
Add Podman installation and configuration documentationREADME-Docker.md
Docker
AlmaLinux/RHEL/Rocky and Ubuntu/Debian
containers and low port bindings
approaches for bind mount access
management
Imported GitHub PR comment.
Original author: @qodo-code-review[bot]
Original URL: https://github.com/carverauto/serviceradar/pull/2092#issuecomment-3629497338
Original created: 2025-12-08T23:36:00Z
PR Compliance Guide 🔍
Below is a summary of compliance checks for this PR:
Excessive privileges
Description: The script hard-requires root (EUID==0) and instructs running with sudo, increasing blast
radius for podman operations and log/grep actions; consider minimizing privileges or using
rootless Podman where possible.
podman-start.sh [107-111]
Referred Code
Sensitive info exposure
Description: Admin credentials are scraped from container logs and echoed to the console, risking
sensitive information exposure via terminal history or multi-user systems.
podman-start.sh [224-226]
Referred Code
Weakening SELinux policy
Description: Documentation advises setting SELinux to permissive mode (setenforce 0), which broadly
weakens host security and may lead to unintended access to bind mounts and host files.
README-Docker.md [96-105]
Referred Code
Generic: Secure Logging Practices
Objective: To ensure logs are useful for debugging and auditing without exposing sensitive
information like PII, PHI, or cardholder data.
Status:
Secrets in logs: The script retrieves and displays admin Username/Password from container logs and
recommends grepping Password in README, which violates secure logging by exposing
credentials.
Referred Code
Generic: Comprehensive Audit Trails
Objective: To create a detailed and reliable record of critical system actions for security analysis
and compliance.
Status:
Missing auditing: The startup script performs critical operational actions (starting/stopping services,
cleanup) without emitting structured audit logs that include user identity and action
outcomes.
Referred Code
Generic: Robust Error Handling and Edge Case Management
Objective: Ensure comprehensive error handling that provides meaningful context and graceful
degradation
Status:
Timeout handling: Functions like wait_for_container_healthy continue after health-check timeouts and the
script uses set -e with broad try/ignore patterns, leading to potential silent partial
failures without clear remediation.
Referred Code
Generic: Security-First Input Validation and Data Handling
Objective: Ensure all data inputs are validated, sanitized, and handled securely to prevent
vulnerabilities
Status:
Rootful guidance: Documentation instructs running all containers rootful with privileged services and
suggests disabling/enabling SELinux constraints without discussing security implications
or safer alternatives.
Referred Code
Imported GitHub PR comment.
Original author: @qodo-code-review[bot]
Original URL: https://github.com/carverauto/serviceradar/pull/2092#issuecomment-3629499701
Original created: 2025-12-08T23:37:01Z
PR Code Suggestions ✨
Explore these optional code suggestions:
Replace startup script with declarative orchestration
The
podman-start.shscript is a fragile, imperative approach to serviceorchestration. It should be replaced with a more robust, declarative method like
using Kubernetes manifests with
podman play kubeor generating systemd unitfiles.
Examples:
podman-start.sh [103-230]
Solution Walkthrough:
Before:
After:
Suggestion importance[1-10]: 9
__
Why: The suggestion correctly identifies a major architectural weakness in using a long, imperative shell script for service orchestration, which is brittle and hard to maintain. Proposing declarative alternatives like
podman play kubeor systemd units is a significant improvement for robustness and maintainability.Avoid removing unrelated containers
In the cleanup phase, replace the destructive
podman rm -afcommand with a moretargeted command that only removes containers associated with the ServiceRadar
project to avoid deleting unrelated containers.
podman-start.sh [115-122]
Suggestion importance[1-10]: 8
__
Why: This is a critical suggestion that prevents the script from causing unintended data loss by deleting all containers on the host, rather than just those related to the project.
✅
Handle container not found scenarioSuggestion Impact:
The commit added explicit handling of the "not_found" status, attempting to resolve the container name and, if still not found, continuing the loop distinctly. This addresses the suggested not_found check, though it does not immediately fail; it improves responsiveness and clarity around missing containers.code diff:
In the
wait_for_container_exitfunction, add a check for the "not_found" statusto fail early if a container does not exist, instead of waiting for a timeout.
podman-start.sh [20-43]
[Suggestion processed]Suggestion importance[1-10]: 6
__
Why: The suggestion improves the script's robustness by adding an early exit condition, which provides faster and more specific feedback if a container fails to start.
Detect service startup failures
In the
start_servicefunction, remove|| trueand add error handling to checkthe exit code of
podman-compose up, ensuring that service startup failures aredetected and reported.
podman-start.sh [96-100]
Suggestion importance[1-10]: 7
__
Why: The suggestion correctly identifies that suppressing errors with
|| truecan hide important startup failures, and proposes a more robust error handling mechanism to improve script reliability and debuggability.