Skip to content

Commit 4ac80d3

Browse files
refoo0timbastin
authored andcommitted
Adds default artifact name in UploadVEX method
Signed-off-by: rafi <[email protected]>
1 parent deac95a commit 4ac80d3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

controllers/scan_controller.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,10 @@ func (s ScanController) UploadVEX(ctx shared.Context) error {
109109
return echo.NewHTTPError(500, "could not find or create asset version").WithInternal(err)
110110
}
111111

112+
if artifactName == "" {
113+
artifactName = normalize.ArtifactPurl(ctx.Request().Header.Get("X-Scanner"), org.Slug+"/"+project.Slug+"/"+asset.Slug)
114+
}
115+
112116
artifact := models.Artifact{
113117
ArtifactName: artifactName,
114118
AssetVersionName: assetVersionName,

0 commit comments

Comments
 (0)