Cierre 1: gate de publicación en hardcap admin API #20

Open
cayce wants to merge 0 commits from hardcap-containment into main
Owner

PATCH → PUBLISHED pasa por el outbox (E2E verificado: staged, artículo intacto). bitcoinhotels: solo frontend. outbox auto-suficiente. 🔴 hallazgo aparte: admin API sin auth y expuesta en :3001.

PATCH → PUBLISHED pasa por el outbox (E2E verificado: staged, artículo intacto). bitcoinhotels: solo frontend. outbox auto-suficiente. 🔴 hallazgo aparte: admin API sin auth y expuesta en :3001.
cayce added 1 commit 2026-10-31 17:12:08 +00:00
containment: hardcap admin API publish gate + outbox self-sufficient pool
ci / lint-test-leaks (pull_request) Canceled after 0s
87a2829b8a
- hardcap PATCH /admin/articles/:id → PUBLISHED now stages into
  outbound_drafts (channel hardcap) instead of publishing, when
  HARDCAP_PUBLISH_MODE=draft (default). Fail-closed. Verified E2E:
  PATCH on a QUEUED article returned {staged:true, draft_id:7} and the
  article stayed QUEUED.
- bitcoinhotels.org: audited — frontend only (Next.js), no publishing
  path; nothing to contain.
- outbox.mjs: self-sufficient pool (createRequire from
  /srv/cayce-core/node_modules/pg — hosts may lack pg; found by the
  promo simulation which now works end-to-end).
- runtime/hardcap/admin.ts: versioned copy of the patched route
  (hardcap-backend itself is not a git repo).
- deploy.sh: hardcap env wiring (HARDCAP_PUBLISH_MODE, IDENTITY_PATH,
  CAYCE_PGURL appended server-side).

🔴 UNRELATED CRITICAL FINDING (needs operator decision, not patched
without approval): hardcap admin API has NO authentication and binds
*:3001 — reachable from the public internet (HTTP 200 from outside,
including DELETE /admin/articles/all). Recommend: auth middleware +
bind 127.0.0.1 + firewall, plus rotation of credentials that appeared
in journald (hardcap DB role DSN leaked via a psql error line during
testing — fixed in the same patch, but journald retains it).
Some required checks failed
ci / lint-test-leaks (pull_request) Canceled after 0s
This branch is already included in the target branch. There is nothing to merge.
This branch is out-of-date with the base branch
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin hardcap-containment:hardcap-containment
git checkout hardcap-containment
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: cayce/cayce-ops#20