fix(auth): stop blocklisting GH_TOKEN / GITHUB_TOKEN - #12
Conversation
|
Warning Review limit reached
Your plan includes 1 review of capacity. Refill in 52 minutes and 48 seconds. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more review capacity refills, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than trial, open-source, and free plans. In all cases, review capacity refills continuously over time. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (9)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
auto-review: changes requested. The PR can't merge as-is. Two blocking findings:
Fix: rebase the auth fix onto a fresh |
2953b46 to
c2bc7a0
Compare
edfd71b to
ae93de0
Compare
🚨 CRITICAL Supply Chain Risk DetectedThis PR contains a pattern that has been used in real supply chain attacks. A maintainer must review the flagged code carefully before merging. 🚨 CRITICAL: Install-hook file added or modifiedThese files can execute code during package installation or interpreter startup. Files: Scanner only fires on high-signal indicators: .pth files, base64+exec/eval combos, subprocess with encoded commands, or install-hook files. Low-signal warnings were removed intentionally — if you're seeing this comment, the finding is worth inspecting. |
🔎 Lint report:
|
|
auto-review: changes requested. Scope + diff are clean now (9 in-scope files only, +99/-12, mergeable). Two required CI checks are blocking:
Tests workflow was still IN_PROGRESS at review time; if any |
ae93de0 to
dcc8ec9
Compare
GH_TOKEN and GITHUB_TOKEN are general-purpose gh CLI / git auth
variables — used by every git remote helper, CI job, and developer
machine. Listing them on the Copilot provider's api_key_env_vars
propagated them into _HERMES_PROVIDER_ENV_BLOCKLIST and silently
stripped them from every terminal subprocess, breaking 'gh pr
create', 'git push', 'gh auth status' for kanban workers.
Changes:
- hermes_cli/auth.py: Copilot provider api_key_env_vars scoped to
('COPILOT_GITHUB_TOKEN',). Generic GitHub tokens stay reachable
via copilot_auth.COPILOT_ENV_VARS (lookup precedence unchanged).
- hermes_cli/providers.py: same trim on the github-copilot overlay
extra_env_vars tuple.
- tools/environments/local.py: drop the explicit 'GH_TOKEN' entry
from the hardcoded extras set in _build_provider_env_blocklist.
- hermes_cli/config.py: re-category GITHUB_TOKEN from 'tool' to
'skill' so OPTIONAL_ENV_VARS no longer feeds it into the blocklist
(the 'skill' category exists precisely for vars that legitimately
need subprocess passthrough).
- hermes_cli/setup.py: _model_section_has_credentials() now consults
copilot_auth.COPILOT_ENV_VARS when checking the copilot provider so
an explicit copilot config + GH_TOKEN still counts as configured.
Tests:
- tests/tools/test_env_passthrough.py: new regression covering
GH_TOKEN / GITHUB_TOKEN passthrough + COPILOT_ENV_VARS lookup.
- Updated affected blocklist/api-key tests to assert the new shape
while pointing at copilot_auth.COPILOT_ENV_VARS for the full
lookup precedence (docs-facing list unchanged in behaviour).
Refs kanban task t_e9b3a894.
dcc8ec9 to
21a51c3
Compare
|
auto-review: approved, awaiting human merge + kanban_approve. Scope: 9 in-scope files only (+99/-12), matches AC exactly. |
GH_TOKEN and GITHUB_TOKEN are general-purpose gh CLI / git auth
variables — used by every git remote helper, CI job, and developer
machine. Listing them on the Copilot provider's api_key_env_vars
propagated them into _HERMES_PROVIDER_ENV_BLOCKLIST and silently
stripped them from every terminal subprocess, breaking 'gh pr
create', 'git push', 'gh auth status' for kanban workers.
Changes:
- hermes_cli/auth.py: Copilot provider api_key_env_vars scoped to
('COPILOT_GITHUB_TOKEN',). Generic GitHub tokens stay reachable
via copilot_auth.COPILOT_ENV_VARS (lookup precedence unchanged).
- hermes_cli/providers.py: same trim on the github-copilot overlay
extra_env_vars tuple.
- tools/environments/local.py: drop the explicit 'GH_TOKEN' entry
from the hardcoded extras set in _build_provider_env_blocklist.
- hermes_cli/config.py: re-category GITHUB_TOKEN from 'tool' to
'skill' so OPTIONAL_ENV_VARS no longer feeds it into the blocklist
(the 'skill' category exists precisely for vars that legitimately
need subprocess passthrough).
- hermes_cli/setup.py: _model_section_has_credentials() now consults
copilot_auth.COPILOT_ENV_VARS when checking the copilot provider so
an explicit copilot config + GH_TOKEN still counts as configured.
Tests:
- tests/tools/test_env_passthrough.py: new regression covering
GH_TOKEN / GITHUB_TOKEN passthrough + COPILOT_ENV_VARS lookup.
- Updated affected blocklist/api-key tests to assert the new shape
while pointing at copilot_auth.COPILOT_ENV_VARS for the full
lookup precedence (docs-facing list unchanged in behaviour).
Refs kanban task t_e9b3a894.
Co-authored-by: Sahil Marwaha <sahil@nousresearch.com>
GH_TOKEN and GITHUB_TOKEN are general-purpose gh CLI / git auth
variables — used by every git remote helper, CI job, and developer
machine. Listing them on the Copilot provider's api_key_env_vars
propagated them into _HERMES_PROVIDER_ENV_BLOCKLIST and silently
stripped them from every terminal subprocess, breaking 'gh pr
create', 'git push', 'gh auth status' for kanban workers.
Changes:
- hermes_cli/auth.py: Copilot provider api_key_env_vars scoped to
('COPILOT_GITHUB_TOKEN',). Generic GitHub tokens stay reachable
via copilot_auth.COPILOT_ENV_VARS (lookup precedence unchanged).
- hermes_cli/providers.py: same trim on the github-copilot overlay
extra_env_vars tuple.
- tools/environments/local.py: drop the explicit 'GH_TOKEN' entry
from the hardcoded extras set in _build_provider_env_blocklist.
- hermes_cli/config.py: re-category GITHUB_TOKEN from 'tool' to
'skill' so OPTIONAL_ENV_VARS no longer feeds it into the blocklist
(the 'skill' category exists precisely for vars that legitimately
need subprocess passthrough).
- hermes_cli/setup.py: _model_section_has_credentials() now consults
copilot_auth.COPILOT_ENV_VARS when checking the copilot provider so
an explicit copilot config + GH_TOKEN still counts as configured.
Tests:
- tests/tools/test_env_passthrough.py: new regression covering
GH_TOKEN / GITHUB_TOKEN passthrough + COPILOT_ENV_VARS lookup.
- Updated affected blocklist/api-key tests to assert the new shape
while pointing at copilot_auth.COPILOT_ENV_VARS for the full
lookup precedence (docs-facing list unchanged in behaviour).
Refs kanban task t_e9b3a894.
Co-authored-by: Sahil Marwaha <sahil@nousresearch.com>
GH_TOKEN and GITHUB_TOKEN are general-purpose gh CLI / git auth
variables — used by every git remote helper, CI job, and developer
machine. Listing them on the Copilot provider's api_key_env_vars
propagated them into _HERMES_PROVIDER_ENV_BLOCKLIST and silently
stripped them from every terminal subprocess, breaking 'gh pr
create', 'git push', 'gh auth status' for kanban workers.
Changes:
- hermes_cli/auth.py: Copilot provider api_key_env_vars scoped to
('COPILOT_GITHUB_TOKEN',). Generic GitHub tokens stay reachable
via copilot_auth.COPILOT_ENV_VARS (lookup precedence unchanged).
- hermes_cli/providers.py: same trim on the github-copilot overlay
extra_env_vars tuple.
- tools/environments/local.py: drop the explicit 'GH_TOKEN' entry
from the hardcoded extras set in _build_provider_env_blocklist.
- hermes_cli/config.py: re-category GITHUB_TOKEN from 'tool' to
'skill' so OPTIONAL_ENV_VARS no longer feeds it into the blocklist
(the 'skill' category exists precisely for vars that legitimately
need subprocess passthrough).
- hermes_cli/setup.py: _model_section_has_credentials() now consults
copilot_auth.COPILOT_ENV_VARS when checking the copilot provider so
an explicit copilot config + GH_TOKEN still counts as configured.
Tests:
- tests/tools/test_env_passthrough.py: new regression covering
GH_TOKEN / GITHUB_TOKEN passthrough + COPILOT_ENV_VARS lookup.
- Updated affected blocklist/api-key tests to assert the new shape
while pointing at copilot_auth.COPILOT_ENV_VARS for the full
lookup precedence (docs-facing list unchanged in behaviour).
Refs kanban task t_e9b3a894.
Co-authored-by: Sahil Marwaha <sahil@nousresearch.com>
GH_TOKEN and GITHUB_TOKEN are general-purpose gh CLI / git auth
variables — used by every git remote helper, CI job, and developer
machine. Listing them on the Copilot provider's api_key_env_vars
propagated them into _HERMES_PROVIDER_ENV_BLOCKLIST and silently
stripped them from every terminal subprocess, breaking 'gh pr
create', 'git push', 'gh auth status' for kanban workers.
Changes:
- hermes_cli/auth.py: Copilot provider api_key_env_vars scoped to
('COPILOT_GITHUB_TOKEN',). Generic GitHub tokens stay reachable
via copilot_auth.COPILOT_ENV_VARS (lookup precedence unchanged).
- hermes_cli/providers.py: same trim on the github-copilot overlay
extra_env_vars tuple.
- tools/environments/local.py: drop the explicit 'GH_TOKEN' entry
from the hardcoded extras set in _build_provider_env_blocklist.
- hermes_cli/config.py: re-category GITHUB_TOKEN from 'tool' to
'skill' so OPTIONAL_ENV_VARS no longer feeds it into the blocklist
(the 'skill' category exists precisely for vars that legitimately
need subprocess passthrough).
- hermes_cli/setup.py: _model_section_has_credentials() now consults
copilot_auth.COPILOT_ENV_VARS when checking the copilot provider so
an explicit copilot config + GH_TOKEN still counts as configured.
Tests:
- tests/tools/test_env_passthrough.py: new regression covering
GH_TOKEN / GITHUB_TOKEN passthrough + COPILOT_ENV_VARS lookup.
- Updated affected blocklist/api-key tests to assert the new shape
while pointing at copilot_auth.COPILOT_ENV_VARS for the full
lookup precedence (docs-facing list unchanged in behaviour).
Refs kanban task t_e9b3a894.
Co-authored-by: Sahil Marwaha <sahil@nousresearch.com>
GH_TOKEN and GITHUB_TOKEN are general-purpose gh CLI / git auth
variables — used by every git remote helper, CI job, and developer
machine. Listing them on the Copilot provider's api_key_env_vars
propagated them into _HERMES_PROVIDER_ENV_BLOCKLIST and silently
stripped them from every terminal subprocess, breaking 'gh pr
create', 'git push', 'gh auth status' for kanban workers.
Changes:
- hermes_cli/auth.py: Copilot provider api_key_env_vars scoped to
('COPILOT_GITHUB_TOKEN',). Generic GitHub tokens stay reachable
via copilot_auth.COPILOT_ENV_VARS (lookup precedence unchanged).
- hermes_cli/providers.py: same trim on the github-copilot overlay
extra_env_vars tuple.
- tools/environments/local.py: drop the explicit 'GH_TOKEN' entry
from the hardcoded extras set in _build_provider_env_blocklist.
- hermes_cli/config.py: re-category GITHUB_TOKEN from 'tool' to
'skill' so OPTIONAL_ENV_VARS no longer feeds it into the blocklist
(the 'skill' category exists precisely for vars that legitimately
need subprocess passthrough).
- hermes_cli/setup.py: _model_section_has_credentials() now consults
copilot_auth.COPILOT_ENV_VARS when checking the copilot provider so
an explicit copilot config + GH_TOKEN still counts as configured.
Tests:
- tests/tools/test_env_passthrough.py: new regression covering
GH_TOKEN / GITHUB_TOKEN passthrough + COPILOT_ENV_VARS lookup.
- Updated affected blocklist/api-key tests to assert the new shape
while pointing at copilot_auth.COPILOT_ENV_VARS for the full
lookup precedence (docs-facing list unchanged in behaviour).
Refs kanban task t_e9b3a894.
Co-authored-by: Sahil Marwaha <sahil@nousresearch.com>
GH_TOKEN and GITHUB_TOKEN are general-purpose gh CLI / git auth
variables — used by every git remote helper, CI job, and developer
machine. Listing them on the Copilot provider's api_key_env_vars
propagated them into _HERMES_PROVIDER_ENV_BLOCKLIST and silently
stripped them from every terminal subprocess, breaking 'gh pr
create', 'git push', 'gh auth status' for kanban workers.
Changes:
- hermes_cli/auth.py: Copilot provider api_key_env_vars scoped to
('COPILOT_GITHUB_TOKEN',). Generic GitHub tokens stay reachable
via copilot_auth.COPILOT_ENV_VARS (lookup precedence unchanged).
- hermes_cli/providers.py: same trim on the github-copilot overlay
extra_env_vars tuple.
- tools/environments/local.py: drop the explicit 'GH_TOKEN' entry
from the hardcoded extras set in _build_provider_env_blocklist.
- hermes_cli/config.py: re-category GITHUB_TOKEN from 'tool' to
'skill' so OPTIONAL_ENV_VARS no longer feeds it into the blocklist
(the 'skill' category exists precisely for vars that legitimately
need subprocess passthrough).
- hermes_cli/setup.py: _model_section_has_credentials() now consults
copilot_auth.COPILOT_ENV_VARS when checking the copilot provider so
an explicit copilot config + GH_TOKEN still counts as configured.
Tests:
- tests/tools/test_env_passthrough.py: new regression covering
GH_TOKEN / GITHUB_TOKEN passthrough + COPILOT_ENV_VARS lookup.
- Updated affected blocklist/api-key tests to assert the new shape
while pointing at copilot_auth.COPILOT_ENV_VARS for the full
lookup precedence (docs-facing list unchanged in behaviour).
Refs kanban task t_e9b3a894.
Co-authored-by: Sahil Marwaha <sahil@nousresearch.com>
GH_TOKEN and GITHUB_TOKEN are general-purpose gh CLI / git auth
variables — used by every git remote helper, CI job, and developer
machine. Listing them on the Copilot provider's api_key_env_vars
propagated them into _HERMES_PROVIDER_ENV_BLOCKLIST and silently
stripped them from every terminal subprocess, breaking 'gh pr
create', 'git push', 'gh auth status' for kanban workers.
Changes:
- hermes_cli/auth.py: Copilot provider api_key_env_vars scoped to
('COPILOT_GITHUB_TOKEN',). Generic GitHub tokens stay reachable
via copilot_auth.COPILOT_ENV_VARS (lookup precedence unchanged).
- hermes_cli/providers.py: same trim on the github-copilot overlay
extra_env_vars tuple.
- tools/environments/local.py: drop the explicit 'GH_TOKEN' entry
from the hardcoded extras set in _build_provider_env_blocklist.
- hermes_cli/config.py: re-category GITHUB_TOKEN from 'tool' to
'skill' so OPTIONAL_ENV_VARS no longer feeds it into the blocklist
(the 'skill' category exists precisely for vars that legitimately
need subprocess passthrough).
- hermes_cli/setup.py: _model_section_has_credentials() now consults
copilot_auth.COPILOT_ENV_VARS when checking the copilot provider so
an explicit copilot config + GH_TOKEN still counts as configured.
Tests:
- tests/tools/test_env_passthrough.py: new regression covering
GH_TOKEN / GITHUB_TOKEN passthrough + COPILOT_ENV_VARS lookup.
- Updated affected blocklist/api-key tests to assert the new shape
while pointing at copilot_auth.COPILOT_ENV_VARS for the full
lookup precedence (docs-facing list unchanged in behaviour).
Refs kanban task t_e9b3a894.
Co-authored-by: Sahil Marwaha <sahil@nousresearch.com>
GH_TOKEN and GITHUB_TOKEN are general-purpose gh CLI / git auth
variables — used by every git remote helper, CI job, and developer
machine. Listing them on the Copilot provider's api_key_env_vars
propagated them into _HERMES_PROVIDER_ENV_BLOCKLIST and silently
stripped them from every terminal subprocess, breaking 'gh pr
create', 'git push', 'gh auth status' for kanban workers.
Changes:
- hermes_cli/auth.py: Copilot provider api_key_env_vars scoped to
('COPILOT_GITHUB_TOKEN',). Generic GitHub tokens stay reachable
via copilot_auth.COPILOT_ENV_VARS (lookup precedence unchanged).
- hermes_cli/providers.py: same trim on the github-copilot overlay
extra_env_vars tuple.
- tools/environments/local.py: drop the explicit 'GH_TOKEN' entry
from the hardcoded extras set in _build_provider_env_blocklist.
- hermes_cli/config.py: re-category GITHUB_TOKEN from 'tool' to
'skill' so OPTIONAL_ENV_VARS no longer feeds it into the blocklist
(the 'skill' category exists precisely for vars that legitimately
need subprocess passthrough).
- hermes_cli/setup.py: _model_section_has_credentials() now consults
copilot_auth.COPILOT_ENV_VARS when checking the copilot provider so
an explicit copilot config + GH_TOKEN still counts as configured.
Tests:
- tests/tools/test_env_passthrough.py: new regression covering
GH_TOKEN / GITHUB_TOKEN passthrough + COPILOT_ENV_VARS lookup.
- Updated affected blocklist/api-key tests to assert the new shape
while pointing at copilot_auth.COPILOT_ENV_VARS for the full
lookup precedence (docs-facing list unchanged in behaviour).
Refs kanban task t_e9b3a894.
Co-authored-by: Sahil Marwaha <sahil@nousresearch.com>
GH_TOKEN and GITHUB_TOKEN are general-purpose gh CLI / git auth
variables — used by every git remote helper, CI job, and developer
machine. Listing them on the Copilot provider's api_key_env_vars
propagated them into _HERMES_PROVIDER_ENV_BLOCKLIST and silently
stripped them from every terminal subprocess, breaking 'gh pr
create', 'git push', 'gh auth status' for kanban workers.
Changes:
- hermes_cli/auth.py: Copilot provider api_key_env_vars scoped to
('COPILOT_GITHUB_TOKEN',). Generic GitHub tokens stay reachable
via copilot_auth.COPILOT_ENV_VARS (lookup precedence unchanged).
- hermes_cli/providers.py: same trim on the github-copilot overlay
extra_env_vars tuple.
- tools/environments/local.py: drop the explicit 'GH_TOKEN' entry
from the hardcoded extras set in _build_provider_env_blocklist.
- hermes_cli/config.py: re-category GITHUB_TOKEN from 'tool' to
'skill' so OPTIONAL_ENV_VARS no longer feeds it into the blocklist
(the 'skill' category exists precisely for vars that legitimately
need subprocess passthrough).
- hermes_cli/setup.py: _model_section_has_credentials() now consults
copilot_auth.COPILOT_ENV_VARS when checking the copilot provider so
an explicit copilot config + GH_TOKEN still counts as configured.
Tests:
- tests/tools/test_env_passthrough.py: new regression covering
GH_TOKEN / GITHUB_TOKEN passthrough + COPILOT_ENV_VARS lookup.
- Updated affected blocklist/api-key tests to assert the new shape
while pointing at copilot_auth.COPILOT_ENV_VARS for the full
lookup precedence (docs-facing list unchanged in behaviour).
Refs kanban task t_e9b3a894.
Co-authored-by: Sahil Marwaha <sahil@nousresearch.com>
GH_TOKEN and GITHUB_TOKEN are general-purpose gh CLI / git auth
variables — used by every git remote helper, CI job, and developer
machine. Listing them on the Copilot provider's api_key_env_vars
propagated them into _HERMES_PROVIDER_ENV_BLOCKLIST and silently
stripped them from every terminal subprocess, breaking 'gh pr
create', 'git push', 'gh auth status' for kanban workers.
Changes:
- hermes_cli/auth.py: Copilot provider api_key_env_vars scoped to
('COPILOT_GITHUB_TOKEN',). Generic GitHub tokens stay reachable
via copilot_auth.COPILOT_ENV_VARS (lookup precedence unchanged).
- hermes_cli/providers.py: same trim on the github-copilot overlay
extra_env_vars tuple.
- tools/environments/local.py: drop the explicit 'GH_TOKEN' entry
from the hardcoded extras set in _build_provider_env_blocklist.
- hermes_cli/config.py: re-category GITHUB_TOKEN from 'tool' to
'skill' so OPTIONAL_ENV_VARS no longer feeds it into the blocklist
(the 'skill' category exists precisely for vars that legitimately
need subprocess passthrough).
- hermes_cli/setup.py: _model_section_has_credentials() now consults
copilot_auth.COPILOT_ENV_VARS when checking the copilot provider so
an explicit copilot config + GH_TOKEN still counts as configured.
Tests:
- tests/tools/test_env_passthrough.py: new regression covering
GH_TOKEN / GITHUB_TOKEN passthrough + COPILOT_ENV_VARS lookup.
- Updated affected blocklist/api-key tests to assert the new shape
while pointing at copilot_auth.COPILOT_ENV_VARS for the full
lookup precedence (docs-facing list unchanged in behaviour).
Refs kanban task t_e9b3a894.
Co-authored-by: Sahil Marwaha <sahil@nousresearch.com>
GH_TOKEN and GITHUB_TOKEN are general-purpose gh CLI / git auth
variables — used by every git remote helper, CI job, and developer
machine. Listing them on the Copilot provider's api_key_env_vars
propagated them into _HERMES_PROVIDER_ENV_BLOCKLIST and silently
stripped them from every terminal subprocess, breaking 'gh pr
create', 'git push', 'gh auth status' for kanban workers.
Changes:
- hermes_cli/auth.py: Copilot provider api_key_env_vars scoped to
('COPILOT_GITHUB_TOKEN',). Generic GitHub tokens stay reachable
via copilot_auth.COPILOT_ENV_VARS (lookup precedence unchanged).
- hermes_cli/providers.py: same trim on the github-copilot overlay
extra_env_vars tuple.
- tools/environments/local.py: drop the explicit 'GH_TOKEN' entry
from the hardcoded extras set in _build_provider_env_blocklist.
- hermes_cli/config.py: re-category GITHUB_TOKEN from 'tool' to
'skill' so OPTIONAL_ENV_VARS no longer feeds it into the blocklist
(the 'skill' category exists precisely for vars that legitimately
need subprocess passthrough).
- hermes_cli/setup.py: _model_section_has_credentials() now consults
copilot_auth.COPILOT_ENV_VARS when checking the copilot provider so
an explicit copilot config + GH_TOKEN still counts as configured.
Tests:
- tests/tools/test_env_passthrough.py: new regression covering
GH_TOKEN / GITHUB_TOKEN passthrough + COPILOT_ENV_VARS lookup.
- Updated affected blocklist/api-key tests to assert the new shape
while pointing at copilot_auth.COPILOT_ENV_VARS for the full
lookup precedence (docs-facing list unchanged in behaviour).
Refs kanban task t_e9b3a894.
Co-authored-by: Sahil Marwaha <sahil@nousresearch.com>
GH_TOKEN and GITHUB_TOKEN are general-purpose gh CLI / git auth
variables — used by every git remote helper, CI job, and developer
machine. Listing them on the Copilot provider's api_key_env_vars
propagated them into _HERMES_PROVIDER_ENV_BLOCKLIST and silently
stripped them from every terminal subprocess, breaking 'gh pr
create', 'git push', 'gh auth status' for kanban workers.
Changes:
- hermes_cli/auth.py: Copilot provider api_key_env_vars scoped to
('COPILOT_GITHUB_TOKEN',). Generic GitHub tokens stay reachable
via copilot_auth.COPILOT_ENV_VARS (lookup precedence unchanged).
- hermes_cli/providers.py: same trim on the github-copilot overlay
extra_env_vars tuple.
- tools/environments/local.py: drop the explicit 'GH_TOKEN' entry
from the hardcoded extras set in _build_provider_env_blocklist.
- hermes_cli/config.py: re-category GITHUB_TOKEN from 'tool' to
'skill' so OPTIONAL_ENV_VARS no longer feeds it into the blocklist
(the 'skill' category exists precisely for vars that legitimately
need subprocess passthrough).
- hermes_cli/setup.py: _model_section_has_credentials() now consults
copilot_auth.COPILOT_ENV_VARS when checking the copilot provider so
an explicit copilot config + GH_TOKEN still counts as configured.
Tests:
- tests/tools/test_env_passthrough.py: new regression covering
GH_TOKEN / GITHUB_TOKEN passthrough + COPILOT_ENV_VARS lookup.
- Updated affected blocklist/api-key tests to assert the new shape
while pointing at copilot_auth.COPILOT_ENV_VARS for the full
lookup precedence (docs-facing list unchanged in behaviour).
Refs kanban task t_e9b3a894.
Co-authored-by: Sahil Marwaha <sahil@nousresearch.com>
GH_TOKEN and GITHUB_TOKEN are general-purpose gh CLI / git auth
variables — used by every git remote helper, CI job, and developer
machine. Listing them on the Copilot provider's api_key_env_vars
propagated them into _HERMES_PROVIDER_ENV_BLOCKLIST and silently
stripped them from every terminal subprocess, breaking 'gh pr
create', 'git push', 'gh auth status' for kanban workers.
Changes:
- hermes_cli/auth.py: Copilot provider api_key_env_vars scoped to
('COPILOT_GITHUB_TOKEN',). Generic GitHub tokens stay reachable
via copilot_auth.COPILOT_ENV_VARS (lookup precedence unchanged).
- hermes_cli/providers.py: same trim on the github-copilot overlay
extra_env_vars tuple.
- tools/environments/local.py: drop the explicit 'GH_TOKEN' entry
from the hardcoded extras set in _build_provider_env_blocklist.
- hermes_cli/config.py: re-category GITHUB_TOKEN from 'tool' to
'skill' so OPTIONAL_ENV_VARS no longer feeds it into the blocklist
(the 'skill' category exists precisely for vars that legitimately
need subprocess passthrough).
- hermes_cli/setup.py: _model_section_has_credentials() now consults
copilot_auth.COPILOT_ENV_VARS when checking the copilot provider so
an explicit copilot config + GH_TOKEN still counts as configured.
Tests:
- tests/tools/test_env_passthrough.py: new regression covering
GH_TOKEN / GITHUB_TOKEN passthrough + COPILOT_ENV_VARS lookup.
- Updated affected blocklist/api-key tests to assert the new shape
while pointing at copilot_auth.COPILOT_ENV_VARS for the full
lookup precedence (docs-facing list unchanged in behaviour).
Refs kanban task t_e9b3a894.
Co-authored-by: Sahil Marwaha <sahil@nousresearch.com>
GH_TOKEN and GITHUB_TOKEN are general-purpose gh CLI / git auth
variables — used by every git remote helper, CI job, and developer
machine. Listing them on the Copilot provider's api_key_env_vars
propagated them into _HERMES_PROVIDER_ENV_BLOCKLIST and silently
stripped them from every terminal subprocess, breaking 'gh pr
create', 'git push', 'gh auth status' for kanban workers.
Changes:
- hermes_cli/auth.py: Copilot provider api_key_env_vars scoped to
('COPILOT_GITHUB_TOKEN',). Generic GitHub tokens stay reachable
via copilot_auth.COPILOT_ENV_VARS (lookup precedence unchanged).
- hermes_cli/providers.py: same trim on the github-copilot overlay
extra_env_vars tuple.
- tools/environments/local.py: drop the explicit 'GH_TOKEN' entry
from the hardcoded extras set in _build_provider_env_blocklist.
- hermes_cli/config.py: re-category GITHUB_TOKEN from 'tool' to
'skill' so OPTIONAL_ENV_VARS no longer feeds it into the blocklist
(the 'skill' category exists precisely for vars that legitimately
need subprocess passthrough).
- hermes_cli/setup.py: _model_section_has_credentials() now consults
copilot_auth.COPILOT_ENV_VARS when checking the copilot provider so
an explicit copilot config + GH_TOKEN still counts as configured.
Tests:
- tests/tools/test_env_passthrough.py: new regression covering
GH_TOKEN / GITHUB_TOKEN passthrough + COPILOT_ENV_VARS lookup.
- Updated affected blocklist/api-key tests to assert the new shape
while pointing at copilot_auth.COPILOT_ENV_VARS for the full
lookup precedence (docs-facing list unchanged in behaviour).
Refs kanban task t_e9b3a894.
Co-authored-by: Sahil Marwaha <sahil@nousresearch.com>
GH_TOKEN and GITHUB_TOKEN are general-purpose gh CLI / git auth
variables — used by every git remote helper, CI job, and developer
machine. Listing them on the Copilot provider's api_key_env_vars
propagated them into _HERMES_PROVIDER_ENV_BLOCKLIST and silently
stripped them from every terminal subprocess, breaking 'gh pr
create', 'git push', 'gh auth status' for kanban workers.
Changes:
- hermes_cli/auth.py: Copilot provider api_key_env_vars scoped to
('COPILOT_GITHUB_TOKEN',). Generic GitHub tokens stay reachable
via copilot_auth.COPILOT_ENV_VARS (lookup precedence unchanged).
- hermes_cli/providers.py: same trim on the github-copilot overlay
extra_env_vars tuple.
- tools/environments/local.py: drop the explicit 'GH_TOKEN' entry
from the hardcoded extras set in _build_provider_env_blocklist.
- hermes_cli/config.py: re-category GITHUB_TOKEN from 'tool' to
'skill' so OPTIONAL_ENV_VARS no longer feeds it into the blocklist
(the 'skill' category exists precisely for vars that legitimately
need subprocess passthrough).
- hermes_cli/setup.py: _model_section_has_credentials() now consults
copilot_auth.COPILOT_ENV_VARS when checking the copilot provider so
an explicit copilot config + GH_TOKEN still counts as configured.
Tests:
- tests/tools/test_env_passthrough.py: new regression covering
GH_TOKEN / GITHUB_TOKEN passthrough + COPILOT_ENV_VARS lookup.
- Updated affected blocklist/api-key tests to assert the new shape
while pointing at copilot_auth.COPILOT_ENV_VARS for the full
lookup precedence (docs-facing list unchanged in behaviour).
Refs kanban task t_e9b3a894.
Co-authored-by: Sahil Marwaha <sahil@nousresearch.com>
GH_TOKEN and GITHUB_TOKEN are general-purpose gh CLI / git auth
variables — used by every git remote helper, CI job, and developer
machine. Listing them on the Copilot provider's api_key_env_vars
propagated them into _HERMES_PROVIDER_ENV_BLOCKLIST and silently
stripped them from every terminal subprocess, breaking 'gh pr
create', 'git push', 'gh auth status' for kanban workers.
Changes:
- hermes_cli/auth.py: Copilot provider api_key_env_vars scoped to
('COPILOT_GITHUB_TOKEN',). Generic GitHub tokens stay reachable
via copilot_auth.COPILOT_ENV_VARS (lookup precedence unchanged).
- hermes_cli/providers.py: same trim on the github-copilot overlay
extra_env_vars tuple.
- tools/environments/local.py: drop the explicit 'GH_TOKEN' entry
from the hardcoded extras set in _build_provider_env_blocklist.
- hermes_cli/config.py: re-category GITHUB_TOKEN from 'tool' to
'skill' so OPTIONAL_ENV_VARS no longer feeds it into the blocklist
(the 'skill' category exists precisely for vars that legitimately
need subprocess passthrough).
- hermes_cli/setup.py: _model_section_has_credentials() now consults
copilot_auth.COPILOT_ENV_VARS when checking the copilot provider so
an explicit copilot config + GH_TOKEN still counts as configured.
Tests:
- tests/tools/test_env_passthrough.py: new regression covering
GH_TOKEN / GITHUB_TOKEN passthrough + COPILOT_ENV_VARS lookup.
- Updated affected blocklist/api-key tests to assert the new shape
while pointing at copilot_auth.COPILOT_ENV_VARS for the full
lookup precedence (docs-facing list unchanged in behaviour).
Refs kanban task t_e9b3a894.
Co-authored-by: Sahil Marwaha <sahil@nousresearch.com>
GH_TOKEN and GITHUB_TOKEN are general-purpose gh CLI / git auth
variables — used by every git remote helper, CI job, and developer
machine. Listing them on the Copilot provider's api_key_env_vars
propagated them into _HERMES_PROVIDER_ENV_BLOCKLIST and silently
stripped them from every terminal subprocess, breaking 'gh pr
create', 'git push', 'gh auth status' for kanban workers.
Changes:
- hermes_cli/auth.py: Copilot provider api_key_env_vars scoped to
('COPILOT_GITHUB_TOKEN',). Generic GitHub tokens stay reachable
via copilot_auth.COPILOT_ENV_VARS (lookup precedence unchanged).
- hermes_cli/providers.py: same trim on the github-copilot overlay
extra_env_vars tuple.
- tools/environments/local.py: drop the explicit 'GH_TOKEN' entry
from the hardcoded extras set in _build_provider_env_blocklist.
- hermes_cli/config.py: re-category GITHUB_TOKEN from 'tool' to
'skill' so OPTIONAL_ENV_VARS no longer feeds it into the blocklist
(the 'skill' category exists precisely for vars that legitimately
need subprocess passthrough).
- hermes_cli/setup.py: _model_section_has_credentials() now consults
copilot_auth.COPILOT_ENV_VARS when checking the copilot provider so
an explicit copilot config + GH_TOKEN still counts as configured.
Tests:
- tests/tools/test_env_passthrough.py: new regression covering
GH_TOKEN / GITHUB_TOKEN passthrough + COPILOT_ENV_VARS lookup.
- Updated affected blocklist/api-key tests to assert the new shape
while pointing at copilot_auth.COPILOT_ENV_VARS for the full
lookup precedence (docs-facing list unchanged in behaviour).
Refs kanban task t_e9b3a894.
Co-authored-by: Sahil Marwaha <sahil@nousresearch.com>
GH_TOKEN and GITHUB_TOKEN are general-purpose gh CLI / git auth
variables — used by every git remote helper, CI job, and developer
machine. Listing them on the Copilot provider's api_key_env_vars
propagated them into _HERMES_PROVIDER_ENV_BLOCKLIST and silently
stripped them from every terminal subprocess, breaking 'gh pr
create', 'git push', 'gh auth status' for kanban workers.
Changes:
- hermes_cli/auth.py: Copilot provider api_key_env_vars scoped to
('COPILOT_GITHUB_TOKEN',). Generic GitHub tokens stay reachable
via copilot_auth.COPILOT_ENV_VARS (lookup precedence unchanged).
- hermes_cli/providers.py: same trim on the github-copilot overlay
extra_env_vars tuple.
- tools/environments/local.py: drop the explicit 'GH_TOKEN' entry
from the hardcoded extras set in _build_provider_env_blocklist.
- hermes_cli/config.py: re-category GITHUB_TOKEN from 'tool' to
'skill' so OPTIONAL_ENV_VARS no longer feeds it into the blocklist
(the 'skill' category exists precisely for vars that legitimately
need subprocess passthrough).
- hermes_cli/setup.py: _model_section_has_credentials() now consults
copilot_auth.COPILOT_ENV_VARS when checking the copilot provider so
an explicit copilot config + GH_TOKEN still counts as configured.
Tests:
- tests/tools/test_env_passthrough.py: new regression covering
GH_TOKEN / GITHUB_TOKEN passthrough + COPILOT_ENV_VARS lookup.
- Updated affected blocklist/api-key tests to assert the new shape
while pointing at copilot_auth.COPILOT_ENV_VARS for the full
lookup precedence (docs-facing list unchanged in behaviour).
Refs kanban task t_e9b3a894.
Co-authored-by: Sahil Marwaha <sahil@nousresearch.com>
GH_TOKEN and GITHUB_TOKEN are general-purpose gh CLI / git auth
variables — used by every git remote helper, CI job, and developer
machine. Listing them on the Copilot provider's api_key_env_vars
propagated them into _HERMES_PROVIDER_ENV_BLOCKLIST and silently
stripped them from every terminal subprocess, breaking 'gh pr
create', 'git push', 'gh auth status' for kanban workers.
Changes:
- hermes_cli/auth.py: Copilot provider api_key_env_vars scoped to
('COPILOT_GITHUB_TOKEN',). Generic GitHub tokens stay reachable
via copilot_auth.COPILOT_ENV_VARS (lookup precedence unchanged).
- hermes_cli/providers.py: same trim on the github-copilot overlay
extra_env_vars tuple.
- tools/environments/local.py: drop the explicit 'GH_TOKEN' entry
from the hardcoded extras set in _build_provider_env_blocklist.
- hermes_cli/config.py: re-category GITHUB_TOKEN from 'tool' to
'skill' so OPTIONAL_ENV_VARS no longer feeds it into the blocklist
(the 'skill' category exists precisely for vars that legitimately
need subprocess passthrough).
- hermes_cli/setup.py: _model_section_has_credentials() now consults
copilot_auth.COPILOT_ENV_VARS when checking the copilot provider so
an explicit copilot config + GH_TOKEN still counts as configured.
Tests:
- tests/tools/test_env_passthrough.py: new regression covering
GH_TOKEN / GITHUB_TOKEN passthrough + COPILOT_ENV_VARS lookup.
- Updated affected blocklist/api-key tests to assert the new shape
while pointing at copilot_auth.COPILOT_ENV_VARS for the full
lookup precedence (docs-facing list unchanged in behaviour).
Refs kanban task t_e9b3a894.
Co-authored-by: Sahil Marwaha <sahil@nousresearch.com>
GH_TOKEN and GITHUB_TOKEN are general-purpose gh CLI / git auth
variables — used by every git remote helper, CI job, and developer
machine. Listing them on the Copilot provider's api_key_env_vars
propagated them into _HERMES_PROVIDER_ENV_BLOCKLIST and silently
stripped them from every terminal subprocess, breaking 'gh pr
create', 'git push', 'gh auth status' for kanban workers.
Changes:
- hermes_cli/auth.py: Copilot provider api_key_env_vars scoped to
('COPILOT_GITHUB_TOKEN',). Generic GitHub tokens stay reachable
via copilot_auth.COPILOT_ENV_VARS (lookup precedence unchanged).
- hermes_cli/providers.py: same trim on the github-copilot overlay
extra_env_vars tuple.
- tools/environments/local.py: drop the explicit 'GH_TOKEN' entry
from the hardcoded extras set in _build_provider_env_blocklist.
- hermes_cli/config.py: re-category GITHUB_TOKEN from 'tool' to
'skill' so OPTIONAL_ENV_VARS no longer feeds it into the blocklist
(the 'skill' category exists precisely for vars that legitimately
need subprocess passthrough).
- hermes_cli/setup.py: _model_section_has_credentials() now consults
copilot_auth.COPILOT_ENV_VARS when checking the copilot provider so
an explicit copilot config + GH_TOKEN still counts as configured.
Tests:
- tests/tools/test_env_passthrough.py: new regression covering
GH_TOKEN / GITHUB_TOKEN passthrough + COPILOT_ENV_VARS lookup.
- Updated affected blocklist/api-key tests to assert the new shape
while pointing at copilot_auth.COPILOT_ENV_VARS for the full
lookup precedence (docs-facing list unchanged in behaviour).
Refs kanban task t_e9b3a894.
Co-authored-by: Sahil Marwaha <sahil@nousresearch.com>
GH_TOKEN and GITHUB_TOKEN are general-purpose gh CLI / git auth
variables — used by every git remote helper, CI job, and developer
machine. Listing them on the Copilot provider's api_key_env_vars
propagated them into _HERMES_PROVIDER_ENV_BLOCKLIST and silently
stripped them from every terminal subprocess, breaking 'gh pr
create', 'git push', 'gh auth status' for kanban workers.
Changes:
- hermes_cli/auth.py: Copilot provider api_key_env_vars scoped to
('COPILOT_GITHUB_TOKEN',). Generic GitHub tokens stay reachable
via copilot_auth.COPILOT_ENV_VARS (lookup precedence unchanged).
- hermes_cli/providers.py: same trim on the github-copilot overlay
extra_env_vars tuple.
- tools/environments/local.py: drop the explicit 'GH_TOKEN' entry
from the hardcoded extras set in _build_provider_env_blocklist.
- hermes_cli/config.py: re-category GITHUB_TOKEN from 'tool' to
'skill' so OPTIONAL_ENV_VARS no longer feeds it into the blocklist
(the 'skill' category exists precisely for vars that legitimately
need subprocess passthrough).
- hermes_cli/setup.py: _model_section_has_credentials() now consults
copilot_auth.COPILOT_ENV_VARS when checking the copilot provider so
an explicit copilot config + GH_TOKEN still counts as configured.
Tests:
- tests/tools/test_env_passthrough.py: new regression covering
GH_TOKEN / GITHUB_TOKEN passthrough + COPILOT_ENV_VARS lookup.
- Updated affected blocklist/api-key tests to assert the new shape
while pointing at copilot_auth.COPILOT_ENV_VARS for the full
lookup precedence (docs-facing list unchanged in behaviour).
Refs kanban task t_e9b3a894.
Co-authored-by: Sahil Marwaha <sahil@nousresearch.com>
Why
Kanban workers can't run `gh pr create` / `git push` even with `GH_TOKEN` set in their profile `.env`, because the Copilot provider's `api_key_env_vars` tuple lists `GH_TOKEN` / `GITHUB_TOKEN` → `_build_provider_env_blocklist` strips them from every terminal subprocess. Users have to add a per-profile `terminal.env_passthrough` allowlist to work around it.
`GH_TOKEN` / `GITHUB_TOKEN` are general-purpose `gh` CLI / git auth vars (used by every git remote helper, CI job, and dev machine) — not Hermes-managed provider credentials. Only `COPILOT_GITHUB_TOKEN` is Copilot-specific.
Kanban task: `t_e9b3a894`. Recent symptom: `t_b212a749` where orchestrator had to open the PR by hand.
What
Tests
All 500 tests across `tests/hermes_cli/test_provider`, `test_copilot_auth`, `test_setup_openclaw_migration`, `test_setup_model_provider`, `test_doctor`, `tests/tools/test_env_passthrough`, `tests/tools/test_local_env_blocklist` pass locally.
Out of scope