Repository navigation
Fix the findings of the post-audit security review and make the route search faster - #131
Merged
Merged
Conversation
Audit finding scale-5. A strict search now uses route_astar.astar. The bound adds, for each row and column interval between a node and the target nodes, the lowest cost of an allowed segment; the router counts the unused segments of each interval. The search keeps the tie rules of the Dijkstra search and the exact float distances, so the routes are byte-identical to 154e395 on this repository, s36, s72, s144, perf/huge, the pages and figures, and 2900 random layouts. The router also finds the regions of all segments one time with bisect and keeps the regions of each port stub. route_all on s144: 9.00 to 9.28 s before, 4.18 to 4.25 s after. The acceptance value (under 4 s, exponent under 2) is not reached; see bench/jev/README.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Md3Co8X9K3cT1u4rYQ9VwU
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Md3Co8X9K3cT1u4rYQ9VwU
- git-sec-1: each Git process gets GIT_NO_LAZY_FETCH=1 and an empty GIT_ALLOW_PROTOCOL, also the cat-file process of delta. A promisor remote cannot run its upload program during a read. - git-sec-2: base-render refuses a fork pull request that changes out_dir, model or figures. render --check also compares each figure file that exists. - post-server-1: the servers refuse an event connection from a different site before it holds a slot. - post-server-2: of_page gives a policy only if it is printable ASCII. A line break in the meta content gives no header. - post-server-3: the page_csp docstring tells which injection the policy stops. No code change. - post-server-4: the header policy has frame-ancestors 'self', and the servers send X-Content-Type-Options: nosniff. - SEC-1: in a work tree, a Git error in the tracked-cache check refuses the cache file, with the Git cause. - SEC-2: remember_file keeps a value only if the digest after make is the same as the key (modules and test files). - SEC-3: a module record must have sha. - SEC-4: the facts shape refuses a control character in a module key, a file path and an entry point name. - SEC-5: the cache warning shows control characters as escapes. - SEC-6: a deep results file gives DecisionError. - SEC-7: the racy test uses the later of mtime and ctime. - SEC-8: printable escapes the bidirectional format characters. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Md3Co8X9K3cT1u4rYQ9VwU
Merge results of fix/post-router and fix/post-security: - Refresh docs/map for the merged source. - Correct the source records of 28 flows whose cited modules changed (check, cli, route), and record their review digests after an examination of each flow claim. - Correct two claims: the CLI page servers also refuse a GET request for /events from a different web site, and SecondOpinion does not use a cache file in a repository if Git cannot tell if it tracks the file. - Record the source reviews of 16 components after an examination of their claims. No other claim text became false. - Add the CHANGELOG lines for the post-audit fixes under Unreleased. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Md3Co8X9K3cT1u4rYQ9VwU
|
Architecture
Levels: established = the facts show the claim. examined = an agent or a person examined the cited source. unknown = the facts and the source reviews do not show the claim. |
Windows refuses control characters in a file name, so a cache file with ESC and BEL in its name cannot exist there, and the test could not make its input. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Md3Co8X9K3cT1u4rYQ9VwU
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change follows #128, #129 and #130. A second security review examined the code that the audit fixes added. This change fixes the confirmed findings of that review. It also makes the strict route search faster.
Security review of the new code
Three finders examined the new code, and a verifier for each finder tried to disprove each finding. There are 17 findings, and the verifiers disproved none. All are low or info severity.
Fixed, each with a regression test that fails on the old code:
.git/configstarted a lazy fetch during a read. Each Git command now getsGIT_NO_LAZY_FETCH=1and an emptyGIT_ALLOW_PROTOCOL.out_diror the figure paths insystemap.toml, and the base-render job then did not check the figures. The job now refuses a PR that changes those settings, andrender --checkalso compares the figure files that exist./eventsslots. The servers now refuse a cross-site GET request for/events.systemap servecopied the CSP meta content of a served file into a response header without a check. The value is now checked.frame-ancestors 'none'.facts_shapenow refuses a stored module without ashavalue.decisions submitrefuses a deeply nested results file with an error, not a RecursionError.Not fixed, with the traced reason:
core.hooksPath=nulis a relative path. A Windows measurement is necessary before a change..pre-commit-config.yamlmust stay byte-identical with its copies. The pin belongs in the source of the copies.Route search
route_astar.pyadds an A* search with an admissible cut bound. The routes are byte-identical on this repository and on the s36, s72 and s144 fixtures, and the figures do not change.route_all, 3 runs each:
The time still grows with the square of the number of flows (exponent 1.93-2.16). The target was less than 4 s at s144, and this change does not satisfy it.
Checks
These checks pass on the head:
uv run pytest: 2487 passed, 7 skippeduv run pre-commit run --all-filesuv run mypy src --strictuv run systemap refreshuv run systemap checkuv run systemap judgement: no open findings, 16 current reviewsThe official ASD-STE100 dictionary was not available. A maintainer must examine the words of the new text.
Generated by Claude Code