Repository navigation
fix(audit-engine): always fetch assets through the tarpit-aware budget - #2395
Open
longshore-nc9[bot] wants to merge 2 commits into
Open
longshore-nc9[bot] wants to merge 2 commits into
longshore-nc9[bot] wants to merge 2 commits into
Conversation
…#2340 Signed-off-by: longshore-nc9[bot] <360568931+longshore-nc9[bot]@users.noreply.github.com>
Signed-off-by: longshore-nc9[bot] <360568931+longshore-nc9[bot]@users.noreply.github.com>
nc9
marked this pull request as ready for review
November 25, 2026 18:57
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2340.
The asset and script fetchers take a shared tarpit-aware
FetchBudget, but the engine only built one whenresourceCheckBudgetMswas set (cloud, or the CLI's--max-duration). A default CLI audit could keep requesting a host that was tarpitting it. The budget is now always built with tarpit detection;resourceCheckBudgetMsonly adds the wall-clock bound.Also: the script fetcher now treats an HTTP status answer (a 404 script) as a responding host, not a strike, whatever the caller's content-type policy. Without it, three broken scripts on a healthy host would skip the rest, changing results for normal sites. Only latency, timeouts and network errors strike.
Tests:
apps/cli/tests/cli/audit-script-tarpit-2340-e2e.test.ts: a default CLI audit against a host that stalls every script; fails before the fix (40 of 40 scripts requested), passes after (fewer).analyze-streaming-1021.test.ts: its fixture linked to uncrawled paths on a non-resolving host, whose probe errors now trip the budget in one of two runs; the link was removed.Commands run:
bun run scripts/test-suites.ts --run audit-engine(2471 pass, 0 fail),--run cli(4669 pass, 0 fail),bun run format:checkandbun run typecheckin apps/cli, typecheck in packages/audit-engine,bun scripts/changelog.ts check.Docs: none. Skill: none.