-
Notifications
You must be signed in to change notification settings - Fork 0
feat: no-index MCP chirp + ADR-044 ephemeral port + dogfood/v1.1 cleanups (1.1.0-rc2) #55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
cf5f397
49a6753
d4e0474
a0731d4
adc3122
69e1ff5
02a7a90
ba8233a
0b4df33
c102297
7cf7782
efd2285
461614e
d0b15b3
046c341
85d9cd1
c7f2530
b3f58a6
7ff84b2
69ebadd
032425c
5da9ccd
b598ebf
3c8feae
8be269d
5675f4a
0a93731
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| --- | ||
| name: wardline-gate | ||
| description: > | ||
| Use when scanning for or fixing trust-boundary / taint findings, when a | ||
| `wardline scan` reports a defect, or when wiring wardline into an agent's | ||
| edit-verify loop. Explains the scan -> explain -> fix-at-the-boundary -> | ||
| rescan cycle and the baseline-vs-waiver discipline. | ||
| --- | ||
|
|
||
| # Wardline: the trust-boundary gate | ||
|
|
||
| Wardline is a deterministic, whole-program static taint analyzer. It marks trust | ||
| boundaries with two decorators from `wardline.decorators`: `@external_boundary` | ||
| (untrusted data arriving from outside) and `@trusted` (a producer that must only | ||
| receive validated data). When untrusted data reaches a trusted producer it raises | ||
| `PY-WL-101` at `ERROR`. | ||
|
|
||
| ## The loop | ||
|
|
||
| 1. **Scan.** Run `wardline scan . --fail-on ERROR` (or call the `scan` MCP tool). | ||
| Read the gate verdict and the active (non-suppressed) findings — `active` is | ||
| the population the gate enforces on. | ||
| 2. **Explain.** For each active defect, call `explain_taint` with the finding's | ||
| `fingerprint`, `path`+`line`, and its `qualname` as `sink_qualname`. Do this | ||
| right after the scan and before editing — a stale fingerprint returns an error. | ||
| With a Loomweave store configured, pass `chain: true` to walk the full taint | ||
| chain back to the originating boundary. | ||
| 3. **Fix at the BOUNDARY, not the sink.** Add validation or rejection at the hop | ||
| where untrusted data should have been checked — not a band-aid at the sink. | ||
| 4. **Re-scan.** Confirm the finding is gone. | ||
|
|
||
| ## Exit codes (CLI path) | ||
|
|
||
| - `0` — clean (or gate not requested). | ||
| - `1` — the gate tripped: a non-suppressed defect at/above `--fail-on`. | ||
| - `2` — a wardline error (bad config, unreadable path). Not a finding. | ||
|
|
||
| Branch on the code. On a trip, read the structured report wardline just wrote — | ||
| the finding names the function, file, and lines, which is enough to locate the | ||
| leak. | ||
|
|
||
| ## Suppression discipline | ||
|
|
||
| Prefer FIXING a finding. Suppress only a finding you have judged a true | ||
| non-issue, always with a reason: | ||
|
|
||
| - MCP `baseline` — snapshot current defects so only NEW findings surface. | ||
| `overwrite: false` (default) refuses to clobber an existing baseline; | ||
| `overwrite: true` re-derives it. A coarse, whole-set tool; requires a reason. | ||
| - `waiver_add` — waive ONE finding by fingerprint with a mandatory reason and an | ||
| expiry date. An audited, time-boxed exception. | ||
| - `wardline judge` (opt-in, network) — an LLM pass that labels each defect | ||
| TRUE/FALSE positive. Never runs automatically, never folded into scan; fails | ||
| loud with no API key so "couldn't triage" is never mistaken for "nothing to | ||
| triage". Above-floor false positives can be recorded as audited suppressions. | ||
|
|
||
| ## CLI vs MCP | ||
|
|
||
| - **CLI:** `wardline scan`, `wardline judge`, `wardline baseline create/update`. | ||
| Branch on the exit code; read the findings file it writes. | ||
| - **MCP:** `wardline mcp` exposes `scan`, `explain_taint`, `fix`, `judge` | ||
| (network), `baseline`, `waiver_add`; resources | ||
| `wardline://vocab|rules|config|config-schema`; and the `wardline:loop` prompt. | ||
| The server is stateless — the read-only tools are pure functions of your code | ||
| on disk and your config. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,30 +1,26 @@ | ||
| { | ||
| "mcpServers": { | ||
| "filigree": { | ||
| "args": [], | ||
| "command": "/home/john/.local/bin/filigree-mcp", | ||
| "type": "stdio" | ||
| }, | ||
| "loomweave": { | ||
| "args": [ | ||
| "serve" | ||
| ], | ||
| "command": "/home/john/.local/bin/loomweave", | ||
| "command": "/home/john/.local/share/uv/tools/loomweave/bin/loomweave", | ||
| "env": {}, | ||
| "type": "stdio" | ||
| }, | ||
| "filigree": { | ||
| "args": [], | ||
| "command": "/home/john/.local/bin/filigree-mcp", | ||
| "type": "stdio" | ||
| }, | ||
| "wardline": { | ||
| "type": "stdio", | ||
| "command": "/home/john/.local/bin/wardline", | ||
| "args": [ | ||
| "mcp", | ||
| "--root", | ||
| ".", | ||
| "--loomweave-url", | ||
| "http://127.0.0.1:9111", | ||
| "--filigree-url", | ||
| "http://127.0.0.1:8542/api/weft/scan-results" | ||
| ], | ||
| "command": "/home/john/.local/bin/wardline", | ||
| "type": "stdio" | ||
| "." | ||
| ] | ||
| } | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,3 +19,12 @@ repos: | |
| args: [--strict, --config-file=plugins/python/pyproject.toml, plugins/python] | ||
| additional_dependencies: | ||
| - pytest>=8.0 | ||
| - repo: local | ||
| hooks: | ||
| - id: wardline-scan | ||
| name: wardline scan | ||
| entry: wardline scan | ||
|
Comment on lines
+24
to
+26
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This hook runs only Useful? React with 👍 / 👎. |
||
| language: system | ||
| types: [python] | ||
| pass_filenames: false | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the repo-local Wardline MCP server, this now starts Wardline with only
mcp --root ., dropping both peer URL flags. The installer/doctor code inintegration_bindings::desired_wardline_args()still treats--loomweave-urland--filigree-urlas the desired contract, and the install/doctor tests assert those flags, so this checked-in MCP config is immediately classified as stale and Wardline MCP scans launched from this file no longer get the Loomweave/Filigree endpoints needed for the three-way dogfood integration.Useful? React with 👍 / 👎.