Skip to content

fix: patch container base and security scan workflows - #7

Merged
zskbot merged 9 commits into
mainfrom
fix/container-glibc-and-syft-artifact
Nov 16, 2026
Merged

zskbot merged 9 commits into
mainfrom
fix/container-glibc-and-syft-artifact

Conversation

@zskbot

@zskbot zskbot commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Move the optional API container from Debian Bookworm to Debian Trixie, which contains the glibc fix for CVE-2026-5450; upgrade OS packages in both build and runtime stages.
  • Rename the Syft SBOM artifact to a valid artifact name (the previous image.spdx.json caused GitHub artifact creation to fail).
  • Add npm overrides for the vulnerable transitive packages reported by OSV and remove the obsolete root bun.lock (it describes a different react-example dependency graph; this repository's Docker build and CI use npm).
  • Change CI dependency installation from npm install to npm ci so lockfile consistency is tested.
  • A temporary, branch-scoped workflow regenerates package-lock.json with the security overrides. It will be removed after the generated lockfile is committed.

Validation targets

  • Node.js CI and Hugging Face Python smoke tests.
  • OSV-Scanner, Grype and Syft workflows.
  • Docker build on Node 22 / Debian Trixie.

Safety

  • PR only; do not merge.
  • No Production deployment.
  • No secrets or environment variables changed.
  • Container changes affect the optional Express API image only; Vercel remains the web deployment target.

Summary by Sourcery

Harden the optional API container and dependency supply chain while making security scanning and CI workflows reliable.

Bug Fixes:

  • Patch the optional Express API container’s base image and OS packages to address the reported glibc security vulnerability.
  • Apply npm overrides for vulnerable transitive dependencies and update the lockfile.
  • Fix Syft artifact creation by using a valid artifact name.

Enhancements:

  • Use npm ci in CI to enforce package-lock consistency.
  • Remove the obsolete Bun lockfile.

Build:

  • Update the optional API image to Node 22 on Debian Trixie and upgrade packages in both build and runtime stages.

CI:

  • Run the Syft SBOM workflow for pull requests targeting main.

@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing

@sourcery-ai

sourcery-ai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

Configuration

Move the optional API image to Debian Trixie and upgrade OS packages in both build and runtime stages to address the reported glibc vulnerability.

  • Dockerfile L2-6, L17, L22-24

Add npm overrides for vulnerable transitive dependencies and record the resulting dependency graph in the npm lockfile.

  • package-lock.json L851-878, L1378-1410, L6692-6721 (+46 small edits)
  • package.json L64-72

Run CI dependency installation with npm ci so the workflow validates the committed lockfile.

  • .github/workflows/ci.yml L19

Run the Syft SBOM workflow on pull requests to main and use a valid artifact name so artifact creation succeeds.

  • .github/workflows/anchore-syft.yml L19-20, L39

Lock files and vendored code

Remove the obsolete Bun lockfile because this repository's dependency installation uses npm.

  • bun.lock (deleted)

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-16T19:03:18.152001Z
We couldn’t complete this review. Comment @codex review to try again.
ee058b0 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sourcery assessment

Approved.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've found 3 issues

Fixed security issues:

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="package.json" line_range="66-72" />
<code_context>
     "vite": "^8.3.5"
+  },
+  "overrides": {
+    "@grpc/grpc-js": "^1.13.6",
+    "@hono/node-server": "^2.1.6",
+    "body-parser": "^2.4.0",
+    "hono": "^4.13.16",
+    "minimatch": "^11.0.1",
+    "re2js": "^2.8.7",
+    "sharp": "^0.35.5"
   }
 }
</code_context>
<issue_to_address>
**Vulnerable dependencies remain installed**

When CI or Docker builds use the committed lockfile before it is refreshed, the lockfile still resolves the reported packages to versions below the overrides, so installs do not apply the intended security fixes and callers build with vulnerable dependencies.

Regenerate and commit `package-lock.json` so its resolutions satisfy the new overrides.

Also at `.github/workflows/ci.yml:19`.
</issue_to_address>

### Comment 2
<location path=".github/workflows/refresh-security-lock.yml" line_range="37" />
<code_context>
+          git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
+          git add package-lock.json
+          git commit -m "chore: refresh lockfile with security overrides"
+          git push origin "HEAD:${GITHUB_REF_NAME}"
</code_context>
<issue_to_address>
**Refreshed lockfile gets no CI checks**

When the refresh workflow pushes a changed lockfile using `GITHUB_TOKEN`, gitHub suppresses the resulting workflow events, so CI does not run on the refreshed lockfile commit and the PR head remains unvalidated.

Push the lockfile commit with a credential that triggers the required workflows, or explicitly run the checks for that commit.

Also at `.github/workflows/refresh-security-lock.yml:36`, `.github/workflows/ci.yml:19`.
</issue_to_address>

### Comment 3
<location path=".github/workflows/refresh-security-lock.yml" line_range="37" />
<code_context>
+          git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
+          git add package-lock.json
+          git commit -m "chore: refresh lockfile with security overrides"
+          git push origin "HEAD:${GITHUB_REF_NAME}"
</code_context>
<issue_to_address>
**Concurrent changes discard the refreshed lockfile**

When another commit advances the branch after checkout but before the lockfile push, the workflow's push is rejected as non-fast-forward, so its generated lockfile is discarded and the branch keeps stale dependency resolutions.

Fetch and rebase or regenerate against the latest branch head before retrying the lockfile push.
</issue_to_address>

Sourcery assessment

Approval pending. 3 findings to address first.

Blocking findings: package.json:72, .github/workflows/refresh-security-lock.yml:37, .github/workflows/refresh-security-lock.yml:37


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Comment thread package.json Resolved
@zskbot
zskbot merged commit 08bd22f into main Nov 16, 2026
41 of 46 checks passed

@zskbot zskbot left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant