-
Notifications
You must be signed in to change notification settings - Fork 3
65 lines (60 loc) · 1.94 KB
/
endorlabs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Endor Labs Scan
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
inputs:
api:
description: "Enter the API for Endor Labs"
required: true
type: choice
default: https://api.endorlabs.com
options:
- https://api.staging.endorlabs.com
- https://api.endorlabs.com
tenant_name:
description: "Enter your Endor Labs namespace?"
required: true
type: string
jobs:
scan-repo:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Setup namespace Environment Variables
run: |
NAMESPACE=$(jq -r '.inputs.tenant_name' $GITHUB_EVENT_PATH)
echo "::add-mask::$NAMESPACE"
echo NAMESPACE=$NAMESPACE >> $GITHUB_ENV
- name: Use Caches
uses: actions/cache@v1
with:
path: ~/.m2
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Checkout Repository
uses: actions/checkout@v3
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: microsoft
java-version: "17"
- name: Compile Package
run: mvn clean install
- name: Endor Labs Workflow Dispatch
if: ${{ github.event_name == 'workflow_dispatch' }}
uses: endorlabs/github-action@736c93ea52b002f2ac229aaeb273b102cbf6fe12
with:
namespace: ${{ github.event.inputs.tenant_name }}
scan_summary_output_type: "table"
pr: "false"
enable_github_action_token: "true"
scan_dependencies: "true"
scan_secrets: "true"
scan_git_logs: "true"
additional_args: "--as-default-branch --api=${{ github.event.inputs.api }}"