Skip to content

Feature/copilot twostage#66

Open
Abhinavpv28 wants to merge 50 commits intodevelopfrom
feature/copilot_twostage
Open

Feature/copilot twostage#66
Abhinavpv28 wants to merge 50 commits intodevelopfrom
feature/copilot_twostage

Conversation

@Abhinavpv28
Copy link
Contributor

No description provided.

@Abhinavpv28 Abhinavpv28 requested a review from a team as a code owner December 8, 2025 06:45
Comment on lines +13 to +42
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

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

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.


Suggested changeset 1
.github/workflows/L1-Test.yaml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/L1-Test.yaml b/.github/workflows/L1-Test.yaml
--- a/.github/workflows/L1-Test.yaml
+++ b/.github/workflows/L1-Test.yaml
@@ -1,4 +1,6 @@
 name: L1 Unit Tests
+permissions:
+  contents: read
 
 on:
   push:
EOF
@@ -1,4 +1,6 @@
name: L1 Unit Tests
permissions:
contents: read

on:
push:
Copilot is powered by AI and may make mistakes. Always verify output.
@rdkcmf-jenkins
Copy link
Contributor

b'## Blackduck scan failure details

Summary: 0 violations, 0 files pending approval, 4 files pending identification.

  • Protex Server Path: /home/blackduck/github/common_utilities/66/rdkcentral/common_utilities

  • Commit: d320f1d

Report detail: gist'

curl_off_t filesize = ftell(fp);
fseek(fp, 0, SEEK_SET);

curl_easy_setopt(curl, CURLOPT_PUT, 1L);
Copy link
Contributor

@rdkcmf-jenkins rdkcmf-jenkins Dec 8, 2025

Choose a reason for hiding this comment

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

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

fseek(fp, 0, SEEK_SET);

curl_easy_setopt(curl, CURLOPT_PUT, 1L);
curl_easy_setopt(curl, CURLOPT_READDATA, fp);
Copy link
Contributor

@rdkcmf-jenkins rdkcmf-jenkins Dec 8, 2025

Choose a reason for hiding this comment

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

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


curl_easy_setopt(curl, CURLOPT_PUT, 1L);
curl_easy_setopt(curl, CURLOPT_READDATA, fp);
curl_easy_setopt(curl, CURLOPT_INFILESIZE_LARGE, filesize);
Copy link
Contributor

@rdkcmf-jenkins rdkcmf-jenkins Dec 8, 2025

Choose a reason for hiding this comment

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

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

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);
Copy link
Contributor

@rdkcmf-jenkins rdkcmf-jenkins Dec 8, 2025

Choose a reason for hiding this comment

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

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

snprintf(postfields, sizeof(postfields), "filename=%s",
pfile_upload->pathname);
}
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, postfields);
Copy link
Contributor

@rdkcmf-jenkins rdkcmf-jenkins Dec 8, 2025

Choose a reason for hiding this comment

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

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

if (headers) curl_slist_free_all(headers);
return (int)UPLOAD_FAIL;
}
curl_easy_setopt(curl, CURLOPT_WRITEDATA, resp_fp);
Copy link
Contributor

@rdkcmf-jenkins rdkcmf-jenkins Dec 8, 2025

Choose a reason for hiding this comment

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

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

return (int)UPLOAD_FAIL;
}
curl_easy_setopt(curl, CURLOPT_WRITEDATA, resp_fp);
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
Copy link
Contributor

@rdkcmf-jenkins rdkcmf-jenkins Dec 8, 2025

Choose a reason for hiding this comment

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

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

@rdkcmf-jenkins
Copy link
Contributor

b'## Blackduck scan failure details

Summary: 0 violations, 0 files pending approval, 4 files pending identification.

  • Protex Server Path: /home/blackduck/github/common_utilities/66/rdkcentral/common_utilities

  • Commit: 0dbf467

Report detail: gist'

@rdkcmf-jenkins
Copy link
Contributor

b'## Blackduck scan failure details

Summary: 0 violations, 0 files pending approval, 4 files pending identification.

  • Protex Server Path: /home/blackduck/github/common_utilities/66/rdkcentral/common_utilities

  • Commit: 2c754a9

Report detail: gist'

@rdkcmf-jenkins
Copy link
Contributor

b'## Blackduck scan failure details

Summary: 0 violations, 0 files pending approval, 6 files pending identification.

  • Protex Server Path: /home/blackduck/github/common_utilities/66/rdkcentral/common_utilities

  • Commit: eb571b8

Report detail: gist'

@rdkcmf-jenkins
Copy link
Contributor

b'## Blackduck scan failure details

Summary: 0 violations, 0 files pending approval, 6 files pending identification.

  • Protex Server Path: /home/blackduck/github/common_utilities/66/rdkcentral/common_utilities

  • Commit: 8a050c1

Report detail: gist'

@rdkcmf-jenkins
Copy link
Contributor

b'## Blackduck scan failure details

Summary: 0 violations, 0 files pending approval, 6 files pending identification.

  • Protex Server Path: /home/blackduck/github/common_utilities/66/rdkcentral/common_utilities

  • Commit: 8a050c1

Report detail: gist'

@rdkcmf-jenkins
Copy link
Contributor

b'## Blackduck scan failure details

Summary: 0 violations, 0 files pending approval, 6 files pending identification.

  • Protex Server Path: /home/blackduck/github/common_utilities/66/rdkcentral/common_utilities

  • Commit: 8a050c1

Report detail: gist'

@rdkcmf-jenkins
Copy link
Contributor

b'## Blackduck scan failure details

Summary: 0 violations, 0 files pending approval, 6 files pending identification.

  • Protex Server Path: /home/blackduck/github/common_utilities/66/rdkcentral/common_utilities

  • Commit: 8a050c1

Report detail: gist'

@rdkcmf-jenkins
Copy link
Contributor

b'## Blackduck scan failure details

Summary: 0 violations, 0 files pending approval, 6 files pending identification.

  • Protex Server Path: /home/blackduck/github/common_utilities/66/rdkcentral/common_utilities

  • Commit: 98e22d8

Report detail: gist'

@rdkcmf-jenkins
Copy link
Contributor

b'## Blackduck scan failure details

Summary: 0 violations, 0 files pending approval, 6 files pending identification.

  • Protex Server Path: /home/blackduck/github/common_utilities/66/rdkcentral/common_utilities

  • Commit: b818a4d

Report detail: gist'

@rdkcmf-jenkins
Copy link
Contributor

b'## Blackduck scan failure details

Summary: 0 violations, 0 files pending approval, 6 files pending identification.

  • Protex Server Path: /home/blackduck/github/common_utilities/66/rdkcentral/common_utilities

  • Commit: b818a4d

Report detail: gist'

@rdkcmf-jenkins
Copy link
Contributor

b'## Blackduck scan failure details

Summary: 0 violations, 0 files pending approval, 6 files pending identification.

  • Protex Server Path: /home/blackduck/github/common_utilities/66/rdkcentral/common_utilities

  • Commit: 6a4c14b

Report detail: gist'

@rdkcmf-jenkins
Copy link
Contributor

b'## Blackduck scan failure details

Summary: 0 violations, 0 files pending approval, 6 files pending identification.

  • Protex Server Path: /home/blackduck/github/common_utilities/66/rdkcentral/common_utilities

  • Commit: 6a4c14b

Report detail: gist'

@mhughesacn
Copy link

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.

Copyright 2025 RDK Management
Licensed under the Apache License, Version 2.0

@Abhinavpv28 Abhinavpv28 closed this Dec 8, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Dec 8, 2025
@Abhinavpv28 Abhinavpv28 reopened this Dec 8, 2025
Removed unnecessary comment block from the test file.
@rdkcmf-jenkins
Copy link
Contributor

b'## Blackduck scan failure details

Summary: 0 violations, 0 files pending approval, 6 files pending identification.

  • Protex Server Path: /home/blackduck/github/common_utilities/66/rdkcentral/common_utilities

  • Commit: 113b3a1

Report detail: gist'

@rdkcmf-jenkins
Copy link
Contributor

b'## Blackduck scan failure details

Summary: 0 violations, 0 files pending approval, 6 files pending identification.

  • Protex Server Path: /home/blackduck/github/common_utilities/66/rdkcentral/common_utilities

  • Commit: 113b3a1

Report detail: gist'

@rdkcmf-jenkins
Copy link
Contributor

b'## Blackduck scan failure details

Summary: 0 violations, 0 files pending approval, 6 files pending identification.

  • Protex Server Path: /home/blackduck/github/common_utilities/66/rdkcentral/common_utilities

  • Commit: 028edf9

Report detail: gist'

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants