| # Licensed to the Apache Software Foundation (ASF) under one | |
| # or more contributor license agreements. See the NOTICE file | |
| # distributed with this work for additional information | |
| # regarding copyright ownership. The ASF licenses this file | |
| # to you under the Apache License, Version 2.0 (the | |
| # "License"); you may not use this file except in compliance | |
| # with the License. You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, | |
| # software distributed under the License is distributed on an | |
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | |
| # KIND, either express or implied. See the License for the | |
| # specific language governing permissions and limitations | |
| # under the License. | |
| name: Dependency audit | |
| on: | |
| schedule: | |
| # Offset from the hour to reduce peak-time scheduling delays. | |
| - cron: '17 3 * * *' | |
| workflow_dispatch: | |
| pull_request: | |
| paths: | |
| - .github/workflows/dependency-audit.yml | |
| - scripts/rust/dependencies.mjs | |
| - deny.toml | |
| - Cargo.toml | |
| - Cargo.lock | |
| - 'platform/**/Cargo.toml' | |
| - 'plugins/**/Cargo.toml' | |
| - 'products/**/Cargo.toml' | |
| - 'tools/**/Cargo.toml' | |
| - products/maka/cli/DEPENDENCIES.rust.tsv | |
| - package.json | |
| - package-lock.json | |
| - 'packages/*/package.json' | |
| push: | |
| branches: [main] | |
| paths: | |
| - .github/workflows/dependency-audit.yml | |
| - scripts/rust/dependencies.mjs | |
| - deny.toml | |
| - Cargo.toml | |
| - Cargo.lock | |
| - 'platform/**/Cargo.toml' | |
| - 'plugins/**/Cargo.toml' | |
| - 'products/**/Cargo.toml' | |
| - 'tools/**/Cargo.toml' | |
| - products/maka/cli/DEPENDENCIES.rust.tsv | |
| - package.json | |
| - package-lock.json | |
| - 'packages/*/package.json' | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: dependency-audit-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| rust-licenses: | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 45 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | |
| with: | |
| node-version: '24' | |
| - name: Update stable Rust for dependency resolution | |
| run: rustup update stable --no-self-update | |
| - uses: taiki-e/install-action@1ed6d7be6168f6c9046541087ff549b6bc581fdf # v2 | |
| with: | |
| tool: cargo-deny@0.20.2 | |
| - name: Check Rust licenses and dependency inventory | |
| run: node scripts/rust/dependencies.mjs check | |
| audit: | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 45 | |
| steps: | |
| - name: Check out the repository | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Node.js | |
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | |
| with: | |
| node-version: '24' | |
| cache: npm | |
| - name: Install build dependencies | |
| run: npm ci --ignore-scripts | |
| - name: Audit dependencies | |
| run: npm audit --audit-level=high | |
| - name: Verify registry signatures | |
| run: npm audit signatures |