Reviewer · Security
Dependency trust annotations
When marking third-party dependencies as "trusted" for supply-chain security tooling (e.g. `//gosocialcheck:trusted`), apply the annotation per-dependency as an inline comment rather than as a comment on a `require()` group, since grouped comments are ambiguous and fragile as Go tooling evolves to auto-manage require blocks:
When marking third-party dependencies as “trusted” for supply-chain security tooling (e.g. //gosocialcheck:trusted), apply the annotation per-dependency as an inline comment rather than as a comment on a require() group, since grouped comments are ambiguous and fragile as Go tooling evolves to auto-manage require blocks:
require (
github.com/moby/buildkit v0.35.0-rc1 //gosocialcheck:trusted
github.com/moby/docker-image-spec v1.3.1 //gosocialcheck:trusted
some/untrusted-dep v1.0.0
)
Define trust criteria explicitly and consistently rather than relying on implicit or single-source signals: first-party (org-maintained) and well-known upstream (e.g. golang.org/x) packages can be trusted directly, but trusting a dependency merely because it is used by one external project (even a CNCF-graduated one) is not sufficient — that project’s own vetting may be weak or nonexistent. Prefer requiring adoption by multiple independently-vetted projects, or require that any project whose adoption is used as a trust signal runs the same dependency-scanning checks in its own CI, so the signal is meaningful rather than a rubber stamp.
Treat trust as a per-version decision, not a one-time grant: re-evaluate (or re-scan) a dependency’s security posture whenever it is upgraded, since trust in an old version does not guarantee safety of a new release. Document the trust criteria and their rationale alongside the annotation mechanism so reviewers can audit why a dependency was marked trusted.