generated from oracle/template-repo
    
        
        - 
                Notifications
    You must be signed in to change notification settings 
- Fork 30
Open
Labels
bugSomething isn't workingSomething isn't workingreportRelated to the HTML reportRelated to the HTML reportuser_experienceThe issue related to user experienceThe issue related to user experience
Description
How to replicate
Run this command:
macaron analyze -rp https://github.com/ben-manes/caffeine.git --skip-depsBecause this repository doesn't have a provenance that Macaron can detect, Macaron put an inferred provenance in the final JSON report.
The content of the JSON report of this analysis is as follow:
...
                             "invocation": {
                                "configSource": {
                                    "uri": "https://github.com/ben-manes/caffeine@refs/heads/None",
...
Description
The logic for generating the content of invocation.configSource.uri for the inferred provenance is located here:
predicate["invocation"]["configSource"]["uri"] = (
    f"{ctx.component.repository.remote_path}"
    f"@refs/heads/{ctx.component.repository.branch_name}"
)In scenarios where the branch name is not available, the content of this uri will be incorrect
Suggestion
If the branch name is not available for this software component, we can use f"{ctx.component.repository.remote_path}" only without f"@refs/heads/{ctx.component.repository.branch_name}"
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingreportRelated to the HTML reportRelated to the HTML reportuser_experienceThe issue related to user experienceThe issue related to user experience