Commit a0f841a
Reject symlinks in package source collection (audit 5.2)
`collect_rsscript_files_excluding` used `Path::is_dir`/`is_file`, which follow
symlinks, so a package could place a symlinked `.rss`/`.rssi` (or symlinked dir)
under a source root pointing outside the package and have review/lock/metadata
read it — an info-leak / nondeterminism vector in CI on untrusted packages.
Use `DirEntry::file_type()` (does not dereference) and fail closed on any
symlinked entry in the source tree. (A symlinked source *root* was already
caught by canonicalization in `confined_manifest_path`.) Add a unix test that a
symlinked source file is rejected.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent abb953d commit a0f841a
2 files changed
Lines changed: 46 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
542 | 542 | | |
543 | 543 | | |
544 | 544 | | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
545 | 557 | | |
546 | | - | |
| 558 | + | |
547 | 559 | | |
548 | | - | |
| 560 | + | |
549 | 561 | | |
550 | 562 | | |
551 | 563 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8354 | 8354 | | |
8355 | 8355 | | |
8356 | 8356 | | |
| 8357 | + | |
| 8358 | + | |
| 8359 | + | |
| 8360 | + | |
| 8361 | + | |
| 8362 | + | |
| 8363 | + | |
| 8364 | + | |
| 8365 | + | |
| 8366 | + | |
| 8367 | + | |
| 8368 | + | |
| 8369 | + | |
| 8370 | + | |
| 8371 | + | |
| 8372 | + | |
| 8373 | + | |
| 8374 | + | |
| 8375 | + | |
| 8376 | + | |
| 8377 | + | |
| 8378 | + | |
| 8379 | + | |
| 8380 | + | |
| 8381 | + | |
| 8382 | + | |
| 8383 | + | |
| 8384 | + | |
| 8385 | + | |
| 8386 | + | |
| 8387 | + | |
| 8388 | + | |
0 commit comments