

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Still calibrating
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 only helps 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/[email protected] ./...
The workflow pins third-party actions to full commit SHAs, grants the GITHUB_TOKEN only read access, takes the Go version from go.mod, and keys dependency caching from go.sum. Full SHA pins prevent a moved tag from silently changing the action code; version comments keep the pins understandable.
Automated update tools can propose newer modules and action pins, but they do not replace review. Treat their pull requests like any other dependency change: inspect the release, run the checks, and verify the application.
Bearly Secure's Go checks depend on someone remembering to run them. Add a least-privilege 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.