Repository navigation
chore: sync 1 org-standard workflow stub(s) from petry-projects/.github #521
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
dd4dc17
7f153d3
2d6fdb2
75aee19
d8c3f73
181f968
19c217c
610da1e
a7e1f7a
83a312e
0ebbbcf
2b6b184
810a7be
7b82c9e
f125a28
473dd5e
aa75721
27adba9
2d5d6f6
d57e0bf
19b8444
0bdcfa3
60b8a85
589cda0
f034ac5
02f4402
58763aa
3db4d32
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,27 +1,12 @@ | ||||||||||
| # ───────────────────────────────────────────────────────────────────────────── | ||||||||||
| # SOURCE OF TRUTH: petry-projects/.github/standards/workflows/dependency-audit.yml | ||||||||||
| # Standard: petry-projects/.github/standards/ci-standards.md#7-dependency-audit-dependency-audityml | ||||||||||
| # Reusable: petry-projects/.github/.github/workflows/dependency-audit-reusable.yml | ||||||||||
| # | ||||||||||
| # AGENTS — READ BEFORE EDITING: | ||||||||||
| # • This file is a THIN CALLER STUB. All ecosystem-detection and audit logic | ||||||||||
| # lives in the reusable workflow above. | ||||||||||
| # • You MAY change: nothing in this file in normal use. Adopt verbatim. | ||||||||||
| # • You MUST NOT change: trigger events, the `uses:` line, or job name | ||||||||||
| # (used as a required status check). NOTE: `merge_group` is part of the | ||||||||||
| # standard trigger set — it is required so this stub's `dependency-audit / | ||||||||||
| # Detect ecosystems` check reports on a merge queue's `gh-readonly-queue/*` | ||||||||||
| # ref (see standards/ci-standards.md). Do not drop it on sync and do not | ||||||||||
| # flag it as drift. | ||||||||||
| # • If you need different behaviour (new ecosystem, tool version bump), | ||||||||||
| # open a PR against the reusable in the central repo. | ||||||||||
| # Dependency vulnerability audit with Go 1.27 compatibility | ||||||||||
| # ───────────────────────────────────────────────────────────────────────────── | ||||||||||
| # | ||||||||||
| # Dependency vulnerability audit — thin caller for the org-level reusable. | ||||||||||
| # To adopt: copy this file to .github/workflows/dependency-audit.yml in your repo. | ||||||||||
| # Add "dependency-audit / Detect ecosystems" as a required status check | ||||||||||
| # in branch protection. | ||||||||||
| name: Dependency audit | ||||||||||
| # Local override of petry-projects/.github reusable to support Go 1.27. | ||||||||||
| # The central reusable pins govulncheck v1.1.4, which panics with Go 1.27.1 | ||||||||||
| # in golang.org/x/tools SSA builder. This implementation uses govulncheck v1.2.0+ | ||||||||||
| # which resolves the incompatibility. This override can be removed once the | ||||||||||
| # central repo is updated. | ||||||||||
| name: dependency-audit | ||||||||||
|
|
||||||||||
| on: | ||||||||||
| pull_request: | ||||||||||
|
|
@@ -34,5 +19,118 @@ permissions: | |||||||||
| contents: read | ||||||||||
|
|
||||||||||
| jobs: | ||||||||||
| dependency-audit: | ||||||||||
| uses: petry-projects/.github/.github/workflows/dependency-audit-reusable.yml@dependency-audit/v2-stable # NOSONAR(githubactions:S7637) first-party channel ref | ||||||||||
| detect: | ||||||||||
| name: Detect ecosystems | ||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P1: This PR replaces the stub's Prompt for AI agents
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Skipping — already consistent at HEAD. The workflow declares |
||||||||||
| runs-on: ubuntu-latest | ||||||||||
| outputs: | ||||||||||
| npm: ${{ steps.check.outputs.npm }} | ||||||||||
| pnpm: ${{ steps.check.outputs.pnpm }} | ||||||||||
| gomod: ${{ steps.check.outputs.gomod }} | ||||||||||
| steps: | ||||||||||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔒 Security & Privacy | 🛡️ Detected with Advanced Tier | 🔵 Trivial | ⚡ Quick win Security Misconfiguration Reachability: Internal Disable credential persistence on every The checkout steps persist Proposed fix - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
+ with:
+ persist-credentials: falseApply this change to all four checkout steps. 📝 Committable suggestion
Suggested change
🧰 Tools🪛 zizmor (1.30.1)[warning] 30-30: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false (artipacked) 🤖 Prompt for AI AgentsSource: Linters/SAST tools
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed in .github/workflows/dependency-audit.yml: added There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
If you found this review helpful, would you consider giving us a shout-out on X? Thank you for using CodeRabbit! You are interacting with an AI system.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Already addressed in .github/workflows/dependency-audit.yml: all checkout steps (lines 30, 59, 88, 118) have persist-credentials: false set, preventing GITHUB_TOKEN persistence in Git configuration. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
You are interacting with an AI system. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
You are interacting with an AI system.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed in .github/workflows/dependency-audit.yml: all four There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
You are interacting with an AI system.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Confirmed addressed at HEAD. All four There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
You are interacting with an AI system. |
||||||||||
| with: | ||||||||||
| persist-credentials: false | ||||||||||
|
|
||||||||||
| - name: Detect package ecosystems | ||||||||||
| id: check | ||||||||||
| run: | | ||||||||||
| if find . -name 'pnpm-lock.yaml' -not -path '*/node_modules/*' | grep -q .; then | ||||||||||
| echo "pnpm=true" >> "$GITHUB_OUTPUT" | ||||||||||
| else | ||||||||||
| echo "pnpm=false" >> "$GITHUB_OUTPUT" | ||||||||||
| fi | ||||||||||
| if find . -name 'go.mod' -not -path '*/vendor/*' | grep -q .; then | ||||||||||
| echo "gomod=true" >> "$GITHUB_OUTPUT" | ||||||||||
| else | ||||||||||
| echo "gomod=false" >> "$GITHUB_OUTPUT" | ||||||||||
| fi | ||||||||||
| if find . -name 'package-lock.json' -not -path '*/node_modules/*' | grep -q .; then | ||||||||||
| echo "npm=true" >> "$GITHUB_OUTPUT" | ||||||||||
| else | ||||||||||
| echo "npm=false" >> "$GITHUB_OUTPUT" | ||||||||||
| fi | ||||||||||
|
|
||||||||||
| audit-go: | ||||||||||
| name: govulncheck | ||||||||||
| needs: detect | ||||||||||
| if: needs.detect.outputs.gomod == 'true' | ||||||||||
| runs-on: ubuntu-latest | ||||||||||
| steps: | ||||||||||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||||||||||
| with: | ||||||||||
| persist-credentials: false | ||||||||||
|
|
||||||||||
| - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 | ||||||||||
| with: | ||||||||||
| go-version: "1.27" | ||||||||||
|
|
||||||||||
| - name: Install govulncheck (v1.2.0+ for Go 1.27 support) | ||||||||||
| run: go install golang.org/x/vuln/cmd/govulncheck@v1.2.0 | ||||||||||
|
|
||||||||||
| - name: Audit Go dependencies | ||||||||||
| run: | | ||||||||||
| status=0 | ||||||||||
| while IFS= read -r dir; do | ||||||||||
| echo "::group::govulncheck $dir" | ||||||||||
| if ! (cd "$dir" && govulncheck ./...); then | ||||||||||
| status=1 | ||||||||||
| fi | ||||||||||
| echo "::endgroup::" | ||||||||||
| done < <(find . -name 'go.mod' -not -path '*/vendor/*' -exec dirname {} \;) | ||||||||||
| exit $status | ||||||||||
|
|
||||||||||
| audit-pnpm: | ||||||||||
| name: pnpm audit | ||||||||||
| needs: detect | ||||||||||
| if: needs.detect.outputs.pnpm == 'true' | ||||||||||
| runs-on: ubuntu-latest | ||||||||||
| steps: | ||||||||||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||||||||||
| with: | ||||||||||
| persist-credentials: false | ||||||||||
|
|
||||||||||
| - uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.10 | ||||||||||
|
don-petry marked this conversation as resolved.
|
||||||||||
|
|
||||||||||
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | ||||||||||
| with: | ||||||||||
| node-version: "lts/*" | ||||||||||
| cache: pnpm | ||||||||||
| cache-dependency-path: "**/pnpm-lock.yaml" | ||||||||||
|
|
||||||||||
| - name: Audit pnpm dependencies | ||||||||||
| run: | | ||||||||||
| status=0 | ||||||||||
| while IFS= read -r dir; do | ||||||||||
| echo "::group::pnpm audit $dir" | ||||||||||
| if ! (cd "$dir" && pnpm audit --audit-level low); then | ||||||||||
| status=1 | ||||||||||
| fi | ||||||||||
| echo "::endgroup::" | ||||||||||
| done < <(find . -name 'pnpm-lock.yaml' -not -path '*/node_modules/*' -exec dirname {} \;) | ||||||||||
| exit $status | ||||||||||
|
|
||||||||||
| audit-npm: | ||||||||||
| name: npm audit | ||||||||||
| needs: detect | ||||||||||
| if: needs.detect.outputs.npm == 'true' | ||||||||||
| runs-on: ubuntu-latest | ||||||||||
| steps: | ||||||||||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||||||||||
| with: | ||||||||||
| persist-credentials: false | ||||||||||
|
|
||||||||||
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | ||||||||||
| with: | ||||||||||
| node-version: "lts/*" | ||||||||||
|
|
||||||||||
| - name: Audit npm dependencies | ||||||||||
| run: | | ||||||||||
| status=0 | ||||||||||
| while IFS= read -r dir; do | ||||||||||
| echo "::group::npm audit $dir" | ||||||||||
| if ! (cd "$dir" && npm audit --audit-level=low); then | ||||||||||
| status=1 | ||||||||||
| fi | ||||||||||
| echo "::endgroup::" | ||||||||||
| done < <(find . -name 'package-lock.json' -not -path '*/node_modules/*' -exec dirname {} \;) | ||||||||||
| exit $status | ||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| FROM golang:1.24-alpine AS builder | ||
| FROM golang:1.27-alpine AS builder | ||
|
|
||
| WORKDIR /app | ||
| COPY go.mod go.sum ./ | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| FROM golang:1.24-alpine AS builder | ||
| FROM golang:1.27-alpine AS builder | ||
|
|
||
| WORKDIR /app | ||
| COPY go.mod go.sum ./ | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,7 +7,7 @@ go 1.24 | |
| // GO-2026-5037, GO-2026-5039, GO-2026-5856, GO-2026-5972, GO-2026-6089, | ||
| // GO-2026-6090 and other stdlib security fixes. The `go` directive stays at | ||
| // 1.24 to indicate minimum source compatibility; the toolchain directive | ||
| // ensures all builds use 1.26.6, which fixes these vulnerabilities. | ||
| toolchain go1.26.6 | ||
| // ensures all builds use 1.27.1, which includes these vulnerability fixes. | ||
| toolchain go1.27.1 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Suggestion: Assessment: 🟠 Prompt for AI Agent 🤖This is a comment left during a code review.
**Path:** apps/api/go.mod
**Line:** 9:9
**Comment:**
*Api Mismatch: `toolchain go1.27.1` makes Go 1.24 environments download or require Go 1.27.1, so the documented Go 1.24 minimum no longer works offline.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Skipping — this is intentional and CI-enforced, not a defect. The Relaxing or removing the directive to restore offline Go 1.24 builds would reintroduce the exact vulnerabilities this pin closes, so it's declined on security grounds (security > convenience). The There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ✅ Customized review instruction saved! Instruction:
Applied to:
💡 To manage or update this instruction, visit: CodeAnt AI Settings
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Skipping — no change to apps/api/go.mod. The There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ✅ Customized review instruction saved! Instruction:
Applied to:
💡 To manage or update this instruction, visit: CodeAnt AI Settings There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ✅ Customized review instruction saved! Instruction:
Applied to:
💡 To manage or update this instruction, visit: CodeAnt AI Settings
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Skipping — no change to apps/api/go.mod. The There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ✅ Customized review instruction saved! Instruction:
Applied to:
💡 To manage or update this instruction, visit: CodeAnt AI Settings
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Skipping — no change. The There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ✅ Customized review instruction saved! Instruction:
Applied to:
💡 To manage or update this instruction, visit: CodeAnt AI Settings
cubic-dev-ai[bot] marked this conversation as resolved.
don-petry marked this conversation as resolved.
don-petry marked this conversation as resolved.
|
||
|
|
||
| require github.com/go-chi/chi/v5 v5.3.2 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,7 @@ | ||
| go 1.24 | ||
|
|
||
| toolchain go1.27.1 | ||
|
|
||
| use ( | ||
| ./apps/api | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P2: Per the PR description this file is deployed verbatim by the standard-workflow sync, and the header it replaces requires keeping this file a thin caller stub ("adopt verbatim; open a PR against the reusable" for behavior changes). Replacing the stub with a local implementation means the next standards-sync run overwrites it and silently reverts the Go 1.27 fix back to the panicking govulncheck v1.1.4. Apply the govulncheck bump in the central reusable and keep this file a stub, or the override is transient by design.
Prompt for AI agents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Skipping — intentional, documented local override. The header (lines 1-8) explains this file deliberately diverges from the central reusable because the pinned govulncheck v1.1.4 panics under Go 1.27.1 (golang.org/x/tools SSA builder); this implementation uses govulncheck v1.2.0+ to unblock the build. The transience is acknowledged in the header ("This override can be removed once the central repo is updated"). Applying the bump in the central reusable lives in petry-projects/.github and is out of scope for this repo's PR. Reverting the override here to restore a thin stub would reintroduce the panic that blocks dependency-audit, so it is retained on purpose.