

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 4
click for more info
Not enough gems
Cost: 6 gems
1: Managing Secrets
incomplete
2: Injecting Secrets at Runtime
incomplete
3: Protecting Secrets
incomplete
4: Build Artifacts and Deployment Hygiene
incomplete
5: Limiting Build Context
incomplete
6: Source Code and Config Leaks
incomplete
7: Public File Leaks
incomplete
8: Server-Side Request Forgery
incomplete
9: Defending Against SSRF
incomplete
10: Open Redirects
incomplete
11: Risks of Dependencies
incomplete
12: Auditing Dependencies
incomplete
13: Dependency Maintenance
incomplete
Back
ctrl+,
Next
ctrl+.
This lesson's interactive features are locked, please to keep using them
A security check helps only when it runs regularly and someone responds to its results. Continuous integration can enforce the same Go checks on every push and pull request:
name: Go checks
on:
push:
pull_request:
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version-file: go.mod
cache-dependency-path: go.sum
- run: go test ./...
- run: go vet ./...
- run: go run golang.org/x/vuln/cmd/govulncheck@v1.7.0 ./...
This workflow also follows some security best practices by pinning third-party actions to their full commit hashes and granting the minimum permissions necessary (in this case read only). It takes the Go version from your go.mod file and caches dependencies for efficiency.
There are automated update tools like Dependabot that can propose newer modules, but they do not replace review. Treat their pull requests like any other dependency change: inspect the release, run the checks, and verify application behavior.
Bearly Secure's Go checks rely on someone remembering to run them. Add a GitHub Actions workflow for pushes and pull requests.
actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
actionlint .github/workflows/go-checks.yml
Run and submit the CLI tests from the project root.