docker updates #2531
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!2531
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "refs/pull/2531/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: #2090
Original author: @mfreeman451
Original URL: https://github.com/carverauto/serviceradar/pull/2090
Original created: 2025-12-08T22:15:00Z
Original updated: 2025-12-08T22:17:14Z
Original head: carverauto/serviceradar:chore/docker-doc-updates
Original base: main
Original merged: 2025-12-08T22:17:11Z 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
Migrate Docker Compose from SPIFFE to mTLS security model: Replaced SPIFFE-based inter-service communication with direct mTLS certificates, removing SPIRE services and simplifying security configuration
Create backward-compatible SPIFFE override file: Introduced
docker-compose.spiffe.ymlto preserve SPIFFE configuration for users who require itStandardize image versioning: Replaced
latesttag with${APP_TAG:-v1.0.65}variable across all services and updated.env.exampleto useAPP_TAGinstead ofSERVICERADAR_VERSIONConsolidate Docker documentation: Restructured
README-Docker.mdwith OS-specific setup instructions, startup sequence, and troubleshooting guidanceSimplify main README: Streamlined
README.mdwith condensed Docker Compose examples and references to detailed documentationUpdate runbooks and documentation: Removed file-specific
-f docker-compose.mtls.ymlflags from all command examples in runbooks and deployment guides, simplifying to genericdocker composesyntaxRemove deprecated file: Deleted
docker-compose.mtls.ymlas functionality is now in maindocker-compose.ymlDiagram Walkthrough
File Walkthrough
3 files
docker-compose.yml
Migrate Docker Compose from SPIFFE to mTLS security modeldocker-compose.yml
inter-service communication
direct certificate-based authentication
${APP_TAG:-v1.0.65}variable insteadof
latesttagSPIFFE-specific configurations (trust domains, workload sockets,
SPIFFE IDs)
connections with mTLS
architecture
-mtlssuffix for clarityspire-*) and simplified volumedefinitions
docker-compose.spiffe.yml
Create SPIFFE-based Docker Compose override configurationdocker-compose.spiffe.yml
previously in
docker-compose.ymlspire-agent) with full SPIFFE trust domain setup
configurations for all services
security model
.env.example
Update environment configuration with APP_TAG variable.env.example
SERVICERADAR_VERSIONvariable withAPP_TAGenvironmentvariable
latesttov1.0.65docker-compose.yml
develop)
5 files
README-Docker.md
Restructure Docker documentation with OS-specific setupREADME-Docker.md
covering AlmaLinux/RHEL/Rocky Linux, Ubuntu/Debian, and macOS
installation instructions
"Startup Sequence" section explaining service initialization order
simplified docker-compose commands (removed
SERVICERADAR_VERSIONvariable usage)
SELinux and firewall configuration guidance
improvements, and additional security/TLS references
README.md
Streamline main README with Docker documentation referencesREADME.md
example and removed redundant prerequisites
certificate generation
section with practical usage examples
README-Docker.md for OS-specific setup and troubleshooting
age-graph-readiness.md
Simplify docker compose commands in AGE readiness runbookdocs/docs/runbooks/age-graph-readiness.md
-f docker-compose.mtls.ymlflag from alldocker composecommands, simplifying to standard
docker composesyntaxto generic "Docker Compose"
references
AGENTS.md
Update docker compose commands in agents deployment runbookAGENTS.md
Compose Refresh"
-f docker-compose.mtls.ymlflag from alldocker composecommands throughout the section
procedures
compose-mtls-sysmonosx.md
Simplify Docker Compose prerequisites in sysmon-osx runbookdocs/docs/runbooks/compose-mtls-sysmonosx.md
instead of specific
docker-compose.mtls.ymlfiledocker compose up -dcommand1 files
Imported GitHub PR comment.
Original author: @qodo-code-review[bot]
Original URL: https://github.com/carverauto/serviceradar/pull/2090#issuecomment-3629230790
Original created: 2025-12-08T22:15:47Z
PR Compliance Guide 🔍
Below is a summary of compliance checks for this PR:
Unpinned image tag
Description: The NATS service uses the floating 'nats:latest' image tag, which can lead to
non-reproducible builds and unexpected security regressions when the upstream image
changes; pin a specific digest or version tag to reduce supply-chain risk.
docker-compose.yml [172-193]
Referred Code
Insecure default HTTP
Description: The Nginx service exposes port 80 publicly without TLS termination configured, potentially
encouraging plaintext access to the web UI and APIs; ensure TLS is enabled or provide
clear guidance and defaults for HTTPS in production.
docker-compose.yml [718-743]
Referred Code
Disabled healthcheck
Description: The 'rperf-client' healthcheck was replaced with a no-op 'true' command, which can mask
unhealthy containers and degrade orchestration safety; restore a meaningful healthcheck to
avoid blind spots.
docker-compose.yml [612-616]
Referred Code
Excessive container privileges
Description: The 'agent' container runs with 'privileged: true' and NET_RAW/NET_ADMIN capabilities,
expanding the attack surface; restrict capabilities to the minimum necessary and avoid
full privilege where possible.
docker-compose.yml [265-273]
Referred Code
Exposed internal ports
Description: The 'core' service maps ports 8090, 50052, and 9090 to the host without documented network
access controls, potentially exposing internal APIs; consider binding to localhost, using
a reverse proxy only, or adding guidance to restrict exposure.
docker-compose.yml [121-148]
Referred Code
Credential leakage via logs
Description: The documentation instructs removing '/etc/serviceradar/certs/password.txt' but does not
clarify that the password may still be in container logs ('config-updater' logs show it),
risking credential exposure if logs are retained; add guidance to scrub logs and rotate
the initial admin password.
README-Docker.md [221-223]
Referred Code
Generic: Robust Error Handling and Edge Case Management
Objective: Ensure comprehensive error handling that provides meaningful context and graceful
degradation
Status:
Healthcheck stub: The rperf-client healthcheck was replaced with a no-op 'true' command which may
hide runtime failures, reducing robustness assurances from the deployment perspective.
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:
Potential secrets: The compose file defines database credentials and service passwords via environment
variables and .env defaults, which could risk exposure in logs if applications print env
values; verification requires application code review.
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:
Creds in env: Credentials like CNPG username/password and service endpoints are passed via environment
variables and defaults, but the diff cannot confirm validation, secret handling, or
transport security beyond mTLS configuration.
Referred Code
Compliance status legend
🟢 - Fully Compliant🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label
Imported GitHub PR comment.
Original author: @qodo-code-review[bot]
Original URL: https://github.com/carverauto/serviceradar/pull/2090#issuecomment-3629234346
Original created: 2025-12-08T22:16:49Z
PR Code Suggestions ✨
Explore these optional code suggestions:
Refactor Docker Compose for maintainability
Refactor the new
docker-compose.spiffe.ymlfile to be a lean override fileinstead of a full copy of the service configurations. This will improve
maintainability and prevent configuration drift between the mTLS and SPIFFE
setups.
Examples:
docker-compose.spiffe.yml [1-1133]
docker-compose.yml [1-770]
Solution Walkthrough:
Before:
After:
Suggestion importance[1-10]: 9
__
Why: The suggestion correctly identifies a critical design flaw where
docker-compose.spiffe.ymlis a full copy, leading to immediate configuration drift (e.g.,imagetags) and a future maintenance burden.Implement a meaningful service healthcheck
Restore the meaningful
grpcurlhealthcheck for therperf-clientservice insteadof the current
["CMD", "true"]which is ineffective.docker-compose.yml [614-619]
Suggestion importance[1-10]: 8
__
Why: The suggestion correctly identifies that the
rperf-clienthealthcheck was changed to a no-op, which can cause race conditions and instability during stack startup.Use application-level healthcheck instead of TCP
Replace the current TCP port check for the
srqlservice with a more reliableapplication-level healthcheck that queries a health endpoint.
docker-compose.yml [354-359]
Suggestion importance[1-10]: 7
__
Why: The suggestion correctly points out that an application-level healthcheck is more robust than a TCP port check, improving the reliability of service dependency management.
Fix incorrect exit status capturing
Correct the shell command to properly capture the exit status using
$?insteadof the incorrect
for accurate error logging.?docker-compose.spiffe.yml [327-340]
Suggestion importance[1-10]: 7
__
Why: The suggestion correctly identifies a shell scripting bug where
$$?is used instead of$?, which would cause incorrect logging of the exit status, making debugging difficult.Avoid installing packages at runtime
Improve reliability and startup time by creating a custom Docker image for the
cert-generatorservice withopensslandbashpre-installed, instead ofinstalling them at runtime.
docker-compose.spiffe.yml [107]
Suggestion importance[1-10]: 6
__
Why: The suggestion correctly identifies a best practice violation by installing packages at runtime and proposes creating a custom image, which would improve startup reliability and performance.
Simplify command and fix path
Remove the redundant
untilloop from thekongservice command, as thedepends_oncondition already guarantees the file's existence, and correct a duplicated path
in the
rmcommand.docker-compose.spiffe.yml [373]
Suggestion importance[1-10]: 5
__
Why: The suggestion correctly identifies a redundant
untilloop due to an existingdepends_oncondition, and it also points out a duplicated path in anrmcommand, improving startup efficiency and correctness.Simplify the service startup command
Simplify the
cert-generatorservice's startup command by directly executing thescript from its mount point, removing the need to copy and change permissions.
docker-compose.yml [10]
Suggestion importance[1-10]: 4
__
Why: The suggestion offers a valid simplification of the
cert-generatorcommand, improving readability and removing an unnecessary file copy operation.