Upgrading Hawk¶
This page is for existing deployments. For a new deployment, use the current configuration reference.
Sections are grouped by the release that introduced the change, newest first, and each is headed with the pull request that made it. Hawk follows SemVer: each breaking change in a major release (vX.0.0) should have a section here, and a CI check fails a major-bump PR that does not add one. The release notes list those changes under "⚠ BREAKING CHANGES" with the PR number; find that number here for what to do. A minor release can carry a section too, for a change that keeps compatibility but still deserves a look before deploying.
Before upgrading:
- Read every section for the releases between your version and the target, not only the majors.
- Run
pulumi previewand check for replacements of nodes, node classes or databases before applying. - Database migrations run inside
pulumi up(see Database); a section says so when something must happen before or after that migration.
5.0.0¶
strict reaches the hosts it names through a proxy (#3125, #3126)¶
On a deployment with Nitro Sandboxes or gVisor (hawk:enableNitroSandbox, hawk:enableGvisor), a strict sandbox now reaches the hosts its eval set names through a proxy pod of its sample's own, where it reached them directly. A host in isolation.allow_domains then takes GET, HEAD and OPTIONS, and a git fetch from github.com, gitlab.com or bitbucket.org; anything else needs a rule in isolation.allow_requests. Some programs reach no host through a proxy, a client that trusts one certificate file (Python's requests) trusts the proxy's authority alone there and refuses a sibling service on an authority its image installed, an eval set that names hosts and pins a runner image is refused, and each sample's proxy takes room in the sandboxes' queue, 1 CPU, 2Gi of memory (and a Nitro pod's 768Mi of overhead) and 10Gi of disk as a Nitro Sandbox where the deployment runs strict in them, or 150m and 512Mi on gVisor (see Egress proxy for strict sandboxes). To keep named hosts open as before, set hawk:egressThroughProxy: "false" before upgrading. A deployment with a VPC, peered VPC or pod range outside 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 100.64.0.0/10 and 240.0.0.0/4 must set it: the deploy refuses the proxy there. A Nitro proxy runs on the nitro-egress-proxy pool, which takes no sandbox: on an external cluster with Nitro Sandboxes, add such nodes before upgrading, with the label node-restriction.kubernetes.io/hawk-egress-proxy=true and the taint hawk.metr.org/egress-proxy=true:NoSchedule, or the proxies stay Pending, and under Kueue each holds its sample's quota. A stack on another stack's cluster is upgraded after that cluster's owner, for the same reason. The pool's nodes have 8 vCPUs and 32 GiB: a stack that sets hawk:nitroInstanceFamilies needs an amd64 family with such a type, an m family, or the deploy stops and says so.
A wildcard in isolation.allow_domains, such as *.example.com, is refused at validation. A range in isolation.allow_cidr is refused unless it is IPv4, outside the private and reserved ranges the proxy never dials, a /24 at widest, and on a task item that names runtime_class: nitro or nitro-32bit, which takes it with no network card: it then opens one TCP port, 443 unless the entry names one (203.0.113.0/24:5432), where outside Kata's lockdown and peer networks it opened every port. An eval set with a wildcard, or with a range that is not taken, on the eval set or on a task item, stops launching with an error that names the field or the entry. Before upgrading, name each host in isolation.allow_domains, or run those tasks at isolation: standard, where the task's own allowCIDR and allowDomains still name its ranges and wildcards and none of strict's hardening applies. An eval set saved with a wildcard, or with a range that is not taken, resumes only with a config that has made that change (hawk eval-set resume <id> --config FILE), and one that also has an online scanner does not resume: start a new eval set.
isolation also refuses a name among the hosts Hawk's own telemetry goes to. The whole internet is allow_domains: ["*"]: write that where you wrote allow_cidr: ["0.0.0.0/0"].
A task that adds samples while it runs (Inspect's SampleSource) is now refused at strict and wherever it names a runtime_class, because Hawk applies isolation only to the samples a task starts with: give it a fixed dataset, or run it at standard with no runtime_class.
A strict Nitro sandbox that uses the network boots with no network card (#3126)¶
This affects a deployment with Nitro Sandboxes (hawk:enableNitroSandbox). Where its stack creates its cluster and has hawk:nitroWithoutNetworkCard and hawk:egressThroughProxy on, hawk:egressOverVsock is on by default: a strict sandbox in a Nitro Sandbox that names hosts then boots with no network card and reaches its proxy through its node.
The whole internet (allow_domains: ["*"]) or an address range, on a strict task item that names runtime_class: nitro or nitro-32bit and grants no GPU, now goes that way or not at all. Every task item of the eval set has to be strict, grant no GPU and name nitro or nitro-32bit, and strict has to run on Nitro: any other eval set that makes such a grant is refused at launch and on resume, with a message that says why, and so is one whose sandbox would keep its card, as it starts. Run the other items as an eval set of their own, or take the runtime_class off the items that grant *: an item that names none, or grants a GPU, keeps * on its card. Where the grant is taken, a sandbox of the eval set reaches the internet and its sibling services over TCP alone, and the proxy logs each connection to the internet, where none was logged: tell task authors what a task meets between its services and on the internet. The eval set's sandbox namespace enforces Pod Security's privileged level, with warn and audit at Baseline, and Hawk's final Pod admission alone holds its pods.
The deploy needs kubectl on the host that runs pulumi up. It runs a launcher on every Nitro node but the egress proxies', starts each new one tainted until its launcher is Ready, and replaces the Nitro nodes from before it as they empty: those take no new sandbox, and until they are gone the launcher's monitor can alert for one too full to fit its launcher. A pod on the route requests 500m of CPU and 256Mi of memory for its forwarder, where its DNS sidecar requested 100m and 128Mi.
Before upgrading:
- Let queued Nitro sandboxes start, or stop their eval sets. A sandbox pod still pending across the deploy selects the nodes from before it: once those have no room it never starts, and under Kueue it holds its quota until its eval set ends.
- If you run your own admission policies, allow the launcher, the forwarder and the redirect init container, and the annotations and volume that give a proxied sandbox its proxy's CA.
- If you match sandbox traffic by port in policies or flow logs of your own, expect TCP 3134 between sibling pods on the route, whatever port the task declares.
To keep the cards, set hawk:egressOverVsock: "false" before upgrading. Wherever it is off, as it is on an external cluster, named hosts keep their cards, and a task item that names a Nitro class is refused at launch if it grants a range or, with no GPU, *: take the runtime_class off an item that grants *. Before turning the setting off later, stop the eval sets on the route: their sandboxes lose their egress, and one still queued is refused as it starts while it holds its quota.
Before rolling back to an earlier release, stop the strict eval sets that name hosts or grant * or a range, or let them finish: its Pod admission policy refuses every update of a pod that carries this release's egress annotations, the removal of a finalizer too.
Tokens before grant version 2 are refused (#3232)¶
This affects deployments that use restricted credentials or delegated sessions. This release removes the runtime flag issue_grant_version_2: the Hawk API always writes tokens with grant.version 2. The Hawk API, Middleman and the token broker now answer 401 to a token that does not have grant.version 2.
Before upgrading, the flag must have been on in the deployment for at least 32 minutes (how to turn it on): a toggle takes up to 15 seconds to reach every API process, a version 1 token lasts 30 minutes, and services accept it for 60 seconds after that. If you upgrade by release, upgrade to 4.4.0 first and turn the flag on there.
To roll back: to 4.4.0, at any time. Keep the flag on there until the Hawk API, Middleman and the token broker all run 4.4.0, because a service that still runs this release answers 401 to a version 1 token. To an older release, first roll back to 4.4.0, then follow its rollback steps.
Restricted logins can start and manage jobs (#3279)¶
Restricted logins (laptop profiles and devbox logins) created or approved from this release on can start, resume, stop and delete their person's eval sets and scans, unless they were created read-only or from a read-only login (Starting and managing jobs). This includes logins made with an older CLI, which can't ask for read-only. Sessions that exist when you upgrade stay read-only until they are logged in or approved again; a session lasts at most 12 hours. A run started this way always uses restricted credentials, so it needs them enabled.
Before deploying:
- Upgrade from a release that includes #3278, which taught the API and Middleman to accept the new token permissions and session options. Until the deploy finishes, API replicas still on that release answer
401on the launch, stop and delete routes, and a session they create, or a devbox login they approve or extend, can't start or change jobs until it is logged in or approved again. If you skip that release, replicas still on the older one refuse the new tokens with401and fail to issue tokens to sessions this release created, because they can't read their stored scope and permissions. - Check that the runner's default environment (
<env>/hawk/runner-default-env) and the AWS secrets runs may read hold no provider API key. A run started from a restricted login gets them like any run, and a provider key there would let it call that provider without Middleman's checks. - Tell users about
hawk login --read-onlyand--storage-grant(Coding agents).
After deploying, a devbox approval page opened before the deploy is refused with 409 when it approves a login that could start jobs or use storage grants; reload it.
Rolling back to a release that includes #3278 is safe: restricted logins keep reading and calling models, but can't start or change jobs until the deployment runs this release again. A session created, or a devbox login approved or extended, during the rollback can't start or change jobs until it is logged in or approved again under this release. Rolling back to a release without #3278 breaks devbox logins approved, and laptop profiles created, under this release until they log in again: that release can't read their stored scope, or a box's stored permission to manage jobs.
Every deployment builds execd (#3173)¶
A stack with hawk:enableNitroSandbox off now gets the ECR repository <env>/hawk/execd and builds the execd image into it on every deploy, as a stack with Nitro on already does: a task run's pods get execd from it. See Nitro Sandboxes.
The build fetches METR's inspect_k8s_sandbox fork from https://github.com/METR/inspect_k8s_sandbox.git and pulls golang and busybox from Docker Hub, so before upgrading a stack with Nitro off, check that its deploy can reach both. Nothing else is needed, and a stack with Nitro on sees no change.
4.4.0¶
Final Pod protections now deny violations (#3329)¶
The runner and sandbox Pod policy introduced in #3130 now uses Deny instead of
Warn/Audit. Unreviewed annotations and Pod fields, including additions from
controllers and injectors, block creation and updates. This applies at every
isolation level and in older namespaces without PSA labels.
For runner Pod creation denials, the API's ten-minute reconciliation sweep records the rejection reason, fails the run and cleans up its resources, unless the Job has already recovered. Generic policy evaluation errors remain operator diagnostics.
Before deploying, exercise representative workloads under the warning/audit policy and review its findings. Inventory existing Pods with unchanged server-side dry-run updates; audit logs alone do not cover untouched Pods. Fix incompatible templates and injectors, then finish or replace incompatible Pods and confirm their finalizers have cleared. Otherwise enforcement can block Job completion and namespace deletion.
Pulumi replaces <policy-name>-warn-audit with <policy-name>-deny, creating the
new binding first to avoid merging incompatible Warn and Deny actions during
server-side preview. No manual binding edit is needed. After deploying, verify
runner and enabled sandbox-runtime launches, controller updates and Job cleanup;
inspect rejected API requests and controller FailedCreate events. Rolling back
to #3130's binding restores warning/audit mode and removes these additional
protections; existing PSA and runner Job-template Baseline denial stays enabled.
execd listens on port 14601 in a Nitro Sandbox (#3121)¶
In a Nitro Sandbox Hawk's commands and files reach each pod through execd on port 14601, where it was 24601: a network policy of your own that opens that port to the runner must open 14601 too, and keep 24601 open until every eval set started before the upgrade has ended. A task with a process that listens on 14601 there must move it to another port before upgrading: a listener that starts with the container fails the sandbox's first command (execd's TCP port 14601 or socket in the sandbox is held by a process other than execd).
A command run as another user there now starts with a soft open-file limit of 1024, unless the hard limit is lower. The hard limit is unchanged, so a command that needs more raises it in its own shell first, as in ulimit -Sn 4096. A command given an environment variable whose name is not a shell name, such as app.mode, or an empty user, is now refused there: rename the variable, and leave user out to run as the task's default_user, or as the container's own where it names none.
Redirect the stdout and stderr of a process that outlives its command there: once the command has ended, a write to either can now block.
A command that times out there now gets SIGTERM, and SIGKILL 5 seconds later if it still runs, where it got SIGKILL at once: its sandbox.exec can take 16 seconds past its timeout to raise TimeoutError, and longer while the runner has no connection to the pod.
A Nitro sandbox's execd port is denied only to the sandbox's own pods (#3121)¶
This affects deployments with a network policy of their own that admits a sandbox namespace's pods to each other, on every port or on TCP 14601. Before deploying, take TCP 14601 out of that policy.
Some compose files and sandbox values are now refused (#3121)¶
On every runtime, some compose files and sandbox values that earlier releases accepted now fail, each with an error that says what to change: the pinned inspect_k8s_sandbox lists them under breaking changes.
Compose files keep their order, and aliased services their settings (#3121)¶
Check each task's compose file before upgrading, and before resuming an eval set started on an earlier release: its remaining samples run by these rules unless it pins the old runner image.
- Several services, none named
default, and none or several markedx-default: true: the default service is now the first listed, or the first marked one, where it was the first of those by name. The agent's commands run in the default service, with its image and its network access, and other services reach it asdefault, not by the name the file gives it. To keep a task's default, mark that service, and no other,x-default: true. environmentwritten as a mapping: it keeps the file's order instead of being sorted by name. A$(NAME)reference resolves only to a variable listed before it.- A mapping shared through a YAML alias or
<<, between services or between two keys of one: every use now gets its settings. A file that converted only because the alias hid an error is now refused, as it would be with the alias written out: a service whosex-k8sresources repeat whatdeploysets, or give a request wheredeploygives only the limit, or one that reuses the top-levelx-inspect_k8s_sandboxas its own (move that anchor into the first service that uses it).
A Nitro sandbox copies execd and the sandbox tools in one init container (#3123)¶
A Nitro sandbox's inspect-sandbox-tools init container now runs the execd image and also writes the pod's execd volume, mounted at /out; the execd init container remains for a service whose tools are not staged. If you run your own admission policies, allow that before upgrading, and keep the rules for the standalone execd container and for the sandbox-tools image in inspect-sandbox-tools.
Kueue runs two replicas (#3294)¶
With hawk:kueueEnabled, Kueue's controller now runs two replicas on separate system nodes with a PodDisruptionBudget, so a restarted pod or a lost node no longer refuses launches. Each replica needs a 4-vCPU system node of its own.
Before upgrading:
- If the controller still runs on an eval node, as it does on 4.3.0 and earlier, this upgrade moves it and scales it in one step. Kubernetes then starts a second pod of the old kind on an eval node before it replaces both, and where no eval node has 0.5 vCPU and 4Gi free that pod preempts running eval pods. Upgrade while no evals are running, or first deploy the commit that merged #3282 and confirm the controller is Ready on a
systemnode (see Dedicated nodes for cluster controllers). - Keep EC2 On-Demand Standard quota for a second 4-vCPU system node.
After upgrading, check that two hawk-kueue-controller-manager pods are Ready on different system nodes: the deploy succeeds once one is. During the upgrade a second pod of the old kind starts briefly, on a system node if the controller is already there, and can preempt other controllers on that node, which restart elsewhere.
A strict Nitro sandbox that uses no network boots with no network card (#3124)¶
With Nitro Sandboxes installed, a strict sandbox there that uses no network now boots with no network card. The runner reaches it through one Kubernetes exec, so its commands and files cross the API server, and its VM is up to one vCPU and 128 MiB smaller. A task that uses no network needs no change; a server in such a sandbox must listen on 127.0.0.1 or 0.0.0.0. To keep the card, set hawk:nitroWithoutNetworkCard: "false" before upgrading.
Killed runs' logs are finalized, in dry run first (#2085)¶
A run killed before Inspect finished its logs (hawk delete, OOM, node loss) leaves started logs that never import. The API's reconcile pass now submits a Batch job (<env>-hawk-job-output-finalizer, the eval-log importer image) that finalizes them in place, as cancelled after a deletion and error otherwise, so they import. It ships in dry run (hawk:jobOutputFinalizerDryRun, default true), which rewrites each log locally and uploads nothing.
A dry run still records each job as checked. After the deploy that sets hawk:jobOutputFinalizerDryRun: "false" has rolled out, clear those records so the jobs are checked again:
UPDATE job SET outputs_checked_at = NULL
WHERE outputs_checked_at IS NOT NULL AND job_type = 'eval-set';
The <env>-hawk-job-output-backlog alarm then fires until the drain catches up (50 jobs per pass, every ten minutes). A finalizer run that fails all three attempts lands in the importer's Batch DLQ; scripts/ops/dlq.py redrive --target batch redrives only the job definition you name, so finalizer and import failures are redriven separately.
Model-access groups come from the import's writes (#3180)¶
The warehouse now requires the groups of the model names an import records. An eval that already has a group gets them at the write that records the name; one that has none gets them at its import's success stamp, once every recorded name resolves. Before, they arrived with the publish that follows the import. For an existing deployment:
- An eval that recorded only unregistered
hardcoded*ormockllm/*test models is readable bymodel-access-publicholders from its import'ssuccessstamp, even if its publish then fails. Before, nobody could read it until its publish saved a group. - A restricted model seen only in usage is required from the commit that records it, on an eval that already has a group.
- Stored rows change at their next write. Nothing is backfilled.
Before deploying:
- Check that one role owns these four functions:
SELECT proname, proowner::regrole FROM pg_proc WHERE proname IN ('get_eval_models', 'get_scan_models', 'compute_eval_model_groups', 'compute_scan_model_groups');. The last two now call the first two, whichPUBLICcan't execute: if a compute's owner can't execute the one it calls, every eval or scan write fails after the migration. One role owns them wherever one role ran every migration. - Check that the importer's role can execute the function its publish now calls:
SELECT has_function_privilege('<importer role>', 'public.compute_eval_model_groups(uuid)', 'EXECUTE');. - Pick a time when importers are quiet. Migration
b4874736927dreplaces a trigger oneval: it waits behind open write transactions, 2 s at a time for up to 60 tries, with new writers queued behind it, and applies nothing if it never gets the lock. It changes no data.
To roll back, roll the importers back before downgrading the database: they call a function the downgrade drops.
Sandbox namespace egress defaults to deny (#3128)¶
Sandbox namespaces now default-deny egress for pods outside the chart or using global.nameOverride with chart policies disabled. The existing pod-label deny remains in place for app.kubernetes.io/name: agent-env pods, including outside API-labelled sandbox namespaces. Before upgrading, add any required egress allows, including DNS. After upgrading, verify connectivity.
Restricted evals read non-public transcript inputs again (#3115)¶
An eval set's transcripts.sources may be non-public again when the cross-lab check passes, and --allow-sensitive-cross-lab-scan applies to them as it does to scans, unless the operator turns off its runtime flag, allow_sensitive_cross_lab_scan_override.
An eval whose inputs a model may read only as an internal reader must call its models through Middleman, as such a scan must since #3169; one that could route calls elsewhere is refused with a 422.
Deploy 4.3.0 everywhere first and don't roll back below it: earlier releases ignore input_model_names.
A runtime flag makes Middleman reject provider-side web tools for strict eval sets (#3193)¶
This release adds the runtime flag strict_refuses_server_side_tools. The flag is off by default, so the upgrade changes no behaviour.
The flag affects eval sets that run at strict isolation with restricted credentials. The level can be written in the config or come from hawk:defaultIsolationLevel. With the flag off, their model requests can use provider-side web search, web fetch and URL context tools, and can reference images and files by URL or file ID. With the flag on, Middleman rejects those requests with a 400 (rejected fields). Eval sets at standard, eval sets that use user credentials, and scans do not change.
To turn the flag on:
- Finish the upgrade of Middleman, the Hawk API and the token broker. With the flag on, the grant of a
stricteval set storesrestricted_server_side_tools, and its token is a version 2 token without the permissionmiddleman:use@server-tools. All of these must be true:- Middleman runs a release that checks that permission (#3192). A Middleman that reads version 2 tokens (#3229) and does not check the permission accepts the token and rejects nothing more.
- The Hawk API and the token broker run a release that reads version 2 tokens (#3229). A Hawk API, Middleman or token broker from before version 2 tokens rejects that token with
401. - Every Hawk API pod runs this release (#3193). An older Hawk API cannot read that grant.
- Tell the affected users (below).
- Turn the flag on (Toggling a flag).
The flag applies to new launches and resumes. An eval set that is already running keeps its grant until it is resumed. Turning the flag off stops new launches from storing restricted_server_side_tools; eval sets that were launched with the flag on keep it until they are resumed. Before a rollback of the Hawk API, Middleman or the token broker to an older release, turn the flag off and resume the running strict eval sets that use restricted credentials. Without that, a service from before version 2 tokens rejects their tokens, a Hawk API from before this release cannot read their grant, and a Middleman that reads version 2 tokens and does not check the permission stops rejecting their requests.
The affected users run eval sets at strict isolation with restricted credentials, and their agent uses provider-side web search. Two Inspect SWE agents enable it by default:
- Claude Code: the
WebSearchtool is on unlessdisallowed_toolslists it. - Codex:
web_searchdefaults tolive.
With the flag on, the model request that declares the web search tool gets a 400 from Middleman. The message states only the rejected item, for example tool 'web_search' is not supported. It does not mention strict isolation or allow_server_side_tools, because the caller can be the model under evaluation. Inspect writes the message to the eval log as the sample's error. A user has two options:
- Disable web search in the agent: add
WebSearchto Claude Code'sdisallowed_tools, or set Codex'sweb_searchtodisabled. - Set
isolation.allow_server_side_tools: trueon the eval set.
Users can set allow_server_side_tools after the upgrade and before you turn the flag on. An older Hawk API rejects a config that includes the field.
An eval set that sets allow_server_side_tools and pins a runner image older than this release fails at start.
Tokens can be written with grant version 2 (#3230)¶
This affects deployments that use restricted credentials or delegated sessions. This release adds the runtime flag issue_grant_version_2, which 5.0.0 removes. The flag is off by default, so the upgrade changes no token.
Turn the flag on (Toggling a flag) once this release runs in the Hawk API, Middleman and the token broker. A service older than #3229 answers 401 to a version 2 token, so with the flag on before the last service is replaced, restricted eval sets and scans, laptop profiles and devbox logins would fail.
With the flag on, every token the Hawk API writes has grant.version 2 (Token layouts). An execution token loses client_id and lists hawk:read@sources and middleman:use@server-tools. A session token's minter, permissions and usage_attribution move under grant. iss, aud, sub, the lifetime and every route's request and response do not change. If the flag store cannot be read within 2 seconds, the Hawk API writes version 1.
A version 2 execution token is 2 or 3 bytes smaller than the version 1 token for the same grant, so a launch that fit before still fits. A session token is 68 bytes larger. Tokens must fit in 8,192 bytes, so a session that was within 68 bytes of the limit is refused while the flag is on. That is at most one model group fewer: with 24-character group names, a session with read and call access to 50 model groups fits where 51 did. A custom runner image needs no rebuild, because a runner reads only iss and sub from its token.
To roll back, turn the flag off. The Hawk API writes version 1 again, and the version 2 tokens it wrote work until they expire. Before a rollback to a release older than #3229, turn the flag off and wait 32 minutes for those tokens to expire: a toggle takes up to 15 seconds to reach every API process, a token lasts 30 minutes, and services accept it for 60 seconds after that.
An existing deployment's flag profile has no entry for the new flag. Until you add one, the flag is off.
System-pool controllers reserve CPU and memory (#3282, #3294)¶
With hawk:kueueEnabled, Kueue's controller now requests 1.5 vCPU (limit 3). Beside the node agents' default requests (about 0.5 vCPU a node) that fits only a 4-vCPU system node, so Karpenter adds one unless a system node already has room, and the controller no longer shares a 2-vCPU node with a busy neighbour. The Datadog Cluster Agent gets requests of 1 vCPU and 4Gi, limits of 4 vCPU and 8Gi, and ten minutes to start instead of 90 seconds, which a cluster of 15,000 pods overran; the Datadog operator, cni-metrics-helper and cilium-operator get small CPU requests.
Before upgrading, keep EC2 On-Demand Standard quota for one more 4-vCPU node beside the existing system nodes, and 0.1 vCPU free on each controller node for cilium-operator. Without it a Kueue pod stays Pending while the other keeps serving; the deploy succeeds once one new pod is Ready, so check afterwards. After upgrading, check that the Kueue controller is Ready on a 4-vCPU system node and that the Datadog Cluster Agent has not restarted with OOMKilled.
4.3.0¶
Middleman's traffic log group no longer expires events (#3265)¶
The traffic log group (<env>/middleman/traffic), which records who made each model call, kept events for 90 days. It now keeps them until a retention period is set: the new hawk:middlemanTrafficLogRetentionDays is unset by default, which means never expire. To keep the old behaviour, set it to 90 before deploying. Events that had already expired do not come back.
The first deploy without the setting removes the group's retention policy, which is logs:DeleteRetentionPolicy, not logs:PutRetentionPolicy: a scoped deploy role needs both on that group, or the update fails with AccessDenied.
The group has no access restriction of its own and now holds a longer history, so review who can read CloudWatch Logs in the account; see CloudWatch. The traffic bucket is unchanged: it still deletes request and response bodies after 730 days.
Inspect AI 0.3.291 (#3167)¶
Hawk's Inspect moves from 0.3.285 to 0.3.291. Nothing is needed before deploying, but tell the people who write tasks and solvers: three upstream changes break code that ran before.
web_browser()raises an error: Inspect removed the tool. Useweb_search()to retrieve pages, andcomputer()or a browser MCP server in the sandbox to interact with them.sandbox=False, or any other value that is not a sandbox specification, on a sample, a task or an eval set raisesValueError. Leavesandboxout, or passNone.- A task package that pins
google-genaibelow 3.3.0 fails when it uses a Google model.
One more change costs storage instead of failing. Inspect now keeps one copy of a message per id, where it kept one per content. A solver that builds its whole conversation as new ChatMessage objects on every turn, without passing each message's id, writes every turn's copy to the log and the warehouse: 1,600 messages for 40 turns, where the previous version wrote 41. Inspect's own agents and the agent bridge keep their ids. A solver of your own avoids the copies by keeping its message objects, or by giving each rebuilt message the id it had.
For the deployment:
- A database migration adds nineteen columns to
event, for four new event fields and Inspect's new communication and swarm events, and adds those events' text to the search index. It rewrites no rows, and waits for the table's lock in short, repeated attempts instead of queueing ahead of its readers and writers. - If you roll the app back and leave the migration in place, the older API answers 500 for the transcript of any sample imported with a communication or swarm event, until you roll forward again.
- New sandboxes get sandbox-tools build 9047. A sandbox that already holds a trusted installation keeps its own.
INSPECT_EXEC_REMOTE_SERVER_WAITis still on by default and is turned off as before, but what it turns on has changed; see sandbox concurrency.read_file()andwrite_file()with ausernow work in Kubernetes sandboxes. Inspect 0.3.286 and later refuse them on a sandbox provider that takes no user.
Final Pod protections start in warning and audit mode (#3130)¶
Pulumi now installs a Pod admission policy for the deployment's runner and sandbox
namespaces with validationActions: [Warn, Audit]. It checks new Pods,
replacements and updates after mutation, including in older namespaces without
PSA labels. Violations produce warnings and audit events without blocking these
requests, so incompatible existing Pods can still remove their finalizers.
These additional checks are not yet an enforced security boundary. Existing PSA
and runner Job-template Baseline checks continue to deny violations.
Deployments that already installed this policy with Deny replace its binding
with one named <policy-name>-warn-audit. Pulumi creates the new binding before
deleting the old one, avoiding an invalid merged Deny/Warn action list during
preview. No manual binding edit is needed.
After deploying, exercise representative runner, GPU and enabled sandbox-runtime
workloads, including controller updates and Job completion. Review findings in
the EKS audit streams in CloudWatch Logs at /aws/eks/<cluster-name>/cluster;
see the audit query.
Warnings alone are returned to the requesting client and may not be visible to
operators. Untouched Pods are not automatically audited: use unchanged
server-side dry-run updates to inventory existing workloads.
Final Pod admission selects runner and sandbox rules solely by namespace
name, regardless of component or PSA labels. Child namespaces ending in -s
receive sandbox findings, including legacy runs whose runner namespace itself
ends in -s. The early runner Job-template Baseline check retains its PSA-label
selector: it enforces only in runner namespaces already labelled for Baseline
v1.35, so older Jobs with incompatible templates can still update and complete
foreground deletion.
Runner-side task validation remains enforced and now uses recursive field
allowlists.
Before deploying, remove unknown nested keys, environment valueFrom entries,
wildcard or unscoped tolerations, lifecycle hooks, mount propagation and resource
types other than CPU, memory, ephemeral storage and NVIDIA GPUs. Sandbox node
selectors and required node affinity may use only the reviewed architecture,
hardware and RuntimeClass pool labels (SANDBOX_PLACEMENT_KEYS in
hawk_flags/pod_contract.py), never kubernetes.io/hostname or an operator's own
node labels. Write capability
lists as lists (drop: [ALL]), not strings. Unknown fields are rejected instead
of ignored or carried through to Helm. Update custom injectors to the reviewed
Pod fields and annotation keys before enabling admission enforcement; new
Kubernetes fields require a schema review. Task sandbox
terminationGracePeriodSeconds may be at most 30 seconds. Omitted Pod values use
Kubernetes' 30-second default. Hawk's sandbox chart
defaults remain zero, or one second for Nitro. Remove probe-level
terminationGracePeriodSeconds from sandbox templates so probes inherit the Pod
shutdown grace. Existing probe settings generate findings but do not block cleanup.
Runner shutdown settings are unchanged. Custom RuntimeClass names, node-pool
selectors and Nitro runtime annotations are checked by the observed Pod contract.
The policy uses Kubernetes' native CEL support; no webhook service is installed.
Before a later switch to Deny, finish or replace incompatible Pods, especially
ones with finalizers, and review custom injector/controller findings. Enforcement
would otherwise block replacement Pods and cleanup updates. This change does not
enforce per-task network grants or validate a claim's backing PV.
Scans read through an internal reader need restricted credentials (#3140)¶
This affects deployments that mark a model internal_reader. A standalone scan that may read a private model's transcripts only because its scanner is an internal reader is now refused with a 422 unless it runs with restricted credentials (Read policies). With user credentials nothing stops scanner code from sending those transcripts to another model's provider.
Before deploying:
- Enable restricted credentials if they are off (What a deployment needs). Without them these scans can't run at all.
- Tell users to pass
--restricted-credentialstohawk scan runfor these scans, and to declare every model their scanner code calls (additional_models).
After deploying, a scan of this kind that was launched with user credentials can't be resumed. Run it again under a new ID.
A scan's fallback model (args.default) is now checked like its scanner model, in either credential mode: Middleman must know it, the submitter must be able to call it, it must not be dead, and the sources' read policies must let it read them. A scan whose fallback fails one of these was accepted before and is now refused.
Scans read through an internal reader must call models through Middleman (#3169)¶
This affects deployments that mark a model internal_reader. A scan that may read a private model's transcripts only because its scanner is an internal reader is now refused with a 422 if its config could send model calls past Middleman: a model args.base_url on another host, a model args key Hawk doesn't declare, extra_headers or an extra_body model in a model's args.config, or a provider URL, provider key, proxy or Inspect/Scout model variable in its environment or secrets (Read policies). No operator action is needed. A scan of this kind launched with such settings can't be resumed; run it again under a new ID without them.
Controller nodes default to r7g.large (#3086)¶
A stack that leaves hawk:karpenterNodeGroupInstanceType unset moves its Karpenter controller nodes from c7g.large (4 GiB) to r7g.large (16 GiB), and the controller's memory request and limit rise from 1Gi to 8Gi. cilium-operator gets a 1Gi memory request, and hawk:ciliumPolicyTriggerInterval defaults to 5s in place of Cilium's 1s.
The controller nodegroup now takes a generated name starting with <env>-karpenter-, so every stack replaces it on this deploy. Pulumi creates the new group first, then drains and deletes the old one, and Karpenter, CoreDNS and cilium-operator move to the new nodes.
Before deploying:
- Pick a time with no large eval burst running. New nodes wait on Karpenter while it moves.
- If you set
hawk:karpenterNodeGroupInstanceType, the controller keeps 1Gi. Sethawk:karpenterControllerMemoryto raise it, within the node's allocatable memory. - To keep Cilium's 1s interval, set
hawk:ciliumPolicyTriggerInterval: "1s".
Dedicated nodes for cluster controllers (#3118)¶
Cluster controllers move off eval nodes. Karpenter, CoreDNS and cilium-operator use the managed controller nodegroup; EBS CSI, the janitor and the other controllers use a new on-demand ARM64 system pool with the taint hawk.metr.org/system=true:NoSchedule and a fixed 16-vCPU cap. Eval pool sizing settings do not apply to it. CoreDNS runs two replicas on separate controller nodes, keeping a replica available when one node is lost.
Before upgrading:
- Budget at least 4 additional EC2 On-Demand Standard vCPUs for two small system nodes, plus headroom for larger nodes and replacements. The pool can grow to its 16-vCPU cap; without quota headroom, controllers can remain Pending.
- If
hawk:karpenterGpuPoolscontains a pool namedsystem, finish its running evals and rename it (for example togpu-system), including itshawk:karpenterNodePoolCpuLimitOverrideskey and workload selectors. Deploy the rename on your current Hawk version and confirm the oldsystemNodePool and EC2NodeClass are gone before upgrading. - Keep
hawk:karpenterNodeGroupDesiredSizeat least 2 (the default), with capacity for a CoreDNS replica on each node. With only one eligible controller node, the second replica stays Pending. - Deploy the cluster-owning stack before shared-cluster dev stacks so their janitors have a system pool. On an externally managed cluster, provide ARM64 nodes labelled
node-restriction.kubernetes.io/hawk-system=true, with the system taint above. - The janitor now builds for ARM64 even with
hawk:cpuArchitecture: amd64. Ensure an x86 build host can cross-build ARM64 and any customhawk:basePythonImagesupports ARM64.
After upgrading, verify that CoreDNS has two Ready replicas on different controller nodes, the other moved controllers are Ready on system, the next hourly janitor Job runs there, and GPU workloads use the renamed pool, if applicable. An already-running janitor Job finishes on its original node; the new placement applies to subsequent Jobs.
Kueue keeps one replica and karpenter.sh/do-not-disrupt; unexpected node loss can still interrupt admission. Before scaling it later, confirm on each cluster that its pod is Ready on a system node and its old ReplicaSets have zero replicas. Skipping this placement rollout can preempt running evals, even when upgrading across separate releases.
Strings in sandbox values, compose files and approval policies arrive as written (#3045)¶
Strings in sandbox values and compose files, and in an approval policy written in the eval-set config, now reach Helm, the compose converter and Inspect exactly as written, so yes, no, on and off arrive as strings instead of booleans. Before upgrading, write true or false wherever a field wants a boolean: Helm now refuses a sandbox value such as dnsRecord: yes, Hawk refuses a compose x-default: yes, and an approver argument no or off is true to an approver that tests if flag.
Don't roll back past this release: user-credential runs record executions (#2086)¶
Every hosted eval set, scan and human eval now records an execution, including runs with user credentials. Older releases clean up only executions that have a restricted grant. Nothing to do before or after upgrading.
If you roll back anyway, hawk delete and resume answer 503 for user-credential runs started by this release until you roll forward again. Stop such a runner by hand with helm uninstall <job-id> --namespace <runner namespace>. After rolling forward, check by hand that user-credential runs started during the rollback have stopped: the API may report them deleted while their runner keeps running.
4.2.0¶
The S3 Object Lambda reader is removed (#2563)¶
Hawk no longer deploys the optional S3 Object Lambda access point and its eval_log_reader Lambda. Read an eval set's or scan's files with hawk fs ls, cat, cp and sync on evals/<id>/... or scans/<id>/..., or from a script with HawkClient.list_files and HawkClient.get_file_download_urls (see the CLI reference).
If you set hawk:enableS3ObjectLambda:
- Check the inspect bucket's policy for statements added outside Pulumi, and list the bucket's access points (
aws s3control list-access-points --region <region> --account-id <account> --bucket <inspect bucket>): the next deploys rewrite that policy, and any access point other than the reader's stops working. - Deploy a 4.1.x release, with the key still set. Where
hawk:protectResourcesis on (the default outside dev stacks, and never on them), it marks the reader's CloudWatch log group to be kept when the reader is deleted. Where it is off, step 5's deploy deletes the log group: export its history first if you need it. - Remove IAM policies outside Hawk that grant the access point or are built from the
eval_log_reader_*stack outputs, which this release removes. - Remove
hawk:enableS3ObjectLambda,hawk:identityStoreIdandhawk:identityStoreRegionfrom the stack config. A deploy with any of them set fails. RemovingenableS3ObjectLambdadeletes the reader on the next deploy of any release, so do steps 3 to 5 together, at the announced cutoff. This may not be reversible: AWS offers S3 Object Lambda only to accounts currently using it. - Deploy. Deleting the reader's security group can take up to 45 minutes while AWS releases the Lambda's network interfaces. A kept log group shows in the preview as
delete[retain]; it stays in AWS, no longer managed, and ages out on its retention; delete it by hand after that.
A program that uses Hawk as a library must stop using StackConfig's enable_s3_object_lambda, identity_store_id and identity_store_region, and the HawkStack's enable_s3_object_lambda and eval_log_reader_* attributes.
The default Kubernetes version is 1.36 (#2864)¶
A stack that creates its cluster and sets no hawk:eksK8sVersion upgrades its control plane from Kubernetes 1.35 to 1.36 on its next pulumi up, and EKS can't downgrade it again. The default hawk:ciliumVersion stays 1.18.15, and Cilium tests Kubernetes 1.36 only from 1.20 on. To move Cilium first, set hawk:eksK8sVersion: "1.35" and hawk:enableNitroSandbox: "false" before upgrading, raise hawk:ciliumVersion to 1.20 one minor version per deploy, then remove both settings.
Nitro Sandboxes are on by default (#2864)¶
hawk:enableNitroSandbox now defaults to true on a stack that creates its cluster, so its next pulumi up installs Nitro Sandboxes and moves strict sandboxes onto them. A Nitro guest has no CPU burst or user namespaces, and a 10 GiB disk unless it requests more. Turning the strict_runs_on_nitro runtime flag off keeps strict on gVisor without a deploy.
pulumi preview fails on a stack whose hawk:eksK8sVersion isn't 1.36, whose region offers none of the c8a, m8a and r8a instances or none of the c8g, m8g and r8g ones, whose hawk:kueueQueues.sandboxes has no ephemeral-storage budget, or whose Cilium agent requests more than 1 CPU or 4 GiB. Fix that, or set hawk:enableNitroSandbox: "false", which also keeps strict on gVisor. A stack on an external cluster (hawk:createEks: "false") keeps Nitro off unless it turns it on.
An empty allowlist means strict, and Kata VMs get the CPUs a service requests (#2864)¶
- An
isolationmapping that names nolevelbut setsallow_domains: []orallow_cidr: []now runs atstrict, with no egress, instead ofstandard. Writelevel: standardto keep the old behaviour. - A service on a
kataruntime class that requests more than one CPU and sets no CPU limit now gets its request as its limit, so its VM gets that many vCPUs instead of one.
strict keeps six capabilities for root (#2864)¶
Root in each strict sandbox service now keeps six Linux capabilities instead of none. Nothing to do before or after upgrading.
Kata sandboxes start with Inspect's sandbox tools in place (#2864, #2990)¶
Each Kata and Nitro sandbox's default service now starts with Inspect's sandbox tools already installed. Sandboxes on other runtimes are unchanged.
Before upgrading, if you run your own admission policies, allow the two init containers Hawk adds to a Kata or Nitro sandbox's default service, at every isolation level: inspect-sandbox-tools-probe runs the task's image as the task's user, and inspect-sandbox-tools runs Hawk's image as root with every capability dropped except CHOWN, no privilege escalation and a read-only root filesystem. They use two memory-backed emptyDir volumes: inspect-sandbox-tools, which the service also mounts, and inspect-sandbox-tools-probe, which only they mount. Every Nitro pod also gets a third, execd, which runs Hawk's execd image with every capability dropped and no privilege escalation, and copies execd into a memory-backed emptyDir named execd that the pod's containers mount read-only at /execd.
What changes for Kata sandboxes:
- The default service's image needs
/bin/sh, which Inspect already needs to run any command in it. Without it the sandbox never starts. - The tools live in the VM's memory instead of on its disk, outside the task's own memory limit but out of the VM's headroom, so the task can allocate up to 33 MiB less before the VM runs out. The tools server's working files, including a reply too large for one exec until the runner fetches it, live there too and count against the default service's own memory limit while they exist. A service with less than 256 MiB of memory keeps Inspect's own copy, and one that mounts a volume of its own where Inspect keeps its tools is left as it was.
To turn staging off without a deploy, switch the stage_sandbox_tools runtime flag off (see Staging sandbox tools).
Rolling back to an earlier release, or turning off both hawk:enableGloveboxKata and hawk:enableNitroSandbox, deletes the tools image's repository. Eval sets already running keep using its image, so let the Kata and Nitro ones launched since the upgrade finish, or stop them, first: a sandbox they start afterwards can't pull the image and waits.
Sandboxes idle in an sh loop (#2864, #2990)¶
The inspect-k8s-sandbox this release pins changes, for every sandbox, the default service's idle command from tail -f /dev/null to an sh loop that reaps orphaned processes, so a default service with no command of its own needs sh and sleep.
Sandbox commands find their helpers in /usr/bin and /bin (#2864, #2990)¶
The inspect-k8s-sandbox this release pins runs the helpers it adds around a sandbox command (base64, timeout, id, head, mkdir and cat) from /usr/bin or /bin rather than through the image's PATH, and switches users with /sbin/runuser, so an image that keeps them only elsewhere, such as in /usr/local/bin, fails commands that need them.
Cluster scans store references to their inputs (#2389)¶
Every scan that runs in the cluster now saves, for each result of a scanner that reads whole transcripts, a reference to the source sample instead of a copy of it: the row's input is null, and the row names the source eval log and the sample uuid. Scans on the transcript index (--all and selections) have done this since 4.1.0 (#2383); this extends it to the rest. It stops scan results and runner memory from growing with the transcripts. Scanners over messages, events or timelines, scanners with a custom @loader, and hawk local scan still copy their inputs. See Scan Results.
What changes for an existing deployment:
- The scan viewer reads each referenced sample when a result is opened (#2388). It shows the input only to users who can also view the source eval set, and not in place for samples over 16 MiB uncompressed.
- Downloaded scan results no longer contain these inputs. Code that reads a result's
inputcolumn needs the sample instead, for example withhawk transcript <transcript_id>. - Resuming a scan started before the upgrade keeps copying inputs for the models whose scan had already started. A model whose scan hadn't started yet stores references.
Nothing needs doing before upgrading, but tell users who read scan results programmatically. Rolling back does not turn results written in the meantime back into copies: a version without #2388 cannot show their inputs in the scan viewer, though hawk transcript still fetches them.
Default, GPU and gVisor nodes boot without io_uring (#3040)¶
A container that runs on these nodes' kernel gets Operation not permitted from io_uring_setup, unless it holds CAP_SYS_ADMIN on a gVisor node. Only nodes launched after the upgrade have the setting. Karpenter replaces the older ones as drifted, but not while a runner or sandbox is running on them, and until then they take new sandboxes. To finish sooner, cordon the nodes of those pools that predate the upgrade.
Sharded eval sets (#2553, #2920)¶
An eval set launched or resumed with --restricted-credentials --sharding deals its runs (each task against each solver and model) into units and runs each unit on its own worker pod (see Sharded eval sets). Every run uses a new inspect-ai wheel; eval-log imports and the job-status Lambda skip torn log-header reads; CloudWatch runner-pressure alarms group by a new shard dimension and Datadog monitors judge each job's worst pod; and sharded scans retry failed ledger requests, transport errors included, for up to ten minutes. hawk:runnerMaxShards (default 8) caps the worker pods per eval set, and 1 runs every sharded eval set on one pod. Under hawk:kueueAdmissionEnabled, keep that cap times the runner's CPU and memory within the runner queue. hawk:evalSetMaxSandboxesCeiling and the samples, tasks and subprocesses ceilings bound each worker pod, so such a set can run up to hawk:runnerMaxShards times those; only a max_sandboxes the eval set sets itself is split over its units.
For each sharded eval set, the chart also creates a Role and RoleBinding in the set's runner namespace that let its runner pods read the release's two Jobs: the orchestrator learns from them which worker pods have ended, and the workers whether the orchestrator has. The API creates them with its own permissions, so there is nothing to do if its ClusterRole may create Roles and RoleBindings and read Jobs, as the one this repository's infrastructure deploys may. Deleting the eval set removes them.
A deploy updates the relay after the API, so until the relay has rolled out, an older relay ignores which worker a request names: a review of a sharded eval set may open the newest worker whichever one a row in the viewer (or hawk acp --shard K) asks for. A decision still reaches only the sample shown. To avoid that window, finish sharded eval sets that use acp_server before upgrading, or leave their approvals unanswered until the relay has rolled out.
Rolling back is safe. A deploy changes no running Helm release, so a sharded eval set that is running keeps its pods and its Role and finishes on the runner image it was launched with. While rolled back, the older API's live status (hawk watch) can show such a set as complete once every log in its folder is final but before its orchestrator has ended, for example while a worker pod has yet to start. An older Hawk resumes a sharded eval set on one runner at its root and reuses its logs. Before rolling back, finish or stop sharded eval sets that use acp_server: an older API shows none of their waiting samples, and an older relay, viewer and CLI reach only the newest worker, so approvals on the other workers wait until the set is stopped or its approval timeout expires.
Restricted evals read only public transcript inputs (#2997)¶
An eval set's transcripts.sources must now be public: every source's models, stored model groups and inherited model restrictions must be model-access-public. Creating or resuming an eval set with a non-public source fails with a 403 that names the sources to remove, including when the request asks for --allow-sensitive-cross-lab-scan and when the source is the eval set's own earlier output. Nothing is needed before upgrading. Users with a refused eval set remove those sources from transcripts.sources and resume it with hawk eval-set resume EVAL_SET_ID --config CONFIG. Scans and their override are unchanged. See how the cross-lab rule decides.
OpenAI's Responses API calls stream by default (#2929)¶
Runners now set stream_idle_timeout: 1830 on OpenAI's own models (openai/<model>) among the models and model roles of eval sets and scans that use the Responses API, as OpenAI's reasoning models do, so these calls stream and Middleman's keepalives hold a long, silent call open, where the OpenAI SDK used to time it out after 10 minutes and send it again. Nothing is needed before upgrading, unless you raised such a model's request_timeout_minutes above 30: give it a matching stream_idle_timeout in its args.config, or the runner gives up on a stream that stays silent for 30.5 minutes and sends the call again. A streamed call is bounded by Middleman's idle limit (request_timeout_minutes, 30 minutes by default) and its stream ceiling (stream_timeout_total_minutes, 2 hours by default) rather than the unstreamed 30-minute total. Reading a stream costs the runner more CPU than one unstreamed reply, so watch the runner event-loop saturation alarm on OpenAI-heavy evals. To keep a model's calls unstreamed, set streaming: false in its args.
Repository downloads through the API, off by default (#2844)¶
A stack with a GitHub App (hawk:githubAppId) can now serve repository downloads, off until you set hawk:enableCodeDownloads: "true"; upgrading changes nothing until then. Once on, a member of a code-access rule's group can download the repositories it covers, and a member of the * rule's group can download every repository the App can read that no narrower rule names. A repository no rule covers can't be downloaded. See repository downloads.
Before turning downloads on, review who holds the * rule's group and which repositories the App is installed on, and add a narrower rule for any repository that group mustn't read.
Resource history adds a database login and a node collector (#2494)¶
Every deploy adds a database login, hawk-platform-metrics, that bypasses row-level security and can write only job_resource_sample and job_resource_summary.
The name is reserved: the deploy fails if a configured database user or model group uses it.
With hawk:cloudwatchDashboardsEnabled, the deploy also adds an OpenTelemetry collector on every node (a DaemonSet in kube-system that reads each node's kubelet pod stats) and one gateway Deployment that the platform-metrics poller reads through the API server.
A cluster with hawk:ciliumExclusive gets neither, because the API server cannot reach pods on that mode's overlay network; it records requests only.
Nodes pull the collector image from ghcr.io, which serves the image layers from pkg-containers.githubusercontent.com.
Before upgrading, a cluster with an egress allowlist needs both hosts on it; no other cluster needs to do anything.
Dev stacks share staging's cluster, so they show CPU and memory usage only once staging runs the collector; until then they record requests only.
4.1.0¶
Runner namespaces enforce Baseline Pod Security Admission (#2893)¶
New and upgraded eval and scan releases enforce Kubernetes Baseline v1.35 in their runner namespaces, with matching warning and audit policies. This covers single runners and sharded scan orchestrators/workers in both credential modes, and extends the sandbox policy from #2857. Root containers and writable root filesystems remain supported.
Before upgrading, use Kubernetes 1.35 or later for the complete pinned policy. The upgrade also deploys #2891's node agent to preserve runner soft memory limits. Review custom runner workloads and injected sidecars for Baseline violations, including privileged containers, host-path volumes and host namespaces. They will be rejected.
The infrastructure update also installs a ValidatingAdmissionPolicy for runner Job templates, translating Baseline v1.35 into CEL. Deploy infrastructure before the updated API to enable immediate submission errors. It only matches this deployment's runner namespaces already labelled with that PSA version.
After upgrading, check pod-security.kubernetes.io/enforce=baseline and the
enforce-version=v1.35 label on new runner namespaces, then launch a representative
eval and scan. Template violations fail submission with the policy's explanation
and clean up partial releases. Pods can still fail admission after a Pod-only
webhook changes them. The API's five-minute failure sweep detects those explicit
Pod Security Admission denials, marks
the run failed, and removes its runner and sandbox resources. A rejected worker
fails the whole sharded scan. The rejection remains visible in status, logs and
the platform timeline after cleanup; fix the workload or injector, then resume
explicitly. Other Pod creation failures retain their existing retry behavior.
Cleanup retries survive event expiry and API restarts. The additive database
migration stores the rejection and cleanup intent; run it before the updated API.
If a Job, namespace or execution has been replaced, automatic cleanup stops and
records cleanup_refused in the Job's pod_security_failure data. Inspect the
replacement before manually removing any leftover resources. Transient sweep
failures log warnings with tracebacks; unexpected errors still reach Sentry.
Existing releases retain their labels. New launches and resumes through the
updated API adopt the policy; running Pods are not evicted. The node agent remains
in kube-system and is unaffected by the runner namespace labels.
Compose files no longer read runner secrets (#2859)¶
Hawk now fills ${NAME} placeholders in a task's compose file only from SAMPLE_METADATA_*, DOCKER_IMAGE_REPO, HAWK_TASK_IMAGES and the eval set's runner.environment. A value passed with --secret or runner.secrets is no longer filled in, so a placeholder that relied on one takes its :-default or stays unfilled. The runner logs a warning naming each placeholder it withheld.
Before upgrading, move non-secret compose inputs that eval sets pass as secrets into runner.environment. MirrorCode is one: launch it with runner.environment.MC_IMAGE_NAME instead of --secret MC_IMAGE_NAME, or its sandbox falls back to mclocal and fails to pull. Keep real secrets out of runner.environment: its values reach the sandbox.
Runner soft memory limit moves to a per-node agent (#2891)¶
Runner pods no longer carry the root set-memory-high sidecar or mount the node's
/sys/fs/cgroup. A new hawk-memory-high-agent DaemonSet in kube-system sets each
runner's cgroup memory.high instead, from a memory-high-bytes annotation the API
puts on the pod. The value (90% of the runner's memory limit by default) and the
best-effort behaviour are unchanged. Upgrading deploys the DaemonSet, including on
cluster-only (hawk:createEks: "false") deployments, and adds a Datadog monitor
that fires when an agent pod stays unready for 30 minutes.
No operator action is needed. HAWK_API_RUNNER_MEMORY_HIGH_IMAGE is now ignored and
can be removed. Runners started before the upgrade keep their sidecar until they
finish.
Model groups cannot use standard OAuth scope names (#2759, #2855)¶
Middleman's model create and update APIs now reject openid, profile, email,
and offline_access as group names with 422. Matching is exact and case-sensitive.
Direct database writers, including model sync/import tools, follow the same
blocklist. Other names remain subject to the existing validation rules; there is
no new prefix or character restriction.
Before upgrading, run this as a database administrator:
SELECT pk, name
FROM middleman.model_group
WHERE name IN ('openid', 'profile', 'email', 'offline_access')
ORDER BY name;
Migration 2d417c76877b fails if this returns any rows, including unused groups.
For each row, choose a non-blocked group and explicitly coordinate its registry
mapping, IdP permissions, PostgreSQL role memberships, and saved result policies
(warehouse model_groups and retained floors, S3 .models.json, and restricted
grants). Renaming the registry alone does not migrate those policies. Remove an
unused blocked group only after checking those references. Review any memberships
already granted by role synchronization for a blocked name; the migration neither
revokes old role grants nor rewrites groups or policies. See
Model Groups.
Update scripts supplying blocked names, rerun the query until it returns no rows, then deploy. After upgrading, refresh affected users' tokens and verify model invocation and historical-result access with the intended groups. Deployments without blocked names need no data changes. Downgrading removes the new CHECK only; it does not undo manual policy remediation.
Local sandboxes are no longer supported (#2890)¶
New eval launches and resumes reject Inspect's local sandbox at every isolation
level, including hawk local and runs with sandbox patching disabled. Local
sandbox commands inherited the runner's credentials and filesystem access. There
is no opt-out.
An explicit local declaration is rejected even when another task or sample
sandbox would override it. Eval and scan runners also disable Inspect's local
provider for their lifetime, including in spawned workers, so late sandbox
changes cannot restore it.
Before upgrading, replace task-level and per-sample local sandbox definitions
with Docker or k8s sandboxes. Check task arguments such as local: true, including
saved eval-set configurations used for resume. Tasks whose tools need no sandbox
may omit it at standard; removing a sandbox does not make command execution safe.
Deploy the updated runner image and upgrade local Hawk installations. Already running jobs keep their existing runner; stop affected runs and relaunch with an updated task and runner. After upgrading, run representative tasks and verify that local sandbox definitions fail before any samples execute. Existing logs remain readable; no database migration is needed.
Sandbox namespaces enforce Baseline Pod Security Admission (#2857)¶
New and upgraded eval releases label their sandbox namespaces with Kubernetes Baseline v1.35 enforcement, warning and audit policies. Use Kubernetes 1.35 or later for the complete pinned policy. Runner namespaces have their own policy described above. This adds an API-server check even when task code bypasses the sandbox-value validation from #2393.
Before upgrading, review sandbox workloads for privileged containers, host-path volumes, host namespaces, unconfined security profiles and capabilities disallowed by Baseline. These Pods will be rejected; a StatefulSet can be accepted while its Pods fail admission. Root containers and writable root filesystems remain supported.
The privileged Docker-in-Docker demo has been retired. For nested Docker, use an operator-configured environment such as Kata; its outer Pod must still satisfy Baseline. See Docker-in-Docker.
After upgrading, check the pod-security.kubernetes.io/enforce=baseline label on
new sandbox namespaces. Existing releases retain their current labels until Helm
upgrades or recreates them; resume or relaunch them through the updated API to adopt
the policy. Applying labels does not evict running Pods, but replacement Pods must
comply. Confirm workloads are compatible before changing a live namespace's labels.
glovebox v0.100.1 runs at most 4 sandbox VMs per node (#2884)¶
Deployments with hawk:enableGloveboxKata move to glovebox v0.100.1. Upgrade while no Kata sandboxes are starting: for a moment during pulumi up, a new kata-lockdown or kata-peer pod can get the new seccomp profile and still land on an old node, which lacks it, so its container never starts. Delete any such pod afterwards; it is recreated on a new node. pulumi up replaces glovebox nodes as Karpenter drifts them. A node with running sandboxes is kept until they finish, and new sandboxes start only on new-commit nodes.
Each glovebox node now runs at most 4 Kata sandbox pods, so the same load needs more nodes. The cap is the node's kubelet maxPods, so while one of a node's agents is not running (on a new node, or during the agent's rollout) a waiting sandbox can take its slot: a node-critical agent then preempts a sandbox, and the others wait for one to end. The runtime terminates a sandbox whose VM moves more than about 8 GiB of traffic over its life; on a node running at most 4, one sandbox's traffic can't end another's. Containers on Kata can't make device nodes, and on kata-lockdown and kata-peer they run under a syscall filter. See A sandbox VM died.
glovebox past v0.100.1: no 32-bit programs, and its own resolver on Kata (#2906)¶
Deployments with hawk:enableGloveboxKata move to a newer glovebox commit. There is no operator step beyond the one for the v0.100.1 move above: upgrade while no Kata sandboxes are starting, and pulumi up replaces glovebox nodes as Karpenter drifts them.
Task authors see three changes on Kata. 32-bit programs no longer run, on any network. On kata-lockdown and kata-peer, every pod gets glovebox's resolver without the node's search domains, so Hawk now refuses a sandbox that sets corednsUpstream; and each program start waits until it is recorded, about 35 a second on half a CPU when started one after another. See What changes on Kata and, for the resolver, Kata and glovebox.
Model-group lookups hide whether inaccessible models exist (#2678)¶
Middleman's GET /model_groups now gives the same 404 for unknown and inaccessible models. With partial=true, the response replaces the missing and forbidden lists with one unavailable list. Before upgrading, update any custom client that reads those fields; Hawk's bundled API client is already updated. There is no data migration. Deploy Middleman and the Hawk API from the same release, then retry any source scan that failed closed while their versions differed.
Sandbox configuration is validated at every isolation level (#2393)¶
New eval launches and resumes reject task sandbox settings that previously worked at standard. All isolation levels now reject nonempty additionalResources, extraContainers, initContainers and annotations, literal volume definitions, custom volume claim specs, corednsSecurityContext, service-account settings and unreviewed top-level chart values. Below strict, service securityContexts must also match Hawk's allowlist; privileged containers, privilege escalation, unconfined profiles and added capabilities other than NET_BIND_SERVICE are refused.
Before upgrading, review task values.yaml and Compose configurations, including those used by saved eval sets:
- Remove the rejected resources and containers; move initialization work into the service image or startup command where appropriate.
- Remove task
annotations. Hawk still sets the ones sandboxes need, includingkarpenter.sh/do-not-disrupt. - Use the chart's
<name>:<path>volume shorthand with lowercase alphanumeric-and-hyphen names, and omit claimspecs to use the chart's default claims. - Remove
corednsSecurityContext,serviceAccountName,serviceAccountCreateandautomountServiceAccountToken, even if explicitly set to false or null. - Remove
INSPECT_SANDBOX_VALUESfromrunner.environmentand submitted secrets; put supported settings in the task's sandbox configuration instead. - Set
isolation.runtime_class(including per-task overrides) to a lowercase Kubernetes DNS-subdomain name of at most 253 characters. Empty strings,CLUSTER_DEFAULT, the string"null", whitespace and YAML syntax are refused before launch. Omit the setting to use the isolation level's default runtime. - Update security contexts to the supported fields and values, using real YAML booleans and integers. Remove
Localhostand unconfined profiles, Composeseccomp=unconfined, and unsupported capability additions. - Remove line breaks from service names and environment-variable names. Image names, runtime-class names and working directories must additionally avoid characters YAML reads specially (
{,[,&,*,!,#, quotes). UseAlways,IfNotPresentorNeverforimagePullPolicy,TCP,UDPorSCTPfor service port protocols, andTCP,UDP,SCTPorANY(any case) forallowDomainsPortsprotocols. Task label keys must be valid Kubernetes label keys (this now applies atstandard, not onlystrict).
After upgrading, run representative tasks and check sandbox-setup errors, which name the rejected setting. One refused sample fails the whole eval set before any sample runs, so a mixed eval set with a single affected task does not start. Update the task configuration before retrying or resuming; selecting a lower isolation level does not bypass the checks that apply at every level.
Server-side exec waits are on by default (#2574)¶
The runner now sets INSPECT_EXEC_REMOTE_SERVER_WAIT=1, so each sandbox holds Inspect's awaitable exec_remote requests until the command exits, a full reply is ready, or 5 s pass, and new sandboxes get sandbox-tools build 9040 (a sandbox that already holds a trusted sandbox-tools installation keeps its own). Nothing is needed before upgrading, but each held request keeps a pod exec stream open for up to 5 s, so runners hold more streams open at once, and keeps about 20 MB of sandbox-tools processes alive inside the sandbox, counted against the task's memory limit. To turn it off for all new jobs without a deploy, add "INSPECT_EXEC_REMOTE_SERVER_WAIT": "0" to the <env>/hawk/runner-default-env secret (see Runner Default Environment Variables); an eval set can set the same in runner.environment.
Set provider: self-hosted on your self-hosted labs (#2776)¶
Hawk's /traffic API no longer serves the stored request and response bodies of models served on your own infrastructure, since they may be sent other models' raw chain-of-thought. It recognises them by their lab's provider (or the model's own) being self-hosted, which the self-hosted inference setup didn't previously tell you to set. Before or right after upgrading, check each lab that points at your own inference with hawk proxy labs get <name>, and set it with hawk proxy labs update <name> --config '{"provider": "self-hosted"}' where it's missing (this also puts any internal_reader on its models in force). Until you do, those models' bodies are served if their raw_cot is false. After that, don't change those labs' provider or re-point their model names elsewhere; see security.
hawk:githubAppId needs hawk:githubAppPublicRepository (#2704)¶
With a GitHub App, runners now send a token on every GitHub request, public repositories included: anonymous fetches share GitHub's per-IP limit for your NAT addresses, which a launch of hundreds of runs exhausts, and the 403s fail even private fetches. Before upgrading, install the App on one public repository and set hawk:githubAppPublicRepository to it; pulumi up refuses hawk:githubAppId without it. Deployments without an App are unaffected. Custom runner images must be from 4.1.0 or later, with Git 2.46 or later: older images fail public fetches, and older Git fetches them anonymously. See runner Git access.
Model scanners need Middleman deployed before the API (#2512)¶
To decide which source eval sets a scan's models may read, the API now asks Middleman GET /model_groups?partial=true, which reports one unavailable list for models that are unknown or inaccessible instead of refusing the whole lookup. An older Middleman ignores partial and answers such a lookup with a 404 or 403, which the API turns into a fixed 503 that names no model. Until Middleman is replaced, scanner_models launches, sibling resumes and model-free selection launches whose sources name such a model fail closed.
Deploy Middleman before the API, or the whole release in one pulumi up. Nothing needs migrating: the release's migration creates the new scan_assigned_eval table, which records each sibling's evals, with row-level security.
While the API rolls, a replica still on the previous image answers 403 on /sources for a sibling launched by an updated replica, and CleanupFailed when deleting one. Resume or delete it again once the rollout finishes.
job.scan_group_id is dropped (#2392)¶
Scan groups are gone (hawk scan run --all replaced them), and this release's migration drops job.scan_group_id and its index. Migrations run inside pulumi up before the API tasks are replaced, so API replicas still on the previous image fail every job read (launches, /meta/jobs, token renewal and completion; renewals retry) from the drop until the rollout replaces them, a few minutes. Deploy off-hours. Any scan-group scans you have stay as ordinary scans.
Rolling back past this release needs the migration downgraded first (alembic downgrade ec4a5149dca4-1, i.e. to its parent), or the previous image's job reads keep failing. Scripts using HawkClient.plan_scan_group, launch_scan_group_shard or get_scan_group_jobs break, and an older CLI's hawk scan status lists every visible job instead of a group.
Middleman ignores the dev-admin claim unless enabled (#2736)¶
Every stack whose hawk:env (default: the Pulumi stack name) was not prd or production used to accept the https://middleman.metr.org/claims/dev-admin JWT claim as Middleman admin automatically, including a production stack with another hawk:env. That is now controlled by hawk:middlemanAcceptDevAdmin, default false on every stack, and refused when hawk:env is prd or production. Stacks with those two values are unaffected. If you run production with another hawk:env, it was honouring the claim until now: check who held it. If your staging or dev stacks rely on that claim for admin access, set hawk:middlemanAcceptDevAdmin: "true" before upgrading (dev stacks inherit it from stg). The deploy restarts Middleman with the new setting.
Glovebox nodes cap allow_cidr at /24,/64 (#2339)¶
Every glovebox Kata node now boots with --address-grants /24,/64, glovebox's own default, and the API refuses at submission an allow_cidr wider than that on a kata lockdown or peer sandbox. This lands in the same release as the Kata classes themselves (#2367), so no deployment sees a wider width narrowed between releases. To allow wider ranges, or none, set hawk:gloveboxAddressGrants (such as /16,/48 or none) before upgrading; changing it later replaces every glovebox node.
Task items inherit the eval set's runtime_class (#2367)¶
An eval set that sets isolation.runtime_class now applies it, and isolation.network, to every task item: an item whose own isolation names no runtime class inherits the eval set's instead of running on its level's default, and an item that names a different one is rejected, on resume too. Before, an item's isolation replaced the eval set's whole, so such an item ran on the level's default class. Affects eval-set authors only; no operator step. An item that must run elsewhere sets the class on the items instead of the eval set.
4.0.0¶
Upgrades from 3.x can stop at the database login (#2101)¶
3.x makes the master database user, postgres, an indirect member of rds_iam. On a cluster where Aurora has added its login rule for that role, password logins for postgres are refused, and the 4.0.0 deploy fails at rds-db-users with PAM authentication failed for user "postgres". #2101 removes the membership, but only after that step has logged in. The API and Middleman stay on 3.x and keep serving meanwhile. Tracked in #2812.
To finish the upgrade:
- Connect to the database as
inspect_adminwith an IAM token, from inside the stack's VPC (see Connecting). - Run
REVOKE "inspect_admin" FROM postgres;, then check thatSELECT pg_has_role('postgres', 'rds_iam', 'MEMBER');returns false. - Re-run
pulumi upfrom 4.0.0, then run the check again.
Steps 1 and 2 also work before upgrading, as long as the next deploy is 4.0.0's: a 3.x deploy that reruns rds-db-users adds the membership back.
CLI credentials are bound to approved recipients (#2541)¶
Saved CLI/SDK credentials now belong to a deployment and its approved recipients. Each request checks its recipient before sending credentials; changing an unused service setting does not invalidate the login. Refresh uses the identity-provider endpoint and client ID saved at login. Older unbound credentials are not reused, and hawk login deletes those stored for its OIDC client.
Before upgrading clients:
- For CLI scripts supplying
HAWK_ACCESS_TOKEN, setHAWK_API_URLin your own configuration: exported, or in~/.config/hawk-cli/env. Middleman and the relay are reached at the URLs that API reports. SetHAWK_MIDDLEMAN_URLorHAWK_RELAY_URLthe same way only to override them, andHAWK_AI_GATEWAY_URLfor ahawk localgateway other than that Middleman. A project.envvalue for any of them is refused unless it is the URL the API reports. The Python SDK retains normal API URL resolution, including dotenv configuration, for supplied tokens and token callables. This is an accepted limitation: a project.envcan redirect a supplied SDK token, so exportHAWK_API_URLbeside it or passapi_url=(see the Python client). Supplied access tokens never borrow a saved refresh token. - Replace
${VAR}expressions in CLI/SDK dotenv files with literal values; interpolation is disabled and credential URLs containing placeholders are rejected. - Configure final URLs directly: OAuth token and authenticated CLI/SDK requests, including relay handshakes, no longer follow HTTP redirects.
hawk loginrefuses aHAWK_API_URLthat redirects and names the URL it redirects to.
After upgrading, run hawk login once per deployment; until then commands report that each deployment needs one fresh login, and submissions start it themselves. Log in again to approve a new recipient or replace the saved identity provider. Switching between deployments uses each deployment's own login. hawk local accepts a HAWK_AI_GATEWAY_URL the login already approves, such as its Middleman URL, whenever it was set; for any other gateway, run hawk login after setting it. Until then hawk local says so and calls providers directly. It also calls providers directly when the .env Inspect loads sets a variable it would point at the gateway, such as OPENAI_BASE_URL, since Inspect can let that file override the environment. If a project .env sets a Hawk URL that isn't in that deployment's saved login, login names the variable and file and asks before continuing. It doesn't ask about a value ~/.config/hawk-cli/env repeats, or a Middleman, relay or gateway URL the API itself reports. Without an interactive terminal, such as in CI, a coding agent's shell or with stdin redirected from a file, it refuses and prints the hawk login --approve <URL> command that approves exactly those URLs; run it once you've confirmed them. Headless login still supports --no-browser, including a callback URL supplied from a file. See authentication. This change requires no server or database migration.
A middleman-only login (only HAWK_MIDDLEMAN_URL set) is saved under Middleman's URL, separately from any API login: dropping HAWK_API_URL needs one fresh hawk login, and adding it back returns to the API login. Middleman doesn't vouch for its own URL, so a middleman-only HAWK_MIDDLEMAN_URL from a project .env prompts like an API URL would. Its refresh token is sent to no Hawk service.
Recipients and refresh settings are stored with credentials in the system keyring; losing the discovery cache does not lose the login. Existing Claude Code settings work after the fresh login without re-running setup. hawk auth access-token remains an explicit token export; destination checks apply to Hawk's own authenticated requests, not a consuming tool's subsequent use of that token.
Token broker configuration (#1954)¶
hawk:tokenServiceEnabled defaults to false. Set it to true before upgrading an installation using restricted credentials. Disabling an existing installation requires decommissioning; this setting is separate from launch credential mode.
EKS OIDC is required when token service, requireJobToken, or the GitHub App is enabled. API networking still requires the cluster security group. External clusters can supply externalEksOidcProviderUrl and externalEksClusterSgId as needed, or externalEksClusterName for discovery (eks:DescribeCluster). See job identity.
Review CPU worker disk sizes (#2140)¶
hawk:karpenterNodeDataVolumeSize applies to both ordinary and enabled gVisor workers. A string and a one-item list produce the same resources. An existing "2000Gi" setting therefore changes the gVisor root-disk template from 200 to 2,000 GiB. The default "200Gi" keeps both disk sizes unchanged. Disk-template changes can trigger worker replacement; review the preview and finish or drain affected jobs before applying.
hawk:karpenterNodeDataVolumeThroughput and hawk:karpenterNodeDataVolumeIops also apply to gVisor root disks. Existing settings change those templates from gp3 defaults to the configured values and can trigger worker replacement. Unset performance settings keep their defaults.
All values must be positive whole-GiB capacities. A scalar or the first array entry retains its configured spelling, so "1Ti" remains "1Ti" in that disk template. Later entries are normalized to GiB. Review any custom pool preferences and existing quantities. See worker disk pools for multi-size configuration and naming.
hawk:karpenterNodePoolCpuLimit applies to production stacks (#2111)¶
Stacks whose hawk:env is prd or production used to ignore this key and leave every NodePool uncapped. It now applies everywhere, and hawk:karpenterNodePoolCpuLimitOverrides sets caps for individual NodePools.
- Key set: its cap applies on the next deploy.
- Key unset: nothing changes, but Pulumi warns that this default is deprecated.
To stay uncapped either way, run this before upgrading:
Middleman no longer serves the unified API (#2079)¶
Middleman's /completions, /count_prompt_tokens and /embeddings routes are gone. Callers use the provider passthrough routes instead (/anthropic/v1/messages, /openai/v1/chat/completions, /openai/v1/responses, /anthropic/v1/messages/count_tokens, ...); /embeddings has no replacement. See LLM Proxy (Middleman).
Before upgrading:
- Find anything still calling the three routes (Middleman's traffic log records the path) and move it to a passthrough route.
- Models on the
gemini,gemini-public,vertex,dummyanddummy-chatlabs still load and appear in listings, but no route can call them, and the cross-lab check may refuse scans that touch them. Retire them withhawk proxy models update <name> --config '{"dead": true}'or move them to a served lab (next section); do it before upgrading, since afterwards an update to a model on one of these labs must also move it to a lab with a row. Don'tdeactivateone that stored eval logs, scans or transcripts reference: with no provider catalog offering it, the model disappears and permission lookups for that data 404 (see Retire models withdead).
Middleman still refuses to start when a model's lab URL needs {gcp_project} and none is configured; the check is now keyed on the URL, not on the lab name.
Labs are stored in the database (#2095, #2097, #2107)¶
Each lab's routing (passthrough API, upstream URL, provider key names, default provider, is_chat) moves from code into a new middleman.lab table. The migration seeds one row per lab Middleman served at the time; the labs the unified API alone served (dummy, dummy-chat, gemini, gemini-public, vertex) get no row.
What changes for an existing deployment:
- Middleman's ECS service now waits for the deploy's database migration, so the first deploy after upgrading takes longer and Middleman does not start until the table exists.
POST /admin/models/andPATCH /admin/models/{public_name}takelabas a plain string that must name an active lab row; any other value is a 400UnknownLab, and so is activating a model whose lab is missing or inactive. Scripts that send one of the served lab names keep working. Updating a model whose lab has no row must also move it to a lab that has one.- Models on the unserved labs now report
provider: nullandis_chat: truein model listings, since they have no row to read those from. - Middleman sends a provider credential only to a host on the key-host allowlist (built-in for today's providers). A lab on another host needs
hawk:middlemanProviderKeyHostsset before it can be activated, and a model withopenai_accountrouted at a non-OpenAI host is refused with a 500 instead of sending the OpenAI key there.
Manage labs with hawk proxy labs list|get|add|update|activate|deactivate; see Managing labs. Editing the table by hand does not reload Middleman; run hawk proxy models reload afterwards.
Middleman requires a database (#2188)¶
Middleman no longer runs without PostgreSQL. It refuses to start unless MIDDLEMAN_DATABASE_URL is set, and reads models, labs and priority configuration only from the database. The file-based mode that ran without one is gone, along with its settings: MODELS_JSON_PATH, MODELS_BASE_INFO_JSON_PATH, MODELS_PUBLIC_JSON_PATH, MODELS_BASE_INFO_PUBLIC_JSON_PATH, MIDDLEMAN_PRIORITY_CONFIG, and base-model-info inheritance (base_model_info_key). The standalone middleman/docker-compose.yaml is removed too.
- Deployed with Hawk's Pulumi: no action. Infra already sets the database URL and runs migrations before Middleman starts, and that path never read the removed settings.
- Running Middleman yourself: before upgrading, point
MIDDLEMAN_DATABASE_URLat a database Hawk's migrations have run against, add the models from your JSONC files withhawk proxy models add(copying any fields a model inherited from base model info into its own config), and store priority settings withPUT /admin/priority. For local development, run Middleman in the Hawk Docker Compose stack; see Middleman's README.
Unused Middleman routes and model fields are removed (#2695)¶
Middleman drops routes and fields that nothing in Hawk uses, most of them left over from the unified API (#2079):
- Routes:
POST /health(GET /healthand/health/deepstay),GET /admin-check,GET /permitted_models_for_groups,POST /is_public_model,POST /throw_error, andPOST /admin/reload-models, whichPOST /admin/models/reload(hawk proxy models reload) replaces. - Response fields:
tokenizerandfeaturesfrom/permitted_models_infoand/public_models_info, andtoken_counter_initializedfrom/health/deep. - Model config fields:
override_url,force_tokenizer,max_tokens_keyword,stream,return_request_idandbase_model_info_keyleave the/admin/modelsrequests and responses. A request that still sends one is accepted and the field ignored. The deploy's database migration strips them from stored configs; it can't be undone, but no earlier Middleman since #2079 reads them.
Before upgrading, check that nothing outside Hawk calls these routes. Middleman's traffic log records only passthrough requests, so use your load balancer's access logs, or Middleman's APM traces by route if you run Datadog (health-check traces are dropped there). Stacks deployed with Hawk's Pulumi need no other action.
is_zdr and raw_cot are required when adding a model (#1975)¶
POST /admin/models/ rejects a config that omits either is_zdr (covered by a zero-data-retention agreement) or raw_cot (returns raw chain-of-thought) with a 422; both must be real booleans. Updates are unchanged. is_zdr also loses its unknown state: a model without a recorded value reads as false in every API response that used to return null.
Before upgrading, confirm every model already has a boolean is_zdr. Afterwards a missing value reads as false in every API response, so the "unknown" state is no longer visible to callers; the stored config is left as is (an unrelated update does not fill the flag in), so this query keeps finding the unrecorded models after the upgrade too:
SELECT m.name, mc.is_active, mc.config -> 'is_zdr' AS is_zdr
FROM middleman.model_config AS mc
JOIN middleman.model AS m ON m.pk = mc.model_pk
WHERE jsonb_typeof(mc.config -> 'is_zdr') IS DISTINCT FROM 'boolean'
ORDER BY mc.is_active DESC, m.name;
Fix any row it returns with hawk proxy models update <name> --config '{"is_zdr": true}' (or false). After upgrading, update any script or older CLI that adds models so it sends both flags. raw_cot stays null on older models until someone records it; hawk models --raw-cot unknown lists them.
Warehouse model names are Middleman public names (#1947)¶
The warehouse used to store the bare model name Inspect used, so a model served directly, via OpenRouter and via Together all landed in one bucket. It now stores each model's Middleman public name, and keeps the name as written in new nullable *_raw columns. Names without a slash are unchanged (claude-opus-4-6 stays claude-opus-4-6); slashed names change, for example glm-5.2 becomes openrouter/z-ai/glm-5.2 and Llama-3 becomes meta-llama/Llama-3.
What changes for an existing deployment:
modelvalues in the warehouse, the/meta/*endpoints and the runner's Datadogmodel:tag change for those models on every new import. Old rows keep their old names, withNULLraw columns, until they are re-imported, so dashboards, monitors and SQL that match names exactly must accept both forms until then.- Re-importing changes access: an old bare name matched every model-access registration ending in
/glm-5.2, while the public name matches only its own, so some re-imported rows lose groups and become readable by more users. Review registrations before a bulk re-import. - LLM transcript search reads a typed
openrouter/…,together/…orfireworks/…model as a Middleman public name, and cross-lab checks now cover aggregator models, so some scans, searches and online-scan relaunches that used to pass are refused. - Score
model_usagein the sample-events API stays keyed by the Inspect name, not the public name.
Launches with unidentifiable package sources are refused (#2163)¶
Eval-set and scan launches (including human evals and resumes) are refused with a 403 when Hawk cannot tell which code a packages entry installs: direct wheel or web URLs, # fragments other than #subdirectory=path, Git hosts outside the deployment's hawk:codeAccessGitHosts list (github.com and gitlab.com by default), more than 256 sources, or environment and secret names that could steer the installer: any name starting with UV_, PIP_, GIT_ (except Git's environment config, GIT_CONFIG_COUNT, GIT_CONFIG_KEY_<n> and GIT_CONFIG_VALUE_<n>, which users can keep for forwarding their own Git credentials), SSH_, XDG_, LD_ or DYLD_, plus PATH, HOME, NETRC, PYTHONPATH, PYTHONHOME, PYTHONSTARTUP, PYTHONUSERBASE, VIRTUAL_ENV, CONDA_PREFIX, the *_PROXY variables and the Windows profile variables, matched case-insensitively. The error names each offending entry and what to write instead; Submitting and resuming runs has the rules. A 503 means Hawk's own parser failed; the caller retries.
There is no schema or data change, and reverting restores the old behaviour. Before upgrading, tell users and check any saved eval-set or scan configs for the shapes above, since launches that worked before will fail until the config is rewritten.
Code access is enforced for runs and results (#1871)¶
Launching a run or reading its results now needs code access as well as model access, through the API, warehouse SQL, monitoring, approvals, the relay and the S3 reader. The migration (6a91b42d08ef) turns enforcement on as soon as it runs inside pulumi up, and refuses to apply while any eval, job or scan row's code_groups copy is looser than its run's policy or an eval set's copies differ.
Before upgrading, in this order:
- Finish the code-policy recording rollout: every API replica and importer must already record policies, with old writers drained, and stale policies refreshed as in step 1 of the code-policy runbook.
- Optionally run the historical inventory backfill with
--apply, if rules must cover runs from before recording. The upgrade does not require it. - Run the pre-enforcement audit in step 3 of the code-policy runbook as the migration role (read-only logins see false mismatches through RLS). Every count must be 0; otherwise the deploy fails at the migration.
- Give every named code group a populated identity-provider group. Admins pass only the
__unresolved__marker, not named groups, so a run requiring a group nobody holds becomes unreadable for everyone. List the groups runs already require with:
SELECT DISTINCT g FROM code_policy, unnest(code_groups) g WHERE g <> '__unresolved__'
UNION
SELECT DISTINCT g FROM scan, unnest(code_groups) g WHERE scan.job_id IS NULL AND g <> '__unresolved__';
- Grant direct SQL readers the groups their runs require. Identity-provider groups never reach PostgreSQL:
inspect_roand the model-group logins hold only the groups listed inhawk:warehouseReaderCodeGroups, so a required group missing from that list hides the run from every SQL reader even when the user holds it in the identity provider. List the groups every SQL reader should hold there (never a group meant to deny access); see Grant access.
After upgrading, runs with missing or incomplete inventories, and legacy scans without a job ID (which the migration marks unresolved), are readable only through the API, by admins and by the launcher of their own incomplete native run. Direct S3 and SQL readers lose them; tell those readers' owners. To roll back, revert the API changes but keep both migration files (6a91b42d08ef and 7f8d42c9a1be), code_access_v1, monitoring_access_v1 and their models.py listeners, so alembic upgrade head stays a no-op; a plain revert cannot deploy. Direct SQL readers stay locked out of the affected runs until the warehouse policies are regenerated without code checks. Don't use code_access_v1.get_policy_downgrade_sql() from #1871's description for that: later migrations rebuilt those policies, and it would drop their restricted-output check. See Code-access rules.
3.7.2 images no longer build, so a rollback to 3.7.2 would fail at the build (#2661)¶
v3.7.2's pinned Python base image is now too old for the packages the live apt repository serves, so its image builds fail at apt-get install (exit code 100, a perl-base conflict). This hits fresh 3.7.2 installs, 3.7.2 stacks whose next deploy misses the build cache, and most likely a rollback from 4.0.0, which also needs #1871's rollback steps. 4.0.0 already has #2661's newer base image. Tracked in #2810.
To build v3.7.2, on its checkout:
-
From the repo root, replace the old base-image digest with #2661's, in the same 10 files #2661 changed: the 6 places that build images (five Dockerfiles and
DEFAULT_BASE_PYTHON_IMAGEininfra/lib/config.py) and four other copies (CI,Pulumi.example.yamland two docs pages): -
If your stack sets
hawk:basePythonImageto the old digest, change it too. - Run
pulumi up.
Code access rules take a full permission name and must have a group (#2039)¶
POST /code_rules and PUT /code_rules/{pk} take group as a full permission name, such as code-access-benchmark: Hawk stores the part after code-access- as the group and returns the full name. A bare name (benchmark) or null is refused with a 422. Hawk 3.x stored group exactly as sent, and its docs used code-access-benchmark as the example, so a rule created that way has the stored group code-access-benchmark, which 4.0.0 reads as needing the permission code-access-code-access-benchmark.
Before upgrading, while the 3.x API still accepts bare names:
- Find groups stored with the prefix, and re-save each rule that uses one with
PUT /code_rules/{pk}and the bare name ("group": "benchmark"), which also updates the groups recorded on its runs:
SELECT g.name, r.pk, r.url_prefix
FROM code_access_rule AS r JOIN code_group AS g ON g.pk = r.code_group_pk
WHERE g.name LIKE 'code-access-%';
- Give every rule with a null group a group, or delete it; the migration makes
code_access_rule.code_group_pkNOT NULL without assigning any, so the deploy fails if one is left. A null group made its prefix public, so deleting such a rule can put its sources under a broader restricted rule; to keep them readable by everyone, give the rule a group every user holds.
A stored group <name> is satisfied by the permission code-access-<name>, so the identity-provider groups for the #1871 queries take that prefix. Finish rolling out the new API replicas before creating the * catch-all rule the release introduces. See Code Access Rules.
Empty model groups deny access (#1895)¶
Data whose stored model groups are empty, meaning its models were never classified, is no longer readable. Hawk now denies it at the warehouse, API, file-reader, credential, monitoring and relay gates, alongside restricted runs. Before, an empty group set failed open.
What changes for an existing deployment:
- Evals, jobs, folder policies and scans with no model groups become unreadable, and scans over sources known to be unclassified are denied too.
- Writers bound by row-level security can no longer write unclassified rows, and model-free jobs can lose their output credentials.
- Migration
015ff5b36968replaces function and scan-policy definitions with a short lock timeout. It changes no data, writes nothing to S3 and needs no offline window.
Deploy Middleman before the API, or pause human launches until the rollout finishes: Middleman registers the public hawk-human model at startup (#1139), and the new API needs it to validate human launches that name no model, but a single pulumi up starts both after the migration without ordering them. Old API replicas can also launch human runs with no model groups while they drain, so if you don't pause, include those runs in the repair. Repair historical human runs, which have no model groups, across evals, existing jobs, folder policies and the scans that depend on them, rehearsing on staging first; they stay denied until repaired. Anything else left with empty model groups stays denied. See Declared and observed model dependencies. Downgrading restores the old fail-open behaviour, so every empty-group row becomes readable to all row-level-security readers again; classify models to restore access instead.
gVisor nodes move to release 20260914.0 (#1907)¶
On stacks with hawk:enableGvisor, gVisor nodes now install gVisor 20260914.0 instead of 20260817.0, from the per-architecture tarball that releases since 20260831.0 ship. The deploy changes the gVisor node classes' userData, so Karpenter marks every gVisor node as drifted. Sandboxes are karpenter.sh/do-not-disrupt, so a node is replaced only once no sandbox is running on it; until then it keeps the old release and can take new sandboxes. Once a new gVisor node is up, confirm a runtimeClassName: gvisor sandbox starts on it.
To stay on the old release, set hawk:gvisorRelease: "20260817.0" before upgrading; setting it later rolls back the same gradual way. The boot script still installs releases from before the tarball change.
ECS exec is off by default (#2150)¶
aws ecs execute-command into the API, platform-metrics, Middleman and relay tasks was always on; it is now gated by hawk:ecsExecEnabled, default false. The first deploy removes the four *-ecs-exec role policies and force-redeploys those services (rolling, no replacement; Middleman drains through its deregistration delay, 30 minutes on production and staging stacks and one minute on dev stacks). To keep exec access, set hawk:ecsExecEnabled: "true" before upgrading.
ALB egress is scoped to each service (#1685)¶
The ALB's security group no longer allows all outbound traffic. Each service behind it (API, middleman, relay, every viewer) adds an ALB-to-tasks egress rule for its own port when its stack deploys, so the ALB reaches only targets some stack has granted. A target Hawk does not create needs its own egress rule on the ALB's security group.
- Stacks that borrow an ALB through
hawk:externalAlbSecurityGroupIdand the otherexternalAlb*settings add their rules to the owner's security group. Deploy each of them on this release before the stack that owns the ALB; one deployed after it gets no traffic or health checks in between. - Dev environments have built their own ALB since August 2026, so a staging deploy leaves them alone. A dev stack not deployed since then still routes through staging's ALB and loses traffic when staging deploys this release. Redeploy it right after staging with
scripts/dev/new-dev-env.sh <name>, which handles the state problems of a stale stack (see "Reviving a stale dev env" inAGENTS.md) and moves it onto its own ALB.
# A dev stack still on staging's ALB reports the same security group as stg.
pulumi stack output alb_security_group_id -s dev-<name>
pulumi stack output alb_security_group_id -s stg
Scans read their sources through the API (#2089)¶
Scan runners no longer read source eval sets with token-broker S3 credentials. They read them through the API's /sources routes, which list a folder's logs or one sample's artifacts and sign 15-minute S3 URLs, checking the caller on every request. The broker's credentials now cover only the scan's own output.
What changes for an existing deployment:
- Scans need a runner-facing API URL,
HAWK_API_RUNNER_TOKEN_SERVICE_API_URL. Pulumi sets it from the stack's domain (http://on HTTP-only stacks,https://otherwise). A stack without a domain refuses scan launches and resumes with a 503. - A scan started before the upgrade that already has results can't be resumed: the runner fails with an error saying so. Submit its configuration again as a new scan.
- Scans need a runner image built from this version or later. An image built from an earlier version, including a custom image passed with
--imageor--image-tag, can't run them. - Restricted executions read sources through
/sourceswith their execution token, checked against the sources approved at launch while the execution is active. See Restricted credentials.
Before upgrading, make sure the stack has a domain and rebuild any custom runner image. Deploy the token broker no later than the API; one pulumi up covers both. Rolling the broker back fails scans running on the new version at their next credential refresh.
While the deploy that ships this is rolling, a scan whose runner reaches an old API replica fails, because the replica returns 404 for /sources. Resume it. Later deploys are unaffected. After upgrading, tell users to resubmit scans that can't be resumed.
Presigned downloads are audited in one format (#2564)¶
Every route that hands out presigned S3 download links, including Inspect's /log-info and /pending-sample-data-urls, now logs presigned_download_issued or presigned_download_denied with the caller, the eval sets or scans, and every path relative to the evals or scans base, at most 50 paths per event. Events of one request share the request log's request_id and are numbered chunk of chunks. A caller can choose its request_id, so join events on it together with user_sub. path_count counts an event's paths, so sum it over presigned_download_issued events to count the paths issued. request_path_count repeats the whole request's count in each of its events; use it to count a denial's paths, since a denial writes one event with at most 50 of them.
What changes for an existing deployment:
/sources/signloggedsource_urls_issuedandsource_urls_denied, and the log download routes loggedlogsandlog_count. Update saved queries and monitors to the new events and topathsandpath_count.- The log download routes (
/view/logs/log-download-urlandlog-download-urls) sign only Inspect log files in an eval set's folder. Any other file now gets 400, and so does a bare eval-set folder, which both routes answered with 403;/eval_sets/{id}/filesserves every file. A.jsonlog downloads under its own name. Inspect's own/log-inforoute still signs any file in a folder the caller can read, for an hour; those links are now audited too. - A caller's
x-request-idis kept only if it matches[A-Za-z0-9._:-]{1,64}. Any other is replaced with a new id, in the request log, the response'sx-request-idheader and the audit events, where it used to be echoed as sent.
Unset max_sandboxes is 120 per agent model, with an adaptive ceiling of 500 (#2573)¶
An eval set that sets neither max_sandboxes nor a model connection limit now runs up to 120 sandboxes per agent model, up from 20, so such eval sets start more pods at once. Sizing also now follows what Inspect applies: it reads a top-level max_connections, a model's own adaptive_connections and a task's own connection settings, which reach its roles too, and a fixed limit wins over adaptive. Eval sets that set those can size differently, up or down: a top-level max_connections: 60 goes from 20 sandboxes to 120, a top-level max_connections: 5 from 20 to 10, and a model with a fixed max_connections: 60 under a top-level adaptive_connections: true from 200 to 120. A top-level limit now also reaches roles, so with one agent model and a grader on another provider a top-level max_connections: 60 goes from 40 to 240, while a role left on default adaptive no longer adds sandboxes. Models left unset or set to true also get an adaptive ceiling of 500 connections per model instead of inspect-ai's 100, so they can open more connections at once; adaptive still backs off on rate limits, so they grow only while the provider keeps up. To keep the old sandbox load, lower hawk:evalSetMaxSandboxesCeiling before upgrading; it lowers this default, but it also rejects eval sets that set max_sandboxes above it. It doesn't change the adaptive ceiling: an eval set that wants inspect-ai's old ceiling sets adaptive_connections: 100, which also sizes like a limit of 100 (200 sandboxes for each model and role), so it sets max_sandboxes too to keep fewer pods. See concurrency for large eval sets.
:write model grants no longer call models (#2096)¶
Model-access grants split into :read (see results), :write (see and edit results) and :execute (call models); an unsuffixed grant still means all three. In 3.x a :write grant could also call models, launch runs and attach to them; that now needs the unsuffixed grant or an added :execute. Any other suffix grants nothing.
Middleman checks fallback and routing models (#2548)¶
Models named in Anthropic fallbacks, the Anthropic advisor tool, OpenRouter models and Gemini routing are checked like model: the caller needs access to each (404 otherwise), and each must share model's lab and credentials (400 otherwise). Evals whose fallbacks cross labs or accounts must drop them.
Prompt caching for scans and jobs (#2160, #2264)¶
Scan models default to cache_prompt: false; set it to true on a scan model to cache again. Middleman no longer forces a 1-hour Anthropic prompt-cache TTL on eval-set and scan requests and leaves the TTL to Inspect; direct callers keep the 1-hour rewrite. Watch eval 429 rates after upgrading.
Runners reuse a prebuilt environment (#1599)¶
hawk:runnerEnvStrategy defaults to prebuilt: jobs reuse the dependency environment baked into the runner image, so setup takes about a second instead of 30 to 40, and transitive dependencies come from Hawk's lock file instead of the newest allowed release. Set it to fresh for the old resolution; it applies to jobs launched after the API redeploys.
Model credentials renew in the background (#2018)¶
After an idle period a runner's first model call can carry an expired credential and get a 401 that a retry recovers from. Tell users to leave max_retries unset or set it to at least 2.
Sandbox chart values (#2122, #1878)¶
Sandbox pods run inspect-k8s-sandbox 0.14.0, whose CoreDNS sidecar listens on port 18181 of the pod IP; a task service on that port must move or set corednsReadyPort. At isolation: strict, task sandbox values are checked against an allowlist: CoreDNS overrides, service-account settings, allowDomainsPorts, global, extraContainers, a disabled networkPolicy, custom volume-claim specs and labels under inspect-ai.metr.org/ are refused at task load.
hawk models prints a table (#2184)¶
Scripts that parse its output should pass --names-only. --zdr-only and --raw-cot-only are deprecated aliases for --zdr true and --raw-cot true.
Warehouse statement logging (#2256, #2290)¶
Hawk's writer roles (the API's, Middleman's and the traffic ingester's) and the model-group audit login no longer log statements, not even slow ones, so hawk:dbLogAllStatements and hawk:dbLogMinDurationStatementMs now cover only read-only logins and inspect_admin. Pooled connections pick this up when they reconnect. Logs written before the upgrade can hold transcript text from writer queries; review who can read the Aurora log group and how long it keeps events.
Deploy role permissions for cluster log groups (#2249)¶
Deploys create the EKS and Aurora log groups through the AWS CLI, so a scoped deploy role needs logs:CreateLogGroup and logs:PutRetentionPolicy. Destroying an unprotected stack also needs eks:DescribeCluster, rds:DescribeDBClusters and logs:DeleteLogGroup, and deletes those log groups. Setting the new hawk:clusterLogsRetentionDays expires older events at once, and unsetting it later does not restore them.
Model-group audit login (#2539)¶
The deploy adds an idle Batch job for the model-group audit and a database login, inspect-audit, that bypasses row-level security. Nothing runs until you submit the job. inspect-audit is reserved: the deploy fails if a configured database user or model group uses that name.
Dev stacks inherit staging's credential profiles (#2180)¶
A dev stack that sets no hawk:middleman<Provider>Profiles of its own now takes stg's profiles and default profile, for Anthropic, OpenAI, OpenRouter and Google. If stg's default is an aws_sts profile, the provider must trust dev-<name>-middleman-tasks before the dev stack redeploys, or the dev stack sets its default profile to "".
Per-model read policies need 4.0.0 APIs (#2207)¶
Don't set a non-default read_policy until every Hawk API replica that uses this Middleman runs 4.0.0. Older APIs ignore it, so the policy restricts nothing.
3.1.0¶
Removing multiArchImagesEnabled (#1527)¶
hawk:multiArchImagesEnabled has been removed: the runner and janitor images are now built only for hawk:cpuArchitecture instead of an amd64+arm64 manifest list. Deploys fail until the key is gone:
On a dev stack the error can also come from the key lingering in the staging stack's config, which dev stacks inherit when they set no architecture keys of their own — remove it there; pulumi config rm on the dev stack has no effect on an inherited value.
Review the NodePool CPU limit (#1527)¶
If a stack sets hawk:karpenterNodePoolCpuLimit, review it before upgrading. The limit applies independently to every NodePool, and this release adds an ARM counterpart to each standard-instance CPU pool. These pools are default and default-arm64, plus gvisor and gvisor-arm64 when gVisor is enabled. hawk:enableGloveboxKata adds one more, the amd64-only glovebox pool. Their combined Karpenter ceiling is the sum of their effective caps after applying hawk:karpenterNodePoolCpuLimitOverrides, before the managed Karpenter controller nodes are counted. If any standard-instance CPU pool is unlimited, there is no finite combined ceiling.
If the old value matched the account-wide EC2 On-Demand Standard vCPU quota, lower it so the combined ceiling plus the controller nodes fits that quota:
Choose the cap deliberately rather than blindly dividing: it must still fit at least one eligible node (currently 2 vCPUs). Raise the AWS quota or disable gVisor if the available per-pool budget would be smaller. Pulumi warns with the combined ceiling whenever this key or an override sets these caps.
If you use a custom runner image (#1527)¶
Most deployments use Hawk's built-in runner and need no action. This applies only to eval sets that specify runner.image or use hawk eval-set --image. A custom runner image must support the deployment's hawk:cpuArchitecture. See Custom Runner Images for configuration details.
CrowdStrike sensor image (#1527)¶
If hawk:enableCrowdstrike is on, the falcon-sensor DaemonSet must run on both amd64 and arm64 nodes, so the image_tag in the <env>/platform/crowdstrike secret must be a multi-arch tag — available for sensor 7.15 and later, and recognizable as the tag without an architecture component (7.20.0-17306-1.falcon-linux.Release.US-1, not ...falcon-linux.x86_64.Release.US-1). Deploys reject architecture-specific tags at validation; update the secret before upgrading. A single-arch image would otherwise crashloop on the other architecture's nodes and leave them without EDR.
3.0.0¶
Migrating from armImagesEnabled (#1511)¶
hawk:armImagesEnabled has been removed and superseded by hawk:cpuArchitecture which chooses arm64 by default. If hawk:armImagesEnabled was previously set to false, then set hawk:cpuArchitecture to amd64. Set the new key before removing the old one: a stack with neither key silently defaults to arm64, whereas a lingering armImagesEnabled fails the deploy loudly.
# Keep amd64 if armImagesEnabled was false.
# If it was true, skip this command; arm64 is already the default.
pulumi config set hawk:cpuArchitecture amd64
pulumi config rm hawk:armImagesEnabled
The new hawk:evalTaskArchitecture setting defaults to amd64, so no action is required unless you intentionally move eval task sandboxes to arm64. Make that switch only after every image in each sandbox supports arm64.