Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
A library of common functions used when creating and managing open-xpd-uuid, a common, globally-unique name space (uuid) for Product Declarations, including HPDs and EPDs, to help users find all environmental and health information related to a single product.
A library of common functions used when creating and managing open-xpd-uuid, a common, globally-unique name space (uuid) for Product Declarations, including HPDs and EPDs, to help users find all environmental and health information related to a single product.
open-xpd-uuid
is a string that consists of 8 or 10 (8+2) alpha-numeric characters and any number of dashes.
For example: 123ABCED
, 123ABCEDAR
, ASB21M01
, avbDK93S
, -AB-11-cc-Ll---
.
GUIDs that consists of the following characters 1234567890ABCDEFGHJKMNPRQRSTUVWXYZ
(L
and O
are not mentioned)
are called "canonical". For example: 12345678
, ABCDEFG1
, 123ABCEDAR
.
GUIDs that consists of 10 characters represent 8-character guid with appended 2-character checksum.
Checksum allows to detect 1-character entry errors and character swaps, and most other errors.
-
or dash - is ignoredL
or l
or I
or i
- is treated as 1
O
or o
- is treated as 0
(zero)pip install open-xpd-uuid-lib
The library supports python 3.6
and higher.
>>> from cqd import open_xpd_uuid
>>> open_xpd_uuid.generate()
'JKGEE5PN'
>>> from cqd import open_xpd_uuid
>>> open_xpd_uuid.generate('CQD')
'CQD55PG0'
Use sanitize
to replace ambiguous chars(0,o,O,1,L,l,I,i) with correct ones and remove dashes(-).
This function is useful to turn guid received from a user into a canonical one.
For example: as-b2-lm-oL
-> ASB21M01
>>> from cqd import open_xpd_uuid
>>> open_xpd_uuid.sanitize('as-b2-lm-oL')
'ASB21M01'
Use validate
to validate short readable GUID and get error description if the GUID is not valid.
validate
accepts only "canonical" GUIDs: use sanitize
function to make them "canonical".
>>> from cqd import open_xpd_uuid
>>> sanitized_guid = open_xpd_uuid.sanitize('as-b2-lm-oL')
>>> sanitized_guid
'ASB21M01'
>>> open_xpd_uuid.validate(sanitized_guid)
# no exception - the `sanitized_guid` is valid
>>> try:
... open_xpd_uuid.validate('as-b2-lm-oL')
... except open_xpd_uuid.GuidValidationError as e:
... print(e)
...
`guid` length must be 8 characters long
>>> from cqd import open_xpd_uuid
>>> guid = open_xpd_uuid.generate()
'JKGEE5PN'
>>> checksum = open_xpd_uuid.checksum(guid)
'ME'
>>> guid_with_checksum = guid + checksum
'JKGEE5PNME'
>>> short_link = 'cqd.io/e/' + guid_with_checksum
'cqd.io/e/JKGEE5PNME'
FAQs
A library of common functions used when creating and managing open-xpd-uuid, a common, globally-unique name space (uuid) for Product Declarations, including HPDs and EPDs, to help users find all environmental and health information related to a single product.
We found that open-xpd-uuid demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.