scheduled npm audit #681
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: scheduled npm audit | |
on: | |
schedule: | |
- cron: '0 10 * * *' | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
scan: | |
name: npm audit | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | |
node-version: [20.x] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'npm' | |
cache-dependency-path: | | |
package-lock.json | |
- name: Install dependencies | |
# - run: npm ci # need package.json.lock | |
run: | | |
echo "install" | |
npm install | |
echo "show outdated (if any)" | |
npm outdated --depth=3 || echo "you must think about update your dependencies :)" | |
- name: Npm audit | |
uses: oke-py/npm-audit-action@v2.4.4 | |
with: | |
audit_level: moderate | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
issue_assignees: boly38 | |
issue_labels: vulnerability,bot | |
dedupe_issues: true |