Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the dnsmasq-controller binary
FROM golang:1.22 as builder
FROM golang:1.22.7 AS builder

WORKDIR /workspace
# Copy the Go Modules manifests
Expand All @@ -18,12 +18,11 @@ COPY pkg/ pkg/
# Build
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o dnsmasq-controller


# Load distroless base to get initial passwd/group files
FROM gcr.io/distroless/static-debian12:latest as app
FROM gcr.io/distroless/static-debian12:latest AS app

# Install dnsmasq
FROM alpine:3.19.1 as dnsmasq
FROM alpine:3.19.1 AS dnsmasq
# Use distroless passwd/group
COPY --from=app /etc/passwd /etc/passwd
COPY --from=app /etc/group /etc/group
Expand Down
10 changes: 8 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,17 @@ module github.com/kvaps/dnsmasq-controller
go 1.13

require (
github.com/Azure/go-autorest/autorest v0.11.29 // indirect
github.com/Azure/go-autorest/autorest/adal v0.9.24 // indirect
Comment on lines +6 to +7
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Azure dependencies are not directly used in the project.

No direct imports or mentions of Azure packages were found. Consider removing the following dependencies to keep the project lean:

  1. github.com/Azure/go-autorest/autorest v0.11.29
  2. github.com/Azure/go-autorest/autorest/adal v0.9.24
🔗 Analysis chain

Verify the necessity of new Azure dependencies.

New indirect dependencies related to Azure have been added. While these address potential vulnerabilities, it's important to confirm if they are necessary for the project.

  1. github.com/Azure/go-autorest/autorest v0.11.29
  2. github.com/Azure/go-autorest/autorest/adal v0.9.24

Please run the following script to check for any direct usage of these packages in the project:

If no usage is found, consider removing these dependencies to keep the project lean.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for direct usage of Azure packages in the project

# Test: Search for import statements using Azure packages
echo "Searching for direct imports of Azure packages:"
rg --type go 'import\s+\(\s*\n.*?github\.com/Azure/go-autorest' || echo "No direct imports found."

# Test: Search for any mention of Azure packages in go files
echo -e "\nSearching for any mention of Azure packages:"
rg --type go 'github\.com/Azure/go-autorest' || echo "No mentions found."

Length of output: 620


Script:

#!/bin/bash
# Description: Check for direct usage of Azure packages in the project with corrected regex

# Test: Search for import statements using Azure packages with multiline support
echo "Searching for direct imports of Azure packages:"
rg --multiline --type go 'import\s+\(\s*\n.*github\.com/Azure/go-autorest' || echo "No direct imports found."

# Test: Search for any mention of Azure packages in go files
echo -e "\nSearching for any mention of Azure packages:"
rg --type go 'github\.com/Azure/go-autorest' || echo "No mentions found."

Length of output: 439

github.com/go-logr/logr v0.1.0
github.com/gogo/protobuf v1.3.2 // indirect
github.com/onsi/ginkgo v1.11.0
github.com/onsi/gomega v1.8.1
github.com/prometheus/client_golang v1.11.1 // indirect
go.uber.org/zap v1.10.0
k8s.io/apimachinery v0.17.2
k8s.io/client-go v0.17.2
golang.org/x/crypto v0.28.0 // indirect
google.golang.org/protobuf v1.33.0 // indirect
k8s.io/apimachinery v0.17.16
k8s.io/client-go v0.17.16
sigs.k8s.io/controller-runtime v0.5.0
)
Loading