diff --git a/.github/workflows/golangci_lint.yaml b/.github/workflows/golangci_lint.yaml index fedfcff424..e9f18e16cb 100644 --- a/.github/workflows/golangci_lint.yaml +++ b/.github/workflows/golangci_lint.yaml @@ -16,5 +16,5 @@ jobs: with: github_token: ${{ secrets.GITHUB_TOKEN }} reporter: github-pr-check - golangci_lint_flags: "--timeout=120s" + golangci_lint_flags: "--timeout=240s" level: warning diff --git a/pkg/integration/trivy/analyzer.go b/pkg/integration/trivy/analyzer.go index 547575d7a3..8fdc78b63c 100644 --- a/pkg/integration/trivy/analyzer.go +++ b/pkg/integration/trivy/analyzer.go @@ -15,9 +15,10 @@ package trivy import ( "fmt" - ctrl "sigs.k8s.io/controller-runtime/pkg/client" "strings" + ctrl "sigs.k8s.io/controller-runtime/pkg/client" + "github.com/aquasecurity/trivy-operator/pkg/apis/aquasecurity/v1alpha1" "github.com/k8sgpt-ai/k8sgpt/pkg/common" "github.com/k8sgpt-ai/k8sgpt/pkg/util" @@ -59,8 +60,8 @@ func (TrivyAnalyzer) analyzeVulnerabilityReports(a common.Analyzer) ([]common.Re } } if len(failures) > 0 { - preAnalysis[fmt.Sprintf("%s/%s", report.Labels["trivy-operator.resource.namespace"], - report.Labels["trivy-operator.resource.name"])] = common.PreAnalysis{ + preAnalysis[fmt.Sprintf("%s/%s", report.Namespace, + report.Name)] = common.PreAnalysis{ TrivyVulnerabilityReport: report, FailureDetails: failures, } @@ -122,8 +123,8 @@ func (t TrivyAnalyzer) analyzeConfigAuditReports(a common.Analyzer) ([]common.Re } if len(failures) > 0 { - preAnalysis[fmt.Sprintf("%s/%s", report.Labels["trivy-operator.resource.namespace"], - report.Labels["trivy-operator.resource.name"])] = common.PreAnalysis{ + preAnalysis[fmt.Sprintf("%s/%s", report.Namespace, + report.Name)] = common.PreAnalysis{ TrivyConfigAuditReport: report, FailureDetails: failures, }