From 7f5f58ef29ea61333c01cc98e1d9d4f32a462583 Mon Sep 17 00:00:00 2001 From: Philip Kocanda Date: Tue, 9 Sep 2025 14:51:45 +0200 Subject: [PATCH 1/2] Expose tools to search findings --- .../GetHackerOneCurrentUser.graphql | 6 ++ .../GetHackerOneOrganizationByHandle.graphql | 10 +++ .../SearchOrganizationFindings.graphql | 86 +++++++++++++++++++ 3 files changed, 102 insertions(+) create mode 100644 graphql/operations/GetHackerOneOrganizationByHandle.graphql create mode 100644 graphql/operations/SearchOrganizationFindings.graphql diff --git a/graphql/operations/GetHackerOneCurrentUser.graphql b/graphql/operations/GetHackerOneCurrentUser.graphql index c307b86..fa12e9f 100644 --- a/graphql/operations/GetHackerOneCurrentUser.graphql +++ b/graphql/operations/GetHackerOneCurrentUser.graphql @@ -5,5 +5,11 @@ query GetHackerOneCurrentUser { name email username + organizations { + nodes { + name + handle + } + } } } diff --git a/graphql/operations/GetHackerOneOrganizationByHandle.graphql b/graphql/operations/GetHackerOneOrganizationByHandle.graphql new file mode 100644 index 0000000..1fb076d --- /dev/null +++ b/graphql/operations/GetHackerOneOrganizationByHandle.graphql @@ -0,0 +1,10 @@ +query GetHackerOneOrganizationByHandle($handle: String!) { + organizations(first: 1, where: { handle: { _eq: $handle } }) { + nodes { + id + name + handle + list_all_report_fields_markdown + } + } +} diff --git a/graphql/operations/SearchOrganizationFindings.graphql b/graphql/operations/SearchOrganizationFindings.graphql new file mode 100644 index 0000000..7f38e39 --- /dev/null +++ b/graphql/operations/SearchOrganizationFindings.graphql @@ -0,0 +1,86 @@ +# Enables querying findings (aka vulnerability reports) across an entire organization. +# +# +# Before querying this tool, run the `GetHackerOneOrganizationByHandle` tool! +# It returns the `list_all_report_fields_markdown` field which contains the ElasticSearch schema +# queryable using the queryString variable below. +# +# +# Example variables: +# { +# "handle": "hackerone", +# "queryString": "substate:resolved AND severity:critical AND weakness.external_id:cwe-150", +# "sortQuery": "{\"id\":{\"order\":\"asc\"}}", +# "size": 25, +# "from": 0, +# } +# +# The "size" variable allows limiting the result set. +# The "from" variable provides an offset for pagination. +# The "queryString" variable allows filtering the results using an ElasticSearch query string. + +query SearchOrganizationFindings( + $handle: String! + $queryString: String! + $sortQuery: String + $size: Int! + $from: Int! +) { + organization(handle: $handle) { + id + reports_search( + query_string: $queryString + sort_query: $sortQuery + size: $size + from: $from + ) { + total_count + nodes { + ...OrganizationReport + __typename + } + __typename + } + __typename + } +} + +fragment OrganizationReport on OrganizationReportDocument { + activities_count + assigned_to_group + assigned_to_user + bounties + bounties_count + bounties_total_awarded_amount + campaign + closed_at + database_id + disclosed_at + engagement + graphql_id + id + inboxes + ineligible_for_bounty + last_activity_at + mentions + organization + participants + reference + reference_url + reporter + severity + state + structured_scope + submitted_at + substate + title + vulnerability_information + weakness + spot_check + last_comment_by_reporter + triaged_at + mediation_request + campaign + tags + __typename +} From 12482957d5c229d9b1284b542c1e7ec7394f74d8 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Tue, 9 Sep 2025 12:59:54 +0000 Subject: [PATCH 2/2] Update GraphQL schema from HackerOne --- graphql/schema.graphql | 270 +++++++++++++++++++++++++++++++++-------- 1 file changed, 217 insertions(+), 53 deletions(-) diff --git a/graphql/schema.graphql b/graphql/schema.graphql index f3eee55..0ba4a85 100644 --- a/graphql/schema.graphql +++ b/graphql/schema.graphql @@ -132,6 +132,54 @@ type AcceptReportCollaboratorInvitationPayload implements MutationResult { was_successful: Boolean! } +""" +Autogenerated input type of AcceptReportRecommendation +""" +input AcceptReportRecommendationInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + message: String! + message_modified: Boolean! + new_state: String! + report_id: Int! +} + +""" +Autogenerated return type of AcceptReportRecommendation. +""" +type AcceptReportRecommendationPayload implements MutationResult { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + errors( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + types: [ErrorTypeEnum] + ): ErrorConnection! + report: Report + was_successful: Boolean! +} + """ Autogenerated input type of AcceptSpotCheckUser """ @@ -2289,6 +2337,11 @@ type ActivitiesTriageIntakeCompleted implements ActivityInterface & Node & Repor Whether the report was marked as high priority during intake """ high_priority: Boolean + + """ + The reason provided for marking the report as high priority + """ + high_priority_reason: String i_can_edit: Boolean! i_can_flag: Boolean! id: ID! @@ -7578,53 +7631,6 @@ type ChangeReportPentestPayload implements MutationResult { was_successful: Boolean! } -""" -Autogenerated input type of ChangeReportState -""" -input ChangeReportStateInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - message: String! - new_state: String! - report_id: Int! -} - -""" -Autogenerated return type of ChangeReportState. -""" -type ChangeReportStatePayload implements MutationResult { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - errors( - """ - Returns the elements in the list that come after the specified cursor. - """ - after: String - - """ - Returns the elements in the list that come before the specified cursor. - """ - before: String - - """ - Returns the first _n_ elements from the list. - """ - first: Int - - """ - Returns the last _n_ elements from the list. - """ - last: Int - types: [ErrorTypeEnum] - ): ErrorConnection! - report: Report - was_successful: Boolean! -} - """ A chat message """ @@ -8502,6 +8508,7 @@ A consumption subscription type ConsumptionSubscription implements Node { _id: ID! active: Boolean! + allowed_restrictions: [String!]! ends_at: DateTime! expired: Boolean! id: ID! @@ -15921,6 +15928,55 @@ type DeleteReportIntentAttachmentsPayload implements MutationResult { was_successful: Boolean! } +""" +Autogenerated input type of DeleteReportIntentMutation +""" +input DeleteReportIntentMutationInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + ID of the report intent to delete + """ + report_intent_id: ID! +} + +""" +Autogenerated return type of DeleteReportIntentMutation. +""" +type DeleteReportIntentMutationPayload implements MutationResult { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + errors( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + types: [ErrorTypeEnum] + ): ErrorConnection! + report_intent: ReportIntent + was_successful: Boolean! +} + """ Autogenerated input type of DeleteRomAssetGroupSettings """ @@ -21543,6 +21599,12 @@ enum HaiTaskAgentEnum { A Flowise-powered agent specialized for content summarization, analysis, and information extraction """ FLOWISE_SAMPLE + + """ + An agent to assist with the intake process for security reports, including + gathering relevant information and recommending next steps + """ + INTAKE_AGENT_POC } type HaiTaskArtifact implements Node { @@ -22195,6 +22257,7 @@ type IntakeRecommendation implements Node { message_for_customer: String message_for_reporter: String recommended_action: String + show_recommendation: Boolean steps: Hash } @@ -22205,8 +22268,10 @@ type IntegrationEventsConfiguration implements Node { _id: ID! changed_scope: Boolean! cve_id_added: Boolean! + hacker_requested_mediation: Boolean! id: ID! integration_types: IntegrationEventsEnum + mediation_requested: Boolean! program_gateway_state_changed: Boolean! program_gateway_users_state_changed: Boolean! program_hacker_joined: Boolean! @@ -22259,6 +22324,8 @@ type IntegrationEventsConfiguration implements Node { input IntegrationEventsConfigurationInputType { changed_scope: Boolean! cve_id_added: Boolean! + hacker_requested_mediation: Boolean! + mediation_requested: Boolean! program_gateway_state_changed: Boolean! program_gateway_users_state_changed: Boolean! program_hacker_joined: Boolean! @@ -22321,6 +22388,16 @@ enum IntegrationEventsEnum { """ cve_id_added + """ + When mediation is requested for a report by a hacker. + """ + hacker_requested_mediation + + """ + When mediation is requested for a report by a program member. + """ + mediation_requested + """ When a program changes gateway access for all hackers. """ @@ -22686,6 +22763,7 @@ enum InvitationSourceEnum { artemis_recommendations_hacker_reinvite_v4 automatic_invite bring_your_own_pentest_workflow_invite + dca_update facebook_invite h12010_open_invite h14420_invite @@ -24738,6 +24816,12 @@ type Mutation implements Node { """ input: AcceptReportCollaboratorInvitationInput! ): AcceptReportCollaboratorInvitationPayload! + acceptReportRecommendation( + """ + Parameters for AcceptReportRecommendation + """ + input: AcceptReportRecommendationInput! + ): AcceptReportRecommendationPayload! acceptSpotCheckUser( """ Parameters for AcceptSpotCheckUser @@ -24948,12 +25032,6 @@ type Mutation implements Node { """ input: ChangeReportPentestInput! ): ChangeReportPentestPayload! - changeReportState( - """ - Parameters for ChangeReportState - """ - input: ChangeReportStateInput! - ): ChangeReportStatePayload! checkAssetReachability( """ Parameters for CheckAssetReachability @@ -25764,6 +25842,16 @@ type Mutation implements Node { """ input: DeleteReconContextInput! ): DeleteReconContextPayload! + + """ + Deletes a report intent + """ + deleteReportIntent( + """ + Parameters for DeleteReportIntentMutation + """ + input: DeleteReportIntentMutationInput! + ): DeleteReportIntentMutationPayload! deleteReportIntentAttachments( """ Parameters for DeleteReportIntentAttachments @@ -26341,6 +26429,12 @@ type Mutation implements Node { """ input: RejectOrganizationSamlProviderInput! ): RejectOrganizationSamlProviderPayload! + rejectReportRecommendation( + """ + Parameters for RejectReportRecommendation + """ + input: RejectReportRecommendationInput! + ): RejectReportRecommendationPayload! rejectReportRetest( """ Parameters for RejectReportRetest @@ -28816,6 +28910,7 @@ type Organization implements Node { entry_vdp_only: Boolean features: [Feature] gate_custom_inboxes_opened: Boolean! + gate_flexible_asset_types_opened: Boolean! gate_i18n_embedded_submission_forms_opened: Boolean! gate_saml_opened: Boolean! gate_scim_opened: Boolean! @@ -28853,6 +28948,7 @@ type Organization implements Node { i_can_view_organization_assets: Boolean! i_can_view_organization_member_groups: Boolean! i_can_view_organization_tags: Boolean! + i_can_view_spend_tracker: Boolean! id: ID! legacy_features: [Feature] list_all_report_fields_markdown: String! @@ -33364,6 +33460,17 @@ enum PostedByEnum { triager } +""" +A priority recommendation on a report +""" +type PriorityRecommendation implements Node { + id: ID! + is_priority: Boolean + priority_score: Int! + reason: String! + short_reason: String +} + """ Product Edition of a Team """ @@ -34835,6 +34942,7 @@ type Query implements Node { Returns the last _n_ elements from the list. """ last: Int + order_by: String ordered_by_timer: Boolean owner_usernames: [String!] pod_name: String @@ -35841,6 +35949,52 @@ type RejectOrganizationSamlProviderPayload implements MutationResult { was_successful: Boolean! } +""" +Autogenerated input type of RejectReportRecommendation +""" +input RejectReportRecommendationInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + rejection_reason: String! + report_id: Int! +} + +""" +Autogenerated return type of RejectReportRecommendation. +""" +type RejectReportRecommendationPayload implements MutationResult { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + errors( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + types: [ErrorTypeEnum] + ): ErrorConnection! + report: Report + was_successful: Boolean! +} + """ Autogenerated input type of RejectReportRetest """ @@ -37057,6 +37211,7 @@ type Report implements ActivitiesInterface & Node & ResourceInterface { field is only present for reports filed after February 14, 2016. """ post_submission_trigger_log_trigger: Trigger + priority_recommendation: PriorityRecommendation recalculated_severity_score: Float reference: ID reference_link: String @@ -37615,7 +37770,9 @@ type ReportIntent implements Node { _id: ID! attachments: [Attachment!]! created_at: DateTime! + custom_fields: JSON! description: String + has_failing_pipelines: Boolean! id: ID! metadata: JSON report: Report @@ -52207,6 +52364,7 @@ input UpdateReportIntentInput { A unique identifier for the client performing the mutation. """ clientMutationId: String + custom_field_values: [CustomFieldValueInput!] description: String report_intent_content_override: String report_intent_id: ID! @@ -57794,6 +57952,7 @@ type UserStreak implements Node { Types a user can be """ enum UserTypeEnum { + agent api automation company @@ -58848,6 +59007,11 @@ type WorkflowRun implements Node { aborted_at: DateTime assignee: User finished_at: DateTime + + """ + Summary of high priority information from the workflow, accessible to all triagers + """ + high_priority_summary: JSON id: ID! output: JSON report_id: Int!