Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linter: gosec, Rule: G506 - Import blocklist: golang.org/x/crypto/md4. Should we enable it? #15801

Closed
zak-pawel opened this issue Sep 1, 2024 · 6 comments · Fixed by #15835
Closed
Labels

Comments

@zak-pawel
Copy link
Collaborator

Use Case

This issue starts discussion about enabling:

Rule is mapped to CWE-327: Use of Weak Hash.

Expected behavior

Decision if rule should be enabled or not.

Actual behavior

For this rule no findings were found in current code.

Additional info

For this rule no additional configuration can be provided.

@zak-pawel
Copy link
Collaborator Author

I would enable it.

@srebhan
Copy link
Member

srebhan commented Sep 2, 2024

What's the difference to rule 406 (#15800)?

@zak-pawel
Copy link
Collaborator Author

406 detects usages, 506 detects imports. I don't know why they are separated...

@srebhan
Copy link
Member

srebhan commented Sep 2, 2024

I think we cannot use it if we don't import it and vice versa without triggering compiler errors or other linters. So I would say we do the one or the other not both. What do you think?

@zak-pawel
Copy link
Collaborator Author

It seems then that banning the import makes more sense. Although I don't see any objections to enabling both. :)

@srebhan
Copy link
Member

srebhan commented Sep 3, 2024

See my comment in the other issue...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants