From b5a9f5e3dc7a505c592c24fbe05fe3b2c37afbb7 Mon Sep 17 00:00:00 2001 From: Darkiros Date: Fri, 18 Oct 2024 15:00:14 +0200 Subject: [PATCH] Fix workflows --- .github/workflows/retrieve_cve.yaml | 11 ++++++++++- .github/workflows/update_db.yaml | 3 +++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/retrieve_cve.yaml b/.github/workflows/retrieve_cve.yaml index d7315d8..36a9a7e 100644 --- a/.github/workflows/retrieve_cve.yaml +++ b/.github/workflows/retrieve_cve.yaml @@ -56,6 +56,9 @@ jobs: python -m pip install --upgrade pip pip install -r requirements.txt + - name: Pull latest changes + run: git pull + - name: Retrieve CWE run: python cve2cwe.py @@ -87,6 +90,9 @@ jobs: python -m pip install --upgrade pip pip install -r requirements.txt + - name: Pull latest changes + run: git pull + - name: Retrieve CAPEC run: python cwe2capec.py @@ -118,6 +124,9 @@ jobs: python -m pip install --upgrade pip pip install -r requirements.txt + - name: Pull latest changes + run: git pull + - name: Retrieve TECHNIQUES run: python capec2technique.py @@ -128,7 +137,7 @@ jobs: git diff --quiet && git diff --staged --quiet || git add results/new_cves.jsonl git diff --quiet && git diff --staged --quiet || git add lastUpdate.txt git diff --quiet && git diff --staged --quiet || git add database/*.jsonl - git diff --staged --quiet || git commit -m "Retrieve TECHNIQUES from new CVEs's CAPEC and update CVE DB" + git diff --staged --quiet || git commit -m "Retrieve new CVEs's and update CVE DB" git push env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/update_db.yaml b/.github/workflows/update_db.yaml index 9d80875..b4564ee 100644 --- a/.github/workflows/update_db.yaml +++ b/.github/workflows/update_db.yaml @@ -54,6 +54,9 @@ jobs: python -m pip install --upgrade pip pip install -r requirements.txt + - name: Pull latest changes + run: git pull + - name: Update CWE DB run: python update_cwe_db.py