feat(mobileapp): add percentage slider widgets for yield deposit/with… #491
Workflow file for this run
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
| name: Security | |
| on: | |
| push: | |
| branches: [main, master] | |
| pull_request: | |
| branches: [main, master] | |
| schedule: | |
| - cron: '0 6 * * 1' # Weekly on Monday at 06:00 UTC | |
| jobs: | |
| # ─── Dependency audits ──────────────────────────────────────────────────────── | |
| audit-backend: | |
| name: Cargo Audit (Backend) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: backend | |
| - name: Install cargo-audit | |
| run: cargo install cargo-audit --locked | |
| - name: Audit | |
| working-directory: ./backend | |
| run: cargo audit | |
| audit-contracts: | |
| name: Cargo Audit (Contracts) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: contracts | |
| - name: Install cargo-audit | |
| run: cargo install cargo-audit --locked | |
| - name: Audit | |
| working-directory: ./contracts | |
| run: cargo audit | |
| audit-frontend: | |
| name: NPM Audit (Frontend) | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: ./mobileapp | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 18 | |
| cache: npm | |
| cache-dependency-path: mobileapp/package-lock.json | |
| - run: npm ci | |
| - name: Audit | |
| run: npm audit --audit-level=high || true | |
| # ─── SAST – Semgrep ────────────────────────────────────────────────────────── | |
| semgrep: | |
| name: SAST (Semgrep) | |
| runs-on: ubuntu-latest | |
| permissions: | |
| security-events: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: returntocorp/semgrep-action@v1 | |
| with: | |
| config: >- | |
| p/rust | |
| p/typescript | |
| p/secrets | |
| p/owasp-top-ten | |
| env: | |
| SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }} | |
| # ─── Container scanning (runs after Docker build workflow) ─────────────────── | |
| trivy: | |
| name: Trivy Container Scan | |
| runs-on: ubuntu-latest | |
| # Only scan on push to main so we have an image to scan | |
| if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master') | |
| permissions: | |
| security-events: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build image for scanning | |
| run: docker build -t zaps-backend:scan ./backend | |
| - name: Run Trivy vulnerability scanner | |
| uses: aquasecurity/trivy-action@master | |
| with: | |
| image-ref: zaps-backend:scan | |
| format: sarif | |
| output: trivy-results.sarif | |
| severity: CRITICAL,HIGH | |
| exit-code: '1' | |
| - name: Upload Trivy results to GitHub Security | |
| uses: github/codeql-action/upload-sarif@v3 | |
| if: always() | |
| with: | |
| sarif_file: trivy-results.sarif | |
| # ─── Secret scanning ───────────────────────────────────────────────────────── | |
| gitleaks: | |
| name: Secret Scan (Gitleaks) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Run Gitleaks | |
| run: | | |
| docker run --rm \ | |
| -v "$PWD:/repo" \ | |
| zricethezav/gitleaks:latest detect \ | |
| --source=/repo \ | |
| --config=/repo/gitleaks.toml \ | |
| --redact \ | |
| --verbose |