[CLIENT-3467] CI/CD: Publish artifacts to JFrog using release bundles#826
[CLIENT-3467] CI/CD: Publish artifacts to JFrog using release bundles#826juliannguyen4 wants to merge 76 commits intodevfrom
Conversation
…frog-release-bundles
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #826 +/- ##
=======================================
Coverage 83.53% 83.53%
=======================================
Files 99 99
Lines 14392 14392
=======================================
Hits 12022 12022
Misses 2370 2370 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…frog-release-bundles
…frog-release-bundles
…frog-release-bundles
…frog-release-bundles
…ecting production...
This reverts commit 0cd96e8.
…frog-release-bundles
…frog-release-bundles
| runs-on: ubuntu-24.04 | ||
| env: | ||
| JF_PROJECT: ${{ inputs.jfrog-project }} | ||
| steps: | ||
| - name: Setup JFrog CLI | ||
| uses: jfrog/setup-jfrog-cli@5b06f730cc5a6f55d78b30753f8583454b08c0aa # v4.8.1 | ||
| env: | ||
| JF_URL: https://artifact.aerospike.io | ||
| with: | ||
| oidc-provider-name: ${{ vars.OIDC_PROVIDER_NAME }} | ||
| oidc-audience: ${{ vars.OIDC_AUDIENCE }} | ||
|
|
||
| - run: jf rbp --signing-key=aerospike --include-repos ${{ inputs.jfrog-repo-name }} ${{ inputs.release-bundle-name }} ${{ inputs.release-bundle-version }} ${{ inputs.new-environment }} |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 14 hours ago
To fix the problem, explicitly declare a permissions: block that grants only the minimal required GITHUB_TOKEN permissions. Since this workflow promotes a JFrog release bundle via OIDC and does not interact with GitHub issues, PRs, or repository contents, the safest assumption is that it needs only read access to repository contents (if anything). A common minimal baseline is contents: read, which is equivalent to the read-only default for repository contents and avoids unnecessary write scopes.
The single best fix with no functional change is to add a permissions block at the job level for promote-release-bundle-to-dev. This makes the job self-contained and documents its needs without affecting other jobs that might be added later. Insert:
permissions:
contents: readunder runs-on: ubuntu-24.04 (same indentation as runs-on). No imports or additional methods are needed; this is purely a YAML configuration change in .github/workflows/promote-release-bundle.yml.
| @@ -20,6 +20,8 @@ | ||
| jobs: | ||
| promote-release-bundle-to-dev: | ||
| runs-on: ubuntu-24.04 | ||
| permissions: | ||
| contents: read | ||
| env: | ||
| JF_PROJECT: ${{ inputs.jfrog-project }} | ||
| steps: |
TODO