Skip to content

fix(skills): wrap github_token in Secret<String> with zeroize-on-drop in SkillMiner #2607

@bug-ops

Description

@bug-ops

Context

PR #2605 adds SkillMiner in crates/zeph-skills/src/miner.rs. The github_token: String field stores the GitHub API token as a plain String for the lifetime of the struct. It is never logged or serialized, but defense-in-depth would wrap it in secrecy::Secret<String> with zeroize::Zeroize on drop.

Proposed change

  • Add secrecy crate to zeph-skills (already a workspace dep via zeph-core)
  • Change github_token: Stringgithub_token: Secret<String>
  • Unwrap with .expose_secret() only at the HTTP header construction site

Files

  • crates/zeph-skills/src/miner.rs
  • crates/zeph-skills/src/bin/miner.rs

Metadata

Metadata

Assignees

Labels

P4Long-term / exploratoryllmzeph-llm crate (Ollama, Claude)securitySecurity-related issueskillszeph-skills crate

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions