Skip to content

Commit 023b8ee

Browse files
authored
feat(registry-scanner): ovveride platform scanning logic (#1496)
1 parent 84c7872 commit 023b8ee

File tree

7 files changed

+24
-4
lines changed

7 files changed

+24
-4
lines changed

charts/registry-scanner/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Sysdig Registry Scanner
44
type: application
55
home: https://www.sysdig.com/
66
icon: https://avatars.githubusercontent.com/u/5068817?s=200&v=4
7-
version: 1.1.25
8-
appVersion: 0.2.60
7+
version: 1.1.26
8+
appVersion: 0.2.61
99
maintainers:
1010
- name: sysdiglabs

charts/registry-scanner/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ The following table lists the configurable parameters of the Sysdig Registry Sca
9393
| config.scan.jobs.resources.requests.cpu | The CPU request for the scanner job. | <code>500m</code> |
9494
| config.scan.jobs.resources.limits.memory | The memory limit for the scanner job. | <code>2Gi</code> |
9595
| config.scan.jobs.temporaryVolumeSizeLimit | The size limit for the emptyDir volume used by the scanner job.<br/> This volume is used to store both the vulnerability database and the image to scan. | <code>2Gi</code> |
96+
| config.scan.disablePlatformScanning | Force the scan to happen on the client component rather than relying on backend scanning | <code>false</code> |
9697
| config.parallelGoRoutines | Number of goroutines running in parallel in metadata phase for ECR Org setup. | <code>100</code> |
9798
| ssl.ca.certs | For outbound connections. <br/>List of PEM-encoded x509 certificate authority. | <code>[]</code> |
9899
| customLabels | The additional labels to add to CronJob and Scanning Jobs. The custom labels to be added to kubernetes manifests of all the resources created. | <code>{}</code> |
@@ -129,7 +130,7 @@ Use the following command to deploy:
129130
helm upgrade --install registry-scanner \
130131
--namespace sysdig-agent \
131132
--create-namespace \
132-
--version=1.1.25 \
133+
--version=1.1.26 \
133134
--set config.secureBaseURL=<SYSDIG_SECURE_URL> \
134135
--set config.secureAPIToken=<SYSDIG_SECURE_API_TOKEN> \
135136
--set config.secureSkipTLS=true \

charts/registry-scanner/README.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ Use the following command to deploy:
6262
helm upgrade --install registry-scanner \
6363
--namespace sysdig-agent \
6464
--create-namespace \
65-
{{ with .Chart.Version }}--version={{.}} {{ end }} \
65+
{{ with .Chart.Version }}--version={{.}}{{ end }} \
6666
--set config.secureBaseURL=<SYSDIG_SECURE_URL> \
6767
--set config.secureAPIToken=<SYSDIG_SECURE_API_TOKEN> \
6868
--set config.secureSkipTLS=true \

charts/registry-scanner/templates/_job.tpl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,8 @@
128128
- name: REGISTRYSCANNER_PROFILING_ENABLED
129129
value: /profiling
130130
{{- end }}
131+
- name: REGISTRYSCANNER_CRONJOB_SCHEDULE
132+
value: {{ .Values.cronjob.schedule | quote }}
131133
{{- if .Values.extraEnvVars }}
132134
{{- toYaml .Values.extraEnvVars | nindent 10 }}
133135
{{- end }}

charts/registry-scanner/templates/configmap.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ data:
5454
k8sInCluster: true
5555
namespace: {{ .Release.Namespace }}
5656
workers: {{ .Values.config.maxWorkers }}
57+
disablePlatformScanning: {{ default false .Values.config.scan.disablePlatformScanning }}
5758
jobs:
5859
ttlSecondsAfterFinished: {{ .Values.config.scan.jobs.ttlSecondsAfterFinished }}
5960
serviceAccountName: {{ include "registry-scanner.serviceAccountName" . }}

charts/registry-scanner/tests/configmap_test.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,3 +139,17 @@ tests:
139139
- matchRegex:
140140
path: data['config.yaml']
141141
pattern: allowListMemberAccountIDs:\n\s*- 123456789
142+
- it: platform scanning is not disable by default
143+
asserts:
144+
- matchRegex:
145+
path: data['config.yaml']
146+
pattern: scan:((.|\n)*)disablePlatformScanning:\s*false
147+
- it: force scanning on the client component regardless of backend config
148+
set:
149+
config:
150+
scan:
151+
disablePlatformScanning: "true"
152+
asserts:
153+
- matchRegex:
154+
path: data['config.yaml']
155+
pattern: scan:((.|\n)*)disablePlatformScanning:\s*true

charts/registry-scanner/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ config:
105105
# The size limit for the emptyDir volume used by the scanner job.<br/>
106106
# This volume is used to store both the vulnerability database and the image to scan.
107107
temporaryVolumeSizeLimit: 2Gi
108+
# Force the scan to happen on the client component rather than relying on backend scanning
109+
disablePlatformScanning: false
108110
# Number of goroutines running in parallel in metadata phase for ECR Org setup.
109111
parallelGoRoutines: 100
110112
ssl:

0 commit comments

Comments
 (0)