Skip to content

Commit 920fb90

Browse files
authored
Add mend workflow for security scanning (#746)
New workflow for scanning and uploading mend results. Also updated a couple other jobs with proper permissions and removed unnecessary defaults.
1 parent 51f59d7 commit 920fb90

File tree

3 files changed

+40
-4
lines changed

3 files changed

+40
-4
lines changed

.github/workflows/fossa.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
scan:
1717
name: Fossa
1818
runs-on: ubuntu-22.04
19+
if: ${{ github.event.repository.fork == false }}
1920
steps:
2021
- name: Checkout Repository
2122
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3

.github/workflows/lint.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,13 @@ on:
1212
- reopened
1313
- synchronize
1414

15-
defaults:
16-
run:
17-
shell: bash
18-
1915
concurrency:
2016
group: ${{ github.ref_name }}-lint
2117
cancel-in-progress: true
2218

19+
permissions:
20+
contents: read
21+
2322
jobs:
2423
lint:
2524
name: Lint

.github/workflows/mend.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Mend
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths-ignore:
8+
- design/**
9+
- deploy**
10+
- docs/**
11+
- examples/**
12+
13+
concurrency:
14+
group: ${{ github.ref_name }}-mend
15+
cancel-in-progress: true
16+
17+
permissions:
18+
contents: read
19+
20+
jobs:
21+
scan:
22+
name: Mend
23+
runs-on: ubuntu-22.04
24+
if: ${{ github.event.repository.fork == false }}
25+
steps:
26+
- name: Checkout Repository
27+
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
28+
- name: Download agent
29+
run: curl -LJO https://github.com/whitesource/unified-agent-distribution/releases/latest/download/wss-unified-agent.jar
30+
- name: Verify JAR
31+
run: jarsigner -verify wss-unified-agent.jar
32+
- name: Scan and upload
33+
env:
34+
PRODUCT_NAME: nginx-kubernetes-gateway_${{ github.ref_name }}
35+
PROJECT_NAME: nginx-kubernetes-gateway
36+
run: java -jar wss-unified-agent.jar -noConfig true -wss.url ${{ secrets.WSS_URL }} -apiKey ${{ secrets.WSS_NGINX_TOKEN }} -product $PRODUCT_NAME -project $PROJECT_NAME -d .

0 commit comments

Comments
 (0)