@@ -41,7 +41,6 @@ type SequentialFetcher struct{}
4141// 3. Reads the content & adds it to the iterator along with path.
4242func (f * SequentialFetcher ) Fetch (ctx tcontext.TransferMetadata , config * FolderConfig ) (iterator.SBOMIterator , error ) {
4343 logger .LogDebug (ctx .Context , "Fetching SBOMs Sequentially" )
44-
4544 var sbomList []* iterator.SBOM
4645 err := filepath .Walk (config .FolderPath , func (path string , info os.FileInfo , err error ) error {
4746 if err != nil {
@@ -64,16 +63,13 @@ func (f *SequentialFetcher) Fetch(ctx tcontext.TransferMetadata, config *FolderC
6463 }
6564
6665 if source .IsSBOMFile (content ) {
67-
68- projectName , projectVersion := getProjectNameAndVersion (ctx , path , content )
69- logger .LogDebug (ctx .Context , "Project Details" , "name" , projectName , "version" , projectVersion )
66+ logger .LogDebug (ctx .Context , "Locally SBOM located folder" , "path" , config .FolderPath )
7067
7168 fileName := getFilePath (config .FolderPath , path )
7269 sbomList = append (sbomList , & iterator.SBOM {
7370 Data : content ,
7471 Path : fileName ,
75- Namespace : projectName ,
76- Version : projectVersion ,
72+ Namespace : config .FolderPath ,
7773 })
7874 } else {
7975 logger .LogDebug (ctx .Context , "Skipping non-SBOM file" , "path" , getFilePath (config .FolderPath , path ))
@@ -128,8 +124,7 @@ func (f *ParallelFetcher) Fetch(ctx tcontext.TransferMetadata, config *FolderCon
128124 continue
129125 }
130126
131- projectName , projectVersion := getProjectNameAndVersion (ctx , path , content )
132- logger .LogDebug (ctx .Context , "Project Details" , "name" , projectName , "version" , projectVersion )
127+ logger .LogDebug (ctx .Context , "Locally SBOM located folder" , "path" , config .FolderPath )
133128
134129 // get a relative file path.
135130 fileName := getFilePath (config .FolderPath , path )
@@ -138,8 +133,7 @@ func (f *ParallelFetcher) Fetch(ctx tcontext.TransferMetadata, config *FolderCon
138133 sbomList = append (sbomList , & iterator.SBOM {
139134 Data : content ,
140135 Path : fileName ,
141- Namespace : projectName ,
142- Version : projectVersion ,
136+ Namespace : config .FolderPath ,
143137 })
144138 mu .Unlock ()
145139 }
0 commit comments