initial #2546
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!2546
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "refs/pull/2546/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: #2107
Original author: @mfreeman451
Original URL: https://github.com/carverauto/serviceradar/pull/2107
Original created: 2025-12-11T10:31:33Z
Original updated: 2025-12-11T22:07:52Z
Original head: carverauto/serviceradar:bug/edge_onboarding_missing_sysmon_template
Original base: main
Original merged: 2025-12-11T22:07:43Z 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
Bug fix, Enhancement
Description
Add
ListKeysRPC to KV service for prefix-based key discoveryImplement checker template seeding into KV at deployment time
Add API endpoint to list available checker templates for UI discovery
Update web UI to show checker templates as dropdown selector
Create default templates for all supported checker types (sysmon, snmp, rperf, dusk, sysmon-osx)
Diagram Walkthrough
File Walkthrough
12 files
Add ListKeys RPC and message typesAdd ListKeys method to KVStore interfaceImplement ListKeys with prefix filteringAdd ListKeys RPC handler implementationAdd ListKeys to KVClient interfaceAdd CheckerTemplate model typeImplement ListCheckerTemplates methodAdd ListCheckerTemplates to service interfaceAdd handler for GET /checker-templates endpointRegister /checker-templates routeReplace text input with template dropdown selectorCreate template seeding script for docker-compose2 files
Regenerate protobuf with ListKeys supportRegenerate gRPC with ListKeys handler4 files
Add ListKeys mock for testingAdd ListKeys mock for sync testingAdd comprehensive template listing testsAdd stub implementation for new interface method14 files
Add checker-templates-seed serviceAdd sysmon checker default templateAdd macOS sysmon checker default templateAdd SNMP checker default templateAdd rperf checker default templateAdd dusk checker default templateCreate sysmon template with variable substitutionCreate macOS sysmon template with variablesUpdate SNMP template with variable placeholdersUpdate rperf template with SPIFFE securityCreate dusk checker default templateAdd checkerTemplates.enabled configuration flagCreate Helm ConfigMap with default templatesCreate Helm Job for KV template seeding4 files
Update documentation for template seeding approachAdd change proposal documentationAdd implementation task checklistAdd specification requirements for templatesImported GitHub PR comment.
Original author: @qodo-code-review[bot]
Original URL: https://github.com/carverauto/serviceradar/pull/2107#issuecomment-3641282076
Original created: 2025-12-11T10:32:38Z
PR Compliance Guide 🔍
Below is a summary of compliance checks for this PR:
Supply chain risk
Description: The seeding script overwrites KV templates unconditionally and logs failures but continues
overall process, which could enable unauthorized or accidental template tampering if the
container is compromised or if credentials/env are misconfigured; consider integrity
checks (e.g., signed templates), strict failure on unexpected changes, and least-privilege
credentials.
seed-checker-templates.sh [49-56]
Referred Code
Information exposure via logs
Description: Errors from stopping the NATS KeyLister are only printed via log.Printf without context
controls or escalation, potentially leaking internal details and masking cleanup failures;
prefer structured logging with controlled verbosity and ensure safe error handling to
avoid information exposure in logs.
nats.go [468-474]
Referred Code
Error detail leakage
Description: The API handler returns a generic 500 with "Failed to list checker templates" while
logging the underlying error; ensure logs do not include sensitive backend details from KV
errors to prevent leaking infrastructure information (e.g., prefixes, connection details).
edge_onboarding.go [733-744]
Referred Code
Client-side info leakage
Description: The frontend fetches '/api/admin/checker-templates' and on non-OK responses only logs
warnings to console without user feedback; while not a direct vuln, it may encourage users
to open devtools where sensitive error details could appear; ensure server and client
avoid emitting sensitive info in console logs.
page.tsx [574-597]
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: 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: 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 endpoint handler returns data and logs only on errors without explicit audit
logging of the access (who requested template listing and outcome), which may be required
for critical actions visibility.
Referred Code
Generic: Robust Error Handling and Edge Case Management
Objective: Ensure comprehensive error handling that provides meaningful context and graceful
degradation
Status:
Weak error context: The ListKeys method wraps errors with a generic message and logs a warning on Stop but
does not include domain/prefix context in logs which may hinder debugging for edge cases
or partial failures.
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:
Unvalidated input: The new API handler proxies template listing without explicit authorization/role checks or
rate limiting visible in this diff; if upstream middleware does not enforce auth, this
could expose template metadata.
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/2107#issuecomment-3641288189
Original created: 2025-12-11T10:34:16Z
PR Code Suggestions ✨
Explore these optional code suggestions:
Ensure Helm job fails on error
Remove the error-suppressing
|| echo "Warning: ..."from thechecker-templates-kv-bootstrap-job.yamlscript to ensure the Kubernetes Jobfails correctly if a template cannot be seeded.
helm/serviceradar/templates/checker-templates-kv-bootstrap-job.yaml [59]
Suggestion importance[1-10]: 8
__
Why: The suggestion correctly points out that error codes are being suppressed, which would cause the Helm bootstrap job to succeed silently even on failure. The fix is critical for ensuring deployment reliability and observability.
Improve error handling in seeding script
Modify the
seed-checker-templates.shscript to explicitly handle errors duringtemplate seeding, log the specific failure, and exit immediately to prevent
partial success.
docker/compose/seed-checker-templates.sh [71-73]
Suggestion importance[1-10]: 6
__
Why: The suggestion correctly identifies that the script does not exit on a seeding failure and proposes a fix that makes the script fail-fast, which improves the robustness of the bootstrap process.
Simplify and improve template listing logic
Simplify the
ListCheckerTemplatesfunction by removing the redundantstrings.HasPrefixcheck, as prefix filtering is already handled by thekvClient.ListKeyscall.pkg/core/edge_onboarding.go [1825-1861]
Suggestion importance[1-10]: 4
__
Why: The suggestion correctly identifies a redundant
HasPrefixcheck, as thekvClient.ListKeyscall already filters by prefix. Removing it simplifies the code, though the performance impact is likely minimal.Imported GitHub PR review comment.
Original author: @mfreeman451
Original URL: https://github.com/carverauto/serviceradar/pull/2107#discussion_r2610079536
Original created: 2025-12-11T10:40:02Z
Original path: pkg/models/edge_onboarding.go
Original line: 163
bad name
Imported GitHub PR review comment.
Original author: @mfreeman451
Original URL: https://github.com/carverauto/serviceradar/pull/2107#discussion_r2610081788
Original created: 2025-12-11T10:40:45Z
Original path: web/src/app/admin/edge-packages/page.tsx
Original line: 105
bad name?