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 the CSAF v2.1 workplace - separating source and deliverables #641

Merged
merged 83 commits into from
Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
4c07c78
documentary: Documented the plan
sthagen Aug 13, 2023
6343455
config: amended git ignores and added editor config as well as git at…
sthagen Aug 13, 2023
95c8ff1
seed: created seeding copies of v2.0 for v2.1 spec version
sthagen Aug 13, 2023
d831aa4
config: added lint and spell check configs
sthagen Aug 13, 2023
767e101
config: adapted markdownlint rules to unfortunate reality (for now)
sthagen Aug 13, 2023
85d0996
refactor: added inital source segregation with binder file
sthagen Aug 13, 2023
affebaa
refactor: table hygiene, split of terminology section, definition lis…
sthagen Aug 14, 2023
0a6d63a
refactor: removed volatile section counter display from sources
sthagen Aug 14, 2023
92efb86
documentary: added a volatile generator and a share folder
sthagen Aug 14, 2023
aab684d
documentary: adapted generator to remove micro format of definition data
sthagen Aug 14, 2023
3cb0313
fix: removed stray sterisk and translate markup to HTML inside defini…
sthagen Aug 14, 2023
7b1f3e5
refactor: adapted tool and moved to semantic citation refs
sthagen Aug 14, 2023
46ffa94
nit: simplified informative references section
sthagen Aug 14, 2023
c0a254d
refactor: enforced 150 chars line limit on md sources
sthagen Aug 15, 2023
03bad7f
fix: fixed simple spelling errors (present in OS)
sthagen Aug 15, 2023
bef1f74
refactor: replaced volatile with semantic section references
sthagen Aug 15, 2023
943487c
refactor: changed clumsy markdown link into simple format link
sthagen Aug 15, 2023
9dc3af6
nit: removed trailing space in markdown source
sthagen Aug 15, 2023
be9628b
refactor: split schema elements properties source on level 3
sthagen Aug 15, 2023
426c587
refactor: split schema elements definitions source on level 3
sthagen Aug 15, 2023
aca0c5b
refactor: shortened source filenames for fun and profit
sthagen Aug 15, 2023
9410c69
refactor: finished source segregation with mandatory tests
sthagen Aug 15, 2023
77409ce
documentary: generated mapping between local and global example ids
sthagen Aug 15, 2023
eff549e
fix: fixed two path-local ids for examples
sthagen Aug 16, 2023
74e4a1b
refactor: migrated from global to path-local example enumeration
sthagen Aug 16, 2023
470a17e
fix: fixed key error from prototyping
sthagen Aug 16, 2023
20aa5e0
documentary: added labels/anchors to examples
sthagen Aug 16, 2023
9ce3ed3
Tests
tschmidtb51 Aug 23, 2023
3565fc6
Tests
tschmidtb51 Aug 23, 2023
0d0e083
Tests
tschmidtb51 Aug 25, 2023
4f90e67
Merge remote-tracking branch 'upstream/master' into tests
tschmidtb51 Aug 25, 2023
6fa161b
Merge pull request #63 from oasis-tcs/seeding-csaf-v-2-1
sthagen Dec 11, 2023
cb01415
Added media and shared styles
sthagen Dec 11, 2023
2c3a183
Added little script to derive data-url image from png file
sthagen Dec 11, 2023
828023a
Added HTML generation
sthagen Dec 12, 2023
fa0b24a
Added generated user facing generated markdown delivery item
sthagen Dec 12, 2023
4af1ea9
Seeding CSAF 2.1
tschmidtb51 Jan 23, 2024
178155f
Seeding CSAF 2.1
tschmidtb51 Jan 24, 2024
4f23033
Tests
tschmidtb51 Jan 24, 2024
81e962c
Merge branch 'master' into tests
tschmidtb51 Jan 24, 2024
13ff61e
Tests
tschmidtb51 Jan 24, 2024
e50d5aa
Tests
tschmidtb51 Jan 24, 2024
34277bf
GitHub Actions
tschmidtb51 Jan 24, 2024
0d2a4c1
Merge branch 'tests' into seeding-csaf-v-2-1
tschmidtb51 Jan 24, 2024
2285db8
Tests
tschmidtb51 Jan 24, 2024
5850a6f
GitHub Actions
tschmidtb51 Jan 24, 2024
fe79030
Tests
tschmidtb51 Jan 24, 2024
bf6370f
GitHub Actions
tschmidtb51 Jan 24, 2024
8c82eea
GitHub Actions
tschmidtb51 Jan 24, 2024
ffa5602
Merge branch 'tests' into seeding-csaf-v-2-1_tests
tschmidtb51 Jan 24, 2024
61e2c5a
Tests
tschmidtb51 Jan 24, 2024
75c4b78
Seeding CSAF 2.1
tschmidtb51 Jan 24, 2024
de80a3d
GitHub Actions
tschmidtb51 Jan 24, 2024
5eab650
Merge branch 'tests' into seeding-csaf-v-2-1_tests
tschmidtb51 Jan 24, 2024
2c6bf88
GitHub Actions
tschmidtb51 Jan 24, 2024
74c4a7d
Seeding CSAF 2.1
tschmidtb51 Jan 24, 2024
af3082e
Merge commit '74c4a7d' into seeding-csaf-v-2-1_tests
tschmidtb51 Jan 24, 2024
21de43d
Seeding CSAF 2.1
tschmidtb51 Jan 23, 2024
2927bc4
Seeding CSAF 2.1
tschmidtb51 Jan 24, 2024
3ea8025
Tests
tschmidtb51 Jan 24, 2024
12b9896
Tests
tschmidtb51 Jan 24, 2024
91a34c0
Tests
tschmidtb51 Jan 24, 2024
2412522
GitHub Actions
tschmidtb51 Jan 24, 2024
06db2e9
Tests
tschmidtb51 Jan 24, 2024
d0951c8
Seeding CSAF 2.1
tschmidtb51 Jan 24, 2024
3ab8a6b
Merge branch 'seeding-csaf-v-2-1' into seeding-csaf-v-2-1_tests
sthagen Jan 24, 2024
092a94a
Nit to preserve attributes
sthagen Jan 24, 2024
3f133a8
Merge pull request #65 from tschmidtb51/seeding-csaf-v-2-1_tests
sthagen Jan 24, 2024
7b73236
Seeding CSAF 2.1
tschmidtb51 Jan 24, 2024
2045c7f
Seeding CSAF 2.1
tschmidtb51 Jan 24, 2024
7dcc846
GitHub Actions
tschmidtb51 Jan 24, 2024
1b064d9
CSAF 2.0 to CSAF 2.1
tschmidtb51 Jan 24, 2024
31b2690
CSAF 2.0 to CSAF 2.1
tschmidtb51 Jan 25, 2024
12b9b7f
CSAF 2.0 to CSAF 2.1
tschmidtb51 Jan 25, 2024
5a45ae5
CSAF 2.0 to CSAF 2.1
tschmidtb51 Jan 25, 2024
1524979
CSAF 2.0 to CSAF 2.1
tschmidtb51 Jan 25, 2024
1149618
CSAF 2.0 to CSAF 2.1
tschmidtb51 Jan 25, 2024
eeb5f08
GitHub Action
tschmidtb51 Jan 25, 2024
2ba8176
CSAF 2.0 to CSAF 2.1
tschmidtb51 Jan 25, 2024
6e1b3a7
CSAF 2.0 to CSAF 2.1
tschmidtb51 Jan 25, 2024
f4f82e1
CSAF 2.0 to CSAF 2.1
tschmidtb51 Jan 25, 2024
5e000b9
CSAF 2.0 to CSAF 2.1
tschmidtb51 Jan 25, 2024
df23a99
CSAF 2.0 to CSAF 2.1
tschmidtb51 Jan 25, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
61 changes: 61 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
.editorconfig # Editor config
# http://EditorConfig.org

# This EditorConfig overrides any parent EditorConfigs
root = true

# Default rules applied to all file types
[*]

# Trim trailing spaces, newline at EOF
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
end_of_line = lf

# 2 space indentation
indent_style = space
indent_size = 2

# Makefiles require tabs
[Makefile]
indent_style = tab
indent_size = 4
max_line_length = 256

# 4 space indentation
[*.{py,java,r,R}]
indent_style = space
indent_size = 4
max_line_length = 120

# 2 space indentation
[*.{json,y{a,}ml,html,cwl}]
indent_style = space
indent_size = 2

[*.{md,Rmd,rst}]
trim_trailing_whitespace = false
indent_style = space
indent_size = 2
max_line_length = 150

# JavaScript-specific settings
[*.{js,ts}]
quote_type = single
indent_style = space
indent_size = 2
continuation_indent_size = 2
curly_bracket_next_line = false
indent_brace_style = BSD
spaces_around_operators = true
spaces_around_brackets = none
max_line_length = 150

[*.rs]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
indent_style = space
indent_size = 4
max_line_length = 120
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
12 changes: 9 additions & 3 deletions .github/workflows/cpe.yml → .github/workflows/csaf_2.0_cpe.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: CPE Dictionary Test
name: CPE Dictionary Test (CSAF 2.0)

on: [push, pull_request]
on:
push:
paths:
- 'csaf_2.0/**'
pull_request:
paths:
- 'csaf_2.0/**'

jobs:
cpe-test:
Expand All @@ -11,6 +17,6 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '18'
node-version: '20'
- name: Perform CPE Dictionary Test
run: ./csaf_2.0/test/cpe/run_tests.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: CSAF Filenames Test
name: CSAF Filenames Test (CSAF 2.0)

on: [push, pull_request]
on:
push:
paths:
- 'csaf_2.0/**'
pull_request:
paths:
- 'csaf_2.0/**'

jobs:
filename-test:
Expand Down
16 changes: 11 additions & 5 deletions .github/workflows/main.yml → .github/workflows/csaf_2.0_main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: JSON Schema Tests
name: JSON Schema Tests (CSAF 2.0)

on: [push, pull_request]
on:
push:
paths:
- 'csaf_2.0/**'
pull_request:
paths:
- 'csaf_2.0/**'

jobs:
json-test_job:
Expand Down Expand Up @@ -35,6 +41,6 @@ jobs:
with:
name: strict-schemas
path: |
csaf_strict_schema.json
provider_strict_schema.json
aggregator_strict_schema.json
csaf_2.0/build/csaf_strict_schema.json
csaf_2.0/build/provider_strict_schema.json
csaf_2.0/build/aggregator_strict_schema.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: CSAF Mandatory Tests
name: CSAF Mandatory Tests (CSAF 2.0)

on: [push, pull_request]
on:
push:
paths:
- 'csaf_2.0/**'
pull_request:
paths:
- 'csaf_2.0/**'

jobs:
mandatory-test:
Expand All @@ -11,7 +17,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '18'
node-version: '20'
- name: Setup csaf-validator-lib
run: |
cd ..
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: Validator Data Test
name: Validator Data Test (CSAF 2.0)

on: [push, pull_request]
on:
push:
paths:
- 'csaf_2.0/**'
pull_request:
paths:
- 'csaf_2.0/**'

jobs:
validator-test:
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/csaf_2.1_cpe.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: CPE Dictionary Test (CSAF 2.1)

on:
push:
paths:
- 'csaf_2.1/**'
pull_request:
paths:
- 'csaf_2.1/**'

jobs:
cpe-test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '20'
- name: Perform CPE Dictionary Test
run: ./csaf_2.1/test/cpe/run_tests.sh
32 changes: 32 additions & 0 deletions .github/workflows/csaf_2.1_filenames.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: CSAF Filenames Test (CSAF 2.1)

on:
push:
paths:
- 'csaf_2.1/**'
pull_request:
paths:
- 'csaf_2.1/**'

jobs:
filename-test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup pip package "paikalta"
run: pip install paikalta
- name: Test filenames of CSAF filename test files in filenames/data/valid/*.json
run: ./csaf_2.1/test/filenames/run_tests.sh ./csaf_2.1/test/filenames/data/valid/*.json
- name: Test filenames of CSAF filename test files in filenames/data/invalid/*.json
run: ./csaf_2.1/test/filenames/run_invalid_tests.sh ./csaf_2.1/test/filenames/data/invalid/*.json
- name: Test filenames of CSAF examples
run: ./csaf_2.1/test/filenames/run_tests.sh ./csaf_2.1/examples/csaf/*.json
- name: Test filenames of CSAF examples - profile specific folders
run: ./csaf_2.1/test/filenames/run_tests.sh ./csaf_2.1/examples/csaf/csaf_*/*.json
- name: Test filenames of CSAF test files in validator/data/mandatory
run: ./csaf_2.1/test/filenames/run_tests.sh ./csaf_2.1/test/validator/data/mandatory/*.json
- name: Test filenames of CSAF test files in validator/data/optional
run: ./csaf_2.1/test/filenames/run_tests.sh ./csaf_2.1/test/validator/data/optional/*.json
- name: Test filenames of CSAF test files in validator/data/informative
run: ./csaf_2.1/test/filenames/run_tests.sh ./csaf_2.1/test/validator/data/informative/*.json
46 changes: 46 additions & 0 deletions .github/workflows/csaf_2.1_main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: JSON Schema Tests (CSAF 2.1)

on:
push:
paths:
- 'csaf_2.1/**'
pull_request:
paths:
- 'csaf_2.1/**'

jobs:
json-test_job:
runs-on: ubuntu-latest
name: Test JSON schemas
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Prepare environment
run: |
sudo apt-get remove python3-jsonschema
sudo apt-get update -q && sudo apt-get install -y --no-install-recommends -qq \
python3 \
python3-simplejson \
python3-jsonpath-rw \
python3-pip \
python3-setuptools \
python3-wheel
pip3 install jsonschema[format]
- name: Check jsonschema version
run: python3 -c "from importlib.metadata import version; print(version('jsonschema'))"
- name: Test examples against CSAF schema
run: ./csaf_2.1/test/csaf_schema/run_tests.sh
- name: Test VEX examples against CSAF schema
run: ./csaf_2.1/test/csaf_schema/run_tests.sh csaf_vex
- name: Test examples against Provider Metadata schema
run: ./csaf_2.1/test/provider_schema/run_tests.sh
- name: Test examples against Aggregator schema
run: ./csaf_2.1/test/aggregator_schema/run_tests.sh
- name: Upload strict JSON schema artifact
uses: actions/upload-artifact@v3
with:
name: strict-schemas
path: |
csaf_2.1/build/csaf_strict_schema.json
csaf_2.1/build/provider_strict_schema.json
csaf_2.1/build/aggregator_strict_schema.json
40 changes: 40 additions & 0 deletions .github/workflows/csaf_2.1_mandatory-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: CSAF Mandatory Tests (CSAF 2.1)

on:
push:
paths:
- 'csaf_2.1/**'
pull_request:
paths:
- 'csaf_2.1/**'

jobs:
mandatory-test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '20'
- name: Setup csaf-validator-lib
run: |
cd ..
git clone https://github.com/secvisogram/csaf-validator-lib.git
cd csaf-validator-lib && npm ci --prod
- name: Run mandatory tests on examples
run: |
for i in `ls -1 ../csaf/csaf_2.1/examples/csaf/*.json`
do
printf "%s%s\n" "Starting test of " $i
../csaf-validator-lib/scripts/runTest.js $i mandatory
done
# Only temporary until examples in the repo are reorganized
- name: Run mandatory tests on examples/csaf_vex
run: |
for i in `ls -1 ../csaf/csaf_2.1/examples/csaf/csaf_vex/*.json`
do
printf "%s%s\n" "Starting test of " $i
../csaf-validator-lib/scripts/runTest.js $i mandatory
done
38 changes: 38 additions & 0 deletions .github/workflows/csaf_2.1_validator.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Validator Data Test (CSAF 2.1)

on:
push:
paths:
- 'csaf_2.1/**'
pull_request:
paths:
- 'csaf_2.1/**'

jobs:
validator-test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Prepare environment
run: |
sudo apt-get remove python3-jsonschema
sudo apt-get update -q && sudo apt-get install -y --no-install-recommends -qq \
python3 \
python3-simplejson \
python3-jsonpath-rw \
python3-pip \
python3-setuptools \
python3-wheel
pip3 install jsonschema[format]
- name: Check jsonschema version
run: python3 -c "from importlib.metadata import version; print(version('jsonschema'))"
- name: Test validator/data/mandatory against schema
run: ./csaf_2.1/test/validator/run_tests.sh mandatory
- name: Test validator/data/optional against schema
run: ./csaf_2.1/test/validator/run_tests.sh optional
- name: Test validator/data/informative against schema
run: ./csaf_2.1/test/validator/run_tests.sh informative

- name: Test validator/data/testcases.json against testcase schema
run: ./csaf_2.1/test/validator/check_testcases.sh
21 changes: 20 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@

# Original ignores (before csaf_2.1 branch off)
meeting_minutes/.DS_Store
.DS_Store
*_strict_schema.json
official-cpe-dictionary_v2.3.*
official-cpe-dictionary_v2.2.*

# pyenv
.python-version

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Other local development artifacts
*~
.idea
local*
.vscode/
build/
Loading
Loading