Skip to content

Commit 48e370c

Browse files
gbartolinimnencia
andauthored
chore: introduce Dependency Management Policy (DEPENDENCIES.md) (#10066)
Descriptive statement of how we select, obtain, and track our dependencies to ensure supply chain integrity. Assisted-by: Google Gemini Closes #10063 Signed-off-by: Gabriele Bartolini <[email protected]> Signed-off-by: Marco Nenciarini <[email protected]> Co-authored-by: Marco Nenciarini <[email protected]>
1 parent 9e63385 commit 48e370c

2 files changed

Lines changed: 92 additions & 3 deletions

File tree

‎DEPENDENCIES.md‎

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# Dependency Management Policy
2+
3+
## Overview
4+
5+
CloudNativePG (CNPG) is committed to maintaining a secure and stable software
6+
supply chain. As an operator managing critical database workloads, the
7+
integrity of our dependencies, ranging from Go modules to container base
8+
images, is paramount.
9+
10+
**This document outlines our policies for selecting, monitoring, and updating
11+
third-party dependencies.**
12+
13+
## Selection Criteria
14+
15+
Before introducing a new dependency to the project, maintainers must evaluate
16+
it against the following criteria:
17+
18+
- **Necessity:** Does the dependency provide essential functionality that
19+
cannot be reasonably implemented within the project?
20+
- **Security Posture:** Preference is given to projects with high OpenSSF
21+
Scorecard ratings and a clear security policy.
22+
- **Maintenance:** The dependency must be actively maintained with a history of
23+
timely security patches.
24+
- **Licensing:** All dependencies must comply with the Apache License 2.0 or a
25+
compatible permissive license (e.g. MIT, BSD-3-Clause).
26+
27+
## Automated Monitoring and Scanning
28+
29+
We employ a "defense in depth" approach to monitoring our dependency tree
30+
through automated tooling:
31+
32+
- **Update Automation:** GitHub's built-in
33+
[Dependabot](https://github.com/dependabot) alerts notify us of known
34+
vulnerabilities in our dependencies. We use
35+
[Renovate](https://github.com/renovatebot/renovate) for granular version
36+
management, automated grouping of updates, and maintenance of GitHub Actions.
37+
- **Vulnerability Scanning:** Every Pull Request and push to the main branch
38+
triggers automated scans using [Snyk](https://snyk.io/) and
39+
[govulncheck](https://pkg.go.dev/golang.org/x/vuln/cmd/govulncheck) to identify
40+
known vulnerabilities (CVEs).
41+
- **Static Analysis:** We rely on [CodeQL](https://codeql.github.com/) and
42+
[golangci-lint](https://github.com/golangci/golangci-lint) (which includes the
43+
[gosec](https://github.com/securego/gosec) security linter) to identify security
44+
risks introduced by the way dependencies are utilized in our code.
45+
- **Container Hardening:** We run
46+
[Dockle](https://github.com/goodwithtech/dockle) to lint our container images
47+
against security best practices, ensuring that our images are lean, do not run
48+
as `root`, and do not contain sensitive information in their history.
49+
50+
## Supply Chain Integrity
51+
52+
To ensure that the code we build is the code we intended to use, we implement
53+
the following:
54+
55+
- **Checksum Verification:** We use [`go.sum`](./go.sum) to ensure the
56+
integrity of Go modules.
57+
- **Artifact Signing:** All container images are cryptographically signed using
58+
[Cosign](https://github.com/sigstore/cosign).
59+
- **SLSA Provenance:** We generate SLSA-formatted provenance attestations for
60+
all releases. These are delivered as OCI attestations integrated into our
61+
build process via BuildKit (`buildType: https://mobyproject.org/buildkit@v1`).
62+
- **Software Bill of Materials (SBOM):** We provide a comprehensive SBOM for
63+
every image, allowing users to verify the entire bill of materials for any
64+
given version.
65+
66+
## Remediation Cadence
67+
68+
Security updates are treated as high-priority tasks. The project aims for the
69+
following remediation timeframes:
70+
71+
- **Critical and High Vulnerabilities:** Once a fix is available in the
72+
upstream dependency, we aim to merge the update and initiate a release
73+
process within one week.
74+
- **Medium and Low Vulnerabilities:** These updates are typically batched and
75+
addressed as part of our regular maintenance and release cycles once upstream
76+
fixes are provided.
77+
78+
## Contact
79+
80+
For security-related concerns regarding our dependencies, please refer to our
81+
[`SECURITY.md` file](./SECURITY.md).

‎SECURITY-INSIGHTS.yml‎

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,17 @@ project:
7676
comment: CloudNativePG website
7777

7878
documentation:
79+
code-of-conduct: https://github.com/cloudnative-pg/governance/blob/main/CODE_OF_CONDUCT.md
80+
# OSPS-DO-01.01, OSPS-SA-02.01
81+
detailed-guide: https://cloudnative-pg.io/docs/current/
82+
# OSPS-SA-01.01
7983
design: https://github.com/cloudnative-pg/cloudnative-pg/blob/main/contribute/technical-architecture.md
8084
quickstart-guide: https://cloudnative-pg.io/docs/current/quickstart
81-
detailed-guide: https://cloudnative-pg.io/docs/current/
82-
code-of-conduct: https://github.com/cloudnative-pg/governance/blob/main/CODE_OF_CONDUCT.md
8385
release-process: https://github.com/cloudnative-pg/cloudnative-pg/blob/main/contribute/release_procedure.md
84-
support-policy: https://cloudnative-pg.io/docs/current/supported_releases
86+
# OSPS-DO-03.01
8587
signature-verification: https://github.com/cloudnative-pg/postgres-containers?tab=readme-ov-file#security
88+
# OSPS-DO-04.01, OSPS-DO-05.01
89+
support-policy: https://cloudnative-pg.io/docs/current/supported_releases
8690

8791
vulnerability-reporting:
8892
reports-accepted: true
@@ -121,10 +125,14 @@ repository:
121125
122126
primary: false
123127
documentation:
128+
# OSPS-DO-02.01, OSPS-GV-03.01, OSPS-DO-07.01, OSPS-GV-03.02, OSPS-DO-03.02
124129
contributing-guide: https://github.com/cloudnative-pg/cloudnative-pg/blob/main/CONTRIBUTING.md
125130
review-policy: https://github.com/cloudnative-pg/cloudnative-pg/tree/main/contribute#about-our-development-workflow
131+
# OSPS-VM-02.01, OSPS-VM-01.01, OSPS-VM-03.01, OSPS-VM-04.01
126132
security-policy: https://github.com/cloudnative-pg/cloudnative-pg/security/policy
133+
# OSPS-QA-04.01, OSPS-GV-01.01, OSPS-GV-01.02
127134
governance: https://github.com/cloudnative-pg/governance/blob/main/GOVERNANCE.md
135+
# OSPS-DO-06.01
128136
dependency-management-policy: https://github.com/cloudnative-pg/cloudnative-pg/blob/main/DEPENDENCIES.md
129137
license:
130138
url: https://www.apache.org/licenses/LICENSE-2.0

0 commit comments

Comments
 (0)