Repository navigation
Commit a9cf96d
committed
Seal workflow secrets across agent and sub-workflow handoffs
A secret resolved into an agent.run goal or a flow.subworkflow input
left the scope that knew it was a secret. The engine persisted the
suspend payload, the agent's task_jsonb and the child's request payload
in plaintext, and Viewers read them back as the pending wait, the agent
goal and the child's NormalizedPayload. The agent run's redactor never
knew the value, so every echo froze into its events, native records,
result and the critic's capture. The child built SecretPaths from its
own rows only, so a parent wf/project secret leaked through the child's
ledger, outputs and Terminal guard.
The suspend wait row is now masked with the node scope's secrets for
every wait kind. A task or child payload handed to another run is
sealed: the public column holds the masked copy, and the exact copy plus
the secret values it embeds is encrypted with the existing
sensitive-payload protector (0247 adds the two nullable ciphertext
columns). The executor and the child's scope build open the exact copy,
so the platform never runs on a mask. The executor folds the values into
its redactor inside the credential resolve, so launch, re-attach and the
re-opened MCP endpoint rebuild the same fingerprint. The critic scope
gets a capture redactor. A child keeps the inherited values as secrets
and taints the trigger/input keys that carry them, so its records,
derived scopes, map snapshots and Terminal guard treat them like its
own. Tasks created inside a node scope (supervisor spawns, plan
reviewers) are sealed from the ambient capture redactor, and a review
child inherits its producer's secrets. The supervisor's work-plan goal
is masked the same way.
The run's verdicts on that work carried the value back out. The output
critic is shown the exact goal, and a model restates the task it
judges, so its rationale, issues and critique are masked with the
task's secrets before the executor writes them into the review.completed
beat, the flagged warning and the result's reviewFeedback. An
acceptance argv that resolves a secret runs exactly, but the grade's
evidence repeats the argv and both output tails into a team artifact a
Viewer can download and onto the result. Every executor grade request
now carries the task's secrets, and the grader masks the evidence, its
tail, the oracle note and the detail before anything is stored.
Rows written before this change carry no ciphertext and keep executing
from their public columns, so in-flight waits, agent runs and child
runs resume unchanged, and their redactor fingerprints still match.
Those rows also keep any plaintext they already hold. A worker on the
previous build does not know the sealed columns and would run a sealed
child or agent from its masked public copy, so old engine and executor
workers must be drained before new ones stage work.1 parent 984c720 commit a9cf96d
42 files changed
Lines changed: 2320 additions & 59 deletions
File tree
- backend
- src
- CodeSpace.Core
- Persistence
- DbUpFiles
- Entities
- EntityConfigurations
- Services
- Agents
- Workspace
- Supervisor
- Executors
- Workflows
- Engine
- Nodes/Builtin
- RunSources
- Runtime
- CodeSpace.Messages
- Agents
- Workflows
- tests
- CodeSpace.E2ETests/Workflows
- CodeSpace.IntegrationTests
- Agents
- Infrastructure
- Workflows
- Infrastructure
- CodeSpace.UnitTests
- Agents
- Supervisor
- Workflows
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
64 | 71 | | |
65 | 72 | | |
66 | 73 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
90 | 97 | | |
91 | 98 | | |
92 | 99 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
0 commit comments