mirror of
https://github.com/dsx-ai-factory/nvke.git
synced 2026-12-07 04:35:58 +08:00
Bumps the github-actions group with 9 updates in the / directory: | Package | From | To | | --- | --- | --- | | [actions/setup-go](https://github.com/actions/setup-go) | `7.0.0` | `7.1.0` | | [oras-project/setup-oras](https://github.com/oras-project/setup-oras) | `2.0.3` | `2.0.4` | | [github/codeql-action/init](https://github.com/github/codeql-action) | `4.39.3` | `4.39.4` | | [github/codeql-action/analyze](https://github.com/github/codeql-action) | `4.39.3` | `4.39.4` | | [actions/dependency-review-action](https://github.com/actions/dependency-review-action) | `5.0.0` | `5.0.1` | | [github/codeql-action/upload-sarif](https://github.com/github/codeql-action) | `4.39.3` | `4.39.4` | | [actions/create-github-app-token](https://github.com/actions/create-github-app-token) | `3.3.0` | `3.4.0` | | [amannn/action-semantic-pull-request](https://github.com/amannn/action-semantic-pull-request) | `6.1.2` | `6.1.3` | | [ossf/scorecard-action](https://github.com/ossf/scorecard-action) | `2.5.0` | `2.6.0` | Bumps the github-actions group with 1 update in the /.github/actions/malware-scan directory: [github/codeql-action/upload-sarif](https://github.com/github/codeql-action). Updates `actions/setup-go` from 7.0.0 to 7.1.0 - [Release notes](https://github.com/actions/setup-go/releases) - [Commits](https://github.com/actions/setup-go/compare/b7ad1dad31e06c5925ef5d2fc7ad053ef454303e...d8cbb8045d7f43706b9177cceb36c1f91a6644d5) Updates `oras-project/setup-oras` from 2.0.3 to 2.0.4 - [Release notes](https://github.com/oras-project/setup-oras/releases) - [Commits](https://github.com/oras-project/setup-oras/compare/5e2f2482b30b0cb3e14e67f89a80c88c659a7c63...ac735097e22fe643015b0d19645f7c9a69942128) Updates `github/codeql-action/init` from 4.39.3 to 4.39.4 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/33d7b85da1a04171e211befe2c739303b9a4c066...1bd86f2fdb4b86187fa4059f16f31a3202acc9ea) Updates `github/codeql-action/analyze` from 4.39.3 to 4.39.4 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/33d7b85da1a04171e211befe2c739303b9a4c066...1bd86f2fdb4b86187fa4059f16f31a3202acc9ea) Updates `actions/dependency-review-action` from 5.0.0 to 5.0.1 - [Release notes](https://github.com/actions/dependency-review-action/releases) - [Commits](https://github.com/actions/dependency-review-action/compare/a1d282b36b6f3519aa1f3fc636f609c47dddb294...bbc44d14a204704ccc493733616cd1e93a0321ec) Updates `github/codeql-action/upload-sarif` from 4.39.3 to 4.39.4 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/33d7b85da1a04171e211befe2c739303b9a4c066...1bd86f2fdb4b86187fa4059f16f31a3202acc9ea) Updates `actions/create-github-app-token` from 3.3.0 to 3.4.0 - [Release notes](https://github.com/actions/create-github-app-token/releases) - [Changelog](https://github.com/actions/create-github-app-token/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/create-github-app-token/compare/64ab729a6294000f5aa4a4bc0b73d1f32bc45510...f418cff399f7aef4c2f0ad47e25ca7a6abbdd6fc) Updates `amannn/action-semantic-pull-request` from 6.1.2 to 6.1.3 - [Release notes](https://github.com/amannn/action-semantic-pull-request/releases) - [Changelog](https://github.com/amannn/action-semantic-pull-request/blob/main/CHANGELOG.md) - [Commits](https://github.com/amannn/action-semantic-pull-request/compare/2252a14e810aa9b85c2d560bd7070c802206ecf6...c5e23b7e584519ee15caa684cf60d056aa9f035f) Updates `ossf/scorecard-action` from 2.5.0 to 2.6.0 - [Release notes](https://github.com/ossf/scorecard-action/releases) - [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md) - [Commits](https://github.com/ossf/scorecard-action/compare/fa7117db83c52d787ae5a89f350999701505d78e...23f22cd43608bae7a1f1fa2603d7314dee9538a5) Updates `github/codeql-action/upload-sarif` from 4.39.3 to 4.39.4 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/33d7b85da1a04171e211befe2c739303b9a4c066...1bd86f2fdb4b86187fa4059f16f31a3202acc9ea) --- updated-dependencies: - dependency-name: actions/setup-go dependency-version: 7.1.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions - dependency-name: oras-project/setup-oras dependency-version: 2.0.4 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: github/codeql-action/init dependency-version: 4.39.4 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: github/codeql-action/analyze dependency-version: 4.39.4 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: actions/dependency-review-action dependency-version: 5.0.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: github/codeql-action/upload-sarif dependency-version: 4.39.4 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: actions/create-github-app-token dependency-version: 3.4.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions - dependency-name: amannn/action-semantic-pull-request dependency-version: 6.1.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: ossf/scorecard-action dependency-version: 2.6.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions - dependency-name: github/codeql-action/upload-sarif dependency-version: 4.39.4 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
191 lines
8.4 KiB
YAML
191 lines
8.4 KiB
YAML
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
# CodeQL static analysis. Results go to Security -> Code scanning.
|
|
#
|
|
# Three languages, one job per language via a matrix: go, javascript-typescript
|
|
# and actions. Only go needs a traced build; the other two extract from source.
|
|
#
|
|
# `build-mode: manual` because CodeQL has to observe a real compile to build its
|
|
# database. Whatever the build step compiles is what gets analysed, and nothing
|
|
# else -- so the scope of this workflow is set by that one command.
|
|
#
|
|
# It used to compile agent/ alone, because controller/ required the carbide SDK
|
|
# and could not build on a public runner. #76 replaced that SDK with the public
|
|
# ncx-infra-controller-rest, so the whole workspace builds from public
|
|
# dependencies now, and the build step is `make build` -- which compiles every
|
|
# package in all ten modules.
|
|
#
|
|
# One database rather than a matrix, deliberately. CodeQL produces a single
|
|
# database per run and uploads it under one category, so a matrix would need a
|
|
# category per module and would analyse shared code once per module that imports
|
|
# it. A single traced build covers the same code once.
|
|
#
|
|
# The workspace stays ON, where this file previously set GOWORK=off. That is
|
|
# what makes the build reproducible: go.sum pins the public modules, which are
|
|
# downloaded into the Go cache as needed. It is also why go-version is pinned
|
|
# rather than read from a go.mod -- see the comment on that step.
|
|
|
|
name: CodeQL
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- "pull-request/[0-9]+"
|
|
# Dependabot branches are mirrored to neither main nor
|
|
# pull-request/N, so without this line a dependency bump gets none
|
|
# of this check -- and a check that cannot report on a pull request
|
|
# cannot be required. Same list as notices-check.yml.
|
|
- "dependabot/**"
|
|
schedule:
|
|
- cron: '0 6 * * 1'
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
# The sha is part of the group on main, so every commit gets its own.
|
|
# Without it, back-to-back merges lose CI results: GitHub allows one
|
|
# running and one pending run per group, and cancels the pending one
|
|
# when a third arrives -- whatever cancel-in-progress says, because that
|
|
# setting only protects a run that has already started. Five merges in
|
|
# three minutes cancelled 18 runs across 7 workflows this way, leaving
|
|
# three consecutive commits on main with no test result at all.
|
|
#
|
|
# Pull-request branches keep sharing a group and still cancel, which is
|
|
# what you want there.
|
|
# A literal name, NOT ${{ github.workflow }}. Inside a called workflow that
|
|
# expression is the CALLER's name, so any workflow merge-gate.yml calls would
|
|
# share a group with its siblings and cancel them. 8 of 9 calls died that way,
|
|
# reported as failures with no jobs and no error message.
|
|
group: CodeQL-${{ github.ref }}-${{ github.ref == 'refs/heads/main' && github.sha || '' }}
|
|
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
|
|
|
|
jobs:
|
|
analyze:
|
|
name: Analyze ${{ matrix.language }}
|
|
runs-on: linux-amd64-cpu16
|
|
if: github.repository_id == '1323115536'
|
|
timeout-minutes: 60
|
|
permissions:
|
|
contents: read
|
|
actions: read
|
|
security-events: write
|
|
# A matrix over LANGUAGES, which is not the matrix the note at the top of
|
|
# this file argues against -- that one is about modules, and the Go build
|
|
# below still analyses all ten in a single traced pass. CodeQL produces
|
|
# one database per language and uploads each under its own category, so a
|
|
# language axis is the shape it expects.
|
|
#
|
|
# Only Go needs a build. javascript-typescript and actions are extracted
|
|
# from source, so they take build-mode: none and skip the Go setup below.
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- language: go
|
|
build-mode: manual
|
|
# controller/ui ships into the image at /ui (controller/Dockerfile:76),
|
|
# so this is analysed code, not developer tooling.
|
|
- language: javascript-typescript
|
|
build-mode: none
|
|
# The workflows themselves. One of them runs on pull_request_target.
|
|
- language: actions
|
|
build-mode: none
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
persist-credentials: false
|
|
|
|
# Read the pin from make/versions.mk rather than repeating it here. It was
|
|
# written in this file and in codeql.yml and nowhere a developer could
|
|
# reach it, so `make govulncheck` locally could not match this job.
|
|
- name: Read pinned Go version
|
|
id: versions
|
|
run: echo "go=$(make --no-print-directory print-GOVULNCHECK_GO_VERSION)" >> "$GITHUB_OUTPUT"
|
|
|
|
- uses: actions/setup-go@d8cbb8045d7f43706b9177cceb36c1f91a6644d5 # v7.1.0
|
|
if: matrix.language == 'go'
|
|
with:
|
|
# Pin the version the Dockerfiles build with. Not go-version-file: a
|
|
# go directive is a floor, so it installs the oldest Go a module
|
|
# allows -- and these eight floors range from 1.25.4 to 1.26.5, while
|
|
# go.work asks for 1.26.5. setup-go pins GOTOOLCHAIN=local, so reading
|
|
# agent/go.mod (1.26.0) would fail outright against the workspace:
|
|
#
|
|
# go: go.work requires go >= 1.26.5
|
|
# (running go 1.26.0; GOTOOLCHAIN=local)
|
|
#
|
|
# Not `stable` either: setup-go resolves it from GitHub's manifest,
|
|
# which lags upstream Go. Keep this in step with the Dockerfiles.
|
|
go-version: ${{ steps.versions.outputs.go }}
|
|
cache: true
|
|
# go.work.sum holds only the hashes NOT already in a member's go.sum,
|
|
# so the versions actually linked often appear in it zero times. Keyed
|
|
# on it alone, a dependency bump leaves the key unchanged and restores
|
|
# a stale cache. Same block as go-build.yml.
|
|
cache-dependency-path: |
|
|
go.work.sum
|
|
**/go.sum
|
|
|
|
- name: Initialize CodeQL
|
|
uses: github/codeql-action/init@1bd86f2fdb4b86187fa4059f16f31a3202acc9ea # v4.39.4
|
|
with:
|
|
languages: ${{ matrix.language }}
|
|
build-mode: ${{ matrix.build-mode }}
|
|
# security-extended over the default suite. The default set is tuned
|
|
# to keep false positives low; this repository would rather see a
|
|
# noisier list than miss something, and CodeQL reports into the
|
|
# Security tab without failing the build, so a wider net costs
|
|
# triage time rather than merges.
|
|
queries: security-extended
|
|
|
|
- name: Build
|
|
if: matrix.language == 'go'
|
|
# Not `make build`, and not `go build -C <module>`, though both compile
|
|
# exactly the right set. CodeQL traces the `go` process it puts on PATH,
|
|
# and `-C` makes go chdir before it does anything else, so the extractor
|
|
# attributes nothing to the source root. The first attempt at this
|
|
# workflow used `make build` -- which is a `go build -C` loop -- and the
|
|
# analysis failed with:
|
|
#
|
|
# CodeQL detected code written in Go but this run didn't build any of
|
|
# it, or CodeQL could not process any of it.
|
|
#
|
|
# even though every module compiled and all five binaries were linked.
|
|
# A green build step is not evidence CodeQL saw it.
|
|
#
|
|
# `cd` into each module instead, which is the shape that worked when
|
|
# this file built agent/ alone with working-directory.
|
|
#
|
|
# The module list still comes from go.work rather than being kept here,
|
|
# so a module added to the workspace is analysed with no change to this
|
|
# file.
|
|
#
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
mods=$(sed -n '/^use (/,/^)/p' go.work \
|
|
| sed -n 's#^[[:space:]]*\./##p' \
|
|
| sed 's/[[:space:]]*$//' \
|
|
| grep -v '^$')
|
|
|
|
if [ -z "$mods" ]; then
|
|
echo "::error::no modules found in go.work; the use() block did not parse"
|
|
exit 1
|
|
fi
|
|
|
|
root=$PWD
|
|
while IFS= read -r m; do
|
|
echo "::group::go build ./... in $m"
|
|
(cd "${root}/${m}" && go build ./...)
|
|
echo "::endgroup::"
|
|
done <<< "$mods"
|
|
|
|
- name: Run CodeQL analysis
|
|
uses: github/codeql-action/analyze@1bd86f2fdb4b86187fa4059f16f31a3202acc9ea # v4.39.4
|
|
with:
|
|
category: "/language:${{ matrix.language }}"
|