1 # This file is automatically added by @npmcli/template-oss. Do not edit.
2
3 name: Audit
4
5 on:
6 workflow_dispatch:
7 schedule:
8 # "At 08:00 UTC (01:00 PT) on Monday" https://crontab.guru/#0_8_*_*_1
9 - cron: "0 8 * * 1"
10
11 jobs:
12 audit:
13 name: Audit Dependencies
14 if: github.repository_owner == 'npm'
15 runs-on: ubuntu-latest
16 defaults:
17 run:
18 shell: bash
19 steps:
20 - name: Checkout
21 uses: actions/checkout@v4
22 - name: Setup Git User
23 run: |
24 git config --global user.email "npm-cli+bot@github.com"
25 git config --global user.name "npm CLI robot"
26 - name: Setup Node
27 uses: actions/setup-node@v4
28 id: node
29 with:
30 node-version: 22.x
31 check-latest: contains('22.x', '.x')
32 cache: npm
33 - name: Install Latest npm
34 uses: ./.github/actions/install-latest-npm
35 with:
36 node: ${{ steps.node.outputs.node-version }}
37 - name: Install Dependencies
38 run: npm i --no-audit --no-fund --package-lock
39 - name: Run Production Audit
40 run: npm audit --omit=dev
41 - name: Run Full Audit
42 run: npm audit --audit-level=none