-
Notifications
You must be signed in to change notification settings - Fork 4
55 lines (45 loc) · 1.37 KB
/
nvd-cache.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: NVD Data Workflow Schedule
on:
schedule:
- cron: '0 5 * * 1,2,3,4,5'
workflow_dispatch: { }
jobs:
build:
name: Build and collect data
runs-on: ubuntu-latest
if: ${{ github.actor != 'dependabot[bot]' }}
steps:
- name: Checkout OVP repository
uses: actions/checkout@v4
with:
repository: jeremylong/Open-Vulnerability-Project
path: ovp
ref: v7.0.2
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
cache: 'gradle'
- name: Build the OVP code with Gradle
working-directory: ./ovp
run: ./gradlew build -x test
- uses: actions/checkout@v4
with:
path: data
- name: Generate Cache Name
shell: bash
run: echo "CACHE_NAME=$(date '+%y.%j')" >> $GITHUB_ENV
- name: Rename artifact
run: find ./ovp/vulnz/build/libs -type f -regex './ovp/vulnz/build/libs/vulnz-[0-9].[0-9].[0-9].jar' -exec mv {} ./data/vulnz.jar ';'
- name: Generate data
working-directory: ./data
run: ./vulnz.jar cve --cache --directory ./cache --delay=10000 --maxRetry=20
env:
NVD_API_KEY: ${{ secrets.NVD_API_KEY }}
JAVA_OPTS: "-Xmx4g"
- name: Cache NVD data
uses: actions/cache@v4
with:
key: nvd-data-${{ env.CACHE_NAME }}
path: ./data/cache