Skip to content

Rebase and merge #157

Open
Vismalskumar0 wants to merge 130 commits into
topic/RDK-60308from
develop
Open

Rebase and merge #157
Vismalskumar0 wants to merge 130 commits into
topic/RDK-60308from
develop

Conversation

@Vismalskumar0

Copy link
Copy Markdown
Contributor

No description provided.

Vismalskumar0 and others added 3 commits January 13, 2026 19:32
Disable the AccountID Special validation for RDKB
RDK-60308-[tr69hostif, RFC] RDK Coverity Defect Resolution for Device Management
@Vismalskumar0
Vismalskumar0 requested a review from a team as a code owner January 23, 2026 03:21
Copilot AI review requested due to automatic review settings January 23, 2026 03:21

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

Adjusts RFC/XConf processing to apply certain validation and AccountID-handling logic only when RDKB_SUPPORT is not defined.

Changes:

  • Wraps “reject empty config values” logic behind #if !defined(RDKB_SUPPORT) in processXconfResponseConfigDataPart().
  • Wraps the AccountID "Unknown" special-case handling behind #if !defined(RDKB_SUPPORT) in isConfigValueChange().

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

Comment thread rfcMgr/rfc_xconf_handler.cpp Outdated
Comment on lines +2416 to +2422
#if !defined(RDKB_SUPPORT)
if (newValue.empty())
{
RDK_LOG(RDK_LOG_INFO, LOG_RFCMGR, "[%s][%d] EMPTY value for %s is rejected\n", __FUNCTION__, __LINE__, newKey.c_str());
continue;
}
#endif

Copilot AI Jan 23, 2026

Copy link

Choose a reason for hiding this comment

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

The empty-value rejection is now compiled out for RDKB_SUPPORT, but RDKB’s set_RFCProperty() converts non-string types using std::stoi/stoul/stof/etc without any exception handling. If XConf sends an empty string for a numeric/bool parameter, this will throw and can terminate the process. Consider keeping the empty-value guard for RDKB too (at least for non-string params) or adding safe parsing/try-catch with a logged failure + skip update.

Suggested change
#if !defined(RDKB_SUPPORT)
if (newValue.empty())
{
RDK_LOG(RDK_LOG_INFO, LOG_RFCMGR, "[%s][%d] EMPTY value for %s is rejected\n", __FUNCTION__, __LINE__, newKey.c_str());
continue;
}
#endif
if (newValue.empty())
{
RDK_LOG(RDK_LOG_INFO, LOG_RFCMGR, "[%s][%d] EMPTY value for %s is rejected\n", __FUNCTION__, __LINE__, newKey.c_str());
continue;
}

Copilot uses AI. Check for mistakes.

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

rdkcteam and others added 3 commits May 20, 2026 13:55
Co-authored-by: jbasi196 <JithendraSaiKumar_Basi@comcast.com>
* Update BDD skill

* Update rfc_main.cpp

* Update rfc_main.cpp

---------

Co-authored-by: Hanasi <nhanas001c@cable.comcast.com>
Co-authored-by: jbasi196 <JithendraSaiKumar_Basi@comcast.com>
@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.

nhanasi and others added 11 commits May 29, 2026 09:32
* Update L2_Analysis_Report.md

* Update L2_Analysis_Report.md

* Create L1_Analysis_Report

* Rename L1_Analysis_Report to L1_Analysis_Report.md

* Update L1_Analysis_Report.md
RFC release for 1.2.6 tag
Co-authored-by: Hanasi <nhanas001c@cable.comcast.com>
Co-authored-by: Hanasi <nhanas001c@cable.comcast.com>
Integrate Openspec skills for RFC (#209)
Copilot AI review requested due to automatic review settings June 12, 2026 17:40

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 77 out of 77 changed files in this pull request and generated 9 comments.

Comments suppressed due to low confidence (1)

rfcMgr/xconf_handler.cpp:118

  • len is reused across identity lookups. In the RDKC model-number branch, len is only updated when getModelNumber() returns a non-empty string; if it returns empty, len retains its previous value and the code enters if (len) and overwrites _model_number with an empty tmpbuf. Reset len before the model-number retrieval so stale values can’t leak across steps.

Comment thread rfcapi/rfcapi.cpp
Comment on lines 164 to 171
@@ -231,30 +170,14 @@ static size_t writeCurlResponse(void *ptr, size_t size, size_t nmemb, string str
return realsize;
}
Comment thread rfcapi/rfcapi.cpp
Comment on lines +731 to 736
/** @brief Expose writeCurlResponse for unit testing. */
#ifdef GTEST_ENABLE
size_t (*getWriteCurlResponse(void))(void *ptr, size_t size, size_t nmemb, std::string stream) {
return &writeCurlResponse;
}
#endif
Comment thread rfcMgr/xconf_handler.cpp
Comment on lines +140 to +142
#ifdef RDKC
_partner_id = getPartnerIdFromFile();
#else
Comment on lines +74 to +76
if not content.strip():
dev_props.write("LABSIGNED_ENABLED=true\n")
return
Comment on lines +153 to +157
finally:
if device_properties_existed:
if os.path.exists(DEVICE_PROPERTIES):
with open(DEVICE_PROPERTIES, "w") as f:
f.write(original_content)
Comment thread rfcapi/docs/README.md
Comment on lines +241 to +251
## Platform Variants

### RDK-V / RDK-C
- Uses `WDMP_STATUS` return type via `wdmp-c` library
- Full set: `getRFCParameter`, `setRFCParameter`, `isRFCEnabled`, `isFileInDirectory`
- `setRFCParameter` sends HTTP POST to `http://127.0.0.1:11999`

### RDK-B (`RDKB_SUPPORT`)
- Simplified `int` return type
- `setRFCParameter` not exposed from this library (rfcMgr applies directly)
- `MAX_PARAM_LEN` applies identically
Comment thread tr181api/docs/README.md
B->>sem: sem_post
```

The semaphore name is `"localstore"` (`/sem.localstore` on Linux). It is opened with `O_CREAT` and initial count 1 each call, so no persistent initialization is required.
Comment thread rfcMgr/mtlsUtils.h
Comment on lines +1 to +5
/**
* @file mtlsUtils.h
* @brief mTLS certificate retrieval and state-red recovery utilities.
*
* If not stated otherwise in this file or this component's LICENSE file the
Comment thread LICENSE
Comment on lines +239 to +242
MIT License

Copyright (c) YEAR COPYRIGHT HOLDER

nhanasi and others added 2 commits June 15, 2026 15:13
…214)

* Update gtest_main.cpp

* Update gtest_rfcapi.cpp

* 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 16, 2026 19:33

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 79 out of 79 changed files in this pull request and generated 10 comments.

Comment thread rfcMgr/xconf_handler.cpp
Comment on lines +69 to +73
#elif defined(RDKC)
{
std::string mac = getEstbMacAddress();
if (!mac.empty()) {
strncpy(tmpbuf, mac.c_str(), sizeof(tmpbuf) - 1);
Comment thread rfcMgr/xconf_handler.cpp
Comment on lines 102 to +114
memset(tmpbuf, '\0', sizeof(tmpbuf));
#ifdef RDKC
{
std::string model = getModelNumber();
if (!model.empty()) {
strncpy(tmpbuf, model.c_str(), sizeof(tmpbuf) - 1);
tmpbuf[sizeof(tmpbuf) - 1] = '\0';
len = strlen(tmpbuf);
}
}
#else
len = GetModelNum( tmpbuf, sizeof(tmpbuf) );
#endif
Comment thread rfcMgr/xconf_handler.cpp
Comment on lines +140 to +142
#ifdef RDKC
_partner_id = getPartnerIdFromFile();
#else
Comment thread rfcapi/rfcapi.cpp
Comment on lines 165 to 170
@@ -231,30 +170,14 @@ static size_t writeCurlResponse(void *ptr, size_t size, size_t nmemb, string str
return realsize;
Comment thread rfcapi/rfcapi.cpp
Comment on lines 733 to 735
size_t (*getWriteCurlResponse(void))(void *ptr, size_t size, size_t nmemb, std::string stream) {
return &writeCurlResponse;
}
Comment on lines +153 to +157
finally:
if device_properties_existed:
if os.path.exists(DEVICE_PROPERTIES):
with open(DEVICE_PROPERTIES, "w") as f:
f.write(original_content)
Comment on lines +84 to +89
assert grep_log_file(LOG_FILE, FEATURE_NAME_VALUE), f"Expected '{FEATURE_NAME_VALUE}' in log file."
assert grep_log_file(LOG_FILE, RFC_PARAM), f"Expected '{RFC_PARAM}' in log file."
assert grep_log_file(LOG_FILE, XCONF_RESP_RECEIVED_ACTID_UNKNOWN), f"Expected '{XCONF_RESP_RECEIVED_ACTID_UNKNOWN}' in log file."
assert grep_log_file(LOG_FILE, XCONF_RESP_CMP_MSG), f"Expected '{XCONF_RESP_CMP_MSG}' in log file."
assert grep_log_file(LOG_FILE, ACTID_REPLACE_AUTHSERVICE), f"Expected '{ACTID_REPLACE_AUTHSERVICE}' in log file."
assert grep_log_file(LOG_FILE, ACTID_UPDATE), f"Expected '{ACTID_UPDATE}' in log file."
Comment thread rfcapi/docs/README.md
| `WDMP_ERR_DEFAULT_VALUE` | Value returned from defaults file |
| `WDMP_FAILURE` | Key not found in any store |

**Returns (RDKB):** `SUCCESS` (0) or `FAILURE` (-1)
Comment thread LICENSE

MIT License

Copyright (c) YEAR COPYRIGHT HOLDER
Comment thread rfcapi/docs/README.md
Comment on lines +243 to +250
### RDK-V / RDK-C
- Uses `WDMP_STATUS` return type via `wdmp-c` library
- Full set: `getRFCParameter`, `setRFCParameter`, `isRFCEnabled`, `isFileInDirectory`
- `setRFCParameter` sends HTTP POST to `http://127.0.0.1:11999`

### RDK-B (`RDKB_SUPPORT`)
- Simplified `int` return type
- `setRFCParameter` not exposed from this library (rfcMgr applies directly)
naveenkumarhanasi and others added 4 commits June 16, 2026 20:11
RFC 1.2.7 release update
* Update L2-tests.yml

* Update L2-tests.yml

* Update L2-tests.yml

* Potential fix for pull request finding

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

* Update L2-tests.yml

* Update L2-tests.yml

* Update L2-tests.yml

* Update L2-tests.yml

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 15, 2026 15:40

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 80 out of 80 changed files in this pull request and generated 9 comments.

Comments suppressed due to low confidence (1)

rfcapi/rfcapi.cpp:169

  • writeCurlResponse() takes the response buffer by value (string stream), so CURLOPT_WRITEDATA (a pointer to std::string) is never updated. This leaves response empty and can break JSON parsing in getRFCParameter()/setRFCParameter().

Comment thread rfcapi/rfcapi.cpp
Comment on lines +731 to 736
/** @brief Expose writeCurlResponse for unit testing. */
#ifdef GTEST_ENABLE
size_t (*getWriteCurlResponse(void))(void *ptr, size_t size, size_t nmemb, std::string stream) {
return &writeCurlResponse;
}
#endif
Comment on lines +153 to +157
finally:
if device_properties_existed:
if os.path.exists(DEVICE_PROPERTIES):
with open(DEVICE_PROPERTIES, "w") as f:
f.write(original_content)
Comment thread getRFC.sh
Comment on lines 32 to +33
. /etc/include.properties

if [ "$BUILD_TYPE" != "prod" ] && [ -f /opt/rfc.properties ]; then
. /opt/rfc.properties
else
. /etc/rfc.properties
fi
. /etc/rfc.properties
Comment thread rfcapi/rfcapi.h
Comment on lines +75 to +80
/**
* @brief Retrieve an RFC parameter value (RDKB / RDKC — int return path).
* @param[in] pcParameterName TR181 parameter name.
* @param[out] pstParamData Filled with the retrieved name/value/type.
* @return SUCCESS (0) or FAILURE (1).
*/
Comment thread rfcapi/docs/README.md
| `WDMP_ERR_DEFAULT_VALUE` | Value returned from defaults file |
| `WDMP_FAILURE` | Key not found in any store |

**Returns (RDKB):** `SUCCESS` (0) or `FAILURE` (-1)
Comment thread rfcapi/docs/README.md
Comment on lines +243 to +251
### RDK-V / RDK-C
- Uses `WDMP_STATUS` return type via `wdmp-c` library
- Full set: `getRFCParameter`, `setRFCParameter`, `isRFCEnabled`, `isFileInDirectory`
- `setRFCParameter` sends HTTP POST to `http://127.0.0.1:11999`

### RDK-B (`RDKB_SUPPORT`)
- Simplified `int` return type
- `setRFCParameter` not exposed from this library (rfcMgr applies directly)
- `MAX_PARAM_LEN` applies identically
Comment thread rfcMgr/mtlsUtils.h
Comment on lines +1 to +4
/**
* @file mtlsUtils.h
* @brief mTLS certificate retrieval and state-red recovery utilities.
*
Comment thread LICENSE
Comment on lines +239 to +242
MIT License

Copyright (c) YEAR COPYRIGHT HOLDER

Comment on lines 54 to 61
TEST(rfcapiTest, writeCurlResponse) {
const char* input = "MockCurlData";
size_t size = 1;
size_t nmemb = strlen(input);
std::string response;
size_t written = getWriteCurlResponse()((void*)input, size, nmemb, response);
EXPECT_EQ(written, nmemb);
}
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.

10 participants