-
Notifications
You must be signed in to change notification settings - Fork 23
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: add purl as a CLI options #401
Conversation
75c3e6e
to
f3375ef
Compare
e195002
to
145c2ac
Compare
I have no further suggestions or comments for this PR. The only minor comments I could raise relate to the functions that will be moved into the Repo Finder as part of PR 388. I see no reason to discuss them here when that PR will change them anyway, and is blocked by this one. |
Signed-off-by: Trong Nhan Mai <[email protected]>
Signed-off-by: Trong Nhan Mai <[email protected]>
… expectation files Signed-off-by: Trong Nhan Mai <[email protected]>
Signed-off-by: Trong Nhan Mai <[email protected]>
Signed-off-by: Trong Nhan Mai <[email protected]>
7a84f6f
to
fe7d780
Compare
…ith PURL and repository path Signed-off-by: Trong Nhan Mai <[email protected]>
This method is used to handle the cases where the purl type value is not the git domain but a pre-defined | ||
repo-based type in https://github.com/package-url/purl-spec/blob/master/PURL-TYPES.rst. | ||
|
||
Note that this method will be updated when there are new pre-defined type as per the PURL specification. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that this method will be updated when there are new pre-defined type as per the PURL specification. | |
Note that this method will be updated when there are new pre-defined types as per the PURL specification. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in f66b0be
docs/source/pages/using.rst
Outdated
|
||
pkg:<git_service_domain>/<organization>/<name> | ||
|
||
The list bellow shows examples for the corresponding PURL string for different git repositories: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The list bellow shows examples for the corresponding PURL string for different git repositories: | |
The list bellow shows examples for the corresponding PURL strings for different git repositories: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 229e039
Signed-off-by: Trong Nhan Mai <[email protected]>
Signed-off-by: Trong Nhan Mai <[email protected]>
Signed-off-by: Trong Nhan Mai <[email protected]>
Signed-off-by: Trong Nhan Mai <[email protected]>
Signed-off-by: Trong Nhan Mai <[email protected]>
Description
This Pull request adds a CLI option to Macaron, called
-purl/--package-url
, for the user to provide the Package URL (see the specification here) for the main analysis software component.Types of PURL this feature supports.
A "repo-based" PURL.
According to the PURL specification, a PURL string could be used to reference a git repository path.
The format for a "repo-based" PURL would be:
Where:
type
: could be the pre-defined types for git-based packages as mentioned here. At the current time of this PR, there are only two git-based PURL:github
andbitbucket
. However, the user could use the git service domain as thetype
(e.g.github.com
orgitlab.com
).organization/repo-name
: the repository fullname, which is expected to have 2 components. Example:apache/maven
ororacle/macaron
,Other PURL types
At this stage, this type contains PURL strings which do not belong to the first type.
Supported use case
Provide the repository path
This use case is what Macaron has been offering. No changes are made to it.
Provide PURL only
When only the PURL is provided for the main software component:
Example:
Provide PURL with repository path
This is used for the case where the user want to analyze a software component not being a git repository. The repository path is provided from the user to map with that software component.
Note that the branch name and the commit hash must be provide. This enforcement is to prevent Macaron mapping the software component with an incorrect repository snapshot.
Example: