public-surface-audit

Scan git-tracked files for operator-private tokens and output JSON reports.

7|Updated May 26, 2026
One-click install
npx skills add https://github.com/chrono-meta/forge-harness --skill public-surface-audit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: public-surface-audit
Source: https://github.com/chrono-meta/forge-harness/tree/main/plugins/fh-meta/skills/public-surface-audit
Command: npx skills add https://github.com/chrono-meta/forge-harness --skill public-surface-audit

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

When splitting a repository into public methodology content and private operator-specific content, it is common to accidentally commit private tokens like real usernames, absolute home paths, or company asset names to git-tracked public files. This skill eliminates that risk by scanning all tracked files for these leaks before publication, ensuring your public repository stays clean, model-agnostic, and free of confidential operator data.

Core Features & Use Cases

  • Tracked-file-only scanning: Deliberately excludes gitignored private files like CLAUDE.local.md to avoid false positives, focusing exclusively on the public surface that will be shared or published.
  • Severity-classified leak detection: Flags high-severity leaks (real usernames, company assets), medium-severity issues (absolute home paths that leak user identity and local filesystem layout), and low-severity drift (private companion store or wiring names) with clear file:line reporting.
  • Dual output modes: Provides human-readable formatted reports for interactive use and machine-parseable JSON output for automated CI/CD pre-push or pre-publish hook gating.
  • Proactive gitignore safeguard: Catches files that should be private but are not actually ignored by git, preventing future accidental commits of sensitive data. Use case: Before pushing a new version of your open-source project to a public GitHub repository, run this scan to confirm no personal or company-private data is exposed in your tracked files.

Quick Start

Use the public-surface-audit skill to scan your current git repository for any operator-private tokens that have been accidentally committed to tracked files.

Frequently Asked Questions about public-surface-audit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I scan a git repository for accidentally committed private tokens before publishing?

To detect private tokens in tracked files before publishing, scan your git-tracked public file sets for operator-specific data like real usernames, company assets, or absolute home paths. This pre-publish validation ensures your public repository remains free of confidential operator data.

How does gitignore validation prevent sensitive data leaks in tracked files?

Gitignore validation prevents sensitive data leaks by proactively catching files that should be private but are not actually ignored by git. This safeguard stops future accidental commits of confidential operator data by enforcing proper public and private repository splits.

Can I use token leak detection to gate CI hooks for public repository validation?

Yes, you can use token leak detection to gate CI hooks for public repository validation. The audit provides machine-parseable JSON output specifically designed for automated CI/CD pre-push or pre-publish hook gating to enforce the invariant that public repositories contain no operator-specific confidential data.

Does pre-publish scanning exclude gitignored private files to avoid false positives?

Yes, pre-publish scanning deliberately excludes gitignored private files like CLAUDE.local.md to avoid false positives. The tracked-file-only scanning focuses exclusively on the public surface that will be shared, ensuring private local configurations do not trigger unnecessary leak alerts.

What is the best way to audit a public and private repository split for confidential data?

The best way to audit a public and private repository split is to run a public surface audit that applies configurable severity-classified pattern matching to tracked files. It flags high-severity leaks, medium-severity identity issues, and low-severity drift with clear file and line reporting.

Why does placeholder text trigger false positives during a token leak scan?

Placeholder text triggers false positives during a token leak scan because pattern matching may detect formatting that resembles real operator data. The audit implements placeholder false positive hygiene and tight allowlist suppression to filter these out and maintain accurate leak detection.