Files
Open_Ultra_SAST/docs/use-case-fix-and-reverify.md
T
Marius Ciepluch c10dc11a43 docs(readme): a system map above the documentation index; open parts link docs to the roadmap
The maintainer's request of 2026-11-28, in chat, after 6ef8381: use Archify to map the
system and add the map to the README, before the index that links each part to its
documentation; say which parts to document and which open parts the documentation
should link into the roadmap. Two menus followed, each answered with the option
recommended. Menu 3: all fourteen parts, in four groups; all nine open parts, listed
on the roadmap page and linked from the seven pages that describe them; a static SVG
in the README, the interactive HTML left out of the repository; the open parts show
the states as the records hold them today, not the decisions of the earlier menu.
Menu 4: the wording of the section and of the seven sentences, and the caption of the
image, each "Write it as shown (Recommended)".

Four places differ from that wording, each on a finding of the reviewer. The two
cells follow the answer that the section show the states as the records hold them
today: the row on graph reuse says "Not scheduled; no step owns it" where the wording
said R5, and the row on the proof arm says "R4, if it needs it" where it said R4.
The pre-push page gained a sentence in front of its link: "No pre-push capability is
admitted yet." And the box of the proof arm in the map names "Use case", the page
that describes the arm, where it named "Where we stand".

What changed. Measured in /tmp/opencode/s10_rd2_diffcheck.out and s10_rd2_svg.out:
nine tracked files changed (39 insertions, 4 deletions) and one file is new.
- docs/system-map.svg, new: 225,027 bytes, 922 by 936, exported by Archify 3.3.2
  from its checked HTML (four gates passed, no crossover). Fourteen components in
  four groups: what you call, inside a scan, maintainers only, how detection is
  measured. The second line of each component names its page in short. The
  candidate cites forty source ranges, read at 6ef8381. The labels are text. The
  file is ASCII: the exporter's hover titles hold a middle dot, replaced by a
  hyphen. It holds no digit in its text, no ".kiro", no "kiro-", and none of the
  five patterns that test_plane_literals forbids under docs.
- README.md, 301 lines: the image and one caption at the top of "Documentation",
  before the site paragraph and the table.
- docs/roadmap.md, 140 lines: a section "Open parts" before "Rules at every step",
  nine rows: the open part, its state today, the page that describes it, and the
  step that closes it. The words "on synthetic review batches" in the first row
  are the handover's, which is not tracked; the reviewer found them consistent
  with commits 825e680, 6d66501 and c2b5f5b.
- Seven pages, one linking sentence each, with a link to that section:
  docs/evaluation.md, docs/pre-push-for-developers.md,
  docs/detection-techniques.md, docs/architecture.md,
  docs/use-case-fix-and-reverify.md, docs/deployment.md and
  docs/decision-engine.md.

The map was drawn by a subagent with the Archify skill, from a list of fourteen
parts and fifteen relationships; it attached the sources. It was corrected twice,
after its reports and my reading of the captures. The arrow between the report and
the plane pointed from the report to the plane, which suggests that a scan sends
something to the plane. It now runs from the plane to the quick rules, "runs the
quick scan on both pins", on the call in src/openultrasast/plane/tasks/alerts.py
(lines 117 to 168, cited on the caller). The legend's "Frontend" became
"Entry point". Two arrows simplify the code, as the subagent reported: the overlay
asks the engine for a flow and merges it, and the engine's answers are graded on
the evidence ladder. I inspected the captures at 900 pixels: light and dark of the
first delivery, and light of the second and of the third; the third differs from the
second in one second line. The labels read. The title of the second group sits at
the top middle of its frame, above the arrow labelled "standard".

Checks, in files under /tmp/opencode/ that start with their command.
- s10_rd2_pytest_docs.out: 30 passed in the five test files that read the README,
  docs and ops, with the strict build, run after the last edit.
- s10_rd2_site.out: a strict build to /tmp/opencode/site-rd2-check copies the SVG
  into the site, and no page of that site contains ".kiro" or "kiro-".
- s10_rd2_links.out (script s10_rd2_links.py): the relative links resolve, anchors
  included: 42 in the README, 14 in docs/roadmap.md. The script names three
  anchors of docs/deployment.md that it cannot find; they lead into the pages that
  include ops/ax/README.md and ops/README.md, and the strict build accepts them.
- s10_rd2_svg.out: the size, the viewBox, 49 lines with a text element, and the
  counts above.
- s10_rd2_diffcheck.out: the added text is ASCII; git diff --check exits 0.
- s10_rd2_gates_run.out and s10_rd2_exits.txt: the gates of label rd2 give ten
  zeros. They ran before the last edits, which touch documentation only.
Not verified: the image through GitHub's proxy; the switch to the light theme was
seen in headless Chromium only. Not in the repository: the interactive HTML and the
candidate, which stay under /tmp/opencode/archify-system-map/.

Review.
Three rounds. Round one blocked on two points; rounds two and three checked the fixes and the
message. The graph reuse row (docs/roadmap.md:121) now says "Not scheduled; no step owns it",
as the records say; the Proof arm box of docs/system-map.svg names "Use case", the page that
describes the arm; the pre-push page gained a sentence in front of its link; the proof arm row
reads "R4, if it needs it" (roadmap.md:122). Round three found the tree as in round two: the
nine blobs and the SVG are those I approved. Measured: 225,027 bytes, 922 by 936, 49 text
lines, 14 boxes, 15 arrows (11 labelled), ASCII, no digit, none of the five patterns; 40 source
ranges inside files at 6ef8381; 42 and 14 relative links; six anchors in a strict build of my
own; 11 tests passed, again in round three; the captures of the three deliveries read at 900
pixels. Remark: line 88 of the pre-push page is 131 columns wide and line 89 is 91; the
page's other lines stop at 84.
2026-11-28 17:48:16 +01:00

4.6 KiB

Use case: catch, prove, fix, re-verify

The tool closes the loop on a security regression. It finds the problem in your change, proves it with a reproducible check, and after the fix re-runs that same check to confirm the problem is gone. The proof becomes a regression test. It does not write the patch for you; it hands you a failing check and a repair direction, and your fix is confirmed when the check turns green.

The loop

  1. Catch. On the changed code, the static arm flags a likely regression with a location and a repair direction.
  2. Prove. Where the app is runnable, the proof arm builds and runs it and demonstrates the issue: a check that triggers the effect on the current code.
  3. Fix. You, or a coding agent, write the fix against the repair direction and the failing check. The tool does not generate the patch.
  4. Re-verify absence. The same proof is re-run against the fixed code. It no longer triggers. That is the bug's absence demonstrated by execution, not a claim that it "looks fixed."
  5. Keep it. The proof is a regression test. Commit it and the fix stays fixed.

What "re-verify absence" means, precisely

A demonstrated finding is a differential: the proof triggers the effect on the vulnerable code and does not on the fixed code. Re-verifying a fix is the same operation run against your new revision. No effect means the specific issue the proof captured is gone. It does not claim the code is secure in general; it confirms that this proven issue no longer reproduces. That scoping is the point: it is honest about exactly what it checked.

What it does and does not do

  • It produces a repair direction and a failing proof, not an auto-generated patch.
  • It re-verifies the fix by re-running the proof; the verifier already runs a demo against a given revision, so this is the existing mechanism, not a new one.
  • Families without a runnable proof (for example access control or configuration) get the catch and the repair direction but no execution proof, and are advisory only.

In CI, with GitHub Actions

ousast pre-push . --base <rev> --head <rev> --deadline <seconds> runs an explicit base-versus-head check, which is what an Action calls on a pull request. The example below is reference material, not an active workflow in this repo.

# .github/workflows/pre-push-security.yml  (example; adapt and enable in your repo)
name: pre-push security
on:
  pull_request:
jobs:
  check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0            # base and head must both be present
      - name: Install OpenUltraSAST
        run: pipx install openultrasast   # or your pinned distribution
      - name: Check the diff
        env:
          # model keys and spend caps, if the proof arm is used, come from secrets
          DEEPSEEK_API_KEY: ${{ secrets.DEEPSEEK_API_KEY }}
        run: |
          ousast pre-push . \
            --base "origin/${{ github.base_ref }}" \
            --head "${{ github.sha }}" \
            --deadline 300 \
            --mode advisory \
            --artifact "$GITHUB_WORKSPACE/pre-push.json"
      - name: Comment findings on the PR
        if: always()
        run: |
          # Placeholder: read pre-push.json and post the finding, its proof and the
          # repair direction as a PR comment. This formatter is not packaged yet
          # (see Honest status); wire your own, e.g. with gh pr comment.
          cat "$GITHUB_WORKSPACE/pre-push.json"

The intended flow on a repository:

  • A pull request scans base to head. A demonstrated finding is posted as a PR comment with its proof and repair direction, the evidence a developer takes to a product owner to win capacity.
  • The fix pull request re-runs the check. The proof flips from failing to passing, which is the fix confirmed.
  • The proof is committed as a regression test so the issue cannot return unnoticed.

Honest status

Re-verify by execution and the --base/--head entry point exist today. The turnkey pieces around them are delivery work, not detection: the PR-comment formatter and the automatic landing of a proof as a committed regression test are not packaged yet, and the base-versus-head path inherits the open large-repo latency limit, so a long deadline or a cluster lane may be needed on big diffs. The full-repository CI scan (as opposed to a diff) is roadmap work (plane-on-kubernetes), not the pre-push diff path shown here. The proof arm is a pilot; it is parked until step R4 of the roadmap needs it, see Open parts on the roadmap page.