Skip to content

Commit 67ae9ab

Browse files
jpinzCopilot
andcommitted
Address more copilot comments.
Co-authored-by: Copilot <copilot@github.com>
1 parent 26dfe9e commit 67ae9ab

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/Microsoft.ComponentDetection.Detectors/helm/HelmComponentDetector.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ protected override async Task OnFileFoundAsync(ProcessRequest processRequest, ID
7070
var file = processRequest.ComponentStream;
7171

7272
// OnPrepareDetectionAsync has already filtered to values files co-located
73-
// with a Chart.yaml — no further filename/directory checks are needed.
73+
// with a Helm chart file (Chart.yaml or Chart.yml), so no further
74+
// filename/directory checks are needed.
7475
try
7576
{
7677
this.Logger.LogInformation("Discovered Helm values file: {Location}", file.Location);
@@ -140,7 +141,7 @@ private void WalkYamlForImages(YamlMappingNode mapping, ISingleFileComponentReco
140141
{
141142
// image: nginx:1.21
142143
case YamlScalarNode scalarValue when !string.IsNullOrWhiteSpace(scalarValue.Value):
143-
DockerReferenceUtility.TryRegisterImageReference(scalarValue.Value, recorder);
144+
DockerReferenceUtility.TryRegisterImageReference(scalarValue.Value, recorder, this.Logger);
144145
break;
145146

146147
// image:
@@ -220,6 +221,6 @@ private void TryRegisterStructuredImageReference(YamlMappingNode imageMapping, I
220221
imageRef = $"{imageRef}@{digest}";
221222
}
222223

223-
DockerReferenceUtility.TryRegisterImageReference(imageRef, recorder);
224+
DockerReferenceUtility.TryRegisterImageReference(imageRef, recorder, this.Logger);
224225
}
225226
}

0 commit comments

Comments
 (0)