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.
[]: {{{1
File : README.md
Maintainer : Felix C. Stegerman <flx@obfusk.net>
Date : 2014-06-18
Copyright : Copyright (C) 2014 Felix C. Stegerman
Version : v0.0.2
[]: }}}1
[]: {{{1
siRESTa - declarative REST APIs
siRESTa is a DSL for declarative REST APIs. It can generate a ruby API (w/ sinatra [1]) and Client (w/ excon [2]) for you, based on a YAML file. Processing requests is done using a monad.
More documentation is underway. For now, see example/
and
features/
.
...
[]: }}}1
[]: {{{1
name: FooBarBaz
version: v1
request_formats: [json, xml]
response_formats: [json, xml]
api:
- resource: foos
contains:
- desc: Gets foos
get: get_foos
- post: create_foo
- resource: :foo_id
contains:
- desc: Get a foo
get: get_foo
- put: create_foo
- delete: delete_foo
- resource: bars
contains:
- get: get_bars
# ...
- resource: baz
contains:
- get: get_baz
# ...
require 'siresta'
API = Siresta.api file: 'config/api.yml'
class API
data :foos, []
handle :get_foos do |m, h, p, b|
m.get_data(:foos) { |foos| m.ok foos }
end
# ...
end
API.run!
GET /foos
POST /foos
GET /foos/:foo_id
PUT /foos/:foo_id
DELETE /foos/:foo_id
GET /foos/:foo_id/bars
GET /baz
...
require 'siresta'
Client = Siresta.client
c = Client.new 'http://localhost:4567'
c.foos.get
c.foos.post headers: { 'Content-Type' => 'foo/bar' }
c.foos[some_foo_id].get query: { foo: 'bar' }
c.foos[some_foo_id].put
c.foos[some_foo_id].delete
c.foos[some_foo_id].bars.get
c.baz.get
require 'siresta'
Siresta.routes
# => [["GET", "/foos", "Gets foos" ],
# ["POST", "/foos", nil ],
# ["GET", "/foos/:foo_id", "Get a foo" ],
# ["PUT", "/foos/:foo_id", nil ],
# ["DELETE", "/foos/:foo_id", nil ],
# ["GET", "/foos/:foo_id/bars", nil ],
# ["GET", "/baz", nil ]]
[]: }}}1
$ rake cuke
$ rake docs
LGPLv3+ [3].
[1] Sinatra --- http://www.sinatrarb.com
[2] Excon --- https://github.com/excon/excon
[3] GNU Lesser General Public License, version 3 --- http://www.gnu.org/licenses/lgpl-3.0.html
[]: ! ( vim: set tw=70 sw=2 sts=2 et fdm=marker : )
FAQs
Unknown package
We found that siresta demonstrated a not healthy version release cadence and project activity because the last version was released 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.