-
Notifications
You must be signed in to change notification settings - Fork 9
RDKB-62985 RDKB-62986: Native build for Coverity #39
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
Changes from 6 commits
111e0f9
ade908b
cde2cec
3e3633a
e576e65
919e89e
beae32e
76dfd24
78d72b0
a48ab3e
155de65
056451a
c2a5b41
2615d01
2bcf44c
bc067ea
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,27 @@ | |||||||||||||||||||||||||||||||||||
| name: Build Advanced Security Component in Native Environment | |||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||
| on: | |||||||||||||||||||||||||||||||||||
| push: | |||||||||||||||||||||||||||||||||||
| branches: [ main, 'sprint/**', 'release/**', develop ] | |||||||||||||||||||||||||||||||||||
| pull_request: | |||||||||||||||||||||||||||||||||||
| branches: [ main, 'sprint/**', 'release/**', topic/RDK*, develop ] | |||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||
| jobs: | |||||||||||||||||||||||||||||||||||
| build-advanced-security-on-pr: | |||||||||||||||||||||||||||||||||||
| name: Build advanced-security component in github rdkcentral | |||||||||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | |||||||||||||||||||||||||||||||||||
| container: | |||||||||||||||||||||||||||||||||||
| image: ghcr.io/rdkcentral/docker-rdk-ci:latest | |||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||
| steps: | |||||||||||||||||||||||||||||||||||
| - name: Checkout code | |||||||||||||||||||||||||||||||||||
| uses: actions/checkout@v3 | |||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||
| uses: actions/checkout@v3 | |
| uses: actions/checkout@v4 |
Copilot
AI
Feb 11, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actions/checkout@v3 is outdated and misses fixes/features added in newer major versions. Bump to the current supported major version (and consider pinning to a commit SHA for supply-chain hardening).
| uses: actions/checkout@v3 | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 12 days ago
To fix the problem, explicitly define minimal GITHUB_TOKEN permissions for this workflow or job, instead of relying on inherited repository/organization defaults. Since this workflow only checks out the repository and runs build scripts, it likely only needs read access to repository contents.
The best minimal fix without changing existing functionality is to add a permissions block at the job level for build-advanced-security-on-pr, specifying contents: read. This constrains the default GITHUB_TOKEN to read-only for repository contents, while leaving the custom GITHUB_TOKEN environment variable (secrets.RDKCM_RDKE) unchanged. Concretely, in .github/workflows/native-build.yml, under jobs:, inside the build-advanced-security-on-pr: job and at the same indentation level as runs-on, add:
permissions:
contents: readNo new methods, imports, or additional definitions are needed; this is a pure YAML configuration change.
-
Copy modified lines R13-R14
| @@ -10,6 +10,8 @@ | ||
| build-advanced-security-on-pr: | ||
| name: Build advanced-security component in github rdkcentral | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| container: | ||
| image: ghcr.io/rdkcentral/docker-rdk-ci:latest | ||
|
|
Copilot
AI
Feb 9, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overriding GITHUB_TOKEN with a separate secret increases the risk of accidental token exposure (e.g., script logging) and can also break PR builds from forks where secrets aren’t available. Prefer the built-in GitHub token (${{ github.token }} / ${{ secrets.GITHUB_TOKEN }}) or pass a separate token under a different env var name with the minimum required permissions.
| GITHUB_TOKEN: ${{ secrets.RDKCM_RDKE }} | |
| GITHUB_TOKEN: ${{ github.token }} | |
| RDKCM_RDKE_TOKEN: ${{ secrets.RDKCM_RDKE }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using the
latesttag makes CI non-reproducible and can break builds when the image changes. Pin the container image to a specific version tag or immutable digest (e.g.,@sha256:...) so Coverity/native builds are stable over time.