Class: SecurityPentestPlanner::PlanRenderer

Inherits:
Object
  • Object
show all
Defined in:
lib/security_pentest_planner/plan_renderer.rb

Constant Summary collapse

SUMMARY_CATEGORIES =
{
  "Acesso" => %w[tenant-traversal header-injection privilege-escalation sa-overprivilege metadata-leak],
  "Entrada" => %w[sqli-basic enum-injection timezone-manipulation bypass-tenant union-exploitation type-juggling],
  "Disponibilidade" => %w[data-range-exhaustion rate-limit-absence cartesian-product full-scan],
  "Informação" => %w[verbosity-check metadata-leak]
}.freeze

Instance Method Summary collapse

Constructor Details

#initialize(analyzer:, vectors:, team: nil, api_layer: "API", data_layer: "Data Lake") ⇒ PlanRenderer

Returns a new instance of PlanRenderer.



12
13
14
15
16
17
18
# File 'lib/security_pentest_planner/plan_renderer.rb', line 12

def initialize(analyzer:, vectors:, team: nil, api_layer: "API", data_layer: "Data Lake")
  @analyzer = analyzer
  @vectors = vectors
  @team = team || "TIME"
  @api_layer = api_layer
  @data_layer = data_layer
end

Instance Method Details

#renderObject



20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/security_pentest_planner/plan_renderer.rb', line 20

def render
  sections = [
    header,
    introduction,
    api_section,
    datalake_section,
    summary_table,
    recommendations,
    datalake_sql_reference,
    assumptions
  ]

  sections.compact.join("\n\n")
end