Skip to content

Add “Copy raw scan” action for nmap engagements - #80

Merged
kocaemre merged 2 commits into
mainfrom
copilot/feat-copy-raw-nmap-output
Aug 8, 2026
Merged

kocaemre merged 2 commits into
mainfrom
copilot/feat-copy-raw-nmap-output

Conversation

Copilot AI commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Recon Deck persisted engagement.raw_input but had no UI affordance to retrieve it. This adds a discoverable copy action for nmap imports while avoiding broken UX for AutoRecon engagements.

  • Header action: copy latest raw scan text

    • Added a Copy raw scan control in the engagement header next to existing scan/export actions.
    • Copies the exact persisted engagement.raw_input to clipboard (latest import value).
  • Source-aware visibility (no broken AutoRecon button)

    • Introduced getCopyableRawScanText(source, rawInput) to centralize eligibility:
      • allowed: nmap-text, nmap-xml with non-empty raw input
      • hidden: autorecon and empty/missing raw input
  • Wiring + targeted unit coverage

    • Passed rawInput into EngagementHeader from engagement page data.
    • Added focused tests for helper behavior across nmap/autorecon and empty input cases.
export function getCopyableRawScanText(source: string, rawInput?: string | null) {
  if (source === "autorecon") return null;
  if (source !== "nmap-text" && source !== "nmap-xml") return null;
  if (!rawInput) return null;
  return rawInput;
}

Copilot AI linked an issue Jul 26, 2026 that may be closed by this pull request
3 tasks
Copilot AI changed the title [WIP] Add copy raw scan feature for engagements Add “Copy raw scan” action for nmap engagements Jul 26, 2026
Copilot AI requested a review from kocaemre July 26, 2026 16:39
@kocaemre
kocaemre marked this pull request as ready for review August 8, 2026 10:04
@kocaemre
kocaemre merged commit a214aba into main Aug 8, 2026
3 checks passed
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.

feat: copy the raw nmap output back out of an engagement

2 participants