Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: vulnerability scan #718

Merged
merged 3 commits into from
Apr 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/vulnerability-scan.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Grype Vulnerability Scan

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
grype-scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Use Node.js latest
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: 20
cache: "npm"
- name: Install Pepr Dependencies
run: npm ci
- name: Build Pepr Dev Image
run: npm run build:image
- name: Scan image
uses: anchore/scan-action@v3
with:
image: "pepr:dev"
fail-build: true
severity-cutoff: high
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"gen-data-json": "node hack/build-template-data.js",
"prebuild": "rm -fr dist/* && npm run gen-data-json",
"build": "tsc && node build.mjs",
"build:image": "npm run build && docker buildx build --tag pepr:dev .",
"test": "npm run test:unit && npm run test:journey",
"test:unit": "npm run gen-data-json && jest src --coverage --detectOpenHandles --coverageDirectory=./coverage",
"test:journey": "npm run test:journey:k3d && npm run test:journey:build && npm run test:journey:image && npm run test:journey:run",
Expand Down
Loading