ci: pin GitHub Actions to commit SHAs#923
Conversation
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThis pull request pins all GitHub Actions to specific commit SHAs across three CI/CD workflow files, replacing unpinned major-version tags. The changes affect the dependency license scanning workflow, Snyk security scanning workflow, and the main test workflow. Actions updated include checkout (v6.0.3), setup-java (v5.2.0), setup-python (v6.2.0), and upload-artifact (v7.0.1). All job logic, triggers, Maven commands, test configurations, and artifact names remain unchanged. Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches⚔️ Resolve merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
.github/workflows/tests@v1.yml (1)
83-87:⚠️ Potential issue | 🔴 Critical | ⚡ Quick winArtifact name collision across three jobs causes data loss in upload-artifact v7.
The upgrade from
upload-artifact@v2tov7introduces a breaking change: v7 no longer merges artifacts with the same name. Three jobs upload to the sametest-resultsartifact name:
- Unit tests (line 86)
- Cassandra integration tests (line 155)
- Scylla integration tests (line 208)
With v2, these would merge into a single artifact. With v7, each upload overwrites the previous one, so only the last job's results are preserved and earlier test results are lost.
Each job must use a unique artifact name. For example:
test-results-unit,test-results-cassandra-${{ matrix.cassandra-version }}, andtest-results-scylla-${{ matrix.scylla-version }}.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/tests@v1.yml around lines 83 - 87, The artifact uploads in .github/workflows/tests@v1.yml all use the same name "test-results", which with upload-artifact v7 causes overwrites; update each job's upload step to use a unique artifact name (replace "test-results" in the Unit tests upload, the Cassandra integration tests upload, and the Scylla integration tests upload) — e.g., "test-results-unit" for the unit test job, "test-results-cassandra-${{ matrix.cassandra-version }}" for the Cassandra job, and "test-results-scylla-${{ matrix.scylla-version }}" for the Scylla job so artifacts no longer collide when using actions/upload-artifact v7.
🧹 Nitpick comments (1)
.github/workflows/dep-lic-scan.yaml (1)
17-17: Update:actions/checkoutpindf4cb1c069e1874edd31b4311f1884172cec0e10matches releasev6.0.3, andv6.0.3is the latest stable version.
- Keep an eye on the static analysis warning: consider setting
persist-credentials: falseon the checkout step if credentials aren’t needed.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/dep-lic-scan.yaml at line 17, The checkout action is pinned to actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10; to address the static analysis warning add the persist-credentials: false setting to the checkout step (under the uses: actions/checkout... step) so credentials are not persisted when they aren’t needed; modify the checkout step to include a with: block containing persist-credentials: false (only do this if downstream steps don’t require the repository credentials).
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In @.github/workflows/tests@v1.yml:
- Around line 83-87: The artifact uploads in .github/workflows/tests@v1.yml all
use the same name "test-results", which with upload-artifact v7 causes
overwrites; update each job's upload step to use a unique artifact name (replace
"test-results" in the Unit tests upload, the Cassandra integration tests upload,
and the Scylla integration tests upload) — e.g., "test-results-unit" for the
unit test job, "test-results-cassandra-${{ matrix.cassandra-version }}" for the
Cassandra job, and "test-results-scylla-${{ matrix.scylla-version }}" for the
Scylla job so artifacts no longer collide when using actions/upload-artifact v7.
---
Nitpick comments:
In @.github/workflows/dep-lic-scan.yaml:
- Line 17: The checkout action is pinned to
actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10; to address the static
analysis warning add the persist-credentials: false setting to the checkout step
(under the uses: actions/checkout... step) so credentials are not persisted when
they aren’t needed; modify the checkout step to include a with: block containing
persist-credentials: false (only do this if downstream steps don’t require the
repository credentials).
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: a0850cb5-2293-46ab-9831-78dfdb4b538a
📒 Files selected for processing (3)
.github/workflows/dep-lic-scan.yaml.github/workflows/snyk-cli-scan.yml.github/workflows/tests@v1.yml
Pin all external GitHub Actions to full commit SHAs to reduce supply chain attack surface. Upgrade outdated actions to their latest versions. Reference: scylladb/scylladb#29421
c10258a to
35cc08c
Compare
|
@copilot resolve the merge conflicts in this pull request |
|
This PR is based on master from 2023(!). Rebase on current version please. |
Summary
This PR was generated automatically. Please verify that GitHub Actions work as expected with these changes before merging.
Reference: scylladb/scylladb#29421