mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-07-04 19:21:51 +00:00
76 lines
2.2 KiB
YAML
76 lines
2.2 KiB
YAML
name: 'UI: Security'
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'master'
|
|
- 'v5.*'
|
|
paths:
|
|
- 'ui/package.json'
|
|
- 'ui/pnpm-lock.yaml'
|
|
- '.github/workflows/ui-security.yml'
|
|
- '.github/actions/osv-scanner/**'
|
|
- '.github/scripts/osv-scan.sh'
|
|
pull_request:
|
|
branches:
|
|
- 'master'
|
|
- 'v5.*'
|
|
paths:
|
|
- 'ui/package.json'
|
|
- 'ui/pnpm-lock.yaml'
|
|
- '.github/workflows/ui-security.yml'
|
|
- '.github/actions/osv-scanner/**'
|
|
- '.github/scripts/osv-scan.sh'
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
permissions: {}
|
|
|
|
jobs:
|
|
ui-security-scans:
|
|
if: github.repository == 'prowler-cloud/prowler'
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 15
|
|
permissions:
|
|
contents: read
|
|
pull-requests: write # osv-scanner action posts/updates a PR comment with findings
|
|
|
|
steps:
|
|
- name: Harden Runner
|
|
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
|
|
with:
|
|
egress-policy: block
|
|
allowed-endpoints: >
|
|
github.com:443
|
|
api.github.com:443
|
|
objects.githubusercontent.com:443
|
|
release-assets.githubusercontent.com:443
|
|
api.osv.dev:443
|
|
api.deps.dev:443
|
|
osv-vulnerabilities.storage.googleapis.com:443
|
|
|
|
- name: Checkout repository
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
# zizmor: ignore[artipacked]
|
|
persist-credentials: true # Required by tj-actions/changed-files to fetch PR branch
|
|
|
|
- name: Check for UI dependency changes
|
|
id: check-changes
|
|
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
|
|
with:
|
|
files: |
|
|
ui/package.json
|
|
ui/pnpm-lock.yaml
|
|
.github/workflows/ui-security.yml
|
|
.github/actions/osv-scanner/**
|
|
.github/scripts/osv-scan.sh
|
|
|
|
- name: Dependency vulnerability scan with osv-scanner
|
|
if: steps.check-changes.outputs.any_changed == 'true'
|
|
uses: ./.github/actions/osv-scanner
|
|
with:
|
|
lockfile: ui/pnpm-lock.yaml
|