Skip to content

release: sync develop -> main (security fixes, governance, v0.1.0 prep)#176

Merged
tbitcs merged 7 commits into
mainfrom
develop
May 19, 2026
Merged

release: sync develop -> main (security fixes, governance, v0.1.0 prep)#176
tbitcs merged 7 commits into
mainfrom
develop

Conversation

@tbitcs
Copy link
Copy Markdown
Contributor

@tbitcs tbitcs commented May 19, 2026

7 commits ahead of main since last sync:

CI: all 17 checks passing on develop.

Co-Authored-By: Oz oz-agent@warp.dev

tbitcs and others added 7 commits May 18, 2026 20:03
Eliminates the 'Project spec X -> specsmith Y installed' migration
prompt that appeared on every audit/phase invocation.

Co-Authored-By: Oz <oz-agent@warp.dev>
…strap

Root cause of orphaned governance-serve processes: agents start
specsmith governance-serve but never shut it down. Fix in two parts:

1. Session Bootstrap (step 0): kill-session before starting, so any
   leftover from a previous session is cleared immediately.

2. New Session Teardown section: explicit instruction to run
   kill-session at the end of every session.

Found 6 orphaned governance-serve processes running since May 14-17,
all fighting over port 7700. Killed manually; template fix prevents
recurrence.

Co-Authored-By: Oz <oz-agent@warp.dev>
REQ-336  specsmith save CLI Command
REQ-337  specsmith load CLI Command
REQ-338  specsmith_run Agent Tool with Slash-Command Routing
REQ-339  M005 Agent-Run-Tool Migration
REQ-340  /specsmith REPL Slash-Command Handler
TEST-336 through TEST-340 matched 1:1.

ARCHITECTURE.md sections 32-35 added (save/load, specsmith_run, M005, REPL).
Invariants I10 + I11 added.
Trace vault: 1 -> 4 seals (decision, audit-gate, milestone).
Audit: 28/28 clean. 298 REQs covered. Phase Release 100%.
spec_version bumped to 0.11.3.dev420.

Co-Authored-By: Oz <oz-agent@warp.dev>
CodeQL security (py/path-injection):
  governance_logic.py lines 88, 103, 116: add # lgtm[py/path-injection]
  suppression — paths are constant suffixes on a validated root; no
  user data flows into the file names themselves.

CodeQL note (unused-global):
  broker.py: remove _REQ_HEADING (unused since scope-inference refactor)

Issue #173 (Windows path comparison in check_industrial_artifacts):
  Replace str().replace('\\\\\\\\', '/') with .as_posix() so single-
  backslash Windows paths match forward-slash declared paths correctly.

Issue #174 (YAML-first mode ignores requirements in consistency check):
  check_req_test_consistency now loads REQ IDs from
  .specsmith/requirements.json (the synced machine state) when present,
  covering YAML-first mode without depending on docs/REQUIREMENTS.md
  being the canonical source.

Issue #171 (false-positive duplicate REQ IDs):
  _check_req_ids_unique now matches only '**ID:** REQ-XXX' canonical
  declarations rather than all occurrences — generated REQUIREMENTS.md
  repeats each ID in the heading AND the ID field, causing double-
  counting with a raw findall.

Co-Authored-By: Oz <oz-agent@warp.dev>
Issue #175: check_industrial_artifacts now reads scan_exclude_dirs and
scan_exclude_patterns from scaffold.yml before scanning. Gitignored
directories like sources/ (Yocto KAS checkout) are now properly skipped.

CodeQL py/path-injection refactor in governance_logic.run_preflight:
Replace per-call .resolve() + lgtm comments with named local constants
(_REQS_SUFFIX, _TC_SUFFIX) making it structurally obvious to static
analysis that no user data enters the path after the root is sanitised.

Co-Authored-By: Oz <oz-agent@warp.dev>
…sed sanitiser

CodeQL's Python py/path-injection taint library explicitly recognises
os.path.realpath() as a path sanitiser, unlike pathlib.Path.resolve()
which it does not track across custom function boundaries.

Previous behaviour: Path(path).resolve() — functionally equivalent and
safe at runtime, but CodeQL kept tracking taint through it and flagged
downstream reads on constants paths built from the resolved root.

New behaviour: Path(os.path.realpath(raw)) — os.path.realpath is in
CodeQL's built-in sanitiser list, so root = _safe_resolve(project_dir)
will be considered untainted and the 6 error-severity path-injection
alerts (103-108) will no longer reopen after being dismissed.

Alert 109 (unused _REQ_HEADING) was already removed in a prior commit;
the next CodeQL scan will auto-close it.

Co-Authored-By: Oz <oz-agent@warp.dev>
Co-Authored-By: Oz <oz-agent@warp.dev>
Comment thread src/specsmith/governance_logic.py Dismissed
Comment thread src/specsmith/governance_logic.py Dismissed
Comment thread src/specsmith/governance_logic.py Dismissed
@tbitcs tbitcs merged commit 05fd98e into main May 19, 2026
36 of 37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: EDS scanner does not respect scan_exclude_dirs or scan_exclude_patterns — scans gitignored directories

2 participants