{"id":"GHSA-jf3h-8jvx-vcrg","summary":"compose-lint: A pull request can make compose-lint quote a secret from a CI-generated `.env` into its findings","details":"### Impact\n\nSince 0.22.0, compose-lint fills in `${VAR}` references from the `.env` beside the Compose file, as Compose does. The documentation says values under `environment:` are never resolved from a `.env`, \"that is where secrets live\". But `image:` values are resolved, and CL-0004 and CL-0019 quote the resolved image in their message and fix text.\n\nSome CI workflows write secrets into that `.env` before linting or building. In such a workflow, a pull request that changes one line to `image: \"${DB_PASSWORD}\"`, or `image: \"nginx:${DB_PASSWORD}\"`, gets the secret's value quoted in a finding. The finding reaches the job log, JSON output, and the SARIF uploaded to Code Scanning. GitHub masks registered secrets in the job log, but not in uploaded JSON or SARIF artifacts or in Code Scanning alert text. The pass/fail result is not affected.\n\nThis needs a workflow that writes secrets into the `.env` beside the Compose file *and* runs on pull requests from authors who should not see them. Pull requests from forks normally run without secrets, so the common setup is not exposed, which is why this is scored as low confidentiality impact. Where the conditions hold, such as a `pull_request_target` workflow, pull requests from branches in the same repository, or a self-hosted runner that keeps a populated `.env` in the checkout, the whole value is disclosed.\n\nFound during an internal pre-1.0 security review.\n\n**GitHub Action.** Action tags v0.22.0 through v0.31.0 install their own compose-lint version and are affected. Earlier tags install the newest release unless `version:` is set, and so currently install an affected one.\n\n**Docker image.** `composelint/compose-lint` tags 0.22.0 through 0.31.0, the matching minor tags, and `latest` are affected when the `.env` is mounted with the project.\n\n### Patches\n\nFixed in 0.32.0. Rules still grade the value the sibling `.env` substituted, but findings, fix guidance and notes quote the `${NAME}` reference in its place, in text, JSON and SARIF. A value shorter than 8 characters is shown as written, because short values are also words the guidance itself uses; `docs/what-a-run-reads.md` states this limit.\n\n### Workarounds\n\n- Upgrade to 0.32.0 or later.\n- Run with `--no-env`, which skips the sibling `.env`.\n- Don't write secrets into the `.env` beside the Compose file in a job that lints untrusted pull requests.\n\n### Reproduction\n\n```\nproject/.env          DB_PASSWORD=example-secret      (written by CI, not committed)\nproject/compose.yml   services: {web: {image: \"${DB_PASSWORD}\"}}\n```\n\n`compose-lint --format sarif compose.yml` reports CL-0004 with the message `Image 'example-secret' has no tag, ...`.","aliases":["CVE-2026-123372"],"modified":"2026-11-10T16:15:04.766553857Z","published":"2026-11-10T15:57:05Z","database_specific":{"nvd_published_at":"2026-11-09T18:17:26Z","cwe_ids":["CWE-200","CWE-532"],"severity":"LOW","github_reviewed":true,"github_reviewed_at":"2026-11-10T15:57:05Z"},"references":[{"type":"WEB","url":"https://github.com/tmatens/compose-lint/security/advisories/GHSA-jf3h-8jvx-vcrg"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-123372"},{"type":"WEB","url":"https://github.com/tmatens/compose-lint/pull/944"},{"type":"WEB","url":"https://github.com/tmatens/compose-lint/commit/977da9724789264c2662afe47f79220e915442c2"},{"type":"PACKAGE","url":"https://github.com/tmatens/compose-lint"},{"type":"WEB","url":"https://github.com/tmatens/compose-lint/releases/tag/v0.32.0"}],"affected":[{"package":{"name":"compose-lint","ecosystem":"PyPI","purl":"pkg:pypi/compose-lint"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.22.0"},{"fixed":"0.32.0"}]}],"versions":["0.22.0","0.23.0","0.24.0","0.25.0","0.26.0","0.27.0","0.28.0","0.29.0","0.30.0","0.31.0"],"database_specific":{"last_known_affected_version_range":"\u003c= 0.31.0","source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/11/GHSA-jf3h-8jvx-vcrg/GHSA-jf3h-8jvx-vcrg.json"}},{"package":{"name":"tmatens/compose-lint","ecosystem":"GitHub Actions"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.22.0"},{"fixed":"0.32.0"}]},{"type":"GIT","repo":"https://github.com/tmatens/compose-lint","events":[{"introduced":"811ef6b379dbc78d048fcedaf976205705d4a7c3"},{"fixed":"2d42617e4c6416f797bbfc6a057950131fa02df3"}]}],"versions":["v0.31.0","v0.30.0","v0.29.0","v0.28.0","v0.27.0","v0.26.0","v0.25.0","v0.24.0","v0.23.0","v0.22.0"],"database_specific":{"last_known_affected_version_range":"\u003c= 0.31.0","source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/11/GHSA-jf3h-8jvx-vcrg/GHSA-jf3h-8jvx-vcrg.json"}}],"schema_version":"1.9.2","severity":[{"type":"CVSS_V4","score":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N"}]}