Skip to content

Fixed docker build - #114

Merged
maximgorbatyuk merged 2 commits into
mainfrom
docker-fix
Jan 6, 2026
Merged

maximgorbatyuk merged 2 commits into
mainfrom
docker-fix

Conversation

@maximgorbatyuk

@maximgorbatyuk maximgorbatyuk commented Jan 6, 2026 •

Copy link
Copy Markdown
Member

Summary by CodeRabbit

Release Notes

  • New Features

    • Charts now hide non-USD and EUR currency datasets by default.
  • Chores

    • Locked dependency versions for consistent and reproducible builds.
    • Updated dependency installation process for improved stability.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai

coderabbitai Bot commented Jan 6, 2026 •

Copy link
Copy Markdown

Walkthrough

The PR removes the --legacy-peer-deps flag from the npm ci build command in the Dockerfile, tightens dependency version constraints in package.json by converting from range specifiers to fixed versions (affecting Angular core packages, zone.js, and dev tools), and adds an optional hidden boolean parameter to the DatasetItem class to control dataset visibility in the currencies chart.

Changes

Cohort / File(s) Summary
Build configuration
Dockerfile
Removed --legacy-peer-deps flag from npm ci command, tightening dependency resolution during build stage
Dependency management
package.json
Converted Angular packages (animations, common, compiler, core, forms, platform-browser, platform-browser-dynamic, platform-server, router, ssr) from ~20.3.13 to 20.3.13; zone.js from ^0.16.0 to ~0.15.0; angular-eslint/schematics from ^20.7.0 to 20.7.0; dev dependencies (@angular/build, @angular/cli, @angular/compiler-cli) to exact versions
Chart component
src/app/modules/salaries/components/currencies-chart-page/currencies-chart-object.ts
Added optional hidden boolean parameter (default false) to DatasetItem constructor and readonly property; datasets for non-USD/EUR currencies now hidden by default in chart instantiation

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Title check ⚠️ Warning The title 'Fixed docker build' is only partially related to the changeset. While the Dockerfile is modified, the PR also includes significant package.json dependency updates and source code changes to currencies-chart-object.ts, making the title incomplete and not representative of the main scope. Revise the title to reflect all significant changes, such as 'Remove legacy peer deps from Docker build and pin dependencies' or provide a more comprehensive summary that captures the full scope of modifications.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@maximgorbatyuk
maximgorbatyuk merged commit 624837e into main Jan 6, 2026
1 check passed

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
Dockerfile (1)

21-21: Remove --legacy-peer-deps for consistency with the build stage.

The build stage (line 5) successfully removes --legacy-peer-deps, but the production stage still uses it. Since the exact version pinning in package.json resolves peer dependency conflicts, this flag should be removed here as well for consistency.

🔎 Proposed fix
-RUN npm ci --omit=dev --legacy-peer-deps
+RUN npm ci --omit=dev
🤖 Fix all issues with AI Agents
In @package.json:
- Around line 22-31: The @angular/* dependencies listed (@angular/animations,
@angular/common, @angular/compiler, @angular/core, @angular/forms,
@angular/platform-browser, @angular/platform-browser-dynamic,
@angular/platform-server, @angular/router, @angular/ssr) must be bumped from
20.3.13 to 20.3.14; update each version string to "20.3.14", keep zone.js pinned
to ~0.15.0, then reinstall and regenerate lockfile (npm install or yarn install)
and run the test/build to ensure compatibility.
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c3b0793 and cad8fdd.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json, !**/package-lock.json
📒 Files selected for processing (3)
  • Dockerfile
  • package.json
  • src/app/modules/salaries/components/currencies-chart-page/currencies-chart-object.ts
🧰 Additional context used
📓 Path-based instructions (1)
**/*.ts

⚙️ CodeRabbit configuration file

**/*.ts: Review TypeScript code for:

  • Proper typing and avoiding 'any' type
  • Consistent use of interfaces and type aliases
  • Null safety with strict null checks
  • Proper error handling
  • Code organization and single responsibility

Files:

  • src/app/modules/salaries/components/currencies-chart-page/currencies-chart-object.ts
🧠 Learnings (1)
📓 Common learnings
Learnt from: maximgorbatyuk
Repo: Techinterview-space/frontend PR: 74
File: src/app/modules/companies/components/add-review-page/add-review-page.component.spec.ts:31-33
Timestamp: 2025-04-30T04:43:39.004Z
Learning: maximgorbatyuk is prioritizing MVP functionality for the companies feature and may address expanded test coverage (form validation, submission, error handling, rating selection) in a later phase.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build
🔇 Additional comments (2)
Dockerfile (1)

5-5: LGTM! Removal of --legacy-peer-deps aligns with dependency pinning.

The build stage now uses npm ci without the --legacy-peer-deps flag, which is appropriate given that package.json has been updated to use exact versions, eliminating peer dependency conflicts.

src/app/modules/salaries/components/currencies-chart-page/currencies-chart-object.ts (1)

78-86: LGTM! Clean implementation of dataset visibility control.

The addition of the hidden parameter to DatasetItem with a default value of false is well-implemented and type-safe. The logic correctly hides all currencies except USD and EUR by default (line 84), which improves the initial chart readability while still allowing users to toggle other currencies via the legend.

Also applies to: 156-156

Comment thread package.json
Comment on lines +22 to +31
"@angular/animations": "20.3.13",
"@angular/common": "20.3.13",
"@angular/compiler": "20.3.13",
"@angular/core": "20.3.13",
"@angular/forms": "20.3.13",
"@angular/platform-browser": "20.3.13",
"@angular/platform-browser-dynamic": "20.3.13",
"@angular/platform-server": "20.3.13",
"@angular/router": "20.3.13",
"@angular/ssr": "20.3.13",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify Angular package versions and check for security advisories

echo "=== Checking Angular 20.3.13 availability ==="
npm view @angular/core@20.3.13 version 2>/dev/null || echo "Version not found"

echo -e "\n=== Checking zone.js 0.15.0 availability ==="
npm view zone.js@0.15.0 version 2>/dev/null || echo "Version not found"

echo -e "\n=== Checking @angular/cli 20.3.11 availability ==="
npm view @angular/cli@20.3.11 version 2>/dev/null || echo "Version not found"

echo -e "\n=== Checking for security advisories ==="
npm audit --package-lock-only 2>&1 | head -20

Repository: Techinterview-space/frontend

Length of output: 629


🏁 Script executed:

cat -n package.json | head -70

Repository: Techinterview-space/frontend

Length of output: 3188


🌐 Web query:

Angular 20.3.13 security advisories vulnerabilities

💡 Result:

Short answer: Angular 20.3.13 is affected by multiple high‑severity advisories; you should upgrade to patched releases.

What affects 20.3.13

  • XSRF token leakage (GHSA-58c5-g7wp-6w37 / CVE-2025-66035): protocol‑relative URLs in HttpClient can leak anti‑CSRF tokens — affects 19.2.15 / 20.3.13 / 21.0.0. Upgrade to the patched releases. [1][2]
  • Stored XSS in the template compiler (GHSA-v4hv-rgfq-gp49): incomplete sanitization of certain SVG/MathML attributes allows XSS; fixed in later 20.3.x/21.x releases (see recommended patched versions). [3][4]
  • SSR global platform injector race (GHSA-68x2-mx4q-78m7): server‑side rendering race can cause cross‑request data leakage; fixed in the 20.3.x server/ssr patch. [3]

Sources / references

  1. GitHub Security (angular/angular) advisory list. [3]
  2. stack.watch / vulnerability summary for Angular (lists CVE-2025-66035 and affected versions). [2]
  3. Snyk vulnerability entry for @angular/compiler (shows stored XSS affecting 20.3.13 and fixed in later 20.3.x). [4]
  4. Snyk / package advisories for @Angular-devkit / release notes referencing SSR/XSRF fixes. [5]

Recommended action (concise)

  • Upgrade Angular packages to the fixed patch versions (move to the Angular 20.3.x patched release recommended by the advisories, or to 21.0.2+ where applicable).
  • If you can’t upgrade immediately, audit usage of HttpClient with protocol‑relative URLs and avoid binding untrusted content into SVG/MathML attributes; treat server SSR usage as potentially vulnerable until patched.
    If you want, I can look up the exact minimum patched version numbers for each affected package in your project and list the npm/yarn update commands.

🌐 Web query:

Angular 20.3 patched versions security CVE-2025-66035 XSRF

💡 Result:

Patched 20.3 release: upgrade to Angular 20.3.14 (fixes CVE-2025-66035). Recommended workaround until patched: avoid protocol‑relative URLs (URLs beginning with //) in HttpClient requests. [1][2]

Sources:
[1] GitHub Advisory (GHSA-58c5-g7wp-6w37) — lists 20.3.14 as patched.
[2] NVD / CVE-2025-66035 — vulnerability description and patched versions.


🌐 Web query:

Angular 20.3 zone.js compatibility 0.15.0 0.16.0 requirements

💡 Result:

Short answer: Angular 20.3 expects zone.js ~0.15.x (not 0.16). Support for zone.js 0.16.x was added later (Angular 21 shows peer dependency "~0.15.0 || ~0.16.0"). [1][2]

Sources:

  • @angular/core (20.x) dependency shows zone.js ~0.15.0. [1]
  • @angular/core (21.x) peerDependencies allow ~0.15.0 || ~0.16.0. [2]

References:

  1. @angular/core 20.x dependency listing (zone.js ~0.15.0). [1]
  2. @angular/core 21.x package.json (zone.js: "~0.15.0 || ~0.16.0"). [2]

Upgrade Angular packages to 20.3.14 to patch critical security vulnerabilities.

Angular 20.3.13 contains high-severity security advisories that require immediate action:

  • CVE-2025-66035: XSRF token leakage via protocol-relative URLs in HttpClient
  • Stored XSS: Incomplete sanitization of SVG/MathML attributes in template compiler
  • SSR race condition: Cross-request data leakage in server-side rendering

Upgrade all @angular/* packages to 20.3.14 (or later 20.3.x patch). The zone.js ~0.15.0 pinning is correct for Angular 20.3.x compatibility (0.16.x support was added in Angular 21).

🤖 Prompt for AI Agents
In @package.json around lines 22 - 31, The @angular/* dependencies listed
(@angular/animations, @angular/common, @angular/compiler, @angular/core,
@angular/forms, @angular/platform-browser, @angular/platform-browser-dynamic,
@angular/platform-server, @angular/router, @angular/ssr) must be bumped from
20.3.13 to 20.3.14; update each version string to "20.3.14", keep zone.js pinned
to ~0.15.0, then reinstall and regenerate lockfile (npm install or yarn install)
and run the test/build to ensure compatibility.

@maximgorbatyuk
maximgorbatyuk deleted the docker-fix branch January 6, 2026 17:50
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