Skip to content

RDKEMW-9150:[SECVULN] - HTTPS support for firmware download-OpenSpec … - #254

Open
rosemarybennyy wants to merge 21 commits into
topic/RDKEMW-19246_meminsightfrom
develop
Open

RDKEMW-9150:[SECVULN] - HTTPS support for firmware download-OpenSpec …#254
rosemarybennyy wants to merge 21 commits into
topic/RDKEMW-19246_meminsightfrom
develop

Conversation

@rosemarybennyy

Copy link
Copy Markdown
Contributor

…Integration (#249)

  • RDKEMW-9150:[SECVULN] - HTTPS support for firmware download

  • RDKEMW-9150:[SECVULN] - HTTPS support for firmware download

  • RDKEMW-9150:[SECVULN] - HTTPS support for firmware download

  • RDKEMW-9150:[SECVULN] - HTTPS support for firmware download

  • RDKEMW-9150:[SECVULN] - HTTPS support for firmware download

  • Update project.md

  • Update project.md

  • RDKEMW-9150:[SECVULN] - HTTPS support for firmware download- Spec generation for this user story with openspec

  • RDKEMW-9150:[SECVULN] - HTTPS support for firmware download- Adding RFC feature gate

  • RDKEMW-9150:[SECVULN] - HTTPS support for firmware download- XConf URL path branching and Codebig bypass

  • RDKEMW-9150:[SECVULN] - HTTPS support for firmware download- XConf URL path branching and Codebig bypass

  • RDKEMW-9150:[SECVULN] - HTTPS support for firmware download- XConf URL path branching and Codebig bypass

  • RDKEMW-9150:[SECVULN] - HTTPS support for firmware download- XConf URL path branching and Codebig bypass - unittests fix

  • RDKEMW-9150:[SECVULN] - HTTPS support for firmware download- XConf URL path branching and Codebig bypass - update on task.md

  • RDKEMW-9150:[SECVULN] - HTTPS support for firmware download- Per-Artifact Download Orchestration

  • RDKEMW-9150:[SECVULN] - HTTPS support for firmware download- Per-Artifact Download Orchestration

  • RDKEMW-9150:[SECVULN] - HTTPS support for firmware download- Per-artifact selective retry (max 3)

  • RDKEMW-9150:[SECVULN] - HTTPS support for firmware download - upated with directCDN daigram

  • RDKEMW-9150:[SECVULN] - HTTPS support for firmware download - L1 failure fix

  • RDKEMW-9150:[SECVULN] - HTTPS support for firmware download - L1 failure fix

  • RDKEMW-9150:[SECVULN] - HTTPS support for firmware download - L1

  • RDKEMW-9150:[SECVULN] - HTTPS support for firmware download-CI build failure fix

  • RDKEMW-9150:[SECVULN] - HTTPS support for firmware download- addressing HIGH impact copilot review comments

  • RDKEMW-9150:[SECVULN] - HTTPS support for firmware download- addressing HIGH impact copilot review comments

  • Update rdkv_main.c

  • RDKEMW-9150:[SECVULN] - HTTPS support for firmware download- addressing HIGH impact copilot review comments

  • RDKEMW-9150:[SECVULN] - HTTPS support for firmware download- after addressing comments, L1 fix

  • RDKEMW-9150:[SECVULN] - HTTPS support for firmware download-OpenSpec Integration-peripheral issue

  • RDKEMW-9150:[SECVULN] - HTTPS support for firmware download-OpenSpec Integration-peripheral issue

  • RDKEMW-9150:[SECVULN] - HTTPS support for firmware download- statered Fix

  • RDKEMW-9150:[SECVULN] - HTTPS support for firmware download- statered Fix

  • RDKEMW-9150:[SECVULN] - HTTPS support for firmware download- PR cleanedup

  • Potential fix for pull request finding

  • Update rdkv_upgrade.c

  • Potential fix for pull request finding

  • Update rdkv_upgrade.c

  • Potential fix for pull request finding

  • Update rdkv_main.c

  • Update rdkv_upgrade.c

  • Potential fix for pull request finding

  • RDKEMW-9150:[SECVULN] - HTTPS support for firmware download-Legacy StateRed Fix

  • Revert "RDKEMW-9150:[SECVULN] - HTTPS support for firmware download-Legacy StateRed Fix"

This reverts commit 4357d6d.


…Integration (#249)

* RDKEMW-9150:[SECVULN] - HTTPS support for firmware download

* RDKEMW-9150:[SECVULN] - HTTPS support for firmware download

* RDKEMW-9150:[SECVULN] - HTTPS support for firmware download

* RDKEMW-9150:[SECVULN] - HTTPS support for firmware download

* RDKEMW-9150:[SECVULN] - HTTPS support for firmware download

* Update project.md

* Update project.md

* RDKEMW-9150:[SECVULN] - HTTPS support for firmware download- Spec generation for this user story with openspec

* RDKEMW-9150:[SECVULN] - HTTPS support for firmware download- Adding RFC feature gate

* RDKEMW-9150:[SECVULN] - HTTPS support for firmware download- XConf URL path branching and Codebig bypass

* RDKEMW-9150:[SECVULN] - HTTPS support for firmware download- XConf URL path branching and Codebig bypass

* RDKEMW-9150:[SECVULN] - HTTPS support for firmware download- XConf URL path branching and Codebig bypass

* RDKEMW-9150:[SECVULN] - HTTPS support for firmware download- XConf URL path branching and Codebig bypass - unittests fix

* RDKEMW-9150:[SECVULN] - HTTPS support for firmware download- XConf URL path branching and Codebig bypass - update on task.md

* RDKEMW-9150:[SECVULN] - HTTPS support for firmware download- Per-Artifact Download Orchestration

* RDKEMW-9150:[SECVULN] - HTTPS support for firmware download- Per-Artifact Download Orchestration

* RDKEMW-9150:[SECVULN] - HTTPS support for firmware download- Per-artifact selective retry (max 3)

* RDKEMW-9150:[SECVULN] - HTTPS support for firmware download - upated with directCDN daigram

* RDKEMW-9150:[SECVULN] - HTTPS support for firmware download - L1 failure fix

* RDKEMW-9150:[SECVULN] - HTTPS support for firmware download - L1 failure fix

* RDKEMW-9150:[SECVULN] - HTTPS support for firmware download - L1

* RDKEMW-9150:[SECVULN] - HTTPS support for firmware download-CI build failure fix

* RDKEMW-9150:[SECVULN] - HTTPS support for firmware download- addressing HIGH impact copilot review comments

* RDKEMW-9150:[SECVULN] - HTTPS support for firmware download- addressing HIGH impact copilot review comments

* Update rdkv_main.c

* RDKEMW-9150:[SECVULN] - HTTPS support for firmware download- addressing HIGH impact copilot review comments

* RDKEMW-9150:[SECVULN] - HTTPS support for firmware download- after addressing comments, L1 fix

* RDKEMW-9150:[SECVULN] - HTTPS support for firmware download-OpenSpec Integration-peripheral issue

* RDKEMW-9150:[SECVULN] - HTTPS support for firmware download-OpenSpec Integration-peripheral issue

* RDKEMW-9150:[SECVULN] - HTTPS support for firmware download- statered Fix

* RDKEMW-9150:[SECVULN] - HTTPS support for firmware download- statered Fix

* RDKEMW-9150:[SECVULN] - HTTPS support for firmware download- PR cleanedup

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Update rdkv_upgrade.c

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Update rdkv_upgrade.c

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Update rdkv_main.c

* Update rdkv_upgrade.c

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* RDKEMW-9150:[SECVULN] - HTTPS support for firmware download-Legacy StateRed Fix

* Revert "RDKEMW-9150:[SECVULN] - HTTPS support for firmware download-Legacy StateRed Fix"

This reverts commit 4357d6d.

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 18, 2026 06:16
@rosemarybennyy
rosemarybennyy requested a review from a team as a code owner June 18, 2026 06:16
@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds an RFC-gated “Direct CDN” firmware download path (intended to support HTTPS/CDN URLs and bypass Codebig), wires it into both the one-shot upgrader and the D-Bus daemon flows, and extends unit tests and OpenSpec documentation to cover the new behavior.

Changes:

  • Introduces isDirectCDNEnabled() (RFC parameter SWDLDirect.Enable) and uses it to branch XConf URL paths (/xconf/firmware/stb/ vs /xconf/swu/stb) and bypass Codebig access probing.
  • Extends XConf response parsing to capture per-artifact download URLs and adds a DirectCDNDownload() orchestrator + direct_cdn context flag to skip Codebig fallback.
  • Adds/updates unit tests, mocks, and build wiring to validate Direct CDN behavior and state-red retry propagation.

Reviewed changes

Copilot reviewed 106 out of 106 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
unittest/rdkFwupdateMgr_handlers_gtest.cpp Adds handler-level tests validating direct_cdn propagation in XConf fetch context.
unittest/mocks/rdkFwupdateMgr_mock.h Extends fwupdate manager mock interface with isDirectCDNEnabled().
unittest/mocks/rdkFwupdateMgr_mock.cpp Adds C-linkage stub for isDirectCDNEnabled() routed to the mock.
unittest/mocks/deviceutils_mock.h Extends DeviceUtils mock interface with isDirectCDNEnabled().
unittest/mocks/deviceutils_mock.cpp Adds isDirectCDNEnabled() stub (guarded) and getPeripheralProduct() stub for handler-only builds.
unittest/mocks/device_status_helper_mock.h Fixes C/C++ include boundary for RFC header and extends mock with isDirectCDNEnabled(); updates write_RFCProperty signature.
unittest/mocks/device_status_helper_mock.cpp Updates write_RFCProperty wrapper signature and adds isDirectCDNEnabled() wrapper.
unittest/mocks/dbus_handlers_gmock.h Extends RFC interface gmock with isDirectCDNEnabled().
unittest/mocks/dbus_handlers_gmock.cpp Adds RFC mock implementation of isDirectCDNEnabled() for D-Bus handler tests.
unittest/Makefile.am Links directcdn.c into rdkfw_main_gtest.
unittest/fwdl_interface_gtest.cpp Updates RFC parameter call counts and adds unit tests for isDirectCDNEnabled() behavior.
unittest/deviceutils/device_api_gtest.cpp Adds tests validating GetServURL() path branching under Direct CDN on/off and across bootstrap/xconf/recovery.
unittest/device_status_helper_gtest.cpp Adds tests validating Codebig probe bypass when Direct CDN is enabled.
src/rfcInterface/rfcinterface.c Reads/stores Direct CDN RFC in getRFCSettings() and implements isDirectCDNEnabled().
src/rdkv_upgrade.c Adds RDKV_UPGRADE_ERROR_STATE_RED propagation, Direct CDN skip of Codebig fallback, and Codebig entry guard in codebigdownloadFile().
src/rdkv_main.c Adds per-artifact mode to checkTriggerUpgrade(), adds Direct CDN main-flow branch, and guards against double uninitialize() on state red.
src/rdkFwupdateMgr.c Updates checkTriggerUpgrade() signature usage in daemon main flow.
src/json_process.c Adds Direct CDN conditional parsing for per-artifact URLs and adds PDRI filename substring validation.
src/include/rfcinterface.h Extends Rfc_t with rfc_directcdn, adds RFC_DIRECTCDN, and declares isDirectCDNEnabled().
src/include/rdkv_upgrade.h Adds RDKV_UPGRADE_ERROR_STATE_RED and direct_cdn to RdkUpgradeContext_t.
src/include/rdkv_cdl.h Adds DIRECT_CDN_RETRY_ERR, LEGACY_ALL_UPGRADE, updates checkTriggerUpgrade() signature, and declares DirectCDNDownload().
src/include/json_process.h Extends XCONFRES with per-artifact URL fields (firmwareUrl, pdriUrl, remCtrlUrl).
src/directcdn.c Adds DirectCDNDownload() orchestrator to perform XConf query + per-artifact downloads with selective retry.
src/deviceutils/deviceutils.h Declares getPeripheralProduct() for dynamic peripheral key resolution.
src/deviceutils/deviceutils.c Caches peripheral product name during BuildRemoteInfo() and provides getPeripheralProduct().
src/deviceutils/device_api.c Branches XConf server URL path selection based on isDirectCDNEnabled().
src/device_status_helper.c Bypasses Codebig probe when Direct CDN is enabled.
src/dbus/rdkv_dbus_server.c Uses per-artifact URLs for downloads in Direct CDN mode and sets upgrade_ctx.direct_cdn.
src/dbus/rdkFwupdateMgr_handlers.c Propagates direct_cdn into the XConf request context in handler flow.
openspec/subsystems/spec-boundaries.md Adds OpenSpec subsystem prioritization guidance.
openspec/subsystems/client-library.md Adds client library architecture documentation.
openspec/specs/test-mock-isolation/spec.md Adds a spec describing test mock isolation requirements.
openspec/specs/direct-cdn-download/spec.md Adds a spec capturing Direct CDN behavior (RFC gate, URL branching, parsing, bypass, etc.).
openspec/runtime/rdkvfwupgrader-lifecycle.md Documents the one-shot binary lifecycle and flow.
openspec/runtime/rdkFwupdateMgr-lifecycle.md Documents the daemon lifecycle and request processing model.
openspec/runtime/firmware-update-flows.md Adds end-to-end sequence diagrams for update flows.
openspec/gaps-and-unknowns.md Adds a “gaps/unknowns” tracking document for validation needs.
openspec/config.yaml Adds OpenSpec configuration scaffold.
openspec/changes/fix-state-red-dual-instance-race/tasks.md Adds task breakdown for state-red retry propagation change.
openspec/changes/fix-state-red-dual-instance-race/specs/retry-recovery/spec.md Adds/updates delta spec for skipping retries/fallback after state red entry.
openspec/changes/fix-state-red-dual-instance-race/specs/operational-safety/spec.md Adds/updates delta spec for operational safety on state red entry.
openspec/changes/fix-state-red-dual-instance-race/proposal.md Adds change proposal for state-red dual-instance race fix.
openspec/changes/fix-state-red-dual-instance-race/design.md Adds design notes/decisions for the state-red fix.
openspec/changes/archive/2026-06-04-fix-l1-dangling-mock-segfault/tasks.md Archives prior tasks for fixing L1 dangling mock segfault issue.
openspec/changes/archive/2026-06-04-fix-l1-dangling-mock-segfault/specs/test-mock-isolation/spec.md Archives prior delta spec for test mock isolation.
openspec/changes/archive/2026-06-04-fix-l1-dangling-mock-segfault/proposal.md Archives prior proposal for dangling mock segfault fix.
openspec/changes/archive/2026-06-04-fix-l1-dangling-mock-segfault/design.md Archives prior design notes for dangling mock segfault fix.
openspec/changes/archive/2026-06-04-fix-l1-dangling-mock-segfault/.openspec.yaml Archives prior OpenSpec metadata.
openspec/changes/archive/2026-06-04-direct-cdn-parity-guards/tasks.md Archives prior Direct CDN parity guard tasks.
openspec/changes/archive/2026-06-04-direct-cdn-parity-guards/specs/retry-recovery/spec.md Archives prior delta spec for Direct CDN retry parity.
openspec/changes/archive/2026-06-04-direct-cdn-parity-guards/specs/firmware-validation/spec.md Archives prior delta spec for PDRI normalization parity.
openspec/changes/archive/2026-06-04-direct-cdn-parity-guards/specs/download-engine/spec.md Archives prior delta spec for Codebig entry guard parity.
openspec/changes/archive/2026-06-04-direct-cdn-parity-guards/proposal.md Archives prior proposal for Direct CDN parity guards.
openspec/changes/archive/2026-06-04-direct-cdn-parity-guards/.openspec.yaml Archives prior OpenSpec metadata.
openspec/changes/archive/2026-06-04-direct-cdn-adoption/tasks.md Archives prior Direct CDN adoption tasks.
openspec/changes/archive/2026-06-04-direct-cdn-adoption/specs/updater-execution/spec.md Archives prior delta spec for Direct CDN integration in execution flow.
openspec/changes/archive/2026-06-04-direct-cdn-adoption/specs/retry-recovery/spec.md Archives prior delta spec for Direct CDN retry policy.
openspec/changes/archive/2026-06-04-direct-cdn-adoption/specs/firmware-validation/spec.md Archives prior delta spec for enriched parsing and PDRI validation.
openspec/changes/archive/2026-06-04-direct-cdn-adoption/specs/download-engine/spec.md Archives prior delta spec for Direct CDN download engine behavior.
openspec/changes/archive/2026-06-04-direct-cdn-adoption/specs/direct-cdn-download/spec.md Archives prior comprehensive delta spec for Direct CDN feature.
openspec/changes/archive/2026-06-04-direct-cdn-adoption/proposal.md Archives prior proposal for Direct CDN adoption.
openspec/changes/archive/2026-06-04-direct-cdn-adoption/.openspec.yaml Archives prior OpenSpec metadata.
Makefile.am Links directcdn.c into both rdkvfwupgrader and rdkFwupdateMgr binaries.
.github/skills/openspec-verify-change/SKILL.md Adds OpenSpec “verify change” workflow skill documentation.
.github/skills/openspec-sync-specs/SKILL.md Adds OpenSpec “sync specs” workflow skill documentation.
.github/skills/openspec-propose/SKILL.md Adds OpenSpec “propose change” workflow skill documentation.
.github/skills/openspec-new-change/SKILL.md Adds OpenSpec “new change” workflow skill documentation.
.github/skills/openspec-ff-change/SKILL.md Adds OpenSpec “fast-forward artifact creation” workflow skill documentation.
.github/skills/openspec-continue-change/SKILL.md Adds OpenSpec “continue change” workflow skill documentation.
.github/skills/openspec-bulk-archive-change/SKILL.md Adds OpenSpec “bulk archive changes” workflow skill documentation.
.github/skills/openspec-archive-change/SKILL.md Adds OpenSpec “archive change” workflow skill documentation.
.github/skills/openspec-apply-change/SKILL.md Adds OpenSpec “apply/implement change” workflow skill documentation.
.github/prompts/opsx-verify.prompt.md Adds OPSX verify prompt for OpenSpec workflow.
.github/prompts/opsx-sync.prompt.md Adds OPSX sync prompt for OpenSpec workflow.
.github/prompts/opsx-propose.prompt.md Adds OPSX propose prompt for OpenSpec workflow.
.github/prompts/opsx-new.prompt.md Adds OPSX new-change prompt for OpenSpec workflow.
.github/prompts/opsx-ff.prompt.md Adds OPSX fast-forward prompt for OpenSpec workflow.
.github/prompts/opsx-explore.prompt.md Adds OPSX explore-mode prompt.
.github/prompts/opsx-continue.prompt.md Adds OPSX continue prompt.
.github/prompts/opsx-bulk-archive.prompt.md Adds OPSX bulk-archive prompt.
.github/prompts/opsx-archive.prompt.md Adds OPSX archive prompt.
.github/prompts/opsx-apply.prompt.md Adds OPSX apply prompt.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +81 to +88
ret = read_RFCProperty("DIRECTCDN", RFC_DIRECTCDN, data, sizeof(data));
if(ret == -1) {
SWLOG_ERROR("getRFCSettings() rfc= %s failed Status %d\n", RFC_DIRECTCDN, ret);
}else {
strncpy(rfc_list->rfc_directcdn, data, RFC_VALUE_BUF_SIZE - 1);
rfc_list->rfc_directcdn[RFC_VALUE_BUF_SIZE - 1] = '\0';
SWLOG_INFO("getRFCSettings() rfc DirectCDN= %s\n", rfc_list->rfc_directcdn);
}
Comment thread src/rdkv_upgrade.c
Comment on lines +516 to +518
else if (ret_curl_code == RDKV_UPGRADE_ERROR_STATE_RED) {
return RDKV_UPGRADE_ERROR_STATE_RED;
}
Comment on lines +3 to +4
### Requirement: State Red entry must not perform premature cleanup
The `checkAndEnterStateRed()` function SHALL NOT call `uninitialize()` or delete the PID file (`/tmp/DIFD.pid`). It SHALL only create the state red flag file (`/tmp/stateRedEnabled`), report telemetry/status, and return an error indicator. Process cleanup MUST remain the responsibility of the normal exit path in `main()`.
Comment on lines +7 to +9
- After `checkAndEnterStateRed()` triggers state red entry, the process must NOT continue into retry/fallback logic — it must propagate the error immediately so the process exits cleanly
- `checkAndEnterStateRed()` will no longer call `uninitialize()` directly; cleanup responsibility stays with the normal exit path in `main()`
- A state-red-entered signal (return value) will be propagated from `dwnlError()` → `downloadFile()` → `rdkv_upgrade_request()` to short-circuit `retryDownload()`
mkadinti and others added 2 commits June 22, 2026 11:38
…CE_REBOOT instead of entering the Deep Sleep state. (#244)

* RDKTV-40244:[EntOS] [8.3p15s2] [A4K] TV repeatedly triggers MAINTENANCE_REBOOT instead of entering the Deep Sleep state.

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* RDKTV-40244:[EntOS] [8.3p15s2] [A4K] TV repeatedly triggers MAINTENANCE_REBOOT instead of entering the Deep Sleep state.

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 24, 2026 05:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 107 out of 107 changed files in this pull request and generated 1 comment.

Comment on lines 30 to 34
if (!g_DeviceUtilsMock)
{
cout << "v_secure_system g_DeviceUtilsMock object is NULL" << endl;
return NULL; // Return error code instead of NULL
}
satya200 and others added 4 commits June 25, 2026 12:00
Direct CDN Feature
… for non-PROD builds (#258)

* RDKEMW-20453: Support file override to install versioned RDM packages for non-PROD

Co-authored-by: Saranya <saranya_elango@comcast.com>
Copilot AI review requested due to automatic review settings June 30, 2026 12:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 108 out of 108 changed files in this pull request and generated 3 comments.

Comment on lines +237 to +245
/**
* @brief Mock implementation of isDirectCDNEnabled
*/
bool isDirectCDNEnabled(void) {
if (mock_rfc_interface) {
return mock_rfc_interface->isDirectCDNEnabled();
}
return false;
}
Comment on lines 28 to 34
extern "C" int v_secure_system(const char *mode, ...)
{
if (!g_DeviceUtilsMock)
{
cout << "v_secure_system g_DeviceUtilsMock object is NULL" << endl;
return NULL; // Return error code instead of NULL
}
Comment on lines +55 to 64
extern "C" int write_RFCProperty(char* type, const char *key, const char *value, RFCVALDATATYPE datatype)
{
if (!g_DeviceStatusMock)
{
cout << "GetEstbMac g_DeviceStatusMock object is NULL" << endl;
cout << "write_RFCProperty g_DeviceStatusMock object is NULL" << endl;
return 0;
}
printf("Inside Mock Function write_RFCProperty\n");
return g_DeviceStatusMock->write_RFCProperty(key, value, datatype);
return g_DeviceStatusMock->write_RFCProperty(type, key, value, datatype);
}
satya200 and others added 3 commits June 30, 2026 16:20
Signed-off-by: Yogeswaran K <yogeswaransky@gmail.com>
Copilot AI review requested due to automatic review settings July 3, 2026 08:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 111 out of 111 changed files in this pull request and generated 2 comments.

Comment thread src/json_process.c
Comment on lines 279 to +282
GetJsonVal( pJson, "additionalFwVerInfo", pResponse->cloudPDRIVersion, sizeof(pResponse->cloudPDRIVersion) );
GetJsonVal( pJson, "delayDownload", pResponse->cloudDelayDownload, sizeof(pResponse->cloudDelayDownload) );
GetJsonValContaining( pJson, "remCtrl", pResponse->peripheralFirmwares, sizeof(pResponse->peripheralFirmwares) );

if (isDirectCDNEnabled()) {
Comment on lines 30 to 34
if (!g_DeviceUtilsMock)
{
cout << "v_secure_system g_DeviceUtilsMock object is NULL" << endl;
return NULL; // Return error code instead of NULL
}
satya200 and others added 4 commits July 3, 2026 09:06
1.8.2 release 1.8.2
…rader continues to emit log messages after RDKLOG deinit is reported (#266)

* RDKEMW-20390:[RDK-E][Element] : When device is in state red, rdkfwupgrader continues to emit log messages after RDKLOG deinit is reported
Copilot AI review requested due to automatic review settings July 6, 2026 07:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 112 out of 112 changed files in this pull request and generated 3 comments.

Comment on lines 412 to +415
updateFWDownloadStatus(&fwdls, disableStatsUpdate);

uninitialize(INITIAL_VALIDATION_SUCCESS);
fp = fopen(STATEREDFLAG, "w");
if(fp != NULL) {
fclose(fp);
}
SWLOG_ERROR("RED checkAndEnterStateRed: State red entered due to TLS/SSL error %d. Returning error to caller.\n", curlret);
return -1;
return RDKV_UPGRADE_ERROR_STATE_RED;
Comment on lines 30 to 34
if (!g_DeviceUtilsMock)
{
cout << "v_secure_system g_DeviceUtilsMock object is NULL" << endl;
return NULL; // Return error code instead of NULL
}
Comment thread src/rdkv_upgrade.c Outdated
(server_type == HTTP_SSR_DIRECT) ? setDwnlState(RDKV_FWDNLD_DOWNLOAD_FAILED) : setDwnlState(RDKV_XCONF_FWDNLD_DOWNLOAD_FAILED);
dwnlError(curl_ret_code, *httpCode, server_type,device_info,lastrun,disableStatsUpdate);
int state_red_ret = dwnlError(curl_ret_code, *httpCode, server_type,device_info,lastrun,disableStatsUpdate);
if (state_red_ret == RDKV_UPGRADE_ERROR_STATE_RED || isInStateRed() == 1) {
Copilot AI review requested due to automatic review settings July 8, 2026 18:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 112 out of 112 changed files in this pull request and generated 3 comments.

Comment on lines 412 to +415
updateFWDownloadStatus(&fwdls, disableStatsUpdate);

uninitialize(INITIAL_VALIDATION_SUCCESS);
fp = fopen(STATEREDFLAG, "w");
if(fp != NULL) {
fclose(fp);
}
SWLOG_ERROR("RED checkAndEnterStateRed: State red entered due to TLS/SSL error %d. Returning error to caller.\n", curlret);
return -1;
return RDKV_UPGRADE_ERROR_STATE_RED;
/**
* @brief Mock implementation of isDirectCDNEnabled
*/
bool isDirectCDNEnabled(void) {
Comment on lines 28 to 34
extern "C" int v_secure_system(const char *mode, ...)
{
if (!g_DeviceUtilsMock)
{
cout << "v_secure_system g_DeviceUtilsMock object is NULL" << endl;
return NULL; // Return error code instead of NULL
}
Signed-off-by: Yogeswaran K <yogeswaransky@gmail.com>
Co-authored-by: Satya Sundar Sahu <tinkusahu.com@gmail.com>
Copilot AI review requested due to automatic review settings July 10, 2026 10:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 112 out of 112 changed files in this pull request and generated 4 comments.

Comment on lines 414 to +415
SWLOG_ERROR("RED checkAndEnterStateRed: State red entered due to TLS/SSL error %d. Returning error to caller.\n", curlret);
return -1;
return RDKV_UPGRADE_ERROR_STATE_RED;
@@ -31,8 +32,13 @@ extern "C" int v_secure_system(const char *mode, ...)
cout << "v_secure_system g_DeviceUtilsMock object is NULL" << endl;
return NULL; // Return error code instead of NULL
Comment thread src/rdkv_upgrade.c Outdated
(server_type == HTTP_SSR_DIRECT) ? setDwnlState(RDKV_FWDNLD_DOWNLOAD_FAILED) : setDwnlState(RDKV_XCONF_FWDNLD_DOWNLOAD_FAILED);
dwnlError(curl_ret_code, *httpCode, server_type,device_info,lastrun,disableStatsUpdate);
int state_red_ret = dwnlError(curl_ret_code, *httpCode, server_type,device_info,lastrun,disableStatsUpdate);
if (state_red_ret == RDKV_UPGRADE_ERROR_STATE_RED || isInStateRed() == 1) {
Comment thread src/rdkv_upgrade.c
* @return int: RDKV_UPGRADE_ERROR_STATE_RED if state red entered, 0 otherwise
* */
void dwnlError(int curl_code, int http_code, int server_type,const DeviceProperty_t *device_info,const char *lastrun,char *disableStatsUpdate)
int dwnlError(int curl_code, int http_code, int server_type,const DeviceProperty_t *device_info,const char *lastrun,char *disableStatsUpdate)
…of develop (#276)

Signed-off-by: Yogeswaran K <yogeswaransky@gmail.com>
Copilot AI review requested due to automatic review settings July 15, 2026 11:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 112 out of 112 changed files in this pull request and generated 3 comments.

Comment on lines 28 to 34
extern "C" int v_secure_system(const char *mode, ...)
{
if (!g_DeviceUtilsMock)
{
cout << "v_secure_system g_DeviceUtilsMock object is NULL" << endl;
return NULL; // Return error code instead of NULL
}
Comment thread src/rdkv_upgrade.c Outdated
(server_type == HTTP_SSR_DIRECT) ? setDwnlState(RDKV_FWDNLD_DOWNLOAD_FAILED) : setDwnlState(RDKV_XCONF_FWDNLD_DOWNLOAD_FAILED);
dwnlError(curl_ret_code, *httpCode, server_type,device_info,lastrun,disableStatsUpdate);
int state_red_ret = dwnlError(curl_ret_code, *httpCode, server_type,device_info,lastrun,disableStatsUpdate);
if (state_red_ret == RDKV_UPGRADE_ERROR_STATE_RED || isInStateRed() == 1) {
Comment on lines 412 to +415
updateFWDownloadStatus(&fwdls, disableStatsUpdate);

uninitialize(INITIAL_VALIDATION_SUCCESS);
fp = fopen(STATEREDFLAG, "w");
if(fp != NULL) {
fclose(fp);
}
SWLOG_ERROR("RED checkAndEnterStateRed: State red entered due to TLS/SSL error %d. Returning error to caller.\n", curlret);
return -1;
return RDKV_UPGRADE_ERROR_STATE_RED;
Copilot AI review requested due to automatic review settings August 3, 2026 10:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 112 out of 112 changed files in this pull request and generated no new comments.

Suppressed comments (2)

src/device_status_helper.c:415

  • checkAndEnterStateRed() no longer creates the State Red flag file (STATEREDFLAG). Since isInStateRed() is implemented as filePresentCheck(STATEREDFLAG) (see same file), this change prevents State Red from ever being entered, even though the function returns RDKV_UPGRADE_ERROR_STATE_RED.
    unittest/mocks/deviceutils_mock.cpp:34
  • In v_secure_system(), the NULL-mock path returns NULL from a function that returns int. NULL becomes 0, which looks like success and can mask missing mock setup; it also contradicts the comment saying this is an error return.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants