Skip to content

Go's Boring Security Tooling (And Why That's Perfect)

"What security tools do you use?"

I expected: Snyk. Semgrep. Custom vulnerability scanners. Expensive SaaS subscriptions.

The answer: go test -race.

That's it. That's the security tool.


The Expectation

Security requires specialized tools. Everyone knows this.

Your security checklist needs:

  • Static analysis (SAST)
  • Dynamic analysis (DAST)
  • Dependency scanning
  • Secret detection
  • Container scanning
  • Compliance reporting

Each category has competing vendors. Features overlap. Pricing is enterprise-level. Integration creates friction.

You expect the security team to recommend:

  • Snyk for dependency scanning ($$$)
  • Semgrep for custom rules ($$)
  • SonarQube for code quality ($$$)
  • Checkmarx for SAST ($$$$)
  • GitGuardian for secrets ($$$)

Total annual cost: Five figures minimum. Integration time: Months.


The Reality

Go's security toolkit:

Tool Purpose Cost
go test -race Concurrency bugs $0
golangci-lint Static analysis + gosec $0
gofmt -s Code consistency $0
go vet Common mistakes $0
Trivy Dependency vulnerabilities $0
TruffleHog Secret scanning $0
syft SBOM generation $0

Total cost: $0 Integration time: One afternoon Maintenance: Minimal (standard tools, community maintained)


The Discovery

We needed the OpenSSF Best Practices badge. The security criteria were clear:

  • Static analysis with common vulnerability detection
  • Dynamic analysis with race detection
  • No leaked credentials in repository
  • Vulnerability scanning for dependencies
  • SBOM generation for supply chain security

We already had everything.

golangci-lint with gosec enabled caught:

  • Hardcoded credentials (G101)
  • Unsafe pointer usage (G103)
  • SQL injection patterns (G201-204)
  • Weak cryptography (G401-405)
  • File permission issues (G301-307)

go test -race found:

  • Concurrent map writes
  • Unsynchronized shared variable access
  • Channel race conditions

TruffleHog scanned commit history for leaked secrets.

Trivy checked dependencies for CVEs.

syft generated SBOMs.

All standard tools. All free. All integrated with go build and go test.


Why Boring Works

Exotic tools have a problem: friction.

Developers won't run tools that:

  • Require separate installation steps
  • Have complex configuration
  • Slow down the workflow
  • Produce noisy false positives
  • Cost money (procurement approval required)

Boring tools have zero friction:

# Security checks that run on every commit
go test -race ./...        # Race detector (built-in)
golangci-lint run          # Linting + gosec (one install)
gofmt -s -w .              # Formatting (built-in)

No separate login. No SaaS dashboard. No procurement process. No integration meetings.

Pre-commit hooks:

- id: go-test
  entry: go test -race ./...
  language: system
  files: '\.go$'

CI pipeline:

- name: Test
  run: go test -race -v ./...

Same command. Local and CI. Always running. Always catching bugs.


The Proof

We achieved:

  • OpenSSF Best Practices Badge (passing)
  • Go Report Card A+ grade
  • OpenSSF Scorecard 10/10 (Signed-Releases)
  • 99% test coverage (race detector enabled)
  • Zero leaked credentials (TruffleHog verified)
  • Zero critical CVEs (Trivy daily scans)

Tools used:

  • Standard Go toolchain
  • golangci-lint (community standard)
  • Trivy (CNCF project)
  • TruffleHog (open source)

Total licensing cost: $0 Annual subscription cost: $0 Vendor lock-in: None


The Contrast

Exotic Tool Journey:

  1. Vendor demo (2 weeks for scheduling)
  2. Procurement approval (1 month)
  3. Integration work (2-4 weeks)
  4. Configuration tuning (ongoing)
  5. False positive management (ongoing)
  6. Developer adoption... (good luck)

Result: Tool installed. Developers ignore it.

Security theater achieved.

Boring Tool Journey:

  1. go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
  2. Add to pre-commit hooks
  3. Add to CI

Result: Tool runs on every commit. Developers can't avoid it.

Actual security achieved.


The Lessons

1. Friction Kills Security Tools

If developers need to take extra steps, they won't. Boring tools integrate with existing workflows.

2. Cost Isn't Capability

Free open-source tools (golangci-lint, Trivy) match or exceed expensive commercial alternatives.

3. Standard Tooling Wins

Go's race detector is better than custom concurrency analyzers because it's always there. No installation, no configuration, no excuses.

4. Community Maintenance

Commercial tools die when companies pivot. Community-maintained tools (golangci-lint) survive vendor changes.

5. Compliance Doesn't Require Exotic Tools

OpenSSF Best Practices, Scorecard compliance, and audit requirements all satisfied with standard Go tooling.


The Recommendation

Skip the security vendor bingo card. Use boring tools:

For Go projects:

  • go test -race (concurrency)
  • golangci-lint with gosec (static analysis)
  • gofmt -s (consistency)
  • Trivy (dependencies)
  • TruffleHog (secrets)

Integration:

  • Pre-commit hooks (catch issues before commit)
  • CI pipelines (block merge on failures)
  • Daily scans (catch new CVEs)

Cost: $0 Effectiveness: Proven (OpenSSF certified) Maintenance: Minimal (standard tools)

Implementation Guide

See Go Security Tooling for complete setup: race detector, golangci-lint configuration, CI integration, and pre-commit hooks.



Security teams love exotic tools. Go offers go test. Boring standard tools caught real vulnerabilities. OpenSSF compliance achieved. Zero licensing cost. Friction eliminated. Developers can't avoid tools that run automatically.

Comments