Skip to content

Conversation

@ArneTR
Copy link
Member

@ArneTR ArneTR commented Dec 30, 2025

Screenshot 2025-12-30 at 7 53 39 PM

Greptile Summary

Adds repository relations feature allowing measurement runs to checkout and mount additional repositories into containers. This enables multi-repository testing scenarios.

Key Changes:

  • Added relations jsonb column to runs table to store relation metadata
  • New _checkout_relations() method clones related repositories to /tmp/relations/ and mounts them into containers at /tmp/relations/{relation_key}:ro
  • Schema validation added for relations with support for URL, optional branch, and optional commit_hash
  • Frontend displays relation information with clickable links to repository URLs
  • Removed -it flags from docker run commands (now only uses -d)

Issues Found:

  • Critical XSS vulnerability: commit_hash field not escaped in frontend HTML insertion (stats.js:162)
  • Outdated comment about -it flag that was removed
  • Missing URL protocol validation in schema checker - should restrict to git protocols only

@ArneTR ArneTR marked this pull request as ready for review December 30, 2025 12:06
@ArneTR
Copy link
Member Author

ArneTR commented Dec 30, 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.

6 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

cwd=relation_path,
)

if problematic_symlink := utils.find_outside_symlinks(relation_path):
Copy link
Member

Choose a reason for hiding this comment

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

Why do you do this after the checkout runs?

Copy link
Member Author

Choose a reason for hiding this comment

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

The repository can contain symlinks. e.g. it possible to have a dangling symlink to /etc/passwd in the repo

@github-actions
Copy link

github-actions bot commented Jan 6, 2026

Eco CI Output [RUN-ID: 20748001570]:

🌳 CO2 Data:
City: CONSTANT, Lat: , Lon:
IP:
CO₂ from energy is: 1.516667460 g
CO₂ from manufacturing (embodied carbon) is: 0.437263383 g
Carbon Intensity for this location: 231 gCO₂eq/kWh
SCI: 1.953931 gCO₂eq / pipeline run emitted


Total cost of whole PR so far:

Label🖥 avg. CPU utilization [%]🔋 Total Energy [Joules]🔌 avg. Power [Watts]Duration [Seconds]
Measurement #131.0336565.664.281532.57
Total Run31.036565.664.281532.57
Additional overhead from Eco CIN/A16.064.313.73

@ArneTR ArneTR merged commit 1f815ad into main Jan 7, 2026
1 check failed
@ArneTR ArneTR deleted the repository-relations branch January 7, 2026 09:17
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.

3 participants