Skip to content

Add a local resource path portability audit - #2663

Merged
maziyarpanahi merged 12 commits into
batch/maziyarpanahi-filesystem-safety-2026-08-22from
feature/om-980c-path-portability
Aug 22, 2026
Merged

maziyarpanahi merged 12 commits into
batch/maziyarpanahi-filesystem-safety-2026-08-22from
feature/om-980c-path-portability

Conversation

@maziyarpanahi

@maziyarpanahi maziyarpanahi commented Aug 11, 2026

Copy link
Copy Markdown
Owner

Description

Adds a deterministic, local-only audit for resource-path portability. It reports only normalized SHA-256 fingerprints, issue categories, and occurrence counts while detecting traversal, host-specific roots, Windows-reserved components, Unicode normalization drift, and case-fold collisions.

The review repair bounds path count, size, and component count; contains hostile iterator and path-like hooks; validates immutable report state; preserves UNC identity; detects Unicode-only normalization drift; and covers Windows invalid/control characters without echoing source paths.

Type of Change

  • New feature
  • Documentation update
  • Test addition/improvement

Changes Made

  • Added an offline path portability audit with canonical hash-only reports.
  • Added bounded, value-free input handling and strict report invariants.
  • Published the security guide in documentation navigation and the changelog.

Testing

  • Tests prove the feature and hardening paths.
  • New and existing core unit tests were exercised.
  • Traversal, roots, reserved names, Unicode drift, collisions, bounds, hostile hooks, and invalid public state were covered.

Commands run:

  • .venv/bin/python -m pytest tests/unit/core/test_path_portability.py -q — 23 passed
  • .venv/bin/python -m pytest tests/unit/core -q — 2,671 passed and 3 skipped; the sole socket-restricted sandbox failure passed on isolated rerun
  • .venv/bin/python -m pytest tests/unit/test_docs_publication.py tests/unit/release/test_changelog.py tests/unit/test_public_api_docstrings.py -q — 27 passed
  • .venv/bin/python -m mypy openmed/core/path_portability.py — passed
  • .venv/bin/pre-commit run --files ... — passed
  • .venv/bin/python scripts/docs/stage_pages.py — strict staged Pages build passed

Documentation

  • Documentation and navigation updated
  • Public APIs have docstrings
  • CHANGELOG.md updated

Code Quality

  • Canonical Ruff format and lint checks passed
  • Self-review completed
  • No new warnings from the changed files

Dependencies

  • No new dependencies

Related Issues

Closes #2637

Screenshots/Examples

Not applicable; this is a Python audit contract with canonical JSON output.

@maziyarpanahi maziyarpanahi added roadmap-v2 OpenMed V2 roadmap backlog feature New capability P1 High labels Aug 11, 2026
@maziyarpanahi
maziyarpanahi changed the base branch from master to batch/maziyarpanahi-filesystem-safety-2026-08-22 August 22, 2026 13:19
@maziyarpanahi
maziyarpanahi merged commit 2c878a9 into batch/maziyarpanahi-filesystem-safety-2026-08-22 Aug 22, 2026
22 of 30 checks passed
maziyarpanahi added a commit that referenced this pull request Aug 26, 2026
* Add a local resource path portability audit (#2663)

Closes #2637.

* Add offline archive extraction safety policy (#2657)

Closes #2635.

* Add a reproducible export filename policy (#2607)

Closes #2584.

* Add a deterministic offline artifact inventory report (#2617)

Closes #2581.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New capability P1 High roadmap-v2 OpenMed V2 roadmap backlog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a local resource path portability audit

1 participant