Conversation
Removed the get_system_uptime function declaration and its documentation.
Initial implementation of codebig utility functions for signing and URL handling.
| name: Execute L1 test suite in test container environment | ||
| runs-on: ubuntu-latest | ||
| container: | ||
| image: ghcr.io/rdkcentral/docker-rdk-ci:latest | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v3 | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Log in to GitHub Container Registry | ||
| uses: docker/login-action@v2 | ||
| with: | ||
| registry: ghcr.io | ||
| username: ${{ github.actor }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Pull test container image | ||
| run: docker pull ghcr.io/rdkcentral/docker-device-mgt-service-test/native-platform:latest | ||
|
|
||
| - name: Start test container | ||
| run: | | ||
| docker run -d --name native-platform -v ${{ github.workspace }}:/mnt/L1_CONTAINER_SHARED_VOLUME ghcr.io/rdkcentral/docker-device-mgt-service-test/native-platform:latest | ||
|
|
||
| - name: Run unit tests | ||
| run: sh unit_test.sh | ||
| - name: Run L1 Unit Tests inside container | ||
| run: docker exec -i native-platform /bin/bash -c "cd /mnt/L1_CONTAINER_SHARED_VOLUME/ && sh unit_test.sh" | ||
|
|
||
| - name: Upload test results to automatic test result management system | ||
| - name: Copy L1 test results to runner | ||
| run: | | ||
| docker cp native-platform:/tmp/Gtest_Report /tmp/Gtest_Report | ||
| ls -l /tmp/Gtest_Report | ||
|
|
||
| upload-test-results: |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 2 months ago
To fix the problem, explicitly add a permissions block to the workflow, restricting the permissions of the GITHUB_TOKEN to the minimum required to complete the workflow tasks. In this context, setting contents: read at the workflow root is appropriate and restricts repository access to read-only for all jobs (unless overridden per-job). This change should be made near the top of the YAML, right after the workflow name, but before on so that it applies globally. No code outside this YAML file needs to be modified, no imports are required, and no existing functionality changes.
| @@ -1,4 +1,6 @@ | ||
| name: L1 Unit Tests | ||
| permissions: | ||
| contents: read | ||
|
|
||
| on: | ||
| push: |
uploadutils/uploadUtil.c
Outdated
| curl_off_t filesize = ftell(fp); | ||
| fseek(fp, 0, SEEK_SET); | ||
|
|
||
| curl_easy_setopt(curl, CURLOPT_PUT, 1L); |
There was a problem hiding this comment.
Coverity issue no longer present as of: undefined
Show issue
Coverity Issue - Unchecked return value from library
Calling "curl_easy_setopt(curl, _curl_opt, 1L)" without checking return value. This library function may fail and return an error code.
Medium Impact, CWE-252
CHECKED_RETURN
uploadutils/uploadUtil.c
Outdated
| fseek(fp, 0, SEEK_SET); | ||
|
|
||
| curl_easy_setopt(curl, CURLOPT_PUT, 1L); | ||
| curl_easy_setopt(curl, CURLOPT_READDATA, fp); |
There was a problem hiding this comment.
Coverity issue no longer present as of: undefined
Show issue
Coverity Issue - Unchecked return value from library
Calling "curl_easy_setopt(curl, _curl_opt, fp)" without checking return value. This library function may fail and return an error code.
Medium Impact, CWE-252
CHECKED_RETURN
uploadutils/uploadUtil.c
Outdated
|
|
||
| curl_easy_setopt(curl, CURLOPT_PUT, 1L); | ||
| curl_easy_setopt(curl, CURLOPT_READDATA, fp); | ||
| curl_easy_setopt(curl, CURLOPT_INFILESIZE_LARGE, filesize); |
There was a problem hiding this comment.
Coverity issue no longer present as of: undefined
Show issue
Coverity Issue - Unchecked return value from library
Calling "curl_easy_setopt(curl, _curl_opt, filesize)" without checking return value. This library function may fail and return an error code.
Medium Impact, CWE-252
CHECKED_RETURN
uploadutils/uploadUtil.c
Outdated
| curl_easy_setopt(curl, CURLOPT_PUT, 1L); | ||
| curl_easy_setopt(curl, CURLOPT_READDATA, fp); | ||
| curl_easy_setopt(curl, CURLOPT_INFILESIZE_LARGE, filesize); | ||
| curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); |
There was a problem hiding this comment.
Coverity issue no longer present as of: undefined
Show issue
Coverity Issue - Unchecked return value from library
Calling "curl_easy_setopt(curl, _curl_opt, 1L)" without checking return value. This library function may fail and return an error code.
Medium Impact, CWE-252
CHECKED_RETURN
uploadutils/uploadUtil.c
Outdated
| snprintf(postfields, sizeof(postfields), "filename=%s", | ||
| pfile_upload->pathname); | ||
| } | ||
| curl_easy_setopt(curl, CURLOPT_POSTFIELDS, postfields); |
There was a problem hiding this comment.
Coverity issue no longer present as of: undefined
Show issue
Coverity Issue - Unchecked return value from library
Calling "curl_easy_setopt(curl, _curl_opt, postfields)" without checking return value. This library function may fail and return an error code.
Medium Impact, CWE-252
CHECKED_RETURN
uploadutils/uploadUtil.c
Outdated
| if (headers) curl_slist_free_all(headers); | ||
| return (int)UPLOAD_FAIL; | ||
| } | ||
| curl_easy_setopt(curl, CURLOPT_WRITEDATA, resp_fp); |
There was a problem hiding this comment.
Coverity issue no longer present as of: undefined
Show issue
Coverity Issue - Unchecked return value from library
Calling "curl_easy_setopt(curl, _curl_opt, resp_fp)" without checking return value. This library function may fail and return an error code.
Medium Impact, CWE-252
CHECKED_RETURN
uploadutils/uploadUtil.c
Outdated
| return (int)UPLOAD_FAIL; | ||
| } | ||
| curl_easy_setopt(curl, CURLOPT_WRITEDATA, resp_fp); | ||
| curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); |
There was a problem hiding this comment.
Coverity issue no longer present as of: undefined
Show issue
Coverity Issue - Unchecked return value from library
Calling "curl_easy_setopt(curl, _curl_opt, 1L)" without checking return value. This library function may fail and return an error code.
Medium Impact, CWE-252
CHECKED_RETURN
Removed the old comment block and updated to a new format.
Updated copyright notice format in codebigUtils.c
Removed unnecessary comments from the file.
|
Please add a credit for RDK Management (below) to the end of NOTICE at top level, or replace the RDK header with a Comcast one if this is indeed Comcast code. |
Removed unnecessary comment block from the test file.
No description provided.