Commit 9cee345
fix(dream-cli): belt-and-suspenders masking in 'config show'
The schema-authoritative check in the previous commit leaks keys that are
present in .env.schema.json with secret: false, which today miscovers five
real upstream-provider credentials (TARGET_API_KEY, ANTHROPIC_API_KEY,
OPENAI_API_KEY, TOGETHER_API_KEY, LIVEKIT_API_KEY). A malformed schema
(valid JSON but empty jq output) has the same silent-leak failure mode.
After a schema-miss under _schema_loaded=1, fall through to the keyword
substring match instead of returning "not secret" immediately. Schema
still defines what IS definitely a secret; the keyword pass adds defense
in depth for schema gaps. Over-masking of LANGFUSE_PROJECT_PUBLIC_KEY,
TOKEN_SPY_PORT, and TOKEN_SPY_URL is acceptable — 'show' should default
to over-masking, and raw values remain available via cat .env.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent ce37c11 commit 9cee345
2 files changed
Lines changed: 47 additions & 33 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
| 83 | + | |
83 | 84 | | |
84 | 85 | | |
85 | 86 | | |
| |||
502 | 503 | | |
503 | 504 | | |
504 | 505 | | |
505 | | - | |
| 506 | + | |
| 507 | + | |
506 | 508 | | |
507 | 509 | | |
508 | 510 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1174 | 1174 | | |
1175 | 1175 | | |
1176 | 1176 | | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
1177 | 1213 | | |
1178 | 1214 | | |
1179 | 1215 | | |
| |||
1186 | 1222 | | |
1187 | 1223 | | |
1188 | 1224 | | |
1189 | | - | |
1190 | | - | |
1191 | | - | |
1192 | | - | |
1193 | | - | |
1194 | | - | |
1195 | | - | |
1196 | | - | |
1197 | | - | |
1198 | | - | |
1199 | | - | |
1200 | | - | |
1201 | | - | |
1202 | | - | |
1203 | | - | |
1204 | | - | |
1205 | | - | |
1206 | | - | |
1207 | | - | |
1208 | | - | |
1209 | | - | |
1210 | | - | |
1211 | | - | |
1212 | | - | |
1213 | | - | |
1214 | | - | |
1215 | | - | |
1216 | | - | |
1217 | | - | |
1218 | | - | |
| 1225 | + | |
1219 | 1226 | | |
1220 | 1227 | | |
1221 | 1228 | | |
| |||
2121 | 2128 | | |
2122 | 2129 | | |
2123 | 2130 | | |
| 2131 | + | |
| 2132 | + | |
| 2133 | + | |
| 2134 | + | |
| 2135 | + | |
2124 | 2136 | | |
2125 | 2137 | | |
2126 | 2138 | | |
| |||
2152 | 2164 | | |
2153 | 2165 | | |
2154 | 2166 | | |
2155 | | - | |
| 2167 | + | |
2156 | 2168 | | |
2157 | 2169 | | |
2158 | 2170 | | |
| |||
0 commit comments