You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Follow-up from #3762 (which extended secret redaction to list values).
The redaction keys off the attribute/map KEY matching _SENSITIVE_KEY_RE (password/secret/token/…). It does not catch the AWS name/value-pair idiom where the sensitive info is in a value paired with a name:
environment=[
{ name ="DB_PASSWORD", value ="hunter2" }, # value leaks
]
secrets=[{ name ="API_KEY", valueFrom ="..." }]
Here the map keys are literally name/value/valueFrom — none match the sensitive-key set — so hunter2 is captured into graph.json and the MCP surface verbatim. This is a pre-existing limitation of key-name matching (the map form x = { name = "PASSWORD", value = "..." } misses it too), not a regression from #3762; #3762 correctly closed the list-recursion gap it targeted.
Fix idea: when a map/object has both a name-like key and a value/valueFrom key, and the name's literal value matches _SENSITIVE_KEY_RE, redact the paired value. Scope to ECS/Batch containerDefinitions[].environment/secrets and the generic [{name,value}] shape. Keep it conservative (only redact when the name literal is clearly a secret) to avoid over-redacting ordinary name/value config.
A fix with a regression test is in #3870. It follows the conservative shape you suggested: when a map has a name whose literal matches _SENSITIVE_KEY_RE, its value/valueFrom is redacted. The name stays visible, and ordinary pairs such as LOG_LEVEL are untouched.
Red/green: test_terraform_name_value_pair_secret_is_redacted fails on v8 4377ee9 with {'name': 'DB_PASSWORD', 'value': 'hunter2'} and passes on the branch.
End to end: graphify update . on the ECS example writes hunter2 into graph.json once on v8 and zero times with the fix.
The jsonencode([...]) / heredoc spelling of container_definitions is a separate gap, because those values are stored as raw text. I have a separate fix for it.
Activity
breken-ai commentedon Sep 26, 2026
A fix with a regression test is in #3870. It follows the conservative shape you suggested: when a map has a
namewhose literal matches_SENSITIVE_KEY_RE, itsvalue/valueFromis redacted. Thenamestays visible, and ordinary pairs such asLOG_LEVELare untouched.test_terraform_name_value_pair_secret_is_redactedfails on v8 4377ee9 with{'name': 'DB_PASSWORD', 'value': 'hunter2'}and passes on the branch.graphify update .on the ECS example writeshunter2into graph.json once on v8 and zero times with the fix.The
jsonencode([...])/ heredoc spelling of container_definitions is a separate gap, because those values are stored as raw text. I have a separate fix for it.fix(terraform): redact the value paired with a secret-named name in n…