Skip to content

fix:Resolve ancestral symlinks correctly#3783

Merged
wagoodman merged 4 commits intoanchore:mainfrom
VictorHuu:resolve-upstream-symlinks
Apr 30, 2025
Merged

fix:Resolve ancestral symlinks correctly#3783
wagoodman merged 4 commits intoanchore:mainfrom
VictorHuu:resolve-upstream-symlinks

Conversation

@VictorHuu
Copy link
Copy Markdown
Contributor

@VictorHuu VictorHuu commented Apr 7, 2025

The directory resolver does not consider cases when the Rel method in the standard library may return .., since targetPath may be the ancestor of the basePath.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • I have added unit tests that cover changed behavior
  • I have tested my code in common scenarios and confirmed there are no regressions
  • I have added comments to my code, particularly in hard-to-understand sections

Signed-off-by: Yuntao Hu <victorhu493@gmail.com>
@VictorHuu VictorHuu marked this pull request as draft April 7, 2025 10:37
@VictorHuu VictorHuu changed the title [BUG]Resolve upstream symlinks correctly fix:Resolve upstream symlinks correctly Apr 7, 2025
@VictorHuu VictorHuu marked this pull request as ready for review April 7, 2025 10:39
Signed-off-by: Yuntao Hu <victorhu493@gmail.com>
Signed-off-by: Yuntao Hu <victorhu493@gmail.com>
Signed-off-by: Yuntao Hu <victorhu493@gmail.com>
@VictorHuu VictorHuu changed the title fix:Resolve upstream symlinks correctly fix:Resolve ancestral symlinks correctly Apr 25, 2025
Copy link
Copy Markdown
Contributor

@wagoodman wagoodman left a comment

Choose a reason for hiding this comment

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

🚀

@wagoodman wagoodman merged commit 09c3b7c into anchore:main Apr 30, 2025
13 checks passed
spiffcs added a commit that referenced this pull request May 1, 2025
* main: (142 commits)
  feat: detect when full license text has been provided and preserve as separate field (#3450)
  chore(deps): bump github.com/Masterminds/semver/v3 from 3.3.0 to 3.3.1 (#3843)
  chore(deps): update tools to latest versions (#3841)
  Update github.com/Masterminds/semver to v3 (#3836)
  Add support for PHP Pear (#2775)
  fix: Improve detection of erlang binary in alpine Linux (#3839)
  fix:Resolve ancestral symlinks correctly (#3783)
  chore(deps): update CPE dictionary index (#3834)
  chore(deps): update tools to latest versions (#3835)
  chore(deps): bump github.com/charmbracelet/bubbletea from 1.3.4 to 1.3.5 (#3838)
  fix the fluent-bit regex detection pattern (#3817)
  chore(deps): bump anchore/sbom-action from 0.18.0 to 0.19.0 (#3832)
  chore(deps): update tools to latest versions (#3830)
  Resolve owned file paths when searching for overlaps (#3828)
  chore(deps): update anchore dependencies (#3827)
  fix: Make the fileresolver Support Prefix Match of Files (#3820)
  Add support for detecting javascript assets in .NET projects using libman (#3825)
  chore(deps): update tools to latest versions (#3823)
  (feat): support skipping archive extraction with file source (#3795)
  Consider DLL claims for dependencies of .NET packages from deps.json (#3822)
  ...

Signed-off-by: Christopher Phillips <32073428+spiffcs@users.noreply.github.com>
@VictorHuu VictorHuu deleted the resolve-upstream-symlinks branch December 6, 2025 07:40
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.

go-module-file-cataloger fails if symlinks in path

2 participants