Refactoring to single JWT middleware #8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Create GitHub Action Secrets for your version of the application: | |
| # DEBRICKEN_TOKEN should be an API Access Token from your Debricked tenant. | |
| name: OSS SCA with Debricked | |
| permissions: | |
| # required for all workflows | |
| security-events: write | |
| # required to fetch internal or private CodeQL packs | |
| packages: read | |
| # only required for workflows in private repositories | |
| actions: read | |
| contents: read | |
| on: | |
| # Triggers the workflow on push or pull request events but only for the main and dev branches | |
| push: | |
| paths: | |
| - '**/package.json' | |
| branches: | |
| - '**' # matches every branch | |
| pull_request: | |
| branches: [ main, develop ] | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| inputs: | |
| runDebrickedScan: | |
| description: 'Carry out SCA scan using Debricked' | |
| required: true | |
| default: 'true' | |
| # Global environment variables | |
| env: | |
| DEFAULT_APP_NAME: "InsecureRestAPI" | |
| jobs: | |
| Debricked-SCA: | |
| runs-on: ubuntu-latest | |
| if: ${{ (github.event_name == 'push') || (github.event_name == 'pull_request') || (github.event.inputs.runDebrickedScan == 'true') }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| # Fetch at least the immediate parents so that if this is a pull request then we can checkout the head. | |
| fetch-depth: 2 | |
| # Java is required to run the various Fortify utilities. | |
| # Setup JDK 11 on host | |
| - uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '11' | |
| # Install Fortify (if required) | |
| - name: Setup Fortify tools | |
| uses: fortify/github-action/setup@v1.2.2 | |
| with: | |
| export-path: true | |
| fcli: latest | |
| # Run debricked scan | |
| - name: Download Debricked CLI | |
| run: curl -L https://github.com/debricked/cli/releases/latest/download/cli_linux_x86_64.tar.gz | tar -xz debricked | |
| - name: Run Debricked scan | |
| run: ./debricked scan -r "${APP_NAME}" --access-token="${DEBRICKED_TOKEN}" -e "*/**.lock" -e "**/build/classes/test/**" -e "**/target/classes/test-classes/**" . | |
| env: | |
| APP_NAME: ${{ env.DEFAULT_APP_NAME }} | |
| DEBRICKED_TOKEN: ${{ secrets.DEBRICKED_TOKEN }} |