diff --git a/cmd/enrichment/enrichment/lib/helpers.py b/cmd/enrichment/enrichment/lib/helpers.py index 420e9fd..f4e0ba4 100644 --- a/cmd/enrichment/enrichment/lib/helpers.py +++ b/cmd/enrichment/enrichment/lib/helpers.py @@ -1311,8 +1311,8 @@ def run_noseyparker(path: str) -> Optional[pb.NoseyParker]: "scan", "--datastore", temp_dir, - "--rules", - "/opt/noseyparker/noseyparker.rules", + "--rules-path", + "/opt/noseyparker-rules", path, ], stdout=subprocess.PIPE, diff --git a/helm/nemesis/templates/enrichment.yaml b/helm/nemesis/templates/enrichment.yaml index e6f8eb5..98446ef 100644 --- a/helm/nemesis/templates/enrichment.yaml +++ b/helm/nemesis/templates/enrichment.yaml @@ -286,8 +286,7 @@ spec: - name: noseyparker mountPath: /opt/noseyparker/ - name: noseyparker-rules - mountPath: /opt/noseyparker/noseyparker.rules - subPath: noseyparker.rules + mountPath: /opt/noseyparker-rules readOnly: true - name: yara-rules mountPath: /app/cmd/enrichment/enrichment/lib/public_yara/extrarules diff --git a/helm/nemesis/templates/noseyparker.yml b/helm/nemesis/templates/noseyparker.yml index c01a671..07337e9 100644 --- a/helm/nemesis/templates/noseyparker.yml +++ b/helm/nemesis/templates/noseyparker.yml @@ -3,5 +3,13 @@ kind: ConfigMap metadata: name: noseyparker-rules data: - noseyparker.rules: | - {{.Files.Get "files/noseyparker/noseyparker.yaml" | nindent 4}} \ No newline at end of file + {{- $files := .Files.Glob "files/noseyparker/*.yaml" }} + {{- if $files }} + {{- range $path, $_ := $files }} + {{ $path | base | trimSuffix ".yaml" | printf "%s.rules" }}: | + {{- $.Files.Get $path | nindent 6 }} + {{- end }} + {{- else }} + noseyparker.rules: | + # Placeholder + {{- end }} \ No newline at end of file