Everything FosterStack does for security
This is the list of security practices that run on the FosterStack Cache repository today. It is long on purpose. It is written for your security reviewer, and each practice gets one item with a link to the proof. You can skim the headings and read only the part you need. Each item links to the place that goes deeper: a page that explains it, or the file that does it. Our security policy is the short version. It says what we promise, including the patch target and how to report a vulnerability. This page says what we do.
Source
Everything you run starts as our source code, so the first question is who can change it. We accept only signed changes, and we check them before anything is built.
- Signed commits. The
mainbranch accepts only signed commits. A repository ruleset (a rule set in our GitHub repository) enforces this. It also requires the checks on every pull request (the repository's rules, required checks). - Signed release tags, checked first. The release chain starts by verifying the tag's signature against a list of allowed signers kept on
main. It does this before any repository code runs (release workflow, tag check, allowed signers). - Release tags are protected. Creating a release tag is restricted by a repository rule. A published release tag cannot be moved, updated or deleted (the repository's rules).
- CI runs a fork's code without secrets. The CI workflow (our automated checks) runs on
pull_request, neverpull_request_target. So a fork's code runs with GitHub's no-secrets treatment, which means it gets no repository secrets (CI). - An automated security reviewer writes to branches of its own. A check fails any push to those branches from another GitHub identity (guard).
Dependencies
Most supply-chain attacks arrive through something a project borrows. We pin what we borrow to exact versions, check it every day, and judge every update, so a borrowed piece cannot change under you without us seeing it.
- Every action in every workflow is pinned to a full commit digest. An action is a ready-made step that a workflow borrows from another project. A full commit digest is the long hash that names one exact version of it. A tag or a branch reference is not accepted: reviewers check every pull request for it, and the release audit checks it again.
- Container images and downloads are pinned. An image that a workflow runs, pulls or passes to an action is named by digest, never by tag, and an outside download is pinned to a checksum. Reviewers and the release audit check both.
- Everything we pin is checked daily. The inventory of pinned actions and packages is checked once a day against published advisories and malicious-package reports (supply-chain workflow).
- Updates are automated and judged. Patch and minor updates merge after the full gate. For a major update, an automated reviewer reads the release notes against how we use the package before anyone merges it (auto-merge, reviewer).
- The Go toolchain stays on the newest patch of a supported minor. A daily job proposes the bump when a newer supported release exists (freshness job).
- Go vulnerability analysis and code scanning.
govulncheck(Go's vulnerability scanner) runs on every pull request and every push tomain. CodeQL (a code-analysis tool) reads the code on every pull request, every push tomainand once a day. A release is accepted only when the CodeQL runs on that exact commit passed (CI, CodeQL). - Posture is measured in public. OpenSSF Scorecard (a public security rating for open-source projects) runs weekly, and its badge is on the README (Scorecard).
Build
You are trusting the build that made the bytes you run, so we split it into stages that check each other. The release runs as a chain of stages, and the names Build, Rebuild, Check and Sign below are those stages.
- One build, promoted by digest. The release is built once. The same bytes are scanned, tested and promoted (copied to the public registries). After every copy, we check that the promoted digest equals the scanned digest (release chain).
- Every record is signed by a stage that builds nothing. Build, Rebuild and Check each record what they did, and the record names the exact digests. None of them holds a release signing key. The Sign stage checks each record and signs it, and the next stage verifies it (our release process).
- Pinned toolchain. The build uses the Go version from
go.modwith downloads of a newer toolchain disabled. Module manifests are verified, never rewritten (build jobs). - The Wolfi packages in the image come from our own archive. The image is assembled by apko (a tool that builds container images from packages) from Wolfi packages that we keep in our own archive, plus the project's own package, which the build job makes. A scheduled job refreshes the archive, and a committed pointer names its digest. The build pulls the archive by that digest and checks every package against its recorded hash. So a Wolfi package that was not archived and verified cannot reach an image (build jobs).
- The build tools are downloaded at a pinned version and checked. The tools that make the packages and the image are fetched from their release pages at an exact version. Each is verified against a checksum before it runs (build jobs).
- Minimal image, assembled from pinned packages. A base image is a ready-made operating-system image that most images start from. Ours has none. Each image variant is built from a few packages and the binary, with no build step inside the image, and the production and FIPS images have no shell and no package manager (build jobs).
- Build, Rebuild and a no-secret compare job. Build makes the apks (the packages) and the images. Rebuild makes its own copy from the same commit, in its own jobs. A separate compare job compares every package, image and archive that Build and Rebuild made. The compare job holds no secret, no environment and no identity token. The comparison happens before the release job signs the packages and images or publishes them (compare job, release job).
- Every build is its own job. Each build, for each architecture, runs in a fresh virtual machine that holds no stored secret, and no build shares a machine with the job that signs or publishes.
- The signer never receives an apk or an image that Rebuild made. The release job publishes Build's exact artifacts, after checking each against the digest Build attested in its signed record. The rebuilt files only feed the comparison. Only the three Sign jobs and the evidence letter's
signjob can use the signing key. The release job, the builds and pull requests never can. - Assembled twice and compared. The image assembly is repeated on a fresh runner, and the two digests must be equal (rebuild jobs).
- A FIPS variant. A
-fipsbuild uses Go's FIPS 140-3 validated cryptographic module and announces itself at startup. The whole test suite runs infips140=onlymode, which makes the program refuse any cryptography that is not approved (our security policy). - Approved-only cryptography is checked by lint too. A lint rule (an automatic check of the code) denies the third-party cryptographic packages we name, such as
golang.org/x/crypto, so code reaches for the validated module instead (.golangci.yml).
Scanning
A known vulnerability in an image is the problem you would otherwise find in your own scan. We scan before release and every day after it, and every exception is written down where you can read it.
- Two independent scanners, with different databases, block every release. The set is one list in the repository, and the checks read that list. Each scanner blocks at every severity, including unknown (scanner list, our security policy).
- Scanned on every pull request, every push to
mainand every day. The scan builds the same image the release would ship and scans it (scan workflow). - Four scanners, every day. The daily rescan builds main's candidate (the image that main would ship) and scans it with four independent scanners. Then it tallies how many saw each finding (daily rescan).
- Published images are rescanned daily. A CVE disclosed against bytes we already shipped raises a tracked issue (scanning.md).
- An automated audit reads every finding. Each day an automated reviewer checks every scanner finding against the code and our VEX statements (our published notes on whether a finding applies). It writes up what each one needs (daily auditor).
- Exceptions are published statements. The only way to except a finding is an OpenVEX statement with a justification. It is kept in the repository and published with each release (
.vex/, scanning.md). - Scanner verdicts are signed. Each scanner's verdict is a signed statement bound to the digests it scanned (verify-images.md).
Release
What you pull must be what we built and tested. These steps make that something you can check, not something you take on trust.
- Signed images. Every image is signed with the release key by the Sign stage, and the signature is pushed to both registries after it is checked (verify-images.md).
- Signed provenance. The build provenance (a record of how the images were built) names the images by digest and the CI run that made them. The SBOMs (lists of what is inside) and the checksums file are signed with the release key (verify-images.md).
- An SBOM for every archive, published with the release (our release process).
- The VEX document ships with every release as
fosterstack-cache.openvex.json(our release process). - The release stage checks every earlier stage first. Before it publishes anything, it verifies the tag, the release policy and each earlier stage's signed record, in order (release jobs).
- The release is checked as a customer would. After promotion, the public digests are verified and pulled anonymously. Only then is the release published (release job).
- The full test suite runs every night. Every test suite that pull-request CI does not run, and the Gradle and Maven acceptance suites, run every night and on demand, never on a pull request or a push (full suite).
- Acceptance runs against the exact artifacts. The archives and images that ship run the customer scenarios first. The scenarios are Gradle, Maven, Kubernetes and the artifact checks (acceptance, check job).
Runtime
A cache server sits next to your source, so what it sends out matters. It sends nothing, and it keeps no log of who asked for what.
- No telemetry and no outbound connections. The server sends nothing anywhere. A release test proves it: it traces the candidate from its first instruction with egress (outgoing network traffic) denied (check job, our security policy).
- No request access log. The only per-request logging is on failure. It never carries a body, a credential or a client address (our security policy).
Watch
Security does not end at release, so we keep reading what has been reported about what we depend on.
- A daily watch of what we depend on. Newly published advisories and malicious-package reports about anything we pin are read every day (supply-chain workflow).
Related: verify a release yourself and the security policy.
Moving off the free Build Cache Node? See what the end of life means and the migration guide.