Skip to content

Commit

Permalink
feat: added instruction to download the dbs
Browse files Browse the repository at this point in the history
  • Loading branch information
ashish1099 committed Jan 17, 2025
1 parent 9ce10d9 commit 09a33c3
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 1 deletion.
14 changes: 14 additions & 0 deletions argocd-helm-charts/vuls-dictionary/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Vuls Dictionary

##

## Inspiration

* We want to scan the linux host and vuls-dictionary, which has all the info about each CVE ID, using OVAL, NVD, JVN, Fortinet and MITRE dbs

https://github.com/vulsio/go-cve-dictionary/tree/master
https://github.com/vulsio/goval-dictionary

## TODO

* Build our own image to set to pre-instructions.
25 changes: 24 additions & 1 deletion argocd-helm-charts/vuls-dictionary/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,14 @@ spec:
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
{{- if .Values.cve.enabled }}
- name: {{ .Chart.Name }}-cve
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.cve.repository }}:{{ .Values.image.cve.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
args:
- server
ports:
- name: http
containerPort: {{ .Values.service.port }}
Expand All @@ -48,6 +51,19 @@ spec:
volumeMounts:
{{- toYaml . | nindent 12 }}
{{- end }}
lifecycle:
postStart:
exec:
command: [
"sh", "-c",
{{- $dictionaries := .Values.cve.fetchDB -}}
{{- range $index, $dict := $dictionaries -}}
{{- if $index }} && {{ end }}
go-cve-dictionary fetch {{ $dict }}
{{- end }}
]
{{- end }}
{{- if .Values.oval.enabled }}
- name: {{ .Chart.Name }}-oval
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
Expand All @@ -67,7 +83,14 @@ spec:
volumeMounts:
{{- toYaml . | nindent 12 }}
{{- end }}

lifecycle:
postStart:
exec:
command: [
"sh", "-c",
"go-cve-dictionary fetch oval"
]
{{- end }}
{{- with .Values.volumes }}
volumes:
{{- toYaml . | nindent 8 }}
Expand Down
11 changes: 11 additions & 0 deletions argocd-helm-charts/vuls-dictionary/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,14 @@ nodeSelector: {}
tolerations: []

affinity: {}

oval:
enabled: true

cve:
enabled: true
fetchDB:
- nvd
- mitre
- jvn
- fortinet

0 comments on commit 09a33c3

Please sign in to comment.