feat: secret-in-args warning badge (#1r) #16
Reference in New Issue
Block a user
Delete Branch "feat/1r-secret-args-badge"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
args_secret_warning(data: dict) -> str | Nonetobcc_core.py— detects secret-shaped values inargsvia three paths: bare token-prefix values (e.g.ghp_…), values following a secret-named flag (--token abc), and URLs with embeddeduser:passcredentials (postgres://user:pass@host/db).--flag=valueinline pairs are intentionally skipped (the flag name already labels the value).self.secret_warnQLabel toServerEditor's stdio page; shown/hidden by_check_args()on every field change, hidden on deselect and on stdio→remote type switch. Non-blocking — the save path is not touched.test_core.pycovering all detection paths and key negatives (benign URLs, env-only secrets, inline flag pairs).Test plan
python -m pytest— 92 passedruff check .— cleanruff format --check .— cleanbcc.pywiring done but not smoke-tested in a display environment (per HANDOFF note — no display available in this session)Closes #1