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

feat: collect evidences for license #1309

Merged
merged 28 commits into from
Oct 7, 2024
Merged
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
ac8c142
feat(EvidenceCollection): collect evidences for licence and copyright…
Frozen-byte Oct 2, 2024
5bf84dc
chore(EvidenceCollection): sync readme parameters adding `collectEvid…
Frozen-byte Oct 3, 2024
30d5de9
fix(EvidenceCollection): refactor collectEvidence into an option obje…
Frozen-byte Oct 3, 2024
9906cbf
fix(EvidenceCollection): revert breaking change of node18
Frozen-byte Oct 3, 2024
107d2b7
fix(EvidenceCollection): remove copyright collection feature
Frozen-byte Oct 3, 2024
f32c1c7
fix(EvidenceCollection): remove spec check for evidence feature
Frozen-byte Oct 3, 2024
7dd053c
chore(EvidenceCollection): refactor to yielding
Frozen-byte Oct 4, 2024
6711ad2
fix(EvidenceCollection): use named licenses for evidence
Frozen-byte Oct 4, 2024
4d33603
chore(EvidenceCollection): uppercase the case-insensitive regex
Frozen-byte Oct 4, 2024
abe3bc3
chore(EvidenceCollection): use single switch instead of option obj
Frozen-byte Oct 4, 2024
1336a1b
chore(EvidenceCollection): keep related code together
Frozen-byte Oct 4, 2024
1976436
chore(EvidenceCollection): avoid explicit variable names that are jus…
Frozen-byte Oct 4, 2024
895b1c2
chore(EvidenceCollection): code-style
Frozen-byte Oct 4, 2024
1e84884
fix(EvidenceCollection): rm unused argument
Frozen-byte Oct 4, 2024
1293b13
chore(EvidenceCollection): refactor getComponentEvidence to extractor…
Frozen-byte Oct 4, 2024
873006b
fix(EvidenceCollection): as missing slash when concatenating path and…
Frozen-byte Oct 4, 2024
9b7b253
chore(Testing): enable collectEvidence option for tests and update sn…
Frozen-byte Oct 4, 2024
e2e44b0
Revert "chore(Testing): enable collectEvidence option for tests and u…
Frozen-byte Oct 5, 2024
9e41244
fix(EvidenceCollection): remove copyright collection documentation si…
Frozen-byte Oct 5, 2024
d4fd58f
feat(Tests): enable collectEvidence option for tests and update snapshot
Frozen-byte Oct 7, 2024
bf5b1d8
chore(docs): was created by v18
Frozen-byte Oct 7, 2024
b652ae0
fix(Tests): add dummy notice and licence file for the evidence collec…
Frozen-byte Oct 7, 2024
f9dede8
fix(Tests): update snapshots with expected license files
Frozen-byte Oct 7, 2024
796a513
tests: fix setup of new testbed
jkowalleck Oct 7, 2024
03b0346
fix(Tests): update snapshots with new timestamps
Frozen-byte Oct 7, 2024
b0a5c89
fix(Tests): use reproducibleResults in tests to keep snapshot in sync
Frozen-byte Oct 7, 2024
1f987ac
Update HISTORY.md
jkowalleck Oct 7, 2024
7faf23e
Merge branch 'master' into master
jkowalleck Oct 7, 2024
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
Prev Previous commit
Next Next commit
fix(EvidenceCollection): remove copyright collection documentation si…
…nce feature got moved

Signed-off-by: frozen_byte <frozen_byte@gmx.de>
Frozen-byte committed Oct 7, 2024
commit 9e41244855260b86155f73ba10f31e20d920a9ac
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -49,7 +49,7 @@ new CycloneDxWebpackPlugin(options?: object)
| **`specVersion`** | `{string}`<br/>one of: `"1.2"`, `"1.3"`, `"1.4"`, `"1.5"`, `"1.6"` | `"1.4"` | Which version of [CycloneDX-spec] to use.<br/> Supported values depend on the installed dependency [CycloneDX-javascript-library]. |
| **`reproducibleResults`** | `{boolean}` | `false` | Whether to go the extra mile and make the output reproducible.<br/> Reproducibility might result in loss of time- and random-based-values. |
| **`validateResults`** | `{boolean}` | `true` | Whether to validate the BOM result.<br/>Validation is skipped, if requirements not met. Requires [transitive optional dependencies](https://github.com/CycloneDX/cyclonedx-javascript-library#optional-dependencies). |
| **`collectEvidence`** | `{boolean}` | `false` | Look for common files that may provide licenses or copyrights and attach them to the component as evidence. |
| **`collectEvidence`** | `{boolean}` | `false` | Look for common files that may provide licenses and attach them to the component as evidence. |
| **`outputLocation`** | `{string}` | `"./cyclonedx"` | Path to write the output to. The path is relative to _webpack_'s overall output path. |
| **`includeWellknown`** | `{boolean}` | `true` | Whether to write the Wellknowns. |
| **`wellknownLocation`** | `{string}` | `"./.well-known"` | Path to write the Wellknowns to. The path is relative to _webpack_'s overall output path. |
4 changes: 2 additions & 2 deletions src/_helpers.ts
Original file line number Diff line number Diff line change
@@ -75,9 +75,9 @@ export function loadJsonFile (path: string): any {
// see https://github.com/tc39/proposal-import-attributes
}

const LICENSE_FILENAME_PATTERN = /^(?:UN)?LICEN[CS]E|NOTICE|COPYRIGHTNOTICE/i
const LICENSE_FILENAME_PATTERN = /^(?:UN)?LICEN[CS]E|NOTICE/i
/**
* Searches typical files in the package path which have typical a license notice or copyright text inside
* Searches typical files in the package path which have typical a license notice text inside
*
* @param {string} searchFolder folder to look for common filenames
*
2 changes: 1 addition & 1 deletion src/plugin.ts
Original file line number Diff line number Diff line change
@@ -54,7 +54,7 @@ export interface CycloneDxWebpackPluginOptions {
validateResults?: CycloneDxWebpackPlugin['validateResults']

/**
* Look for common files that may provide licenses or copyrights and attach them to the component as evidence
* Look for common files that may provide licenses and attach them to the component as evidence
*
* @default false
*/