{"repo":"stoplightio/spectral-owasp-ruleset","free":true,"listed":false,"github":"https://github.com/stoplightio/spectral-owasp-ruleset","clone":"git clone https://github.com/stoplightio/spectral-owasp-ruleset.git","description":"Improve the security of your API by detecting common vulnerabilities as defined by OWASP and enforced with Spectral.","language":"TypeScript","stars":86,"topics":["api","openapi","openapi3","openapi31","security","hacktoberfest","stoplight-oss","stoplight-spectral"],"license":null,"category":"api-integrations-sdks","readme_excerpt":"Spectral OWASP API Security [ ][stoplight forest] Scan an OpenAPI document to detect security issues. As OpenAPI is only describing the surface level of the API it cannot see what is happening in your code, but it can spot obvious issues and outdated standards being used. v2.x of this ruleset is based on the OWASP API Security Top 10 2023 edition, but if you would like to use the 2019 edition please use v1.x. Installation Usage Create a local ruleset that extends the ruleset. In its most basic form this just tells Spectral what ruleset you want to use, but it will allow you to customise things, add your own rules, turn bits off if its causing trouble. If you're using VS Code or Stoplight Studio then the NPM modules will not be available. Instead you can use the CDN hosted version: Note: You need to use the full URL with CDN hosted rulesets because Spectral cannot follow redirects through extends. Next, use Spectral CLI to lint against your OpenAPI description. Don't have any OpenAPI? Record some HTTP traffic to make OpenAPI and then you can switch to API Design-First going forwards. You should see some output like this: Now you have some things to work on for your API. Thankfully these are only at the warning and information severity, and that is not going to fail continuous integration (unless you want them to). There are a bunch of other rulesets or Stoplight API Stylebook you can use, or use for inspiration for your own rulesets and API Style Guides. 🎉 Thanks - Andrzej - ","default_branch":null,"files":null,"tree":[],"storefront":"/r/stoplightio","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/stoplightio/spectral-owasp-ruleset/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}