Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion cmd/httpx/httpx.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,11 @@ func setupOptionalAssetUpload(opts *runner.Options) *pdcp.UploadWriter {
opts.OnClose = func() {
writer.Close()
}

// add additional metadata
if opts.AssetID != "" {
// silently ignore
_ = writer.SetAssetID(opts.AssetID)
writer.SetAssetID(opts.AssetID)
}
if opts.AssetName != "" {
// silently ignore
Expand Down
5 changes: 2 additions & 3 deletions internal/pdcp/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,11 @@ func (u *UploadWriter) GetWriterCallback() runner.OnResultCallback {
}

// SetAssetID sets the scan id for the upload writer
func (u *UploadWriter) SetAssetID(id string) error {
func (u *UploadWriter) SetAssetID(id string) {
if !xidRegex.MatchString(id) {
return fmt.Errorf("invalid asset id provided")
gologger.Warning().Msgf("invalid asset id provided (unknown xid format): %s", id)
}
u.assetGroupID = id
return nil
}

// SetAssetGroupName sets the scan name for the upload writer
Expand Down
Loading