You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Clear the 2 pythonsecurity:S8707 findings at the two read_text calls in validate-signals.py. The current realpath + commonpath guard (from #1333) was in the 2026-10-26 analysis of 1ea9ee1, and SonarCloud still traces the taint from argv through _confine_path → Path(candidate) → read_text. The analyzer does not treat that guard as a sanitizer.
The fix: once a path is proven to be inside an allowed root, rebuild it from os.scandir listings, starting at the trusted root. Each part of the relative path is matched by name against real directory entries, and the returned path is made only of those entries. No string from argv reaches the file-read sink. CLI, exit codes and messages stay the same.
Implementation Checklist
.github/scripts/feature-ideation/validate-signals.py: add _rebuild_from_root(root, rel) (walks the scandir entries). _confine_path returns the rebuilt path, or raises FileNotFoundError when a part is missing, so the "not found" exit 2 message is kept.
main: handle the missing-file case through the confinement result rather than a separate exists() on a tainted path
Tests to Write
_confine_path returns the real path for a nested file inside a root (built from directory entries)
_confine_path raises FileNotFoundError for a missing file or a missing intermediate dir inside a root
main still exits 2 with not found for a missing signals file or schema inside a root
The existing traversal / absolute / schema-outside / roots tests stay green
Test Command
python3 -m pytest test/feature-ideation/test_validate_signals.py -v and bats test/workflows/feature-ideation/
The implementation for issue #1361 is durable: commits are pushed and a pull request is open. This record is backed by verifiable artifacts you can confirm in one click.
Review happens on the PR. Acceptance criteria and test results are evidenced by the PR's diff and CI checks — not asserted here. If a later stage fails, this claim is retracted in place.
Activity
don-petry commentedon Oct 27, 2026
SonarCloud Audit (2026-10-27): still open — 2 finding(s), worst severity
MAJOR.don-petry commentedon Oct 27, 2026
Dev-Lead Implementation Plan
Issue: #1361 — SonarCloud: code security review (pythonsecurity)
Scope
Clear the 2
pythonsecurity:S8707findings at the tworead_textcalls invalidate-signals.py. The currentrealpath+commonpathguard (from #1333) was in the 2026-10-26 analysis of1ea9ee1, and SonarCloud still traces the taint from argv through_confine_path→Path(candidate)→read_text. The analyzer does not treat that guard as a sanitizer.The fix: once a path is proven to be inside an allowed root, rebuild it from
os.scandirlistings, starting at the trusted root. Each part of the relative path is matched by name against real directory entries, and the returned path is made only of those entries. No string from argv reaches the file-read sink. CLI, exit codes and messages stay the same.Implementation Checklist
.github/scripts/feature-ideation/validate-signals.py: add_rebuild_from_root(root, rel)(walks the scandir entries)._confine_pathreturns the rebuilt path, or raisesFileNotFoundErrorwhen a part is missing, so the "not found" exit 2 message is kept.main: handle the missing-file case through the confinement result rather than a separateexists()on a tainted pathTests to Write
_confine_pathreturns the real path for a nested file inside a root (built from directory entries)_confine_pathraisesFileNotFoundErrorfor a missing file or a missing intermediate dir inside a rootmainstill exits 2 withnot foundfor a missing signals file or schema inside a rootTest Command
python3 -m pytest test/feature-ideation/test_validate_signals.py -vandbats test/workflows/feature-ideation/don-petry commentedon Oct 27, 2026
Dev-Lead: Implementation Complete — PR #1383
The implementation for issue #1361 is durable: commits are pushed and a pull request is open. This record is backed by verifiable artifacts you can confirm in one click.
7447f9c097e327288854ce3f23be538b75ee067cmain: 3 file(s), +93/-11 linesReview happens on the PR. Acceptance criteria and test results are evidenced by the PR's diff and CI checks — not asserted here. If a later stage fails, this claim is retracted in place.
don-petry commentedon Nov 3, 2026
SonarCloud Audit (2026-11-03): still open — 2 finding(s), worst severity
MAJOR.