Withhold unsafe recipe sources from idea job results
Cook from what I have and Quick dinners ideas returned the grounded recipe's raw source_url and site_name, so a link carrying a token in its query or userinfo, or a stored name taken from its host, reached the client in the job response (BASE-01). dinners.SourceOf is now the one way a fetched recipe's source reaches a client: the dinner detail and both idea result builders use it. An idea's source_url and site_name are null when they could leak a secret, and a source that does not parse fails the job instead of being shown. Task: c15ed4b5-25ae-43c6-8d36-f4a6dd51e5af Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -369,7 +369,7 @@ func TestStartQuickRunsTheJob(t *testing.T) {
|
||||
if res.Stage != StageDone || res.Kind != skills.QuickCrockpot || !reflect.DeepEqual(res.Exclude, []string{"Beef Stew"}) || len(res.Ideas) != 1 {
|
||||
t.Fatalf("result = %+v", res)
|
||||
}
|
||||
if got := res.Ideas[0]; got.Name != "Pulled Pork" || got.Method != "crockpot" || got.SiteName != "R Kitchen" {
|
||||
if got := res.Ideas[0]; got.Name != "Pulled Pork" || got.Method != "crockpot" || got.SiteName == nil || *got.SiteName != "R Kitchen" {
|
||||
t.Errorf("idea = %+v", got)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user