Git Product home page Git Product logo

checkmarx / kics Goto Github PK

View Code? Open in Web Editor NEW
1.9K 25.0 290.0 655.52 MB

Find security vulnerabilities, compliance issues, and infrastructure misconfigurations early in the development cycle of your infrastructure-as-code with KICS by Checkmarx.

Home Page: https://kics.io

License: Apache License 2.0

Dockerfile 0.67% Go 24.25% Makefile 0.09% HCL 26.21% Open Policy Agent 41.86% Shell 0.01% CSS 0.07% JavaScript 0.01% HTML 3.32% ANTLR 0.13% Bicep 3.39%
iac infrastructure-as-code security appsec cloudnative hacktoberfest devsecops golang security-tools vulnerability-detection

kics's Issues

Add ObjectVersioningNotEnabled query for Terraform

Platform

Terraform

Provider

GCP

Description

This query ensures that object versioning is enabled on a Google Storage Bucket by checking if the 'versioning' block exists within the 'google_storage_bucket' resource and with the 'enabled' field equal to 'true'.

Add DnssecUseRSASHA1 query for Terraform

Platform

Terraform

Provider

GCP

Description

This query checks if, within the 'dnssec_config' block, the 'default_key_specs' block exists with the 'algorithm' field is 'rsasha1' which is bad.

Add logRetention query for Terraform

Platform

Terraform

Provider

Azure

Description

Ensure server parameter 'log_retention_days' is greater than 3 days for PostgreSQL Database Server

Add categories structure in queries

Currently the queries are divided in code by "system/provider" (e.g. terraform/aws). A structure grouping the queries per category is recommended to be more readable -> "system/category/provider".

Add Master Authentication is Disabled query for Terraform

Platform

Terraform

Provider

GCP

Description

Kubernetes Engine Clusters must have Master Authentication set to enabled, which means the attribute 'master_auth' must have the subattributes 'username' and 'password' defined and not empty

Add Client Certificate is Disabled query for Terraform

Platform

Terraform

Provider

GCP

Description

Kubernetes Clusters must be created with Client Certificate enabled, which means 'master_auth' must have 'client_certificate_config' with the attribute 'issue_client_certificate' equal to true

Add CloudStorageBucketWithPublicAccess query for Terraform

Platform

Terraform

Provider

GCP

Description

This query detects if a Cloud Storage Bucket is anonymously or publicly accessible by checking if the member/members field inside the resource 'google_storage_bucket_iam_member' equals/includes 'allUsers' or 'allAuthenticatedUsers'.

Add IP_Aliasing_is_Disabled query for Terraform

Platform

Terraform

Provider

GCP

Description

Kubernetes Clusters must be created with Alias IP ranges enabled, which means the attribut 'ip_allocation_policy' must be defined and, if defined, the attribute 'networking_mode' must be VPC_NATIVE

Update older Terraform queries

Platform

Terraform

Provider

Azure

Description

Rename and change the description and description URL for the following queries:

  • reme_geo_redundancy_disabled
  • reme_ssl_enforce_disabled
  • reme_check_key_expiration_is_set
  • check_secret_expiration_is_set
  • storage_account_enable_Https
  • reme_connection_throttling
  • reme_log_connections
  • sql_auditing_retention
  • mssql_auditing_retention
  • postgre_sql_logs_enabled
  • sql_database_disabled_audit
  • email_alerts_enabled
  • sql_server_auditing_enabled
  • mssql_server_auditing_enabled
  • reme_logRetensionGraterThan90Days
  • ssl_connection_enabled
  • reme_security_center_princing_tier

Add SQLDatabaseBackupConfigurationDisabled query for Terraform

Platform

Terraform

Provider

GCP

Description

This query detects Cloud SQL Database instances with backup_configuration disabled. Checks if, within the 'settings' block, the 'backup_configuration' block exists with the 'enable' field equal to 'false'.

Add SQLDatabaseSSLDisabled query for Terraform

Platform

Terraform

Provider

GCP

Description

This query detects Cloud SQL Database instances with SSL disabled for incoming connections. Checks if, within the 'settings' block, the 'ip_configuration' block exists with the 'require_ssl' field equal to 'false'.

Add Network Policy is Disabled query for Terraform

Platform

Terraform

Provider

GCP

Description

Kubernetes Engine Clusters must have Network Policy enabled, meaning that the attribute 'network_policy.enabled' must be true and the attribute 'addons_config.network_policy_config.disabled' must be false

Add End-to-End testing capabilities

By running our engine against our code samples, we should guarantee that it would never fail, for each PR.

Input:
go run ./cmd/console/main.go -p assets/queries
Output:
Exit status should be 0

In case of failing (exit status 1), we should give some information of the error (showing the log for example)

Project renaming to KICS

Description

The repo should be renamed to the new name (KICS) - Keeping Infrastructure as Code Secure

All hardcoded places containing the previous should also be addressed

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.