Repository navigation
Description
Summary
mise run security — the task the pre-push hook runs (hooks:pre-push:security) — has a
failing leg that nobody has seen, because the aggregate stops at the first failure and
security:sast:masking (4th of 8) fails first. Running the legs individually exposes it:
MISE_EXPERIMENTAL=1 mise //agent:security → rc=1, at its security:image step. bandit
passes ("No issues identified"). Trivy reports 14 HIGH/CRITICAL fixable vulnerabilities, none
of them in this repo's own source, and none in the Debian base (debian 13.7 → 0 findings).
Measured 2026-09-15 on fix/879-insecure-object-assign @ a382fca2 (a merge of main
25330c72), mise 2026.9.9, trivy 0.70.0. That branch's diff vs main is two files, both under
cdk/ — zero files under agent/ or any Dockerfile — so the image inputs are byte-identical
to main and this is a main-state finding, not a PR regression.
Scanner invocation (from agent/mise.toml):
docker build --build-arg TARGETPLATFORM=linux/arm64 -f Dockerfile -t bgagent-local:latest ..
trivy image --scanners vuln --ignore-unfixed --ignorefile .trivyignore --severity HIGH,CRITICAL --exit-code 1 bgagent-local:latest
Findings, grouped by what actually ships them
| # | Target | Type | Provenance |
|---|---|---|---|
| 9 | usr/local/bin/gh |
gobinary | agent/Dockerfile:2 ARG GH_VERSION=2.93.0, built from source in the gh-builder stage (line 27) |
| 1 | usr/local/bin/uv |
rustbinary | agent/Dockerfile:99 COPY --from=ghcr.io/astral-sh/uv:0.11.14@sha256:1025398… |
| 4 | usr/lib/node_modules/npm/** |
node-pkg | agent/Dockerfile:89 npm install -g npm@latest — npm's own bundled deps |
gh 2.93.0 — vendored Go modules (9)
| Library | Advisory | Installed | Fixed |
|---|---|---|---|
github.com/sigstore/rekor |
CVE-2026-48702 | v1.5.0 | 1.5.2 |
golang.org/x/crypto |
CVE-2026-56854 | v0.52.0 | 0.55.0 |
golang.org/x/mod |
CVE-2026-56864, CVE-2026-56865 | v0.36.0 | 0.40.0 |
golang.org/x/net |
CVE-2026-46600 | v0.55.0 | 0.56.0 |
golang.org/x/text |
CVE-2026-56852 | v0.37.0 | 0.39.0 |
google.golang.org/grpc |
CVE-2026-84304, CVE-2026-84445, GHSA-hrxh-6v49-42gf | v1.81.1 | 1.83.1 / 1.82.2 / 1.82.1 |
uv 0.11.14 (1)
| Library | Advisory | Installed | Fixed |
|---|---|---|---|
quinn-proto |
GHSA-4w2j-m93h-cj5j (remote memory exhaustion, unbounded out-of-order stream reassembly) | 0.11.14 | 0.11.15 |
npm's bundled dependencies (4)
| Package | Advisory | Installed | Fixed |
|---|---|---|---|
brace-expansion |
CVE-2026-14257, CVE-2026-69152 | 5.0.7 | 5.0.8 / 5.0.9 |
ip-address |
CVE-2026-69192 | 10.2.0 | 10.3.1 |
tar |
CVE-2026-73566 | 7.5.19 | 7.5.21 |
Why this has stayed invisible
Three independent reasons, which is why it needs its own issue rather than a note on an existing one:
- Aggregate short-circuit.
mise run securityrunssecurity:secrets→deps→sast→
sast:masking→grype→retire→gh-actions→//agent:security. Whole-repo
sast:maskingis red onmain(6 pre-existing findings, chore(security): clean up 21 pre-existing silent-success-masking findings on main #756/25 pre-existing masking findings on main fail the pre-push gate, forcing --no-verify for every contributor #766), so execution never reaches
the last leg. The practical consequence: "fix the masking findings and pre-push goes green" is
false — the next wall is this one. - CI never runs it on a PR. Per feat(ci): scan container image + SAST on PRs — weekly-only cadence let a HIGH CVE sit on main for 6 days #235,
build.ymlsets
MISE_DISABLE_TOOLS: "aqua:aquasecurity/trivy,grype,semgrep", and image scanning happens only in
the weeklysecurity.ymlcron. So PR checks are 8/8 green with these 14 live. --ignore-unfixedmeans every one of these has a published fix. They are not
wait-for-upstream noise.
Proposed remedies
Per target, because they are three different kinds of problem:
gh— bumpARG GH_VERSIONpast 2.93.0 to a release whosego.modcarries the fixed
golang.org/x/*,grpc, andrekorversions, and confirm by re-scanning rather than by
changelog. Because the binary is compiled from source in-image (go install …@vX), the vendored
set is whatever that tag pins — a version bump is the only lever; there is no separate dep file
to patch.uv— bump the pinned digest to ≥ 0.11.15 (ghcr.io/astral-sh/uv:0.11.15@sha256:…).
Smallest, most mechanical fix of the three.- npm's bundled deps —
npm@latestalready ships them, so there is nothing to bump. The repo
already has a precedent for exactly this atagent/Dockerfile:92
(npm --prefix "${CLAUDE_NPM_ROOT}" update tar minimatch glob cross-spawn picomatchfor the
claude-code tree). Extending that treatment to npm's ownnode_modules, or dropping targeted
.trivyignoreentries with an expiry and a linked upstream issue (the lifecycle feat(agent): CVE suppression lifecycle — scheduled re-scan of .grype.yaml ignores #131 asks
for), are the two honest options.
Acceptance criteria
-
MISE_EXPERIMENTAL=1 mise //agent:securityexits 0 onmain. - Any residual suppression lives in
.trivyignorewith a justification, an upstream link, and
an expiry date — not a blanket severity downgrade. - A regression note records that
mise run security's short-circuit hides later legs, so future
"the security gate passes" claims are made leg-by-leg.
Related
- feat(ci): scan container image + SAST on PRs — weekly-only cadence let a HIGH CVE sit on main for 6 days #235 — why PR CI cannot catch this (
MISE_DISABLE_TOOLS+ weekly-only cadence) - feat(agent): CVE suppression lifecycle — scheduled re-scan of .grype.yaml ignores #131 — CVE suppression lifecycle (scheduled re-scan of ignore entries)
- chore(security): clean up 21 pre-existing silent-success-masking findings on main #756 / 25 pre-existing masking findings on main fail the pre-push gate, forcing --no-verify for every contributor #766 / bug: security:sast:masking fails on main — 6 silent-success-masking findings (unrelated to #532) #542 / chore(security): masking rule precision — stop flagging correct fail-closed code + fix mis-placed suppression (#756 Cat 0) #790 — the masking leg that short-circuits ahead of this one
- chore(ci): pin scanner toolchain + mise + mise-action to exact versions across all surfaces (reproducible security suite) #722 — pinning the scanner toolchain (trivy 0.70.0 here vs 0.74.0 available; the count can move
with the scanner version, so pin before treating any number as a baseline) - fix(security): merge vault channel_metadata by spread, not Object.assign (#879) #880 — the PR whose gate run surfaced this
Activity
laithalsaadoon commentedon Sep 19, 2026
Ran the aggregate leg-by-leg on
main@9d4beda8tonight, which is what acceptance criterion 3 asks for. Two corrections to the short-circuit section, and one thing that changes the order of work.The first wall on
mainis step 3, not step 4[tasks.security](mise.toml:223) issecrets(1),deps(2),sast(3),sast:masking(4),grype(5),retire(6),gh-actions(7),//agent:security(8). Measured at9d4beda8with semgrep 1.176.1, gitleaks and osv-scanner from the repo's own pins:9d4beda8security:secretssecurity:depssecurity:sastsecurity:sast:maskingsemgrep test .semgrep/2/2 pass, placement checker passes, whole-tree scan reports 3grype,retire,gh-actions,//agent:securityStep 3's single finding is
javascript.lang.security.insecure-object-assign.insecure-object-assignatcdk/src/handlers/linear-webhook-processor.ts:928, which is #879. The 2026-09-14security.ymlrun agrees: run 34842090188 prints1 Code Finding, the same rule at line 926 for that SHA, then[//:security:sast] ERROR task failed. Its task list shows secrets, deps and sast only.So the summary's
sast:masking(4th of 8) fails first is branch state, notmainstate. It holds ona382fca2, which carries the #879 fix, sosastpasses there and masking is genuinely first. Onmainthere are three walls ahead of your leg, not two: #879/#880, then masking, then the image scan. The rest of the issue's framing is unaffected, since the branch diff really is two files undercdk/and the image inputs really are byte-identical tomain.Masking is 3 unsuppressed findings at HEAD, not 6
agent/src/server.py:1447,cdk/src/handlers/shared/linear-oauth-resolver.ts:525,cdk/src/handlers/shared/orchestration-store.ts:350. #756 enumerates 21 items, of which one is still live (orchestration-store, then:344); the other two post-date that issue and arrived with #733 and #831. Worth pinning here because "6" sets the wrong size for wall 2.Wall 1 has a green fix that cannot merge
Applied #880's change alone to
9d4beda8(theconsttoleton the declaration pluschannelMetadata = { ...channelMetadata, ...vaultMetadata(resolved) }) and re-ran step 3 over the same 719 files: 1 finding to 0, exit 1 to 0. Restored from a SHA-verified backup and confirmed an empty diff. So #880 on its own clears wall 1 and advances the chain to step 4.#880 is not draft, all 8 checks pass, and auto-merge (squash) has been armed since 2026-09-15T20:01:52Z. It still reports
REVIEW_REQUIRED, and the ruleset explains why rather than any check:mainruleset setsdismiss_stale_reviews_on_push: true.1e7dcfd2..d4ec661b, then themainmerge). Withrequired_approving_review_count: 1andrequire_last_push_approval: true, the author cannot satisfy it.dismissal_restrictionis disabled with zero allowed actors, so nothing bypasses it.Net: auto-merge is armed on a PR that cannot fire it, and it needs one approval from somebody other than its author. Nothing on this issue blocks on that, but it is the cheapest of the three walls and the only one already written.
Two related artifacts nobody has connected to it: the auto-filed canaries #886 (
main @ 5e10038) and #861 (main @ 12c9b63) are both open, and both are this same step-3 red.Two empty controls were caught while measuring this, in case anyone reproduces it.
const channelMetadata: Record<string, string> = {appears 5 times in that file, one per builder, so a string-replace patch keyed on it silently does nothing and the re-scan reports the unchanged 1 finding, which reads exactly like a failed fix. Patch by line number (861 and 927-928 at this SHA) and assert the tree went dirty before believing the second number.drafted by Bonk
scottschreckengaust commentedon Sep 21, 2026
Implementing this — PR #910 (draft).
MISE_EXPERIMENTAL=1 mise //agent:securityis rc=0 locally; all 14 fixable HIGH/CRITICAL are cleared andagent/.trivyignoreis untouched and still empty, so acceptance criterion 2 is met with nothing to expire.Two things in this issue's analysis did not survive measurement. Recording them here because both would have produced a fix that looked right and wasn't.
1.
npm install -g npm@latestdoes not ship the fixes. The issue reasoned that npm@latest already carries them, so there was nothing to bump. Measured on the built image: npm 12.0.2, today's latest, still bundlesbrace-expansion5.0.7,ip-address10.2.0 andtar7.5.19 — the exact versions flagged.npm@latestis not a security control here.2. The
npm --prefix <tree> update …precedent cannot be extended to npm's own tree. Not merely awkward — impossible. npm's publishedpackage.jsondeclares@npmcli/docs@^1.0.0, a workspace-internal package that was never published, and Arborist resolves the whole declared graph before touching anything, so every npm-native operation inside npm's ownnode_modulesdies atE404 @npmcli/docs. Verified forupdate,update --omit=dev, andinstall --no-save. npm's bundlednode_modulesis a build artifact, not an installable project. The fix is therefore a directnpm packtarball overlay, with the pinned version treated as a floor (npm@latest floats, so a blind overwrite could silently walk a newer bundled dep backwards) and both failure modes hard-gated so it cannot decay into a silent no-op.Also worth correcting in the
uvremedy: the advisory's "fixed in 0.11.15" is quinn-proto's version, not uv's. uv 0.11.14 happens to vendor quinn-proto 0.11.14, which makes the two look like a single number and invites a bump to "uv 0.11.15" that would fix nothing. The floor is a uv release vendoring quinn-proto ≥ 0.11.15; 0.12.17 vendors 0.11.18.A third invisibility mechanism, not in the issue
The issue gives two reasons this went unseen — the local aggregate short-circuits, and PR CI does not run the image scan. There is a third, and it is the one that actually mattered:
The weekly
security.ymlcron — the only surface that runs the container scan — invokes the same aggregate (mise run security,security.yml:67). A red early leg suppressed the image leg there too, and the issue that job auto-files names only the first failure. So the scan was not "unrun because nobody looked"; it was unreachable on every surface simultaneously.Demonstrated live while preparing this PR —
mise run securityfrom the branch stops at leg 3 of 8:security:sast:masking(leg 4) never ran; the image scan is inside leg 8. Which leg is red is therefore not stable — fixing the earlier one just uncovers the next — so the AGENTS.md note criterion 3 asks for documents the mechanism and the per-surface leg inventory rather than naming one leg.I did not change
security.ymlto de-short-circuit it: that is a CI edit, which AGENTS.md puts under "ask first", and it is outside this issue's scope. Recommend a follow-up to run the legs independently there so the auto-filed issue enumerates every failing leg.Scope note
This PR claims only that the fixable set is empty.
--ignore-unfixedis unchanged, so findings without a published fix remain hidden by design. Andmise run securityas a whole is still red pending #880 and #909 — stated leg-by-leg rather than as "the security gate passes", which is the habit this issue exists to break.krokoko commentedon Nov 20, 2026
Triage: what this issue asks for is on
main; a small leftover is noted at the end.The 14 findings are gone on main: #1048 (57b9aec) builds gh 2.103.3 with Go 1.27.4 and copies uv 0.13.7, #1052 (bf52b90) installs pip 26.3 and pins trivy 0.76.2, and npm@latest (12.2.3) now bundles fixed versions of brace-expansion, ip-address and tar. With the flags of
//agent:security:image, an image built from the Dockerfile and lock file that are on main has no fixable HIGH or CRITICAL finding, and bandit passes; the first scheduled run of the weekly workflow after these merges is on 2026-11-23. Two later findings are accepted inagent/.trivyignore, each with a reason and an expiry of 2026-12-16, after which the scan fails again until the entry is removed or renewed. #1035 (7539ba1) makes the weekly workflow run every scanner after a failure and list each failed one in its rolling issue; a plainmise run security, as the pre-push hook runs it, still stops at the first failure, which the comment on the task inmise.tomlrecords. Not done: the two entries have no upstream link and AGENTS.md has no note on that stop; scanning the image on pull requests remains #235 and the lifecycle of suppressions #131.Posted from an automated sweep of the open issues. Each pull request, commit and file named above was checked against
mainat3dbfada1. The issue is left open for a maintainer to close.