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

feat: revamp package author check for potential package compromise #294

Merged
merged 1 commit into from
Sep 30, 2023

Conversation

lirantal
Copy link
Owner

Description

This new revamp about checking the author is changed to be geared towards supply chain security signals of package hijacking or package compromise.

What do we check?

  1. Who is the user who published the package? in the pakument's _npmUser field
  2. Is this the first time we see this user publishing a package? If so, halt and report.
  3. Start from first version to latest version and check if they published the package before. If they did, and the difference between this published version date and first is more than 30 days then halt and report.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Related Issue

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Checklist:

  • I have updated the documentation (if required).
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@lirantal lirantal self-assigned this Sep 30, 2023
@codecov
Copy link

codecov bot commented Sep 30, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (11ef43d) 96.85% compared to head (d739613) 96.85%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #294   +/-   ##
=======================================
  Coverage   96.85%   96.85%           
=======================================
  Files          14       14           
  Lines         381      381           
  Branches       56       56           
=======================================
  Hits          369      369           
  Misses         10       10           
  Partials        2        2           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lirantal lirantal merged commit 0cff8c4 into main Sep 30, 2023
9 checks passed
@lirantal lirantal deleted the feat/package-author-check-revamp branch September 30, 2023 13:45
@github-actions
Copy link

🎉 This PR is included in version 3.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant