Skip to content

refactor(discovery): decompose the fingerprint god-file by role (WS-D)#1708

Merged
krisarmstrong merged 4 commits into
mainfrom
refactor/fingerprint-split
Jun 17, 2026
Merged

refactor(discovery): decompose the fingerprint god-file by role (WS-D)#1708
krisarmstrong merged 4 commits into
mainfrom
refactor/fingerprint-split

Conversation

@krisarmstrong

Copy link
Copy Markdown
Collaborator

Summary

Splits internal/discovery/fingerprint.go (786 LOC) into four role-based files in package discovery:

  • fingerprint.go — core probing + port-scan orchestration
  • osfp.go — OS fingerprinting (banner/HTTP/server matchers)
  • service.go — service-version detection (SSH/FTP/SMTP/Telnet)
  • tls.go — TLS probing + version stringification

Pure move — no behavior change, no API change. All new files are under the
600-line size-gate threshold; declaration sets and code-line multisets
verified identical to the original.

Linked Issue

Related to #187

Type of Change

  • Chore / refactor / dependency update

Risk

  • Low

Testing Evidence

Independently verified from a clean worktree of the branch (not the agent's word):

declaration-set diff:   ✅ IDENTICAL
code-line multiset diff: ✅ IDENTICAL
gofmt -l:               clean
go build:               OK
go vet:                 OK
go test -race:          ok
golangci-lint:          0 issues
check-filename-policy:  ✓
file-size gate:         all split files <600

Security and Release Checklist

  • No secrets, tokens, credentials, or customer data are included.
  • Mutating routes, auth surfaces, permission checks, and output encoding were reviewed if touched. (none — pure file split)
  • Dependencies are pinned and justified if changed. (none changed)
  • Documentation, screenshots, or operator notes were updated if behavior changed. (no behavior change)

Split internal/discovery/fingerprint.go (786 LOC) into role-based files in
the same package — pure move: core probing/port-scan orchestration stays
in fingerprint.go; OS fingerprinting, service-version detection, and TLS
probing move to their own files.

All files under the 600-line size-gate threshold. Declaration sets and
code-line multisets verified identical to the original.

Related to #187
@krisarmstrong krisarmstrong enabled auto-merge (squash) June 17, 2026 11:54
@github-actions

Copy link
Copy Markdown

📋 License Compliance Report

✅ All dependencies pass license compliance checks

Go Dependencies

  • Unknown: 118 package(s)
  • MIT: 30 package(s)
  • BSD-3-Clause: 17 package(s)
  • Apache-2.0: 12 package(s)
  • BSD-2-Clause: 2 package(s)

npm Dependencies

See full report in workflow artifacts

Allowed Licenses: MIT, Apache-2.0, BSD-*, ISC, CC0-1.0, MPL-2.0
Forbidden: GPL, AGPL, SSPL (strong copyleft)

Comment thread internal/discovery/tls.go Dismissed
@github-actions

Copy link
Copy Markdown

📋 License Compliance Report

✅ All dependencies pass license compliance checks

Go Dependencies

  • Unknown: 118 package(s)
  • MIT: 30 package(s)
  • BSD-3-Clause: 17 package(s)
  • Apache-2.0: 12 package(s)
  • BSD-2-Clause: 2 package(s)

npm Dependencies

See full report in workflow artifacts

Allowed Licenses: MIT, Apache-2.0, BSD-*, ISC, CC0-1.0, MPL-2.0
Forbidden: GPL, AGPL, SSPL (strong copyleft)

@github-actions

Copy link
Copy Markdown

📋 License Compliance Report

✅ All dependencies pass license compliance checks

Go Dependencies

  • Unknown: 118 package(s)
  • MIT: 30 package(s)
  • BSD-3-Clause: 17 package(s)
  • Apache-2.0: 12 package(s)
  • BSD-2-Clause: 2 package(s)

npm Dependencies

See full report in workflow artifacts

Allowed Licenses: MIT, Apache-2.0, BSD-*, ISC, CC0-1.0, MPL-2.0
Forbidden: GPL, AGPL, SSPL (strong copyleft)

@github-actions

Copy link
Copy Markdown

📋 License Compliance Report

✅ All dependencies pass license compliance checks

Go Dependencies

  • Unknown: 118 package(s)
  • MIT: 30 package(s)
  • BSD-3-Clause: 17 package(s)
  • Apache-2.0: 12 package(s)
  • BSD-2-Clause: 2 package(s)

npm Dependencies

See full report in workflow artifacts

Allowed Licenses: MIT, Apache-2.0, BSD-*, ISC, CC0-1.0, MPL-2.0
Forbidden: GPL, AGPL, SSPL (strong copyleft)

@krisarmstrong krisarmstrong merged commit b90b0e2 into main Jun 17, 2026
27 checks passed
@krisarmstrong krisarmstrong deleted the refactor/fingerprint-split branch June 17, 2026 12:26
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.

2 participants