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.
@quenty/servicebag
Advanced tools
Service providing mechanisms for Nevermore
npm install @quenty/servicebag --save
:Init()
:Start()
GetService<IService>()
-- Main script
local serviceBag = require("ServiceBag").new()
serviceBag:AddService(require("TransparencyService"))
serviceBag:Init()
serviceBag:Start()
-- Other script
local TransparencyService = require("TransparencyService") -- force declaration at top
local TestClass = {}
TestClass.ClassName = "TestClass"
TestClass.__index = TestClass
function TestClass.new(serviceBag)
local self = setmetatable({}, TestClass)
self._serviceProvider = assert(serviceBag, "No serviceBag")
self._transparencyService = self._serviceProvider:GetRequiredService(TransparencyService)
return self
end
return TestClass
local DialogPane = setmetatable({}, BasicPane)
DialogPane.ClassName = "DialogPane"
DialogPane.__index = DialogPane
function DialogPane.new(serviceBag)
local self = setmetatable(BasicPane.new(serviceBag:GetService(DialogTemplatesClient):Clone("DialogPaneTemplate")), DialogPane)
self._theme = Instance.new("StringValue")
self._theme.Value = "Light"
self._maid:GiveTask(self._theme)
self._dialogInput = DialogInput.new()
self._maid:GiveTask(self._dialogInput)
Right now services and classes aren't the same. There's no contract to transform a class with lifetime into a service. However, because some of our services actually implement a .new() method (i.e. service definitions can be classes), we can't differentiate easily.
The issue is around life-cycle.
Other service providers solve this issue by doing the following...
We inherently don't want to separate out interfaces yet because we don't know what the actors or tie-interfaces for hot reloading will even look like.
It's important that we don't define this yet because there's a good chance separation at the service layer will be very important (i.e. we'll want to observe service state existing).
We could establish a contract that providing an interface will be allowed. That is, a service can return a value it'd like to use as an interface instead. We may need to wait until we resolve these other problems first.
FAQs
Service providing mechanisms for Nevermore
We found that @quenty/servicebag demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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.