Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@VictorHuu
Copy link
Contributor

@VictorHuu VictorHuu commented Nov 30, 2025

Description

When the replace directive only involving module path is applied, the version is empty ,which means it's non-compliant. Therefore, the compliance needs to be applied ,however,after which the previous non-compliant module entry still exists.

And the problem is that the replace and remove in index.go ignore that IDs of both sides in a relationship need to be compliant.

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

* make the go module compliant in advance

Signed-off-by: Yuntao Hu <[email protected]>
@VictorHuu VictorHuu marked this pull request as ready for review December 1, 2025 01:09
@VictorHuu VictorHuu changed the title fix the ghost module 'command-line-arguments' fix:after compliance applied,the relationship concerning the original one should be omitted Dec 1, 2025
Copy link

@BorekZnovustvoritel BorekZnovustvoritel left a comment

Choose a reason for hiding this comment

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

I can confirm that the problem is no longer reproducible with this change. Thank you for addressing it.

@spiffcs spiffcs merged commit baca32f into anchore:main Dec 4, 2025
12 checks passed
@VictorHuu VictorHuu deleted the fix/ghost-go-module branch December 6, 2025 07:38
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.

Invalid SBOMs are created when GO replace directive is used

3 participants