Skip to content

fix(cbh): report draft OS-login leak + steps heading + platform alias (#190) - #193

Merged
elementalsouls merged 1 commit into
mainfrom
fix/cbh-report-190
Nov 20, 2026
Merged

elementalsouls merged 1 commit into
mainfrom
fix/cbh-report-190

Conversation

@elementalsouls

Copy link
Copy Markdown
Owner

Fixes #190.

Three issues in cbh report, reported by @lucasaivn:

1. Reporter line leaked the OS login name

render_report set user = os.environ.get("USER") or os.environ.get("USERNAME") or "researcher" and printed it as **Reporter:** <login>. A draft meant to be pasted into a public platform quietly carried the machine's account name — often a real name or work ID, and rarely the researcher's platform handle. That runs against the bundle's own evidence-hygiene.

Fix: the handle now comes from --reporter, else the CBH_REPORTER env var, else a (your handle) placeholder. The OS login is never used.

2. ## Steps to reproduce not recognised

The steps regex required the heading to be exactly the keyword followed by end-of-line, so ## Steps to reproduce — the heading cbh report itself writes — returned empty, silently losing the steps when a draft was fed back in.

Fix: the keyword may now be followed by more words after a space (## Steps to reproduce, ## Reproduction steps, ## Proof of concept), while still not matching mid-word (## Stepsister is not a steps section).

3. --platform rejected hackerone

Only h1 was accepted.

Fix: hackerone is now an accepted alias of h1.

Tests

Added to tests/test_report_sections.py: OS-login-not-leaked, reporter-from-env, reporter-arg-overrides-env, Steps to reproduce parsed, Proof of concept parsed, mid-word-not-matched, and --platform hackerone accepted end-to-end. The prior test that asserted the OS-login behavior was updated to the new intended behavior. Suites 65/65 + engine 34/34; docs/cbh-cli.md updated.

🤖 Generated with Claude Code

…#190)

Fixes #190.

1. Reporter line no longer carries the machine's OS account name. render_report
   now takes the handle from --reporter / CBH_REPORTER, falling back to a
   '(your handle)' placeholder instead of USER/USERNAME, so a public draft can't
   quietly expose a real name or work ID (matches the bundle's evidence-hygiene).
2. '## Steps to reproduce' (and 'Reproduction steps', 'Proof of concept') are now
   recognised as the steps section. The heading regex required the keyword to end
   the line; it now accepts trailing words after a space, while still not matching
   mid-word ('## Stepsister').
3. --platform accepts 'hackerone' as an alias of 'h1'.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@elementalsouls
elementalsouls merged commit c5d5c38 into main Nov 20, 2026
3 checks passed
@elementalsouls
elementalsouls deleted the fix/cbh-report-190 branch November 20, 2026 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] cbh report: Reporter line leaks the OS login name; '## Steps to reproduce' heading not parsed

1 participant