chore(security): track fix-forward hardening for historical OpenClaw revisions
- Dominant language
- TypeScript
- Stars
- 22.5k
- Forks
- 3.1k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 715
Description
## Context
This is the fix-forward follow-up from the review of #7276 and is a child of #7272.
PR #7276 must still resolve its security blockers and required merge gates before landing. This task tracks the lower-risk hardening and test work that does not need to delay that historical security revision.
## Scope
- Make the Docker build-time `tar` overlay recoverable or atomic under injected copy, rename, and metadata-write failures, even though a failed Docker build is already prevented from publishing.
- Replace or harden the `lstat`-then-read/write file handling reported by CodeQL, or document and record the bounded same-user threat-model decision if the finding is intentionally accepted.
- Ensure informational wrapper invocations such as `openclaw plugins install --help` cannot patch or otherwise mutate existing plugin state.
- Add broader wrapper integration and filesystem failure-injection coverage beyond the focused regressions required in #7276, including argument forwarding, staged replacement, swap failures, metadata failures, and post-write verification failures.
- Reproduce the unrelated `src/lib/onboard/gateway-recovery.test.ts` timeout seen in #7276 CI. If it is repeatable, split it into a dedicated CI-flake issue and link it here; otherwise record evidence that it was runner noise.
## Non-goals
The following remain pre-merge requirements in #7276 and must not be deferred here:
- profile, `--dev`, and `OPENCLAW_STATE_DIR` remediation bypasses;
- fail-closed cleanup or rollback when runtime plugin remediation fails;
- the production build-argument guard;
- bounded handling of the reviewed dependency audit so required CI is green.
## Acceptance criteria
- [ ] Docker overlay failure-injection tests demonstrate that no partial revision can be published.
- [ ] The CodeQL file-race finding is fixed or has a documented, maintainer-approved threat-model disposition.
- [ ] Help and other non-install wrapper paths are proven side-effect free.
- [ ] Wrapper integration coverage exercises reviewed and unreviewed targets plus the principal filesystem failure boundaries.
- [ ] The gateway-recovery timeout is either linked to a focused issue with reproduction evidence or documented as non-reproducible runner noise.
- [ ] Every follow-up change or split issue links back to #7272 and #7276.
## Relationships
- Parent: #7272
- Originating implementation: #7276
- Revised review: https://github.com/NVIDIA/NemoClaw/pull/7276#pullrequestreview-4741181243
Contributor guide
Assessment
This issue has not been assessed yet.