Updates/k8s buildbuddy #2442
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!2442
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "refs/pull/2442/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: #1974
Original author: @mfreeman451
Original URL: https://github.com/carverauto/serviceradar/pull/1974
Original created: 2025-11-21T03:58:25Z
Original updated: 2025-11-21T05:02:51Z
Original head: carverauto/serviceradar:updates/k8s_buildbuddy
Original base: main
Original merged: 2025-11-21T05:02:47Z 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
Description
Pass GITHUB_TOKEN into RBE image build for authentication
Make CNPG image preload optional with fallback logic
Add error handling for missing credentials or failed pulls
Support authenticated and unauthenticated image pull scenarios
Diagram Walkthrough
File Walkthrough
build-rbe-image.yml
Pass GitHub token and actor to Docker build.github/workflows/build-rbe-image.yml
build-argsto pass GitHub actor username to Docker buildsecretsto pass GITHUB_TOKEN to Docker build contextDockerfile.rbe
Make CNPG preload optional with fallback logicdocker/Dockerfile.rbe
ghcr_tokensecret optional instead of requiredImported GitHub PR comment.
Original author: @qodo-code-review[bot]
Original URL: https://github.com/carverauto/serviceradar/pull/1974#issuecomment-3561295136
Original created: 2025-11-21T03:58:45Z
PR Compliance Guide 🔍
Below is a summary of compliance checks for this PR:
Unauthenticated image pull
Description: The Docker build now conditionally pulls a container image without authentication, which
can lead to non-reproducible builds and potential supply-chain risks if the image tag is
mutable or the registry is untrusted; authenticated pulls should be enforced for private
or security-sensitive images, or the image digest should be pinned.
Dockerfile.rbe [80-94]
Referred Code
Overprivileged token scope
Description: Passing the GitHub token to docker/build-push-action as a build secret without restricting
permissions or scope may overprivilege the build context; ensure the token has
least-privilege (e.g., ephemeral GITHUB_TOKEN with minimal scopes) to avoid credential
exposure via downstream tooling or image layer leaks.
build-rbe-image.yml [62-65]
Referred Code
🎫 No ticket provided
Codebase context is not defined
Follow the guide to enable codebase context checks.
Generic: Meaningful Naming and Self-Documenting Code
Objective: Ensure all identifiers clearly express their purpose and intent, making code
self-documenting
Status: Passed
Generic: Robust Error Handling and Edge Case Management
Objective: Ensure comprehensive error handling that provides meaningful context and graceful
degradation
Status: Passed
Generic: Secure Error Handling
Objective: To prevent the leakage of sensitive system information through error messages while
providing sufficient detail for internal debugging.
Status: Passed
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: Passed
Generic: Security-First Input Validation and Data Handling
Objective: Ensure all data inputs are validated, sanitized, and handled securely to prevent
vulnerabilities
Status: Passed
Generic: Comprehensive Audit Trails
Objective: To create a detailed and reliable record of critical system actions for security analysis
and compliance.
Status:
Missing audit logs: The new logic performs authenticated/unauthenticated image pulls and fallback handling
without emitting structured audit logs of the actions or outcomes, which may limit
traceability of critical build-time actions.
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/1974#issuecomment-3561296889
Original created: 2025-11-21T03:59:49Z
PR Code Suggestions ✨
Explore these optional code suggestions:
Dockerfile logic creates non-deterministic builds
The Dockerfile's conditional logic results in non-deterministic builds, as the
final image contents depend on the build environment. To ensure predictability,
the build should fail explicitly if the image cannot be preloaded, or
alternative Dockerfiles should be used for different contexts.
Examples:
docker/Dockerfile.rbe [80-95]
Solution Walkthrough:
Before:
After:
Suggestion importance[1-10]: 9
__
Why: The suggestion correctly identifies a critical design flaw where the conditional logic in the
Dockerfileleads to non-deterministic builds, which undermines the reliability of the build system and can cause hard-to-debug downstream failures.Fix broken fallback logic for pull
Fix the shell script's fallback logic by handling the potential failure of the
authenticated
skopeo copycommand. The current implementation withset -ewouldcause the script to exit prematurely instead of attempting an unauthenticated
pull.
docker/Dockerfile.rbe [87-94]
Suggestion importance[1-10]: 8
__
Why: The suggestion correctly identifies a critical bug where
set -ewould cause the script to exit on a failed authenticated pull, preventing the intended fallback to an unauthenticated pull. This fix is crucial for the reliability of the image build process.