mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-06-09 08:21:50 +00:00
After four iterations the taint flow finally settled on auth.py's
print_credential_summary, which emits four lines like
`emit(f" device token : {_present_token()}")`. The
`_present_*()` closures collapse credentials into display literals
("✓ stored" / "✗ missing") before the f-string evaluation, so no
secret bytes ever reach emit() — but CodeQL's interprocedural taint
tracker can't see through the closure-then-literal-return pattern
and keeps flagging the four lines.
This is the appropriate place for an inline suppression:
- auth.py is the only module that legitimately handles the secret;
every other surface (cli.py, adapter.py, tests) routes through
these helpers and stays clear of taint.
- The four lines are physically the boundary between
credential-reading code and a display callback. Without the
`emit(...)` calls there is no status command.
- The suppression is per-line with a comment explaining the
misfire pattern so a future maintainer can see the reasoning
without git-archaeology.
If GitHub's hosted CodeQL doesn't honor # lgtm comments on default-
config scans we'll need to dismiss these as false positives in the
Security tab once — that's the standard escape valve for this rule.
Validation:
tests/plugins/platforms/photon/ → 26/26 pass
py_compile clean
|
||
|---|---|---|
| .. | ||
| browser | ||
| context_engine | ||
| dashboard_auth | ||
| disk-cleanup | ||
| google_meet | ||
| hermes-achievements | ||
| image_gen | ||
| kanban | ||
| memory | ||
| model-providers | ||
| observability | ||
| platforms | ||
| security-guidance | ||
| spotify | ||
| teams_pipeline | ||
| video_gen | ||
| web | ||
| __init__.py | ||
| plugin_utils.py | ||