diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 8dc9f87..d775beb 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,6 +4,15 @@ updates: directory: /analytics schedule: interval: weekly + day: wednesday + open-pull-requests-limit: 10 + groups: + npm-analytics-minor-patch: + patterns: + - "*" + update-types: + - minor + - patch ignore: # dompurify@3.2.7 is pinned by @scalar/api-reference via monaco-editor@0.55.1. # No patched version resolvable until @scalar/api-reference upgrades monaco-editor. @@ -11,12 +20,58 @@ updates: - dependency-name: dompurify update-types: ["version-update:semver-patch", "version-update:semver-minor"] + - package-ecosystem: npm + directory: /ui + schedule: + interval: weekly + day: wednesday + open-pull-requests-limit: 10 + groups: + npm-ui-minor-patch: + patterns: + - "*" + update-types: + - minor + - patch + - package-ecosystem: cargo directory: /edge schedule: interval: weekly + day: wednesday + open-pull-requests-limit: 5 + groups: + cargo-edge-minor-patch: + patterns: + - "*" + update-types: + - minor + - patch - - package-ecosystem: npm - directory: /ui + - package-ecosystem: cargo + directory: /ui/src-tauri + schedule: + interval: weekly + day: wednesday + open-pull-requests-limit: 5 + groups: + cargo-tauri-minor-patch: + patterns: + - "*" + update-types: + - minor + - patch + + - package-ecosystem: github-actions + directory: / schedule: interval: weekly + day: wednesday + open-pull-requests-limit: 5 + groups: + github-actions-minor-patch: + patterns: + - "*" + update-types: + - minor + - patch diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 0000000..50550e6 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,51 @@ +# CodeQL advanced setup for languages present in this repository. +# Requires a public repository or GitHub Advanced Security for code scanning results. +name: CodeQL + +on: + push: + branches: [main] + pull_request: + schedule: + # Wednesday 01:00 UTC (after OSV at 00:00) + - cron: "0 1 * * 3" + workflow_dispatch: + +permissions: {} + +jobs: + analyze: + name: Analyze (${{ matrix.language }}) + runs-on: ubuntu-latest + permissions: + contents: read + actions: read + security-events: write + + strategy: + fail-fast: false + matrix: + include: + - language: rust + build-mode: none + - language: actions + build-mode: none + - language: javascript-typescript + build-mode: none + - language: python + build-mode: none + + steps: + - name: Checkout repository + uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 + + - name: Initialize CodeQL + uses: github/codeql-action/init@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1 + with: + languages: ${{ matrix.language }} + build-mode: ${{ matrix.build-mode }} + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1 + with: + category: "/language:${{ matrix.language }}" diff --git a/.github/workflows/osv-scanner.yml b/.github/workflows/osv-scanner.yml new file mode 100644 index 0000000..ec90a43 --- /dev/null +++ b/.github/workflows/osv-scanner.yml @@ -0,0 +1,34 @@ +# Weekly + on-demand full OSV scan; PR scan reports only newly introduced vulns. +# SARIF uploads to GitHub code scanning (requires public repo or GitHub Advanced Security). +name: OSV-Scanner + +on: + schedule: + # Wednesday 00:00 UTC = 08:00 SGT + - cron: "0 0 * * 3" + pull_request: + workflow_dispatch: + +permissions: + contents: read + security-events: write + actions: read + +jobs: + scan-scheduled: + name: OSV-Scanner (scheduled / dispatch) + if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' + uses: google/osv-scanner-action/.github/workflows/osv-scanner-reusable.yml@b1d267aea5211fa648d9d442fa64b90dbdcbdd36 # v2.7.0 + permissions: + contents: read + security-events: write + actions: read + + scan-pr: + name: OSV-Scanner (pull request) + if: github.event_name == 'pull_request' + uses: google/osv-scanner-action/.github/workflows/osv-scanner-reusable-pr.yml@b1d267aea5211fa648d9d442fa64b90dbdcbdd36 # v2.7.0 + permissions: + contents: read + security-events: write + actions: read