Repository navigation
fix(cbh): report draft OS-login leak + steps heading + platform alias (#190) - #193
Merged
Merged
Conversation
…#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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #190.
Three issues in
cbh report, reported by @lucasaivn:1. Reporter line leaked the OS login name
render_reportsetuser = 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 ownevidence-hygiene.Fix: the handle now comes from
--reporter, else theCBH_REPORTERenv var, else a(your handle)placeholder. The OS login is never used.2.
## Steps to reproducenot recognisedThe steps regex required the heading to be exactly the keyword followed by end-of-line, so
## Steps to reproduce— the headingcbh reportitself 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 (## Stepsisteris not a steps section).3.
--platformrejectedhackeroneOnly
h1was accepted.Fix:
hackeroneis now an accepted alias ofh1.Tests
Added to
tests/test_report_sections.py: OS-login-not-leaked, reporter-from-env, reporter-arg-overrides-env,Steps to reproduceparsed,Proof of conceptparsed, mid-word-not-matched, and--platform hackeroneaccepted 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.mdupdated.🤖 Generated with Claude Code