⭐ expose initProcessEnabled on ECS container definition#7060
Merged
Conversation
The Go code already populated this field from LinuxParameters but it was missing from the .lr schema, preventing MQL queries from accessing it. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
New initProcessEnabled field on ECS container definitions is never populated, always returning false
Additional findings (file/line not in diff):
- 🔴
providers/aws/resources/aws_ecs.go:963— TheinitProcessEnabledfield is declared as a plain property in.lr(not a computed method), so it must be set atCreateResourcetime. However, theCreateResourcecall here does not include"initProcessEnabled", so it will always default tofalse.
The data is already extracted for aws.ecs.container at line ~498-499 via cd.LinuxParameters.InitProcessEnabled. Apply the same logic here:
initProcessEnabled := false
if cd.LinuxParameters != nil && cd.LinuxParameters.InitProcessEnabled {
initProcessEnabled = true
}Then add "initProcessEnabled": llx.BoolData(initProcessEnabled) to the CreateResource map.
Extract LinuxParameters.InitProcessEnabled from the AWS SDK container definition and pass it to the CreateResource call so the field returns actual data instead of always defaulting to false. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…Enabled Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
8 tasks
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
initProcessEnabledbool field to theaws.ecs.taskDefinition.containerDefinitionresource schemaLinuxParameters.InitProcessEnabledbut it was missing from the.lrschema, so MQL queries couldn't reference itTest plan
aws.ecs.taskDefinitions { containerDefinitions { initProcessEnabled } }returns data incnquery shell -t awsmondoo-aws-security-ecs-init-process-enabledcheck🤖 Generated with Claude Code