mirror of
https://github.com/jhd3197/ServerKit.git
synced 2026-11-03 10:36:45 +09:00
Bumps the actions group with 9 updates in the / directory: | Package | From | To | | --- | --- | --- | | [actions/checkout](https://github.com/actions/checkout) | `4` | `7` | | [actions/setup-python](https://github.com/actions/setup-python) | `5` | `7` | | [actions/upload-artifact](https://github.com/actions/upload-artifact) | `4` | `7` | | [actions/setup-node](https://github.com/actions/setup-node) | `4` | `7` | | [actions/download-artifact](https://github.com/actions/download-artifact) | `4` | `8` | | [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) | `3` | `4` | | [docker/build-push-action](https://github.com/docker/build-push-action) | `5` | `7` | | [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) | `3` | `4` | | [docker/login-action](https://github.com/docker/login-action) | `3` | `4` | Updates `actions/checkout` from 4 to 7 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4...v7) Updates `actions/setup-python` from 5 to 7 - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/v5...v7) Updates `actions/upload-artifact` from 4 to 7 - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v4...v7) Updates `actions/setup-node` from 4 to 7 - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/v4...v7) Updates `actions/download-artifact` from 4 to 8 - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](https://github.com/actions/download-artifact/compare/v4...v8) Updates `docker/setup-buildx-action` from 3 to 4 - [Release notes](https://github.com/docker/setup-buildx-action/releases) - [Commits](https://github.com/docker/setup-buildx-action/compare/v3...v4) Updates `docker/build-push-action` from 5 to 7 - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/v5...v7) Updates `docker/setup-qemu-action` from 3 to 4 - [Release notes](https://github.com/docker/setup-qemu-action/releases) - [Commits](https://github.com/docker/setup-qemu-action/compare/v3...v4) Updates `docker/login-action` from 3 to 4 - [Release notes](https://github.com/docker/login-action/releases) - [Commits](https://github.com/docker/login-action/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: actions/download-artifact dependency-version: '8' dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: actions/setup-node dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: actions/setup-python dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: actions/upload-artifact dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: docker/build-push-action dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: docker/login-action dependency-version: '4' dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: docker/setup-buildx-action dependency-version: '4' dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: docker/setup-qemu-action dependency-version: '4' dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions ... Signed-off-by: dependabot[bot] <support@github.com>
144 lines
5.7 KiB
YAML
144 lines
5.7 KiB
YAML
name: Security Scan
|
|
|
|
on:
|
|
push:
|
|
branches: [dev]
|
|
paths:
|
|
- 'backend/**'
|
|
- 'builtin-extensions/**'
|
|
- '**/requirements*.txt'
|
|
- 'frontend/package*.json'
|
|
- 'scripts/check-bandit-report.py'
|
|
- 'scripts/security/**'
|
|
- '.github/workflows/security-scan.yml'
|
|
pull_request:
|
|
branches: [main, dev]
|
|
paths:
|
|
- 'backend/**'
|
|
- 'builtin-extensions/**'
|
|
- '**/requirements*.txt'
|
|
- 'frontend/package*.json'
|
|
- 'scripts/check-bandit-report.py'
|
|
- 'scripts/security/**'
|
|
- '.github/workflows/security-scan.yml'
|
|
schedule:
|
|
- cron: '17 9 * * 1' # Weekly; advisories change even without repository changes.
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
# ──────────────────────────────────────────────────────────────────
|
|
# Job 1: Bandit — static analysis for Python security issues
|
|
# ──────────────────────────────────────────────────────────────────
|
|
bandit:
|
|
name: Bandit SAST
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
|
|
- uses: actions/setup-python@v7
|
|
with:
|
|
python-version: '3.11'
|
|
|
|
- name: Install Bandit
|
|
run: pip install bandit==1.9.3
|
|
|
|
- name: Run Bandit scan
|
|
run: |
|
|
python -m unittest discover -s scripts/security -p 'test_*.py'
|
|
bandit -r backend/app builtin-extensions -f json -o bandit-report.json --exit-zero
|
|
python scripts/check-bandit-report.py bandit-report.json
|
|
|
|
- name: Upload full Bandit report
|
|
if: always()
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: bandit-report
|
|
path: bandit-report.json
|
|
if-no-files-found: warn
|
|
|
|
# ──────────────────────────────────────────────────────────────────
|
|
# Job 2: pip-audit — dependency vulnerability scanning (the gate)
|
|
#
|
|
# This is the blocking check. Unlike the Safety job below it needs no
|
|
# account, no API key and no network-fetched policy: it resolves the pinned
|
|
# requirements against the PyPI Advisory Database and fails on anything it
|
|
# finds. Every suppression therefore has to live in THIS file, in a diff a
|
|
# reviewer can see — which is the whole point. Safety was reporting
|
|
# "No issues found" while its Platform-side policy silently ignored four
|
|
# advisories, one of them a real, fixable CVE in a directly pinned package.
|
|
# ──────────────────────────────────────────────────────────────────
|
|
pip-audit:
|
|
name: pip-audit Dependency Scan
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
|
|
- uses: actions/setup-python@v7
|
|
with:
|
|
python-version: '3.11'
|
|
|
|
- name: Install pip-audit
|
|
run: pip install pip-audit
|
|
|
|
# No --ignore-vuln entries today. If one is ever needed, add it here with
|
|
# a comment saying which advisory, why it does not apply, and when to
|
|
# revisit — never by silencing the scanner globally.
|
|
- name: Audit backend requirements
|
|
run: pip-audit -r backend/requirements.txt --progress-spinner off
|
|
|
|
- name: Audit test-harness requirements
|
|
run: pip-audit -r scripts/test/harness/requirements.txt --progress-spinner off
|
|
|
|
- name: Audit extension requirements
|
|
shell: bash
|
|
run: |
|
|
while IFS= read -r -d '' requirements; do
|
|
pip-audit -r "$requirements" --progress-spinner off
|
|
done < <(find builtin-extensions -type f -name 'requirements*.txt' -print0)
|
|
|
|
npm-audit:
|
|
name: Frontend Production Dependency Scan
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- uses: actions/setup-node@v7
|
|
with:
|
|
node-version: '22'
|
|
cache: npm
|
|
cache-dependency-path: frontend/package-lock.json
|
|
- name: Audit production dependency lockfile
|
|
working-directory: frontend
|
|
# No installation or package scripts are needed to audit the lockfile.
|
|
run: npm audit --package-lock-only --omit=dev --audit-level=high
|
|
|
|
# ──────────────────────────────────────────────────────────────────
|
|
# Job 3: Safety — advisory only
|
|
#
|
|
# Kept for the Safety Platform dashboard, but deliberately NOT a gate.
|
|
# The action shells out to a hosted service, and a service-side failure
|
|
# there (results upload erroring with "Sorry, something went wrong" while
|
|
# the scan itself reported clean) took CI red on 2026-07-20 with no repo
|
|
# change behind it — requirements had not moved since 2026-07-04. An
|
|
# outage at a third party should not block merges; pip-audit above is the
|
|
# check that actually has to pass.
|
|
# ──────────────────────────────────────────────────────────────────
|
|
safety:
|
|
name: Safety Dependency Scan (advisory)
|
|
runs-on: ubuntu-latest
|
|
continue-on-error: true
|
|
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
|
|
- name: Run Safety CLI to check for vulnerabilities
|
|
continue-on-error: true
|
|
uses: pyupio/safety-action@v1
|
|
with:
|
|
api-key: ${{ secrets.SAFETY_API_KEY }}
|
|
args: --full-report
|