- 필수 기능
- 시작하기
- Glossary
- 표준 속성
- Guides
- Agent
- 통합
- 개방형텔레메트리
- 개발자
- Administrator's Guide
- API
- Datadog Mobile App
- CoScreen
- Cloudcraft
- 앱 내
- 서비스 관리
- 인프라스트럭처
- 애플리케이션 성능
- APM
- Continuous Profiler
- 스팬 시각화
- 데이터 스트림 모니터링
- 데이터 작업 모니터링
- 디지털 경험
- 소프트웨어 제공
- 보안
- AI Observability
- 로그 관리
- 관리
Static Infrastructure as Code (IaC) scanning is in Preview. To request access, complete the form.
Request AccessInfrastructure as Code (IaC) Scanning detects security misconfigurations in Terraform, Kubernetes, and CloudFormation files. Exclusions allow you to control which findings appear in scan results by ignoring specific rules, files, or issue categories.
You can configure exclusions using:
dd-iac-scan.config
in the root directory of your project repository.dd-iac-scan.config
file to your repository.Use exclude-severities
to exclude findings based on severity level. To supply multiple values to this option, you can set the option multiple times or pass in a list.
Possible values:
critical
high
medium
low
info
exclude-severities:
- "info"
- "low"
"exclude-severities": [
"info",
"low"
]
exclude-severities = [ "info", "low" ]
"exclude-severities" = ["info", "low"]
Use exclude-paths
to exclude specific files or directories from scanning. This option supports glob patterns. To supply multiple values to this option, you can set the option multiple times or pass in a list.
exclude-paths:
- "./shouldNotScan/*"
- "dir/somefile.txt"
"exclude-paths": [
"./shouldNotScan/*",
"dir/somefile.txt"
]
exclude-paths = [ "./shouldNotScan/*", "dir/somefile.txt" ]
"exclude-paths" = ["./shouldNotScan/*", "dir/somefile.txt"]
Use exclude-queries
to exclude specific queries by their query ID. To supply multiple values to this option, you can set the option multiple times or pass in a list.
exclude-queries:
- "e69890e6-fce5-461d-98ad-cb98318dfc96"
- "4728cd65-a20c-49da-8b31-9c08b423e4db"
"exclude-queries": [
"e69890e6-fce5-461d-98ad-cb98318dfc96",
"4728cd65-a20c-49da-8b31-9c08b423e4db"
]
exclude-queries = [ "e69890e6-fce5-461d-98ad-cb98318dfc96", "4728cd65-a20c-49da-8b31-9c08b423e4db" ]
"exclude-queries" = ["e69890e6-fce5-461d-98ad-cb98318dfc96", "4728cd65-a20c-49da-8b31-9c08b423e4db"]
Use exclude-categories
to exclude specific categories. This option can be used multiple times or as a string representation of a list.
Possible values:
Access Control
Availability
Backup
Best Practices
Build Process
Encryption
Insecure Configurations
Insecure Defaults
Networking and Firewall
Observability
Resource Management
Secret Management
Supply-Chain
Structure and Semantics
Bill Of Materials
exclude-categories:
- "Access Control"
- "Best Practices"
"exclude-categories": [
"Access Control",
"Best Practices"
]
exclude-categories = [ "Access Control", "Best Practices" ]
"exclude-categories" = ["Access Control", "Best Practices"]
To control which parts of a file are scanned, add a comment that starts with # dd-iac-scan
, followed by a command and any required values. Inline exclusions apply only within the file where they are used.
Comment | Description |
---|---|
dd-iac-scan ignore | Ignores the entire file. |
dd-iac-scan disable=<query_id> | Ignores specific queries. |
dd-iac-scan enable=<query_id> | Includes only specific queries. |
dd-iac-scan ignore-line | Ignores a single line. |
dd-iac-scan ignore-block | Ignores an entire block. |
Excludes the entire file from IaC scanning. This comment must be placed at the beginning of the file to take effect.
# dd-iac-scan ignore
resource "aws_s3_bucket" "example" {
bucket = "my-tf-test-bucket"
...
}
...
Excludes scan results for the specified queries in this file. This comment must be placed at the beginning of the file to take effect.
# dd-iac-scan disable=e592a0c5-5bdb-414c-9066-5dba7cdea370,e69890e6-fce5-461d-98ad-cb98318dfc96
resource "aws_s3_bucket" "example" {
bucket = "my-tf-test-bucket"
...
}
...
Findings from the specified queries are ignored for this file.
Limits scan results in this file to only the specified queries. This comment must be placed at the beginning of the file to take effect.
# dd-iac-scan enable=e592a0c5-5bdb-414c-9066-5dba7cdea370
resource "aws_s3_bucket" "example" {
bucket = "my-tf-test-bucket"
...
}
...
Only findings from the specified queries are included in scan results for this file.
Prevents scan results from flagging the line immediately after this comment. This comment can be placed anywhere in the file.
1: resource "google_storage_bucket" "example" {
2: # dd-iac-scan ignore-line
3: name = "image-store.com"
4: location = "EU"
5: force_destroy = true
6: }
Findings for line 3 are ignored.
Prevents scan results from flagging an entire resource block and all its key-value pairs. This comment can be placed anywhere in the file.
1: # dd-iac-scan ignore-block
2: resource "google_storage_bucket" "example" {
3: name = "image-store.com"
4: location = "EU"
5: force_destroy = true
6: }
Findings related to the entire block (lines 2-6 in this example) are ignored.