Skip to content

Commit

Permalink
chore(codeql): fix minor lint issues (#11460)
Browse files Browse the repository at this point in the history
These were flagged by CodeQL so getting them fixed

Signed-off-by: Charly Molter <charly.molter@konghq.com>
  • Loading branch information
lahabana authored Sep 19, 2024
1 parent 31e08d2 commit 16c5e83
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-test-distribute.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ jobs:
- name: "Download all SBOM assets"
id: collect_sbom
if: ${{ needs.build_publish.result == 'success' }}
uses: actions/download-artifact@v4
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
path: ${{ env.SECURITY_ASSETS_DOWNLOAD_PATH }}
pattern: "*sbom.{cyclonedx,spdx}.json"
Expand All @@ -151,7 +151,7 @@ jobs:
- name: "Download binary artifact provenance"
if: ${{ needs.provenance.result == 'success' && github.ref_type == 'tag' }}
id: collect_provenance
uses: actions/download-artifact@v4
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
path: ${{ env.SECURITY_ASSETS_DOWNLOAD_PATH }}
pattern: ${{ github.event.repository.name }}.intoto.jsonl
Expand Down
2 changes: 1 addition & 1 deletion app/kumactl/cmd/install/render_helm_files.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func labelRegex(label string) *regexp.Regexp {
var stripLabelsRegexps = []*regexp.Regexp{
labelRegex("app\\.kubernetes\\.io/managed-by"),
labelRegex("helm\\.sh/chart"),
labelRegex("app.kubernetes\\.io/version"),
labelRegex("app\\.kubernetes\\.io/version"),
}

var kumaSystemNamespace = func(namespace string) string {
Expand Down
8 changes: 4 additions & 4 deletions test/e2e_env/kubernetes/appprobeproxy/probe_proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ func ApplicationProbeProxy() {
container := getAppContainer(httpPod, httpAppName)
g.Expect(container).ToNot(BeNil())
g.Expect(container.ReadinessProbe.HTTPGet).ToNot(BeNil())
probeProxyPort, _ := strconv.Atoi(probeProxyPortAnno)
g.Expect(container.ReadinessProbe.HTTPGet.Port).To(Equal(intstr.FromInt32(int32(probeProxyPort)))) //nolint:gosec // we never overflow here
port := intstr.FromString(probeProxyPortAnno)
g.Expect(container.ReadinessProbe.HTTPGet.Port.IntValue()).To(Equal(port.IntValue()))
g.Expect(container.ReadinessProbe.HTTPGet.Path).To(Equal("/80/probes?type=readiness"))
}, "30s", "1s").Should(Succeed())

Expand Down Expand Up @@ -194,8 +194,8 @@ func ApplicationProbeProxy() {
g.Expect(container).ToNot(BeNil())
g.Expect(container.ReadinessProbe.HTTPGet).ToNot(BeNil())

port, _ := strconv.Atoi(virtualProbesPortAnno)
g.Expect(container.ReadinessProbe.HTTPGet.Port).To(Equal(intstr.FromInt32(int32(port)))) //nolint:gosec // we never overflow here
port := intstr.FromString(virtualProbesPortAnno)
g.Expect(container.ReadinessProbe.HTTPGet.Port.IntValue()).To(Equal(port.IntValue()))
g.Expect(container.ReadinessProbe.HTTPGet.Path).To(Equal("/80/probes?type=readiness"))
}, "30s", "1s").Should(Succeed())

Expand Down

0 comments on commit 16c5e83

Please sign in to comment.