🇰🇷 한글 설명
compose-lint는 배포 전에 Docker Compose의 위험한 설정 오류를 찾아내는 보안 린터입니다. 0.31.0 이전 버전은 공격자가 조작할 수 있는 서비스 이름, 환경 변수 키, 파일 라인 등을 출력할 때 GitHub Actions 및 Azure Pipelines의 워크플로 명령 시작 문자열을 무력화하지 않습니다. 이로 인해 풀 리퀘스트 처리 시 CI 로그에 거짓 주석이 생기거나 로그 일부가 숨겨지는 등 검토자에게 잘못된 CI 출력이 보일 수 있습니다.
💡 쉬운 설명
Docker 설정 검사 도구가 악의적인 텍스트를 그대로 출력해서, CI 화면에 가짜 경고나 숨겨진 로그가 나타날 수 있습니다. 실제 검사 결과(통과/실패)는 바뀌지 않지만 리뷰하는 사람이 잘못된 정보를 보게 됩니다.
🇺🇸 원문 (English)
compose-lint is a Docker Compose security linter that identifies dangerous misconfigurations before deployment. Prior to 0.31.0, compose-lint prints attacker-controlled service names, environment keys, file lines, and other Compose text without neutralizing GitHub Actions and Azure Pipelines workflow-command openers. When a workflow processes a pull request, legacy ##[ commands or a line-leading double-colon command can create false annotations, hide log regions, mask selected strings, or invoke other commands recognized by the runner. The affected text report paths do not alter the compose-lint exit code or pass or fail result, but they can misrepresent the CI output presented to reviewers. This issue is fixed in version 0.31.0.
📍 영향받는 시스템
compose-lint 0.31.0 미만 버전 (GitHub Actions, Azure Pipelines 등 CI 환경에서 사용 시)
⚔️ 공격 벡터
공격자가 Compose 파일의 서비스 이름이나 환경 변수 키에 워크플로 명령 문자열(##[ 또는 줄 시작의 ::)을 넣은 풀 리퀘스트를 제출하면, 검사 도구 출력이 CI 로그에서 명령으로 해석됩니다.
🛡️ 대응 방법
compose-lint를 0.31.0 이상으로 업그레이드합니다.
🔧 검증 코드
출력된 버전이 0.31.0 미만이면 취약하므로 업그레이드가 필요하고, 0.31.0 이상이면 수정된 버전입니다. 명령이 아무 결과도 없으면 pip로 설치되지 않은 것이므로 다른 설치 방법(예: 컨테이너 이미지, 바이너리)을 확인해야 합니다.
pip show compose-lint 2>/dev/null | grep -i '^version'