Skip to content
This repository was archived by the owner on Oct 14, 2020. It is now read-only.

Commit 6938017

Browse files
committed
Add custom ServiceAccount for imperative Scan Hook
1 parent 8707a3f commit 6938017

File tree

4 files changed

+45
-0
lines changed

4 files changed

+45
-0
lines changed

hooks/imperative-subsequent-scans/templates/imperative-subsequent-scans-hook.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ spec:
1717
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
1818
{{- end }}
1919
{{- end }}
20+
serviceAccountName: imperative-combined-scans
2021
env:
2122
- name: CASCADE_AMASS_NMAP
2223
value: {{ .Values.cascade.amassNmap | quote }}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
apiVersion: rbac.authorization.k8s.io/v1
2+
kind: RoleBinding
3+
metadata:
4+
annotations:
5+
description: ImperativeCombinedScansHook needs to have the rights to create new scans and the usual patch rules to update the scan status
6+
name: imperative-combined-scans
7+
namespace: {{ .Release.Namespace }}
8+
roleRef:
9+
apiGroup: rbac.authorization.k8s.io
10+
kind: Role
11+
name: imperative-combined-scans
12+
subjects:
13+
- kind: ServiceAccount
14+
name: imperative-combined-scans
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
apiVersion: rbac.authorization.k8s.io/v1
2+
kind: Role
3+
metadata:
4+
annotations:
5+
description: ImperativeCombinedScansHook needs to have the rights to create new scans and the usual patch rules to update the scan status
6+
name: imperative-combined-scans
7+
namespace: {{ .Release.Namespace }}
8+
rules:
9+
- apiGroups:
10+
- execution.experimental.securecodebox.io
11+
resources:
12+
- scans
13+
verbs:
14+
- get
15+
- list
16+
- create
17+
- apiGroups:
18+
- execution.experimental.securecodebox.io
19+
resources:
20+
- scans/status
21+
verbs:
22+
- get
23+
- patch
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
apiVersion: v1
2+
kind: ServiceAccount
3+
metadata:
4+
annotations:
5+
description: ImperativeCombinedScansHook needs to have the rights to create new scans and the usual patch rules to update the scan status
6+
name: imperative-combined-scans
7+
namespace: {{ .Release.Namespace }}

0 commit comments

Comments
 (0)