Resolve issues #2, #11, #15, #16, #22, #34#85
Open
MicD746 wants to merge 2 commits into
Open
Conversation
…ertexChainLabs#15 VertexChainLabs#16 VertexChainLabs#22 VertexChainLabs#34 - VertexChainLabs#2 security: remove hardcoded DB password defaults in configuration - configuration.ts, data-source.ts, database.module.ts: drop fallback credentials for DATABASE_USER/PASSWORD/NAME - main.ts: add pre-flight check that throws before NestFactory.create when required DB env vars are missing - VertexChainLabs#11 security: add Helmet HTTP security headers middleware - main.ts: import helmet@^8.2.0 and apply globally before other middleware - VertexChainLabs#15 security: cap JSON/urlencoded request body size - main.ts: app.useBodyParser with default 100kb, override via MAX_BODY_SIZE - VertexChainLabs#16 security: per-IP rate limiting differentiation - app.module.ts: ThrottlerModule with THROTTLE_TTL_MS / THROTTLE_LIMIT driven config; global ThrottlerGuard via APP_GUARD (default tracks by req.ip); per-route @Throttle / @SkipThrottle on gists controller - main.ts: app.set("trust proxy", TRUST_PROXY) before middleware so X-Forwarded-For is honored behind ALB / nginx / Cloudflare - auth-vs-anon differentiation deferred to Issue VertexChainLabs#3 - VertexChainLabs#22 refactor: enable strict TypeScript checks in Backend - tsconfig.json: strictNullChecks, noImplicitAny, strictBindCallApply, forceConsistentCasingInFileNames, noFallthroughCasesInSwitch enabled - strictPropertyInitialization left disabled with rationale comment (NestJS constructor injection without explicit `!`) - VertexChainLabs#34 ci: Dependabot configuration for automated dependency PRs - .github/dependabot.yml: weekly Monday checks for npm Backend/Frontend/ analytics, cargo contracts, and github-actions, grouped minor/patch updates with `dependencies` + `automation` labels - infrastructure/ci/dependency-updates.yml: schedule disabled to avoid duplicate weekly PRs alongside Dependabot (manual workflow_dispatch retained for emergencies) Closes VertexChainLabs#2, VertexChainLabs#11, VertexChainLabs#15, VertexChainLabs#16, VertexChainLabs#22, VertexChainLabs#34
Contributor
|
Hey @MicD746 👋 Really appreciate the breadth of fixes bundled here — tackling #2, #11, #15, #16, #22, and #34 in one go is ambitious. However, CI is currently failing on two checks on this PR: the Backend (NestJS) job and the Validate PR title (Conventional Commits) lint (the current title A couple of options if you’d like to keep the bundle: (1) retitle the PR with a Conventional Commits prefix (e.g. |
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.
Resolves all 6 open issues owned by MicD746 in one batch.
gistDB credentials removed fromBackend/src/config/configuration.ts,Backend/src/database/data-source.ts, andBackend/src/database/database.module.ts. Added preflight check inBackend/src/main.tsthat throws beforeNestFactory.createifDATABASE_USER,DATABASE_PASSWORD, orDATABASE_NAMEare missing.helmet@^8.2.0) applied globally inBackend/src/main.tsbefore any other middleware.MAX_BODY_SIZEenv override) viaapp.useBodyParserinBackend/src/main.ts.@nestjs/throttler.ThrottlerModule.forRootAsyncreadsTHROTTLE_TTL_MS/THROTTLE_LIMIT; globalThrottlerGuard(APP_GUARD) tracks byreq.ip;GistsControllerannotates the write path with@Throttleand the read paths with@SkipThrottle.app.set("trust proxy", TRUST_PROXY)makes X-Forwarded-For work behind ALB / nginx. Auth-vs-anon differentiation is wired up to receive higher limits once Issue security: implement authentication and authorization layer for all API endpoints #3 lands.strictNullChecks,noImplicitAny,strictBindCallApply,forceConsistentCasingInFileNames,noFallthroughCasesInSwitchinBackend/tsconfig.json.strictPropertyInitializationis intentionally left disabled (with rationale) because NestJS constructor injection patterns rely on it..github/dependabot.ymlcovers npm (Backend,Frontend,analytics), cargo (contracts), andgithub-actionswith a weekly Monday schedule, grouped minor/patch updates, and the requireddependencies+automationlabels. The legacyinfrastructure/ci/dependency-updates.ymlschedule is disabled to avoid duplicate weekly PRs alongside Dependabot — manualworkflow_dispatchretained for emergencies.Verification
npx tsc --noEmit(strict TS) → cleannpm run build→ clean