fix(intigriti): filter No-Bounty tier targets in --bbp-only mode - #105
Open
proabiral wants to merge 1 commit into
Open
fix(intigriti): filter No-Bounty tier targets in --bbp-only mode#105proabiral wants to merge 1 commit into
proabiral wants to merge 1 commit into
Conversation
FetchProgramScope emitted every in-scope asset regardless of tier. The program-level maxBounty filter in ListProgramHandles only decides whether a program is fetched, so programs with any paid tier leaked their "No Bounty" assets when -b/--bbp-only was set (e.g. *.rosenbergertechnologies.com in the Rosenberger Group program). Skip individual "No Bounty" tier targets when BountyOnly is set, restoring the per-target behaviour v1 had and matching the hackerone/yeswehack pollers.
Owner
|
Thanks - checking soon |
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.
Problem
With
-b/--bbp-only, the Intigriti poller returns assets whose individual tier is "No Bounty", as long as the program offers a bounty on some other tier. For example,*.rosenbergertechnologies.com(tier "No Bounty") is pulled from the Rosenberger Group program because that program's overallmaxBountyis non-zero.Root cause
opts.BountyOnlyis applied only at the program-listing level inListProgramHandles(maxBounty != 0), which merely decides whether a program is fetched at all. InsideFetchProgramScope, every in-scope asset is emitted regardless of its tier — the per-programisBBPflag is computed but only stored as metadata, never used to filter output.The v1 code had a per-target guard (
tierID != 1); it was dropped in the v2 refactor. Thehackeroneandyeswehackpollers still filter per target.Fix
Skip individual "No Bounty" tier targets when
BountyOnlyis set, keyed off the sametierValue == "No Bounty"string the surrounding code already uses to computeisBBP.