Bazel/create pkg #2255
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!2255
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "refs/pull/2255/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: #1677
Original author: @mfreeman451
Original URL: https://github.com/carverauto/serviceradar/pull/1677
Original created: 2025-10-02T00:08:49Z
Original updated: 2025-10-02T01:59:30Z
Original head: carverauto/serviceradar:bazel/create_pkg
Original base: main
Original merged: 2025-10-02T01:59:26Z by @mfreeman451
PR Type
Enhancement
Description
Implement comprehensive Bazel packaging system for ServiceRadar components
Add eBPF profiler build system with dynamic object loading
Update Docker RBE executor with enhanced toolchain support
Integrate Rust workspace for rperf, sysmon, and profiler components
Diagram Walkthrough
File Walkthrough
32 files
Create comprehensive Bazel packaging macro systemImplement eBPF object build and loading systemUpdate eBPF program loading with dynamic path resolutionEnhance RBE executor with Rust and eBPF toolchainsSimplify core package using new macro systemAdd Bazel build configuration for rperf checkerAdd Bazel build configuration for sysmon checkerAdd profiler common library build configurationImplement profiler binary build with eBPF integrationCreate agent package using macro systemCreate CLI package using macro systemCreate dusk-checker package using macro systemCreate event-writer package using macro systemCreate faker package using macro systemCreate flowgger package using macro systemCreate kong package using macro systemCreate kv package using macro systemCreate mapper package using macro systemCreate nats package using macro systemCreate otel package using macro systemCreate poller package using macro systemCreate profiler package using macro systemCreate proton package using macro systemCreate rperf-checker package using macro systemCreate rperf package using macro systemCreate snmp-checker package using macro systemCreate srql package using macro systemCreate sync package using macro systemCreate sysmon package using macro systemCreate trapd package using macro systemCreate web package using macro systemCreate zen package using macro system7 files
Define packaging metadata for all ServiceRadar componentsInclude rperf and sysmon in workspace membersUpdate RBE executor image version referenceCreate profiler package exports and aliasExport profiler proto files for build systemExport sysmon proto files for build systemDefine packaging build configuration settings1 files
Add Rust crate repositories for profiler componentsImported GitHub PR comment.
Original author: @qodo-code-review[bot]
Original URL: https://github.com/carverauto/serviceradar/pull/1677#issuecomment-3358572749
Original created: 2025-10-02T00:10:09Z
PR Compliance Guide 🔍
Below is a summary of compliance checks for this PR:
Build command execution
Description: The build script invokes an external 'cargo build' with a toolchain-modifying flag and
environment manipulation, which if attacker-controlled environment variables or PATH are
present could execute unexpected binaries during build; ensure build environments are
trusted and paths are sanitized.
build.rs [64-81]
Referred Code
Insecure file permissions
Description: Packaging rule allows arbitrary file installation with owner/group/mode from config,
risking privilege escalation or unsafe permissions if misconfigured (e.g., setting 0777 or
root-owned binaries); enforce validation of modes and ownership in packaging pipeline.
package_rules.bzl [34-54]
Referred Code
🎫 No ticket provided
Codebase context is not defined
Follow the guide to enable codebase context checks.
No custom compliance provided
Follow the guide to enable custom compliance check.
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/1677#issuecomment-3358574844
Original created: 2025-10-02T00:11:26Z
PR Code Suggestions ✨
Explore these optional code suggestions:
Centralizing all packaging configurations is risky
The PR centralizes all packaging configurations into a single large file,
packages.bzl, creating a bottleneck. It is suggested to co-locate each package'sconfiguration with its own build files for better modularity.
Examples:
packaging/packages.bzl [3-818]
packaging/core/BUILD.bazel [1-9]
Solution Walkthrough:
Before:
After:
Suggestion importance[1-10]: 8
__
Why: This is a valid and significant architectural suggestion that correctly identifies a major design flaw in the new packaging system, which could lead to future maintenance and collaboration issues.
Remove redundant binary dependencies
Remove the redundant
all_crate_deps(normal = True)from thedepsof therperf_checkerrust_binarytarget, as they are already provided by the:rperf_checker_libdependency.cmd/checkers/rperf-client/BUILD.bazel [34-39]
Suggestion importance[1-10]: 5
__
Why: The suggestion correctly identifies that the dependencies in the
rust_binarytarget are redundant, as they are already included via the:rperf_checker_libdependency, and removing them improves build file clarity.