Repository navigation
docs(skill): add security scanner install step to setup reference - #1961
Merged
Merged
Conversation
…tcy#1941) The `runtime should discover docker workloads` spec was commented out and its CI job disabled because it failed intermittently. The order the testenv brings things up explains it, and it is not a race that waiting longer can win. `docker compose up` started the labelled container with the rest of the stack, ten seconds before the daemon. dir-runtime reconciles once at boot (discovery.go, the only call to reconcile), queues every workload it finds, and gives each a bounded resolve budget: six attempts, 15s apart, 30s timeout each, so roughly 75s if attempts fail fast and 255s if they time out. The record that workload references can only be pushed once the daemon is serving, from the suite's BeforeAll. On a fast runner the record lands inside the budget and the spec passes. On a slow one the budget expires first, resolveWorkload persists `{"error": ...}` into the workload's OASF field, and nothing re-queues it: the only two writers to the work queue are boot reconciliation and new docker events. The spec's three-minute Eventually cannot recover from that no matter how long it waits. So the container now sits behind a compose profile and the suite starts it in BeforeAll, after the push. The docker start event is what queues the workload, and the record is already in the store when the first attempt runs. The spec is restored split in two. Registration depends only on the daemon seeing the start event; resolution depends on the record being reachable. Separating them means a lost event reads as "the workload never appeared" within a minute, rather than as a three-minute timeout that looks like a resolver fault. The resolution half asserts the absence of the "error" key directly, so an exhausted budget reports itself instead of surfacing as a missing "cid". Four things worth stating plainly rather than leaving implicit. This narrows the window but does not close the hole, and it gives something up to do it. Registration previously had two independent triggers, boot reconciliation and the start event; the flake was that both fired too early. Deferring the container removes the reconciliation trigger outright, so registration now rests solely on the event stream, which is lossy: dir-runtime subscribes to docker events without a `since`, and starts watching only after reconcile returns, so an event that fires in that gap is gone. The trade is a recoverable-looking flake for a rarer unrecoverable one. A periodic re-reconcile in dir-runtime would make the ordering irrelevant and is the real fix. The mechanism above is reproduced, not just read out of the source. Running the suite locally with a 90s delay before the record push, to stand in for a slow runner, fails on the old ordering and passes on this one. The failing run exhausts all six attempts on `record not found`, gives up about ten seconds before the record lands, and exits 201, the code this issue reports. Boot reconciliation logs `workloads_registered=1` before the change and 0 after. That reason was "possible schema drift on the runtime side," which is a separate question this change does not touch: the resolution assertion compares the resolved record against the fixture with MatchJSON, and a serialization drift there fails regardless of ordering. The job is re-enabled anyway, because a disabled job cannot tell us whether either problem is real, and dir-runtime has moved 1.3.3 to 1.3.4 since. If it comes back red for drift rather than ordering, that is worth knowing and belongs in its own change. Happy to drop the re-enable from this PR and land it separately if you would rather not have it in the matrix yet. The spec did not compile as commented: `:= discoverResp[0]` had lost its variable name. It reads `workload := discoverResp[0]` again. Signed-off-by: Conor Bronsdon <[email protected]> Signed-off-by: Mark Marton <[email protected]>
paralta
approved these changes
Aug 3, 2026
paralta
left a comment
Member
There was a problem hiding this comment.
LGTM, thanks 👍 Just review if mcp-server-git is actually required here, I know that the MCP scanner requires git for cloning but I do not think it requires mcp-server-git
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Signed-off-by: Mark Marton <[email protected]>
Contributor
Author
Right! |
keraron
approved these changes
Aug 3, 2026
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.
I was testing with the
agntcy-dirin my Claude Code with the example created by Ramiz:https://github.com/ramizpolic/agntcy-dir-on-claude.Without
mcp-scannerandskill-scanneron PATH, the reconciler cannot attach scan results to any record. The daemon retries on every tick but silently logs executable file not found in$PATH, leaving the Safe column permanently blank in discovery results. Nothing in the existing skill guided users to install the scanners. The agent only installed the tools when explicitly asked for it.Changes:
uv tool installcommands for both scanners, and apipfallback. Section numbers shifted (daemon → §4, contexts → §5, auth → §6, doctor → §7). Both the POSIX and PowerShell recommended-sequence blocks updated to include the scanner install step.Testing:
Validated end-to-end in a clean environment (no prior
dirctlor scanner install) using Claude Sonnet 4.6. Ran the full setup sequence from the skill, pushed and signed two OASF records, and confirmed the Safe column populated with real scan results instead of "unscanned" after the scanners were present.