diff --git a/.github/workflows/rl-secure.yml b/.github/workflows/rl-secure.yml new file mode 100644 index 000000000..10753a120 --- /dev/null +++ b/.github/workflows/rl-secure.yml @@ -0,0 +1,56 @@ +name: RL-Secure Workflow +run-name: rl-scanner-only +description: Workflow for scanning build artifacts with RL-Secure + +on: + push: + branches: [ "main" ] + pull_request_target: + types: + - opened + - synchronize +jobs: + checkout-build-scan-only: + description: Checkout, build, and scan the project + runs-on: ubuntu-latest + + permissions: + statuses: write + pull-requests: write + + steps: + - uses: actions/checkout@v4 + - name: Create build artifact + id: build + shell: bash + run: | + # Install dependencies + npm install + # Zip the project with dependencies + zip -r auth0-spa-js.zip . -x node_modules/\* + + # Set the scanfile output parameter + echo "scanfile=auth0-spa-js.zip" >> $GITHUB_OUTPUT + + - name: Scan packages with rl-secure + id: scan + env: + RLSECURE_ENCODED_LICENSE: ${{ secrets.RLSECURE_ENCODED_LICENSE }} + RLSECURE_SITE_KEY: ${{ secrets.RLSECURE_SITE_KEY }} + uses: reversinglabs/gh-action-rl-scanner-only@v1 + with: + artifact-to-scan: ${{ steps.build.outputs.scanfile }} + report-path: "My_Report_Dir" + + - name: Get the scan status output + if: success() || failure() + run: | + echo "The status is: '${{ steps.scan.outputs.status }}'" + echo "The description is: '${{ steps.scan.outputs.description }}'" + + - name: Show analysis report + if: success() || failure() + shell: bash + run: | + ls -la + ls -l 'My_Report_Dir'