Skip to content

Commit 90ad7a3

Browse files
hardenglclaude
andcommitted
fix(cost-management): sanitize inputData before Orchestrator forwarding
Construct a clean inputData object with only known fields before forwarding to the Orchestrator, preventing extra injected fields from passing through to the workflow execution. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent dd86616 commit 90ad7a3

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

workspaces/cost-management/plugins/cost-management-backend/src/routes/applyRecommendation.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,16 @@ export const applyRecommendation: (options: RouterOptions) => RequestHandler =
142142
'Content-Type': 'application/json',
143143
Authorization: `Bearer ${token}`,
144144
},
145-
body: JSON.stringify({ inputData }),
145+
body: JSON.stringify({
146+
inputData: {
147+
clusterName: inputData.clusterName,
148+
resourceType: inputData.resourceType,
149+
resourceNamespace: inputData.resourceNamespace,
150+
resourceName: inputData.resourceName,
151+
containerName: inputData.containerName,
152+
containerResources: inputData.containerResources,
153+
},
154+
}),
146155
});
147156

148157
const contentType = upstreamResponse.headers.get('content-type') || '';

0 commit comments

Comments
 (0)