Skip to content

ci: Hash-pin PyYAML and apply osv-scanner suppressions to govulncheck SARIF - #1341

Merged
noahbjohnson merged 4 commits into
mainfrom
fix/code-scanning-205-247
Oct 4, 2026
Merged

noahbjohnson merged 4 commits into
mainfrom
fix/code-scanning-205-247

Conversation

@isaacschepp

Copy link
Copy Markdown
Collaborator

What and why

Clears two open code-scanning alerts and takes the first code step on a third.

Alert 205: Scorecard Pinned-Dependencies, pipCommand not pinned by hash

issue-templates-drift.yml ran a bare pip install pyyaml, the only unpinned pip install in any workflow (checked with a grep over .github/workflows/; scripts/generate-social-preview.py mentions one only in a docstring, which Scorecard does not scan).

  • New .github/requirements/issue-templates-drift.txt pins pyyaml==6.0.3 with all 73 published sha256 hashes (the form pip-compile --generate-hashes emits).
  • The step is now pip install --require-hashes --no-deps -r .github/requirements/issue-templates-drift.txt. --no-deps is safe because PyYAML has no dependencies.
  • .github/dependabot.yml gains a pip ecosystem for /.github/requirements, with the same cooldown tiers as gomod/npm, so the version and hashes are kept current rather than frozen.
  • The requirements file is added to the workflow's paths: triggers, so a Dependabot bump re-runs the check.

Alert 247: govulncheck GO-2026-5932

GO-2026-5932 marks golang.org/x/crypto/openpgp unmaintained. It has no fixed version (introduced: 0, no fixed event in the OSV record), so bumping x/crypto cannot clear it; v0.57.0 is still affected. #1262 already suppressed it for osv-scanner and Scorecard in osv-scanner.toml, with the reasoning (GLX never imports x/crypto/openpgp). govulncheck has no ignore mechanism, though, and its SARIF still carries the advisory as a module-level note, which is what raised alert 247.

  • New scripts/filter-govulncheck-sarif.py runs between govulncheck and the SARIF upload in security.yml. It drops a result only when its ID is listed in osv-scanner.toml and its level is note (module required, package not imported). A suppressed advisory that later shows up at warning (imported) or error (called) is kept, because that is the case where the recorded reasoning has stopped holding.
  • osv-scanner.toml stays the single reviewed suppression list for both scanners; nothing new is suppressed.
  • SECURITY-POSTURE.md, Vulnerability suppression, documents the filter.

Alert 59: Scorecard CII-Best-Practices

Not clearable from code: it scores the bestpractices.dev questionnaire. The project is now registered as 15136, and this PR adds its badge to the README beside the Scorecard badge. Scorecard credits in-progress at 2/10 and passing at 5/10. The questionnaire work is tracked in #1023.

Also

Removes a truncated duplicate of the #1262 CHANGELOG entry (the same text, missing its continuation paragraphs and PR reference) that sat a few lines above the full one under Fixed.

Related issues

Alerts 205, 247 and 59 above. Badge questionnaire: #1023, which stays open until the badge is earned.

Review focus

  • The filter's note-only rule in scripts/filter-govulncheck-sarif.py: it should never hide a reachable finding.
  • Whether .github/requirements/ is the right home for workflow-only Python pins.

Testing

  • govulncheck -format sarif ./... locally: one result, GO-2026-5932 at level note. Through the filter: zero results. The same SARIF with the level rewritten to warning: the result is kept, with a warning on stderr.
  • pip install --require-hashes --no-deps -r .github/requirements/issue-templates-drift.txt into a clean venv: installs PyYAML 6.0.3.
  • go build ./..., go test ./..., make check-links, make check-memory-drift, markdownlint-cli2 on the changed Markdown: all clean.
  • After CI: alert 247 should drop out of this branch's govulncheck analysis. Alert 205 clears on main only, because the Scorecard workflow has no pull_request trigger.

Breaking changes

None. CI-only; no GLX code changed.

… SARIF

Clears code-scanning alerts 205 and 247.

Alert 205 (Scorecard Pinned-Dependencies): issue-templates-drift.yml ran a
bare `pip install pyyaml`. It now installs from
.github/requirements/issue-templates-drift.txt, which pins pyyaml==6.0.3 to
its published sha256 hashes, with `pip install --require-hashes --no-deps`.
A Dependabot pip entry for /.github/requirements keeps it current, with the
same cooldown as the other ecosystems, and the requirements file joins the
workflow's path triggers.

Alert 247 (govulncheck GO-2026-5932): the advisory marks
golang.org/x/crypto/openpgp unmaintained and has no fixed version, so no
x/crypto bump can clear it. GLX does not import the package; osv-scanner.toml
already suppresses it for osv-scanner and Scorecard (#1262), but govulncheck
has no ignore mechanism and its SARIF still carried it as a module-level
note. scripts/filter-govulncheck-sarif.py now drops a SARIF result only when
its ID is in osv-scanner.toml AND its level is "note", so one reviewed list
governs both scanners, and a suppressed advisory that becomes imported or
called is reported again. SECURITY-POSTURE.md documents the filter.

Also adds the OpenSSF Best Practices badge (project 15136) to the README,
toward alert 59, and removes a truncated duplicate of the #1262 CHANGELOG
entry.

Signed-off-by: Isaac Schepp <isaac.schepp@gmail.com>
Signed-off-by: Isaac Schepp <isaac.schepp@gmail.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Deploying genealogix with  Cloudflare Pages  Cloudflare Pages

Latest commit: f0f8d78
Status: ✅  Deploy successful!
Preview URL: https://ebea976b.genealogix.pages.dev
Branch Preview URL: https://fix-code-scanning-205-247.genealogix.pages.dev

View logs

@socket-security

socket-security Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedpypi/​pyyaml@​6.0.3100100100100100

View full report

@noahbjohnson
noahbjohnson enabled auto-merge (squash) October 4, 2026 07:13
@noahbjohnson
noahbjohnson merged commit 9adcf9e into main Oct 4, 2026
39 checks passed
@noahbjohnson
noahbjohnson deleted the fix/code-scanning-205-247 branch October 4, 2026 07:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants