* update npm globally at an earlier step of each job * execute `npm update` with sudo * seprate windows jobs from linux,mac jobs * upgrade npm to latest on windows * upgrade npm to latest on windows
42 lines
1.1 KiB
YAML
42 lines
1.1 KiB
YAML
name: daily scan
|
|
|
|
on:
|
|
schedule:
|
|
- cron: '0 20 * * *'
|
|
|
|
jobs:
|
|
scan:
|
|
name: npm audit
|
|
strategy:
|
|
matrix:
|
|
os: [ ubuntu-latest, macos-latest ]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: install dependencies
|
|
run: npm ci
|
|
- uses: oke-py/npm-audit-action@v2
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
issue_assignees: oke-py
|
|
issue_labels: vulnerability
|
|
dedupe_issues: true
|
|
|
|
scan-on-windows:
|
|
name: npm audit
|
|
runs-on: windows-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
# https://stackoverflow.com/questions/72401421/message-npm-warn-config-global-global-local-are-deprecated-use-loc
|
|
- run: |
|
|
npm install npm-windows-upgrade --location=global
|
|
npm-windows-upgrade --npm-version latest
|
|
- name: install dependencies
|
|
run: npm ci
|
|
- uses: oke-py/npm-audit-action@v2
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
issue_assignees: oke-py
|
|
issue_labels: vulnerability
|
|
dedupe_issues: true
|