mirror of
https://github.com/storytold/cadcraft.git
synced 2026-10-24 10:56:51 -06:00
* security: do not follow directory symlinks in `cargo xtask stats` (CWE-400) The stats walker descended with `Path::is_dir()`, which follows symlinks, and kept no record of visited directories. A small acyclic graph of directory aliases planted in a workspace package (for example through a contribution a developer inspects) therefore caused exponentially repeated enumeration and file reads, consuming CPU and I/O far beyond the repository's real size. `walk` now inspects each entry's own `file_type()` and skips symlinks before descending or reading, so directory aliases are never re-scanned. A traversal budget (`MAX_ENTRIES`) bounds total work as defense in depth. Addresses finding row 4. * fix: report statistics traversal exhaustion --------- Co-authored-by: skylartaylor <26588250+skylartaylor@users.noreply.github.com>