Skip to content

Conversation

timonomsk
Copy link
Contributor

@timonomsk timonomsk commented Jul 27, 2022

This PR fixes #820 issue

This PR contains several changes

  1. Check package path instead of package name.
    Comparing by package path is more trustful than comparing by package name. It's the only source of truth(after resolving the aliases) to check what exactly package was imported(=accessed in our case).

  2. Move "unaliasing" from GetImportedName to GetImportPath
    It will help us to get exact information about imported package.

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.

gosec does not respect the go package import alias
2 participants