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 permissions:
12 contents: read
13
14 jobs:
15 audit:
16 name: Audit Dependencies
17 if: github.repository_owner == 'npm'
18 runs-on: ubuntu-latest
19 defaults:
20 run:
21 shell: bash
22 steps:
23 - name: Checkout
24 uses: actions/checkout@v4
25 - name: Setup Git User
26 run: |
27 git config --global user.email "npm-cli+bot@github.com"
28 git config --global user.name "npm CLI robot"
29 - name: Setup Node
30 uses: actions/setup-node@v4
31 id: node
32 with:
33 node-version: 22.x
34 check-latest: contains('22.x', '.x')
35 cache: npm
36 - name: Install Latest npm
37 uses: ./.github/actions/install-latest-npm
38 with:
39 node: ${{ steps.node.outputs.node-version }}
40 - name: Install Dependencies
41 run: npm i --no-audit --no-fund --package-lock
42 - name: Run Production Audit
43 run: npm audit --omit=dev
44 - name: Run Full Audit
45 run: npm audit --audit-level=none