
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
@foyer-inc/insight-sdk
Advanced tools
import { ClassifyResult, Insight } from "insight-sdk";
//can be initialized with authorization and other defaults or with nothing
const insight = new Insight() or new Insight(options)
const options = {
// bypass login call by providing authorization
// defaults to ''
authorization: string,
// run full model even if cached data exists for this image
// defaults to false
force: boolean,
// must be true for class methods to function
// defaults to false
includeSegmentations: boolean,
// returns tagpoints for location of detection
// defaults to false
includeTagpoints: boolean,
// if only certain detections should be returned include them here
// defaults to ['all']
detectionsRequested: string[]
}
/*
* if not initialized with authorization string you may call login with
* credentials. The authorization token is returned and is also
* automatically added to your insight instance
*/
const authorization = await insight.login('email', 'password')
const url = 'https://myfakewebsite.com/myfakeimage.jpg'
const file = //base 64 encoded string representation of image
/*
*Below are example calls to the classification service
* you can use async/await or promise with a callback function
*/
const result: ClassifyResult = await insight.classify(url)
//Can include a variety of options
//options provided will overrule those set on the insight instance
const anotherResult: ClassifyResult = await insight.classify(url, options)
insight.classify(url)
.then( (result: ClassifyResult) => {
// additional work or call class methods
});
}
// A sample of functions available on the result
// an image, as a base64 encoded string, with the requested detection blurred
const blurredImage = await result.blurDetection('detectionName')
// an image of the requested detection with a transparent background
const extractedImage = await result.extractDetection('detectionName')
// returns an array of shape [r,g,b] for the dominant color of the named detection
const color = await result.getDetectionColor('detectionName')
//can also be passed the already extracted detection
const anotherColor = await result.getDetectionColor(extractedImage)
//also possible to check if a detection exists in the result
//returns true or false if detection is present
const found = result.checkDetection('detectionName')
//returns true or false if all detections listed are present
const multipleFound = result.checkDetection(['detectionName', 'anotherDetectionName'])
FAQs
SDK for connecting to Foyer's Insight service(s)
The npm package @foyer-inc/insight-sdk receives a total of 2 weekly downloads. As such, @foyer-inc/insight-sdk popularity was classified as not popular.
We found that @foyer-inc/insight-sdk demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.