Skip to content

fix: eliminate TOCTOU races in catalog_fetch() - #3910

Open
Quratulain-bilal wants to merge 1 commit into
github:mainfrom
Quratulain-bilal:fix/catalog-fetch-toctou
Open

fix: eliminate TOCTOU races in catalog_fetch()#3910
Quratulain-bilal wants to merge 1 commit into
github:mainfrom
Quratulain-bilal:fix/catalog-fetch-toctou

Conversation

@Quratulain-bilal

Copy link
Copy Markdown
Contributor

Problem

catalog_fetch() checks exists() then calls read_text() for both file:// and bare path URLs. The file can be deleted between the two calls.

Fix

Remove the exists() pre-checks and catch FileNotFoundError from read_text().

Testing

  • Verified BundlerError is raised when catalog file is missing

…ath URLs

Remove exists() pre-checks and catch FileNotFoundError from read_text()
to provide clear BundlerError messages even under race conditions.
@Quratulain-bilal
Quratulain-bilal requested a review from mnriem as a code owner July 31, 2026 12:57
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.

1 participant