Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

accurics.gcp.OPS.114 should also check for cos_containerd image #395

Closed
lucas-giaco opened this issue Nov 19, 2020 · 0 comments · Fixed by #397
Closed

accurics.gcp.OPS.114 should also check for cos_containerd image #395

lucas-giaco opened this issue Nov 19, 2020 · 0 comments · Fixed by #397

Comments

@lucas-giaco
Copy link
Contributor

  • terrascan version: v.0.1.10
  • Operating System: MacOS 10.15.7

Description

Following Google hardening best practices suggest the usage of cos_containerd image for the nodes.
While implementing this suggestion, terrascan scan fails because I'm not using the cos image.
It's also worth noticing that if I set image_type = "COS" the rule is also fired

What I Did

cat <<EOF > nodes.tf
resource "google_container_node_pool" "nodes" {
  node_config {
    image_type = "cos_containerd"
  }
}
EOF
terrascan scan -t gcp -f nodes.tf
results:
  violations:
  - rule_name: cosNodeImageUsed
    description: Ensure Container-Optimized OS (cos) is used for Kubernetes Engine Clusters Node image.
    rule_id: accurics.gcp.OPS.114
    severity: HIGH
    category: Operational Efficiency
    resource_name: nodes
    resource_type: google_container_node_pool
    file: nodes.tf
    line: 1
  count:
    low: 0
    medium: 0
    high: 1
    total: 1
cat <<EOF > nodes.tf
resource "google_container_node_pool" "nodes" {
  node_config {
    image_type = "COS"
  }
}
EOF
terrascan scan -t gcp -f nodes.tf
results:
  violations:
  - rule_name: cosNodeImageUsed
    description: Ensure Container-Optimized OS (cos) is used for Kubernetes Engine Clusters Node image.
    rule_id: accurics.gcp.OPS.114
    severity: HIGH
    category: Operational Efficiency
    resource_name: nodes
    resource_type: google_container_node_pool
    file: nodes.tf
    line: 1
  count:
    low: 0
    medium: 0
    high: 1
    total: 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant