|
| 1 | +# ------------------------------------------------------------------------------------- |
| 2 | +# |
| 3 | +# Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com). |
| 4 | +# |
| 5 | +# WSO2 LLC. licenses this file to you under the Apache License, |
| 6 | +# Version 2.0 (the "License"); you may not use this file except |
| 7 | +# in compliance with the License. |
| 8 | +# You may obtain a copy of the License at |
| 9 | +# |
| 10 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | +# |
| 12 | +# Unless required by applicable law or agreed to in writing, |
| 13 | +# software distributed under the License is distributed on an |
| 14 | +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 15 | +# KIND, either express or implied. See the License for the |
| 16 | +# specific language governing permissions and limitations |
| 17 | +# under the License. |
| 18 | +# |
| 19 | +# -------------------------------------------------------------------------------------- |
| 20 | + |
| 21 | +# This workflow will perform a security audit on the codebase. |
| 22 | + |
| 23 | +name: 🛡️ Security Audit |
| 24 | + |
| 25 | +on: |
| 26 | + pull_request: |
| 27 | + branches: [main] |
| 28 | + workflow_dispatch: |
| 29 | + |
| 30 | +jobs: |
| 31 | + audit: |
| 32 | + name: 🛡️ Security Audit |
| 33 | + runs-on: ubuntu-latest |
| 34 | + strategy: |
| 35 | + matrix: |
| 36 | + node-version: [lts/*] |
| 37 | + steps: |
| 38 | + - name: ⬇️ Checkout |
| 39 | + id: checkout |
| 40 | + uses: actions/checkout@v2.3.3 |
| 41 | + |
| 42 | + - name: 🟢 Setup node |
| 43 | + id: setup-node |
| 44 | + uses: actions/setup-node@v2 |
| 45 | + with: |
| 46 | + node-version: ${{ matrix.node-version }} |
| 47 | + |
| 48 | + - name: 🥡 Setup pnpm |
| 49 | + id: setup-pnpm |
| 50 | + uses: pnpm/action-setup@v2.1.0 |
| 51 | + with: |
| 52 | + version: latest |
| 53 | + run_install: false |
| 54 | + |
| 55 | + - name: 🧩 Install Dependencies |
| 56 | + id: install-dependencies |
| 57 | + run: pnpm install |
| 58 | + |
| 59 | + - name: 🧩 Run Security Audit |
| 60 | + id: run-security-audit |
| 61 | + run: pnpm audit --audit-level=high |
0 commit comments