Repository navigation
fix: bug portable SDD catalog generation follows symlinks outside the repository (#771) - #783
Conversation
…de-the-repository: prevent catalog publication through unsafe destinations (#771)
|
To preview the documentation for this pull request, visit the following URL:
|
There was a problem hiding this comment.
Current status: All findings originating in this review are resolved.
Last reconciled on8424d1a. See aggregate Bugbot status.
🤖 Bugbot review snapshot
Bugbot reported 1 potential problem when commit 2252127 was analyzed. This snapshot is historical; use the status block above for current state. 1 finding is linked to changed code.
Findings
- low: A failed temporary-file stat leaves an orphan behind —
src/infrastructure/specification_catalog_publication.cjs:79
Bugbot: review complete
|
Copilot approval · Human review neededStatus: A protected workflow, policy, or trust-boundary file changed. Technical evidenceRevision: |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #783 +/- ##
===========================================
+ Coverage 94.50% 94.79% +0.29%
===========================================
Files 1035 1079 +44
Lines 33299 34951 +1652
Branches 9824 10383 +559
===========================================
+ Hits 31468 33133 +1665
+ Misses 699 683 -16
- Partials 1132 1135 +3
🚀 New features to boost your workflow:
|
…de-the-repository: recover or disclose temporary cleanup failures
Closes #771.
A valid catalog could make
--writefollow aspecs/CATALOG.mdsymlink and overwrite its external target while reporting success. Catalog access now pins real directories, validates destination/file identities, writes through an exclusive owned temporary file, and publishes by atomic replacement or no-replace creation. Parent/leaf substitutions cannot redirect the write. Concurrent new files, external hard-link aliases and foreign temporary replacements are preserved. Read-only validation checks the opened file before consuming data; unsafe or stale access exits nonzero without a success receipt.Adds 40 filesystem/CLI regressions, including boundary races, I/O faults, working-directory restoration and an isolated portable dependency-copy test. Cleanup retries a failed initial descriptor stat once; if identity or removal remains unavailable it reports the generated temporary basename and ownership-inspection guidance, preserving unverified entries. The initial 19-case baseline had 14 failures; all three descriptor-stat regression cases also fail against the first implementation. Updates the SDD, catalog, development guide and generated bundles. The new helper has explicit mandatory 95% lines/statements and 90% branches/functions budgets; existing budgets and Codecov thresholds remain unchanged.
Validation on the review correction: all 40 cases pass with 98.79% lines, 97.19% statements, 100% functions and 91.01% branches. Typecheck, lint, specifications, documentation, build consistency, npm package validation and package smoke pass. Mandatory commit hooks pass with the normal concurrency: build, all 774 suites / 14,259 passed tests (35 existing skips), and lint. Exact-head CI, platform smoke and independent re-review must complete before merge. The initial-head full coverage run also passed all global/module budgets and setup acceptance; its figures are not a coverage claim for this correction. No consumer repository was modified or executed.
CI on
8424d1af: all 774 suites / 14,259 passed tests, global coverage 98.03% lines, 97.24% statements, 97.93% functions and 94.88% branches; coverage budgets and setup acceptance pass. Codecov has processed this exact commit (94.79% project coverage). Independent review is complete with zero active findings; the prior cleanup finding is verified fixed and its thread resolved. Native V8 covers 12 uninstrumented exact-source recordings of the 40-case suite, including actual CLI children; remaining raw gaps are disclosed OS-constant fallbacks and a defensive nonregular-descriptor guard, with no ignore annotations.