Skip to content

Commit

Permalink
Merge pull request #84 from scanoss/feature/mdaloia/SP-1856-Scanoss-P…
Browse files Browse the repository at this point in the history
…y-Update-scanoss-settings-file-schema

feat: SP-1856 scanoss py update scanoss settings file schema
  • Loading branch information
matiasdaloia authored Dec 20, 2024
2 parents 71659be + 3f77e7c commit ba50802
Show file tree
Hide file tree
Showing 15 changed files with 1,829 additions and 351 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ docs/build

!tests/data/*.json
!docs/source/_static/*.json
!scanoss-settings-schema.json
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Upcoming changes...

## [1.19.0] - 2024-11-20
### Fixed
- Check if legacy sbom file before post processing
### Added
- Use scanoss.json as default settings file if no argument is supplied
- Add —skip-settings-file flag
- Update scanoss settings schema to allow skipping specific folders, files, and extensions
- Add FileFilters class to handle filtering of files and folders based on settings

## [1.18.1] - 2024-11-19
### Added
- Added 'component' field in CycloneDX output
Expand Down Expand Up @@ -408,4 +417,5 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
[1.17.4]: https://github.com/scanoss/scanoss.py/compare/v1.17.3...v1.17.4
[1.17.5]: https://github.com/scanoss/scanoss.py/compare/v1.17.4...v1.17.5
[1.18.0]: https://github.com/scanoss/scanoss.py/compare/v1.17.5...v1.18.0
[1.18.1]: https://github.com/scanoss/scanoss.py/compare/v1.17.5...v1.18.1
[1.18.1]: https://github.com/scanoss/scanoss.py/compare/v1.18.0...v1.18.1
[1.19.0]: https://github.com/scanoss/scanoss.py/compare/v1.18.1...v1.19.0
122 changes: 122 additions & 0 deletions docs/source/_static/scanoss-settings-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,127 @@
}
}
},
"settings": {
"type": "object",
"description": "Scan settings and other configurations",
"properties": {
"skip": {
"type": "object",
"description": "Set of rules to skip files from fingerprinting and scanning",
"properties": {
"patterns": {
"type": "object",
"properties": {
"scanning": {
"type": "array",
"description": "List of glob patterns to skip files from scanning",
"items": {
"type": "string",
"examples": [
"path/to/folder",
"path/to/folder/**",
"path/to/folder/**/*",
"path/to/file.c",
"path/to/another/file.py",
"**/*.ts",
"**/*.json"
]
},
"uniqueItems": true
},
"fingerprinting": {
"type": "array",
"description": "List of glob patterns to skip files from fingerprinting",
"items": {
"type": "string",
"examples": [
"path/to/folder",
"path/to/folder/**",
"path/to/folder/**/*",
"path/to/file.c",
"path/to/another/file.py",
"**/*.ts",
"**/*.json"
]
},
"uniqueItems": true
}
}
},
"sizes": {
"type": "object",
"description": "Set of rules to skip files based on their size.",
"properties": {
"scanning": {
"type": "array",
"items": {
"type": "object",
"properties": {
"patterns": {
"type": "array",
"description": "List of glob patterns to apply the min/max size rule",
"items": {
"type": "string",
"examples": [
"path/to/folder",
"path/to/folder/**",
"path/to/folder/**/*",
"path/to/file.c",
"path/to/another/file.py",
"**/*.ts",
"**/*.json"
]
}
},
"min": {
"type": "integer",
"description": "Minimum size of the file in bytes"
},
"max": {
"type": "integer",
"description": "Maximum size of the file in bytes"
}
}
}
},
"fingerprinting": {
"type": "array",
"items": {
"type": "object",
"properties": {
"patterns": {
"type": "array",
"description": "List of glob patterns to apply the min/max size rule",
"items": {
"type": "string"
},
"examples": [
"path/to/folder",
"path/to/folder/**",
"path/to/folder/**/*",
"path/to/file.c",
"path/to/another/file.py",
"**/*.ts",
"**/*.json"
]
},
"min": {
"type": "integer",
"description": "Minimum size of the file in bytes"
},
"max": {
"type": "integer",
"description": "Maximum size of the file in bytes"
}
}
}
}
}
}
}
}
}
},
"bom": {
"type": "object",
"description": "BOM Rules: Set of rules that will be used to modify the BOM before and after the scan is completed",
Expand Down Expand Up @@ -130,3 +251,4 @@
}
}
}

Loading

0 comments on commit ba50802

Please sign in to comment.