Skip to content

.github: weekly CVE applicability sync for bundled deps#1914

Draft
jelmerdehen wants to merge 1 commit into
asterisk:masterfrom
jelmerdehen:bundled-dep-cve-sync
Draft

.github: weekly CVE applicability sync for bundled deps#1914
jelmerdehen wants to merge 1 commit into
asterisk:masterfrom
jelmerdehen:bundled-dep-cve-sync

Conversation

@jelmerdehen
Copy link
Copy Markdown

Adds an automated weekly job that diffs published upstream GHSAs against the in-tree CVE applicability logs for each bundled dep in third-party/versions.mak (pjproject, jansson, libjwt) and opens a PR with pre-populated placeholder rows for any CVE that has no recorded applicability decision.

Same shape as Erlang/OTP's openvex-sync.yml + create-openvex-pr.sh running against their vendored OpenSSL. Depends on the per-dep CVE-APPLICABILITY.md files landing first.

Files

.github/workflows/bundled-dep-cve-sync.yml
.github/scripts/bundled-dep-cve-sync.py

How dev effort is minimised on each new CVE

For every newly-published upstream GHSA the bot adds a row to the applicability log. The script does as much of the triage homework as is safely automatable, so the maintainer's manual step shrinks to a confirm-and-justify:

  • Auto-classify out-of-scope rows. If the GHSA's patched_versions is at-or-before the version pinned in versions.mak, the bot puts the row in the out-of-scope appendix directly. Range-style entries (>= 3.0.0, etc.) stay conservative and land in-scope for manual triage.
  • Pre-fill upstream commit metadata. When the GHSA references a fix commit, the bot pulls the commit's changed-file list via gh api repos/<upstream>/commits/<sha> and inlines Upstream fix <sha> touches <files> into the placeholder row. Maintainer doesn't have to hunt for the fix.
  • Group the PR body. The PR description separates ## In-scope (need triage) from ## Out-of-scope (auto-classified, please confirm) so review attention goes to the rows that need it.

Behaviour

  • No missing entries → workflow exits clean. No commit, no PR.
  • Missing entries → script appends rows to the applicability log, opens (or updates) a PR on branch automated/<dep>-cve-applicability-sync with the body from the run.
  • Three matrix jobs run independently (fail-fast: false); a transient API failure for one dep does not block the others.

Permissions

Job-level: contents: write, pull-requests: write (required so the bot can push the automated/<dep>-cve-applicability-sync branch and open the PR via gh). Workflow-level: contents: read. The elevated permissions are scoped to the single job.

Dependencies

Stock GitHub-hosted Ubuntu runner. Python 3.12 via actions/setup-python@v5; the script uses stdlib only. gh CLI is preinstalled on GitHub runners.

Future work (not in this PR)

  • Auto-propose bucket 1 when the upstream fix only touches files matched by --disable-* flags in Makefile.rules.
  • Auto-stage a backport candidate (git format-patch of the upstream fix) alongside the row update for bucket-4 candidates.

Adds an automated weekly job that diffs published upstream GHSAs
against the in-tree CVE applicability logs for each bundled dep
in third-party/versions.mak (pjproject, jansson, libjwt). Opens a PR
with placeholder rows for any CVE that has no recorded applicability
decision.

Same shape as Erlang/OTP's openvex-sync.yml + create-openvex-pr.sh
running against their vendored OpenSSL.

Behaviour: no missing entries -> no commit, no PR. Missing entries ->
script appends placeholder rows to the applicability log, opens a PR
titled "third-party/<dep>: sync CVE applicability log" with a body
listing the new CVEs. Maintainer reviews, sets bucket and
justification, merges.

Three matrix jobs run independently (fail-fast: false); a transient
API failure for one dep does not block the others.

Permissions: contents: write, pull-requests: write at the job level
(required so the bot can push the placeholder branch and open the
PR via gh). Workflow-level permission is contents: read.
@sangoma-oss-cla
Copy link
Copy Markdown

sangoma-oss-cla Bot commented May 5, 2026

CLA assistant check
All committers have signed the CLA.

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Attention! This pull request may contain issues that could prevent it from being accepted. Please review the checklist below and take the recommended action. If you believe any of these are not applicable, just add a comment and let us know.

  • The PR description does not match the commit message body. This can cause confusion for reviewers and future maintainers. GitHub doesn't automatically update the PR description when you update the commit message so if you've updated the commit with a force-push, please update the PR description to match the new commit message body.
  • The are no cherry-pick-to headers in any comment in this PR. If the PR applies to more than just the branch it was submitted against, please add a comment with one or more cherry-pick-to: <branch> headers or a comment with cherry-pick-to: none to indicate that this PR shouldn't be cherry-picked to any other branch. See the Code Contribution documentation for more information.

Documentation:

@github-actions github-actions Bot added the has-pr-checklist A PR Checklist is present on the PR label May 5, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 5, 2026

Workflow Check completed successfully

@jcolp jcolp marked this pull request as draft May 6, 2026 12:13
@jcolp
Copy link
Copy Markdown
Member

jcolp commented May 6, 2026

I've placed this into draft for now until I decide whether this is something the project will undertake.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

has-pr-checklist A PR Checklist is present on the PR pr-submit-tests-passed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants