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.
RSpec API aims to make it easy to document and test pragmatic RESTful web APIs.
It is still under development, and you can follow its progress by checking out the code on Github.
More documentation and examples are available at http://rspec-api.github.io
RSpec API can help develop and document your own web APIs. A basic example of running RSpec API locally is provided, comprised of:
Run the basic example with the following commands:
git clone https://github.com/rspec-api/rspec-api.git
cd rspec-api
bundle
bundle exec rake db:migrate
bundle exec rspec spec/features/local
And you should see all the successful promises matched by the concerts API:
Concerts
GET /concerts
by default
responds with a status code that
should be 200
responds with headers that
should include 'Content-Type': 'application/json; charset=utf-8'
should include 'Link' (for pagination)
...
DELETE /concerts/:id
given an existing id
responds with a status code that
should be 204
Finished in 0.73864 seconds
151 examples, 0 failures
RSpec API can help specify and verify promises for remote APIs. An example of running RSpec API for a remote API is provided in spec/features/remote. The code verifies the expected behavior of a number of endpoints of the GitHub API:
Before running the example, get a GitHub Personal Access Token:
RSPEC_API_GITHUB_TOKEN
:
export RSPEC_API_GITHUB_TOKEN=
followed by your pasted key (no spaces after =
)Now, run the GitHub API example with the following commands:
git clone https://github.com/rspec-api/rspec-api.git
cd rspec-api
bundle
bundle exec rspec spec/features/remote
And you should see all the successful promises matched by the GitHub API:
Events
GET https://api.github.com/events
by default
responds with a status code that
should be 200
responds with headers that
should include 'Content-Type': 'application/json; charset=utf-8'
should include 'Link' (for pagination)
...
DELETE https://api.github.com/gists/:id/star
given an existing id 0d7b597d822102148810
responds with a status code that
should be 204
Finished in 1 minute 19.74 seconds
1237 examples, 1 failure, 4 pending
Don’t hesitate to send me code comments, issues or pull requests through GitHub! All feedback is appreciated. Thanks :)
FAQs
Unknown package
We found that rspec-api 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.