Skip to content
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

Seeding CSAF 2.1 #681

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions csaf_2.1/prose/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This place offers access to the editable sources of the v2.1 CSAF specification (to be).

In the `share` folder there are the user facing delivery items that offer layout and navigation
optimized for online viewing per
optimized for online viewing per

- a typical web interface of a version control server (like Codeberg, GitHub, GitLab, or SourceHut) - the Markdown file
- any typical browser (like Brave, Chrome, Edge, Firefox, or Safari) - the HTML file
Expand All @@ -29,12 +29,12 @@ To generate the Markdown version (for now) use:

The way to the HTML is a three-step process:

First calling pandoc (inside the `edit` folder) as:
First calling pandoc (inside the `edit` folder; at least [version `3.1.11.1`](https://github.com/jgm/pandoc/releases)) as:

```console
% pandoc -f gfm+definition_lists -t html build/tmp.md --columns=345 --css style/base.css --css style/skin.css \
--standalone -o build/tmp.html \
--metadata title="Common Security Advisory Framework Version 2.0"
--metadata title="Common Security Advisory Framework Version 2.1"
```

Second, swapping the hacked-up table of contents (for Markdown web-rendered views) with a real HTML one,
Expand All @@ -44,12 +44,13 @@ and connecting the skin styles to the elements (reading from the `build/tmp.html
% bin/toccata.py
```

Rewrites the `build/tmp.html` pandoc auto-generated HTML file into a more OASIS alike one at `build/injected.html`.
Rewrites the `build/tmp.html` pandoc auto-generated HTML file into a more OASIS alike one at `build/injected.html`.

The third step uses tidy-html5 (at least [version `5.8.0`](https://binaries.html-tidy.org/)) to cleanse the file from non-conforming content and formats.

The third step uses tidy-html5 to cleanse the file from non-conforming content and formats.
```console
% tidy -config etc/tidy-config.txt build/injected.html -ashtml | \
sed 's/<!\[CDATA\[//g; s/\]\]>//g;' > ../share/csaf-v2.1-draft.html
```

Note: Currently we still have 26 warnings in the third step, as the generated HTML is not conforming.
Note: Currently we still have 24 warnings in the third step, as the generated HTML is not conforming.
2 changes: 1 addition & 1 deletion csaf_2.1/prose/edit/src/frontmatter.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ When referencing this specification the following citation format should be used

**[csaf-v2.1]**

_Common Security Advisory Framework Version 2.0_. Edited by Langley Rock, Stefan Hagen, and Thomas Schmidt. 18 November 2022. OASIS Standard. https://docs.oasis-open.org/csaf/csaf/v2.1/csd01/csaf-v2.1-csd01.html. Latest stage: https://docs.oasis-open.org/csaf/csaf/v2.1/csaf-v2.1.html.
_Common Security Advisory Framework Version 2.1_. Edited by Stefan Hagen, and Thomas Schmidt. ?? Month 2024. OASIS Standard. https://docs.oasis-open.org/csaf/csaf/v2.1/csd01/csaf-v2.1-csd01.html. Latest stage: https://docs.oasis-open.org/csaf/csaf/v2.1/csaf-v2.1.html.


-------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ The relevant path for this test is:
```
"revision_history": [
{
"date": "2021-07-20T10:00:00.000Z",
"date": "2024-01-20T10:00:00.000Z",
"number": "1",
"summary": "Initial version."
},
{
"date": "2021-07-21T10:00:00.000Z",
"date": "2024-01-21T10:00:00.000Z",
"number": "1",
"summary": "Some other changes."
}
Expand Down
Loading
Loading