Skip to content

Remediate 2 CVEs in yard - #653

Closed
eng-cve-remediation-app[bot] wants to merge 1 commit into
mainfrom
whitesource-remediate/yard_yard
Closed

eng-cve-remediation-app[bot] wants to merge 1 commit into
mainfrom
whitesource-remediate/yard_yard

Conversation

@eng-cve-remediation-app

Copy link
Copy Markdown

This PR contains the following updates:

Package Type Update Change
yard:yard dependencies security 0.9.360.9.44
Dependency paths
  • puppet_litmus:puppet_litmus → bolt:bolt → puppet-strings:puppet-strings → yard:yard
  • puppet-strings:puppet-strings → yard:yard
  • bolt:bolt → puppet-strings:puppet-strings → yard:yard

By merging this PR, the below vulnerabilities will be automatically resolved:

Severity CVSS Score Vulnerability
Medium 5.3 CVE-2026-41493
Medium 5.3 CVE-2026-49342

Bump strategy

yard is a transitive dependency (blocked-upstream), pulled in via puppet-strings
(a direct Gemfile dependency, group :development, :release_prep).

puppet-strings's newest release (5.1.0) drops its yard upper bound, but it
cannot be used here: bolt (already at its own newest release, 4.0.0, with no
newer release available) hard-caps puppet-strings >= 2.3.0, < 5.0, and
bolt is pulled in transitively via puppet_litmus. puppet-strings 4.1.3
(the previously-locked version) also can't work — it added a hard cap
yard ~> 0.9, < 0.9.37, which excludes every fixed yard release.

puppet-strings 4.1.2 (one patch release older than what was locked) has no
upper bound on yard at all (~> 0.9) and still satisfies bolt's
< 5.0 constraint. Pinning Gemfile to >= 4.1.2, '< 4.1.3' and re-locking
resolves yard to 0.9.45 (>= fix_version 0.9.44), fixing both CVEs without
any conflict.

No cohort siblings — puppet-strings and yard are independently released.

@eng-cve-remediation-app eng-cve-remediation-app Bot added the security fix Security fix generated by Mend label Sep 14, 2026
@eng-cve-remediation-app

Copy link
Copy Markdown
Author

🔎 Dependency bump analysis

Breaking changes: false · Reachability: no


Impact report

Changelog / Breaking-Change Report

Summary

This PR fixes CVE-2026-41493 and CVE-2026-49342 (both path-traversal in
YARD's built-in doc server, yard server --docroot) by transitively bumping
yard from 0.9.36 to 0.9.45. yard is not a direct dependency of this
repo — the actual edit is to the Gemfile constraint on its parent,
puppet-strings, per the blocked-upstream bump procedure. Verdict:
not breaking
for this repo. puppet-strings and yard are both
dev/release_prep-only tooling (used to generate REFERENCE.md), never
shipped or loaded at Puppet runtime, and neither library's changelog between
the old and new versions documents a breaking change that touches how this
repo uses them.

The actual diff

group :development, :release_prep do
-  gem "puppet-strings", '~> 4.0',              require: false
+  gem "puppet-strings", '>= 4.1.2', '< 4.1.3', require: false

Gemfile.lock confirms the resolution:

Gem Before After
puppet-strings ~> 4.0 (resolved ~4.0.x) pinned to exactly 4.1.2
yard (transitive, via puppet-strings) 0.9.36 0.9.45

Note the unusual exact pin (>= 4.1.2, < 4.1.3) rather than "newest
available." This is deliberate, not a shortcut — see Why not the newest
puppet-strings?
below.

Upstream changes

puppet-strings 4.0.0 → 4.1.2

Version Date Changes
4.1.0 2023-07-04 Added --providers / --list-providers flags (additive)
4.1.1 2023-11-22 Bug fix: option-tag handling with no data types
4.1.2 2023-12-05 Bug fix: revert a rubocop-driven change incompatible with Ruby 2.7.0

No removed APIs, no signature changes, no minimum-Ruby bump (still requires
Ruby >= 2.7.0, Puppet >= 7.0.0). Not breaking.

yard 0.9.36 → 0.9.45 (transitive)

Version Notable change
0.9.40 ⚠️ Changelog-labeled "Breaking Change": removed jQuery from default HTML doc templates (jQuery lib itself retained for back-compat). Also added .rbs file support, built-in HybridMarkdown renderer.
0.9.42 Security fixCVE-2026-41493: path traversal via --docroot + disk caching in yard server (GHSA-xfhh-rx56-rxcr)
0.9.43 Bug fix: .rbs attribute registration
0.9.44 Security fixCVE-2026-49342: path traversal via --docroot + disk caching in yard server (GHSA-pxcc-8665-phx8)
0.9.45 Bug/compat fixes (RDoc 8, Struct.new/Data.define doc tags, HTML/RBS rendering)

The only changelog-flagged "breaking" item (0.9.40, jQuery removal) is scoped
to generated HTML template assets, not the YARD public Ruby API.

Why not the newest puppet-strings?

The newest published releases are not safe substitutes here, which is
why the diff pins exactly 4.1.2:

  • puppet-strings 4.1.3 (2024-09-05) re-pins yard to < 0.9.37
    taking this release would make it impossible to resolve the fixed
    yard (>= 0.9.42), defeating the CVE fix.
  • puppet-strings 5.0.0 (2025-06-09) is a labeled breaking release
    ("removed Puppet 7 infrastructure", puppet promoted to a runtime
    dependency).
  • puppet-strings 5.1.0 (2026-08-14) adds Ruby 4.0 / Puppet 9 support.

So 4.1.2 is the correct target: newest release that still carries an
unpinned yard (~> 0.9) constraint, letting Bundler resolve straight to the
patched 0.9.45. Gemfile.lock:246-248,436 confirms puppet-strings (4.1.2)yard (~> 0.9)yard (0.9.45) resolved correctly.

How we use it

  • Rakefile:7require 'puppet-strings/tasks' if Gem.loaded_specs.key? 'puppet-strings'. This wires up the standard strings:generate /
    strings:validate:reference rake tasks used to build REFERENCE.md.
    Output format is plain Markdown, not yard's HTML templates, so the
    0.9.40 jQuery/HTML-template change is inapplicable regardless.
  • No custom YARD tags, plugins, @!macro/@!method directives, or direct
    YARD:: API calls exist anywhere in this repo (checked via grep).
  • Both gems live only in the Gemfile's group :development, :release_prep
    — never loaded by the shipped Puppet module code, never invoked in the
    ci.yml/nightly.yml workflows (no strings: task reference found
    there); used only for local/release-prep doc regeneration.
  • puppet-strings is also reachable transitively via bolt and
    puppet_litmus (per unit.json's dependency_paths), but this repo's
    Gemfile.lock resolves puppet-strings to a single version (4.1.2)
    across the whole tree, so there's no split-cohort concern — one pinned
    version satisfies every path to yard.

Action items / risks

None. This is a dev-tooling-only, non-breaking transitive bump:

  • No code changes required in this repo.
  • REFERENCE.md regeneration (bundle exec rake strings:generate) is
    unaffected — Markdown output, no custom tags in use.
  • No other puppet-strings/yard version in the lockfile is left behind
    (single resolved version across all dependency paths), so there's no
    cohort split to flag.

References

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@bastelfreak bastelfreak left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

those nonsense AI PRs are extremely annoying> I mentioned more than enough why they are bad.

@eng-cve-remediation-app

Copy link
Copy Markdown
Author

The fix-ci agent made no change this run while CI is red. The reconcile sweep will escalate this PR to a human rather than retry.

@eng-cve-remediation-app

Copy link
Copy Markdown
Author

🚨 fix-ci circuit open — a fix attempt made no progress. The bot has stopped auto-fixing CI on this PR; it needs a human.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@eng-cve-remediation-app
eng-cve-remediation-app Bot force-pushed the whitesource-remediate/yard_yard branch from ddb26fe to 7162144 Compare September 16, 2026 22:10
@eng-cve-remediation-app

Copy link
Copy Markdown
Author

This PR pins puppet-strings directly in this repo's Gemfile to fix CVE-2026-41493/CVE-2026-49342 (via yard), but puppet-strings is one of the ~26 gems this module's Gemfile actually gets rendered from puppetlabs/pdk-templates' Gemfile.erb (see metadata.json's template-url) — a direct edit here is reverted on the next pdk update. The underlying yard cap (puppet-strings 4.1.3 pinned yard < 0.9.37) was already fixed upstream in pdk-templates on 2026-08-20 (widened to < 6.0); this module just hasn't re-synced from the template yet, which is the actual remediation path. Closing without merging — the bot's own triage rule for template-generated gems had a stale curated list that missed puppet-strings (puppetlabs/cve-remediation-bot#168 fixes it going forward). Thanks for flagging this, @bastelfreak.

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

Labels

security fix Security fix generated by Mend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants