abhay-codes07 and Claude Opus 4.8
2998cb2121
fix(terraform): redact secrets nested inside list values, not just maps ( #3644 follow-up)
...
`_redact_value` (the #3644 guard that keeps hardcoded credentials in .tf files
out of graph.json and the MCP query/get_node surface) recursed into map values
but not list values. HCL routinely nests objects inside tuples —
`list(object(...))` variables, `dynamic` blocks, tuple defaults — and
`_parse_attr_value` turns those into Python lists of dicts, so:
config = { password = "x" } -> redacted (map recursion)
configs = [{ password = "x" }] -> LEAKED (list not recursed)
The list form left the secret in the serialized node verbatim, defeating the
guard for a very common Terraform shape (a `connections`/`containers`/`secrets`
tuple of objects).
Recurse into lists and tuples as well, under the same key — the list branch is
only reached when the key is not itself sensitive (a sensitive key redacts the
whole value above), so a scalar element carries no key signal and is returned
as-is while a dict element is checked against its own inner keys. A non-secret
list of scalars is untouched.
Tests: a unit check that a secret inside a list-of-objects and a nested list is
redacted (while a sensitive key still redacts the whole list and a plain scalar
list is left intact), and an end-to-end check that a `password`/`token` inside a
tuple-of-objects attribute never reaches the serialized node. Both fail without
the fix. The terraform suites otherwise stay green.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
Claude-Session: https://claude.ai/code/session_01JJbLfztSxm2tH5cJwBbe9q
2026-09-23 00:11:14 +05:30
..
2026-09-10 22:44:38 +01:00
2026-09-10 23:04:40 +01:00
2026-08-15 17:16:53 +01:00
2026-08-13 14:17:41 +01:00
2026-08-12 20:57:39 +01:00
2026-09-05 01:18:59 +01:00
2026-09-05 01:18:59 +01:00
2026-09-12 17:36:09 +01:00
2026-09-10 23:04:40 +01:00
2026-09-12 22:23:00 +01:00
2026-08-12 14:20:21 +01:00
2026-09-11 22:46:15 +01:00
2026-09-12 21:33:43 +01:00
2026-09-10 14:03:22 +01:00
2026-09-12 17:36:09 +01:00
2026-09-11 22:51:35 +01:00
2026-09-05 21:55:34 +01:00
2026-09-17 11:01:38 +01:00
2026-08-29 19:32:51 +01:00
2026-09-14 18:55:31 +01:00
2026-08-18 16:02:02 +01:00
2026-08-20 15:42:36 +01:00
2026-09-17 11:03:41 +01:00
2026-08-12 20:56:28 +01:00
2026-09-13 17:47:56 +01:00
2026-09-02 14:58:01 +01:00
2026-08-24 14:12:53 +01:00
2026-09-05 01:18:59 +01:00
2026-08-25 15:45:06 +01:00
2026-08-21 16:50:25 +01:00
2026-09-09 11:30:27 +01:00
2026-08-24 13:22:09 +01:00
2026-08-18 18:07:12 +01:00
2026-08-24 14:08:25 +01:00
2026-08-24 13:17:23 +01:00
2026-09-07 20:21:35 +01:00
2026-08-17 15:35:53 +01:00
2026-09-09 11:30:29 +01:00
2026-09-14 18:49:17 +01:00
2026-09-02 03:05:59 +01:00
2026-09-13 17:47:53 +01:00
2026-08-29 18:38:33 +01:00
2026-09-05 01:18:59 +01:00
2026-09-16 15:37:30 +01:00
2026-09-11 23:58:31 +01:00
2026-08-20 16:09:00 +01:00
2026-08-14 14:26:12 +01:00
2026-09-20 18:07:23 +01:00
2026-09-16 16:20:01 +01:00
2026-08-21 19:21:20 +01:00
2026-08-28 01:20:57 +01:00
2026-09-18 15:15:57 +01:00
2026-08-27 20:20:16 +01:00
2026-09-05 21:55:33 +01:00
2026-09-10 14:03:22 +01:00
2026-08-25 18:09:25 +01:00
2026-09-20 13:59:25 +01:00
2026-08-16 18:35:46 +01:00
2026-09-02 14:49:03 +01:00
2026-08-28 01:20:27 +01:00
2026-09-06 16:17:37 +01:00
2026-08-30 15:11:40 +01:00
2026-08-30 15:11:40 +01:00
2026-08-19 14:05:58 +01:00
2026-09-14 18:49:21 +01:00
2026-08-16 18:28:53 +01:00
2026-08-17 19:00:46 +01:00
2026-08-17 15:40:19 +01:00
2026-08-18 22:20:19 +01:00
2026-09-05 21:55:33 +01:00
2026-08-13 14:21:22 +01:00
2026-09-18 15:16:09 +01:00
2026-08-11 15:18:33 +01:00
2026-09-20 13:59:26 +01:00
2026-08-11 16:54:35 +01:00
2026-08-15 16:43:11 +01:00
2026-08-13 13:30:24 +01:00
2026-08-15 20:11:13 +01:00
2026-08-18 16:02:02 +01:00
2026-09-05 01:18:59 +01:00
2026-08-29 16:14:47 +01:00
2026-08-30 15:11:24 +01:00
2026-08-13 14:17:42 +01:00
2026-08-16 18:34:11 +01:00
2026-08-30 15:11:40 +01:00
2026-09-12 17:36:09 +01:00
2026-09-09 17:20:54 +01:00
2026-09-10 22:44:39 +01:00
2026-09-20 13:59:25 +01:00
2026-08-29 16:14:47 +01:00
2026-09-14 18:49:19 +01:00
2026-08-10 18:07:20 +01:00
2026-08-14 14:49:56 +01:00
2026-09-12 21:31:34 +01:00
2026-09-12 21:31:35 +01:00
2026-09-13 17:47:55 +01:00
2026-09-09 11:30:28 +01:00
2026-08-21 16:49:55 +01:00
2026-09-17 11:09:52 +01:00
2026-09-10 22:45:31 +01:00
2026-09-20 13:59:25 +01:00
2026-09-10 22:44:40 +01:00
2026-08-20 15:44:56 +01:00
2026-09-09 17:20:56 +01:00
2026-09-13 17:47:57 +01:00
2026-08-11 16:54:35 +01:00
2026-09-05 01:19:09 +01:00
2026-09-16 14:50:54 +01:00
2026-08-25 18:09:58 +01:00
2026-09-17 11:01:37 +01:00
2026-09-10 22:44:38 +01:00
2026-08-20 16:13:45 +01:00
2026-08-13 14:20:36 +01:00
2026-08-29 16:14:29 +01:00
2026-08-19 14:05:58 +01:00
2026-08-21 19:22:21 +01:00
2026-08-14 21:09:32 +01:00
2026-09-09 17:20:57 +01:00
2026-08-21 16:57:29 +01:00
2026-09-05 21:13:54 +01:00
2026-09-07 19:02:18 +01:00
2026-08-19 14:05:58 +01:00
2026-08-11 14:40:01 +01:00
2026-08-21 16:57:29 +01:00
2026-08-21 16:50:44 +01:00
2026-08-25 15:44:52 +01:00
2026-09-17 11:01:38 +01:00
2026-08-29 16:15:58 +01:00
2026-09-09 17:20:56 +01:00
2026-09-05 21:55:35 +01:00
2026-08-17 15:33:34 +01:00
2026-08-13 13:30:24 +01:00
2026-09-11 22:46:27 +01:00
2026-09-05 21:55:32 +01:00
2026-09-07 18:42:56 +01:00
2026-08-18 22:36:42 +01:00
2026-09-05 21:13:53 +01:00
2026-09-13 17:47:54 +01:00
2026-08-17 15:25:39 +01:00
2026-09-14 18:49:20 +01:00
2026-09-12 17:36:10 +01:00
2026-09-11 22:46:36 +01:00
2026-09-16 14:43:05 +01:00
2026-09-18 15:16:09 +01:00
2026-09-13 17:47:54 +01:00
2026-09-14 18:52:06 +01:00
2026-08-29 18:38:05 +01:00
2026-09-12 21:35:25 +01:00
2026-09-12 21:49:56 +01:00
2026-09-11 22:46:36 +01:00
2026-09-13 17:47:54 +01:00
2026-08-28 01:18:04 +01:00
2026-08-11 14:40:01 +01:00
2026-09-20 13:59:25 +01:00
2026-08-18 16:02:02 +01:00
2026-09-15 18:01:35 +01:00
2026-09-23 00:11:14 +05:30
2026-09-12 17:39:27 +01:00
2026-09-20 18:53:35 +01:00
2026-08-30 15:48:40 +01:00
2026-08-27 20:57:16 +01:00
2026-08-11 15:18:12 +01:00
2026-08-29 16:16:09 +01:00
2026-08-25 15:45:33 +01:00
2026-09-06 16:17:38 +01:00
2026-08-30 15:12:10 +01:00
2026-09-11 22:46:26 +01:00
2026-09-20 15:07:29 +01:00
2026-08-14 14:21:34 +01:00
2026-08-30 15:11:23 +01:00
2026-08-14 14:20:04 +01:00
2026-08-11 14:40:01 +01:00