Skip to content

Commit c0464fb

Browse files
committed
README style updates.
* Try to keep text within 80 columns. * Use better markdown header names. * Move markdown link URLs to the bottom. * Remove duplicate markdown link URLs. * Remove note about manually formatting GHSA sync'ed advisory PRs, since the GHSA sync script has been improved since then. * Capitalize YAML. * Other grammatical changes.
1 parent 05ea8d8 commit c0464fb

File tree

1 file changed

+37
-37
lines changed

1 file changed

+37
-37
lines changed

README.md

+37-37
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
# Ruby Advisory Database
22

3-
The Ruby Advisory Database is a community effort to compile all security advisories that are relevant to Ruby libraries.
3+
The Ruby Advisory Database is a community effort to compile all security
4+
advisories that are relevant to Ruby libraries.
45

5-
You can check your own Gemfile.locks against this database by using [bundler-audit](https://github.com/rubysec/bundler-audit).
6+
You can check your own Gemfile.locks against this database by using
7+
[bundler-audit].
68

7-
## Support Ruby security!
9+
## Support Ruby Security!
810

9-
Do you know about a vulnerability that isn't listed in this database? Open an issue or submit a PR.
11+
Do you know about a vulnerability that isn't listed in this database? Open an
12+
issue or submit a PR.
1013

1114
## Directory Structure
1215

@@ -43,7 +46,7 @@ Within each directory are one or more advisory files for the Ruby
4346
implementation. These advisory files are named using the advisories' [CVE]
4447
or [GHSA] ID.
4548

46-
## Format
49+
## Examples
4750

4851
Each advisory file contains the advisory information in [YAML] format.
4952
Here are some example advisories:
@@ -112,7 +115,7 @@ patched_versions:
112115
- '>= 3.1.2'
113116
```
114117

115-
## Schema
118+
## YAML Schema
116119

117120
### `gems`
118121

@@ -158,55 +161,50 @@ patched_versions:
158161
* `related` \[Hash\<Array\<String\>\>\] (optional): Sometimes an advisory references many urls and other identifiers. Supported keys: `cve`, `ghsa`, `osvdb`, and `url`
159162
* `notes` \[String\] (optional): Internal notes regarding the vulnerability's inclusion in this database.
160163

161-
[CVSSv2]: https://www.first.org/cvss/v2/guide
162-
[CVSSv3]: https://www.first.org/cvss/v3.1/user-guide
163-
[CVSSv4]: https://www.first.org/cvss/v4.0/user-guide
164-
165-
### Tests
164+
## Tests
166165

167166
Prior to submitting a pull request, run the tests:
168167

169-
```
168+
```shell
170169
bundle install
171170
bundle exec rspec
172171
```
173172

174-
### GitHub Advisory Sync
173+
## GitHub Advisory Sync
175174

176-
There is a script that will create initial yaml files for RubyGem advisories which
177-
are in the [GitHub Security Advisory API](https://developer.github.com/v4/object/securityadvisory/),
178-
but are not already in this dataset. This script can be periodically run to ensure
179-
this repo has all the data that is present in the GitHub Advisory data.
175+
There is a script that will create initial YAML files for RubyGem advisories
176+
which are in the [GitHub Security Advisory API], but are not already in this
177+
dataset. This script can be periodically run to ensure this repo has all the
178+
data that is present in the GitHub Advisory data.
180179

181180
The GitHub Advisory API requires a token to access it.
182-
- It can be a completely scopeless token (recommended); it does not require any permissions at all.
183-
- Get yours at https://github.com/settings/tokens
184181

185-
To run the GitHub Advisory sync to retrieve all advisories, start by executing the rake task:
182+
* It can be a completely scope-less token (recommended); it does not require any
183+
permissions at all.
184+
* Get yours at: https://github.com/settings/tokens
186185

187-
```
188-
GH_API_TOKEN=<your GitHub API Token> bundle exec rake sync_github_advisories
186+
To run the GitHub Advisory sync to retrieve all advisories, start by executing
187+
the rake task:
188+
189+
```shell
190+
GH_API_TOKEN="your GitHub API Token" bundle exec rake sync_github_advisories
189191
```
190192

191193
Or, to only retrieve advisories for a single gem:
192194

195+
```shell
196+
GH_API_TOKEN="your GitHub API Token" bundle exec rake sync_github_advisories[gem_name]
193197
```
194-
GH_API_TOKEN=<your GitHub API Token> bundle exec rake sync_github_advisories[gem_name]
195-
```
196-
197-
- The rake task will write yaml files for any missing advisories.
198-
- Those files must be further edited.
199-
- Fill in `cvss_v3` field by following the CVE link and getting it from page
200-
- Fill in `cvss_v4` field by following the CVE link and getting it from page
201-
- Fill in `patched_versions` field, using the comments at the bottom of the file
202-
- Fill in `unaffected_versions`, optional, if there are unaffected_versions
203-
- delete the GitHub data at the bottom of the yaml file
204-
- double check all the data, commit it, and make a PR
205-
- *The GitHub Advisory data is structured opposite of RubySec unfortunately:
206-
GitHub identifies version range which are vulnerable; RubySec identifies
207-
version ranges which are not vulnerable. This is why some manual
208-
work to translate is needed.*
209198

199+
* The rake task will write YAML files for any missing advisories.
200+
* Those files must be further edited.
201+
* Fill in `cvss_v3` field by following the CVE link and getting it from page.
202+
* Fill in `cvss_v4` field by following the CVE link and getting it from page.
203+
* Fill in `patched_versions` field, using the comments at the bottom of the
204+
YAML file.
205+
* Optionally fill in `unaffected_versions`.
206+
* Delete the GitHub data at the bottom of the YAML file.
207+
* Double check all the data, commit it, and make a PR.
210208

211209
## Credits
212210

@@ -216,9 +214,11 @@ This database also includes data from the [Open Sourced Vulnerability Database][
216214
developed by the Open Security Foundation (OSF) and its contributors.
217215

218216
[rubygems.org]: https://rubygems.org/
217+
[bundler-audit]: https://github.com/rubysec/bundler-audit
219218
[CVE]: https://cve.mitre.org/
220219
[OSVDB]: https://en.wikipedia.org/wiki/Open_Source_Vulnerability_Database
221220
[GHSA]: https://help.github.com/en/articles/about-maintainer-security-advisories
221+
[GitHub Security Advisory API]: https://developer.github.com/v4/object/securityadvisory/
222222
[CVSSv2]: https://www.first.org/cvss/v2/guide
223223
[CVSSv3]: https://www.first.org/cvss/v3.1/user-guide
224224
[CVSSv4]: https://www.first.org/cvss/v4.0/user-guide

0 commit comments

Comments
 (0)