Repository navigation
fix: keep CrowdSec imports from disturbing live state and build exports safely - #1549
Merged
Merged
Conversation
The configuration export is now written to a temporary file while the data lock is held, checked against the limits an import accepts, and only then sent. A failure returns a clear error instead of a truncated download, a slow download no longer blocks other operations, and unusual file types are skipped.
Also enable the export download check now that the export is built before it is sent.
Open each exported file without following links or blocking, confirm the opened file is the one that was listed, stop writing the archive as soon as it is larger than an import accepts, and document the ancestor-first rule for live link checks.
Contributor
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
Contributor
✅ Supply Chain Verification Results✅ PASSED 📦 SBOM Summary
🔍 Vulnerability Scan
📎 Artifacts
Generated by Supply Chain Verification workflow • View Details |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Wikid82
marked this pull request as ready for review
October 10, 2026 19:16
This was referenced Oct 11, 2026
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.
Summary
Follow-ups to #1542 for the CrowdSec configuration export and import, delivered as one PR.
Closes #1538, closes #1539, closes #1540
Content-Length. Failures return a clean error with a fixed message instead of a truncated archive. The lock is not held while streaming. Non-regular files are skipped, files are opened without following links, and the 50 MiB limit is enforced while writing.Testing
go test -raceon the crowdsec package and on the import/export/rollback handler tests; full golangci-lint config clean (backend and agent). Local CodeQL: Go "4 suppressed, 0 blocking", JS 0.--project=security-tests(92/92, no fixme).cscli collections list(hash), the runtime state file and the bouncer key hash were identical before and after an export-then-import; the export held 39 entries, all underconfig/, with a correctContent-Length, and no hub, runtime state or bouncer entries. Recreating the container with no network logged the non-fatal hub update failure and CrowdSec started with all items intact.docs/reports/qa_report.md) found no critical, high or medium issues; its two low findings are fixed in this PR.Notes
-count>1; pre-existing).Notifications.test.tsx, a 5 s timeout) failed once in a full coverage run and passed on rerun; this PR changes no frontend code.