Skip to content

fix: Disable strict filename validation for default schema#167

Merged
italvi merged 8 commits intomainfrom
150-filename-validation-happens-with-default-schema
May 14, 2024
Merged

fix: Disable strict filename validation for default schema#167
italvi merged 8 commits intomainfrom
150-filename-validation-happens-with-default-schema

Conversation

@mmarseu
Copy link
Copy Markdown
Collaborator

@mmarseu mmarseu commented Apr 24, 2024

By default, validation against the default schema is now more lenient with filenames. Warnings are generated for any filename that doesn't match either bom.json or *.cdx.json.

Custom filename pattern validation is not affected and remains an error.

@mmarseu mmarseu requested review from CBeck-96 and italvi April 24, 2024 12:24
@mmarseu mmarseu self-assigned this Apr 24, 2024
@mmarseu mmarseu linked an issue Apr 24, 2024 that may be closed by this pull request
@github-actions github-actions bot added enhancement New feature or request unittests labels Apr 24, 2024
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 24, 2024

Coverage

Coverage Report •
FileStmtsMissCoverMissing
__main__.py3111595%205–206, 223, 627–628, 632–637, 639, 642, 654–655
validator
   helper.py480100% 
   validate.py79494%39, 87, 103, 138
TOTAL15976695% 

Tests Skipped Failures Errors Time
283 2 💤 0 ❌ 0 🔥 4.509s ⏱️

Copy link
Copy Markdown
Collaborator

@italvi italvi left a comment

Choose a reason for hiding this comment

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

@mmarseu Just some small comments, I think the most critical one is the no-filename being ambiguous.

Comment thread cdxev/__main__.py Outdated
Comment thread cdxev/validator/validate.py Outdated
Comment thread cdxev/validator/validate.py Outdated
Comment thread cdxev/__main__.py Outdated
Comment thread tests/test_validate.py
Comment thread cdxev/__main__.py Outdated
@github-actions github-actions bot added the documentation Improvements or additions to documentation label May 13, 2024
Copy link
Copy Markdown
Collaborator

@italvi italvi left a comment

Choose a reason for hiding this comment

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

@mmarseu I'm fine with the changes, still seems odd that the SBOM is completely compliant, even though you get a warning:
image

But I am fine with it, as the "vanilla" CycloneDX only recommends a naming convention.

@italvi italvi merged commit 78e612f into main May 14, 2024
@italvi italvi deleted the 150-filename-validation-happens-with-default-schema branch May 14, 2024 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request unittests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Filename validation happens with default schema

2 participants