Skip to content

Add GPLv3 license headers and per-extension LICENSE files #21

Add GPLv3 license headers and per-extension LICENSE files

Add GPLv3 license headers and per-extension LICENSE files #21

Workflow file for this run

name: Security
on:
push:
branches: [main, master, 'feature/**', 'explore/**']
pull_request:
branches: [main, master]
schedule:
- cron: '0 5 * * 1'
permissions:
contents: read
jobs:
npm-audit:
runs-on: ubuntu-latest
defaults:
run:
working-directory: extensions/halucinator
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: extensions/halucinator/package-lock.json
- name: Install deps
run: npm ci
- name: Audit production deps (fails on any vuln)
run: npm audit --omit=dev --audit-level=low
- name: Audit dev deps (report only)
run: npm audit --audit-level=low || true
semgrep:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install semgrep
run: pip install --quiet semgrep
- name: Semgrep scan
run: |
semgrep scan --config=auto \
--json --output=semgrep-report.json \
extensions/halucinator/src/ || true
- uses: actions/upload-artifact@v4
if: always()
with:
name: semgrep-report
path: semgrep-report.json
retention-days: 30
gitleaks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install gitleaks
run: |
GITLEAKS_VERSION=8.21.2
wget -qO- "https://github.com/gitleaks/gitleaks/releases/download/v${GITLEAKS_VERSION}/gitleaks_${GITLEAKS_VERSION}_linux_x64.tar.gz" | tar xz -C /usr/local/bin gitleaks
- name: Run gitleaks
run: gitleaks detect --source=. --verbose --report-format=json --report-path=gitleaks-report.json
- uses: actions/upload-artifact@v4
if: always()
with:
name: gitleaks-report
path: gitleaks-report.json
retention-days: 30
trivy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Trivy fs scan
uses: aquasecurity/trivy-action@master
with:
scan-type: 'fs'
scan-ref: '.'
scanners: 'vuln,misconfig'
severity: 'HIGH,CRITICAL'
format: 'json'
output: 'trivy-report.json'
exit-code: '0'
- uses: actions/upload-artifact@v4
if: always()
with:
name: trivy-report
path: trivy-report.json
retention-days: 30