-
Notifications
You must be signed in to change notification settings - Fork 25
RDK-59367: Sync up xdialserver changes from RDKE #170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 25Q3_sprint
Are you sure you want to change the base?
Changes from all commits
65a7559
f710c87
8efac8e
fda6ec5
d16879c
33ed34b
55650a2
f6c6d7d
42da7af
84b8951
36f386d
9257820
a503f9e
974beb6
4a4ea54
a52d864
8e05add
8a97f28
81f4b89
024882a
6750eba
82a6e05
83a1518
a1da8a4
33b4866
c66ef14
8cb0f37
7302ede
25a6735
3202ca6
206d137
c48dff7
3da15c8
29f6789
48461dc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| # These owners will be the default owners for everything in | ||
| # the repo. Unless a later match takes precedence, | ||
| # @global-owner1 and @global-owner2 will be requested for | ||
| # review when someone opens a pull request. | ||
| * @rdkcentral/xdialserver-maintainers |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| name: Build Component in Native Environment | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ main, 'sprint/**', 'release/**', topic/*, develop ] | ||
| pull_request: | ||
| branches: [ main, 'sprint/**', 'release/**', topic/*, develop ] | ||
|
|
||
| jobs: | ||
| build-entservices-on-pr: | ||
| name: Build xdialserver component in github rdkcentral | ||
| runs-on: ubuntu-latest | ||
| container: | ||
| image: ubuntu:22.04 | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v3 | ||
|
|
||
| - name: native build | ||
| run: | | ||
| sh -x build_dependencies.sh | ||
| sh -x cov_build.sh | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.RDKCM_RDKE }} | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,130 @@ | ||||||||||||||
| #!/bin/bash | ||||||||||||||
| set -x | ||||||||||||||
| set -e | ||||||||||||||
| ############################## | ||||||||||||||
| GITHUB_WORKSPACE="${PWD}" | ||||||||||||||
|
|
||||||||||||||
| cd ${GITHUB_WORKSPACE} | ||||||||||||||
|
|
||||||||||||||
| # # ############################# | ||||||||||||||
| #1. Install Dependencies and packages | ||||||||||||||
|
|
||||||||||||||
| apt update | ||||||||||||||
| apt install -y git python3 python3-pip cmake ninja-build meson curl libsoup2.4-dev libxml2-dev libglib2.0-dev gobject-introspection libgirepository1.0-dev libgtk-3-dev libcurl4-openssl-dev libcunit1-dev valac pandoc | ||||||||||||||
| pip install jsonref | ||||||||||||||
|
|
||||||||||||||
| ############################ | ||||||||||||||
| # Build trevor-base64 | ||||||||||||||
| if [ ! -d "trower-base64" ]; then | ||||||||||||||
| git clone https://github.com/xmidt-org/trower-base64.git | ||||||||||||||
| fi | ||||||||||||||
| cd trower-base64 | ||||||||||||||
| meson setup --warnlevel 3 --werror build | ||||||||||||||
| ninja -C build | ||||||||||||||
| ninja -C build install | ||||||||||||||
| cd .. | ||||||||||||||
| ########################################### | ||||||||||||||
| # Clone the required repositories | ||||||||||||||
|
|
||||||||||||||
| rm -rf iarmbus ThunderTools Thunder entservices-apis entservices-testframework gssdp | ||||||||||||||
|
|
||||||||||||||
|
|
||||||||||||||
| git clone https://github.com/rdkcentral/iarmbus.git | ||||||||||||||
| export IARMBUS_PATH=$GITHUB_WORKSPACE/iarmbus | ||||||||||||||
|
|
||||||||||||||
| git clone --branch R4.4.3 https://github.com/rdkcentral/ThunderTools.git | ||||||||||||||
|
|
||||||||||||||
| git clone --branch R4.4.1 https://github.com/rdkcentral/Thunder.git | ||||||||||||||
|
|
||||||||||||||
| git clone --branch main https://github.com/rdkcentral/entservices-apis.git | ||||||||||||||
|
|
||||||||||||||
| git clone https://$GITHUB_TOKEN@github.com/rdkcentral/entservices-testframework.git | ||||||||||||||
|
||||||||||||||
| git clone https://$GITHUB_TOKEN@github.com/rdkcentral/entservices-testframework.git | |
| if [ -z "${GITHUB_TOKEN:-}" ]; then | |
| echo "Error: GITHUB_TOKEN environment variable is not set. Cannot clone entservices-testframework." >&2 | |
| exit 1 | |
| fi | |
| git clone https://${GITHUB_TOKEN}@github.com/rdkcentral/entservices-testframework.git |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| #!/bin/bash | ||
| set -x | ||
| set -e | ||
| ############################## | ||
| GITHUB_WORKSPACE="${PWD}" | ||
| ls -la ${GITHUB_WORKSPACE} | ||
| ############################ | ||
| # Build xdialserver | ||
| echo "buliding xdialserver" | ||
|
|
||
| cd ${GITHUB_WORKSPACE} | ||
|
|
||
| make | ||
|
|
||
| echo "======================================================================================" | ||
| exit 0 |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Copilot Autofix
AI 16 days ago
In general, the problem is fixed by explicitly setting the least-privilege
permissionsfor the GITHUB_TOKEN, either at the workflow root (applies to all jobs) or per job (applies only to that job). For a simple build job that only checks out code and runs shell scripts,contents: readis usually sufficient.The best fix here, without changing existing functionality, is to add a minimal
permissionsblock to thebuild-entservices-on-prjob. This ensures the GITHUB_TOKEN (if used implicitly by any actions in the job) has only read access to repo contents. Since the job uses onlyactions/checkout@v3and shell commands,contents: readis enough and will not break existing behavior. Concretely, in.github/workflows/native_full_build.yml, underjobs: build-entservices-on-pr:, add:indented to align with
runs-onandcontainer. No additional imports or definitions are required, and no other files need to be changed.