Skip to content

add mandatory test 6.1.54 - #700

Open
domachine wants to merge 1 commit into
mainfrom
feat/csaf-2.1-mandatory-test-6.1.54
Open

add mandatory test 6.1.54#700
domachine wants to merge 1 commit into
mainfrom
feat/csaf-2.1-mandatory-test-6.1.54

Conversation

@domachine

Copy link
Copy Markdown
Contributor

No description provided.

@domachine
domachine force-pushed the feat/csaf-2.1-mandatory-test-6.1.54 branch 2 times, most recently from 4c4fa6f to e5c3a5c Compare August 26, 2026 14:11
@github-actions

Copy link
Copy Markdown

Coverage after merging feat/csaf-2.1-mandatory-test-6.1.54 into main will be

93.19%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
cwe.js100%100%100%100%
rvisc.js100%100%100%100%
validateStrict.js75%50%100%80%21, 28
csaf_2_1
   csafAjv.js100%100%100%100%
   dateHelper.js93.10%80%100%100%63, 65
   sharingGroup.js100%100%100%100%
csaf_2_1/informativeTests
   informativeTest_6_3_1.js100%100%100%100%
   informativeTest_6_3_12.js95%75%100%100%86
   informativeTest_6_3_18.js100%100%100%100%
   informativeTest_6_3_2.js95.83%87.50%100%100%57
   informativeTest_6_3_20.js100%100%100%100%
   informativeTest_6_3_21_1.js100%100%100%100%
   informativeTest_6_3_21_3.js100%100%100%100%
   informativeTest_6_3_21_4.js100%100%100%100%
   informativeTest_6_3_21_5.js100%100%100%100%
   informativeTest_6_3_21_6.js100%100%100%100%
   informativeTest_6_3_21_8.js100%100%100%100%
   informativeTest_6_3_21_9.js100%100%100%100%
   informativeTest_6_3_22.js100%100%100%100%
   informativeTest_6_3_4.js100%100%100%100%
   informativeTest_6_3_5.js92.31%75%100%100%15
   informativeTest_6_3_6.js91.18%77.78%100%95%186, 201, 206
csaf_2_1/mandatoryTests
   mandatoryTest_6_1_1.js100%100%100%100%
   mandatoryTest_6_1_10.js95.65%80.95%100%100%175, 179, 226, 228
   mandatoryTest_6_1_11.js83.33%70%100%86.67%54–55, 62, 64–66, 70
   mandatoryTest_6_1_13.js98.04%87.50%100%100%137
   mandatoryTest_6_1_2.js98.21%92.86%100%100%125
   mandatoryTest_6_1_25.js96.49%83.33%100%100%120, 163
   mandatoryTest_6_1_26.js100%100%100%100%
   mandatoryTest_6_1_27_11.js100%100%100%100%
   mandatoryTest_6_1_27_12.js100%100%100%100%
   mandatoryTest_6_1_27_14.js100%100%100%100%
   mandatoryTest_6_1_27_15.js100%100%100%100%
   mandatoryTest_6_1_27_16.js100%100%100%100%
   mandatoryTest_6_1_27_17.js96.97%92.86%100%100%78
   mandatoryTest_6_1_27_18.js96.97%92.86%100%100%78
   mandatoryTest_6_1_27_19.js84.85%78.57%100%88.24%78–79, 82–84
   mandatoryTest_6_1_27_3.js100%100%100%100%
   mandatoryTest_6_1_27_4.js100%100%100%100%
   mandatoryTest_6_1_27_5.js92.86%80%100%100%60, 62
   mandatoryTest_6_1_27_6.js96.15%87.50%100%100%54
   mandatoryTest_6_1_34.js90.32%77.78%100%94.74%55–56, 77
   mandatoryTest_6_1_35.js100%100%100%100%
   mandatoryTest_6_1_36.js88.89%64.29%100%96.88%146–147, 156, 183, 185, 199
   mandatoryTest_6_1_37.js93.10%80%100%100%147, 179
   mandatoryTest_6_1_39.js100%100%100%100%
   mandatoryTest_6_1_4.js96%83.33%100%100%65
   mandatoryTest_6_1_40.js100%100%100%100%
   mandatoryTest_6_1_41.js100%100%100%100%
   mandatoryTest_6_1_42.js98.88%95.83%100%100%223
   mandatoryTest_6_1_43.js100%100%100%100%
   mandatoryTest_6_1_44.js100%100%100%100%
   mandatoryTest_6_1_45.js100%100%100%100%
   mandatoryTest_6_1_46.js89.66%70%100%100%69, 73, 76
   mandatoryTest_6_1_47.js97.22%91.67%100%100%82
   mandatoryTest_6_1_49.js97.50%91.67%100%100%99
   mandatoryTest_6_1_51.js100%100%100%100%
   mandatoryTest_6_1_52.js100%100%100%100%
   mandatoryTest_6_1_53.js100%100%100%100%
   mandatoryTest_6_1_54.js73.44%66.67%100%76.32%101, 101, 101–103, 121–122, 54, 62, 72, 92, 92–93, 93, 93–95
   mandatoryTest_6_1_56.js100%100%100%100%
   mandatoryTest_6_1_57.js100%100%100%100%
   mandatoryTest_6_1_58.js100%100%100%100%
   mandatoryTest_6_1_6.js97.92%95.83%100%100%59
   mandatoryTest_6_1_60_1.js91.30%75%100%100%37, 41
   mandatoryTest_6_1_61.js100%100%100%100%
   mandatoryTest_6_1_7.js100%100%100%100%
   mandatoryTest_6_1_8.js85.25%73.33%100%96.67%100, 103, 112, 115, 74–75, 81, 88, 91
   mandatoryTest_6_1_9.js100%100%100%100%
   mandatoryTests_6_1_38.js100%100%100%100%
csaf_2_1/mandatoryTests/shared
   docProductUtils.js86.52%68.75%100%95.74%100, 103, 129–130, 135, 169, 172, 78–79, 85, 88, 99
   wildcardUtils.js100%100%100%100%
csaf_2_1/recommendedTests
   recommendedTest_6_2_1.js96.55%87.50%100%100%77
   recommendedTest_6_2_10.js0%100%0%0%7
   recommendedTest_6_2_11.js96.55%90.91%100%100%61, 86
   recommendedTest_6_2_12.js100%100%100%100%
   recommendedTest_6_2_13.js100%100%100%100%
   recommendedTest_6_2_14.js100%100%100%100%
   recommendedTest_6_2_15.js100%100%100%100%
   recommendedTest_6_2_16.js98.11%95%100%100%125
   recommendedTest_6_2_17.js100%100%100%100%
   recommendedTest_6_2_18.js100%100%100%100%
   recommendedTest_6_2_19.js0%100%0%0%7
   recommendedTest_6_2_2.js100%100%100%100%
   recommendedTest_6_2_21.js100%100%100%100%
   recommendedTest_6_2_22.js100%100%100%100%
   recommendedTest_6_2_23.js94.12%80%100%100%63, 65
   recommendedTest_6_2_25.js94.44%83.33%100%100%63, 65
   recommendedTest_6_2_27.js91.38%75%100%97.14%124–125, 141, 145, 166
   recommendedTest_6_2_28.js100%100%100%100%
   recommendedTest_6_2_29.js100%100%100%100%
   recommendedTest_6_2_3.js88.89%75%80%94.44%64, 66
   recommendedTest_6_2_30.js100%100%100%100%
   recommendedTest_6_2_32.js98.11%93.75%100%100%126, 136
   recommendedTest_6_2_33.js100%100%100%100%
   recommendedTest_6_2_36.js100%100%100%100%
   recommendedTest_6_2_38.js100%100%100%100%
   recommendedTest_6_2_39_2.js96.67%91.67%100%100%78
   recommendedTest_6_2_39_3.js96.67%91.67%100%100%78
   recommendedTest_6_2_39_4.js96.67%91.67%100%100%78
   recommendedTest_6_2_39_5.js100%100%100%100%
   recommendedTest_6_2_4.js100%100%100%100%
   recommendedTest_6_2_40.js96.49%91.67%100%100%119, 93
   recommendedTest_6_2_41.js100%100%100%100%
   recommendedTest_6_2_42.js99.32%98.25%100%100%158
   recommendedTest_6_2_43.js100%100%100%100%
   recommendedTest_6_2_47.js100%100%100%100%
   recommendedTest_6_2_48.js100%100%100%100%
   recommendedTest_6_2_49.js100%100%100%100%
   recommendedTest_6_2_5.js100%100%100%100%
   recommendedTest_6_2_52.js100%100%100%100%
   recommendedTest_6_2_53.js100%100%100%100%
   recommendedTest_6_2_54_3.js100%100%100%100%
   recommendedTest_6_2_6.js100%100%100%100%
   recommendedTest_6_2_7.js100%100%100%100%
   recommendedTest_6_2_8.js100%100%100%100%
   recommendedTest_6_2_9.js100%100%100%100%
csaf_2_1/recommendedTests/shared
   checkForUnsafeHashAlgorithms.js95.83%83.33%100%100%31
   deepEqual.js93.48%85.71%100%100%25, 33, 45
csaf_2_1/schemaTests
   csaf_2_1.js63.64%50%50%80%21, 23, 23
   csaf_2_1_strict.js63.64%50%50%80%21, 23, 23
csaf_2_1/shared
   ssvcNamespaces.js100%100%100%100%
csaf_2_1/shared/csafHelpers
   walkHashes.js85%66.67%100%91.18%100, 117–118, 123, 140–141, 146, 94–95
lib
   cwec.js13.04%100%12.28%13.79%17–23, 27, 30–43, 45, 47–73
   walkPaths.js100%100%100%100%
lib/informativeTests
   informativeTest_6_3_1.js100%100%100%100%
   informativeTest_6_3_10.js93.33%90%100%94.12%47–48
   informativeTest_6_3_11.js93.94%92.31%100%94.12%47–48
   informativeTest_6_3_2.js100%100%100%100%
   informativeTest_6_3_3.js100%100%100%100%
   informativeTest_6_3_4.js100%100%100%100%
   informativeTest_6_3_5.js94.74%83.33%100%100%30
   informativeTest_6_3_6.js92.63%80.88%100%99.03%196–197, 222, 242, 268, 283, 291, 336, 344, 374, 382, 402, 418, 430
   informativeTest_6_3_7.js90.32%83.33%100%92.86%53–54, 58
   informativeTest_6_3_8.js90.83%78.38%100%96.67%238–239, 243, 245, 297–298, 329, 393, 398, 421
   informativeTest_6_3_9.js89.83%76.47%100%94.29%42–43, 54–55, 58, 68
lib/informativeTests/shared
   testURL.js100%100%100%100%
lib/mandatoryTests
   mandatoryTest_6_1_1.js93.75%77.27%100%100%183, 207,

@rainer-exxcellent rainer-exxcellent self-assigned this Aug 27, 2026
@domachine
domachine force-pushed the feat/csaf-2.1-mandatory-test-6.1.54 branch from e5c3a5c to f37eacc Compare August 27, 2026 11:14
@domachine
domachine force-pushed the feat/csaf-2.1-mandatory-test-6.1.54 branch from f37eacc to 6c152f1 Compare August 27, 2026 13:45
@github-actions

Copy link
Copy Markdown

Coverage after merging feat/csaf-2.1-mandatory-test-6.1.54 into main will be

93.41%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
cwe.js100%100%100%100%
rvisc.js100%100%100%100%
validateStrict.js75%50%100%80%21, 28
csaf_2_1
   csafAjv.js100%100%100%100%
   dateHelper.js93.10%80%100%100%63, 65
   sharingGroup.js100%100%100%100%
csaf_2_1/informativeTests
   informativeTest_6_3_1.js100%100%100%100%
   informativeTest_6_3_12.js95%75%100%100%86
   informativeTest_6_3_18.js100%100%100%100%
   informativeTest_6_3_2.js95.83%87.50%100%100%57
   informativeTest_6_3_20.js100%100%100%100%
   informativeTest_6_3_21_1.js100%100%100%100%
   informativeTest_6_3_21_3.js100%100%100%100%
   informativeTest_6_3_21_4.js100%100%100%100%
   informativeTest_6_3_21_5.js100%100%100%100%
   informativeTest_6_3_21_6.js100%100%100%100%
   informativeTest_6_3_21_8.js100%100%100%100%
   informativeTest_6_3_21_9.js100%100%100%100%
   informativeTest_6_3_22.js100%100%100%100%
   informativeTest_6_3_4.js100%100%100%100%
   informativeTest_6_3_5.js92.31%75%100%100%15
   informativeTest_6_3_6.js91.18%77.78%100%95%186, 201, 206
csaf_2_1/mandatoryTests
   mandatoryTest_6_1_1.js100%100%100%100%
   mandatoryTest_6_1_10.js95.65%80.95%100%100%175, 179, 226, 228
   mandatoryTest_6_1_11.js83.33%70%100%86.67%54–55, 62, 64–66, 70
   mandatoryTest_6_1_13.js98.04%87.50%100%100%137
   mandatoryTest_6_1_14.js100%100%100%100%
   mandatoryTest_6_1_2.js98.21%92.86%100%100%125
   mandatoryTest_6_1_25.js96.49%83.33%100%100%120, 163
   mandatoryTest_6_1_26.js100%100%100%100%
   mandatoryTest_6_1_27_11.js100%100%100%100%
   mandatoryTest_6_1_27_12.js100%100%100%100%
   mandatoryTest_6_1_27_14.js100%100%100%100%
   mandatoryTest_6_1_27_15.js100%100%100%100%
   mandatoryTest_6_1_27_16.js100%100%100%100%
   mandatoryTest_6_1_27_17.js96.97%92.86%100%100%78
   mandatoryTest_6_1_27_18.js96.97%92.86%100%100%78
   mandatoryTest_6_1_27_19.js84.85%78.57%100%88.24%78–79, 82–84
   mandatoryTest_6_1_27_3.js100%100%100%100%
   mandatoryTest_6_1_27_4.js100%100%100%100%
   mandatoryTest_6_1_27_5.js92.86%80%100%100%60, 62
   mandatoryTest_6_1_27_6.js96.15%87.50%100%100%54
   mandatoryTest_6_1_34.js90.32%77.78%100%94.74%55–56, 77
   mandatoryTest_6_1_35.js100%100%100%100%
   mandatoryTest_6_1_36.js88.89%64.29%100%96.88%146–147, 156, 183, 185, 199
   mandatoryTest_6_1_37.js93.10%80%100%100%147, 179
   mandatoryTest_6_1_39.js100%100%100%100%
   mandatoryTest_6_1_4.js96%83.33%100%100%65
   mandatoryTest_6_1_40.js100%100%100%100%
   mandatoryTest_6_1_41.js100%100%100%100%
   mandatoryTest_6_1_42.js98.88%95.83%100%100%223
   mandatoryTest_6_1_43.js100%100%100%100%
   mandatoryTest_6_1_44.js100%100%100%100%
   mandatoryTest_6_1_45.js100%100%100%100%
   mandatoryTest_6_1_46.js89.66%70%100%100%69, 73, 76
   mandatoryTest_6_1_47.js97.22%91.67%100%100%82
   mandatoryTest_6_1_49.js97.50%91.67%100%100%99
   mandatoryTest_6_1_51.js100%100%100%100%
   mandatoryTest_6_1_52.js100%100%100%100%
   mandatoryTest_6_1_53.js100%100%100%100%
   mandatoryTest_6_1_54.js73.44%66.67%100%76.32%101, 101, 101–103, 121–122, 54, 62, 72, 92, 92–93, 93, 93–95
   mandatoryTest_6_1_56.js100%100%100%100%
   mandatoryTest_6_1_57.js100%100%100%100%
   mandatoryTest_6_1_58.js100%100%100%100%
   mandatoryTest_6_1_6.js97.92%95.83%100%100%59
   mandatoryTest_6_1_60_1.js91.30%75%100%100%37, 41
   mandatoryTest_6_1_61.js100%100%100%100%
   mandatoryTest_6_1_7.js100%100%100%100%
   mandatoryTest_6_1_8.js85.25%73.33%100%96.67%100, 103, 112, 115, 74–75, 81, 88, 91
   mandatoryTest_6_1_9.js100%100%100%100%
   mandatoryTests_6_1_38.js100%100%100%100%
csaf_2_1/mandatoryTests/shared
   docProductUtils.js86.52%68.75%100%95.74%100, 103, 129–130, 135, 169, 172, 78–79, 85, 88, 99
   wildcardUtils.js100%100%100%100%
csaf_2_1/recommendedTests
   recommendedTest_6_2_1.js96.55%87.50%100%100%77
   recommendedTest_6_2_10.js0%100%0%0%7
   recommendedTest_6_2_11.js96.55%90.91%100%100%61, 86
   recommendedTest_6_2_12.js100%100%100%100%
   recommendedTest_6_2_13.js100%100%100%100%
   recommendedTest_6_2_14.js100%100%100%100%
   recommendedTest_6_2_15.js100%100%100%100%
   recommendedTest_6_2_16.js98.11%95%100%100%125
   recommendedTest_6_2_17.js100%100%100%100%
   recommendedTest_6_2_18.js100%100%100%100%
   recommendedTest_6_2_19.js97.60%91.89%100%100%100, 210, 98
   recommendedTest_6_2_2.js100%100%100%100%
   recommendedTest_6_2_21.js100%100%100%100%
   recommendedTest_6_2_22.js100%100%100%100%
   recommendedTest_6_2_23.js94.12%80%100%100%63, 65
   recommendedTest_6_2_25.js94.44%83.33%100%100%63, 65
   recommendedTest_6_2_27.js91.38%75%100%97.14%124–125, 141, 145, 166
   recommendedTest_6_2_28.js100%100%100%100%
   recommendedTest_6_2_29.js100%100%100%100%
   recommendedTest_6_2_3.js88.89%75%80%94.44%64, 66
   recommendedTest_6_2_30.js100%100%100%100%
   recommendedTest_6_2_32.js98.11%93.75%100%100%126, 136
   recommendedTest_6_2_33.js100%100%100%100%
   recommendedTest_6_2_36.js100%100%100%100%
   recommendedTest_6_2_38.js100%100%100%100%
   recommendedTest_6_2_39_2.js96.67%91.67%100%100%78
   recommendedTest_6_2_39_3.js96.67%91.67%100%100%78
   recommendedTest_6_2_39_4.js96.67%91.67%100%100%78
   recommendedTest_6_2_39_5.js100%100%100%100%
   recommendedTest_6_2_4.js100%100%100%100%
   recommendedTest_6_2_40.js96.49%91.67%100%100%119, 93
   recommendedTest_6_2_41.js100%100%100%100%
   recommendedTest_6_2_42.js99.32%98.25%100%100%158
   recommendedTest_6_2_43.js100%100%100%100%
   recommendedTest_6_2_47.js100%100%100%100%
   recommendedTest_6_2_48.js100%100%100%100%
   recommendedTest_6_2_49.js100%100%100%100%
   recommendedTest_6_2_5.js100%100%100%100%
   recommendedTest_6_2_52.js100%100%100%100%
   recommendedTest_6_2_53.js100%100%100%100%
   recommendedTest_6_2_54_3.js100%100%100%100%
   recommendedTest_6_2_6.js100%100%100%100%
   recommendedTest_6_2_7.js100%100%100%100%
   recommendedTest_6_2_8.js100%100%100%100%
   recommendedTest_6_2_9.js100%100%100%100%
csaf_2_1/recommendedTests/shared
   checkForUnsafeHashAlgorithms.js95.83%83.33%100%100%31
   deepEqual.js93.48%85.71%100%100%25, 33, 45
csaf_2_1/schemaTests
   csaf_2_1.js63.64%50%50%80%21, 23, 23
   csaf_2_1_strict.js63.64%50%50%80%21, 23, 23
csaf_2_1/shared
   ssvcNamespaces.js100%100%100%100%
csaf_2_1/shared/csafHelpers
   walkHashes.js85%66.67%100%91.18%100, 117–118, 123, 140–141, 146, 94–95
lib
   cwec.js13.04%100%12.28%13.79%17–23, 27, 30–43, 45, 47–73
   walkPaths.js100%100%100%100%
lib/informativeTests
   informativeTest_6_3_1.js100%100%100%100%
   informativeTest_6_3_10.js93.33%90%100%94.12%47–48
   informativeTest_6_3_11.js93.94%92.31%100%94.12%47–48
   informativeTest_6_3_2.js100%100%100%100%
   informativeTest_6_3_3.js100%100%100%100%
   informativeTest_6_3_4.js100%100%100%100%
   informativeTest_6_3_5.js94.74%83.33%100%100%30
   informativeTest_6_3_6.js92.63%80.88%100%99.03%196–197, 222, 242, 268, 283, 291, 336, 344, 374, 382, 402, 418, 430
   informativeTest_6_3_7.js90.32%83.33%100%92.86%53–54, 58
   informativeTest_6_3_8.js90.83%78.38%100%96.67%238–239, 243, 245, 297–298, 329, 393, 398, 421
   informativeTest_6_3_9.js89.83%76.47%100%94.29%42–43, 54–55, 58, 68
lib/informativeTests/shared
   testURL.js100%100%100%100%
lib/mandatoryTests

Comment thread tests/spdx.js

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parser does not enforce whitespace around WITH, AND, and OR

I think this part of the specification is not implemented correctly yet:

There MUST NOT be white space between a license-id and any following +. This supports easy parsing and backwards compatibility. There MUST be white space on either side of the operator WITH. There MUST be white space and/or parentheses on either side of the operators AND and OR.

To verify this, the following tests reproduce the issue:

it('requires white space on both sides of `WITH`', () => {
  expect(() => parse('MIT WITHClasspath-exception-2.0')).to.throw(SyntaxError)
})

it('requires white space on both sides of `AND/OR`', () => {
  expect(() => parse('MIT ANDClasspath-exception-2.0')).to.throw(SyntaxError)
  expect(() => parse('MIT ORClasspath-exception-2.0')).to.throw(SyntaxError)
})

it('requires white space and/or parentheses on both sides of `AND`', () => {
  // Missing separator on either side must be rejected
  expect(() => parse('(MIT)ANDBSD-3-Clause')).to.throw(SyntaxError)
  expect(() => parse('MITAND(BSD-3-Clause)')).to.throw(SyntaxError)
})

Currently these expressions are parsed without throwing a SyntaxError, even though the spec requires whitespace (and/or parentheses) around WITH, AND, and OR. It looks like the parser/lexer doesn't enforce this separator rule strictly enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants