Improve CodeQL compliance and OpenSSF Scorecard posture#14
Merged
Conversation
- Add permissions: contents: read to smoke-metalman.yaml workflow - Add CodeQL inline suppressions for 6 false-positive/intentional alerts (insecure-hostkeycallback, zipslip, disabled-certificate-check, clear-text-storage-sensitive-data) - Create explicit CodeQL workflow (Go, Python, Actions) with SHA-pinned actions to satisfy OpenSSF Scorecard SAST check - Pin all Containerfile base images by digest for Scorecard Pinned-Dependencies check - Add .github/CODEOWNERS assigning @Azure/unbounded-dev as default owners
bcho
approved these changes
Apr 9, 2026
The repository already has CodeQL 'default setup' enabled in GitHub settings, which scans Go, Python, and Actions. An explicit workflow file cannot coexist with the default setup — GitHub rejects the SARIF upload with: 'CodeQL analyses from advanced configurations cannot be processed when the default setup is enabled.' The default setup already satisfies the OpenSSF Scorecard SAST check.
CodeQL default setup does not honor inline comment-based suppressions. The comments also caused CodeQL to see the alerts as 'new' on the PR since the line content changed. The 7 pre-existing alerts have been dismissed via the GitHub API instead.
plombardi89
approved these changes
Apr 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Resolves the 7 pre-existing CodeQL alerts blocking PR merges and improves OpenSSF Scorecard compliance across several checks.
Changes
Phase 1: Fix CodeQL Alerts (unblocks all PR merges)
actions/missing-workflow-permissionspermissions: contents: readtosmoke-metalman.yamlpy/clear-text-storage-sensitive-datae2e.py)go/insecure-hostkeycallbackmachine_controller.go)go/zipslipcleanedTarEntryName()already validates paths (download.go)go/disabled-certificate-checkInsecureSkipVerifyused withVerifyConnectionfor BMC cert pinning (redfish/client.go)Phase 2: CodeQL Workflow (Scorecard SAST check)
.github/workflows/codeql.yamlwith Go, Python, and Actions analysismain+ weekly schedulePhase 3: Scorecard Quick Wins
@sha256:...)mcr.microsoft.com/azurelinux/base/core:3.0(machina, metalman — builder + runtime stages)docker.io/library/golang:1.26(host-ubuntu2404)docker.io/library/debian:bookworm-slim(host-ubuntu2404)docker.io/library/ubuntu:noble(agent-ubuntu2404, agent-ubuntu2404-nvidia).github/CODEOWNERSassigning@Azure/unbounded-devas default ownersFiles Changed (12)
.github/CODEOWNERS— new.github/workflows/codeql.yaml— new.github/workflows/smoke-metalman.yaml— added permissions blockcmd/agent/internal/utilio/download.go— CodeQL suppressioncmd/machina/machina/controller/machine_controller.go— CodeQL suppressions (3 locations)hack/agent/e2e-kind/e2e.py— CodeQL suppressionimages/agent-ubuntu2404/Containerfile— digest pinimages/agent-ubuntu2404-nvidia/Containerfile— digest pinimages/host-ubuntu2404/Containerfile— digest pins (2 images)images/machina/Containerfile— digest pins (2 stages)images/metalman/Containerfile— digest pins (2 stages)internal/metalman/redfish/client.go— CodeQL suppressionVerification
make lint— passesmake test— passes