Simplify site to search + trending

This commit is contained in:
0xMarcio
2025-12-18 07:13:08 +01:00
parent 8f76f94f78
commit 5c78e585a1
35 changed files with 286 additions and 4247 deletions
-69
View File
@@ -1,69 +0,0 @@
name: Build pipeline + Pages
on:
schedule:
- cron: "15 5 * * *"
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Cache dependencies and API cache
uses: actions/cache@v4
with:
path: |
~/.cache/pip
data/cache
key: ${{ runner.os }}-cve-pipeline-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-cve-pipeline-
- name: Install requirements
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Build pipeline outputs + site
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: python scripts/build_all.py --days 7
- name: Validate JSON index
run: python -m json.tool docs/api/v1/index.json > /dev/null
- name: Configure Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deploy.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deploy
uses: actions/deploy-pages@v4
-41
View File
@@ -1,41 +0,0 @@
name: Generate CVE JSON
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Change directory to docs and run CVE JSON generator script
run: |
cd /home/runner/work/cve/cve/docs
python generate_cve_list.py
- name: Check for changes and commit if necessary
run: |
cd /home/runner/work/cve/cve
git config --global user.name '0xMarcio'
git config --global user.email 'marc@codepwn.win'
git remote set-url origin https://github-actions[bot]:$GITHUB_TOKEN@github.com/0xMarcio/cve.git
if [ -n "$(git status --porcelain)" ]; then
git add .
git commit -m "Update CVE list $(date +'%Y-%m-%d %H:%M')"
git push origin main
else
echo "No changes to commit"
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+1 -1
View File
@@ -3,7 +3,7 @@ name: Hot CVEs List
on:
workflow_dispatch:
schedule:
- cron: '30 */12 * * *'
- cron: '0 */6 * * *'
jobs:
ScheduledRun:
-14
View File
@@ -7,15 +7,6 @@ on:
push:
branches:
- main
paths:
- 'scripts/**'
- 'templates/**'
- 'docs/assets/**'
- 'README.md'
- '.github/getTrending.py'
- '.github/workflows/hot_cves.yml'
- 'requirements.txt'
- '.github/workflows/site.yml'
permissions:
contents: read
@@ -43,11 +34,6 @@ jobs:
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Fetch KEV & EPSS
run: |
python scripts/fetch_kev.py
python scripts/fetch_epss.py
- name: Build site
run: python scripts/build_site.py --html-mode summary
-45
View File
@@ -1,45 +0,0 @@
# Simple workflow for deploying static content to GitHub Pages
name: Deploy cve.codepwn.win
on:
# Runs on pushes targeting the default branch and changes in the docs directory
push:
branches: ["main"]
paths:
- 'docs/**'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload only the docs directory
path: 'docs'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4