fix(security): extend Perl remediation to sibling images - #7864
Conversation
Signed-off-by: Senthil Ravichandran <senthilr@nvidia.com>
Signed-off-by: Senthil Ravichandran <senthilr@nvidia.com>
Signed-off-by: Senthil Ravichandran <senthilr@nvidia.com>
Signed-off-by: Senthil Ravichandran <senthilr@nvidia.com>
Signed-off-by: Senthil Ravichandran <senthilr@nvidia.com>
Signed-off-by: Senthil Ravichandran <senthilr@nvidia.com>
Signed-off-by: Senthil Ravichandran <senthilr@nvidia.com>
Signed-off-by: Senthil Ravichandran <senthilr@nvidia.com>
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThe change adds checksum-pinned Perl 5.44.0 Debian packaging and verification across managed images, switches sibling-image publication to native architecture builds with validated digest manifests, relocates Hermes cron state, updates security and workflow tests, and prioritizes source-SHA base-image resolution. ChangesManaged image remediation and publication
Estimated code review effort: 5 (Critical) | ~90 minutes Sequence Diagram(s)sequenceDiagram
participant Workflow
participant NativeBuild
participant DigestArtifact
participant ManifestJob
participant Registry
Workflow->>NativeBuild: start amd64 and arm64 image builds
NativeBuild->>DigestArtifact: upload architecture-qualified digest
ManifestJob->>DigestArtifact: download and validate digest set
ManifestJob->>Registry: inspect digest platform
ManifestJob->>Registry: create multi-platform manifest
Possibly related issues
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
Code Coverage OverviewLanguages: TypeScript TypeScript / code-coverage/pluginThe overall coverage in commit a53ec89 in the TypeScript / code-coverage/cliThe overall coverage in commit a53ec89 in the Show a code coverage summary of the most impacted files.
Updated |
|
🌿 Preview your docs: https://nvidia-preview-pr-7864.docs.buildwithfern.com/nemoclaw |
Signed-off-by: Senthil Ravichandran <senthilr@nvidia.com>
There was a problem hiding this comment.
🧹 Nitpick comments (5)
test/dcode-base-image-workflow.test.ts (1)
177-255: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winConsider extracting
validatePublishers' guard checks into named predicates.The function keeps accreting independent checks (mutable tags, full-SHA enforcement, native platform, digest output, labels, cache rules) into one large array literal. Splitting each guard into a small named function (e.g.
checkNoMutableTags,checkFullShaActions,checkImmutableDigestOutput) would make future additions easier to review and reduce the function's branching complexity.As per coding guidelines,
**/*.{js,ts,tsx}: "keep function complexity low."🤖 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 `@test/dcode-base-image-workflow.test.ts` around lines 177 - 255, The validatePublishers function currently contains too many independent inline guard checks, increasing complexity. Extract the publication validation groups—such as mutable-tag checks, full-SHA enforcement, immutable platform output, and cache rules—into small named predicates or helper functions, then compose their results in validatePublishers while preserving all existing validation messages and behavior.Source: Coding guidelines
test/perl-critical-cve-remediation.test.ts (1)
230-238: 🎯 Functional Correctness | 🔵 Trivial | 💤 Low valueAssertion doesn't tie platforms/runners to the specific managed image.
This test only checks that the runner/platform substrings exist somewhere in the whole workflow file and, separately, that each image's dockerfile path exists somewhere — it never confirms that a given image's own job builds both
linux/amd64andlinux/arm64. A workflow where only one image had both platforms and the others had just one would still pass.test/dcode-base-image-workflow.test.tsalready asserts the strict per-job platform/runner/arch mapping, which mitigates this gap, but this test's own title claim ("builds both architectures and every managed image") isn't actually proven here.As per path instructions for
**/*.test.{ts,js,mts,mjs,cts,cjs}: "Flag copied production algorithms, broad mocks that bypass the behavior under test, and conditionals that make a test pass without exercising its claim."🤖 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 `@test/perl-critical-cve-remediation.test.ts` around lines 230 - 238, Strengthen the test in the “builds both architectures and every managed image” case so each managed image’s workflow job is individually verified to include both its matching runner/platform pairs and architecture configuration. Scope the assertions to the job associated with each image, reusing the existing managedImages metadata and following the strict per-job mapping established by the related workflow test instead of checking whole-file substrings.Source: Path instructions
.github/workflows/base-image.yaml (3)
452-519: 📐 Maintainability & Code Quality | 🔵 Trivial | 🏗️ Heavy liftExtract the triplicated manifest creation and verification script. All three publication jobs now inline the same ~55-line routine (digest-artifact regex, duplicate-arch rejection, per-digest
imagetools inspectplatform proof, tag assembly, post-create platform assertion). This is the trust boundary for tag publication, so three copies means a future correction has to land three times and none of the copies is covered by ShellCheck orshfmt.
.github/workflows/base-image.yaml#L452-L519: replace the inline script with a call to a newscripts/ci/create-platform-manifest.sh, passingIMAGEandTAGSas env and the digest directory as an argument..github/workflows/base-image.yaml#L557-L624: replace the identical Deep Agents Code copy with the same script call..github/workflows/base-image.yaml#L677-L706: replace the OpenClaw copy with the same script call so all three publication gates share one implementation.As per path instructions, "Derive job inventories and aggregate dependencies from one source of truth or validate them deterministically."
🤖 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/base-image.yaml around lines 452 - 519, Extract the duplicated manifest creation and verification logic into scripts/ci/create-platform-manifest.sh, preserving digest validation, platform checks, tag assembly, manifest creation, and post-create verification. At .github/workflows/base-image.yaml:452-519, :557-624, and :677-706, replace each inline routine with a call to the shared script, passing IMAGE and TAGS through the environment and the digest directory as its argument; ensure the script is executable and suitable for ShellCheck and shfmt.Source: Path instructions
214-215: 🔒 Security & Privacy | 🔵 Trivial | 💤 Low valueOptional: set
persist-credentials: falseon the new checkouts.These jobs only need the tree for
docker build, and they upload artifacts afterwards. Settingpersist-credentials: falseremoves the token from.git/configfor the rest of the job. The pre-existing OpenClaw job (line 95) has the same shape, so this is a consistency call rather than a defect.🤖 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/base-image.yaml around lines 214 - 215, Update the new Checkout steps in the workflow to set persist-credentials to false, including the checkout corresponding to the shown action reference and any matching newly added checkout jobs. Keep the existing OpenClaw checkout unchanged unless applying the same consistency setting is required by the surrounding change.Source: Linters/SAST tools
235-263: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winDrop the OpenClaw-only build-arg validation from the sibling jobs.
In
build-hermes-platformsandbuild-dcode-platforms,AGENTis neveropenclaw, soopenclaw_build_argis always empty, the CR/LF and version-format checks are unreachable, andbuild-args:at lines 276 and 389 always resolves to an empty string. Only the barescripts/check-production-build-args.shcall is load-bearing here. Trimming these two blocks removes ~50 duplicated lines and keeps theopenclaw_versioninput contract in one place.As per path instructions, "Derive job inventories and aggregate dependencies from one source of truth or validate them deterministically."♻️ Proposed simplification (repeat for both jobs)
- name: Validate production Docker build args - id: production-build-args - env: - AGENT: ${{ matrix.agent }} - OPENCLAW_VERSION_INPUT: ${{ inputs.openclaw_version }} run: | set -euo pipefail - build_args=() - openclaw_build_arg="" - if [ "$AGENT" = "openclaw" ] && [ -n "${OPENCLAW_VERSION_INPUT}" ]; then - openclaw_build_arg="OPENCLAW_VERSION=${OPENCLAW_VERSION_INPUT}" - build_args+=(--build-arg "$openclaw_build_arg") - fi - if [ "${`#build_args`[@]}" -gt 0 ]; then - scripts/check-production-build-args.sh "${build_args[@]}" - else - scripts/check-production-build-args.sh - fi - ... - printf 'openclaw_build_arg=%s\n' "$openclaw_build_arg" >> "$GITHUB_OUTPUT" + scripts/check-production-build-args.shThen remove
build-args: ${{ steps.production-build-args.outputs.openclaw_build_arg }}from the corresponding build step.Also applies to: 348-376
🤖 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/base-image.yaml around lines 235 - 263, Remove the OpenClaw-specific validation steps from the build-hermes-platforms and build-dcode-platforms jobs, including their AGENT/version environment setup and output handling. Keep only the load-bearing bare scripts/check-production-build-args.sh invocation, and remove build-args references to production-build-args.outputs.openclaw_build_arg from both corresponding build steps. Leave OpenClaw version validation centralized in the OpenClaw-specific job.Source: Path instructions
🤖 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/base-image.yaml:
- Around line 452-519: Extract the duplicated manifest creation and verification
logic into scripts/ci/create-platform-manifest.sh, preserving digest validation,
platform checks, tag assembly, manifest creation, and post-create verification.
At .github/workflows/base-image.yaml:452-519, :557-624, and :677-706, replace
each inline routine with a call to the shared script, passing IMAGE and TAGS
through the environment and the digest directory as its argument; ensure the
script is executable and suitable for ShellCheck and shfmt.
- Around line 214-215: Update the new Checkout steps in the workflow to set
persist-credentials to false, including the checkout corresponding to the shown
action reference and any matching newly added checkout jobs. Keep the existing
OpenClaw checkout unchanged unless applying the same consistency setting is
required by the surrounding change.
- Around line 235-263: Remove the OpenClaw-specific validation steps from the
build-hermes-platforms and build-dcode-platforms jobs, including their
AGENT/version environment setup and output handling. Keep only the load-bearing
bare scripts/check-production-build-args.sh invocation, and remove build-args
references to production-build-args.outputs.openclaw_build_arg from both
corresponding build steps. Leave OpenClaw version validation centralized in the
OpenClaw-specific job.
In `@test/dcode-base-image-workflow.test.ts`:
- Around line 177-255: The validatePublishers function currently contains too
many independent inline guard checks, increasing complexity. Extract the
publication validation groups—such as mutable-tag checks, full-SHA enforcement,
immutable platform output, and cache rules—into small named predicates or helper
functions, then compose their results in validatePublishers while preserving all
existing validation messages and behavior.
In `@test/perl-critical-cve-remediation.test.ts`:
- Around line 230-238: Strengthen the test in the “builds both architectures and
every managed image” case so each managed image’s workflow job is individually
verified to include both its matching runner/platform pairs and architecture
configuration. Scope the assertions to the job associated with each image,
reusing the existing managedImages metadata and following the strict per-job
mapping established by the related workflow test instead of checking whole-file
substrings.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: daf4392b-4d6e-4555-a469-a4f6d0ee0142
📒 Files selected for processing (21)
.github/workflows/base-image.yamlDockerfileDockerfile.baseagents/hermes/Dockerfileagents/hermes/Dockerfile.baseagents/langchain-deepagents-code/Dockerfileagents/langchain-deepagents-code/Dockerfile.baseci/source-shape-test-budget.jsondocs/reference/commands.mdxdocs/security/managed-base-perl-5.44-dependency-review.mdscripts/check-dcode-profile-import-gate.shscripts/security/build-perl-security-packages.shsrc/lib/onboard/dockerfile-remote-dashboard-bind-contract.tssrc/lib/sandbox-base-image-resolution.test.tssrc/lib/sandbox-base-image.tstest/dcode-base-image-workflow.test.tstest/helpers/base-apt-security-functions.tstest/hermes-share-mount-deps.test.tstest/langchain-deepagents-code-profile-build-gate.test.tstest/perl-critical-cve-remediation.test.tstest/sandbox-base-security-packages.test.ts
💤 Files with no reviewable changes (1)
- ci/source-shape-test-budget.json
PR Review Advisor — InformationalAdvisor assessment: Informational / low confidence Model lanes
Nemotron output stays in workflow artifacts and does not change the assessment above. E2E guidanceAdvisory only. E2E / PR Gate selects and runs jobs independently. Recommended E2E: This automated review informs maintainers. Warnings and suggestions do not require a response. A maintainer decides whether to merge. |
Signed-off-by: Senthil Ravichandran <senthilr@nvidia.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@src/lib/sandbox-base-image-release-resolution.test.ts`:
- Around line 276-279: Update the assertion in the sandbox release-resolution
test to inspect recorded first arguments rather than using toHaveBeenCalledWith
with a second-argument matcher. Ensure any call whose first argument is
NEAREST_RELEASE_REF is rejected, including single-argument imageInspect calls.
🪄 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: Enterprise
Run ID: cfdd8b8e-7c7c-4496-998a-17a93bb14d80
📒 Files selected for processing (1)
src/lib/sandbox-base-image-release-resolution.test.ts
Signed-off-by: Senthil Ravichandran <senthilr@nvidia.com>
Signed-off-by: Senthil Ravichandran <senthilr@nvidia.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@test/sandbox-base-security-packages.test.ts`:
- Line 8: Remove the test’s dependency on
SANDBOX_BASE_SECURITY_PACKAGE_INVENTORY and define an explicit expected security
inventory fixture within the test, including all Perl package versions. Update
the inventory assertion around the test setup at lines 99–100 to use this
fixture, keeping the expected values independent from production data.
🪄 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: Enterprise
Run ID: 4cd45482-c83e-4cfa-8d15-5c1323ff979b
📒 Files selected for processing (4)
src/lib/onboard/base-image.test.tssrc/lib/sandbox-base-image/security-inventory.tstest/helpers/onboard-script-mocks.cjstest/sandbox-base-security-packages.test.ts
Signed-off-by: Senthil Ravichandran <senthilr@nvidia.com>
Signed-off-by: Senthil Ravichandran <senthilr@nvidia.com>
|
Addressed PRA-1 in 515b5d5: |
Signed-off-by: Senthil Ravichandran <senthilr@nvidia.com>
<!-- markdownlint-disable MD041 --> ## Summary Update the canonical NemoClaw v0.0.98 release entry with the managed-image security remediation that merged after the original release documentation. The entry now records reviewed Perl 5.44.0 packages across OpenClaw, Hermes, and Deep Agents Code images and the native multi-platform publication check. ## Changes - Update `docs/changelog/2026-07-29.mdx` under the existing `## v0.0.98` heading. - Record the checksum-pinned Perl 5.44.0 packages and native `linux/amd64` and `linux/arm64` digest checks from [#7864](#7864). - Confirm that the other post-entry merges, [#7868](#7868) and [#7866](#7866), change E2E orchestration or tests without changing user-facing behavior. ### Source Summary - [#7864](#7864) -> `docs/changelog/2026-07-29.mdx`: Record the reviewed Perl 5.44.0 packages and native multi-platform publication checks for managed OpenClaw, Hermes, and Deep Agents Code images. ## Type of Change - [ ] Code change (feature, bug fix, or refactor) - [ ] Code change with doc updates - [x] Doc only (prose changes, no code sample modifications) - [ ] Doc only (includes code sample changes) ## Quality Gates - [ ] Tests added or updated for changed behavior - [x] Existing tests cover changed behavior — justification: The merged source PR includes security-package, runtime, and publication tests. `test/changelog-docs.test.ts` validates the release-entry structure. - [ ] Tests not applicable — justification: - [x] Docs updated for user-facing behavior changes - [ ] Docs not applicable — justification: - [ ] Sensitive paths changed (security, policy, credentials, preflight, onboarding, inference, runner, sandbox, or messaging) - [ ] Sensitive-path review completed or maintainer-approved waiver recorded — reviewer/approval link/justification: - [ ] Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue: ## Documentation Writer Review - [ ] Documentation writer subagent reviewed the completed changes - Result: `blocked` - Evidence: This side-conversation host does not permit subagents. The primary author reviewed `docs/changelog/2026-07-29.mdx` against `WRITING.md`, the controlled word list, and `docs/CONTRIBUTING.md`. The changelog contract passed 6 tests, and the docs build completed with 0 errors and 2 existing Fern warnings. - Agent: Codex Desktop side conversation <!-- docs-review-head-sha: 8e92d96 --> <!-- docs-review-agents-blob-sha: c052d60 --> ## DGX Station Hardware Evidence - [ ] Tested on DGX Station - Tested commit: Not applicable. `scripts/prepare-dgx-station-host.sh` is unchanged. - Station profile/scenario: Not applicable. - Result: Not applicable. - Supporting evidence: Not applicable. ## Verification - [x] PR description includes a `Signed-off-by:` line and every commit appears as `Verified` in GitHub - [x] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed, or `npm run validate:pr` passed after refreshing `origin/main` when hooks were skipped or unavailable - [x] Targeted behavior tests pass for the current change set, or tests are marked not applicable above — `npm exec -- vitest run test/changelog-docs.test.ts` passed 6 tests. - [ ] Applicable broad gate passed — `npm test` for broad runtime/test-harness changes; `npm run check` for repo-wide validation/coverage changes — command/result: Not run for this documentation-only change. - [x] Quality Gates section completed with required justifications or waivers - [x] No secrets, API keys, or credentials committed - [ ] `npm run docs` builds without warnings (doc changes only) — The build completed with 0 errors and 2 existing Fern warnings. - [x] Doc pages follow the [style guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md) (doc changes only) - [ ] New doc pages include SPDX header and frontmatter (new pages only) — No new page was added. --- Signed-off-by: Julie Yaunches <jyaunches@nvidia.com> Signed-off-by: Julie Yaunches <jyaunches@nvidia.com>
Summary
Hermes and LangChain Deep Agents Code base images currently retain Debian Perl 5.40.1 even though the OpenClaw base already installs the reviewed Perl 5.44.0 security packages.
This change gives all three managed images the same checksum-pinned, fully tested Perl build and publishes the sibling multi-platform images from native runners.
Product Scope
This remediation stays within NemoClaw's existing managed OpenClaw, Hermes, and Deep Agents Code base-image surface. It does not add a new image, integration, or supported workflow.
NemoClaw maintainers own the temporary Perl packaging lifecycle. Remove it when Debian trixie provides an acceptable fixed package. Compatibility and publication evidence cover native
linux/amd64andlinux/arm64builds, checksum-bound source, the complete selected upstream test set, package and runtime probes, immutable inventory checks, and atomic multi-platform publication.Changes
Type of Change
Quality Gates
Documentation Writer Review
docs-updated/root/documentation_writer_review)DGX Station Hardware Evidence
Verification
Signed-off-by:line and every commit appears asVerifiedin GitHubpre-commit,commit-msg, andpre-pushhooks passed, ornpm run validate:prpassed after refreshingorigin/mainwhen hooks were skipped or unavailablenpm run check:diffpassed after rebasing onto currentupstream/main.npm run docsbuilds without errors (doc changes only)Signed-off-by: Senthil Ravichandran senthilr@nvidia.com
Summary by CodeRabbit
perl-base/perlpackages across managed base images and agent images.