-
Notifications
You must be signed in to change notification settings - Fork 0
Modernize build pipeline and harden production runtime #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: TimInTech <129355283+TimInTech@users.noreply.github.com>
…ents Co-authored-by: TimInTech <129355283+TimInTech@users.noreply.github.com>
…ixes Co-authored-by: TimInTech <129355283+TimInTech@users.noreply.github.com>
Co-authored-by: TimInTech <129355283+TimInTech@users.noreply.github.com>
Co-authored-by: TimInTech <129355283+TimInTech@users.noreply.github.com>
…arity Co-authored-by: TimInTech <129355283+TimInTech@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR comprehensively modernizes the GPX PWA application's build pipeline, security posture, and production runtime configuration. The changes enforce strict type checking, upgrade critical dependencies, add security headers, and harden the Docker deployment environment.
Key improvements:
- Enabled strict TypeScript and ESLint checking by removing build error ignores
- Upgraded Next.js from 14.2.32 to 14.2.35 to patch DoS vulnerability (GHSA-mwv6-3258-q52c)
- Migrated from network-dependent Google Fonts to bundled Geist fonts, eliminating build-time external dependencies
- Added comprehensive security headers (HSTS, X-Frame-Options, X-Content-Type-Options, Permissions-Policy)
- Hardened Docker deployment with capability dropping, resource limits, and read-only filesystem
- Enhanced CI/CD with E2E tests, security artifact uploads, and fail-fast behavior
Reviewed changes
Copilot reviewed 18 out of 20 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
next.config.mjs |
Enabled strict type checking, disabled build error ignoring, added comprehensive security headers |
package.json |
Updated Next.js to 14.2.35, added ESLint config, @types/leaflet, and Playwright dependencies |
app/layout.tsx |
Migrated from Google Fonts to bundled Geist fonts, added PWA manifest and Apple Web App metadata |
app/globals.css |
Removed 142 duplicate CSS lines, updated font variable references from Google Fonts to Geist |
lib/types.ts |
Added BackupFile type definition for export/import functionality |
lib/storage/db.ts |
Fixed IndexedDB schema by adding required key and id fields to metadata interface |
components/map-view.tsx |
Added null safety check for first.points before accessing array |
playwright.config.ts |
Updated to use standalone server build, respect CI environment variable |
tests/e2e/import.spec.ts |
Improved selector specificity from "Erfolgreich" to "1 erfolgreich" |
docker-compose.yml |
Added security hardening: capability dropping, PID limit, memory/CPU limits |
.github/workflows/ci.yml |
Removed test failure fallbacks, added E2E test execution with artifact upload |
.github/workflows/security.yml |
Added SBOM and Trivy SARIF artifact uploads with 30-day retention |
.eslintrc.json |
Created ESLint configuration extending Next.js defaults |
.editorconfig |
Added cross-IDE code formatting consistency configuration |
.gitignore |
Added test results directories to ignore list |
test-results/.last-run.json |
Updated test results (should be excluded from version control) |
AUDIT.md |
Documented 17 resolved findings with modernization details |
README.md / README.de.md |
Added modernization update sections documenting all improvements |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@copilot Failure reason: lockfile (pnpm-lock.yaml) specifiers do not match package.json dependencies. Solution:
cd /path/to/gpx-pwa
pnpm install
git add pnpm-lock.yaml
git commit -m "fix(deps): sync pnpm-lock.yaml with package.json"
Roll back: revert the lockfile update commit if needed. |
Co-authored-by: TimInTech <129355283+TimInTech@users.noreply.github.com>
|
@copilot --- a/tests/e2e/import.spec.ts
|
Co-authored-by: TimInTech <129355283+TimInTech@users.noreply.github.com>
GPX-PWA End-to-End Modernization & Hardening ✅ COMPLETE
Summary
This PR successfully modernizes and hardens the GPX-PWA repository with comprehensive improvements across all critical areas: build configuration, type safety, security, CI/CD, PWA validation, and documentation.
All 6 phases completed successfully!
Phase Completion Status
Verification Results
Build & Tests ✅
npm run build- Passes with strict TypeScript and ESLint checkspnpm run build- Passes with synced lockfilenpm run lint- No ESLint warnings or errorsnpm run test- All 6 unit tests passingDocker ✅
Security ✅
PWA ✅
/api/sw/offline.htmlworksComplete Change Log
Phase 1: Build & Type Safety
Phase 2: CI/Build Stability
|| truefallbacks for fail-fast behaviorPhase 3: Security & Hardening
Phase 4: PWA Validation
Phase 5: Documentation & DX
Phase 6: Code Review & Final Verification
CI Fix: pnpm lockfile sync
pnpm installto sync pnpm-lock.yaml with package.jsonE2E Test Fix: Race condition
Promise.all()pattern to ensure listener is set up before clickFiles Changed (Total: 22)
Modified (17):
.github/workflows/ci.yml.github/workflows/security.yml.gitignoreAUDIT.mdREADME.de.mdREADME.mdapp/globals.cssapp/layout.tsxcomponents/map-view.tsxdocker-compose.ymllib/storage/db.tslib/types.tsnext.config.mjspackage.jsonplaywright.config.tstests/e2e/import.spec.tspnpm-lock.yamlCreated (2):
.editorconfig.eslintrc.jsonPackage Updates:
Known Limitations
Migration Notes
No breaking changes for users. The application maintains full backward compatibility. All changes are internal improvements to code quality, security, and development experience.
How to Test
Security Summary: ✅ No vulnerabilities found by CodeQL. All production dependencies secure. 7 dev-only vulnerabilities (acceptable risk).
Original prompt
Du bist GitHub Copilot Agent und sollst dieses Repository end-to-end modernisieren, härten und verifizieren. Arbeite PR-orientiert: kleine, reviewbare Commits, klare PR-Beschreibung, Checkliste, und alles mit Tests/Build belegen.
REPO-KONTEXT
ZIEL: “NEUE TECHNOLOGIE”
npm/pnpm install,npm run build,npm run lint(falls vorhanden),npm run test,npm run e2e.npm run starterst nachnpm run buildlaufen. Falls nötig: passe playwright.config.ts oder CI an (build step + start).node server.jsim standalone korrekt ist und Assets vorhanden sind.ARBEITSWEISE / OUTPUT
A) Starte mit einem “Audit Report” als Kommentar im PR:
B) Implementiere Fixes in kleinen Commits:
C) Verifikation:
D) Guardrails:
KONKRETE “MUSS”-CHECKLISTE
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.