-
Notifications
You must be signed in to change notification settings - Fork 22
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
Refactor Package Manifest Parsing into a Reader Interface #21
Comments
Overview
It also supports the undocumented feature of reading declared dependencies from a python binary wheel file. In future, it will support binary artifacts such as The current implementation for this package manifest reading capability is strongly coupled with the GoalThe goal of this feature is to refactor the package manifest reader logic implemented in Requirements
Benefits
DesignCurrent DesignProposed DesignProposed InterfaceThe readers implementation will work on following core models:
Following ISP, we will define 2 interfaces:
[1] will be used to read manifest(s) from a source such as directory or a single binary artifact (e.g. jar). [1] will expose the package manifest entity and a default implementation of [2] to the caller. [2] in turn is a contract for reading packages from a single manifest, hiding the parser and other details. API ChangesThe package manifest reader interface will introduce a new API. This API will be used by implementations (e.g. directory based package manifest loaders). The Data Model ChangesNo data model change is required for this feature. The package manifest interface will work on the existing core models. UI ChangesNo UI change is required for this feature ImplementationThe implementation will extend the reader interface implemented as a stop gap solution for #13 The implementation will hide all details regarding reading a manifest and subsequently packages from the manifest for rest of the system ( Following package manifest readers will be implemented following the reader interface (contract):
The UI adapter for scan command need to change to initialize appropriate package manifest readers based on command line arguments. The list of package manifest readers will subsequently used to initialize the scanner TestingTest cases will be implemented following Go Table Driven Testing for each implementation of package manifest readers. The impact of change is limited to package manifest loading. DeploymentThe feature will be first merged with the DocumentationNo user documentation change is needed. Code documentation will be written following |
Currently different operations are performed to read package manifests from:
In future, we may need to be able to read from SBOM (SPDX, CycloneDX). To be able to ensure separation of concerns, we should
The text was updated successfully, but these errors were encountered: