Skip to content

Conversation

@Thegaram
Copy link

@Thegaram Thegaram commented Mar 7, 2025

1. Purpose or design rationale of this PR

Fix multiple zizmor error like this:

warning[artipacked]: credential persistence through GitHub Actions artifacts
  --> .github/workflows/semgrep.yml:23:7
   |
23 |     - uses: actions/checkout@v3
   |       ------------------------- does not set persist-credentials: false
   |
   = note: audit confidence → Low

2. PR title

Your PR title must follow conventional commits (as we are doing squash merge for each PR), so it must start with one of the following types:

  • ci: Changes to our CI configuration files and scripts (example scopes: vercel, github, cypress)

3. Deployment tag versioning

Has the version in params/version.go been updated?

  • This PR doesn't involve a new deployment, git tag, docker image tag, and it doesn't affect traces

4. Breaking change label

Does this PR have the breaking-change label?

  • This PR is not a breaking change

Summary by CodeRabbit

  • Chores
    • Enhanced CI/CD workflows by disabling persistent GitHub credentials during repository checkouts, improving security.
    • Refined workflow script formatting to boost readability and maintain clear logical separation.

@coderabbitai
Copy link

coderabbitai bot commented Mar 7, 2025

Walkthrough

The changes update multiple GitHub Actions workflows to disable credential persistence during the checkout step. Each affected workflow now includes the configuration persist-credentials: false in the respective checkout action. Additionally, a few workflows have extra blank lines added to enhance readability. No modifications were made to any public or exported entities.

Changes

File(s) Change Summary
.github/workflows/bump_version.yml, .github/workflows/docker-arm64.yaml, .github/workflows/docker.yaml, .github/workflows/semgrep.yml Added persist-credentials: false in the checkout steps; some files include extra blank lines for improved readability.
.github/workflows/l2geth_ci.yml Added persist-credentials: false to the checkout steps in multiple jobs (e.g., build-mock-ccc-geth, build-geth, check, goimports-lint, go-mod-tidy-lint, test).

Sequence Diagram(s)

sequenceDiagram
  participant Runner as GitHub Actions Runner
  participant Checkout as Checkout Action
  participant NextSteps as Subsequent Steps

  Runner->>Checkout: Initiate checkout (persist-credentials: false)
  Checkout-->>Runner: Checkout complete (credentials not persisted)
  Runner->>NextSteps: Proceed to further steps
Loading

Suggested reviewers

  • georgehao
  • colinlyguo

Poem

Hoppin' through workflows, I make a little tune,
Disabling credentials so secrets leave soon.
With blank lines to breathe in the code's gentle light,
I hop and skip from morning to night.
Celebrate these changes – a bunny's delight!
(_/) 🥕

Tip

⚡🧪 Multi-step agentic review comment chat (experimental)
  • We're introducing multi-step agentic chat in review comments. This experimental feature enhances review discussions with the CodeRabbit agentic chat by enabling advanced interactions, including the ability to create pull requests directly from comments.
    - To enable this feature, set early_access to true under in the settings.

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

georgehao
georgehao previously approved these changes Mar 14, 2025
Base automatically changed from fix-ga-pin-actions to develop March 14, 2025 10:26
@Thegaram Thegaram dismissed georgehao’s stale review March 14, 2025 10:26

The base branch was changed.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
.github/workflows/bump_version.yml (1)

51-56: Static Analysis Suggestion: Update Node.js Setup Action Version
Static analysis has flagged that actions/setup-node@v3 may be outdated for current runners. It is recommended to update to a more recent version of the setup-node action to benefit from the latest fixes and improvements.

🧰 Tools
🪛 actionlint (1.7.4)

53-53: the runner of "actions/setup-node@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 080afd4 and 3f26ed1.

📒 Files selected for processing (5)
  • .github/workflows/bump_version.yml (2 hunks)
  • .github/workflows/docker-arm64.yaml (1 hunks)
  • .github/workflows/docker.yaml (2 hunks)
  • .github/workflows/l2geth_ci.yml (6 hunks)
  • .github/workflows/semgrep.yml (1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.4)
.github/workflows/bump_version.yml

53-53: the runner of "actions/setup-node@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: test
🔇 Additional comments (10)
.github/workflows/semgrep.yml (1)

23-25: Security Improvement: Disabling Persisted Credentials
Adding persist-credentials: false to the checkout step ensures that GitHub credentials are not retained after checkout, which directly addresses the credential persistence warnings.

🧰 Tools
🪛 actionlint (1.7.4)

23-23: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

.github/workflows/docker.yaml (1)

15-17: Security Enhancement: Prevent Credential Persistence in Docker Workflow
The addition of persist-credentials: false in the checkout step helps avoid leaving credentials on the runner, aligning with the PR objective to mitigate unintended credential storage.

🧰 Tools
🪛 actionlint (1.7.4)

15-15: the runner of "actions/checkout@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

.github/workflows/docker-arm64.yaml (1)

21-23: Security Update: Disabling Credential Persistence in ARM64 Workflow
Including persist-credentials: false in the checkout step ensures that sensitive credentials aren’t mistakenly persisted—this is consistent with security best practices across all workflows.

🧰 Tools
🪛 actionlint (1.7.4)

21-21: the runner of "actions/checkout@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

.github/workflows/l2geth_ci.yml (6)

26-30: CI Consistency: Disable Credential Persistence in Build Mock-CCC-Geth Job
By adding persist-credentials: false in this checkout step, the workflow further secures the CI process by ensuring no Git credentials are retained beyond the checkout phase.

🧰 Tools
🪛 actionlint (1.7.4)

27-27: the runner of "actions/checkout@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)


51-55: CI Security: Checkout Credential Handling in Build Geth Job
This change prevents credential persistence during the checkout phase, which is critical for maintaining the overall security posture of the build process.

🧰 Tools
🪛 actionlint (1.7.4)

52-52: the runner of "actions/checkout@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)


71-75: Security Fix: Preventing Credential Persistence in Check Job
Adding the persist-credentials: false option here ensures that no Git credentials are carried over into subsequent steps, reinforcing the intended security measure.

🧰 Tools
🪛 actionlint (1.7.4)

72-72: the runner of "actions/checkout@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)


93-97: Security Update: Disabling Credential Persistence in goimports-lint Job
This update keeps the workspace secure by ensuring that the checkout step does not leave behind persisted credentials.

🧰 Tools
🪛 actionlint (1.7.4)

94-94: the runner of "actions/checkout@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)


116-120: Security Reinforcement: Credential Persistence Disabled for go-mod-tidy-lint Job
Consistently applying persist-credentials: false in this step further aligns with the overall goal of preventing inadvertent credential exposure.

🧰 Tools
🪛 actionlint (1.7.4)

117-117: the runner of "actions/checkout@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)


139-143: Test Job Security: Eliminating Credential Leakage in Checkout Step
The inclusion of persist-credentials: false in the test job’s checkout step ensures that no credentials are unnecessarily persisted, enhancing the security across all CI stages.

🧰 Tools
🪛 actionlint (1.7.4)

140-140: the runner of "actions/checkout@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

.github/workflows/bump_version.yml (1)

18-23: Security Enhancement: Disabling Credential Persistence in Version Bump Workflow
The update to include persist-credentials: false in the checkout step ensures that Git credentials are not retained, supporting secure CI practices across all workflows.

🧰 Tools
🪛 actionlint (1.7.4)

19-19: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

@Thegaram Thegaram merged commit 94fcd7d into develop Mar 14, 2025
9 checks passed
@Thegaram Thegaram deleted the fix-ga-do-not-persist-git-credentials branch March 14, 2025 10:36
@coderabbitai coderabbitai bot mentioned this pull request Mar 14, 2025
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants