Skip to content

Commit aaff91c

Browse files
authored
Merge pull request #785 from secureCodeBox/fix/missing-semgrep-build
Add Missing Semgrep Release Build
2 parents d535c67 + 7f68d26 commit aaff91c

File tree

2 files changed

+42
-3
lines changed

2 files changed

+42
-3
lines changed

.github/workflows/release-build.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,7 @@ jobs:
279279
- nmap
280280
- nuclei
281281
- screenshooter
282+
- semgrep
282283
- ssh-scan
283284
- sslyze
284285
- test-scan

hooks/notification/README.md

Lines changed: 41 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ This means that you can define key-value pairs as well as providing envs via sec
126126
The rules can be defined in the values of the Chart.
127127
The syntax and semantic for these rules are quite similar to CascadingRules (See: [secureCodeBox | CascadingRules](/docs/api/crds/cascading-rule))
128128
To define Rules you will have to provide the `rules` field with one or more `matches` elements.
129-
Each `machtes` defines one Rule.
129+
Each `matches` defines one Rule.
130130
For example:
131131
132132
```yaml
@@ -147,14 +147,52 @@ Within the `matches` you will have to provide `anyOf`
147147
`anyOf` contains one or more conditions to be met by the finding to match the rule.
148148
Notice that only one of these elements needs to match the finding for the rule to match.
149149
150-
#### Configuration of a Slack Notification
150+
#### Configuration of a Slack Notification (WebHook)
151151
152152
To configure a Slack notification set the `type` to `slack` and the `endPoint` to point to your env containing your Webhook URL to slack.
153153
You can use one of the following default templates:
154154
155155
- `slack-messageCard`: Sends a message with a summary listing the number of findings per category and severity.
156156
- `slack-individual-findings-with-defectdojo`: Sends a message with a list of all findings with a link to the finding in DefectDojo. Will only work correctly if the DefectDojo hook is installed in the same namespace.
157157
158+
##### Example Config
159+
160+
The below example shows how to create a helm values chart and load secrets for access.
161+
You must have `endPoint` point to a [defined environment variable](https://github.com/secureCodeBox/secureCodeBox/blob/main/hooks/notification/hook/hook.ts#L20), not a string.
162+
163+
```
164+
# cat myvalues.yaml
165+
166+
notificationChannels:
167+
- name: nmapopenports
168+
type: slack
169+
template: slack-messageCard
170+
skipNotificationOnZeroFinding: true
171+
rules:
172+
- matches:
173+
anyOf:
174+
- category: "Open Port"
175+
endPoint: POINTER_TO_ENV
176+
env:
177+
- name: POINTER_TO_ENV
178+
valueFrom:
179+
secretKeyRef:
180+
name: myslacksecret
181+
key: SLACK_WEB_HOOK
182+
183+
# cat values_slack_secrets.yaml
184+
apiVersion: v1
185+
kind: Secret
186+
metadata:
187+
name: myslacksecret
188+
type: Opaque
189+
data:
190+
SLACK_WEB_HOOK: NOIDONTHINKSOBASE64STUFF
191+
192+
kubectl apply -f values_slack_secrets.yaml
193+
helm upgrade --install nwh secureCodeBox/notification-hook --values myvalues.yaml
194+
```
195+
158196
#### Configuration of a Slack App Notification
159197
160198
The `slack-app` notifier is an _alternate_ way to send notifications to slack using the slack api directly rather then using webhooks.
@@ -247,7 +285,7 @@ env:
247285
value: secureCodeBox
248286
```
249287
250-
### Configuration Of A MS Teams Notification
288+
#### Configuration Of A MS Teams Notification
251289
252290
To configure a MS Teams notification you need to set the type to `ms-teams`.
253291
In `endPoint` you need to specify the MS Teams webhook.

0 commit comments

Comments
 (0)