Skip to content

fix(security): close the pre-publication audit findings - #11

Merged
sardi-dev merged 1 commit into
mainfrom
fix/prepublication-security
Oct 20, 2026
Merged

sardi-dev merged 1 commit into
mainfrom
fix/prepublication-security

Conversation

@sardi-dev

Copy link
Copy Markdown
Owner

What and why

A read-only security review before the repository goes public. Each finding below was reproduced first, and each now has a regression test that fails on the previous code.

# Severity Finding Fix
1 Medium git status ran a nested repository's clean filters (the existing guard only read the outer config) --ignore-submodules=all and submodule.recurse=false
2 Medium A committed wirehouse-out link or junction sent every output file wherever it pointed Refuse a linked wirehouse-out (pass -o instead); write each file through a temp file and a rename, which replaces a link instead of following it
3 Medium Crafted strings made redaction quadratic: one 192 KB file took 2 min 25 s to build. Unclosed TypeORM @Column( calls took minutes Bounded repeats in SECRET_LIKE, agent text cut before it is searched, column calls read at most 4,000 characters ahead. The same 192 KB file now builds in 1.3 s
4 Low A checked-in archmap.raw.json could run script in the page (unescaped file count in the block panel) Escape it; links only for https:// addresses with an encoded revision; render checks citations against the folder on the command line; a checked-in raw map is flagged in the output and in Checks
5 Low redis://:password@host (empty user) was not redacted Pattern accepts an empty user and +/. schemes; http://host:8080/docs@v2 is no longer a false positive
6 Low Deeply nested manifests crashed the scan with RecursionError Treated like any other parse error at every JSON/YAML/TOML read
- Hardening Line breaks in names could add sections to enrich-brief.md, which the agent reads as instructions Line breaks become spaces
- Hardening Release workflow followed pypa/gh-action-pypi-publish@release/v1 on the job that can publish Pinned to the v1.14.2 commit; release tools pinned; checkouts use persist-credentials: false

Also: one home-folder test fixture now uses alice, and TODO.md records that CI cannot run while the repository is private (billing), which resolves itself once it is public.

How I checked it

  • python -m pytest passes: 168 passed, 2 skipped (file symlinks cannot be made on this Windows machine)
  • The same suite on Linux (Python 3.12 container): the symlink and named-pipe tests pass there
  • For viewer changes: node --check wirehouse/render/app.js and python -m pytest tests/test_viewer.py, including a new test that a hostile map cannot run script or make javascript: links
  • Every new test was run against the previous code and failed
  • Tried it on the reviewer's slow-build case: 2 min 25 s before, 1.3 s after
  • CHANGELOG.md updated under Unreleased (Security)
  • gitleaks: no leaks in this commit

CI shows every job as failed after a few seconds: GitHub does not start Actions jobs on this private repository because of account billing, not because of this change.

Ground rules

  • Nothing new is drawn or counted without a recorded connection or checked evidence
  • No secret values can reach archmap.json or the HTML
  • The page still loads nothing from the network

A read-only review before going public found ways a scanned repository
could act on the machine running Wirehouse or on the page it draws:

- git ran a nested repository's clean filters during `git status`
- a linked `wirehouse-out` sent every output file elsewhere
- crafted strings made redaction quadratic (minutes per file)
- a checked-in archmap.raw.json could run script in the page
- `redis://:password@host` was not redacted
- deeply nested manifests crashed the scan
- line breaks in names could add sections to the agent brief

Each has a regression test that fails on the previous code. The
release workflow pins the PyPI publish action to a commit and the
release job's tools to versions, and checkouts drop their token.
@sardi-dev
sardi-dev merged commit b27f728 into main Oct 20, 2026
0 of 10 checks passed
@sardi-dev
sardi-dev deleted the fix/prepublication-security branch October 20, 2026 22:27
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.

1 participant