adding missing files #2662

Merged
mfreeman451 merged 1 commit from refs/pull/2662/head into staging 2026-01-14 03:57:29 +00:00
mfreeman451 commented 2026-01-14 03:56:58 +00:00 (Migrated from github.com)
Owner

Imported from GitHub pull request.

Original GitHub pull request: #2282
Original author: @mfreeman451
Original URL: https://github.com/carverauto/serviceradar/pull/2282
Original created: 2026-01-14T03:56:58Z
Original updated: 2026-01-14T03:58:17Z
Original head: carverauto/serviceradar:updates/missing_files_linting
Original base: staging
Original merged: 2026-01-14T03:57:29Z 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:

Signed-off-by: J. Doe <j.doe@domain.com>

Describe your changes

Code checklist before requesting a review

  • I have signed the DCO?
  • The build completes without errors?
  • All tests are passing when running make test?

PR Type

Enhancement


Description

  • Format code for improved readability and consistency

  • Add blank line for better code organization

  • Adjust spacing in template text display


Diagram Walkthrough

flowchart LR
  A["Code Files"] -->|"Apply Formatting"| B["Improved Readability"]
  A -->|"Fix Line Breaks"| C["Better Organization"]
  A -->|"Adjust Spacing"| D["Consistent Style"]

File Walkthrough

Relevant files
Formatting
runtime.exs
Format DNS topology configuration code                                     

web-ng/config/runtime.exs

  • Add blank line after gateway_dns_query assignment for improved code
    organization
  • Reformat maybe_add_dns_topology function call to multi-line format for
    better readability
+6/-1     
tenant_workload_controller.ex
Format error handling function call                                           

web-ng/lib/serviceradar_web_ng_web/controllers/api/tenant_workload_controller.ex

  • Reformat error return statement to multi-line format for improved
    readability
  • Break long function call across multiple lines
+5/-1     
index.ex
Adjust spacing in network status display                                 

web-ng/lib/serviceradar_web_ng_web/live/settings/networks_live/index.ex

  • Adjust spacing in template text from 4 spaces to 5 spaces before "of"
    text
  • Improve visual alignment in host count display
+1/-1     

Imported from GitHub pull request. Original GitHub pull request: #2282 Original author: @mfreeman451 Original URL: https://github.com/carverauto/serviceradar/pull/2282 Original created: 2026-01-14T03:56:58Z Original updated: 2026-01-14T03:58:17Z Original head: carverauto/serviceradar:updates/missing_files_linting Original base: staging Original merged: 2026-01-14T03:57:29Z 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]( https://developercertificate.org/) indicating the DCO acceptance in one commit message. Here is an example DCO Signed-off-by line in a commit message: ``` Signed-off-by: J. Doe <j.doe@domain.com> ``` ## Describe your changes ## Issue ticket number and link ## Code checklist before requesting a review - [ ] I have signed the DCO? - [ ] The build completes without errors? - [ ] All tests are passing when running make test? ___ ### **PR Type** Enhancement ___ ### **Description** - Format code for improved readability and consistency - Add blank line for better code organization - Adjust spacing in template text display ___ ### Diagram Walkthrough ```mermaid flowchart LR A["Code Files"] -->|"Apply Formatting"| B["Improved Readability"] A -->|"Fix Line Breaks"| C["Better Organization"] A -->|"Adjust Spacing"| D["Consistent Style"] ``` <details><summary><h3>File Walkthrough</h3></summary> <table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Formatting</strong></td><td><table> <tr> <td> <details> <summary><strong>runtime.exs</strong><dd><code>Format DNS topology configuration code</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> web-ng/config/runtime.exs <ul><li>Add blank line after <code>gateway_dns_query</code> assignment for improved code <br>organization<br> <li> Reformat <code>maybe_add_dns_topology</code> function call to multi-line format for <br>better readability</ul> </details> </td> <td><a href="https://github.com/carverauto/serviceradar/pull/2282/files#diff-f1093c1a9d74ba3cd35f31e2c50dec60b4fb9c241fc5ff9f62bcbcc0559691ae">+6/-1</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td> <details> <summary><strong>tenant_workload_controller.ex</strong><dd><code>Format error handling function call</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> web-ng/lib/serviceradar_web_ng_web/controllers/api/tenant_workload_controller.ex <ul><li>Reformat error return statement to multi-line format for improved <br>readability<br> <li> Break long function call across multiple lines</ul> </details> </td> <td><a href="https://github.com/carverauto/serviceradar/pull/2282/files#diff-44528f18f95c99d1b95e326e27a2496609d7fd18d4a4ee1d9574ab14ee97c75b">+5/-1</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td> <details> <summary><strong>index.ex</strong><dd><code>Adjust spacing in network status display</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> web-ng/lib/serviceradar_web_ng_web/live/settings/networks_live/index.ex <ul><li>Adjust spacing in template text from 4 spaces to 5 spaces before "of" <br>text<br> <li> Improve visual alignment in host count display</ul> </details> </td> <td><a href="https://github.com/carverauto/serviceradar/pull/2282/files#diff-b2127e71582033bc6dfd2d7397f56bf43c1f7c613defffc504b3d8ee1e7406c4">+1/-1</a>&nbsp; &nbsp; &nbsp; </td> </tr> </table></td></tr></tbody></table> </details> ___
qodo-code-review[bot] commented 2026-01-14 03:57:29 +00:00 (Migrated from github.com)
Author
Owner

Imported GitHub PR comment.

Original author: @qodo-code-review[bot]
Original URL: https://github.com/carverauto/serviceradar/pull/2282#issuecomment-3747581620
Original created: 2026-01-14T03:57:29Z

PR Compliance Guide 🔍

Below is a summary of compliance checks for this PR:

Security Compliance
Sensitive error disclosure

Description: The API error response interpolates inspect(reason) into the client-facing message, which
may expose sensitive internal details (e.g., exception structs, configuration hints, or
upstream error data) to callers and should be sanitized or logged server-side instead.
tenant_workload_controller.ex [54-58]

Referred Code
return_error(
  conn,
  :internal_server_error,
  "Failed to issue credentials: #{inspect(reason)}"
)
Ticket Compliance
🎫 No ticket provided
  • Create ticket/issue
Codebase Duplication Compliance
Codebase context is not defined

Follow the guide to enable codebase context checks.

Custom Compliance
🟢
Generic: Comprehensive Audit Trails

Objective: To create a detailed and reliable record of critical system actions for security analysis
and compliance.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Meaningful Naming and Self-Documenting Code

Objective: Ensure all identifiers clearly express their purpose and intent, making code
self-documenting

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Robust Error Handling and Edge Case Management

Objective: Ensure comprehensive error handling that provides meaningful context and graceful
degradation

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

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

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Security-First Input Validation and Data Handling

Objective: Ensure all data inputs are validated, sanitized, and handled securely to prevent
vulnerabilities

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

🔴
Generic: Secure Error Handling

Objective: To prevent the leakage of sensitive system information through error messages while
providing sufficient detail for internal debugging.

Status:
Internal details exposed: The user-facing error message interpolates inspect(reason), which can leak internal
exception/details to the client.

Referred Code
return_error(
  conn,
  :internal_server_error,
  "Failed to issue credentials: #{inspect(reason)}"
)

Learn more about managing compliance generic rules or creating your own custom rules

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/2282#issuecomment-3747581620 Original created: 2026-01-14T03:57:29Z --- ## PR Compliance Guide 🔍 <!-- https://github.com/carverauto/serviceradar/commit/1eeaf8fda065e19840d42b4e14046b22afe8bafa --> Below is a summary of compliance checks for this PR:<br> <table><tbody><tr><td colspan='2'><strong>Security Compliance</strong></td></tr> <tr><td rowspan=1>⚪</td> <td><details><summary><strong>Sensitive error disclosure </strong></summary><br> <b>Description:</b> The API error response interpolates <code>inspect(reason)</code> into the client-facing message, which <br>may expose sensitive internal details (e.g., exception structs, configuration hints, or <br>upstream error data) to callers and should be sanitized or logged server-side instead.<br> <strong><a href='https://github.com/carverauto/serviceradar/pull/2282/files#diff-44528f18f95c99d1b95e326e27a2496609d7fd18d4a4ee1d9574ab14ee97c75bR54-R58'>tenant_workload_controller.ex [54-58]</a></strong><br> <details open><summary>Referred Code</summary> ```elixir return_error( conn, :internal_server_error, "Failed to issue credentials: #{inspect(reason)}" ) ``` </details></details></td></tr> <tr><td colspan='2'><strong>Ticket Compliance</strong></td></tr> <tr><td>⚪</td><td><details><summary>🎫 <strong>No ticket provided </strong></summary> - [ ] Create ticket/issue <!-- /create_ticket --create_ticket=true --> </details></td></tr> <tr><td colspan='2'><strong>Codebase Duplication Compliance</strong></td></tr> <tr><td>⚪</td><td><details><summary><strong>Codebase context is not defined </strong></summary> Follow the <a href='https://qodo-merge-docs.qodo.ai/core-abilities/rag_context_enrichment/'>guide</a> to enable codebase context checks. </details></td></tr> <tr><td colspan='2'><strong>Custom Compliance</strong></td></tr> <tr><td rowspan=5>🟢</td><td> <details><summary><strong>Generic: Comprehensive Audit Trails</strong></summary><br> **Objective:** To create a detailed and reliable record of critical system actions for security analysis <br>and compliance.<br> **Status:** Passed<br> > Learn more about managing compliance <a href='https://qodo-merge-docs.qodo.ai/tools/compliance/#configuration-options'>generic rules</a> or creating your own <a href='https://qodo-merge-docs.qodo.ai/tools/compliance/#custom-compliance'>custom rules</a> </details></td></tr> <tr><td> <details><summary><strong>Generic: Meaningful Naming and Self-Documenting Code</strong></summary><br> **Objective:** Ensure all identifiers clearly express their purpose and intent, making code <br>self-documenting<br> **Status:** Passed<br> > Learn more about managing compliance <a href='https://qodo-merge-docs.qodo.ai/tools/compliance/#configuration-options'>generic rules</a> or creating your own <a href='https://qodo-merge-docs.qodo.ai/tools/compliance/#custom-compliance'>custom rules</a> </details></td></tr> <tr><td> <details><summary><strong>Generic: Robust Error Handling and Edge Case Management</strong></summary><br> **Objective:** Ensure comprehensive error handling that provides meaningful context and graceful <br>degradation<br> **Status:** Passed<br> > Learn more about managing compliance <a href='https://qodo-merge-docs.qodo.ai/tools/compliance/#configuration-options'>generic rules</a> or creating your own <a href='https://qodo-merge-docs.qodo.ai/tools/compliance/#custom-compliance'>custom rules</a> </details></td></tr> <tr><td> <details><summary><strong>Generic: Secure Logging Practices</strong></summary><br> **Objective:** To ensure logs are useful for debugging and auditing without exposing sensitive <br>information like PII, PHI, or cardholder data.<br> **Status:** Passed<br> > Learn more about managing compliance <a href='https://qodo-merge-docs.qodo.ai/tools/compliance/#configuration-options'>generic rules</a> or creating your own <a href='https://qodo-merge-docs.qodo.ai/tools/compliance/#custom-compliance'>custom rules</a> </details></td></tr> <tr><td> <details><summary><strong>Generic: Security-First Input Validation and Data Handling</strong></summary><br> **Objective:** Ensure all data inputs are validated, sanitized, and handled securely to prevent <br>vulnerabilities<br> **Status:** Passed<br> > Learn more about managing compliance <a href='https://qodo-merge-docs.qodo.ai/tools/compliance/#configuration-options'>generic rules</a> or creating your own <a href='https://qodo-merge-docs.qodo.ai/tools/compliance/#custom-compliance'>custom rules</a> </details></td></tr> <tr><td rowspan=1>🔴</td> <td><details> <summary><strong>Generic: Secure Error Handling</strong></summary><br> **Objective:** To prevent the leakage of sensitive system information through error messages while <br>providing sufficient detail for internal debugging.<br> **Status:** <br><a href='https://github.com/carverauto/serviceradar/pull/2282/files#diff-44528f18f95c99d1b95e326e27a2496609d7fd18d4a4ee1d9574ab14ee97c75bR54-R58'><strong>Internal details exposed</strong></a>: The user-facing error message interpolates <code>inspect(reason)</code>, which can leak internal <br>exception/details to the client.<br> <details open><summary>Referred Code</summary> ```elixir return_error( conn, :internal_server_error, "Failed to issue credentials: #{inspect(reason)}" ) ``` </details> > Learn more about managing compliance <a href='https://qodo-merge-docs.qodo.ai/tools/compliance/#configuration-options'>generic rules</a> or creating your own <a href='https://qodo-merge-docs.qodo.ai/tools/compliance/#custom-compliance'>custom rules</a> </details></td></tr> <tr><td align="center" colspan="2"> <!-- placeholder --> <!-- /compliance --update_compliance=true --> </td></tr></tbody></table> <details><summary>Compliance status legend</summary> 🟢 - Fully Compliant<br> 🟡 - Partial Compliant<br> 🔴 - Not Compliant<br> ⚪ - Requires Further Human Verification<br> 🏷️ - Compliance label<br> </details>
qodo-code-review[bot] commented 2026-01-14 03:58:17 +00:00 (Migrated from github.com)
Author
Owner

Imported GitHub PR comment.

Original author: @qodo-code-review[bot]
Original URL: https://github.com/carverauto/serviceradar/pull/2282#issuecomment-3747583052
Original created: 2026-01-14T03:58:17Z

PR Code Suggestions

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
Security
Avoid leaking internal error details

Avoid leaking internal error details to the client. Instead, log the detailed
error server-side and return a generic error message.

web-ng/lib/serviceradar_web_ng_web/controllers/api/tenant_workload_controller.ex [54-58]

+# Assuming Logger is available in the context
+Logger.error("Failed to issue credentials: #{inspect(reason)}")
+
 return_error(
   conn,
   :internal_server_error,
-  "Failed to issue credentials: #{inspect(reason)}"
+  "Failed to issue credentials"
 )
  • Apply / Chat
Suggestion importance[1-10]: 9

__

Why: The suggestion correctly identifies a security vulnerability (information disclosure) by exposing raw error details via inspect(reason) in an API response and proposes the standard best practice to fix it.

High
  • More
Imported GitHub PR comment. Original author: @qodo-code-review[bot] Original URL: https://github.com/carverauto/serviceradar/pull/2282#issuecomment-3747583052 Original created: 2026-01-14T03:58:17Z --- ## PR Code Suggestions ✨ <!-- 1eeaf8f --> Explore these optional code suggestions: <table><thead><tr><td><strong>Category</strong></td><td align=left><strong>Suggestion&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </strong></td><td align=center><strong>Impact</strong></td></tr><tbody><tr><td rowspan=1>Security</td> <td> <details><summary>Avoid leaking internal error details</summary> ___ **Avoid leaking internal error details to the client. Instead, log the detailed <br>error server-side and return a generic error message.** [web-ng/lib/serviceradar_web_ng_web/controllers/api/tenant_workload_controller.ex [54-58]](https://github.com/carverauto/serviceradar/pull/2282/files#diff-44528f18f95c99d1b95e326e27a2496609d7fd18d4a4ee1d9574ab14ee97c75bR54-R58) ```diff +# Assuming Logger is available in the context +Logger.error("Failed to issue credentials: #{inspect(reason)}") + return_error( conn, :internal_server_error, - "Failed to issue credentials: #{inspect(reason)}" + "Failed to issue credentials" ) ``` - [ ] **Apply / Chat** <!-- /improve --apply_suggestion=0 --> <details><summary>Suggestion importance[1-10]: 9</summary> __ Why: The suggestion correctly identifies a security vulnerability (information disclosure) by exposing raw error details via `inspect(reason)` in an API response and proposes the standard best practice to fix it. </details></details></td><td align=center>High </td></tr> <tr><td align="center" colspan="2"> - [ ] More <!-- /improve --more_suggestions=true --> </td><td></td></tr></tbody></table>
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
carverauto/serviceradar!2662
No description provided.