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.
@shelf/aws-lambda-tesseract
Advanced tools
6 MB Tesseract 4.1 (with English training data) to fit inside AWS Lambda
6 MB Tesseract 5.3.3 (with English training data) to fit inside AWS Lambda
Inspired by chrome-aws-lambda & lambda-scanner-ocr
$ yarn add @shelf/aws-lambda-tesseract
1.x
versions of this library were compiled for Node 8.10.
2.x
was compiled for Node 10.x runtime.
3.x
works for Node 12.x runtime.
4.x
works for Node 16.x runtime and compiled with Tesseract 5.1.0. It works with x86_64 CPUs for now only.
5.x
works for Node 18.x runtime and compiled with Tesseract 5.3.3. It works with arm64 CPUs.
This package contains an archive with Tesseract 5.3.3 compiled for usage in AWS Lambda environment.
When a Lambda starts, it unpacks an archive with a binary to the /tmp
folder and makes sure it's done only once per Lambda cold start.
const {getTextFromImage, isSupportedFile} = require('@shelf/aws-lambda-tesseract');
module.exports.handler = async event => {
// assuming there is a photo.jpg inside /tmp dir
// original file will be deleted afterwards
if (!isSupportedFile('/tmp/photo.jpg')) {
return false;
}
return getTextFromImage('/tmp/photo.jpg');
};
isSupportedFile
checks that file has image-like file extension and it's not in the list of
unsupported by Tesseract file extensions.
Smoke test that it works by running test.sh
script
$ git checkout master
$ yarn version
$ yarn publish
$ git push origin master --tags
MIT © Shelf
FAQs
6 MB Tesseract 4.1 (with English training data) to fit inside AWS Lambda
We found that @shelf/aws-lambda-tesseract demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 59 open source maintainers 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.