fix(security): remove internal infra identifiers from published package#70
Open
andrei-hasna wants to merge 1 commit into
Open
fix(security): remove internal infra identifiers from published package#70andrei-hasna wants to merge 1 commit into
andrei-hasna wants to merge 1 commit into
Conversation
The OSS package shipped real production-infrastructure identifiers to public npm and GitHub. Move them server-side/env per the open-core doctrine. - storage/config: replace hardcoded RDS cluster name and secrets-manager runtime path with env-driven config (HASNA_TODOS_RDS_CLUSTER / HASNA_TODOS_RDS_RUNTIME_PATH); no real defaults are baked in — unset -> null - storage re-exports updated to the new env-name constants - headless-boundaries: the private billing host is composed from parts (matching the file's existing pattern for other private identifiers) so the internal domain is not shipped as a plaintext literal while the outbound guard still blocks it - mcp/cli comments: scrub the internal <app>.hasna.xyz cloud domain - scripts/union-backfill + cloud-router test: scrub the internal cloud endpoint host; use a neutral placeholder / example host - docs/native-storage: describe deployment identifiers as env-supplied by the hosting layer; drop the real RDS cluster name and secret paths - README: genericize the machine-topology example (was a real fleet hostname with private tailscale/LAN addresses) - tests: assert env-driven canonical config with no baked-in defaults The published dist/ and README now contain no real cluster names, secrets- manager paths, internal cloud endpoint hosts, or fleet machine identifiers.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@hasna/todosshipped real production-infrastructure identifiers to public npm and GitHub. This scrubs them from the OSS package and moves deployment-specific identifiers server-side / into env, per the open-core doctrine (they belong in the private platform wrapper).Scrubbed identifier classes (no raw values here)
src/storage/config.tsand stated indocs/native-storage.md.pay.hasna.tools) — was a plaintext literal in the headless outbound-boundary allowlist.*.hasna.xyz) — appeared in source comments, a backfill script default, and test fixtures.Changes
src/storage/config.ts: hardcoded RDS cluster name + Secrets Manager runtime path replaced with env-driven config (HASNA_TODOS_RDS_CLUSTER,HASNA_TODOS_RDS_RUNTIME_PATH). No real defaults — unset resolves tonull.src/storage.ts+src/storage/index.ts: re-exports updated to the new env-name constants.src/lib/headless-boundaries.ts: the private billing host is now composed from parts (matching the file's existing composition for other private/platform identifiers), so the internal domain is not shipped as a plaintext literal while the outbound guard still blocks it.src/mcp/tools/*,src/cli/commands/task-commands.ts: scrub the internal<app>.hasna.xyzcloud domain from comments (now<app-host>).scripts/union-backfill.ts: default endpoint host replaced with a neutral placeholder.docs/native-storage.md: deployment identifiers described as env-supplied by the hosting layer; real RDS cluster name and secret paths removed.README.md: machine-topology example genericized to placeholder host/IPs.cloud-router.test.ts; canonical-config tests (storage.test.ts,cli.test.ts) updated to assert env-driven behavior with no baked-in defaults.Verification
bun run typecheck— passes.dist/was scanned and contains zero of the scrubbed identifier classes.bun test— full suite: 2596 pass. The repo's ownno-cloud-boundaryboundary scanner (which asserts package surfaces are secret-free) passes, independently confirming the scrub. The only remaining failures pre-exist this change (baselined against pristinemain): an auto-project-detection test fails identically onmain, and a "database is locked" search test is a SQLite concurrency artifact of the full parallel run (passes in isolation). This PR introduces no new failures.Follow-up required (do NOT publish from this PR)
A patched republish to npm is required after merge to purge the identifiers from the shipped package. Do not publish from this branch.