Skip to content

Update endorlabs.yml #8

Update endorlabs.yml

Update endorlabs.yml #8

Workflow file for this run

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: Give?"
required: true
type: string
default: "demo"
jobs:
scan:
permissions:
contents: read
id-token: write
runs-on: ubuntu-latest
steps:
- name: setup namespace
run: |
NAMESPACE=$(jq -r '.inputs.tenant_name' $GITHUB_EVENT_PATH)
echo "::add-mask::$NAMESPACE"
echo NAMESPACE=$NAMESPACE >> $GITHUB_ENV
- name: Checkout Repository
uses: actions/checkout@v3
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'microsoft'
java-version: '17'
cache: 'maven'
- name: Compile Package
run: mvn clean install
- name: Run endorctl
uses: endorlabs/[email protected]
with:
namespace: ${{ github.event.inputs.tenant_name }}
enable_github_action_token: true
scan_summary_output_type: "table"
additional_args: "--as-default-branch --api=${{ github.event.inputs.api}}"
pr: false
name: Endor Labs Scan
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
inputs:
tenant_name:
description: "Enter your tenant name:"
required: true
type: string
jobs:
scan-repo:

Check failure on line 74 in .github/workflows/endorlabs.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/endorlabs.yml

Invalid workflow file

You have an error in your yaml syntax on line 74
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 ENDOR_NAMESPACE=$NAMESPACE >> $GITHUB_ENV
- name: Checkout Repository
uses: actions/checkout@v3
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: microsoft
java-version: "17"
- name: Endor Labs Workflow Dispatch
if: ${{ github.event_name == 'workflow_dispatch' }}
uses: endorlabs/github-action@736c93ea52b002f2ac229aaeb273b102cbf6fe12
with:
scan_summary_output_type: "table"
pr: "false"
enable_github_action_token: "true"
scan_dependencies: "true"
scan_secrets: "true"
scan_git_logs: "true"
- name: Endor Labs Scan PR to Default Branch
if: github.event_name == 'pull_request'
uses: endorlabs/github-action@736c93ea52b002f2ac229aaeb273b102cbf6fe12
with:
namespace: "example" # Update with your Endor Labs namespace to perform pull request scanning.
scan_summary_output_type: "table"
pr: "true"
enable_github_action_token: "true"
enable_pr_comments: "true"
scan_dependencies: "true"
scan_secrets: "true"
- name: Endor Labs Watch
if: ${{ github.event_name == 'push' }}
uses: endorlabs/github-action@736c93ea52b002f2ac229aaeb273b102cbf6fe12
with:
namespace: "example" # Update with your Endor Labs namespace to scan changes.
scan_summary_output_type: "table"
pr: "false"
enable_github_action_token: "true"
scan_dependencies: "true"
scan_secrets: "true"