Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
8ece7fb
creating 1.7 from 1.6. Updating doc generation and templates.
stevespringett Aug 31, 2024
a956767
carry over of latest master
jkowalleck Sep 4, 2024
24167b6
carry over of latest master
jkowalleck Sep 4, 2024
8ec130d
tests: fix ProtoBuf breaking detection to be wire-only (#532)
jkowalleck Nov 4, 2024
eae8ebd
tests: bump docker image from `bufbuild/buf:1.30.1` to `:1.46.0` (#519)
jkowalleck Nov 6, 2024
3c44100
tests: fix BrotoBuf BCcheck on version-level (#536)
jkowalleck Nov 6, 2024
bff02b3
tests: fix BrotoBuf test reports (#537)
jkowalleck Nov 6, 2024
a28884d
fix(ProtoBuf): add ExternalReterence Type `EXTERNAL_REFERENCE_TYPE_RE…
jkowalleck Nov 7, 2024
c9893f7
fix(ProtoBuf,XML): component data repeatable (#530)
jkowalleck Nov 7, 2024
949528a
fix(ProtoBuf): `Component.evidence` optional (#534)
jkowalleck Nov 7, 2024
2b6213e
fix(ProtoBuf): add `LicenseExpression.bom_ref` (#529)
jkowalleck Nov 7, 2024
d8fa000
docs: transfer specdocs to ProtoBuf 1.6 (#539)
jkowalleck Nov 7, 2024
d1a6fd8
docs: transfer specdocs to XML 1.6 (#540)
jkowalleck Nov 7, 2024
149bcd2
fix(xml): requirement descriptions should be unbounded (#533)
hakandilek Nov 7, 2024
e10e5f9
chore: prep v1.6.1 (#535)
jkowalleck Nov 7, 2024
d34559f
chore(deps): bump org.apache.commons:commons-lang3 from 3.16.0 to 3.1…
dependabot[bot] Nov 7, 2024
5d8b070
carry over from master: XML,JSON,PB
jkowalleck Nov 7, 2024
3ad4a67
chore(deps): bump org.apache.maven.plugins:maven-surefire-plugin from…
dependabot[bot] Nov 7, 2024
cb54c0c
chore(deps): bump commons-io:commons-io from 2.16.1 to 2.17.0 in /too…
dependabot[bot] Nov 7, 2024
21ceeba
Adapt test samples to ensure consistency between the different format…
andreas-hilti Nov 18, 2024
ab272a9
Cryptography WG, 2024-10-17: add serial number to certificateProperti…
n1ckl0sk0rtge Nov 19, 2024
4749fe3
add certificate state; add creation, activation, deactivation, revoka…
n1ckl0sk0rtge Jan 15, 2025
5abddc3
remove examples from certFormat, rename certificateFileExtension, add…
n1ckl0sk0rtge Jan 16, 2025
6256ecd
Corrected example
stevespringett Nov 23, 2024
6b87143
fix: typos in schemas 1.6 (#550)
weaversa Dec 12, 2024
da8a80f
chore(dev-deps): tools use cyclonedx-core-java v10.0.0 (#552)
jkowalleck Dec 12, 2024
4580aae
incorporate latest changes from master
jkowalleck Dec 12, 2024
cebf845
Committing current changes
stevespringett Jan 5, 2025
787ee04
remove unused config file (#558)
jkowalleck Jan 2, 2025
7dd94a1
chore(deps): update opis/json-schema requirement from 2.3 to 2.4.1 in…
dependabot[bot] Jan 4, 2025
611ff64
Updating version
stevespringett Jan 5, 2025
fd99b05
docs: align media types in table (#561)
jkowalleck Jan 8, 2025
e62e441
docs: Recognized file patterns (#562)
jkowalleck Jan 8, 2025
ed3136f
docs: docsgen resture output for website (#570)
jkowalleck Jan 11, 2025
bc631aa
docs: docgen proto with `protoc-gen-doc` (#557)
jkowalleck Jan 11, 2025
1c34746
docs: fix docsgen proto chown
jkowalleck Jan 11, 2025
d0fb871
docs: docsgen theme and linkd for proto (#571)
jkowalleck Jan 11, 2025
b246f57
docs: docsgen prep for 1.7
jkowalleck Jan 11, 2025
90307f0
docs: docsge fix title in `<meta>` elements (#572)
jkowalleck Jan 11, 2025
b3e41f8
chore: introduce PR template (#579)
jkowalleck Jan 19, 2025
7ed08e9
pull_request_template tell about rules (#580)
jkowalleck Jan 19, 2025
0f6e8f1
tests: enable tests for 1.7
jkowalleck Jan 22, 2025
fcc7a44
tests: copy tests from 1.6
jkowalleck Jan 22, 2025
3f4e31b
tests: rename tests for 1.7
jkowalleck Jan 22, 2025
3bf8464
tests: migrate tests for 1.7
jkowalleck Jan 22, 2025
377d3d5
docs: docsgen latest first
jkowalleck Jan 22, 2025
7bb67fa
add certificate extensions, rename certificateExtensions to certifica…
n1ckl0sk0rtge Jan 30, 2025
8c6bb28
fix relatedCryptographicAssets, add reason for certificate lifecycle …
n1ckl0sk0rtge Feb 11, 2025
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
24 changes: 24 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!--
Thank you for taking the time to develop and contribute a core enhancement or fix for a defect!

We kindly request that you create pull requests only for things that have been discussed in a ticket first; exceptions may be made for spelling or grammar fixe.
Read more about the process here: https://cyclonedx.org/participate/standardization-process/#working-model

Please have the related ticket/issue ID ready.
If there is none, feel free to create a new ticket: https://github.com/CycloneDX/specification/issues/new/choose

-->

<!--

Please provide a brief description of what this pull request intends to do and which ticket it fixes/closes.
Example:
> As discussed in ticket #485, this PR adds Streebog to the hash algorithm enum.
>
> fixes #485

In case this is for a spelling or grammar improvement, please provide a brief description.
Example:
> Fixe typo: color(AE) -> colour(BE)

-->
18 changes: 18 additions & 0 deletions .github/workflows/build_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,21 @@ jobs:
name: JSON-Schema-documentation
path: docgen/json/docs
if-no-files-found: error
docs_proto:
runs-on: ubuntu-latest
defaults:
run:
working-directory: docgen/proto
steps:
- name: Checkout
# see https://github.com/actions/checkout
uses: actions/checkout@v4
- name: Generate Schema documentation
run: ./gen.sh
- name: Archive Schema documentation
# https://github.com/actions/upload-artifact
uses: actions/upload-artifact@v4
with:
name: PROTO-Schema-documentation
path: docgen/proto/docs
if-no-files-found: error
18 changes: 14 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,24 @@ free, open source, and proprietary tools and solutions that support the CycloneD
The following media types are officially registered with IANA:

| Media Type | Format | Assignment |
| ------- | --------- | --------- |
| application/vnd.cyclonedx+xml | XML | [IANA](https://www.iana.org/assignments/media-types/application/vnd.cyclonedx+xml) |
| application/vnd.cyclonedx+json | JSON | [IANA](https://www.iana.org/assignments/media-types/application/vnd.cyclonedx+json) |
|------------|--------|------------|
| `application/vnd.cyclonedx+xml` | XML | [IANA](https://www.iana.org/assignments/media-types/application/vnd.cyclonedx+xml) |
| `application/vnd.cyclonedx+json` | JSON | [IANA](https://www.iana.org/assignments/media-types/application/vnd.cyclonedx+json) |
| `application/x.vnd.cyclonedx+protobuf` | Protocol Buffer | |

Specific versions of CycloneDX can be specified by using the version parameter. For example: `application/vnd.cyclonedx+xml; version=1.6`.

The officially supported media type for Protocol Buffer format is `application/x.vnd.cyclonedx+protobuf`.

## Recognized file patterns

The following file names are conventionally used for storing CycloneDX BOM files:
* `bom.json` for JSON encoded CycloneDX BOM files.
* `bom.xml` for XML encoded CycloneDX BOM files.

Alternatively, files that match the glob pattern below are also recognized:
* `*.cdx.json` for JSON encoded CycloneDX BOM files.
* `*.cdx.xml` for XML encoded CycloneDX BOM files.


## Release History

Expand Down
11 changes: 6 additions & 5 deletions docgen/json/gen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ DOCS_PATH="$THIS_PATH/docs"
TEMPLATES_PATH="$THIS_PATH/templates"

rm -f -R "$DOCS_PATH"
mkdir -p "$DOCS_PATH/"{1.2,1.3,1.4,1.5,1.6}
mkdir -p "$DOCS_PATH/"{1.2,1.3,1.4,1.5,1.6,1.7}

# Check to see if generate-schema-doc is executable and is in the path. If not, install JSON Schema for Humans.
if ! [ -x "$(command -v generate-schema-doc)" ]
Expand Down Expand Up @@ -45,8 +45,9 @@ generate () {
sed -i -e "s/\${version}/$version/g" "$DOCS_PATH/$version/index.html"
}

generate 1.2
generate 1.3
generate 1.4
generate 1.5
generate 1.7
generate 1.6
generate 1.5
generate 1.4
generate 1.3
generate 1.2
2 changes: 1 addition & 1 deletion docgen/json/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
json-schema-for-humans==0.47
json-schema-for-humans==1.3.4
2 changes: 2 additions & 0 deletions docgen/json/templates/cyclonedx/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,14 @@
v${version} (JSON)
</a>
<ul class="dropdown-menu" aria-labelledby="navbarScrollingDropdown">
<li><a class="dropdown-item" href="https://cyclonedx.org/docs/1.7/json/">v1.7 (JSON)</a></li>
<li><a class="dropdown-item" href="https://cyclonedx.org/docs/1.6/json/">v1.6 (JSON)</a></li>
<li><a class="dropdown-item" href="https://cyclonedx.org/docs/1.5/json/">v1.5 (JSON)</a></li>
<li><a class="dropdown-item" href="https://cyclonedx.org/docs/1.4/json/">v1.4 (JSON)</a></li>
<li><a class="dropdown-item" href="https://cyclonedx.org/docs/1.3/json/">v1.3 (JSON)</a></li>
<li><a class="dropdown-item" href="https://cyclonedx.org/docs/1.2/json/">v1.2 (JSON)</a></li>
<li><hr class="dropdown-divider"/></li>
<li><a class="dropdown-item" href="https://cyclonedx.org/docs/1.7/xml/">v1.7 (XML)</a></li>
<li><a class="dropdown-item" href="https://cyclonedx.org/docs/1.6/xml/">v1.6 (XML)</a></li>
<li><a class="dropdown-item" href="https://cyclonedx.org/docs/1.5/xml/">v1.5 (XML)</a></li>
<li><a class="dropdown-item" href="https://cyclonedx.org/docs/1.4/xml/">v1.4 (XML)</a></li>
Expand Down
30 changes: 25 additions & 5 deletions docgen/json/templates/cyclonedx/content.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,37 @@
{%- endif -%}

{# Enum and const #}
{%- if schema.kw_enum -%}
{%- if schema.kw_enum and schema.kw_meta_enum -%}
<div class="enum-value" id="{{ schema.kw_enum.html_id }}">
<h4>Must be one of:</h4>
<table class="table table-striped table-bordered">
<thead class="thead-dark">
<tr>
<th class="text-nowrap" scope="col">Name</th>
<th scope="col">Description</th>
</tr>
</thead>
<tbody>
{%- for enum_choice in schema.kw_enum.array_items -%}
<tr>
<td class="text-nowrap">
<strong>{{ enum_choice.literal | python_to_json }}</strong>
</td>
<td>
{{ (schema.enum_description(enum_choice.literal) | get_description_literal) }}
</td>
</tr>
{%- endfor -%}
</tbody>
</table>
</div>
{%- elif schema.kw_enum -%}
<div class="enum-value" id="{{ schema.kw_enum.html_id }}">
<h4>Must be one of:</h4>
<ul class="list-group">
{%- for enum_choice in schema.kw_enum.array_items -%}
<li class="list-group-item enum-item">
{%- if schema.kw_meta_enum -%}<strong>{%- endif -%}
{{ enum_choice.literal | python_to_json }}
{%- if schema.kw_meta_enum -%}</strong>
: {{ (schema.enum_description(enum_choice.literal) | get_description_literal) }}
{%- endif -%}
</li>
{%- endfor -%}
</ul>
Expand Down
17 changes: 12 additions & 5 deletions docgen/json/templates/cyclonedx/schema_doc.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,39 @@ body {
margin: 0;
padding: 0;
}
.navbar {
height: 90px;
padding: 0;
}
.navbar-inverse .navbar-nav>.open>a,
.navbar-inverse .navbar-nav>.open>a:focus,
.navbar-inverse .navbar-nav>.open>a:hover,
.navbar-inverse {
background-color: #071525;
background-image: linear-gradient(269.12deg, rgba(232, 52, 82, 1) 0%, rgba(136, 38, 125, 1) 51.26%, rgba(52, 57, 175, 1) 100%);
}
.navbar-brand, .navbar-fixed-top {
padding: 0 15px 0 15px;
padding: 0 30px 0 30px;
}
.navbar-inverse .navbar-nav>li>a {
color: #ffffff;
}
.site-header__logo img {
height: 50px;
height: 90px;
}
.version-selector {
font-size: 1.2rem
}
.table .thead-dark th {
background-color: #323550;
}
.container {
margin-right: auto;
margin-left: auto;
padding-left: 15px;
padding-right: 15px;
}
.container-fluid {
padding: 15px 15px;
padding: 30px 30px;
}
.site-footer__copyright {
text-align: center;
Expand All @@ -45,7 +52,7 @@ body {
padding-left: 30px !important;
}
h1, h2, h3, h4, h5, h6 {
color: #23527c;
color: rgb(52 57 175);
}
h1 {
font-size: 36px;
Expand Down
1 change: 1 addition & 0 deletions docgen/proto/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/docs/
49 changes: 49 additions & 0 deletions docgen/proto/gen.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#!/bin/bash
set -eu

THIS_PATH="$(realpath "$(dirname "$0")")"
SCHEMA_PATH="$(realpath "$THIS_PATH/../../schema")"
DOCS_PATH="$THIS_PATH/docs"
TEMPLATES_PATH="$THIS_PATH/templates"

PROTOC_GEN_DOC_VERSION='1.5.1'

# --

rm -f -R "$DOCS_PATH"

generate () {
version="$1"
title="CycloneDX v$version Protobuf Reference"
echo "Generating: $title"

OUT_DIR="$DOCS_PATH/$version/proto"
OUT_FILE="index.html"
mkdir -p "$OUT_DIR"

## docs: https://github.com/pseudomuto/protoc-gen-doc
docker run --rm \
-v "${OUT_DIR}:/out" \
-v "${SCHEMA_PATH}:/protos:ro" \
-v "${TEMPLATES_PATH}:/templates:ro" \
"pseudomuto/protoc-gen-doc:${PROTOC_GEN_DOC_VERSION}" \
--doc_opt=/templates/html.tmpl,"$OUT_FILE" \
"bom-${version}.proto"

# fix file permissions
docker run --rm \
-v "${OUT_DIR}:/out" \
--entrypoint chown \
"pseudomuto/protoc-gen-doc:${PROTOC_GEN_DOC_VERSION}" \
"$(id -u):$(id -g)" -R /out

sed -i -e "s/\${quotedTitle}/\"$title\"/g" "$OUT_DIR/$OUT_FILE"
sed -i -e "s/\${title}/$title/g" "$OUT_DIR/$OUT_FILE"
sed -i -e "s/\${version}/$version/g" "$OUT_DIR/$OUT_FILE"
}

generate 1.7
generate 1.6
generate 1.5
generate 1.4
generate 1.3
Loading