# Shiftleft engine v2
name: Analyze with ShiftLeft NG SAST

on:
  pull_request: # include to analyze when you create a pull request
    branches:
      - master
  workflow_dispatch:

jobs:
  NGSAST:
    runs-on: ubuntu-20.04
    steps:
    - uses: actions/checkout@v2
    - name: Download ShiftLeft cli
      run: |
        curl https://cdn.shiftleft.io/download/sl > ${GITHUB_WORKSPACE}/sl && chmod a+rx ${GITHUB_WORKSPACE}/sl
    - run: echo REPOSITORY_NAME=$(echo "$GITHUB_REPOSITORY" | awk -F / '{print $2}') >> $GITHUB_ENV
      shell: bash
    - name: Javascript
      if: env.SHIFTLEFT_ACCESS_TOKEN != null
      run: ${GITHUB_WORKSPACE}/sl analyze --tag app.group=$REPOSITORY_NAME --app ${REPOSITORY_NAME}-javascript --cpg --tag branch=${GITHUB_REF} --js $(pwd)
      env:
        SHIFTLEFT_ACCESS_TOKEN: ${{ secrets.SHIFTLEFT_ACCESS_TOKEN }}

Add Code Scanning Security Tool (Shiftleft)
Add Code Scanning Security Tool (Shiftleft)

Add Code Scanning Security Tool (Shiftleft)
