Skip to content

feat(abom): harden the QLaaS authoring loop - #70

Draft
data-douser wants to merge 6 commits into
abom/app-credentials/1from
abom/qlaas-hardening/1
Draft

data-douser wants to merge 6 commits into
abom/app-credentials/1from
abom/qlaas-hardening/1

Conversation

@data-douser

@data-douser data-douser commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #69. The base is abom/app-credentials/1, so this diff shows only the authoring-loop changes. See the notes for retargeting.

Purpose

Make the QLaaS authoring loop reliable enough that a session carries a query request from scaffold to passing tests without the operator stepping in, while everything it touches stays confined to the pack.

Important changes

ql-mcp

  • One call at a time. codeql-abom serialize-mcp relays tool calls to ql-mcp one at a time. ql-mcp's CLI server exits on its first query run, and a call queued behind it was never answered. A call the client cancels frees the next.
  • Tools offered, and confined. ql-mcp's test, query, metadata and language-server tools are offered. Reads are confined to the pack and its libraries, and writes to the target query.
  • Corrected arguments. A form whose meaning is plain but which ql-mcp would refuse is corrected, and the correction is reported to the model.
  • Query runs. codeql_query_run must name a database and is offered for PrintAST only. codeql_test_run runs a query against its test database.

Models and files

  • GPT tools. GPT models' rg and apply_patch are offered and confined like Claude's grep, create and edit. A patch is judged by every file it names.
  • Session state lives under --work-dir. Where that is inside the pack, it lives in a private temporary directory made once per server run. The operator is never asked where.
  • Paths from outside ABOM. Those read from the environment or from files in the pack are used through os.Root, so a link cannot lead elsewhere. That covers library lookup and the VS Code Copilot CLI check.

Packs and toolchain

  • The prompt names the library sources each locked pack resolves to, codeql/actions-all first.
  • Pack install pins codeql/actions-all in packs an older ABOM scaffold left at "*".
  • A saved tool path that no longer exists is forgotten, and the server says so.
  • With no Copilot CLI named, the one VS Code installed is used, provided no other account could change it.

Test evidence

  • A run records the marked fixtures it ran over, with digests (marked_fixtures). Failed first holds while every marked fixture a failing run covered is unchanged.

Plans: qlaas-loop.md adds data extensions (item 6) and checking fixtures against the Actions schemas (item 7). It also records that a run is never handed a database it didn't name.

Notes

An authoring session can carry a zizmor-sized query request to 7 of 7
without the operator stepping in. Fifteen requests from the zizmor gap
analysis ran through it on has-ghas.

- ql-mcp runs behind `codeql-abom serialize-mcp`, a relay that hands it
  one tools/call at a time. ql-mcp's CLI server exits on its first
  `query run` (an empty per-session pack cache); the call in flight is
  retried as a fresh process, but one queued behind it was never
  answered. A call the client gives up on is cancelled, and the next
  waiting call is sent.
- ql-mcp's test, query, metadata and language-server tools are offered,
  with paths confined to the pack. A form whose meaning is plain but
  which ql-mcp would refuse is corrected and the correction handed back
  to the model. `codeql_query_run` must name a database, and the rules
  offer it for PrintAST only; `codeql_test_run` is how a query meets its
  test database.
- A GPT model's `rg` and `apply_patch` are offered and confined like
  Claude's `grep`, `create` and `edit`; a patch is judged by every file
  it names.
- Session state is kept under --work-dir or, where that is inside the
  pack, in ABOM's own directory keyed by the pack. The operator is never
  asked where it lives.
- The prompt names the library sources each locked pack resolves to,
  codeql/actions-all first.
- Pack install pins codeql/actions-all in a pack ABOM's older scaffold
  left at "*", and drops the lock ABOM wrote for it.
- A saved tool path that no longer exists is forgotten, and the server
  says so; with no Copilot CLI named, the one VS Code installed is used.
- A run records the marked fixtures it ran over, with digests. Failed
  first holds while every marked fixture a failing run covered is
  unchanged.

Plans: qlaas-loop.md gains data extensions (6) and fixtures checked
against SchemaStore's Actions schemas (7), and records that a run is
never handed a database it did not name.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
data-douser and others added 5 commits November 22, 2026 17:31
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ile operations

The Go self-audit reported nine go/path-injection results, every one a
path that began in a directory the environment names or in a file in the
pack, and reached a path-based create, remove or stat.

- Session state, where --work-dir is inside the pack, now goes to a
  private os.MkdirTemp directory made once for the server's run, as the
  default scratch is, rather than a fixed name under os.UserCacheDir. A
  link planted ahead of that name would have carried every session's
  writes, and the cleanup's RemoveAll, somewhere else.
- The libraries the rules name are looked up through an os.Root at each
  package cache, so a lock entry that climbs out of the cache names
  nothing.
- The Copilot CLI VS Code installed is checked through the root it is
  found in (ownedIn), with the refusals ownedHere makes for a path the
  operator names; a link that leads out of the configuration directory
  is refused rather than followed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

This branch has not been deployed

No deployments
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