-
Notifications
You must be signed in to change notification settings - Fork 391
Proposed "V3" advisory format: move to Markdown + (TOML) "front matter" #240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Besides the migration diff being greater, what disadvantages do you see in using YAML for the metadata? |
YAML is a more loosely structured format, but has better support for this particular purpose |
Opened a https://github.com/RustSec/rustsec-crate/pull/167 Edit: merged |
Support for the new format implemented in the PR above shipped in I would suggest attempting to switch over to the new format on October 1st, 2020 (next Thursday). |
We'll attempt a migration today. The migration is tracked in #414. |
As proposed in #240 and tracked in #414, this PR translates all advisories into the new "V3" advisory format, which is based on Markdown with leading TOML front matter. This format makes it easier to see rendered Markdown syntax descriptions, whether rendered by an IDE or GitHub. This should help with both crafting advisories initially as well as review, and ideally encourages more lengthy descriptions. Support for this format shipped in `cargo-audit` v0.12.0 on May 6th, 2020.
As proposed in #240 and tracked in #414, this PR translates all advisories into the new "V3" advisory format, which is based on Markdown with leading TOML front matter. This format makes it easier to see rendered Markdown syntax descriptions, whether rendered by an IDE or GitHub. This should help with both crafting advisories initially as well as review, and ideally encourages more lengthy descriptions. Support for this format shipped in `cargo-audit` v0.12.0 on May 6th, 2020.
Right now advisories are TOML documents with large amounts of Markdown crammed into the
description
field. Here are a couple examples:This is suboptimal for a couple reasons:
description
field can't take advantage of their editor's Markdown syntax highlighting or preview featuresdescription
field harder to see. As of the move to the new V2 advisory format, this is all version information, which is some of the most important information in advisories.This issue proposes what is hopefully the last change to the advisory format before freezing it and releasing 1.0 versions of
cargo-audit
and therustsec
crate: moving to a Markdown advisory format.Markdown (unofficially) supports the notion of "front matter": typically a YAML document embedded at the beginning of a Markdown file like so:
This proposal is to migrate advisories from
.toml
files to.md
files which leverage Markdown "front matter" to store advisory metadata.If this happens, it may make sense to switch the advisory format from TOML to YAML as this is better supported in the Markdown ecosystem (e.g. GitHub will apply syntax highlighting and/or render it as a table).
However, that doesn't necessarily have to be the case: we could also continue to use TOML front matter, which enjoys some support:
The text was updated successfully, but these errors were encountered: