Research
Recent Trends in Malicious Packages Targeting Discord
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
Readme
All apis resources are by default fully CORS and JSONP available. You must use CSRF protection for all your authenticated requests (even for GET requests) and apis supports such protection by default too. Optionally, you can check Origin of your requests or disable CORS/JSONP functionality (completely or for choosen request handlers).
By default, apis philosophy is to allow cross-origin requests and be ready for them.
Also, by default, every resource will have 'options' handler providing resource description and it will not be protected by authentication or something. You can allways override this handler with null or your own variant.
Handler interface:
setup(chain)
- can be used to perform some interaction between handlers of chain, used by Impl
and Ret
handle(ctx)
- async handle, must not throw any exceptions, use ctx.error()
instead, usually must call ctx.next()
at some pointTo get test page on /test_page
add to your contract:
cont('/test', [apis.testPage.contract])
For any app, if it cannot be found, apis default will be used.
core.app - known by app actually (which also is loader), the app itself
core.uncaught - uncaught exception handler
core.logging - logging subsystem
core.mechanics.web - web mechanics, enables responding on HTTP requests
core.mechanics.socket - socket mechanics, enables web socket communications, runs on top of web mechanics
core.settings - settings, will be searched at cwd()+'/lib/settings'
core.handler - main app contract, will be searched at cwd()+'/lib/contract'
For both core.settings and core.handler units, if unit cannot be found, apis default will be used.
MIT
FAQs
Library for creation web and websocket restful APIs
The npm package apis receives a total of 173 weekly downloads. As such, apis popularity was classified as not popular.
We found that apis demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
Security News
Socket CEO Feross Aboukhadijeh joins a16z partners to discuss how modern, sophisticated supply chain attacks require AI-driven defenses and explore the challenges and solutions in leveraging AI for threat detection early in the development life cycle.
Security News
NIST's new AI Risk Management Framework aims to enhance the security and reliability of generative AI systems and address the unique challenges of malicious AI exploits.