Idea — automatically detect platform labels for containers (e.g. language runtime and version) #3980
Replies: 1 comment
|
Thinking about this more, I'd like to narrow this request. Pangolin and Newt shouldn't build SBOMs or scan images themselves — that's a moving target and well covered by existing scanners. What's missing is a clean way for an external scanner to keep labels up to date. Why version labels can't be maintained by hand: during PHP2Shell the interesting labels were exactly the volatile ones ( Images without a published SBOM aren't a blocker: tools like Syft, Trivy or Grype generate the SBOM from the image itself (package databases such as apk/dpkg), so it doesn't matter whether the publisher ships one. Some container managers already run image audits on their own. Proposal — a scanner companion talking to the API:
What Pangolin would need for that (small, and useful for any external tool):
Note that these labels live in Pangolin, not on the container: Docker labels are fixed at container creation and can't be changed on a running container, so the companion never touches the container itself — it only uses Newt's container/image mapping to know which Pangolin resource to label. That keeps the scanning logic out of Pangolin entirely, and anyone can plug in the scanner they already trust. I'm happy to build such a companion myself if the API part makes sense to you. AI disclosure: drafted with the help of an AI assistant (Claude Code); reviewed and edited by me. |
Uh oh!
There was an error while loading. Please reload this page.
Summary
Let Newt derive platform labels for blueprint-managed resources automatically (e.g.
platform::php,platform_version::8.4.2) from container/image metadata, marked with origindetected.Motivation
Label-scoped policies (#3979) are only as good as the labels. During PHP2Shell (CVE-2026-109618 / CVE-2026-109619) the first question I had was "which of my exposed apps run PHP, and which version?" — and I had to answer it by hand, container by container. Labels maintained by people drift; detection would answer this directly.
Proposed Solution
Only an idea for discussion, not a full design:
PHP_VERSION,NODE_VERSION,PYTHON_VERSION, …), optionally an SBOM if one is attached to the image.detected(see Scoped labels (`scope::value`) that survive blueprint sync, plus label inheritance from sites #3978), are shown as such, can be overridden manually, and can't be removed by hand while detection still reports them.Alternatives Considered
Additional Context
Detection is inherently fuzzy (minimal images without metadata, multiple runtimes in one image). It's fine if this stays out of scope — #3979 and #3978 are useful without it.
Related: #3979, #3978.
AI disclosure: drafted with the help of an AI assistant (Claude Code); reviewed and edited by me.
All reactions