Skip to content

Commit e622756

Browse files
committed
fix(issues): drop stale didYouMean props, add detectedAt
Resolves CUS2-5. The didYouMean class declared four props (alternatePackage, downloads, downloadsRatio, editDistance) but the current OpenAPI schema (socket-sdk-js/openapi.json:9298) only emits { alternatePackage, detectedAt }. The three stale keys were dead at runtime and detectedAt was missing a human-readable label entirely. Updated to match the schema.
1 parent 414c32c commit e622756

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

socketdev/core/issues.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ class didYouMean:
463463

464464
def __init__(self):
465465
self.description = "Package name is similar to other popular packages and may not be the package you want."
466-
self.props = {"alternatePackage": "Alternate package", "downloads": "Downloads", "downloadsRatio": "Download ratio", "editDistance": "Edit distance"}
466+
self.props = {"alternatePackage": "Alternate package", "detectedAt": "Detected at"}
467467
self.suggestion = "Use care when consuming similarly named packages and ensure that you did not intend to consume a different package. Malicious packages often publish using similar names as existing popular packages."
468468
self.title = "Possible typosquat attack"
469469
self.emoji = "\ud83e\uddd0"

0 commit comments

Comments
 (0)