Wiz Details CI/CD Misconfigurations That Can Enable Cloud Supply-Chain Attacks

· Original article ↗

Summary

Wiz describes how overprivileged container registries, forgotten build secrets, and links between production and CI/CD environments can expose software supply chains, and recommends least privilege, secret scanning, and network isolation.

Key points

  • Compromised containerized instances or pods may expose registry credentials, allowing attackers to access private images or overwrite production images if credentials permit writes.
  • Secrets left in build artifacts, image layers, bash history, or logs can enable lateral movement and tampering with artifacts.
  • The article describes the Hell’s Keychain attack as an example of inadequate network controls exposing an internal CI/CD repository.
  • Restrict registry permissions and scope pull and push access to the repositories and pipeline stages that require it.
  • Limit pod service-account privileges and access to container-registry secrets.
  • Regularly scan production artifacts, image layers, and metadata for forgotten secrets.
  • Isolate CI/CD assets with network policies, restrict credentials and storage buckets to the CI/CD network, and avoid storing service credentials in internet-facing applications.

Article Details

Defense Focus
Reduce CI/CD supply-chain attack risk by limiting access to container registries and secrets, scanning build artifacts, and isolating production environments from internal build systems.
Detection Methods
  • Regularly scan environments and production artifacts for forgotten secrets during the final phase of each artifact build.
  • Scan all container image layers and metadata files, including historical build commands and filesystems that may be hidden after squashing.
  • Monitor cloud access keys in internet-facing environments and verify they do not grant access to CI/CD environments.
Data Sources
  • Container image layers and metadata
  • Linux bash history files, including ~/.bash_history and /root/.bash_history
  • AWS SSM logs at /var/log/amazon/ssm/*
  • Linux journal files at /var/log/journal/*
  • Cloud access keys, service credentials, and access tokens
  • Container registry permissions and image-pull secrets
  • Cloud identities, storage bucket policies, and network access controls
Platforms
  • CI/CD environments
  • Container registries
  • Kubernetes
  • Cloud environments
  • SaaS CI/CD solutions
Defensive Actions
  • Apply least privilege to container registry roles; scope pull and push permissions to required repositories and images.
  • Limit registry push privileges to roles involved in the final CI/CD pipeline phase, and avoid granting unnecessary resource-listing permissions.
  • Restrict pod service-account privileges and access to container registry secrets.
  • Scan secrets in artifacts, image layers, and metadata; remove exposed credentials and prevent them from being retained in production artifacts.
  • Use strong network policies and cloud segmentation to isolate critical assets and restrict storage buckets and cloud identities to the CI/CD virtual network.
  • Do not store service credentials or access tokens in internet-facing applications when network access to a SaaS CI/CD service cannot be restricted.
  • Use two-factor authentication and role-based access controls for SaaS CI/CD solutions.

MITRE ATT&CK

Products

Tools

Related Articles