Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions server/src/__tests__/issues-goal-context-routes.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -736,6 +736,13 @@ describe.sequential("issue goal context routes", () => {
// Structure and names survive so the config stays legible; values do not.
expect(runtime.services[0].name).toBe("api");
expect(Object.keys(runtime.services[0])).toEqual(["name", "command", "GRAFANA_API_TOKEN"]);
// PEN-3130. `command` is pinned by VALUE, not merely by its presence in the key
// set above. A projection edit that re-attached the operator-authored command
// line after masking — "keep the command legible in the UI" — leaves that key set
// byte-identical, keeps the token redacted, and keeps the `not.toContain` guard
// green (this fixture's secret lives in the token, not the command). Without this
// line nothing at this boundary would see it.
expect(runtime.services[0].command).toBe("***REDACTED***");
expect(runtime.services[0].GRAFANA_API_TOKEN).toBe("***REDACTED***");
});
}
Expand Down Expand Up @@ -800,6 +807,10 @@ describe.sequential("issue goal context routes", () => {
// Names and structure survive so the config stays legible; values do not.
expect(Object.keys(runtime.services[0])).toEqual(["name", "command", "DEPLOY_TOKEN"]);
expect(runtime.services[0].name).toBe("web");
// PEN-3130, same reasoning as the execution-workspace door above: pinned by
// value so a command-only pass-through at this projection cannot hide behind
// an unchanged key set and a still-redacted token.
expect(runtime.services[0].command).toBe("***REDACTED***");
expect(runtime.services[0].DEPLOY_TOKEN).toBe("***REDACTED***");
// `desiredState` is enum-validated by the reader, so it must NOT be
// masked — this pins the fix to the open field instead of the whole object.
Expand Down