Skip to content

Conversation

@ArneTR
Copy link
Member

@ArneTR ArneTR commented Dec 11, 2025

Screenshot 2025-12-11 at 1 16 24 PM

Greptile Overview

Greptile Summary

This PR refactors container information display by introducing a dedicated "Containers" tab and renaming usage_scenario_dependencies to container_dependencies for better clarity. The changes include database schema updates through migrations, frontend UI reorganization with a new tab, and backend data storage modifications.

The refactoring separates container metadata (ID, name, CPU/memory limits) from dependency information, improving the user experience by organizing related information in dedicated UI sections. The changes span across database schema, scenario runner logic, frontend display components, and test files to maintain consistency.

Critical Issues Found:

  • XSS Vulnerability: Frontend code inserts container data into HTML without proper escaping, creating a security vulnerability where malicious container data could execute arbitrary JavaScript
  • Logic Error: Arithmetic operations on mem_limit field that can be either a string ("1G") or integer (bytes), potentially resulting in NaN values when displaying memory information
  • Unit Display Mismatch: Code converts bytes to MB while displaying "MB" label, but the conversion formula suggests GB calculation

Confidence Score: 2/5 - While the refactoring improves code organization, the critical security vulnerability and logic errors require immediate attention before merging.

…ies to container tab; Renamed usage_scenario_dependencies to container_dependencies
@ArneTR
Copy link
Member Author

ArneTR commented Dec 11, 2025

@greptileai

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

10 files reviewed, 3 comments

Edit Code Review Agent Settings | Greptile

@ArneTR
Copy link
Member Author

ArneTR commented Dec 12, 2025

@greptileai

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

11 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

measurement_config jsonb,
start_measurement bigint,
end_measurement bigint,
containers jsonb, -- explicitely not null as entry in runs table gets created first. then filled. so NULL is different info than {}
Copy link
Contributor

Choose a reason for hiding this comment

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

syntax: typo: 'explicitly' is misspelled as 'explicitely'

Suggested change
containers jsonb, -- explicitely not null as entry in runs table gets created first. then filled. so NULL is different info than {}
containers jsonb, -- explicitly not null as entry in runs table gets created first. then filled. so NULL is different info than {}

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.

2 participants