Skip to content

Conversation

SoucheSouche
Copy link
Collaborator

@SoucheSouche SoucheSouche commented Jul 25, 2025

Checklist

  • Component contains License
  • Component contains README.md
  • Component contains idf_component.yml file with url field defined
  • Component was added to upload job
  • Component was added to build job
  • Optional: Component contains unit tests
  • CI passing

Change description

Please describe your change here

@SoucheSouche SoucheSouche marked this pull request as draft July 25, 2025 14:10
@github-actions github-actions bot changed the title feat(esp_commands): add esp_commands code feat(esp_commands): add esp_commands code (IEC-338) Jul 25, 2025
@SoucheSouche SoucheSouche force-pushed the feat/add-command-manager-component branch 3 times, most recently from 5154826 to a58eaa6 Compare July 31, 2025 08:42
@SoucheSouche SoucheSouche force-pushed the feat/add-command-manager-component branch from a58eaa6 to 7aaddae Compare August 4, 2025 12:44
@SoucheSouche SoucheSouche force-pushed the feat/add-command-manager-component branch from 7aaddae to 626c620 Compare August 5, 2025 07:43
@SoucheSouche SoucheSouche force-pushed the feat/add-command-manager-component branch 5 times, most recently from 916dbc7 to 7bb19c4 Compare August 5, 2025 11:46
@SoucheSouche SoucheSouche changed the title feat(esp_commands): add esp_commands code (IEC-338) feat(esp_commands): add esp_commands component (IEC-338) Aug 7, 2025
@SoucheSouche SoucheSouche force-pushed the feat/add-command-manager-component branch from 7bb19c4 to cf00766 Compare August 7, 2025 11:51
@SoucheSouche SoucheSouche force-pushed the feat/add-command-manager-component branch 2 times, most recently from 7f8ef19 to 1469d38 Compare August 7, 2025 13:06
@SoucheSouche SoucheSouche force-pushed the feat/add-command-manager-component branch from 1469d38 to 19173a7 Compare August 7, 2025 13:50
@SoucheSouche SoucheSouche force-pushed the feat/add-command-manager-component branch from df4b49a to aa5a2ca Compare August 12, 2025 10:20
@SoucheSouche SoucheSouche force-pushed the feat/add-command-manager-component branch from aa5a2ca to 253c3a7 Compare August 12, 2025 10:34
@SoucheSouche SoucheSouche force-pushed the feat/add-command-manager-component branch from 253c3a7 to a70f444 Compare August 14, 2025 08:40
@SoucheSouche SoucheSouche force-pushed the feat/add-command-manager-component branch from a70f444 to 20b701d Compare August 14, 2025 09:08
@SoucheSouche SoucheSouche force-pushed the feat/add-command-manager-component branch from 20b701d to 9873ad4 Compare August 14, 2025 09:45
@SoucheSouche SoucheSouche force-pushed the feat/add-command-manager-component branch 5 times, most recently from 92b1065 to c1b8f4a Compare August 15, 2025 07:58
@SoucheSouche SoucheSouche marked this pull request as ready for review August 20, 2025 06:05
@SoucheSouche SoucheSouche force-pushed the feat/add-command-manager-component branch 2 times, most recently from 41b027d to db1c4ce Compare September 15, 2025 06:28
return ESP_ERR_INVALID_ARG;
}

memcpy(&s_config, config, sizeof(s_config));

Check warning

Code scanning / clang-tidy

Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] Warning

Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
*/
FDPRINTF(fd_out, "%-s", it->name);
if (it->hint_cb) {
FDPRINTF(fd_out, " %s\n", it->hint_cb(it->func_ctx));

Check warning

Code scanning / clang-tidy

Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] Warning

Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
if (it->hint_cb) {
FDPRINTF(fd_out, " %s\n", it->hint_cb(it->func_ctx));
} else {
FDPRINTF(fd_out, "\n");

Check warning

Code scanning / clang-tidy

Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] Warning

Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
* help cmd_name -v 0 */
if (argc <= 0 || argc > 4) {
/* unknown issue, return error */
FDPRINTF(fd_out, "help: invalid number of arguments %d\n", argc);

Check warning

Code scanning / clang-tidy

Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] Warning

Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
/* check if the following argument is either 0, or 1 */
if (i + 1 >= argc) {
/* format error, return with error */
FDPRINTF(fd_out, "help: arguments not provided in the right format\n");

Check warning

Code scanning / clang-tidy

Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] Warning

Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
verbose_level = 1;
} else {
/* wrong command format, return error */
FDPRINTF(fd_out, "help: invalid verbose level %s\n", argv[i + 1]);

Check warning

Code scanning / clang-tidy

Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] Warning

Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
go_through_commands(cmd_sets, &ctx, call_command_funcs);

if (command_name && !ctx.command_found) {
FDPRINTF(fd_out, "help: invalid command name %s\n", command_name);

Check warning

Code scanning / clang-tidy

Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] Warning

Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
@SoucheSouche SoucheSouche force-pushed the feat/add-command-manager-component branch 4 times, most recently from d8ce859 to 448dec2 Compare October 2, 2025 12:04
/* First line: command name and hint
* Pad all the hints to the same column
*/
FDPRINTF(fd_out, "%-s", it->name);

Check warning

Code scanning / clang-tidy

Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] Warning

Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
/* TODO: replace the simple print with a function that
* replaces arg_print_formatted */
if (it->help) {
FDPRINTF(fd_out, " %s\n", it->help);

Check warning

Code scanning / clang-tidy

Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] Warning

Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
if (it->help) {
FDPRINTF(fd_out, " %s\n", it->help);
} else {
FDPRINTF(fd_out, " -\n");

Check warning

Code scanning / clang-tidy

Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] Warning

Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]

static void print_arg_command(const int fd_out, esp_command_t *it)
{
FDPRINTF(fd_out, "%-s", it->name);

Check warning

Code scanning / clang-tidy

Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] Warning

Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
@SoucheSouche SoucheSouche force-pushed the feat/add-command-manager-component branch from 448dec2 to 5f20bcc Compare October 2, 2025 12:12
if (it->hint_cb) {
const char *hint = it->hint_cb(it->func_ctx);
if (hint) {
FDPRINTF(fd_out, " %s", it->hint_cb(it->func_ctx));

Check warning

Code scanning / clang-tidy

Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] Warning

Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
}
}

FDPRINTF(fd_out, "\n");

Check warning

Code scanning / clang-tidy

Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling] Warning

Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants