mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-11-09 13:01:56 -10:00
### Why / What / How **Why:** October's supply-chain incidents (GhostAction, the Shai-Hulud/ChainDrop worms, tensorlake, LiteLLM 1.107.0) all work by changing code that a pipeline pulls in by name. I checked `dev` against each one. The dependencies are clean, but 159 of 196 `uses:` refs in our workflows point at a mutable tag, a branch (`eps1lon/actions-label-merge-conflict@releases/2.x`) or `@latest` (`chromaui/action`). Anyone who takes over one of those repos can change what our CI runs. Some of those jobs hold `DEPLOY_TOKEN` (`peter-evans/repository-dispatch`, which reaches the infra repo), and some run with write tokens on `pull_request_target` (`codelytv/pr-size-labeler`, the merge-conflict labeler). **What:** every ref now uses the commit SHA its tag resolves to today, with the exact version as a trailing comment (`actions/checkout@11d5960… # v4.4.0`). This is the format the other 37 refs already use, and Dependabot's `github-actions` entry keeps updating it. **How:** I resolved each ref with `gh api repos/<repo>/commits/<ref>` and checked that the SHA matches a release tag. None of them changes behaviour: each SHA is the commit the tag points at now. `chromaui/action@latest` becomes `v18.13.2`, which is what `latest` points at today. **CI repair:** The Classic jobs could no longer pull `minio/minio:edge-cicd`. A shared local action now builds MinIO from upstream commit `9e49d5e7a648f00e26f2246f4dc28e6b07f8c84a` (RELEASE.2025-10-15T17-29-55Z) using a digest-pinned Go image, starts it on loopback, and waits for readiness. The Docker test shares MinIO's network and reaches it on loopback. Dependabot tracks the build image. ### Exposure check on `dev` (no change needed) | Incident | Result | |---|---| | Node.js Oct 21 security release (CVE-2026-111497 and others) | Already on 24.22.1 in all Dockerfiles and workflows (#15934) | | LiteLLM 1.107.0 (PyPI + Docker) | Not a dependency in any `poetry.lock`, and no LiteLLM image. `refresh-anthropic-rates.yml` only reads the pricing JSON from GitHub, and that source was clean | | tensorlake 0.5.144, SubQuery npm | Not in `pnpm-lock.yaml` | | Aug/Oct npm worm (keyv 6.0.0, flat-cache 6.1.24, file-entry-cache 11.1.6, cacheable family) | Lockfile has keyv 4.5.4, flat-cache 3.2.0, file-entry-cache 6.0.1 | | pnpm hardening | `minimum-release-age=10080`, `onlyBuiltDependencies` allowlist, `--frozen-lockfile` already set | | `pull_request_target` workflows | None checks out or runs PR code. No `${{ github.event.* }}` text is interpolated into `run:` | | OpenCode, Railway, Zeabur, OVHcloud CLI, eMudhra/Tailscale, PHP, RankMath, TeamUpdraft, ConnectWise | Not used in this repo | ### Changes 🏗️ - `.github/workflows/*.{yml,yaml}` (27 files): 159 `uses:` refs pinned to commit SHAs with version comments. - `.github/actions/start-minio/`: shared MinIO source build and readiness check, used by three Classic test workflows. - PR overlap and status checks execute trusted base code with no stored checkout credentials; status checks use read-only permissions. Rate refresh passes its token only to PR creation. - `.github/dependabot.yml`: track the MinIO build image; workflow path filters include changes to the shared action. ### Agents and large language models used - Claude Code with Claude Opus 5.5 - Codex with GPT-6 ### Checklist 📋 #### For code changes: - [x] I have clearly listed my changes in the PR description - [x] I have made a test plan - [x] I have tested my changes according to the test plan: - [x] Every `.yml` and `.yaml` workflow file parses as YAML - [x] No external `uses:` ref is left unpinned across both `.yml` and `.yaml` files (local `./` actions are exempt) - [x] Each SHA matches the release tag in its comment - [x] Actionlint and pre-commit pass for the changed setup - [x] Local MinIO source build, readiness, and S3 create/put/get/list/delete checks pass - [x] A second container reaches MinIO through its shared network - [x] All 14 status-checker unit tests pass - [x] CI on this PR runs green with the pinned actions and MinIO source build #### For configuration changes: - [x] `.env.default` is updated or already compatible with my changes - [x] `docker-compose.yml` is updated or already compatible with my changes - [x] I have included a list of my configuration changes in the PR description (under **Changes**) 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]> Co-authored-by: GPT-6 (Codex) <[email protected]>
105 lines
4.6 KiB
YAML
105 lines
4.6 KiB
YAML
# For most projects, this workflow file will not need changing; you simply need
|
||
# to commit it to your repository.
|
||
#
|
||
# You may wish to alter this file to override the set of languages analyzed,
|
||
# or to provide custom queries or build logic.
|
||
#
|
||
# ******** NOTE ********
|
||
# We have attempted to detect the languages in your repository. Please check
|
||
# the `language` matrix defined below to confirm you have the correct set of
|
||
# supported CodeQL languages.
|
||
#
|
||
name: "CodeQL"
|
||
|
||
on:
|
||
push:
|
||
branches: [ "master", "release-*", "dev" ]
|
||
pull_request:
|
||
branches: [ "master", "release-*", "dev" ]
|
||
merge_group:
|
||
workflow_dispatch:
|
||
schedule:
|
||
- cron: '15 4 * * 0'
|
||
|
||
permissions:
|
||
actions: read
|
||
contents: read
|
||
security-events: write
|
||
|
||
jobs:
|
||
analyze:
|
||
name: Analyze (${{ matrix.language }})
|
||
# Runner size impacts CodeQL analysis time. To learn more, please see:
|
||
# - https://gh.io/recommended-hardware-resources-for-running-codeql
|
||
# - https://gh.io/supported-runners-and-hardware-resources
|
||
# - https://gh.io/using-larger-runners (GitHub.com only)
|
||
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
|
||
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
|
||
permissions:
|
||
# required for all workflows
|
||
security-events: write
|
||
|
||
# required to fetch internal or private CodeQL packs
|
||
packages: read
|
||
|
||
# only required for workflows in private repositories
|
||
actions: read
|
||
contents: read
|
||
|
||
strategy:
|
||
fail-fast: false
|
||
matrix:
|
||
include:
|
||
- language: typescript
|
||
build-mode: none
|
||
- language: python
|
||
build-mode: none
|
||
# CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
|
||
# Use `c-cpp` to analyze code written in C, C++ or both
|
||
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
|
||
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
|
||
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
|
||
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
|
||
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
|
||
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
|
||
steps:
|
||
- name: Checkout repository
|
||
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
|
||
|
||
# Initializes the CodeQL tools for scanning.
|
||
- name: Initialize CodeQL
|
||
uses: github/codeql-action/init@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1
|
||
with:
|
||
languages: ${{ matrix.language }}
|
||
build-mode: ${{ matrix.build-mode }}
|
||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||
# By default, queries listed here will override any specified in a config file.
|
||
# Prefix the list here with "+" to use these queries and those in the config file.
|
||
config: |
|
||
paths-ignore:
|
||
- classic/frontend/build/**
|
||
|
||
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
|
||
# queries: security-extended,security-and-quality
|
||
|
||
# If the analyze step fails for one of the languages you are analyzing with
|
||
# "We were unable to automatically build your code", modify the matrix above
|
||
# to set the build mode to "manual" for that language. Then modify this step
|
||
# to build your code.
|
||
# ℹ️ Command-line programs to run using the OS shell.
|
||
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
||
- if: matrix.build-mode == 'manual'
|
||
shell: bash
|
||
run: |
|
||
echo 'If you are using a "manual" build mode for one or more of the' \
|
||
'languages you are analyzing, replace this with the commands to build' \
|
||
'your code, for example:'
|
||
echo ' make bootstrap'
|
||
echo ' make release'
|
||
exit 1
|
||
|
||
- name: Perform CodeQL Analysis
|
||
uses: github/codeql-action/analyze@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1
|
||
with:
|
||
category: "/language:${{matrix.language}}"
|