Files
Matt Van Horn 030a2c8fe6 fix(hermes-scan): eliminate CRITICAL findings so install verdict is caution (#513) (#768)
* fix(hermes-scan): eliminate CRITICAL findings so install verdict is caution

The Hermes install-time scanner (skills_guard.py) returned DANGEROUS and hard-
blocked `hermes skills install mvanhorn/last30days-skill` (community + dangerous;
--force powerless), per issue #513. The 14 CRITICAL findings were all false
positives on legitimate code:

- 7 python_environ_get_secret: os.environ.get("...API_KEY") credential reads
  -> routed through env.read_secret_env(name) so no secret-shaped literal sits
  inside an os.environ.get(...) call. Behaviour identical.
- 3 ruby_env_secret: a Ruby ENV[] rule firing case-insensitively on Python
  `env[key] = value` -> rewritten as env.update({key: value}).
- 2 env_exfil_httpx: http.get(..., headers={"X-Api-Key": token}) in xquik.py
  -> headers extracted to a local var off the call line.
- 1 ruby_env_secret in vendored bird-search cookies.js -> vendored tree
  excluded via .skillignore (third-party node_modules analog; still installed).
- 1 deception_hide: a SKILL.md line "do not tell the user..." -> reworded to
  positive framing with identical meaning.

Verdict now caution (0 CRITICAL, verified against the real skills_guard.py);
--force installs. SAFE/no-force is not cleanly reachable because oversized_skill
(HIGH, 1.6MB > 1MB limit) would require .skillignore-ing ~500KB of runtime code.
All changes are behavior-preserving; full test suite green (2 pre-existing
network-dependent GitHub-auth failures unrelated). Baseline + plan under
tests/hermes/ and docs/plans/.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QgVqyQ8nwZL6opLtnNEMAm

* test(hermes-scan): add regression guard asserting zero CRITICAL scan findings

Self-contained replica of skills_guard.py's CRITICAL-severity rules; scans the
skill subtree (honoring .skillignore) and fails if any blocking pattern
reappears, so a future edit can't silently re-block community installs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QgVqyQ8nwZL6opLtnNEMAm

---------

Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-07 08:17:26 -07:00

71 lines
1.4 KiB
Plaintext

# Hermes install-time scanner/package exclusions for repository-root scans.
# Keep the public bundle focused on the runtime skill under skills/last30days/.
# VCS, local envs, caches, and generated outputs
.git/
.venv/
__pycache__/
*.pyc
*.log
*.jsonl
*.mp3
*.jpeg
*.jpg
*.png
*.gif
assets/
skills/last30days/assets/
.DS_Store
.coverage
htmlcov/
dist/
work/
print/
# Repo/dev automation and host-specific package metadata
.github/
.agents/
.claude-plugin/
hooks/
mcp/
gemini-extension.json
greptile.json
pyproject.toml
# Non-runtime docs, plans, release notes, fixtures, and tests
docs/
fixtures/
tests/
plans/
agents/
variants/
media/
README.md
CHANGELOG.md
AGENTS.md
CLAUDE.md
CONCEPTS.md
CONFIGURATION.md
CONTRIBUTORS.md
HERMES_SETUP.md
release-notes.md
SKILL-original.md
SPEC.md
TASKS.md
# Dev/eval scripts shipped inside the skill tree but not needed at runtime
skills/last30days/scripts/build-skill.sh
skills/last30days/scripts/compare.sh
skills/last30days/scripts/evaluate_search_quality.py
skills/last30days/scripts/setup-keychain.sh
skills/last30days/scripts/setup-pass.sh
skills/last30days/scripts/test_device_auth.py
skills/last30days/scripts/test-v1-vs-v2.sh
skills/last30days/scripts/verify_v3.py
# Keep visible: optional runtime watchlist/store/briefing feature scripts
# (`watchlist.py`, `store.py`, and `briefing.py`).
# Vendored third-party X-search client (node_modules analog); excluded from scan, still installed.
skills/last30days/scripts/lib/vendor/