mirror of
https://github.com/appwrite/appwrite
synced 2026-04-21 21:47:16 +00:00
- Add COMPOSE_FILE=docker-compose.yml to tests, benchmark, and sdk-preview to prevent loading overrides in CI - Add target: development to tests/benchmark builds, target: production to pr-scan/nightly builds - Bump actions/checkout v4→v6, docker/build-push-action v4/v5→v6, actions/upload-artifact v4→v6, actions/github-script v7→v8 - Pin composer images to 2.8 in linter and static-analysis workflows Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
47 lines
1.4 KiB
YAML
47 lines
1.4 KiB
YAML
name: Nightly Security Scan
|
|
on:
|
|
schedule:
|
|
- cron: '0 0 * * *' # 12am UTC daily runtime
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
scan-image:
|
|
name: Scan Docker Image
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out code
|
|
uses: actions/checkout@v6
|
|
with:
|
|
submodules: recursive
|
|
- name: Build the Docker image
|
|
run: DOCKER_BUILDKIT=1 docker build . --target production -t appwrite_image:latest
|
|
- name: Run Trivy vulnerability scanner on image
|
|
uses: aquasecurity/trivy-action@0.20.0
|
|
with:
|
|
image-ref: 'appwrite_image:latest'
|
|
format: 'sarif'
|
|
output: 'trivy-image-results.sarif'
|
|
ignore-unfixed: 'false'
|
|
severity: 'CRITICAL,HIGH'
|
|
- name: Upload Docker Image Scan Results
|
|
uses: github/codeql-action/upload-sarif@v2
|
|
with:
|
|
sarif_file: 'trivy-image-results.sarif'
|
|
|
|
scan-code:
|
|
name: Scan Code
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out code
|
|
uses: actions/checkout@v6
|
|
- name: Run Trivy vulnerability scanner on filesystem
|
|
uses: aquasecurity/trivy-action@0.20.0
|
|
with:
|
|
scan-type: 'fs'
|
|
format: 'sarif'
|
|
output: 'trivy-fs-results.sarif'
|
|
severity: 'CRITICAL,HIGH'
|
|
- name: Upload Code Scan Results
|
|
uses: github/codeql-action/upload-sarif@v2
|
|
with:
|
|
sarif_file: 'trivy-fs-results.sarif'
|