fix: resolve assigned issues #1115, #1116, #1117, #1118#1119
Merged
Conversation
…absCrypt#1118 Closes LabsCrypt#1115 Closes LabsCrypt#1116 Closes LabsCrypt#1117 Closes LabsCrypt#1118 - Frontend Dockerfile: use production-only deps, add non-root user, add HEALTHCHECK - Oracle tests: add MockRateOracle contract and exercise the oracle interest-rate code path including in-bounds, below-min, above-max, get/set, and event emission - ENVIRONMENT.md: document ADMIN_WALLETS, LENDER_WALLETS, EXPOSE_STACK_TRACES, JWT_COOKIE_NAME; add them to .env.example for CI drift check - webhooks.md: fix signature docs to match actual sha256=<hex> header format, correct secret source to per-subscription secret, align with webhook-signatures.md
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
npm ci --omit=dev, adds a non-rootappuser, and includes aHEALTHCHECKdirective matching the backend pattern.MockRateOraclecontract to the test module. New tests exercise the oracle branch: in-bounds rate is applied, below-min falls back to default, above-max falls back to default,get_rate_oraclereturns the set address, and theRateOracleUpdatedevent is emitted.ADMIN_WALLETS,LENDER_WALLETS,EXPOSE_STACK_TRACES, andJWT_COOKIE_NAMEindocs/ENVIRONMENT.mdwith security notes. Added all four tobackend/.env.exampleso theenv-docs-checkCI drift job enforces their presence.sha256=<hex>header format over the raw body (no timestamp prefix). Corrected the secret source from a nonexistentWEBHOOK_SIGNING_SECRETenv var to the per-subscription secret. Aligneddocs/wiki/webhook-signatures.mdExpress example accordingly.Closes #1115
Closes #1116
Closes #1117
Closes #1118
Test plan
frontend/Dockerfilebuilds successfully and the runner stage runs asappuser(non-root)HEALTHCHECKpasses when the frontend is runningcargo testincontracts/loan_manager— new oracle tests should passenv-docs-checkCI passes with the new vars in bothENVIRONMENT.mdand.env.exampledocs/webhooks.mdmatchesdocs/wiki/webhook-signatures.mdand the actual server behavior inwebhookService.ts