Skip to content

Fix: Remove committed private TLS material and auto-generate local test assets - #6

Open
mertcano wants to merge 1 commit into
etherlinkcom:mainfrom
mertcano:mertcano-patch-1
Open

Fix: Remove committed private TLS material and auto-generate local test assets#6
mertcano wants to merge 1 commit into
etherlinkcom:mainfrom
mertcano:mertcano-patch-1

Conversation

@mertcano

Copy link
Copy Markdown

Description

This PR addresses a critical secret exposure finding within the safe-client-gateway repository by removing hardcoded cryptographic assets and automating their secure generation for local development.

Vulnerabilities & Security Defects Remediated:

  • Secrets and Configuration Management (db_config/test/server.key, db_config/test/server.crt): A complete private RSA key and its corresponding certificate were previously committed to version control. Both of these artifacts have been completely removed from the repository.
  • Safe Asset Generation (scripts/generate-test-tls.sh, test/global-setup.ts): Added a reproducible shell script (generate-test-tls.sh) that generates short-lived, localhost-only test TLS assets using OpenSSL, enforcing strict owner-only permissions (chmod 0600) on the private key. The Jest global setup routine has been updated to automatically provision these files on a fresh checkout if they do not already exist.

Summary

Changes

…st assets

### Description
This PR addresses a critical secret exposure finding within the `safe-client-gateway` repository by removing hardcoded cryptographic assets and automating their secure generation for local development.

**Vulnerabilities & Security Defects Remediated:**
* **Secrets and Configuration Management (`db_config/test/server.key`, `db_config/test/server.crt`):** A complete private RSA key and its corresponding certificate were previously committed to version control. Both of these artifacts have been completely removed from the repository.
* **Safe Asset Generation (`scripts/generate-test-tls.sh`, `test/global-setup.ts`):** Added a reproducible shell script (`generate-test-tls.sh`) that generates short-lived, localhost-only test TLS assets using OpenSSL, enforcing strict owner-only permissions (`chmod 0600`) on the private key. The Jest global setup routine has been updated to automatically provision these files on a fresh checkout if they do not already exist.
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