DEV Community

TekWizely
TekWizely

Posted on

2 2

pre-commit-golang v0.8.2 - Now with gosec support

About

pre-commit-golang is a set of pre-commit hooks for Golang with support for Modules.

Quick Links: Project Page | Available Hooks | Installation | Releases

Release Announcement: v0.8.2

This release adds support for gosec, a popular golang security checker.

go-sec hooks

The following gosec hooks are now available:

Hook ID Description
go-sec-mod Run 'cd $(mod_root $FILE); gosec [$ARGS] ./...' for each staged .go file
go-sec-pkg Run 'gosec [$ARGS] ./$(dirname $FILE)' for each staged .go file
go-sec-repo-mod Run 'cd $(mod_root); gosec [$ARGS] ./...' for each module in the repo
go-sec-repo-pkg Run 'gosec [$ARGS] ./...' in repo root folder
Installing gosec
go get github.com/securego/gosec/v2/cmd/gosec
Enter fullscreen mode Exit fullscreen mode
Learning More About gosec

Conclusion

If you use git for your golang project's source control, I hope you will give my project a try.

I am happy to answer any questions you might have.

Thank you for your time,

-TekWizely ( https://github.com/TekWizely )

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay