From efedbe97406e83892cb80f974bf22a5108223238 Mon Sep 17 00:00:00 2001 From: Pete Kloehn <35460307+pkloehn1@users.noreply.github.com> Date: Wed, 25 Mar 2026 02:41:33 -0700 Subject: [PATCH] Feature/add dependabot and codeql security checks (#4479) * Add CodeQL analysis workflow configuration * Add Dependabot configuration for package updates Configure Dependabot to check for updates in various ecosystems weekly. * Fix dependabot.yml: bun ecosystem, missing dir, grouping for PR #4479 1. studio/frontend uses bun.lock not package-lock.json, so change npm to bun 2. Add missing studio/backend/requirements/ pip entry (consumed by studio/setup.sh) 3. Add groups with patterns ["*"] to all pip/bun/npm entries to batch updates and avoid 30+ individual Dependabot PRs on the first run * Consolidate pip blocks to fix overlapping directory violation GitHub Dependabot forbids multiple same-ecosystem entries with overlapping directories on the same branch. The root "/" directory overlapped the 3 nested pip dirs. Merge all 4 pip blocks into one using the `directories:` (plural) key. Also remove redundant open-pull-requests-limit from the bun block since grouping with patterns: ["*"] already limits PR count. --------- Co-authored-by: Daniel Han --- .github/dependabot.yml | 40 +++++++++++++++++++++++++++++++ .github/workflows/codeql.yml | 46 ++++++++++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/codeql.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000000..a06cb1d114 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,40 @@ +--- +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + groups: + actions: + patterns: ["*"] + + - package-ecosystem: "pip" + directories: + - "/" + - "/studio/backend/plugins/data-designer-unstructured-seed" + - "/studio/backend/requirements" + - "/unsloth/kernels/moe" + schedule: + interval: "weekly" + open-pull-requests-limit: 10 + groups: + pip: + patterns: ["*"] + + - package-ecosystem: "bun" + directory: "/studio/frontend" + schedule: + interval: "weekly" + groups: + bun-frontend: + patterns: ["*"] + + - package-ecosystem: "npm" + directory: "/studio/backend/core/data_recipe/oxc-validator" + schedule: + interval: "weekly" + groups: + npm-oxc-validator: + patterns: ["*"] +... diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 0000000000..b941b68857 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,46 @@ +--- +name: "CodeQL" + +on: + push: + branches: ["main"] + pull_request: + branches: ["main"] + schedule: + - cron: "25 14 * * 3" + workflow_dispatch: + +jobs: + analyze: + name: Analyze (${{ matrix.language }}) + runs-on: ubuntu-latest + permissions: + security-events: write + packages: read + actions: read + contents: read + + strategy: + fail-fast: false + matrix: + include: + - language: python + build-mode: none + - language: javascript-typescript + build-mode: none + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: ${{ matrix.language }} + build-mode: ${{ matrix.build-mode }} + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 + with: + category: "/language:${{ matrix.language }}" +...