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.
Lietuviškų asmens kodo / įmonės kodo tikrinimo bei generavimo funkcijos
Examples can be found here:
npm install lt-codes
yarn add lt-codes
import { personalCode, companyCode } from 'lt-codes';
Function | Description |
---|---|
personalCode.validate(code: string) | Validates personal code |
personalCode.generate() | Generates personal code |
const code = '39001010000'; // example
const generatedCode = personalCode.generate();
const { isValid, isException, error } = personalCode.validate(code);
{
"isValid": true,
"error": "",
"isException": true
}
import { ValidationResult } from 'lt-codes';
const result: ValidationResult = personalCode.validate(code);
Function | Description |
---|---|
companyCode.validate(code: string) | Validates company code |
companyCode.generate() | Generates company code |
const code = '123456789'; // example
const generatedCode = companyCode.generate();
const { isValid, isException, error } = companyCode.validate(code);
{
"isValid": true,
"error": "",
"isException": false
}
import { ValidationResult } from 'lt-codes';
const result: ValidationResult = companyCode.validate(code);
You can import all error types from lt-codes
as use as constants.
import { ValidationError } from 'lt-codes';
error
property returned by validate()
can be empty or one of the following values:
Value | Description |
---|---|
ValidationError.EMPTY | Code not passed (empty) |
ValidationError.INVALID | Do not pass regex checker |
ValidationError.INVALID_CONTROL_NUMBER | Invalid control number (last digit) |
ValidationError.INVALID_DATE | Invalid user birth date |
FAQs
Lithuanian codes. Personal & company code validator and generator
The npm package lt-codes receives a total of 11 weekly downloads. As such, lt-codes popularity was classified as not popular.
We found that lt-codes 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.