Repository navigation
chore(security): resolve all open Dependabot and CodeQL alerts - #2717
Conversation
Go modules (6 Dependabot alerts): - containerd/containerd/v2 v2.3.1 -> v2.3.3 (GHSA-33vj-92qq-66hc, GHSA-rgh6-rfwx-v388, GHSA-xhf5-7wjv-pqxp, GHSA-cvxm-645q-p574, GHSA-jpcc-p29g-p8mq) - oras.land/oras-go/v2 v2.6.1 -> v2.6.2 (GHSA-fxhp-mv3v-67qp) - aws-sdk-go-v2 inspector2/ecrpublic bumps (supersedes #2605, #2580) - NOTICE regenerated GitHub Actions (supersedes #2699): - setup-python v6.3.0, deployment-status v2.0.4, pre-commit v4.1.0, codeql-action v4.36.2, setup-packer pin refresh Website (78 Dependabot npm alerts, supersedes #2690): - Docusaurus 3.9.2 -> 3.10.x and related direct dep bumps - pnpm.overrides pinning all alerted transitive deps out of their vulnerable ranges (shell-quote, node-forge, mermaid, dompurify, lodash, ws, minimatch, webpack, serialize-javascript, uuid, etc.) - Hero: SiAmazonwebservices was removed from react-icons 5.6 (simple-icons trademark cleanup); use FaAws instead CodeQL (8 go/allocation-size-overflow alerts): - size allocations with a single len() term instead of len(a)+len(b) sums in pkg/yaml, pkg/secrets, pkg/merge, pkg/emulator, pkg/ci, internal/exec (capacity hints only; behavior unchanged) Co-Authored-By: Claude Fable 5 <[email protected]>
|
Tip Atmos Pro
No affected stacks workflow was detected for this pull request. |
Dependency ReviewThe following issues were found:
License Issues.github/workflows/website-preview-destroy.yml
go.mod
Scanned Files
|
|
Important Cloud Posse Engineering Team Review RequiredThis pull request modifies files that require Cloud Posse's review. Please be patient, and a core maintainer will review your changes. To expedite this process, reach out to us on Slack in the |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (17)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (12)
📝 WalkthroughWalkthroughThis update refreshes GitHub Actions, Go and website dependencies, Terraform/OpenTofu lockfiles, license URLs, selected Go allocations, the AWS landing-page icon, coverage thresholds, SHA-pinning verification, and Claude security-remediation automation. ChangesMaintenance updates
Security remediation automation
Estimated code review effort: 4 (Complex) | ~60 minutes Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (4)
.github/workflows/codeql.yml (2)
196-196: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick winConsider SHA-pinning
mheap/github-action-required-labels.This action uses a floating tag (
@v5.5.2) while the repo convention elsewhere prefers SHA-pinning with version comments. Apply the same pattern for supply-chain consistency.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/codeql.yml at line 196, Replace the floating `@v5.5.2` reference for mheap/github-action-required-labels in the workflow with the commit SHA for that release, and add an inline version comment matching the repository’s existing SHA-pinning convention.
37-37: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick winConsider SHA-pinning CodeQL actions for consistency.
These CodeQL action steps use floating tags (
@v4.36.2) while the same actions are SHA-pinned elsewhere in the repo (e.g.,test.ymlline 374 pinsupload-sarifto@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2). SHA-pinning protects against tag re-pointing supply-chain attacks.♻️ Proposed fix
- uses: github/codeql-action/[email protected] + uses: github/codeql-action/init@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2- uses: github/codeql-action/[email protected] + uses: github/codeql-action/autobuild@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2- uses: github/codeql-action/[email protected] + uses: github/codeql-action/analyze@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2- uses: github/codeql-action/[email protected] + uses: github/codeql-action/upload-sarif@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2Also applies to: 50-50, 63-63, 169-169
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/codeql.yml at line 37, Replace the floating CodeQL action tags in the init, autobuild, and analyze steps with their corresponding commit SHAs, matching the repository’s existing SHA-pinning convention and retaining version comments such as “# v4.36.2”..github/workflows/atmos-pro.yaml (1)
30-30: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick winConsider SHA-pinning
runs-on/actionfor consistency.Other workflows in this repo (e.g.,
test.ymlline 68) pinruns-on/actionto a commit digest (@d141ef83eb66d096ce8afc767e09115a65c63b60 # v2.1.2) rather than a floating tag. Using@v2.1.2here is a minor supply-chain inconsistency.♻️ Proposed fix
- - uses: runs-on/[email protected] + - uses: runs-on/action@d141ef83eb66d096ce8afc767e09115a65c63b60 # v2.1.2🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/atmos-pro.yaml at line 30, Replace the floating runs-on/[email protected] reference in the workflow with the repository-standard SHA-pinned commit for v2.1.2, matching the digest used in test.yml and retaining the version comment..github/workflows/pre-commit.yml (1)
62-67: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick win
setup-pythonSHA-pinning looks good; consider pinninggithub-action-pre-committoo.
actions/setup-pythonis properly SHA-pinned. However,cloudposse/[email protected]uses a floating tag while other actions in this file are SHA-pinned. For consistency and supply-chain safety, consider SHA-pinning this as well.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/pre-commit.yml around lines 62 - 67, Pin the action used by the “Run CloudPosse pre-commit action” step to the commit SHA corresponding to github-action-pre-commit v4.1.0, preserving the version as an inline comment and matching the SHA-pinned style used by actions/setup-python.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In @.github/workflows/atmos-pro.yaml:
- Line 30: Replace the floating runs-on/[email protected] reference in the workflow
with the repository-standard SHA-pinned commit for v2.1.2, matching the digest
used in test.yml and retaining the version comment.
In @.github/workflows/codeql.yml:
- Line 196: Replace the floating `@v5.5.2` reference for
mheap/github-action-required-labels in the workflow with the commit SHA for that
release, and add an inline version comment matching the repository’s existing
SHA-pinning convention.
- Line 37: Replace the floating CodeQL action tags in the init, autobuild, and
analyze steps with their corresponding commit SHAs, matching the repository’s
existing SHA-pinning convention and retaining version comments such as “#
v4.36.2”.
In @.github/workflows/pre-commit.yml:
- Around line 62-67: Pin the action used by the “Run CloudPosse pre-commit
action” step to the commit SHA corresponding to github-action-pre-commit v4.1.0,
preserving the version as an inline comment and matching the SHA-pinned style
used by actions/setup-python.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: a101f2e1-fa62-4b1c-9fb4-238ee750f4d5
⛔ Files ignored due to path filters (2)
go.sumis excluded by!**/*.sumwebsite/pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (18)
.github/workflows/atmos-pro.yaml.github/workflows/codeql.yml.github/workflows/pre-commit.yml.github/workflows/test.yml.github/workflows/website-preview-destroy.ymlNOTICEexamples/secrets-masking/components/terraform/secrets-demo/.demo-dev-test-secrets-demo.terraform.lock.hclexamples/secrets-masking/components/terraform/secrets-demo/.terraform.lock.hclgo.modinternal/exec/describe_locals.gointernal/exec/template_utils.gopkg/ci/internal/provider/check.gopkg/emulator/manager.gopkg/merge/merge_yaml_functions.gopkg/secrets/scope.gopkg/yaml/anchors.gowebsite/package.jsonwebsite/src/components/landing/Hero/index.js
Resource Changes Found for
|
Adds a PostToolUse hook that detects GitHub's post-push vulnerability notice and, only when the live set of open Dependabot/CodeQL alerts has changed since last handled, invokes a new security-remediate skill to fix high-confidence findings directly on the current branch. Fails open silently (no gh auth, missing security_events scope, fork with no repo access, network timeout) so it never affects contributors without alert visibility, including fork-based OSS contributors. Co-Authored-By: Claude Sonnet 5 <[email protected]>
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
.claude/hooks/security-remediate-trigger.sh (1)
40-56: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick winManual timeout fallback could hang if process ignores SIGTERM.
The fallback sends
kill -TERMon timeout but never escalates toSIGKILL. If the child process ignoresSIGTERM,wait "$pid"on line 53 blocks indefinitely, violating the script's "must never delay the callinggit push" requirement. Low practical risk forgh apicalls, but worth hardening.🔒 Add SIGKILL escalation after a grace period
if [ "$i" -ge "$secs" ]; then kill -TERM "$pid" 2>/dev/null + sleep 1 + kill -KILL "$pid" 2>/dev/null break fi🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.claude/hooks/security-remediate-trigger.sh around lines 40 - 56, Harden the timeout logic in the manual fallback function by adding a short grace period after sending SIGTERM, then sending SIGKILL if the child is still running before calling wait. Update the existing pid polling and cleanup flow so an unresponsive process cannot block indefinitely, while preserving temporary-file output and removal.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.claude/hooks/security-remediate-trigger.sh:
- Line 68: Replace the GNU-specific \s and \b escapes in the git push detection
regex used by the hook with POSIX-compatible character classes and boundary
logic, preserving detection of git push after command separators and at command
boundaries. Update the grep expression in the relevant shell logic so it works
with stock macOS grep -E.
In @.claude/skills/security-remediate/SKILL.md:
- Line 40: Correct the go/allocation-size-overflow guidance in the
security-remediate skill to match the PR’s actual safe pattern: avoid summed
len() capacity hints entirely, rather than recommending make(T, len(a)+len(b)).
Update the rule’s description under the CodeQL alerts guidance and ensure it
does not suggest reintroducing summed allocation sizes.
---
Nitpick comments:
In @.claude/hooks/security-remediate-trigger.sh:
- Around line 40-56: Harden the timeout logic in the manual fallback function by
adding a short grace period after sending SIGTERM, then sending SIGKILL if the
child is still running before calling wait. Update the existing pid polling and
cleanup flow so an unresponsive process cannot block indefinitely, while
preserving temporary-file output and removal.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 05edbfd5-ab5f-4dbd-9be4-e0f49a658447
📒 Files selected for processing (4)
.claude/hooks/security-remediate-trigger.sh.claude/settings.json.claude/skills/security-remediate/SKILL.md.gitignore
✅ Files skipped from review due to trivial changes (1)
- .claude/settings.json
Dependency review flagged [email protected] (GHSA-mwcw-c2x4-8c55, predictable output for non-integer inputs) pulled in transitively via @excalidraw/mermaid-to-excalidraw, which pins that exact version. nanoid's 4.x line was abandoned at 4.0.2 with no patched release, so pnpm.overrides now forces it to 5.1.16. Also bumps the same-vulnerability [email protected] (via @excalidraw/excalidraw) to the already-present patched 3.3.15. Verified with a full `npm run build`. Co-Authored-By: Claude Sonnet 5 <[email protected]>
The vulnerability fix in the prior commit unblocked the Vulnerabilities check, surfacing a second, previously-masked failure: [email protected] ("MIT AND Zlib") and [email protected] (BlueOak-1.0.0) aren't literal matches in the allow-licenses list even though both are permissive. pako is an MIT wrapper around zlib's permissively-licensed C sources (transitive dep of @excalidraw/excalidraw); sax uses the Blue Oak Model License, an OSI-style permissive license (transitive dep of svgo). Allowlisted both by PURL, matching the existing verified-exception pattern for Go modules. Co-Authored-By: Claude Sonnet 5 <[email protected]>
- Replace GNU-only \s/\b grep escapes in the git-push detection regex with POSIX bracket classes ([[:space:]]), so the hook matches reliably on minimal/busybox grep environments, not just GNU/Apple grep. - Correct the security-remediate skill's go/allocation-size-overflow guidance: the actual fix (verified against commit 0e32451) avoids summed len() capacity hints entirely, rather than combining them into make(T, len(a)+len(b)) as the skill previously (incorrectly) described. The prior wording would have guided future remediation to reintroduce the exact overflow pattern CodeQL flags. Co-Authored-By: Claude Sonnet 5 <[email protected]>
The manual watchdog in run_with_timeout only sent SIGTERM and then waited indefinitely, so a child process that ignores SIGTERM could hang the hook (and the calling git push) forever. Add a bounded grace period followed by SIGKILL. Co-Authored-By: Claude Sonnet 5 <[email protected]>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2717 +/- ##
=======================================
Coverage 81.25% 81.26%
=======================================
Files 1635 1635
Lines 154676 154672 -4
=======================================
+ Hits 125682 125688 +6
+ Misses 22068 22057 -11
- Partials 6926 6927 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
gh api implicitly sends POST when -f/--paginate params are given without an explicit method, and the Dependabot/code-scanning alert list endpoints 404 on POST - indistinguishable from a permission error unless you notice the verb. Both the trigger hook and the security-remediate skill were hitting this, misdiagnosed for hours as a missing security_events scope. security_events is only required for private repos; this repo is public, so the default repo-scoped gh token already works once given -X GET. Co-Authored-By: Claude Sonnet 5 <[email protected]>
Both were pinned at 7.28.5, the last genuinely vulnerable versions among the 84 open Dependabot alerts (GHSA advisories fixed in 7.29.6/7.29.4 respectively). Added pnpm.overrides entries since both are transitive deps of docusaurus, not direct dependencies; regenerated the lockfile. Verified with `pnpm run build`. Co-Authored-By: Claude Sonnet 5 <[email protected]>
Co-Authored-By: Claude Sonnet 5 <[email protected]>
…ions verify-sha-pinning only ever re-verified SHAs that already existed against their upstream tag (drift detection); it had no check for whether a `uses:` reference was SHA-pinned at all, so 23 references across 12 workflow files (github/codeql-action, golangci-lint-action, runs-on/action, etc.) sat on bare tags/branches with zero supply-chain protection and no CI signal. Add a coverage check alongside the existing drift check, classifying every third-party `uses:` line as tag-pinned (drift-verified), branch-pinned (SHA-pinned to a branch like main, informational), or unpinned (new hard failure). Pin all 23 previously-unpinned references to their current SHAs. Co-Authored-By: Claude Sonnet 5 <[email protected]>
floci.io (and www.floci.io, which redirects to it) currently 404s, failing the Check Markdown Links CI job. Every other Floci reference in the docs already links to github.com/floci-io/floci, which is live; match that convention here instead of the broken project domain.
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/actions/verify-sha-pinning/README.md:
- Around line 75-79: Label the fenced example block in the README by adding the
yaml language identifier to its opening fence, leaving the documented uses
examples unchanged.
In @.github/workflows/feature-release.yml:
- Line 20: Replace secrets: inherit in both reusable workflow invocations with
an explicit secrets mapping containing only the secrets required by
shared-go-auto-release.yml. Apply this to .github/workflows/feature-release.yml
lines 20-20 and 28, and .github/workflows/nightlybuilds.yml lines 14-14;
preserve the existing job behavior while ensuring no unrelated caller secrets
are forwarded.
In @.github/workflows/verify-sha-pinning.yml:
- Line 21: Update the actions/checkout step in the verify workflow to set
persist-credentials to false, while preserving the existing explicit
github-token configuration and local-action execution.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 7836ff5d-2bcb-40d9-b507-8a09d9150000
📒 Files selected for processing (15)
.github/actions/verify-sha-pinning/README.md.github/actions/verify-sha-pinning/action.yml.github/actions/verify-sha-pinning/test.mjs.github/workflows/atmos-pro.yaml.github/workflows/build.yml.github/workflows/codeql.yml.github/workflows/feature-release.yml.github/workflows/landing-demos.yaml.github/workflows/link-check.yml.github/workflows/nightlybuilds.yml.github/workflows/pre-commit.yml.github/workflows/validate-codeowners.yml.github/workflows/verify-sha-pinning.yml.github/workflows/vhs.yaml.github/workflows/website-preview-destroy.yml
✅ Files skipped from review due to trivial changes (2)
- .github/workflows/validate-codeowners.yml
- .github/workflows/pre-commit.yml
🚧 Files skipped from review as they are similar to previous changes (2)
- .github/workflows/atmos-pro.yaml
- .github/workflows/codeql.yml
…pinning actions/checkout persists the GITHUB_TOKEN in .git/config by default; this workflow already passes github-token explicitly to the local composite action, so persisted git credentials are unused. Matches the persist-credentials: false convention used by every other checkout step in this repo. Co-Authored-By: Claude Sonnet 5 <[email protected]>
|
Tip Atmos Pro
No affected stacks workflow was detected for this pull request. |
|
These changes were released in v1.223.0-rc.9. |
what
Drives every outstanding GitHub security finding on this repo to zero: all 84 open Dependabot alerts (6 Go, 78 npm) and all 11 open CodeQL alerts.
Go modules (6 alerts, all high):
github.com/containerd/containerd/v2v2.3.1 → v2.3.3 — GHSA-33vj-92qq-66hc, GHSA-rgh6-rfwx-v388, GHSA-xhf5-7wjv-pqxp, GHSA-cvxm-645q-p574, GHSA-jpcc-p29g-p8mqoras.land/oras-go/v2v2.6.1 → v2.6.2 — GHSA-fxhp-mv3v-67qpaws-sdk-go-v2inspector2/ecrpublicbumps (folds in build(deps): bump github.com/aws/aws-sdk-go-v2/service/inspector2 from 1.47.7 to 1.48.2 #2605, build(deps): bump github.com/aws/aws-sdk-go-v2/service/ecrpublic from 1.38.12 to 1.38.15 #2580)NOTICEregenerated viascripts/generate-notice.shGitHub Actions (folds in #2699):
actions/setup-pythonv6.3.0,chrnorm/deployment-statusv2.0.4,cloudposse/github-action-pre-commitv4.1.0,github/codeql-actionv4.36.2,hashicorp/setup-packerpin refreshWebsite (78 npm alerts, folds in #2690):
pnpm.overridesblock pinning every alerted transitive dependency out of its vulnerable range (shell-quotecritical,node-forge,mermaid,dompurify,lodash/lodash-es,ws,minimatch,webpack,serialize-javascript,uuid, and more) — every override is scoped to the affected major version so unrelated majors are untouchedreact-icons5.6 removedSiAmazonwebservices(Simple Icons trademark cleanup); switched to Font Awesome'sFaAwsCodeQL (11 alerts):
go/allocation-size-overflowalerts by sizing allocations with a singlelen()term instead of alen(a)+len(b)sum (capacity hints only; behavior unchanged):pkg/yaml,pkg/secrets,pkg/merge,pkg/emulator,pkg/ci,internal/execgo/weak-sensitive-data-hashingalerts were dismissed on GitHub as false positives: the flagged SHA-256 usage derives cache filenames / dedup keys (content addressing), not password storagewhy
mainanalysisreferences
go build ./..., targeted package tests,atmos lint changed, pre-commit hooks, andcd website && pnpm run buildall pass; every Dependabot alert range was re-checked against the regeneratedgo.mod/pnpm-lock.yamland none still matchNote
Zero user-visible behavior change — dependency bumps and allocation-capacity hints only.