File tree Expand file tree Collapse file tree
test/lib/analyzer/package-managers Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -93,11 +93,6 @@ export function purl(
9393 vendor = osRelease . name ;
9494 }
9595
96- // Use 'dhi' namespace for Docker Hardened Images packages
97- if ( curPkg . Maintainer === "Docker Hardened Images <dhi@docker.com>" ) {
98- vendor = "dhi" ;
99- }
100-
10196 return new PackageURL (
10297 "deb" ,
10398 vendor ,
@@ -156,9 +151,6 @@ function parseDpkgLine(
156151 curPkg . Provides . push ( name ) ;
157152 }
158153 break ;
159- case "Maintainer" :
160- curPkg . Maintainer = value ;
161- break ;
162154 case "Pre-Depends" :
163155 case "Depends" :
164156 for ( const depElem of value . split ( "," ) ) {
Original file line number Diff line number Diff line change @@ -10,7 +10,6 @@ export interface AnalyzedPackage {
1010 Version ?: string ;
1111 Source ?: string ;
1212 SourceVersion ?: string ;
13- Maintainer ?: string ;
1413 Provides : string [ ] ;
1514 Deps : {
1615 [ name : string ] : any ;
Original file line number Diff line number Diff line change @@ -39,30 +39,4 @@ describe("purl()", () => {
3939 } as unknown as AnalyzedPackageWithVersion ) ,
4040 ) . toEqual ( "pkg:deb/bar@1.2.3-4?upstream=foo%405.6.7%2B8" ) ;
4141 } ) ;
42-
43- it ( "uses 'dhi' namespace for Docker Hardened Images packages" , ( ) => {
44- expect (
45- purl (
46- {
47- Name : "curl" ,
48- Version : "7.88.1-10+deb12u8" ,
49- Maintainer : "Docker Hardened Images <dhi@docker.com>" ,
50- } as unknown as AnalyzedPackageWithVersion ,
51- { name : "debian" , version : "12" , prettyName : "Debian GNU/Linux 12" } ,
52- ) ,
53- ) . toEqual ( "pkg:deb/dhi/curl@7.88.1-10%2Bdeb12u8?distro=debian-bookworm" ) ;
54- } ) ;
55-
56- it ( "uses osRelease vendor when maintainer is not Docker Hardened Images" , ( ) => {
57- expect (
58- purl (
59- {
60- Name : "curl" ,
61- Version : "7.88.1-10+deb12u8" ,
62- Maintainer : "Some Other Maintainer <other@example.com>" ,
63- } as unknown as AnalyzedPackageWithVersion ,
64- { name : "debian" , version : "12" , prettyName : "Debian GNU/Linux 12" } ,
65- ) ,
66- ) . toEqual ( "pkg:deb/debian/curl@7.88.1-10%2Bdeb12u8?distro=debian-bookworm" ) ;
67- } ) ;
6842} ) ;
You can’t perform that action at this time.
0 commit comments