Skip to content

Commit b03de2f

Browse files
committed
ci: add Mend scan workflow for SAST and SCA
1 parent 3a4b734 commit b03de2f

File tree

1 file changed

+65
-0
lines changed

1 file changed

+65
-0
lines changed

.github/workflows/mend.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Mend Scan
2+
3+
on:
4+
workflow_dispatch:
5+
schedule: [cron: "0 0 * * 0"] # Weekly on Sundays at midnight
6+
7+
# For PRs we only trigger if the workflow file itself is changed, for testing purposes.
8+
pull_request:
9+
branches: [master]
10+
paths:
11+
- .github/workflows/mend.yml
12+
13+
env:
14+
MEND_APP_NAME: "vespa-engine"
15+
MEND_PROJECT_NAME: "vespa"
16+
17+
jobs:
18+
sast:
19+
name: SAST Vespa Engine
20+
runs-on: ubuntu-latest
21+
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
25+
- name: Mend SAST
26+
uses: vespa-engine/gh-actions/mend-sast@marlon/feat/add-mend-scan-workflow
27+
with:
28+
mend-user: ${{ secrets.MEND_EMAIL }}
29+
mend-api-key: ${{ secrets.MEND_USER_KEY }}
30+
31+
mend-app-name: ${{ env.MEND_APP_NAME }}
32+
mend-project-name: ${{ env.MEND_PROJECT_NAME }}
33+
# Do not send SAST updates on PRs
34+
# update: ${{ contains(fromJson('["workflow_dispatch","schedule"]'), github.event_name) }}
35+
update: true # Temporarily always send SAST updates
36+
37+
# Scan only: C++, Java
38+
scan-name: "Vespa @ ${{ github.ref_name }} (${{ github.sha }})"
39+
target-directory: "./"
40+
enabled-engines: "12,101"
41+
42+
sast-cli:
43+
name: SAST Vespa CLI
44+
runs-on: ubuntu-latest
45+
46+
steps:
47+
- name: Checkout
48+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
49+
- name: Mend SAST
50+
uses: vespa-engine/gh-actions/mend-sast@marlon/feat/add-mend-scan-workflow
51+
with:
52+
mend-user: ${{ secrets.MEND_EMAIL }}
53+
mend-api-key: ${{ secrets.MEND_USER_KEY }}
54+
55+
mend-app-name: ${{ env.MEND_APP_NAME }}
56+
mend-project-name: ${{ env.MEND_PROJECT_NAME }}
57+
# Do not send SAST updates on PRs
58+
# update: ${{ contains(fromJson('["workflow_dispatch","schedule"]'), github.event_name) }}
59+
update: true # Temporarily always send SAST updates
60+
61+
# Scan only: C++, Java
62+
# Scan only: Go
63+
scan-name: "Vespa CLI @ ${{ github.ref_name }} (${{ github.sha }})"
64+
target-directory: "client/go"
65+
enabled-engines: "18"

0 commit comments

Comments
 (0)