File tree Expand file tree Collapse file tree 4 files changed +13
-4
lines changed
components/SysdigVMRegistryFetchComponent Expand file tree Collapse file tree 4 files changed +13
-4
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " @sysdig/backstage-plugin-sysdig" ,
3- "version" : " 1.2 .0" ,
3+ "version" : " 1.3 .0" ,
44 "main" : " dist/index.esm.js" ,
55 "types" : " dist/index.d.ts" ,
66 "license" : " Apache-2.0" ,
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ import {
2323 // annotations
2424 SYSDIG_REGISTRY_NAME_ANNOTATION ,
2525 SYSDIG_REGISTRY_VENDOR_ANNOTATION ,
26+ SYSDIG_REGISTRY_REPOSITORY_ANNOTATION ,
2627 SYSDIG_CUSTOM_FILTER_ANNOTATION ,
2728
2829 // methods
@@ -32,8 +33,7 @@ import {
3233 API_PROXY_BASE_PATH ,
3334 API_VULN_REGISTRY ,
3435 getBacklink
35- } from '../../lib'
36-
36+ } from '../../lib' ;
3737
3838type RegistryScan = {
3939 mainAssetName : string ,
@@ -129,6 +129,11 @@ export const SysdigVMRegistryFetchComponent = () => {
129129 name = annotations [ SYSDIG_REGISTRY_VENDOR_ANNOTATION ]
130130 filters . push ( 'registry.vendor="' + name + '"' ) ;
131131 }
132+
133+ if ( SYSDIG_REGISTRY_REPOSITORY_ANNOTATION in annotations ) {
134+ name = annotations [ SYSDIG_REGISTRY_REPOSITORY_ANNOTATION ]
135+ filters . push ( 'repository.name="' + name + '"' ) ;
136+ }
132137
133138 if ( filters . length == 0 ) {
134139 return [ ]
Original file line number Diff line number Diff line change @@ -110,6 +110,9 @@ export const SYSDIG_REGISTRY_NAME_ANNOTATION = "sysdigcloud.com/registry-name";
110110// The registry vendor that will be included in the results. Example: "harbor"
111111export const SYSDIG_REGISTRY_VENDOR_ANNOTATION = "sysdigcloud.com/registry-vendor" ;
112112
113+ // The registry repository that will be included in the results. Example: "library/nginx"
114+ export const SYSDIG_REGISTRY_REPOSITORY_ANNOTATION = "sysdigcloud.com/registry-repository" ;
115+
113116/*
114117 * Pipeline
115118 */
Original file line number Diff line number Diff line change @@ -27,7 +27,8 @@ export {
2727 SYSDIG_WORKLOAD_TYPE_ANNOTATION ,
2828 SYSDIG_CONTAINER_ANNOTATION ,
2929 SYSDIG_REGISTRY_NAME_ANNOTATION ,
30- SYSDIG_REGISTRY_VENDOR_ANNOTATION ,
30+ SYSDIG_REGISTRY_VENDOR_ANNOTATION ,
31+ SYSDIG_REGISTRY_REPOSITORY_ANNOTATION ,
3132 SYSDIG_IMAGE_FREETEXT_ANNOTATION ,
3233 SYSDIG_CUSTOM_FILTER_ANNOTATION
3334} from './annotations'
You can’t perform that action at this time.
0 commit comments