Chapter 10Governance·~15 min read

Security, compliance and governance: controls outside the model

The threats specific to coding agents, the controls that answer them, how DORA, GDPR and Norwegian law shape the platform, who controls the controls, and how evidence is kept.

Security & compliance Leadership Platform team

Key takeaways

  1. Design as if the agent were compromised. Incidents came from credentials, reachability and egress, not clever models, so every control sits outside the model.12
  2. Governance gates the platform. Until the privacy, staff, DORA and contract sign-offs due in week 4, only the platform team uses Claude.
  3. The model route does not support a critical or important function under DORA while humans independently approve every agent change and agents have no production write or unmasked access.34
  4. The platform team does not control its own controls. Outside staff run the evidence accounts and approve control changes.5
  5. Agents see synthetic data only; employee data serves three stated purposes. Nobody is scored individually, and reports never show groups under five.56
  6. Evidence cannot be altered quietly. It is tamper-protected and replicated, with the hardest lock kept for statutory floors such as bookkeeping's five years.57
  7. Vendor indemnities are thin for agent code, so a provenance check in CI and a record of human design input protect the bank.47
10.1

What can go wrong with coding agents

Treat the agent as an insider who may be working for someone else, and limit what a hijacked agent could reach or send out. It reads strangers' text, any of which can carry instructions, and runs code with whatever credentials its environment exposes. Every incident of 2025-2026 turned on a credential within reach, a system the agent could touch or an open path out, never on unusual model intelligence (chapter 01 tells the stories).

PocketOS: production database and backups deleted9sThrough a stray Railway token found in an unrelated file2
Clinejection: unauthorised release live~8hAfter an injected triage bot leaked an npm token89
TanStack wave: malicious publishes, valid provenance84Supply-chain provenance (SLSA Build L3) proved where a package was built, not what it does10
NewCore: unprompted connector reads by two bots31Over five days, continuing after four refusals; an outside gateway held all 311112
All ten agent-specific threats, with the incident behind each 10 rows

Each row pairs a threat with what happened and the lesson the design takes; 10.2 gives the control and its evidence.

Agent-specific threats, the evidence for each, and the lesson the design takes
ThreatWhat happenedWhat it teaches
Forged or shaped proofNo public incident yet. Our red team found that early drafts let agent code write the test reports that were then signed.Agent code must neither sign nor shape its own proof (chapter 06).
Credential theft from the VMThe Claude Code GitHub Action's Read tool exposed the API key through /proc/self/environ (fixed in 2.1.128).13 In the TanStack wave, an OpenID Connect (OIDC) token was read from runner memory.10Nothing in the VM may be worth stealing. Tokens are run-scoped and short-lived.
ExfiltrationComment and Control (April 2026): PR titles and hidden HTML comments hijacked three vendors' agents running in GitHub Actions. Copilot's firewall allowed github.com, so secrets left base64-encoded through git push.1An allowlisted code host is an exit. Agents push only through a broker.
Prompt injectionClinejection: an issue-triage bot built on claude-code-action was injected. A stolen npm token led to an unauthorised cline@2.3.0 release.89A bot that reads strangers' text must not hold write tools and secrets together.
CI poisoningMini Shai-Hulud, TanStack wave (11 May 2026): pull_request_target, then cache poisoning, then an OIDC token read from runner memory, then 84 malicious publishes with valid provenance.10Secrets live only where PR code never runs. Caches are not shared with untrusted jobs.
Guardrail editsIn the earlier SAP wave (29 April 2026), the malware committed a .claude/settings.json into victim repositories.10Agent configuration supplied by a repository must never take effect unreviewed (10.3).
Self-approvalGitHub stops authors approving their own PRs, but nothing native knows who asked an agent for the change.14The bank owns its own independence check (chapter 09).
Runaway agentNewCore (reported 4 November, published 17 November 2026): bots kept making unrequested reads after an owner declined four times, and none appeared in their own chat history. NewCore sells gateways, so it is an interested party.1112A “stop” is a prompt. Kill switches and logs must sit outside the agent.
Malicious packages and pluginsPlugin4Shell (disclosed 17 September 2026): plugin auto-update gave zero-click remote code execution, fixed in Claude Code 2.1.179.15 OpenAI's evaluation agents used an internal package proxy to reach the internet and breached Hugging Face.1617Package proxies are egress. Plugins and skills are code to pin and review.
Shadow AIFinanstilsynet's ROS 2026 (its risk and vulnerability analysis) expects an overview of all ICT and AI solutions in use, “including unauthorised ones”.18Block unapproved tools on managed devices and inventory the approved ones.
The stance

Two assumptions drive every control here: the agent can read all memory in its VM, including anything the bootstrap left behind, and a “stop” typed in chat is only a prompt. Real stops terminate compute and revoke tokens from outside the agent.

10.2

Twelve risks, twelve controls, and the evidence for each

Each risk has a control outside the model and evidence an auditor can check, mostly a probe, bypass bundle or red-team case that must fail. The two-week red-team spike S2, on a frozen build in weeks 10-12, must pass before gate W-tech opens hosted runs to all engineers (chapter 17).

Most of the twelve controls make one of five moves:

  • Nothing to steal. No job that runs PR code holds secrets or write tokens; agent tokens are run-scoped and short-lived.
  • No way out. No NAT gateway, an exact-host proxy, and endpoint policies limited to the bank's AWS organisation.
  • Propose, never write. Agents push through a broker that blocks protected paths and unapproved dependencies.
  • Independent approval. A fail-closed check stops the requester, pushers, commit authors and bots from approving.
  • A stop outside the agent. Budgets at the model gateway, a 4-hour cap and a four-action kill switch.
All twelve risks, with the control and evidence for each 12 rows

The full matrix adds the supply-chain, harness, laptop and shadow-AI controls, and names the evidence an auditor checks for each.

Control matrix (from the recommendation, §7.1)
RiskControlEvidence
Forged or shaped proofNo job that runs PR code holds secrets or write tokens. verify-run tests the head with the harness layer from main; black-box suites run in a second VM. The notary checks the harness tree hash and the gateway's witness chain before it signs.Notary logs; S2 forgery case
VM credential abuseOne bootstrap per run; run-scoped tokens; a pull-only instance role usable only through the bank's VPC endpoints; instance metadata limited to one network hop and blocked for the agent user; no SSM parameters.S2
Exfiltration and the data perimeterNo NAT; an exact-host proxy allowlist; VPC endpoint policies limited to the bank's AWS organisation plus named AWS buckets; package groups that block upstreams by default;19 image pulls only from approved prefixes; a field allowlist at the model gateway; a recorded TLS-inspection decision per destination.Deny and positive probes; S2
Prompt injectionRule of Two per profile (below); propose-only writes; a quarantined reader for customer text; the canary injection suite nightly and on every harness or model change (10.4).Suite results; red team
CI poisoningSecrets only in environments limited to main and the merge queue, or behind OIDC trust that requires refs/heads/main. The default GITHUB_TOKEN is read-only. Trusted runners serve only selected main workflows. Workflow lint (zizmor) and policy checks (OPA) are required. No cache restore in verify or agent/** workflows.Policy-check output
Agent edits guardrailsThe broker blocks protected paths; sessions on agent-authored branches read instructions from the base commit (10.3).Conformance suite: one bundle per bypass class
Self-approvalsod/independence excludes the requester, sponsor, pushers, commit identities, bots and, on T2, adopted contributors. It requires attestations and fails closed.Check suite incl. the contributor case; monthly SoD report
Runaway agentBudgets enforced at the gateway that fail closed; a 4-hour cap; at most 2 CI rounds; a four-action !stop: cancel compute, revoke the token, attach an IAM deny, mark the registry.Kill-switch drill
Malicious packages and pluginsA server-side 72-hour age gate through promotion from a staging repository; install scripts off and lockfiles frozen in the image, not in repo files; the broker blocks unapproved direct dependencies; software bills of materials (SBOMs); bank-owned skills; plugin auto-update off.Promotion log; SBOMs
Harness vulnerabilityrequiredMinimumVersion at 2.1.179 or later (Plugin4Shell);2015 weekly harness bumps as a standard change.Inventory
Laptop laneManaged settings deny reads of ~/.aws, ~/.ssh, ~/.config/gh, ~/.docker, ~/.kube and secret variables; managed domains only; a Bedrock-only permission set; ./x refuses agent/* checkouts outside a sandbox. Claude Code's own sandbox covers shell commands only; file tools, MCP servers and hooks run outside it.21Laptop probe
Shadow AIMobile device management (MDM) blocks unapproved tools; AI systems are listed in the ICT asset inventory.18Inventory

The Rule of Two, profile by profile

Meta's Rule of Two says an agent session should hold at most two of three properties: untrusted input (U), access to sensitive systems or data (S), and the ability to change state or communicate externally (C).22 Of the bank's agent profiles, only Investigate and Implement need all three; both are propose-only with closed egress, and Implement's proof is produced outside the agent. A label or a system-prompt line never counts as compensation.

Rule of Two for all eight agent profiles, with what compensates 8 rows

Shaded rows hold all three properties. Triage and Ops arrive only at later gates.

Rule of Two by agent profile (recommendation §4)
ProfileUSCWhat compensates
CoordinatorYesNoYesIntake call has no tools; posts go only to the originating thread
AskYesYesNoRead-only VM and read-only token
InvestigateYesYesYesPropose-only (draft PR, findings); closed egress
ImplementYesYesYesPropose-only; closed egress; proof produced outside the agent
ReviewYesYesVia posterThe model step has no tools; a non-LLM poster writes comments
ResearchYesNoYesNo repository, secrets or internal network; queries DLP-checked and logged
Triage (gate F1)EnumsYesYesFree text reaches it only as typed values from a quarantined reader
Ops (gate O)——ProposalA non-LLM apply service validates parameters; on-call approves with step-up sign-in
10.3

Agents cannot edit their own guardrails

The broker refuses agent changes to anything that configures agents, CI, policy, builds or packages, and sessions on an agent's branch read their instructions from the base commit. Otherwise an agent could switch off the controls that watch it, as the SAP wave of Mini Shai-Hulud did to its victims by committing a .claude/settings.json.10

Changes to these paths are human work at the highest review tier, T2 (chapter 09); control components, marked † in chapter 03, also need an outside approver (10.6).

The protected paths and rejection rules, as a generated policy file 24 paths · 6 rules

Agents may not write to any of these paths, and the broker rejects the listed change types outright. The policy is generated from review-tiers.yml, which also generates CODEOWNERS and the GitHub rulesets, so the three cannot drift apart.

policy/broker.generated.ymlillustrative sketch
# Generated from review-tiers.yml. Do not edit by hand.
agent_write_denied:
  # agent, CI and policy configuration
  - .github/**      - .claude/**     - .agents/**    - .codex/**
  - CODEOWNERS      - policy/**      - tools/agent-hooks/**
  # infrastructure, images and the build entry point
  - infra/**        - images/**      - ./x   - .moon/**   - mise.toml
  # package and registry configuration
  - .npmrc   - pnpm-workspace.yaml   - uv.toml   - settings.gradle.kts   - renovate.json
  # catalogs and repository plumbing
  - catalogs/**   - .gitattributes   - .gitmodules   - .lfsconfig
  - .devcontainer/**   - .vscode/**   - .envrc
reject:
  symlinks: true
  submodules: true
  case_or_unicode_collisions: true
  exec_bit_changes: unless_listed
  oversized_blobs: true
  external_urls_in_markup: true
The protected paths and rejection rules are those in the recommendation (§7.1). The file name, directory names for infrastructure and images, and the YAML layout are illustrative. A conformance suite holds one bundle per bypass class and must reject all of them.

Instruction poisoning

Instructions planted in AGENTS.md on the agent's branch would be obeyed by the next session there, such as a reviewer or a resumed run. So every session on an agent-authored head reads its instruction files, read-only, from the base commit. This overlay is not yet proven: spike S3 (weeks 6-8) tests it, along with verified resume.

Deep dive: which sessions and files the base-commit overlay covers 1 min

Every session on an agent-authored head (review, the cross-vendor interrogate seat, resume, Babysit, maintenance, drills) mounts AGENTS.md, CLAUDE.md and .codex/ read-only from the base commit, with project setting sources excluded. Instruction files a PR changes are T2 and shown to reviewers first (chapter 05).

The red-team spike S2 tries a poisoned branch AGENTS.md among every broker bypass class. Research output goes only to research/** and is untrusted input for every other agent.

10.4

Prompt injection: structure, not promises

Injection cannot be filtered out reliably, so the design makes a hijacked agent harmless: it cannot see anything sensitive, cannot act, or cannot send anything out. Defences inside the model's context were broken by adaptive attacks more than 90% of the time. Deterministic defences outside the model look far better, but mostly on static benchmarks: the one independent adaptive test, of one defence on one small open model, cut attack success from 25.8% to 4.2%.23 Encouraging, not proof.

  1. Profile separationNo session holds untrusted input, sensitive access and a way out at once.
  2. No exfiltration channelExact-host egress; credentials outside the VM; no path to github.com (figure below).
  3. Policy on tools and argumentsEnforced outside the model: slack.post only to the originating thread, comments only on the session's own PR.
  4. Quarantined readerA tool-less model call turns customer-controlled text into typed values, so the planner never sees free text.
  5. Hash-pinned tool listsThe gateway fails closed if a tool list changes mid-session.
  6. Output hygieneMasking and provenance labels: helpful but probabilistic, so not a boundary.
Not controls

Vendor promises that the model treats other people's posts as information, not instructions.24 Vendor read-only or lockdown modes, which GitHub itself calls “not an authorization boundary”.25 System-prompt instructions. A user telling the bot to stop: the NewCore bots carried on after four refusals.11

The data perimeter around an agent VM
Solid: allowed, through one exact-host proxy. Dashed and crossed: closed by policy, not by asking the agent
Data perimeter around an agent VM An agent VM in the centre. On the right, solid arrows go through a Network Firewall proxy with an exact-host allowlist to five destinations: the model gateway, the git broker, CodeArtifact with promoted packages and a 72-hour age gate, ECR pull-through on approved prefixes, and the bank's GHE.com tenant. On the left, six dashed paths end in a cross: the internet (no NAT), arbitrary S3 buckets (endpoint policy limited to the bank's organisation), presigned URLs to other accounts, instance metadata from the agent user, Slack (no token) and production (no route). DENIED (DASHED) ALLOWED, ONLY VIA THE PROXY Internetno NAT gateway Arbitrary S3 bucketsendpoint policy: bank org only Presigned URLsto other AWS accounts Instance metadatahop limit 1; blocked for agent Slackno token in the VM Productionno network route Agent VM one run, ephemeral EC2 no secrets worth stealing assume it reads all VM memory NFW proxy exact hosts + DNS Firewall Model gatewayrun token, budgets Git brokerbundle in, draft PR out CodeArtifactpromoted, 72-h age gate ECR pull-throughapproved prefixes only <tenant>.ghe.comread-only, 15-30 min token EXFILTRATION VIA PACKAGE OR IMAGE NAMES AND RENDERING SURFACES IS TESTED IN S2
What to take from it: the only ways out are five named hosts behind one proxy; AWS paths that would bypass it are closed by endpoint and IAM policy. The Network Firewall (NFW) proxy became generally available on 19 November 2026,26 so a fallback on the same allowlist is planned. Source: recommendation §2.1-§2.2, §7.1; chapter 04 shows the toolchain probes.
Deep dive: how S2 tests the closed paths, and the research profile's narrower perimeter 1 min

The red-team spike S2 tries the closed paths rather than trusting them: presigned PUTs through every endpoint, and instance metadata from the agent user, from containers and from outside the VPC. It also tests exfiltration through package or image names and through rendering surfaces.

The figure shows the code profile. The research profile reaches only the gateway, the broker and a query-stripping fetch proxy (plus AgentCore Web Search in eu-west-1 from month 4).

The canary injection suite

A canary suite checks that the perimeter holds. From weeks 5-8 it plants fake secrets where agents read (issues, PR comments, READMEs, CI logs, Slack, web pages); a pass means zero canary egress and zero unauthorised state change. It runs nightly and on every harness or model change, and is a gate W-tech criterion (chapter 13).

What a passing canary run looks like, as an illustrative terminal 7 lines
What a passing canary run looks like
Illustrative mockup. The pass criteria are real (recommendation §10.3); the command name and layout are not. Illustrative.
10.5

DORA: every surface classified, registered and given an exit

Every vendor and surface is registered and assessed for whether it supports a critical or important function, and the non-negotiable model contract gets a documented risk acceptance before wide use. DORA, the Digital Operational Resilience Act (Regulation (EU) 2022/2554), has applied in Norway since 1 July 2025, its technical standards incorporated by DORA-forskriften. A licensed bank gets the full standard for information and communication technology (ICT) risk, the regulatory technical standards (RTS) 2024/1774, not the simplified one.3275

Working position

The large language model (LLM) route does not support a critical or important function (CIF) while no agent output reaches production without independent human approval and agents have no production write or unmasked access. Source control, CI and the control plane sit in the change path of critical systems and may support a CIF, as many banks classify them. ICT risk assesses each surface, approves the result and records it in the register of information (RoI).

BaFin's guidance draws the same line, contrasting AI built into critical functions with assistants “completely under human supervision and… not involved in decision-making processes”.4 The position is conditional and must be reassessed, with any filings, before any of these happens:

  • T0 changes merge without in-the-moment human approval (gate F2, month 9 or later);
  • agents get production data access, or an apply service exists (gate O);
  • an LLM enters a runtime path of the bank;
  • the bank can no longer patch without agents.

A surface classified as CIF-supporting triggers five further duties, starting with a notification to Finanstilsynet at least 30 days before go-live.3

The five duties a CIF-supporting surface triggers 5 items
  • a notification to Finanstilsynet before go-live, which DORA Art. 28(3) requires for planned CIF arrangements,3 filed on form KRT-1121 at least 30 days ahead (a deadline this research confirmed through a law-firm summary, not Finanstilsynet's own text);
  • the additional Art. 30(3) contract clauses;
  • a tested Art. 28(8) exit;
  • RoI rows that list the subcontractors behind it (template B_05.02);28
  • access-rights updates at least every six months.5

The model contract

Claude on Bedrock runs under two contracts whose gaps the bank cannot negotiate away.2930 AWS's DORA addendum is not public, so the plan assumes it does not cover Anthropic-sold models,31 and Anthropic says its terms “are not open to negotiation”.32 So before Claude use goes beyond the platform team, ICT risk produces three things:

  • an Art. 30(2) clause map of both contracts, listing the gaps;
  • an Art. 28(4) risk assessment, with due diligence and a concentration record;
  • a risk acceptance under the management body's ICT third-party policy, with compensating controls: route and contract tags, retention set to none and the drilled Codex exit (chapter 11).
Deep dive: the contract parties, the private-offer route and the interim acceptance 1 min

The AWS agreement is with AWS EMEA SARL. The Anthropic on Bedrock – Commercial Terms (version 2025-08-18) are with Anthropic Ireland under Irish law. Claude counts as AWS “Third-Party Content”, invoiced by AWS Inc.2930 AWS offers a DORA Financial Services Addendum on request, but its text is not public.31

A Bedrock private offer is the intended vehicle for a DORA addendum; whether it can carry one is unverified. Meanwhile the platform team's own use in weeks 0-4 runs under a time-boxed interim acceptance by ICT risk (our inference of what is proportionate).

Every provider in use gets an exit tier: drilled (A), like the quarterly Codex drill for Anthropic, or a written plan tested against fakes (B). AWS is on the European Supervisory Authorities' (ESAs') list of critical ICT third-party providers, which does not reduce the bank's own duties (chapter 12).33

Register of information and exit tiers, provider by provider 7 rows

ICT risk assesses six surfaces: Bedrock and Anthropic, GHE.com, Actions and runners, the control plane, the evidence store and Slack. The ESAs' list names 19 critical ICT third-party providers (CTPPs), including AWS EMEA SARL and Microsoft Ireland Operations. It names no LLM lab and not Cloudflare, and no 2026 update was found as of 24 November 2026.33 Whether Microsoft's oversight covers GitHub is not public.

Register of information and exit tiers (recommendation §7.3)
ProviderRoute, data, locationExit tier and plan
AWS EMEA SARL (CTPP); AWS Inc. invoices Claude on Bedrockeu-north-1, eu-central-1, eu-west-1. Open questions on the addendum's scope and on concentrationB: image, Terraform and ./x run on any VM host. A (tested redeploy) if the control plane or CI is assessed CIF-supporting
Anthropic IrelandBedrock eu.; code and prompts (green data only)A: quarterly Codex drill
GitHub (GHE.com, EU)Bought through the Microsoft agreement; DORA coverage question openA if CIF-supporting: forge-export test
Azure OpenAI Data Zone EUDrill code, T1 work, and T2 diffs except keys, identity and anti-money-laundering (AML) paths; models pinned to versions that keep Modified Abuse MonitoringIs the exit
Entra ID; Slack (Enterprise+, EU)Identity root; Slack gives visibility, not the recordBank plan; B
MDM vendor; ticket system; Sentry EU (US SaaS); Snyk if remoteRegistered before first use. “RoI row exists” is a gate criterionB
Not usedCloudflare; Grok Bot and Cursor cloud agents for bank work; Anthropic-hosted sessions; hosted AI review; Docker Desktop; LiteLLM; SaaS eval platforms; the Google eu route in year 1
Tier A: a drilled exit. Tier B: conformance tests against fakes, a written plan and an annual tabletop, with no production twin traffic.
10.6

Who controls the controls: people outside the platform team

The people who build the platform cannot alter its evidence or approve changes to its control components. RTS Art. 21 asks for segregation of duties that prevents “combinations of access rights that may be used to circumvent controls”, and privileged access only on a need-to-use basis.5 A platform team that could edit the broker policy, approve its own change and delete the record would be exactly such a combination. As Datatilsynet puts it: “En KI-aktør trenger en definert identitet, tydelige rammer for tilgang og et klart ansvarsforhold” (an AI actor needs a defined identity, clear limits on access and a clear line of accountability).34

AWS accounts and who administers them
Organisation-wide guardrails on top; platform accounts on the left; evidence and the organisation on the right, outside the platform team
AWS accounts and who administers them An AWS Organization with service control policies across the top: region allowlist, deny global and US inference profiles, deny key deletion, no NAT. On the left, five accounts the platform team can enter only with just-in-time, session-logged access: control, agent, ai-inference, verify and trusted. On the right, three accounts administered by security and ICT-risk staff under dual control: the Organizations management account, the evidence account in eu-north-1 and the evidence replica in eu-central-1 under separate administration. Arrows: agent to control carries the git bundle; agent to ai-inference carries model calls; verify to trusted carries reports; trusted to evidence carries the manifest to the notary; evidence replicates to the replica. Break-glass needs two persons outside the platform team. AWS ORGANIZATION SCPs: region allowlist · deny global./us. inference · deny key deletion · no NAT PLATFORM TEAM: JUST-IN-TIME, SESSION-LOGGED SECURITY + ICT RISK: DUAL CONTROL controlbroker, coordinator ai-inferencemodel gateway agentone EC2 VM per run verifyruns PR code, no secrets trustedverify-seal, main only No standing admin in control, agent, verify or trusted. Privileged access is time-boxed and recorded. Management accountAWS Organizations Replica · eu-central-1separately administered evidence · eu-north-1notary, Object Lock git bundle model calls reports manifest replicate Break-glass: two persons outside the platform team
What to take from it: the platform team gets only time-boxed, logged access to the accounts it builds, and nothing flows back from evidence. Just-in-time access through IAM Identity Center temporary elevation is an inference. Source: recommendation §2.1, §7.2, §7.5.
  • Outside admins. Named security and ICT-risk staff run the evidence accounts and the Organizations management account under dual control, with alarms on CloseAccount, LeaveOrganization and key-policy changes.
  • Outside approvers from a CODEOWNERS team the platform team cannot join, for changes to † components: review-tiers.yml, the broker policy, egress allowlists and machine-image records.
  • Two-person break-glass from outside the platform team; every bypass alerts and gets a post-implementation review.
  • Six-monthly recertification of GitHub App permissions, entitlements, break-glass holders and evidence admins.5
  • Reporting covers the platform team too. The monthly segregation-of-duties (SoD) report covers contributors and every platform-team bypass and admin event; by month 6, the ledger and anti-money-laundering (AML) domains each have three approvers who are not the requester (chapter 15).
10.7

Personal data: synthetic for customers, three purposes for employees

Customer data never enters agent work. Employee data enters every session, so it is collected for three stated purposes only. Agents get synthetic data only, such as Tenor test personas. That goes beyond RTS Art. 16(5), which allows anonymised, pseudonymised or randomised production data in non-production environments such as agent sandboxes.5 A scanner for national identity numbers (fødselsnummer and D-number) and data loss prevention (DLP) at Slack intake and at the model gateway catch real identifiers that slip in.

Employees are the harder case: prompts, steering and telemetry are personal data about named engineers. Norwegian law allows monitoring of employees' electronic equipment only to administer the network or to detect or clear up security breaches,36 and Datatilsynet adds that logging counts as monitoring even if nobody reads it, and that monitoring for any other purpose is unlawful.6

Datatilsynet's guidance in its own words, with translations 2 quotes

“Innsamling av opplysninger, for eksempel gjennom logging, er omfattet, selv om arbeidsgiveren ikke nødvendigvis går gjennom opplysningene.”

Datatilsynet guidance on monitoring employees: collection, for example through logging, is covered even if the employer does not necessarily review the data.6

“Dersom overvåkingen skjer for andre formål, uansett hvor aktverdige disse er, vil den være ulovlig.”

The same guidance: monitoring for any other purpose, however worthy, is unlawful.6

Before any telemetry, the impact assessment and the consultation. The data protection officer (DPO) completes a data protection impact assessment (DPIA) that includes staff views, which is mandatory for systematic monitoring.6 The bank holds the drøfting (consultation) under arbeidsmiljøloven § 9-2 with the tillitsvalgte (employee representatives) “så tidlig som mulig” (as early as possible).37 Both come before any OpenTelemetry (OTel) export, transcript archive or witness content, pilot included; until then only the platform team uses the laptop lane (chapter 15).

Three purposes, nothing else.

  1. DORA change evidence.
  2. Security: detecting and investigating incidents.
  3. Operating the platform in aggregate, with a GDPR Art. 6(4) compatibility assessment.

Split transcripts, no individual scores. The agent side (tool calls, commands, files, versions) stays with the change record; human turns are encrypted with per-person keys and kept for less time. Line managers read no transcripts, and metrics are per PR, team or domain, never per person, with a minimum cell of five.

Who can read a session transcript, and how long the identity mapping lasts 6 rows

Triage of the worst sessions and mining for evals use agent-side extracts only. The identity mapping is kept for as long as the longest record that uses it, under dual control. Erasure is refused meanwhile, because the records serve a legal obligation (GDPR Art. 17(3)(b)).38

Who can read a session transcript
WhoWhatHow
The requesterTheir own sessionsSelf-service
The approverThe session behind the change under reviewDuring review only
SecuritySessions linked to a security eventDual-control break-glass, logged
Internal auditSampled change recordsLogged sampling
Line managersNothing—
The platform teamNothing by defaultAggregates with a minimum cell of 5
Deep dive: the two vendor data paths that managed settings close 1 min

Managed settings disable the /feedback command and the WebFetch domain check, which could send transcripts or hostnames to the vendor. /feedback is off by default on Bedrock, but a report it sends is kept by Anthropic for five years, so the command is disabled outright. The WebFetch domain safety check calls Anthropic whichever provider serves the model.39 Content logging stays off; OTel redacts prompts and tool content by default.40

managed-settings.json (excerpt)illustrative
{
  "env": {
    "DISABLE_FEEDBACK_COMMAND": "1"        // no /feedback transcript uploads
  },
  "skipWebFetchPreflight": true            // no hostname check sent to the vendor
  // OTEL_LOG_USER_PROMPTS and OTEL_LOG_TOOL_CONTENT are never set: content stays redacted
}
Excerpt of the privacy-relevant keys in the managed settings shipped in the image and on laptops. The full baseline is in chapter 05.
Open legal questions

Two need written legal opinions. Is a central transcript archive a “personlige område” (personal area) under FOR-2018-07-02-1108 § 1, which would bring the employer-access procedure into play?36 And does an LLM provider act “på vegne av” (on behalf of) the bank under hvitvaskingsloven § 28?35 Until the second is answered, AML case content reaches no model and no AML cell exists.

10.8

Evidence: integrity first, retention by purpose

Evidence must be impossible to alter quietly. How long it is kept is a risk decision the bank makes and writes down. RTS Art. 12(2) requires logs to be protected “against tampering, deletion, and unauthorised access” and logging failures to be detected, but leaves retention to the bank.5 No source sets a period for change records or requires write-once (WORM) storage (research reconciliation, item c54).

Integrity

  • Keys that only a dual-controlled role can destroy.
  • Locks that only dual-controlled evidence admins can bypass, and in compliance mode nobody can.41
  • A replica in a separately administered account, restore-tested yearly.
  • Self-verifying records that carry the notary's public key and the verifier version.
  • Hash-chained manifests that alert on any break, written by a control plane that can append but never delete.
Deep dive: how each integrity control works 1 min
  • Keys cannot be destroyed. A service control policy (SCP) denies deletion, disabling, policy changes and grants on the notary and governance-tier keys, except to a dual-controlled role, with CloudTrail alarms. The compliance tier uses S3-managed encryption, so no customer key can crypto-erase it (inference).
  • Locks cannot be bypassed casually. In compliance mode nobody, not even the root user, can delete a locked object or shorten its lock. Governance mode allows a privileged bypass,41 and that permission is held only by evidence admins under dual control.
  • The replica is also the bookkeeping backup. The Object Lock bucket in eu-central-1 is also the separate backup that bokføringsforskriften § 7-2 requires. Storing accounting material in another EEA state needs a notice to skattekontoret (the tax office) under § 7-5, and records must stay readable and printable from Norway.42
  • Records verify themselves. Each record stores the notary's public key and the verifier version. Signing keys are retired by key policy, never deleted.
  • Gaps are loud, and GitHub's own logs are short-lived. Manifests are hash-chained, with alerts on any break. GitHub keeps its enterprise audit log for 180 days and Git events for 7,43 so records are exported at merge and audit logs are streamed.

Retention follows purpose. Only ledger, posting and closing changes get a compliance-mode lock: five years after the last financial year the version ran, under bokføringsloven § 13.7 Other change records get a governance lock for five years (inference); proof media 12 months to 5 years by tier; pseudonymous OTel 13 months. A compliance lock cannot be shortened, even to honour a legitimate deletion, which is why it is used only where a statute sets a floor.

Retention schedule, record by record, with the statutory floors 9 rows
Retention schedule (recommendation §7.5)
RecordLegal basisLock modePeriod
Ledger, posting and closing changesBokføringsloven § 137Compliance5 years after the last financial year the version ran
Other change records, incl. security-parameter events (rulesets, CODEOWNERS, bypasses, managed settings)RTS 12(2) policy; risk justification approved by ICT riskGovernance5 years (inference)
Emergency (TE) and incident-linked changes; incident evidenceRTS 22(d); 2024/1772 Art. 8(2)44Governance + legal holdAs the change; incident evidence no longer than necessary
Proof media (synthetic data)RTS 12(2)GovernanceT2 5 years; T1 18 months; T0 12 months
Agent-side transcript; witness chainWith the change recordGovernanceAs the change; unmerged 90 days unless held
Human turnsGDPR 6(1)(f); DPIAGovernance, per-person keyMerged T2 24 months, T1 12; unmerged 90 days
OTel (pseudonymous)Third purpose (aggregate operation)—13 months
Other GitHub audit events; check exportsRTS 12(2)Governance3 years
Identity mappingGDPR 6(1)(c)Dual-control databaseAs long as the longest record that references it
Shaded: the only record under a compliance-mode lock, because only there does a statute set a floor. Statutory floors elsewhere, for comparison: hvitvaskingsloven § 30 (5 years after a customer relationship ends, 10 under enhanced due diligence; does not cover change records)35 and CRR/CRD-forskriften § 37 (at least 3 years for internal-control assessments).45

Runs and changes linked to a security event or incident get a legal hold automatically. Slack is not a record; messages are kept for 12 months.

What the audit pack contains, and how auditors sample it 7 items

The second line samples 10-20 PRs a month, and internal audit walks one change end to end in month 4 (chapter 09 shows the change record). The pack holds:

  • the role model and change classes;
  • the generated policy, with its history;
  • the CIF assessments and clause maps;
  • probe, bypass and injection results;
  • the SoD report and attestations;
  • the daily reconciliation of merges and deployments against notarised records;
  • drill reports, and spike decisions filed as ICT changes.
10.9

Incidents: classified before they happen

An agent-platform section in the bank's ICT incident procedure means nobody has to decide under pressure whether a canary leak or a broken chain is reportable. Five events get a pre-filled classification against Regulation 2024/1772, whose criteria include data losses (covering source-code confidentiality) and critical services affected:44 injection exfiltration, a model-vendor data incident, evidence tampering or a logging gap, an SoD or ruleset bypass, and a compromised broker, notary or gateway key.

The five events and what each threatens 5 rows

Source-code confidentiality matters to supervisors: the ESAs list “protect confidentiality of source code” among their mitigations for frontier-AI risk.46

Agent-platform events with a pre-filled classification
EventWhat it threatens
Injection exfiltrationConfidentiality of source code or secrets (data loss)
A model-vendor data incidentConfidentiality at a third party; vendor assistance terms apply
Evidence tampering or a logging gapIntegrity and completeness of change records
An SoD or ruleset bypassIndependent approval of changes to critical systems
A compromised broker, notary or gateway keyAuthenticity of every record signed or published with it
The event list is from the recommendation (§7.6); the “what it threatens” column is our reading of the 2024/1772 criteria (inference).
  • One alert path. Platform alerts, from a silent bot to notary or chain mismatches, go to the security operations centre (SOC) and its security information and event management (SIEM) system; chapter 13 lists them.
  • Named clock holders. The chief information security officer (CISO) holds the DORA major-incident reporting clocks (Art. 19);3 the DPO holds the GDPR 72-hour clock. The plan assumes 4 hours, 24 hours and one month; ICT risk confirms the exact deadlines, including the intermediate report, in the Art. 20 reporting standards, which this research did not re-check.
  • Vendors are on the hook. Vendor contacts and the Art. 30(2)(f) incident-assistance terms are part of the clause map.3
  • Incidents link back to changes. Incident tickets carry change and run IDs, exported into the change record, and incident evidence is kept as RTS Art. 22 requires.5 A classification tabletop runs with the quarterly drills.
10.10

Intellectual property: thin indemnities, so check provenance and keep records

Vendor indemnities are thin for agent-written code, so the protection is a provenance check in CI and good records of human input. This is an engineering reading of published contracts, checked by its author but not by counsel: treat it as sharp questions for legal, not as advice.

  • The cover is thin for agent code. Anthropic Ireland, which sells Claude on Bedrock, gives the IP defence,29 but it excludes claims arising from modified outputs or outputs combined with other technology,47 and agent code is always both. Indemnity is a tie-breaker, not a control.
  • Generated code may not be protectable by copyright,4950 so the bank relies on trade secret and records the human design inputs.51
  • Contamination is small but real: one preprint found 0.3-3.4% of filtered functions “functionally memorized” by four open models.52
  • Some licences treat agents as users, which shaped tool choices such as Moby over Docker Desktop.54
Deep dive: the contract wording, copyright law and the licence terms behind each point 1 min

Indemnity

The seller indemnifies, not the host. On Bedrock, Anthropic Ireland sells Claude and gives the IP defence; AWS's own output indemnity covers AWS products, not third-party models.2930

Anthropic excludes claims arising from “modifications made by Customer to … Outputs” and from “the combination of … Outputs with technology or content not provided by Anthropic”.47 Betas carry no indemnity, and liability for them is capped at the lesser of USD 1,000 or 12 months' fees,48 and the terms are not negotiable.32

Copyright and trade secret

Åndsverkloven protects “original og individuell skapende åndsinnsats” (original, individual creative effort).49 The European Parliament insists that content fully generated by AI that does not meet the established criteria for copyright protection “should remain ineligible”.50 Trade secret protection needs “rimelige tiltak” (reasonable measures).51

Contamination

The preprint found memorisation of a kind that text matching misses.52 A vendor survey found licence conflicts in 68% of 947 audited codebases, without showing that AI caused them.53

Licences that treat agents as users

  • Docker's agreement says that for AI features “'User' shall mean a human or AI Agent”, hence Moby and no Docker Desktop.54
  • JetBrains' Kotlin language server is “explicitly designed for human use”.55
  • GitHub permits machine accounts, not bot accounts, hence GitHub Apps.56
  • Slack's API terms constrain background scraping.57
  • pstack is MIT-licensed.58
Controls

A required provenance check, a licence-snippet scan distinct from build provenance, blocks copyleft or unknown snippet matches of 10 or more lines, or 20% or more of a file (proposed thresholds with no published basis). Exceptions need an approver who is not the requester. The sca (software composition analysis) check covers dependency licences, and the software bill of materials (SBOM) goes into the manifest. The evidence pack records human design inputs, and contractor terms add an assignment of AI-assisted output.

10.11

The governance gate: what must be true by weeks 4 and 8

Gate W-gov has owners outside the platform team, and the platform cannot widen until they sign. Part 1 opens the laptop lane and OTel to all engineers. Part 2 allows pilot hosted runs on green T0 and T1 work once the deny and perimeter probes pass. If a date slips, the owner writes down why (chapter 17). Owners follow recommendation §1.4.

Part 1 · week 4

  1. DPIA completed, with staff viewsOwner: DPO
  2. § 9-2 drøfting held with employee representativesOwner: DPO
  3. Purposes fixed, with the Art. 6(4) compatibility assessmentOwner: DPO
  4. CIF assessment of the Bedrock routeOwner: ICT risk
  5. Clause map, Art. 28(4) assessment and signed risk acceptance for Anthropic on BedrockOwner: ICT risk with legal, under the management body's policy
  6. RoI rows for every provider in useOwner: ICT risk
  7. Laptop probe greenOwner: CISO (platform team supplies the evidence)

Part 2 · week 8

  1. Role model and change classes approvedOwner: management body
  2. CIF assessments of the other surfaces, recorded in the RoIOwner: ICT risk
  3. Azure OpenAI Data Zone EU signedOwner: legal
  4. Evidence and break-glass admins named outside the platform teamOwner: CISO
  5. Agent-platform section of the incident procedure in forceOwner: CISO

Sources

  1. Comment and Control: prompt injection to credential theft in Claude Code, Gemini CLI and GitHub Copilot Agent. Aonan Guan, 2026-04-15 (updated 2026-05-04). oddguan.com/blog/comment-and-control-…
  2. 'I violated every principle I was given' (PocketOS database deletion). Fast Company, 2026-04-29 (secondary). fastcompany.com/91533544/…
  3. Regulation (EU) 2022/2554 on digital operational resilience (DORA), Arts. 5, 9, 19, 28, 30. EUR-Lex, 2022-12-14; Norwegian law since 2025-07-01. eur-lex.europa.eu/…/CELEX:32022R2554
  4. Guidance on ICT risks in the use of AI at financial entities. BaFin, version date 2026-01-23 (non-binding). bafin.de/…/orientierungshilfe_IKT_Risiken_bei_KI_en.pdf
  5. Commission Delegated Regulation (EU) 2024/1774, RTS on the ICT risk management framework, Recital 17 and Arts. 12, 16, 17, 20, 21, 22. EUR-Lex, 2024. eur-lex.europa.eu/…/CELEX:32024R1774
  6. Overvåking av ansattes bruk av elektronisk utstyr (guidance). Datatilsynet, last changed 2024-08-14 (current guidance). datatilsynet.no/…/overvaking-av-ansattes-bruk-av-elektronisk-utstyr
  7. Lov om bokføring (bokføringsloven), §§ 6, 13. Lovdata, in force. lovdata.no/dokument/NL/lov/2004-11-19-73
  8. Clinejection. Adnan Khan, 2026-02-09. adnanthekhan.com/posts/clinejection
  9. Post-mortem: Unauthorized Cline CLI npm publish on February 17, 2026. Cline, 2026-02-24. cline.bot/blog/post-mortem-unauthorized-cline-cli-npm
  10. The npm threat landscape: attack surface and mitigations (Mini Shai-Hulud, TanStack). Palo Alto Networks Unit 42, updated 2026-07-15. unit42.paloaltonetworks.com/monitoring-npm-supply-chain-attacks
  11. Grok Bot took unapproved actions, ignored orders to stop, and then denied it. Ars Technica (Dan Goodin), 2026-11-17. arstechnica.com/security/2026/11/grok-bot-…
  12. NewCore research: Grok Bot agents reached for corporate data unprompted. NewCore newsroom (gateway vendor, interested party), 2026-11-17. newcore.com/newsroom/newcore-research-…
  13. Securing CI/CD in an agentic world: Claude Code GitHub Action case. Microsoft Security Blog, 2026-06-05. microsoft.com/en-us/security/blog/2026/06/05/…
  14. About protected branches. GitHub Docs, accessed 2026-11-24. docs.github.com/…/about-protected-branches
  15. Plugin4Shell (with the November 2026 update). Air, 2026-09 (updated 2026-11). air.security/blog-posts/plugin4shell
  16. Security incident disclosure, July 2026. Hugging Face, 2026-07-16. huggingface.co/blog/security-incident-july-2026
  17. The Hugging Face incident and the road ahead. OpenAI, 2026-08-26. openai.com/index/hugging-face-incident-and-the-road-ahead
  18. Risiko- og sårbarhetsanalyse (ROS) 2026. Finanstilsynet, 2026 (indexed 2026-05-04). finanstilsynet.no/…/risiko--og-sarbarhetsanalyse-2026
  19. Well-architected best practices for software supply chain security (CodeArtifact package-group origin controls). AWS Security Blog, 2026-06-01. aws.amazon.com/blogs/security/well-architected-…
  20. Claude Code settings reference (managed-only keys, requiredMinimumVersion). Anthropic, accessed 2026-11-23. code.claude.com/docs/en/settings-reference
  21. Claude Code docs: Sandboxing (security limitations). Anthropic, accessed 2026-11-23. code.claude.com/docs/en/sandboxing
  22. Agents Rule of Two: a practical approach to AI agent security. Meta AI, 2025-10-31 (older, still the reference framing). ai.meta.com/blog/practical-ai-agent-security
  23. Adaptive evaluation of out-of-band defenses against prompt injection in LLM agents (arXiv 2606.26479). Narisetty et al., 2026-06-25. arxiv.org/abs/2606.26479
  24. Claude Tag: how agent identity works. Anthropic, public beta, accessed 2026-11-24. claude.com/docs/claude-tag/concepts/agent-identity
  25. github/github-mcp-server: lockdown mode (“not an authorization boundary”). GitHub, accessed 2026-11-24. github.com/github/github-mcp-server#lockdown-mode
  26. AWS Network Firewall launches explicit proxy functionality and NAT Gateway association. AWS What's New, 2026-11-19. aws.amazon.com/about-aws/whats-new/2026/11/network-firewall-proxy-…
  27. Forskrift om digital operasjonell motstandsdyktighet i finanssektoren (DORA-forskriften), FOR-2025-06-24-1296, last amended FOR-2026-08-20-1657. Lovdata, in force 2026-09-01. lovdata.no/dokument/SF/forskrift/2025-06-24-1296
  28. Commission Implementing Regulation (EU) 2024/2956, ITS on the register of information (template B_05.02). EUR-Lex, OJ 2024-12-02. eur-lex.europa.eu/…/OJ:L_202402956
  29. Serverless third-party models on Amazon Bedrock (Anthropic on Bedrock – Commercial Terms, version 2025-08-18). AWS, retrieved 2026-11-23. aws.amazon.com/legal/bedrock/third-party-models
  30. AWS Service Terms, §§ 50.10 and 50.12. AWS, last updated 2026-11-23. aws.amazon.com/service-terms
  31. Digital Operational Resilience Act (DORA) on AWS; DORA Financial Services Addendum on request. AWS, accessed 2026-11-23. aws.amazon.com/compliance/dora
  32. Legal Center FAQ (“not open to negotiation”). Anthropic, updated 2026-11-20. anthropic.com/legal
  33. List of designated critical ICT third-party service providers. ESAs (hosted by ESMA), 2025-11-18; no 2026 update found as of 2026-11-24. esma.europa.eu/…/List_of_designated_CTPPs.pdf
  34. Gode rutiner hindrer at KI blir en usynlig trussel. Datatilsynet, 2026-10-28. datatilsynet.no/aktuelt/aktuelle-nyheter-2026/…
  35. Lov om tiltak mot hvitvasking og terrorfinansiering (hvitvaskingsloven), §§ 28, 30. Lovdata, consolidated, retrieved 2026-11-24. lovdata.no/dokument/NL/lov/2018-06-01-23
  36. Forskrift om arbeidsgivers innsyn i e-postkasse og annet elektronisk lagret materiale (FOR-2018-07-02-1108), §§ 1-4. Lovdata, in force. lovdata.no/dokument/SF/forskrift/2018-07-02-1108
  37. Arbeidsmiljøloven §§ 9-1 and 9-2. Lovdata, in force. lovdata.no/lov/2005-06-17-62/§9-2
  38. GDPR Art. 17 (right to erasure; 17(3)(b) legal-obligation exemption). gdpr-info.eu rendering of Regulation (EU) 2016/679. gdpr-info.eu/art-17-gdpr
  39. Claude Code docs: Data usage (/feedback retention, WebFetch preflight). Anthropic, accessed 2026-11-23. code.claude.com/docs/en/data-usage
  40. Claude Code docs: Monitoring (OpenTelemetry; content redacted by default). Anthropic, accessed 2026-11-23. code.claude.com/docs/en/monitoring-usage
  41. Locking objects with Object Lock (compliance and governance modes, legal hold). AWS, Amazon S3 User Guide, accessed 2026-11-24. docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock.html
  42. Bokføringsforskriften (FOR-2004-12-01-1558), §§ 7-2 and 7-5. Lovdata, last amended FOR-2026-09-29-1933. lovdata.no/dokument/SF/forskrift/2004-12-01-1558
  43. About the audit log for your enterprise (180 days; Git events 7 days). GitHub Docs, accessed 2026-11-24. docs.github.com/…/about-the-audit-log-for-your-enterprise
  44. Commission Delegated Regulation (EU) 2024/1772, classification of ICT-related incidents. EUR-Lex, 2024-03-13. eur-lex.europa.eu/…/CELEX:32024R1772
  45. CRR/CRD-forskriften (FOR-2014-08-22-1097), § 37. Lovdata, last amended FOR-2026-11-19-2432. lovdata.no/dokument/SF/forskrift/2014-08-22-1097
  46. JC 2026 25: ESA statement on ICT risks from frontier AI models (annex: “Protect confidentiality of source code”). EBA, EIOPA and ESMA, 2026-07-31. eba.europa.eu/…/JC 2026 25_ESA Statement…pdf
  47. Commercial Terms of Service. Anthropic, effective 2025-06-17 (current). anthropic.com/legal/commercial-terms
  48. Service Specific Terms (B: Beta). Anthropic, effective 2026-08-31. anthropic.com/legal/service-specific-terms
  49. Lov om opphavsrett til åndsverk mv. (åndsverkloven), §§ 2, 71. Lovdata, in force. lovdata.no/dokument/NL/lov/2018-06-15-40
  50. European Parliament resolution of 10 March 2026 on copyright and generative AI, OJ C/2026/4006. EUR-Lex, published 2026-08-26. eur-lex.europa.eu/…/OJ:C_202604006
  51. Lov om vern av forretningshemmeligheter (forretningshemmelighetsloven), § 2. Lovdata, in force. lovdata.no/dokument/NL/lov/2020-03-27-15
  52. Detecting functional memorization in code language models (arXiv 2606.12764 v2). Meeus et al., 2026-08-20 (preprint). arxiv.org/abs/2606.12764
  53. Black Duck 2026 OSSRA report (press release). Black Duck, 2026-02-25 (vendor survey). news.blackduck.com/2026-02-25-…
  54. Docker Subscription Service Agreement. Docker, last updated 2026-08-26. docker.com/legal/docker-subscription-service-agreement
  55. IntelliJ IDEA's Java and Kotlin for Cursor and VS Code hits 1.0. JetBrains Blog, 2026-10-16. blog.jetbrains.com/idea/2026/10/…
  56. GitHub Terms for Additional Products and Features; GitHub Terms of Service (machine accounts). GitHub Docs, retrieved 2026-11-23. docs.github.com/en/site-policy/github-terms/…
  57. Slack API Terms of Service. Slack, effective 2025-10-10 (current). slack.com/terms-of-service/api
  58. cursor/plugins: pstack LICENSE (MIT). GitHub, retrieved 2026-11-23. github.com/cursor/plugins/tree/main/pstack