Skip to content

Reject symlinked .vipgoci_* committed files before reading#397

Merged
rebeccahum merged 11 commits into
trunkfrom
fix/reject-symlink-config-files
Jul 6, 2026
Merged

Reject symlinked .vipgoci_* committed files before reading#397
rebeccahum merged 11 commits into
trunkfrom
fix/reject-symlink-config-files

Conversation

@rebeccahum

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 hardens local repository file reads by rejecting committed files that are symbolic links before their contents are read, reducing the risk of reading unintended targets via symlink traversal.

Changes:

  • Build a single $file_path for the requested committed file and reuse it for reads.
  • Add an is_link() guard to refuse reading symlinked files, with logging and an early false return.
  • Keep existing runtime measurement behavior, stopping the timer on both success and early-return paths.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread git-repo.php Outdated
Comment thread git-repo.php

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

Comment thread git-repo.php
Comment thread git-repo.php Outdated
Comment thread .github/workflows/ci.yml
rebeccahum and others added 3 commits July 6, 2026 10:39
@rebeccahum rebeccahum force-pushed the fix/reject-symlink-config-files branch 2 times, most recently from d65dcbd to 2f71bf2 Compare July 6, 2026 16:40
@rebeccahum rebeccahum force-pushed the fix/reject-symlink-config-files branch from 2f71bf2 to cf19bd7 Compare July 6, 2026 16:41
@rebeccahum rebeccahum requested a review from Copilot July 6, 2026 16:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.

Comment thread options.php
Comment thread options.php
Comment thread git-repo.php

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.

Comment thread git-repo.php
Comment thread git-repo.php
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated 5 comments.

Comment thread git-repo.php
Comment thread tests/integration/GitRepoRepoFetchCommittedFileTest.php
Comment thread .github/workflows/ci.yml Outdated
Comment thread .github/workflows/ci.yml
Comment thread .github/workflows/ci.yml
rebeccahum and others added 4 commits July 6, 2026 11:04
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…ic/vip-go-ci into fix/reject-symlink-config-files
@rebeccahum rebeccahum requested a review from a team July 6, 2026 17:18
Comment thread .phpunit.result.cache Outdated

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Is this supposed to be versioned?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Adding an ignore for this

@rebeccahum rebeccahum merged commit 7c6c036 into trunk Jul 6, 2026
9 of 10 checks passed
@rebeccahum rebeccahum deleted the fix/reject-symlink-config-files branch July 6, 2026 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants