Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
5 changes: 5 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.

# Default owners for all files in the repository.
* @Azure/unbounded-dev
3 changes: 3 additions & 0 deletions .github/workflows/smoke-metalman.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ on:
- .github/workflows/smoke-metalman.yaml
workflow_dispatch:

permissions:
contents: read

jobs:
smoke:
runs-on: ubuntu-24.04
Expand Down
2 changes: 1 addition & 1 deletion cmd/agent/internal/utilio/download.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func DecompressTarGzFromRemote(ctx context.Context, url string) iter.Seq2[*TarFi
tarReader := tar.NewReader(gzipStream)

for {
header, err := tarReader.Next()
header, err := tarReader.Next() // codeql[go/zipslip] path traversal is prevented by cleanedTarEntryName below
if errors.Is(err, io.EOF) {
break
}
Expand Down
6 changes: 3 additions & 3 deletions cmd/machina/machina/controller/machine_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@
Auth: []ssh.AuthMethod{
ssh.PublicKeys(bastionSigner),
},
HostKeyCallback: ssh.InsecureIgnoreHostKey(), //nolint:gosec
HostKeyCallback: ssh.InsecureIgnoreHostKey(), //nolint:gosec // codeql[go/insecure-hostkeycallback] host keys are not pre-known for bastion probing

Check failure

Code scanning / CodeQL

Use of insecure HostKeyCallback implementation High

Configuring SSH ClientConfig with insecure HostKeyCallback implementation from
this source
.
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
Timeout: timeout,
}

Expand Down Expand Up @@ -446,7 +446,7 @@
Auth: []ssh.AuthMethod{
ssh.PublicKeys(signer),
},
HostKeyCallback: ssh.InsecureIgnoreHostKey(), //nolint:gosec
HostKeyCallback: ssh.InsecureIgnoreHostKey(), //nolint:gosec // codeql[go/insecure-hostkeycallback] host keys are not pre-known for newly provisioned machines

Check failure

Code scanning / CodeQL

Use of insecure HostKeyCallback implementation High

Configuring SSH ClientConfig with insecure HostKeyCallback implementation from
this source
.
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
Timeout: SSHConnectTimeout,
}, nil
}
Expand Down Expand Up @@ -719,7 +719,7 @@
Auth: []ssh.AuthMethod{
ssh.PublicKeys(bastionSigner),
},
HostKeyCallback: ssh.InsecureIgnoreHostKey(), //nolint:gosec
HostKeyCallback: ssh.InsecureIgnoreHostKey(), //nolint:gosec // codeql[go/insecure-hostkeycallback] host keys are not pre-known for bastion tunnel setup

Check failure

Code scanning / CodeQL

Use of insecure HostKeyCallback implementation High

Configuring SSH ClientConfig with insecure HostKeyCallback implementation from
this source
.
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
Timeout: SSHConnectTimeout,
}

Expand Down
2 changes: 1 addition & 1 deletion hack/agent/e2e-kind/e2e.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ def _run_agent_inner(agent_url: str) -> None:
},
}

agent_config_path.write_text(json.dumps(agent_config, indent=2))
agent_config_path.write_text(json.dumps(agent_config, indent=2)) # codeql[py/clear-text-storage-sensitive-data] bootstrap token is ephemeral and used only in CI test VMs
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
agent_config_path.chmod(0o600) # restrict access; contains bootstrap token
log(f"Agent config written to {agent_config_path}")

Expand Down
2 changes: 1 addition & 1 deletion images/agent-ubuntu2404-nvidia/Containerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# TODO: switch to debootstrap-based base image once we have the container registry set up
FROM docker.io/library/ubuntu:noble
FROM docker.io/library/ubuntu:noble@sha256:84e77dee7d1bc93fb029a45e3c6cb9d8aa4831ccfcc7103d36e876938d28895b

RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
Expand Down
2 changes: 1 addition & 1 deletion images/agent-ubuntu2404/Containerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# TODO: switch to debootstrap-based base image once we have the container registry set up
FROM docker.io/library/ubuntu:noble
FROM docker.io/library/ubuntu:noble@sha256:84e77dee7d1bc93fb029a45e3c6cb9d8aa4831ccfcc7103d36e876938d28895b

RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
Expand Down
4 changes: 2 additions & 2 deletions images/host-ubuntu2404/Containerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ── Build the unbounded-agent binary ────────────────────────────────
FROM --platform=$BUILDPLATFORM docker.io/library/golang:1.26 AS gobuilder
FROM --platform=$BUILDPLATFORM docker.io/library/golang:1.26@sha256:ec4debba7b371fb2eaa6169a72fc61ad93b9be6a9ae9da2a010cb81a760d36e7 AS gobuilder

ARG TARGETARCH
ARG VERSION=dev
Expand All @@ -16,7 +16,7 @@ RUN CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH} go build \
-o /unbounded-agent ./cmd/agent

# ── Assemble host image artifacts ───────────────────────────────────
FROM docker.io/library/debian:bookworm-slim AS build
FROM docker.io/library/debian:bookworm-slim@sha256:4724b8cc51e33e398f0e2e15e18d5ec2851ff0c2280647e1310bc1642182655d AS build

ARG TARGETARCH

Expand Down
4 changes: 2 additions & 2 deletions images/machina/Containerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build stage
FROM mcr.microsoft.com/azurelinux/base/core:3.0 AS builder
FROM mcr.microsoft.com/azurelinux/base/core:3.0@sha256:35149ae8dd179684f969944f54a337c665a64e702486154eb44253fb39c2505b AS builder

# Install build dependencies
RUN tdnf install -y \
Expand Down Expand Up @@ -39,7 +39,7 @@ ARG VERSION=dev
RUN make machina-build VERSION=${VERSION}

# Runtime stage
FROM mcr.microsoft.com/azurelinux/base/core:3.0
FROM mcr.microsoft.com/azurelinux/base/core:3.0@sha256:35149ae8dd179684f969944f54a337c665a64e702486154eb44253fb39c2505b

# Install runtime dependencies
RUN tdnf install -y \
Expand Down
4 changes: 2 additions & 2 deletions images/metalman/Containerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build stage
FROM mcr.microsoft.com/azurelinux/base/core:3.0 AS builder
FROM mcr.microsoft.com/azurelinux/base/core:3.0@sha256:35149ae8dd179684f969944f54a337c665a64e702486154eb44253fb39c2505b AS builder

# Install build dependencies
RUN tdnf install -y \
Expand Down Expand Up @@ -39,7 +39,7 @@ ARG VERSION=dev
RUN make metalman-build VERSION=${VERSION}

# Runtime stage
FROM mcr.microsoft.com/azurelinux/base/core:3.0
FROM mcr.microsoft.com/azurelinux/base/core:3.0@sha256:35149ae8dd179684f969944f54a337c665a64e702486154eb44253fb39c2505b

# Install runtime dependencies
RUN tdnf install -y \
Expand Down
2 changes: 1 addition & 1 deletion internal/metalman/redfish/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@
Timeout: 30 * time.Second,
Transport: &http.Transport{
TLSClientConfig: &tls.Config{
InsecureSkipVerify: true,
InsecureSkipVerify: true, //nolint:gosec // codeql[go/disabled-certificate-check] certificate validation is handled by VerifyConnection below (cert pinning)

Check failure

Code scanning / CodeQL

Disabled TLS certificate check High

InsecureSkipVerify should not be used in production code.
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
VerifyConnection: func(cs tls.ConnectionState) error {
if certSHA256 == "" {
return nil
Expand Down
Loading