Found while reviewing
PR #352, feat/v06-batch at 1cab240df85d5896c5390697c069720ff2bb24d3.
The Python pinmux port accepts an arbitrary --family string and constructs:
table_path = Path(sdk[0]) / "metadata" / "pinmux" / f"{resolved_family}.yaml"
An absolute family discards the SDK prefix under normal pathlib semantics; .. components can escape it as well. No containment or stem validation is performed.
Reproduction
With two different alp-sdk checkouts:
tan pinmux \
--sdk-root /home/caner/src/alp-sdk \
--family /home/caner/alp-sdk/metadata/pinmux/aen \
--format json
Observed:
rc=0
sdkRoot=/home/caner/src/alp-sdk
family=/home/caner/alp-sdk/metadata/pinmux/aen
pads=96
issues=[]
The envelope claims the first SDK root while the table came from the second checkout. A schema-shaped YAML outside either checkout can be read and surfaced the same way.
Impact
sdkRoot no longer identifies the metadata source used for the result.
- IDE/extension consumers can receive data from outside the selected SDK checkout.
- Absolute and traversal-shaped family values cross a boundary the command's contract says is
metadata/pinmux/<family>.yaml under the resolved SDK.
Acceptance criteria
--family accepts only a safe family stem, not separators, absolute paths, . or .. components.
- The resolved table path is verified to remain under
<sdkRoot>/metadata/pinmux before reading.
- Tests cover POSIX absolute paths, Windows drive/UNC paths, and
../ traversal.
- On rejection, emit one coded validation issue without reading the target.
Related: #257, #260, PR #352.
Found while reviewing
PR #352,
feat/v06-batchat1cab240df85d5896c5390697c069720ff2bb24d3.The Python
pinmuxport accepts an arbitrary--familystring and constructs:An absolute family discards the SDK prefix under normal
pathlibsemantics;..components can escape it as well. No containment or stem validation is performed.Reproduction
With two different alp-sdk checkouts:
Observed:
The envelope claims the first SDK root while the table came from the second checkout. A schema-shaped YAML outside either checkout can be read and surfaced the same way.
Impact
sdkRootno longer identifies the metadata source used for the result.metadata/pinmux/<family>.yamlunder the resolved SDK.Acceptance criteria
--familyaccepts only a safe family stem, not separators, absolute paths,.or..components.<sdkRoot>/metadata/pinmuxbefore reading.../traversal.Related: #257, #260, PR #352.