Repository navigation
Merge upstream v0.47.1 into dp-stable (PAIINFRA-244) - #30
Merged
carlos-lopez-vecino merged 179 commits intoNov 13, 2026
Merged
Conversation
…lok#6248) Guard against shell injection via github.ref "${{ github.ref }}" and "${{ github.ref_name }}" were interpolated directly into bash if/elif checks and variable assignments across image-build-and-publish.yml. Git ref names can contain shell metacharacters, so a maliciously named branch or tag could inject commands into these steps when the workflow is reached via workflow_dispatch or a published release. Use the runner's default $GITHUB_REF / $GITHUB_REF_NAME environment variables instead, so ref values are passed as data rather than expanded into the script text before the shell runs. Addresses GHSA-g976-wp3r-q8c6.
The SSRF guard already decoded NAT64-embedded IPv4 targets but treated 6to4 and Teredo - two other IPv6 transition address families that also embed an IPv4 destination - as ordinary public addresses. Decode 6to4 the same way as NAT64, recursing into the classifier on the embedded IPv4. Block Teredo wholesale instead, since its embedded IPv4 is obfuscated via bitwise NOT and can't be reliably decoded from the address alone. Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: Emre K <110906681+kocaemre@users.noreply.github.com> Co-authored-by: Chris Burns <29541485+ChrisJBurns@users.noreply.github.com>
…6251) * Run the security scan once per pull request security-scan.yml has its own pull_request trigger and was also called as a reusable workflow from run-on-pr.yml, so Grype and govulncheck ran twice for every PR. Drop the call from run-on-pr.yml and let the direct trigger cover PRs; its branch filter is removed so coverage matches what run-on-pr.yml gave. The same duplication existed on main, where the push: trigger overlapped with the call from run-on-main.yml. That call is kept, because image-build-and-push gates on its result, and the push: trigger is dropped instead. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * Add zizmor static analysis to the security scan Grype and govulncheck cover our dependencies and our Go code, but nothing checks the workflows themselves, so anti-patterns accumulate with no signal. Advisory to start with: --no-exit-codes stops findings failing the job and continue-on-error stops a tool or network failure doing so, while the existing backlog is worked through. Both come off once it can gate. Findings are written straight to SARIF and never printed. Workflow logs and job summaries are world-readable on a public repository, so echoing them would publish them; the SARIF upload keeps them in the Security tab. The upload is skipped for fork PRs, whose token is read-only. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * Fix code scanning findings on the new zizmor job The zizmor job's checkout now sets persist-credentials: false — it only reads workflow files and never pushes, so leaving the token in .git/config served no purpose. Both upload-sarif pins move to the commit the v4 tag actually points at. They were pinned to f205ea1c, which is a releases/v4 branch commit (v4.37.4) that no tag references, so the trailing "# v4" comment was misleading and the pin was 56 commits behind v4. The Grype job's pin is updated alongside the new one so the two agree. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
) Pin actions to SHAs and fix version comments `arduino/setup-task@v2` is a branch, not a tag, so it can move under us at any time. It currently resolves to b91d5d2c, which is already the pin used in e2e-tests.yml — so pinning the other 11 references changes nothing today and makes the repo internally consistent. Four pins carried a trailing version comment naming a different version than the commit they point at. The pin is what executes, so this is an audit problem rather than a functional one, but a wrong comment is worse than none because reviewers trust it. Each corrected value is taken from an existing pin of the identical SHA elsewhere in this repo. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
* Stop persisting git credentials in CI checkouts actions/checkout writes the job token into .git/config and leaves it there for the rest of the job unless told otherwise. None of these jobs push, so the credential is available to every subsequent step and every tool they invoke for no reason. Covers the CI workflows only. Excluded: the release workflows, which no pull request can exercise; the three running claude-code-action, which has broad shell access and may need to push; api-compat.yml, which does a `git fetch` and is the repository's only required status check; and security-scan.yml, whose checkout is handled in the zizmor PR. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * Stop persisting credentials in security scan checkouts The Grype and govulncheck jobs only read the tree — anchore/scan-action scans the filesystem and govulncheck-action runs with repo-checkout false — so neither needs the token left in .git/config. These were held back from the previous commit only because stacklok#6251 also edits this file. A trial merge of the two branches is clean, so there is no reason to defer them further. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
* Bind expressions and drop credentials in CI workflows
`${{ }}` is substituted into a run: block before the shell parses it,
so the value becomes part of the command text rather than an argument
to it. Binding to env: and referencing "$VAR" makes the shell treat it
as data regardless of content.
image-build-and-publish already bound VERSION in env: on four of its
steps and then re-interpolated the same expression in the script; those
now use "$VERSION". test-e2e-lifecycle was interpolating two values that
were already shell variables, one from a workflow-level env: and one
written to $GITHUB_ENV, so the expressions were redundant.
Also stops these three workflows persisting the token in .git/config.
All of them declare contents: read, so no job in them can push, which
makes the credential unusable as well as unnecessary.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* Scope security-events and drop one more credential
security-events: write sat at the workflow level in security-scan.yml,
granting it to govulncheck, which never uploads SARIF. It moves to the
two jobs that do. run-on-main.yml still grants the workflow the same
permission when it calls it, so nothing is lost.
issue-triage.yml declares contents: read, so no job in it can push and
the checkout token is unusable as well as unnecessary.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
…k#6259) * Derive PR number from the triggering run, not the artifact pr-size-labeler.yml runs on pull_request, so a pull request supplies the workflow definition that writes the artifact — including one from a fork. pr-size-label-apply.yml then consumed that artifact in the base repository, with pull-requests: write, taking both the target pull request number and the label name from it verbatim. The number is now derived from this job's own workflow_run event and the label is checked against the five known size labels. The artifact no longer carries a pull request number at all, so there is nothing left to trust in it beyond a value that must match a fixed list. workflow_run.pull_requests cannot be used on its own: it is empty for every fork pull request and for most same-repository ones, so it is a fast path with a head-commit lookup behind it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * Keep writing pr-number.txt until the consumer has landed `workflow_run` consumers always execute the copy of the workflow on the default branch, so a pull request can change the producer but not the consumer reading its output. Dropping pr-number.txt here failed the apply job on every open pull request, because the consumer still on main reads that file. The value is written again, bound through env: so it is not interpolated into the shell. The new consumer ignores it; removing the write is a follow-up once this has merged. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
…tacklok#6260) Gate the Claude workflow on write access, not history The trigger denied NONE, FIRST_TIMER and FIRST_TIME_CONTRIBUTOR, which still admitted CONTRIBUTOR and MANNEQUIN. CONTRIBUTOR is earned permanently by getting a single pull request merged, so any outside account that has landed one change could invoke the job afterwards. That job holds contents: write and ANTHROPIC_API_KEY, and allows Bash(git *), so the bar should be write access to the repository rather than a history of contributing to it. Replaces the deny-list with the OWNER/MEMBER/COLLABORATOR allow-list already used by the /retest gate. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Stop writing the PR number into the size artifact Nothing reads it now: the apply workflow derives the number from its own workflow_run event. The write was kept only so the consumer still on the default branch, which did read it, would keep working until that change landed. It has, so the artifact carries the label alone. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Two dangerous-triggers findings flag the workflow_run trigger itself, which neither workflow can drop: applying a label needs write access the calculating workflow deliberately lacks, and claude-code-action rejects the release event. What made the first dangerous was trusting the artifact for the target pull request and the label, and neither is read from it any more. The second checks out the default branch rather than an event-supplied ref. Two artipacked findings are on checkouts that keep their credentials on purpose. claude.yml has contents: write so Claude can push commits, and that push uses the credential. api-compat.yml cannot push, but it runs a git fetch and is the only required status check, so dropping it risks blocking every pull request to clear one low-severity finding. Each suppression carries the reasoning inline, so the decision sits next to the code rather than only in an issue. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
actions/create-github-app-token with no permission-* inputs mints a token carrying every permission the app installation holds. This one is handed to releaseo, which pushes a branch and opens a pull request, so contents and pull-requests are all it needs. Also binds the three releaseo outputs in the summary step through env: rather than interpolating them into the shell. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
The workflow granted contents: write to every job that did not declare its own, which was verify-release and compute-build-flags — both only check out and read. The default is now read and those two say so explicitly, so no job inherits. The jobs that write already declared their own permissions, which replace the workflow default rather than extend it, so they are untouched. The asset-cleanup step interpolated github.ref_name into a command substitution. Git ref names may contain ';', '$', backticks and '|', so the value is now bound through the step's existing env: block. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
run-on-pr.yml and run-on-main.yml called test.yml and helm-charts-test with secrets: inherit, which hands over every repository secret. Between them those workflows reference exactly one that is not GITHUB_TOKEN. test.yml runs the Go test suite, so it executes repository code and its dependency tree in a job whose secrets context also held every other credential configured on the repository, the large majority of them release-time credentials with no bearing on running tests. It now receives CODECOV_TOKEN and nothing else, declared as an optional workflow_call secret so a fork pull request, which gets no secrets at all, still runs. helm-charts-test.yml references nothing but GITHUB_TOKEN, which is always available to a called workflow, so it needs no secrets block. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
…#6270) The two registry logins piped secrets.GITHUB_TOKEN and passed github.actor into a run block by interpolation, so both landed in the script text rather than arriving as arguments. They are bound through env: instead. The packaging step passed the chart version unquoted. That value derives from GITHUB_REF_NAME, and git ref names may contain ';', '$', backticks and '|', so it is the one value in this file that could plausibly carry a metacharacter. It is now bound and quoted. The remaining expressions here are github.repository and matrix values, which cannot hold a shell metacharacter. They are left alone: this workflow runs only during a release and cannot be exercised by a pull request, so changes to it need to earn their risk. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
) * Scope the release tag token and bind the commit trailer actions/create-github-app-token with no permission-* inputs mints a token carrying every permission the app installation holds. This one pushes the tag and creates the GitHub Release, both of which are contents, so that is all it now asks for. The release-creation step also interpolated the triggering actor into the shell. That value is read out of a git commit trailer, so unlike the version — which is checked against a semver pattern before use — nothing constrains it. It is bound through the step's existing env: block. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * Scope the Homebrew tap token to contents The token was already limited to a single repository by owner and repositories, but not to a single permission. GoReleaser commits the formula straight to the tap's default branch — the brews block configures no pull request — so contents is all it uses. Confirmed against the tap's history: every release lands as a direct "Brew formula update" commit, and the app token is the push credential, so the installation demonstrably holds this permission already. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Rate limiting observability added Request-span attributes Signed-off-by: Sanskarzz <sanskar.gur@gmail.com>
Clear the remaining findings in helm-publish Every expression in this workflow's run blocks is now bound through env:. The matrix and repository values move to a job-level env: since they are constant across the job; the chart version stays per-step, because job-level env: cannot read a step output. Both checkouts stop persisting credentials. Neither job here declares contents: write, so no push is possible and the credential has no use. None of these values could carry a shell metacharacter — the version is derived from the tag and the rest are matrix entries and a repository name — so this is consistency rather than a fix. It is worth doing now only because the workflow is otherwise clean and this keeps it that way. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
* Make the zizmor check blocking main is clear of medium-and-above findings, so the advisory mode can come off: --no-exit-codes and the job's continue-on-error are gone and the check fails on anything at medium or higher. The reporting run is kept separate from the gate. It still emits SARIF at every severity so the Security tab keeps the low and informational findings the gate does not block on, and still writes them to file rather than the log. The gate prints, because anything it reports was introduced by the change under review and is already visible in its diff, and a gate that fails without saying why is not worth having. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * Pin zizmor by image digest rather than by version pipx resolved zizmor from PyPI at run time. The version was pinned but the artifact behind it was not, which is worth tightening for a check that is about to start blocking merges. Both steps now run the official container pinned by digest. A tag can be repointed; a digest cannot. The digest is the one zizmorcore/zizmor-action resolves 1.29.0 to, confirmed against the registry and by running the image, so it is the artifact upstream publishes and vets. The action itself was considered and not used: it tees its output, which would put the full finding inventory into a world-readable log, and its SARIF upload is skipped when the run fails, so findings would not reach the Security tab on exactly the pull requests that have them. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * Use the official zizmor action instead of running it directly The hand-rolled container invocation was replaced by two calls to zizmorcore/zizmor-action, which pins the zizmor image by digest itself, so the pinning that motivated the container approach is kept without the bespoke shell. Reporting and gating stay separate because the action cannot do both in one call: zizmor suppresses its findings exit code when the format is SARIF, which is what advanced-security selects. So the first call reports at every severity and uploads, and cannot fail; the second sets advanced-security false to restore human-readable output and the exit code, and gates at medium. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
* Clear the remaining findings in create-release-tag Every expression in this workflow's run blocks is now bound through env:. The version is the same value throughout and is checked against a semver pattern before any of these steps run, so this is consistency rather than a fix. The checkout stops persisting credentials. The single push in this job supplies its token in the remote URL, so the credential actions/checkout leaves in .git/config was never what authenticated it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * Stop persisting credentials in the last release checkouts Neither releaser.yml nor create-release-pr.yml contains a git push, commit or tag. GoReleaser uploads release assets through the API with the token it is given, and pushes the Homebrew formula with a separate app token; releaseo is handed the release app token explicitly. In both workflows the credential actions/checkout leaves behind is unused. Two of the three releaser jobs declare contents: read and so could not push regardless. This clears the last findings: zizmor now reports none across .github. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
The proxy /health endpoint must stay unauthenticated so Kubernetes
liveness and readiness probes can reach it, but it returned a full build
fingerprint — version, commit, build date, Go runtime version, and
GOOS/GOARCH — with no flag and no redaction. ToolHive already made the
opposite call in the vMCP server (returns only {"status":"ok"}) and the
v1 API (204 No Content), both with security comments about not disclosing
version information on an unauthenticated path. The proxies did not follow
that decision.
Remove the Version field from HealthResponse so the unauthenticated body
carries no build fingerprint, aligning the proxies with vMCP and the v1
API. Status, transport, and MCP backend status remain so probes keep the
degraded-state signal.
Part of stacklok#6271
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Let an explicit non-Modern header outrank a reserved key ClassifyRevision rejected any non-initialize request that carried a reserved _meta signal key, no _meta protocolVersion, and a non-empty MCP-Protocol-Version header -- with -32020, before the backend was ever contacted. The ChatGPT connector negotiates 2025-11-25 and sets reserved keys without a _meta protocolVersion, so every tools/call it sent was rejected with a user-visible error and no operator escape (stacklok#6188). The rejection was incoherent rather than strict: the same request with no reserved key at all is classified Legacy by hasModernSignal, so merely including clientInfo flipped an otherwise-fine Legacy request from accepted to rejected. An explicit non-Modern header is the client's negotiated declaration and outranks a stray key that carries no version of its own. Modern enforcement is unchanged. A Modern header with no _meta version is still -32020 -- that is the malformed shape go-sdk sends for a removed RPC, pinned by TestIntegration_Modern_RealBackend_LoggingContract. A reserved key with no header at all still yields MissingModernMetadata, which is where "a reserved key is a claim of Modern that must not be silently downgraded" actually applies, because there the key is the only signal present. The modernSignalMetaKeys doc is updated to say so. Closes stacklok#6188 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * Retarget classification tests at the still-rejected shape Two vMCP server integration tests pinned the exact request this change reclassifies: tools/call with MCP-Protocol-Version: 2025-11-25 and a reserved _meta key carrying no protocolVersion -- the ChatGPT connector shape from stacklok#6188. They now classify Legacy and reach dispatch, so the -32020 they assert never fires. Both tests are about classification rejection, not about that specific header, so point them at the shape that is still rejected: the same body with the MODERN header. Their comments are updated to say why the header must be Modern now. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
TestRoundTripDoesNotReplayInitializeOnDialError failed intermittently in a full-suite run with "Received unexpected error" on the HTTP call, while passing every time in isolation. It used http.DefaultClient, whose shared transport pools keep-alive connections across this package's parallel tests. Reusing one whose proxy has since been closed surfaces as a transport error before the request is made. Use a dedicated client with keep-alives disabled. The HTTP outcome is also not what the test asserts. For a dial failure either result is legitimate -- the reverse proxy may synthesize a 502, or the connection may fail outright -- so requiring NoError pinned an incidental detail. The substantive assertions, that no re-initialize reached the target service and that the session was unpinned, are unchanged and still fail when the production guard is removed. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
…#6252) * Hash client secrets with SHA-256 instead of bcrypt Secrets issued by this server are 32 bytes of crypto/rand output and are never client-chosen, so a password-stretching KDF protects nothing: brute force against 256 bits of entropy is infeasible at any hash cost. What bcrypt does buy is a CPU-amplification lever for unauthenticated callers -- one cost-10 verify per wrong-secret attempt against /oauth/token, in the same process as the proxy data path. No stored secret is in the old format: the bcrypt branch was unreachable before this series, because dynamic registration was the only client producer and it registered public clients only. There is nothing to migrate. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * Recognise every loopback address, not a fixed list IsLoopbackHost matched a hand-written list of literals, so it missed 127.0.0.0/8 beyond 127.0.0.1, IPv4-mapped loopback, and bare "::1" as returned by url.Hostname(). It also matched any host merely starting with "localhost:", so "localhost:8080:x" passed. Parse the host instead and ask net.IP whether it is loopback. Every caller uses this to relax a requirement for addresses that cannot leave the machine, so recognising more genuine loopback forms cannot promote a routable address. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * Accept confidential DCR registrations and mint the secret Some MCP clients can keep a secret and want to authenticate at the token endpoint rather than rely on PKCE alone. Behind a default-off allow_confidential_client_registration flag, /oauth/register now accepts client_secret_basic and client_secret_post and returns a server-minted secret exactly once. The secret is 32 bytes of crypto/rand, base64url-encoded without padding. The encoding matters: fosite url.QueryUnescape's both Basic components, so a secret containing '+', '/' or '%' would be corrupted at the token endpoint. Only its hash is stored, and the plaintext is never logged. Confidential registrations are restricted to https non-loopback redirect URIs. A client reachable on loopback is by construction a public client, and minting it a secret would ship that secret inside a distributed binary. client_secret_expires_at is a pointer so the key is present with value 0 ("does not expire") exactly when a secret is issued and absent otherwise, as RFC 7591 requires. Discovery advertises the two methods from the same flag the endpoint enforces, so the metadata cannot drift from what registration accepts. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * Key client retention on a DCR-issued marker Redis expired client rows based on IsPublic, which breaks once dynamic registration can mint confidential clients: a DCR-issued confidential client is exactly the registration an attacker would pile up, while a pre-provisioned one must never acquire an expiry -- Redis EXPIRE on a key with no TTL creates one. Persist a dcr_issued marker instead and gate both the TTL and its renewal on that. Rows written before this series carry neither the marker nor an auth method. Dynamic registration mints a new client_id per call and never rewrites a row, so such a row is DCR-issued and must keep renewing; without compensation an actively used client would expire at its original 30-day mark. The two shapes are identical in the stored JSON but not on the key: registration wrote public rows with an expiry and a pre-provisioned client has none, so the key's TTL tells them apart. GetClient reads value and TTL in one pipeline to avoid a race between them. A row with no recorded method is also rebuilt as a plain client rather than an OIDC one, so it does not acquire token-endpoint method enforcement it never had. Secret verification is unaffected; fosite runs that independently of the OIDC shape. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * Bound registration volume and in-memory client growth /oauth/register is unauthenticated and mints persisted state on every call, so both its rate and the resulting map need a ceiling. Registrations are limited to 1/sec with a burst of 5. The limiter is per-process and keyed on nothing: per-IP would need a trusted-proxy list to be meaningful, since X-Forwarded-For is caller-controlled. Running N replicas therefore allows N times the rate. The in-memory client map is capped. Eviction picks the oldest DCR-issued entry and never touches a pre-provisioned one, and proven use at the token endpoint moves a client to the back of the queue so an actively used registration is not evicted ahead of an idle attacker's. Entries younger than a floor are not evictable at all, which stops a caller evicting a freshly registered victim on demand; when nothing is evictable the registration is refused with a Retry-After hint rather than the cap being silently exceeded. The memory backend has no TTL of its own, so its effective retention under pressure is that floor rather than the 30-day window Redis gives. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * Reject confidential registration over cleartext HTTP Combining confidential registration with insecure_allow_http issues client secrets in cleartext over an unauthenticated endpoint. Reject the pair behind one exported predicate, called from Validate() and from the operator so the rule is stated once, and add a CEL rule on the shared EmbeddedAuthServerConfig type. That type backs both MCPExternalAuthConfig and VirtualMCPServer, and only the former reached the Go validation, so an inline vMCP would have validated cleanly and then crash-looped the pod. Nothing can break: the flag is unreleased. One exception is deliberate and documented rather than closed: a loopback issuer is permitted over plain HTTP without the insecure flag, because that is the shape of local development and requiring TLS there would push operators toward insecure_allow_http, which permits cleartext for any host. The assumption behind it -- that loopback means one machine -- does not hold in a cluster, where the listener still binds all interfaces. The flag is named for the lifecycle stage it gates: turning it off stops new confidential registrations but deliberately does not revoke already-minted secrets. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * Restore 5xx visibility at the token endpoint Both fosite failure paths logged at Error, and RFC6749Error carries only the error code, so an unauthenticated caller could flood the log stream with content-free lines. Demoting both to Debug fixed that but silenced storage and signing-key failures entirely, leaving no server-side trace of a broken token endpoint. Split on status instead: client errors stay at Debug, since an attacker can only ever provoke 4xx, while 5xx logs at Error with the diagnostic fields the code was not reading. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * Stop preferring an auth method we cannot perform The DCR auth-method preference list ranked private_key_jwt first, but nothing in the tree can produce the signed client assertion it requires -- client_assertion appears nowhere outside tests. Registering against an upstream that advertises it would succeed and then fail every subsequent token request, recoverable only by re-registering. Drop it so the strongest method we can actually perform wins, and correct the doc comment that still described the old ordering. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * Substitute confidential registration for named redirect URIs Some MCP clients register with token_endpoint_auth_method "none", declaring themselves public, and then refuse to continue because the response carries no client_secret. That is self-contradictory and no conformant authorization server can satisfy it as written: RFC 7591 §2 defines "none" as meaning the client has no secret. RFC 7591 §3.2.1 does allow the server to substitute registration metadata, so take such a client at its word that it wants a secret. force_confidential_redirect_uris names the redirect URIs whose registrations are upgraded to confidential and issued a real, verified secret even when they request "none", and the response reports the substituted method. No vendor is hardcoded. The operator names the URIs, which is the right place for the judgement: they know whether the client they are serving can actually hold a secret. Entries must be https non-loopback, so the override cannot put a secret into a native app on a loopback redirect -- the restriction ordinary confidential registration already enforces. Matching is exact, so registering with someone else's callback yields a secret for a client whose authorization codes are delivered to them, not to the registrant. The substituted method is reported as client_secret_post rather than client_secret_basic: the Python MCP SDK these clients build on constrains the field to none or client_secret_post, and an operator who shipped this fix found basic rejected and post accepted. The client is stored as a plain fosite client rather than the OIDC shape, so it authenticates with credentials in either the Authorization header or the form body. fosite pins the registered method only for OIDC clients, and we do not know which presentation these clients use -- guessing wrong costs an invalid_client that cannot be diagnosed remotely. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * Make the loopback cleartext exception an explicit opt-in Confidential registration over a plain-HTTP loopback issuer was permitted silently. validateIssuerURL allows an http issuer whenever the host is loopback, regardless of insecure_allow_http, so an operator could mint client secrets over cleartext with nothing objecting -- a gap documented in a comment but enforced nowhere. Require insecure_allow_confidential_over_loopback_http to reach that combination. The exception itself stays: a loopback issuer is how local development works, and refusing it outright would push operators toward insecure_allow_http, which permits cleartext for any host and is worse. What changes is that taking it becomes a named decision, visible in config review rather than inferred by reading two validation functions side by side. Enforced in Go rather than CEL. Expressing it in CEL means a regex over the raw issuer string, which would drift from the net.ParseIP-based classifier the real check uses across ports, paths, case and IPv6 forms; the same reasoning already applies to the per-entry check on force_confidential_redirect_uris. Nothing can break: both flags are unreleased. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
…documented (stacklok#6235) The vMCP passthroughHeaders allowlist was validated only against middleware.RestrictedHeaders, whose omission of Authorization is deliberate for the standalone header-forward middleware (a test asserts it stays forwardable there). For vMCP passthrough the documented contract is stricter: virtualmcpserver-api.md promises Authorization is rejected at startup, and the sibling embeddingHeaders field already excludes it via CEL validation. Forwarding a caller's Authorization or Cookie verbatim to every backend is a credential-leak footgun, not a pass-through use case. Reject both at startup with the same error shape as the other restricted headers. Signed-off-by: SashaMIT <sash@ela.city> Co-authored-by: Cursor <cursoragent@cursor.com>
The interactive login callback server bound ":port" (all interfaces) while advertising a localhost redirect URL. For the lifetime of a login, any host on the LAN could probe the listener and abort the flow by hitting /callback?error=... (no state needed on the error path). Login-code theft is not possible: the 128-bit state is validated before token exchange, so the impact is login DoS only. Bind 127.0.0.1 explicitly, matching the redirect URL host and the loopback address the port-availability probe already uses. Added TestListenAddrLoopback asserting the listener address is loopback. Signed-off-by: Sasha Mitchell <sash.t.mitchell@gmail.com>
* Display recorded trust state to the user RFC THV-0080 wants the identity pinned at trust-on-first-use displayed prominently, not discovered weeks later inside a signer-mismatch error. ProvenanceInfo becomes part of API responses: install results carry the provenance or unsigned exception that was just recorded (the CLI prints it — a deliberate exception to silent success, since a recorded trust anchor is security-relevant information, not progress chatter), and skill info surfaces the lock file's recorded trust state for project-scoped skills, provisional markers included. Part of stacklok#5899. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * Carry install trust state across the HTTP boundary The CLI is a pure HTTP client, so a field the service records but the install response omits can never reach the user. Provenance and the unsigned exception were set on InstallResult server-side and dropped at the wire, leaving printInstallTrust to report every install as untracked regardless of what was verified. Add both to the install response and the client DTO, and map them back. The round-trip test fails without the mapping — a direct test of the printer passes either way, which is how the gap survived. --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
* Bound client-controlled metric label length Cumulative metric readers (Prometheus, OTLP PeriodicReader) keep every distinct attribute set resident for the process lifetime. The OTEL SDK's 2000-series cap bounds the count of attribute sets but not the byte length of any single label value. The parsed MCP method, tool, and prompt names are taken verbatim from the request and bounded only by the 8 MB body limit, so a single label value can approach 8 MB and stay resident until the process exits. A small burst of large values is enough to OOM a pod. Add truncateLabelValue, capping client-controlled metric label values at 128 bytes on a UTF-8 rune boundary with a truncation marker, and apply it to every client-controlled label site in the telemetry middleware. Span attributes keep the full value on purpose: spans are sampled and ephemeral and the OTEL MCP semconv wants the real value. Part of stacklok#6271 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Assert mcp_resource_id label in truncation test The integration test verified gen_ai.tool.name and tool were observed but never confirmed mcp_resource_id was, leaving a false-negative gap: if that label key were dropped or renamed, the test would pass silently. Assert it was checked alongside the others. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
) Sign macOS thv binaries with Developer ID The macOS thv binary ships with only the ad-hoc signature Go's linker emits, so it carries no Team ID. Organizations that enforce binary allowlisting (Santa and similar) trust binaries by code-signing identity, leaving them to approve each release by CDHash or allow execution from a user-writable path. Both are fragile, so thv tends to get blocked in managed macOS environments. ToolHive Studio already signs with Developer ID Application: Stacklok, Inc, and the same certificate covers any binary from the team. Wire it into the CLI release. GoReleaser embeds anchore/quill, so signing happens on the existing Linux runner rather than requiring a macOS one. This is sign-only: omitting the notarize sub-block keeps Apple's notary service off the release critical path, and a Developer ID signature is all that Team ID allowlisting needs. Notarization can follow separately. Signing stays inert until the secrets are configured. Releases without them keep producing ad-hoc binaries and log a warning rather than failing, so this is safe to merge ahead of the credentials. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
* Sign pushes by default and remove the lock feature gate The final RFC THV-0080 piece: thv skill push signs the pushed artifact with the provided cosign key (attaching the signature manifest next to it, so installs can verify), and pushing unsigned requires an explicit --no-sign — a failed signing fails the push rather than silently publishing unsigned. With signing on publish and verification on consume both in place, the TOOLHIVE_SKILLS_LOCK_ENABLED gate comes out: the lock file, sync, upgrade, dependency materialization, and signature verification are now standard behavior for project-scoped skills. The architecture document's trust-model section graduates from the drift-detection honesty note to the verified model — TOFU semantics, the explicit allow_unsigned / allow_signer_change escape hatches, the provisional git marker, and what deliberately remains trusted on faith. Closes stacklok#5899. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * Push E2E artifacts with an explicit no-sign Signed-by-default pushes turned every E2E push into a 400: the suite has no signing infrastructure, so its pushes carry the explicit no_sign decision — matching the allow_unsigned exceptions its project-scoped installs already record. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * Accept the key format cosign generate-key-pair writes thv skill push --key could not read any key produced by the cosign CLI. It failed with an opaque ASN.1 error, and no test caught it: the fixtures built keys with cryptoutils, which writes PKCS#8 standard encryption under the same "ENCRYPTED SIGSTORE PRIVATE KEY" label that cosign uses for a payload sealed with scrypt and nacl/secretbox. Same label, different bytes. Decrypt the cosign sealing when the label says so, falling back to the PKCS#8 form, and report a wrong password as such rather than as a parse failure. Also document where COSIGN_PASSWORD is read: signing happens in the API server, so the variable belongs in that process's environment, not the shell running the CLI. * Append signatures instead of replacing them Signing built the manifest from empty.Image and wrote it to the .sig tag, so signing an artifact a second time deleted the first signature — trust material that may belong to another signer. This PR makes signing the default on push, which makes the overwrite reachable. Append to the existing manifest, treating only a genuine "absent" answer from the registry as empty. Re-signing with the same key stays a no-op, detected by verifying existing layers against the public key: ECDSA is randomised, so comparing signature bytes never matches. Found in review of stacklok/toolhive-core#230, which carries the same fix for the copy being moved there. --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
MCPPinger and StatelessMCPPinger construct a bare http.Client{Timeout:
timeout}, which follows Go's default redirect policy: any host, up to
10 hops. The pinger's target can be a remote MCP endpoint outside our
control, so a malicious or later-compromised remote can respond with a
3xx pointing the pinger at a loopback, private, or other host-reachable
address, and the client follows it without question -- a blind SSRF
(CWE-918). Remote health-checking is opt-in via
TOOLHIVE_REMOTE_HEALTHCHECKS, so this only reaches deployments that
enabled it, but nothing in the pinger's own code enforces that scoping.
Install networking.SameHostRedirectPolicy() as CheckRedirect on both
clients. It refuses any redirect to a different host and any
HTTPS-to-HTTP downgrade, matching the same-host-only guard the package's
data-plane forwarder (followRedirects, in transparent_proxy.go) already
applies to actual MCP traffic -- the two are meant to stay in sync, per
SameHostRedirectPolicy's own doc comment. The forwarder implements its
own redirect loop instead of using this hook because it must preserve
POST method and body across every redirect code for JSON-RPC
correctness; the pingers have no such requirement (MCPPinger only sends
GET, and StatelessMCPPinger's ping payload is not something a
same-host redirect target needs verbatim), so the standard http.Client
hook is the right fit here.
Add regression coverage for both pinger types: a same-host redirect
must still be followed (the common trailing-slash/canonicalization
case), and a cross-host redirect must fail the ping without the
redirect target ever being contacted -- asserted directly on the target
server, not just on the returned error, since a pinger that returned an
error after connecting would still have completed the SSRF.
The redirect policy's own behavior (cross-host, HTTPS downgrade,
max-chain-length) is already exhaustively unit-tested in isolation at
pkg/networking/http_client_test.go; the tests here exist to prove the
policy is actually wired into these two production constructors, which
is the integration point this change touches.
* Bind cached tokens to authorization server Fixes GHSA-pc64-52fx-5v22: a cached OAuth refresh token could be replayed against whatever token endpoint a remote MCP server currently advertises, even if it differs from the authorization server that originally issued the token. Refresh tokens are now persisted in a versioned envelope recording the issuer and token endpoint that issued them. On restore, the envelope must match what is currently discovered before the token is used for any network call. Pre-upgrade cached tokens (bare strings, not the new envelope) are migrated only when they can be bound to an authority the operator configured directly (static Issuer/TokenURL) — that class was never exposed to the underlying issue. Auto-discovery deployments have no independently trusted issuer to bind a legacy token to, so those are rejected outright and forced through one fresh OAuth flow instead of being migrated by trusting whatever the remote currently advertises; every restore after that is fully protected by the bound envelope. * Persist client identity before cached session A restored refresh token is only usable with the client credentials it was issued to, but the two were written in the opposite order: a failure between them could leave a cached token behind with no credentials to redeem it, and the CIMD client_id was assigned to the config after both writes had already snapshotted it, so it was never stored at all. Write the client identity first and skip caching the session entirely when that write fails. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
…tacklok#6534) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* Cancel superseded pull request checks * Exercise PR cancellation * Verify superseded PR checks stop
Reduce cached token restore complexity Extract migration persistence to bring cached token restoration below the cyclomatic complexity limit and unblock main CI without changing behavior. Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
Every push to main currently runs the full validation suite to completion even when a newer push has already landed. When several PRs merge close together, the newest commit contains all of them, so its checks validate the combined result and the older runs only consume runners. Add a per-job concurrency group to each validation job so a newer push cancels the older run's in-progress validation. Concurrency is deliberately not set at the workflow level: that would also cancel image publishing part-way through, leaving pushed-but-unsigned tags. Add a publish gate that runs after validation and skips publishing when the commit is no longer the tip of the branch. Publishing that has already started is never cancelled. Tagged releases run from releaser.yml and are unaffected. Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Verify plugin installs against a public key Plugins had no key surface at all: a cosign key-pair-signed artifact could only fail install-time verification, and `--allow-unsigned` could not rescue it because the artifact is genuinely signed. Skills gained the install-side key path in stacklok#6447; this transliterates it onto plugins, so a key-signed plugin can be installed project-scoped by supplying the matching public key, which is then pinned in the lock entry and reused. The key is the only trust anchor a key-pair bundle can have — no certificate, no transparency log — so it has to come from outside the artifact, and dispatch is lock-first: a key-pinned entry verifies against the key the lock records, and every disagreement with a supplied key is refused rather than resolved by precedence. Scope is install-only, matching skills v1: no `--public-key` on upgrade or sync, and no in-place re-anchor. Part of stacklok#6442 Signed-off-by: Samuele Verzi <samu@stacklok.com>
Update release files Release-Triggered-By: rdimitrov Co-authored-by: toolhive-release-app[bot] <280093410+toolhive-release-app[bot]@users.noreply.github.com>
Every job in the PR and main suites runs on the paid 8-core runner, including jobs that finish in one to three minutes and spend most of that on checkout, toolchain setup and image pulls. Those steps do not scale with cores, and the standard runner is free for this public repository. Move Go lint, operator unit tests, operator build, MCP conformance and the six shortest E2E shards to the standard runner. The Go test job, Helm chart tests, operator integration and E2E jobs, the E2E binary build and the long E2E shards keep the large runner, since they are CPU-bound or sit on the critical path. Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Every pull request update runs the operator E2E suite against three kind node versions, about 20 large-runner minutes per run, while cross-version compatibility almost never breaks within a single PR. Run only the newest version on pull_request events. Pushes to main and manual dispatches keep the full matrix, so a version-specific regression still surfaces on main within one CI cycle. Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Chris Burns <29541485+ChrisJBurns@users.noreply.github.com>
* Filter resource template list responses * Harden template response filtering
Update release files Release-Triggered-By: rdimitrov Co-authored-by: toolhive-release-app[bot] <280093410+toolhive-release-app[bot]@users.noreply.github.com>
Upstream v0.45.0 (stacklok#6379) makes each MCPServer the owner of a workload StatefulSet named after it. Fork patch 3a8e501 deleted exactly that StatefulSet as a "legacy" object, so after the v0.47.1 merge every reconcile would delete every backend. Remove cleanupLegacyMCPServerResources and its test. Keep the vMCP scheduling drift check from the same patch. Add a test that runs the MCPServer reconcile loop and checks that an owned StatefulSet with the MCPServer name survives. This commit must ship only together with the v0.47.1 merge. PAIINFRA-243 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
v0.47.0 and v0.47.1 bring 8 security fixes, among them the /sse authz bypass, a pinger SSRF, refresh-token binding and resource-template filtering. v0.43 to v0.46 have no CRD or chart breaks. We stop before v0.48.0 (new Lua script, oauth2 default flip). v0.45.0 (stacklok#6379) makes each MCPServer own a workload StatefulSet named after it. The fork cleanup that deleted that StatefulSet is removed in the previous commit (PAIINFRA-243); this merge must not ship without it. Resolved by hand: - MCPServer: the Service is still reconciled before the Deployment (5df6369); upstream's ensureWorkloadStatefulSet runs at the end. Proxy scheduling now has one source for build and drift check: each field of resourceOverrides.proxyDeployment wins, an unset field falls back to spec.podTemplateSpec (5b6448a). Without that, upstream's drift check would update the Deployment on every reconcile. - vMCP: upstream moved create/update into createDeployment and updateDeployment; the AlreadyExists/Conflict requeue (0532bd2) is ported there. Pod template labels stay a subset check (8071da5); upstream now wants exact equality. - Health monitor: backendChanged keeps the managed-workload status check (5d76636) and adds upstream's AuthConfig check (stacklok#6509). - DCR/CIMD: an omitted scope still grants the whole scopes_supported set (16c2fba); upstream grants DefaultScopes ∩ scopes_supported. - Token validator and vMCP incoming auth take both the required upstream provider (fork) and the embedded auth server issuer (new). - The vMCP health-probe header constants move to health/context, so pkg/vmcp/client no longer imports pkg/vmcp/health (an upstream test in health now imports client). Dropped because upstream now covers them: - Per-backend request timeouts (3533730, 4cf28e1, 703e8e8) and the configurable server write timeout (bafe4d4, write-timeout part): upstream applies operational.timeouts per backend (stacklok#6411) and lifts the write deadline while an MCP POST waits for a backend. - Capability refresh on health/registry changes (c4984e5 and its scheduler): upstream resyncs passthrough sessions when a backend's advertisability or the backend set changes (stacklok#6196). Our resources and prompts add-only resync goes with it (no usage in Datadog APM). CI keeps ubuntu-latest and golangci-lint v2.14.0 with only-new-issues; the govulncheck ignore list is the union of both sides. Module versions take the higher of the two. Regenerated CRDs, deepcopy, RBAC, CRD API docs and chart READMEs (no diff). Refs: PAIINFRA-244, PAIINFRA-210 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Update the merge base, the rows whose code moved during the merge (proxy scheduling, vMCP requeue, DCR default scope, health backend check, probe header constants) and list the patches dropped because upstream now covers them: per-backend timeouts and the server write timeout (stacklok#6411), the capability refresh (stacklok#6196) and the legacy StatefulSet cleanup (stacklok#6379). Refs: PAIINFRA-244 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
davidrubio-dp
approved these changes
Nov 12, 2026
The fork patch for client responses added the expectedIsReq field to TestParsingMiddleware. The v0.47.1 merge brought two SSE cases from upstream that do not set it, so they compared IsRequest against false. Both cases send requests, so set expectedIsReq to true. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Fix the advisories reported by govulncheck (GO-2026-6860, GO-2026-6866 in x/net, GO-2026-6865 in klauspost/compress) and by Dependabot (GHSA-mgcc-cww5-fp2q in go-jose/v4, GHSA-j6qf-3m9c-vwj3 in chi). - golang.org/x/net v0.60.0 -> v0.62.0 - github.com/klauspost/compress v1.19.2 -> v1.20.2 - github.com/go-jose/go-jose/v4 v4.1.4 -> v4.1.6 - github.com/go-chi/chi/v5 v5.3.1 -> v5.4.0 x/net v0.62.0 also raises x/crypto, x/sys, x/sync, x/term, x/text and x/tools to the versions it requires. go-jose/v3 has no patched version and is not changed. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
5 of 10 tasks
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.
Summary
The fork is behind upstream. Upstream v0.47.0 and v0.47.1 bring 8 security fixes, including the /sse authz bypass, a pinger SSRF, refresh-token binding and resource-template filtering. v0.43 to v0.46 have no CRD or chart breaks. This PR stops at v0.47.1 on purpose. v0.48.0 adds a new Lua script and flips the oauth2 default, so it needs its own step.
Upstream v0.45.0 (stacklok#6379) makes each MCPServer own a workload StatefulSet named after it. A fork patch (3a8e501) deleted exactly that StatefulSet. After the merge, every reconcile would delete every backend. The first commit removes that cleanup (PAIINFRA-243). The merge must not ship without it.
cleanupLegacyMCPServerResourcesand its test. It keeps the vMCP scheduling drift check from the same patch. It addsmcpserver_owned_statefulset_test.go, which runs Reconcile 3 times and checks that the owned StatefulSet survives. The new test fails on the old code and passes on the new code.Resolved by hand:
ensureWorkloadStatefulSetruns at the end. Proxy scheduling has one source for build and drift check. Each field ofresourceOverrides.proxyDeploymentwins. An unset field falls back tospec.podTemplateSpec(5b6448a). Without this, upstream's drift check would update the Deployment on every reconcile.createDeploymentandupdateDeployment. The AlreadyExists/Conflict requeue (0532bd2) is ported there. Pod template labels stay a subset check (8071da5). Upstream now wants exact equality.backendChangedkeeps the managed-workload status check (5d76636) and adds upstream's AuthConfig check (vMCP health monitor ignores backend AuthConfig changes: stale tokenless probes misclassify the backend asunauthenticatedand drop it from aggregation stacklok/toolhive#6509).scopes_supportedset (16c2fba). Upstream grants DefaultScopes intersected withscopes_supported.pkg/vmcp/health/context. This waypkg/vmcp/clientno longer importspkg/vmcp/health. An upstream test in health now imports client.Dropped because upstream now covers them:
operational.timeoutsper backend (Honor configured vMCP backend timeouts stacklok/toolhive#6411). It also lifts the write deadline while an MCP POST waits for a backend.CI keeps ubuntu-latest and golangci-lint v2.14.0 with only-new-issues. The govulncheck ignore list is the union of both sides. Module versions take the higher of the two.
Jira: PAIINFRA-210 (epic), PAIINFRA-243, PAIINFRA-244.
Type of change
Test plan
All checks ran in a sandbox with an offline Go module cache.
task test)task test-e2e)golangci-lint run ./...: 0 issues)What was run:
go build ./...andgo vet ./...pass.golangci-lint run ./...reports 0 issues. 3 SA1019 warnings on fork Requeue lines got the samenolintthat upstream uses.-raceover all packages excepttest/e2eandtest-integration.cmd/thv-operator/controllersand all other operator packages pass.Not fully verified: the sandbox blocks binding a local port.
httptestpanics with "bind: operation not permitted", and this also stops the rest of that package. Affected packages includepkg/vmcp/server,pkg/vmcp/client,pkg/vmcp/health,pkg/auth,pkg/authserver/*,pkg/transport/proxy/transparent,cmd/thv/appand others. A fulltask testrun is still needed. CI must also pass.Not run: e2e tests, the CRD compatibility check (
validate-crds.py, needs docker) and the ECR image build.API Compatibility
v1beta1API, OR theapi-break-allowedlabel is applied and the migration guidance is described above.Regenerated CRDs show no diff against the committed ones. The CRD Schema Compatibility check was not run locally.
Does this introduce a user-facing change?
Yes. The fork moves from upstream v0.42.1 to v0.47.1 and takes the 8 security fixes. Per-backend timeouts and capability refresh now use the upstream implementations.
Implementation plan
Approved implementation plan
Special notes for reviewers
resourceOverrides.proxyDeploymentwins per field, elsespec.podTemplateSpec. One function serves both build and drift check. Otherwise the Deployment updates endlessly.scopes_supported. Upstream grants DefaultScopes intersected withscopes_supported. If we setbaselineClientScopes = scopesSupportedin our values, we can drop this patch later.pkg/vmcp/health/contextto break a test import cycle.git diff v0.47.1 HEADand FORK.md.Open Dependabot alerts on go-jose/v3
This PR does not fix 3 open alerts on
github.com/go-jose/go-jose/v3: stacklok#69 (high, GHSA-mgcc-cww5-fp2q, DoS when parsing JWKs with RSA keys), stacklok#71 (medium, GHSA-4w3g-jfj2-cw2q, panic during CBC-HMAC processing) and stacklok#72 (medium, GHSA-vvm8-gf78-28g4, panics in JSON parsing).v3 has no patched version. v3.0.5 is a direct dependency of production files in
pkg/authserver, so it stays. Alert stacklok#70 (the same advisory for v4) is fixed here by the bump from v4.1.4 to v4.1.6.Follow-up options: migrate
pkg/authserverto v4, or dismiss the 3 alerts with a written justification. The team has not chosen yet.pkg/mcp/parser_test.go.🤖 Generated with Claude Code