Remove superseded history attribution paths
This commit is contained in:
@@ -15,7 +15,7 @@ func TestInheritanceSensitivityFollowsCopiesWithoutMaskingNeighbors(t *testing.T
|
||||
inspection, _ := inheritanceInspectionForTest(t, input)
|
||||
inspection.secrets = classifySecretPaths(nil, func(path Path) bool {
|
||||
return path.String() == classified.String()
|
||||
}, inspection.metadata, inspection.final, nil)
|
||||
}, inspection.metadata)
|
||||
for _, path := range []Path{Keys("parent", "token"), Keys("child", "token"), Keys("next", "token"), Keys("other", "token")} {
|
||||
explanation, found := inspection.Explain(path)
|
||||
if !found || !explanation.Effective.Redacted || strings.Contains(explanation.Effective.YAML, canary) {
|
||||
@@ -44,7 +44,7 @@ func TestInheritanceSensitivityPreservesDisplacedHistoryAndControl(t *testing.T)
|
||||
inspection, _ := inheritanceInspectionForTest(t, parseCompositionDocument(t, "source-1", "parent: {branch: {token: "+canary+"}}\nchild: {extends: parent, branch: public}\n"))
|
||||
inspection.secrets = classifySecretPaths(nil, func(path Path) bool {
|
||||
return path.String() == Keys("parent", "branch", "token").String() || path.String() == Keys("child", inheritanceKey).String()
|
||||
}, inspection.metadata, inspection.final, nil)
|
||||
}, inspection.metadata)
|
||||
path := Keys("child", "branch", "token")
|
||||
explanation, found := inspection.Explain(path)
|
||||
if !found || explanation.Effective.Present {
|
||||
@@ -85,7 +85,7 @@ func TestInheritanceSensitivityIncludesSchemaTaggedSource(t *testing.T) {
|
||||
t.Fatal(issue)
|
||||
}
|
||||
inspection, _ := inheritanceInspectionForTest(t, parseCompositionDocument(t, "source-1", "parent: {token: TAGGED-CANARY}\nchild: {extends: parent}\n"))
|
||||
inspection.secrets = classifySecretPaths(schema, nil, inspection.metadata, inspection.final, nil)
|
||||
inspection.secrets = classifySecretPaths(schema, nil, inspection.metadata)
|
||||
child, found := inspection.Explain(Keys("child", "token"))
|
||||
if !found || !child.Effective.Redacted || strings.Contains(child.Effective.YAML, "TAGGED-CANARY") {
|
||||
t.Fatalf("tagged source copy = %#v, %v", child, found)
|
||||
@@ -104,7 +104,7 @@ func TestSourceVersionEvidenceSensitivityFollowsInheritanceAndDisplacedHistory(t
|
||||
}
|
||||
inspection.secrets = classifySecretPathsWithEvidence(nil, func(path Path) bool {
|
||||
return path.String() == secretPath.String()
|
||||
}, inspection.metadata, inspection.final, nil, []*sourceVersionEvidence{evidence})
|
||||
}, inspection.metadata, []*sourceVersionEvidence{evidence})
|
||||
|
||||
path := Keys("child", "branch", "token")
|
||||
explanation, found := inspection.Explain(path)
|
||||
@@ -162,7 +162,7 @@ func TestInheritedSecretReferencesResolveOnlyAfterExpansion(t *testing.T) {
|
||||
t.Fatalf("inherited reference resolution = %#v, %d", resolved.diagnostics, lookupCount)
|
||||
}
|
||||
inspection, _ := inheritanceInspectionFromComposition(t, composed)
|
||||
inspection.secrets = classifySecretPaths(schema, nil, inspection.metadata, inspection.final, nil)
|
||||
inspection.secrets = classifySecretPaths(schema, nil, inspection.metadata)
|
||||
var rendered bytes.Buffer
|
||||
if err := inspection.WriteEffective(&rendered); err != nil || strings.Contains(rendered.String(), "RESOLVED-CREDENTIAL-CANARY") {
|
||||
t.Fatalf("reference rendering = %q, %v", rendered.String(), err)
|
||||
|
||||
Reference in New Issue
Block a user