rename componenets

This commit is contained in:
Elizabeth W
2026-04-20 01:23:13 -06:00
parent 7587c285e7
commit 251070dd77
10 changed files with 104 additions and 59 deletions
+17
View File
@@ -0,0 +1,17 @@
{{- define "template.enforce-policy" }}
- name: enforce-policy
inputs:
parameters:
- name: fail-on-cvss
container:
image: agentguard-tools:latest
command:
- node
- /app/dist/enforce-policy.js
env:
- name: FAIL_ON_CVSS
value: "{{inputs.parameters.fail-on-cvss}}"
volumeMounts:
- name: workspace
mountPath: /workspace
{{- end }}
@@ -1,11 +1,5 @@
{{- if .Values.pipeline.enabled }} {{- define "template.scan-crossguard" }}
apiVersion: argoproj.io/v1alpha1 - name: scan-crossguard
kind: ClusterWorkflowTemplate
metadata:
name: amp-security-pipeline-v1.0.0
spec:
templates:
- name: scan-crossguard
container: container:
image: pulumi/pulumi:3.154.0 image: pulumi/pulumi:3.154.0
env: env:
@@ -1,11 +1,5 @@
{{- if .Values.pipeline.enabled }} {{- define "template.scan-kics" }}
apiVersion: argoproj.io/v1alpha1 - name: scan-kics
kind: ClusterWorkflowTemplate
metadata:
name: amp-security-pipeline-v1.0.0
spec:
templates:
- name: scan-kics
container: container:
image: checkmarx/kics:1.7.14 image: checkmarx/kics:1.7.14
command: command:
@@ -1,11 +1,5 @@
{{- if .Values.pipeline.enabled }} {{- define "template.scan-semgrep" }}
apiVersion: argoproj.io/v1alpha1 - name: scan-semgrep
kind: ClusterWorkflowTemplate
metadata:
name: amp-security-pipeline-v1.0.0
spec:
templates:
- name: scan-semgrep
container: container:
image: returntocorp/semgrep:1.85.0 image: returntocorp/semgrep:1.85.0
command: command:
@@ -1,11 +1,5 @@
{{- if .Values.pipeline.enabled }} {{- define "template.scan-socketdev" }}
apiVersion: argoproj.io/v1alpha1 - name: scan-socketdev
kind: ClusterWorkflowTemplate
metadata:
name: amp-security-pipeline-v1.0.0
spec:
templates:
- name: scan-socketdev
container: container:
image: socketdev/socketcli:latest image: socketdev/socketcli:latest
env: env:
@@ -1,11 +1,5 @@
{{- if .Values.pipeline.enabled }} {{- define "template.scan-syft-grype" }}
apiVersion: argoproj.io/v1alpha1 - name: scan-syft-grype
kind: ClusterWorkflowTemplate
metadata:
name: amp-security-pipeline-v1.0.0
spec:
templates:
- name: scan-syft-grype
container: container:
image: anchore/syft:latest image: anchore/syft:latest
command: command:
+16
View File
@@ -0,0 +1,16 @@
{{- define "template.scan-trufflehog" }}
- name: scan-trufflehog
container:
image: trufflesecurity/trufflehog:latest
command:
- sh
- -c
args:
- |
set -eu
mkdir -p /workspace/reports
trufflehog filesystem /workspace --json > /workspace/reports/trufflehog.json || true
volumeMounts:
- name: workspace
mountPath: /workspace
{{- end }}
+22
View File
@@ -0,0 +1,22 @@
{{- define "template.upload-defectdojo" }}
- name: upload-defectdojo
container:
image: agentguard-tools:latest
env:
- name: DEFECTDOJO_URL
valueFrom:
secretKeyRef:
name: amp-security-pipeline-secrets
key: DEFECTDOJO_URL
- name: DEFECTDOJO_API_TOKEN
valueFrom:
secretKeyRef:
name: amp-security-pipeline-secrets
key: DEFECTDOJO_API_TOKEN
command:
- node
- /app/dist/upload-defectdojo.js
volumeMounts:
- name: workspace
mountPath: /workspace
{{- end }}
+39
View File
@@ -0,0 +1,39 @@
{{- define "template.upload-storage" }}
- name: upload-storage
container:
image: amazon/aws-cli:2.15.40
env:
- name: AWS_ACCESS_KEY_ID
valueFrom:
secretKeyRef:
name: amp-security-pipeline-secrets
key: AWS_ACCESS_KEY_ID
- name: AWS_SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
name: amp-security-pipeline-secrets
key: AWS_SECRET_ACCESS_KEY
- name: MINIO_ROOT_USER
valueFrom:
secretKeyRef:
name: amp-security-pipeline-secrets
key: MINIO_ROOT_USER
- name: MINIO_ROOT_PASSWORD
valueFrom:
secretKeyRef:
name: amp-security-pipeline-secrets
key: MINIO_ROOT_PASSWORD
command:
- sh
- -c
args:
- |
set -eu
repo_name="${REPO_NAME:-repo}"
commit_sha="${GIT_COMMIT_SHA:-unknown}"
report_date="$(date -u +%F)"
aws s3 sync /workspace/reports "s3://${REPORTS_BUCKET:-security-reports}/${repo_name}/${report_date}/${commit_sha}/"
volumeMounts:
- name: workspace
mountPath: /workspace
{{- end }}
-19
View File
@@ -1,19 +0,0 @@
{{- if .Values.pipeline.enabled }}
apiVersion: argoproj.io/v1alpha1
kind: ClusterWorkflowTemplate
metadata:
name: amp-security-pipeline-v1.0.0
spec:
templates:
- name: scan-trufflehog
container:
image: alpine:3.20
command:
- sh
- -c
args:
- mkdir -p /workspace/reports && echo "stub: trufflehog" > /workspace/reports/trufflehog.json
volumeMounts:
- name: workspace
mountPath: /workspace
{{- end }}