Skip to content
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

chore(security): remove GitHub Actions caching to prevent cache poisoning #1209

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

abretonc7s
Copy link
Collaborator

@abretonc7s abretonc7s commented Feb 5, 2025

Description

Context

This PR updates our GitHub Actions workflows to use artifacts instead of caching for better control over build outputs. The changes affect the lint-build-test.yml and publish-release.yml workflows.

Changes

  • Removed cache: yarn configurations from all Node.js setup steps in lint-build-test.yml
  • Updated publish-release.yml workflow to:
    • Replace caching mechanism with GitHub Artifacts for build outputs
    • Upgrade GitHub Actions to newer versions (checkout@v4, setup-node@v4)
    • Remove the npm publish dry-run step for a more streamlined release process
    • Implement proper artifact handling between jobs using upload-artifact@v4 and download-artifact@v4

Implementation Details

This change replaces the GitHub Actions caching mechanism with artifacts for managing build outputs between jobs. This provides more explicit control over how build artifacts are handled and transferred throughout the workflow.

Performance Considerations

Build times may slightly increase without caching, but the artifact implementation ensures efficient transfer of build outputs between jobs. We can monitor and optimize if needed.

Breaking Changes

None. This is an internal workflow change that doesn't affect the published packages or their consumers.

Testing Instructions

  1. Create a test release to verify the complete workflow
  2. Monitor build times to assess performance impact
  3. Verify that build artifacts are properly transferred between the release and publish jobs

Related Issues

#3925 - Remove usage of GitHub action caching from critical workflows

Updated the publish-release GitHub Actions workflow to use newer versions of actions and removed the dry-run step for npm publish.
@abretonc7s abretonc7s requested a review from a team as a code owner February 5, 2025 12:18
Copy link
Collaborator

@chakra-guy chakra-guy left a comment

Choose a reason for hiding this comment

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

LGTM

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.

2 participants