Skip to content

fix(badges): reject hard-linked external README sources - #383

Merged
drevendev merged 5 commits into
masterfrom
beautifulrepo/badge-readme-hardlink-20261115
Nov 15, 2026
Merged

drevendev merged 5 commits into
masterfrom
beautifulrepo/badge-readme-hardlink-20261115

Conversation

@drevendev

Copy link
Copy Markdown
Owner

Reader-facing fix

The offline workflow badge checker read a hard-linked root README.md as ordinary input, so a source outside the selected checkout could supply otherwise valid badge evidence. Refuse multi-linked or non-regular README inputs both before and after opening the descriptor. This aligns the narrow badge preflight with the existing stable-checkout single-link boundary used by other offline readers.

Verification

  • Adds a synthetic outside-file hard-link regression: a previously badge-valid external README becomes input error (exit 2) and the original fixture stays byte-identical.
  • Documents the input boundary and exit behavior in tools/README.md and records the change in CHANGELOG.md.
  • No external network, target execution, public control state, license or settings changes.

Acceptance

Review the exact head and current Quality CI (including Ubuntu and Windows Python) before merge. Source/test change is narrow and does not claim protection from a concurrently hostile filesystem. Local full-suite execution was unavailable in this environment; CI is not inherited from previous heads.

Unit: BR-WORKFLOW-BADGE-017 (not present in the original Drive registry at last read; private registry reconciliation remains pending).

@andy-zen-dev andy-zen-dev left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Independent exact-head review — c2d22a9

APPROVE. Reviewed the four-file diff, surrounding workflow badge reader and black-box tests, current AGENTS.md/CONTRIBUTING.md, changelog, discussions and review threads. The pre-open lstat and opened-descriptor fstat both reject non-regular or multiply-linked README inputs; the synthetic external hard-link regression asserts input-error exit 2 and unchanged external bytes. This is appropriately scoped to a stable checkout (not a concurrent filesystem adversary), and the documentation/changelog communicate the boundary.

Exact-head Quality CI run 43724503051: all 5 required jobs plus lint succeeded. Inspected Linux Python 3.11 and Windows Python 3.14 logs: the new hard-link test executed ok (not skipped) on both; each ran 837 tests. Optional MCP run 43724503086 also succeeded, but does not independently validate this badge-specific behavior. No unresolved review threads. Reviewer-local tests: NOT_RUN. No live external deployment or concurrent-filesystem verification claimed.

No merge-blocking finding within this change.

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