π EPSS Score Update workflow (projectdiscovery/nuclei-templates)
The π EPSS Score Update workflow from projectdiscovery/nuclei-templates, explained and optimized by Latchkey.
CI health: C - fair
Point runs-on at Latchkey and get caching, job timeouts, SHA-pinned actions, self-healing for flaky steps, and up to 58% lower cost, applied automatically.
What it does
This is the π EPSS Score Update workflow from the projectdiscovery/nuclei-templates repository, a real project running GitHub Actions. It is shown here with attribution under its MIT license.
Below, Latchkey shows a faster, safer version produced by its optimization engine.
The workflow
name: π EPSS Score Update
on:
schedule:
# Run daily at 2:00 AM UTC
- cron: '0 2 * * *'
workflow_dispatch:
jobs:
update-epss:
runs-on: ubuntu-latest
if: github.repository == 'projectdiscovery/nuclei-templates'
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: '3.11'
- name: Install dependencies
run: |
pip install requests pyyaml
- name: Update EPSS scores
run: python .github/scripts/update-epss.py
- name: Check for changes
id: changes
run: |
if git diff --quiet; then
echo "changes=false" >> $GITHUB_OUTPUT
else
echo "changes=true" >> $GITHUB_OUTPUT
fi
- name: Setup Git
if: steps.changes.outputs.changes == 'true'
uses: projectdiscovery/actions/setup/git@v1
- name: Commit changes
if: steps.changes.outputs.changes == 'true'
uses: projectdiscovery/actions/commit@v1
with:
files: '**/cves/**/*.yaml'
message: 'chore: update EPSS scores π€'
- name: Push changes
if: steps.changes.outputs.changes == 'true'
run: |
git pull origin $GITHUB_REF --rebase
git push origin $GITHUB_REFThe same workflow, on Latchkey
Estimated ~20% faster on cache hits, plus fewer wasted runs and a safer supply chain. Added and changed lines are highlighted.
name: π EPSS Score Update on: schedule: # Run daily at 2:00 AM UTC - cron: '0 2 * * *' workflow_dispatch: jobs: update-epss: timeout-minutes: 30 runs-on: latchkey-small if: github.repository == 'projectdiscovery/nuclei-templates' steps: - name: Checkout repository uses: actions/checkout@v7 - name: Setup Python uses: actions/setup-python@v6 with: cache: 'pip' python-version: '3.11' - name: Install dependencies run: | pip install requests pyyaml - name: Update EPSS scores run: python .github/scripts/update-epss.py - name: Check for changes id: changes run: | if git diff --quiet; then echo "changes=false" >> $GITHUB_OUTPUT else echo "changes=true" >> $GITHUB_OUTPUT fi - name: Setup Git if: steps.changes.outputs.changes == 'true' uses: projectdiscovery/actions/setup/git@v1 - name: Commit changes if: steps.changes.outputs.changes == 'true' uses: projectdiscovery/actions/commit@v1 with: files: '**/cves/**/*.yaml' message: 'chore: update EPSS scores π€' - name: Push changes if: steps.changes.outputs.changes == 'true' run: | git pull origin $GITHUB_REF --rebase git push origin $GITHUB_REF
What changed
- Run on Latchkey managed runners with one line (
runs-on), which apply the fixes below automatically and self-heal transient failures. This example useslatchkey-small; pick the runner size that fits the job. - Cache dependency installs on the setup step so they are served from cache.
- Add a job timeout so a hung step cannot burn hours of runner time.
1 third-party action is referenced by a movable tag. Pin it to the commit SHA (Latchkey resolves and applies this automatically) so a repointed tag cannot change what runs.
What Latchkey heals here
This workflow has steps that commonly fail on transient issues (network, registries, flaky browsers). On Latchkey managed runners they are detected, retried, and self-healed instead of failing your build:
- Dependency installs
This workflow runs 1 job per trigger. On Latchkey the same minutes cost up to 58% less than GitHub-hosted, with zero queue time.