Skip to content

fix(security): preserve accepted bulk scans on v1.7 - #1248

Merged
scttbnsn merged 1 commit into
dev/v1.7from
fix/v1.7-bulk-scan-completion
Sep 18, 2026
Merged

scttbnsn merged 1 commit into
dev/v1.7from
fix/v1.7-bulk-scan-completion

Conversation

@scttbnsn

@scttbnsn scttbnsn commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Forward-port of #1247 to dev/v1.7. Keep this behind the 1.6 merge.

Normal Node request completion emits close with req.complete=true. Treating every close as cancellation stopped an accepted six-container scan after its first four scans. Abort queued work only when the closed request is incomplete.

This preserves v1.7's 200-ID limit, deduplication, scan concurrency and current persistence behavior. The docs distinguish accepted asynchronous work from an incomplete request; no authentication, authorization or scanning policy changes.

Verification:

  • Real Express/HTTP regressions fail before the fix for both bodyless POST and JSON {}: six accepted, only four scanned.
  • All 54 bulk handler tests pass after the fix, including incomplete-request cancellation and existing v1.7 validation.
  • Built backend HTTP probe completes all six accepted scans for both request forms.
  • Backend build, Biome and diff checks pass.
  • Full normal pre-push gate passed in 318.40 seconds, including 100% configured coverage, both builds, script/workflow/site checks, Vue typecheck and static analysis. No bypasses or reduced coverage thresholds.

This does not fix the separate UI progress-event correlation race or publish a release.

🔧 Changed

  • scanAll now cancels queued scans only when the request closes before completion.
  • Accepted asynchronous scans continue after a completed request returns 202.
  • Added integration tests for bodyless and {} POST requests.
  • Updated disconnect-abort documentation.

🐛 Fixed

  • Prevented normal request-close events from cancelling accepted bulk scans.
  • Strengthened abort-test coverage for the configured concurrency limit.

Concerns:

  • Review findings and verification results are unavailable from the supplied evidence.

@vercel

vercel Bot commented Sep 16, 2026

Copy link
Copy Markdown

Deployment failed for project drydock-website with the following error:

Resource is limited - try again in 1 day (more than 100, code: "api-deployments-free-per-day").

Learn More: https://vercel.com/codeswhat?upgradeToPro=build-rate-limit

@coderabbitai

coderabbitai Bot commented Sep 16, 2026 •

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 6dc7c9ef-89e6-4803-9dc1-830bf3c61868

📥 Commits

Reviewing files that changed from the base of the PR and between fe0a5c1 and 6c37444.

⛔ Files ignored due to path filters (1)
  • CHANGELOG.md is excluded by !CHANGELOG.md
📒 Files selected for processing (3)
  • app/api/container/bulk-security.test.ts
  • app/api/container/bulk-security.ts
  • content/docs/current/api/container.mdx

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

scanAll now aborts only when a close event occurs before the request completes. The tests add real HTTP coverage for completed requests and verify that scheduled scans and completion events finish after the 202 response. The disconnect test models an incomplete request and checks the concurrency limit. The API documentation reflects the updated behavior.

Suggested labels: second-opinion

Priority: ➖ Normal

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 6c374

The bulk scan behavior preserves accepted asynchronous work after a normal request completion while retaining cancellation for incomplete disconnects. No current merge-blocking risk is identified.

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Sep 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@scttbnsn

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 18, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot added the second-opinion Summon Greptile for a second-opinion review label Sep 18, 2026
@github-actions

Copy link
Copy Markdown
Contributor

@greptileai Review exact head 6c37444b7293aa0d7737646e866f772ac54e824e. Review for correctness, security issues, and cross-file regressions.

@greptile-apps

greptile-apps Bot commented Sep 18, 2026

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

The PR appears safe to merge with no actionable correctness, security, or cross-file regression identified.

Summary

This PR prevents normal request completion from cancelling accepted asynchronous bulk vulnerability scans on the v1.7 branch.

  • Guards queued-scan cancellation with req.complete.
  • Adds real Express/HTTP coverage for bodyless and empty-JSON requests.
  • Strengthens cancellation coverage at the configured concurrency boundary.
  • Updates API documentation and the changelog to explain accepted-work semantics.

Reviews (1) · Last reviewed commit: "fix(security): preserve accepted bulk sc..."

@biggest-littlest biggest-littlest left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Verified the reviewed 1.7 backport and passing required checks. Completed requests keep accepted scans running; incomplete requests retain cancellation.

@scttbnsn
scttbnsn merged commit 71f451b into dev/v1.7 Sep 18, 2026
31 of 34 checks passed
@scttbnsn
scttbnsn deleted the fix/v1.7-bulk-scan-completion branch September 18, 2026 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

second-opinion Summon Greptile for a second-opinion review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants