Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/verify-current-component-inputs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ on:
- 'server/build-api-explorer-patch-image.sh'
- 'server/catalog-sources/**'
- 'server/artifacts/compose/**'
- 'server/security/check_scan_coverage.py'
- 'server/security/test_scan_coverage.py'
- 'server/security/reviews/**'
- 'server/security/openvex.json'
- 'server/security/vendor-pending.json'
- 'scripts/check-server-api-explorer-patch.sh'
- 'scripts/check-server-runtime-image-references.sh'
- 'scripts/package-catalog-source.py'
Expand Down Expand Up @@ -39,6 +44,7 @@ jobs:
shell: bash
run: |
set -euo pipefail
python server/security/test_scan_coverage.py
bash scripts/check-server-api-explorer-patch.sh
bash scripts/check-server-runtime-image-references.sh
python scripts/test-server-component-native-api.py
Expand Down
4 changes: 0 additions & 4 deletions server/security/check_scan_coverage.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,10 @@
OPENPGP_VEX_SCOPE = frozenset({
('usr/bin/docker-machine', 'pkg:golang/golang.org/x/crypto@v0.58.0'),
('usr/bin/docker-machine-driver-packet', 'pkg:golang/golang.org/x/crypto@v0.58.0'),
('usr/bin/compose-executor.real', 'pkg:golang/golang.org/x/crypto@v0.56.0'),
('usr/bin/host-provisioner.real', 'pkg:golang/golang.org/x/crypto@v0.56.0'),
})
OPENPGP_VEX_BINARY_SHA256 = {
'usr/bin/docker-machine': '3d78d962b6aa7f4d5bc1b63a9db703710eed4084bd354b233d62528f49d41116',
'usr/bin/docker-machine-driver-packet': '0f1bf952c603f05c18970ea46be3fc2481544d0f78015aa98339dee1bbbe8764',
'usr/bin/compose-executor.real': 'a22985547fea122edd12606728d3bc5f98d9457ae5724d65a21ef3c36d62cab5',
'usr/bin/host-provisioner.real': '2ebf8c3ebe90b3cfe8196c34e00f5099f6f3d058f4a1104eb09e230ee71d95ab',
}


Expand Down
5 changes: 1 addition & 4 deletions server/security/openvex.json
Original file line number Diff line number Diff line change
Expand Up @@ -352,16 +352,13 @@
"name": "GO-2026-5932"
},
"products": [
{
"@id": "pkg:golang/golang.org/x/crypto@v0.56.0"
},
{
"@id": "pkg:golang/golang.org/x/crypto@v0.58.0"
}
],
"status": "not_affected",
"justification": "vulnerable_code_not_present",
"impact_statement": "GO-2026-5932 applies to the unmaintained golang.org/x/crypto/openpgp packages. The exact Linux Go 1.27.4 executables from machine-driver-bundle 0.16.8, host-provisioner 0.39.12, and compose-executor 0.14.46 have no OpenPGP entries in their complete function and inline-name tables. Both Machine bundle executables have linked and inline-only x/crypto/chacha20 positive controls. The release gate binds each path and module version to its reviewed binary SHA-256. The Compose record also verifies its vendor dependency graph and bcrypt/scrypt positive controls."
"impact_statement": "GO-2026-5932 applies to the unmaintained OpenPGP packages. Only the two unchanged, exact machine-driver bundle executables remain qualified by source and full function/inline-name evidence, including chacha20 positive controls and binary SHA256 binding. Compose 0.14.47 and Host Provisioner 0.39.13 use the upstream-fixed parent module v0.59.0 and are removed from this exception; the separately split OpenPGP module remains unsafe and is not allowed."
},
{
"vulnerability": {
Expand Down
1 change: 1 addition & 0 deletions server/security/reviews/GO-2026-5932.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"schema_version":"1.3.1","id":"GO-2026-5932","modified":"2026-11-02T22:01:43Z","published":"2026-07-07T22:15:29Z","summary":"The golang.org/x/crypto/openpgp package is unmaintained, unsafe by design, and has known security issues","details":"The golang.org/x/crypto/openpgp package is unsafe by design, has numerous known security issues, is not maintained, and should not be used.\n\nIf you are required to interoperate with OpenPGP systems and need a maintained package, consider github.com/ProtonMail/go-crypto/openpgp which is a maintained fork that aims to be a drop-in replacement for this package.","affected":[{"package":{"name":"golang.org/x/crypto","ecosystem":"Go"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.58.1-0.20261009181718-2f1f834330b2"}]}],"ecosystem_specific":{"imports":[{"path":"golang.org/x/crypto/openpgp"},{"path":"golang.org/x/crypto/openpgp/packet"},{"path":"golang.org/x/crypto/openpgp/armor"},{"path":"golang.org/x/crypto/openpgp/clearsign"},{"path":"golang.org/x/crypto/openpgp/errors"},{"path":"golang.org/x/crypto/openpgp/elgamal"},{"path":"golang.org/x/crypto/openpgp/s2k"}]}},{"package":{"name":"golang.org/x/crypto/openpgp","ecosystem":"Go"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}],"ecosystem_specific":{"imports":[{"path":"golang.org/x/crypto/openpgp"},{"path":"golang.org/x/crypto/openpgp/packet"},{"path":"golang.org/x/crypto/openpgp/armor"},{"path":"golang.org/x/crypto/openpgp/clearsign"},{"path":"golang.org/x/crypto/openpgp/errors"},{"path":"golang.org/x/crypto/openpgp/elgamal"},{"path":"golang.org/x/crypto/openpgp/s2k"}]}}],"references":[{"type":"REPORT","url":"https://go.dev/issue/44226"},{"type":"WEB","url":"https://go.dev/issue/81227"}],"database_specific":{"url":"https://pkg.go.dev/vuln/GO-2026-5932","review_status":"REVIEWED"}}
49 changes: 49 additions & 0 deletions server/security/reviews/crypto-0.59.0-upstream-fix.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"format": "pasturestack-upstream-module-fix-v1",
"advisory": "GO-2026-5932",
"officialEvidence": "https://vuln.go.dev/ID/GO-2026-5932.json",
"officialEvidenceSha256": "bde8769150ec1368d9a8dbd61fbbde52296de692c57147e02e3ae295e1981f11",
"parentModuleFixedFrom": "0.58.1-0.20261009181718-2f1f834330b2",
"splitOpenpgpModuleStillUnsafe": true,
"newVexExceptionsAdded": 0,
"subjects": {
"usr/bin/compose-executor.real": {
"prefix": "COMPOSE_EXECUTOR",
"release": "0.14.47",
"source": "e67eacd34020110a8b1ab635e24d17e34bcc47ca",
"binarySha256": "41708b1171a00aa34bcde62dc5df6a0dd34b44d3807e76c52991cdd13bb4f140",
"archiveSha256": "874af05829bb6cc90bb429360bcb09d06d4c27cb6f3dc5d111e9fead45eae797",
"nativeRun": 46180626808,
"module": "pkg:golang/golang.org/x/crypto@v0.59.0",
"splitOpenpgpModuleAbsent": true,
"rawProductFindings": 0,
"sbom": {
"url": "https://github.com/PastureStack/compose-cli/releases/download/v0.14.47/product.cdx.json",
"sha256": "56e8ec76dec83a48267eb8d12720521785c016c677e6d51de23f5efc738aef6f"
},
"rawScan": {
"url": "https://github.com/PastureStack/compose-cli/releases/download/v0.14.47/product-security.json",
"sha256": "26dcc8aed19676915644e738920e21a413eeb574d4438a441d530505c9df818c"
}
},
"usr/bin/host-provisioner.real": {
"prefix": "HOST_PROVISIONER",
"release": "0.39.13",
"source": "90ff25ab0b9b258f190ecc83726a12cfb60cbd18",
"binarySha256": "08781731cedc2b3a33cebf1a1f551e8b31f1dc57be386d90de6837b59b0fc972",
"archiveSha256": "3714d045f0a3e4b9d6f3f8143d47802bd01799bd43b786cdc97adde10d45dd4b",
"nativeRun": 46174090022,
"module": "pkg:golang/golang.org/x/crypto@v0.59.0",
"splitOpenpgpModuleAbsent": true,
"rawProductFindings": 0,
"sbom": {
"url": "https://github.com/PastureStack/host-provisioner/releases/download/v0.39.13/product-sbom.cdx.json",
"sha256": "2e0b27766e7ef5b2508503080f6b1fa65eec40f6e8c18bcfc52f2476ad463432"
},
"rawScan": {
"url": "https://github.com/PastureStack/host-provisioner/releases/download/v0.39.13/product-security-raw.json",
"sha256": "8532f2ca5f62ff1ebaefbb29d4e023d131401bc797df8f0a8b2d377741bad36a"
}
}
}
}
67 changes: 38 additions & 29 deletions server/security/test_scan_coverage.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,6 @@ def test_reviewed_openpgp_hashes_match_the_actual_producer_pins(self):
pins = {
'usr/bin/docker-machine': 'MACHINE_DRIVER_BINARY_SHA256',
'usr/bin/docker-machine-driver-packet': 'PACKET_DRIVER_BINARY_SHA256',
'usr/bin/compose-executor.real': 'COMPOSE_EXECUTOR_BINARY_SHA256',
'usr/bin/host-provisioner.real': 'HOST_PROVISIONER_BINARY_SHA256',
}
self.assertEqual(set(OPENPGP_VEX_BINARY_SHA256), set(pins))
for target, name in pins.items():
Expand All @@ -128,33 +126,44 @@ def test_clean_null_vulnerabilities_need_no_exception(self):
with tempfile.TemporaryDirectory() as folder:
self.assertEqual(validate_vex_payloads(report, Path(folder)), 0)

def test_compose_openpgp_review_binds_exact_new_payload_and_positive_controls(self):
recipe = (Path(__file__).resolve().parents[1] / 'Dockerfile.web-compose-release').read_text(encoding='utf-8')
versions = set(re.findall(r'^ARG COMPOSE_EXECUTOR_VERSION=(0\.14\.[0-9]+)$', recipe, re.M))
self.assertEqual(len(versions), 1)
version = versions.pop()
review = json.loads((Path(__file__).parent / ('reviews/compose-' + version + '-openpgp.json')).read_bytes())
scope, artifact = review['scope'], review['artifact']
self.assertIn((scope['executable'], scope['module']), OPENPGP_VEX_SCOPE)
self.assertEqual(scope['advisory'], 'GO-2026-5932')
self.assertEqual(scope['decision'], 'not_affected')
self.assertEqual(scope['justification'], 'vulnerable_code_not_present')
self.assertFalse(scope['moduleDeclaredFixed'])
self.assertFalse(scope['newConsumerOrScopeAllowed'])
self.assertEqual(OPENPGP_VEX_BINARY_SHA256[scope['executable']], artifact['binarySha256'])
self.assertEqual(artifact['releaseVersion'], version)
self.assertEqual(artifact['compiler'], 'go1.27.4')
self.assertTrue(artifact['releaseGzipAndOfficialTestedProductBytesIdentical'])
graph, symbols = review['sourceGraph'], review['symbolEvidence']
self.assertTrue(graph['officialGo127SourceGatePassed'])
self.assertFalse(graph['dependencyAndVendorGraphChangedFrom01440'])
self.assertEqual(graph['openpgp'], 0)
self.assertEqual(symbols['openpgpEmitted'], 0)
self.assertEqual(symbols['openpgpFunctionInlineNames'], 0)
for prefix in ('bcrypt', 'scrypt'):
self.assertGreater(graph[prefix], 0)
self.assertGreater(symbols[prefix + 'Emitted'], 0)
self.assertGreater(symbols[prefix + 'FunctionInlineNames'], 0)
def test_upstream_fixed_consumers_retire_only_exact_legacy_exceptions(self):
root = Path(__file__).parent
review = json.loads((root / 'reviews/crypto-0.59.0-upstream-fix.json').read_bytes())
advisory_bytes = (root / 'reviews/GO-2026-5932.json').read_bytes()
self.assertEqual(hashlib.sha256(advisory_bytes).hexdigest(), review['officialEvidenceSha256'])
advisory = json.loads(advisory_bytes)
self.assertEqual(advisory['id'], review['advisory'])
parent = next(item for item in advisory['affected'] if item['package']['name'] == 'golang.org/x/crypto')
self.assertEqual([event['fixed'] for entry in parent['ranges'] for event in entry['events'] if 'fixed' in event],
[review['parentModuleFixedFrom']])
self.assertEqual(review['parentModuleFixedFrom'], '0.58.1-0.20261009181718-2f1f834330b2')
self.assertEqual(review['newVexExceptionsAdded'], 0)
self.assertTrue(review['splitOpenpgpModuleStillUnsafe'])
recipe = (root.parent / 'Dockerfile.web-compose-release').read_text(encoding='utf-8')
self.assertEqual(set(review['subjects']), {'usr/bin/compose-executor.real', 'usr/bin/host-provisioner.real'})
for target, subject in review['subjects'].items():
self.assertNotIn(target, OPENPGP_VEX_BINARY_SHA256)
self.assertFalse(any(path == target for path, _ in OPENPGP_VEX_SCOPE))
for suffix, field in [('VERSION', 'release'), ('COMMIT', 'source'),
('BINARY_SHA256', 'binarySha256'), ('ARCHIVE_SHA256', 'archiveSha256')]:
values = set(re.findall(r'^ARG ' + subject['prefix'] + '_' + suffix + r'=(.+)$', recipe, re.M))
self.assertEqual(values, {subject[field]})
self.assertEqual(subject['module'], 'pkg:golang/golang.org/x/crypto@v0.59.0')
self.assertTrue(subject['splitOpenpgpModuleAbsent'])
self.assertEqual(subject['rawProductFindings'], 0)
for evidence in ('sbom', 'rawScan'):
self.assertTrue(subject[evidence]['url'].startswith('https://github.com/PastureStack/'))
self.assertRegex(subject[evidence]['sha256'], r'^[0-9a-f]{64}$')
# A regressed old module, or a newly reported issue in the updated
# executable, must block instead of inheriting the former exception.
for module in ('v0.56.0', 'v0.59.0'):
report = self.fixture(ROOT_BINARIES)
report['Results'].append({'Target': target, 'Type': 'gobinary',
'Packages': [{'Name': 'golang.org/x/crypto', 'Version': module}],
'Vulnerabilities': [{'VulnerabilityID': 'GO-2026-5932',
'PkgIdentifier': {'PURL': 'pkg:golang/golang.org/x/crypto@' + module}}]})
with self.assertRaises(ValueError):
validate_coverage(report, ROOT_BINARIES)


if __name__ == '__main__':
Expand Down