Skip to content

Commit

Permalink
ci: Add vet
Browse files Browse the repository at this point in the history
  • Loading branch information
abhisek committed Oct 19, 2024
1 parent f1a2192 commit f25a5ef
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/vet/policy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: General Purpose OSS Best Practices
description: |
This filter suite contains rules for implementing minimum
security guardrails against risky OSS components.
tags:
- general
- circuitverse
filters:
- name: critical-or-high-vulns
check_type: CheckTypeVulnerability
summary: Critical or high risk vulnerabilities were found
value: |
vulns.critical.exists(p, true) || vulns.high.exists(p, true)
- name: low-popularity
check_type: CheckTypePopularity
summary: Component popularity is low by Github stars count
value: |
projects.exists(p, (p.type == "GITHUB") && (p.stars < 10))
- name: osv-malware
check_type: CheckTypeMalware
summary: Malicious (malware) component detected
value: |
vulns.all.exists(v, v.id.startsWith("MAL-"))
36 changes: 36 additions & 0 deletions .github/workflows/vet-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: vet OSS Components

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

permissions:
# Required for actions/checkout@v4
contents: read

# Required for writing pull request comment
issues: write
pull-requests: write

jobs:
vet:
name: vet
runs-on: ubuntu-latest

steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4

- name: Run vet
id: vet
uses: safedep/vet-action@v1
with:
policy: .github/vet/policy.yml
env:
# Required for writing pull request comment
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit f25a5ef

Please sign in to comment.